return true;
}
+ public function onGetNoticeSqlTimestamp($id, &$timestamp)
+ {
+ try {
+ $deleted = Deleted_notice::getByID($id);
+ $timestamp = $deleted->act_created;
+ } catch (NoResultException $e) {
+ return true;
+ }
+ // we're done for the event, so return false to stop it
+ return false;
+ }
+
+ public function onIsNoticeDeleted($id, &$deleted)
+ {
+ try {
+ $found = Deleted_notice::getByID($id);
+ $deleted = ($found instanceof Deleted_notice);
+ } catch (NoResultException $e) {
+ $deleted = false;
+ }
+ // return true (continue event) if $deleted is false, return false (stop event) if deleted notice was found
+ return !$deleted;
+ }
+
protected function getActionTitle(ManagedAction $action, $verb, Notice $target, Profile $scoped)
{
// FIXME: switch based on action type
foreach($props as $prop) {
$stored->$prop = $target->$prop;
}
- //$stored->content = $stored->content ?: _('Notice deleted.');
- //$stored->rendered = $stored->rendered ?: $stored->rendered;
// Let's see if this has been deleted already.
try {