]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - plugins/UserFlag/UserFlagPlugin.php
Merge branch 'master' into social-master
[quix0rs-gnu-social.git] / plugins / UserFlag / UserFlagPlugin.php
index 8b2d2c3cfb3564cdb812e05c6e134f90ab057a74..986dd901a0f0a86ef828d001f7b16553fd3edac1 100644 (file)
@@ -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;
     }