Update of /cvsroot/openfirst/base/includes
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv32023/includes
Modified Files:
globals.php modules.php
Log Message:
fixes, etc.
Added $usingPHP5
Index: globals.php
===================================================================
RCS file: /cvsroot/openfirst/base/includes/globals.php,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** globals.php 26 May 2005 23:26:31 -0000 1.3
--- globals.php 27 May 2005 00:02:24 -0000 1.4
***************
*** 54,57 ****
--- 54,60 ----
}
+ #Because of the differences between versions, this may be needed.
+ $usingPHP5 = version_compare(PHP_VERSION, '5.0.0', '>=');
+
require_once('compatibility.php');
Index: modules.php
===================================================================
RCS file: /cvsroot/openfirst/base/includes/modules.php,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** modules.php 26 May 2005 23:37:54 -0000 1.3
--- modules.php 27 May 2005 00:02:24 -0000 1.4
***************
*** 60,64 ****
unset($hXML);
! $this->mIncludes = array()
// Handle includes
$IncludeTags = $this->mIncludesTag->Contents;
--- 60,64 ----
unset($hXML);
! $this->mIncludes = array();
// Handle includes
$IncludeTags = $this->mIncludesTag->Contents;
***************
*** 120,124 ****
$this->mRootElement =& $this->mxmlCurTag;
} else {
- $ClassName = $xmlClassNames[''];
$this->mxmlCurTag =& new xmlElement($name, $attrs, $this);
}
--- 120,123 ----
***************
*** 163,167 ****
function characterData($parser, $data) {
! $this->mxmlCurTag =& $this->mxmlCurTag->addCData($data);
}
}
--- 162,166 ----
function characterData($parser, $data) {
! $this->mxmlCurTag->addCData($data);
}
}
***************
*** 170,174 ****
var $Name, $Attributes, $Contents, $parent;
! /*public*/ function Element($Name, $Attributes, &$ParentElement=null) {
$this->Name = $Name;
$this->Attributes = $Attributes;
--- 169,173 ----
var $Name, $Attributes, $Contents, $parent;
! /*public*/ function xmlElement($Name, $Attributes, &$ParentElement=null) {
$this->Name = $Name;
$this->Attributes = $Attributes;
***************
*** 178,181 ****
--- 177,184 ----
/*public*/ function addCData($Text) {
+ if (count($this->Contents) == 0) {
+ $this->Contents[] = $Text;
+ return;
+ }
end($this->Contents);
if (is_object(current($this->Contents))) {
***************
*** 189,193 ****
global $xmlClassNames;
$ClassName = $xmlClassNames['Element'];
! return $this->Contents[] =& new $ClassName($Name, $Attrs, &$this);
}
--- 192,196 ----
global $xmlClassNames;
$ClassName = $xmlClassNames['Element'];
! return $this->Contents[] =& new xmlElement($Name, $Attrs, &$this);
}
|