git.gnu.io has moved to IP address 209.51.188.249 -- please double check where you are logging in.

Commit 458ab567 authored by P. J. McDermott's avatar P. J. McDermott

Fix table name casing in Nixtape's SELECT queries.

parent 1f3685eb
......@@ -50,7 +50,7 @@ $smarty->assign('name', $artist->name);
$smarty->assign('pagetitle', $artist->name);
try {
$tagCloud = TagCloud::generateTagCloud('tags', 'tag', 10, $artist->name, 'artist');
$tagCloud = TagCloud::generateTagCloud('Tags', 'tag', 10, $artist->name, 'artist');
$smarty->assign('tagcloud', $tagCloud);
} catch (Exception $e) {
$tagCloud = array();
......
......@@ -67,7 +67,7 @@ if (isset($this_user) && $this_user->manages($artist->name)) {
}
try {
$tagCloud = TagCloud::generateTagCloud('tags', 'tag', 10, $artist->name, 'artist');
$tagCloud = TagCloud::generateTagCloud('Tags', 'tag', 10, $artist->name, 'artist');
$smarty->assign('tagcloud', $tagCloud);
} catch (Exception $ex) {
$tagCloud = array();
......
......@@ -169,7 +169,7 @@ class Album {
function getTopTags($limit = 10) {
global $adodb;
$res = $adodb->CacheGetAll(600, 'SELECT tag, COUNT(tag) AS freq FROM tags WHERE '
$res = $adodb->CacheGetAll(600, 'SELECT tag, COUNT(tag) AS freq FROM Tags WHERE '
. ' artist = ' . $adodb->qstr($this->artist_name)
. ' AND album = ' . $adodb->qstr($this->name)
. ' GROUP BY tag ORDER BY freq DESC '
......
......@@ -202,7 +202,7 @@ class Artist {
function getTopTags($limit = 10) {
global $adodb;
$res = $adodb->CacheGetAll(600, 'SELECT tag, COUNT(tag) AS freq FROM tags WHERE '
$res = $adodb->CacheGetAll(600, 'SELECT tag, COUNT(tag) AS freq FROM Tags WHERE '
. ' artist = ' . $adodb->qstr($this->name)
. ' GROUP BY tag ORDER BY freq DESC '
. ' LIMIT ' . $limit);
......
......@@ -184,7 +184,7 @@ class Server {
static function getUserList($alpha) {
global $adodb;
$query = 'SELECT username from users where username LIKE \'' . $alpha . '%\'';
$query = 'SELECT username from Users where username LIKE \'' . $alpha . '%\'';
$adodb->SetFetchMode(ADODB_FETCH_ASSOC);
$data = $adodb->CacheGetAll(7200, $query);
......
......@@ -260,7 +260,7 @@ class Track {
global $adodb;
$adodb->SetFetchMode(ADODB_FETCH_ASSOC);
$res = $adodb->CacheGetAll(600, 'SELECT COUNT(tag) AS freq, tag FROM tags WHERE'
$res = $adodb->CacheGetAll(600, 'SELECT COUNT(tag) AS freq, tag FROM Tags WHERE'
. ' artist = ' . $adodb->qstr($this->artist_name)
. ' AND track = ' . $adodb->qstr($this->name)
. ' GROUP BY tag ORDER BY freq DESC');
......@@ -277,7 +277,7 @@ class Track {
global $adodb;
$adodb->SetFetchMode(ADODB_FETCH_ASSOC);
$res = $adodb->GetAll('SELECT tag FROM tags WHERE'
$res = $adodb->GetAll('SELECT tag FROM Tags WHERE'
. ' artist = ' . $adodb->qstr($this->artist_name)
. ' AND track = ' . $adodb->qstr($this->name)
. ' AND userid = ' . $userid);
......
......@@ -308,7 +308,7 @@ class User {
function getTopTags($limit = 10) {
global $adodb;
$res = $adodb->CacheGetAll(600, 'SELECT tag, COUNT(tag) AS freq FROM tags WHERE '
$res = $adodb->CacheGetAll(600, 'SELECT tag, COUNT(tag) AS freq FROM Tags WHERE '
. ' userid = ' . $this->uniqueid
. ' GROUP BY tag '
. ' LIMIT ' . $limit);
......@@ -325,7 +325,7 @@ class User {
function getTagsForArtist($artist) {
global $adodb;
$res = $adodb->GetAll('SELECT tag, COUNT(tag) AS freq FROM tags WHERE '
$res = $adodb->GetAll('SELECT tag, COUNT(tag) AS freq FROM Tags WHERE '
. ' userid = ' . $this->uniqueid
. ' AND artist = ' . $adodb->qstr($artist)
. ' GROUP BY tag ');
......
......@@ -26,7 +26,7 @@ require_once('data/Server.php');
require_once('data/TagCloud.php');
try {
$aTagCloud = TagCloud::GenerateTagCloud('loved_tracks', 'artist');
$aTagCloud = TagCloud::GenerateTagCloud('Loved_Tracks', 'artist');
$smarty->assign('tagcloud', $aTagCloud);
} catch(Exception $e) {
// Installation doesn't have any loved tracks yet
......
......@@ -26,7 +26,7 @@ require_once('data/Server.php');
require_once('data/TagCloud.php');
try {
$aTagCloud = TagCloud::GenerateTagCloud('loved_tracks', 'artist');
$aTagCloud = TagCloud::GenerateTagCloud('Loved_Tracks', 'artist');
$smarty->assign('tagcloud', $aTagCloud);
} catch (Exception $e) {}
......
......@@ -36,7 +36,7 @@ $tag = $_GET['tag'];
$smarty->assign('tag', $tag);
try {
$tagCloud = TagCloud::generateTagCloud('tags', 'artist', 40, $tag, 'tag');
$tagCloud = TagCloud::generateTagCloud('Tags', 'artist', 40, $tag, 'tag');
$smarty->assign('tagcloud', $tagCloud);
} catch (Exception $e) {
$smarty->assign('pageheading', 'No artists found');
......
......@@ -15,7 +15,7 @@ if ($n < 1) {
}
try {
$aTagCloud = TagCloud::GenerateTagCloud('free_scrobbles', 'artist', $n);
$aTagCloud = TagCloud::GenerateTagCloud('Free_Scrobbles', 'artist', $n);
$smarty->assign('tagcloud', $aTagCloud);
} catch (Exception $e) {
$smarty->assign('errors', $errors);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment