]> git.wh0rd.org - tt-rss.git/commitdiff
plugins: bump API version
authorAndrew Dolgov <fox@fakecake.org>
Fri, 19 Apr 2013 13:31:56 +0000 (17:31 +0400)
committerAndrew Dolgov <fox@fakecake.org>
Fri, 19 Apr 2013 13:31:56 +0000 (17:31 +0400)
32 files changed:
classes/pluginhost.php
plugins/af_buttersafe/init.php
plugins/af_explosm/init.php
plugins/af_gocomics/init.php
plugins/af_pennyarcade/init.php
plugins/af_redditimgur/init.php
plugins/af_unburn/init.php
plugins/auth_internal/init.php
plugins/auth_remote/init.php
plugins/bookmarklets/init.php
plugins/close_button/init.php
plugins/digest/init.php
plugins/embed_original/init.php
plugins/example/init.php
plugins/example_api/init.php
plugins/example_article/init.php
plugins/example_feed/init.php
plugins/example_routing/init.php
plugins/example_vfeed/init.php
plugins/googlereaderimport/init.php
plugins/googlereaderkeys/init.php
plugins/import_export/init.php
plugins/instances/init.php
plugins/mail/init.php
plugins/mailto/init.php
plugins/mark_button/init.php
plugins/mobile/init.php
plugins/note/init.php
plugins/nsfw/init.php
plugins/share/init.php
plugins/swap_jk/init.php
plugins/updater/init.php

index dc75e31fb30b72f285a23e9302d4c46a7302bbcc..9ebabeb8c343c8f2abc28f88fc6ab8517b80912c 100644 (file)
@@ -13,7 +13,7 @@ class PluginHost {
        private $last_registered;
        private static $instance;
 
-       const API_VERSION = 1;
+       const API_VERSION = 2;
 
        const HOOK_ARTICLE_BUTTON = 1;
        const HOOK_ARTICLE_FILTER = 2;
@@ -62,15 +62,9 @@ class PluginHost {
                $this->plugins[$name] = $plugin;
        }
 
+       // needed for compatibility with API 1
        function get_link() {
-               header("Content-type: text/plain");
-
-               print "One of the plugins called obsolete host method get_link(). This plugin needs to be updated or removed.\n\n";
-
-               print "List of plugins loaded: " . join(" ,", array_keys($this->plugins)) . "\n\n";
-
-               print "Last plugin initialized (possible culprit): " . $this->last_registered . "\n";
-               die;
+               return false;
        }
 
        function get_dbh() {
index e1a01b3dd2094a2a9fa4a2fffa372eda079a4996..05e684aa0fb829dff46af9feefc42fb15d83ca02 100644 (file)
@@ -53,5 +53,10 @@ class Af_Buttersafe extends Plugin {
 
                return $article;
        }
+
+       function api_version() {
+               return 2;
+       }
+
 }
 ?>
index b5e34657ca1f16d17837bde9b22812e79817ad60..dd106653a00e26e1c1028673206c6ee9fdc5826b 100644 (file)
@@ -53,5 +53,9 @@ class Af_Explosm extends Plugin {
 
                return $article;
        }
+
+       function api_version() {
+               return 2;
+       }
 }
 ?>
index 39dd0c8520cfe011f24fdeb909cc48dedf39e504..e95de9f141602ccb5a838bb3971130c1318d2fd4 100644 (file)
@@ -52,5 +52,10 @@ class Af_GoComics extends Plugin {
 
                return $article;
        }
+
+       function api_version() {
+               return 2;
+       }
+
 }
 ?>
index d897d85ca363edad823cde1d12517b408a3ad1c7..8ad02e14c9939bb1a68d22c251375e84c073d2c9 100644 (file)
@@ -83,5 +83,10 @@ class Af_PennyArcade extends Plugin {
 
                return $article;
        }
+
+       function api_version() {
+               return 2;
+       }
+
 }
 ?>
index d5b3e5c20642903a25b9317faf737ded14589ea6..39a20784cd2a805262c8972b4cabf6a9779b0024 100644 (file)
@@ -133,5 +133,10 @@ class Af_RedditImgur extends Plugin {
 
                return $article;
        }
+
+       function api_version() {
+               return 2;
+       }
+
 }
 ?>
index 67939f80e35d5529e41018b0d72253c90fbef0df..62b3b4dcfdc5a193e2927eea0457df6b20fcfc10 100644 (file)
@@ -125,5 +125,10 @@ class Af_Unburn extends Plugin {
                }
                return $url;
        }
+
+       function api_version() {
+               return 2;
+       }
+
 }
 ?>
