Code

Fixed Session calls in user plugins
[gosa.git] / gosa-core / html / main.php
index c6097168789628f1eb14dd7012f9617651d5bfa8..c1c504d5255e3573db4091ef8fbc2a46635147bf 100644 (file)
@@ -122,7 +122,7 @@ if(session::get('Last_init_lang',$lang)){
 session::set('Last_init_lang',$lang);
 
 /* Preset current main base */
-if(session::is_set('CurrentMainBase')){
+if(!session::is_set('CurrentMainBase')){
   session::set('CurrentMainBase',get_base_from_people($ui->dn));
 }
 
@@ -139,7 +139,7 @@ textdomain($domain);
 @DEBUG (DEBUG_TRACE, __LINE__, __FUNCTION__, __FILE__, $lang, "Setting language to");
 
 /* Prepare plugin list */
-if (session::is_set('plist')){
+if (!session::is_set('plist')){
   /* Initially load all classes */
   $class_list= get_declared_classes();
   foreach ($class_mapping as $class => $path){
@@ -247,7 +247,7 @@ if (isset($_GET['reset'])){
   }
 }
 
-/* Install eGOsa hooks, convert _POST to _SESSION['POST'] */
+/* Install eGOsa hooks, convert _POST to session */
 if(isset($_GET['explorer'])){
   session::set('eGosa',TRUE);
 }
@@ -323,7 +323,7 @@ if ($_SERVER["REQUEST_METHOD"] == "POST"){
       $smarty->display(get_template_path('conflict.tpl'));
       exit ();
     }
-    session::set('session_cnt',$_SESSION['session_cnt'] + 1);
+    session::set('session_cnt', (session::get('session_cnt') + 1));
     session::set('post_cnt' , validate($_POST['session_cnt']) + 1);
   }
 }