From: Roland Haeder <roland@mxchange.org>
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=36cd4b82b30344c93d99799a4774be4665a58306;p=quix0rs-gnu-social.git

Added missing SearchSub::getProfile() method.

Signed-off-by: Roland Haeder <roland@mxchange.org>
---

diff --git a/plugins/ModPlus/ModPlusPlugin.php b/plugins/ModPlus/ModPlusPlugin.php
index 94a23c0b46..2c5c2b84f7 100644
--- a/plugins/ModPlus/ModPlusPlugin.php
+++ b/plugins/ModPlus/ModPlusPlugin.php
@@ -76,7 +76,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!
      *