]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
Somewhat better logging while still in trial phase
authorMikael Nordfeldth <mmn@hethane.se>
Sat, 3 Oct 2015 10:33:33 +0000 (12:33 +0200)
committerMikael Nordfeldth <mmn@hethane.se>
Sat, 3 Oct 2015 10:33:33 +0000 (12:33 +0200)
plugins/ActivityModeration/ActivityModerationPlugin.php

index 4422310e58af1abb680c3eccfd7f76664bea1003..64e065d305bee23a70b6e95d2e6f97c1472f0260 100644 (file)
@@ -89,8 +89,8 @@ class ActivityModerationPlugin extends ActivityVerbHandlerPlugin
             return $deleted;
         }
 
-        common_debug('DELETING notice: ' . $act->objects[0]->id);
         $target = Notice::getByUri($act->objects[0]->id);
+        common_debug('DELETING notice: ' . $act->objects[0]->id . ' on behalf of profile id==' . $target->getProfile()->getID());
 
         $deleted = new Deleted_notice();
 
@@ -101,8 +101,10 @@ class ActivityModerationPlugin extends ActivityVerbHandlerPlugin
         $deleted->act_created   = $target->created;
         $deleted->created       = common_sql_now();
 
-        common_debug('DELETING notice, storing Deleted_notice entry');
-        $deleted->insert();
+        $result = $deleted->insert();
+        if ($result === false) {
+            throw new ServerException('Could not insert Deleted_notice entry into database!');
+        }
 
         common_debug('DELETING notice, actually deleting now!');
         $target->delete();