[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Librefm-commits] [1090] special-casing of Scrobbles needs to apply to F
From: |
Clint Adams |
Subject: |
[Librefm-commits] [1090] special-casing of Scrobbles needs to apply to Free_Scrobbles as well |
Date: |
Thu, 30 Apr 2009 22:46:46 +0000 |
Revision: 1090
http://svn.sv.gnu.org/viewvc/?view=rev&root=librefm&revision=1090
Author: clint
Date: 2009-04-30 22:46:46 +0000 (Thu, 30 Apr 2009)
Log Message:
-----------
special-casing of Scrobbles needs to apply to Free_Scrobbles as well
Modified Paths:
--------------
trunk/nixtape/data/TagCloud.php
Modified: trunk/nixtape/data/TagCloud.php
===================================================================
--- trunk/nixtape/data/TagCloud.php 2009-04-30 22:44:24 UTC (rev 1089)
+++ trunk/nixtape/data/TagCloud.php 2009-04-30 22:46:46 UTC (rev 1090)
@@ -39,7 +39,7 @@
if (!is_integer($limit)) return false;
$sizes = array('xx-large', 'x-large', 'large', 'medium', 'small',
'x-small', 'xx-small');
$query = "SELECT $field, count(*) AS count FROM $table";
- $query .= (!is_null($constraint) || ($table == "Scrobbles")) ? ' WHERE
' : null;
+ $query .= (!is_null($constraint) || (($table == "Scrobbles") ||
($table == "Free_Scrobbles")) ? ' WHERE ' : null;
if ($constrained_field) {
$query .= (!is_null($constraint)) ? " $constrained_field = " .
$mdb2->quote($constraint, 'text') : null;
} elseif ($field == "track") {
@@ -47,8 +47,8 @@
} else {
$query .= (!is_null($constraint)) ? ' username = ' .
$mdb2->quote($constraint, 'text') : null;
}
- $query .= (!is_null($constraint) && ($table == "Scrobbles")) ? ' AND '
: null;
- $query .= ($table == "Scrobbles") ? " rating <> 'S' " : null;
+ $query .= (!is_null($constraint) && (($table == "Scrobbles") ||
($table == "Free_Scrobbles")) ? ' AND ' : null;
+ $query .= (($table == "Scrobbles") || ($table == "Free_Scrobbles")) ?
" rating <> 'S' " : null;
$query .= " GROUP BY $field ORDER BY count DESC LIMIT $limit";
$res = $mdb2->query($query);
if (PEAR::isError($res)) {
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Librefm-commits] [1090] special-casing of Scrobbles needs to apply to Free_Scrobbles as well,
Clint Adams <=