- Timestamp:
- 06/04/12 09:57:19 (12 years ago)
- Location:
- sandbox/2.4.1-3
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
sandbox/2.4.1-3/prototype/api/config.php
r6367 r6399 72 72 public static function writeIniFile($assoc_arr, $path, $has_sections) 73 73 { 74 $content = ''; 75 76 if (!$handle = fopen($path, 'w')) 77 { 78 trigger_error("Permission failure when trying to open the file: $path ", E_USER_WARNING); 79 return FALSE; 80 } 81 74 $content = ''; 82 75 self::_writeIniFile($content, $assoc_arr, $has_sections); 83 84 if (!fwrite($handle, $content)) 76 if( file_put_contents($path, $content) === false) 85 77 { 86 78 trigger_error("Permission failure when trying to write in the file: $path ", E_USER_WARNING); 87 } return FALSE; 88 89 fclose($handle); 90 return TRUE; 79 return false; 80 } 81 return true; 91 82 } 92 83 -
sandbox/2.4.1-3/rest/setup/tables_current.inc.php
r6368 r6399 10 10 \**************************************************************************/ 11 11 12 //Verifica se tem permissão na pasta de configuração antes de começar a instalação do modulo. 13 require_once dirname(__FILE__) . '/../../prototype/api/config.php'; 14 use prototype\api\Config as Config; 15 16 if( Config::writeIniFile(array() , dirname(__FILE__) . '/../../prototype/config/REST.ini', true) === false ) 17 { 18 echo "<div style='color:red;font-size:14px'>Permission failure when trying to write in folder \"/prototype/config/\". Grant write permission in folder and try again. </div>"; 19 die(); //Mata o restante da execução. 20 } 21 /// 12 22 13 23 $phpgw_baseline = array(
Note: See TracChangeset
for help on using the changeset viewer.