X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=scripts%2Fupdatelocation.php;h=6a786932513831ff7327bb2685a3e58a4b3c3b2d;hb=3b126e8ef45dbb16850055203081852a2c394015;hp=4110660ab0139601d3b53912c109208e308665f8;hpb=55ba858e8cb4eac0fa60fb78f8e8c4813be065a9;p=quix0rs-gnu-social.git diff --git a/scripts/updatelocation.php b/scripts/updatelocation.php old mode 100644 new mode 100755 index 4110660ab0..6a78693251 --- a/scripts/updatelocation.php +++ b/scripts/updatelocation.php @@ -18,7 +18,8 @@ * along with this program. If not, see . */ -define('INSTALLDIR', realpath(dirname(__FILE__) . '/..')); +define('INSTALLDIR', dirname(__DIR__)); +define('PUBLICDIR', INSTALLDIR . DIRECTORY_SEPARATOR . 'public'); $shortoptions = 'i:n:af'; $longoptions = array('id=', 'nickname=', 'all', 'force'); @@ -41,14 +42,14 @@ try { if (have_option('i', 'id')) { $id = get_option_value('i', 'id'); - $user = User::staticGet('id', $id); + $user = User::getKV('id', $id); if (empty($user)) { throw new Exception("Can't find user with id '$id'."); } updateLocation($user); } else if (have_option('n', 'nickname')) { $nickname = get_option_value('n', 'nickname'); - $user = User::staticGet('nickname', $nickname); + $user = User::getKV('nickname', $nickname); if (empty($user)) { throw new Exception("Can't find user with nickname '$nickname'"); }