@@ -56,30 +56,36 @@ require_once('inc/admin.inc');
return false;
}
function checkAction() {
$result = '';
if(isset($_GET['rehash'])) {
// Run the rehash
$crawl_schools = NULL;
if (isset($_REQUEST['rehash_school']))
$crawl_schools = array($_REQUEST['rehash_school']);
ob_start();
if (school_cache_recreate($crawl_schools))
$result = 'Rehash Failed';
else
$result = 'Rehash Successful';
$hashresult = nl2br(ob_get_contents());
ob_end_clean();
if ($crawl_schools !== NULL)
$result .= ': ' . implode(', ', $crawl_schools);
// Prepend rehash output
$result = $hashresult . '<br />' . $result;
else if(isset($_GET['purge']))
{
$purge_date = NULL;
if(isset($_GET['purgetodate']))
$t = strptime($_REQUEST['purgetodate'], '%Y-%m-%d');
$purge_date = mktime($t['tm_hour'], $t['tm_min'], $t['tm_sec'], $t['tm_mon'], $t['tm_mday'], $t['tm_year'] + 1900);
$schedule_store = schedule_store_init();
if (!$schedule_store)
Status change: