--- mambo/branches/4.6/administrator/components/com_templates/admin.templates.php 2006/01/14 13:53:24 128 +++ mambo/branches/4.6/administrator/components/com_templates/admin.templates.php 2006/01/14 18:19:40 129 @@ -19,7 +19,7 @@ require_once( $mainframe->getPath( 'admin_html' ) ); require_once( $mosConfig_absolute_path .'/administrator/components/com_templates/admin.templates.class.php' ); // XML library -require_once( $mosConfig_absolute_path .'/includes/domit/xml_domit_lite_include.php' ); +//require_once( $mosConfig_absolute_path .'/includes/domit/xml_domit_lite_include.php' ); $task = trim( strtolower( mosGetParam( $_REQUEST, "task", "" ) ) ); $cid = mosGetParam( $_REQUEST, "cid", array(0) ); @@ -128,6 +128,9 @@ foreach($xmlFilesInDir as $xmlfile) { // Read the file to see if it's a valid template XML file + $parser =& new mosXMLDescription($dirName.$xmlfile); + if ($parser->getType() != 'template') continue; +/* $xmlDoc =& new DOMIT_Lite_Document(); $xmlDoc->resolveErrors( true ); if (!$xmlDoc->loadXML( $dirName . $xmlfile, false, true )) { @@ -142,10 +145,19 @@ if ($element->getAttribute( 'type' ) != 'template') { continue; } - +*/ $row = new StdClass(); $row->id = $rowid; $row->directory = $templateDir; + + $row->creationdate = $parser->getCreationDate('template'); + $row->name = $parser->getName('template'); + $row->author = $parser->getAuthor('template'); + $row->copyright = $parser->getCopyright('template'); + $row->authorEmail = $parser->getAuthorEmail('template'); + $row->authorUrl = $parser->getAuthorUrl('template'); + $row->version = $parser->getVersion('template'); +/* $element = &$xmlDoc->getElementsByPath('name', 1 ); $row->name = $element->getText(); @@ -166,7 +178,7 @@ $element = &$xmlDoc->getElementsByPath('version', 1); $row->version = $element ? $element->getText() : ''; - +*/ // Get info from db if ($cur_template == $templateDir) { $row->published = 1; @@ -453,4 +465,4 @@ } mosRedirect( 'index2.php?option='. $option .'&task=positions', 'Positions saved' ); } -?> \ No newline at end of file +?>