home *** CD-ROM | disk | FTP | other *** search
/ Chip 2004 April / CMCD0404.ISO / Software / Freeware / Programare / groupoffice-com-2.01 / modules / wiki / action / find.php < prev    next >
PHP Script  |  2004-03-08  |  560b  |  28 lines

  1. <?php
  2. // $Id: find.php,v 1.1 2004/01/12 22:14:04 comsubvie Exp $
  3.  
  4. require('parse/html.php');
  5. require(TemplateDir . '/find.php');
  6.  
  7. // Find a string in the database.
  8. function action_find()
  9. {
  10.   global $pagestore, $find, $style, $SeparateLinkWords;
  11.  
  12.   $list = $pagestore->find($find);
  13.  
  14.   switch ($style) {
  15.     case 'meta':
  16.       $SeparateLinkWords = 0;
  17.       break;
  18.   }
  19.  
  20.   $text = '';
  21.   foreach($list as $page)
  22.     { $text = $text . html_ref($page, $page) . html_newline(); }
  23.  
  24.   template_find(array('find'  => $find,
  25.                       'pages' => $text));
  26. }
  27. ?>
  28.