| @@ 310-317 (lines=8) @@ | ||
| 307 | return new BaseObject(-1, 'msg_invalid_request'); |
|
| 308 | } |
|
| 309 | ||
| 310 | if(!$obj->comment_srl) |
|
| 311 | { |
|
| 312 | $obj->comment_srl = getNextSequence(); |
|
| 313 | } |
|
| 314 | elseif(!$is_admin && !$manual_inserted && !checkUserSequence($obj->comment_srl)) |
|
| 315 | { |
|
| 316 | return new BaseObject(-1, 'msg_not_permitted'); |
|
| 317 | } |
|
| 318 | ||
| 319 | // determine the order |
|
| 320 | $obj->list_order = getNextSequence() * -1; |
|
| @@ 240-241 (lines=2) @@ | ||
| 237 | $output = ModuleHandler::triggerCall('document.insertDocument', 'before', $obj); |
|
| 238 | if(!$output->toBool()) return $output; |
|
| 239 | // Register it if no given document_srl exists |
|
| 240 | if(!$obj->document_srl) $obj->document_srl = getNextSequence(); |
|
| 241 | elseif(!$manual_inserted && !$isRestore && !checkUserSequence($obj->document_srl)) return new BaseObject(-1, 'msg_not_permitted'); |
|
| 242 | ||
| 243 | $oDocumentModel = getModel('document'); |
|
| 244 | // Set to 0 if the category_srl doesn't exist |
|