[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.15,1.16
From: |
Ralf Becker <address@hidden> |
Subject: |
[Phpgroupware-cvs] CVS: phpgwapi/inc class.hooks.inc.php,1.15,1.16 |
Date: |
Mon, 28 Apr 2003 04:23:53 -0400 |
Update of /cvsroot/phpgroupware/phpgwapi/inc
In directory subversions:/tmp/cvs-serv8641
Modified Files:
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.15
retrieving revision 1.16
diff -C2 -r1.15 -r1.16
*** class.hooks.inc.php 27 Apr 2003 22:25:36 -0000 1.15
--- class.hooks.inc.php 28 Apr 2003 08:23:51 -0000 1.16
***************
*** 109,118 ****
@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))
{
--- 109,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
+ @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))
{
***************
*** 129,133 ****
/* First include the ordered apps hook file */
! if (isset($this->found_hooks[$appname][$location]))
{
$parts = explode('.',$method =
$this->found_hooks[$appname][$location]);
--- 130,134 ----
/* First include the ordered apps hook file */
! if (isset($this->found_hooks[$appname][$location]) ||
$try_unregistered)
{
$parts = explode('.',$method =
$this->found_hooks[$appname][$location]);
***************
*** 135,138 ****
--- 136,143 ----
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.15,1.16,
Ralf Becker <address@hidden> <=