false, 'auto_redirect' => false, 'noheader' => false, 'exclude' => '', 'info' => false ); } // info arg allows multiple columns // info=mtime,hits,summary,version,author,locked,minor // exclude arg allows multiple pagenames exclude=HomePage,RecentChanges function run($dbi, $argstr, $request) { $args = $this->getArgs($argstr, $request); if (empty($args['s'])) return ''; extract($args); $query = new TextSearchQuery($s); $pages = $dbi->titleSearch($query); $pagelist = new PageList($info, $exclude); while ($page = $pages->next()) { $pagelist->addPage($page); $last_name = $page->getName(); } // Provide an unknown WikiWord link to allow for page creation // when a search returns no results if (!$noheader) $pagelist->setCaption(fmt("Title search results for '%s'", $pagelist->getTotal() == 0 ? WikiLink($s, 'auto') : $s)); if ($auto_redirect && ($pagelist->getTotal() == 1)) { return HTML($request->redirect(WikiURL($last_name, false, 'absurl'), false), $pagelist); } return $pagelist; } }; // $Log: not supported by cvs2svn $ // Revision 1.19 2003/03/07 02:50:16 dairiki // Fixes for new javascript redirect. // // Revision 1.18 2003/02/21 04:16:51 dairiki // Don't NORETURN from redirect. // // Revision 1.17 2003/01/18 22:08:01 carstenklapp // Code cleanup: // Reformatting & tabs to spaces; // Added copyleft, getVersion, getDescription, rcs_id. // // Local Variables: // mode: php // tab-width: 8 // c-basic-offset: 4 // c-hanging-comment-ender-p: nil // indent-tabs-mode: nil // End: ?>