Project

General

Profile

« Previous | Next » 

Revision 2031

Added by Dietmar almost 11 years ago

  1. /search/search.php:: trim() parameter (Tks to evaki)
  2. /search/search_mod.php:: check for undefined users index

View differences:

search.php
196 196
$string = '';
197 197
if(isset($_REQUEST['string'])) {
198 198
	if($match!='exact') { // $string will be cleaned below
199
		$string=str_replace(',', '', $_REQUEST['string']);
199
		$string=str_replace(',', '', trim($_REQUEST['string']) );
200 200
	} else {
201
		$string=$_REQUEST['string'];
201
		$string=trim($_REQUEST['string']);
202 202
	}
203 203
    // redo possible magic quotes
204 204
    $string = $wb->strip_slashes($string);
205 205
    $string = preg_replace('/\s+/', ' ', $string);
206
    $string = trim($string);
206
//    $string = trim($string);
207 207
	// remove some bad chars
208 208
	$string = str_replace ( array('[[',']]'),'', $string);
209 209
	$string = preg_replace('/(^|\s+)[|.]+(?=\s+|$)/', '', $string);

Also available in: Unified diff