From 847b5a204f83f001f0b1de4f172870de3efaf36e Mon Sep 17 00:00:00 2001 From: Roland Haeder Date: Thu, 5 Mar 2015 18:43:57 +0100 Subject: [PATCH] $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 --- plugins/DirectMessage/DirectMessagePlugin.php | 2 +- plugins/OStatus/OStatusPlugin.php | 2 +- plugins/UserFlag/UserFlagPlugin.php | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/plugins/DirectMessage/DirectMessagePlugin.php b/plugins/DirectMessage/DirectMessagePlugin.php index 57492189df..994cc7dd38 100644 --- a/plugins/DirectMessage/DirectMessagePlugin.php +++ b/plugins/DirectMessage/DirectMessagePlugin.php @@ -153,7 +153,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 09330452fc..394606d78a 100644 --- a/plugins/OStatus/OStatusPlugin.php +++ b/plugins/OStatus/OStatusPlugin.php @@ -1546,7 +1546,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 b6464b22de..9c8e29c537 100644 --- a/plugins/UserFlag/UserFlagPlugin.php +++ b/plugins/UserFlag/UserFlagPlugin.php @@ -177,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)) { @@ -198,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; } -- 2.39.5