Changeset 1004

Show
Ignore:
Timestamp:
11/05/05 20:25:43 (3 years ago)
Author:
mbonetti
Message:

Warn the user when the value for the rss.output.cachedir configuration entry
isn't writable by the web server.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/rss/admin/config.php

    r993 r1004  
    8282              . preg_replace('/ /',' ',date("g:i A",mktime()+$value*3600)) 
    8383            .")"; 
     84            break; 
     85            case 'rss.output.cachedir': 
     86            echo $value; 
     87            if (!is_writable($value)) { 
     88                echo "<br />" 
     89                ."<span class=\"error\">Warning: this isn't a writable directory!</span>"; 
     90            } 
    8491            break; 
    8592         default: 
     
    372379            echo "</select>\n"; 
    373380        break; 
    374           
     381        case 'rss.output.cachedir': 
     382        if (!is_writable($value)) { 
     383            echo "</p><p class=\"error\">" 
     384            ."Warning! The current value ($value) is not a writable directory!<br />" 
     385            ."See <a href=\"http://wiki.gregarius.net/index.php/MagpieRSS\">here</a> " 
     386            ."why it is important you provide a valid, writable directory." 
     387            ."</p><p>\n";    
     388        } else { 
     389            echo "</p><p>" 
     390            ."The current value ($value) is a valid, writable directory!" 
     391            ."</p><p>\n";    
     392        } 
     393        // no break: fall back into the normal handling 
    375394     default: 
    376395