Update of /cvsroot/phpwiki/phpwiki/lib/plugin
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31152
Modified Files:
PluginManager.php
Log Message:
fixed Fatal error: Call to a member function on a non-object in PluginManager.php on line 222
Index: PluginManager.php
===================================================================
RCS file: /cvsroot/phpwiki/phpwiki/lib/plugin/PluginManager.php,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -2 -b -p -d -r1.14 -r1.15
--- PluginManager.php 17 Feb 2004 12:11:36 -0000 1.14
+++ PluginManager.php 25 May 2004 13:17:12 -0000 1.15
@@ -117,8 +117,8 @@ extends WikiPlugin
$p = $w->getPlugin($pluginName, false); // second arg?
// trap php files which aren't WikiPlugin~s
- if (!substr(get_parent_class($p), 0, 10) == 'wikiplugin') {
+ if (!strtolower(substr(get_parent_class($p), 0, 10)) == 'wikiplugin') {
// Security: Hide names of extraneous files within
// plugin dir from non-admins.
- if ($request->_user->isadmin())
+ if ($request->_user->isAdmin())
trigger_error(sprintf(_("%s does not appear to be a WikiPlugin."),
$pluginName . ".php"));
@@ -151,6 +151,5 @@ extends WikiPlugin
if (_($pluginName) != $pluginName) {
$localizedPluginName = _($pluginName);
- }
- else
+ } else
$localizedPluginName = '';
$pluginNamelink = WikiLink($pluginName, 'if_known');
@@ -161,13 +160,11 @@ extends WikiPlugin
if (_($pluginDocPageName) != $pluginDocPageName) {
$localizedPluginDocPageName = _($pluginDocPageName);
- }
- else
+ } else
$localizedPluginDocPageName = '';
- if (isWikiWord($pluginDocPageName) && $dbi->isWikiPage($pluginDocPageName))
- {
+ if (isWikiWord($pluginDocPageName) &&
+ $dbi->isWikiPage($pluginDocPageName)) {
$pluginDocPageNamelink = HTML(WikiLink($pluginDocPageName));
- }
- else {
+ } else {
// don't link to actionpages and plugins starting with
// an _ from page list
@@ -177,7 +174,6 @@ extends WikiPlugin
$pluginDocPageNamelink = WikiLink($pluginDocPageName,
'unknown');
- }
- else
- $pluginDocPageNamelink = false;
+ } else
+ $pluginDocPageNamelink = HTML();
}
// insert any found locale-specific pages at the bottom of
@@ -254,4 +250,7 @@ extends WikiPlugin
// $Log$
+// Revision 1.15 2004/05/25 13:17:12 rurban
+// fixed Fatal error: Call to a member function on a non-object in PluginManager.php on line 222
+//
// Revision 1.14 2004/02/17 12:11:36 rurban
// added missing 4th basepage arg at plugin->run() to almost all plugins. This caused no harm so far, because it was silently dropped on normal usage. However on plugin internal ->run invocations it failed. (InterWikiSearch, IncludeSiteMap, ...)
|