Changeset 9938

Show
Ignore:
Timestamp:
11/14/08 18:31:15 (2 months ago)
Author:
afz
Message:

remove all cache if user change site language

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branches/0.8/jaws/html/gadgets/Settings/AdminModel.php

    r9252 r9938  
    209209              $xss->parse($settings['copyright']) : ''; 
    210210 
     211        $old_site_lang = $GLOBALS['app']->Registry->Get('/config/site_language'); 
    211212        foreach ($settings as $settingKey => $settingValue) { 
    212213            if (!in_array($settingKey, $basicKeys)) { 
     
    216217        } 
    217218        $GLOBALS['app']->Registry->Commit('core'); 
     219 
     220        //remove all cached files 
     221        if ($old_site_lang != $settings['site_language']) { 
     222            $GLOBALS['app']->Cache->delete(); 
     223        } 
     224 
    218225        $GLOBALS['app']->Session->PushLastResponse(_t('SETTINGS_SAVED'), RESPONSE_NOTICE); 
    219226        return true;