X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=scripts%2Ffixup_inboxes.php;h=2aa5d1690003c938c634e71ef5c631cc709db13f;hb=650af0a27102e5e9067850c88e5b8a446b44f045;hp=3e55edef17257fbf4233f858947fbef33643a25c;hpb=aec6456c9181ea97e11eb74c5eaf868c2406bebb;p=quix0rs-gnu-social.git diff --git a/scripts/fixup_inboxes.php b/scripts/fixup_inboxes.php index 3e55edef17..2aa5d16900 100755 --- a/scripts/fixup_inboxes.php +++ b/scripts/fixup_inboxes.php @@ -1,8 +1,8 @@ #!/usr/bin/env php . */ -# Abort if called from a web server +// Abort if called from a web server if (isset($_SERVER) && array_key_exists('REQUEST_METHOD', $_SERVER)) { print "This script must be run from the command line\n"; exit(); @@ -30,7 +30,8 @@ set_time_limit(0); mb_internal_encoding('UTF-8'); define('INSTALLDIR', realpath(dirname(__FILE__) . '/..')); -define('LACONICA', true); +define('STATUSNET', true); +define('LACONICA', true); // compatibility require_once(INSTALLDIR . '/lib/common.php'); @@ -45,7 +46,7 @@ if ($start_at) { } $cnt = $user->find(); -$cache = common_memcache(); +$cache = Cache::instance(); while ($user->fetch()) { common_log(LOG_INFO, 'Updating inbox for user ' . $user->id); @@ -75,6 +76,6 @@ while ($user->fetch()) { $inbox->free(); unset($inbox); if ($cache) { - $cache->delete(common_cache_key('user:notices_with_friends:' . $user->id)); + $cache->delete(Cache::key('user:notices_with_friends:' . $user->id)); } }