[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Phpgroupware-cvs] api class.phpgw.php,1.1.1.1.2.27,1.1.1.1.2.28
From: |
Joseph Engo <address@hidden> |
Subject: |
[Phpgroupware-cvs] api class.phpgw.php,1.1.1.1.2.27,1.1.1.1.2.28 |
Date: |
Mon, 03 Nov 2003 13:27:41 +0000 |
Update of /cvsroot/phpgroupware/api
In directory subversions:/tmp/cvs-serv11316/api
Modified Files:
Tag: proposal-branch
class.phpgw.php
Log Message:
If a file doesn't exist, it was spitting out PHP warnings and not giving the
API to return a "nice" error message
Index: class.phpgw.php
===================================================================
RCS file: /cvsroot/phpgroupware/api/class.phpgw.php,v
retrieving revision 1.1.1.1.2.27
retrieving revision 1.1.1.1.2.28
diff -C2 -d -r1.1.1.1.2.27 -r1.1.1.1.2.28
*** class.phpgw.php 3 Nov 2003 13:20:37 -0000 1.1.1.1.2.27
--- class.phpgw.php 3 Nov 2003 13:27:38 -0000 1.1.1.1.2.28
***************
*** 277,311 ****
{
list($appname,$classname,$method) =
explode(".",$GLOBALS['phpgw_data']['api']['op']);
- require_once(PHPGW_ROOT . SEP . $appname . SEP
. 'class.' . $classname . '.php');
! if
(isset($GLOBALS['docs'][$appname]['classes'][$appname . '_' .
$classname]['functions'][$method]['title']))
! {
! $_title =
lang($GLOBALS['docs'][$appname]['classes'][$appname.'_'.$classname]['functions'][$method]['title']);
! }
! else
{
! $_title =
$GLOBALS['phpgw_data']['api']['op'];
! }
! foreach
($GLOBALS['docs'][$appname]['classes'][$appname . '_' .
$classname]['functions'][$method]['params'] as $key => $params)
! {
! // print_r($params);
! $data[$key] =
get_var($key,'any',$params['type'],$params['default']);
! // echo "$key - " .
get_var($key,'any',$params['type'],$params['default']) . "\n";
! }
! if ($GLOBALS['phpgw_data']['api']['op'] !=
'api.base.op_history_redirect')
! {
!
$GLOBALS['phpgw_session']['phpgw_data']['op_history'][] = array(
! 'title' => $_title,
! 'op' =>
$GLOBALS['phpgw_data']['api']['op'],
! 'data' => $data
! );
! }
! if
(count($GLOBALS['phpgw_session']['phpgw_data']['op_history']) > 5 &&
$GLOBALS['phpgw_data']['api']['op'] != 'api.base.op_history_redirect')
! {
!
array_shift($GLOBALS['phpgw_session']['phpgw_data']['op_history']);
}
}
--- 277,313 ----
{
list($appname,$classname,$method) =
explode(".",$GLOBALS['phpgw_data']['api']['op']);
! // If it doesn't exist, don't spit out any
errors or PHP warnings, the API handles that later on
! if (file_exists(PHPGW_ROOT . SEP . $appname .
SEP . 'class.' . $classname . '.php'))
{
! require_once(PHPGW_ROOT . SEP .
$appname . SEP . 'class.' . $classname . '.php');
! if
(isset($GLOBALS['docs'][$appname]['classes'][$appname . '_' .
$classname]['functions'][$method]['title']))
! {
! $_title =
lang($GLOBALS['docs'][$appname]['classes'][$appname.'_'.$classname]['functions'][$method]['title']);
! }
! else
! {
! $_title =
$GLOBALS['phpgw_data']['api']['op'];
! }
+ foreach
($GLOBALS['docs'][$appname]['classes'][$appname . '_' .
$classname]['functions'][$method]['params'] as $key => $params)
+ {
+ $data[$key] =
get_var($key,'any',$params['type'],$params['default']);
+ }
! if ($GLOBALS['phpgw_data']['api']['op']
!= 'api.base.op_history_redirect')
! {
!
$GLOBALS['phpgw_session']['phpgw_data']['op_history'][] = array(
! 'title' => $_title,
! 'op' =>
$GLOBALS['phpgw_data']['api']['op'],
! 'data' => $data
! );
! }
! if
(count($GLOBALS['phpgw_session']['phpgw_data']['op_history']) > 5 &&
$GLOBALS['phpgw_data']['api']['op'] != 'api.base.op_history_redirect')
! {
!
array_shift($GLOBALS['phpgw_session']['phpgw_data']['op_history']);
! }
}
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Phpgroupware-cvs] api class.phpgw.php,1.1.1.1.2.27,1.1.1.1.2.28,
Joseph Engo <address@hidden> <=
- Prev by Date:
[Phpgroupware-cvs] api class.account_mgr.php, 1.1.2.14, 1.1.2.15 class.admin.php, 1.1.2.7, 1.1.2.8 class.base.php, 1.1.1.1.2.17, 1.1.1.1.2.18 class.phpgw.php, 1.1.1.1.2.26, 1.1.1.1.2.27
- Next by Date:
[Phpgroupware-cvs] api class.base.php, 1.1.1.1.2.18, 1.1.1.1.2.19 class.phpgw.php, 1.1.1.1.2.28, 1.1.1.1.2.29 starter.inc.php, 1.1.1.1.2.18, 1.1.1.1.2.19
- Previous by thread:
[Phpgroupware-cvs] api class.account_mgr.php, 1.1.2.14, 1.1.2.15 class.admin.php, 1.1.2.7, 1.1.2.8 class.base.php, 1.1.1.1.2.17, 1.1.1.1.2.18 class.phpgw.php, 1.1.1.1.2.26, 1.1.1.1.2.27
- Next by thread:
[Phpgroupware-cvs] api class.base.php, 1.1.1.1.2.18, 1.1.1.1.2.19 class.phpgw.php, 1.1.1.1.2.28, 1.1.1.1.2.29 starter.inc.php, 1.1.1.1.2.18, 1.1.1.1.2.19
- Index(es):