From 1419a485e3ac0c507ef073f0b816bd41f7e4a5cd Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Sat, 10 May 2014 15:49:53 +0200 Subject: log deprecated function calls FS#2399 This introduces a new dbg_deprecated() function which allows for easy marking of deprecated functions. Each call is logged to the debuglog when debuggin is enabled. --- inc/plugin.php | 1 + 1 file changed, 1 insertion(+) (limited to 'inc/plugin.php') diff --git a/inc/plugin.php b/inc/plugin.php index 7de4fbd74..e0112ef56 100644 --- a/inc/plugin.php +++ b/inc/plugin.php @@ -252,6 +252,7 @@ class DokuWiki_Plugin { */ function __call($name, $arguments) { if($name == 'render'){ + dbg_deprecated('render_text()'); if(!isset($arguments[1])) $arguments[1] = 'xhtml'; return $this->render_text($arguments[0], $arguments[1]); } -- cgit v1.2.3 From e5c4f36ca69d275977de01d6f85c5af43e92bb87 Mon Sep 17 00:00:00 2001 From: Gerrit Uitslag Date: Tue, 13 May 2014 22:16:27 +0200 Subject: Improve missing plugin.info.txt message. --- inc/plugin.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'inc/plugin.php') diff --git a/inc/plugin.php b/inc/plugin.php index 7de4fbd74..fda177716 100644 --- a/inc/plugin.php +++ b/inc/plugin.php @@ -36,8 +36,8 @@ class DokuWiki_Plugin { if(@file_exists($info)) return confToHash($info); msg('getInfo() not implemented in '.get_class($this). - ' and '.$info.' not found.
This is a bug in the '. - $parts[2].' plugin and should be reported to the '. + ' and '.$info.' not found.
Do you have installed the last version of the plugin? '. + 'If that is the case, this is a bug in the '. $parts[2].' plugin and should be reported to the '. 'plugin author.',-1); return array( 'date' => '0000-00-00', -- cgit v1.2.3 From ca86c17e1b77515f6e03e1a95538dc547a9217ac Mon Sep 17 00:00:00 2001 From: Gerrit Uitslag Date: Tue, 13 May 2014 22:18:02 +0200 Subject: Reformat getInfo function with previous commit, Fixes #681 --- inc/plugin.php | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'inc/plugin.php') diff --git a/inc/plugin.php b/inc/plugin.php index fda177716..b97d8f0c2 100644 --- a/inc/plugin.php +++ b/inc/plugin.php @@ -30,18 +30,18 @@ class DokuWiki_Plugin { * desc - Short description of the plugin (Text only) * url - Website with more information on the plugin (eg. syntax description) */ - function getInfo(){ - $parts = explode('_',get_class($this)); - $info = DOKU_PLUGIN.'/'.$parts[2].'/plugin.info.txt'; + function getInfo() { + $parts = explode('_', get_class($this)); + $info = DOKU_PLUGIN . '/' . $parts[2] . '/plugin.info.txt'; if(@file_exists($info)) return confToHash($info); - msg('getInfo() not implemented in '.get_class($this). - ' and '.$info.' not found.
Do you have installed the last version of the plugin? '. - 'If that is the case, this is a bug in the '. $parts[2].' plugin and should be reported to the '. - 'plugin author.',-1); + msg('getInfo() not implemented in ' . get_class($this) . + ' and ' . $info . ' not found.
Do you have installed the last version of the plugin? ' . + 'If that is the case, this is a bug in the ' . $parts[2] . ' plugin and should be reported to the ' . + 'plugin author.', -1); return array( - 'date' => '0000-00-00', - 'name' => $parts[2].' plugin', + 'date' => '0000-00-00', + 'name' => $parts[2] . ' plugin', ); } -- cgit v1.2.3 From dc6ff004a94faa44d41f2747cc6a0141d072d6e8 Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Fri, 4 Jul 2014 15:50:54 +0200 Subject: rephrased error message. #681 --- inc/plugin.php | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'inc/plugin.php') diff --git a/inc/plugin.php b/inc/plugin.php index fd19ba668..fbfc0325f 100644 --- a/inc/plugin.php +++ b/inc/plugin.php @@ -35,10 +35,11 @@ class DokuWiki_Plugin { $info = DOKU_PLUGIN . '/' . $parts[2] . '/plugin.info.txt'; if(@file_exists($info)) return confToHash($info); - msg('getInfo() not implemented in ' . get_class($this) . - ' and ' . $info . ' not found.
Do you have installed the last version of the plugin? ' . - 'If that is the case, this is a bug in the ' . $parts[2] . ' plugin and should be reported to the ' . - 'plugin author.', -1); + msg( + 'getInfo() not implemented in ' . get_class($this) . ' and ' . $info . ' not found.
' . + 'Verify you\'re running the latest version of the plugin. If the problem persists, send a ' . + 'bug report to the author of the ' . $parts[2] . ' plugin.', -1 + ); return array( 'date' => '0000-00-00', 'name' => $parts[2] . ' plugin', -- cgit v1.2.3