diff options
author | Paul Arthur <paul.arthur@flowerysong.com> | 2012-03-19 12:21:22 -0400 |
---|---|---|
committer | Paul Arthur <paul.arthur@flowerysong.com> | 2012-03-19 12:21:22 -0400 |
commit | f2e3668528c2384857f5812e960b5759b30c81cb (patch) | |
tree | 113320af8ccf1db2c82a8267bb641a532eee30c4 | |
parent | 23e5775f348786f8911f083fffab1e3566a28831 (diff) | |
download | ampache-f2e3668528c2384857f5812e960b5759b30c81cb.tar.gz ampache-f2e3668528c2384857f5812e960b5759b30c81cb.tar.bz2 ampache-f2e3668528c2384857f5812e960b5759b30c81cb.zip |
Fix regex for parsing rules
ID can be multiple digits, so we should capture all of them.
-rwxr-xr-x | docs/CHANGELOG | 2 | ||||
-rw-r--r-- | lib/class/search.class.php | 2 |
2 files changed, 3 insertions, 1 deletions
diff --git a/docs/CHANGELOG b/docs/CHANGELOG index 6a410e90..08033c1c 100755 --- a/docs/CHANGELOG +++ b/docs/CHANGELOG @@ -4,6 +4,8 @@ -------------------------------------------------------------------------- v.3.6-Alpha2 + - Fixed newsearch issue preventing use of more than 9 rules + (reported by Twister) - Fixed JSON escaping issue that broke search in some cases (reported by XeeNiX) - Overhauled CLI tools for installation and database management diff --git a/lib/class/search.class.php b/lib/class/search.class.php index e5b9386b..fc860ed9 100644 --- a/lib/class/search.class.php +++ b/lib/class/search.class.php @@ -608,7 +608,7 @@ class Search extends playlist_object { public function parse_rules($data) { $this->rules = array(); foreach ($data as $rule => $value) { - if (preg_match('/^rule_(\d)$/', $rule, $ruleID)) { + if (preg_match('/^rule_(\d+)$/', $rule, $ruleID)) { $ruleID = $ruleID[1]; foreach (explode('|', $data['rule_' . $ruleID . '_input']) as $input) { $this->rules[] = array( |