summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKarl 'vollmerk' Vollmer <vollmer@ampache.org>2008-12-02 08:47:15 +0000
committerKarl 'vollmerk' Vollmer <vollmer@ampache.org>2008-12-02 08:47:15 +0000
commitee10d335e0108270250e212e092afa4ddf4a5507 (patch)
tree703de234a6aa06f1bb84516095bb2e0cb974cdf4
parent245b69d645b0b00ef52063f08466e11e3bf09ccc (diff)
downloadampache-ee10d335e0108270250e212e092afa4ddf4a5507.tar.gz
ampache-ee10d335e0108270250e212e092afa4ddf4a5507.tar.bz2
ampache-ee10d335e0108270250e212e092afa4ddf4a5507.zip
junk commit, nothing really changed
-rw-r--r--admin/duplicates.php2
-rw-r--r--lib/class/browse.class.php28
-rw-r--r--templates/show_disabled_songs.inc.php2
-rw-r--r--templates/show_duplicates.inc.php2
4 files changed, 27 insertions, 7 deletions
diff --git a/admin/duplicates.php b/admin/duplicates.php
index aac0ceef..7f9fbc7f 100644
--- a/admin/duplicates.php
+++ b/admin/duplicates.php
@@ -1,7 +1,7 @@
<?php
/*
- Copyright (c) 2001 - 2007 Ampache.org
+ Copyright (c) Ampache.org
All rights reserved.
This program is free software; you can redistribute it and/or
diff --git a/lib/class/browse.class.php b/lib/class/browse.class.php
index 9ea8b6fa..2a6cbdd2 100644
--- a/lib/class/browse.class.php
+++ b/lib/class/browse.class.php
@@ -355,6 +355,16 @@ class Browse {
} // set_join
/**
+ * set_having
+ * This sets the "HAVING" part of the query, we can only have one.. god this is ugly
+ */
+ public static function set_having($condition) {
+
+ $_SESSION['browse']['having'][self::$type] = " HAVING " . $condition;
+
+ } // set_having
+
+ /**
* set_start
* This sets the start point for our show functions
* We need to store this in the session so that it can be pulled
@@ -636,6 +646,18 @@ class Browse {
} // get_join_sql
/**
+ * get_having_sql
+ * this returns the having sql stuff, if we've got anything
+ */
+ public static function get_having_sql() {
+
+ $sql = $_SESSION['browse']['having'][self::$type];
+
+ return $sql;
+
+ } // get_having_sql
+
+ /**
* get_sql
* This returns the sql statement we are going to use this has to be run
* every time we get the objects because it depends on the filters and the
@@ -650,10 +672,11 @@ class Browse {
$filter_sql = self::get_filter_sql();
$join_sql = self::get_join_sql();
+ $having_sql = self::get_having_sql();
$order_sql = self::get_sort_sql();
$limit_sql = self::get_limit_sql();
- $final_sql = $sql . $join_sql . $filter_sql . $order_sql . $limit_sql;
+ $final_sql = $sql . $join_sql . $filter_sql . $having_sql . $order_sql . $limit_sql;
return $final_sql;
@@ -735,9 +758,6 @@ class Browse {
case 'starts_with':
$filter_sql = " `album`.`name` LIKE '" . Dba::escape($value) . "%' AND ";
break;
- case 'min_count':
-
- break;
case 'artist':
$filter_sql = " `artist`.`id` = '". Dba::escape($value) . "' AND ";
break;
diff --git a/templates/show_disabled_songs.inc.php b/templates/show_disabled_songs.inc.php
index 75f763cb..84753006 100644
--- a/templates/show_disabled_songs.inc.php
+++ b/templates/show_disabled_songs.inc.php
@@ -1,7 +1,7 @@
<?php
/*
- Copyright (c) 2001 - 2006 Ampache.org
+ Copyright (c) Ampache.org
All rights reserved.
This program is free software; you can redistribute it and/or
diff --git a/templates/show_duplicates.inc.php b/templates/show_duplicates.inc.php
index f93bbf83..73e48dc3 100644
--- a/templates/show_duplicates.inc.php
+++ b/templates/show_duplicates.inc.php
@@ -1,7 +1,7 @@
<?php
/*
- Copyright (c) 2001 - 2007 Ampache.org
+ Copyright (c) Ampache.org
All rights reserved.
This program is free software; you can redistribute it and/or