[ Index ]

PHP Cross Reference of MyBB 1.8.27

title

Body

[close]

/inc/ -> functions_search.php (summary)

MyBB 1.8 Copyright 2014 MyBB Group, All Rights Reserved Website: http://www.mybb.com License: http://www.mybb.com/about/license

File Size: 1812 lines (45 kb)
Included or required: 4 times
Referenced: 0 times
Includes or requires: 0 files

Defines 10 functions

  make_searchable_forums()
  get_unsearchable_forums()
  get_visible_where()
  get_password_protected_forums()
  clean_keywords()
  clean_keywords_ft()
  privatemessage_perform_search_mysql()
  helpdocument_perform_search_mysql()
  perform_search_mysql()
  perform_search_mysql_ft()

Functions
Functions that are not part of a class:

make_searchable_forums($pid=0, $selitem=0, $addselect=1, $depth='')   X-Ref
Build a select box list of forums the current user has permission to search
param: int $pid The parent forum ID to start at
param: int $selitem The selected forum ID
param: int $addselect Add select boxes at this call or not
param: string $depth The current depth
return: string The forum select boxes

get_unsearchable_forums($pid=0, $first=1)   X-Ref
Build a comma separated list of the forums this user cannot search
param: int $pid The parent ID to build from
param: int $first First rotation or not (leave at default)
return: string return a CSV list of forums the user cannot search

get_visible_where($table_alias = null)   X-Ref
Build query condition for threads/posts the user is allowed to see.
Will return for example:
- visible = 1 - for normal users
- visible >= -1 - for admins & super mods
- (visible = 1 OR (visible = ? AND fid IN ...)) - for forum moderators

param: string $table_alias The alias of the table eg t to use t.visible instead of visible
return: string the query condition

get_password_protected_forums($fids=array()   X-Ref
Build a array list of the forums this user cannot search due to password protection
param: array $fids the fids to check (leave blank to check all forums)
return: array return a array list of password protected forums the user cannot search

clean_keywords($keywords)   X-Ref
Clean search keywords and make them safe for querying
param: string $keywords The keywords to be cleaned
return: string The cleaned keywords

clean_keywords_ft($keywords)   X-Ref
Clean search keywords for fulltext searching, making them safe for querying
param: string $keywords The keywords to be cleaned
return: string|bool The cleaned keywords or false on failure

privatemessage_perform_search_mysql($search)   X-Ref
Perform a thread and post search under MySQL or MySQLi
param: array $search Array of search data
return: array Array of search data with results mixed in

helpdocument_perform_search_mysql($search)   X-Ref
Perform a help document search under MySQL or MySQLi
param: array $search Array of search data
return: array Array of search data with results mixed in

perform_search_mysql($search)   X-Ref
Perform a thread and post search under MySQL or MySQLi
param: array $search Array of search data
return: array Array of search data with results mixed in

perform_search_mysql_ft($search)   X-Ref
Perform a thread and post search under MySQL or MySQLi using boolean fulltext capabilities
param: array $search Array of search data
return: array Array of search data with results mixed in



2005 - 2021 © MyBB.de | Alle Rechte vorbehalten! | Sponsor: netcup Cross-referenced by PHPXref