* finish task #4574.

This commit is contained in:
wangyidong
2018-07-03 16:29:58 +08:00
parent 441b8cf589
commit ef8ffca2e8
2 changed files with 11 additions and 1 deletions
+6
View File
@@ -622,6 +622,12 @@ class docModel extends model
public function update($docID)
{
$oldDoc = $this->dao->select('*')->from(TABLE_DOC)->where('id')->eq((int)$docID)->fetch();
if(!empty($_POST['editedDate']) and $oldDoc->editedDate != $this->post->editedDate)
{
dao::$errors[] = $this->lang->error->editedByOther;
return false;
}
$now = helper::now();
$doc = fixer::input('post')->setDefault('module', 0)
->stripTags($this->config->doc->editor->edit['id'], $this->config->allowedTags)
+5 -1
View File
@@ -74,7 +74,11 @@
</tr>
<tr>
<td colspan='3' class='text-center form-actions'>
<?php echo html::submitButton('', '', 'btn btn-wide btn-primary') . ' ' . html::backButton('', '', 'btn btn-wide');?>
<?php
echo html::hidden('editedDate', $doc->editedDate);
echo html::submitButton('', '', 'btn btn-wide btn-primary');
echo html::backButton('', '', 'btn btn-wide');
?>
</td>
</tr>
</table>