Browse Source

make organizer optional

Sebijk 3 years ago
parent
commit
d3537daf8a

+ 8 - 0
src/organizer.addressbook.php

@@ -33,6 +33,14 @@ ModuleFunction('FileHandler',
 	array(substr(__FILE__, strlen(__DIR__)+1),
 	isset($_REQUEST['action']) ? $_REQUEST['action'] : ''));
 
+/**
+ * organizer enabled?
+ */
+if($groupRow['organizer']=='no')
+{
+	header('Location: start.php?sid=' . session_id());
+	exit();
+}
 /**
  * default action = start
  */

+ 8 - 0
src/organizer.calendar.php

@@ -31,6 +31,14 @@ RequestPrivileges(PRIVILEGES_USER);
 ModuleFunction('FileHandler',
 	array(substr(__FILE__, strlen(__DIR__)+1),
 	isset($_REQUEST['action']) ? $_REQUEST['action'] : ''));
+/**
+ * organizer enabled?
+ */
+if($groupRow['organizer']=='no')
+{
+	header('Location: start.php?sid=' . session_id());
+	exit();
+}
 
 /**
  * default action = start

+ 8 - 1
src/organizer.notes.php

@@ -30,7 +30,14 @@ RequestPrivileges(PRIVILEGES_USER);
 ModuleFunction('FileHandler',
 	array(substr(__FILE__, strlen(__DIR__)+1),
 	isset($_REQUEST['action']) ? $_REQUEST['action'] : ''));
-
+/**
+ * organizer enabled?
+ */
+if($groupRow['organizer']=='no')
+{
+	header('Location: start.php?sid=' . session_id());
+	exit();
+}
 /**
  * default action = start
  */

+ 8 - 0
src/organizer.php

@@ -31,6 +31,14 @@ ModuleFunction('FileHandler',
 	array(substr(__FILE__, strlen(__DIR__)+1),
 	isset($_REQUEST['action']) ? $_REQUEST['action'] : ''));
 
+/**
+ * organizer enabled?
+ */
+if($groupRow['organizer']=='no')
+{
+	header('Location: start.php?sid=' . session_id());
+	exit();
+}
 /**
  * default action = start
  */

+ 8 - 1
src/organizer.todo.php

@@ -29,7 +29,14 @@ RequestPrivileges(PRIVILEGES_USER);
 ModuleFunction('FileHandler',
 	array(substr(__FILE__, strlen(__DIR__)+1),
 	isset($_REQUEST['action']) ? $_REQUEST['action'] : ''));
-
+/**
+ * organizer enabled?
+ */
+if($groupRow['organizer']=='no')
+{
+	header('Location: start.php?sid=' . session_id());
+	exit();
+}
 /**
  * default action = start
  */

+ 10 - 8
src/serverlib/template.class.php

@@ -278,14 +278,16 @@ class Template extends Smarty
                 ];
             }
 
-            $pageTabs = array_merge($pageTabs, [
-                'organizer' => [
-                    'icon' => 'organizer',
-                    'faIcon' => 'fa-calendar',
-                    'link' => 'organizer.php?sid=',
-                    'text' => $lang_user['organizer'],
-                    'order' => 400,
-                ], ]);
+            if($groupRow['organizer']=="yes") {
+                $pageTabs = array_merge($pageTabs, [
+                    'organizer' => [
+                        'icon' => 'organizer',
+                        'faIcon' => 'fa-calendar',
+                        'link' => 'organizer.php?sid=',
+                        'text' => $lang_user['organizer'],
+                        'order' => 400,
+                    ], ]);
+            }
 
             if ($groupRow['webdisk'] + $userRow['diskspace_add'] > 0) {
                 $pageTabs = array_merge($pageTabs, [