{
        $eternalStats = FlaviusConfig::getEternalStats();
        $ids = array(0);
        $this->flavius->calcEternalStats($ids, $eternalStats);
        $intervalStats = FlaviusConfig::getIntervalStats();
        $intervalStats['FTalkPagesSent'] = 0;
        $intervalStats['FTalkPagesReceived'] = 0;
        $this->flavius->calcIntervalStats($ids, $intervalStats, $this->oldDay, $this->yesterdaysDate);
        $this->flavius->calcTotalStats($ids, $intervalStats, $this->oldDay);
    }
}
if ($argv[0] == '-yesterday') {
    $fc = new FlaviusController(1);
    array_shift($argv);
} else {
    $fc = new FlaviusController();
}
$fc->addErrorEmail("*****@*****.**");
$fc->addErrorEmail("*****@*****.**");
if ($argv[0] == '--fullrun') {
    $fc->run(true);
    $fc->makeSummary();
} elseif ($argv[0] == "--fulleternal") {
    $fc->calcEternalStats();
} elseif ($argv[0] == "--dailyrun") {
    $fc->run(false);
    $fc->makeSummary();
} elseif ($argv[0] == "--eternalstat") {
    $fc->calcEternalStat($argv[1]);
} elseif ($argv[0] == "--partialeternalstat") {
    $fc->calcEternalStat($argv[1], "20120101", true);
Beispiel #2
0
    public function calculateMilestones($field, $values, $date = false)
    {
        if (!$date) {
            $today = substr(wfTimestampNow(), 0, 8) . '000000';
            $ts = wfTimestamp(TS_UNIX, $today);
            $ago = strtotime('-1 day', wfTimestamp(TS_UNIX, $today));
            $date = substr(wfTimestamp(TS_MW, $ago), 0, 8);
        }
        $this->flavius->calculateMilestones($field, $values, $date);
    }
}
if ($argv[0] == '-yesterday') {
    $fc = new FlaviusController(1);
    array_shift($argv);
} else {
    $fc = new FlaviusController();
}
// Note: this should probably be changed to alerts@wikihow.com for production
$fc->setErrorEmails(array("*****@*****.**"));
if ($argv[0] == "-fullrun") {
    $fc->run(true);
    $fc->makeSummary();
} elseif ($argv[0] == "-fulleternal") {
    $fc->calcEternalStats();
} elseif ($argv[0] == "-dailyrun") {
    $fc->run(false);
    $fc->makeSummary();
} elseif ($argv[0] == "-eternalstat") {
    $fc->calcEternalStat($argv[1]);
} elseif ($argv[0] == "-partialeternalstat") {
    $fc->calcEternalStat($argv[1], "20120101", true);