NOISSUE 사용되지 않는 모듈, 애드온 등의 history 정보 파싱 로직 제거.

This commit is contained in:
bnu 2013-11-27 15:15:07 +09:00
parent 82198b53c1
commit 3430d4fae5
11 changed files with 32 additions and 610 deletions

View file

@ -296,79 +296,6 @@ class addonAdminModel extends addon
}
}
}
// history
if($xml_obj->history)
{
if(!is_array($xml_obj->history))
{
$history = array();
$history[] = $xml_obj->history;
}
else
{
$history = $xml_obj->history;
}
$addon_info->history = array();
foreach($history as $item)
{
$obj = new stdClass();
if($item->author)
{
if(!is_array($item->author))
{
$obj->author_list = array();
$obj->author_list[] = $item->author;
}
else
{
$obj->author_list = $item->author;
}
$obj->author = array();
foreach($obj->author_list as $author)
{
$author_obj = new stdClass();
$author_obj->name = $author->name->body;
$author_obj->email_address = $author->attrs->email_address;
$author_obj->homepage = $author->attrs->link;
$obj->author[] = $author_obj;
}
}
$obj->name = $item->name->body;
$obj->email_address = $item->attrs->email_address;
$obj->homepage = $item->attrs->link;
$obj->version = $item->attrs->version;
$obj->date = $item->attrs->date;
$obj->description = $item->description->body;
if($item->log)
{
if(!is_array($item->log))
{
$obj->log = array();
$obj->log[] = $item->log;
}
else
{
$obj->log = $item->log;
}
$obj->logs = array();
foreach($obj->log as $log)
{
$log_obj = new stdClass();
$log_obj->text = $log->body;
$log_obj->link = $log->attrs->link;
$obj->logs[] = $log_obj;
}
}
$addon_info->history[] = $obj;
}
}
}
else
{

View file

@ -37,35 +37,3 @@
<td>{nl2br(trim($addon_info->description))}</td>
</tr><!--@end-->
</table>
<!--@if($addon_info->history)-->
<h1>{$lang->addon_history}</h1>
<table class="x_table x_table-striped x_table-hover">
<!--@foreach($addon_info->history as $history)-->
<tr>
<th scope="row">
{$history->version}<br />
{$history->date} </th>
<td>
<!--@foreach($history->author as $author)-->
<p>{$author->name} (<a href="{$author->homepage}" onclick="window.open(this.href);return false;">{$author->homepage}</a> / <a href="mailto:{$author->email_address}">{$author->email_address}</a>)</p>
<!--@endforeach-->
<!--@if($history->description)-->
<p>{nl2br(trim($history->description))}</p>
<!--@endif-->
<!--@if($history->logs)-->
<ul>
<!--@foreach($history->logs as $log)-->
<!--@if($log->link)-->
<li><a href="{$log->link}">{$log->text}</a></li>
<!--@else-->
<li>{$log->text}</li>
<!--@endif-->
<!--@endforeach-->
</ul>
<!--@endif-->
</td>
</tr>
<!--@endforeach-->
</table>
<!--@endif-->