#18952909 : fix [7529] and the case when response method is XMLRPC while request method is HTML

git-svn-id: http://xe-core.googlecode.com/svn/sandbox@7530 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
haneul 2010-06-21 09:38:34 +00:00
parent 0f034ed5de
commit c20bc9fef2
2 changed files with 35 additions and 32 deletions

View file

@ -32,17 +32,16 @@
) $this->gz_enabled = true;
// request method에 따른 컨텐츠 결과물 추출
$responseMethod = Context::getResponseMethod();
if(Context::get('xeVirtualRequestMethod')=='xml') {
require_once("./classes/display/VirtualXMLDisplayHandler.php");
$handler = new VirtualXMLDisplayHandler();
}
else if($responseMethod == 'XMLRPC') {
else if(Context::getRequestMethod() == 'XMLRPC') {
require_once("./classes/display/XMLDisplayHandler.php");
$handler = new XMLDisplayHandler();
if(strpos($_SERVER['HTTP_USER_AGENT'], 'MSIE') !== false) $this->gz_enabled = false;
}
else if($responseMethod == 'JSON') {
else if(Context::getRequestMethod() == 'JSON') {
require_once("./classes/display/JSONDisplayHandler.php");
$handler = new JSONDisplayHandler();
}

View file

@ -15,6 +15,8 @@ class HTMLDisplayHandler {
$output = $oTemplate->compile($template_path, $tpl_file);
// add #xeAdmin div for adminitration pages
debugPrint(Context::getResponseMethod());
if(Context::getResponseMethod() == 'HTML') {
if(Context::get('module')!='admin' && strpos(Context::get('act'),'Admin')>0) $output = '<div id="xeAdmin">'.$output.'</div>';
if(Context::get('layout') != 'none') {
@ -56,10 +58,12 @@ class HTMLDisplayHandler {
Context::addHtmlFooter('<iframe id="xeTmpIframe" name="xeTmpIframe" style="width:1px;height:1px;position:absolute;top:-2px;left:-2px;"></iframe>');
}
}
}
return $output;
}
function prepareToPrint(&$output) {
if(Context::getResponseMethod() != 'HTML') return;
if(__DEBUG__==3) $start = getMicroTime();