Changeset 6022 for extensions/prepare21upgrade
- Timestamp:
- Apr 30, 2010, 2:31:02 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/prepare21upgrade/prep21up.php
r6021 r6022 113 113 $dir = PHPWG_ROOT_PATH.'_data/'.md5(uniqid(rand(), true)); 114 114 115 if (!mkdir($dir, 0777, true) 115 if (!is_dir(PHPWG_ROOT_PATH.'_data') 116 and !mkdir(PHPWG_ROOT_PATH.'_data', 0777)) 117 { 118 die('Error: create a "_data" directory and add write access on "_data" directory (chmod 777).'); 119 } 120 121 if (!mkdir($dir, 0777) 116 122 or !mkdir($dir.'/local') 117 123 or !mkdir($dir.'/local/config') … … 121 127 { 122 128 deltree($dir); 123 die('Error: create a "_data" directory andadd write access on "_data" directory (chmod 777).');129 die('Error: add write access on "_data" directory (chmod 777).'); 124 130 } 125 131 … … 156 162 ?'.'>'; 157 163 $new_config_file = $dir.'/local/config/database.inc.php'; 158 file_put_contents($new_config_file, $file_content); 164 $fp = @fopen($new_config_file, 'w'); 165 @fwrite($fp, $file_content); 166 @fclose($fp); 159 167 @chmod($new_config_file, 0777); 160 168 }
Note: See TracChangeset
for help on using the changeset viewer.