We are no longer offering accounts on this server. Consider https://gitlab.freedesktop.org/ as a place to host projects.

Commit a5997bd4 authored by P. J. McDermott's avatar P. J. McDermott

Finish code cleanup under gnukebox/.

parent 91db38e0
......@@ -27,7 +27,7 @@ require_once('version.php');
$displaythings = true;
if (!isset($config_version) || $config_version != $version) {
die("Configuration file is out of date. Please delete it (and associated database) and <a href='install.php'>reinstall</a>."); //TODO: Upgrade script for release versions
die('Configuration file is out of date. Please delete it (and associated database) and <a href="install.php">reinstall</a>.'); //TODO: Upgrade script for release versions
}
if (isset($_GET['hs']) && isset($_GET['p'])) {
......
......@@ -318,23 +318,23 @@ if (isset($_POST['install'])) {
PRIMARY KEY (uid1, uid2, flag),
FOREIGN KEY (uid1, uid2) REFERENCES User_Relationships (uid1, uid2))',
'INSERT INTO Relationship_Flags VALUES (\'contact\')',
'INSERT INTO Relationship_Flags VALUES (\'acquaintance\')',
'INSERT INTO Relationship_Flags VALUES (\'friend\')',
'INSERT INTO Relationship_Flags VALUES (\'met\')',
'INSERT INTO Relationship_Flags VALUES (\'co-worker\')',
'INSERT INTO Relationship_Flags VALUES (\'colleague\')',
'INSERT INTO Relationship_Flags VALUES (\'co-resident\')',
'INSERT INTO Relationship_Flags VALUES (\'neighbor\')',
'INSERT INTO Relationship_Flags VALUES (\'child\')',
'INSERT INTO Relationship_Flags VALUES (\'parent\')',
'INSERT INTO Relationship_Flags VALUES (\'sibling\')',
'INSERT INTO Relationship_Flags VALUES (\'spouse\')',
'INSERT INTO Relationship_Flags VALUES (\'kin\')',
'INSERT INTO Relationship_Flags VALUES (\'muse\')',
'INSERT INTO Relationship_Flags VALUES (\'crush\')',
'INSERT INTO Relationship_Flags VALUES (\'date\')',
'INSERT INTO Relationship_Flags VALUES (\'sweetheart\')'
'INSERT INTO Relationship_Flags VALUES ("contact")',
'INSERT INTO Relationship_Flags VALUES ("acquaintance")',
'INSERT INTO Relationship_Flags VALUES ("friend")',
'INSERT INTO Relationship_Flags VALUES ("met")',
'INSERT INTO Relationship_Flags VALUES ("co-worker")',
'INSERT INTO Relationship_Flags VALUES ("colleague")',
'INSERT INTO Relationship_Flags VALUES ("co-resident")',
'INSERT INTO Relationship_Flags VALUES ("neighbor")',
'INSERT INTO Relationship_Flags VALUES ("child")',
'INSERT INTO Relationship_Flags VALUES ("parent")',
'INSERT INTO Relationship_Flags VALUES ("sibling")',
'INSERT INTO Relationship_Flags VALUES ("spouse")',
'INSERT INTO Relationship_Flags VALUES ("kin")',
'INSERT INTO Relationship_Flags VALUES ("muse")',
'INSERT INTO Relationship_Flags VALUES ("crush")',
'INSERT INTO Relationship_Flags VALUES ("date")',
'INSERT INTO Relationship_Flags VALUES ("sweetheart")'
);
foreach ($stage_one_queries as $query) {
......@@ -392,7 +392,7 @@ if (isset($_POST['install'])) {
$adodb->Execute('INSERT INTO Users
(username, password, active)
VALUES
(\'testuser\', \'' . md5('password') . '\', 1);');
("testuser", "' . md5('password') . '", 1);');
} catch(Exception $e) {
die('Error testing database: ' . $adodb->ErrorMsg());
}
......
......@@ -22,7 +22,7 @@ require_once('../../database.php');
require_once('../../scrobble-utils.php');
require_once('../../auth-utils.php');
header("Content-Type: text/plain");
header('Content-Type: text/plain');
if (!isset($_POST['s']) || !isset($_POST['a']) || !isset($_POST['t'])) {
die("FAILED Required POST parameters are not set\n");
......
......@@ -160,7 +160,7 @@ for ($i = 0; $i < count($_POST['a']); $i++) {
for ($j = 0; $j < $actualcount; $j++) {
// Scrobble!
$sql = "INSERT INTO Scrobbles (userid, artist, album, track, time, mbid, source, rating, length, stid) VALUES " . $rowvalues[$j];
$sql = 'INSERT INTO Scrobbles (userid, artist, album, track, time, mbid, source, rating, length, stid) VALUES ' . $rowvalues[$j];
try {
$res =& $adodb->Execute($sql);
if (isset($lastfm_key)) {
......
......@@ -26,9 +26,9 @@ function human_timestamp ($unix_timestamp, $now = null) {
if (is_null($now)) {
$now = time();
}
$diff = $now - $unix_timestamp;
# ugly!
$number_to_alpha = array(
'zero', 'one', 'two', 'three', 'four', 'five', 'six', 'seven', 'eight', 'nine', 'ten',
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment