forked from extern/egroupware
testing out new hooks option
This commit is contained in:
parent
b5e78d4ce4
commit
af99c453fa
@ -621,26 +621,26 @@
|
|||||||
return $e_password;
|
return $e_password;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
function hook($location = "", $order = ""){
|
function hook($location = "", $order = ""){
|
||||||
global $phpgw, $phpgw_info;
|
global $phpgw, $phpgw_info;
|
||||||
|
|
||||||
if ($order == ""){$order[] = $phpgw_info["flags"]["currentapp"];}
|
if ($order == ""){$order[] = $phpgw_info["flags"]["currentapp"];}
|
||||||
/* First include the apps own hook file */
|
/* First include the ordered apps hook file */
|
||||||
reset ($order);
|
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"];
|
$f = $phpgw_info["server"]["server_root"] . "/" . $appname . "/inc/hook_".$phpgw_info["flags"]["currentapp"];
|
||||||
if ($location != ""){$f .= "_".$location.".inc.php";}else{$f .= ".inc.php"; }
|
if ($location != ""){$f .= "_".$location.".inc.php";}else{$f .= ".inc.php"; }
|
||||||
if (file_exists($f)) {include($f);}
|
if (file_exists($f)) {include($f);}
|
||||||
$processed .= '|| $appname != "'.$appname.'" ';
|
$processed .= '|| $appname != "'.$appname.'" ';
|
||||||
}
|
}
|
||||||
$processed = 'if ($appname != "" '.$processed.'){';
|
$processed = 'if ($appname != "" '.$processed.'){';
|
||||||
echo "processed: ".$processed."<br>\n";
|
//echo "processed: ".$processed."<br>\n";
|
||||||
|
|
||||||
/* Then add the rest */
|
/* Then add the rest */
|
||||||
reset ($phpgw_info["user"]["app_perms"]);
|
reset ($phpgw_info["user"]["app_perms"]);
|
||||||
while (list (, $appname) = each ($phpgw_info["user"]["app_perms"])){
|
while (list (, $appname) = each ($phpgw_info["user"]["app_perms"])){
|
||||||
if ($appname != "" ){
|
|
||||||
//eval($processed);
|
//eval($processed);
|
||||||
|
if ($appname != "" ){
|
||||||
$f = $phpgw_info["server"]["server_root"] . "/" . $appname . "/inc/hook_".$phpgw_info["flags"]["currentapp"];
|
$f = $phpgw_info["server"]["server_root"] . "/" . $appname . "/inc/hook_".$phpgw_info["flags"]["currentapp"];
|
||||||
if ($location != ""){$f .= "_".$location.".inc.php";}else{$f .= ".inc.php"; }
|
if ($location != ""){$f .= "_".$location.".inc.php";}else{$f .= ".inc.php"; }
|
||||||
if (file_exists($f)) {include($f);}
|
if (file_exists($f)) {include($f);}
|
||||||
|
@ -37,7 +37,10 @@
|
|||||||
echo "</TD></TR></TABLE>\n\n";
|
echo "</TD></TR></TABLE>\n\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
$phpgw->common->hook();
|
$order[] = "notes";
|
||||||
|
$order[] = "email";
|
||||||
|
$order[] = "preferences";
|
||||||
|
$phpgw->common->hook("",$order);
|
||||||
|
|
||||||
$phpgw->common->phpgw_footer();
|
$phpgw->common->phpgw_footer();
|
||||||
?>
|
?>
|
||||||
|
Loading…
Reference in New Issue
Block a user