* finish task #1980.

This commit is contained in:
wangyidong
2014-07-28 02:05:40 +00:00
parent fd05b8d667
commit 6989db2963
+6 -2
View File
@@ -52,6 +52,9 @@ class upgrade extends control
$this->view->confirm = $this->upgrade->getConfirm($this->post->fromVersion);
$this->view->fromVersion = $this->post->fromVersion;
/* When sql is empty then skip it. */
if(empty($this->view->confirm)) $this->locate(inlink('execute', "fromVersion={$this->post->fromVersion}"));
$this->display();
}
@@ -61,9 +64,10 @@ class upgrade extends control
* @access public
* @return void
*/
public function execute()
public function execute($fromVersion = '')
{
$this->upgrade->execute($this->post->fromVersion);
$fromVersion = isset($_POST['fromVersion']) ? $this->post->fromVersion : $fromVersion;
$this->upgrade->execute($fromVersion);
$this->view->title = $this->lang->upgrade->result;
$this->view->position[] = $this->lang->upgrade->common;