summaryrefslogtreecommitdiffstats
path: root/maintdb.php
diff options
context:
space:
mode:
Diffstat (limited to 'maintdb.php')
-rw-r--r--maintdb.php4
1 files changed, 3 insertions, 1 deletions
diff --git a/maintdb.php b/maintdb.php
index dbdf723..ab334c4 100644
--- a/maintdb.php
+++ b/maintdb.php
@@ -37,7 +37,7 @@
*/
/** Path to maintdb.txt */
-$maintdb = __DIR__ . '/data/maintdb.txt';
+$maintdb = realpath(__DIR__) . '/data/maintdb.txt';
/** User name */
$uid = isset($_GET['uid']) ? trim(htmlentities(strip_tags($_GET['uid']))) : null;
@@ -51,6 +51,8 @@ $json = isset($_GET['json']) ? true : false;
/** Returned data */
$return = null;
+$s = file_get_contents($maintdb);
+
if (null !== $uid) {
if (preg_match_all(sprintf('/(.*) %s\n?/', $uid), $s, $res)) {
$return = array($uid => $res[1]);