From: hickert Date: Wed, 3 Aug 2005 12:27:58 +0000 (+0000) Subject: Speed fixes X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=6760e50763b367cd181b47e3fcd72c25e076f262;p=gosa.git Speed fixes git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@1057 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/TODO b/TODO index 634e58cf8..5d67882f6 100644 --- 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 - -   between pictures ... if needed (convert_list ? ) - ALT not translated - Image cleanup diff --git a/include/functions.inc b/include/functions.inc index 27f188dcb..de391f92f 100644 --- a/include/functions.inc +++ b/include/functions.inc @@ -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; } diff --git a/plugins/admin/departments/class_departmentManagement.inc b/plugins/admin/departments/class_departmentManagement.inc index b461d6b5e..0265935dc 100644 --- a/plugins/admin/departments/class_departmentManagement.inc +++ b/plugins/admin/departments/class_departmentManagement.inc @@ -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'])){