summaryrefslogtreecommitdiff
path: root/classes/pluginhost.php
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2013-04-19 17:20:03 +0400
committerAndrew Dolgov <[email protected]>2013-04-19 17:20:03 +0400
commit726bd48e8c0e42d97270367c0c49a7ef0e6609b5 (patch)
treed8b0216e4689622d80234cde2194c846ce349270 /classes/pluginhost.php
parent68cccafcad6b59eb9088793f5d3a506de03aab6b (diff)
better handle get_link() enabled plugins crashing on load
Diffstat (limited to 'classes/pluginhost.php')
-rw-r--r--classes/pluginhost.php14
1 files changed, 14 insertions, 0 deletions
diff --git a/classes/pluginhost.php b/classes/pluginhost.php
index 44056d262..d51f70214 100644
--- a/classes/pluginhost.php
+++ b/classes/pluginhost.php
@@ -10,6 +10,7 @@ class PluginHost {
private $api_methods = array();
private $owner_uid;
private $debug;
+ private $last_registered;
private static $instance;
const HOOK_ARTICLE_BUTTON = 1;
@@ -59,6 +60,17 @@ class PluginHost {
$this->plugins[$name] = $plugin;
}
+ 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;
+ }
+
function get_dbh() {
return $this->dbh;
}
@@ -125,6 +137,8 @@ class PluginHost {
if (class_exists($class) && is_subclass_of($class, "Plugin")) {
$plugin = new $class($this);
+ $this->last_registered = $class;
+
switch ($kind) {
case $this::KIND_SYSTEM:
if ($this->is_system($plugin)) {