Index: temp_moodle_dev/lamstwo/lib.php =================================================================== diff -u -r7be5a6fd3dcd0517005c9c7368ab026439e6b003 -r997c59ccd6e9bdb33daf14f883336a9eecd80027 --- temp_moodle_dev/lamstwo/lib.php (.../lib.php) (revision 7be5a6fd3dcd0517005c9c7368ab026439e6b003) +++ temp_moodle_dev/lamstwo/lib.php (.../lib.php) (revision 997c59ccd6e9bdb33daf14f883336a9eecd80027) @@ -255,7 +255,7 @@ $xml = utf8_encode($xml); - $domdoc = new XML(); + $domdoc = new LAMSTWO_XML(); $domdoc->parseXML($xml); $root = $domdoc->firstChild; return lamstwo_process_node($root) . ']'; @@ -277,6 +277,8 @@ */ function lamstwo_process_node($node) { + $output = ''; + if ($node->nodeName == 'Folder') { $folder_name = preg_replace("/'/", "$1\'", $node->getAttribute('name')); Index: temp_moodle_dev/lamstwo/lib.xml.inc.php =================================================================== diff -u -r3253266e7813e33b87b513a586c77741ac9b24d8 -r997c59ccd6e9bdb33daf14f883336a9eecd80027 --- temp_moodle_dev/lamstwo/lib.xml.inc.php (.../lib.xml.inc.php) (revision 3253266e7813e33b87b513a586c77741ac9b24d8) +++ temp_moodle_dev/lamstwo/lib.xml.inc.php (.../lib.xml.inc.php) (revision 997c59ccd6e9bdb33daf14f883336a9eecd80027) @@ -21,14 +21,19 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. + + Modify on 07-Jan-2008 to avoid collision with constants introduced by other + PHP libraries added in Moodle 1.9.x + + ***************************************************************************/ // Define element type constants - define('XML_ELEMENT_NODE', 1); - define('XML_TEXT_NODE', 3); - define('XML_CDATA_SECTION_NODE', 4); - define('XML_COMMENT_NODE', 8); - define('XML_DOCUMENT_NODE', 9); + define('LAMSTWO_XML_ELEMENT_NODE', 1); + define('LAMSTWO_XML_TEXT_NODE', 3); + define('LAMSTWO_XML_CDATA_SECTION_NODE', 4); + define('LAMSTWO_XML_COMMENT_NODE', 8); + define('LAMSTWO_XML_DOCUMENT_NODE', 9); // Define exceptions codes define('XML_INDEX_SIZE_ERR', 1); @@ -288,7 +293,7 @@ function XML_Element($tagName) { $this->XML_Node(); $this->nodeName = $tagName; - $this->nodeType = XML_ELEMENT_NODE; + $this->nodeType = LAMSTWO_XML_ELEMENT_NODE; } // Retrieves an attribute value by name @@ -472,7 +477,7 @@ $this->nodeName = '#comment'; $this->nodeValue = $comment; - $this->nodeType = XML_COMMENT_NODE; + $this->nodeType = LAMSTWO_XML_COMMENT_NODE; } function toString($pretty = false, $tabs = '') { @@ -506,7 +511,7 @@ $this->nodeName = '#text'; $this->nodeValue = $text; - $this->nodeType = XML_TEXT_NODE; + $this->nodeType = LAMSTWO_XML_TEXT_NODE; } function splitText($offset) { @@ -541,7 +546,7 @@ function XML_CDATASection($data) { $this->nodeName = '#cdata-section'; $this->nodeValue = $data; - $this->nodeType = XML_CDATA_SECTION_NODE; + $this->nodeType = LAMSTWO_XML_CDATA_SECTION_NODE; } function toString($pretty = false, $tabs = '') { @@ -571,7 +576,7 @@ function XML_Document() { $this->XML_Node(); $this->nodeName = '#document'; - $this->nodeType = XML_DOCUMENT_NODE; + $this->nodeType = LAMSTWO_XML_DOCUMENT_NODE; } function &createCDATASection($data) { @@ -651,10 +656,10 @@ * * @package phpdomxml */ - class XML extends XML_Document { + class LAMSTWO_XML extends XML_Document { // Constructor - function XML($url = '') { + function LAMSTWO_XML($url = '') { // call parent's constructor $this->XML_Document(); Index: temp_moodle_dev/lamstwo/mod.html =================================================================== diff -u -rb6205710a89480f480f0e48d485a2e7278dcdfe5 -r997c59ccd6e9bdb33daf14f883336a9eecd80027 --- temp_moodle_dev/lamstwo/mod.html (.../mod.html) (revision b6205710a89480f480f0e48d485a2e7278dcdfe5) +++ temp_moodle_dev/lamstwo/mod.html (.../mod.html) (revision 997c59ccd6e9bdb33daf14f883336a9eecd80027) @@ -43,7 +43,8 @@ '; }else{ echo '
'; @@ -92,7 +93,7 @@
'; }else{ echo '