블로그API 애드온에서 editPost 사용시 document_srl을 꼭 체크하도록 수정

글 수정 method 에서 document_srl 체크하도록 수정


git-svn-id: http://xe-core.googlecode.com/svn/sandbox@6832 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
zero 2009-10-09 03:29:57 +00:00
parent b91426b408
commit 130d47db30
3 changed files with 13 additions and 2 deletions

View file

@ -285,8 +285,17 @@
// 글 수정
case 'metaWeblog.editPost' :
$tmp_val = $params[0]->value->string->body;
if(!$tmp_val) $tmp_val = $params[0]->value->i4->body;
if(!$tmp_val) {
$content = getXmlRpcFailure(1, 'no permission');
break;
}
$tmp_arr = explode('/', $tmp_val);
$document_srl = array_pop($tmp_arr);
if(!$document_srl) {
$content = getXmlRpcFailure(1, 'no permission');
break;
}
$oDocumentModel = &getModel('document');
$oDocument = $oDocumentModel->getDocument($document_srl);