[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Librefm-commits] [1647] partial merge of nixtape from trunk
From: |
Clint Adams |
Subject: |
[Librefm-commits] [1647] partial merge of nixtape from trunk |
Date: |
Sat, 16 May 2009 00:50:51 +0000 |
Revision: 1647
http://svn.sv.gnu.org/viewvc/?view=rev&root=librefm&revision=1647
Author: clint
Date: 2009-05-16 00:50:51 +0000 (Sat, 16 May 2009)
Log Message:
-----------
partial merge of nixtape from trunk
Modified Paths:
--------------
branches/stable/nixtape/.htaccess
branches/stable/nixtape/2.0/index.php
branches/stable/nixtape/admin/report/mbid-mismatch.php
branches/stable/nixtape/admin.php
branches/stable/nixtape/api/UserXML.php
branches/stable/nixtape/api/auth/index.php
branches/stable/nixtape/auth.php
branches/stable/nixtape/data/Album.php
branches/stable/nixtape/data/Artist.php
branches/stable/nixtape/data/Group.php
branches/stable/nixtape/data/Server.php
branches/stable/nixtape/data/Statistic.php
branches/stable/nixtape/data/TagCloud.php
branches/stable/nixtape/data/Track.php
branches/stable/nixtape/data/User.php
branches/stable/nixtape/database.php
branches/stable/nixtape/delete-profile.php
branches/stable/nixtape/install.php
branches/stable/nixtape/invite.php
branches/stable/nixtape/location.php
branches/stable/nixtape/login.php
branches/stable/nixtape/radio/adjust.php
branches/stable/nixtape/radio/handshake.php
branches/stable/nixtape/radio/xspf.php
branches/stable/nixtape/register.php
branches/stable/nixtape/request.php
branches/stable/nixtape/reset.php
branches/stable/nixtape/themes/librefm/alpha.css
branches/stable/nixtape/themes/librefm/locale/de.po
branches/stable/nixtape/themes/librefm/locale/nixtape.pot
branches/stable/nixtape/themes/librefm/locale/translatable_strings.c
branches/stable/nixtape/themes/librefm/templates/group-list.tpl
branches/stable/nixtape/themes/librefm/templates/header.tpl
branches/stable/nixtape/themes/librefm/templates/language-selector.tpl
branches/stable/nixtape/themes/librefm/templates/login.tpl
branches/stable/nixtape/themes/librefm/templates/menu.tpl
branches/stable/nixtape/themes/librefm/templates/reset.tpl
branches/stable/nixtape/track.php
Removed Paths:
-------------
branches/stable/nixtape/database2.php
branches/stable/nixtape/themes/librefm/librefm.css
branches/stable/nixtape/themes/librefm/player.css
Modified: branches/stable/nixtape/.htaccess
===================================================================
--- branches/stable/nixtape/.htaccess 2009-05-16 00:43:25 UTC (rev 1646)
+++ branches/stable/nixtape/.htaccess 2009-05-16 00:50:51 UTC (rev 1647)
@@ -15,3 +15,5 @@
RewriteRule ^group/?$ group.php
[B,NC]
RewriteRule ^country/([^/]+)/?$
location.php?country=$1 [B,NC]
RewriteRule ^logout
login.php?action=logout [B,NC]
+RewriteRule ^listen listen.php
+RewriteRule ^music
artist.php?popular=true
Modified: branches/stable/nixtape/2.0/index.php
===================================================================
--- branches/stable/nixtape/2.0/index.php 2009-05-16 00:43:25 UTC (rev
1646)
+++ branches/stable/nixtape/2.0/index.php 2009-05-16 00:50:51 UTC (rev
1647)
@@ -19,7 +19,7 @@
*/
-require_once('../database2.php');
+require_once('../database.php');
require_once('../api/ArtistXML.php');
require_once('../api/UserXML.php');
Modified: branches/stable/nixtape/admin/report/mbid-mismatch.php
===================================================================
--- branches/stable/nixtape/admin/report/mbid-mismatch.php 2009-05-16
00:43:25 UTC (rev 1646)
+++ branches/stable/nixtape/admin/report/mbid-mismatch.php 2009-05-16
00:50:51 UTC (rev 1647)
@@ -20,7 +20,7 @@
*/
require('../../config.php');
-require_once($install_path . '/database2.php');
+require_once($install_path . '/database.php');
require_once($install_path . '/templating.php');
require_once($install_path . '/data/sanitize.php');
Modified: branches/stable/nixtape/admin.php
===================================================================
--- branches/stable/nixtape/admin.php 2009-05-16 00:43:25 UTC (rev 1646)
+++ branches/stable/nixtape/admin.php 2009-05-16 00:50:51 UTC (rev 1647)
@@ -28,7 +28,7 @@
$userlevel = $u_user->userlevel;
function sendEmail($email) {
- global $mdb2;
+ global $adodb;
global $base_url;
global $u_user;
$username = $u_user->name;
@@ -36,14 +36,15 @@
// Insert the invitation into the table
$sql = 'INSERT INTO Invitations (inviter, code) VALUES ('
- . $mdb2->quote($username, 'text') . ', '
- . $mdb2->quote($code, 'text') . ')';
+ . $adodb->qstr($username) . ', '
+ . $adodb->qstr($code) . ')';
- $affected =& $mdb2->exec($sql);
-
- if (PEAR::isError($affected)) {
- die($affected->getMessage());
+ try {
+ $adodb->Execute($sql);
}
+ catch (exception $e) {
+ die($e->getMessage());
+ }
$url = $base_url . '/register.php?authcode=' . $code;
$headers = 'From: Libre.fm Invitations <address@hidden>';
@@ -73,8 +74,8 @@
// Send the email
sendEmail($_GET['email']);
$smarty->assign('sent', true);
- $sql = 'UPDATE Invitation_Request SET status=1
WHERE email=' . $mdb2->quote($_GET['email'], 'text');
- $mdb2->exec($sql);
+ $sql = 'UPDATE Invitation_Request SET status=1
WHERE email=' . $adodb->qstr($_GET['email']);
+ $adodb->Execute($sql);
}
} else {
$smarty->assign('error', 'Error!');
@@ -86,8 +87,8 @@
}
-$res = $mdb2->query('SELECT email,status FROM Invitation_Request ORDER BY time
ASC');
-$data = $res->fetchAll(MDB2_FETCHMODE_ASSOC);
+$adodb->SetFetchMode(ADODB_FETCH_ASSOC);
+$data = $adodb->GetAll('SELECT email,status FROM Invitation_Request ORDER BY
time ASC');
$smarty->assign('emails', $data);
$smarty->display('admin.tpl');
?>
Modified: branches/stable/nixtape/api/UserXML.php
===================================================================
--- branches/stable/nixtape/api/UserXML.php 2009-05-16 00:43:25 UTC (rev
1646)
+++ branches/stable/nixtape/api/UserXML.php 2009-05-16 00:50:51 UTC (rev
1647)
@@ -46,7 +46,7 @@
}
public static function getTopTracks($username, $time) {
- global $mdb2;
+ global $adodb;
$timestamp;
if (!isset($time))
@@ -66,13 +66,20 @@
return(XML::error('error', '13', 'Invalid method
signature supplied'));
}
- $res = $mdb2->query('SELECT Track.*, Artist.mbid AS artmbid,
COUNT(*) AS freq
- FROM Track, Scrobbles,Artist
- WHERE Scrobbles.username = ' . $mdb2->quote($username,
'text') . '
- AND Scrobbles.track = Track.name AND Scrobbles.time > '
. $timestamp . ' AND Track.artist = Artist.name
- GROUP BY Track.name ORDER BY freq DESC LIMIT 20');
+ $err = 0;
+ $adodb->SetFetchMode(ADODB_FETCH_ASSOC);
+ 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') . '
+ AND Scrobbles.track = Track.name AND
Scrobbles.time > ' . $timestamp . ' AND Track.artist = Artist.name
+ GROUP BY Track.name ORDER BY freq DESC
LIMIT 20');
+ }
+ catch (exception $e) {
+ $err = 1;
+ }
- if (PEAR::isError($res) || !$res->numRows()) {
+ if ($err || !$res) {
return(XML::error('failed', '7', 'Invalid resource
specified'));
}
$xml = new SimpleXMLElement('<lfm status="ok"></lfm>');
@@ -81,8 +88,7 @@
$root->addAttribute('user', $username);
$root->addAttribute('type', $time);
$i = 1;
- while(($row = $res->fetchRow(MDB2_FETCHMODE_ASSOC))) {
-
+ foreach($res as &$row) {
$track = $root->addChild('track', null);
$track->addAttribute('rank', $i);
$track->addChild('name', repamp($row['name']));
@@ -98,20 +104,27 @@
}
public static function getRecentTracks($user, $limit) {
- global $mdb2;
+ global $adodb;
if (!isset($limit)) {
$limit = 10;
}
- $res = $mdb2->query('SELECT Track . * , COUNT( * ) AS freq
- FROM Track, Scrobbles
- WHERE Scrobbles.username = ' . $mdb2->quote($user,
'text') . '
- AND Scrobbles.track = Track.name
- GROUP BY Track.name
- LIMIT 10');
+ $adodb->SetFetchMode(ADODB_FETCH_ASSOC);
+ $err = 0;
+ try {
+ $res = $adodb->GetAll('SELECT Track . * , COUNT( * ) AS
freq
+ FROM Track, Scrobbles
+ WHERE Scrobbles.username = ' .
$adodb->qstr($user) . '
+ AND Scrobbles.track = Track.name
+ GROUP BY Track.name
+ LIMIT 10');
+ }
+ catch (exception $e) {
+ $err = 1;
+ }
- if (PEAR::isError($res) || !$res->numRows()) {
+ if ($err || !$res) {
return(XML::error('error', '7', 'Invalid resource
specified'));
}
@@ -119,7 +132,7 @@
$root = $xml->addChild('recenttracks', null);
$root->addAttribute('user', $user);
- while (($row = $res->fetchRow(MDB2_FETCHMODE_ASSOC))) {
+ foreach($res as &$row) {
$track = $root->addChild('track', null);
$artist = $track->addChild('artist',
repamp($row['artist']));
$artist->addAttribute('mbid', $row['artmbid']);
Modified: branches/stable/nixtape/api/auth/index.php
===================================================================
--- branches/stable/nixtape/api/auth/index.php 2009-05-16 00:43:25 UTC (rev
1646)
+++ branches/stable/nixtape/api/auth/index.php 2009-05-16 00:50:51 UTC (rev
1647)
@@ -17,7 +17,7 @@
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
-*/
+ */
require_once('../../database.php');
?>
@@ -26,65 +26,72 @@
<body>
-<?php if (isset($_POST['username'], $_POST['api_key'], $_POST['token'])) { ?>
+<?php if (isset($_POST['username'], $_POST['api_key'], $_POST['token'])) {
+ // Authenticate the user using the submitted password
+ try {
+ $result = $adodb->GetOne('SELECT username FROM Users WHERE '
+ . 'username = ' .
$adodb->qstr($_POST['username']) . ' AND '
+ . 'password = ' .
$adodb->qstr(md5($_POST['password'])));
+ }
+ catch (exception $e) {
+ die('Database error');
+ }
+ if (!$result)
+ die('Authentication failed');
-<?php
-// Authenticate the user using the submitted password
-$result = $mdb2->query('SELECT username FROM Users WHERE '
- . 'username = ' . $mdb2->quote($_POST['username'], 'text') . ' AND '
- . 'password = ' . $mdb2->quote(md5($_POST['password']), 'text'));
-if (PEAR::isError($result))
- die('Database error');
-if (!$result->numRows())
- die('Authentication failed');
+ // Bind the user to the token and cancel the expiration rule
+ try {
+ $result = $adodb->Execute('UPDATE Auth SET '
+ . 'username = ' .
$adodb->qstr($_POST['username']) . ', '
+ . 'expires = 0 '
+ . 'WHERE '
+ . 'token = ' . $adodb->qstr($_POST['token']));
+ }
+ catch (exception $e) {
+ die('Database error');
+ }
+ ?>
-// Bind the user to the token and cancel the expiration rule
-$result = $mdb2->query('UPDATE Auth SET '
- . 'username = ' . $mdb2->quote($_POST['username'], 'text') . ', '
- . 'expires = ' . $mdb2->quote(0, 'integer') . ' '
- . 'WHERE '
- . 'token = ' . $mdb2->quote($_POST['token']));
-if (PEAR::isError($result))
- die('Database error');
-?>
+ <p>Thank you very much, <?php print($_POST['username']); ?>.
Your authorization has been recorded.</p>
-<p>Thank you very much, <?php print($_POST['username']); ?>. Your
authorization has been recorded.</p>
+ <p>You may now close the browser.</p>
-<p>You may now close the browser.</p>
+ <?php } elseif (!isset($_GET['api_key'], $_GET['token'])) { ?>
-<?php } elseif (!isset($_GET['api_key'], $_GET['token'])) { ?>
+ <p>Must submit an api_key and token to proceed.</p>
-<p>Must submit an api_key and token to proceed.</p>
+ <?php
+ } else {
-<?php } else { ?>
+ // Ensures the token exists and is not already bound to
a user
+ try {
+ $result = $adodb->GetRow('SELECT * FROM Auth
WHERE '
+ . 'token = ' .
$adodb->qstr($_GET['token']) . ' AND '
+ . 'username IS NULL');
+ }
+ catch (exception $e) {
+ die('Database error');
+ }
+ if (!$result)
+ die('Invalid token');
+ ?>
-<?php
-// Ensures the token exists and is not already bound to a user
-$result = $mdb2->query('SELECT * FROM Auth WHERE '
- . 'token = ' . $mdb2->quote($_GET['token'], 'text') . ' AND '
- . 'username IS NULL');
-if (PEAR::isError($result))
- die('Database error');
-if (!$result->numRows())
- die('Invalid token');
-?>
+ <form method="post" action="">
-<form method="post" action="">
+ <p>Your Username: <input type="text"
name="username" /></p>
-<p>Your Username: <input type="text" name="username" /></p>
+ <p>Your Password: <input type="password"
name="password" /></p>
-<p>Your Password: <input type="password" name="password" /></p>
+ <p>
+ <input type="submit" value="Submit" />
+ <input type="hidden" name="api_key"
value="<?php print($_GET['api_key']); ?>" />
+ <input type="hidden" name="token" value="<?php
print($_GET['token']); ?>" />
+ </p>
-<p>
-<input type="submit" value="Submit" />
-<input type="hidden" name="api_key" value="<?php print($_GET['api_key']); ?>"
/>
-<input type="hidden" name="token" value="<?php print($_GET['token']); ?>" />
-</p>
+ </form>
-</form>
+ <?php } ?>
-<?php } ?>
+ </body>
-</body>
-
-</html>
+ </html>
Modified: branches/stable/nixtape/auth.php
===================================================================
--- branches/stable/nixtape/auth.php 2009-05-16 00:43:25 UTC (rev 1646)
+++ branches/stable/nixtape/auth.php 2009-05-16 00:50:51 UTC (rev 1647)
@@ -23,17 +23,23 @@
require_once('data/User.php');
session_start();
if(isset($_COOKIE['session_id'])) {
- $res = $mdb2->query('SELECT username FROM Scrobble_Sessions WHERE '
- . 'sessionid = ' . $mdb2->quote($_COOKIE['session_id'], 'text')
- . ' AND expires > ' . $mdb2->quote(time(), 'integer'));
- if(PEAR::isError ($res) || !$res->numRows()) {
+ $err = 0;
+ $adodb->SetFetchMode(ADODB_FETCH_ASSOC);
+ try {
+ $row = $adodb->GetRow('SELECT username FROM Scrobble_Sessions
WHERE '
+ . 'sessionid = ' .
$adodb->qstr($_COOKIE['session_id'])
+ . ' AND expires > ' . (int)(time()));
+ }
+ catch (exception $e) {
+ $err = 1;
+ }
+ if($err || !$row) {
// Session is invalid
setcookie('session_id', '', time() - 3600);
session_unset();
session_destroy();
} else {
$logged_in = true;
- $row = $res->fetchRow(MDB2_FETCHMODE_ASSOC);
$this_user = new User($row['username']);
}
}
Modified: branches/stable/nixtape/data/Album.php
===================================================================
--- branches/stable/nixtape/data/Album.php 2009-05-16 00:43:25 UTC (rev
1646)
+++ branches/stable/nixtape/data/Album.php 2009-05-16 00:50:51 UTC (rev
1647)
@@ -19,7 +19,7 @@
*/
-require_once($install_path . '/database2.php');
+require_once($install_path . '/database.php');
require_once($install_path . '/data/Artist.php');
require_once($install_path . '/data/Track.php');
require_once($install_path . "/utils/resolve-external.php");
Modified: branches/stable/nixtape/data/Artist.php
===================================================================
--- branches/stable/nixtape/data/Artist.php 2009-05-16 00:43:25 UTC (rev
1646)
+++ branches/stable/nixtape/data/Artist.php 2009-05-16 00:50:51 UTC (rev
1647)
@@ -20,7 +20,7 @@
*/
-require_once($install_path . '/database2.php');
+require_once($install_path . '/database.php');
require_once($install_path . '/data/sanitize.php');
require_once($install_path . '/data/Album.php');
require_once($install_path . '/data/Track.php');
Modified: branches/stable/nixtape/data/Group.php
===================================================================
--- branches/stable/nixtape/data/Group.php 2009-05-16 00:43:25 UTC (rev
1646)
+++ branches/stable/nixtape/data/Group.php 2009-05-16 00:50:51 UTC (rev
1647)
@@ -17,7 +17,7 @@
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
-*/
+ */
require_once($install_path . '/database.php');
require_once($install_path . '/data/sanitize.php');
@@ -50,18 +50,18 @@
$row = $data;
}
else {
- global $mdb2;
- $res = $mdb2->query('SELECT * FROM Groups WHERE
lower(groupname) = ' . $mdb2->quote(strtolower($name), 'text'));
-
- if(PEAR::isError($res)) {
+ global $adodb;
+ $adodb->SetFetchMode(ADODB_FETCH_ASSOC);
+ try {
+ $res = $adodb->GetRow('SELECT * FROM Groups
WHERE lower(groupname) = ' . $adodb->qstr(strtolower($name)));
+ }
+ catch (exception $e) {
header('Content-Type: text/plain');
- ////($res);
-
exit;
}
- if($res->numRows()) {
- $row = $res->fetchRow(MDB2_FETCHMODE_ASSOC);
+ if($res) {
+ $row = $res;
}
}
@@ -83,18 +83,18 @@
/**
* Selects a random nixtape group.
*
- * @return object a Group object on success, a PEAR_Error object on
error, or FALSE if there are no groups existing.
+ * @return object a Group object on success, or FALSE if there are no
groups existing.
* @author tobyink
*/
static function random ()
{
- global $mdb2;
+ global $adodb;
- if ( strtolower(substr($mdb2->phptype, 0, 5)) == 'mysql' )
+ if ( strtolower(substr($connect_string, 0, 5)) == 'mysql' )
{
$random = 'RAND';
}
- elseif ( strtolower(substr($mdb2->phptype, 0, 5)) == 'mssql' )
+ elseif ( strtolower(substr($connect_string, 0, 5)) == 'mssql' )
{
$random = 'NEWID'; // I don't think we try to support
MSSQL, but here's how it's done theoretically anyway
}
@@ -103,18 +103,18 @@
$random = 'RANDOM'; // postgresql, sqlite, possibly
others
}
- $res = $mdb2->query("SELECT * FROM Groups ORDER BY {$random}()
LIMIT 1");
- if (PEAR::isError($res))
- {
+ $adodb->SetFetchMode(ADODB_FETCH_ASSOC);
+ try {
+ $res = $adodb->GetRow("SELECT * FROM Groups ORDER BY
{$random}() LIMIT 1");
+ }
+ catch (exception $e) {
return $res;
}
- elseif ($res->numRows())
- {
- $row = $res->fetchRow(MDB2_FETCHMODE_ASSOC);
+ if ($res) {
+ $row = $res;
return (new Group($row['groupname'], $row));
}
- else
- {
+ else {
// No groups found.
return false;
}
@@ -125,73 +125,76 @@
*
* @param string $name the name of the group (used to generate its URL).
* @param object $owner a User object representing the person who owns
this group.
- * @return object a Group object on success, a PEAR_Error object
otherwise.
+ * @return object a Group object on success, throw an Exception object
otherwise.
* @author tobyink
*/
static function create ($name, $owner)
{
- global $mdb2;
+ global $adodb;
if (!preg_match('/^[A-Za-z0-9][A-Za-z0-9_\.-]*[A-Za-z0-9]$/',
$name))
{
- return (new PEAR_Error('Group names should only contain
letters, numbers, hyphens, underscores and full stops (a.k.a. dots/periods),
must be at least two characters long, and can\'t start or end with
punctuation.'));
+ throw (new Exception('Group names should only contain
letters, numbers, hyphens, underscores and full stops (a.k.a. dots/periods),
must be at least two characters long, and can\'t start or end with
punctuation.'));
}
if (in_array(strtolower($name), array('new', 'search')))
{
- return (new PEAR_Error("Not allowed to create a group
called '{$name}' (reserved word)!"));
+ throw (new Exception("Not allowed to create a group
called '{$name}' (reserved word)!"));
}
// Check to make sure no existing group with same name
(case-insensitive).
$q = sprintf('SELECT groupname FROM Groups WHERE
LOWER(groupname)=LOWER(%s)'
- , $mdb2->quote($name, 'text'));
- $res = $mdb2->query($q);
- if (PEAR::isError($res))
- {
+ , $adodb->qstr($name));
+ $adodb->SetFetchMode(ADODB_FETCH_ASSOC);
+ try {
+ $res = $adodb->GetRow($q);
+ }
+ catch (exception $e) {
return $res;
}
- elseif ($res->numRows())
- {
- $row = $res->fetchRow(MDB2_FETCHMODE_ASSOC);
+ if ($res) {
+ $row = $res;
$existing = $row['groupname'];
- return (new PEAR_Error(
- ($existing == $name) ?
- "There is already a group called
'{$existing}'." :
- "The name '{$name}' it too similar to
existing group '{$existing}'"
- ));
+ throw (new Exception(
+ ($existing == $name) ?
+ "There is already a group
called '{$existing}'." :
+ "The name '{$name}' it too
similar to existing group '{$existing}'"
+ ));
}
// Create new group
$q = sprintf('INSERT INTO Groups (groupname, owner, created,
modified) VALUES (%s, %s, %d, %d)'
- , $mdb2->quote($name, 'text')
- , $mdb2->quote($owner->uniqueid, 'integer')
+ , $adodb->qstr($name)
+ , (int)($owner->uniqueid)
, time()
, time());
- $res = $mdb2->query($q);
- if (PEAR::isError($res))
- {
+ try {
+ $res = $adodb->Execute($q);
+ }
+ catch (exception $e) {
return $res;
}
// Get ID number for group
- $q = sprintf('SELECT id FROM Groups WHERE lower(groupname) =
lower(%s)', $mdb2->quote($name, 'text'));
- $res = $mdb2->query($q);
- if (PEAR::isError($res))
- {
+ $q = sprintf('SELECT id FROM Groups WHERE lower(groupname) =
lower(%s)', $adodb->quote($name, 'text'));
+ try {
+ $res = $adodb->GetOne($q);
+ }
+ catch (exception $e) {
return $res;
}
- elseif (!$res->numRows())
+ if (!$res)
{
- return (new PEAR_Error('Something has gone horribly,
horribly wrong!'));
+ throw (new Exception('Something has gone horribly,
horribly wrong!'));
}
- $grp = $res->fetchOne(0);
+ $grp = $res;
// Group owner must be a member of the group
$q = sprintf('INSERT INTO Group_Members (grp, member, joined)
VALUES (%s, %s, %d)'
- , $mdb2->quote($grp, 'integer')
- , $mdb2->quote($owner->uniqueid, 'integer')
+ , (int)($grp)
+ , (int)($owner->uniqueid)
, time());
- $res = $mdb2->query($q);
+ $res = $adodb->Execute($q);
if (PEAR::isError($res))
{
return $res;
@@ -203,37 +206,38 @@
static function groupList ($user=false)
{
- global $mdb2;
+ global $adodb;
- if ($user)
- {
- $res = $mdb2->query('SELECT gc.* FROM '
- .'Group_Members m '
- .'INNER JOIN (SELECT g.id, g.groupname,
g.owner, g.fullname, g.bio, g.homepage, g.created, g.modified, g.avatar_uri,
g.grouptype, COUNT(*) AS member_count '
- .'FROM Groups g '
- .'LEFT JOIN Group_Members gm ON gm.grp=g.id '
- .'GROUP BY g.id, g.groupname, g.owner,
g.fullname, g.bio, g.homepage, g.created, g.modified, g.avatar_uri,
g.grouptype) gc '
- .'ON m.grp=gc.id '
- .'WHERE
m.member='.$mdb2->quote($user->uniqueid, 'integer'));
+ $adodb->SetFetchMode(ADODB_FETCH_ASSOC);
+ try {
+
+ if ($user)
+ {
+ $res = $adodb->GetAll('SELECT gc.* FROM '
+ .'Group_Members m '
+ .'INNER JOIN (SELECT g.id,
g.groupname, g.owner, g.fullname, g.bio, g.homepage, g.created, g.modified,
g.avatar_uri, g.grouptype, COUNT(*) AS member_count '
+ .'FROM Groups g '
+ .'LEFT JOIN
Group_Members gm ON gm.grp=g.id '
+ .'GROUP BY g.id,
g.groupname, g.owner, g.fullname, g.bio, g.homepage, g.created, g.modified,
g.avatar_uri, g.grouptype) gc '
+ .'ON m.grp=gc.id '
+ .'WHERE
m.member='.(int)($user->uniqueid));
+ }
+ else
+ {
+ $res = $adodb->GetAll('SELECT g.groupname,
g.owner, g.fullname, g.bio, g.homepage, g.created, g.modified, g.avatar_uri,
g.grouptype, COUNT(*) AS member_count '
+ .'FROM Groups g '
+ .'LEFT JOIN Group_Members gm ON
gm.grp=g.id '
+ .'GROUP BY g.groupname,
g.owner, g.fullname, g.bio, g.homepage, g.created, g.modified, g.avatar_uri,
g.grouptype');
+ }
+
}
- else
- {
- $res = $mdb2->query('SELECT g.groupname, g.owner,
g.fullname, g.bio, g.homepage, g.created, g.modified, g.avatar_uri,
g.grouptype, COUNT(*) AS member_count '
- .'FROM Groups g '
- .'LEFT JOIN Group_Members gm ON gm.grp=g.id '
- .'GROUP BY g.groupname, g.owner, g.fullname,
g.bio, g.homepage, g.created, g.modified, g.avatar_uri, g.grouptype');
- }
-
- if(PEAR::isError($res))
- {
+ catch (exception $e) {
header('Content-Type: text/plain');
- ////($res);
exit;
}
$list = array();
- while ($row = $res->fetchRow(MDB2_FETCHMODE_ASSOC))
- {
+ foreach($res as &$row) {
$g = new Group($row['group_name'], $row);
$g->count = $row['member_count'];
$list[] = $g;
@@ -244,7 +248,7 @@
function save ()
{
- global $mdb2;
+ global $adodb;
$q = sprintf('UPDATE Groups SET '
. 'owner=%s, '
@@ -254,19 +258,19 @@
. 'avatar_uri=%s, '
. 'modified=%d '
. 'WHERE groupname=%s'
- , $mdb2->quote($this->owner->uniqueid,
'integer')
- , $mdb2->quote($this->fullname, 'text')
- , $mdb2->quote($this->homepage, 'text')
- , $mdb2->quote($this->bio, 'text')
- , $mdb2->quote($this->avatar_uri, 'text')
+ , (int)($this->owner->uniqueid)
+ , $adodb->qstr($this->fullname)
+ , $adodb->qstr($this->homepage)
+ , $adodb->qstr($this->bio)
+ , $adodb->qstr($this->avatar_uri)
, time()
- , $mdb2->quote($this->name, 'text'));
+ , $adodb->qstr($this->name));
- $res = $mdb2->query($q);
-
- if(PEAR::isError($res)) {
+ try {
+ $res = $adodb->Execute($q);
+ }
+ catch (exception $e) {
header('Content-Type: text/plain');
- ////($res);
exit;
}
@@ -283,7 +287,7 @@
global $base_uri;
if (!empty($this->avatar_uri))
return $this->avatar_uri;
- return $base_uri . 'themes/' . $default_theme .
'/images/qm50.png';
+ return $base_url .
'/themes/librefm/images/default-avatar-stream.png';
}
function getURL() {
@@ -299,19 +303,19 @@
}
function getUsers () {
- global $mdb2;
+ global $adodb;
+ $adodb->SetFetchMode(ADODB_FETCH_ASSOC);
if (!isset($this->users[0]))
{
- $res = $mdb2->query('SELECT u.* '
- . 'FROM Users u '
- . 'INNER JOIN Group_Members gm ON
u.uniqueid=gm.member '
- . 'WHERE
gm.grp='.$mdb2->quote($this->gid,'integer')
- . ' ORDER BY gm.joined');
- if ($res->numRows())
+ $res = $adodb->GetAll('SELECT u.* '
+ . 'FROM Users u '
+ . 'INNER JOIN Group_Members gm ON
u.uniqueid=gm.member '
+ . 'WHERE gm.grp='.(int)($this->gid)
+ . ' ORDER BY gm.joined');
+ if ($res)
{
- while ($row =
$res->fetchRow(MDB2_FETCHMODE_ASSOC))
- {
+ foreach($res as &$row) {
$this->users[ $row['username'] ] = new
User($row['username'], $row);
}
}
@@ -333,14 +337,14 @@
if ($this->memberCheck($user))
return false;
- global $mdb2;
- $res = $mdb2->query(sprintf('INSERT INTO Group_Members (grp,
member, joined) VALUES (%s, %s, %d)',
- $mdb2->quote($this->gid, 'integer'),
- $mdb2->quote($user->uniqueid, 'integer'),
- time()));
-
- if(PEAR::isError($res))
- {
+ global $adodb;
+ try {
+ $res = $adodb->Execute(sprintf('INSERT INTO
Group_Members (grp, member, joined) VALUES (%s, %s, %d)',
+ (int)($this->gid),
+ (int)($user->uniqueid),
+ time()));
+ }
+ catch (exception $e) {
return false;
}
@@ -356,13 +360,15 @@
if ($this->owner->name == $user->name)
return false;
- global $mdb2;
- $res = $mdb2->query(sprintf('DELETE FROM Group_Members WHERE
grp=%s AND member=%s',
- $mdb2->quote($this->gid, 'integer'),
- $mdb2->quote($user->uniqueid, 'integer')));
-
- if(PEAR::isError($res))
+ global $adodb;
+ try {
+ $res = $adodb->Execute(sprintf('DELETE FROM
Group_Members WHERE grp=%s AND member=%s',
+ (int)($this->gid),
+ (int)($user->uniqueid)));
+ }
+ catch (exception $e) {
return false;
+ }
$this->users[ $user->name ] = null;
// The array key still exists though. That's annoying. PHP
needs an equivalent of Perl's 'delete'.
@@ -372,11 +378,11 @@
function tagCloudData () {
return TagCloud::generateTagCloud(
- TagCloud::scrobblesTable('group').' s LEFT JOIN Users u
ON s.username=u.username LEFT JOIN Group_Members gm ON u.uniqueid=gm.member
LEFT JOIN Groups g ON gm.grp=g.id',
- 'artist',
- 40,
- $this->name,
- 'groupname');
+ TagCloud::scrobblesTable('group').' s LEFT JOIN
Users u ON s.username=u.username LEFT JOIN Group_Members gm ON
u.uniqueid=gm.member LEFT JOIN Groups g ON gm.grp=g.id',
+ 'artist',
+ 40,
+ $this->name,
+ 'groupname');
}
}
Modified: branches/stable/nixtape/data/Server.php
===================================================================
--- branches/stable/nixtape/data/Server.php 2009-05-16 00:43:25 UTC (rev
1646)
+++ branches/stable/nixtape/data/Server.php 2009-05-16 00:50:51 UTC (rev
1647)
@@ -19,7 +19,7 @@
*/
-require_once($install_path . '/database2.php');
+require_once($install_path . '/database.php');
require_once($install_path . '/data/Artist.php');
// require_once($install_path . '/data/Group.php');
require_once($install_path . '/data/Track.php');
Modified: branches/stable/nixtape/data/Statistic.php
===================================================================
--- branches/stable/nixtape/data/Statistic.php 2009-05-16 00:43:25 UTC (rev
1646)
+++ branches/stable/nixtape/data/Statistic.php 2009-05-16 00:50:51 UTC (rev
1647)
@@ -34,40 +34,41 @@
* @return array playstats
*/
static function generatePlayStats($table, $field, $limit = 40,
$constraint = null, $maxwidth = 100 ) {
- global $mdb2;
+ global $adodb;
if (!is_string($field)) return false;
if (!is_string($table)) return false;
if (!is_integer($limit)) return false;
$query = 'SELECT ' . $field . ', count(*) AS count FROM ' .
$table;
$query .= (!is_null($constraint)) ? ' WHERE ' : null;
if ($field == 'track') {
- $query .= (!is_null($constraint)) ? ' artist = ' .
$mdb2->quote($constraint, 'text') : null;
+ $query .= (!is_null($constraint)) ? ' artist = ' .
$adodb->qstr($constraint) : null;
} else {
- $query .= (!is_null($constraint)) ? ' username = ' .
$mdb2->quote($constraint, 'text') : null;
+ $query .= (!is_null($constraint)) ? ' username = ' .
$adodb->qstr($constraint) : null;
}
$query .= ' GROUP BY ' . $field . ' ORDER BY count DESC LIMIT '
. $limit;
- $res = $mdb2->query($query);
- if (PEAR::isError($res)) {
- echo('ERROR' . $res->getMessage());
+ $adodb->SetFetchMode(ADODB_FETCH_ASSOC);
+ try {
+ $res = $adodb->GetAll($query);
}
-
- if (!$res->numRows()) {
+ catch (exception $e) {
+ echo('ERROR' . $e->getMessage());
+ }
+ if (!$res) {
return false;
} else {
- $data = $res->fetchAll(MDB2_FETCHMODE_ASSOC);
- $max = $data[0]['count'];
+ $max = $res[0]['count'];
- foreach($data as &$i){
+ foreach($res as &$i){
$i['pageurl'] =
Server::getArtistURL($i['artist']);
$i['size'] = $i['count'] / $max * $maxwidth;
}
- return $data;
+ return $res;
}
}
static function generatePlayByDays($table, $limit = 100, $constraint =
null, $maxwidth = 100 ) {
- global $mdb2;
+ global $adodb;
global $connect_string;
if (!is_string($table)) return false;
@@ -80,29 +81,29 @@
if( strpos($connect_string , 'mysql' ) === 0 ) $query = 'SELECT
COUNT(*) as count,DATE(FROM_UNIXTIME(time)) as date FROM ' . $table;
$query .= (!is_null($constraint)) ? ' WHERE ' : null;
- $query .= (!is_null($constraint)) ? ' username = ' .
$mdb2->quote($constraint, 'text') : null;
+ $query .= (!is_null($constraint)) ? ' username = ' .
$adodb->qstr($constraint) : null;
$query .= ' GROUP BY date ORDER BY date DESC LIMIT ' . $limit;
- $res = $mdb2->query($query);
- if (PEAR::isError($res)) {
- echo('ERROR' . $res->getMessage());
+ $adodb->SetFetchMode(ADODB_FETCH_ASSOC);
+ try {
+ $res = $adodb->GetAll($query);
}
-
- if (!$res->numRows()) {
+ catch (exception $e) {
+ echo('ERROR' . $e->getMessage());
+ }
+ if (!$res) {
return false;
} else {
- $data = $res->fetchAll(MDB2_FETCHMODE_ASSOC);
-
$max = 0;
- foreach($data as &$i){
+ foreach($res as &$i){
if( $i['count'] > $max ) $max = $i['count'];
}
- foreach($data as &$i){
+ foreach($res as &$i){
$i['size'] = $i['count'] / $max * $maxwidth;
}
- return $data;
+ return $res;
}
}
}
Modified: branches/stable/nixtape/data/TagCloud.php
===================================================================
--- branches/stable/nixtape/data/TagCloud.php 2009-05-16 00:43:25 UTC (rev
1646)
+++ branches/stable/nixtape/data/TagCloud.php 2009-05-16 00:50:51 UTC (rev
1647)
@@ -18,7 +18,7 @@
*/
-require_once($install_path . '/database2.php');
+require_once($install_path . '/database.php');
require_once($install_path . '/data/Server.php');
require_once($install_path . '/config.php'); // Should already be required
though.
Modified: branches/stable/nixtape/data/Track.php
===================================================================
--- branches/stable/nixtape/data/Track.php 2009-05-16 00:43:25 UTC (rev
1646)
+++ branches/stable/nixtape/data/Track.php 2009-05-16 00:50:51 UTC (rev
1647)
@@ -20,7 +20,7 @@
*/
-require_once($install_path . '/database2.php');
+require_once($install_path . '/database.php');
require_once($install_path . '/data/Artist.php');
require_once($install_path . '/data/Album.php');
require_once($install_path . '/data/Server.php');
Modified: branches/stable/nixtape/data/User.php
===================================================================
--- branches/stable/nixtape/data/User.php 2009-05-16 00:43:25 UTC (rev
1646)
+++ branches/stable/nixtape/data/User.php 2009-05-16 00:50:51 UTC (rev
1647)
@@ -19,7 +19,7 @@
*/
-require_once($install_path . '/database2.php');
+require_once($install_path . '/database.php');
require_once($install_path . '/data/sanitize.php');
require_once($install_path . '/utils/human-time.php');
require_once($install_path . '/data/Server.php');
Modified: branches/stable/nixtape/database.php
===================================================================
--- branches/stable/nixtape/database.php 2009-05-16 00:43:25 UTC (rev
1646)
+++ branches/stable/nixtape/database.php 2009-05-16 00:50:51 UTC (rev
1647)
@@ -25,23 +25,14 @@
}
require_once('config.php');
-require_once('MDB2.php');
+require_once('adodb/adodb-exceptions.inc.php');
+require_once('adodb/adodb.inc.php');
-$mdb2 =& MDB2::connect($connect_string);
-if (PEAR::isError($mdb2)) {
- die($mdb2->getMessage());
+try {
+ $adodb =& NewADOConnection($connect_string);
+} catch (exception $e) {
+ var_dump($e);
+ adodb_backtrace($e->gettrace());
}
-function reportError($text, $data) {
- // make a fresh connection
- $mdbe = MDB2::connect($connect_string);
- if (PEAR::isError($mdbe)) {
- die($mdbe->getMessage());
- }
-
- $mdbe->exec('INSERT INTO Error (msg, data, time) VALUES ('
- . $mdbe->quote($text, 'text') . ', '
- . $mdbe->quote($data, 'text') . ', '
- . time() . ')');
-}
?>
Deleted: branches/stable/nixtape/database2.php
===================================================================
--- branches/stable/nixtape/database2.php 2009-05-16 00:43:25 UTC (rev
1646)
+++ branches/stable/nixtape/database2.php 2009-05-16 00:50:51 UTC (rev
1647)
@@ -1,38 +0,0 @@
-<?php
-
-/* Libre.fm -- a free network service for sharing your music listening habits
-
- Copyright (C) 2009 Free Software Foundation, Inc
-
- This program is free software: you can redistribute it and/or modify
- it under the terms of the GNU Affero General Public License as published by
- the Free Software Foundation, either version 3 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU Affero General Public License for more details.
-
- You should have received a copy of the GNU Affero General Public License
- along with this program. If not, see <http://www.gnu.org/licenses/>.
-
-*/
-
-
-if(!file_exists(dirname(__FILE__) . '/config.php')) {
- die('Please run the <a href=\'install.php\'>Install</a> script to
configure your installation');
-}
-
-require_once('config.php');
-require_once('adodb/adodb-exceptions.inc.php');
-require_once('adodb/adodb.inc.php');
-
-try {
- $adodb =& NewADOConnection($adodb_connect_string);
-} catch (exception $e) {
- var_dump($e);
- adodb_backtrace($e->gettrace());
-}
-
-?>
Modified: branches/stable/nixtape/delete-profile.php
===================================================================
--- branches/stable/nixtape/delete-profile.php 2009-05-16 00:43:25 UTC (rev
1646)
+++ branches/stable/nixtape/delete-profile.php 2009-05-16 00:50:51 UTC (rev
1647)
@@ -29,34 +29,35 @@
$smarty->display('error.tpl');
die ();
} elseif ( isset ($_GET['code'])) {
- $mdb2->exec('DELETE FROM Delete_Request WHERE expires < ' .
$mdb2->quote(time(), 'integer'));
+ $adodb->Execute('DELETE FROM Delete_Request WHERE expires < ' .
(int)(time()));
$username = $this_user->name;
$code = $_GET['code'];
- $res = $mdb2->query('SELECT * FROM Delete_Request WHERE username = ' .
$mdb2->quote($username, 'text') . ' AND code = ' . $mdb2->quote($code, 'text'));
- if (PEAR::isError($res)) {
- //($res);
- exit ;
+try {
+ $res = $adodb->GetRow('SELECT * FROM Delete_Request WHERE username = '
. $adodb->qstr($username) . ' AND code = ' . $adodb->qstr($code));
+}
+catch (exception $e) {
+ exit;
}
- if (!$res->numRows()) {
+ if (!$res) {
$error = 'Invalid code.';
$smarty->assign('error', 'Error!');
$smarty->assign('details', $error);
$smarty->display('error.tpl');
die ();
} else {
- $mdb2->exec('DELETE FROM Scrobble_Sessions WHERE username = ' .
$mdb2->quote($username, 'text'));
- $mdb2->exec('DELETE FROM Delete_Request WHERE username = ' .
$mdb2->quote($username, 'text'));
- $mdb2->exec('DELETE FROM Auth WHERE username = ' .
$mdb2->quote($username, 'text'));
- $mdb2->exec('DELETE FROM Group_Members WHERE member = ' .
$mdb2->quote($this_user->uniqueid, 'integer'));
- $mdb2->exec('DELETE FROM Radio_Sessions WHERE username = ' .
$mdb2->quote($username, 'text'));
- $mdb2->exec('DELETE FROM Recovery_Request WHERE username = ' .
$mdb2->quote($username, 'text'));
- $mdb2->exec('DELETE FROM Scrobbles WHERE username = ' .
$mdb2->quote($username, 'text'));
- $mdb2->exec('DELETE FROM User_Relationship_Flags WHERE uid1 = '
. $mdb2->quote($this_user->uniqueid, 'integer'));
- $mdb2->exec('DELETE FROM User_Relationship_Flags WHERE uid2 = '
. $mdb2->quote($this_user->uniqueid, 'integer'));
- $mdb2->exec('DELETE FROM User_Relationships WHERE uid1 = ' .
$mdb2->quote($this_user->uniqueid, 'integer'));
- $mdb2->exec('DELETE FROM User_Relationships WHERE uid2 = ' .
$mdb2->quote($this_user->uniqueid, 'integer'));
- $mdb2->exec('DELETE FROM Users WHERE lower(username) = ' .
$mdb2->quote(strtolower($username), 'text'));
+ $adodb->Execute('DELETE FROM Scrobble_Sessions WHERE username =
' . $adodb->qstr($username));
+ $adodb->Execute('DELETE FROM Delete_Request WHERE username = '
. $adodb->qstr($username));
+ $adodb->Execute('DELETE FROM Auth WHERE username = ' .
$adodb->qstr($username));
+ $adodb->Execute('DELETE FROM Group_Members WHERE member = ' .
(int)($this_user->uniqueid));
+ $adodb->Execute('DELETE FROM Radio_Sessions WHERE username = '
. $adodb->qstr($username));
+ $adodb->Execute('DELETE FROM Recovery_Request WHERE username =
' . $adodb->qstr($username));
+ $adodb->Execute('DELETE FROM Scrobbles WHERE username = ' .
$adodb->qstr($username));
+ $adodb->Execute('DELETE FROM User_Relationship_Flags WHERE uid1
= ' . (int)($this_user->uniqueid));
+ $adodb->Execute('DELETE FROM User_Relationship_Flags WHERE uid2
= ' . (int)($this_user->uniqueid));
+ $adodb->Execute('DELETE FROM User_Relationships WHERE uid1 = '
. (int)($this_user->uniqueid));
+ $adodb->Execute('DELETE FROM User_Relationships WHERE uid2 = '
. (int)($this_user->uniqueid));
+ $adodb->Execute('DELETE FROM Users WHERE lower(username) = ' .
$adodb->qstr(strtolower($username)));
session_destroy();
header('Location: index.php');
}
@@ -65,7 +66,7 @@
$username = $this_user->name;
$email = $this_user->email;
$expire = time()+86400;
- $mdb2->exec('INSERT INTO Delete_Request (code, expires, username)
VALUES (' . $mdb2->quote($code, 'text') . ', ' . $mdb2->quote($expire, 'text')
. "," . $mdb2->quote($username, 'text') . ')');
+ $adodb->Execute('INSERT INTO Delete_Request (code, expires, username)
VALUES (' . $adodb->qstr($code) . ', ' . $adodb->qstr($expire) . "," .
$adodb->qstr($username) . ')');
$url = $base_url . '/delete-profile.php?code=' . $code;
$content = "Hi!\n\nSomeone from the IP address " .
$_SERVER['REMOTE_ADDR'] . " requested account deletion at libre.fm. To remove
this account click: \n\n" . $url . "\n\n- The Libre.fm Team";
$headers = 'From: Libre.fm <address@hidden>';
Modified: branches/stable/nixtape/install.php
===================================================================
--- branches/stable/nixtape/install.php 2009-05-16 00:43:25 UTC (rev 1646)
+++ branches/stable/nixtape/install.php 2009-05-16 00:50:51 UTC (rev 1647)
@@ -19,7 +19,8 @@
*/
-require_once('MDB2.php');
+require_once('adodb/adodb-exceptions.inc.php');
+require_once('adodb/adodb.inc.php');
require_once('version.php');
require_once('utils/get_absolute_url.php');
@@ -37,13 +38,17 @@
} else {
$connect_string = $dbms . '://' . $_POST['username'] . ':' .
$_POST['password'] . '@' . $_POST['hostname'] . ':' . $_POST['port'] . '/' .
$_POST['dbname'];
}
+
+ $adodb_connect_string = str_replace('pgsql:', 'postgres:',
$connect_string );
// Check the connection
- $mdb2 =& MDB2::connect($connect_string);
- if (PEAR::isError($mdb2)) {
- die($mdb2->getMessage());
+ try {
+ $adodb =& NewADOConnection($connect_string);
}
- $mdb2->disconnect();
+ catch (exception $e) {
+ die($e->getMessage());
+ }
+ $adodb->Close();
$install_path = dirname(__FILE__) . '/';
@@ -52,7 +57,7 @@
$submissions_server = $_POST['submissions_server'];
//Write out the configuration
- $config = "<?php\n \$config_version = " . $version .";\n
\$connect_string = '" . $connect_string . "';\n \$default_theme = '" .
$default_theme . "';\n \$base_url = '" . $base_url . "';\n \$submissions_server
= '" . $submissions_server . "';\n \$install_path = '" . $install_path . "'; ";
+ $config = "<?php\n \$config_version = " . $version .";\n
\$connect_string = '" . $connect_string . "';\n \$default_theme = '" .
$default_theme . "';\n \$base_url = '" . $base_url . "';\n \$submissions_server
= '" . $submissions_server . "';\n \$install_path = '" . $install_path . "';\n
\$adodb_connect_string = '" . $adodb_connect_string . "'; ";
$conf_file = fopen('config.php', 'w');
$result = fwrite($conf_file, $config);
@@ -122,5 +127,3 @@
</form>
</body>
</html>
-
-
Modified: branches/stable/nixtape/invite.php
===================================================================
--- branches/stable/nixtape/invite.php 2009-05-16 00:43:25 UTC (rev 1646)
+++ branches/stable/nixtape/invite.php 2009-05-16 00:50:51 UTC (rev 1647)
@@ -47,9 +47,9 @@
if(empty($errors)) {
$code = md5(md5($username) . time());
- $mdb2->query('INSERT INTO Invitations (inviter, code) VALUES ('
- . $mdb2->quote($username, 'text') . ', '
- . $mdb2->quote($code, 'text') . ')');
+ $adodb->Execute('INSERT INTO Invitations (inviter, code) VALUES
('
+ . $adodb->qstr($username) . ', '
+ . $adodb->qstr($code) . ')');
$url = $base_url . '/register.php?authcode=' . $code;
$headers = 'From: Libre.fm Invitations <address@hidden>';
Modified: branches/stable/nixtape/location.php
===================================================================
--- branches/stable/nixtape/location.php 2009-05-16 00:43:25 UTC (rev
1646)
+++ branches/stable/nixtape/location.php 2009-05-16 00:50:51 UTC (rev
1647)
@@ -25,9 +25,9 @@
require_once('data/Server.php');
require_once('data/User.php');
-if ( strtolower(substr($mdb2->phptype, 0, 5)) == 'mysql' )
+if ( strtolower(substr($connect_string, 0, 5)) == 'mysql' )
$random = 'RAND';
-elseif ( strtolower(substr($mdb2->phptype, 0, 5)) == 'mssql' )
+elseif ( strtolower(substr($connect_string, 0, 5)) == 'mssql' )
$random = 'NEWID'; // I don't think we try to support MSSQL, but
here's how it's done theoretically anyway
else
$random = 'RANDOM'; // postgresql, sqlite, possibly others
@@ -35,21 +35,20 @@
if ($_REQUEST['country'])
{
$q = sprintf('SELECT u.* FROM Users u INNER JOIN Places p ON
u.location_uri=p.location_uri AND p.country=%s ORDER BY %s() LIMIT 100',
- $mdb2->quote(strtoupper($_REQUEST['country']), 'text'),
+ $adodb->qstr(strtoupper($_REQUEST['country'])),
$random);
- $res = $mdb2->query($q);
+ $adodb->SetFetchMode(ADODB_FETCH_ASSOC);
+ $res = $adodb->GetAll($q);
- while ( $row = $res->fetchRow(MDB2_FETCHMODE_ASSOC) )
- {
+ foreach($res as &$row) {
$userlist[] = new User($row['username'], $row);
}
$smarty->assign('country', strtoupper($_REQUEST['country']));
- $res = $mdb2->query(sprintf('SELECT * FROM Countries WHERE country=%s
LIMIT 1',
- $mdb2->quote(strtoupper($_REQUEST['country']), 'text')));
- if ( $row = $res->fetchRow(MDB2_FETCHMODE_ASSOC) )
- {
+ $row = $adodb->GetRow(sprintf('SELECT * FROM Countries WHERE country=%s
LIMIT 1',
+ $adodb->qstr(strtoupper($_REQUEST['country']))));
+ if ( $row ) {
$smarty->assign('country_info', $row);
}
Modified: branches/stable/nixtape/login.php
===================================================================
--- branches/stable/nixtape/login.php 2009-05-16 00:43:25 UTC (rev 1646)
+++ branches/stable/nixtape/login.php 2009-05-16 00:50:51 UTC (rev 1647)
@@ -20,7 +20,7 @@
*/
-require_once('database2.php');
+require_once('database.php');
require_once('templating.php');
require_once($install_path . '/data/User.php');
@@ -39,9 +39,6 @@
if(empty($username)) {
$errors .= 'You must enter a username.<br />';
}
- if(empty($password)) {
- $errors .= 'You must enter a password.<br />';
- }
if(empty($errors)) {
try {
Modified: branches/stable/nixtape/radio/adjust.php
===================================================================
--- branches/stable/nixtape/radio/adjust.php 2009-05-16 00:43:25 UTC (rev
1646)
+++ branches/stable/nixtape/radio/adjust.php 2009-05-16 00:50:51 UTC (rev
1647)
@@ -28,9 +28,9 @@
$session = $_GET['session'];
$url = $_GET['url'];
-$res = $mdb2->query('SELECT username FROM Radio_Sessions WHERE session = ' .
$mdb2->quote($session, 'text'));
+$res = $adodb->GetOne('SELECT username FROM Radio_Sessions WHERE session = ' .
$adodb->qstr($session));
-if(!$res->numRows()) {
+if(!$res) {
die("BADSESSION\n");
}
@@ -43,7 +43,7 @@
die("FAILED Unavailable station\n");
}
-$mdb2->exec('UPDATE Radio_Sessions SET url = ' . $mdb2->quote($url, 'text') .
' WHERE session = ' . $mdb2->quote($session, 'text'));
+$adodb->Execute('UPDATE Radio_Sessions SET url = ' . $adodb->qstr($url) . '
WHERE session = ' . $adodb->qstr($session));
echo "response=OK\n";
echo "url=http://libre.fm\n"; // Need to parse the station request and give a
real URL
Modified: branches/stable/nixtape/radio/handshake.php
===================================================================
--- branches/stable/nixtape/radio/handshake.php 2009-05-16 00:43:25 UTC (rev
1646)
+++ branches/stable/nixtape/radio/handshake.php 2009-05-16 00:50:51 UTC (rev
1647)
@@ -18,7 +18,7 @@
*/
-require_once('../database2.php');
+require_once('../database.php');
if(!isset($_GET['username']) || !isset($_GET['passwordmd5'])) {
die("BADAUTH\n");
Modified: branches/stable/nixtape/radio/xspf.php
===================================================================
--- branches/stable/nixtape/radio/xspf.php 2009-05-16 00:43:25 UTC (rev
1646)
+++ branches/stable/nixtape/radio/xspf.php 2009-05-16 00:50:51 UTC (rev
1647)
@@ -31,44 +31,44 @@
$session = $_GET['sk'];
-$res = $mdb2->query('SELECT url FROM Radio_Sessions WHERE session = ' .
$mdb2->quote($session, 'text'));
+$res = $adodb->GetOne('SELECT url FROM Radio_Sessions WHERE session = ' .
$adodb->qstr($session));
-if(!$res->numRows()) {
+if(!$res) {
die("BADSESSION\n"); // this should return a blank dummy playlist
instead
}
-$url = $res->fetchOne(0);
+$url = $res;
$title = radio_title_from_url($url);
$smarty->assign('title', $title);
if(ereg('l(ast|ibre)fm://globaltags/(.*)', $url, $regs)) {
$tag = $regs[2];
- $res = $mdb2->query('SELECT Track.name, Track.artist_name,
Track.album_name FROM Track INNER JOIN Tags ON Track.name=Tags.track AND
Track.artist_name=Tags.artist AND Track.album_name=Tags.album WHERE
streamurl<>\'\' AND streamable=1 AND lower(tag) = ' .
$mdb2->quote(mb_strtolower($tag, 'UTF-8'), 'text'));
+ $res = $adodb->Execute('SELECT Track.name, Track.artist_name,
Track.album_name FROM Track INNER JOIN Tags ON Track.name=Tags.track AND
Track.artist_name=Tags.artist AND Track.album_name=Tags.album WHERE
streamurl<>\'\' AND streamable=1 AND lower(tag) = ' .
$adodb->qstr(mb_strtolower($tag, 'UTF-8')));
} elseif(ereg('l(ast|ibre)fm://artist/(.*)/similarartists', $url, $regs)) {
$artist = $regs[2];
- $res = $mdb2->query('SELECT name, artist_name, album_name FROM Track
WHERE streamurl<>\'\' AND streamable=1 AND lower(artist_name) = ' .
$mdb2->quote(mb_strtolower($artist, 'UTF-8'), 'text'));
+ $res = $adodb->Execute('SELECT name, artist_name, album_name FROM Track
WHERE streamurl<>\'\' AND streamable=1 AND lower(artist_name) = ' .
$adodb->qstr(mb_strtolower($artist, 'UTF-8')));
} else {
die("FAILED\n"); // this should return a blank dummy playlist instead
}
+$avail = $res->RecordCount();
-$avail = $res->numRows();
-
// This needs some kind of deduplication among other things
-$tr[0] = rand(1,$avail);
-$tr[1] = rand(1,$avail);
-$tr[2] = rand(1,$avail);
-$tr[3] = rand(1,$avail);
-$tr[4] = rand(1,$avail);
+$tr[0] = rand(0,$avail-1);
+$tr[1] = rand(0,$avail-1);
+$tr[2] = rand(0,$avail-1);
+$tr[3] = rand(0,$avail-1);
+$tr[4] = rand(0,$avail-1);
sort($tr);
$radiotracks = array();
+$adodb->SetFetchMode(ADODB_FETCH_ASSOC);
for($i=0; $i<5; $i++) {
- $res->seek($tr[$i]);
- $row = $res->fetchRow(MDB2_FETCHMODE_ASSOC);
+ $res->Move($tr[$i]);
+ $row = $res->GetRow();
$track = new Track($row['name'], $row['artist_name']);
$album = new Album($row['album_name'], $row['artist_name']);
Modified: branches/stable/nixtape/register.php
===================================================================
--- branches/stable/nixtape/register.php 2009-05-16 00:43:25 UTC (rev
1646)
+++ branches/stable/nixtape/register.php 2009-05-16 00:50:51 UTC (rev
1647)
@@ -19,7 +19,7 @@
*/
-require_once('database2.php');
+require_once('database.php');
require_once('templating.php');
require_once('utils/EmailAddressValidator.php');
@@ -30,8 +30,8 @@
// Moving to open alpha
/*$authcode = $_GET["authcode"];
-$res = $mdb2->query("SELECT inviter FROM Invitations WHERE code = " .
$mdb2->quote($authcode, "text"));
-if(!$res->numRows()) {
+$res = $adodb->GetRow('SELECT inviter FROM Invitations WHERE code = ' .
$adodb->qstr($authcode));
+if(!$res) {
$invalid_authcode = true;
} else {
$invalid_authcode = false;
@@ -152,9 +152,9 @@
sendEmail($content, $email);
// Remove auth code and set their username as the invitee
- //$mdb2->query("UPDATE Invitations SET code = NULL, invitee = "
. $mdb2->quote($username, "text") . " WHERE code = " . $mdb2->quote($authcode,
"text"));
- //$removesql = "DELETE FROM Invitation_Request WHERE email=" .
$mdb2->quote($email, 'text');
- //$mdb2->exec($removesql);
+ //$adodb->Execute("UPDATE Invitations SET code = NULL, invitee
= " . $adodb->qstr($username) . " WHERE code = " . $adodb->qstr($authcode));
+ //$removesql = "DELETE FROM Invitation_Request WHERE email=" .
$adodb->qstr($email);
+ //$adodb->Execute($removesql);
$smarty->assign('registered', true);
} else {
$smarty->assign('username', $username);
Modified: branches/stable/nixtape/request.php
===================================================================
--- branches/stable/nixtape/request.php 2009-05-16 00:43:25 UTC (rev 1646)
+++ branches/stable/nixtape/request.php 2009-05-16 00:50:51 UTC (rev 1647)
@@ -36,8 +36,8 @@
unset($validator);
if(empty($errors)) {
- $mdb2->query('INSERT INTO Invitation_Request (email, time, status)
VALUES('
- . $mdb2->quote($email, 'text') . ', '
+ $adodb->Execute('INSERT INTO Invitation_Request (email, time, status)
VALUES('
+ . $adodb->qstr($email) . ', '
. time() . ', 0)');
$smarty->assign('reg', true);
} else {
Modified: branches/stable/nixtape/reset.php
===================================================================
--- branches/stable/nixtape/reset.php 2009-05-16 00:43:25 UTC (rev 1646)
+++ branches/stable/nixtape/reset.php 2009-05-16 00:50:51 UTC (rev 1647)
@@ -25,81 +25,89 @@
require_once('templating.php');
require_once('utils/EmailAddressValidator.php');
-global $mdb2;
+global $adodb;
$errors = '';
function sendEmail($text, $email) {
- $headers = 'From: Libre.fm Reset <address@hidden>';
- $subject = 'Libre.fm Password Reset';
- mail($email, $subject, $text, $headers);
+ $headers = 'From: Libre.fm Reset <address@hidden>';
+ $subject = 'Libre.fm Password Reset';
+ mail($email, $subject, $text, $headers);
}
if (isset($_GET['code'])) {
- $res = $mdb2->query('SELECT * FROM Recovery_Request WHERE code=' .
$mdb2->quote($_GET['code'], 'text'));
- if ($res->numRows() == 0) {
- $errors .= "Invalid reset token.\n";
- $smarty->assign('errors', $errors);
- $smarty->display('error.tpl');
- die();
- }
+ $adodb->SetFetchMode(ADODB_FETCH_ASSOC);
+ $row = $adodb->GetRow('SELECT * FROM Recovery_Request WHERE code=' .
$adodb->qstr($_GET['code']));
+ if (!$row) {
+ $errors .= "Invalid reset token.\n";
+ $smarty->assign('errors', $errors);
+ $smarty->display('error.tpl');
+ die();
+ }
- $row = $res->fetchRow(MDB2_FETCHMODE_ASSOC);
+ $password = '';
+ $chars = 'abcdefghijklmnopqrstuvwxyz0123456789';
- $password = '';
- $chars = 'abcdefghijklmnopqrstuvwxyz0123456789';
+ for ($i = 0; $i < 8; $i++) {
+ $password .= substr($chars, mt_rand(0, strlen($chars)-1), 1);
+ }
- for ($i = 0; $i < 8; $i++) {
- $password .= substr($chars, mt_rand(0, strlen($chars)-1), 1);
- }
+ $email = $row['email'];
- $email = $row['email'];
+ $sql = 'UPDATE Users SET password=' . $adodb->qstr(md5($password)) . '
WHERE email='
+ . $adodb->qstr($email);
- $sql = 'UPDATE Users SET password=' . $mdb2->quote(md5($password), 'text')
. ' WHERE email='
- . $mdb2->quote($email, 'text');
+ $adodb->Execute($sql);
- $mdb2->exec($sql);
-
- $content = "Hi!\n\nYour password has been set to " . $password . "\n\n -
The Libre.fm Team";
- sendEmail($content, $email);
- $sql = 'DELETE FROM Recovery_Request WHERE code=' . $mdb2->quote($email,
'text');
- $mdb2->exec($sql);
- $smarty->assign('changed', true);
+ $content = "Hi!\n\nYour password has been set to " . $password . "\n\n
- The Libre.fm Team";
+ sendEmail($content, $email);
+ $sql = 'DELETE FROM Recovery_Request WHERE code=' .
$adodb->qstr($email);
+ $adodb->Execute($sql);
+ $smarty->assign('changed', true);
}
else if (isset($_POST['user'])) {
- $username = $_POST['user'];
+ $username = $_POST['user'];
- $res = $mdb2->query('SELECT * FROM Users WHERE username="'
- . $mdb2->quote($username, 'text'));
+ $adodb->SetFetchMode(ADODB_FETCH_ASSOC);
+ $err = 0;
- if (PEAR::isError($res) || $res->numRows() == 0) {
- $errors .= "User not found.\n";
- $smarty->assign('errors', $errors);
- $smarty->display('error.tpl');
- die();
- }
- $row = $res->fetchRow(MDB2_FETCHMODE_ASSOC);
- $code = md5($username . $row['email'] . time());
- $sql = 'INSERT INTO Recovery_Request (username, email, code, expires)
VALUES('
- . $mdb2->quote($username, 'text') . ', '
- . $mdb2->quote($row['email'], 'text') . ', '
- . $mdb2->quote($code, 'text') . ', '
- . $mdb2->quote(time() + 86400, 'text') . ')';
+ try {
+ $row = $adodb->GetRow('SELECT * FROM Users WHERE username="'
+ . $adodb->qstr($username));
+ }
+ catch (exception $e) {
+ $err = 1;
+ }
- $res = $mdb2->exec($sql);
- if (PEAR::isError($res)) {
- $errors .= 'Error on: ' . $sql;
- $smarty->assign('errors', $errors);
- $smarty->display('error.tpl');
- die();
- }
+ if ($err || !$row) {
+ $errors .= "User not found.\n";
+ $smarty->assign('errors', $errors);
+ $smarty->display('error.tpl');
+ die();
+ }
+ $code = md5($username . $row['email'] . time());
+ $sql = 'INSERT INTO Recovery_Request (username, email, code, expires)
VALUES('
+ . $adodb->qstr($username) . ', '
+ . $adodb->qstr($row['email']) . ', '
+ . $adodb->qstr($code) . ', '
+ . $adodb->qstr(time() + 86400) . ')';
- $url = $base_url . '/reset.php?code=' . $code;
- $content = "Hi!\n\nSomeone from the IP-address " . $_SERVER['REMOTE_ADDR']
. " entered your username "
- . "in the password reset form at libre.fm. To change you password,
please visit\n\n"
- . $url . "\n\n- The Libre.fm Team";
- sendEmail($content, $row['email']);
- $smarty->assign('sent', true);
+ try {
+ $res = $adodb->Execute($sql);
+ }
+ catch (exception $e) {
+ $errors .= 'Error on: ' . $sql;
+ $smarty->assign('errors', $errors);
+ $smarty->display('error.tpl');
+ die();
+ }
+
+ $url = $base_url . '/reset.php?code=' . $code;
+ $content = "Hi!\n\nSomeone from the IP-address " .
$_SERVER['REMOTE_ADDR'] . " entered your username "
+ . "in the password reset form at libre.fm. To change
you password, please visit\n\n"
+ . $url . "\n\n- The Libre.fm Team";
+ sendEmail($content, $row['email']);
+ $smarty->assign('sent', true);
}
$smarty->display('reset.tpl');
Modified: branches/stable/nixtape/themes/librefm/alpha.css
===================================================================
--- branches/stable/nixtape/themes/librefm/alpha.css 2009-05-16 00:43:25 UTC
(rev 1646)
+++ branches/stable/nixtape/themes/librefm/alpha.css 2009-05-16 00:50:51 UTC
(rev 1647)
@@ -12,6 +12,87 @@
*/
+html{background: #ececec;}
+
+#hd {margin-top: -9px;}
+
+#bd {background-color: white; padding: 15px;}
+
+#hd {margin-bottom: 8px; height: 70px; position: relative;}
+
+#hd ul{ margin: 0; padding: 0; line-height: 70px; position: absolute; top: 0;
right: 20px;}
+
+#hd li a:link, #hd li a:visited { color: black; text-decoration: none;
padding: 7px; }
+
+#hd li a:hover{background-color: maroon; color: yellow;}
+
+#login a:link, #login a:visited { color: yellow !important; text-decoration:
underline !important; }
+
+#hd li{ display: inline; font-size: 21px; text-transform: lowercase;
font-weight: bold; margin-right: 20px;}
+
+#banner { height: 345px; position: relative;}
+
+#banner img{ position: absolute; top: -12px; left: 0; }
+
+#sidebar {background-color: #eee;}
+
+#hd, #sidebar, #bd, #artists, #hd li {-moz-border-radius: 8px;}
+
+#artists{background-color: lightblue; margin: 15px 0 15px 0; padding: 5px;}
+
+#links, #moarlinks, #ft{font-size: 85%;}
+
+#ft{margin-top: 15px; height: 102px;position: relative;}
+
+#ft p{ text-align: right;}
+
+#ft li{ display: inline; margin-right: 0.5em; }
+
+#ft li.copy { margin-right: 1em; }
+
+#hd h1{ background: url(/themes/librefm/images/header.png) no-repeat;
+ border: 0;
+ padding: 0;
+ }
+
+#hd h1 a {
+ display: block;
+ text-decoration: none;
+ overflow: hidden;
+ border: 0;
+ margin: 0;
+ padding: 0;
+ padding-top: 70px;
+ height: 0px !important;
+ height /**/: 70px;
+ width: 950px;
+ cursor: pointer;
+ }
+
+li{ line-height: 1.6em; }
+
+.tagcloud { margin: 0; padding: 0; text-align: center; }
+
+
+.tagcloud li{ display: inline; margin-right: 0.2em; line-height: 1.2em; }
+
+.tagcloud .t1 { font-size: 200%; }
+.tagcloud .t2 { font-size: 180%; }
+.tagcloud .t3 { font-size: 160%; }
+.tagcloud .t4 { font-size: 140%; }
+.tagcloud .t5 { font-size: 120%; }
+.tagcloud .t6 { font-size: 100%; }
+
+a:hover { color: red; }
+a:visited{ color: #07c;}
+
+.highlight{ background-color: #ffb;}
+
+th{background-color: black; color: white;}
+tr.odd{background-color: #edf3fe;}
+
+#try-the-alpha{font-size: 14px; padding: 4px; background-color: #fdca01;
text-align: center;}
+
a:link, a:visited {
text-decoration: none;
outline: none;
@@ -41,24 +122,24 @@
div#invite,
div#register,
-div#login {
+div#login-form {
margin: 1em auto 0 auto;
}
div#invite form,
div#register form,
-div#login form {
+div#login-form form {
width: 30em;
margin: 0 auto;
}
div#invite form fieldset,
div#register form fieldset,
-div#login form fieldset {
+div#login-form form fieldset {
border: none;
padding: 0;
}
div#invite form fieldset label,
div#register form fieldset label,
-div#login form fieldset label {
+div#login-form form fieldset label {
float:left;
font-weight:bold;
text-align:right;
@@ -66,7 +147,7 @@
}
div#invite form fieldset label span,
div#register form fieldset label span,
-div#login form fieldset label span {
+div#login-form form fieldset label span {
color:#666666;
display:block;
font-weight:normal;
@@ -75,7 +156,7 @@
}
div#invite form fieldset input,
div#register form fieldset input,
-div#login form fieldset input {
+div#login-form form fieldset input {
float:left;
padding:.2em .1em;
width:200px;
@@ -83,7 +164,7 @@
}
div#invite form fieldset input[type=submit],
div#register form fieldset input[type=submit],
-div#login form fieldset input[type=submit] {
+div#login-form form fieldset input[type=submit] {
margin: 0;
width: 100%;
}
@@ -202,12 +283,13 @@
}
.user, .group {
- background: #fff url(images/bg.png) repeat-x ;
padding: .5em;
position: relative;
margin-bottom: .5em;
}
+.user{ background: #fff url(images/bg.png) repeat-x ;}
+
.user dl, .group dl
{
margin: 0 0 0 76px;
@@ -253,6 +335,8 @@
padding: 0;
margin: 0 0 1em;
list-style-type: none;
+ min-height: 64px;
+ clear: both;
}
ul#albums * {
@@ -307,5 +391,73 @@
.disclaimer {padding: 8px; background-color: yellow; text-align: center;
margin-top: 1em;}
-#errors {background-color: red; padding: 1em; color: white;}
+#errors {border: 2px solid red; margin: 1em; padding: 1em; color: red
!important;}
+/* CSS for player */
+
+#player > #interface {
+ background: #980101 url("images/player/background.jpg") repeat-x;
+ width: 280px;
+ border: 1px solid black;
+ -moz-border-radius: 8px;
+ -webkit-border-radius: 8px;
+ padding: 10px;
+ padding-bottom: 0px;
+ color: white;
+ display: none;
+}
+
+#player > #interface > #buttons a {
+ opacity: 0.5;
+}
+
+#player > #interface > #progress {
+ text-align: right;
+}
+
+#player > #interface > #trackinfo {
+ border: 1px solid black;
+ -moz-border-radius: 8px;
+ -webkit-border-radius: 8px;
+ overflow: hidden;
+ padding: 3px 5px;
+ margin-bottom: 5px;
+ background: white;
+ color: black;
+}
+
+#player > #interface > #trackinfo > #playlist {
+ display: none;
+}
+
+#showplaylist {
+ margin-top: 2px;
+ float: right;
+}
+
+#hideplaylist {
+ margin-top: 2px;
+ display: none;
+ float: right;
+}
+
+#scrobbled {
+ display: none;
+ float: right;
+}
+
+.ui-widget { font-family: Verdana,Arial,sans-serif/*{ffDefault}*/; font-size:
1.1em/*{fsDefault}*/; }
+.ui-widget input, .ui-widget select, .ui-widget textarea, .ui-widget button {
font-family: Verdana,Arial,sans-serif/*{ffDefault}*/; font-size: 1em; }
+.ui-widget-content { border: 1px solid #aaaaaa/*{borderColorContent}*/;
background: #ffffff/*{bgColorContent}*/ color: #222222/*{fcContent}*/; }
+.ui-widget-content a { color: #222222/*{fcContent}*/; }
+.ui-corner-all { -moz-border-radius: 4px/*{cornerRadius}*/;
-webkit-border-radius: 4px/*{cornerRadius}*/; }
+
+.ui-progressbar { height: 11px; text-align: left; }
+.ui-progressbar .ui-progressbar-value {height:100%; }/* Resizable */
+.ui-progressbar-value { background-image: url(images/player/pbar-ani.gif); }
+
+/* end of player CSS */
+
+#register-prompt {background-color: #eee; padding: 12px; border: 5px solid
#aaa;}
+
+.photo{padding: 1px; border 1px solid #ccc; width: 48px; height: 48px; float:
left;}
\ No newline at end of file
Deleted: branches/stable/nixtape/themes/librefm/librefm.css
===================================================================
--- branches/stable/nixtape/themes/librefm/librefm.css 2009-05-16 00:43:25 UTC
(rev 1646)
+++ branches/stable/nixtape/themes/librefm/librefm.css 2009-05-16 00:50:51 UTC
(rev 1647)
@@ -1,80 +0,0 @@
-html{background-color: #ececec;}
-
-#hd {background-color: #980101; margin-top: -9px;}
-
-#bd {background-color: white; padding: 15px;}
-
-#hd {margin-bottom: 8px; height: 70px; position: relative;}
-
-#hd ul{ margin: 0; padding: 0; line-height: 70px; position: absolute; top: 0;
right: 20px;}
-
-#hd li a:link, #hd li a:visited { color: black; text-decoration: none;
padding: 7px; }
-
-#hd li a:hover{background-color: maroon; color: yellow;}
-
-#login a:link, #login a:visited { color: yellow !important; text-decoration:
underline !important; }
-
-#hd li{ display: inline; font-size: 21px; text-transform: lowercase;
font-weight: bold; margin-right: 20px;}
-
-#banner { height: 345px; position: relative;}
-
-#banner img{ position: absolute; top: -12px; left: 0; }
-
-#sidebar {background-color: #eee;}
-
-#hd, #sidebar, #bd, #artists, #hd li {-moz-border-radius: 8px;}
-
-#artists{background-color: lightblue; margin: 15px 0 15px 0; padding: 5px;}
-
-#links, #moarlinks, #ft{font-size: 85%;}
-
-#ft{margin-top: 15px; height: 102px;position: relative;}
-
-#ft p{ text-align: right;}
-
-#ft li{ display: inline; margin-right: 0.5em; }
-
-#ft li.copy { margin-right: 1em; }
-
-#hd h1{ background: #ececec url(/themes/librefm/images/header.png) no-repeat;
- border: 0;
- padding: 0;
- }
-
-#hd h1 a {
- display: block;
- text-decoration: none;
- overflow: hidden;
- border: 0;
- margin: 0;
- padding: 0;
- padding-top: 70px;
- height: 0px !important;
- height /**/: 70px;
- width: 950px;
- cursor: pointer;
- }
-
-li{ line-height: 1.6em; }
-
-.tagcloud { margin: 0; padding: 0; text-align: center; }
-
-
-.tagcloud li{ display: inline; margin-right: 0.2em; line-height: 1.2em; }
-
-.tagcloud .t1 { font-size: 200%; }
-.tagcloud .t2 { font-size: 180%; }
-.tagcloud .t3 { font-size: 160%; }
-.tagcloud .t4 { font-size: 140%; }
-.tagcloud .t5 { font-size: 120%; }
-.tagcloud .t6 { font-size: 100%; }
-
-a:hover { color: red; }
-a:visited{ color: #07c;}
-
-.highlight{ background-color: #ffb;}
-
-th{background-color: black; color: white;}
-tr.odd{background-color: #edf3fe;}
-
-#try-the-alpha{font-size: 14px; padding: 4px; background-color: #fdca01;
text-align: center;}
\ No newline at end of file
Modified: branches/stable/nixtape/themes/librefm/locale/de.po
===================================================================
--- branches/stable/nixtape/themes/librefm/locale/de.po 2009-05-16 00:43:25 UTC
(rev 1646)
+++ branches/stable/nixtape/themes/librefm/locale/de.po 2009-05-16 00:50:51 UTC
(rev 1647)
@@ -7,12 +7,12 @@
msgstr ""
"Project-Id-Version: 0.1\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2009-05-09 20:23+0100\n"
+"POT-Creation-Date: 2009-05-15 09:32+0100\n"
"PO-Revision-Date: 2009-05-09 20:49+0100\n"
"Last-Translator: Michael Sheldon <address@hidden>\n"
"Language-Team: German <address@hidden>\n"
"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=ASCII\n"
+"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
@@ -57,11 +57,11 @@
"The form below is still very experimental. Using this may wreck your group!"
msgstr ""
-#: translatable_strings.c:32 translatable_strings.c:287
+#: translatable_strings.c:32 translatable_strings.c:284
msgid "Full name:"
msgstr "Vollstndiger Name:"
-#: translatable_strings.c:35 translatable_strings.c:302
+#: translatable_strings.c:35 translatable_strings.c:299
msgid "Homepage URL:"
msgstr ""
@@ -69,9 +69,9 @@
msgid "Logo URL:"
msgstr ""
-#: translatable_strings.c:41 translatable_strings.c:299
-#: translatable_strings.c:308 translatable_strings.c:314
-#: translatable_strings.c:320 translatable_strings.c:326
+#: translatable_strings.c:41 translatable_strings.c:296
+#: translatable_strings.c:305 translatable_strings.c:311
+#: translatable_strings.c:317 translatable_strings.c:323
msgid "What's this?"
msgstr ""
@@ -127,258 +127,236 @@
msgid "Powered by Nixtape"
msgstr ""
-#: translatable_strings.c:77
+#: translatable_strings.c:77 translatable_strings.c:80
msgid "All Groups"
msgstr "Alle Gruppen"
-#: translatable_strings.c:80
+#: translatable_strings.c:83
msgid "%1 members"
msgstr "%1 Mitglieder"
-#: translatable_strings.c:83
+#: translatable_strings.c:86
msgid "Group:"
msgstr "Gruppe:"
-#: translatable_strings.c:86
+#: translatable_strings.c:89
msgid "edit"
msgstr "bearbeiten"
-#: translatable_strings.c:89
+#: translatable_strings.c:92
msgid "leave"
msgstr ""
-#: translatable_strings.c:92
+#: translatable_strings.c:95
msgid "join"
msgstr "mitmachen"
-#: translatable_strings.c:95
+#: translatable_strings.c:98
msgid "Top artists"
msgstr ""
-#: translatable_strings.c:98
+#: translatable_strings.c:101
msgid "discover new music"
msgstr ""
-#: translatable_strings.c:101
+#: translatable_strings.c:104
msgid ""
"Your invitation has been sent, pretty soon your friend should be thanking "
"you profusely."
msgstr ""
-#: translatable_strings.c:104
+#: translatable_strings.c:107
msgid ""
"Do you have an awesome friend you'd like to share <a href='http://libre.fm' "
"rel='bookmark' class='vcard fn org url'>libre.fm</a> with? Just enter his/"
"her email address and we'll sort them out with an invitation code."
msgstr ""
-#: translatable_strings.c:107
+#: translatable_strings.c:110
msgid "Invitee's E-mail:"
msgstr ""
-#: translatable_strings.c:110 translatable_strings.c:194
-#: translatable_strings.c:263
+#: translatable_strings.c:113 translatable_strings.c:245
msgid "must be valid!"
msgstr ""
-#: translatable_strings.c:113
+#: translatable_strings.c:116
msgid "Let them in!"
msgstr ""
-#: translatable_strings.c:116 translatable_strings.c:149
+#: translatable_strings.c:119 translatable_strings.c:155
msgid "Change Language"
msgstr "Sprache ndern"
-#: translatable_strings.c:119
+#: translatable_strings.c:122
#, c-format
msgid ""
"To listen to 100% free (libre) music simply enter the type of music you'd "
"like to hear or select one of the common tags below:"
msgstr ""
-#: translatable_strings.c:122
+#: translatable_strings.c:125
msgid "Custom tag:"
msgstr ""
-#: translatable_strings.c:125
+#: translatable_strings.c:128
msgid "Country:"
msgstr "Heimat:"
-#: translatable_strings.c:128
+#: translatable_strings.c:131
msgid "Users in"
msgstr "Benutzer von"
-#: translatable_strings.c:131 translatable_strings.c:191
+#: translatable_strings.c:134
+#, fuzzy
+msgid "Reset your password"
+msgstr "Ihr Kennwort:"
+
+#: translatable_strings.c:137 translatable_strings.c:260
msgid "Username"
msgstr "Benutzernamen"
-#: translatable_strings.c:134
+#: translatable_strings.c:140
msgid "Password"
msgstr ""
-#: translatable_strings.c:137
+#: translatable_strings.c:143
msgid "Remember me"
msgstr "Anmeldeinformationen speichern"
-#: translatable_strings.c:140
+#: translatable_strings.c:146
msgid "Let me in!"
msgstr ""
-#: translatable_strings.c:143
+#: translatable_strings.c:149
msgid "English (US)"
msgstr ""
-#: translatable_strings.c:146
+#: translatable_strings.c:152
msgid "German (Germany)"
msgstr ""
-#: translatable_strings.c:152
-msgid "Register"
-msgstr "Register"
-
-#: translatable_strings.c:155
-msgid "Admin"
-msgstr "Administration"
-
#: translatable_strings.c:158
-msgid "Logout"
-msgstr "Abmeldung"
-
-#: translatable_strings.c:161
msgid "Listen"
msgstr "Mithoeren"
-#: translatable_strings.c:164
-msgid "Login"
-msgstr "Anmelden"
-
-#: translatable_strings.c:167
+#: translatable_strings.c:161
msgid "Bugs"
msgstr "Fehler"
-#: translatable_strings.c:170
+#: translatable_strings.c:164
msgid "Help"
msgstr "Hilfe"
+#: translatable_strings.c:167
+msgid "Admin"
+msgstr "Administration"
+
+#: translatable_strings.c:170
+msgid "Logout"
+msgstr "Abmeldung"
+
#: translatable_strings.c:173
+msgid "Login"
+msgstr "Anmelden"
+
+#: translatable_strings.c:176
msgid ""
"Sorry, you need a browser capable of making use of the HTML 5 <audio> "
"tag to enjoy the streaming service via the JavaScript player."
msgstr ""
-#: translatable_strings.c:176
+#: translatable_strings.c:179
msgid "Playlist"
msgstr "Wiedergabeliste"
-#: translatable_strings.c:179
-msgid "Password recovery"
-msgstr ""
-
#: translatable_strings.c:182
-msgid "Your new password has been emailed to you."
+msgid "Your account has been activated! You may now login!"
msgstr ""
#: translatable_strings.c:185
msgid ""
-"An email with further information has been sent to the email address "
-"associated with your profile."
-msgstr ""
-
-#: translatable_strings.c:188
-msgid "Password Recovery"
-msgstr ""
-
-#: translatable_strings.c:197
-msgid "Recover my password!"
-msgstr ""
-
-#: translatable_strings.c:200
-msgid "Your account has been activated! You may now login!"
-msgstr ""
-
-#: translatable_strings.c:203
-msgid ""
"You're now registered with libre.fm! An email has been sent to the email "
"address you provided. Please follow the link in the email to activate your "
"account!"
msgstr ""
-#: translatable_strings.c:206
+#: translatable_strings.c:188
msgid "Find out how to start sending us your listening habits"
msgstr ""
-#: translatable_strings.c:209
+#: translatable_strings.c:191
msgid "Join our mailing list"
msgstr ""
-#: translatable_strings.c:212
+#: translatable_strings.c:194
msgid "Read our blog"
msgstr ""
-#: translatable_strings.c:215
+#: translatable_strings.c:197
msgid "and"
msgstr "und"
-#: translatable_strings.c:218
+#: translatable_strings.c:200
msgid "subscribe to Matt (our founder) on identi.ca"
msgstr ""
-#: translatable_strings.c:221
+#: translatable_strings.c:203
msgid "Your username:"
msgstr "Ihrem Benutzernamen:"
-#: translatable_strings.c:224
+#: translatable_strings.c:206
msgid "(no more than 16 chars.)"
msgstr ""
-#: translatable_strings.c:227
+#: translatable_strings.c:209
msgid "Your password:"
msgstr "Ihr Kennwort:"
-#: translatable_strings.c:230
+#: translatable_strings.c:212
msgid "(make it hard to guess)"
msgstr ""
-#: translatable_strings.c:233
+#: translatable_strings.c:215
msgid "Your password again"
msgstr "Ihr Kennwort noch einmal:"
-#: translatable_strings.c:236
+#: translatable_strings.c:218
msgid "(you should repeat it.)"
msgstr ""
-#: translatable_strings.c:239
+#: translatable_strings.c:221
msgid "Your e-mail:"
msgstr "Ihre e-mail:"
-#: translatable_strings.c:242
+#: translatable_strings.c:224
msgid "(must be valid!)"
msgstr ""
-#: translatable_strings.c:245
+#: translatable_strings.c:227
msgid ""
"Please note: we plan make your <a href=\"http://turtle.libre.fm/data/"
"\">listening data available</a>, under the <a href=\"http://wiki."
"openstreetmap.org/wiki/Open_Database_License\">the Open Database License</a>."
msgstr ""
-#: translatable_strings.c:248
+#: translatable_strings.c:230
msgid "Sign up"
msgstr ""
-#: translatable_strings.c:251
+#: translatable_strings.c:233
msgid ""
"We won't sell, swap or give away your email address. You can optionally "
"include personal data on your profile, which is displayed publicly."
msgstr ""
-#: translatable_strings.c:254
+#: translatable_strings.c:236
msgid ""
"Your request for an invitation has been registered. Thank you for your "
"interest in libre.fm!"
msgstr ""
-#: translatable_strings.c:257
+#: translatable_strings.c:239
msgid ""
"<a href='http://libre.fm' rel='bookmark' class='vcard fn org url'>libre.fm</"
"a> is now in alpha. We're slowly adding new users, so if you're interested, "
@@ -386,84 +364,102 @@
"time."
msgstr ""
-#: translatable_strings.c:260
+#: translatable_strings.c:242
msgid "Email"
msgstr "Email"
-#: translatable_strings.c:266
+#: translatable_strings.c:248
msgid "Request invite!"
msgstr ""
-#: translatable_strings.c:269
+#: translatable_strings.c:251
+msgid "Reset my password"
+msgstr ""
+
+#: translatable_strings.c:254
+msgid "Your new password has been emailed to you."
+msgstr ""
+
+#: translatable_strings.c:257
+msgid ""
+"An email with further information has been sent to the email address "
+"associated with your profile."
+msgstr ""
+
+#: translatable_strings.c:263
+msgid "Reset my password!"
+msgstr ""
+
+#: translatable_strings.c:266
msgid "Artist:"
msgstr "Artist:"
-#: translatable_strings.c:272
+#: translatable_strings.c:269
msgid "Album:"
msgstr "Album:"
-#: translatable_strings.c:275
+#: translatable_strings.c:272
msgid "Playcount:"
msgstr ""
-#: translatable_strings.c:278
+#: translatable_strings.c:275
msgid "Listeners:"
msgstr "Zuhrerschaft:"
-#: translatable_strings.c:281
+#: translatable_strings.c:278
msgid "Albums containing this track:"
msgstr ""
-#: translatable_strings.c:284
+#: translatable_strings.c:281
msgid ""
"The form below is still very experimental. Using this may wreck your account!"
msgstr ""
-#: translatable_strings.c:290
+#: translatable_strings.c:287
msgid "Location:"
msgstr "Ort:"
-#: translatable_strings.c:293
+#: translatable_strings.c:290
msgid "Geoname:"
msgstr ""
-#: translatable_strings.c:296
+#: translatable_strings.c:293
msgid "Find ..."
msgstr "Suche ..."
-#: translatable_strings.c:305
+#: translatable_strings.c:302
msgid "Avatar URL:"
msgstr ""
-#: translatable_strings.c:311
+#: translatable_strings.c:308
msgid "Mini Biography:"
msgstr "Klien Biographie:"
-#: translatable_strings.c:317
+#: translatable_strings.c:314
msgid "Laconica/identi.ca Profile:"
msgstr ""
-#: translatable_strings.c:323
+#: translatable_strings.c:320
msgid "RSS Feed:"
msgstr ""
-#: translatable_strings.c:329
+#: translatable_strings.c:326
msgid "Password:"
msgstr "Kennwort:"
-#: translatable_strings.c:332
+#: translatable_strings.c:329
msgid "Leave this blank if you don't want to change your password."
msgstr ""
-#: translatable_strings.c:335
+#: translatable_strings.c:332
msgid "Confirm Password:"
msgstr ""
-#: translatable_strings.c:338
+#: translatable_strings.c:335
msgid "Location check"
msgstr ""
-#: translatable_strings.c:341
+#: translatable_strings.c:338
msgid ""
"This feature looks up your location on <a href=\"http://www.geonames.org"
"\">geonames</a>. You don't need to do it, but it will help us find your "
@@ -471,11 +467,11 @@
"features in the future."
msgstr ""
-#: translatable_strings.c:344
+#: translatable_strings.c:341
msgid "Avatar URL"
msgstr ""
-#: translatable_strings.c:347
+#: translatable_strings.c:344
msgid ""
"The web address for a picture to represent you on libre.fm. It should not be "
"more than 80x80 pixels. (64x64 is best.) If you leave this empty, libre.fm "
@@ -483,69 +479,72 @@
"you."
msgstr ""
-#: translatable_strings.c:350
+#: translatable_strings.c:347
msgid ""
"A URI that represents you in RDF. See <a href=\"http://esw.w3.org/topic/WebID"
"\">WebID</a> for details. If you don't know what this is, it's best to leave "
"it blank."
msgstr ""
-#: translatable_strings.c:353
+#: translatable_strings.c:350
msgid "Now Playing:"
msgstr "Jetzt Hoerend"
-#: translatable_strings.c:356
+#: translatable_strings.c:353
msgid "Latest %1 Plays:"
msgstr ""
-#: translatable_strings.c:359
+#: translatable_strings.c:356
msgid "%1's statistics"
msgstr "%1's statistiken "
-#: translatable_strings.c:362
+#: translatable_strings.c:359
msgid "%1's most played artists"
msgstr ""
-#: translatable_strings.c:365
+#: translatable_strings.c:362
msgid "%1's top tracks"
msgstr ""
-#: translatable_strings.c:368
+#: translatable_strings.c:365
msgid "%1's scrobbles by day"
msgstr ""
-#: translatable_strings.c:371
+#: translatable_strings.c:368
msgid "Most played artists"
msgstr ""
-#: translatable_strings.c:374
+#: translatable_strings.c:371
msgid "Top tracks"
msgstr ""
-#: translatable_strings.c:377
+#: translatable_strings.c:374
msgid "Scrobbles by day"
msgstr ""
-#: translatable_strings.c:380
+#: translatable_strings.c:377
msgid "New on Libre.fm..."
msgstr "Neu mit Libre.fm"
-#: translatable_strings.c:383
+#: translatable_strings.c:380
msgid "Upcoming events..."
msgstr ""
-#: translatable_strings.c:386
+#: translatable_strings.c:383
msgid "Libre music downloads..."
msgstr "Frei Musik Herunterladen..."
-#: translatable_strings.c:389
+#: translatable_strings.c:386
msgid "More Libre music downloads..."
msgstr "Mehr Frei Musik Herunterladen..."
-#: translatable_strings.c:392
+#: translatable_strings.c:389
msgid "License"
msgstr ""
-#: translatable_strings.c:395
+#: translatable_strings.c:392
msgid "Featured group"
msgstr ""
+
+#~ msgid "Register"
+#~ msgstr "Register"
Modified: branches/stable/nixtape/themes/librefm/locale/nixtape.pot
===================================================================
--- branches/stable/nixtape/themes/librefm/locale/nixtape.pot 2009-05-16
00:43:25 UTC (rev 1646)
+++ branches/stable/nixtape/themes/librefm/locale/nixtape.pot 2009-05-16
00:50:51 UTC (rev 1647)
@@ -8,7 +8,7 @@
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2009-05-09 22:54+0100\n"
+"POT-Creation-Date: 2009-05-15 09:35+0100\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <address@hidden>\n"
"Language-Team: LANGUAGE <address@hidden>\n"
@@ -57,11 +57,11 @@
"The form below is still very experimental. Using this may wreck your group!"
msgstr ""
-#: translatable_strings.c:32 translatable_strings.c:287
+#: translatable_strings.c:32 translatable_strings.c:284
msgid "Full name:"
msgstr ""
-#: translatable_strings.c:35 translatable_strings.c:302
+#: translatable_strings.c:35 translatable_strings.c:299
msgid "Homepage URL:"
msgstr ""
@@ -69,9 +69,9 @@
msgid "Logo URL:"
msgstr ""
-#: translatable_strings.c:41 translatable_strings.c:299
-#: translatable_strings.c:308 translatable_strings.c:314
-#: translatable_strings.c:320 translatable_strings.c:326
+#: translatable_strings.c:41 translatable_strings.c:296
+#: translatable_strings.c:305 translatable_strings.c:311
+#: translatable_strings.c:317 translatable_strings.c:323
msgid "What's this?"
msgstr ""
@@ -127,258 +127,235 @@
msgid "Powered by Nixtape"
msgstr ""
-#: translatable_strings.c:77
+#: translatable_strings.c:77 translatable_strings.c:80
msgid "All Groups"
msgstr ""
-#: translatable_strings.c:80
+#: translatable_strings.c:83
msgid "%1 members"
msgstr ""
-#: translatable_strings.c:83
+#: translatable_strings.c:86
msgid "Group:"
msgstr ""
-#: translatable_strings.c:86
+#: translatable_strings.c:89
msgid "edit"
msgstr ""
-#: translatable_strings.c:89
+#: translatable_strings.c:92
msgid "leave"
msgstr ""
-#: translatable_strings.c:92
+#: translatable_strings.c:95
msgid "join"
msgstr ""
-#: translatable_strings.c:95
+#: translatable_strings.c:98
msgid "Top artists"
msgstr ""
-#: translatable_strings.c:98
+#: translatable_strings.c:101
msgid "discover new music"
msgstr ""
-#: translatable_strings.c:101
+#: translatable_strings.c:104
msgid ""
"Your invitation has been sent, pretty soon your friend should be thanking "
"you profusely."
msgstr ""
-#: translatable_strings.c:104
+#: translatable_strings.c:107
msgid ""
"Do you have an awesome friend you'd like to share <a href='http://libre.fm' "
"rel='bookmark' class='vcard fn org url'>libre.fm</a> with? Just enter his/"
"her email address and we'll sort them out with an invitation code."
msgstr ""
-#: translatable_strings.c:107
+#: translatable_strings.c:110
msgid "Invitee's E-mail:"
msgstr ""
-#: translatable_strings.c:110 translatable_strings.c:194
-#: translatable_strings.c:263
+#: translatable_strings.c:113 translatable_strings.c:245
msgid "must be valid!"
msgstr ""
-#: translatable_strings.c:113
+#: translatable_strings.c:116
msgid "Let them in!"
msgstr ""
-#: translatable_strings.c:116 translatable_strings.c:149
+#: translatable_strings.c:119 translatable_strings.c:155
msgid "Change Language"
msgstr ""
-#: translatable_strings.c:119
+#: translatable_strings.c:122
#, c-format
msgid ""
"To listen to 100% free (libre) music simply enter the type of music you'd "
"like to hear or select one of the common tags below:"
msgstr ""
-#: translatable_strings.c:122
+#: translatable_strings.c:125
msgid "Custom tag:"
msgstr ""
-#: translatable_strings.c:125
+#: translatable_strings.c:128
msgid "Country:"
msgstr ""
-#: translatable_strings.c:128
+#: translatable_strings.c:131
msgid "Users in"
msgstr ""
-#: translatable_strings.c:131 translatable_strings.c:191
+#: translatable_strings.c:134
+msgid "Reset your password"
+msgstr ""
+
+#: translatable_strings.c:137 translatable_strings.c:260
msgid "Username"
msgstr ""
-#: translatable_strings.c:134
+#: translatable_strings.c:140
msgid "Password"
msgstr ""
-#: translatable_strings.c:137
+#: translatable_strings.c:143
msgid "Remember me"
msgstr ""
-#: translatable_strings.c:140
+#: translatable_strings.c:146
msgid "Let me in!"
msgstr ""
-#: translatable_strings.c:143
+#: translatable_strings.c:149
msgid "English (US)"
msgstr ""
-#: translatable_strings.c:146
+#: translatable_strings.c:152
msgid "German (Germany)"
msgstr ""
-#: translatable_strings.c:152
-msgid "Register"
-msgstr ""
-
-#: translatable_strings.c:155
-msgid "Admin"
-msgstr ""
-
#: translatable_strings.c:158
-msgid "Logout"
+msgid "Listen"
msgstr ""
#: translatable_strings.c:161
-msgid "Listen"
+msgid "Bugs"
msgstr ""
#: translatable_strings.c:164
-msgid "Login"
+msgid "Help"
msgstr ""
#: translatable_strings.c:167
-msgid "Bugs"
+msgid "Admin"
msgstr ""
#: translatable_strings.c:170
-msgid "Help"
+msgid "Logout"
msgstr ""
#: translatable_strings.c:173
+msgid "Login"
+msgstr ""
+
+#: translatable_strings.c:176
msgid ""
"Sorry, you need a browser capable of making use of the HTML 5 <audio> "
"tag to enjoy the streaming service via the JavaScript player."
msgstr ""
-#: translatable_strings.c:176
+#: translatable_strings.c:179
msgid "Playlist"
msgstr ""
-#: translatable_strings.c:179
-msgid "Password recovery"
-msgstr ""
-
#: translatable_strings.c:182
-msgid "Your new password has been emailed to you."
+msgid "Your account has been activated! You may now login!"
msgstr ""
#: translatable_strings.c:185
msgid ""
-"An email with further information has been sent to the email address "
-"associated with your profile."
-msgstr ""
-
-#: translatable_strings.c:188
-msgid "Password Recovery"
-msgstr ""
-
-#: translatable_strings.c:197
-msgid "Recover my password!"
-msgstr ""
-
-#: translatable_strings.c:200
-msgid "Your account has been activated! You may now login!"
-msgstr ""
-
-#: translatable_strings.c:203
-msgid ""
"You're now registered with libre.fm! An email has been sent to the email "
"address you provided. Please follow the link in the email to activate your "
"account!"
msgstr ""
-#: translatable_strings.c:206
+#: translatable_strings.c:188
msgid "Find out how to start sending us your listening habits"
msgstr ""
-#: translatable_strings.c:209
+#: translatable_strings.c:191
msgid "Join our mailing list"
msgstr ""
-#: translatable_strings.c:212
+#: translatable_strings.c:194
msgid "Read our blog"
msgstr ""
-#: translatable_strings.c:215
+#: translatable_strings.c:197
msgid "and"
msgstr ""
-#: translatable_strings.c:218
+#: translatable_strings.c:200
msgid "subscribe to Matt (our founder) on identi.ca"
msgstr ""
-#: translatable_strings.c:221
+#: translatable_strings.c:203
msgid "Your username:"
msgstr ""
-#: translatable_strings.c:224
+#: translatable_strings.c:206
msgid "(no more than 16 chars.)"
msgstr ""
-#: translatable_strings.c:227
+#: translatable_strings.c:209
msgid "Your password:"
msgstr ""
-#: translatable_strings.c:230
+#: translatable_strings.c:212
msgid "(make it hard to guess)"
msgstr ""
-#: translatable_strings.c:233
+#: translatable_strings.c:215
msgid "Your password again"
msgstr ""
-#: translatable_strings.c:236
+#: translatable_strings.c:218
msgid "(you should repeat it.)"
msgstr ""
-#: translatable_strings.c:239
+#: translatable_strings.c:221
msgid "Your e-mail:"
msgstr ""
-#: translatable_strings.c:242
+#: translatable_strings.c:224
msgid "(must be valid!)"
msgstr ""
-#: translatable_strings.c:245
+#: translatable_strings.c:227
msgid ""
"Please note: we plan make your <a href=\"http://turtle.libre.fm/data/"
"\">listening data available</a>, under the <a href=\"http://wiki."
"openstreetmap.org/wiki/Open_Database_License\">the Open Database License</a>."
msgstr ""
-#: translatable_strings.c:248
+#: translatable_strings.c:230
msgid "Sign up"
msgstr ""
-#: translatable_strings.c:251
+#: translatable_strings.c:233
msgid ""
"We won't sell, swap or give away your email address. You can optionally "
"include personal data on your profile, which is displayed publicly."
msgstr ""
-#: translatable_strings.c:254
+#: translatable_strings.c:236
msgid ""
"Your request for an invitation has been registered. Thank you for your "
"interest in libre.fm!"
msgstr ""
-#: translatable_strings.c:257
+#: translatable_strings.c:239
msgid ""
"<a href='http://libre.fm' rel='bookmark' class='vcard fn org url'>libre.fm</"
"a> is now in alpha. We're slowly adding new users, so if you're interested, "
@@ -386,84 +363,102 @@
"time."
msgstr ""
-#: translatable_strings.c:260
+#: translatable_strings.c:242
msgid "Email"
msgstr ""
-#: translatable_strings.c:266
+#: translatable_strings.c:248
msgid "Request invite!"
msgstr ""
-#: translatable_strings.c:269
+#: translatable_strings.c:251
+msgid "Reset my password"
+msgstr ""
+
+#: translatable_strings.c:254
+msgid "Your new password has been emailed to you."
+msgstr ""
+
+#: translatable_strings.c:257
+msgid ""
+"An email with further information has been sent to the email address "
+"associated with your profile."
+msgstr ""
+
+#: translatable_strings.c:263
+msgid "Reset my password!"
+msgstr ""
+
+#: translatable_strings.c:266
msgid "Artist:"
msgstr ""
-#: translatable_strings.c:272
+#: translatable_strings.c:269
msgid "Album:"
msgstr ""
-#: translatable_strings.c:275
+#: translatable_strings.c:272
msgid "Playcount:"
msgstr ""
-#: translatable_strings.c:278
+#: translatable_strings.c:275
msgid "Listeners:"
msgstr ""
-#: translatable_strings.c:281
+#: translatable_strings.c:278
msgid "Albums containing this track:"
msgstr ""
-#: translatable_strings.c:284
+#: translatable_strings.c:281
msgid ""
"The form below is still very experimental. Using this may wreck your account!"
msgstr ""
-#: translatable_strings.c:290
+#: translatable_strings.c:287
msgid "Location:"
msgstr ""
-#: translatable_strings.c:293
+#: translatable_strings.c:290
msgid "Geoname:"
msgstr ""
-#: translatable_strings.c:296
+#: translatable_strings.c:293
msgid "Find ..."
msgstr ""
-#: translatable_strings.c:305
+#: translatable_strings.c:302
msgid "Avatar URL:"
msgstr ""
-#: translatable_strings.c:311
+#: translatable_strings.c:308
msgid "Mini Biography:"
msgstr ""
-#: translatable_strings.c:317
+#: translatable_strings.c:314
msgid "Laconica/identi.ca Profile:"
msgstr ""
-#: translatable_strings.c:323
+#: translatable_strings.c:320
msgid "RSS Feed:"
msgstr ""
-#: translatable_strings.c:329
+#: translatable_strings.c:326
msgid "Password:"
msgstr ""
-#: translatable_strings.c:332
+#: translatable_strings.c:329
msgid "Leave this blank if you don't want to change your password."
msgstr ""
-#: translatable_strings.c:335
+#: translatable_strings.c:332
msgid "Confirm Password:"
msgstr ""
-#: translatable_strings.c:338
+#: translatable_strings.c:335
msgid "Location check"
msgstr ""
-#: translatable_strings.c:341
+#: translatable_strings.c:338
msgid ""
"This feature looks up your location on <a href=\"http://www.geonames.org"
"\">geonames</a>. You don't need to do it, but it will help us find your "
@@ -471,11 +466,11 @@
"features in the future."
msgstr ""
-#: translatable_strings.c:344
+#: translatable_strings.c:341
msgid "Avatar URL"
msgstr ""
-#: translatable_strings.c:347
+#: translatable_strings.c:344
msgid ""
"The web address for a picture to represent you on libre.fm. It should not be "
"more than 80x80 pixels. (64x64 is best.) If you leave this empty, libre.fm "
@@ -483,69 +478,69 @@
"you."
msgstr ""
-#: translatable_strings.c:350
+#: translatable_strings.c:347
msgid ""
"A URI that represents you in RDF. See <a href=\"http://esw.w3.org/topic/WebID"
"\">WebID</a> for details. If you don't know what this is, it's best to leave "
"it blank."
msgstr ""
-#: translatable_strings.c:353
+#: translatable_strings.c:350
msgid "Now Playing:"
msgstr ""
-#: translatable_strings.c:356
+#: translatable_strings.c:353
msgid "Latest %1 Plays:"
msgstr ""
-#: translatable_strings.c:359
+#: translatable_strings.c:356
msgid "%1's statistics"
msgstr ""
-#: translatable_strings.c:362
+#: translatable_strings.c:359
msgid "%1's most played artists"
msgstr ""
-#: translatable_strings.c:365
+#: translatable_strings.c:362
msgid "%1's top tracks"
msgstr ""
-#: translatable_strings.c:368
+#: translatable_strings.c:365
msgid "%1's scrobbles by day"
msgstr ""
-#: translatable_strings.c:371
+#: translatable_strings.c:368
msgid "Most played artists"
msgstr ""
-#: translatable_strings.c:374
+#: translatable_strings.c:371
msgid "Top tracks"
msgstr ""
-#: translatable_strings.c:377
+#: translatable_strings.c:374
msgid "Scrobbles by day"
msgstr ""
-#: translatable_strings.c:380
+#: translatable_strings.c:377
msgid "New on Libre.fm..."
msgstr ""
-#: translatable_strings.c:383
+#: translatable_strings.c:380
msgid "Upcoming events..."
msgstr ""
-#: translatable_strings.c:386
+#: translatable_strings.c:383
msgid "Libre music downloads..."
msgstr ""
-#: translatable_strings.c:389
+#: translatable_strings.c:386
msgid "More Libre music downloads..."
msgstr ""
-#: translatable_strings.c:392
+#: translatable_strings.c:389
msgid "License"
msgstr ""
-#: translatable_strings.c:395
+#: translatable_strings.c:392
msgid "Featured group"
msgstr ""
Modified: branches/stable/nixtape/themes/librefm/locale/translatable_strings.c
===================================================================
--- branches/stable/nixtape/themes/librefm/locale/translatable_strings.c
2009-05-16 00:43:25 UTC (rev 1646)
+++ branches/stable/nixtape/themes/librefm/locale/translatable_strings.c
2009-05-16 00:50:51 UTC (rev 1647)
@@ -77,6 +77,9 @@
gettext("All Groups");
/* ../templates/group-list.tpl */
+gettext("All Groups");
+
+/* ../templates/group-list.tpl */
gettext("%1 members");
/* ../templates/group.tpl */
@@ -128,6 +131,9 @@
gettext("Users in");
/* ../templates/login.tpl */
+gettext("Reset your password");
+
+/* ../templates/login.tpl */
gettext("Username");
/* ../templates/login.tpl */
@@ -149,53 +155,29 @@
gettext("Change Language");
/* ../templates/menu.tpl */
-gettext("Register");
+gettext("Listen");
/* ../templates/menu.tpl */
-gettext("Admin");
+gettext("Bugs");
/* ../templates/menu.tpl */
-gettext("Logout");
+gettext("Help");
/* ../templates/menu.tpl */
-gettext("Listen");
+gettext("Admin");
/* ../templates/menu.tpl */
-gettext("Login");
+gettext("Logout");
/* ../templates/menu.tpl */
-gettext("Bugs");
+gettext("Login");
-/* ../templates/menu.tpl */
-gettext("Help");
-
/* ../templates/player.tpl */
gettext("Sorry, you need a browser capable of making use of the HTML 5
<audio> tag to enjoy the streaming service via the JavaScript player.");
/* ../templates/player.tpl */
gettext("Playlist");
-/* ../templates/recovery.tpl */
-gettext("Password recovery");
-
-/* ../templates/recovery.tpl */
-gettext("Your new password has been emailed to you.");
-
-/* ../templates/recovery.tpl */
-gettext("An email with further information has been sent to the email address
associated with your profile.");
-
-/* ../templates/recovery.tpl */
-gettext("Password Recovery");
-
-/* ../templates/recovery.tpl */
-gettext("Username");
-
-/* ../templates/recovery.tpl */
-gettext("must be valid!");
-
-/* ../templates/recovery.tpl */
-gettext("Recover my password!");
-
/* ../templates/register.tpl */
gettext("Your account has been activated! You may now login!");
@@ -265,6 +247,21 @@
/* ../templates/request.tpl */
gettext("Request invite!");
+/* ../templates/reset.tpl */
+gettext("Reset my password");
+
+/* ../templates/reset.tpl */
+gettext("Your new password has been emailed to you.");
+
+/* ../templates/reset.tpl */
+gettext("An email with further information has been sent to the email address
associated with your profile.");
+
+/* ../templates/reset.tpl */
+gettext("Username");
+
+/* ../templates/reset.tpl */
+gettext("Reset my password!");
+
/* ../templates/track.tpl */
gettext("Artist:");
Deleted: branches/stable/nixtape/themes/librefm/player.css
===================================================================
--- branches/stable/nixtape/themes/librefm/player.css 2009-05-16 00:43:25 UTC
(rev 1646)
+++ branches/stable/nixtape/themes/librefm/player.css 2009-05-16 00:50:51 UTC
(rev 1647)
@@ -1,74 +0,0 @@
-/*
-
- Libre.fm -- a free network service for sharing your music listening
- habits
-
- Copyright (C) 2009 Free Software Foundation, Inc
-
- Copying and distribution of this file, with or without modification,
- are permitted in any medium without royalty provided the copyright
- notice and this notice are preserved. This file is offered as-is,
- without warranty of any kind.
-
-*/
-
-#player > #interface {
- background: #980101 url("images/player/background.jpg") repeat-x;
- width: 280px;
- border: 1px solid black;
- -moz-border-radius: 8px;
- -webkit-border-radius: 8px;
- padding: 10px;
- padding-bottom: 0px;
- color: white;
- display: none;
-}
-
-#player > #interface > #buttons a {
- opacity: 0.5;
-}
-
-#player > #interface > #progress {
- text-align: right;
-}
-
-#player > #interface > #trackinfo {
- border: 1px solid black;
- -moz-border-radius: 8px;
- -webkit-border-radius: 8px;
- overflow: hidden;
- padding: 3px 5px;
- margin-bottom: 5px;
- background: white;
- color: black;
-}
-
-#player > #interface > #trackinfo > #playlist {
- display: none;
-}
-
-#showplaylist {
- margin-top: 2px;
- float: right;
-}
-
-#hideplaylist {
- margin-top: 2px;
- display: none;
- float: right;
-}
-
-#scrobbled {
- display: none;
- float: right;
-}
-
-.ui-widget { font-family: Verdana,Arial,sans-serif/*{ffDefault}*/; font-size:
1.1em/*{fsDefault}*/; }
-.ui-widget input, .ui-widget select, .ui-widget textarea, .ui-widget button {
font-family: Verdana,Arial,sans-serif/*{ffDefault}*/; font-size: 1em; }
-.ui-widget-content { border: 1px solid #aaaaaa/*{borderColorContent}*/;
background: #ffffff/*{bgColorContent}*/ color: #222222/*{fcContent}*/; }
-.ui-widget-content a { color: #222222/*{fcContent}*/; }
-.ui-corner-all { -moz-border-radius: 4px/*{cornerRadius}*/;
-webkit-border-radius: 4px/*{cornerRadius}*/; }
-
-.ui-progressbar { height: 11px; text-align: left; }
-.ui-progressbar .ui-progressbar-value {height:100%; }/* Resizable */
-.ui-progressbar-value { background-image: url(images/player/pbar-ani.gif); }
Modified: branches/stable/nixtape/themes/librefm/templates/group-list.tpl
===================================================================
--- branches/stable/nixtape/themes/librefm/templates/group-list.tpl
2009-05-16 00:43:25 UTC (rev 1646)
+++ branches/stable/nixtape/themes/librefm/templates/group-list.tpl
2009-05-16 00:50:51 UTC (rev 1647)
@@ -2,29 +2,19 @@
<h2 property="dc:title">{t}All Groups{/t}</h2>
-<div about="#groups" typeof="foaf:Group" property="foaf:name" content="All
Groups">
+<div about="#groups" typeof="foaf:Group" property="foaf:name" content="{t}All
Groups{/t}">
<ul rel="foaf:member" class="userlist">
{foreach from=$groups item=g}
- <li about="{$g->id}" typeof="foaf:Group">
- <div class="group vcard">
- <div class="avatar" rel="foaf:depiction">
- <img
src="{$g->getAvatar()|escape:'html':'UTF-8'}" alt="avatar" class="photo"
width="64" height="64" />
- </div>
- <dl>
- <dt>
- <span class="fn org"
property="foaf:name">{$g->fullname|escape:'html':'UTF-8'}</span>
- (<span class="nickname"
property="foaf:nick">{$g->name|escape:'html':'UTF-8'}</span>)
- </dt>
- <dd>{if $g->homepage}<a class="url"
rel="foaf:page"
href="{$g->homepage|escape:'html':'UTF-8'}">{$g->homepage|escape:'html':'UTF-8'}</a>{/if}</dd>
- <dd class="note"
property="dc:abstract">{$g->bio|escape:'html':'UTF-8'}</dd>
- <dd><a rel="foaf:homepage"
rev="foaf:primaryTopic" property="dc:description"
href="{$g->getURL()|escape:'html':'UTF-8'}">{t members='$g->count}%1
members{/t}</a></dd>
- </dl>
- <hr style="border: 1px solid transparent; clear: both;"
/>
- </div>
+ <li about="{$g->id}" typeof="foaf:Group" class="vcard">
+ <span rel="foaf:depiction"><img
src="{$g->getAvatar()|escape:'html':'UTF-8'}" alt="avatar" class="photo"
width="48" height="48" /></span>
+ <a class="fn org url"
+ rel="foaf:homepage" rev="foaf:primaryTopic"
href="{$g->getURL()|escape:'html':'UTF-8'}"
+
property="foaf:name">{$g->fullname|escape:'html':'UTF-8'}</a>
+ —
+ <span class="note" property="dc:description">{t
members='$g->count}%1 members{/t}</span>
</li>
-
{/foreach}
</ul>
Modified: branches/stable/nixtape/themes/librefm/templates/header.tpl
===================================================================
--- branches/stable/nixtape/themes/librefm/templates/header.tpl 2009-05-16
00:43:25 UTC (rev 1646)
+++ branches/stable/nixtape/themes/librefm/templates/header.tpl 2009-05-16
00:50:51 UTC (rev 1647)
@@ -18,15 +18,12 @@
xml:lang="en">
<head profile="http://www.w3.org/1999/xhtml/vocab http://purl.org/uF/2008/03/
http://purl.org/uF/hAudio/0.9/">
- <title>Libre.fm — discover new music</title>
+ <title>Libre.fm — {t}discover new music{/t}</title>
<meta name="author" content="FooCorp catalogue number FOO200 and
contributors" />
<link rel="stylesheet"
href="{$base_url}/themes/librefm/reset-fonts-grids.css" type="text/css" />
<link rel="stylesheet" href="{$base_url}/themes/librefm/base.css"
type="text/css" />
- <link rel="stylesheet" href="{$base_url}/themes/librefm/librefm.css"
type="text/css" />
<link rel="stylesheet" href="{$base_url}/themes/librefm/alpha.css"
type="text/css" />
- <link rel="stylesheet" href="{$base_url}/themes/librefm/player.css"
type="text/css" />
<link rel="icon" href="{$base_url}/favicon.ico" type="image/x-icon" />
- <link rel="license"
href="http://creativecommons.org/licenses/by-sa/3.0/us/" />
<script type="text/javascript" src="{$base_url}/js/player.js"></script>
<script type="text/javascript"
src="{$base_url}/js/jquery-1.3.2.min.js"></script>
<script type="text/javascript"
src="{$base_url}/js/jquery-ui-1.7.1.custom.min.js"></script>
Modified: branches/stable/nixtape/themes/librefm/templates/language-selector.tpl
===================================================================
--- branches/stable/nixtape/themes/librefm/templates/language-selector.tpl
2009-05-16 00:43:25 UTC (rev 1646)
+++ branches/stable/nixtape/themes/librefm/templates/language-selector.tpl
2009-05-16 00:50:51 UTC (rev 1647)
@@ -3,6 +3,7 @@
<optgroup label="Please select your language">
<option {if $lang_selector_array.en_US}selected="selected"{/if}
value='en_US'>English (US)</option>
<option {if $lang_selector_array.de_DE}selected="selected"{/if}
value='de_DE'>Deutsch (Deutschland)</option>
+ <option {if $lang_selector_array.es_ES}selected="selected"{/if}
value='es_ES'>Español (España)</option>
</optgroup>
</select>
<noscript>
Modified: branches/stable/nixtape/themes/librefm/templates/login.tpl
===================================================================
--- branches/stable/nixtape/themes/librefm/templates/login.tpl 2009-05-16
00:43:25 UTC (rev 1646)
+++ branches/stable/nixtape/themes/librefm/templates/login.tpl 2009-05-16
00:50:51 UTC (rev 1647)
@@ -2,14 +2,21 @@
<h2>Login</h2>
+<div id="register-prompt">
+<h3>Need an account? <a href="register.php">Register now!</a></h3>
+<p>It's free, easy and takes only a few seconds...</p>
+</div>
+
{if !empty($errors)}
- <p id='errors'>{$errors}</p>
+<div id='errors'>
+ <p>{$errors}</p>
{if isset($invalid)}
- <a href="{$base_url}/reset.php">{t}Lost password{/t}?</a><br />
+ <p><a href="{$base_url}/reset.php"><strong>{t}Reset your
password{/t}</a></strong></p>
{/if}
+</div>
{/if}
-<div id='login'>
+<div id='login-form'>
<form action='' method='post'>
<fieldset>
<label
for='username'>{t}Username{/t}<span> </span></label>
@@ -17,6 +24,8 @@
<label
for='password'>{t}Password{/t}<span> </span></label>
<input id='password' name='password' type='password'
value=''/>
+
+
<label for='remember'>{t}Remember
me{/t}<span> </span></label>
<input id='remember' name='remember' type='checkbox'
value='1'/>
Modified: branches/stable/nixtape/themes/librefm/templates/menu.tpl
===================================================================
--- branches/stable/nixtape/themes/librefm/templates/menu.tpl 2009-05-16
00:43:25 UTC (rev 1646)
+++ branches/stable/nixtape/themes/librefm/templates/menu.tpl 2009-05-16
00:50:51 UTC (rev 1647)
@@ -1,11 +1,10 @@
<ul>
+ <li><a href="{$base_url}/music/">Popular Artists</a></li>
{if ($logged_in)}
<li><a href="{$this_user->getURL()}">{$this_user->name}</a></li>
-{else}
- <li><a href="{$base_url}/register.php">{t}Register{/t}</a></li>
-{/if}
-
-{if ($logged_in)}
+ <li><a href="{$base_url}/listen/">{t}Listen{/t}</a></li>
+ <li><a
href="https://savannah.nongnu.org/bugs/?group=librefm">{t}Bugs{/t}</a></li>
+ <li><a
href="http://ideas.libre.fm/index.php/Using_turtle">{t}Help{/t}</a></li>
{if $this_user->userlevel > 0}
<li><a href="/admin.php">{t}Admin{/t}</a></li>
{/if}
@@ -13,7 +12,4 @@
{else}
<li><a
href="{$base_url}/login.php?return={$this_page|urlencode|htmlentities}">{t}Login{/t}</a></li>
{/if}
- <li><a href="{$base_url}/listen.php">{t}Listen{/t}</a></li>
- <li><a
href="https://savannah.nongnu.org/bugs/?group=librefm">{t}Bugs{/t}</a></li>
- <li><a
href="http://ideas.libre.fm/index.php/Using_turtle">{t}Help{/t}</a></li>
</ul>
Modified: branches/stable/nixtape/themes/librefm/templates/reset.tpl
===================================================================
--- branches/stable/nixtape/themes/librefm/templates/reset.tpl 2009-05-16
00:43:25 UTC (rev 1646)
+++ branches/stable/nixtape/themes/librefm/templates/reset.tpl 2009-05-16
00:50:51 UTC (rev 1647)
@@ -1,6 +1,6 @@
{include file='header.tpl'}
-<h2>{t}Password reset{/t}</h2>
+<h2>{t}Reset my password{/t}</h2>
{if isset($errors)}
<p id='errors'>{$errors}</p>
@@ -19,9 +19,8 @@
<form action="{$base_url}/reset.php" method='post'>
<fieldset>
- <p><a href='http://libre.fm' rel='bookmark' class='vcard fn org
url'>libre.fm</a> {t}Password Reset{/t}</p>
- <label for='username'>{t}Username{/t} <span>{t}must be
valid!{/t}</span></label>
+ <label for='username'>{t}Username{/t}</span></label>
<input id='username' name='user' type='text' value='' />
<input type='submit' name='recover' value='{t}Reset my
password!{/t}'/>
Modified: branches/stable/nixtape/track.php
===================================================================
--- branches/stable/nixtape/track.php 2009-05-16 00:43:25 UTC (rev 1646)
+++ branches/stable/nixtape/track.php 2009-05-16 00:50:51 UTC (rev 1647)
@@ -40,12 +40,13 @@
$smarty->assign('tagcloud', $aTagCloud);
}
-$res = $mdb2->query('SELECT * FROM Track WHERE lower(artist_name) = ' .
$mdb2->quote(mb_strtolower($track->artist_name, 'UTF-8'), 'text') . ' AND
lower(name) = ' . $mdb2->quote(mb_strtolower($track->name, 'UTF-8'), 'text'));
+$adodb->SetFetchMode(ADODB_FETCH_ASSOC);
+$res = $adodb->GetAll('SELECT * FROM Track WHERE lower(artist_name) = ' .
$adodb->qstr(mb_strtolower($track->artist_name, 'UTF-8')) . ' AND lower(name) =
' . $adodb->qstr(mb_strtolower($track->name, 'UTF-8')));
$aOtheralbums = array();
$i = 0;
-while (($row = $res->fetchRow(MDB2_FETCHMODE_ASSOC))) {
+foreach($res as &$row) {
$trow = sanitize($row);
if ($trow['album']) {
$aOtherAlbums[$i++] = new Album($trow['album'],
$trow['artist']);
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Librefm-commits] [1647] partial merge of nixtape from trunk,
Clint Adams <=