From d11678053070c74898b853cfb2afad5e0c9e5e10 Mon Sep 17 00:00:00 2001 From: Roland Haeder Date: Sun, 18 Jan 2015 08:02:49 +0100 Subject: [PATCH] Added missing SearchSub::getProfile() method. Signed-off-by: Roland Haeder --- plugins/ModPlus/ModPlusPlugin.php | 2 +- plugins/SearchSub/classes/SearchSub.php | 12 ++++++++++++ 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/plugins/ModPlus/ModPlusPlugin.php b/plugins/ModPlus/ModPlusPlugin.php index 8433f2737b..3f029ba909 100644 --- a/plugins/ModPlus/ModPlusPlugin.php +++ b/plugins/ModPlus/ModPlusPlugin.php @@ -94,7 +94,7 @@ class ModPlusPlugin extends Plugin * * @param ProfileListItem $item */ - function onStartProfileListItemProfile($item) + function onStartProfileListItemProfile(ProfileListItem $item) { $this->showProfileOptions($item->out, $item->profile->getProfile()); return true; diff --git a/plugins/SearchSub/classes/SearchSub.php b/plugins/SearchSub/classes/SearchSub.php index f3a44854b2..0d5828695b 100644 --- a/plugins/SearchSub/classes/SearchSub.php +++ b/plugins/SearchSub/classes/SearchSub.php @@ -91,6 +91,18 @@ class SearchSub extends Managed_DataObject return $ts; } + /** + * Getter for Profile instance + * + * @return $profile Profile instance + */ + public function getProfile () { + assert($this->profile_id > 0); + $profile = new Profile(); + $profile->id = $this->profile_id; + return $profile; + } + /** * End a search subscription! * -- 2.39.5