[ Index ]

PHP Cross Reference of Moodle 1.9.3 [Build 15-Oct-2008]

title

Body

[close]

/search/ -> lib.php (summary)

Global Search Engine for Moodle

Author: Michael Champanis (mchampan) [cynnical@gmail.com], Valery Fremaux [valery.fremaux@club-internet.fr] > 1.8
License: http://www.gnu.org/copyleft/gpl.html GNU Public License
File Size: 164 lines (5 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 7 functions

  search_get_document_types()
  search_get_additional_modules()
  search_shorten_url()
  search_escape_string()
  search_check_php5()
  search_stopwatch()
  search_pexit()

Functions
Functions that are not part of a class:

search_get_document_types($prefix = 'SEARCH_TYPE_')   X-Ref
returns all the document type constants

param: prefix a pattern for recognizing constants
return: an array of type labels

search_get_additional_modules()   X-Ref
additional virtual modules to index

By adding 'moo' to the extras array, an additional document type
documents/moo_document.php will be indexed - this allows for
virtual modules to be added to the index, i.e. non-module specific
information.

search_shorten_url($url, $length=30)   X-Ref
shortens a url so it can fit on the results page

param: url the url
param: length the size limit we want

search_escape_string($str)   X-Ref
a local function for escaping

param: str the string to escape
return: the escaped string

search_check_php5($feedback = false)   X-Ref
get a real php 5 version number, using 5.0.0 arbitrarily

param: feedback if true, prints a feedback message to output.
return: true if version of PHP is high enough

search_stopwatch($cli = false)   X-Ref
simple timer function, on first call, records a current microtime stamp, outputs result on 2nd call

param: cli an output formatting switch
return: void

search_pexit($str = "")   X-Ref
print and exit (for debugging)

param: str a variable to explore
return: void



Generated: Wed Jan 14 11:33:29 2009 Cross-referenced by PHPXref 0.7