/[drupal]/contributions/modules/wghtml/wghtml_module_module.php
ViewVC logotype

Diff of /contributions/modules/wghtml/wghtml_module_module.php

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph | View Patch Patch

revision 1.1, Sun Oct 9 15:59:51 2005 UTC revision 1.1.4.1, Mon Feb 19 01:45:51 2007 UTC
# Line 1  Line 1 
1  <?php // $Id: Exp $  <?php // $Id: wghtml_module_module.php,v 1.1 2005/10/09 15:59:51 djnz Exp $
2    
3  /**  /**
4   * Implementation of hook_help().   * Implementation of hook_help().
# Line 25  function wghtml_search($op = 'search', $ Line 25  function wghtml_search($op = 'search', $
25      case 'search':      case 'search':
26        $find = do_search($keys, 'wghtml', 'INNER JOIN {wghtml_pages} p ON p.pageId = i.sid');        $find = do_search($keys, 'wghtml', 'INNER JOIN {wghtml_pages} p ON p.pageId = i.sid');
27        $results = array();        $results = array();
28          require_once dirname(__FILE__).'/wghtml/class_wghtml.php';
29          require_once dirname(__FILE__).'/wghtml/implement_'.$GLOBALS['wghtml_config']['implementation'].'.php';
30        foreach ($find as $item) {        foreach ($find as $item) {
31          $page = wghtml_page::retrieve_page_from_id($item);          $page = new wghtml_implementation;
32          $results[] = array('link' => $page['linkto'],          $page->pageId = $item->sid;
33            $page->retrieve_page();
34            $results[] = array('link' => $page->linkto,
35                             'type' => variable_get('wghtml_search_result', ''),                             'type' => variable_get('wghtml_search_result', ''),
36                             'type' => $page['linkto'],                             'type' => $page->linkto,
37                             'title' => $page['title'] ? $page['title'] : '(No title)',                             'title' => $page->title ? $page->title : '(No title)',
38                             'date' => $page['signature'],                             'date' => $page->signature,
39                             // what is this ? 'extra' => '',                             // what is this ? 'extra' => '',
40                             'snippet' => search_excerpt($keys, strip_tags($page['title']."\n".$page['body'])));                             'snippet' => search_excerpt($keys, strip_tags($page->title."\n".$page->body)));
41        }        }
42        return $results;        return $results;
43    }    }

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.1.4.1

  ViewVC Help
Powered by ViewVC 1.1.2