[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Librefm-commits] [1892] use userid instead of username
From: |
Clint Adams |
Subject: |
[Librefm-commits] [1892] use userid instead of username |
Date: |
Fri, 29 May 2009 23:48:37 +0000 |
Revision: 1892
http://svn.sv.gnu.org/viewvc/?view=rev&root=librefm&revision=1892
Author: clint
Date: 2009-05-29 23:48:37 +0000 (Fri, 29 May 2009)
Log Message:
-----------
use userid instead of username
Modified Paths:
--------------
trunk/nixtape/api/UserXML.php
Modified: trunk/nixtape/api/UserXML.php
===================================================================
--- trunk/nixtape/api/UserXML.php 2009-05-29 23:38:43 UTC (rev 1891)
+++ trunk/nixtape/api/UserXML.php 2009-05-29 23:48:37 UTC (rev 1892)
@@ -21,6 +21,7 @@
require_once($install_path . '/database.php');
require_once($install_path . '/data/User.php');
require_once('xml.php');
+require_once($install_path . '/../turtle/temp-utils.php'); // this is
extremely dodgy and shameful
class UserXML {
@@ -71,7 +72,7 @@
try {
$res = $adodb->CacheGetAll(600, 'SELECT Track.*,
Artist.mbid AS artmbid, COUNT(*) AS freq
FROM Track, Scrobbles,Artist
- WHERE Scrobbles.username = ' .
$adodb->qstr($username, 'text') . '
+ WHERE Scrobbles.userid = ' .
username_to_uniqueid($username) . '
AND Scrobbles.track = Track.name AND
Scrobbles.time > ' . $timestamp . ' AND Track.artist = Artist.name
GROUP BY Track.name ORDER BY freq DESC
LIMIT 20');
}
@@ -115,7 +116,7 @@
try {
$res = $adodb->GetAll('SELECT Track . * , COUNT( * ) AS
freq
FROM Track, Scrobbles
- WHERE Scrobbles.username = ' .
$adodb->qstr($user) . '
+ WHERE Scrobbles.userid = ' .
username_to_uniqueid($user) . '
AND Scrobbles.track = Track.name
GROUP BY Track.name
LIMIT 10');
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Librefm-commits] [1892] use userid instead of username,
Clint Adams <=