From: <var...@us...> - 2009-02-23 17:53:25
|
Revision: 6539 http://phpwiki.svn.sourceforge.net/phpwiki/?rev=6539&view=rev Author: vargenau Date: 2009-02-23 17:53:22 +0000 (Mon, 23 Feb 2009) Log Message: ----------- Display error message if no argument provided Modified Paths: -------------- trunk/lib/plugin/FuzzyPages.php Modified: trunk/lib/plugin/FuzzyPages.php =================================================================== --- trunk/lib/plugin/FuzzyPages.php 2009-02-23 15:04:46 UTC (rev 6538) +++ trunk/lib/plugin/FuzzyPages.php 2009-02-23 17:53:22 UTC (rev 6539) @@ -2,6 +2,7 @@ rcs_id('$Id$'); /* Copyright 1999, 2000, 2001, 2002 $ThePhpWikiProgrammingTeam + Copyright 2009 Marc-Etienne Vargenau, Alcatel-Lucent This file is part of PhpWiki. @@ -20,8 +21,6 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -//require_once('lib/PageList.php'); - /** * FuzzyPages is plugin which searches for similar page titles. * @@ -149,8 +148,9 @@ function run($dbi, $argstr, &$request, $basepage) { $args = $this->getArgs($argstr, $request); extract($args); - if (empty($s)) - return ''; + if (empty($s)) { + return HTML::div(array('class' => "error"), "Please provide 's' argument to the plugin."); + } $this->debug = $debug; $this->_searchterm = $s; @@ -183,19 +183,6 @@ } }; -// $Log: not supported by cvs2svn $ -// Revision 1.11 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, ...) -// -// Revision 1.10 2003/02/22 20:49:55 dairiki -// Fixes for "Call-time pass by reference has been deprecated" errors. -// -// Revision 1.9 2003/01/18 21:41:02 carstenklapp -// Code cleanup: -// Reformatting & tabs to spaces; -// Added copyleft, getVersion, getDescription, rcs_id. -// - // Local Variables: // mode: php // tab-width: 8 This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |