Вот не пойму. Вот я добавил перед
Код: Выделить всё
case 'newposts':
$l_search_title = $user->lang['SEARCH_NEW'];
Это
Код: Выделить всё
case 'proc':
$l_search_title = $user->lang['SELF_TOPICS'];
// force sorting
$show_results = 'topics';
$sort_key = 't';
$sort_by_sql['t'] = 't.topic_last_post_time';
$sql_sort = 'ORDER BY ' . $sort_by_sql[$sort_key] . (($sort_dir == 'a') ? ' ASC' : ' DESC');
$sqlwhere = '';
$include_forums = explode(',', $config['include_forums']);
foreach ($include_forums as $i => $id)
{
if ($id > 0)
{
$sqlwhere .= ' AND forum_id = ' . trim($id);
}
}
$sql = 'SELECT topic_id
FROM '. TOPICS_TABLE .'
WHERE topic_poster = ' . $user->data['user_id'] . ' '. $sqlwhere . '';
$field = 'topic_id';
break;
Далее куда попадает значение
$sql?
Сюда?
Код: Выделить всё
if ($sql)
{
// Only return up to $total_matches_limit+1 ids (the last one will be removed later)
$result = $db->sql_query_limit($sql, $total_matches_limit + 1);
while ($row = $db->sql_fetchrow($result))
{
$id_ary[] = (int) $row[$field];
}
$db->sql_freeresult($result);
}
Добавлено спустя 4 минуты 48 секунд:
Еще добавил после
Код: Выделить всё
case 'egosearch':
$author_id = $user->data['user_id'];
if ($user->data['user_id'] == ANONYMOUS)
{
login_box('', $user->lang['LOGIN_EXPLAIN_EGOSEARCH']);
}
break;
Это
Код: Выделить всё
case 'proc':
$author_id = $user->data['user_id'];
if (!$config['proc_enable'])
{
$template->assign_var('NO_SEARCH', true);
trigger_error('NO_SEARCH_PROC');
}
else if (!$user->data['is_registered'])
{
login_box('', $user->lang['LOGIN_EXPLAIN_PROC']);
}
break;
Так вот здесь
$author_id = $user->data['user_id']; нужно вообще?
Если убираю ничего не выводит, если оставляю, то выводит все темы с моими сообщениями
Добавлено спустя 2 часа 57 минут 15 секунд:
Хоть вставляй этот код, хоть убирай.
Код: Выделить всё
$sql = 'SELECT topic_id
FROM '. TOPICS_TABLE .'
WHERE topic_poster = ' . $user->data['user_id'] . ' '. $sqlwhere . '';
$field = 'topic_id';
Все равно ничего не меняется..