]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - plugins/ActivityModeration/ActivityModerationPlugin.php
Merge branch 'doc-backup-restore-def-vals' into 'nightly'
[quix0rs-gnu-social.git] / plugins / ActivityModeration / ActivityModerationPlugin.php
index 208a05449df1eb4d3797c3b8413291783b7e23b5..ba53a13a8af3437e06d6af5f78e77665024446fa 100644 (file)
@@ -74,7 +74,7 @@ class ActivityModerationPlugin extends ActivityVerbHandlerPlugin
         switch (true) {
         case ActivityUtils::compareVerbs($verb, array(ActivityVerb::DELETE)):
             // do whatever preparation is necessary to delete a verb
-            $target->delete();
+            $target->deleteAs($scoped);
             break;
         default:
             throw new ServerException('ActivityVerb POST not handled by plugin that was supposed to do it.');
@@ -87,7 +87,8 @@ class ActivityModerationPlugin extends ActivityVerbHandlerPlugin
     }
 
     public function onDeleteNoticeAsProfile(Notice $stored, Profile $actor, &$result) {
-        // By adding a new 'delete' verb we will eventually trigger $this->saveObjectFromActivity
+        // By adding a new object with the 'delete' verb we will trigger
+        // $this->saveObjectFromActivity that will do the actual ->delete()
         if (false === Deleted_notice::addNew($stored, $actor)) {
             // false is returned if we did not have an error, but did not create the object
             // (i.e. the author is currently being deleted)
@@ -95,8 +96,8 @@ class ActivityModerationPlugin extends ActivityVerbHandlerPlugin
         }
 
         // We return false (to stop the event) if the deleted_notice entry was 
-        // added, which means we have run $this->saveObjectFromActivity which 
-        // in turn has called the delete function of the notice.
+        // added, which means we have already run $this->saveObjectFromActivity
+        // which in turn has called the delete function of the notice.
         return false;
     }