From: Roland Haeder Date: Sun, 18 Jan 2015 07:02:49 +0000 (+0100) Subject: Added missing SearchSub::getProfile() method. X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=d11678053070c74898b853cfb2afad5e0c9e5e10;p=quix0rs-gnu-social.git Added missing SearchSub::getProfile() method. Signed-off-by: Roland Haeder --- 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! *