diff options
author | Brion Vibber <brion@pobox.com> | 2010-10-04 11:42:16 -0700 |
---|---|---|
committer | Brion Vibber <brion@pobox.com> | 2010-10-04 11:42:16 -0700 |
commit | 5b49366f49b77fd677f415facb75c9b21c10b5d3 (patch) | |
tree | b38bb4dc936d77a07d51f67e0eacc63c2d6239e2 /plugins/UserFlag/UserFlagPlugin.php | |
parent | 7d0d89ddea7ae21f7c1526c170a20aa865d7c376 (diff) | |
parent | 1652ded48c9c62c40157a5142e5231adbc574ddb (diff) |
Merge branch '0.9.x' of gitorious.org:statusnet/mainline into 0.9.x
Conflicts:
plugins/AnonymousFave/AnonymousFavePlugin.php
Diffstat (limited to 'plugins/UserFlag/UserFlagPlugin.php')
-rw-r--r-- | plugins/UserFlag/UserFlagPlugin.php | 37 |
1 files changed, 26 insertions, 11 deletions
diff --git a/plugins/UserFlag/UserFlagPlugin.php b/plugins/UserFlag/UserFlagPlugin.php index ae3dfe036..e6ad3e37d 100644 --- a/plugins/UserFlag/UserFlagPlugin.php +++ b/plugins/UserFlag/UserFlagPlugin.php @@ -40,7 +40,6 @@ if (!defined('STATUSNET')) { * @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0 * @link http://status.net/ */ - class UserFlagPlugin extends Plugin { const REVIEWFLAGS = 'UserFlagPlugin::reviewflags'; @@ -56,7 +55,6 @@ class UserFlagPlugin extends Plugin * * @return boolean hook return */ - function onCheckSchema() { $schema = Schema::get(); @@ -83,7 +81,6 @@ class UserFlagPlugin extends Plugin * * @return boolean hook return */ - function onRouterInitialized($m) { $m->connect('main/flag/profile', array('action' => 'flagprofile')); @@ -99,7 +96,6 @@ class UserFlagPlugin extends Plugin * * @return boolean hook return */ - function onAutoload($cls) { switch (strtolower($cls)) @@ -130,7 +126,6 @@ class UserFlagPlugin extends Plugin * * @return boolean hook result */ - function onEndProfilePageActionsElements(&$action, $profile) { $user = common_current_user(); @@ -140,6 +135,8 @@ class UserFlagPlugin extends Plugin $action->elementStart('li', 'entity_flag'); if (User_flag_profile::exists($profile->id, $user->id)) { + // @todo FIXME: Add a title explaining what 'flagged' means? + // TRANS: Message added to a profile if it has been flagged for review. $action->element('p', 'flagged', _('Flagged')); } else { $form = new FlagProfileForm($action, $profile, @@ -161,7 +158,6 @@ class UserFlagPlugin extends Plugin * * @return boolean hook result */ - function onEndProfileListItemActionElements($item) { $user = common_current_user(); @@ -189,7 +185,6 @@ class UserFlagPlugin extends Plugin * * @return boolean hook result */ - function onEndShowScripts($action) { $action->inlineScript('if ($(".form_entity_flag").length > 0) { '. @@ -210,7 +205,6 @@ class UserFlagPlugin extends Plugin * * @return boolean hook result */ - function onUserRightsCheck($user, $right, &$result) { switch ($right) { @@ -233,7 +227,6 @@ class UserFlagPlugin extends Plugin * * @return boolean hook result */ - function onEndBlockProfile($user, $profile) { if ($this->flagOnBlock && !User_flag_profile::exists($profile->id, @@ -255,7 +248,6 @@ class UserFlagPlugin extends Plugin * * @return boolean hook result */ - function onProfileDeleteRelated($profile, &$related) { $related[] = 'user_flag_profile'; @@ -272,10 +264,33 @@ class UserFlagPlugin extends Plugin * * @return boolean hook result */ - function onUserDeleteRelated($user, &$related) { $related[] = 'user_flag_profile'; return true; } + + /** + * Provide plugin version information. + * + * This data is used when showing the version page. + * + * @param array &$versions array of version data arrays; see EVENTS.txt + * + * @return boolean hook value + */ + function onPluginVersion(&$versions) + { + $url = 'http://status.net/wiki/Plugin:UserFlag'; + + $versions[] = array('name' => 'UserFlag', + 'version' => STATUSNET_VERSION, + 'author' => 'Evan Prodromou', + 'homepage' => $url, + 'rawdescription' => + // TRANS: Plugin description. + _m('This plugin allows flagging of profiles for review and reviewing flagged profiles.')); + + return true; + } } |