From: Andrew Dolgov Date: Sun, 23 Dec 2012 11:29:16 +0000 (+0400) Subject: add and check plugin base class X-Git-Tag: 1.7.0~154 X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=5a0e03923f47bc1140fd71b4899cd1e35fd59006;p=tt-rss.git add and check plugin base class --- diff --git a/classes/plugin.php b/classes/plugin.php new file mode 100644 index 00000000..59cb64f5 --- /dev/null +++ b/classes/plugin.php @@ -0,0 +1,11 @@ +link = $host->get_link(); + $this->host = $host; + } +} +?> diff --git a/classes/pluginhost.php b/classes/pluginhost.php index 4274ec37..f4e01178 100644 --- a/classes/pluginhost.php +++ b/classes/pluginhost.php @@ -59,7 +59,7 @@ class PluginHost { if (file_exists($file)) require_once $file; - if (class_exists($class)) { + if (class_exists($class) && is_subclass_of($class, "Plugin")) { $plugin = new $class($this); $this->register_plugin($class, $plugin); diff --git a/plugins/flattr/flattr.php b/plugins/flattr/flattr.php index 6af6cb9c..3bc42721 100644 --- a/plugins/flattr/flattr.php +++ b/plugins/flattr/flattr.php @@ -1,5 +1,5 @@