Merge branch release/21.7.5 of zentao/zentaopms (#11172)

This commit is contained in:
刘刚
2025-08-28 15:12:05 +08:00
committed by Gitfox
2 changed files with 5 additions and 3 deletions
+2 -2
View File
@@ -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;
+3 -1
View File
@@ -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));