mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-03 16:51:40 +09:00
Remove references to old XeXmlParser in most modules
This commit is contained in:
parent
a3d682a294
commit
170e183f8f
5 changed files with 22 additions and 35 deletions
|
|
@ -185,8 +185,7 @@ class Dashboard extends Base
|
||||||
$params["act"] = "getResourceapiLastupdate";
|
$params["act"] = "getResourceapiLastupdate";
|
||||||
$body = \XmlGenerater::generate($params);
|
$body = \XmlGenerater::generate($params);
|
||||||
$buff = FileHandler::getRemoteResource($config->download_server, $body, 3, "POST", "application/xml");
|
$buff = FileHandler::getRemoteResource($config->download_server, $body, 3, "POST", "application/xml");
|
||||||
$xml_lUpdate = new \XeXmlParser();
|
$lUpdateDoc = \Rhymix\Framework\Parsers\XEXMLParser::loadXMLString($buff);
|
||||||
$lUpdateDoc = $xml_lUpdate->parse($buff);
|
|
||||||
$updateDate = $lUpdateDoc->response->updatedate->body;
|
$updateDate = $lUpdateDoc->response->updatedate->body;
|
||||||
|
|
||||||
if(!$updateDate)
|
if(!$updateDate)
|
||||||
|
|
|
||||||
|
|
@ -18,11 +18,6 @@ class importerAdminController extends importer
|
||||||
* @var int
|
* @var int
|
||||||
*/
|
*/
|
||||||
var $unit_count = 300;
|
var $unit_count = 300;
|
||||||
/**
|
|
||||||
* Xml parser
|
|
||||||
* @var XmlParser
|
|
||||||
*/
|
|
||||||
var $oXmlParser = null;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Initialization
|
* Initialization
|
||||||
|
|
@ -346,8 +341,6 @@ class importerAdminController extends importer
|
||||||
function importMember($key, $cur, $index_file)
|
function importMember($key, $cur, $index_file)
|
||||||
{
|
{
|
||||||
if(!$cur) $cur = 0;
|
if(!$cur) $cur = 0;
|
||||||
// Create the xmlParser object
|
|
||||||
$oXmlParser = new XeXmlParser();
|
|
||||||
// Create objects for importing member information
|
// Create objects for importing member information
|
||||||
$this->oMemberController = getController('member');
|
$this->oMemberController = getController('member');
|
||||||
$this->oMemberModel = getModel('member');
|
$this->oMemberModel = getModel('member');
|
||||||
|
|
@ -368,7 +361,7 @@ class importerAdminController extends importer
|
||||||
// Find a given location
|
// Find a given location
|
||||||
$target_file = trim(fgets($f, 1024));
|
$target_file = trim(fgets($f, 1024));
|
||||||
// Load and parse the file
|
// Load and parse the file
|
||||||
$xmlObj = $oXmlParser->loadXmlFile($target_file);
|
$xmlObj = Rhymix\Framework\Parsers\XEXMLParser::loadXMLFile($target_file);
|
||||||
FileHandler::removeFile($target_file);
|
FileHandler::removeFile($target_file);
|
||||||
if(!$xmlObj) continue;
|
if(!$xmlObj) continue;
|
||||||
// List Objects
|
// List Objects
|
||||||
|
|
@ -539,8 +532,6 @@ class importerAdminController extends importer
|
||||||
function importMessage($key, $cur, $index_file)
|
function importMessage($key, $cur, $index_file)
|
||||||
{
|
{
|
||||||
if(!$cur) $cur = 0;
|
if(!$cur) $cur = 0;
|
||||||
// Create the xmlParser object
|
|
||||||
$oXmlParser = new XeXmlParser();
|
|
||||||
// Open an index file
|
// Open an index file
|
||||||
$f = fopen($index_file,"r");
|
$f = fopen($index_file,"r");
|
||||||
// Pass if already read
|
// Pass if already read
|
||||||
|
|
@ -552,7 +543,7 @@ class importerAdminController extends importer
|
||||||
// Find a location
|
// Find a location
|
||||||
$target_file = trim(fgets($f, 1024));
|
$target_file = trim(fgets($f, 1024));
|
||||||
// Load and parse the file
|
// Load and parse the file
|
||||||
$xmlObj = $oXmlParser->loadXmlFile($target_file);
|
$xmlObj = Rhymix\Framework\Parsers\XEXMLParser::loadXMLFile($target_file);
|
||||||
FileHandler::removeFile($target_file);
|
FileHandler::removeFile($target_file);
|
||||||
if(!$xmlObj) continue;
|
if(!$xmlObj) continue;
|
||||||
// List objects
|
// List objects
|
||||||
|
|
@ -638,8 +629,6 @@ class importerAdminController extends importer
|
||||||
*/
|
*/
|
||||||
function importModule($key, $cur, $index_file, $module_srl)
|
function importModule($key, $cur, $index_file, $module_srl)
|
||||||
{
|
{
|
||||||
// Pre-create the objects needed
|
|
||||||
$this->oXmlParser = new XeXmlParser();
|
|
||||||
// Get category information of the target module
|
// Get category information of the target module
|
||||||
$oDocumentController = getController('document');
|
$oDocumentController = getController('document');
|
||||||
$oDocumentModel = getModel('document');
|
$oDocumentModel = getModel('document');
|
||||||
|
|
@ -651,9 +640,7 @@ class importerAdminController extends importer
|
||||||
if(file_exists($category_file))
|
if(file_exists($category_file))
|
||||||
{
|
{
|
||||||
$buff = FileHandler::readFile($category_file);
|
$buff = FileHandler::readFile($category_file);
|
||||||
|
$xmlDoc = Rhymix\Framework\Parsers\XEXMLParser::loadXMLFile($category_file);
|
||||||
// Create the xmlParser object
|
|
||||||
$xmlDoc = $this->oXmlParser->loadXmlFile($category_file);
|
|
||||||
|
|
||||||
$categories = $xmlDoc->items->category;
|
$categories = $xmlDoc->items->category;
|
||||||
if($categories)
|
if($categories)
|
||||||
|
|
@ -757,7 +744,7 @@ class importerAdminController extends importer
|
||||||
if($started) $buff[] = $str;
|
if($started) $buff[] = $str;
|
||||||
}
|
}
|
||||||
|
|
||||||
$xmlDoc = $this->oXmlParser->parse(implode('', $buff));
|
$xmlDoc = Rhymix\Framework\Parsers\XEXMLParser::loadXMLString(implode('', $buff));
|
||||||
|
|
||||||
$category = base64_decode($xmlDoc->post->category->body);
|
$category = base64_decode($xmlDoc->post->category->body);
|
||||||
if($category_titles[$category]) $obj->category_srl = $category_titles[$category];
|
if($category_titles[$category]) $obj->category_srl = $category_titles[$category];
|
||||||
|
|
@ -901,7 +888,7 @@ class importerAdminController extends importer
|
||||||
// If </trackback>, insert to the DB
|
// If </trackback>, insert to the DB
|
||||||
if(trim($str) == '</trackback>')
|
if(trim($str) == '</trackback>')
|
||||||
{
|
{
|
||||||
$xmlDoc = $this->oXmlParser->parse($buff);
|
$xmlDoc = Rhymix\Framework\Parsers\XEXMLParser::loadXMLString($buff);
|
||||||
|
|
||||||
$obj = new stdClass;
|
$obj = new stdClass;
|
||||||
$obj->trackback_srl = getNextSequence();
|
$obj->trackback_srl = getNextSequence();
|
||||||
|
|
@ -963,7 +950,7 @@ class importerAdminController extends importer
|
||||||
// If </comment> is, insert to the DB
|
// If </comment> is, insert to the DB
|
||||||
if(trim($str) == '</comment>')
|
if(trim($str) == '</comment>')
|
||||||
{
|
{
|
||||||
$xmlDoc = $this->oXmlParser->parse($buff);
|
$xmlDoc = Rhymix\Framework\Parsers\XEXMLParser::loadXMLString($buff);
|
||||||
|
|
||||||
$sequence = base64_decode($xmlDoc->comment->sequence->body);
|
$sequence = base64_decode($xmlDoc->comment->sequence->body);
|
||||||
$sequences[$sequence] = $obj->comment_srl;
|
$sequences[$sequence] = $obj->comment_srl;
|
||||||
|
|
@ -1106,7 +1093,7 @@ class importerAdminController extends importer
|
||||||
// If it ends with </attach>, handle attachements
|
// If it ends with </attach>, handle attachements
|
||||||
if(trim($str) == '</attach>')
|
if(trim($str) == '</attach>')
|
||||||
{
|
{
|
||||||
$xmlDoc = $this->oXmlParser->parse($buff.$str);
|
$xmlDoc = Rhymix\Framework\Parsers\XEXMLParser::loadXMLString($buff.$str);
|
||||||
|
|
||||||
$file_obj->source_filename = base64_decode($xmlDoc->attach->filename->body);
|
$file_obj->source_filename = base64_decode($xmlDoc->attach->filename->body);
|
||||||
$file_obj->download_count = base64_decode($xmlDoc->attach->download_count->body);
|
$file_obj->download_count = base64_decode($xmlDoc->attach->download_count->body);
|
||||||
|
|
@ -1250,14 +1237,13 @@ class importerAdminController extends importer
|
||||||
if(!$buff) return array();
|
if(!$buff) return array();
|
||||||
|
|
||||||
$buff = '<extra_vars>'.$buff;
|
$buff = '<extra_vars>'.$buff;
|
||||||
$oXmlParser = new XeXmlParser();
|
$xmlDoc = Rhymix\Framework\Parsers\XEXMLParser::loadXMLString($buff);
|
||||||
$xmlDoc = $this->oXmlParser->parse($buff);
|
|
||||||
if(empty($xmlDoc->extra_vars->key)) return array();
|
if(empty($xmlDoc->extra_vars->key)) return array();
|
||||||
|
|
||||||
$index = 1;
|
$index = 1;
|
||||||
foreach($xmlDoc->extra_vars->key as $k => $v)
|
foreach($xmlDoc->extra_vars->key as $k => $v)
|
||||||
{
|
{
|
||||||
unset($vobj);
|
$vobj = new stdClass();
|
||||||
if($v->var_idx)
|
if($v->var_idx)
|
||||||
{
|
{
|
||||||
$vobj->var_idx = base64_decode($v->var_idx->body);
|
$vobj->var_idx = base64_decode($v->var_idx->body);
|
||||||
|
|
|
||||||
|
|
@ -173,8 +173,7 @@ class krzipModel extends krzip
|
||||||
$request_config
|
$request_config
|
||||||
);
|
);
|
||||||
|
|
||||||
$oXmlParser = new XeXmlParser();
|
$result = Rhymix\Framework\Parsers\XEXMLParser::loadXMLString($buff);
|
||||||
$result = $oXmlParser->parse($buff);
|
|
||||||
if($result->error)
|
if($result->error)
|
||||||
{
|
{
|
||||||
$err_msg = trim($result->error->message->body);
|
$err_msg = trim($result->error->message->body);
|
||||||
|
|
|
||||||
|
|
@ -572,13 +572,17 @@ class LayoutModel extends Layout
|
||||||
return $layout_info;
|
return $layout_info;
|
||||||
}
|
}
|
||||||
// If no cache file exists, parse the xml and then return the variable.
|
// If no cache file exists, parse the xml and then return the variable.
|
||||||
$oXmlParser = new XeXmlParser();
|
$tmp_xml_obj = Rhymix\Framework\Parsers\XEXMLParser::loadXMLFile($xml_file);
|
||||||
$tmp_xml_obj = $oXmlParser->loadXmlFile($xml_file);
|
if (!$tmp_xml_obj)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if($tmp_xml_obj->layout) $xml_obj = $tmp_xml_obj->layout;
|
$xml_obj = !empty($tmp_xml_obj->layout) ? $tmp_xml_obj->layout : $tmp_xml_obj->skin;
|
||||||
elseif($tmp_xml_obj->skin) $xml_obj = $tmp_xml_obj->skin;
|
if (!$xml_obj)
|
||||||
|
{
|
||||||
if(!$xml_obj) return;
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
$buff = array();
|
$buff = array();
|
||||||
$buff[] = '$layout_info = new stdClass;';
|
$buff[] = '$layout_info = new stdClass;';
|
||||||
|
|
|
||||||
|
|
@ -1031,8 +1031,7 @@ class ModuleModel extends Module
|
||||||
}
|
}
|
||||||
|
|
||||||
// Create XmlParser object
|
// Create XmlParser object
|
||||||
$oXmlParser = new XeXmlParser();
|
$_xml_obj = Rhymix\Framework\Parsers\XEXMLParser::loadXMLFile($skin_xml_file);
|
||||||
$_xml_obj = $oXmlParser->loadXmlFile($skin_xml_file);
|
|
||||||
// Return if no skin information is
|
// Return if no skin information is
|
||||||
if(!$_xml_obj->skin) return;
|
if(!$_xml_obj->skin) return;
|
||||||
$xml_obj = $_xml_obj->skin;
|
$xml_obj = $_xml_obj->skin;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue