summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2013-04-19 17:31:56 +0400
committerAndrew Dolgov <[email protected]>2013-04-19 17:31:56 +0400
commit106a3de91c7c8c6c275323152de414253f01127a (patch)
tree2ce5d8c825db7f115ecdaad0ced6d819b141f8d4
parentddf28801e4720b9d7888b9bca5daf6be14d3720c (diff)
plugins: bump API version
-rw-r--r--classes/pluginhost.php12
-rw-r--r--plugins/af_buttersafe/init.php5
-rw-r--r--plugins/af_explosm/init.php4
-rw-r--r--plugins/af_gocomics/init.php5
-rw-r--r--plugins/af_pennyarcade/init.php5
-rw-r--r--plugins/af_redditimgur/init.php5
-rw-r--r--plugins/af_unburn/init.php5
-rw-r--r--plugins/auth_internal/init.php5
-rw-r--r--plugins/auth_remote/init.php5
-rw-r--r--plugins/bookmarklets/init.php5
-rw-r--r--plugins/close_button/init.php5
-rw-r--r--plugins/digest/init.php5
-rw-r--r--plugins/embed_original/init.php4
-rw-r--r--plugins/example/init.php5
-rw-r--r--plugins/example_api/init.php5
-rw-r--r--plugins/example_article/init.php5
-rw-r--r--plugins/example_feed/init.php5
-rw-r--r--plugins/example_routing/init.php4
-rw-r--r--plugins/example_vfeed/init.php5
-rw-r--r--plugins/googlereaderimport/init.php5
-rw-r--r--plugins/googlereaderkeys/init.php4
-rw-r--r--plugins/import_export/init.php3
-rw-r--r--plugins/instances/init.php3
-rw-r--r--plugins/mail/init.php3
-rw-r--r--plugins/mailto/init.php4
-rw-r--r--plugins/mark_button/init.php5
-rw-r--r--plugins/mobile/init.php3
-rw-r--r--plugins/note/init.php4
-rw-r--r--plugins/nsfw/init.php4
-rw-r--r--plugins/share/init.php3
-rw-r--r--plugins/swap_jk/init.php4
-rw-r--r--plugins/updater/init.php4
32 files changed, 138 insertions, 10 deletions
diff --git a/classes/pluginhost.php b/classes/pluginhost.php
index dc75e31fb..9ebabeb8c 100644
--- a/classes/pluginhost.php
+++ b/classes/pluginhost.php
@@ -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() {
diff --git a/plugins/af_buttersafe/init.php b/plugins/af_buttersafe/init.php
index e1a01b3dd..05e684aa0 100644
--- a/plugins/af_buttersafe/init.php
+++ b/plugins/af_buttersafe/init.php
@@ -53,5 +53,10 @@ class Af_Buttersafe extends Plugin {
return $article;
}
+
+ function api_version() {
+ return 2;
+ }
+
}
?>
diff --git a/plugins/af_explosm/init.php b/plugins/af_explosm/init.php
index b5e34657c..dd106653a 100644
--- a/plugins/af_explosm/init.php
+++ b/plugins/af_explosm/init.php
@@ -53,5 +53,9 @@ class Af_Explosm extends Plugin {
return $article;
}
+
+ function api_version() {
+ return 2;
+ }
}
?>
diff --git a/plugins/af_gocomics/init.php b/plugins/af_gocomics/init.php
index 39dd0c852..e95de9f14 100644
--- a/plugins/af_gocomics/init.php
+++ b/plugins/af_gocomics/init.php
@@ -52,5 +52,10 @@ class Af_GoComics extends Plugin {
return $article;
}
+
+ function api_version() {
+ return 2;
+ }
+
}
?>
diff --git a/plugins/af_pennyarcade/init.php b/plugins/af_pennyarcade/init.php
index d897d85ca..8ad02e14c 100644
--- a/plugins/af_pennyarcade/init.php
+++ b/plugins/af_pennyarcade/init.php
@@ -83,5 +83,10 @@ class Af_PennyArcade extends Plugin {
return $article;
}
+
+ function api_version() {
+ return 2;
+ }
+
}
?>
diff --git a/plugins/af_redditimgur/init.php b/plugins/af_redditimgur/init.php
index d5b3e5c20..39a20784c 100644
--- a/plugins/af_redditimgur/init.php
+++ b/plugins/af_redditimgur/init.php
@@ -133,5 +133,10 @@ class Af_RedditImgur extends Plugin {
return $article;
}
+
+ function api_version() {
+ return 2;
+ }
+
}
?>
diff --git a/plugins/af_unburn/init.php b/plugins/af_unburn/init.php
index 67939f80e..62b3b4dcf 100644
--- a/plugins/af_unburn/init.php
+++ b/plugins/af_unburn/init.php
@@ -125,5 +125,10 @@ class Af_Unburn extends Plugin {
}
return $url;
}
+
+ function api_version() {
+ return 2;
+ }
+
}
?>
diff --git a/plugins/auth_internal/init.php b/plugins/auth_internal/init.php
index 33f90d4b1..79a8e8cb3 100644
--- a/plugins/auth_internal/init.php
+++ b/plugins/auth_internal/init.php
@@ -187,5 +187,10 @@ class Auth_Internal extends Plugin implements IAuthModule {
return "ERROR: ".__('Old password is incorrect.');
}
}
+
+ function api_version() {
+ return 2;
+ }
+
}
?>
diff --git a/plugins/auth_remote/init.php b/plugins/auth_remote/init.php
index a551c6bd0..2bf090d54 100644
--- a/plugins/auth_remote/init.php
+++ b/plugins/auth_remote/init.php
@@ -77,6 +77,11 @@ class Auth_Remote extends Plugin implements IAuthModule {
return false;
}
+
+ function api_version() {
+ return 2;
+ }
+
}
?>
diff --git a/plugins/bookmarklets/init.php b/plugins/bookmarklets/init.php
index be0da83c9..e45605558 100644
--- a/plugins/bookmarklets/init.php
+++ b/plugins/bookmarklets/init.php
@@ -38,8 +38,11 @@ class Bookmarklets extends Plugin {
print "</div>"; #pane
}
-
}
+ function api_version() {
+ return 2;
+ }
+
}
?>
diff --git a/plugins/close_button/init.php b/plugins/close_button/init.php
index 78f2edd2a..7911642c3 100644
--- a/plugins/close_button/init.php
+++ b/plugins/close_button/init.php
@@ -24,5 +24,10 @@ class Close_Button extends Plugin {
return $rv;
}
+
+ function api_version() {
+ return 2;
+ }
+
}
?>
diff --git a/plugins/digest/init.php b/plugins/digest/init.php
index b06097171..aee351cd8 100644
--- a/plugins/digest/init.php
+++ b/plugins/digest/init.php
@@ -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;
+ }
+
}
?>
diff --git a/plugins/embed_original/init.php b/plugins/embed_original/init.php
index c65793e16..df803d38b 100644
--- a/plugins/embed_original/init.php
+++ b/plugins/embed_original/init.php
@@ -50,5 +50,9 @@ class Embed_Original extends Plugin {
print json_encode(array("url" => $url, "id" => $id));
}
+ function api_version() {
+ return 2;
+ }
+
}
?>
diff --git a/plugins/example/init.php b/plugins/example/init.php
index 8f4e8abf4..67f502778 100644
--- a/plugins/example/init.php
+++ b/plugins/example/init.php
@@ -76,5 +76,10 @@ class Example extends Plugin {
print "</div>"; #pane
}
+
+ function api_version() {
+ return 2;
+ }
+
}
?>
diff --git a/plugins/example_api/init.php b/plugins/example_api/init.php
index 9e0ad18b9..1f896badf 100644
--- a/plugins/example_api/init.php
+++ b/plugins/example_api/init.php
@@ -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;
+ }
+
}
?>
diff --git a/plugins/example_article/init.php b/plugins/example_article/init.php
index 000be7c4c..69902cbf1 100644
--- a/plugins/example_article/init.php
+++ b/plugins/example_article/init.php
@@ -25,5 +25,10 @@ class Example_Article extends Plugin {
return $article;
}
+
+ function api_version() {
+ return 2;
+ }
+
}
?>
diff --git a/plugins/example_feed/init.php b/plugins/example_feed/init.php
index 19d089667..1d653a9f6 100644
--- a/plugins/example_feed/init.php
+++ b/plugins/example_feed/init.php
@@ -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;
+ }
+
}
?>
diff --git a/plugins/example_routing/init.php b/plugins/example_routing/init.php
index 0ae446e33..a7b19d787 100644
--- a/plugins/example_routing/init.php
+++ b/plugins/example_routing/init.php
@@ -48,5 +48,9 @@ class Example_Routing extends Plugin implements IHandler {
return true;
}
+ function api_version() {
+ return 2;
+ }
+
}
?>
diff --git a/plugins/example_vfeed/init.php b/plugins/example_vfeed/init.php
index b137fd0f9..31076190f 100644
--- a/plugins/example_vfeed/init.php
+++ b/plugins/example_vfeed/init.php
@@ -43,5 +43,10 @@ class Example_VFeed extends Plugin {
return $qfh_ret;
}
+
+ function api_version() {
+ return 2;
+ }
+
}
?>
diff --git a/plugins/googlereaderimport/init.php b/plugins/googlereaderimport/init.php
index 183875ec8..be6b81981 100644
--- a/plugins/googlereaderimport/init.php
+++ b/plugins/googlereaderimport/init.php
@@ -374,5 +374,10 @@ class GoogleReaderImport extends Plugin {
print "</div>"; #pane
}
+
+ function api_version() {
+ return 2;
+ }
+
}
?>
diff --git a/plugins/googlereaderkeys/init.php b/plugins/googlereaderkeys/init.php
index 27428a488..c8e7d7a38 100644
--- a/plugins/googlereaderkeys/init.php
+++ b/plugins/googlereaderkeys/init.php
@@ -28,7 +28,11 @@ class GoogleReaderKeys extends Plugin {
$hotkeys["(40)|down"] = "article_scroll_down";
return $hotkeys;
+ }
+ function api_version() {
+ return 2;
}
+
}
?>
diff --git a/plugins/import_export/init.php b/plugins/import_export/init.php
index e4e98c036..15c7dea9b 100644
--- a/plugins/import_export/init.php
+++ b/plugins/import_export/init.php
@@ -453,6 +453,9 @@ class Import_Export extends Plugin implements IHandler {
}
+ function api_version() {
+ return 2;
+ }
}
?>
diff --git a/plugins/instances/init.php b/plugins/instances/init.php
index d59e17ffd..aac28196f 100644
--- a/plugins/instances/init.php
+++ b/plugins/instances/init.php
@@ -444,6 +444,9 @@ class Instances extends Plugin implements IHandler {
print json_encode(array("hash" => $hash));
}
+ function api_version() {
+ return 2;
+ }
}
?>
diff --git a/plugins/mail/init.php b/plugins/mail/init.php
index 2897068aa..80bc7d417 100644
--- a/plugins/mail/init.php
+++ b/plugins/mail/init.php
@@ -168,6 +168,9 @@ class Mail extends Plugin {
print "</ul>";
}
+ function api_version() {
+ return 2;
+ }
}
?>
diff --git a/plugins/mailto/init.php b/plugins/mailto/init.php
index c786cf0dc..aa6d173f8 100644
--- a/plugins/mailto/init.php
+++ b/plugins/mailto/init.php
@@ -86,5 +86,9 @@ class MailTo extends Plugin {
//return;
}
+ function api_version() {
+ return 2;
+ }
+
}
?>
diff --git a/plugins/mark_button/init.php b/plugins/mark_button/init.php
index b6a311bc3..971b12932 100644
--- a/plugins/mark_button/init.php
+++ b/plugins/mark_button/init.php
@@ -34,5 +34,10 @@ class Mark_Button extends Plugin {
return $marked_pic;
}
+
+ function api_version() {
+ return 2;
+ }
+
}
?>
diff --git a/plugins/mobile/init.php b/plugins/mobile/init.php
index ad2d1cdd9..1a59fe33c 100644
--- a/plugins/mobile/init.php
+++ b/plugins/mobile/init.php
@@ -37,6 +37,9 @@ class Mobile extends Plugin implements IHandler {
}
+ function api_version() {
+ return 2;
+ }
}
?>
diff --git a/plugins/note/init.php b/plugins/note/init.php
index f5816bc27..2a32961fc 100644
--- a/plugins/note/init.php
+++ b/plugins/note/init.php
@@ -68,5 +68,9 @@ class Note extends Plugin {
"raw_length" => mb_strlen($note)));
}
+ function api_version() {
+ return 2;
+ }
+
}
?>
diff --git a/plugins/nsfw/init.php b/plugins/nsfw/init.php
index c4182731d..a57aa4456 100644
--- a/plugins/nsfw/init.php
+++ b/plugins/nsfw/init.php
@@ -98,5 +98,9 @@ class NSFW extends Plugin {
echo __("Configuration saved.");
}
+ function api_version() {
+ return 2;
+ }
+
}
?>
diff --git a/plugins/share/init.php b/plugins/share/init.php
index 53b9dcdce..72a4d4bf9 100644
--- a/plugins/share/init.php
+++ b/plugins/share/init.php
@@ -67,6 +67,9 @@ class Share extends Plugin {
print "</div>";
}
+ function api_version() {
+ return 2;
+ }
}
?>
diff --git a/plugins/swap_jk/init.php b/plugins/swap_jk/init.php
index 73fb82007..e60e7201f 100644
--- a/plugins/swap_jk/init.php
+++ b/plugins/swap_jk/init.php
@@ -21,7 +21,11 @@ class Swap_JK extends Plugin {
$hotkeys["k"] = "prev_feed";
return $hotkeys;
+ }
+ function api_version() {
+ return 2;
}
+
}
?>
diff --git a/plugins/updater/init.php b/plugins/updater/init.php
index 2ae4c4109..fa283c8be 100644
--- a/plugins/updater/init.php
+++ b/plugins/updater/init.php
@@ -380,5 +380,9 @@ class Updater extends Plugin {
}
}
+ function api_version() {
+ return 2;
+ }
+
}
?>