Changeset - 39d4c3184c46
[Not reviewed]
default
0 1 0
Nathan Brink (binki) - 14 years ago 2011-04-09 16:01:59
ohnobinki@ohnopublishing.net
Fix PHP warnings when crawling with an empty cache (when crawling the first time).
1 file changed with 2 insertions and 2 deletions:
0 comments (0 inline, 0 general)
inc/admin.inc
Show inline comments
 
@@ -89,13 +89,13 @@ function school_cache($schools)
 

	
 
  foreach ($schools as $school)
 
    {
 
      $list_cache[$school['id']] = array(
 
					 'name' => $school['name'],
 
					 'url' => $school['url'],
 
					 'crawled' => $school['crawled'],
 
					 'crawled' => !empty($school['crawled']),
 
					 );
 
      foreach ($school['domains'] as $school_domain)
 
	{
 
	  $domain_cache_ptr =& $domain_cache;
 

	
 
	  $domain_parts = array_reverse(explode('.', $school_domain));
 
@@ -121,13 +121,13 @@ function school_cache($schools)
 
       *
 
       * We don't do anything if crawled_notreally is set because this
 
       * way we can get incremental crawling. Really useful if one's
 
       * just debugging one of the school crawling scripts and doesn't
 
       * want to run all crawlers ;-).
 
       */
 
      if ($school['crawled'] && !isset($school['crawled_notreally']))
 
      if (!empty($school['crawled']) && !isset($school['crawled_notreally']))
 
	{
 
	  $cache_auto_school_dir_name = $cache_auto_dir_name . $school['id'] . DIRECTORY_SEPARATOR;
 
	  if (!is_dir($cache_auto_school_dir_name))
 
	    {
 
	      if (!mkdir($cache_auto_school_dir_name, 0755, TRUE))
 
		error_log('Unable to create needed directory: `' . $cache_auto_dir_name . '\'');
0 comments (0 inline, 0 general)