diff --git a/www/admin/edit_base.inc b/www/admin/edit_base.inc index 05436125..8b1f0140 100644 --- a/www/admin/edit_base.inc +++ b/www/admin/edit_base.inc @@ -42,13 +42,14 @@ $ECHO_ALL = 0; // $DEBUG_TMPL = 0; } - include(LIBS."Class.Form.Generate.inc"); - include(LIBS."Class.Login.inc"); + // set session name here + define('SET_SESSION_NAME', EDIT_SESSION_NAME); + // login class + require(LIBS."Class.Login.inc"); + // form generate for edit interface + require(LIBS."Class.Form.Generate.inc"); // Smarty: and the small extend for l10n calls require(LIBS.'Class.Smarty.Extend.inc'); - // start session here - session_name(EDIT_SESSION_NAME); - session_start(); // set default lang if not set otherwise if (!$lang) diff --git a/www/admin/edit_order.php b/www/admin/edit_order.php index 4b5ef7d6..45483fde 100644 --- a/www/admin/edit_order.php +++ b/www/admin/edit_order.php @@ -31,12 +31,11 @@ $ECHO_ALL = 0; // $DEBUG_TMPL = 0; } - include(LIBS."Class.DB.IO.inc"); - include(LIBS."Class.Login.inc"); + // set session name + define('SET_SESSION_NAME', EDIT_SESSION_NAME); + require(LIBS."Class.Login.inc"); + require(LIBS."Class.DB.IO.inc"); require(LIBS.'Class.Smarty.Extend.inc'); - // start session here - session_name(EDIT_SESSION_NAME); - session_start(); // default lang if (!$lang) diff --git a/www/admin/set_paths.inc b/www/admin/set_paths.inc index 30e6923d..c0acc834 100644 --- a/www/admin/set_paths.inc +++ b/www/admin/set_paths.inc @@ -21,6 +21,7 @@ $TEMPLATE = DEFAULT_TEMPLATE; $TEMPLATE_DIR = $TEMPLATE.'/'; // master template + $MASTER_TEMPLATE_NAME = ''; if (!$MASTER_TEMPLATE_NAME) $MASTER_TEMPLATE_NAME = MASTER_TEMPLATE_NAME; @@ -40,7 +41,7 @@ // set include & template names $CONTENT_INCLUDE = str_replace(".php", ".tpl", $cms->page_name); - $FORM_NAME = str_replace(".php", "", $cms->page_name); + $FORM_NAME = !$FORM_NAME ? str_replace(".php", "", $cms->page_name) : $FORM_NAME; // strip tpl and replace it with inc // php include file per page $cms->INC_TEMPLATE_NAME = str_replace(".tpl", ".inc", $CONTENT_INCLUDE); @@ -62,6 +63,8 @@ $cms->pictures = LAYOUT.$TEMPLATE_DIR.IMAGES."/"; $cms->cache_pictures = LAYOUT.$TEMPLATE_DIR.CACHE.IMAGES.'/'; $cms->cache_pictures_root = ROOT.$cms->cache_pictures; + if (!is_dir($cms->cache_pictures_root)) + mkdir($cms->cache_pictures_root); $template_set = $TEMPLATE; // if we don't find the master template, set the template path back AND set the insert template as absolute path @@ -107,7 +110,7 @@ $smarty->l10n->l10nReloadMOfile($lang, $cms->lang_dir); } - $cms->debug("LANGUAGE", "L: $lang | ".$cms->lang_dir." | MO File: ".$cms->l->mofile); +// $cms->debug("LANGUAGE", "L: $lang | ".$cms->lang_dir." | MO File: ".$cms->l->mofile); $cms->debug("LANGUAGE", "SL: ".$_SESSION['DEFAULT_CHARSET']." | ".$_SESSION['LANG']." | ".$_SESSION['DEFAULT_LANG']); $cms->debug("TEMPLATE", "P: ".$smarty->getTemplateDir()[0]); diff --git a/www/libs/Class.Login.inc b/www/libs/Class.Login.inc index 0a7fde41..2bf8b071 100644 --- a/www/libs/Class.Login.inc +++ b/www/libs/Class.Login.inc @@ -516,7 +516,7 @@ if (!$this->acl['info']['admin']) { // this is the base if nothing is set - $this->acl['acl']['user'] = DEFAULT_ACL_LEVEL; + $this->acl['acl']['user'] = DEFAULT_ACL_LEVEL; // old base ACL $this->acl['acl']['max'] = DEFAULT_ACL_LEVEL; // group ACL 0 if ($_SESSION['GROUP_ACL_LEVEL'] != -1) @@ -566,6 +566,11 @@ $this->acl['acl']['edit_access'][$unit['id']] = !$this->acl['info']['admin'] ? ($unit['acl_level'] != -1 ? $unit['acl_level'] : $this->acl['acl']['page']) : 100; $this->acl['info']['edit_access'][$unit['id']] = $unit['name']; } + // flag if to show extra edit access drop downs (because user has multiple groups assigned) + if (count($_SESSION['UNIT'] > 1)) + $this->acl['acl']['show_ea_extra'] = 1; + else + $this->acl['acl']['show_ea_extra'] = 0; // set the default edit access $this->acl['info']['default_edit_access'] = $_SESSION['UNIT_DEFAULT']; // integrate the default_acl list, but only for the keyword -> level