mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-04 01:01:41 +09:00
View available new versions on dashboard
git-svn-id: http://xe-core.googlecode.com/svn/branches/maserati@12245 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
8a60464b18
commit
a35ff711c4
6 changed files with 134 additions and 0 deletions
|
|
@ -305,10 +305,16 @@ class adminAdminView extends admin
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Get need update from easy install
|
||||
$oAutoinstallAdminModel = getAdminModel('autoinstall');
|
||||
$needUpdateList = $oAutoinstallAdminModel->getNeedUpdateList();
|
||||
|
||||
Context::set('module_list', $module_list);
|
||||
Context::set('needUpdate', $isUpdated);
|
||||
Context::set('addTables', $addTables);
|
||||
Context::set('needUpdate', $needUpdate);
|
||||
Context::set('newVersionList', $needUpdateList);
|
||||
|
||||
// gathering enviroment check
|
||||
$mainVersion = join('.', array_slice(explode('.', __ZBXE_VERSION__), 0, 2));
|
||||
|
|
|
|||
|
|
@ -1516,4 +1516,8 @@
|
|||
<value xml:lang="ko"><![CDATA[아니오]]></value>
|
||||
<value xml:lang="en"><![CDATA[No]]></value>
|
||||
</item>
|
||||
<item name="available_new_version">
|
||||
<value xml:lang="ko"><![CDATA[새 버전을 사용할 수 있습니다]]></value>
|
||||
<value xml:lang="en"><![CDATA[Available new versions]]></value>
|
||||
</item>
|
||||
</lang>
|
||||
|
|
|
|||
|
|
@ -27,6 +27,14 @@
|
|||
</block>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="message update" cond="count($newVersionList)">
|
||||
<h2>{$lang->available_new_version}</h2>
|
||||
<ul>
|
||||
<li loop="$newVersionList => $key, $package" style="margin:0 0 4px 0">
|
||||
[{$lang->typename[$package->type]}] {$package->title} ver. {$package->version} - <a href="{$package->url}&return_url={urlencode(getRequestUriByServerEnviroment())}">{$lang->update}</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="dashboard">
|
||||
<section class="status">
|
||||
<h2>{$lang->current_state}</h2>
|
||||
|
|
|
|||
|
|
@ -176,6 +176,58 @@ class autoinstallAdminModel extends autoinstall
|
|||
|
||||
$this->add('is_authed', $is_authed);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns list of need update
|
||||
*/
|
||||
public function getNeedUpdateList()
|
||||
{
|
||||
$oModel = getModel('autoinstall');
|
||||
$output = executeQueryArray('autoinstall.getNeedUpdate');
|
||||
if(!is_array($output->data)) return NULL;
|
||||
|
||||
$result = array();
|
||||
$xml = new XmlParser();
|
||||
foreach($output->data as $package)
|
||||
{
|
||||
$packageSrl = $package->package_srl;
|
||||
|
||||
$packageInfo = new stdClass();
|
||||
$packageInfo->currentVersion = $package->current_version;
|
||||
$packageInfo->version = $package->version;
|
||||
$packageInfo->type = $oModel->getTypeFromPath($package->path);
|
||||
$packageInfo->url = $oModel->getUpdateUrlByPackageSrl($package->package_srl);
|
||||
|
||||
if($packageInfo->type == 'core')
|
||||
{
|
||||
$title = 'XpressEngine';
|
||||
}
|
||||
else
|
||||
{
|
||||
$configFile = $oModel->getConfigFilePath($packageInfo->type);
|
||||
$xmlDoc = $xml->loadXmlFile(FileHandler::getRealPath($package->path) . $configFile);
|
||||
|
||||
if($xmlDoc)
|
||||
{
|
||||
$type = $packageInfo->type;
|
||||
if($type == "drcomponent") $type = "component";
|
||||
if($type == "style" || $type == "m.skin") $type = "skin";
|
||||
if($type == "m.layout") $type = "layout";
|
||||
$title = $xmlDoc->{$type}->title->body;
|
||||
}
|
||||
else
|
||||
{
|
||||
$pathInfo = explode('/', $package->path);
|
||||
$title = $pathInfo[count($pathInfo) - 1];
|
||||
}
|
||||
}
|
||||
$packageInfo->title = $title;
|
||||
|
||||
$result[] = $packageInfo;
|
||||
}
|
||||
|
||||
return $result;
|
||||
}
|
||||
}
|
||||
/* End of file autoinstall.admin.model.php */
|
||||
/* Location: ./modules/autoinstall/autoinstall.admin.model.php */
|
||||
|
|
|
|||
|
|
@ -338,4 +338,54 @@
|
|||
<value xml:lang="ko"><![CDATA[설치 됨]]></value>
|
||||
<value xml:lang="en"><![CDATA[Installed]]></value>
|
||||
</item>
|
||||
<item name="typename" type="array">
|
||||
<item name="core">
|
||||
<value xml:lang="ko"><![CDATA[코어]]></value>
|
||||
<value xml:lang="en"><![CDATA[Core]]></value>
|
||||
</item>
|
||||
<item name="m.layout">
|
||||
<value xml:lang="ko"><![CDATA[모바일 레이아웃]]></value>
|
||||
<value xml:lang="en"><![CDATA[Mobile layout]]></value>
|
||||
</item>
|
||||
<item name="module">
|
||||
<value xml:lang="ko"><![CDATA[모듈]]></value>
|
||||
<value xml:lang="en"><![CDATA[Module]]></value>
|
||||
</item>
|
||||
<item name="addon">
|
||||
<value xml:lang="ko"><![CDATA[애드온]]></value>
|
||||
<value xml:lang="en"><![CDATA[Addon]]></value>
|
||||
</item>
|
||||
<item name="layout">
|
||||
<value xml:lang="ko"><![CDATA[레이아웃]]></value>
|
||||
<value xml:lang="en"><![CDATA[Layout]]></value>
|
||||
</item>
|
||||
<item name="widget">
|
||||
<value xml:lang="ko"><![CDATA[위젯]]></value>
|
||||
<value xml:lang="en"><![CDATA[Widget]]></value>
|
||||
</item>
|
||||
<item name="component">
|
||||
<value xml:lang="ko"><![CDATA[에디터 콤포넌트]]></value>
|
||||
<value xml:lang="en"><![CDATA[Editor component]]></value>
|
||||
</item>
|
||||
<item name="m.skin">
|
||||
<value xml:lang="ko"><![CDATA[모바일 스킨]]></value>
|
||||
<value xml:lang="en"><![CDATA[Mobile Skin]]></value>
|
||||
</item>
|
||||
<item name="skin">
|
||||
<value xml:lang="ko"><![CDATA[스킨]]></value>
|
||||
<value xml:lang="en"><![CDATA[Skin]]></value>
|
||||
</item>
|
||||
<item name="widgetstyle">
|
||||
<value xml:lang="ko"><![CDATA[위젯스타일]]></value>
|
||||
<value xml:lang="en"><![CDATA[Widget style]]></value>
|
||||
</item>
|
||||
<item name="style">
|
||||
<value xml:lang="ko"><![CDATA[문서스타일]]></value>
|
||||
<value xml:lang="en"><![CDATA[Document style]]></value>
|
||||
</item>
|
||||
<item name="drcomponent">
|
||||
<value xml:lang="ko"><![CDATA[단락에디터 콤포넌트]]></value>
|
||||
<value xml:lang="en"><![CDATA[DrEditor component]]></value>
|
||||
</item>
|
||||
</item>
|
||||
</lang>
|
||||
|
|
|
|||
14
modules/autoinstall/queries/getNeedUpdate.xml
Normal file
14
modules/autoinstall/queries/getNeedUpdate.xml
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
<query id="getNeedUpdate" action="select">
|
||||
<tables>
|
||||
<table name="ai_installed_packages" alias="i" />
|
||||
<table name="autoinstall_packages" alias="p" />
|
||||
</tables>
|
||||
<columns>
|
||||
<column name="i.*" />
|
||||
<column name="p.path" />
|
||||
</columns>
|
||||
<conditions>
|
||||
<condition operation="equal" column="i.package_srl" var="p.package_srl" />
|
||||
<condition operation="equal" column="i.need_update" default="Y" pipe="and" />
|
||||
</conditions>
|
||||
</query>
|
||||
Loading…
Add table
Add a link
Reference in a new issue