Changeset 482 for dev/cron

Show
Ignore:
Timestamp:
12/06/09 02:34:17 (11 years ago)
Author:
kovell
Message:

Clearup cronjob checks if a specified directory is valid and displays an error if not.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • dev/cron/cron_clearup.php

    r461 r482  
    2424{ 
    2525        $seconds = $hours*60*60; 
    26  
     26        $del = 0; 
     27        if(!is_dir($dir)) 
     28        { 
     29                echo "Invalid directory: ".$dir." <br>\n"; 
     30                return false; 
     31        } 
    2732        $files = scandir($dir); 
    2833 
    29         //      echo $dir."<br>".$hours." hours<br>\n"; 
     34        //echo $dir."<br>".$hours." hours<br>\n"; 
    3035        foreach ($files as $num => $fname) 
    3136        {