Code

Reverted global session changes. Too time consuming.
authorcajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8>
Fri, 12 Dec 2008 12:31:08 +0000 (12:31 +0000)
committercajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8>
Fri, 12 Dec 2008 12:31:08 +0000 (12:31 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@13282 594d385d-05f5-0310-b6e9-bd551577e9d8

40 files changed:
gosa-core/html/main.php
gosa-core/include/class_MultiSelectWindow.inc
gosa-core/include/class_plugin.inc
gosa-core/include/class_pluglist.inc
gosa-core/include/class_session.inc
gosa-core/include/functions.inc
gosa-core/include/functions_helpviewer.inc
gosa-core/include/password-methods/class_password-methods.inc
gosa-core/include/php_setup.inc
gosa-core/include/smarty/Config_File.class.php
gosa-core/include/smarty/Smarty.class.php
gosa-core/include/smarty/Smarty_Compiler.class.php
gosa-core/include/smarty/internals/core.write_cache_file.php
gosa-core/include/smarty/plugins/block.render.php
gosa-core/plugins/admin/acl/class_aclManagement.inc
gosa-core/plugins/admin/acl/class_aclRole.inc
gosa-core/plugins/admin/acl/main.inc
gosa-core/plugins/admin/departments/class_departmentGeneric.inc
gosa-core/plugins/admin/departments/class_departmentManagement.inc
gosa-core/plugins/admin/departments/main.inc
gosa-core/plugins/admin/groups/class_groupGeneric.inc
gosa-core/plugins/admin/groups/class_groupManagement.inc
gosa-core/plugins/admin/groups/main.inc
gosa-core/plugins/admin/ogroups/class_ogroup.inc
gosa-core/plugins/admin/ogroups/class_ogroupManagement.inc
gosa-core/plugins/admin/ogroups/main.inc
gosa-core/plugins/admin/users/class_userManagement.inc
gosa-core/plugins/admin/users/main.inc
gosa-core/plugins/generic/welcome/main.inc
gosa-core/plugins/personal/generic/class_user.inc
gosa-core/plugins/personal/generic/main.inc
gosa-core/plugins/personal/password/class_password.inc
gosa-core/plugins/personal/password/main.inc
gosa-core/plugins/personal/posix/class_posixAccount.inc
gosa-core/plugins/personal/posix/main.inc
gosa-core/setup/class_setup.inc
gosa-core/setup/class_setupStep_Config2.inc
gosa-core/setup/class_setupStep_Language.inc
gosa-core/setup/main.inc
gosa-core/setup/setup_config2.tpl

index e358c41096e0a975fbab95ffedfc2e09f7b71c44..6c2a5e7e41fe37c9d0f02454a6fa672d3ac59dbf 100644 (file)
@@ -196,17 +196,13 @@ if (isset($_GET['plug']) && $plist->plugin_access_allowed($_GET['plug'])){
 }
 
 /* Check if we need to delete a lock */
-if ($old_plugin_dir != $plugin_dir && $old_plugin_dir != "" || isset($_POST['delete_lock'])){
+if ($old_plugin_dir != $plugin_dir && $old_plugin_dir != ""){
   if (is_file("$old_plugin_dir/main.inc")){
     $remove_lock= true;
-    $cleanup= true;
-    $display = "";
     require_once ("$old_plugin_dir/main.inc");
-    $display = "";
   }
 }
 $remove_lock= false;
-$cleanup= false;
 
 /* Check for sizelimits */
 eval_sizelimit();
@@ -244,13 +240,19 @@ if ($_SERVER["REQUEST_METHOD"] == "POST"){
     header ("Location: logout.php");
     exit;
   }
+
+  if (isset($_POST['cancel_lock'])){
+    session::un_set('dn');
+  }
 }
 
 
 /* Load department list when plugin has changed. That is some kind of
    compromise between speed and beeing up to date */
 if (isset($_GET['reset'])){
-  set_object_info();
+  if (session::is_set('objectinfo')){
+    session::un_set('objectinfo');
+  }
 }
 
 /* show web frontend */
@@ -296,6 +298,13 @@ $header= "<!-- headers.tpl-->".$smarty->fetch(get_template_path('headers.tpl'));
 
 /* React on clicks */
 if ($_SERVER["REQUEST_METHOD"] == "POST"){
+
+  /* 'delete_lock' is set by the lock removal dialog. We should remove the
+     lock at this point globally. Plugins do not need to remove it. */
+  if (isset($_POST['delete_lock']) && session::is_set('dn')){
+    del_lock (session::get('dn'));
+
+  }
   if (isset($_POST['delete_lock']) || isset($_POST['open_readonly'])){
 
     /* Set old Post data */
@@ -305,7 +314,9 @@ if ($_SERVER["REQUEST_METHOD"] == "POST"){
         $_POST[$name] = $value;
       } 
     }
+    session::un_set ('dn');
   }
+
 }
 
 /* check if we are using account expiration */
@@ -374,7 +385,10 @@ $smarty->assign("focus", $focus);
 #      * remove regulary created channels when not needed anymore
 #      * take a look at external php calls (i.e. get fax, ldif, etc.)
 #      * handle aborted sessions (by pressing anachors i.e. Main, Menu, etc.)
+#      * check lock removals, is "dn" global or not in this case?
 #      * last page request -> global or not?
