.

contributions/text.htmlpurifier/install/check_preconditions.php File Reference

Go to the source code of this file.

Functions

  text_htmlpurifier_check_preconditions ()

Function Documentation

text_htmlpurifier_check_preconditions (  ) 

Definition at line 2 of file check_preconditions.php.

00002                                                  {
00003         $ret = new Status();
00004         $basedir = Config::get_value(Config::TEMP_DIR) . 'htmlpurifier/';
00005         if (!file_exists($basedir)) {
00006                 mkdir($basedir);
00007                 chmod($basedir, 0777);
00008         }
00009         
00010         $dirs = array('CSS', 'HTML', 'URI');
00011         foreach($dirs as $dir) {
00012                 $dir = $basedir . $dir;
00013                 if (!file_exists($dir)) {
00014                         mkdir($dir);
00015                         chmod($dir, 0777);
00016                 }
00017                 if (!is_dir($dir)) {
00018                         $ret->append("Directory $dir missing");
00019                 }       
00020         }
00021         return $ret;
00022 }