make organizer optional

This commit is contained in:
Sebijk 2022-03-08 23:44:06 +01:00
parent 086a30e39c
commit d3537daf8a
6 changed files with 50 additions and 10 deletions

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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