From 6e51370d014457eba53dc3457ac7dc40b19ad67e Mon Sep 17 00:00:00 2001 From: hickert Date: Fri, 10 Feb 2006 06:07:01 +0000 Subject: [PATCH] Added check for num of entries, removed page reload if checkbox was checked git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@2650 594d385d-05f5-0310-b6e9-bd551577e9d8 --- plugins/admin/fai/class_faiPackageEntry.inc | 13 +++++++++++-- plugins/admin/fai/faiPackageEntry.tpl | 5 ----- 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/plugins/admin/fai/class_faiPackageEntry.inc b/plugins/admin/fai/class_faiPackageEntry.inc index e4049b865..2d1d52e17 100644 --- a/plugins/admin/fai/class_faiPackageEntry.inc +++ b/plugins/admin/fai/class_faiPackageEntry.inc @@ -77,7 +77,12 @@ class faiPackageEntry extends plugin } } - @ksort($this->categories); + $this->searchStrPKG = preg_replace("/^\+/","",$this->searchStrPKG); + if(empty($this->searchStrPKG)){ + $this->searchStrPKG = "*"; + } + + @ksort($this->categories); $CHKS = ""; $i = 0; @@ -115,6 +120,10 @@ $CHKS = "
200) { + print_red(sprintf(_("Your specified search string '%s' returned too many results. Only the first 200 entries are shown, to keep the memory usage low."),$this->searchStrPKG)); + break; + } if((preg_match("/^".str_replace("*",".*",$this->searchStrPKG)."/i",$pkg[0]))|| (preg_match("/^".str_replace("*",".*",$this->searchStrPKG)."/i",$pkg[3]))){ if($this->categories[$pkg[2]]){ @@ -124,7 +133,7 @@ $CHKS = "
+ $chkbox = ""; $divlist->AddEntry(array(array("string"=>$chkbox, "attach" => "style='text-align:center;width:20px;'"), array("string"=>$pkg[0], "attach" => "style='width:180px;'"), diff --git a/plugins/admin/fai/faiPackageEntry.tpl b/plugins/admin/fai/faiPackageEntry.tpl index 927b2b764..dcd448596 100644 --- a/plugins/admin/fai/faiPackageEntry.tpl +++ b/plugins/admin/fai/faiPackageEntry.tpl @@ -32,11 +32,6 @@ {t}Filters{/t}

-
-
- {$alphabet} -
-
{$CHKS}
-- 2.30.2