- Timestamp:
- 09/12/08 11:39:24 (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/expressoAdmin1_2/inc/class.institutional_accounts.inc.php
r317 r414 34 34 $GLOBALS['phpgw']->js->validate_file('jscode','institutional_accounts','expressoAdmin1_2'); 35 35 $GLOBALS['phpgw']->js->validate_file('modal','modal','expressoAdmin1_2'); 36 37 /* 38 Move this to expressoAdmin.index. 39 $_SESSION['phpgw_info']['expressoAdmin']['user']['preferences']['common']['lang'] = $GLOBALS['phpgw_info']['user']['preferences']['common']['lang']; 40 41 $fn = './expressoAdmin1_2/setup/phpgw_'.$_SESSION['phpgw_info']['expressoAdmin']['user']['preferences']['common']['lang'].'.lang'; 42 if (file_exists($fn)){ 43 $fp = fopen($fn,'r'); 44 while ($data = fgets($fp,16000)){ 45 list($message_id,$app_name,$null,$content) = explode("\t",substr($data,0,-1)); 46 $_SESSION['phpgw_info']['expressoAdmin']['lang'][$message_id] = $content; 47 } 48 fclose($fp); 49 }*/ 36 $GLOBALS['phpgw']->js->validate_file('jscode','expressoadmin','expressoAdmin1_2'); 50 37 } 51 38 } 52 39 53 function make_lang($ram_lang)54 {55 $a_lang = split("_", $ram_lang);56 $a_lang_reverse = array_reverse ( $a_lang, true );57 array_pop ( $a_lang_reverse );58 $a_lang = array_reverse ( $a_lang_reverse, true );59 $a_new_lang = implode ( " ", $a_lang );60 return lang($a_new_lang);61 }62 63 function make_dinamic_lang($template_obj, $block)64 {65 $tpl_vars = $template_obj->get_undefined($block);66 foreach ($tpl_vars as $atribute)67 {68 $lang = strstr($atribute, 'lang_');69 if($lang !== false)70 {71 $template_obj->set_var($atribute, $this->make_lang($atribute));72 }73 }74 }75 76 40 function index() 77 41 { … … 105 69 106 70 /* dinamic load lang */ 107 $ this->make_dinamic_lang($p, 'body');108 $ this->make_dinamic_lang($p, 'institutional_accounts_modal');71 $p->set_var($this->functions->make_dinamic_lang($p, 'body')); 72 $p->set_var($this->functions->make_dinamic_lang($p, 'institutional_accounts_modal')); 109 73 110 74
Note: See TracChangeset
for help on using the changeset viewer.