mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-05-05 01:52:17 +09:00
Fix 2056 add trigger before moving document/comment to trash
This commit is contained in:
parent
565cfad15f
commit
33b2c79891
2 changed files with 15 additions and 0 deletions
|
|
@ -1365,6 +1365,14 @@ class CommentController extends Comment
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Call trigger (before).
|
||||||
|
$trigger_output = ModuleHandler::triggerCall('comment.moveCommentToTrash', 'before', $obj);
|
||||||
|
if (!$trigger_output->toBool())
|
||||||
|
{
|
||||||
|
return $trigger_output;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Create trash object.
|
||||||
require_once(RX_BASEDIR.'modules/trash/model/TrashVO.php');
|
require_once(RX_BASEDIR.'modules/trash/model/TrashVO.php');
|
||||||
$oTrashVO = new TrashVO();
|
$oTrashVO = new TrashVO();
|
||||||
$oTrashVO->setTrashSrl(getNextSequence());
|
$oTrashVO->setTrashSrl(getNextSequence());
|
||||||
|
|
|
||||||
|
|
@ -1385,6 +1385,13 @@ class DocumentController extends Document
|
||||||
return new BaseObject(-1, 'Cannot throw data from the trash to the trash');
|
return new BaseObject(-1, 'Cannot throw data from the trash to the trash');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Call trigger (before).
|
||||||
|
$trigger_output = ModuleHandler::triggerCall('document.moveDocumentToTrash', 'before', $obj);
|
||||||
|
if (!$trigger_output->toBool())
|
||||||
|
{
|
||||||
|
return $trigger_output;
|
||||||
|
}
|
||||||
|
|
||||||
// Create trash object.
|
// Create trash object.
|
||||||
require_once(RX_BASEDIR.'modules/trash/model/TrashVO.php');
|
require_once(RX_BASEDIR.'modules/trash/model/TrashVO.php');
|
||||||
$oTrashVO = new TrashVO();
|
$oTrashVO = new TrashVO();
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue