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-->

View file

@ -133,45 +133,6 @@ class editorModel extends editor
$buff .= sprintf('$xml_info->author['.$i.']->homepage = "%s";', $author_list[$i]->attrs->link);
}
// history
if($xml_doc->component->history)
{
if(!is_array($xml_doc->component->history)) $history_list[] = $xml_doc->component->history;
else $history_list = $xml_doc->component->history;
for($i=0; $i < count($history_list); $i++)
{
unset($obj);
sscanf($history_list[$i]->attrs->date, '%d-%d-%d', $date_obj->y, $date_obj->m, $date_obj->d);
$date = sprintf('%04d%02d%02d', $date_obj->y, $date_obj->m, $date_obj->d);
$buff .= sprintf('$xml_info->history['.$i.']->description = "%s";', $history_list[$i]->description->body);
$buff .= sprintf('$xml_info->history['.$i.']->version = "%s";', $history_list[$i]->attrs->version);
$buff .= sprintf('$xml_info->history['.$i.']->date = "%s";', $date);
if($history_list[$i]->author)
{
(!is_array($history_list[$i]->author)) ? $obj->author_list[] = $history_list[$i]->author : $obj->author_list = $history_list[$i]->author;
for($j=0; $j < count($obj->author_list); $j++)
{
$buff .= sprintf('$xml_info->history['.$i.']->author['.$j.']->name = "%s";', $obj->author_list[$j]->name->body);
$buff .= sprintf('$xml_info->history['.$i.']->author['.$j.']->email_address = "%s";', $obj->author_list[$j]->attrs->email_address);
$buff .= sprintf('$xml_info->history['.$i.']->author['.$j.']->homepage = "%s";', $obj->author_list[$j]->attrs->link);
}
}
if($history_list[$i]->log)
{
(!is_array($history_list[$i]->log)) ? $obj->log_list[] = $history_list[$i]->log : $obj->log_list = $history_list[$i]->log;
for($j=0; $j < count($obj->log_list); $j++)
{
$buff .= sprintf('$xml_info->history['.$i.']->logs['.$j.']->text = "%s";', $obj->log_list[$j]->body);
$buff .= sprintf('$xml_info->history['.$i.']->logs['.$j.']->link = "%s";', $obj->log_list[$j]->attrs->link);
}
}
}
}
// List extra variables (text type only in the editor component)
$extra_vars = $xml_doc->component->extra_vars->var;
if($extra_vars)
@ -768,49 +729,6 @@ class editorModel extends editor
$buff .= sprintf('$xml_info->author['.$i.']->email_address = "%s";', $author_list[$i]->attrs->email_address);
$buff .= sprintf('$xml_info->author['.$i.']->homepage = "%s";', $author_list[$i]->attrs->link);
}
// history
if($xml_doc->component->history)
{
if(!is_array($xml_doc->component->history)) $history_list[] = $xml_doc->component->history;
else $history_list = $xml_doc->component->history;
for($i=0; $i < count($history_list); $i++)
{
unset($obj);
sscanf($history_list[$i]->attrs->date, '%d-%d-%d', $date_obj->y, $date_obj->m, $date_obj->d);
$date = sprintf('%04d%02d%02d', $date_obj->y, $date_obj->m, $date_obj->d);
$buff .= '$xml_info->history[' . $i . '] = new stdClass();';
$buff .= sprintf('$xml_info->history['.$i.']->description = "%s";', $history_list[$i]->description->body);
$buff .= sprintf('$xml_info->history['.$i.']->version = "%s";', $history_list[$i]->attrs->version);
$buff .= sprintf('$xml_info->history['.$i.']->date = "%s";', $date);
if($history_list[$i]->author)
{
(!is_array($history_list[$i]->author)) ? $obj->author_list[] = $history_list[$i]->author : $obj->author_list = $history_list[$i]->author;
for($j=0; $j < count($obj->author_list); $j++)
{
$buff .= '$xml_info->history[' . $i . ']->author[' . $j . '] = new stdClass();';
$buff .= sprintf('$xml_info->history['.$i.']->author['.$j.']->name = "%s";', $obj->author_list[$j]->name->body);
$buff .= sprintf('$xml_info->history['.$i.']->author['.$j.']->email_address = "%s";', $obj->author_list[$j]->attrs->email_address);
$buff .= sprintf('$xml_info->history['.$i.']->author['.$j.']->homepage = "%s";', $obj->author_list[$j]->attrs->link);
}
}
if($history_list[$i]->log)
{
(!is_array($history_list[$i]->log)) ? $obj->log_list[] = $history_list[$i]->log : $obj->log_list = $history_list[$i]->log;
for($j=0; $j < count($obj->log_list); $j++)
{
$buff .= '$xml_info->history[' . $i . ']->log[' . $j . '] = new stdClass();';
$buff .= sprintf('$xml_info->history['.$i.']->logs['.$j.']->text = "%s";', $obj->log_list[$j]->body);
$buff .= sprintf('$xml_info->history['.$i.']->logs['.$j.']->link = "%s";', $obj->log_list[$j]->attrs->link);
}
}
}
}
}
else
{

View file

@ -4,71 +4,38 @@
<section class="section">
<h1>{$component->title} ver. {$component->version}</h1>
<table class="x_table x_table-striped x_table-hover">
<tr>
<th scope="row"><div>{$lang->component_author}</div></th>
<td>
<!--@foreach($component->author as $author)-->
{$author->name} <!--@if($author->homepage || $author->email_address)-->(<!--@if($author->homepage)--><a href="{$author->homepage}" onclick="window.open(this.href);return false;">{$author->homepage}</a><!--@end--><!--@if($author->homepage && $author->email_address)-->, <!--@end--><!--@if($author->email_address)--><a href="mailto:{$author->email_address}">{$author->email_address}</a><!--@end-->)<!--@end--><br />
<table class="x_table x_table-striped x_table-hover">
<tr>
<th scope="row"><div>{$lang->component_author}</div></th>
<td>
<!--@foreach($component->author as $author)-->
{$author->name} <!--@if($author->homepage || $author->email_address)-->(<!--@if($author->homepage)--><a href="{$author->homepage}" onclick="window.open(this.href);return false;">{$author->homepage}</a><!--@end--><!--@if($author->homepage && $author->email_address)-->, <!--@end--><!--@if($author->email_address)--><a href="mailto:{$author->email_address}">{$author->email_address}</a><!--@end-->)<!--@end--><br />
<!--@end-->
</tr>
<!--@if($component->homepage)-->
<tr>
<th scope="row"><div>{$lang->homepage}</div></th>
<td class="blue"><a href="{$component->homepage}" onclick="window.open(this.href);return false;">{$component->homepage}</a></td>
</tr><!--@end-->
<tr>
<th scope="row"><div>{$lang->regdate}</div></th>
<td>{zdate(str_replace('-',"",$component->date), 'Y-m-d')}</td>
</tr>
<!--@if($component->license || $component->license_link)-->
<tr>
<th scope="row"><div>{$lang->component_license}</div></th>
<td>
{nl2br(trim($component->license))}
<!--@if($component->license_link)-->
<p><a href="{$component->license_link}" onclick="window.close(); return false;">{$component->license_link}</a></p>
<!--@end-->
</tr>
<!--@if($component->homepage)-->
<tr>
<th scope="row"><div>{$lang->homepage}</div></th>
<td class="blue"><a href="{$component->homepage}" onclick="window.open(this.href);return false;">{$component->homepage}</a></td>
</tr><!--@end-->
<tr>
<th scope="row"><div>{$lang->regdate}</div></th>
<td>{zdate(str_replace('-',"",$component->date), 'Y-m-d')}</td>
</tr>
<!--@if($component->license || $component->license_link)-->
<tr>
<th scope="row"><div>{$lang->component_license}</div></th>
<td>
{nl2br(trim($component->license))}
<!--@if($component->license_link)-->
<p><a href="{$component->license_link}" onclick="window.close(); return false;">{$component->license_link}</a></p>
<!--@end-->
</td>
</tr><!--@end-->
<!--@if($component->description)-->
<tr>
<th scope="row"><div>{$lang->component_description}</div></th>
<td>{nl2br(trim($component->description))}</td>
</tr><!--@end-->
</table>
</td>
</tr><!--@end-->
<!--@if($component->description)-->
<tr>
<th scope="row"><div>{$lang->component_description}</div></th>
<td>{nl2br(trim($component->description))}</td>
</tr><!--@end-->
</table>
<!--@if($component->history)-->
<h1 class="h1">{$lang->component_history}</h1>
<table class="x_table x_table-striped x_table-hover">
<!--@foreach($component->history as $history)-->
<tr class="row{$cycle_idx}">
<th scope="row"><div>
{$history->version}<br />
{zdate($history->date, 'Y-m-d')}
</div></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}" onclick="window.close(); return false;">{$log->text}</a></li>
<!--@else-->
<li>{$log->text}</li>
<!--@endif-->
<!--@endforeach-->
</ul>
<!--@endif-->
</td>
</tr>
<!--@endforeach-->
</table>
<!--@endif-->
</section>

