diff --git a/EVENTS.txt b/EVENTS.txt index a9057e7f6a..d8763b05cc 100644 --- a/EVENTS.txt +++ b/EVENTS.txt @@ -216,7 +216,9 @@ EndShowBody: called after showing the
element (and ) - $action: action object being shown StartPersonalGroupNav: beginning of personal group nav menu -- $action: action object being shown +- $menu: Menu list object being shown +- $target: Profile for whom it is shown +- $scoped: Profile of currently logged in user (or null) EndPersonalGroupNav: end of personal group nav menu (good place to add a menu item) - $action: action object being shown diff --git a/actions/block.php b/actions/block.php index 7458caa6ac..53d8ae7ae0 100644 --- a/actions/block.php +++ b/actions/block.php @@ -74,8 +74,6 @@ class BlockAction extends ProfileFormAction /** * Handle request * - * Shows a page with list of favorite notices - * * @param array $args $_REQUEST args; handled in prepare() * * @return void diff --git a/classes/Profile.php b/classes/Profile.php index 862e8ff11a..7e8e37d2ed 100644 --- a/classes/Profile.php +++ b/classes/Profile.php @@ -760,39 +760,6 @@ class Profile extends Managed_DataObject $other->isSubscribed($this); } - function hasFave($notice) - { - $fave = Fave::pkeyGet(array('user_id' => $this->id, - 'notice_id' => $notice->id)); - return ((is_null($fave)) ? false : true); - } - - function faveCount() - { - $c = Cache::instance(); - if (!empty($c)) { - $cnt = $c->get(Cache::key('profile:fave_count:'.$this->id)); - if (is_integer($cnt)) { - return (int) $cnt; - } - } - - $faves = new Fave(); - $faves->user_id = $this->id; - $cnt = (int) $faves->count('notice_id'); - - if (!empty($c)) { - $c->set(Cache::key('profile:fave_count:'.$this->id), $cnt); - } - - return $cnt; - } - - function favoriteNotices($own=false, $offset=0, $limit=NOTICES_PER_PAGE, $since_id=0, $max_id=0) - { - return Fave::stream($this->id, $offset, $limit, $own, $since_id, $max_id); - } - function noticeCount() { $c = Cache::instance(); @@ -815,20 +782,6 @@ class Profile extends Managed_DataObject return $cnt; } - function blowFavesCache() - { - $cache = Cache::instance(); - if ($cache) { - // Faves don't happen chronologically, so we need to blow - // ;last cache, too - $cache->delete(Cache::key('fave:ids_by_user:'.$this->id)); - $cache->delete(Cache::key('fave:ids_by_user:'.$this->id.';last')); - $cache->delete(Cache::key('fave:ids_by_user_own:'.$this->id)); - $cache->delete(Cache::key('fave:ids_by_user_own:'.$this->id.';last')); - } - $this->blowFaveCount(); - } - function blowSubscriberCount() { $c = Cache::instance(); @@ -845,14 +798,6 @@ class Profile extends Managed_DataObject } } - function blowFaveCount() - { - $c = Cache::instance(); - if (!empty($c)) { - $c->delete(Cache::key('profile:fave_count:'.$this->id)); - } - } - function blowNoticeCount() { $c = Cache::instance(); diff --git a/classes/User.php b/classes/User.php index 9b3ebed057..c3ceb2646b 100644 --- a/classes/User.php +++ b/classes/User.php @@ -440,11 +440,6 @@ class User extends Managed_DataObject } } - function hasFave($notice) - { - return $this->getProfile()->hasFave($notice); - } - function mutuallySubscribed(Profile $other) { return $this->getProfile()->mutuallySubscribed($other); @@ -479,16 +474,6 @@ class User extends Managed_DataObject return $this->getProfile()->getNotices($offset, $limit, $since_id, $before_id); } - function favoriteNotices($own=false, $offset=0, $limit=NOTICES_PER_PAGE, $since_id=0, $max_id=0) - { - return $this->getProfile()->favoriteNotices($own, $offset, $limit, $since_id, $max_id); - } - - function blowFavesCache() - { - $this->getProfile()->blowFavesCache(); - } - function getSelfTags() { return Profile_tag::getTagsArray($this->id, $this->id, $this->id); @@ -641,7 +626,7 @@ class User extends Managed_DataObject common_log(LOG_INFO, "User {$this->nickname} has no profile; continuing deletion."); } - $related = array('Fave', + $related = array( 'Confirm_address', 'Remember_me', 'Foreign_link', diff --git a/lib/apiaction.php b/lib/apiaction.php index 6de9c0b632..d945d532d0 100644 --- a/lib/apiaction.php +++ b/lib/apiaction.php @@ -243,8 +243,6 @@ class ApiAction extends Action $twitter_user['created_at'] = $this->dateTwitter($profile->created); - $twitter_user['favourites_count'] = $profile->faveCount(); // British spelling! - $timezone = 'UTC'; if (!empty($user) && $user->timezone) { @@ -290,6 +288,9 @@ class ApiAction extends Action $twitter_user['statusnet_profile_url'] = $profile->profileurl; + // The event call to handle NoticeSimpleStatusArray lets plugins add data to the output array + Event::handle('TwitterUserArray', array($profile, &$twitter_user, $this->scoped, array())); + return $twitter_user; } diff --git a/lib/personalgroupnav.php b/lib/personalgroupnav.php index d379dcf528..8c413c6ab9 100644 --- a/lib/personalgroupnav.php +++ b/lib/personalgroupnav.php @@ -50,24 +50,27 @@ class PersonalGroupNav extends Menu * * @return void */ - function show() + public function show() { - $user = common_current_user(); + // FIXME: Legacy StatusNet behaviour was to do this, but really it should be the GroupNav + // of the targeted user! ($this->action->arg('nickname') + $target = Profile::current(); - if (empty($user)) { + if (!$target instanceof Profile) { throw new ServerException('Cannot show personal group navigation without a current user.'); } - $user_profile = $user->getProfile(); - $nickname = $user->nickname; - $name = $user_profile->getBestName(); + $nickname = $target->getNickname(); + $name = $target->getBestName(); + + $scoped = Profile::current(); $action = $this->actionName; $mine = ($this->action->arg('nickname') == $nickname); // @fixme kinda vague $this->out->elementStart('ul', array('class' => 'nav')); - if (Event::handle('StartPersonalGroupNav', array($this))) { + if (Event::handle('StartPersonalGroupNav', array($this, $target, $scoped))) { $this->out->menuItem(common_local_url('all', array('nickname' => $nickname)), // TRANS: Menu item in personal group navigation menu. @@ -92,21 +95,9 @@ class PersonalGroupNav extends Menu // TRANS: %s is a username. sprintf(_('Replies to %s'), $name), $mine && $action =='replies', 'nav_timeline_replies'); - $this->out->menuItem(common_local_url('showfavorites', array('nickname' => - $nickname)), - // TRANS: Menu item in personal group navigation menu. - _m('MENU','Favorites'), - // @todo i18n FIXME: Need to make this two messages. - // TRANS: Menu item title in personal group navigation menu. - // TRANS: %s is a username. - sprintf(_('%s\'s favorite notices'), - // TRANS: Replaces %s in '%s\'s favorite notices'. (Yes, we know we need to fix this.) - ($user_profile) ? $name : _m('FIXME','User')), - $mine && $action =='showfavorites', 'nav_timeline_favorites'); - $cur = common_current_user(); - if ($cur && $cur->id == $user->id && + if ($scoped instanceof Profile && $scoped->id == $target->id && !common_config('singleuser', 'enabled')) { $this->out->menuItem(common_local_url('inbox', array('nickname' => @@ -118,7 +109,7 @@ class PersonalGroupNav extends Menu $mine && $action =='inbox'); } - Event::handle('EndPersonalGroupNav', array($this)); + Event::handle('EndPersonalGroupNav', array($this, $target, $scoped)); } $this->out->elementEnd('ul'); } diff --git a/lib/profileformaction.php b/lib/profileformaction.php index bfc7a3c7de..9ace6676c3 100644 --- a/lib/profileformaction.php +++ b/lib/profileformaction.php @@ -92,8 +92,6 @@ class ProfileFormAction extends RedirectingAction /** * Handle request * - * Shows a page with list of favorite notices - * * @param array $args $_REQUEST args; handled in prepare() * * @return void diff --git a/lib/publicgroupnav.php b/lib/publicgroupnav.php index 79190a11f0..e7c61000f3 100644 --- a/lib/publicgroupnav.php +++ b/lib/publicgroupnav.php @@ -88,13 +88,6 @@ class PublicGroupNav extends Menu _('Featured users'), $this->actionName == 'featured', 'nav_featured'); } - if (!common_config('singleuser', 'enabled')) { - // TRANS: Menu item in search group navigation panel. - $this->out->menuItem(common_local_url('favorited'), _m('MENU','Popular'), - // TRANS: Menu item title in search group navigation panel. - _('Popular notices'), $this->actionName == 'favorited', 'nav_timeline_favorited'); - } - Event::handle('EndPublicGroupNav', array($this)); } $this->action->elementEnd('ul'); diff --git a/lib/threadednoticelist.php b/lib/threadednoticelist.php index 62099e9155..bf5329e33b 100644 --- a/lib/threadednoticelist.php +++ b/lib/threadednoticelist.php @@ -467,9 +467,9 @@ class ThreadedNoticeListRepeatsItem extends NoticeListActorsItem $count - 3), $count - 3); } else { - // TRANS: List message for favoured notices. - // TRANS: %%s is a list of users liking a notice. - // TRANS: Plural is based on the number of of users that have favoured a notice. + // TRANS: List message for repeated notices. + // TRANS: %%s is a list of users who have repeated a notice. + // TRANS: Plural is based on the number of of users that have repeated a notice. return sprintf(_m('%%s repeated this.', '%%s repeated this.', $count), diff --git a/plugins/ActivitySpam/actions/train.php b/plugins/ActivitySpam/actions/train.php index c56f49fb51..0719c36550 100644 --- a/plugins/ActivitySpam/actions/train.php +++ b/plugins/ActivitySpam/actions/train.php @@ -141,8 +141,8 @@ class TrainAction extends Action if ($this->boolean('ajax')) { $this->startHTML('text/xml;charset=utf-8'); $this->elementStart('head'); - // TRANS: Page title for page on which favorite notices can be unfavourited. - $this->element('title', null, _('Disfavor favorite.')); + // TRANS: Page title for page on which we train the spam filter for ham or spam + $this->element('title', null, _('Train spam filter')); $this->elementEnd('head'); $this->elementStart('body'); $form->show(); diff --git a/plugins/AnonymousFave/actions/anondisfavor.php b/plugins/AnonymousFave/actions/anondisfavor.php index 15f1040b7c..6b0fae82c1 100644 --- a/plugins/AnonymousFave/actions/anondisfavor.php +++ b/plugins/AnonymousFave/actions/anondisfavor.php @@ -80,7 +80,7 @@ class AnonDisfavorAction extends RedirectingAction $this->serverError(_m('Could not delete favorite.')); } - $profile->blowFavesCache(); + Fave::blowCacheForProfileId($profile->id); if ($this->boolean('ajax')) { $this->startHTML('text/xml;charset=utf-8'); diff --git a/plugins/AnonymousFave/actions/anonfavor.php b/plugins/AnonymousFave/actions/anonfavor.php index 6af874679f..c9282f15f6 100644 --- a/plugins/AnonymousFave/actions/anonfavor.php +++ b/plugins/AnonymousFave/actions/anonfavor.php @@ -68,12 +68,12 @@ class AnonFavorAction extends RedirectingAction } $fave = Fave::addNew($profile, $notice); - if (!$fave) { + if (!$fave instanceof Fave) { // TRANS: Server error. $this->serverError(_m('Could not create favorite.')); } - $profile->blowFavesCache(); + Fave::blowCacheForProfileId($profile->id); if ($this->boolean('ajax')) { $this->startHTML('text/xml;charset=utf-8'); diff --git a/plugins/Bookmark/BookmarkPlugin.php b/plugins/Bookmark/BookmarkPlugin.php index 170fa578f9..fec1238e18 100644 --- a/plugins/Bookmark/BookmarkPlugin.php +++ b/plugins/Bookmark/BookmarkPlugin.php @@ -287,16 +287,9 @@ class BookmarkPlugin extends MicroAppPlugin * * @see Action */ - function onEndPersonalGroupNav($action) + function onEndPersonalGroupNav(Menu $menu, Profile $target, Profile $scoped=null) { - $this->user = common_current_user(); - - if (!$this->user) { - // TRANS: Client error displayed when trying to display bookmarks for a non-existing user. - $this->clientError(_('No such user.')); - } - - $action->menuItem(common_local_url('bookmarks', array('nickname' => $this->user->nickname)), + $menu->menuItem(common_local_url('bookmarks', array('nickname' => $target->getNickname())), // TRANS: Menu item in sample plugin. _m('Bookmarks'), // TRANS: Menu item title in sample plugin. diff --git a/plugins/Favorite/FavoritePlugin.php b/plugins/Favorite/FavoritePlugin.php index 64b52ff75d..117f6cb46d 100644 --- a/plugins/Favorite/FavoritePlugin.php +++ b/plugins/Favorite/FavoritePlugin.php @@ -162,6 +162,11 @@ class FavoritePlugin extends ActivityHandlerPlugin return true; } + public function onTwitterUserArray(Profile $profile, array &$userdata, Profile $scoped=null, array $args=array()) + { + $userdata['favourites_count'] = Fave::countByProfile($profile); + } + /** * Typically just used to fill out StatusNet specific data in API calls in the referenced $info array. */ @@ -180,10 +185,7 @@ class FavoritePlugin extends ActivityHandlerPlugin if ($fave->find()) { while ($fave->fetch()) { - Memcached_DataObject::blow('fave:ids_by_user_own:%d', $fave->user_id); - Memcached_DataObject::blow('fave:ids_by_user_own:%d;last', $fave->user_id); - Memcached_DataObject::blow('fave:ids_by_user:%d', $fave->user_id); - Memcached_DataObject::blow('fave:ids_by_user:%d;last', $fave->user_id); + Fave::blowCacheForProfileId($fave->user_id); $fave->delete(); } } @@ -191,6 +193,16 @@ class FavoritePlugin extends ActivityHandlerPlugin $fave->free(); } + public function onUserDeleteRelated(User $user, array &$related) + { + $fave = new Fave(); + $fave->user_id = $user->id; + $fave->delete(); // Will perform a DELETE matching "user_id = {$user->id}" + + Fave::blowCacheForProfileId($user->id); + return true; + } + public function onStartNoticeListPrefill(array &$notices, array $notice_ids, Profile $scoped=null) { // prefill array of objects, before pluginfication it was Notice::fillFaves($notices) @@ -301,6 +313,31 @@ class FavoritePlugin extends ActivityHandlerPlugin $supported = $supported || $cmd instanceof FavCommand; } + // Layout stuff + + public function onEndPersonalGroupNav(Menu $menu, Profile $target, Profile $scoped=null) + { + $menu->out->menuItem(common_local_url('showfavorites', array('nickname' => $target->getNickname())), + // TRANS: Menu item in personal group navigation menu. + _m('MENU','Favorites'), + // @todo i18n FIXME: Need to make this two messages. + // TRANS: Menu item title in personal group navigation menu. + // TRANS: %s is a username. + sprintf(_('%s\'s favorite notices'), $target->getBestName()), + $scoped instanceof Profile && $target->id === $scoped->id && $menu->actionName =='showfavorites', + 'nav_timeline_favorites'); + } + + public function onEndPublicGroupNav(Menu $menu) + { + if (!common_config('singleuser', 'enabled')) { + // TRANS: Menu item in search group navigation panel. + $menu->out->menuItem(common_local_url('favorited'), _m('MENU','Popular'), + // TRANS: Menu item title in search group navigation panel. + _('Popular notices'), $menu->actionName == 'favorited', 'nav_timeline_favorited'); + } + } + public function onPluginVersion(array &$versions) { $versions[] = array('name' => 'Favorite', diff --git a/plugins/Favorite/actions/apifavoritecreate.php b/plugins/Favorite/actions/apifavoritecreate.php index dd4fbd2795..00c1e21bbf 100644 --- a/plugins/Favorite/actions/apifavoritecreate.php +++ b/plugins/Favorite/actions/apifavoritecreate.php @@ -141,7 +141,7 @@ class ApiFavoriteCreateAction extends ApiAuthAction } $this->notify($fave, $this->notice, $this->user); - $this->user->blowFavesCache(); + Fave::blowCacheForProfileId($this->user->id); if ($this->format == 'xml') { $this->showSingleXmlStatus($this->notice); diff --git a/plugins/Favorite/actions/apifavoritedestroy.php b/plugins/Favorite/actions/apifavoritedestroy.php index 02f81cf4df..1c63ad2628 100644 --- a/plugins/Favorite/actions/apifavoritedestroy.php +++ b/plugins/Favorite/actions/apifavoritedestroy.php @@ -143,7 +143,7 @@ class ApiFavoriteDestroyAction extends ApiAuthAction return; } - $this->user->blowFavesCache(); + Fave::blowCacheForProfileId($this->user->id); if ($this->format == 'xml') { $this->showSingleXmlStatus($this->notice); diff --git a/plugins/Favorite/actions/apitimelinefavorites.php b/plugins/Favorite/actions/apitimelinefavorites.php index 13dc842447..366177078f 100644 --- a/plugins/Favorite/actions/apitimelinefavorites.php +++ b/plugins/Favorite/actions/apitimelinefavorites.php @@ -181,23 +181,13 @@ class ApiTimelineFavoritesAction extends ApiBareAuthAction common_debug("since id = " . $this->since_id . " max id = " . $this->max_id); - if (!empty($this->auth_user) && $this->auth_user->id == $this->target->id) { - $notice = $this->target->favoriteNotices( - true, - ($this->page-1) * $this->count, - $this->count, - $this->since_id, - $this->max_id - ); - } else { - $notice = $this->target->favoriteNotices( - false, - ($this->page-1) * $this->count, - $this->count, - $this->since_id, - $this->max_id - ); - } + $notice = Fave::stream($this->target->id, + ($this->page-1) * $this->count, // offset + $this->count, // limit + (!empty($this->auth_user) && $this->auth_user->id == $this->target->id), // own feed? + $this->since_id, + $this->max_id + ); while ($notice->fetch()) { $notices[] = clone($notice); diff --git a/plugins/Favorite/actions/atompubfavoritefeed.php b/plugins/Favorite/actions/atompubfavoritefeed.php index 837a9da3e9..69ae442a41 100644 --- a/plugins/Favorite/actions/atompubfavoritefeed.php +++ b/plugins/Favorite/actions/atompubfavoritefeed.php @@ -269,8 +269,8 @@ class AtompubfavoritefeedAction extends ApiAuthAction $fave = Fave::addNew($profile, $notice); - if (!empty($fave)) { - $this->_profile->blowFavesCache(); + if ($fave instanceof Fave) { + Fave::blowCacheForProfileId($this->_profile->id); $this->notify($fave, $notice, $this->auth_user); } diff --git a/plugins/Favorite/actions/disfavor.php b/plugins/Favorite/actions/disfavor.php index ef9ee1ee2b..3ce7e74c79 100644 --- a/plugins/Favorite/actions/disfavor.php +++ b/plugins/Favorite/actions/disfavor.php @@ -73,7 +73,7 @@ class DisfavorAction extends FormAction // TRANS: Server error displayed when removing a favorite from the database fails. $this->serverError(_('Could not delete favorite.')); } - $this->scoped->blowFavesCache(); + Fave::blowCacheForProfileId($this->scoped->id); if (StatusNet::isAjax()) { $this->startHTML('text/xml;charset=utf-8'); $this->elementStart('head'); diff --git a/plugins/Favorite/actions/favor.php b/plugins/Favorite/actions/favor.php index 0e0ff9383c..8db8f9f013 100644 --- a/plugins/Favorite/actions/favor.php +++ b/plugins/Favorite/actions/favor.php @@ -65,7 +65,7 @@ class FavorAction extends FormAction $this->serverError(_('Could not create favorite.')); } $this->notify($notice, $this->scoped->getUser()); - $this->scoped->blowFavesCache(); + Fave::blowCacheForProfileId($this->scoped->id); if (StatusNet::isAjax()) { $this->startHTML('text/xml;charset=utf-8'); $this->elementStart('head'); diff --git a/plugins/Favorite/actions/favoritesrss.php b/plugins/Favorite/actions/favoritesrss.php index de901b0b46..0cbebd723c 100644 --- a/plugins/Favorite/actions/favoritesrss.php +++ b/plugins/Favorite/actions/favoritesrss.php @@ -85,8 +85,7 @@ class FavoritesrssAction extends Rss10Action */ function getNotices($limit=0) { - $user = $this->user; - $notice = $user->favoriteNotices(false, 0, $limit); + $notice = Fave::stream($this->user->id, 0, $limit, $false); $notices = array(); while ($notice->fetch()) { $notices[] = clone($notice); diff --git a/plugins/Favorite/actions/showfavorites.php b/plugins/Favorite/actions/showfavorites.php index 0e028416da..cc355b1bef 100644 --- a/plugins/Favorite/actions/showfavorites.php +++ b/plugins/Favorite/actions/showfavorites.php @@ -116,17 +116,13 @@ class ShowfavoritesAction extends Action $cur = common_current_user(); - if (!empty($cur) && $cur->id == $this->user->id) { - - // Show imported/gateway notices as well as local if - // the user is looking at their own favorites - - $this->notice = $this->user->favoriteNotices(true, ($this->page-1)*NOTICES_PER_PAGE, - NOTICES_PER_PAGE + 1); - } else { - $this->notice = $this->user->favoriteNotices(false, ($this->page-1)*NOTICES_PER_PAGE, - NOTICES_PER_PAGE + 1); - } + // Show imported/gateway notices as well as local if + // the user is looking at their own favorites, otherwise not. + $this->notice = Fave::stream($this->user->id, + ($this->page-1)*NOTICES_PER_PAGE, // offset + NOTICES_PER_PAGE + 1, // limit + (!empty($cur) && $cur->id == $this->user->id) // own feed? + ); if (empty($this->notice)) { // TRANS: Server error displayed when favourite notices could not be retrieved from the database. diff --git a/plugins/Favorite/classes/Fave.php b/plugins/Favorite/classes/Fave.php index 130cf6aa78..777f3a362a 100644 --- a/plugins/Favorite/classes/Fave.php +++ b/plugins/Favorite/classes/Fave.php @@ -191,6 +191,27 @@ class Fave extends Managed_DataObject return $fav; } + static function countByProfile(Profile $profile) + { + $c = Cache::instance(); + if (!empty($c)) { + $cnt = $c->get(Cache::key('fave:count_by_profile:'.$profile->id)); + if (is_integer($cnt)) { + return $cnt; + } + } + + $faves = new Fave(); + $faves->user_id = $profile->id; + $cnt = (int) $faves->count('notice_id'); + + if (!empty($c)) { + $c->set(Cache::key('fave:count_by_profile:'.$profile->id), $cnt); + } + + return $cnt; + } + function getURI() { if (!empty($this->uri)) { @@ -231,4 +252,18 @@ class Fave extends Managed_DataObject $faveMap = Fave::listGet('notice_id', $notice_ids); self::$_faves = array_replace(self::$_faves, $faveMap); } + + static public function blowCacheForProfileId($profile_id) + { + $cache = Cache::instance(); + if ($cache) { + // Faves don't happen chronologically, so we need to blow + // ;last cache, too + $cache->delete(Cache::key('fave:ids_by_user:'.$profile_id)); + $cache->delete(Cache::key('fave:ids_by_user:'.$profile_id.';last')); + $cache->delete(Cache::key('fave:ids_by_user_own:'.$profile_id)); + $cache->delete(Cache::key('fave:ids_by_user_own:'.$profile_id.';last')); + $cache->delete(Cache::key('fave:count_by_profile:'.$profile_id)); + } + } } diff --git a/plugins/Favorite/lib/favcommand.php b/plugins/Favorite/lib/favcommand.php index c38463f4cd..41fd0b0b88 100644 --- a/plugins/Favorite/lib/favcommand.php +++ b/plugins/Favorite/lib/favcommand.php @@ -44,7 +44,7 @@ class FavCommand extends Command } } - $this->user->blowFavesCache(); + Fave::blowCacheForProfileId($this->user->id); // TRANS: Text shown when a notice has been marked as favourite successfully. $channel->output($this->user, _('Notice marked as fave.')); diff --git a/plugins/GNUsocialPhotos/GNUsocialPhotosPlugin.php b/plugins/GNUsocialPhotos/GNUsocialPhotosPlugin.php index 2351551927..c82efd0c59 100644 --- a/plugins/GNUsocialPhotos/GNUsocialPhotosPlugin.php +++ b/plugins/GNUsocialPhotos/GNUsocialPhotosPlugin.php @@ -149,7 +149,7 @@ class GNUsocialPhotosPlugin extends Plugin 'title' => _('Upload a photo'))); } */ - function onEndPersonalGroupNav($nav) + function onEndPersonalGroupNav(Menu $nav, Profile $target, Profile $scoped=null) { $nav->out->menuItem(common_local_url('photos', diff --git a/plugins/GNUsocialProfileExtensions/GNUsocialProfileExtensionsPlugin.php b/plugins/GNUsocialProfileExtensions/GNUsocialProfileExtensionsPlugin.php index bfdcf3e42d..6b3c757b1e 100644 --- a/plugins/GNUsocialProfileExtensions/GNUsocialProfileExtensionsPlugin.php +++ b/plugins/GNUsocialProfileExtensions/GNUsocialProfileExtensionsPlugin.php @@ -131,7 +131,7 @@ class GNUsocialProfileExtensionsPlugin extends Plugin return true; } - function onStartPersonalGroupNav($nav) + function onStartPersonalGroupNav(Menu $nav, Profile $target, Profile $scoped=null) { $nav->out->menuItem(common_local_url('bio', array('nickname' => $nav->action->trimmed('nickname'))), _('Bio'), diff --git a/plugins/TwitterBridge/TwitterBridgePlugin.php b/plugins/TwitterBridge/TwitterBridgePlugin.php index 8788a895a3..3284d10563 100644 --- a/plugins/TwitterBridge/TwitterBridgePlugin.php +++ b/plugins/TwitterBridge/TwitterBridgePlugin.php @@ -37,6 +37,8 @@ require_once INSTALLDIR . '/plugins/TwitterBridge/twitter.php'; * * This class allows users to link their Twitter accounts * + * Depends on Favorite plugin. + * * @category Plugin * @package StatusNet * @author Zach Copley