Zeile 1 | Zeile 1 |
---|
<?php /** * MyBB 1.4
|
<?php /** * MyBB 1.4
|
* Copyright � 2008 MyBB Group, All Rights Reserved
| * Copyright © 2008 MyBB Group, All Rights Reserved
|
* * Website: http://www.mybboard.net * License: http://www.mybboard.net/about/license *
|
* * Website: http://www.mybboard.net * License: http://www.mybboard.net/about/license *
|
* $Id: functions_search.php 3914 2008-06-15 04:19:42Z Tikitiki $
| * $Id: functions_search.php 4384 2009-06-19 11:49:42Z Tomm $
|
*/
/**
| */
/**
|
Zeile 171 | Zeile 171 |
---|
$keywords = str_replace("*", "%", $keywords); $keywords = preg_replace("#([\[\]\|\.\,:'])#s", " ", $keywords); $keywords = preg_replace("#\s+#s", " ", $keywords);
|
$keywords = str_replace("*", "%", $keywords); $keywords = preg_replace("#([\[\]\|\.\,:'])#s", " ", $keywords); $keywords = preg_replace("#\s+#s", " ", $keywords);
|
| // Search for "and" or "or" and remove if it's at the beginning if(my_strpos($keywords, "or") !== false && my_strpos($keywords, "or") == 0) { $keywords = substr_replace($keywords, "", 0, 2); } if(my_strpos($keywords, "and") !== false && my_strpos($keywords, "and") == 0) { $keywords = substr_replace($keywords, "", 0, 3); }
|
return trim($keywords); }
| return trim($keywords); }
|
Zeile 459 | Zeile 470 |
---|
SELECT DISTINCT f.fid FROM ".TABLE_PREFIX."forums f LEFT JOIN ".TABLE_PREFIX."forumpermissions p ON (f.fid=p.fid AND p.gid='".$mybb->user['usergroup']."')
|
SELECT DISTINCT f.fid FROM ".TABLE_PREFIX."forums f LEFT JOIN ".TABLE_PREFIX."forumpermissions p ON (f.fid=p.fid AND p.gid='".$mybb->user['usergroup']."')
|
WHERE (','||parentlist||',' LIKE ',%{$forum}%,') > 0 AND active!=0 AND (p.fid IS NULL OR p.cansearch=1)
| WHERE (','||parentlist||',' LIKE ',%{$forum}%,') = true AND active!=0 AND (p.fid IS NULL OR p.cansearch=1)
|
"); break; case "sqlite3":
| "); break; case "sqlite3":
|