]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - lib/activityhandlerplugin.php
Event fixes for activityhandlerplugin
[quix0rs-gnu-social.git] / lib / activityhandlerplugin.php
index cf4e4f0e220c6e3f15e4afd7d11e119cfa05b43c..19e4dc27b0fd7836477b8c3ae3a38c9fd74719ba 100644 (file)
@@ -163,7 +163,8 @@ abstract class ActivityHandlerPlugin extends Plugin
     * @param Notice   $stored       The notice in our database for this certain object
     * @param array $options=array()
     *
-    * @return object    If the verb handling plugin creates an object, it can be returned here.
+    * @return object    If the verb handling plugin creates an object, it can be returned here (otherwise true)
+    * @throws exception On any error.
     */
     protected function saveObjectFromActivity(Activity $activity, Notice $stored, array $options=array())
     {
@@ -174,7 +175,7 @@ abstract class ActivityHandlerPlugin extends Plugin
      * This usually gets called from Notice::saveActivity after a Notice object has been created,
      * so it contains a proper id and a uri for the object to be saved.
      */
-    public function onStoreActivityObject(Activity $act, Notice $stored, array $options=array(), &$object) {
+    public function onStoreActivityObject(Activity $act, Notice $stored, array $options, &$object) {
         // $this->oldSaveNew is there during a migration period of plugins, to start using
         // Notice::saveActivity instead of Notice::saveNew
         if (!$this->isMyActivity($act) || isset($this->oldSaveNew)) {
@@ -186,7 +187,7 @@ abstract class ActivityHandlerPlugin extends Plugin
             // of objects which are returned from saveObjectFromActivity.
             if ($object instanceof Managed_DataObject) {
                 // If the verb handling plugin figured out some more attention URIs, add them here to the
-                // original activity.
+                // original activity. This is only done if a separate object is actually needed to be saved.
                 $act->context->attention = array_merge($act->context->attention, $object->getAttentionArray());
             }
         } catch (Exception $e) {