diff options
author | Karl 'vollmerk' Vollmer <vollmer@ampache.org> | 2009-03-09 00:59:44 +0000 |
---|---|---|
committer | Karl 'vollmerk' Vollmer <vollmer@ampache.org> | 2009-03-09 00:59:44 +0000 |
commit | 242401a915eb2600f242af92c98cc9dc7190735c (patch) | |
tree | 64ac0b1c676ec424720c21564aaa611f6bb09ca0 /lib/class | |
parent | 6dbd87e0784732b2efee402b693143b71d1462d8 (diff) | |
download | ampache-242401a915eb2600f242af92c98cc9dc7190735c.tar.gz ampache-242401a915eb2600f242af92c98cc9dc7190735c.tar.bz2 ampache-242401a915eb2600f242af92c98cc9dc7190735c.zip |
fix the update/add filters in the api and add them into artist and album
Diffstat (limited to 'lib/class')
-rw-r--r-- | lib/class/api.class.php | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/lib/class/api.class.php b/lib/class/api.class.php index da4592e9..36c1c80c 100644 --- a/lib/class/api.class.php +++ b/lib/class/api.class.php @@ -53,13 +53,24 @@ class Api { // Check for a range, if no range default to gt if (strpos('/',$value)) { $elements = explode('/',$value); - Browse::set_filter('add_lt',$elements['1']); - Browse::set_filter('add_gt',$elements['0']); + Browse::set_filter('add_lt',strtotime($elements['1'])); + Browse::set_filter('add_gt',strtotime($elements['0'])); } else { - Browse::set_filter('add',strtotime($value)); + Browse::set_filter('add_gt',strtotime($value)); } break; + case 'update': + // Check for a range, if no range default to gt + if (strpos('/',$value)) { + $elements = explode('/',$value); + Browse::set_filter('update_lt',strtotime($elements['1'])); + Browse::set_filter('update_gt',strtotime($elements['0'])); + } + else { + Browse::set_filter('update_gt',strtotime($value)); + } + break; case 'alpha_match': Browse::set_filter('alpha_match',$value); break; |