* Add update log of upgrade page.
This commit is contained in:
@@ -326,8 +326,9 @@ class instance extends control
|
||||
return $this->send(array('result' => 'success', 'message' => $this->lang->instance->notices['upgradeSuccess'], 'load' => $this->createLink('instance', 'view', "id=$id"), 'closeModal' => true));
|
||||
}
|
||||
|
||||
$this->view->title = $this->lang->instance->upgrade . $instance->name;
|
||||
$this->view->instance = $instance;
|
||||
$this->view->title = $this->lang->instance->upgrade . $instance->name;
|
||||
$this->view->desc = $this->instanceZen->getLastArticle($instance->appID);
|
||||
$this->view->instance = $instance;
|
||||
|
||||
$this->display();
|
||||
}
|
||||
|
||||
@@ -29,7 +29,7 @@ window.afterPageUpdate = function()
|
||||
{
|
||||
setTimeout(function()
|
||||
{
|
||||
if(reloadTimes > 10) return;
|
||||
if(reloadTimes > 20) return;
|
||||
if($('#statusTD').data('reload') === true || $('#memoryRate').data('load') == true)
|
||||
{
|
||||
reloadTimes++;
|
||||
|
||||
@@ -18,6 +18,7 @@ formPanel
|
||||
set::title(''),
|
||||
set::actions(array('submit')),
|
||||
set::submitBtnText($lang->instance->upgrade),
|
||||
h::p($desc),
|
||||
span
|
||||
(
|
||||
setClass('p-5'),
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
<?php
|
||||
declare(strict_types=1);
|
||||
class instanceZen extends instance
|
||||
{
|
||||
/**
|
||||
* 获取最新一条app动态。
|
||||
* Get the last article of an app.
|
||||
*
|
||||
* @param int $appID
|
||||
* @access protected
|
||||
* @return string
|
||||
*/
|
||||
protected function getLastArticle(int $appID): string
|
||||
{
|
||||
$appInfo = $this->store->getAppInfo($appID, true);
|
||||
if(empty($appInfo)) return '';
|
||||
|
||||
$dynamicResult = $this->store->appDynamic($appInfo, 1, 1);
|
||||
if(empty($dynamicResult) || empty($dynamicResult->articles)) return '';
|
||||
|
||||
return $dynamicResult->articles[0]->title;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user