Я понимаю, что если в шапке install.txt нет строки о том, что мод поддерживается до последней версии форума, то и предъявлять не стОит, но я и не предъявляю,

Код: Выделить всё
#
#-----[ OPEN ]------------------------------------------
#
search.php
#
#-----[ FIND ]------------------------------------------
#
if (preg_match('#^[\*%]+$#', trim($search_author)) || preg_match('#^[^\*]{1,2}$#', str_replace(array('*', '%'), '', trim($search_author))))
{
$search_author = '';
}
$search_author = str_replace('*', '%', trim($search_author));
$sql = "SELECT user_id
FROM " . USERS_TABLE . "
WHERE username LIKE '" . str_replace("\'", "''", $search_author) . "'";
#
#-----[ REPLACE WITH ]------------------------------------------
#
if ( trim($search_author) == '*' && $search_time )
{
$search_author = '%';
$sql = "SELECT user_id
FROM " . USERS_TABLE;
}
else
{
if (preg_match('#^[\*%]+$#', trim($search_author)) || preg_match('#^[^\*]{1,2}$#', str_replace(array('*', '%'), '', trim($search_author))))
{
$search_author = '';
}
$search_author = str_replace('*', '%', trim($search_author));
$sql = "SELECT user_id
FROM " . USERS_TABLE . "
WHERE username LIKE '" . str_replace("\'", "''", $search_author) . "'";
}
#
#-----[ FIND ]------------------------------------------
#
//
// Author name search
//
if ( $search_author != '' )
{
#
#-----[ REPLACE WITH ]------------------------------------------
#
//
// Author name search
//
if ( trim($search_author) == '*' && $search_time )
{
$search_author = '%';
}
elseif ( $search_author != '' )
{
#
#-----[ FIND ]------------------------------------------
#
$where_sql .= " AND u.user_id = p.poster_id AND u.username LIKE '$search_author' ";
#
#-----[ REPLACE WITH ]------------------------------------------
#
if ($search_author == '%')
{
$where_sql .= " AND u.user_id = p.poster_id ";
}
else
{
$where_sql .= " AND u.user_id = p.poster_id AND u.username LIKE '$search_author' ";
}
#
#-----[ FIND ]------------------------------------------
#
$where_sql .= " AND u.user_id = p.poster_id AND u.username LIKE '$search_author'";
#
#-----[ REPLACE WITH ]------------------------------------------
#
if ($search_author == '%')
{
$where_sql .= " AND u.user_id = p.poster_id";
}
else
{
$where_sql .= " AND u.user_id = p.poster_id AND u.username LIKE '$search_author'";
}