From 00f6228e5820ff743a89f42781c01434f409e136 Mon Sep 17 00:00:00 2001 From: Romain d'Alverny Date: Mon, 26 Dec 2011 12:40:45 +0000 Subject: use maintdb.txt --- maintdb.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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]); -- cgit v1.2.1