Ticket #941: functions.inc.php.patch
| File functions.inc.php.patch, 1.6 kB (added by webrainstorm, 6 years ago) |
|---|
-
functions.inc.php
old new 942 942 var $hookHtml = ''; 943 943 var $arrHooks = array(); 944 944 945 function install_hooks($ viewing_itemid,$target_module,$target_menuid = '') {945 function install_hooks($target_module) { 946 946 global $active_modules; 947 947 // loop through all active modules 948 948 foreach($active_modules as $this_module) { … … 950 950 // ie: findme_hook_extensions() 951 951 $funct = $this_module['rawname'] . '_hook_' . $target_module; 952 952 if( function_exists( $funct ) ) { 953 // execute the function, appending the954 // html output to that of other hooking modules955 if ($hookReturn = $funct($viewing_itemid,$target_menuid))956 $this->hookHtml .= $hookReturn;957 953 // remember who installed hooks 958 954 // we need to know this for processing form vars 959 955 $this->arrHooks[] = $this_module['rawname']; 960 956 } 961 957 } 962 958 } 963 959 960 // get html to be displayed in hooked module 961 function visualization_hooks($viewing_itemid, $target_module, $target_menuid = '') { 962 if(is_array($this->arrHooks)) { 963 foreach($this->arrHooks as $hookingMod) { 964 $funct = $hookingMod . '_hook_' . $target_module; 965 // execute the function, appending the 966 // html output to that of other hooking modules 967 if ($hookReturn = $funct($viewing_itemid,$target_menuid)) 968 $this->hookHtml .= $hookReturn; 969 970 } 971 } 972 } 973 964 974 // process the request from the module we hooked 965 975 function process_hooks($viewing_itemid, $target_module, $target_menuid, $request) { 966 976 if(is_array($this->arrHooks)) {
