librefm-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Librefm-commits] [1492] Merged stuff into stable


From: Jørgen Bøhnsdalen
Subject: [Librefm-commits] [1492] Merged stuff into stable
Date: Mon, 11 May 2009 21:15:11 +0000

Revision: 1492
          http://svn.sv.gnu.org/viewvc/?view=rev&root=librefm&revision=1492
Author:   jurgbohn
Date:     2009-05-11 21:15:09 +0000 (Mon, 11 May 2009)
Log Message:
-----------
Merged stuff into stable

Modified Paths:
--------------
    branches/stable/gnukebox/submissions/1.2/index.php

Modified: branches/stable/gnukebox/submissions/1.2/index.php
===================================================================
--- branches/stable/gnukebox/submissions/1.2/index.php  2009-05-11 21:14:31 UTC 
(rev 1491)
+++ branches/stable/gnukebox/submissions/1.2/index.php  2009-05-11 21:15:09 UTC 
(rev 1492)
@@ -22,14 +22,15 @@
 require_once('../../scrobble-utils.php');
 
 if(!isset($_POST['s']) || !isset($_POST['a']) || !isset($_POST['t']) || 
!isset($_POST['i'])) {
-       die("Failed Required POST parameters are not set\n");
+       reportError($_POST['u'] . ' POST FAILED', var_dump($_POST));
+       die("Failed Required POST parameters are not set\r\n");
 }
 if(empty($_POST['s']) || empty($_POST['a']) || empty($_POST['t']) || 
empty($_POST['i'])) {
-       die("Failed Required POST parameters are empty\n");
+       die("Failed Required POST parameters are empty\r\n");
 }
 
 if(!is_array($_POST['a']) || !is_array($_POST['t']) || !is_array($_POST['i'])) 
{
-       die("FAILED Track parameters must be arrays\n");
+       die("FAILED Track parameters must be arrays\r\n");
 }
 
 $session_id = $_POST['s'];
@@ -45,7 +46,7 @@
                        $artist = $mdb2->quote($_POST['a'][$i], "text");
                        break;
                default:
-                       die("FAILED Bad encoding in artist submission $i\n");
+                       die("FAILED Bad encoding in artist submission $i\r\n");
                }
        if(isset($_POST['b'][$i]) && !empty($_POST['b'])) {
                switch (mb_detect_encoding($_POST['b'][$i])) {
@@ -54,7 +55,7 @@
                        $album = $mdb2->quote($_POST['b'][$i], "text");
                        break;
                default:
-                       die("FAILED Bad encoding in album submission $i\n");
+                       die("FAILED Bad encoding in album submission $i\r\n");
                }
        } else {
                $album = 'NULL';
@@ -65,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}\n");
+           die("FAILED Track $i was submitted with empty mandatory field(s): 
{$f}\r\n");
        }
 
        switch (mb_detect_encoding($_POST['t'][$i])) {
@@ -74,7 +75,7 @@
                    $track = $mdb2->quote($_POST['t'][$i], "text");
                    break;
                default:
-                       die("FAILED Bad encoding in title submission $i\n");
+                       die("FAILED Bad encoding in title submission $i\r\n");
        }
        if(is_numeric($_POST['i'][$i])) {
                $time = (int) $_POST['i'][$i];
@@ -109,7 +110,7 @@
        }
 
        if(($time - time()) > 300) {
-            die("FAILED Submitted track has timestamp in the future\n"); // 
let's try a 5-minute tolerance
+            die("FAILED Submitted track has timestamp in the future\r\n"); // 
let's try a 5-minute tolerance
        }
 
        createArtistIfNew($artist);
@@ -151,7 +152,7 @@
                    $msg = $res->getMessage() . " - " . $res->getUserInfo();
                    $mdb2->exec("ROLLBACK");
                    reportError($msg, $sql);
-                    die("FAILED " . $msg . "\nError has been reported to site 
administrators.\n");
+                    die("FAILED " . $msg . "\nError has been reported to site 
administrators.\r\n");
                }
 
                }
@@ -162,7 +163,7 @@
                    $msg = $res->getMessage() . " - " . $res->getUserInfo();
                    $mdb2->exec("ROLLBACK");
                    reportError($msg, $sql);
-                    die("FAILED " . $msg . "\nError has been reported to site 
administrators.\n");
+                    die("FAILED " . $msg . "\nError has been reported to site 
administrators.\r\n");
                }
 
                // Destroy now_playing since it is almost certainly obsolescent
@@ -170,6 +171,6 @@
        }
 }
 
-die("OK\n");
+die("OK\r\n");
 
 ?>





reply via email to

[Prev in Thread] Current Thread [Next in Thread]