Commit 5a235ffb authored by mmn's avatar mmn

Event fixes for activityhandlerplugin

parent 642f7f85
......@@ -913,7 +913,7 @@ class Notice extends Managed_DataObject
$object = null;
Event::handle('StoreActivityObject', array($act, $stored, $options, &$object));
if (empty($object)) {
throw new ServerException('No object from StoreActivityObject '.$stored->uri . ': '.$act->asString());
throw new ServerException('Unsuccessful call to StoreActivityObject '.$stored->uri . ': '.$act->asString());
}
$stored->object_type = ActivityUtils::resolveUri($object->getObjectType(), true);
$stored->update($orig);
......
......@@ -175,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)) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment