mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-14 00:39:57 +09:00
git-svn-id: http://xe-core.googlecode.com/svn/trunk@1489 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
5f91108021
commit
fb52f9fa49
4 changed files with 39 additions and 8 deletions
|
|
@ -3,5 +3,6 @@ RewriteRule ^rss/([[:alnum:]]+)$ ./index.php?mid=$1&act=dispRss [L]
|
|||
RewriteRule ^trackback/([[:digit:]]+)$ ./index.php?module=trackback&act=procTrackbackReceive&document_srl=$1 [L]
|
||||
RewriteRule ^admin$ ./index.php?module=admin [L]
|
||||
RewriteRule ^([[:digit:]]+)$ ./index.php?document_srl=$1 [L]
|
||||
RewriteRule ^([a-zA-Z0-9_]+)/([[:digit:]]+)$ ./index.php?mid=$1&document_srl=$2 [L]
|
||||
RewriteRule ^([a-zA-Z0-9_]+)$ ./index.php?mid=$1 [L]
|
||||
RewriteRule ^blogapi/(.*)$ ./index.php?act=blogapi&mid=$1 [L]
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
<?php
|
||||
if(!defined("__ZBXE__")) exit();
|
||||
//debugPrint($GLOBALS['HTTP_RAW_POST_DATA']);
|
||||
|
||||
/**
|
||||
* @file blogapicounter.addon.php
|
||||
|
|
@ -24,6 +25,9 @@
|
|||
$params = $xmlDoc->methodcall->params->param;
|
||||
if($params && !is_array($params)) $params = array($params);
|
||||
|
||||
// blogger.deletePost일 경우 첫번째 인자 값 삭제
|
||||
if($method_name == 'blogger.deletePost') array_shift($params);
|
||||
|
||||
// user_id, password를 구해서 로그인 시도
|
||||
$user_id = trim($params[1]->value->string->body);
|
||||
$password = trim($params[2]->value->string->body);
|
||||
|
|
@ -142,10 +146,9 @@
|
|||
$oFileController->insertFile($file_info, $this->module_srl, $document_srl, 0, true);
|
||||
}
|
||||
$obj->uploaded_count = $file_count;
|
||||
$obj->content = str_replace($this->mid.'/{UPLOADED_PATH}',sprintf('./files/attach/images/%s/%s/%s', $this->module_srl, $document_srl, $filename), $obj->content);
|
||||
}
|
||||
}
|
||||
|
||||
$obj->content = str_replace($this->mid.'/{UPLOADED_PATH}',sprintf('./files/attach/images/%s/%s/%s', $this->module_srl, $document_srl, $filename), $obj->content);
|
||||
|
||||
$oDocumentController = &getController('document');
|
||||
$output = $oDocumentController->insertDocument($obj);
|
||||
|
|
@ -237,6 +240,19 @@
|
|||
FileHandler::removeDir($tmp_uploaded_path);
|
||||
}
|
||||
break;
|
||||
|
||||
// 글삭제
|
||||
case 'blogger.deletePost' :
|
||||
$tmp_val = $params[0]->value->string->body;
|
||||
$tmp_arr = explode('/', $tmp_val);
|
||||
$document_srl = array_pop($tmp_arr);
|
||||
|
||||
$oDocumentController = &getController('document');
|
||||
$output = $oDocumentController->deleteDocument($document_srl);
|
||||
if(!$output->toBool()) $content = getXmlRpcFailure(1, $output->getMessage());
|
||||
else $content = getXmlRpcResponse(true);
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -487,11 +487,8 @@
|
|||
$url_list[] = sprintf("%s=%s",$key, $val);
|
||||
}
|
||||
|
||||
preg_match("/([a-zA-Z\_]+)\.php/i", $_SERVER['PHP_SELF'], $match);
|
||||
$filename = $match[0];
|
||||
if($filename == 'index.php') $filename = '';
|
||||
|
||||
return './'.$filename.'?'.htmlspecialchars(implode('&', $url_list));
|
||||
$path = str_replace('index.php','',$_SERVER['SCRIPT_NAME']);
|
||||
return sprintf('%s?%s', $path, htmlspecialchars(implode('&',$url_list)));
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -56,8 +56,11 @@
|
|||
// 최종 결과를 common_layout에 넣어버림
|
||||
Context::set('zbxe_final_content', $zbxe_final_content);
|
||||
$output = $oTemplate->compile('./common/tpl', 'common_layout');
|
||||
|
||||
} else {
|
||||
|
||||
$output = $content;
|
||||
|
||||
}
|
||||
|
||||
// 애드온 실행
|
||||
|
|
@ -70,7 +73,21 @@
|
|||
$this->_debugOutput();
|
||||
|
||||
// 컨텐츠 출력
|
||||
print trim($output);
|
||||
$this->display($output);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 최종 결과물의 출력
|
||||
**/
|
||||
function display($content) {
|
||||
if(Context::getResponseMethod()=="XMLRPC") {
|
||||
print $content;
|
||||
return;
|
||||
}
|
||||
|
||||
$path = str_replace('index.php','',$_SERVER['SCRIPT_NAME']);
|
||||
|
||||
print preg_replace('!(href|src)=("|\'){0,1}\.\/([a-zA-Z0-9\_^\/]+)\/!is', '\\1=\\2'.$path.'$3/', $content);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue