Merge branch release/21.7.5 of zentao/zentaopms (#11172)
This commit is contained in:
@@ -987,8 +987,8 @@ class dbh
|
||||
*/
|
||||
public function checkUserPriv(): string
|
||||
{
|
||||
global $dbConfig;
|
||||
if(!in_array($this->dbConfig->driver, $dbConfig->mysqlDriverList)) return '';
|
||||
global $config;
|
||||
if(!in_array($this->dbConfig->driver, $config->mysqlDriverList)) return '';
|
||||
|
||||
$dbName = $this->dbConfig->name;
|
||||
$user = $this->dbConfig->user;
|
||||
|
||||
@@ -102,7 +102,9 @@ class transfer extends control
|
||||
$file = $this->loadModel('file')->getUpload('file');
|
||||
if(!empty($file['error'])) return $this->send(array('result' => 'fail', 'message' => $this->lang->file->uploadError[$file['error']]));
|
||||
|
||||
$file = $file[0];
|
||||
$file = $file[0];
|
||||
if(!in_array(strtolower($file['extension']), array('xls', 'xlsx'))) return $this->send(array('result' => 'fail', 'message' => $this->lang->excel->canNotRead));
|
||||
|
||||
$shortName = $this->file->getSaveName($file['pathname']);
|
||||
if(empty($shortName)) return $this->send(array('result' => 'fail', 'message' => $this->lang->excel->emptyFileName));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user