index 33f90d4b16906e9d36fa692717d0b76aa19f6d15..79a8e8cb39895e00a07311095729d15c64ef61e0 100644 (file)
@@ -187,5 +187,10 @@ class Auth_Internal extends Plugin implements IAuthModule {
                        return "ERROR: ".__('Old password is incorrect.');
                }
        }
+
+       function api_version() {
+               return 2;
+       }
+
 }
 ?>
index a551c6bd0476a9d70ee42fdb802e3bb755404a12..2bf090d5404a2ed86e20d4e4f004a94e3f928d19 100644 (file)
@@ -77,6 +77,11 @@ class Auth_Remote extends Plugin implements IAuthModule {
 
                return false;
        }
+
+       function api_version() {
+               return 2;
+       }
+
 }
 
 ?>
index be0da83c9d878aaf3f619a124735a7c62bfdf279..e45605558385bf8eb4507a1733e991c7cb39237d 100644 (file)
@@ -38,8 +38,11 @@ class Bookmarklets extends Plugin {
                print "</div>"; #pane
 
         }
-
   }
 
+       function api_version() {
+               return 2;
+       }
+
 }
 ?>
index 78f2edd2a750a1b48b6786971321cfae75c9b879..7911642c313247d3a91122fa8a1dbe780595d8de 100644 (file)
@@ -24,5 +24,10 @@ class Close_Button extends Plugin {
 
                return $rv;
        }
+
+       function api_version() {
+               return 2;
+       }
+
 }
 ?>
index b06097171b1daa91b1e540a55eb949fb417c3ac6..aee351cd8dcf2ce164117f547967d5bb2c257f56 100644 (file)
@@ -11,6 +11,7 @@ class Digest extends Plugin implements IHandler {
        }
 
        function init($host) {
+               $this->link = $host->get_link();
                $this->host = $host;
 
                $host->add_handler("digest", "*", $this);
@@ -100,5 +101,9 @@ class Digest extends Plugin implements IHandler {
                print json_encode($params);
        }
 
+       function api_version() {
+               return 2;
+       }
+
 }
 ?>
index c65793e1689390b9a34f27d02e20de85da24ea6e..df803d38b64f9f2db136ce031aac2bb43ba2595e 100644 (file)
@@ -50,5 +50,9 @@ class Embed_Original extends Plugin {
                print json_encode(array("url" => $url, "id" => $id));
        }
 
+       function api_version() {
+               return 2;
+       }
+
 }
 ?>
index 8f4e8abf46028408aad8fa66484c4f4d2e82f624..67f502778706edd7ad11421450b9e73b9710fefe 100644 (file)
@@ -76,5 +76,10 @@ class Example extends Plugin {
 
                print "</div>"; #pane
        }
+
+       function api_version() {
+               return 2;
+       }
+
 }
 ?>
index 9e0ad18b92aab222136fa702400c1b70d6116893..1f896badf8305ec07978e4d4a54139ec01fc2509 100644 (file)
@@ -25,5 +25,10 @@ class Example_Api extends Plugin {
        function example_testmethod() {
                return array(API::STATUS_OK, array("current_time" => time()));
        }
+
+       function api_version() {
+               return 2;
+       }
+
 }
 ?>
index 000be7c4c79a951511320fd770dd65f1d77e2d4b..69902cbf1251a8d1caabf96672c482e06ef6cfdf 100644 (file)
@@ -25,5 +25,10 @@ class Example_Article extends Plugin {
 
                return $article;
        }
+
+       function api_version() {
+               return 2;
+       }
+
 }
 ?>
index 19d089667152161179d85066187e6dded2b05e44..1d653a9f62183823d6979ac7e21d05901fd6202c 100644 (file)
@@ -23,5 +23,10 @@ class Example_Feed extends Plugin {
                _debug("I'm a little feed short and stout, here's my title: " . $feed->get_title());
                _debug("... here's my link element: " . $feed->get_link());
        }
+
+       function api_version() {
+               return 2;
+       }
+
 }
 ?>
index 0ae446e336d9ed595ac7d90105fa60944e36ef8b..a7b19d78744759069e9b1ebe374530529a844f9b 100644 (file)
@@ -48,5 +48,9 @@ class Example_Routing extends Plugin implements IHandler {
                return true;
        }
 
+       function api_version() {
+               return 2;
+       }
+
 }
 ?>
index b137fd0f94f5b50c036c7f9925243ac0fb8d16e6..31076190f6484473d33293223763dd0cc546156c 100644 (file)
@@ -43,5 +43,10 @@ class Example_VFeed extends Plugin {
 
                return $qfh_ret;
        }
+
+       function api_version() {
+               return 2;
+       }
+
 }
 ?>
