mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-07 02:31:40 +09:00
1. 회원/게시글/댓글 팝업메뉴를 controller의 method를 이용하여 손쉽게 추가할 수 있도록 변경
2. 게시글/ 댓글 팝업메뉴에 아이콘 추가 3. 쪽지 발송/ 친구 관련 메뉴의 on/off를 member_communication 애드온으로 활성/비활성 할 수 있도록 변경 4. IE에서 페이지를 찾을 수 없다는 오류가 발생하는 window onload이전에 DOM을 건드리는 코드에 대한 보완책 적용 5. XML RPC 결과 출력시 1depth이상의 배열 또는 오브젝트 데이터를 Simple XML 형식으로 출력할 수 있도록 하고 Javascript에서 이를 다차원 배열로 parsing하도록 코드 변경 git-svn-id: http://xe-core.googlecode.com/svn/sandbox@4230 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
bc963aa72f
commit
4cdce7e4cf
26 changed files with 422 additions and 115 deletions
|
|
@ -97,24 +97,35 @@
|
|||
* @brief RequestMethod가 XML이면 XML 데이터로 컨텐츠 생성
|
||||
**/
|
||||
function _toXmlDoc(&$oModule) {
|
||||
$variables = $oModule->getVariables();
|
||||
|
||||
$xmlDoc = "<response>\n";
|
||||
$xmlDoc .= sprintf("<error>%s</error>\n",$oModule->getError());
|
||||
$xmlDoc .= sprintf("<message>%s</message>\n",str_replace(array('<','>','&'),array('<','>','&'),$oModule->getMessage()));
|
||||
|
||||
$variables = $oModule->getVariables();
|
||||
|
||||
if(count($variables)) {
|
||||
foreach($variables as $key => $val) {
|
||||
if(is_string($val)) $val = '<![CDATA['.$val.']]>';
|
||||
$xmlDoc .= "<{$key}>{$val}</{$key}>\n";
|
||||
}
|
||||
}
|
||||
$xmlDoc .= $this->_makeXmlDoc($variables);
|
||||
|
||||
$xmlDoc .= "</response>";
|
||||
|
||||
return $xmlDoc;
|
||||
}
|
||||
|
||||
function _makeXmlDoc($obj) {
|
||||
if(!count($obj)) return;
|
||||
|
||||
$xmlDoc = '';
|
||||
|
||||
foreach($obj as $key => $val) {
|
||||
if(is_numeric($key)) $key = 'item';
|
||||
|
||||
if(is_string($val)) $xmlDoc .= sprintf('<%s><![CDATA[%s]]></%s>%s', $key, $val, $key,"\n");
|
||||
else if(!is_array($val) && !is_object($val)) $xmlDoc .= sprintf('<%s>%s</%s>%s', $key, $val, $key,"\n");
|
||||
else $xmlDoc .= sprintf('<%s>%s%s</%s>%s',$key, "\n", $this->_makeXmlDoc($val), $key, "\n");
|
||||
}
|
||||
|
||||
return $xmlDoc;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief RequestMethod가 XML이 아니면 html 컨텐츠 생성
|
||||
**/
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue