diff --git a/about.php b/about.php index 1c83b54b58..212a86916f 100644 --- a/about.php +++ b/about.php @@ -19,7 +19,7 @@ $app = $HTTP_GET_VARS['app']; if ($app) { - $included = $GLOBALS['phpgw']->common->hook_single('about',$app); + $included = $GLOBALS['phpgw']->hooks->single('about',$app); } else { diff --git a/addressbook/inc/class.uiaddressbook.inc.php b/addressbook/inc/class.uiaddressbook.inc.php index 3baaf7abe2..2942f1f911 100644 --- a/addressbook/inc/class.uiaddressbook.inc.php +++ b/addressbook/inc/class.uiaddressbook.inc.php @@ -1001,7 +1001,7 @@ $this->template->pfp('out','view_t'); - $GLOBALS['phpgw']->common->hook('addressbook_view'); + $GLOBALS['phpgw']->hooks->process('addressbook_view'); } function html_1button_form($name,$lang,$link) diff --git a/admin/inc/class.boaccounts.inc.php b/admin/inc/class.boaccounts.inc.php index 68f660ac89..b6ba188af7 100755 --- a/admin/inc/class.boaccounts.inc.php +++ b/admin/inc/class.boaccounts.inc.php @@ -141,13 +141,13 @@ if($appname <> 'admin') { - $GLOBALS['phpgw']->common->hook_single('deleteaccount', $appname); + $GLOBALS['phpgw']->hooks->single('deleteaccount', $appname); } } } - $GLOBALS['phpgw']->common->hook_single('deleteaccount','preferences'); - $GLOBALS['phpgw']->common->hook_single('deleteaccount','admin'); + $GLOBALS['phpgw']->hooks->single('deleteaccount','preferences'); + $GLOBALS['phpgw']->hooks->single('deleteaccount','admin'); $basedir = $GLOBALS['phpgw_info']['server']['files_dir'] . SEP . 'users' . SEP; @@ -261,7 +261,7 @@ { if (!$t[($app_name=='admin'?'common':$app_name)]) { - $GLOBALS['phpgw']->common->hook_single('add_def_pref', $app_name); + $GLOBALS['phpgw']->hooks->single('add_def_pref', $app_name); $docommit = True; } } @@ -478,7 +478,7 @@ { if (!$t[($app_name=='admin'?'common':$app_name)]) { - $GLOBALS['phpgw']->common->hook_single('add_def_pref', $app_name); + $GLOBALS['phpgw']->hooks->single('add_def_pref', $app_name); $docommit = True; } } diff --git a/admin/inc/class.soaccounts.inc.php b/admin/inc/class.soaccounts.inc.php index 9ca297ece1..57e8a86a57 100755 --- a/admin/inc/class.soaccounts.inc.php +++ b/admin/inc/class.soaccounts.inc.php @@ -96,12 +96,12 @@ /* if ($apps_after) { $GLOBALS['pref'] = CreateObject('phpgwapi.preferences',$userData['account_id']); - $GLOBALS['phpgw']->common->hook_single('add_def_pref','admin'); + $GLOBALS['phpgw']->hooks->single('add_def_pref','admin'); while ($apps = each($apps_after)) { if (strcasecmp ($apps[0], 'admin') != 0) { - $GLOBALS['phpgw']->common->hook_single('add_def_pref', $apps[1]); + $GLOBALS['phpgw']->hooks->single('add_def_pref', $apps[1]); } } $GLOBALS['pref']->save_repository(False); @@ -116,7 +116,7 @@ // start inlcuding other admin tools while($app = each($apps_after)) { - $GLOBALS['phpgw']->common->hook_single('add_user_data', $value); + $GLOBALS['phpgw']->hooks->single('add_user_data', $value); } */ return $userData['account_id']; diff --git a/admin/inc/class.uiaclmanager.inc.php b/admin/inc/class.uiaclmanager.inc.php index 420a120c3c..52efeb0428 100644 --- a/admin/inc/class.uiaclmanager.inc.php +++ b/admin/inc/class.uiaclmanager.inc.php @@ -36,7 +36,7 @@ { $this->common_header(); - $GLOBALS['phpgw']->common->hook('acl_manager',array('preferences')); + $GLOBALS['phpgw']->hooks->process('acl_manager',array('preferences')); $this->template->set_file(array( 'app_list' => 'acl_applist.tpl' @@ -99,7 +99,7 @@ function access_form() { - $GLOBALS['phpgw']->common->hook_single('acl_manager',$GLOBALS['acl_app']); + $GLOBALS['phpgw']->hooks->single('acl_manager',$GLOBALS['acl_app']); $location = base64_decode($GLOBALS['location']); $acl_manager = $GLOBALS['acl_manager'][$GLOBALS['acl_app']][$location]; diff --git a/admin/inc/class.uiconfig.inc.php b/admin/inc/class.uiconfig.inc.php index 47abae9414..d2cf145455 100644 --- a/admin/inc/class.uiconfig.inc.php +++ b/admin/inc/class.uiconfig.inc.php @@ -70,7 +70,7 @@ if ($GLOBALS['HTTP_POST_VARS']['submit']) { /* Load hook file with functions to validate each config (one/none/all) */ - $GLOBALS['phpgw']->common->hook_single('config_validate',$appname); + $GLOBALS['phpgw']->hooks->single('config_validate',$appname); while (list($key,$config) = each($GLOBALS['HTTP_POST_VARS']['newsettings'])) { @@ -145,7 +145,7 @@ $vars = $t->get_undefined('body'); - $GLOBALS['phpgw']->common->hook_single('config',$appname); + $GLOBALS['phpgw']->hooks->single('config',$appname); while (list($null,$value) = each($vars)) { diff --git a/admin/inc/class.uimenuclass.inc.php b/admin/inc/class.uimenuclass.inc.php index 6cb9de8165..9ce6547983 100644 --- a/admin/inc/class.uimenuclass.inc.php +++ b/admin/inc/class.uimenuclass.inc.php @@ -92,7 +92,7 @@ break; } - $GLOBALS['phpgw']->common->hook($_hookname); + $GLOBALS['phpgw']->hooks->process($_hookname); if (count($GLOBALS['menuData']) > 1) { diff --git a/admin/index.php b/admin/index.php index 821bb84269..e56e864e33 100755 --- a/admin/index.php +++ b/admin/index.php @@ -72,7 +72,7 @@ section_end(); } - $GLOBALS['phpgw']->common->hook('admin'); + $GLOBALS['phpgw']->hooks->process('admin'); $GLOBALS['admin_tpl']->pparse('out','list'); $GLOBALS['phpgw']->common->phpgw_footer(); diff --git a/doc/inlinedocparser.php b/doc/inlinedocparser.php index 3349798699..7cbbac8d83 100755 --- a/doc/inlinedocparser.php +++ b/doc/inlinedocparser.php @@ -323,7 +323,7 @@ $returndoc['value']['file'][] = $fn; } } - if (isset($returndoc['value']) && is_array($returndoc['value'])) + if (@isset($returndoc['value']) && is_array($returndoc['value'])) { $doc_array[$startstop[$key]][0] = $returndoc['value']; } diff --git a/filemanager/index.php b/filemanager/index.php index 662138f41d..808a55f0d7 100755 --- a/filemanager/index.php +++ b/filemanager/index.php @@ -506,7 +506,7 @@ if ($messages) if (!is_array ($GLOBALS['settings'])) { $pref = CreateObject ('phpgwapi.preferences', $GLOBALS['userinfo']['username']); - $GLOBALS['phpgw']->common->hook_single ('add_def_pref', $GLOBALS['appname']); + $GLOBALS['phpgw']->hooks->single ('add_def_pref', $GLOBALS['appname']); $pref->save_repository (True); $pref_array = $pref->read_repository (); $GLOBALS['settings'] = $pref_array[$GLOBALS['appname']]; diff --git a/home.php b/home.php index d7bd9bd0f1..dea537e56b 100755 --- a/home.php +++ b/home.php @@ -239,7 +239,7 @@ ); } @reset($sorted_apps); - $GLOBALS['phpgw']->common->hook('home',$sorted_apps); + $GLOBALS['phpgw']->hooks->process('home',$sorted_apps); if($GLOBALS['portal_order']) { diff --git a/logout.php b/logout.php index 74329e685d..e80c05694c 100755 --- a/logout.php +++ b/logout.php @@ -41,7 +41,7 @@ } rmdir($GLOBALS['phpgw_info']['server']['temp_dir'] . SEP . $GLOBALS['sessionid']); } - $GLOBALS['phpgw']->common->hook('logout'); + $GLOBALS['phpgw']->hooks->process('logout'); $GLOBALS['phpgw']->session->destroy($GLOBALS['sessionid'],$GLOBALS['kp3']); } else diff --git a/notify.php b/notify.php index 701d652665..40b52b247e 100644 --- a/notify.php +++ b/notify.php @@ -38,7 +38,7 @@ common->hook('notifywindow',array('email')); + $GLOBALS['phpgw']->hooks->process('notifywindow',array('email')); ?>
Check Now
diff --git a/notify_simple.php b/notify_simple.php index 1160c9807d..bbedabe9db 100644 --- a/notify_simple.php +++ b/notify_simple.php @@ -20,6 +20,6 @@ include('./header.inc.php'); echo ''; - $GLOBALS['phpgw']->common->hook('simple',array('email')); + $GLOBALS['phpgw']->hooks->process('simple',array('email')); echo ''; ?> diff --git a/phpgwapi/inc/class.common.inc.php b/phpgwapi/inc/class.common.inc.php index b1c743f9e0..195474fb22 100644 --- a/phpgwapi/inc/class.common.inc.php +++ b/phpgwapi/inc/class.common.inc.php @@ -535,11 +535,11 @@ $appdir = PHPGW_INCLUDE_ROOT . '/'.$appname; $appdir_default = PHPGW_SERVER_ROOT . '/'.$appname; - if (is_dir ($appdir)) + if (@is_dir ($appdir)) { return $appdir; } - elseif (is_dir ($appdir_default)) + elseif (@is_dir ($appdir_default)) { return $appdir_default; } @@ -569,11 +569,11 @@ $incdir = PHPGW_INCLUDE_ROOT . '/' . $appname . '/inc'; $incdir_default = PHPGW_SERVER_ROOT . '/' . $appname . '/inc'; - if (is_dir ($incdir)) + if (@is_dir ($incdir)) { return $incdir; } - elseif (is_dir ($incdir_default)) + elseif (@is_dir ($incdir_default)) { return $incdir_default; } @@ -1113,116 +1113,33 @@ /*! @function hook - @abstract hooking function which allows applications to 'hook' into each other - @discussion Someone flesh this out please + @abstract temp wrapper to new hooks class */ - // Note: $no_permission_check should *ONLY* be used when it *HAS* to be. (jengo) - function hook($location, $order = '', $no_permission_check = False) + function hook($location, $appname = '', $no_permission_check = False) { - if ($order == '') - { - settype($order,'array'); - $order[] = $GLOBALS['phpgw_info']['flags']['currentapp']; - } - - /* First include the ordered apps hook file */ - reset ($order); - while (list(,$appname) = each($order)) - { - $f = PHPGW_SERVER_ROOT . '/' . $appname . '/inc/hook_' . $location . '.inc.php'; - if (file_exists($f) && - ( $GLOBALS['phpgw_info']['user']['apps'][$appname] || (($no_permission_check || $appname == 'preferences') && $appname)) ) - { - include($f); - } - - $completed_hooks[$appname] = True; - } - - /* Then add the rest */ - - if ($no_permission_check) - { - reset($GLOBALS['phpgw_info']['apps']); - while (list(,$p) = each($GLOBALS['phpgw_info']['apps'])) - { - $appname = $p['name']; - if (! isset($completed_hooks[$appname]) || $completed_hooks[$appname] != True) - { - $f = PHPGW_SERVER_ROOT . '/' . $appname . '/inc/hook_' . $location . '.inc.php'; - if (file_exists($f)) - { - include($f); - } - } - } - } - else - { - reset ($GLOBALS['phpgw_info']['user']['apps']); - while (list(,$p) = each($GLOBALS['phpgw_info']['user']['apps'])) - { - $appname = $p['name']; - if (! isset($completed_hooks[$appname]) || $completed_hooks[$appname] != True) - { - $f = PHPGW_SERVER_ROOT . '/' . $appname . '/inc/hook_' . $location . '.inc.php'; - if (file_exists($f)) - { - include($f); - } - } - } - } + echo '$'."GLOBALS['phpgw']common->hook()".' has been replaced. Please change to the new $'."GLOBALS['phpgw']hooks->process()".'. For now this will act as a wrapper
'; + return $GLOBALS['phpgw']->hooks->process($location, $order, $no_permission_check); } /*! @function hook_single - @abstract call the hooks for a single application - @param $location hook location - required - @param $appname application name - optional + @abstract temp wrapper to new hooks class */ // Note: $no_permission_check should *ONLY* be used when it *HAS* to be. (jengo) function hook_single($location, $appname = '', $no_permission_check = False) { - if (! $appname) - { - $appname = $GLOBALS['phpgw_info']['flags']['currentapp']; - } - $SEP = filesystem_separator(); - - /* First include the ordered apps hook file */ - $f = PHPGW_SERVER_ROOT . $SEP . $appname . $SEP . 'inc' . $SEP . 'hook_' . $location . '.inc.php'; - if (file_exists($f) && - ( $GLOBALS['phpgw_info']['user']['apps'][$appname] || (($no_permission_check || $location == 'config' || $appname == 'phpgwapi') && $appname)) ) - { - include($f); - return True; - } - else - { - return False; - } + echo '$'."GLOBALS['phpgw']common->hook_single()".' has been replaced. Please change to the new $'."GLOBALS['phpgw']hooks->single()".'. For now this will act as a wrapper
'; + return $GLOBALS['phpgw']->hooks->single($location, $order, $no_permission_check); } /*! @function hook_count - @abstract loop through the applications and count the hooks + @abstract temp wrapper to new hooks class */ function hook_count($location) { - $count = 0; - reset($GLOBALS['phpgw_info']['user']['apps']); - $SEP = filesystem_separator(); - while ($permission = each($GLOBALS['phpgw_info']['user']['apps'])) - { - $f = PHPGW_SERVER_ROOT . $SEP . $permission[0] . $SEP . 'inc' . $SEP . 'hook_' . $location . '.inc.php'; - - if (file_exists($f)) - { - ++$count; - } - } - return $count; + echo '$'."GLOBALS['phpgw']common->hook_count()".' has been replaced. Please change to the new $'."GLOBALS['phpgw']hooks->count()".'. For now this will act as a wrapper
'; + return $GLOBALS['phpgw']->hooks->count($location); } /* Wrapper to the session->appsession() */ diff --git a/phpgwapi/inc/class.hooks.inc.php b/phpgwapi/inc/class.hooks.inc.php index 71bfb05664..81219e8638 100644 --- a/phpgwapi/inc/class.hooks.inc.php +++ b/phpgwapi/inc/class.hooks.inc.php @@ -31,26 +31,125 @@ @package phpgwapi @access public */ + class hooks { - /*! - @function read() - @abstract currently not being used - */ - function read() + var $found_hooks = Array(); + function hooks() { - $db = $GLOBALS['phpgw']->db; - - $db->query('select * from phpgw_hooks'); - while ($db->next_record()) + //$GLOBALS['phpgw']->db->query("SELECT hook_appname, hook_location, hook_filename FROM phpgw_hooks WHERE hook_location='".$location."'",__LINE__,__FILE__); + $GLOBALS['phpgw']->db->query("SELECT hook_appname, hook_location, hook_filename FROM phpgw_hooks",__LINE__,__FILE__); + while( $GLOBALS['phpgw']->db->next_record() ) { - $return_array[$db->f('hook_id')]['app'] = $db->f('hook_appname'); - $return_array[$db->f('hook_id')]['location'] = $db->f('hook_location'); - $return_array[$db->f('hook_id')]['filename'] = $db->f('hook_filename'); + $this->found_hooks[$GLOBALS['phpgw']->db->f('hook_appname')][$GLOBALS['phpgw']->db->f('hook_location')] = $GLOBALS['phpgw']->db->f('hook_filename'); } - if(isset($return_array)) + //echo '
';
+			//print_r($this->found_hooks);
+			//echo '
'; + } + + /*! + @function process + @abstract loads up all the hooks the user has rights to + @discussion Someone flesh this out please + */ + // Note: $no_permission_check should *ONLY* be used when it *HAS* to be. (jengo) + function process($location, $order = '', $no_permission_check = False) + { + $SEP = filesystem_separator(); + if ($order == '') { - return $return_array; + settype($order,'array'); + $order[] = $GLOBALS['phpgw_info']['flags']['currentapp']; + } + + /* First include the ordered apps hook file */ + reset ($order); + while (list(,$appname) = each($order)) + { + if (isset($this->found_hooks[$appname][$location])) + { + $f = PHPGW_SERVER_ROOT . $SEP . $appname . $SEP . 'inc' . $SEP . $this->found_hooks[$appname][$location]; + if (file_exists($f) && + ( $GLOBALS['phpgw_info']['user']['apps'][$appname] || (($no_permission_check || $appname == 'preferences') && $appname)) ) + { + include($f); + } + } + $completed_hooks[$appname] = True; + } + + /* Then add the rest */ + + if ($no_permission_check) + { + reset($GLOBALS['phpgw_info']['apps']); + while (list(,$p) = each($GLOBALS['phpgw_info']['apps'])) + { + $appname = $p['name']; + if (! isset($completed_hooks[$appname]) || $completed_hooks[$appname] != True) + { + if (isset($this->found_hooks[$appname][$location])) + { + $f = PHPGW_SERVER_ROOT . $SEP . $appname . $SEP . 'inc' . $SEP . $this->found_hooks[$appname][$location]; + if (file_exists($f)) + { + include($f); + } + } + } + } + } + else + { + reset ($GLOBALS['phpgw_info']['user']['apps']); + while (list(,$p) = each($GLOBALS['phpgw_info']['user']['apps'])) + { + $appname = $p['name']; + if (! isset($completed_hooks[$appname]) || $completed_hooks[$appname] != True) + { + if (isset($this->found_hooks[$appname][$location])) + { + $f = PHPGW_SERVER_ROOT . $SEP . $appname . $SEP . 'inc' . $SEP . $this->found_hooks[$appname][$location]; + if (file_exists($f)) + { + include($f); + } + } + } + } + } + } + + /*! + @function single + @abstract call the hooks for a single application + @param $location hook location - required + @param $appname application name - optional + */ + // Note: $no_permission_check should *ONLY* be used when it *HAS* to be. (jengo) + function single($location, $appname = '', $no_permission_check = False) + { + if (! $appname) + { + $appname = $GLOBALS['phpgw_info']['flags']['currentapp']; + } + $SEP = filesystem_separator(); + + /* First include the ordered apps hook file */ + if (isset($this->found_hooks[$appname][$location])) + { + $f = PHPGW_SERVER_ROOT . $SEP . $appname . $SEP . 'inc' . $SEP . $this->found_hooks[$appname][$location]; + if (file_exists($f) && + ( $GLOBALS['phpgw_info']['user']['apps'][$appname] || (($no_permission_check || $location == 'config' || $appname == 'phpgwapi') && $appname)) ) + { + include($f); + return True; + } + else + { + return False; + } } else { @@ -59,55 +158,36 @@ } /*! - @function process - @abstract process the hooks - @discussion not currently being used - @param \$type - @param \$where + @function count + @abstract loop through the applications and count the hooks */ - function process($type,$where='') + function count($location) { - $currentapp = $GLOBALS['phpgw_info']['flags']['currentapp']; - $type = strtolower($type); - - if ($type != 'location' && $type != 'app') + $count = 0; + reset($GLOBALS['phpgw_info']['user']['apps']); + $SEP = filesystem_separator(); + while ($permission = each($GLOBALS['phpgw_info']['user']['apps'])) { - return False; - } - - // Add a check to see if that location/app has a hook - // This way it doesn't have to loop everytime - - while ($hook = each($GLOBALS['phpgw_info']['hooks'])) - { - if ($type == 'app') + if (isset($this->found_hooks[$permission[0]][$location])) { - if ($hook[1]['app'] == $currentapp) - { - $include_file = $GLOBALS['phpgw_info']['server']['server_root'] . '/' - . $currentapp . '/hooks/' - . $hook[1]['app'] . $hook[1]['filename']; - include($include_file); - } - } - elseif ($type == "location") - { - if ($hook[1]["location"] == $where) - { - $include_file = $GLOBALS['phpgw_info']['server']['server_root'] . '/' - . $hook[1]['app'] . '/hooks/' - . $hook[1]['filename']; - if (! is_file($include_file)) - { - $GLOBALS['phpgw']->common->phpgw_error('Failed to include hook: ' . $include_file); - } - else - { - include($include_file); - } - } + ++$count; } } + return $count; + } + + + /*! + @function read() + @abstract currently not being used + */ + function read() + { + //if (!is_array($this->found_hooks)) + //{ + $this->hooks(); + //} + return $this->found_hooks; } } ?> diff --git a/phpgwapi/templates/default/navbar.inc.php b/phpgwapi/templates/default/navbar.inc.php index f80bd50bab..13d4f9d300 100644 --- a/phpgwapi/templates/default/navbar.inc.php +++ b/phpgwapi/templates/default/navbar.inc.php @@ -120,7 +120,7 @@ $GLOBALS[$class]->header(); } } - $GLOBALS['phpgw']->common->hook('after_navbar'); + $GLOBALS['phpgw']->hooks->process('after_navbar'); return; } @@ -142,7 +142,7 @@ 'version' => $GLOBALS['phpgw_info']['server']['versions']['phpgwapi'] ); $tpl->set_var($var); - $GLOBALS['phpgw']->common->hook('navbar_end'); + $GLOBALS['phpgw']->hooks->process('navbar_end'); $tpl->pfp('out','footer'); } } diff --git a/phpgwapi/templates/idsociety/navbar.inc.php b/phpgwapi/templates/idsociety/navbar.inc.php index bbb82b341e..8d5c1ebe6c 100644 --- a/phpgwapi/templates/idsociety/navbar.inc.php +++ b/phpgwapi/templates/idsociety/navbar.inc.php @@ -212,7 +212,7 @@ $GLOBALS[$class]->header(); } } - $GLOBALS['phpgw']->common->hook('after_navbar'); + $GLOBALS['phpgw']->hooks->process('after_navbar'); return; } @@ -241,6 +241,6 @@ $tpl->set_var('V_powered_bottom',''); } - $GLOBALS['phpgw']->common->hook('navbar_end'); + $GLOBALS['phpgw']->hooks->process('navbar_end'); $tpl->pfp('out','footer'); } diff --git a/phpgwapi/templates/justweb/navbar.inc.php b/phpgwapi/templates/justweb/navbar.inc.php index 752541f20a..2ee309a059 100644 --- a/phpgwapi/templates/justweb/navbar.inc.php +++ b/phpgwapi/templates/justweb/navbar.inc.php @@ -113,6 +113,21 @@ $var['messages'] = $api_messages . "
" . checkcode($cd); } */ + +/* +function display_section($appname,$title,$file) +{ + $GLOBALS['prefs'][$appname]['title'] = $title; + $GLOBALS['prefs'][$appname]['file'][] = $file; +} + $temp_common = CreateObject('phpgwapi.common'); + + $temp_hooks->process('preferences',array('preferences')); +*/ +// echo '>prefs
';
+//	print_r($GLOBALS['prefs']);
+//	echo '
'; + $tpl->set_var($var); $tpl->pfp('out','navbar'); // If the application has a header include, we now include it @@ -124,7 +139,7 @@ $GLOBALS[$class]->header(); } } - $GLOBALS['phpgw']->common->hook('after_navbar'); + $GLOBALS['phpgw']->hooks->process('after_navbar'); return; } @@ -147,6 +162,6 @@ . $GLOBALS['phpgw']->common->show_date(time(),'d, Y') ); $tpl->set_var($var); - $GLOBALS['phpgw']->common->hook('navbar_end'); + $GLOBALS['phpgw']->hooks->process('navbar_end'); echo $tpl->pfp('out','footer'); } diff --git a/phpgwapi/templates/linux-at-work.de/navbar.inc.php b/phpgwapi/templates/linux-at-work.de/navbar.inc.php index 2b1b95561a..753d203baf 100644 --- a/phpgwapi/templates/linux-at-work.de/navbar.inc.php +++ b/phpgwapi/templates/linux-at-work.de/navbar.inc.php @@ -133,7 +133,7 @@ $GLOBALS[$class]->header(); } } - $GLOBALS['phpgw']->common->hook('after_navbar'); + $GLOBALS['phpgw']->hooks->process('after_navbar'); return; } @@ -162,6 +162,6 @@ $tpl->set_var('V_powered_bottom',''); } - $GLOBALS['phpgw']->common->hook('navbar_end'); + $GLOBALS['phpgw']->hooks->process('navbar_end'); $tpl->pfp('out','footer'); } diff --git a/phpgwapi/templates/verdilak/navbar.inc.php b/phpgwapi/templates/verdilak/navbar.inc.php index 47d611003a..48b90714ad 100644 --- a/phpgwapi/templates/verdilak/navbar.inc.php +++ b/phpgwapi/templates/verdilak/navbar.inc.php @@ -131,7 +131,7 @@ $GLOBALS[$class]->header(); } } - $GLOBALS['phpgw']->common->hook('after_navbar'); + $GLOBALS['phpgw']->hooks->process('after_navbar'); return; } @@ -150,6 +150,6 @@ 'version' => $GLOBALS['phpgw_info']['server']['versions']['phpgwapi'] ); $tpl->set_var($var); - $GLOBALS['phpgw']->common->hook('navbar_end'); + $GLOBALS['phpgw']->hooks->process('navbar_end'); echo $tpl->pfp('out','footer'); } diff --git a/preferences/index.php b/preferences/index.php index b1e3805d4e..da2b201224 100755 --- a/preferences/index.php +++ b/preferences/index.php @@ -133,7 +133,7 @@ section_end(); } - $phpgw->common->hook('preferences',array('preferences')); + $phpgw->hooks->process('preferences',array('preferences')); $pref_tpl->pfp('out','list'); $phpgw->common->phpgw_footer(); ?> diff --git a/preferences/preferences.php b/preferences/preferences.php index 34f91a34d5..fef945b0c9 100755 --- a/preferences/preferences.php +++ b/preferences/preferences.php @@ -292,14 +292,14 @@ if ($GLOBALS['HTTP_GET_VARS']['appname'] == 'preferences') { - if (! $GLOBALS['phpgw']->common->hook_single('settings','preferences',True)) + if (! $GLOBALS['phpgw']->hooks->single('settings','preferences',True)) { $error = True; } } else { - if (! $GLOBALS['phpgw']->common->hook_single('settings',$GLOBALS['HTTP_GET_VARS']['appname'])) + if (! $GLOBALS['phpgw']->hooks->single('settings',$GLOBALS['HTTP_GET_VARS']['appname'])) { $error = True; } diff --git a/setup/config.php b/setup/config.php index f699b3b442..b240c94dc7 100644 --- a/setup/config.php +++ b/setup/config.php @@ -176,7 +176,7 @@ $t->set_var('row_off', 'EEEEEE'); $vars = $t->get_undefined('body'); - $GLOBALS['phpgw']->common->hook_single('config',$cfg_app); + $GLOBALS['phpgw']->hooks->single('config',$cfg_app); while (list($null,$value) = each($vars)) { diff --git a/setup/ldapimport.php b/setup/ldapimport.php index 1c914361a0..73520bd70b 100644 --- a/setup/ldapimport.php +++ b/setup/ldapimport.php @@ -326,7 +326,7 @@ @reset($s_apps); while (list($key,$app) = each($s_apps)) { - $phpgw->common->hook_single('add_def_pref',$app); + $phpgw->hooks->single('add_def_pref',$app); } $pref->save_repository(); }