[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Phpgroupware-cvs] phpgwapi/inc class.ofphpgwapi.inc.php common_fu...
From: |
Dave Hall |
Subject: |
[Phpgroupware-cvs] phpgwapi/inc class.ofphpgwapi.inc.php common_fu... |
Date: |
Tue, 29 Aug 2006 04:24:29 +0000 |
CVSROOT: /cvsroot/phpgwapi
Module name: phpgwapi
Changes by: Dave Hall <skwashd> 06/08/29 04:24:29
Modified files:
inc : class.ofphpgwapi.inc.php
common_functions.inc.php functions.inc.php
Log message:
make this code cleaner
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/phpgwapi/inc/class.ofphpgwapi.inc.php?cvsroot=phpgwapi&r1=1.3&r2=1.4
http://cvs.savannah.gnu.org/viewcvs/phpgwapi/inc/common_functions.inc.php?cvsroot=phpgwapi&r1=1.21&r2=1.22
http://cvs.savannah.gnu.org/viewcvs/phpgwapi/inc/functions.inc.php?cvsroot=phpgwapi&r1=1.193&r2=1.194
Patches:
Index: class.ofphpgwapi.inc.php
===================================================================
RCS file: /cvsroot/phpgwapi/phpgwapi/inc/class.ofphpgwapi.inc.php,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -b -r1.3 -r1.4
--- class.ofphpgwapi.inc.php 19 May 2005 10:05:27 -0000 1.3
+++ class.ofphpgwapi.inc.php 29 Aug 2006 04:24:29 -0000 1.4
@@ -7,7 +7,7 @@
* @license http://www.fsf.org/licenses/gpl.html GNU General Public
License
* @package phpgwapi
* @subpackage application
- * @version $Id: class.ofphpgwapi.inc.php,v 1.3 2005/05/19 10:05:27
fipsfuchs Exp $
+ * @version $Id: class.ofphpgwapi.inc.php,v 1.4 2006/08/29 04:24:29
skwashd Exp $
*/
/**
Index: common_functions.inc.php
===================================================================
RCS file: /cvsroot/phpgwapi/phpgwapi/inc/common_functions.inc.php,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -b -r1.21 -r1.22
--- common_functions.inc.php 6 Aug 2006 04:51:26 -0000 1.21
+++ common_functions.inc.php 29 Aug 2006 04:24:29 -0000 1.22
@@ -7,7 +7,7 @@
* @license http://www.fsf.org/licenses/lgpl.html GNU Lesser General
Public License
* @package phpgwapi
* @subpackage utilities
- * @version $Id: common_functions.inc.php,v 1.21 2006/08/06 04:51:26
skwashd Exp $
+ * @version $Id: common_functions.inc.php,v 1.22 2006/08/29 04:24:29
skwashd Exp $
*/
/****************************************************************************\
@@ -473,9 +473,7 @@
*/
function include_class($appName, $className, $classPath='inc/')
{
- $fileName =
PHPGW_INCLUDE_ROOT.'/'.$appName.'/'.$classPath.'class.'.$className.'.inc.php';
- $included_files = get_included_files();
-
+ $fileName = PHPGW_INCLUDE_ROOT .
"/{$appName}/{$classPath}class.{$className}.inc.php";
if (!isset($included_files[$fileName]))
{
if(@file_exists($fileName))
@@ -518,18 +516,21 @@
list($appname,$classname) = explode('.', $class, 2);
- // include app object factory class
$of_classname = 'of'.$appname;
// include module object factory class
if (!include_class($appname, $of_classname))
{
// fail to load module object factory -> use old
CreateObject in base class
- $of_classname = 'object_factory';
+ $of_class = new object_factory();
+ }
+ else
+ {
+ $of_class = new $of_classname;
}
// because $of_classname::CreateObject() is not allowed, we use
call_user_func
- return call_user_func(array($of_classname,
'CreateObject'),$class,$p1,$p2,$p3,$p4,$p5,$p6,$p7,$p8,$p9,$p10,$p11,$p12,$p13,$p14,$p15,$p16);
+ return $of_class->createObject($class,
$p1,$p2,$p3,$p4,$p5,$p6,$p7,$p8,$p9,$p10,$p11,$p12,$p13,$p14,$p15,$p16);
}
/*!
Index: functions.inc.php
===================================================================
RCS file: /cvsroot/phpgwapi/phpgwapi/inc/functions.inc.php,v
retrieving revision 1.193
retrieving revision 1.194
diff -u -b -r1.193 -r1.194
--- functions.inc.php 6 Aug 2006 04:51:26 -0000 1.193
+++ functions.inc.php 29 Aug 2006 04:24:29 -0000 1.194
@@ -7,7 +7,7 @@
* @license http://www.fsf.org/licenses/lgpl.html GNU Lesser General
Public License
* @package phpgwapi
* @subpackage utilities
- * @version $Id: functions.inc.php,v 1.193 2006/08/06 04:51:26 skwashd
Exp $
+ * @version $Id: functions.inc.php,v 1.194 2006/08/29 04:24:29 skwashd
Exp $
*/
@@ -263,18 +263,13 @@
print_debug('main class loaded', 'messageonly','api');
// This include was here before for the old error class. I've left it
in for the
// new log_message class with replaced error. I'm not sure if it is
needed, though. -doug
- if (!
isset($GLOBALS['phpgw_info']['flags']['included_classes']['log_message']) ||
- !
$GLOBALS['phpgw_info']['flags']['included_classes']['log_message'])
- {
include_once(PHPGW_INCLUDE_ROOT.'/phpgwapi/inc/class.log_message.inc.php');
-
$GLOBALS['phpgw_info']['flags']['included_classes']['log_message'] = True;
- }
/****************************************************************************\
* This is a global constant that should be used
*
* instead of / or \ in file paths
*
\****************************************************************************/
- define('SEP',filesystem_separator());
+ define('SEP', filesystem_separator());
/*****************************************************************************\
* ACL defines - moved here to work for xml-rpc/soap, also
*
@@ -505,4 +500,4 @@
}
}
- error_reporting(E_ERROR | E_WARNING | E_PARSE);
+ //error_reporting(E_ERROR | E_WARNING | E_PARSE);
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Phpgroupware-cvs] phpgwapi/inc class.ofphpgwapi.inc.php common_fu...,
Dave Hall <=