X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=plugins%2FEvent%2FEventPlugin.php;h=a1dffea3b96b6befbe0207c08447ffafba66560b;hb=546a03b5eac5f172d543a889625e2f4de446e8b7;hp=965eef7744f006df74fe6e75411523496ebdc4e6;hpb=7d191f8062e5d117ac234737bc7ab838859dc4d6;p=quix0rs-gnu-social.git diff --git a/plugins/Event/EventPlugin.php b/plugins/Event/EventPlugin.php index 965eef7744..a1dffea3b9 100644 --- a/plugins/Event/EventPlugin.php +++ b/plugins/Event/EventPlugin.php @@ -44,7 +44,7 @@ if (!defined('STATUSNET')) { * @license http://www.fsf.org/licensing/licenses/agpl-3.0.html AGPL 3.0 * @link http://status.net/ */ -class EventPlugin extends MicroappPlugin +class EventPlugin extends MicroAppPlugin { /** * Set up our tables (event and rsvp) @@ -90,7 +90,7 @@ class EventPlugin extends MicroappPlugin return true; } - function onPluginVersion(&$versions) + function onPluginVersion(array &$versions) { $versions[] = array('name' => 'Event', 'version' => GNUSOCIAL_VERSION, @@ -128,7 +128,7 @@ class EventPlugin extends MicroappPlugin * * @return Notice the resulting notice */ - function saveNoticeFromActivity($activity, $actor, $options=array()) + function saveNoticeFromActivity(Activity $activity, Profile $actor, array $options=array()) { if (count($activity->objects) != 1) { // TRANS: Exception thrown when there are too many activity objects. @@ -182,7 +182,7 @@ class EventPlugin extends MicroappPlugin * * @return ActivityObject */ - function activityObjectFromNotice($notice) + function activityObjectFromNotice(Notice $notice) { $happening = null; @@ -243,12 +243,12 @@ class EventPlugin extends MicroappPlugin * * @return ActivityObject */ - function onEndNoticeAsActivity($notice, &$act) { - switch ($notice->object_type) { + protected function extendActivity(Notice $stored, Activity $act, Profile $scoped=null) { + switch ($stored->object_type) { case RSVP::POSITIVE: case RSVP::NEGATIVE: case RSVP::POSSIBLE: - $act->verb = $notice->object_type; + $act->verb = $stored->object_type; break; } return true; @@ -288,7 +288,7 @@ class EventPlugin extends MicroappPlugin * * @param Notice $notice */ - function deleteRelated($notice) + function deleteRelated(Notice $notice) { switch ($notice->object_type) { case Happening::OBJECT_TYPE: @@ -311,12 +311,12 @@ class EventPlugin extends MicroappPlugin function onEndShowScripts($action) { - $action->script($this->path('event.js')); + $action->script($this->path('js/event.js')); } function onEndShowStyles($action) { - $action->cssLink($this->path('event.css')); + $action->cssLink($this->path('css/event.css')); return true; }