Changeset - 53a8b7ab6967
[Not reviewed]
default
0 1 0
Nathan Brink (binki) - 15 years ago 2011-01-15 14:29:46
ohnobinki@ohnopublishing.net
Use single quotes for static strings.
1 file changed with 1 insertions and 1 deletions:
0 comments (0 inline, 0 general)
auto.php
Show inline comments
 
@@ -75,25 +75,25 @@ if (!$school['crawled']) {
 
$dept_strlen = strlen($term_parts['department']);
 
$dept = $term_parts['department'];
 
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)) {
 
	$json_depts[] = $department . "-";
 
	$json_depts[] = $department . '-';
 
      }
 
    }
 

	
 
    echo json_encode($json_depts);
 
    exit(0);
 
  }
 

	
 
if ($getsections)
 
  {
 
    $section_file = $cache_dir . $dept . DIRECTORY_SEPARATOR . $term_parts['course'];
 
    if (file_exists($section_file))
 
      {
0 comments (0 inline, 0 general)