[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Phpgroupware-cvs] CVS: phpgwapi/inc class.hooks.inc.php,1.10.4.1,1.10.4
From: |
Ralf Becker <address@hidden> |
Subject: |
[Phpgroupware-cvs] CVS: phpgwapi/inc class.hooks.inc.php,1.10.4.1,1.10.4.2 |
Date: |
Mon, 28 Apr 2003 04:22:10 -0400 |
Update of /cvsroot/phpgroupware/phpgwapi/inc
In directory subversions:/tmp/cvs-serv6713
Modified Files:
Tag: Version-0_9_16-branch
class.hooks.inc.php
Log Message:
added param try_unregistered to hooks::single for setup
Index: class.hooks.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/phpgwapi/inc/class.hooks.inc.php,v
retrieving revision 1.10.4.1
retrieving revision 1.10.4.2
diff -C2 -r1.10.4.1 -r1.10.4.2
*** class.hooks.inc.php 27 Apr 2003 21:31:52 -0000 1.10.4.1
--- class.hooks.inc.php 28 Apr 2003 08:22:07 -0000 1.10.4.2
***************
*** 110,119 ****
@param $args is passed to the hook, if its a new method-hook
@param $no_permission_check if True execute all hooks, not only
the ones a user has rights to
@note $no_permission_check should *ONLY* be used when it *HAS*
to be. (jengo)
@returns False if no hook exists, True if an old hook exist and
whatever the new method-hook returns
*/
! function single($args, $appname = '', $no_permission_check =
False)
{
! //echo "<p>hooks::single("; print_r($args); echo
",'$appname')</p>\n";
if (is_array($args))
{
--- 110,120 ----
@param $args is passed to the hook, if its a new method-hook
@param $no_permission_check if True execute all hooks, not only
the ones a user has rights to
+ @param $try_unregisterd If true, try to include old file-hook
anyway (for setup)
@note $no_permission_check should *ONLY* be used when it *HAS*
to be. (jengo)
@returns False if no hook exists, True if an old hook exist and
whatever the new method-hook returns
*/
! function single($args, $appname = '', $no_permission_check =
False,$try_unregistered = False)
{
! //echo "<p>hooks::single("; print_r($args); echo
",'$appname','$no_permission_check','$try_unregistered')</p>\n";
if (is_array($args))
{
***************
*** 131,135 ****
/* First include the ordered apps hook file */
! if (isset($this->found_hooks[$appname][$location]))
{
$parts = explode('.',$method =
$this->found_hooks[$appname][$location]);
--- 132,136 ----
/* First include the ordered apps hook file */
! if (isset($this->found_hooks[$appname][$location]) ||
$try_unregistered)
{
$parts = explode('.',$method =
$this->found_hooks[$appname][$location]);
***************
*** 137,140 ****
--- 138,145 ----
if (count($parts) != 3 || ($parts[1] == 'inc'
&& $parts[2] == 'php'))
{
+ if ($try_unregistered &&
empty($methode))
+ {
+ $method =
'hook_'.$location.'.inc.php';
+ }
$f = PHPGW_SERVER_ROOT . $SEP .
$appname . $SEP . 'inc' . $SEP . $method;
if (file_exists($f) &&
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Phpgroupware-cvs] CVS: phpgwapi/inc class.hooks.inc.php,1.10.4.1,1.10.4.2,
Ralf Becker <address@hidden> <=