summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorKarl 'vollmerk' Vollmer <vollmer@ampache.org>2007-02-13 22:38:13 +0000
committerKarl 'vollmerk' Vollmer <vollmer@ampache.org>2007-02-13 22:38:13 +0000
commit730d21e8d85efea95614e8bd93703dd6d12bfd0f (patch)
tree8470c86400b2fd5be89264e23e4604bcab0b5000 /lib
parent9771ca37903c9188eba2a61876c2b17726f4aaa1 (diff)
downloadampache-730d21e8d85efea95614e8bd93703dd6d12bfd0f.tar.gz
ampache-730d21e8d85efea95614e8bd93703dd6d12bfd0f.tar.bz2
ampache-730d21e8d85efea95614e8bd93703dd6d12bfd0f.zip
removed dead file, updated bin files, removed debug and added a new config option
Diffstat (limited to 'lib')
-rw-r--r--lib/artist.lib.php1
-rw-r--r--lib/class/user.class.php4
-rw-r--r--lib/general.lib.php4
3 files changed, 4 insertions, 5 deletions
diff --git a/lib/artist.lib.php b/lib/artist.lib.php
index 79440cd8..e3acd57d 100644
--- a/lib/artist.lib.php
+++ b/lib/artist.lib.php
@@ -109,7 +109,6 @@ function show_artists ($match = '') {
$artists = $match;
$_SESSION['view_script'] = false;
}
-debug_event('foo',$view->sql,'3');
$db_results = mysql_query($view->sql, $dbh);
// Get the artist object
diff --git a/lib/class/user.class.php b/lib/class/user.class.php
index a14863a5..9ff68a15 100644
--- a/lib/class/user.class.php
+++ b/lib/class/user.class.php
@@ -757,8 +757,8 @@ class User {
/* If we aren't the -1 user before we continue grab the -1 users values */
if ($user_id != '-1') {
- $sql = "SELECT `user_preference.preference`,`user_preference.value` FROM `user_preference`,`preferences` " .
- "WHERE `user_preference.preference` = `preferences.id` AND `user_preference.user`='-1' AND `preferences.catagory` !='system'";
+ $sql = "SELECT `user_preference`.`preference`,`user_preference`.`value` FROM `user_preference`,`preferences` " .
+ "WHERE `user_preference`.`preference` = `preferences`.`id` AND `user_preference`.`user`='-1' AND `preferences`.`catagory` !='system'";
$db_results = mysql_query($sql, dbh());
/* While through our base stuff */
while ($r = mysql_fetch_object($db_results)) {
diff --git a/lib/general.lib.php b/lib/general.lib.php
index c975ed22..f0f637b4 100644
--- a/lib/general.lib.php
+++ b/lib/general.lib.php
@@ -656,11 +656,11 @@ function get_global_popular($type) {
* @catagory Get
* @todo Add Genre
*/
-function get_newest ($type = 'artist') {
+function get_newest ($type = 'artist',$limit='') {
$dbh = dbh();
- if (conf('popular_threshold') < 1) { conf(array('popular_threshold'=>'10'),1); }
+ if (!$limit) { $limit = conf('popular_threshold'); }
$sql = "SELECT DISTINCT $type FROM song ORDER BY addition_time " .
"DESC LIMIT " . conf('popular_threshold');