[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Phpgroupware-cvs] CVS: admin/inc class.boapplications.inc.php,1.7,1.8 c
From: |
Ralf Becker <address@hidden> |
Subject: |
[Phpgroupware-cvs] CVS: admin/inc class.boapplications.inc.php,1.7,1.8 class.uiapplications.inc.php,1.8,1.9 hook_admin.inc.php,1.31,1.32 |
Date: |
Sun, 27 Apr 2003 18:26:06 -0400 |
Update of /cvsroot/phpgroupware/admin/inc
In directory subversions:/tmp/cvs-serv21097
Modified Files:
class.boapplications.inc.php class.uiapplications.inc.php
hook_admin.inc.php
Log Message:
new type of hooks via methodes instead of separate files:
- allows to parse arguments ot the hook and return content
- all access to the hook-table is now handled by the hook-class (for admin and
setup too)
- all existing hooks continue to work of cause
Index: class.boapplications.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/admin/inc/class.boapplications.inc.php,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -r1.7 -r1.8
*** class.boapplications.inc.php 28 Sep 2002 20:01:43 -0000 1.7
--- class.boapplications.inc.php 27 Apr 2003 22:26:04 -0000 1.8
***************
*** 14,21 ****
class boapplications
{
- var $public_functions = array(
- 'register_all_hooks' => True
- );
-
var $so;
--- 14,17 ----
***************
*** 58,96 ****
{
return $this->so->delete($app_name);
- }
-
- function register_hook($hook_app)
- {
- return $this->so->register_hook($hook_app);
- }
-
- function register_all_hooks()
- {
- $SEP = filesystem_separator();
- $app_list = $this->get_list();
- $hooks = CreateObject('phpgwapi.hooks');
- while(list($app_name,$app) = each($app_list))
- {
- $f = PHPGW_SERVER_ROOT . $SEP . $app_name .
$SEP . 'setup' . $SEP . 'setup.inc.php';
- if(@file_exists($f))
- {
- include($f);
-
while(is_array($setup_info[$app_name]['hooks']) && list(,$hook) =
@each($setup_info[$app_name]['hooks']))
- {
-
if(address@hidden>found_hooks[$app_name][$hook])
- {
- $this->register_hook(
- Array(
-
'app_name' => $app_name,
- 'hook'
=> $hook
- )
- );
- }
- }
- }
- }
- Header('Location:
'.$GLOBALS['phpgw']->link('/admin/index.php'));
- $GLOBALS['phpgw_info']['flags']['nodisplay'] = True;
- exit;
}
}
--- 54,57 ----
Index: class.uiapplications.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/admin/inc/class.uiapplications.inc.php,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -r1.8 -r1.9
*** class.uiapplications.inc.php 9 Mar 2003 15:09:33 -0000 1.8
--- class.uiapplications.inc.php 27 Apr 2003 22:26:04 -0000 1.9
***************
*** 18,22 ****
'add' => True,
'edit' => True,
! 'delete' => True
);
--- 18,23 ----
'add' => True,
'edit' => True,
! 'delete' => True,
! 'register_all_hooks' => True
);
***************
*** 338,341 ****
--- 339,353 ----
$GLOBALS['phpgw']->template->set_var('yes','<a href="'
.
$GLOBALS['phpgw']->link('/index.php','menuaction=admin.uiapplications.delete&app_name='
. urlencode($app_name) . "&confirm=True") . '">' . lang('Yes') . '</a>');
$GLOBALS['phpgw']->template->pparse('out','body');
+ }
+
+ function register_all_hooks()
+ {
+ if (!is_object($GLOBALS['phpgw']->hooks))
+ {
+ $GLOBALS['phpgw']->hooks =
CreateObject('phpgwapi.hooks');
+ }
+ $GLOBALS['phpgw']->hooks->register_all_hooks();
+
+ $GLOBALS['phpgw']->redirect_link('/admin/index.php');
}
}
Index: hook_admin.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/admin/inc/hook_admin.inc.php,v
retrieving revision 1.31
retrieving revision 1.32
diff -C2 -r1.31 -r1.32
*** hook_admin.inc.php 24 Apr 2003 01:20:52 -0000 1.31
--- hook_admin.inc.php 27 Apr 2003 22:26:04 -0000 1.32
***************
*** 63,67 ****
if (! $GLOBALS['phpgw']->acl->check('appreg_access',1,'admin'))
{
! $file['Find and Register all Application Hooks'] =
$GLOBALS['phpgw']->link('/index.php','menuaction=admin.boapplications.register_all_hooks');
}
--- 63,67 ----
if (! $GLOBALS['phpgw']->acl->check('appreg_access',1,'admin'))
{
! $file['Find and Register all Application Hooks'] =
$GLOBALS['phpgw']->link('/index.php','menuaction=admin.uiapplications.register_all_hooks');
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Phpgroupware-cvs] CVS: admin/inc class.boapplications.inc.php,1.7,1.8 class.uiapplications.inc.php,1.8,1.9 hook_admin.inc.php,1.31,1.32,
Ralf Becker <address@hidden> <=
- Prev by Date:
[Phpgroupware-cvs] CVS: phpgwapi/inc class.hooks.inc.php,1.14,1.15 class.setup.inc.php,1.15,1.16
- Next by Date:
[Phpgroupware-cvs] CVS: infolog/templates/default admin.tpl,1.3,1.4
- Previous by thread:
[Phpgroupware-cvs] CVS: phpgwapi/inc class.hooks.inc.php,1.14,1.15 class.setup.inc.php,1.15,1.16
- Next by thread:
[Phpgroupware-cvs] CVS: infolog/templates/default admin.tpl,1.3,1.4
- Index(es):