Changeset 9941
- Timestamp:
- 11/14/08 20:21:53 (2 months ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
branches/0.8/jaws/html/gadgets/Languages/AdminModel.php
r8324 r9941 60 60 61 61 $lang_fname_file = $lang_dir. DIRECTORY_SEPARATOR. 'FullName'; 62 if (@file_put_contents($lang_fname_file, $lang_name)) { 63 Jaws_Utils::chmod($lang_fname_file); 62 if (Jaws_Utils::file_put_contents($lang_fname_file, $lang_name)) { 64 63 if ($lang_exist) { 65 64 $GLOBALS['app']->Session->PushLastResponse( … … 261 260 function SetLangData($component, $langTo, $data = null) 262 261 { 262 $remove_all_cache = false; 263 263 if ($component == 'global') { 264 $remove_all_cache = true; 264 265 $file = JAWS_PATH . "languages/$langTo/Global.php"; 265 266 } elseif ($component == 'date') { 267 $remove_all_cache = true; 266 268 $file = JAWS_PATH . "languages/$langTo/Date.php"; 267 269 } elseif ($component == 'install') { … … 323 325 } 324 326 325 if (file_put_contents($file, $tpl->Get())) { 327 if (Jaws_Utils::file_put_contents($file, $tpl->Get())) { 328 if ($langTo == $GLOBALS['app']->Registry->Get('/config/site_language')) { 329 //remove cached files 330 $GLOBALS['app']->Cache->delete(($remove_all_cache? null : $component)); 331 } 332 326 333 $GLOBALS['app']->Session->PushLastResponse(_t('LANGUAGES_UPDATED', $component), RESPONSE_NOTICE); 327 Jaws_Utils::chmod($file);328 334 return true; 329 335 } else {
