@@ -71,20 +71,18 @@ if (!$school['crawled'])
if (!$getsections && count($term_parts) == 1 && $term_strlen == strlen($dept))
{
$dept_file = $cache_dir . '-depts';
if (!file_exists($dept_file))
clean_empty_exit();
$departments = unserialize(file_get_contents($dept_file));
$json_depts = array();
foreach ($departments as $key => $department)
if (!strncmp($department, $dept, $dept_strlen))
$departments[$key] = $department;
else
unset($departments[$key]);
}
echo json_encode($departments);
$json_depts[] = $department;
echo json_encode($json_depts);
exit(0);
if ($getsections)
$section_file = $cache_dir . $dept . DIRECTORY_SEPARATOR . $term_parts['course'];
Status change: