Code

Speed fixes
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Wed, 3 Aug 2005 12:27:58 +0000 (12:27 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Wed, 3 Aug 2005 12:27:58 +0000 (12:27 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@1057 594d385d-05f5-0310-b6e9-bd551577e9d8

TODO
include/functions.inc
plugins/admin/departments/class_departmentManagement.inc

diff --git a/TODO b/TODO
index 634e58cf82f5962a9140d8f874eb9e4fbb790f4f..5d67882f68ec5fdec57eaf9c35b67d5bf53208a5 100644 (file)
--- a/TODO
+++ b/TODO
@@ -9,12 +9,8 @@ Things to fix before 2.4:
 * User dialog
   - Add button for template created users
 
-* Systems dialog
-  - Add buttons for all system types
-  
 * All dialogs
   - cleanup, remove not used code fragments
-  - &nbsp; between pictures ... if needed (convert_list ? )
   - ALT not translated 
   - Image cleanup
 
index 27f188dcb96f64629b80b85fc83000a51326f10f..de391f92f4c7d764e37361dddc5dc8a3597210dc 100644 (file)
@@ -81,9 +81,19 @@ function get_dir_list($folder= ".")
 
   $dh = opendir(".");
   while(false !== ($file = readdir($dh))){
+    
+    // Smarty is included by  include/php_setup.inc     require("smarty/Smarty.class.php");
+    // Skip all files and dirs in  "./.svn/" we don't need any information from them
+    // Skip all Template, so they won't be checked twice in the following preg_matches   
+    // Skip . / ..
+
+    // Result  : from 1023 ms to 490 ms   i think thats great...
+    if(preg_match("/.*\.svn.*/i",$file)||preg_match("/.*smarty.*/i",$file)||preg_match("/.*\.tpl.*/",$file)||($file==".")||($file==".."))
+      continue;
+    
 
     /* Recurse through all "common" directories */
-    if(is_dir($file) && $file!="." && $file!=".." && $file!="CVS"){
+    if(is_dir($file) &&$file!="CVS"){
       get_dir_list($file);
       continue;
     }
index b461d6b5e5867f5cee11e4930183534c387e0ba5..0265935dc6a8768c4d81df12504d895653787149 100644 (file)
@@ -99,18 +99,15 @@ class departmentManagement extends plugin
 
                if(isset($_POST['depselect']) && $_POST['depselect']){
                        $depfilter['depselect']= $_POST['depselect'];
-            $this->reload();
                }
                
                if($s_action=="root"){
                        $depfilter['depselect']=($this->config->current['BASE']);
-                       $this->reload();
                }
 
                if($s_action=="home"){
                        $depfilter['depselect']=(preg_replace("/^[^,]+,/","",$this->ui->dn));
                        $depfilter['depselect']=(preg_replace("/^[^,]+,/","",$depfilter['depselect']));
-                       $this->reload();
                }
 
                if($s_action=="back"){
@@ -122,14 +119,12 @@ class departmentManagement extends plugin
                        }else{
                                $depfilter['depselect']= $this->config->departments["/"];
                        }
-            $this->reload();
                }
 
                if(isset($_GET['act'])&&($_GET['act']=="dep_open")){
                        $s_action="open";
                        $s_entry = base64_decode($_GET['dep_id']);
                        $depfilter['depselect']= $this->config->departments[trim($s_entry)];
-                       $this->reload();
                }
 
                if (isset($_GET['search'])){