Exemplo n.º 1
0
 private static function globalRefresh()
 {
     Output::println('Start');
     date_default_timezone_set('GMT');
     // this is the time used in google feeds
     $newUpdateDate = gmdate(substr(DateTime::ATOM, 0, -1), strtotime('-1 hour'));
     // -1 hour because of the feeds delay.
     $rootFolderUrl = 'https://docs.google.com/feeds/default/private/full/folder%3A' . ROOT_FOLDER_ID . '/contents';
     $menuTree = FolderScanner::scan($rootFolderUrl, ROOT_PATH);
     // Publish all pages and files
     Output::println('Done.');
     $configPhpString = StringTools::serializeForInclude($newUpdateDate, $menuTree);
     Output::store($configPhpString, __DIR__ . '/config.php');
 }