public function recalculateRR(array $params)
 {
     require_once l_r('gamemaster/gamemaster.php');
     libGameMaster::updateReliabilityRating(true);
     return l_t("Reliability Ratings have been recalculated");
 }
Example #2
0
}
libHTML::starthtml(l_t('GameMaster'));
print '<div class="content">';
$DB->sql_put("COMMIT");
// Unlock our user row, to prevent deadlocks below
// This means our $User object should only be used for reading from
ini_set('memory_limit', "40M");
ini_set('max_execution_time', '40');
/*
 * - Update session table
 * - Update misc values (if running as admin/mod)
 * - Check last process time, pause processing/save current process time
 * - Check queue and games table for games to process, votes to enact, and system functions to perform
 */
print l_t('Updating session table') . '<br />';
libGameMaster::updateSessionTable();
$statsDir = libCache::dirName('stats');
$onlineFile = $statsDir . '/onlineUsers.json';
$tabl = $DB->sql_tabl("SELECT userID FROM wD_Sessions");
$onlineUsers = array();
while (list($userID) = $DB->tabl_row($tabl)) {
    $onlineUsers[] = $userID;
}
file_put_contents($onlineFile, 'onlineUsers=$A([' . implode(',', $onlineUsers) . ']);');
//- Update misc values (if running as admin/mod)
if (!$User->type['System'] || time() % (15 * 60) <= 5 * 60) {
    print l_t('Updating Misc values') . '<br />';
    miscUpdate::errorLog();
    miscUpdate::forum();
    miscUpdate::game();
    miscUpdate::user();