Changeset 6937

Show
Ignore:
Timestamp:
10/05/08 09:35:26 (2 months ago)
Author:
p_lindheimer
Message:

additional localization tweaks, if a module does not have an i18n, then use amp and not the modules's for certain 'hooks'

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • freepbx/branches/2.5/amp_conf/htdocs/admin/functions.inc.php

    r6902 r6937  
    863863                $function = $mod."_check_extensions"; 
    864864                if (function_exists($function)) { 
     865                        $prev_domain = textdomain(NULL); 
    865866                        if (isset($_COOKIE['lang']) && is_dir("./modules/$mod/i18n/".$_COOKIE['lang'])) { 
    866                                 $prev_domain = textdomain(NULL); 
    867867                                bindtextdomain($mod,"./modules/$mod/i18n"); 
    868868                                bind_textdomain_codeset($mod, 'utf8'); 
    869869                                textdomain($mod); 
    870870                                $module_usage = $function($exten); 
    871                                 textdomain($prev_domain); 
    872871                        } else { 
     872                                textdomain('amp'); 
    873873                                $module_usage = $function($exten); 
    874874                        } 
     
    876876                                $exten_usage[$mod] = $module_usage; 
    877877                        } 
     878                        textdomain($prev_domain); 
    878879                } 
    879880        } 
     
    924925                $function = $mod."_check_destinations"; 
    925926                if (function_exists($function)) { 
     927                        $prev_domain = textdomain(NULL); 
    926928                        if (isset($_COOKIE['lang']) && is_dir("./modules/$mod/i18n/".$_COOKIE['lang'])) { 
    927                                 $prev_domain = textdomain(NULL); 
    928929                                bindtextdomain($mod,"./modules/$mod/i18n"); 
    929930                                bind_textdomain_codeset($mod, 'utf8'); 
    930931                                textdomain($mod); 
    931932                                $module_usage = $function($dest); 
    932                                 textdomain($prev_domain); 
    933933                        } else { 
     934                                textdomain('amp'); 
    934935                                $module_usage = $function($dest); 
    935936                        } 
     
    937938                                $dest_usage[$mod] = $module_usage; 
    938939                        } 
     940                        textdomain($prev_domain); 
    939941                } 
    940942        } 
     
    10841086                                $function = $mod."_getdestinfo"; 
    10851087                                if (function_exists($function)) { 
     1088                                        $prev_domain = textdomain(NULL); 
    10861089                                        if (isset($_COOKIE['lang']) && is_dir("./modules/$mod/i18n/".$_COOKIE['lang'])) { 
    1087                                                 $prev_domain = textdomain(NULL); 
    10881090                                                bindtextdomain($mod,"./modules/$mod/i18n"); 
    10891091                                                bind_textdomain_codeset($mod, 'utf8'); 
    10901092                                                textdomain($mod); 
    10911093                                                $check_module = $function($target); 
    1092                                                 textdomain($prev_domain); 
    10931094                                        } else { 
     1095                                                textdomain('amp'); 
    10941096                                                $check_module = $function($target); 
    10951097                                        } 
     1098                                        textdomain($prev_domain); 
    10961099                                        if ($check_module !== false) { 
    10971100                                                $found_owner = true; 
Donate



Support
Download
Develop
Forums
News
Documentation
Paid Support
About

Paid Ads