]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
Added missing SearchSub::getProfile() method.
authorRoland Haeder <roland@mxchange.org>
Sun, 18 Jan 2015 07:02:49 +0000 (08:02 +0100)
committerRoland Haeder <roland@mxchange.org>
Sun, 18 Jan 2015 07:02:49 +0000 (08:02 +0100)
Signed-off-by: Roland Haeder <roland@mxchange.org>
plugins/ModPlus/ModPlusPlugin.php
plugins/SearchSub/classes/SearchSub.php

index 8433f2737b920d250b8a10785d47f756fdd6176a..3f029ba90958feb5c0b4fc0814e2b0971583306a 100644 (file)
@@ -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;
index f3a44854b2730ed81870152772c5f73bea8cac32..0d5828695b18217b6ddcdaaddc3af168972def70 100644 (file)
@@ -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!
      *