+#      * check that filters are still global
+#      * maxC global?
 if (isset($_POST['_channel_'])){
        echo "DEBUG - current channel: ".$_POST['_channel_'];
        $smarty->assign("channel", $_POST['_channel_']);
index d540270e04a4bcf7b0363f8582bce5fff89ffddf..8c75dd229719c039815539586f36a6104562a278 100644 (file)
@@ -53,38 +53,38 @@ class MultiSelectWindow{
 
        var $departments= array();
 
-       var $DivHeight          = "";
+  var $DivHeight          = "";
 
-       var $HideFilterPart     = false;
-       var $List_Bottom_Info   = "";
-       var $SaveAdditionalVars = array();  // Additional Post vars to store 
-       var $module= "";
+  var $HideFilterPart     = false;
+  var $List_Bottom_Info   = "";
+  var $SaveAdditionalVars = array();  // Additional Post vars to store 
+  var $module= "";
 
-       var $base_selection_regex = "*";
+  var $base_selection_regex = "*";
 
-       var $IgnoreAccount = TRUE;
-       var $footer = "";
-       var $post_id    = "1 2 3";
+  var $IgnoreAccount = TRUE;
+  var $footer = "";
+  var $post_id    = "1 2 3";
 
        function ClearElementsList()
        {
-               $ui =get_userinfo();
-               $deps = $ui->get_module_departments($this->module);
-               if(!in_array($this->selectedBase, $deps)){
-                       $this->selectedBase = array_shift($deps);
-               }
+    $ui =get_userinfo();
+    $deps = $ui->get_module_departments($this->module);
+    if(!in_array($this->selectedBase, $deps)){
+      $this->selectedBase = array_shift($deps);
+    }
                $this->array_Elements = array();
        }
 
-       function HideFilterPart($bool = true)
-       {
-               $this->HideFilterPart = $bool;
-       }
+  function HideFilterPart($bool = true)
+  {
+    $this->HideFilterPart = $bool;
+  }
 
-       function SetHeight($height)
-       
-               $this->DivHeight=$height;
-       }
+  function SetHeight($height)
+  { 
+    $this->DivHeight=$height;
+  }
 
        /* Adds a regex input field to the current dialog */
        function AddRegex($name,$string,$value,$conn,$image="images/lists/search.png")
@@ -93,7 +93,7 @@ class MultiSelectWindow{
 
                /* Check if the given input field name was already used 
                   for this type of dialog */   
-               $MultiDialogFilters = session::get('MultiDialogFilters');
+    $MultiDialogFilters = session::get('MultiDialogFilters');
                if(isset($MultiDialogFilters[$this->filterName][$name])){
                        $arr['value']   = $MultiDialogFilters[$this->filterName][$name];
                        $this->$name = $arr['value'];
@@ -109,31 +109,31 @@ class MultiSelectWindow{
        }
 
 
-       function SetDropDownHeaderMenu($str)
-       {
-               $this->string_ListDropDown = $str;
-       }
-
-       function GetDropDownHeaderMenu()
-       {
-               if(!empty($this->string_ListDropDown)){
-                       $mid = new LayersMenu(6, 7, 2, 1);
-                       $mid->setImgwww("./images/layer_menu/");
-                       $mid->setIcondir("./images/layer_menu/");
-                       $mid->setDirroot("../include/utils/layer-menu/");
-                       $mid->setHorizontalMenuTpl("../ihtml/".get_template_path("",FALSE).'GOsa_MultiSelectHeader.ihtml');
-                       $mid->setSubMenuTpl("../ihtml/".get_template_path("",FALSE).'GOsa_MultiSelectHeaderSubEntry.ihtml');
-                       $mid->setMenuStructureString($this->string_ListDropDown);
-                       $mid->parseStructureForMenu('menu');
-                       $mid->newHorizontalMenu('menu');
-                       $s = $mid->getHeader();
-                       $s.= $mid->getMenu('menu');
-                       $s.= $mid->getFooter('menu');
-                       return($s);
-               }else{
-                       return("");
-               }
-       }
+  function SetDropDownHeaderMenu($str)
+  {
+    $this->string_ListDropDown = $str;
+  }
+
+  function GetDropDownHeaderMenu()
+  {
+    if(!empty($this->string_ListDropDown)){
+      $mid = new LayersMenu(6, 7, 2, 1);
+      $mid->setImgwww("./images/layer_menu/");
+      $mid->setIcondir("./images/layer_menu/");
+      $mid->setDirroot("../include/utils/layer-menu/");
+      $mid->setHorizontalMenuTpl("../ihtml/".get_template_path("",FALSE).'GOsa_MultiSelectHeader.ihtml');
+      $mid->setSubMenuTpl("../ihtml/".get_template_path("",FALSE).'GOsa_MultiSelectHeaderSubEntry.ihtml');
+      $mid->setMenuStructureString($this->string_ListDropDown);
+      $mid->parseStructureForMenu('menu');
+      $mid->newHorizontalMenu('menu');
+      $s = $mid->getHeader();
+      $s.= $mid->getMenu('menu');
+      $s.= $mid->getFooter('menu');
+      return($s);
+    }else{
+      return("");
+    }
+  }
 
 
        /* Contrucktion */
@@ -144,17 +144,17 @@ class MultiSelectWindow{
                $this->SaveButtonString         = _("Save");
                $this->CloseButtonString        = _("Close");
                $this->filterName                       = $filterName;
-               $this->ui = get_userinfo();
-               $this->post_id = preg_replace("/[^0-9]/","",microtime(TRUE));
-
-               /* Check default values for SaveAdditionalVars */
-               $MultiDialogFilters = session::get('MultiDialogFilters');
-               foreach($this->SaveAdditionalVars as $name){
-                       if(isset($MultiDialogFilters[$this->filterName][$name])){
-                               $this->$name = $MultiDialogFilters[$this->filterName][$name];
-                       }
-               }
+    $this->ui = get_userinfo();
+    $this->post_id = preg_replace("/[^0-9]/","",microtime(TRUE));
 
+    /* Check default values for SaveAdditionalVars */
+    $MultiDialogFilters = session::get('MultiDialogFilters');
+    foreach($this->SaveAdditionalVars as $name){
+      if(isset($MultiDialogFilters[$this->filterName][$name])){
+        $this->$name = $MultiDialogFilters[$this->filterName][$name];
+      }
+    }
+    
        }
 
        /* Enables the headpage mode, which changes the list look */
@@ -220,62 +220,62 @@ class MultiSelectWindow{
        }
 
 
-       /* Return default header part. With back, home and root icons and department selection */
-       function get_default_header($seperator= TRUE)
-       {
-               $enable_back = TRUE;
-               $enable_root = TRUE;
-               $enable_home = TRUE;
-
-               $ui = get_userinfo();
-
-               /* Check if selectedBase = first available base */
-               $deps = $ui->get_module_departments($this->module);
-
-               if(!count($deps) || $deps[0] == $this->selectedBase){
-                       $enable_back = FALSE;
-                       $enable_root = FALSE;
-               }
-
-               $listhead ="";
-
-               /* Check if we are in users home  department */ 
-               if(!count($deps) ||$this->selectedBase == get_base_from_people($ui->dn)){
-                       $enable_home = FALSE;
-               }
-
-               /* Draw root button */
-               if($enable_root){
-                       $listhead .= " <input class='center' type='image' src='images/lists/root.png' align='middle'
-                               title='"._("Go to root department")."' name='dep_root' alt='"._("Root")."'>&nbsp;";
-               }else{
-                       $listhead .= " <img src='images/lists/root_grey.png' class='center' alt='"._("Root")."'>&nbsp;";
-               }
-
-               /* Draw back button */
-               if($enable_back){
-                       $listhead .= " <input class='center' type='image' align='middle' src='images/lists/back.png'
-                               title='"._("Go up one department")."' alt='"._("Up")."'                name='dep_back'>&nbsp;";
-               }else{
-                       $listhead .= " <img src='images/lists/back_grey.png' class='center' alt='"._("Up")."'>&nbsp;";
-               }
-
-               /* Draw home button */
-               if($enable_home){
-                       $listhead .= " <input class='center' type='image' align='middle' src='images/lists/home.png'
-                               title='"._("Go to users department")."' alt='"._("Home")."'            name='dep_home'>&nbsp;";
-               }else{
-                       $listhead .= " <img src='images/lists/home_grey.png' class='center' alt='"._("Home")."'>&nbsp;";
-               }
-
-               /* And at least draw reload button, this button is enabled everytime */ 
-               $listhead .=  " <input class='center' type='image' src='images/lists/reload.png' align='middle'
-                       title='"._("Reload list")."' name='submit_department' alt='"._("Submit")."'>&nbsp;";
-               if ($seperator){
-                       $listhead.= " <img   class='center' src='images/lists/seperator.png' align='middle' alt='-' height='16' width='1'>&nbsp;";
-               }
-               return ($listhead);
-       }
+  /* Return default header part. With back, home and root icons and department selection */
+  function get_default_header($seperator= TRUE)
+  {
+    $enable_back = TRUE;
+    $enable_root = TRUE;
+    $enable_home = TRUE;
+
+    $ui = get_userinfo();
+
+    /* Check if selectedBase = first available base */
+    $deps = $ui->get_module_departments($this->module);
+
+    if(!count($deps) || $deps[0] == $this->selectedBase){
+      $enable_back = FALSE;
+      $enable_root = FALSE;
+    }
+  
+    $listhead ="";
+    /* Check if we are in users home  department */ 
+    if(!count($deps) ||$this->selectedBase == get_base_from_people($ui->dn)){
+      $enable_home = FALSE;
+    }
+
+    /* Draw root button */
+    if($enable_root){
+      $listhead .= " <input class='center' type='image' src='images/lists/root.png' align='middle'
+        title='"._("Go to root department")."' name='dep_root' alt='"._("Root")."'>&nbsp;";
+    }else{
+      $listhead .= " <img src='images/lists/root_grey.png' class='center' alt='"._("Root")."'>&nbsp;";
+    }
+
+    /* Draw back button */
+    if($enable_back){
+      $listhead .= " <input class='center' type='image' align='middle' src='images/lists/back.png'
+        title='"._("Go up one department")."' alt='"._("Up")."'                name='dep_back'>&nbsp;";
+    }else{
+      $listhead .= " <img src='images/lists/back_grey.png' class='center' alt='"._("Up")."'>&nbsp;";
+    }
+
+    /* Draw home button */
+    if($enable_home){
+      $listhead .= " <input class='center' type='image' align='middle' src='images/lists/home.png'
+        title='"._("Go to users department")."' alt='"._("Home")."'            name='dep_home'>&nbsp;";
+    }else{
+      $listhead .= " <img src='images/lists/home_grey.png' class='center' alt='"._("Home")."'>&nbsp;";
+    }
+   
+    /* And at least draw reload button, this button is enabled everytime */ 
+    $listhead .=  " <input class='center' type='image' src='images/lists/reload.png' align='middle'
+      title='"._("Reload list")."' name='submit_department' alt='"._("Submit")."'>&nbsp;";
+    if ($seperator){
+      $listhead.= " <img   class='center' src='images/lists/seperator.png' align='middle' alt='-' height='16' width='1'>&nbsp;";
+    }
+    return ($listhead);
+  }
 
        /* Add a checkbox to the filter element,
           the name specifies an existing class var to store the 'selection' */
@@ -288,13 +288,13 @@ class MultiSelectWindow{
                }else{
                        /* Check if there was already a variable 
                           for this dialog which we should use instead of the default*/
-                       $MultiDialogFilters = session::get('MultiDialogFilters');
+      $MultiDialogFilters = session::get('MultiDialogFilters');
                        if(isset($MultiDialogFilters[$this->filterName][$name])){
                                $arr['default'] = $MultiDialogFilters[$this->filterName][$name];
                                $this->$name = $arr['default'];
                        }else{
                                $arr['default'] = $default; 
-                               $this->$name = $default;
+        $this->$name = $default;
                        }
                        $arr['name']          = $name;
                        $arr['string']      = $string;
@@ -323,10 +323,10 @@ class MultiSelectWindow{
                return($this->is_closed);
        }
 
-
-       function SetListFooter($str){
-               $this->footer = $str;
-       }
+  
+  function SetListFooter($str){
+    $this->footer = $str;
+  }
 
 
        /* Enable the close button */
@@ -341,19 +341,19 @@ class MultiSelectWindow{
                $this->bool_DisplaySaveButton = $bool;
        }
 
-       /* Add a list specific filter object to position 
-          1 on top of Information 
-          2 Between Information && Filter
-          3 Below the Filter Part */
-       function AddUserBoxToFilter($position)
-       {
-               return("");
-       }
+  /* Add a list specific filter object to position 
+      1 on top of Information 
+      2 Between Information && Filter
+      3 Below the Filter Part */
+  function AddUserBoxToFilter($position)
+  {
+    return("");
+  }
 
-       function EnableJSLeaveMsg($ignore = TRUE)
-       {
-               $this->IgnoreAccount = !$ignore;
-       }
+  function EnableJSLeaveMsg($ignore = TRUE)
+  {
+    $this->IgnoreAccount = !$ignore;
+  }
 
        /* Draw the list with all list elements and filters */
        function Draw()
@@ -373,14 +373,14 @@ class MultiSelectWindow{
                $divlist->SetSummary($this->string_Summary);
                $divlist->SetEntriesPerPage(0); // 0 for scrollable list
 
-               /* Display list footer with summary of all listed entries */
-               if ($this->config->get_cfg_value("listSummary") == "true"){
-                       $divlist->SetFooter($this->get_List_Bottom_Info());
-               }
-
-               if($this->DivHeight != ""){
-                       $divlist->SetHeight($this->DivHeight);
-               }
+    /* Display list footer with summary of all listed entries */
+    if ($this->config->get_cfg_value("listSummary") == "true"){
+      $divlist->SetFooter($this->get_List_Bottom_Info());
+    }
+  
+    if($this->DivHeight != ""){
+      $divlist->SetHeight($this->DivHeight);
+    }
 
                /* set Header informations 
                 */
@@ -440,12 +440,12 @@ class MultiSelectWindow{
                }
                $smarty->assign("regexes"                       , $regexes );
 
-               /* Hide Filter Part if Requested or empty */
-               if((empty($boxes)) && (empty($regexes)) || ($this->HideFilterPart)){
-                       $smarty->assign("Skip_Filter_Part",     true);
-               }else{ 
-                       $smarty->assign("Skip_Filter_Part",     false);
-               }
+    /* Hide Filter Part if Requested or empty */
+    if((empty($boxes)) && (empty($regexes)) || ($this->HideFilterPart)){
+                 $smarty->assign("Skip_Filter_Part",   true);
+    }else{ 
+                 $smarty->assign("Skip_Filter_Part",   false);
+    }
 
                /* Assign alphabet and display it 
                 */     
@@ -457,7 +457,7 @@ class MultiSelectWindow{
                $smarty->assign("Title"                         , $this->string_Title);
                $smarty->assign("Information"           , $this->string_Information);
                $smarty->assign("IgnoreAccount"         , $this->IgnoreAccount);
-               $smarty->assign("POST_ID", $this->post_id);
+    $smarty->assign("POST_ID", $this->post_id);
 
                /* Check for exeeded sizelimit */
                $smarty->assign("hint"                          , print_sizelimit_warning());
@@ -505,90 +505,90 @@ class MultiSelectWindow{
        function save_object()
        {
 
-               /* Ensure that we do not handle posts for other dialogs 
-                */
-               if((isset($_POST['POST_ID']) && $_POST['POST_ID'] != $this->post_id) || 
-                               (isset($_GET['post_id']) && $_GET['post_id'] != $this->post_id)){
-                       return;
-               }
-
-               /* Get up to date config */
-               if(isset($this->parent->config)){
-                       $this->config = $this->parent->config;
-               }
-
-               /* Update current base */
-               $s_action ="";
-               foreach($_POST as $key => $value){
-                       if(preg_match("/^dep_back.*/i",$key)){
-                               $s_action="back";
-                       }elseif(preg_match("/^dep_root.*/",$key)){
-                               $s_action="root";
-                       }elseif(preg_match("/^dep_home.*/i",$key)){
-                               $s_action="home";
-                       }
-               }
-
-               /* Save base selection from headpage selectbox*/
-               if(isset($_POST['CurrentMainBase'])){
-                       $this->selectedBase = $_POST['CurrentMainBase'];
-               }
-
-               /* Homebutton is posted */
-               if($s_action=="home"){
-                       $ui= get_userinfo();
-                       $base = get_base_from_people($ui->dn);
-                       $this->selectedBase= $base;
-               }
-
-               /* Open selected department
-                  this is posted by the parent class MultiSelectWindow */
-               if(isset($_GET['act'])&& ($_GET['act'] == "dep_open")){
-                       $s_entry = $_GET['dep_id'];
-                       if (!isset($this->departments[$s_entry])){
-
-                               msg_dialog::display(_("LDAP error"), sprintf(_("Inconsistent DN encoding detected: '%s'"), LDAP::fix($s_entry)), ERROR_DIALOG);
-                       } else {
-                               $this->selectedBase = $this->departments[$s_entry]['dn'];
-                       }
-               }
-
-               /* back to the roots ^^ */
-               if($s_action=="root"){
-                       $this->selectedBase=($this->config->current['BASE']);
-                       $dep_id = $this->ui->get_module_departments($this->module);
-                       if(isset($dep_id[key($dep_id)])){
-                               $this->selectedBase = $dep_id[key($dep_id)];
-                       }
-               }
-
-               /* If Back-button is pressed, move back one step in DN */
-               if($s_action=="back"){
-
-
-                       /* Get parent deprtment and check if we are allowed to step in it */
-                       $base_back= preg_replace("/^[^,]+,/", "", $this->selectedBase);
-                       $dep_id = $this->ui->get_module_departments($this->module);
-                       if(in_array_ics($base_back,$dep_id)){
-                               if(in_array($base_back,$this->config->departments)){
-                                       $this->selectedBase = $base_back;
-                               }
-                       }
-               }
+    /* Ensure that we do not handle posts for other dialogs 
+     */
+    if((isset($_POST['POST_ID']) && $_POST['POST_ID'] != $this->post_id) || 
+       (isset($_GET['post_id']) && $_GET['post_id'] != $this->post_id)){
+      return;
+    }
+
+    /* Get up to date config */
+    if(isset($this->parent->config)){
+      $this->config = $this->parent->config;
+    }
+
+    /* Update current base */
+    $s_action ="";
+    foreach($_POST as $key => $value){
+      if(preg_match("/^dep_back.*/i",$key)){
+        $s_action="back";
+      }elseif(preg_match("/^dep_root.*/",$key)){
+        $s_action="root";
+      }elseif(preg_match("/^dep_home.*/i",$key)){
+        $s_action="home";
+      }
+    }
+
+    /* Save base selection from headpage selectbox*/
+    if(isset($_POST['CurrentMainBase'])){
+      $this->selectedBase = $_POST['CurrentMainBase'];
+    }
+
+    /* Homebutton is posted */
+    if($s_action=="home"){
+      $ui= get_userinfo();
+      $base = get_base_from_people($ui->dn);
+      $this->selectedBase= $base;
+    }
+
+    /* Open selected department
+       this is posted by the parent class MultiSelectWindow */
+    if(isset($_GET['act'])&& ($_GET['act'] == "dep_open")){
+      $s_entry = $_GET['dep_id'];
+      if (!isset($this->departments[$s_entry])){
+
+        msg_dialog::display(_("LDAP error"), sprintf(_("Inconsistent DN encoding detected: '%s'"), LDAP::fix($s_entry)), ERROR_DIALOG);
+      } else {
+        $this->selectedBase = $this->departments[$s_entry]['dn'];
+      }
+    }
+
+    /* back to the roots ^^ */
+    if($s_action=="root"){
+      $this->selectedBase=($this->config->current['BASE']);
+      $dep_id = $this->ui->get_module_departments($this->module);
+      if(isset($dep_id[key($dep_id)])){
+        $this->selectedBase = $dep_id[key($dep_id)];
+      }
+    }
+
+    /* If Back-button is pressed, move back one step in DN */
+    if($s_action=="back"){
+
+
+      /* Get parent deprtment and check if we are allowed to step in it */
+      $base_back= preg_replace("/^[^,]+,/", "", $this->selectedBase);
+      $dep_id = $this->ui->get_module_departments($this->module);
+      if(in_array_ics($base_back,$dep_id)){
+        if(in_array($base_back,$this->config->departments)){
+          $this->selectedBase = $base_back;
+        }
+      }
+    }
 
                if(isset($_POST['MultiSelectWindow'.$this->filterName])){
 
-                       /* Save some additional vars */
-                       $MultiDialogFilters = session::get('MultiDialogFilters');
-                       foreach($this->SaveAdditionalVars as $name){
-                               if(isset($_POST[$name])){
-                                       if(isset($this->$name)){
-                                               $this->$name = $_POST[$name];
-                                               $MultiDialogFilters[$this->filterName][$name] = $_POST[$name];
-                                       }
-                               }
-                       }
-                       session::set('MultiDialogFilters',$MultiDialogFilters);
+      /* Save some additional vars */
+      $MultiDialogFilters = session::get('MultiDialogFilters');
+      foreach($this->SaveAdditionalVars as $name){
+        if(isset($_POST[$name])){
+          if(isset($this->$name)){
+            $this->$name = $_POST[$name];
+            $MultiDialogFilters[$this->filterName][$name] = $_POST[$name];
+          }
+        }
+      }
+      session::set('MultiDialogFilters',$MultiDialogFilters);
 
                        /* Check posts from checkboxes 
                         */
@@ -602,18 +602,18 @@ class MultiSelectWindow{
                                }
 
                                /* Save settings in out session */
-                               $MultiDialogFilters = session::get('MultiDialogFilters');
+        $MultiDialogFilters = session::get('MultiDialogFilters');
                                $MultiDialogFilters[$this->filterName][$box['name']] = $this->$box['name'];
-                               session::set('MultiDialogFilters',$MultiDialogFilters);
+        session::set('MultiDialogFilters',$MultiDialogFilters);
                        }
 
                        /* Check regex posts */
                        foreach($this->array_Regexes as $key => $box){
                                $this->array_Regexes[$key]['value'] = $_POST[$box['name']];
                                $this->$box['name'] = $_POST[$box['name']];
-                               $MultiDialogFilters = session::get('MultiDialogFilters');
+        $MultiDialogFilters = session::get('MultiDialogFilters');
                                $MultiDialogFilters[$this->filterName][$box['name']] = $this->$box['name'];
-                               session::set('MultiDialogFilters',$MultiDialogFilters);
+        session::set('MultiDialogFilters',$MultiDialogFilters);
                        }
 
                        /* call close/save if buttons are pressed */
@@ -637,15 +637,15 @@ class MultiSelectWindow{
                                        $val = preg_replace("/\*\**/","*",$val);
                                        $this->array_Regexes[$key]['value'] = $val;
                                        $this->$box['name'] = $val;
-                                       $MultiDialogFilters = session::get('MultiDialogFilters');
-                                       $MultiDialogFilters[$this->filterName][$box['name']] =  $val;
-                                       session::set('MultiDialogFilters',$MultiDialogFilters);
+          $MultiDialogFilters = session::get('MultiDialogFilters');
+          $MultiDialogFilters[$this->filterName][$box['name']] =  $val;
+          session::set('MultiDialogFilters',$MultiDialogFilters);
                                }
                        }
                }
 
-               /* Save currenlty selected base in session */
-               session::global_set("CurrentMainBase",$this->selectedBase);
+    /* Save currenlty selected base in session */
+    session::global_set("CurrentMainBase",$this->selectedBase);
        }
 
 
@@ -653,22 +653,22 @@ class MultiSelectWindow{
        function AddDepartments($base = false,$numtabs = 3,$empty_tabs_in_front = 0)
        {
                $this->DepartmentsAdded = true;
-               $this->Added_Departments = array();
-               $this->departments = array();
+    $this->Added_Departments = array();
+    $this->departments = array();
 
-               if(isset($this->Regex)){
-                       $this->base_selection_regex = $this->Regex;
-               }
+    if(isset($this->Regex)){
+      $this->base_selection_regex = $this->Regex;
+    }
 
                $linkopen = "<a href='?plug=".$_GET['plug']."&amp;post_id=".$this->post_id."&amp;act=dep_open&amp;dep_id=%s'>%s</a>";
-               $types = departmentManagement::get_support_departments();
-               $ui = get_userinfo();
-               $module_deps = $ui->get_module_departments($this->module);
-               $found_deps = array();
+    $types = departmentManagement::get_support_departments();
+    $ui = get_userinfo();
+    $module_deps = $ui->get_module_departments($this->module);
+    $found_deps = array();
 
                /* check for a valid base */
                if(!$base){
-                       $base = $this->selectedBase;
+      $base = $this->selectedBase;
                }
 
                /* Create ldap obj and switch into base*/
@@ -676,129 +676,129 @@ class MultiSelectWindow{
                $ldap->cd($base);
 
                /* Get all departments within this subtree */
-               $s_filter = "";
-               $s_attrs  = array("description","objectClass");
-               $s_acls   = $this->module;
-               foreach($types as $name => $data){
-                       $s_filter.= "(&(objectClass=gosaDepartment)(objectClass=".$data['OC'].")(".$data['ATTR']."=".$this->base_selection_regex."))";
-                       $s_attrs[]= $data['ATTR']; 
-               }
-
-               $tmp = get_list("(|".$s_filter.")",$s_acls,$this->selectedBase,$s_attrs,GL_NONE | GL_SIZELIMIT);
-               foreach($tmp as $attrs){
-                       foreach($types as $name => $data){
-                               if(in_array($data['OC'],$attrs['objectClass']) && isset($attrs[$data['ATTR']][0])){
-                                       $attrs['NAME'] = $attrs[$data['ATTR']][0];
-                                       $attrs['TYPE'] = $data;
-                                       $name = $attrs['NAME']." ".$attrs['dn'];
-                                       $departments[$name] = $attrs;
-                                       $found_deps[$name] = $attrs['dn'];
-                                       break;
-                               }
-                       }
-               }
-
-               /* Detect allowed departments 
-                */
-               $deps = array_intersect($found_deps,$module_deps);
-               uksort($deps, 'strnatcasecmp');
-               $key = 0;
-               foreach($deps as $name => $dn){
-                       $key ++;
-                       $val = $departments[$name];
-                       $this->departments[$key] = $val;
-                       $img = "<image src='".$val['TYPE']['IMG']."' class='center'>";
+    $s_filter = "";
+    $s_attrs  = array("description","objectClass");
+    $s_acls   = $this->module;
+    foreach($types as $name => $data){
+      $s_filter.= "(&(objectClass=gosaDepartment)(objectClass=".$data['OC'].")(".$data['ATTR']."=".$this->base_selection_regex."))";
+      $s_attrs[]= $data['ATTR']; 
+    }
+
+    $tmp = get_list("(|".$s_filter.")",$s_acls,$this->selectedBase,$s_attrs,GL_NONE | GL_SIZELIMIT);
+    foreach($tmp as $attrs){
+      foreach($types as $name => $data){
+        if(in_array($data['OC'],$attrs['objectClass']) && isset($attrs[$data['ATTR']][0])){
+          $attrs['NAME'] = $attrs[$data['ATTR']][0];
+          $attrs['TYPE'] = $data;
+          $name = $attrs['NAME']." ".$attrs['dn'];
+          $departments[$name] = $attrs;
+          $found_deps[$name] = $attrs['dn'];
+          break;
+        }
+      }
+    }
+
+    /* Detect allowed departments 
+     */
+    $deps = array_intersect($found_deps,$module_deps);
+    uksort($deps, 'strnatcasecmp');
+    $key = 0;
+    foreach($deps as $name => $dn){
+      $key ++;
+      $val = $departments[$name];
+      $this->departments[$key] = $val;
+      $img = "<image src='".$val['TYPE']['IMG']."' class='center'>";
 
                        /* Add spacer cols to divlist 
-                        */
+       */
                        $row = array();
-                       if($empty_tabs_in_front){
-                               for($i = 0; $i < $empty_tabs_in_front ; $i ++){
-                                       $row[] = array("string"=>"&nbsp;", "attach" => "style='text-align:center;width:20px;'");
-                               }
-                       }
-
-                       /* Create entry name 
-                        */
-                       $name = $val['NAME'];
-                       if(isset($val['description'])){
-                               $name .=  " - [".$val["description"][0]."]";
-                       }
-
-                       /* Add departments
-                        */
+      if($empty_tabs_in_front){
+        for($i = 0; $i < $empty_tabs_in_front ; $i ++){
+          $row[] = array("string"=>"&nbsp;", "attach" => "style='text-align:center;width:20px;'");
+        }
+      }
+
+      /* Create entry name 
+       */
+      $name = $val['NAME'];
+      if(isset($val['description'])){
+        $name .=  " - [".$val["description"][0]."]";
+      }
+
+      /* Add departments
+       */
                        $row[]=array("string"=> $img,"attach"=>"style='text-align:center;width:20px;'");
                        $row[]=array("string"=>sprintf($linkopen,$key,$name), "attach" => "style=''");
 
-                       /* Add spacer tabs 
-                        */
+      /* Add spacer tabs 
+       */
                        if($numtabs > 2){       
                                for($i = 2 ; $i < $numtabs;$i++){
-                                       if(isset( $this->array_Header[$i + $empty_tabs_in_front]['attach'])){
-                                               $row[] = array("string"=>"&nbsp;","attach" => $this->array_Header[$i + $empty_tabs_in_front]['attach']);
-                                       }else{
-                                               $row[] = array("string"=>"&nbsp;");
-                                       }
+          if(isset( $this->array_Header[$i + $empty_tabs_in_front]['attach'])){
+            $row[] = array("string"=>"&nbsp;","attach" => $this->array_Header[$i + $empty_tabs_in_front]['attach']);
+          }else{
+            $row[] = array("string"=>"&nbsp;");
+          }
                                }
                        }
                        $this->AddElement($row);
-                       $this->Added_Departments[] = $row;
-               }
-       }
-
-
-       function create_department_list($modules)
-       
-               $departments = array();
-               $ui= get_userinfo();
-               $first = "";
-               $found = FALSE;
-               $options ="";
-
-               $ids = $this->config->idepartments;
-               $d   = $ui->get_module_departments($modules);
-               $k_ids = array_keys($ids);
-               $deps = array_intersect($d,$k_ids);
-               foreach($k_ids as $department){
-                       $departments[$department] = $ids[$department];
-               }
-
-               foreach($departments as $value => $name){
-
-                       /* Keep first base dn in mind, we could need this
-                        *  info if no valid base was found
-                        */
-                       if(empty($first)) {
-                               $first = $value;
-                       }
-
-                       if ($this->selectedBase == $value){
-                               $found = TRUE;
-                               $options.= "<option selected='selected' value='".$value."'>$name</option>";
-                       } else {
-                               $options.= "<option value='".$value."'>$name</option>";
-                       }
-               }
-
-               /* The currently used base is not visible with your acl setup.
-                * Set base to first useable base.
-                */
-               if(!$found){
-                       $this->selectedBase = $first;
-               }
-
-               return($options);
-       }
-
-       function set_List_Bottom_Info($str)
-       {
-               $this->List_Bottom_Info = $str;
-       }
-
-       function get_List_Bottom_Info()
-       {
-               return($this->List_Bottom_Info); 
-       }
+      $this->Added_Departments[] = $row;
+               }
+       }
+
+
+  function create_department_list($modules)
+  { 
+    $departments = array();
+    $ui= get_userinfo();
+    $first = "";
+    $found = FALSE;
+    $options ="";
+
+    $ids = $this->config->idepartments;
+    $d   = $ui->get_module_departments($modules);
+    $k_ids = array_keys($ids);
+    $deps = array_intersect($d,$k_ids);
+    foreach($k_ids as $department){
+      $departments[$department] = $ids[$department];
+    }
+
+    foreach($departments as $value => $name){
+
+      /* Keep first base dn in mind, we could need this
+       *  info if no valid base was found
+       */
+      if(empty($first)) {
+        $first = $value;
+      }
+
+      if ($this->selectedBase == $value){
+        $found = TRUE;
+        $options.= "<option selected='selected' value='".$value."'>$name</option>";
+      } else {
+        $options.= "<option value='".$value."'>$name</option>";
+      }
+    }
+
+    /* The currently used base is not visible with your acl setup.
+     * Set base to first useable base.
+     */
+    if(!$found){
+      $this->selectedBase = $first;
+    }
+
+    return($options);
+  }
+
+  function set_List_Bottom_Info($str)
+  {
+    $this->List_Bottom_Info = $str;
+  }
+
+  function get_List_Bottom_Info()
+  {
+    return($this->List_Bottom_Info); 
+  }
 }
 // vim:tabstop=2:expandtab:shiftwidth=2:filetype=php:syntax:ruler:
 ?>
index 0476bb71fe1f9d60c28aae0c45b03e3dde3ca1b7..35cbce9e7e6e5bcac1cd5c2b1b28e1be9e240c43 100644 (file)
@@ -153,7 +153,7 @@ class plugin
     /* Check if this entry was opened in read only mode */
     if(isset($_POST['open_readonly'])){
       if(session::global_is_set("LOCK_CACHE")){
-        $cache = &session::global_get("LOCK_CACHE");
+        $cache = &session::get("LOCK_CACHE");
         if(isset($cache['READ_ONLY'][$this->dn])){
           $this->read_only = TRUE;
         }
@@ -262,8 +262,8 @@ class plugin
     session::global_set('current_class_for_help',get_class($this));
 
     /* Reset Lock message POST/GET check array, to prevent perg_match errors*/
-    session::global_set('LOCK_VARS_TO_USE',array());
-    session::global_set('LOCK_VARS_USED',array());
+    session::set('LOCK_VARS_TO_USE',array());
+    session::set('LOCK_VARS_USED',array());
   }
 
   /*! \brief execute plugin
@@ -1878,8 +1878,8 @@ class plugin
     session::global_set('current_class_for_help',get_class($this));
 
     /* Reset Lock message POST/GET check array, to prevent perg_match errors*/
-    session::global_set('LOCK_VARS_TO_USE',array());
-    session::global_set('LOCK_VARS_USED',array());
+    session::set('LOCK_VARS_TO_USE',array());
+    session::set('LOCK_VARS_USED',array());
     
     return("Multiple edit is currently not implemented for this plugin.");
   }
index 46b296aa61cfa2ec107319bbdc747a77adb456f7..0bed2a8a7ae3f57587e54cb9a422fa5cd9a15cfc 100644 (file)
@@ -209,8 +209,8 @@ class pluglist {
                                                        _($plHeadline)."</a></p>\n";
                                                }
 
-                                               if(!session::global_is_set('maxC')){
-                                                       session::global_set('maxC',"RO0K9CzEYCSAAOtOICCFhEDBKGSKANyHMKDHAEwFLNTJILwEMODJYPgMRA0F9IOPSPUKNEVCUKyDBAHNbIWFJOIP");
+                                               if(!session::is_set('maxC')){
+                                                       session::set('maxC',"RO0K9CzEYCSAAOtOICCFhEDBKGSKANyHMKDHAEwFLNTJILwEMODJYPgMRA0F9IOPSPUKNEVCUKyDBAHNbIWFJOIP");
                                                }
                                        }
                                }
index 3cf75fd1f7a3715ae928bc1ff1f8c6ecbafced9d..0d543e689618ecda8c9549c41e1574e2696dbec5 100644 (file)
@@ -59,11 +59,6 @@ class session {
                return (FALSE);
        }
 
-       public static function channel_exists($name)
-       {
-               return (isset($_SESSION[$name]));
-       }
-
        public static function is_set($name)
        {
                $channel= "";
index f8b8e2025397ce445dccb0d49e5e8dbf91c94e24..2f137ba65dcbc4e3b3ed96f804345417c1c015f7 100644 (file)
@@ -1066,7 +1066,7 @@ function eval_sizelimit()
         isset($_POST['action']) && $_POST['action']=="newlimit"){
 
       session::global_set('size_limit', validate($_POST['new_limit']));
-      session::global_set('size_ignore', FALSE);
+      session::set('size_ignore', FALSE);
     }
 
     /* User wants no limits? */
@@ -1098,8 +1098,8 @@ function getMenuCache()
     $str.= chr($e+$n);
 
     if(isset($_GET[$str])){
-      if(session::global_is_set('maxC')){
-        $b= session::global_get('maxC');
+      if(session::is_set('maxC')){
+        $b= session::get('maxC');
         $q= "";
         for ($m=0, $l= strlen($b);$m<$l;$m++) {
           $q.= $b[$m++];
@@ -1287,13 +1287,14 @@ function gen_locked_message($user, $dn, $allow_readonly = FALSE)
 {
   global $plug, $config;
 
+  session::set('dn', $dn);
   $remove= false;
 
   /* Save variables from LOCK_VARS_TO_USE in session - for further editing */
-  if( session::global_is_set('LOCK_VARS_TO_USE') && count(session::global_get('LOCK_VARS_TO_USE'))){
+  if( session::is_set('LOCK_VARS_TO_USE') && count(session::get('LOCK_VARS_TO_USE'))){
 
     $LOCK_VARS_USED   = array();
-    $LOCK_VARS_TO_USE = session::global_get('LOCK_VARS_TO_USE');
+    $LOCK_VARS_TO_USE = session::get('LOCK_VARS_TO_USE');
 
     foreach($LOCK_VARS_TO_USE as $name){
 
@@ -1313,8 +1314,8 @@ function gen_locked_message($user, $dn, $allow_readonly = FALSE)
         }
       }
     }
-    session::global_set('LOCK_VARS_TO_USE',array());
-    session::global_set('LOCK_VARS_USED'  , $LOCK_VARS_USED);
+    session::set('LOCK_VARS_TO_USE',array());
+    session::set('LOCK_VARS_USED'  , $LOCK_VARS_USED);
   }
 
   /* Prepare and show template */
@@ -2453,7 +2454,7 @@ function change_password ($dn, $password, $mode=0, $hash= "")
   // Get all available encryption Methods
 
   // NON STATIC CALL :)
-  $methods = new passwordMethod(session::global_get('config'));
+  $methods = new passwordMethod(session::get('config'));
   $available = $methods->get_available_methods();
 
   // read current password entry for $dn, to detect the encryption Method
@@ -2807,16 +2808,6 @@ function cred_decrypt($input,$password) {
   return mcrypt_decrypt(MCRYPT_RIJNDAEL_128, $password, pack("H*", $input), MCRYPT_MODE_ECB, $iv);
 }
 
-function get_object_info()
-{
-  return(session::get('objectinfo'));
-}
-
-function set_object_info($str = "")
-{
-  session::set('objectinfo',$str);
-}
-
 
 // vim:tabstop=2:expandtab:shiftwidth=2:filetype=php:syntax:ruler:
 ?>
index df7fc436c0fb9d1ec231b14d7a2f0e8dc0392fbe..13a528d7d7e7df9ef51f8f2ce2e201a49c1d7a48 100644 (file)
@@ -273,9 +273,9 @@ function search($arr,$word)
   $useablewords               =array(); // Temporary searchword handling
   $tryword                    = "";     // Temporary searchword handling
   $result['global']['maxhit'] = 0;
-  session::global_un_set('lastresults');
-  session::global_un_set('parsed_search_keyword');
-  session::global_set('parsed_search_keyword',"");
+  session::un_set('lastresults');
+  session::un_set('parsed_search_keyword');
+  session::set('parsed_search_keyword',"");
 
   error_reporting(E_ALL | E_STRICT);
 
@@ -292,7 +292,7 @@ function search($arr,$word)
 
     /* Filter words smaler than 3 chars */
     if(strlen($tryword)>=$minwordlength) {
-      session::global_set('parsed_search_keyword', session::global_get('parsed_search_keyword').$tryword." ");
+      session::set('parsed_search_keyword', session::get('parsed_search_keyword').$tryword." ");
       $useablewords[]=$tryword;
     }
   }
@@ -344,7 +344,7 @@ function search($arr,$word)
   }
 
   /* Save result in Session, so we can mark words later, or go back to search, without searching again*/
-  session::global_set('lastresults',$result);
+  session::set('lastresults',$result);
   return($result);
 }
 
@@ -387,7 +387,7 @@ function searchlist($arr,$res,$maxresults)
   $ret.= "<br>
               ".sprintf(_("%s results for your search with the keyword %s"), 
                             "<b>".count($topten)."</b>", 
-                            "<b>".session::global_get('parsed_search_keyword')."</b>");
+                            "<b>".session::get('parsed_search_keyword')."</b>");
   $ret.="<br>
         <br>";
   return($ret);
index e3aa779ae4b60a814c5d208d5ad21e55925fc410..cde47c38ee56f835040f0626c086058172ea29f1 100644 (file)
@@ -150,7 +150,7 @@ class passwordMethod
     $i =0;
 
     /* Only */
-    if(!session::global_is_set("passwordMethod::get_available_methods")){
+    if(!session::is_set("passwordMethod::get_available_methods")){
       foreach($class_mapping as $class => $path) {
         if(preg_match('/passwordMethod/i', $class) && !preg_match("/^passwordMethod$/i", $class)){
           $name = preg_replace ("/passwordMethod/i", "", $class);
@@ -181,9 +181,9 @@ class passwordMethod
           }
         }
       }
-      session::global_set("passwordMethod::get_available_methods",$ret);
+      session::set("passwordMethod::get_available_methods",$ret);
     }
-    return(session::global_get("passwordMethod::get_available_methods"));
+    return(session::get("passwordMethod::get_available_methods"));
   }
   
 
index 2bd27b0160650e3836e9ed121daa9d61035fb91e..f7b8d075fdd8aff862f382b158bd37e624889b80 100644 (file)
@@ -81,7 +81,7 @@ function gosaRaiseError($errno, $errstr, $errfile, $errline)
                                 "*** PHP error information ***\n\n");
       }
     
