Merge branch 'master' of https://gitlab.zcorp.cc/easycorp/zentaopms into sprint/253_tianshujie_fixbug
This commit is contained in:
@@ -3262,19 +3262,15 @@ class ztSessionHandler
|
||||
public function write($id, $sessData)
|
||||
{
|
||||
$sessFile = $this->getSessionFile($id);
|
||||
if(md5_file($sessFile) == md5($sessData)) return true;
|
||||
|
||||
if(file_put_contents($sessFile, $sessData))
|
||||
{
|
||||
if(!file_exists($this->rawFile)) touch($this->rawFile);
|
||||
if(strpos($sessData, 'user|') !== false)
|
||||
{
|
||||
if(file_exists($this->rawFile))
|
||||
{
|
||||
$rawSessContent = (string) file_get_contents($this->rawFile);
|
||||
if(strpos($rawSessContent, 'user|') === false) copy($sessFile, $this->rawFile);
|
||||
}
|
||||
else
|
||||
{
|
||||
copy($sessFile, $this->rawFile);
|
||||
}
|
||||
$rawSessContent = (string) file_get_contents($this->rawFile);
|
||||
if(empty($rawSessContent)) file_put_contents($this->rawFile, $sessData);
|
||||
}
|
||||
|
||||
return true;
|
||||
|
||||
@@ -428,7 +428,7 @@ class extension extends control
|
||||
|
||||
if($_FILES)
|
||||
{
|
||||
if($_FILES['file']['size'] == 0) return print(js::alert(str_replace("'", "\'", sprintf($this->lang->extension->errorFileNotEmpty, $fileName, $return->error))));
|
||||
if($_FILES['file']['error'] == UPLOAD_ERR_NO_FILE) return print(js::alert($this->lang->extension->errorFileNotEmpty));
|
||||
|
||||
$tmpName = $_FILES['file']['tmp_name'];
|
||||
$fileName = $_FILES['file']['name'];
|
||||
|
||||
Reference in New Issue
Block a user