--- a/sharing/config.php Sun May 08 18:28:19 2011 +0100
+++ b/sharing/config.php Sun May 08 18:45:20 2011 +0100
@@ -1,5 +1,6 @@
<?php
// edit these to match your db
-$username = "user";
-$password = "password";
+ $username = "user";
+ $password = "password";
+ $database = "dashboard";
?>
--- a/sharing/query.php Sun May 08 18:28:19 2011 +0100
+++ b/sharing/query.php Sun May 08 18:45:20 2011 +0100
@@ -137,7 +137,7 @@
header('Content-Type: text/plain');
- $database = "dashboard";
+ // $database, $username and $password set in config.php
$db = mysql_connect($db_master, $username, $password);
if (!$db)
--- a/sharing/share.php Sun May 08 18:28:19 2011 +0100
+++ b/sharing/share.php Sun May 08 18:45:20 2011 +0100
@@ -240,21 +240,7 @@
$data = explode("\n", $body);
- // read credentials from local file
- $creds = file_get_contents("credentials");
-
- if (!$creds)
- {
- header("HTTP/1.0 500 Internal Error");
- die("500 Internal Error - Couldn't get credentials for database access");
- }
-
- // file content: userid:password
- $creds = explode(":", $creds);
- $username = trim($creds[0]);
- $password = trim($creds[1]);
-
- $database = "dashboard";
+ // $database, $username and $password set in config.php
$db = mysql_connect($db_master, $username, $password);
if (!$db)
--- a/sharing/site.php Sun May 08 18:28:19 2011 +0100
+++ b/sharing/site.php Sun May 08 18:45:20 2011 +0100
@@ -53,7 +53,7 @@
do_query($sql, $names);
}
- $database = "dashboard";
+ // $database, $username and $password set in config.php
$db = mysql_connect($db_master, $username, $password);
if (!$db)