X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=plugins%2FUserFlag%2FUserFlagPlugin.php;h=986dd901a0f0a86ef828d001f7b16553fd3edac1;hb=261ccfac8699534ff584a2f93d5dcd384529d855;hp=8b2d2c3cfb3564cdb812e05c6e134f90ab057a74;hpb=d4e76bc25b5bdcb47d8d267fcb7b9f3b9f0b9585;p=quix0rs-gnu-social.git diff --git a/plugins/UserFlag/UserFlagPlugin.php b/plugins/UserFlag/UserFlagPlugin.php index 8b2d2c3cfb..986dd901a0 100644 --- a/plugins/UserFlag/UserFlagPlugin.php +++ b/plugins/UserFlag/UserFlagPlugin.php @@ -71,7 +71,7 @@ class UserFlagPlugin extends Plugin * * @return boolean hook return */ - function onRouterInitialized(URLMapper $m) + public function onRouterInitialized(URLMapper $m) { $m->connect('main/flag/profile', array('action' => 'flagprofile')); $m->connect('main/flag/clear', array('action' => 'clearflag')); @@ -152,6 +152,8 @@ class UserFlagPlugin extends Plugin * @param boolean &$result out, result of the check * * @return boolean hook result + * @TODO Other implementing classes expect Profile here!!! + * @WARNING */ function onUserRightsCheck($user, $right, &$result) { @@ -175,7 +177,7 @@ class UserFlagPlugin extends Plugin * * @return boolean hook result */ - function onEndBlockProfile($user, $profile) + function onEndBlockProfile(User $user, Profile $profile) { if ($this->flagOnBlock && !User_flag_profile::exists($profile->id, $user->id)) { @@ -196,9 +198,9 @@ class UserFlagPlugin extends Plugin * * @return boolean hook result */ - function onProfileDeleteRelated($profile, &$related) + public function onProfileDeleteRelated(Profile $profile, array &$related) { - $related[] = 'user_flag_profile'; + $related[] = 'User_flag_profile'; return true; }