#!/usr/bin/env php
<?php
/*
- * StatusNet - a distributed open-source microblogging tool
+ * StatusNet - the distributed open-source microblogging tool
* Copyright (C) 2008, 2009, StatusNet, Inc.
*
* This program is free software: you can redistribute it and/or modify
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-# 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();
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');
}
$cnt = $user->find();
-$cache = common_memcache();
+$cache = Cache::instance();
while ($user->fetch()) {
common_log(LOG_INFO, 'Updating inbox for user ' . $user->id);
$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));
}
}