plugins: bump API version

This commit is contained in:
Andrew Dolgov 2013-04-19 17:31:56 +04:00
parent ddf28801e4
commit 106a3de91c
32 changed files with 140 additions and 12 deletions

View 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() {

View file

@ -53,5 +53,10 @@ class Af_Buttersafe extends Plugin {
return $article;
}
function api_version() {
return 2;
}
}
?>

View file

@ -53,5 +53,9 @@ class Af_Explosm extends Plugin {
return $article;
}
function api_version() {
return 2;
}
}
?>

View file

@ -52,5 +52,10 @@ class Af_GoComics extends Plugin {
return $article;
}
function api_version() {
return 2;
}
}
?>

View file

@ -83,5 +83,10 @@ class Af_PennyArcade extends Plugin {
return $article;
}
function api_version() {
return 2;
}
}
?>

View file

@ -133,5 +133,10 @@ class Af_RedditImgur extends Plugin {
return $article;
}
function api_version() {
return 2;
}
}
?>

View file

@ -125,5 +125,10 @@ class Af_Unburn extends Plugin {
}
return $url;
}
function api_version() {
return 2;
}
}
?>

View file

@ -187,5 +187,10 @@ class Auth_Internal extends Plugin implements IAuthModule {
return "ERROR: ".__('Old password is incorrect.');
}
}
function api_version() {
return 2;
}
}
?>

View file

@ -77,6 +77,11 @@ class Auth_Remote extends Plugin implements IAuthModule {
return false;
}
function api_version() {
return 2;
}
}
?>

View file

@ -38,8 +38,11 @@ class Bookmarklets extends Plugin {
print "</div>"; #pane
}
}
function api_version() {
return 2;
}
}
?>

View file

@ -24,5 +24,10 @@ class Close_Button extends Plugin {
return $rv;
}
function api_version() {
return 2;
}
}
?>

View 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;
}
}
?>

View file

@ -50,5 +50,9 @@ class Embed_Original extends Plugin {
print json_encode(array("url" => $url, "id" => $id));
}
function api_version() {
return 2;
}
}
?>

View file

@ -76,5 +76,10 @@ class Example extends Plugin {
print "</div>"; #pane
}
function api_version() {
return 2;
}
}
?>

View 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;
}
}
?>

View file

@ -25,5 +25,10 @@ class Example_Article extends Plugin {
return $article;
}
function api_version() {
return 2;
}
}
?>

View 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;
}
}
?>

View file

@ -48,5 +48,9 @@ class Example_Routing extends Plugin implements IHandler {
return true;
}
function api_version() {
return 2;
}
}
?>

View file

@ -43,5 +43,10 @@ class Example_VFeed extends Plugin {
return $qfh_ret;
}
function api_version() {
return 2;
}
}
?>

View file

@ -374,5 +374,10 @@ class GoogleReaderImport extends Plugin {
print "</div>"; #pane
}
function api_version() {
return 2;
}
}
?>

View file

@ -28,7 +28,11 @@ class GoogleReaderKeys extends Plugin {
$hotkeys["(40)|down"] = "article_scroll_down";
return $hotkeys;
}
function api_version() {
return 2;
}
}
?>

View file

@ -453,6 +453,9 @@ class Import_Export extends Plugin implements IHandler {
}
function api_version() {
return 2;
}
}
?>

View file

@ -444,6 +444,9 @@ class Instances extends Plugin implements IHandler {
print json_encode(array("hash" => $hash));
}
function api_version() {
return 2;
}
}
?>

View file

@ -168,6 +168,9 @@ class Mail extends Plugin {
print "</ul>";
}
function api_version() {
return 2;
}
}
?>

View file

@ -86,5 +86,9 @@ class MailTo extends Plugin {
//return;
}
function api_version() {
return 2;
}
}
?>

View file

@ -34,5 +34,10 @@ class Mark_Button extends Plugin {
return $marked_pic;
}
function api_version() {
return 2;
}
}
?>

View file

@ -37,6 +37,9 @@ class Mobile extends Plugin implements IHandler {
}
function api_version() {
return 2;
}
}
?>

View file

@ -68,5 +68,9 @@ class Note extends Plugin {
"raw_length" => mb_strlen($note)));
}
function api_version() {
return 2;
}
}
?>

View file

@ -98,5 +98,9 @@ class NSFW extends Plugin {
echo __("Configuration saved.");
}
function api_version() {
return 2;
}
}
?>

View file

@ -67,6 +67,9 @@ class Share extends Plugin {
print "</div>";
}
function api_version() {
return 2;
}
}
?>

View file

@ -21,7 +21,11 @@ class Swap_JK extends Plugin {
$hotkeys["k"] = "prev_feed";
return $hotkeys;
}
function api_version() {
return 2;
}
}
?>

View file

@ -380,5 +380,9 @@ class Updater extends Plugin {
}
}
function api_version() {
return 2;
}
}
?>