index 183875ec8afa7ea9cc2458bc55113b4c18f50b25..be6b8198154a25f15db0cce6c8eb7bc5d5cc4e43 100644 (file)
@@ -374,5 +374,10 @@ class GoogleReaderImport extends Plugin {
 
                print "</div>"; #pane
        }
+
+       function api_version() {
+               return 2;
+       }
+
 }
 ?>
index 27428a4884ecbf4ab25d62f6fc51baace7db6e80..c8e7d7a3839d0ef218f13e3c473e61037ff45a2a 100644 (file)
@@ -28,7 +28,11 @@ class GoogleReaderKeys extends Plugin {
                $hotkeys["(40)|down"]   = "article_scroll_down";
 
                return $hotkeys;
+       }
 
+       function api_version() {
+               return 2;
        }
+
 }
 ?>
index e4e98c036ce9661558357dbac4a9c1b11cf390eb..15c7dea9b3d6ba0ea6f5147b41fc911ba3ef1aaf 100644 (file)
@@ -453,6 +453,9 @@ class Import_Export extends Plugin implements IHandler {
 
        }
 
+       function api_version() {
+               return 2;
+       }
 
 }
 ?>
index d59e17ffdf8b57254420badabf65e0c3faa0027d..aac28196f2e18d8b727a760e7d2638e2f4c6acf8 100644 (file)
@@ -444,6 +444,9 @@ class Instances extends Plugin implements IHandler {
                print json_encode(array("hash" => $hash));
        }
 
+       function api_version() {
+               return 2;
+       }
 
 }
 ?>
index 2897068aa5635598f85c75428cefe9b392be784e..80bc7d4176bc9b2808e8a41d79a8eed911c4caeb 100644 (file)
@@ -168,6 +168,9 @@ class Mail extends Plugin {
                print "</ul>";
        }
 
+       function api_version() {
+               return 2;
+       }
 
 }
 ?>
index c786cf0dc6b30fe23cf3e14eead198b3183259a6..aa6d173f82ebe8b5824a7b0c4eff44f30df193e7 100644 (file)
@@ -86,5 +86,9 @@ class MailTo extends Plugin {
                //return;
        }
 
+       function api_version() {
+               return 2;
+       }
+
 }
 ?>
index b6a311bc3779d3b0b9fbe4c7c3b18920c2e844d9..971b12932eca44b704fa18cc120267fb9c3b3f20 100644 (file)
@@ -34,5 +34,10 @@ class Mark_Button extends Plugin {
 
                return $marked_pic;
        }
+
+       function api_version() {
+               return 2;
+       }
+
 }
 ?>
index ad2d1cdd95c70ce8b37fd5bbd7b482887fca75bb..1a59fe33c6c987cb2768df213af6b8c688e2758c 100644 (file)
@@ -37,6 +37,9 @@ class Mobile extends Plugin implements IHandler {
 
        }
 
+       function api_version() {
+               return 2;
+       }
 
 }
 ?>
index f5816bc27e98da7c3af5a84a34118f7de8ea40b6..2a32961fca8cc1c17e6e1fcf268057b39451ea53 100644 (file)
@@ -68,5 +68,9 @@ class Note extends Plugin {
                                "raw_length" => mb_strlen($note)));
        }
 
+       function api_version() {
+               return 2;
+       }
+
 }
 ?>
index c4182731d092e228c8e5ced9b631ccef8d174f3f..a57aa4456dfef2dd4cd170fa1bee6d8ee5158dd8 100644 (file)
@@ -98,5 +98,9 @@ class NSFW extends Plugin {
                echo __("Configuration saved.");
        }
 
+       function api_version() {
+               return 2;
+       }
+
 }
 ?>
index 53b9dcdce40fc83b7d6f8f7f4874d6afad40f820..72a4d4bf980dac7d22c0365cc70e41332dd02ca7 100644 (file)
@@ -67,6 +67,9 @@ class Share extends Plugin {
                print "</div>";
        }
 
+       function api_version() {
+               return 2;
+       }
 
 }
 ?>
index 73fb820072d3e68b014b807adbcba9fc99b86d37..e60e7201f7ca5c6543496329400daa104bbf35dd 100644 (file)
@@ -21,7 +21,11 @@ class Swap_JK extends Plugin {
                $hotkeys["k"] = "prev_feed";
 
                return $hotkeys;
+       }
 
+       function api_version() {
+               return 2;
        }
+
 }
 ?>
index 2ae4c4109c734e1587816dfb75abaf08033a2cc9..fa283c8be0260454cbe12903c540b7dd2cb1a4e7 100644 (file)
@@ -380,5 +380,9 @@ class Updater extends Plugin {
                }
        }
 
+       function api_version() {
+               return 2;
+       }
+
 }
 ?>