summaryrefslogtreecommitdiffstats
path: root/lib/class/browse.class.php
diff options
context:
space:
mode:
authorKarl 'vollmerk' Vollmer <vollmer@ampache.org>2009-03-01 23:47:36 +0000
committerKarl 'vollmerk' Vollmer <vollmer@ampache.org>2009-03-01 23:47:36 +0000
commitabc6eac0e3a28317f8114f78016cfb2b4753003d (patch)
tree39b7a55cb7ad45126d2cddc2f5aea09413ad1872 /lib/class/browse.class.php
parenta8f79bb8f4c222334fbb4d2a216260d0de44a7e3 (diff)
downloadampache-abc6eac0e3a28317f8114f78016cfb2b4753003d.tar.gz
ampache-abc6eac0e3a28317f8114f78016cfb2b4753003d.tar.bz2
ampache-abc6eac0e3a28317f8114f78016cfb2b4753003d.zip
maybe fix #404, unconfirmed implemented #405 other misc cleanup
Diffstat (limited to 'lib/class/browse.class.php')
-rw-r--r--lib/class/browse.class.php14
1 files changed, 12 insertions, 2 deletions
diff --git a/lib/class/browse.class.php b/lib/class/browse.class.php
index e455db57..414482fb 100644
--- a/lib/class/browse.class.php
+++ b/lib/class/browse.class.php
@@ -100,6 +100,7 @@ class Browse {
case 'update_gt':
$_SESSION['browse']['filter'][self::$type][$key] = intval($value);
break;
+ case 'exact_match':
case 'alpha_match':
case 'starts_with':
if (self::$static_content) { return false; }
@@ -258,11 +259,11 @@ class Browse {
switch (self::$type) {
case 'album':
- $valid_array = array('show_art','starts_with','alpha_match','add','update');
+ $valid_array = array('show_art','starts_with','exact_match','alpha_match','add','update');
break;
case 'artist':
case 'song':
- $valid_array = array('add_lt','add_gt','update_lt','update_gt','alpha_match','starts_with');
+ $valid_array = array('add_lt','add_gt','update_lt','update_gt','exact_match','alpha_match','starts_with');
break;
case 'live_stream':
$valid_array = array('alpha_match','starts_with');
@@ -825,6 +826,9 @@ class Browse {
if (self::$type == 'song') {
switch($filter) {
+ case 'exact_match':
+ $filter_sql = " `song`.`title` = '" . Dba::escape($value) . "' AND ";
+ break;
case 'alpha_match':
$filter_sql = " `song`.`title` LIKE '%" . Dba::escape($value) . "%' AND ";
break;
@@ -865,6 +869,9 @@ class Browse {
} // if it is a song
elseif (self::$type == 'album') {
switch($filter) {
+ case 'exact_match':
+ $filter_sql = " `album`.`name` = '" . Dba::escape($value) . "' AND ";
+ break;
case 'alpha_match':
$filter_sql = " `album`.`name` LIKE '%" . Dba::escape($value) . "%' AND ";
break;
@@ -885,6 +892,9 @@ class Browse {
} // end album
elseif (self::$type == 'artist') {
switch($filter) {
+ case 'exact_match':
+ $filter_sql = " `artist`.`name` = '" . Dba::escape($value) . "' AND ";
+ break;
case 'alpha_match':
$filter_sql = " `artist`.`name` LIKE '%" . Dba::escape($value) . "%' AND ";
break;