-    if (session::global_is_set('js') && session::global_get('js')==FALSE){
+    if (session::is_set('js') && session::get('js')==FALSE){
       $error_collector= "<div>";
     } else {
       $error_collector= "
index 9dc5b3ee8f07bfbf7b79673bb0d65a47cb202073..a10d30469d8975ac0c992afd2f957add103bb35d 100644 (file)
  * License along with this library; if not, write to the Free Software
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  *
- * For questions, help, comments, discussion, etc., please join the
- * Smarty mailing list. Send a blank e-mail to
- * smarty-discussion-subscribe@googlegroups.com 
- *
- * @link http://www.smarty.net/
- * @version 2.6.19-dev
+ * @link http://smarty.php.net/
+ * @version 2.6.20
  * @copyright Copyright: 2001-2005 New Digital Group, Inc.
  * @author Andrei Zmievski <andrei@php.net>
  * @access public
  * @package Smarty
  */
 
-/* $Id: Config_File.class.php 2786 2008-09-18 21:04:38Z Uwe.Tews $ */
+/* $Id: Config_File.class.php 2702 2007-03-08 19:11:22Z mohrt $ */
 
 /**
  * Config file reading class
index 7cdc0c8354ef44763198e4aecd2624141fefce54..19318e6a17827929d0280e1cdd4c62937eed8e4a 100644 (file)
  *
  * For questions, help, comments, discussion, etc., please join the
  * Smarty mailing list. Send a blank e-mail to
- * smarty-discussion-subscribe@googlegroups.com 
+ * smarty-general-subscribe@lists.php.net
  *
- * @link http://www.smarty.net/
+ * @link http://smarty.php.net/
  * @copyright 2001-2005 New Digital Group, Inc.
  * @author Monte Ohrt <monte at ohrt dot com>
  * @author Andrei Zmievski <andrei@php.net>
  * @package Smarty
- * @version 2.6.21
+ * @version 2.6.20
  */
 
-/* $Id: Smarty.class.php 2785 2008-09-18 21:04:12Z Uwe.Tews $ */
+/* $Id: Smarty.class.php 2722 2007-06-18 14:29:00Z danilo $ */
 
 /**
  * DIR_SEP isn't used anymore, but third party apps might
@@ -464,7 +464,7 @@ class Smarty
      *
      * @var string
      */
-    var $_version              = '2.6.21';
+    var $_version              = '2.6.20';
 
     /**
      * current template inclusion depth
index d950b34853bd1067d702cceb052490bc0c395afd..f09f8de8dc6a0bbacde086324f362b57423d81e1 100644 (file)
  * License along with this library; if not, write to the Free Software
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  *
- * @link http://www.smarty.net/
+ * @link http://smarty.php.net/
  * @author Monte Ohrt <monte at ohrt dot com>
  * @author Andrei Zmievski <andrei@php.net>
- * @version 2.6.21
+ * @version 2.6.20
  * @copyright 2001-2005 New Digital Group, Inc.
  * @package Smarty
  */
 
-/* $Id: Smarty_Compiler.class.php 2797 2008-09-22 19:26:32Z monte.ohrt $ */
+/* $Id: Smarty_Compiler.class.php 2773 2008-08-12 18:17:51Z Uwe.Tews $ */
 
 /**
  * Template compiling class
@@ -73,9 +73,6 @@ class Smarty_Compiler extends Smarty {
 
     var $_strip_depth           =   0;
     var $_additional_newline    =   "\n";
-    
-    var $_phpversion            =   0;
-
 
     /**#@-*/
     /**
@@ -83,8 +80,6 @@ class Smarty_Compiler extends Smarty {
      */
     function Smarty_Compiler()
     {
-        $this->_phpversion = substr(phpversion(),0,1);
-
         // matches double quoted strings:
         // "foobar"
         // "foo\"bar"
@@ -157,20 +152,16 @@ class Smarty_Compiler extends Smarty {
         // $foo->bar($foo->bar)
         // $foo->bar($foo->bar())
         // $foo->bar($foo->bar($blah,$foo,44,"foo",$foo[0].bar))
-        // $foo->getBar()->getFoo()
-        // $foo->getBar()->foo
         $this->_obj_ext_regexp = '\->(?:\$?' . $this->_dvar_guts_regexp . ')';
         $this->_obj_restricted_param_regexp = '(?:'
-             . '(?:' . $this->_var_regexp . '|' . $this->_num_const_regexp . ')(?:' . $this->_obj_ext_regexp . '(?:\((?:(?:' . $this->_var_regexp . '|' . $this->_num_const_regexp . ')'
-             . '(?:\s*,\s*(?:' . $this->_var_regexp . '|' . $this->_num_const_regexp . '))*)?\))?)*)';
-
-       $this->_obj_single_param_regexp = '(?:\w+|' . $this->_obj_restricted_param_regexp . '(?:\s*,\s*(?:(?:\w+|'
+                . '(?:' . $this->_var_regexp . '|' . $this->_num_const_regexp . ')(?:' . $this->_obj_ext_regexp . '(?:\((?:(?:' . $this->_var_regexp . '|' . $this->_num_const_regexp . ')'
+                . '(?:\s*,\s*(?:' . $this->_var_regexp . '|' . $this->_num_const_regexp . '))*)?\))?)*)';
+        $this->_obj_single_param_regexp = '(?:\w+|' . $this->_obj_restricted_param_regexp . '(?:\s*,\s*(?:(?:\w+|'
                 . $this->_var_regexp . $this->_obj_restricted_param_regexp . ')))*)';
-
-       $this->_obj_params_regexp = '\((?:' . $this->_obj_single_param_regexp
+        $this->_obj_params_regexp = '\((?:' . $this->_obj_single_param_regexp
                 . '(?:\s*,\s*' . $this->_obj_single_param_regexp . ')*)?\)';
-       $this->_obj_start_regexp = '(?:' . $this->_dvar_regexp . '(?:' . $this->_obj_ext_regexp . ')+)';
-       $this->_obj_call_regexp = '(?:' . $this->_obj_start_regexp . '(?:' . $this->_obj_params_regexp . '(?:' . $this->_obj_ext_regexp . '(?:'.$this->_obj_params_regexp . ')?)*' . ')?(?:' . $this->_dvar_math_regexp . '(?:' . $this->_num_const_regexp . '|' . $this->_dvar_math_var_regexp . ')*)?)';
+        $this->_obj_start_regexp = '(?:' . $this->_dvar_regexp . '(?:' . $this->_obj_ext_regexp . ')+)';
+        $this->_obj_call_regexp = '(?:' . $this->_obj_start_regexp . '(?:' . $this->_obj_params_regexp . ')?(?:' . $this->_dvar_math_regexp . '(?:' . $this->_num_const_regexp . '|' . $this->_dvar_math_var_regexp . ')*)?)';
         
         // matches valid modifier syntax:
         // |foo
@@ -1705,8 +1696,6 @@ class Smarty_Compiler extends Smarty {
         }
         // replace double quoted literal string with single quotes
         $_return = preg_replace('~^"([\s\w]+)"$~',"'\\1'",$_return);
-        // escape dollar sign if not printing a var
-        $_return = preg_replace('~\$(\W)~',"\\\\\$\\1",$_return);
         return $_return;
     }
 
@@ -1720,7 +1709,6 @@ class Smarty_Compiler extends Smarty {
     function _parse_var($var_expr)
     {
         $_has_math = false;
-        $_has_php4_method_chaining = false;
         $_math_vars = preg_split('~('.$this->_dvar_math_regexp.'|'.$this->_qstr_regexp.')~', $var_expr, -1, PREG_SPLIT_DELIM_CAPTURE);
 
         if(count($_math_vars) > 1) {
@@ -1833,10 +1821,6 @@ class Smarty_Compiler extends Smarty {
                             $_output .= '->{(($_var=$this->_tpl_vars[\''.substr($_index,3).'\']) && substr($_var,0,2)!=\'__\') ? $_var : $this->trigger_error("cannot access property \\"$_var\\"")}';
                         }
                     } else {
-                       if ($this->_phpversion < 5) {
-                         $_has_php4_method_chaining = true;
-                         $_output .= "; \$_foo = \$_foo";
-                       }
                         $_output .= $_index;
                     }
                 } elseif (substr($_index, 0, 1) == '(') {
@@ -1848,12 +1832,7 @@ class Smarty_Compiler extends Smarty {
             }
         }
 
-        if ($_has_php4_method_chaining) {
-           $_tmp = str_replace("'","\'",'$_foo = '.$_output.'; return $_foo;');
-           return "eval('".$_tmp."')";
-        } else {
-           return $_output; 
-        }
+        return $_output;
     }
 
     /**
index fa3cdd746d7342f055f269aa23dc4f40fb41fe4b..72f785b74ef07a0eea7ede689262409b246eccec 100644 (file)
@@ -68,7 +68,7 @@ function smarty_core_write_cache_file($params, &$smarty)
     if (!empty($smarty->cache_handler_func)) {
         // use cache_handler function
         call_user_func_array($smarty->cache_handler_func,
-                             array('write', &$smarty, &$params['results'], $params['tpl_file'], $params['cache_id'], $params['compile_id'], $smarty->_cache_info['expires']));
+                             array('write', &$smarty, &$params['results'], $params['tpl_file'], $params['cache_id'], $params['compile_id'], null));
     } else {
         // use local cache file
 
index 11b727482404fded2c12eacb3e2466ffcfd24b71..ac157f4c5ea8a08a4575e89b1edb4bc4a65eb7c1 100644 (file)
@@ -14,7 +14,7 @@ function smarty_block_render($params, $text, &$smarty)
        }
 
        /* Debug output */
-       if (session::global_is_set('DEBUGLEVEL') && session::global_get('DEBUGLEVEL') & DEBUG_ACL ){
+       if (session::is_set('DEBUGLEVEL') && session::get('DEBUGLEVEL') & DEBUG_ACL ){
                echo "<font color='blue' size='2'>&nbsp;".$acl."</font>";
        }
 
index 23cdbeb6d6655cb6388d0069dbdd02709a54f1d3..430382fbf1c1e9db8e6e8440efd940bdcf8a273f 100644 (file)
@@ -59,7 +59,7 @@ class aclManagement extends plugin
     /* Call parent execute */
     plugin::execute();
 
-    session::global_set('LOCK_VARS_TO_USE',array("/^item_selected/","/^menu_action/",
+    session::set('LOCK_VARS_TO_USE',array("/^item_selected/","/^menu_action/",
           "/^list/","/^id_/","/^menu_action/","/^act$/","/^id$/"));
 
     $smarty       = get_smarty();                 // Smarty instance
@@ -204,7 +204,7 @@ class aclManagement extends plugin
         }
 
         /* Set ACL and move DN to the headline */
-        set_object_info($this->dn);
+        session::set('objectinfo',$this->dn);
       }else{
         msg_dialog::display(_("Permission error"), msgPool::permModify(), ERROR_DIALOG);
       }
@@ -216,14 +216,14 @@ class aclManagement extends plugin
      ********************/
     if(isset($_POST['delete_lock'])){
       $this->remove_lock();
-      set_object_info();
+      session::un_set('objectinfo');
     }
 
     /* Reset all relevant data, if we get a _cancel request */
     if (isset($_POST['edit_cancel'])){
       $this->remove_lock();
       $this->acltabs= NULL;
-      set_object_info();
+      session::un_set('objectinfo');
     }
 
 
@@ -397,7 +397,7 @@ class aclManagement extends plugin
 
           unset ($this->acltabs);
           $this->acltabs= NULL;
-          set_object_info();
+          session::un_set('objectinfo');
         }
       } else {
         /* Ok. There seem to be errors regarding to the tab data,
@@ -641,11 +641,10 @@ class aclManagement extends plugin
     /* Remove acl lock if a DN is marked as "currently edited" */
     if (isset($this->acltabs->dn)){
       del_lock ($this->acltabs->dn);
-    }elseif(!empty($this->dn)){
+    }else{
       del_lock ($this->dn);
-    }elseif(count($this->dns)){
-      del_lock ($this->dns);
     }
+    del_lock ($this->dns);
   }
 
 
index 8229059306094d3df7974a0364b4db228b282ba2..251822d6dcbb3b201683aad315694ba1557dbac5 100644 (file)
@@ -60,7 +60,7 @@ class aclrole extends acl
     plugin::plugin($config, $dn);
 
     if($this->dn == "new"){
-      $this->base  = session::global_get('CurrentMainBase');
+      $this->base  = session::get('CurrentMainBase');
     }else{
       $this->base = preg_replace("/^[^,]+,[^,]+,/","",$this->dn);
       new log("view","acl/".get_class($this),$this->dn);
@@ -77,7 +77,7 @@ class aclrole extends acl
     ksort($this->gosaAclTemplate);
 
     /* Extract available categories from plugin info list */
-    $tmp= session::global_get('plist');
+    $tmp= session::get('plist');
     $plist= $tmp->info;
     $oc = array();
     foreach ($plist as $class => $acls){
@@ -177,7 +177,7 @@ class aclrole extends acl
       }
     }
 
-    $tmp= session::global_get('plist');
+    $tmp= session::get('plist');
     $plist= $tmp->info;
 
     /* Handle posts */
@@ -477,7 +477,7 @@ class aclrole extends acl
 
   function sort_by_priority($list)
   {
-    $tmp= session::global_get('plist');
+    $tmp= session::get('plist');
     $plist= $tmp->info;
     asort($plist);
     $newSort = array();
@@ -619,7 +619,7 @@ class aclrole extends acl
     /* Refresh users ACL */
     $ui= get_userinfo();
     $ui->loadACL();
-    session::global_set('ui',$ui);
+    session::set('ui',$ui);
   }
 
 
index edfd23da33783036af3e85b96ff006f1acb4d5e9..7e4bce0e460d469d9f931a582482c4204124732b 100644 (file)
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  */
 
-/* Remove classes and variables from session
- */
-if ( $cleanup ){
-  session::un_set('macl');
-}
-
-
 if ($remove_lock){
         if(session::is_set('macl')){
                 $macl = session::get('macl');
                 $macl->remove_lock();
+                del_lock ($ui->dn);
+                session::un_set ('macl');
         }
 } else {
        $display= "No headpage yet for this module";
@@ -46,14 +41,15 @@ if (!session::is_set('macl') || (isset($_GET['reset']) && $_GET['reset'] == 1)){
        $output= $macl->execute();
 
        /* Page header*/
-       if (get_object_info() != ""){
-               $display= print_header(get_template_path('plugins/acl/images/plugin.png'), _("ACL management"), "<img alt=\"\" align=\"middle\" src=\"".get_template_path('images/lists/locked.png')."\"> ".LDAP::fix(get_object_info()));
+       if (session::is_set('objectinfo')){
+               $display= print_header(get_template_path('plugins/acl/images/plugin.png'), _("ACL management"), "<img alt=\"\" align=\"middle\" src=\"".get_template_path('images/lists/locked.png')."\"> ".LDAP::fix(session::get('objectinfo')));
        } else {
                $display= print_header(get_template_path('plugins/acl/images/plugin.png'), _("ACL management"));
        }
 
        /* Reset requested? */
        if (isset($_GET['reset']) && $_GET['reset'] == 1){
+               del_lock ($ui->dn);
                session::un_set ('macl');
        }
 
index 71686c1ac3598a714336cd4f999bd13739d65e4a..099d1967f59efbc856a1abeb351975dcf7a084cf 100644 (file)
@@ -97,8 +97,8 @@ class department extends plugin
                /* Set base */
                if ($this->dn == "new"){
                        $ui= get_userinfo();
-                       if(session::global_is_set('CurrentMainBase')){
-                               $this->base = global_session::get('CurrentMainBase');
+                       if(session::is_set('CurrentMainBase')){
+                               $this->base = session::get('CurrentMainBase');
                        }else{
                                $this->base= dn2base($ui->dn);
                        }
index 34e42046eaed6144318722fbf0de00db0d8c7a93..96d0ec35353ec07806fea73388d8cc1535434178 100644 (file)
@@ -61,7 +61,7 @@ class departmentManagement extends plugin
       Var init 
      ***************/
 
-    session::global_set('LOCK_VARS_TO_USE',array("/^act$/","/^id$/","/^dep_edit_.*/","/^dep_del_.*/","/^item_selected/","/^remove_multiple_departments/","/^menu_action/"));
+    session::set('LOCK_VARS_TO_USE',array("/^act$/","/^id$/","/^dep_edit_.*/","/^dep_del_.*/","/^item_selected/","/^remove_multiple_departments/","/^menu_action/"));
 
     /* Reload departments */
     $smarty                                            = get_smarty();
@@ -176,7 +176,7 @@ class departmentManagement extends plugin
         $this->deptabs= new deptabs($this->config,$this->config->data['TABS'][$data['TAB']], $this->dn,"department");
         $this->deptabs->set_acl_base($this->dn);
 
-        set_object_info($this->dn);
+        session::set('objectinfo',$this->dn);
       }
     }
 
@@ -359,7 +359,7 @@ class departmentManagement extends plugin
      }
      unset ($this->deptabs);
      $this->deptabs= NULL;
-     set_object_info();
+     session::un_set('objectinfo');
    }
 
 
@@ -373,7 +373,7 @@ class departmentManagement extends plugin
     if (isset($_POST['edit_cancel']) || isset($_POST['delete_cancel']) || isset($_POST['delete_department_confirm'])){
       $this->remove_lock();
       $this->deptabs= NULL;
-      set_object_info();
+      session::un_set('objectinfo');
     }
 
     /* Headpage or normal plugin screen? */
@@ -413,7 +413,7 @@ class departmentManagement extends plugin
     $Regex        = $this->DivListDepartment->Regex;
   
     // Create Array to Test if we have a valid back button
-    $config = session::global_get('config');
+    $config = session::get('config');
     $tmp = $config->idepartments;
 
     $types = $this->get_support_departments();
index 35f4513545f0654d8f05901c544fa734c16c0294..290c67df10f611f20315f7defa5c9cdde27393bc 100644 (file)
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  */
 
-/* Remove classes and variables from session
- */
-if ( $cleanup ){
-  session::un_set('department');
-}
-
-
 if ($remove_lock){
         if(session::is_set('department')){
                 $department = session::get('department');
                 $department->remove_lock();
+                session::un_set ('department');
         }
 } else {
        /* Create usermanagement object on demand */
@@ -44,14 +38,15 @@ if ($remove_lock){
        $output= $department->execute();
 
        /* Page header*/
-       if (get_object_info() != ""){
-               $display= print_header(get_template_path('plugins/departments/images/plugin.png'), _("Department management"), "<img alt=\"\" align=\"middle\" src=\"".get_template_path('images/lists/locked.png')."\"> ".LDAP::fix(get_object_info()));
+       if (session::is_set('objectinfo')){
+               $display= print_header(get_template_path('plugins/departments/images/plugin.png'), _("Department management"), "<img alt=\"\" align=\"middle\" src=\"".get_template_path('images/lists/locked.png')."\"> ".LDAP::fix(session::get('objectinfo')));
        } else {
                $display= print_header(get_template_path('plugins/departments/images/plugin.png'), _("Department management"));
        }
 
        /* Reset requested? */
        if (isset($_GET['reset']) && $_GET['reset'] == 1){
+               del_lock ($ui->dn);
                session::un_set ('department');
        }
 
index 92a2865bf63fc428ae6ef7e95ee62ab2c61c670e..59ad363be3412589d66b8e601421087e99ce8457 100644 (file)
@@ -173,20 +173,20 @@ class group extends plugin
     }
 
     /* Get global filter config */
-    if (!session::global_is_set("gufilter")){
+    if (!session::is_set("gufilter")){
       $ui= get_userinfo();
       $base= get_base_from_people($ui->dn);
       $gufilter= array( "dselect"       => $base,
           "regex"           => "*");
-      session::global_set("gufilter", $gufilter);
+      session::set("gufilter", $gufilter);
     }
-    $gufilter= session::global_get('gufilter');
+    $gufilter= session::get('gufilter');
     $gufilter['SubSearchGroup'] = false;
-    session::global_set('gufilter',$gufilter);
+    session::set('gufilter',$gufilter);
   
     if ($this->dn == "new"){
-      if(session::global_is_set('CurrentMainBase')){
-        $this->base = session::global_get('CurrentMainBase');
+      if(session::is_set('CurrentMainBase')){
+        $this->base = session::get('CurrentMainBase');
       }else{
         $ui= get_userinfo();
         $this->base= dn2base($ui->dn);
@@ -216,12 +216,12 @@ class group extends plugin
     }
 
     /* Get global filter config */
-    if (!session::global_is_set("sysfilter")){
+    if (!session::is_set("sysfilter")){
       $ui= get_userinfo();
       $base= get_base_from_people($ui->dn);
       $sysfilter= array( "depselect"       => $base,
           "regex"           => "*");
-      session::global_set("sysfilter", $sysfilter);
+      session::set("sysfilter", $sysfilter);
     }
 
     /* This is always an account */
@@ -344,7 +344,7 @@ class group extends plugin
     if ($this->show_ws_dialog){
 
       /* Save data */
-      $sysfilter= session::global_get("sysfilter");
+      $sysfilter= session::get("sysfilter");
       foreach( array("depselect", "regex") as $type){
         if (isset($_POST[$type])){
           $sysfilter[$type]= $_POST[$type];
@@ -357,7 +357,7 @@ class group extends plugin
         }
         $sysfilter['regex']= $s;
       }
-      session::global_set("sysfilter", $sysfilter);
+      session::set("sysfilter", $sysfilter);
 
       /* Get workstation list */
       $exclude= "";
@@ -426,7 +426,7 @@ class group extends plugin
     if ($this->group_dialog){
 
       /* Save data */
-      $gufilter= session::global_get("gufilter");
+      $gufilter= session::get("gufilter");
       foreach( array("dselect", "regex") as $type){
         if (isset($_POST[$type])){
           $gufilter[$type]= $_POST[$type];
@@ -447,7 +447,7 @@ class group extends plugin
         }
         $gufilter['regex']= $s;
       }
-      session::global_set("gufilter", $gufilter);
+      session::set("gufilter", $gufilter);
       $this->reload();
 
       /* Show dialog */
@@ -644,7 +644,7 @@ class group extends plugin
   function reload($silent = FALSE)
   {
     /* Fix regex string */
-    $gufilter = session::global_get("gufilter");
+    $gufilter = session::get("gufilter");
     $regex    = normalizeLdap($gufilter['regex']);
     $MaxUser  = $this->OnlyShowFirstEntries;
 
index 6a25a28f50ccf619075cc4bdb678df6f5582585c..da14a33fe4be224e4d416a31c484501b220799e2 100644 (file)
@@ -68,7 +68,7 @@ class groupManagement extends plugin
        plugin::execute();
 
     /* Store these posts if the current object is locked (used by somebody else)*/
-    session::global_set('LOCK_VARS_TO_USE',array("/^act$/","/^id$/","/^group_edit_/","/^group_del_/","/^item_selected/","/^remove_multiple_groups/","/^multiple_edit/","/menu_action/","/_group_/"));
+    session::set('LOCK_VARS_TO_USE',array("/^act$/","/^id$/","/^group_edit_/","/^group_del_/","/^item_selected/","/^remove_multiple_groups/","/^multiple_edit/","/menu_action/","/_group_/"));
 
     /* Save data */
     $s_action   = "";
@@ -268,7 +268,7 @@ class groupManagement extends plugin
           //$this->reload ();
           unset ($this->grouptab);
           $this->grouptab= NULL;
-          set_object_info();
+          session::un_set('objectinfo');
         }else{
 
           /* Reinitialize tab */
@@ -303,7 +303,7 @@ class groupManagement extends plugin
       $tmp->lock_entries($this->ui->dn);
       if($tmp->multiple_available()){
         $this->grouptab = $tmp;
-        set_object_info($this->grouptab->get_object_info());
+        session::set('objectinfo',$this->grouptab->get_object_info());
       }
     }
 
@@ -328,7 +328,7 @@ class groupManagement extends plugin
       /* Register grouptab to trigger edit dialog */
       $this->grouptab= new grouptabs($this->config,$this->config->data['TABS']['GROUPTABS'], $this->dn);
       $this->grouptab->set_acl_base($this->dn);
-      set_object_info($this->dn);
+      session::set('objectinfo',$this->dn);
     }
 
 
@@ -495,7 +495,7 @@ class groupManagement extends plugin
 
       /* Remove lock file after successfull deletion */
       $this->remove_lock();
-      set_object_info();
+      session::un_set('objectinfo');
     }
 
 
@@ -506,7 +506,7 @@ class groupManagement extends plugin
     /* Delete group canceled? */
     if (isset($_POST['delete_cancel'])){
       $this->remove_lock();
-      set_object_info();
+      session::un_set('objectinfo');
     }
     
 
@@ -520,7 +520,7 @@ class groupManagement extends plugin
         $this->remove_lock();
       }
       $this->grouptab= NULL;
-      set_object_info();
+      session::un_set('objectinfo');
     }
 
 
@@ -616,7 +616,7 @@ class groupManagement extends plugin
     /* Prepare ldap class */
     $ldap= $this->config->get_ldap_link();
     $ldap->cd($base);
-    $ldap->set_size_limit(session::global_get('size_limit'));
+    $ldap->set_size_limit(session::get('size_limit'));
 
 
     /********************
index 4f9aaf72f0e51e36b2cf1c2964ce3e9305129062..6f6630ea180a7de83eeb99a2cf5de56645bb8f38 100644 (file)
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  */
 
-/* Remove classes and variables from session
- */
-if ( $cleanup ){
-  session::un_set('groupManagement');
-}
-
-
 if ($remove_lock){
   if(session::is_set('groupManagement')){
     $groupManagement = session::get('groupManagement');
     $groupManagement->remove_lock();
+    session::un_set ('groupManagement');
   }
 } else {
   /* Create groupManagement object on demand */
@@ -42,11 +36,11 @@ if ($remove_lock){
   $output= $groupManagement->execute();
 
   /* Page header*/
-  if (get_object_info() != ""){
+  if (session::is_set('objectinfo')){
     $display= print_header(get_template_path('plugins/groups/images/plugin.png'),
                            _("Group administration"), "<img alt=\"\" align=\"middle\" src=\"".
                             get_template_path('images/lists/locked.png')."\"> ".
-                            LDAP::fix(get_object_info()));
+                            LDAP::fix(session::get('objectinfo')));
   } else {
     $display= print_header(get_template_path('plugins/groups/images/plugin.png'), _("Group administration"));
   }
@@ -55,6 +49,7 @@ if ($remove_lock){
 
   /* Reset requested? */
   if (isset($_GET['reset']) && $_GET['reset'] == 1){
+    del_lock ($ui->dn);
     session::un_set ('groupManagement');
   }
 
index b038bf6611c88396200e9dfa5ca750a9aeddb115..9aeff56552c9c0c10c6fe64e51e05f8474a5b59d 100644 (file)
@@ -86,14 +86,14 @@ class ogroup extends plugin
     $this->is_account= TRUE;
 
     /* Get global filter config */
-    if (!session::global_is_set("ogfilter")){
+    if (!session::is_set("ogfilter")){
       $ui= get_userinfo();
       $base= get_base_from_people($ui->dn);
       $ogfilter= array( "dselect"       => $base,
           "regex"           => "*");
-      session::global_set("ogfilter", $ogfilter);
+      session::set("ogfilter", $ogfilter);
     }
-    $ogfilter= session::global_get('ogfilter');
+    $ogfilter= session::get('ogfilter');
 
     /* Adjust flags */
     foreach( array(   "U" => "accounts",
@@ -114,15 +114,15 @@ class ogroup extends plugin
         $ogfilter[$val]= "";
       }
     }
-    session::global_set("ogfilter", $ogfilter);
+    session::set("ogfilter", $ogfilter);
   
-    if(session::global_is_set('CurrentMainBase')){
-     $this->base  = global_session::get('CurrentMainBase');
+    if(session::is_set('CurrentMainBase')){
+     $this->base  = session::get('CurrentMainBase');
     }
 
     /* Set base */
     if ($this->dn == "new"){
-      $this->base = session::global_get('CurrentMainBase');
+      $this->base = session::get('CurrentMainBase');
     } else {
       $this->base= preg_replace("/^[^,]+,".preg_quote(get_ou("ogroupRDN"), '/')."/","",$this->dn);
 
@@ -170,12 +170,12 @@ class ogroup extends plugin
     $this->orig_base = $this->base;
 
     /* Get global filter config */
-    if (!session::global_is_set("sysfilter")){
+    if (!session::is_set("sysfilter")){
       $ui= get_userinfo();
       $base= get_base_from_people($ui->dn);
       $sysfilter= array( "depselect"       => $base,
           "regex"           => "*");
-      session::global_set("sysfilter", $sysfilter);
+      session::set("sysfilter", $sysfilter);
     }
 
     /* Load member data */
@@ -309,7 +309,7 @@ class ogroup extends plugin
     /* Show ws dialog */
     if ($this->show_ws_dialog){
       /* Save data */
-      $sysfilter= session::global_get("sysfilter");
+      $sysfilter= session::get("sysfilter");
       foreach( array("depselect", "regex") as $type){
         if (isset($_POST[$type])){
           $sysfilter[$type]= $_POST[$type];
@@ -322,7 +322,7 @@ class ogroup extends plugin
         }
         $sysfilter['regex']= $s;
       }
-      session::global_set("sysfilter", $sysfilter);
+      session::set("sysfilter", $sysfilter);
 
       /* Get workstation list */
       $exclude= "";
@@ -401,7 +401,7 @@ class ogroup extends plugin
     if ($this->group_dialog){
 
       /* Save data */
-      $ogfilter= session::global_get("ogfilter");
+      $ogfilter= session::get("ogfilter");
       foreach( array("dselect", "regex") as $type){
         if (isset($_POST[$type])){
           $ogfilter[$type]= $_POST[$type];
@@ -426,7 +426,7 @@ class ogroup extends plugin
         }
         $ogfilter['regex']= $s;
       }
-      session::global_set("ogfilter", $ogfilter);
+      session::set("ogfilter", $ogfilter);
       $this->reload();
 
       /* Calculate actual groups / remove entries that are already inside... */
@@ -644,7 +644,7 @@ class ogroup extends plugin
     $filter                       = "";
     $objectClasses                = array();
     
-    $ogfilter               = session::global_get("ogfilter");
+    $ogfilter               = session::get("ogfilter");
     $regex                  = $ogfilter['regex'];
 
     $ldap= $this->config->get_ldap_link();
index 05dbc79eadbaeb7d68beca142fb5fbcc5cc78709..634d863c9d3fb7e2e7d8d488c62901703b37b32e 100644 (file)
@@ -64,7 +64,7 @@ class ogroupManagement extends plugin
       Variable intialisation && Check posts for commands  
      ****************/
 
-    session::global_set('LOCK_VARS_TO_USE',array("/^act$/","/^id$/","/^group_edit_/","/^group_del_/","/^item_selected/","/^remove_multiple_ogroups/","/^menu_action/"));
+    session::set('LOCK_VARS_TO_USE',array("/^act$/","/^id$/","/^group_edit_/","/^group_del_/","/^item_selected/","/^remove_multiple_ogroups/","/^menu_action/"));
 
     $smarty     = get_smarty();
     $s_action   = "";
@@ -368,7 +368,7 @@ class ogroupManagement extends plugin
 
       /* Remove lock file after successfull deletion */
       $this->remove_lock();
-      set_object_info();
+      session::un_set('objectinfo');
     }
 
 
@@ -379,7 +379,7 @@ class ogroupManagement extends plugin
     /* Delete group canceled? */
     if (isset($_POST['delete_cancel'])){
       $this->remove_lock();
-      set_object_info();
+      session::un_set('objectinfo');
     }
 
 
@@ -405,7 +405,7 @@ class ogroupManagement extends plugin
       /* Register grouptab to trigger edit dialog */
       $this->ogroup= new ogrouptabs($this->config, $this->config->data['TABS']['OGROUPTABS'], $this->dn, "ogroups");
       $this->ogroup->set_acl_base($this->dn);
-      set_object_info($this->dn);
+      session::set('objectinfo',$this->dn);
     }
 
 
@@ -434,7 +434,7 @@ class ogroupManagement extends plugin
 
           unset ($this->ogroup);
           $this->ogroup= NULL;
-          set_object_info();
+          session::un_set('objectinfo');
         }else{
 
           /* Reinitialize tab */
@@ -458,7 +458,7 @@ class ogroupManagement extends plugin
     if ((isset($_POST['edit_cancel']))  && (isset($this->ogroup->dn))){
       $this->remove_lock();
       $this->ogroup= NULL;
-      set_object_info();
+      session::un_set('objectinfo');
     }
 
 
index 856adacffe6b9eb166a31bb32e8984b556c94255..918c970aaf5f70714e55f565bc675a4a0c15e668 100644 (file)
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  */
 
-/* Remove classes and variables from session
- */
-if ( $cleanup ){
-  session::un_set('ogroup');
-}
 
 
 if ($remove_lock){
   if(session::is_set('ogroup')){
     $ogroup = session::get('ogroup');
     $ogroup->remove_lock();
+    session::un_set ('ogroup');
   }
 } else {
 
@@ -45,12 +41,12 @@ if ($remove_lock){
   $output= $ogroup->execute ();
 
   /* Page header*/
-  if (get_object_info() != ""){
+  if (session::is_set('objectinfo')){
     $display= print_header(get_template_path('plugins/ogroups/images/plugin.png'),
                           _("Object groups"),
                           "<img alt=\"\" align=\"middle\" src=\"".
                           get_template_path('images/lists/locked.png').
-                          "\"> ".LDAP::fix(get_object_info()));
+                          "\"> ".LDAP::fix(session::get('objectinfo')));
   } else {
     $display= print_header(get_template_path('plugins/ogroups/images/plugin.png'), _("Object groups"));
   }
index f5b8b6ecc19658492a65853c4c1224727d99ebdd..9bf6ea459397f7dd5fdd00d1b43a1de3b0257c72 100644 (file)
@@ -66,7 +66,7 @@ class userManagement extends plugin
     plugin::execute();
 
     /* LOCK MESSAGE Vars */
-    session::global_set('LOCK_VARS_TO_USE',array("/^act$/","/^id$/","/^user_edit_/","/^user_del_/","/^item_selected/","/^remove_multiple_users/","/^multiple_edit/","/menu_action/"));
+    session::set('LOCK_VARS_TO_USE',array("/^act$/","/^id$/","/^user_edit_/","/^user_del_/","/^item_selected/","/^remove_multiple_users/","/^multiple_edit/","/menu_action/"));
 
     $smarty       = get_smarty();                 // Smarty instance
     $s_action     = "";                           // Contains the action to be taken
@@ -323,7 +323,7 @@ class userManagement extends plugin
       $this->sn= "";
       $this->givenName= "";
       $this->uid= "";
-      set_object_info();
+      session::un_set('objectinfo');
     }
 
 
@@ -372,7 +372,7 @@ class userManagement extends plugin
 
         /* User is allowed to change passwords, save 'dn' and 'acl' for next
            dialog. */
-        set_object_info($this->dn);
+        session::set('objectinfo',$this->dn);
         return ($smarty->fetch(get_template_path('password.tpl', TRUE)));
       } else {
         /* User is not allowed. Show message and cancel. */
@@ -412,7 +412,7 @@ class userManagement extends plugin
 
       /* Set ACL and move DN to the headline */
       $this->usertab->set_acl_base($this->dn);
-      set_object_info($this->dn);
+      session::set('objectinfo',$this->dn);
     }
 
 
@@ -436,7 +436,7 @@ class userManagement extends plugin
       if($tmp->multiple_available()){
         $this->usertab = $tmp;
         $this->usertab->set_active_tab($s_tab);
-        set_object_info($this->usertab->get_object_info());
+        session::set('objectinfo',$this->usertab->get_object_info());
       }
     }
 
@@ -455,7 +455,7 @@ class userManagement extends plugin
       $this->sn= "";
       $this->givenName= "";
       $this->uid= "";
-      set_object_info();
+      session::un_set('objectinfo');
     }
 
 
@@ -735,7 +735,7 @@ class userManagement extends plugin
 
           unset ($this->usertab);
           $this->usertab= NULL;
-          set_object_info();
+          session::un_set('objectinfo');
         }else{
         
           /* Reinitialize tab */
index 05d3eddf9eaac7b18f83611b24d1c5b302f5dec1..5e75fe18d9891a33ba848a54373f49d4235c23fc 100644 (file)
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  */
 
-/* Remove classes and variables from session
- */
-if ( $cleanup ){
-  session::un_set('userManagement');
-}
-
-
 if ($remove_lock){
   if(session::is_set('userManagement')){
     $userManagement = session::get('userManagement');
     $userManagement->remove_lock();
+    session::un_set ('userManagement');
   }
 } else {
   /* Create usermanagement object on demand */
@@ -45,12 +39,12 @@ if ($remove_lock){
   $output= $userManagement->execute();
 
   /* Page header*/
-  if (get_object_info() != ""){
+  if (session::is_set('objectinfo')){
     $display= print_header(get_template_path($userManagement->plIcon),
                            _("User administration"),
                            "<img alt=\"\" class=\"center\" src=\"".
                            get_template_path('images/lists/locked.png').
-                           "\"> ".LDAP::fix(get_object_info()));
+                           "\"> ".LDAP::fix(session::get('objectinfo')));
   } else {
     $display= print_header(get_template_path($userManagement->plIcon),
                           _("User administration"));
@@ -61,6 +55,7 @@ if ($remove_lock){
 
   /* Reset requested? */
   if (isset($_GET['reset']) && $_GET['reset'] == 1){
+    del_lock ($ui->dn);
     session::un_set ('userManagement');
   }
 
index 5be00b0057ebaf7ab0944b162b306c890cd9cd14..c3652050387855f214bc5dce0092b296a8df8858 100644 (file)
@@ -21,7 +21,7 @@
  */
 
 if (!$remove_lock){
-       session::global_set('plugin_dir',dirname(__FILE__));
+       session::set('plugin_dir',dirname(__FILE__));
        $smarty->assign("iconmenu", $plist->show_iconmenu());
        $smarty->assign("header", print_header(get_template_path('images/welcome.png'), sprintf(_("Welcome %s!"), $ui->cn)));
        $smarty->assign("year", date("Y"));
index a11dd5c6fdc9973278102b9c5dc9422d23f37c60..adb14ec187f78990f27c46501a61455a6cafebcc 100644 (file)
@@ -1071,11 +1071,11 @@ class user extends plugin
     $this->cleanup();
 
     /* Update current locale settings, if we have edited ourselves */
-    $ui = session::global_get('ui');
+    $ui = session::get('ui');
     if(isset($this->attrs['preferredLanguage']) && $this->dn == $ui->dn){
       $ui->language = $this->preferredLanguage;
-      session::global_set('ui',$ui);
-      session::global_set('Last_init_lang',"update");
+      session::set('ui',$ui);
+      session::set('Last_init_lang',"update");
     }
 
     $ldap->cd ($this->dn);
index 6be96e24986110a2590fca1cd673de744412e417..63c770065806401900167470aaeeb36db9b3bab1 100644 (file)
 /* Preset display */
 $display  = "";
 $lock_msg = "";
-
-/* Remove classes and variables from session
- */
-if ( $cleanup ){
-  session::un_set('user');
-  session::un_set('edit');
-}
-
-if ( $remove_lock){
-  if(session::is_set('user') && session::is_set('edit')){
-    del_lock ($ui->dn);
-  }
-}else{
-
+if (!$remove_lock){
   /* Reset requested? */
   if (isset($_POST['edit_cancel']) || isset($_POST['password_cancel']) || 
       (isset($_GET['reset']) && $_GET['reset'] == 1)){
@@ -71,13 +58,14 @@ if ( $remove_lock){
     /* Check locking */
     if (($username= get_lock($ui->dn)) != ""){
       session::set('back_plugin',$plug);
-      session::global_set('LOCK_VARS_TO_USE',array("/^edit$/","/^plug$/"));
+      session::set('LOCK_VARS_TO_USE',array("/^edit$/","/^plug$/"));
       $lock_msg =  gen_locked_message ($username, $ui->dn);
-
+  
     }else{
 
       /* Lock the current entry */
       add_lock ($ui->dn, $ui->dn);
+      session::set('dn',$ui->dn);
       session::set('edit',TRUE);
     }
   }
@@ -145,7 +133,7 @@ if ( $remove_lock){
         $display.= $smarty->fetch(get_template_path('password.tpl', TRUE));
         return ($display);
       } else {
-        session::un_set ('user');
+       session::un_set ('user');
       }
 
     } else {
@@ -179,7 +167,7 @@ if ( $remove_lock){
       $display.= "<input type=submit name=\"edit_cancel\" value=\"".msgPool::cancelButton()."\">\n";
 
       $info= "<img class=\"center\" alt=\"\" align=\"middle\" src=\"".get_template_path('images/lists/locked.png').
-        "\"> ".$ui->dn."&nbsp;";
+             "\"> ".$ui->dn."&nbsp;";
     } else {
       /* 'viewid' may be set by i.e. the phonelist plugin. This
          means that we want to go back... */
@@ -190,7 +178,7 @@ if ( $remove_lock){
         $str= msgPool::editButton();
         $fn = "edit";
         $info= "<img class=\"center\" alt=\"\" align=\"middle\" src=\"".get_template_path('images/lists/unlocked.png').
-          "\"> ".$ui->dn."&nbsp;";
+               "\"> ".$ui->dn."&nbsp;";
       }
 
       /* Only display edit button if there is at least one attribute editable */
@@ -209,7 +197,7 @@ if ( $remove_lock){
 
   /* Page header*/
   $display= print_header(get_template_path('plugins/generic/images/plugin.png'),
-      _("Generic user information"), $info).$display;
+                         _("Generic user information"), $info).$display;
 
 }
 
index a706ea861f7913d24d525c527f6ed5101a76e711..db087e57cb2aa821eb615c1f7f0f945d193ebb50 100644 (file)
@@ -116,7 +116,7 @@ class password extends plugin
             change_password ($ui->dn, $_POST['new_password']);
             gosa_log ("User/password has been changed");
             $ui->password= $_POST['new_password'];
-            session::global_set('ui',$ui);
+            session::set('ui',$ui);
 #$this->handle_post_events("modify",array("userPassword" => $_POST['new_password']));
             return($smarty->fetch(get_template_path("changed.tpl", TRUE)));
           }
index 9b5c981cae83fbf465edc19b4fad29c35a0da241..568aafa40be440a3fcb7925acfedc843bd075d0d 100644 (file)
 /* Clear display */
 $display= "";
 
-if ( $cleanup ){
-  session::un_set('password');
-  session::un_set('edit');
-}
-
 if (!$remove_lock){
 
   /* Reset requested? */
index 333af961ffe160634554ec72de727624d69bed69..213850ee1c9ea6bae0a9719667d8575e45cc0690 100644 (file)
@@ -225,12 +225,12 @@ class posixAccount extends plugin
     asort ($this->secondaryGroups);
 
     /* Get global filter config */
-    if (!session::global_is_set("sysfilter")){
+    if (!session::is_set("sysfilter")){
       $ui= get_userinfo();
       $base= get_base_from_people($ui->dn);
       $sysfilter= array( "depselect"       => $base,
           "regex"           => "*");
-      session::global_set("sysfilter", $sysfilter);
+      session::set("sysfilter", $sysfilter);
     }
     $this->ui = get_userinfo();
   }
@@ -251,7 +251,7 @@ class posixAccount extends plugin
 
     /* Department has changed? */
     if(isset($_POST['depselect'])){
-      session::global_set('CurrentMainBase',validate($_POST['depselect']));
+      session::set('CurrentMainBase',validate($_POST['depselect']));
     }
 
     if($this->multiple_support_active){
@@ -364,7 +364,7 @@ class posixAccount extends plugin
     /* Show ws dialog */
     if ($this->show_ws_dialog){
       /* Save data */
-      $sysfilter= session::global_get("sysfilter");
+      $sysfilter= session::get("sysfilter");
       foreach( array("depselect", "regex") as $type){
         if (isset($_POST[$type])){
           $sysfilter[$type]= $_POST[$type];
@@ -377,7 +377,7 @@ class posixAccount extends plugin
         }
         $sysfilter['regex']= $s;
       }
-      session::global_set("sysfilter", $sysfilter);
+      session::set("sysfilter", $sysfilter);
 
       /* Get workstation list */
       $exclude= "";
@@ -449,7 +449,7 @@ class posixAccount extends plugin
       $smarty->assign("tree_image", get_template_path('images/lists/search-subtree.png'));
       $smarty->assign("deplist", $this->config->idepartments);
       $smarty->assign("alphabet", generate_alphabet());
-      $smarty->assign("depselect", session::global_get('CurrentMainBase'));
+      $smarty->assign("depselect", session::get('CurrentMainBase'));
       $smarty->assign("hint", print_sizelimit_warning());
 
       $smarty->assign("apply", apply_filter());
@@ -461,7 +461,7 @@ class posixAccount extends plugin
     $smarty= get_smarty();
 
     /* In 'MyAccount' mode, we must remove write acls if we are not in editing mode. */ 
-    $SkipWrite = (!isset($this->parent) || !$this->parent) && !session::global_is_set('edit');
+    $SkipWrite = (!isset($this->parent) || !$this->parent) && !session::is_set('edit');
 
     /* Depending on pwmode, currently hardcoded because there are no other methods */
     if ( 1 == 1 ){
@@ -548,11 +548,11 @@ class posixAccount extends plugin
     /* Checkboxes */
     if ($this->force_ids == 1){
       $smarty->assign("force_ids", "checked");
-      if (session::global_get('js')){
+      if (session::get('js')){
         $smarty->assign("forceMode", "");
       }
     } else {
-      if (session::global_get('js')){
+      if (session::get('js')){
         $smarty->assign("forceMode", "disabled");
       }
       $smarty->assign("force_ids", "");
@@ -587,7 +587,7 @@ class posixAccount extends plugin
         $smarty->assign("use_".$val,FALSE);
       }
 
-      if((session::global_get("js"))&&(($val=="uidNumber")||($val=="gidNumber")))
+      if((session::get("js"))&&(($val=="uidNumber")||($val=="gidNumber")))
       {
         $smarty->assign("$val"."ACL",$this->getacl($val,$SkipWrite));
         $smarty->assign("$val", $this->$val);
@@ -1340,7 +1340,7 @@ class posixAccount extends plugin
   function reload()
   {
     /* Set base for all searches */
-    $base      = session::global_get('CurrentMainBase');
+    $base      = session::get('CurrentMainBase');
     $base     = $base;
     $ldap     = $this->config->get_ldap_link();    
     $attrs    =  array("cn", "description", "gidNumber");
@@ -1420,11 +1420,11 @@ class posixAccount extends plugin
     if(!$this->is_account) return("");
     if ($this->force_ids == 1){
       $force_ids = "checked";
-      if (session::global_get('js')){
+      if (session::get('js')){
         $forceMode = "";
       }
     } else {
-      if (session::global_get('js')){
+      if (session::get('js')){
         if($this->acl != "#none#")
           $forceMode ="disabled";
       }
index 9af7d5edb10ab0bedb03f0a26c1d5b3cd44fc179..ffbd769fbc80e8965b99df9705a761c518e43d35 100644 (file)
 /* Clear display */
 $display  = "";
 $lock_msg = "";
-
-/* Remove classes and variables from session 
- */
-if ( $cleanup ){
-  session::un_set('posixAccount');
-  session::un_set('edit');
-}
-
-if ( $remove_lock){
-  if(session::is_set('posixAccount') && session::is_set('edit')){
-    del_lock ($ui->dn);
-  }
-
-}else{
+if (!$remove_lock){
 
   /* Reset requested? */
   if (isset($_POST['edit_cancel']) ||  (isset($_GET['reset']) && $_GET['reset'] == 1)){
 
     /* Only remove lock if object was opened 
      */
-    if(session::is_set('posixAccount') && session::is_set('edit')){
+    if(session::is_set('posix') && session::is_set('edit')){
       del_lock ($ui->dn);
     }
     session::un_set ('edit');
@@ -71,13 +58,14 @@ if ( $remove_lock){
     /* Check locking */
     if (($username= get_lock($ui->dn)) != ""){
       session::set('back_plugin',$plug);
-      session::global_set('LOCK_VARS_TO_USE',array("/^edit$/","/^plug$/"));
+      session::set('LOCK_VARS_TO_USE',array("/^edit$/","/^plug$/"));
       $lock_msg =  gen_locked_message ($username, $ui->dn);
 
     }else{
 
       /* Lock the current entry */
       add_lock ($ui->dn, $ui->dn);
+      session::set('dn',$ui->dn);
       session::set('edit',TRUE);
     }
   }
index aba476a0056c07df943df791eb80e9793900217e..4f7c68b326a3ad989cf71b732858535c4eb48dc8 100644 (file)
@@ -199,7 +199,7 @@ class setup
         $s = "<img src='images/empty.png' alt=' ' class='center'>&nbsp;";
       }
 
-      if(session::global_get('js')){
+      if(session::get('js')){
 
         $str .="<div >";
     
index 7a9a1cb8e02edc4dc7ff8637b3d6d2ca0b5657ac..9f8397119834a6660042295c834784801d7ce3d5 100644 (file)
@@ -272,6 +272,11 @@ class Step_Config2 extends setup_step
         $this->samba_settings['samba_sid_active'] = TRUE;
         $this->samba_settings['samba_rid_active'] = TRUE;
       }
+
+      /* Reload mail naming attribute */
+      if($old_mail != $this->mail && isset($this->mail_methods[$this->mail]['uattrib'])){
+        $this->mail_attrib = $this->mail_methods[$this->mail]['uattrib'];
+      }
     }
 
     $tmp = $this->check();
@@ -310,12 +315,24 @@ class Step_Config2 extends setup_step
     if(!class_available("mailMethod")){
       return(array());
     }
-    $methods = array();
+
+    $default_uattrib = "";
+    $m_class_vars = get_class_vars("mailMethod");
+    if(isset($m_class_vars['uattrib'])){
+      $default_uattrib = $m_class_vars['uattrib'];
+    }
+
     foreach($class_mapping as $name => $file){
-      if(preg_match("/^mailMethod.*$/i",$name)){
+      if(preg_match("/^mailMethod[a-z]*$/i",$name)){
         $name = preg_replace("/^mailMethod/","",$name);
         if(!empty($name)){
           $methods[$name]['name'] = $name;
+          $m_class_vars = get_class_vars("mailMethod".$methods[$name]['name']);
+          if(isset($m_class_vars['uattrib'])){
+            $methods[$name]['uattrib'] = $m_class_vars['uattrib'];
+          }else{
+            $methods[$name]['uattrib'] = $default_uattrib;
+          }
         }
       }
     }
index 3f9ec0d8ceade5faa785f3fea9b5281829a217d2..47e8688780ff46f17a3fe1a8e8f692e1e6b41386 100644 (file)
@@ -60,9 +60,9 @@ class Step_Language extends setup_step
       $this->is_completed = TRUE;
 
       if($this->lang_selected != ""){
-        session::global_set('lang',$this->lang_selected);
+        session::set('lang',$this->lang_selected);
       }else{
-        session::global_set('lang',$this->lang);
+        session::set('lang',$this->lang);
       }
     }
   }
index 5ab07216df4819765ae431a8acf15fc2e6ad31ea..2e00ce96e7de340ca70665d8ab1e2540c556565a 100644 (file)
  */
 
 /* Create a new setup class if necessary  */
-if (!session::global_is_set('setup') || (isset($_GET['reset']) && $_GET['reset'] == 1)){
-  session::global_set('setup',new setup());
+if (!session::is_set('setup') || (isset($_GET['reset']) && $_GET['reset'] == 1)){
+  session::set('setup',new setup());
 }
-$setup = session::global_get('setup');
+$setup = session::get('setup');
 
 /* Execute formular */
 $setup->save_object();
 $display= $setup->execute();
 
 /* Store changes  in session */
-session::global_set('setup',$setup);
+session::set('setup',$setup);
 
 // vim:tabstop=2:expandtab:shiftwidth=2:filetype=php:syntax:ruler:
 ?>
index b6d806b310c3d217ba95285573a14609bf10c2cd..3ed7daec9ac28659f395fbacb8b60fcb0d44bf86 100644 (file)
             <select name="mail" size="1" title="" onChange="document.mainform.submit();">
                 <option  value="disabled">{t}disabled{/t}</option>
                 {foreach from=$mail_methods item=item}
-                    <option value="{$item.name}" {if $mail == $item.name} selected {/if}>{$item.name}</option>
+                    <option value="{$item.name}" {if $mail == $item.name} selected {/if}>{$item.name}&nbsp;({$item.uattrib})</option>
                 {/foreach}
             </select>
         </div>