tbrehm
2013-01-04 cab1344dab05f07f642c9b4d3bceda4ca69fcfc4
Fixed: FS#2603 - admin module selectable as startmodule for clients
1 files modified
25 ■■■■ changed files
interface/web/tools/form/interface_settings.tform.php 25 ●●●● patch | view | raw | blame | history
interface/web/tools/form/interface_settings.tform.php
@@ -84,14 +84,25 @@
//* Pick out modules
//* TODO: limit to activated modules of the user
$modules_list = array();
$handle = @opendir(ISPC_WEB_PATH);
while ($file = @readdir ($handle)) {
    if ($file != '.' && $file != '..') {
        if(@is_dir(ISPC_WEB_PATH."/$file")) {
            if(is_file(ISPC_WEB_PATH."/$file/lib/module.conf.php") and $file != 'login' && $file != 'designer' && $file != 'mailuser') {
                $modules_list[$file] = $file;
if($_SESSION["s"]["user"]["typ"] == 'admin') {
    $handle = @opendir(ISPC_WEB_PATH);
    while ($file = @readdir ($handle)) {
        if ($file != '.' && $file != '..') {
            if(@is_dir(ISPC_WEB_PATH."/$file")) {
                if(is_file(ISPC_WEB_PATH."/$file/lib/module.conf.php") and $file != 'login' && $file != 'designer' && $file != 'mailuser') {
                    $modules_list[$file] = $file;
                }
            }
        }
        }
    }
} else {
    $modules = $conf['interface_modules_enabled'];
    if($_SESSION["s"]["user"]["typ"] != 'admin' && $app->auth->has_clients($_SESSION['s']['user']['userid'])) {
        $modules .= ',client';
    }
    $tmp = explode(',',$modules);
    foreach($tmp as $m) {
        $modules_list[$m] = $m;
    }
}