mirror of https://gitee.com/karson/fastadmin.git
修复更新插件没有权限addons文件夹
parent
ebf38b470c
commit
2a19697858
|
|
@ -268,12 +268,16 @@ class Addon extends Backend
|
|||
public function upgrade()
|
||||
{
|
||||
$name = $this->request->post("name");
|
||||
$addonTmpDir = RUNTIME_PATH . 'addons' . DS;
|
||||
if (!$name) {
|
||||
$this->error(__('Parameter %s can not be empty', 'name'));
|
||||
}
|
||||
if (!preg_match("/^[a-zA-Z0-9]+$/", $name)) {
|
||||
$this->error(__('Addon name incorrect'));
|
||||
}
|
||||
if (!is_dir($addonTmpDir)) {
|
||||
@mkdir($addonTmpDir, 0755, true);
|
||||
}
|
||||
try {
|
||||
$uid = $this->request->post("uid");
|
||||
$token = $this->request->post("token");
|
||||
|
|
|
|||
Loading…
Reference in New Issue