4 commits - lib/kolab_client_task.php public_html/skins

Aleksander Machniak machniak at kolabsys.com
Thu Mar 22 15:43:00 CET 2012


 lib/kolab_client_task.php           |   38 +++++++++++++++++++-----------------
 public_html/skins/default/style.css |    1 
 2 files changed, 22 insertions(+), 17 deletions(-)

New commits:
commit d1c031a393706cf25bc41fecbbddcdd576eef16e
Merge: a0b5e8f a5992f1
Author: Aleksander Machniak <alec at alec.pl>
Date:   Thu Mar 22 15:42:30 2012 +0100

    Merge branch 'master' of ssh://git.kolab.org/git/kolab-wap



commit a0b5e8facac7ae555556898b8d5956e99da3419f
Author: Aleksander Machniak <alec at alec.pl>
Date:   Thu Mar 22 15:41:58 2012 +0100

    Don't store user_types in session when working in devel_mode

diff --git a/lib/kolab_client_task.php b/lib/kolab_client_task.php
index 59d39f4..010e1ce 100644
--- a/lib/kolab_client_task.php
+++ b/lib/kolab_client_task.php
@@ -476,16 +476,18 @@ class kolab_client_task
      */
     protected function user_types()
     {
-        if (!isset($_SESSION['user_types'])) {
-            $result = $this->api->post('user_types.list');
-            $list   = $result->get('list');
+        if (isset($_SESSION['user_types'])) {
+            return $_SESSION['user_types'];
+        }
 
-            if (is_array($list)) {
-                $_SESSION['user_types'] = $list;
-            }
+        $result = $this->api->post('user_types.list');
+        $list   = $result->get('list');
+
+        if (is_array($list) && !$this->config_get('devel_mode')) {
+            $_SESSION['user_types'] = $list;
         }
 
-        return $_SESSION['user_types'];
+        return $list;
     }
 
     /**


commit cd8ba3a60e5dead35ea0e004e629a06f4858c56c
Author: Aleksander Machniak <alec at alec.pl>
Date:   Thu Mar 22 15:34:58 2012 +0100

    Make debug information optional, provide devel_mode config option

diff --git a/lib/kolab_client_task.php b/lib/kolab_client_task.php
index 25443f2..59d39f4 100644
--- a/lib/kolab_client_task.php
+++ b/lib/kolab_client_task.php
@@ -799,16 +799,18 @@ class kolab_client_task
             }
 
             // Add debug information
-            ksort($data);
-            $debug = kolab_html::escape(print_r($data, true));
-            $debug = preg_replace('/(^Array\n\(|\n*\)$|\t)/', '', $debug);
-            $debug = str_replace("\n    ", "\n", $debug);
-            $debug = '<pre class="debug">' . $debug . '</pre>';
-            $fields['debug'] = array(
-                'label'   => 'debug',
-                'section' => 'system',
-                'value'   => $debug,
-            );
+            if ($this->config_get('devel_mode')) {
+                ksort($data);
+                $debug = kolab_html::escape(print_r($data, true));
+                $debug = preg_replace('/(^Array\n\(|\n*\)$|\t)/', '', $debug);
+                $debug = str_replace("\n    ", "\n", $debug);
+                $debug = '<pre class="debug">' . $debug . '</pre>';
+                $fields['debug'] = array(
+                    'label'   => 'debug',
+                    'section' => 'system',
+                    'value'   => $debug,
+                );
+            }
         }
 
         return array($fields, $types, $type);


commit 4d8989bae8a72f74e85bbca28a6d85f243d7de05
Author: Aleksander Machniak <alec at alec.pl>
Date:   Thu Mar 22 14:34:36 2012 +0100

    Improved multiselect style

diff --git a/public_html/skins/default/style.css b/public_html/skins/default/style.css
index beddecc..9db3934 100644
--- a/public_html/skins/default/style.css
+++ b/public_html/skins/default/style.css
@@ -19,6 +19,7 @@ h1, h2, h3, h4, h5, h6 {
 
 input[type="text"],
 input[type="password"],
+select[multiple="multiple"],
 textarea {
   border: 1px solid #d0d0d0;
   border-radius: 3px;





More information about the commits mailing list