Changeset 6756
- Timestamp:
- 09/17/08 03:02:57 (5 years ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
freepbx/branches/2.5/amp_conf/htdocs/admin/components.class.php
r6424 r6756 412 412 413 413 function buildconfigpage() { 414 if ( !$this->_sorted_guifuncs ) 414 if ( !$this->_sorted_guifuncs ) { 415 415 $this->sortguifuncs(); 416 } 416 417 417 418 if ( is_array($this->_guifuncs) ) { 418 419 foreach ( array_keys($this->_guifuncs) as $sortorder ) { 419 420 foreach ( $this->_guifuncs[$sortorder] as $func ) { 420 $func($this->_compname); 421 $modparts = explode("_",$func,2); 422 $thismod = $modparts[0]; 423 if (isset($_COOKIE['lang']) && is_dir("./modules/$thismod/i18n/".$_COOKIE['lang'])) { 424 bindtextdomain($thismod,"./modules/$thismod/i18n"); 425 bind_textdomain_codeset($thismod, 'utf8'); 426 textdomain($thismod); 427 428 $func($this->_compname); 429 430 textdomain('amp'); 431 } else { 432 $func($this->_compname); 433 } 421 434 } 422 435 } freepbx/branches/2.5/amp_conf/htdocs/admin/functions.inc.php
r6675 r6756 656 656 // loop through all active modules 657 657 foreach($active_modules as $this_module) { 658 // look for requested hooks for $module 659 // ie: findme_hook_extensions() 660 $funct = $this_module['rawname'] . '_hook_' . $target_module; 661 if( function_exists( $funct ) ) { 662 // execute the function, appending the 663 // html output to that of other hooking modules 658 // look for requested hooks for $module 659 // ie: findme_hook_extensions() 660 $funct = $this_module['rawname'] . '_hook_' . $target_module; 661 if( function_exists( $funct ) ) { 662 // execute the function, appending the 663 // html output to that of other hooking modules 664 665 $thismod = $this_module['rawname']; 666 if (isset($_COOKIE['lang']) && is_dir("./modules/$thismod/i18n/".$_COOKIE['lang'])) { 667 bindtextdomain($thismod,"./modules/$thismod/i18n"); 668 bind_textdomain_codeset($thismod, 'utf8'); 669 textdomain($thismod); 670 671 freepbx_debug("applying hook for $thismod with domain: $saved_domain"); 664 672 if ($hookReturn = $funct($target_menuid, $viewing_itemid)) { 665 673 $this->hookHtml .= $hookReturn; 666 674 } 667 // remember who installed hooks 668 // we need to know this for processing form vars 669 $this->arrHooks[] = $this_module['rawname']; 675 676 textdomain('amp'); 677 freepbx_debug("returned to $thismod with domain: $saved_domain"); 678 } else { 679 if ($hookReturn = $funct($target_menuid, $viewing_itemid)) { 680 $this->hookHtml .= $hookReturn; 681 } 670 682 } 683 // remember who installed hooks 684 // we need to know this for processing form vars 685 $this->arrHooks[] = $this_module['rawname']; 686 } 671 687 } 672 688 }
