mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-06 10:11:38 +09:00
Merge pull request #901 from bjrambo/pr/updateLogExtraVars
게시글 수정내역에서 확장변수를 정상적으로 표시하도록 개선.
This commit is contained in:
commit
0871b247c1
2 changed files with 21 additions and 2 deletions
|
|
@ -1818,7 +1818,7 @@ class Context
|
|||
* Set a context value with a key
|
||||
*
|
||||
* @param string $key Key
|
||||
* @param string $val Value
|
||||
* @param mixed $val Value
|
||||
* @param mixed $set_to_get_vars If not FALSE, Set to get vars.
|
||||
* @return void
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -1199,12 +1199,31 @@ class boardView extends board
|
|||
{
|
||||
return new Object(-1, 'msg_not_permitted');
|
||||
}
|
||||
|
||||
$update_log = $oDocumentModel->getUpdateLog($update_id);
|
||||
$oDocument = $oDocumentModel->getDocument($update_log->document_srl);
|
||||
|
||||
$extra_vars = unserialize($update_log->extra_vars);
|
||||
|
||||
|
||||
$document_extra_array = $oDocument->getExtraVars();
|
||||
$extra_html = array();
|
||||
foreach ($extra_vars as $extra_key => $extra)
|
||||
{
|
||||
foreach ($document_extra_array as $val)
|
||||
{
|
||||
if($val->name == $extra_key)
|
||||
{
|
||||
// Use the change the values, it need an other parameters.
|
||||
$extra = new ExtraItem($this->module_info->module_srl, $val->idx, $val->name, $val->type, null, '', 'N', 'N', $extra);
|
||||
$extra_html[$extra_key] = $extra->getValueHTML();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Context::addJsFilter($this->module_path.'tpl/filter', 'update.xml');
|
||||
|
||||
Context::set('extra_vars', $extra_vars);
|
||||
Context::set('extra_vars', $extra_html);
|
||||
Context::set('update_log', $update_log);
|
||||
|
||||
$this->setTemplateFile('update_view');
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue