[prev in list] [next in list] [prev in thread] [next in thread] 

List:       os-sim-commits
Subject:    [Os-sim-commits] os-sim/include/panel Ajax_Panel.php,1.4,1.5
From:       "Tomas V.V.Cox" <tvvcox () users ! sourceforge ! net>
Date:       2006-04-27 8:06:10
Message-ID: E1FZ1Vr-0001P9-RW () mail ! sourceforge ! net
[Download RAW message or body]

Update of /cvsroot/os-sim/os-sim/include/panel
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24429/include/panel

Modified Files:
	Ajax_Panel.php 
Log Message:
Better handling the config loading

Index: Ajax_Panel.php
===================================================================
RCS file: /cvsroot/os-sim/os-sim/include/panel/Ajax_Panel.php,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- Ajax_Panel.php	20 Apr 2006 08:51:03 -0000	1.4
+++ Ajax_Panel.php	27 Apr 2006 08:06:08 -0000	1.5
@@ -25,7 +25,7 @@
         if (!$user) {
             die("Not logged in, aborting");
         }
-        $this->config_file = $config_dir.DIRECTORY_SEPARATOR.Session::get_session_user();
+        $this->config_file = $config_dir.DIRECTORY_SEPARATOR.$user;
         
         //first time, no plugin selected
         if (!$plugin) {
@@ -120,9 +120,11 @@
         if (!$window_id) {
             return $data;
         }
-        if (isset($data[$window_id])) {
-            $plug_name = $data[$window_id]['plugin'];
-            $this->plugin = &$this->plugins[$plug_name];
+        if (isset($data[$window_id]) && count($data[$window_id])) {
+            if ($window_id != 'panel') {
+                $plug_name = $data[$window_id]['plugin'];
+                $this->plugin = &$this->plugins[$plug_name];
+            }
             return $data[$window_id];
         }
         return array();
@@ -135,7 +137,6 @@
         foreach ($options as $key => $value) {
             $options[$key] = strip($value); // XXX review strip_slashes
         }
-        //printr($options);
         $data[$window_id] = $options;
         $save = serialize($data);
         if (!$fd = fopen($filename, 'w')) {



-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Os-sim-commits mailing list
Os-sim-commits@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/os-sim-commits
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic