Merge branch release/21.7.7 of zentao/zentaopms (#12143)

This commit is contained in:
刘刚
2025-11-03 10:51:06 +08:00
committed by Gitfox
2 changed files with 11 additions and 5 deletions
+5 -5
View File
@@ -156,7 +156,7 @@ class actionZen extends action
if(!in_array($replaceName, $existNames)) break;
}
$replaceCode = '';
if($object->code)
if(isset($object->code))
{
$existCodes = $this->action->getLikeObject($table, 'code', 'code', $repeatObject->code . '_%');
for($i = 1; $i < 10000; $i ++)
@@ -199,7 +199,7 @@ class actionZen extends action
public function getConfirmNoMessage(object $repeatObject, object $object, object $oldAction, string $replaceName, string $replaceCode): string
{
$message = '';
if($repeatObject->name == $object->name && $repeatObject->code && $repeatObject->code == $object->code)
if($repeatObject->name == $object->name && !empty($repeatObject->code) && $repeatObject->code == $object->code)
{
$message = sprintf($this->lang->action->repeatChange, $this->lang->{$oldAction->objectType}->common, $replaceName, $replaceCode);
}
@@ -207,7 +207,7 @@ class actionZen extends action
{
$message = sprintf($this->lang->action->nameRepeatChange, $this->lang->{$oldAction->objectType}->common, $replaceName);
}
elseif($repeatObject->code && $repeatObject->code == $object->code)
elseif(!empty($repeatObject->code) && $repeatObject->code == $object->code)
{
$message = sprintf($this->lang->action->codeRepeatChange, $this->lang->{$oldAction->objectType}->common, $replaceCode);
}
@@ -231,7 +231,7 @@ class actionZen extends action
public function recoverObject(object $repeatObject, object $object, string $replaceName, string $replaceCode, string $table, object $oldAction)
{
$recoverData = array();
if($repeatObject->name == $object->name && $repeatObject->code && $repeatObject->code == $object->code)
if($repeatObject->name == $object->name && !empty($repeatObject->code) && $repeatObject->code == $object->code)
{
$recoverData = array('code' => $replaceCode, 'name' => $replaceName);
}
@@ -239,7 +239,7 @@ class actionZen extends action
{
$recoverData = array('name' => $replaceName);
}
elseif($repeatObject->code && $repeatObject->code == $object->code)
elseif(!empty($repeatObject->code) && $repeatObject->code == $object->code)
{
$recoverData = array('code' => $replaceCode);
}
+6
View File
@@ -2419,6 +2419,12 @@ class doc extends control
$doc->html = $doc->content;
$doc->content = $doc->rawContent;
unset($doc->rawContent);
if($doc->contentType == 'doc' && preg_match('/ src="{([0-9]+)(\.(\w+))?}" /', $doc->html))
{
$doc->contentType = 'html';
$doc->content = preg_replace('/ src="{([0-9]+)(\.(\w+))?}" /', ' src="' . helper::createLink('file', 'read', "fileID=$1", "$3") . '" ', $doc->html);
}
}
if($docID) $this->doc->createAction($docID, 'view');