Changeset - 5dd763389a0a
[Not reviewed]
default
0 1 0
Nathan Brink (binki) - 15 years ago 2011-02-09 23:39:41
ohnobinki@ohnopublishing.net
Some more strict file/dir access checks in schedule_store_init().
1 file changed with 2 insertions and 4 deletions:
0 comments (0 inline, 0 general)
inc/schedule_store.inc
Show inline comments
 
@@ -31,16 +31,14 @@ require_once('class.schedule.php');
 
 */
 
function schedule_store_init($dir = 'saved_schedules')
 
{
 
  $schedule_store = array();
 
  $schedule_store = array('dir' => realpath($dir));
 

	
 
  if (!is_dir($dir) || !is_writable($dir))
 
  if (!is_dir($schedule_store['dir']) || !is_writable($schedule_store['dir']))
 
    {
 
      error_log('I can\'t write to ' . $dir . ' or it is not a directory!');
 
      return NULL;
 
    }
 

	
 
  $schedule_store['dir'] = realpath($dir);
 

	
 
  return $schedule_store;
 
}
 

	
0 comments (0 inline, 0 general)