Пример #1
0
    } catch (Exception $x) {
        echo "Fatal error occured while updating whitelist:" . PHP_EOL;
        echo "  " . $x->getMessage() . PHP_EOL;
        echo PHP_EOL . PHP_EOL;
        echo $x->getTraceAsString();
        echo PHP_EOL . PHP_EOL;
    }
}
# if
## Statistics
if ($settings->get('prepare_statistics') && $newSpotCount > 0) {
    $spotsOverview = new SpotsOverview($db, $settings);
    $spotImage = new SpotImage($db);
    $spotsOverview->setActiveRetriever(true);
    echo "Starting to create statistics " . PHP_EOL;
    foreach ($spotImage->getValidStatisticsLimits() as $limitValue => $limitName) {
        # Reset timelimit
        set_time_limit(60);
        foreach ($settings->get('system_languages') as $language => $name) {
            foreach ($spotImage->getValidStatisticsGraphs() as $graphValue => $graphName) {
                $spotsOverview->getStatisticsImage($graphValue, $limitValue, $settings_nntp_hdr, $language);
            }
            # foreach graph
        }
        # foreach language
        echo "Finished creating statistics " . $limitName . PHP_EOL;
    }
    # foreach limit
    echo PHP_EOL;
}
# if
Пример #2
0
 function getValidStatisticsLimits()
 {
     $spotImage = new SpotImage($this->_db);
     return $spotImage->getValidStatisticsLimits();
 }