From: Roland Haeder Date: Thu, 5 Mar 2015 17:43:57 +0000 (+0100) Subject: $related must contain class names, no table names ("all" lower-case) + fixed some... X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=011c545b90466ac92e66cb3c1464af81c207eaac;p=quix0rs-gnu-social.git $related must contain class names, no table names ("all" lower-case) + fixed some checked type-hints. Again, it must be User_flag_profile (class name), not user_flag_profile (table name). Signed-off-by: Roland Haeder --- diff --git a/plugins/DirectMessage/DirectMessagePlugin.php b/plugins/DirectMessage/DirectMessagePlugin.php index de13ef680f..34533ba9e8 100644 --- a/plugins/DirectMessage/DirectMessagePlugin.php +++ b/plugins/DirectMessage/DirectMessagePlugin.php @@ -149,7 +149,7 @@ class DirectMessagePlugin extends Plugin return true; } - public function onProfileDeleteRelated(Profile $profile, &$related) + public function onProfileDeleteRelated(Profile $profile, array &$related) { $msg = new Message(); $msg->from_profile = $profile->id; diff --git a/plugins/OStatus/OStatusPlugin.php b/plugins/OStatus/OStatusPlugin.php index 1cd7deee3c..66c8e47f8c 100644 --- a/plugins/OStatus/OStatusPlugin.php +++ b/plugins/OStatus/OStatusPlugin.php @@ -1373,7 +1373,7 @@ class OStatusPlugin extends Plugin return true; } - public function onProfileDeleteRelated($profile, &$related) + public function onProfileDeleteRelated(Profile $profile, array &$related) { // Ostatus_profile has a 'profile_id' property, which will be used to find the object $related[] = 'Ostatus_profile'; diff --git a/plugins/UserFlag/UserFlagPlugin.php b/plugins/UserFlag/UserFlagPlugin.php index d2afeaced8..27ebefb053 100644 --- a/plugins/UserFlag/UserFlagPlugin.php +++ b/plugins/UserFlag/UserFlagPlugin.php @@ -175,7 +175,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 +196,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; }