]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - plugins/Bookmark/BookmarkPlugin.php
plugins onAutoload now only overloads if necessary (extlibs etc.)
[quix0rs-gnu-social.git] / plugins / Bookmark / BookmarkPlugin.php
index f644289ed45efdc30908660827c23dd2046a7f73..6dacdb085e88a167492d50f64893d07ca1b31950 100644 (file)
@@ -135,44 +135,6 @@ class BookmarkPlugin extends MicroAppPlugin
         $action->script($this->path('js/bookmark.js'));
         return true;
     }
-    /**
-     * Load related modules when needed
-     *
-     * @param string $cls Name of the class to be loaded
-     *
-     * @return boolean hook value; true means continue processing, false means stop.
-     */
-    function onAutoload($cls)
-    {
-        $dir = dirname(__FILE__);
-
-        switch ($cls)
-        {
-        case 'BookmarksAction':
-        case 'BookmarksrssAction':
-        case 'ApiTimelineBookmarksAction':
-        case 'ShowbookmarkAction':
-        case 'NewbookmarkAction':
-        case 'BookmarkpopupAction':
-        case 'NoticebyurlAction':
-        case 'BookmarkforurlAction':
-        case 'ImportdeliciousAction':
-            include_once $dir . '/' . strtolower(mb_substr($cls, 0, -6)) . '.php';
-            return false;
-        case 'Bookmark':
-            include_once $dir.'/'.$cls.'.php';
-            return false;
-        case 'BookmarkListItem':
-        case 'BookmarkForm':
-        case 'InitialBookmarkForm':
-        case 'DeliciousBackupImporter':
-        case 'DeliciousBookmarkImporter':
-            include_once $dir.'/'.strtolower($cls).'.php';
-            return false;
-        default:
-            return true;
-        }
-    }
 
     /**
      * Map URLs to actions
@@ -498,7 +460,7 @@ class BookmarkPlugin extends MicroAppPlugin
             if (!empty($other)) {
                 $options['replies'][] = $replyURI;
             } else {
-                $group = User_group::staticGet('uri', $replyURI);
+                $group = User_group::getKV('uri', $replyURI);
                 if (!empty($group)) {
                     $options['groups'][] = $replyURI;
                 }
@@ -509,7 +471,7 @@ class BookmarkPlugin extends MicroAppPlugin
         // @fixme what about conversation ID?
 
         if (!empty($activity->context->replyToID)) {
-            $orig = Notice::staticGet('uri',
+            $orig = Notice::getKV('uri',
                                       $activity->context->replyToID);
             if (!empty($orig)) {
                 $options['reply_to'] = $orig->id;
@@ -637,7 +599,7 @@ class BookmarkPlugin extends MicroAppPlugin
     {
         assert($obj->type == ActivityObject::BOOKMARK);
 
-        $bm = Bookmark::staticGet('uri', $obj->id);
+        $bm = Bookmark::getKV('uri', $obj->id);
 
         if (empty($bm)) {
             throw new ServerException("Unknown bookmark: " . $obj->id);