diff --git a/phpgwapi/phpgw_common.inc.php b/phpgwapi/phpgw_common.inc.php
index c30e343896..4567f7df1d 100644
--- a/phpgwapi/phpgw_common.inc.php
+++ b/phpgwapi/phpgw_common.inc.php
@@ -621,26 +621,26 @@
return $e_password;
}
-
function hook($location = "", $order = ""){
global $phpgw, $phpgw_info;
if ($order == ""){$order[] = $phpgw_info["flags"]["currentapp"];}
- /* First include the apps own hook file */
+ /* First include the ordered apps hook file */
reset ($order);
- while (list ($key, $appname) = each ($order)){
+ while (list (, $appname) = each ($order)){
$f = $phpgw_info["server"]["server_root"] . "/" . $appname . "/inc/hook_".$phpgw_info["flags"]["currentapp"];
if ($location != ""){$f .= "_".$location.".inc.php";}else{$f .= ".inc.php"; }
if (file_exists($f)) {include($f);}
$processed .= '|| $appname != "'.$appname.'" ';
}
$processed = 'if ($appname != "" '.$processed.'){';
-echo "processed: ".$processed."
\n";
+//echo "processed: ".$processed."
\n";
+
/* Then add the rest */
reset ($phpgw_info["user"]["app_perms"]);
while (list (, $appname) = each ($phpgw_info["user"]["app_perms"])){
-if ($appname != "" ){
//eval($processed);
+ if ($appname != "" ){
$f = $phpgw_info["server"]["server_root"] . "/" . $appname . "/inc/hook_".$phpgw_info["flags"]["currentapp"];
if ($location != ""){$f .= "_".$location.".inc.php";}else{$f .= ".inc.php"; }
if (file_exists($f)) {include($f);}
diff --git a/preferences/index.php b/preferences/index.php
index c49fadf3ec..510e227002 100755
--- a/preferences/index.php
+++ b/preferences/index.php
@@ -37,7 +37,10 @@
echo "\n\n";
}
- $phpgw->common->hook();
+ $order[] = "notes";
+ $order[] = "email";
+ $order[] = "preferences";
+ $phpgw->common->hook("",$order);
$phpgw->common->phpgw_footer();
?>