[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Librefm-commits] [1491] undo r1488
From: |
Clint Adams |
Subject: |
[Librefm-commits] [1491] undo r1488 |
Date: |
Mon, 11 May 2009 21:14:31 +0000 |
Revision: 1491
http://svn.sv.gnu.org/viewvc/?view=rev&root=librefm&revision=1491
Author: clint
Date: 2009-05-11 21:14:31 +0000 (Mon, 11 May 2009)
Log Message:
-----------
undo r1488
Modified Paths:
--------------
trunk/gnukebox/install.php
trunk/gnukebox/nowplaying/1.2/index.php
trunk/gnukebox/scrobble-utils.php
trunk/gnukebox/submissions/1.1/handshake.php
trunk/gnukebox/submissions/1.2/handshake.php
trunk/gnukebox/submissions/1.2/index.php
trunk/nixtape/radio/adjust.php
trunk/nixtape/radio/handshake.php
trunk/nixtape/radio/xspf.php
trunk/nixtape/scrobble-proxy.php
Modified: trunk/gnukebox/install.php
===================================================================
--- trunk/gnukebox/install.php 2009-05-11 21:14:27 UTC (rev 1490)
+++ trunk/gnukebox/install.php 2009-05-11 21:14:31 UTC (rev 1491)
@@ -25,7 +25,7 @@
require_once('utils/get_absolute_url.php');
if(file_exists("config.php")) {
- die("A configuration file already exists. Please delete
<i>config.php</i> if you wish to reinstall.\r\n");
+ die("A configuration file already exists. Please delete
<i>config.php</i> if you wish to reinstall.");
}
if (isset($_POST['install'])) {
@@ -44,7 +44,7 @@
} catch (exception $e) {
var_dump($e);
adodb_backtrace($e->gettrace());
- die("Database connection failure\r\n");
+ die("Database connection failure\n");
}
//Create tables
@@ -329,10 +329,10 @@
if(!$result) {
$print_config = str_replace("<", "<", $config);
- die("Unable to write to file '<i>config.php</i>'. Please create
this file and copy the following in to it: <br /><pre>" . $print_config .
"</pre>\r\n");
+ die("Unable to write to file '<i>config.php</i>'. Please create
this file and copy the following in to it: <br /><pre>" . $print_config .
"</pre>");
}
- die("Configuration completed successfully!\r\n");
+ die("Configuration completed successfully!");
}
?>
Modified: trunk/gnukebox/nowplaying/1.2/index.php
===================================================================
--- trunk/gnukebox/nowplaying/1.2/index.php 2009-05-11 21:14:27 UTC (rev
1490)
+++ trunk/gnukebox/nowplaying/1.2/index.php 2009-05-11 21:14:31 UTC (rev
1491)
@@ -22,10 +22,10 @@
require_once('../../scrobble-utils.php');
if(!isset($_POST['s']) || !isset($_POST['a']) || !isset($_POST['t'])) {
- die("FAILED Required POST parameters are not set\r\n");
+ die("FAILED Required POST parameters are not set\n");
}
if(empty($_POST['s']) || empty($_POST['a']) || empty($_POST['t'])) {
- die("FAILED Required POST parameters are empty\r\n");
+ die("FAILED Required POST parameters are empty\n");
}
$session_id = $_POST['s'];
@@ -75,6 +75,6 @@
. $mbid . ")");
-die("OK\r\n");
+die("OK\n");
?>
Modified: trunk/gnukebox/scrobble-utils.php
===================================================================
--- trunk/gnukebox/scrobble-utils.php 2009-05-11 21:14:27 UTC (rev 1490)
+++ trunk/gnukebox/scrobble-utils.php 2009-05-11 21:14:31 UTC (rev 1491)
@@ -34,12 +34,12 @@
$res = $mdb2->query("SELECT username FROM Scrobble_Sessions WHERE
sessionid = " . $mdb2->quote($session_id, "text")); // get the username from
the table
if(PEAR::isError($res)) {
- die("FAILED ufs " . $res->getMessage() . "\r\n");
+ die("FAILED ufs " . $res->getMessage() . "\n");
// die is there is an error, printing the error
}
if(!$res->numRows()) {
- die("BADSESSION\r\n");
+ die("BADSESSION\n");
// the user has no session
}
@@ -56,14 +56,14 @@
$res = $mdb2->query("SELECT name FROM Artist WHERE name = " .
($artist));
if(PEAR::isError($res)) {
- die("FAILED art " . $res->getMessage() . "\r\n");
+ die("FAILED art " . $res->getMessage() . "\n");
}
if(!$res->numRows()) {
// Artist doesn't exist, so we create them
$res = $mdb2->query("INSERT INTO Artist (name) VALUES (" .
($artist) . ")");
if(PEAR::isError($res)) {
- die("FAILED artc " . $res->getMessage() . "\r\n");
+ die("FAILED artc " . $res->getMessage() . "\n");
}
}
}
@@ -73,7 +73,7 @@
$res = $mdb2->query("SELECT name FROM Album WHERE name = " . ($album) .
" AND artist_name = " . ($artist));
if(PEAR::isError($res)) {
- die("FAILED alb " . $res->getMessage() . "\r\n");
+ die("FAILED alb " . $res->getMessage() . "\n");
}
if(!$res->numRows()) {
@@ -92,7 +92,7 @@
}
if(PEAR::isError($res)) {
- die("FAILED albc " . $res->getMessage() . "\r\n");
+ die("FAILED albc " . $res->getMessage() . "\n");
}
}
}
@@ -109,7 +109,7 @@
$res = $mdb2->query("SELECT id FROM Track WHERE lower(name) = lower(" .
($track) . ") AND lower(artist_name) = lower(" . ($artist) . ") AND album_name
IS NULL");
}
if(PEAR::isError($res)) {
- die("FAILED trk " . $res->getMessage() . "\r\n");
+ die("FAILED trk " . $res->getMessage() . "\n");
}
if(!$res->numRows()) {
@@ -120,7 +120,7 @@
. ($album) . ", "
. ($mbid) . ")");
if(PEAR::isError($res)) {
- die("FAILED trkc " . $res->getMessage() . "\r\n");
+ die("FAILED trkc " . $res->getMessage() . "\n");
}
return getTrackCreateIfNew($artist, $album, $track, $mbid);
} else {
@@ -136,7 +136,7 @@
. (($album == 'NULL') ? "IS NULL" : ("= lower(" . ($album) .
")")) . " AND mbid "
. (($mbid == 'NULL') ? "IS NULL" : ("= lower(" . ($mbid) .
")")));
if(PEAR::isError($res)) {
- die("FAILED st " . $res->getMessage() . "\r\n");
+ die("FAILED st " . $res->getMessage() . "\n");
}
if(!$res->numRows()) {
@@ -151,7 +151,7 @@
$msg = $res->getMessage() . " - " . $res->getUserInfo();
reportError($msg, $sql);
- die("FAILED stc " . $res->getMessage() . "\r\n");
+ die("FAILED stc " . $res->getMessage() . "\n");
}
return getScrobbleTrackCreateIfNew($artist, $album, $track,
$mbid, $tid);
} else {
@@ -164,7 +164,7 @@
$res = $mdb2->query("SELECT time FROM Scrobbles WHERE username = " .
($username) . " AND artist = " . ($artist) . " AND track = " . ($track) . " AND
time = " . ($time));
if(PEAR::isError($res)) {
- die("FAILED se " . $res->getMessage() . "\r\n");
+ die("FAILED se " . $res->getMessage() . "\n");
}
if(!$res->numRows()) {
@@ -203,7 +203,7 @@
. "&Keywords=" . $Keywords
. "&ResponseGroup=" . $ResponseGroup;
-$aws_xml = simplexml_load_file($request) or die("xml response not
loading\r\n");
+$aws_xml = simplexml_load_file($request) or die("xml response not loading\n");
$image = $aws_xml->Items->Item->MediumImage->URL;
$URI = $aws_xml->Items->Item->DetailPageURL;
Modified: trunk/gnukebox/submissions/1.1/handshake.php
===================================================================
--- trunk/gnukebox/submissions/1.1/handshake.php 2009-05-11 21:14:27 UTC
(rev 1490)
+++ trunk/gnukebox/submissions/1.1/handshake.php 2009-05-11 21:14:31 UTC
(rev 1491)
@@ -31,23 +31,23 @@
if(!isset($_GET['p']) || !isset($_GET['u']) || !isset($_GET['c'])) {
- die("FAILED\r\n");
+ die("FAILED\n");
}
$protocol = $_GET['p']; $username = $_GET['u']; $client = $_GET['c'];
if(!in_array($protocol, $supported_protocols)) {
- die("FAILED Unsupported protocol version\r\n");
+ die("FAILED Unsupported protocol version\n");
}
$timestamp = time();
$res = $adodb->GetOne("SELECT password FROM Users WHERE username = ".
$adodb->qstr($username));
if(PEAR::isError($res)) {
- die("FAILED " . $res->getMessage() . "\r\n");
+ die("FAILED " . $res->getMessage() . "\n");
}
if(!$res->numRows()) {
- die("BADUSER\r\n");
+ die("BADUSER\n");
}
$password = $res;
$session_id = md5($password . $timestamp);
@@ -58,12 +58,12 @@
. $adodb->qstr(time() + 86400) . ")");
if(PEAR::isError($res)) {
- die("FAILED " . $res->getMessage() . "\r\n");
+ die("FAILED " . $res->getMessage() . "\n");
}
-echo "UPTODATE\r\n";
-echo $timestamp . "\r\n";
-echo $submissions_server . "/submissions/1.2/\r\n";
-echo "INTERVAL 1\r\n";
+echo "UPTODATE\n";
+echo $timestamp . "\n";
+echo $submissions_server . "/submissions/1.2/\n";
+echo "INTERVAL 1\n";
?>
Modified: trunk/gnukebox/submissions/1.2/handshake.php
===================================================================
--- trunk/gnukebox/submissions/1.2/handshake.php 2009-05-11 21:14:27 UTC
(rev 1490)
+++ trunk/gnukebox/submissions/1.2/handshake.php 2009-05-11 21:14:31 UTC
(rev 1491)
@@ -27,21 +27,21 @@
if(!isset($_GET['p']) || !isset($_GET['u']) || !isset($_GET['t']) ||
!isset($_GET['a']) || !isset($_GET['c'])) {
- die("BADAUTH\r\n");
+ die("BADAUTH\n");
}
$protocol = $_GET['p']; $username = $_GET['u']; $timestamp = $_GET['t'];
$auth_token = $_GET['a']; $client = $_GET['c'];
if($client == "import") {
- die("FAILED Import scripts are broken\r\n"); // this should be removed
or changed to check the version once import.php is fixed
+ die("FAILED Import scripts are broken\n"); // this should be removed or
changed to check the version once import.php is fixed
}
if(!in_array($protocol, $supported_protocols)) {
- die("FAILED Unsupported protocol version\r\n");
+ die("FAILED Unsupported protocol version\n");
}
if(abs($timestamp - time()) > 300) {
- die("BADTIME\r\n"); // let's try a 5-minute tolerance
+ die("BADTIME\n"); // let's try a 5-minute tolerance
}
if(isset($_GET['api_key']) && isset($_GET['sk'])) {
@@ -51,7 +51,7 @@
}
if(!$authed) {
- die("BADAUTH\r\n");
+ die("BADAUTH\n");
}
$session_id = md5($auth_token . time());
@@ -66,12 +66,12 @@
if(PEAR::isError($res)) {
$msg = $res->getMessage();
reportError($msg, $sql);
- die("FAILED " . $msg . "\r\n");
+ die("FAILED " . $msg . "\n");
}
-echo "OK\r\n";
-echo $session_id . "\r\n";
-echo $submissions_server . "/nowplaying/1.2/\r\n";
-echo $submissions_server . "/submissions/1.2/\r\n";
+echo "OK\n";
+echo $session_id . "\n";
+echo $submissions_server . "/nowplaying/1.2/\n";
+echo $submissions_server . "/submissions/1.2/\n";
?>
Modified: trunk/gnukebox/submissions/1.2/index.php
===================================================================
--- trunk/gnukebox/submissions/1.2/index.php 2009-05-11 21:14:27 UTC (rev
1490)
+++ trunk/gnukebox/submissions/1.2/index.php 2009-05-11 21:14:31 UTC (rev
1491)
@@ -23,14 +23,14 @@
if(!isset($_POST['s']) || !isset($_POST['a']) || !isset($_POST['t']) ||
!isset($_POST['i'])) {
reportError($_POST['u'] . ' POST FAILED', var_dump($_POST));
- die("Failed Required POST parameters are not set\r\n");
+ die("Failed Required POST parameters are not set\n");
}
if(empty($_POST['s']) || empty($_POST['a']) || empty($_POST['t']) ||
empty($_POST['i'])) {
- die("Failed Required POST parameters are empty\r\n");
+ die("Failed Required POST parameters are empty\n");
}
if(!is_array($_POST['a']) || !is_array($_POST['t']) || !is_array($_POST['i']))
{
- die("FAILED Track parameters must be arrays\r\n");
+ die("FAILED Track parameters must be arrays\n");
}
$session_id = $_POST['s'];
@@ -46,7 +46,7 @@
$artist = $adodb->qstr($_POST['a'][$i]);
break;
default:
- die("FAILED Bad encoding in artist submission $i\r\n");
+ die("FAILED Bad encoding in artist submission $i\n");
}
if(isset($_POST['b'][$i]) && !empty($_POST['b'])) {
switch (mb_detect_encoding($_POST['b'][$i])) {
@@ -55,7 +55,7 @@
$album = $adodb->qstr($_POST['b'][$i]);
break;
default:
- die("FAILED Bad encoding in album submission $i\r\n");
+ die("FAILED Bad encoding in album submission $i\n");
}
} else {
$album = 'NULL';
@@ -66,7 +66,7 @@
$f .= isset($_POST['a'][$i]) ? "A({$_POST['a'][$i]})" : 'a';
$f .= isset($_POST['i'][$i]) ? "I({$_POST['i'][$i]})" : 'i';
- die("FAILED Track $i was submitted with empty mandatory field(s):
{$f}\r\n");
+ die("FAILED Track $i was submitted with empty mandatory field(s):
{$f}\n");
}
switch (mb_detect_encoding($_POST['t'][$i])) {
@@ -75,7 +75,7 @@
$track = $adodb->qstr($_POST['t'][$i]);
break;
default:
- die("FAILED Bad encoding in title submission $i\r\n");
+ die("FAILED Bad encoding in title submission $i\n");
}
if(is_numeric($_POST['i'][$i])) {
$time = (int) $_POST['i'][$i];
@@ -110,7 +110,7 @@
}
if(($time - time()) > 300) {
- die("FAILED Submitted track has timestamp in the future\r\n"); //
let's try a 5-minute tolerance
+ die("FAILED Submitted track has timestamp in the future\n"); //
let's try a 5-minute tolerance
}
createArtistIfNew($artist);
@@ -153,7 +153,7 @@
$adodb->FailTrans();
$adodb->CompleteTrans();
reportError($msg, $sql);
- die("FAILED " . $msg . "\nError has been reported to site
administrators.\r\n");
+ die("FAILED " . $msg . "\nError has been reported to site
administrators.\n");
}
}
@@ -165,7 +165,7 @@
$adodb->FailTrans();
$adodb->CompleteTrans();
reportError($msg, $sql);
- die("FAILED " . $msg . "\nError has been reported to site
administrators.\r\n");
+ die("FAILED " . $msg . "\nError has been reported to site
administrators.\n");
}
// Destroy now_playing since it is almost certainly obsolescent
@@ -173,6 +173,6 @@
}
}
-die("OK\r\n");
+die("OK\n");
?>
Modified: trunk/nixtape/radio/adjust.php
===================================================================
--- trunk/nixtape/radio/adjust.php 2009-05-11 21:14:27 UTC (rev 1490)
+++ trunk/nixtape/radio/adjust.php 2009-05-11 21:14:31 UTC (rev 1491)
@@ -22,7 +22,7 @@
require_once('radio-utils.php');
if(!isset($_GET['session']) || !isset($_GET['url'])) {
- die("FAILED\r\n");
+ die("FAILED\n");
}
$session = $_GET['session'];
@@ -31,7 +31,7 @@
$res = $mdb2->query('SELECT username FROM Radio_Sessions WHERE session = ' .
$mdb2->quote($session, 'text'));
if(!$res->numRows()) {
- die("BADSESSION\r\n");
+ die("BADSESSION\n");
}
if(ereg('^(globaltags|artist)/[^:]+$', $url, $regs)) {
@@ -40,7 +40,7 @@
$stationname=radio_title_from_url($url);
if($stationname=="FAILED") {
- die("FAILED Unavailable station\r\n");
+ die("FAILED Unavailable station\n");
}
$mdb2->exec('UPDATE Radio_Sessions SET url = ' . $mdb2->quote($url, 'text') .
' WHERE session = ' . $mdb2->quote($session, 'text'));
Modified: trunk/nixtape/radio/handshake.php
===================================================================
--- trunk/nixtape/radio/handshake.php 2009-05-11 21:14:27 UTC (rev 1490)
+++ trunk/nixtape/radio/handshake.php 2009-05-11 21:14:31 UTC (rev 1491)
@@ -21,7 +21,7 @@
require_once('../database.php');
if(!isset($_GET['username']) || !isset($_GET['passwordmd5'])) {
- die("BADAUTH\r\n");
+ die("BADAUTH\n");
}
$username = $_GET['username'];
@@ -29,7 +29,7 @@
$res = $mdb2->query('SELECT username FROM Users WHERE username = ' .
$mdb2->quote($username, 'text') . ' AND password = ' . $mdb2->quote($passmd5,
'text'));
if (!$res->numRows()) {
- die("BADAUTH\r\n");
+ die("BADAUTH\n");
}
$session = md5($passmd5 . time());
Modified: trunk/nixtape/radio/xspf.php
===================================================================
--- trunk/nixtape/radio/xspf.php 2009-05-11 21:14:27 UTC (rev 1490)
+++ trunk/nixtape/radio/xspf.php 2009-05-11 21:14:31 UTC (rev 1491)
@@ -26,7 +26,7 @@
// These deaths should probably just return an empty playlist
if(!isset($_GET['sk']) || !isset($_GET['desktop'])) {
- die("BADSESSION\r\n"); // this should return a blank dummy playlist
instead
+ die("BADSESSION\n"); // this should return a blank dummy playlist
instead
}
$session = $_GET['sk'];
@@ -34,7 +34,7 @@
$res = $mdb2->query('SELECT url FROM Radio_Sessions WHERE session = ' .
$mdb2->quote($session, 'text'));
if(!$res->numRows()) {
- die("BADSESSION\r\n"); // this should return a blank dummy playlist
instead
+ die("BADSESSION\n"); // this should return a blank dummy playlist
instead
}
$url = $res->fetchOne(0);
@@ -49,7 +49,7 @@
$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'));
} else {
- die("FAILED\r\n"); // this should return a blank dummy playlist instead
+ die("FAILED\n"); // this should return a blank dummy playlist instead
}
Modified: trunk/nixtape/scrobble-proxy.php
===================================================================
--- trunk/nixtape/scrobble-proxy.php 2009-05-11 21:14:27 UTC (rev 1490)
+++ trunk/nixtape/scrobble-proxy.php 2009-05-11 21:14:31 UTC (rev 1491)
@@ -26,7 +26,7 @@
} elseif ($_GET['method'] == 'nowplaying') {
$url = $submissions_server . '/nowplaying/1.2/';
} else {
- die("Invalid proxy method\r\n");
+ die("Invalid proxy method\n");
}
$session = curl_init($url);
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Librefm-commits] [1491] undo r1488,
Clint Adams <=