mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-21 20:29: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
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue