summaryrefslogtreecommitdiffstats
path: root/library/Pbs/Search.php
diff options
context:
space:
mode:
authorSimon2011-04-05 12:58:32 +0200
committerSimon2011-04-05 12:58:32 +0200
commit252489218e387478902ad2998bb8ec023a43ae7b (patch)
treec70594244dab7bd4f3649a2bd66763363cb5b0d2 /library/Pbs/Search.php
parentsuche in Config, Filter, Pool und Preboot (diff)
downloadpbs2-252489218e387478902ad2998bb8ec023a43ae7b.tar.gz
pbs2-252489218e387478902ad2998bb8ec023a43ae7b.tar.xz
pbs2-252489218e387478902ad2998bb8ec023a43ae7b.zip
Unterstriche in Spaltentitel erlaubt(danke Michi...)
Diffstat (limited to 'library/Pbs/Search.php')
-rw-r--r--library/Pbs/Search.php5
1 files changed, 3 insertions, 2 deletions
diff --git a/library/Pbs/Search.php b/library/Pbs/Search.php
index b041c3b..46f4021 100644
--- a/library/Pbs/Search.php
+++ b/library/Pbs/Search.php
@@ -44,8 +44,8 @@ class Pbs_Search{
$this->searchTerm = trim($search);
$parts = explode(" ",$this->searchTerm);
- foreach($parts as $search){
- if(stristr($search,":") && ctype_alpha(substr($search,0,strpos($search,":")))){
+ foreach($parts as $search){
+ if(stristr($search,":") && preg_match('/^[a-z_A-Z]+$/',$search) >= 0){
$key = substr($search,0,strpos($search,":"));
$value = substr($search,strpos($search,":")+1);
$searcha[$key] = $value;
@@ -56,6 +56,7 @@ class Pbs_Search{
}
$this->searcha = $searcha;
$this->searchb = $searchb;
+ #print_a($searcha,$searchb);
}
public function getSearchTerm(){
return $this->searchTerm;