Replace all remaining reference to XeXmlParser in ttimport.class.php

This commit is contained in:
Kijin Sung 2025-05-19 21:54:09 +09:00
parent ec6ade4e26
commit ba638c394d

View file

@ -13,12 +13,6 @@
*/
class ttimport
{
/**
* Xml Parse
* @var XmlParser
*/
var $oXmlParser = null;
/**
* Import data in module.xml format
* @param int $key
@ -33,8 +27,6 @@ class ttimport
*/
function importModule($key, $cur, $index_file, $unit_count, $module_srl, $guestbook_module_srl, $user_id, $module_name=null)
{
// Pre-create the objects needed
$this->oXmlParser = new XeXmlParser();
// Get category information of the target module
$oDocumentController = getController('document');
$oDocumentModel = getModel('document');
@ -45,8 +37,8 @@ class ttimport
$category_file = preg_replace('/index$/i', 'category.xml', $index_file);
if(file_exists($category_file))
{
// Create the xmlParser object
$xmlDoc = $this->oXmlParser->loadXmlFile($category_file);
$xmlDoc = Rhymix\Framework\Parsers\XEXMLParser::loadXmlFile($category_file);
// List category information
if($xmlDoc->categories->category)
{
@ -126,7 +118,7 @@ class ttimport
if($started) $buff .= $str;
}
$xmlDoc = $this->oXmlParser->parse('<post>'.$buff);
$xmlDoc = Rhymix\Framework\Parsers\XEXMLParser::loadXmlString('<post>'.$buff);
$author_xml_id = $xmlDoc->post->author->body;
@ -288,8 +280,8 @@ class ttimport
$guestbook_file = preg_replace('/index$/i', 'guestbook.xml', $index_file);
if(file_exists($guestbook_file))
{
// Create the xmlParser object
$xmlDoc = $this->oXmlParser->loadXmlFile($guestbook_file);
$xmlDoc = Rhymix\Framework\Parsers\XEXMLParser::loadXmlFile($guestbook_file);
// Handle guest book information
if($guestbook_module_srl && $xmlDoc->guestbook->comment)
{
@ -480,7 +472,7 @@ class ttimport
$buff .= '</attachment>';
$xmlDoc = $this->oXmlParser->parse($buff);
$xmlDoc = Rhymix\Framework\Parsers\XEXMLParser::loadXmlString($buff);
$file_obj->source_filename = $xmlDoc->attachment->label->body;
$file_obj->download_count = $xmlDoc->attachment->downloads->body;