]> 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 Häder <roland@mxchange.org>
Sun, 29 Mar 2020 22:20:32 +0000 (00:20 +0200)
Signed-off-by: Roland Haeder <roland@mxchange.org>
plugins/ModPlus/ModPlusPlugin.php
plugins/SearchSub/classes/SearchSub.php

index 94a23c0b46433b0928419673dbb616dec4f14146..2c5c2b84f78dab8dff18a4424b2bcc3d62fc1e60 100644 (file)
@@ -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;
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!
      *