]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - scripts/updatelocation.php
Added type-hint for StartShowEntryForms hook
[quix0rs-gnu-social.git] / scripts / updatelocation.php
old mode 100644 (file)
new mode 100755 (executable)
index 4110660..6a78693
@@ -18,7 +18,8 @@
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 
-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'");
         }