From: <var...@us...> - 2009-09-20 15:13:24
|
Revision: 7145 http://phpwiki.svn.sourceforge.net/phpwiki/?rev=7145&view=rev Author: vargenau Date: 2009-09-20 15:13:16 +0000 (Sun, 20 Sep 2009) Log Message: ----------- Wikicreole syntax Modified Paths: -------------- trunk/lib/WikiPlugin.php Modified: trunk/lib/WikiPlugin.php =================================================================== --- trunk/lib/WikiPlugin.php 2009-09-20 15:03:32 UTC (rev 7144) +++ trunk/lib/WikiPlugin.php 2009-09-20 15:13:16 UTC (rev 7145) @@ -411,13 +411,13 @@ // provide a sample usage text for automatic edit-toolbar insertion function getUsage() { $args = $this->getDefaultArguments(); - $string = '<'.'?plugin '.$this->getName().' '; + $string = '<<'.$this->getName().' '; if ($args) { foreach ($args as $key => $value) { $string .= ($key."||=".(string)$value." "); } } - return $string . '?'.'>'; + return $string . '>>'; } function getArgumentsDescription() { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <var...@us...> - 2010-05-10 13:56:41
|
Revision: 7391 http://phpwiki.svn.sourceforge.net/phpwiki/?rev=7391&view=rev Author: vargenau Date: 2010-05-10 13:56:35 +0000 (Mon, 10 May 2010) Log Message: ----------- CSS class plugin-error is not defined anywhere Modified Paths: -------------- trunk/lib/WikiPlugin.php Modified: trunk/lib/WikiPlugin.php =================================================================== --- trunk/lib/WikiPlugin.php 2010-05-10 12:06:24 UTC (rev 7390) +++ trunk/lib/WikiPlugin.php 2010-05-10 13:56:35 UTC (rev 7391) @@ -426,8 +426,8 @@ list($pi_name, $plugin, $plugin_args) = $ppi; if (!is_object($plugin)) { - return new HtmlElement('p', - array('class' => 'plugin-error'), + return new HtmlElement('div', + array('class' => 'error'), $this->getErrorDetail()); } switch ($pi_name) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <var...@us...> - 2010-05-10 14:02:59
|
Revision: 7392 http://phpwiki.svn.sourceforge.net/phpwiki/?rev=7392&view=rev Author: vargenau Date: 2010-05-10 14:02:53 +0000 (Mon, 10 May 2010) Log Message: ----------- More user-friendly error message Modified Paths: -------------- trunk/lib/WikiPlugin.php Modified: trunk/lib/WikiPlugin.php =================================================================== --- trunk/lib/WikiPlugin.php 2010-05-10 13:56:35 UTC (rev 7391) +++ trunk/lib/WikiPlugin.php 2010-05-10 14:02:53 UTC (rev 7392) @@ -498,11 +498,12 @@ // $include_failed = !@include_once("lib/plugin/$plugin_name.php"); $include_failed = !include_once("lib/plugin/$plugin_name.php"); $ErrorManager->popErrorHandler(); - + if (!class_exists($plugin_class)) { - if ($include_failed) - return $this->_error(sprintf(_("Include of '%s' failed."), - $plugin_source)); + if ($include_failed) { + return $this->_error(sprintf(_("Plugin '%s' does not exist."), + $plugin_name)); + } return $this->_error(sprintf(_("%s: no such class"), $plugin_class)); } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <var...@us...> - 2010-05-12 09:44:31
|
Revision: 7398 http://phpwiki.svn.sourceforge.net/phpwiki/?rev=7398&view=rev Author: vargenau Date: 2010-05-12 09:44:25 +0000 (Wed, 12 May 2010) Log Message: ----------- Use global $AllAllowedPlugins Modified Paths: -------------- trunk/lib/WikiPlugin.php Modified: trunk/lib/WikiPlugin.php =================================================================== --- trunk/lib/WikiPlugin.php 2010-05-12 09:35:50 UTC (rev 7397) +++ trunk/lib/WikiPlugin.php 2010-05-12 09:44:25 UTC (rev 7398) @@ -487,7 +487,13 @@ function getPlugin($plugin_name, $pi=false) { global $ErrorManager; + global $AllAllowedPlugins; + if (in_array($plugin_name, $AllAllowedPlugins) === false) { + return $this->_error(sprintf(_("Plugin '%s' does not exist."), + $plugin_name)); + } + // Note that there seems to be no way to trap parse errors // from this include. (At least not via set_error_handler().) $plugin_source = "lib/plugin/$plugin_name.php"; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <var...@us...> - 2010-12-20 09:26:10
|
Revision: 7785 http://phpwiki.svn.sourceforge.net/phpwiki/?rev=7785&view=rev Author: vargenau Date: 2010-12-20 09:26:04 +0000 (Mon, 20 Dec 2010) Log Message: ----------- div --> span for error to get valid XHTML code Modified Paths: -------------- trunk/lib/WikiPlugin.php Modified: trunk/lib/WikiPlugin.php =================================================================== --- trunk/lib/WikiPlugin.php 2010-12-17 10:55:08 UTC (rev 7784) +++ trunk/lib/WikiPlugin.php 2010-12-20 09:26:04 UTC (rev 7785) @@ -353,7 +353,7 @@ } function error ($message) { - return HTML::div(array('class' => 'errors'), + return HTML::span(array('class' => 'errors'), HTML::strong(fmt("Plugin %s failed.", $this->getName())), ' ', $message); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <var...@us...> - 2013-04-26 13:32:29
|
Revision: 8773 http://sourceforge.net/p/phpwiki/code/8773 Author: vargenau Date: 2013-04-26 13:32:26 +0000 (Fri, 26 Apr 2013) Log Message: ----------- Fix warnings Modified Paths: -------------- trunk/lib/WikiPlugin.php Modified: trunk/lib/WikiPlugin.php =================================================================== --- trunk/lib/WikiPlugin.php 2013-04-26 13:12:45 UTC (rev 8772) +++ trunk/lib/WikiPlugin.php 2013-04-26 13:32:26 UTC (rev 8773) @@ -33,8 +33,8 @@ // FIXME: args? function run($dbi, $argstr, &$request, $basepage) { - trigger_error("WikiPlugin::run: pure virtual function", - E_USER_ERROR); + trigger_error("WikiPlugin::run: pure virtual function", E_USER_ERROR); + return false; } /** Get wiki-pages linked to by plugin invocation. @@ -88,9 +88,9 @@ return $this->getName(); } - function getArgs($argstr, $request = false, $defaults = false) + function getArgs($argstr, $request = false, $defaults = array()) { - if ($defaults === false) { + if (empty($defaults)) { $defaults = $this->getDefaultArguments(); } //Fixme: on POST argstr is empty This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <var...@us...> - 2013-04-26 13:41:40
|
Revision: 8774 http://sourceforge.net/p/phpwiki/code/8774 Author: vargenau Date: 2013-04-26 13:41:37 +0000 (Fri, 26 Apr 2013) Log Message: ----------- Initialize variables Modified Paths: -------------- trunk/lib/WikiPlugin.php Modified: trunk/lib/WikiPlugin.php =================================================================== --- trunk/lib/WikiPlugin.php 2013-04-26 13:32:26 UTC (rev 8773) +++ trunk/lib/WikiPlugin.php 2013-04-26 13:41:37 UTC (rev 8774) @@ -2,6 +2,8 @@ class WikiPlugin { + protected $_pi; + function getDefaultArguments() { return array('description' => $this->getDescription()); @@ -186,7 +188,12 @@ } } while (preg_match("/^$opt_ws $argspec_p $opt_ws/x", $argstr, $m)) { - //@ list(,$arg,$op,$qq_val,$q_val,$gt_val,$word_val) = $m; + $qq_val = ''; + $q_val = ''; + $gt_val = ''; + $word_val = ''; + $op = ''; + $arg = ''; $count = count($m); if ($count >= 7) { list(, $arg, $op, $qq_val, $q_val, $gt_val, $word_val) = $m; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <var...@us...> - 2013-04-26 14:41:27
|
Revision: 8778 http://sourceforge.net/p/phpwiki/code/8778 Author: vargenau Date: 2013-04-26 14:41:24 +0000 (Fri, 26 Apr 2013) Log Message: ----------- public $_pi; Modified Paths: -------------- trunk/lib/WikiPlugin.php Modified: trunk/lib/WikiPlugin.php =================================================================== --- trunk/lib/WikiPlugin.php 2013-04-26 14:16:50 UTC (rev 8777) +++ trunk/lib/WikiPlugin.php 2013-04-26 14:41:24 UTC (rev 8778) @@ -2,7 +2,7 @@ class WikiPlugin { - protected $_pi; + public $_pi; function getDefaultArguments() { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <var...@us...> - 2013-06-14 15:20:47
|
Revision: 8809 http://sourceforge.net/p/phpwiki/code/8809 Author: vargenau Date: 2013-06-14 15:20:44 +0000 (Fri, 14 Jun 2013) Log Message: ----------- Add braces Modified Paths: -------------- trunk/lib/WikiPlugin.php Modified: trunk/lib/WikiPlugin.php =================================================================== --- trunk/lib/WikiPlugin.php 2013-06-14 14:44:05 UTC (rev 8808) +++ trunk/lib/WikiPlugin.php 2013-06-14 15:20:44 UTC (rev 8809) @@ -130,22 +130,20 @@ } foreach (array_merge($argstr_args, $argstr_defaults) as $arg => $val) { - // TODO: where the heck comes this from? Put the new method over there and peace. - /*if ($request and $request->getArg('pagename') == _("PhpWikiAdministration") - and $arg == 'overwrite') // silence this warning - ;*/ - if ($this->allow_undeclared_arg($arg, $val)) + if ($this->allow_undeclared_arg($arg, $val)) { $args[$arg] = $val; + } } // Add special handling of pages and exclude args to accept <! plugin-list !> // and split explodePageList($args['exclude']) => array() // TODO : handle p[] pagehash foreach (array('pages', 'exclude') as $key) { - if (!empty($args[$key]) and array_key_exists($key, $defaults)) + if (!empty($args[$key]) and array_key_exists($key, $defaults)) { $args[$key] = is_string($args[$key]) ? explodePageList($args[$key]) : $args[$key]; // <! plugin-list !> + } } return $args; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <var...@us...> - 2014-10-02 13:41:07
|
Revision: 9157 http://sourceforge.net/p/phpwiki/code/9157 Author: vargenau Date: 2014-10-02 13:40:58 +0000 (Thu, 02 Oct 2014) Log Message: ----------- Indent Modified Paths: -------------- trunk/lib/WikiPlugin.php Modified: trunk/lib/WikiPlugin.php =================================================================== --- trunk/lib/WikiPlugin.php 2014-10-02 10:09:02 UTC (rev 9156) +++ trunk/lib/WikiPlugin.php 2014-10-02 13:40:58 UTC (rev 9157) @@ -278,7 +278,8 @@ if (is_object($pagelist) and isa($pagelist, 'PageList')) return $pagelist->pageNames(); elseif (is_array($pagelist)) - return $pagelist; else + return $pagelist; + else return $list; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <var...@us...> - 2014-12-19 15:49:17
|
Revision: 9453 http://sourceforge.net/p/phpwiki/code/9453 Author: vargenau Date: 2014-12-19 15:49:15 +0000 (Fri, 19 Dec 2014) Log Message: ----------- Indent Modified Paths: -------------- trunk/lib/WikiPlugin.php Modified: trunk/lib/WikiPlugin.php =================================================================== --- trunk/lib/WikiPlugin.php 2014-12-19 15:32:20 UTC (rev 9452) +++ trunk/lib/WikiPlugin.php 2014-12-19 15:49:15 UTC (rev 9453) @@ -384,7 +384,8 @@ { if (!$request) { $request =& $GLOBALS['request']; - } $dbi = $request->getDbh(); + } + $dbi = $request->getDbh(); return $this->makeBox('', $this->run($dbi, $args, $request, $basepage)); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <var...@us...> - 2021-07-30 16:24:13
|
Revision: 10409 http://sourceforge.net/p/phpwiki/code/10409 Author: vargenau Date: 2021-07-30 16:24:07 +0000 (Fri, 30 Jul 2021) Log Message: ----------- lib/WikiPlugin.php: PHP Doc Modified Paths: -------------- trunk/lib/WikiPlugin.php Modified: trunk/lib/WikiPlugin.php =================================================================== --- trunk/lib/WikiPlugin.php 2021-07-30 16:23:06 UTC (rev 10408) +++ trunk/lib/WikiPlugin.php 2021-07-30 16:24:07 UTC (rev 10409) @@ -84,7 +84,7 @@ * * @param string $argstr The plugin argument string. * @param string $basepage The pagename the plugin is invoked from. - * @return array List of pagenames linked to (or false). + * @return array|false List of pagenames linked to (or false). */ function getWikiPageLinks($argstr, $basepage) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <var...@us...> - 2021-11-25 17:50:48
|
Revision: 10693 http://sourceforge.net/p/phpwiki/code/10693 Author: vargenau Date: 2021-11-25 17:50:47 +0000 (Thu, 25 Nov 2021) Log Message: ----------- Avoid warning in stristr Modified Paths: -------------- trunk/lib/WikiPlugin.php Modified: trunk/lib/WikiPlugin.php =================================================================== --- trunk/lib/WikiPlugin.php 2021-11-25 16:56:58 UTC (rev 10692) +++ trunk/lib/WikiPlugin.php 2021-11-25 17:50:47 UTC (rev 10693) @@ -469,20 +469,13 @@ { $arguments = HTML(); foreach ($this->getDefaultArguments() as $arg => $default) { - // Work around UserPreferences plugin to avoid error - if ((is_array($default))) { - $default = '(array)'; - // This is a bit flawed with UserPreferences object - //$default = sprintf("array('%s')", - // implode("', '", array_keys($default))); - } else - if (stristr($default, ' ')) - $default = "'$default'"; + if (!empty($default) && stristr($default, ' ')) { + $default = "'$default'"; + } $arguments->pushContent("$arg=$default", HTML::br()); } return $arguments; } - } class WikiPluginLoader This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |