Esempio n. 1
0
 /**
  * Gets information for the first missing GeoIP database (if any).
  *
  * @return bool
  */
 private function getNextMissingDbUrlInfo()
 {
     $missingDbs = GeoIPAutoUpdater::getMissingDatabases();
     if (!empty($missingDbs)) {
         $missingDbKey = $missingDbs[0];
         $missingDbName = GeoIp::$dbNames[$missingDbKey][0];
         $url = GeoIPAutoUpdater::getConfiguredUrl($missingDbKey);
         $link = '<a href="' . $url . '">' . $missingDbName . '</a>';
         return array('to_download' => $missingDbKey, 'to_download_label' => Piwik::translate('UserCountry_DownloadingDb', $link) . '...');
     }
     return false;
 }
 /**
  * Returns the next scheduled time for the auto updater.
  * 
  * @return Date|false
  */
 public static function getNextRunTime()
 {
     $task = new GeoIPAutoUpdater();
     $timetable = new ScheduledTaskTimetable();
     return $timetable->getScheduledTaskTime($task->getName());
 }
 public function downloadFile($type, $url)
 {
     parent::downloadFile($type, $url);
 }