+ add the security checking when execute upgrade program.

This commit is contained in:
wangchunsheng
2011-03-12 07:54:41 +00:00
parent 1b68d4b7a9
commit e78d3616d0
5 changed files with 29 additions and 0 deletions
+16
View File
@@ -52,6 +52,22 @@ class common extends control
}
}
/**
* Check upgrade's status file is ok or not.
*
* @access public
* @return void
*/
public function checkUpgradeStatus()
{
$statusFile = $this->app->getAppRoot() . 'www' . $this->pathFix . 'ok';
if(!file_exists($statusFile) or time() - filemtime($statusFile) > 3600)
{
$this->app->loadLang('upgrade');
die(printf($this->lang->upgrade->setStatusFile, $statusFile, $statusFile, $statusFile));
}
}
/**
* Check the user has permisson of one method of one module.
*