Merge branch '15.0.beta3' of https://gitlab.zcorp.cc/easycorp/zentaopms into 15.0.beta3

This commit is contained in:
hufangzhou
2021-04-27 16:57:35 +08:00
9 changed files with 13 additions and 33 deletions
+1 -1
View File
@@ -505,7 +505,7 @@ class caselib extends control
$file = $file[0];
$fileName = $this->file->savePath . $this->file->getSaveName($file['pathname']);
helper::saveFile($file['tmpname'], $fileName);
move_uploaded_file($file['tmpname'], $fileName);
$rows = $this->file->parseCSV($fileName);
$fields = $this->testcase->getImportFields($productID);
+1
View File
@@ -73,6 +73,7 @@ class executionModel extends model
{
global $lang;
$this->loadModel('execution');
$this->app->loadLang('project');
$lang->executionCommon = $lang->project->stage;
include $this->app->getModulePath('execution') . 'lang/' . $this->app->getClientLang() . '.php';
}
+2 -1
View File
@@ -431,7 +431,7 @@ class extension extends control
$tmpName = $_FILES['file']['tmp_name'];
$fileName = $_FILES['file']['name'];
$dest = $this->app->getTmpRoot() . "/extension/$fileName";
helper::saveFile($tmpName, $dest);
move_uploaded_file($tmpName, $dest);
$extension = basename($fileName, '.zip');
$return = $this->extension->extractPackage($extension);
@@ -455,6 +455,7 @@ class extension extends control
$link = $type == 'install' ? inlink('install', "extension=$extension") : inlink('upgrade', "extension=$extension");
die(js::locate($link, 'parent'));
}
$this->display();
}
+2 -2
View File
@@ -97,7 +97,7 @@ class fileModel extends model
foreach($files as $id => $file)
{
if($file['size'] == 0) continue;
if(!helper::saveFile($file['tmpname'], $this->savePath . $this->getSaveName($file['pathname']))) return false;
if(!move_uploaded_file($file['tmpname'], $this->savePath . $this->getSaveName($file['pathname']))) return false;
$file = $this->compressImage($file);
@@ -470,7 +470,7 @@ class fileModel extends model
$filePath = $this->dao->select('pathname')->from(TABLE_FILE)->where('id')->eq($fileID)->fetch();
$pathName = $filePath->pathname;
$realPathName = $this->savePath . $this->getRealPathName($pathName);
if(!is_dir(dirname($realPathName)))mkdir(dirname($realPathName));
if(!is_dir(dirname($realPathName))) mkdir(dirname($realPathName));
helper::saveFile($file['tmpname'], $realPathName);
$file['pathname'] = $pathName;
+2 -1
View File
@@ -17,8 +17,9 @@ $sessionString .= session_name() . '=' . session_id();
function deleteFile(fileID)
{
if(!fileID) return;
hiddenwin.location.href =createLink('file', 'delete', 'fileID=' + fileID);
hiddenwin.location.href = createLink('file', 'delete', 'fileID=' + fileID);
}
/* Download a file, append the mouse to the link. Thus we call decide to open the file in browser no download it. */
function downloadFile(fileID, extension, imageWidth, fileTitle)
{
+1 -1
View File
@@ -1523,7 +1523,7 @@ class testcase extends control
$file = $file[0];
$fileName = $this->file->savePath . $this->file->getSaveName($file['pathname']);
helper::saveFile($file['tmpname'], $fileName);
move_uploaded_file($file['tmpname'], $fileName);
$rows = $this->file->parseCSV($fileName);
$fields = $this->testcase->getImportFields($productID);
+1 -1
View File
@@ -1628,7 +1628,7 @@ class testtaskModel extends model
$file = $file[0];
$fileName = $this->file->savePath . $this->file->getSaveName($file['pathname']);
helper::saveFile($file['tmpname'], $fileName);
move_uploaded_file($file['tmpname'], $fileName);
if(simplexml_load_file($fileName) === false)
{
dao::$errors[] = $this->lang->testtask->cannotBeParsed;