diff options
author | Paul 'flowerysong' Arthur <flowerysong00@yahoo.com> | 2010-05-03 17:35:17 +0000 |
---|---|---|
committer | Paul 'flowerysong' Arthur <flowerysong00@yahoo.com> | 2010-05-03 17:35:17 +0000 |
commit | c29052f9bc43eb5ec0c2451c127ac5f41270ad3f (patch) | |
tree | 8f38d6c446521ec54934471056710f7983a5ca6d /lib/class/api.class.php | |
parent | 4c22b56f896d12181ab2724c64d5dd2f55a236f0 (diff) | |
download | ampache-c29052f9bc43eb5ec0c2451c127ac5f41270ad3f.tar.gz ampache-c29052f9bc43eb5ec0c2451c127ac5f41270ad3f.tar.bz2 ampache-c29052f9bc43eb5ec0c2451c127ac5f41270ad3f.zip |
Use strpos correctly in the API class. Fixes FS#68, reported by Bryce Geiser.
Diffstat (limited to 'lib/class/api.class.php')
-rw-r--r-- | lib/class/api.class.php | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/lib/class/api.class.php b/lib/class/api.class.php index fc42a9fe..4fef01d4 100644 --- a/lib/class/api.class.php +++ b/lib/class/api.class.php @@ -41,9 +41,10 @@ class Api { /** * set_filter - * This is a play on the browse function, it's different as we expose the filters in a slightly different - * and vastly simplier way to the end users so we have to do a little handy work to make them - * work internally + * This is a play on the browse function, it's different as we expose + * the filters in a slightly different and vastly simpler way to the + * end users--so we have to do a little extra work to make them work + * internally. */ public static function set_filter($filter,$value) { @@ -52,7 +53,7 @@ class Api { switch ($filter) { case 'add': // Check for a range, if no range default to gt - if (strpos('/',$value)) { + if (strpos($value,'/')) { $elements = explode('/',$value); Browse::set_filter('add_lt',strtotime($elements['1'])); Browse::set_filter('add_gt',strtotime($elements['0'])); @@ -63,7 +64,7 @@ class Api { break; case 'update': // Check for a range, if no range default to gt - if (strpos('/',$value)) { + if (strpos($value,'/')) { $elements = explode('/',$value); Browse::set_filter('update_lt',strtotime($elements['1'])); Browse::set_filter('update_gt',strtotime($elements['0'])); |