View file

@ -638,51 +638,6 @@ class layoutModel extends layout
$buff[] = sprintf('$layout_info->menu->%s->php_file = "./files/cache/menu/".$vars->%s.".php";',$name, $name);
}
}
// history
if($xml_obj->history)
{
if(!is_array($xml_obj->history)) $history_list[] = $xml_obj->history;
else $history_list = $xml_obj->history;
$buff[] = '$layout_info->history = array();';
for($i=0, $c=count($history_list); $i<$c; $i++)
{
sscanf($history_list[$i]->attrs->date, '%d-%d-%d', $date_obj->y, $date_obj->m, $date_obj->d);
$date = sprintf('%04d%02d%02d', $date_obj->y, $date_obj->m, $date_obj->d);
$buff[] = sprintf('$layout_info->history[%d] = new stdClass;', $i);
$buff[] = sprintf('$layout_info->history[%d]->description = "%s";', $i, $history_list[$i]->description->body);
$buff[] = sprintf('$layout_info->history[%d]->version = "%s";', $i , $history_list[$i]->attrs->version);
$buff[] = sprintf('$layout_info->history[%d]->date = "%s";', $i, $date);
if($history_list[$i]->author)
{
(!is_array($history_list[$i]->author)) ? $obj->author_list[] = $history_list[$i]->author : $obj->author_list = $history_list[$i]->author;
$buff[] = sprintf('$layout_info->history[%d]->author = array();', $i);
for($j=0, $jc=count($obj->author_list); $j<$jc; $j++)
{
$buff[] = sprintf('$layout_info->history[%d]->author[%d] = new stdClass;', $i, $j);
$buff[] = sprintf('$layout_info->history[%d]->author[%d]->name = "%s";', $i, $j, $obj->author_list[$j]->name->body);
$buff[] = sprintf('$layout_info->history[%d]->author[%d]->email_address = "%s";', $i, $j, $obj->author_list[$j]->attrs->email_address);
$buff[] = sprintf('$layout_info->history[%d]->author[%d]->homepage = "%s";', $i, $j, $obj->author_list[$j]->attrs->link);
}
}
if($history_list[$i]->log)
{
(!is_array($history_list[$i]->log)) ? $obj->log_list[] = $history_list[$i]->log : $obj->log_list = $history_list[$i]->log;
$buff[] = sprintf('$layout_info->history[%d]->logs = array();', $i, $j, $obj->log_list[$j]->body);
for($j=0, $jc=count($obj->log_list); $j<$jc; $j++)
{
$buff[] = sprintf('$layout_info->history[%d]->logs[%d] = new stdClass;', $i, $j);
$buff[] = sprintf('$layout_info->history[%d]->logs[%d]->text = "%s";', $i, $j, $obj->log_list[$j]->body);
$buff[] = sprintf('$layout_info->history[%d]->logs[%d]->link = "%s";', $i, $j, $obj->log_list[$j]->attrs->link);
}
}
}
}
}
else
{

View file

@ -658,54 +658,6 @@ class moduleModel extends module
$author_obj->homepage = $author->attrs->link;
$module_info->author[] = $author_obj;
}
// history
if($xml_obj->history)
{
if(!is_array($xml_obj->history)) $history[] = $xml_obj->history;
else $history = $xml_obj->history;
foreach($history as $item)
{
unset($obj);
if($item->author)
{
(!is_array($item->author)) ? $obj->author_list[] = $item->author : $obj->author_list = $item->author;
foreach($obj->author_list as $author)
{
unset($author_obj);
$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)
{
(!is_array($item->log)) ? $obj->log[] = $item->log : $obj->log = $item->log;
foreach($obj->log as $log)
{
unset($logs_obj);
$logs_obj->text = $log->body;
$logs_obj->link = $log->attrs->link;
$obj->logs[] = $logs_obj;
}
}
$module_info->history[] = $obj;
}
}
}
else
{
@ -1136,54 +1088,6 @@ class moduleModel extends module
}
}
}
// history
if($xml_obj->history)
{
if(!is_array($xml_obj->history)) $history[] = $xml_obj->history;
else $history = $xml_obj->history;
foreach($history as $item)
{
unset($obj);
if($item->author)
{
(!is_array($item->author)) ? $obj->author_list[] = $item->author : $obj->author_list = $item->author;
foreach($obj->author_list as $author)
{
unset($author_obj);
$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)
{
(!is_array($item->log)) ? $obj->log[] = $item->log : $obj->log = $item->log;
foreach($obj->log as $log)
{
unset($log_obj);
$log_obj->text = $log->body;
$log_obj->link = $log->attrs->link;
$obj->logs[] = $log_obj;
}
}
$skin_info->history[] = $obj;
}
}
}
else
{

View file

@ -39,40 +39,3 @@
</tr>
<!--@endif-->
</table>
<!--@if($module_info->history)-->
<h1>{$lang->module_history}</h1>
<table class="x_table x_table-striped x_table-hover">
<col width="100" />
<col />
<!--@foreach($module_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($addon_info->description)-->
<p>{nl2br(trim($history->description))}</p>
<!--@endif-->
<!--@if($history->logs)-->
<ul>
<!--@foreach($history->logs as $log)-->
<!--@if($log->link)-->
<li><a href="{$log->text}" onclick="window.open(this.href);return false;">{$log->text}</a></li>
<!--@else-->
<li>{$log->text}</li>
<!--@endif-->
<!--@endforeach-->
</ul>
<!--@endif-->
</td>
</tr>
<!--@endforeach-->
</table>
<!--@endif-->

View file

@ -43,39 +43,3 @@
</tr>
<!--@end-->
</table>
<!--@if($skin_info->history)-->
<h1>{$lang->skin_history}</h1>
<table class="x_table x_table-striped x_table-hover">
<col width="100" />
<col />
<!--@foreach($skin_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-->

View file

@ -43,39 +43,3 @@
</tr>
<!--@end-->
</table>
<!--@if($skin_info->history)-->
<h1>{$lang->skin_history}</h1>
<table class="x_table x_table-striped x_table-hover">
<col width="100" />
<col />
<!--@foreach($skin_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-->

View file

@ -42,35 +42,3 @@
<td>{nl2br(trim($widget_info->description))}</td>
</tr><!--@end-->
</table>
<!--@if($widget_info->history)-->
<h1>{$lang->widget_history}</h1>
<table class="x_table x_table-striped x_table-hover">
<!--@foreach($widget_info->history as $history)-->
<tr>
<th scope="row"><div>
{$history->version}<br />
{$history->date}
</div></th>
<td>
<!--@if($history->author)-->
<!--@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-->
<!--@endif-->
<!--@if($history->description)-->
<p>{nl2br(trim($history->description))}</p>
<!--@endif-->
<!--@if($history->logs)-->
<ul>
<!--@foreach($history->logs as $log)--><li>{$log->text}</li><!--@endforeach-->
</ul>
<!--@endif-->
</td>
</tr>
<!--@endforeach-->
</table>
<!--@endif-->

View file

@ -170,44 +170,6 @@ class widgetModel extends widget
$buff .= sprintf('$widget_info->author['.$i.']->email_address = "%s";', $author_list[$i]->attrs->email_address);
$buff .= sprintf('$widget_info->author['.$i.']->homepage = "%s";', $author_list[$i]->attrs->link);
}
// history
if($xml_obj->history)
{
if(!is_array($xml_obj->history)) $history_list[] = $xml_obj->history;
else $history_list = $xml_obj->history;
for($i=0; $i < count($history_list); $i++)
{
sscanf($history_list[$i]->attrs->date, '%d-%d-%d', $date_obj->y, $date_obj->m, $date_obj->d);
$date = sprintf('%04d%02d%02d', $date_obj->y, $date_obj->m, $date_obj->d);
$buff .= sprintf('$widget_info->history['.$i.']->description = "%s";', $history_list[$i]->description->body);
$buff .= sprintf('$widget_info->history['.$i.']->version = "%s";', $history_list[$i]->attrs->version);
$buff .= sprintf('$widget_info->history['.$i.']->date = "%s";', $date);
if($history_list[$i]->author)
{
(!is_array($history_list[$i]->author)) ? $obj->author_list[] = $history_list[$i]->author : $obj->author_list = $history_list[$i]->author;
for($j=0; $j < count($obj->author_list); $j++)
{
$buff .= sprintf('$widget_info->history['.$i.']->author['.$j.']->name = "%s";', $obj->author_list[$j]->name->body);
$buff .= sprintf('$widget_info->history['.$i.']->author['.$j.']->email_address = "%s";', $obj->author_list[$j]->attrs->email_address);
$buff .= sprintf('$widget_info->history['.$i.']->author['.$j.']->homepage = "%s";', $obj->author_list[$j]->attrs->link);
}
}
if($history_list[$i]->log)
{
(!is_array($history_list[$i]->log)) ? $obj->log_list[] = $history_list[$i]->log : $obj->log_list = $history_list[$i]->log;
for($j=0; $j < count($obj->log_list); $j++) {
$buff .= sprintf('$widget_info->history['.$i.']->logs['.$j.']->text = "%s";', $obj->log_list[$j]->body);
$buff .= sprintf('$widget_info->history['.$i.']->logs['.$j.']->link = "%s";', $obj->log_list[$j]->attrs->link);
}
}
}
}
}
else
{
@ -342,44 +304,6 @@ class widgetModel extends widget
$buff .= sprintf('$widgetStyle_info->author['.$i.']->homepage = "%s";', $author_list[$i]->attrs->link);
}
// history
if($xml_obj->history)
{
if(!is_array($xml_obj->history)) $history_list[] = $xml_obj->history;
else $history_list = $xml_obj->history;
for($i=0; $i < count($history_list); $i++)
{
sscanf($history_list[$i]->attrs->date, '%d-%d-%d', $date_obj->y, $date_obj->m, $date_obj->d);
$date = sprintf('%04d%02d%02d', $date_obj->y, $date_obj->m, $date_obj->d);
$buff .= sprintf('$widgetStyle_info->history['.$i.']->description = "%s";', $history_list[$i]->description->body);
$buff .= sprintf('$widgetStyle_info->history['.$i.']->version = "%s";', $history_list[$i]->attrs->version);
$buff .= sprintf('$widgetStyle_info->history['.$i.']->date = "%s";', $date);
if($history_list[$i]->author)
{
(!is_array($history_list[$i]->author)) ? $obj->author_list[] = $history_list[$i]->author : $obj->author_list = $history_list[$i]->author;
for($j=0; $j < count($obj->author_list); $j++)
{
$buff .= sprintf('$widgetStyle_info->history['.$i.']->author['.$j.']->name = "%s";', $obj->author_list[$j]->name->body);
$buff .= sprintf('$widgetStyle_info->history['.$i.']->author['.$j.']->email_address = "%s";', $obj->author_list[$j]->attrs->email_address);
$buff .= sprintf('$widgetStyle_info->history['.$i.']->author['.$j.']->homepage = "%s";', $obj->author_list[$j]->attrs->link);
}
}
if($history_list[$i]->log)
{
(!is_array($history_list[$i]->log)) ? $obj->log_list[] = $history_list[$i]->log : $obj->log_list = $history_list[$i]->log;
for($j=0; $j < count($obj->log_list); $j++)
{
$buff .= sprintf('$widgetStyle_info->history['.$i.']->logs['.$j.']->text = "%s";', $obj->log_list[$j]->body);
$buff .= sprintf('$widgetStyle_info->history['.$i.']->logs['.$j.']->link = "%s";', $obj->log_list[$j]->attrs->link);
}
}
}
}
// Extra vars (user defined variables to use in a template)
$extra_var_groups = $xml_obj->extra_vars->group;
if(!$extra_var_groups) $extra_var_groups = $xml_obj->extra_vars;