From: Andreas F. <ba...@ph...> - 2009-09-07 00:39:32
|
Author: bantu Date: Mon Sep 7 00:59:35 2009 New Revision: 10112 Log: Some smaller changes to r10041. Modified: branches/phpBB-3_0_0/phpBB/includes/functions_admin.php Modified: branches/phpBB-3_0_0/phpBB/includes/functions_admin.php ============================================================================== *** branches/phpBB-3_0_0/phpBB/includes/functions_admin.php (original) --- branches/phpBB-3_0_0/phpBB/includes/functions_admin.php Mon Sep 7 00:59:35 2009 *************** *** 2517,2531 **** if ($topic_id) { ! $sql_forum = 'AND l.topic_id = ' . intval($topic_id); } else if (is_array($forum_id)) { $sql_forum = 'AND ' . $db->sql_in_set('l.forum_id', array_map('intval', $forum_id)); } ! else { ! $sql_forum = ($forum_id) ? 'AND l.forum_id = ' . intval($forum_id) : ''; } break; --- 2517,2531 ---- if ($topic_id) { ! $sql_forum = 'AND l.topic_id = ' . (int) $topic_id; } else if (is_array($forum_id)) { $sql_forum = 'AND ' . $db->sql_in_set('l.forum_id', array_map('intval', $forum_id)); } ! else if ($forum_id) { ! $sql_forum = 'AND l.forum_id = ' . (int) $forum_id; } break; *************** *** 2560,2566 **** } $operations = array(); ! foreach ($user->lang as $key=>$value) { if (substr($key, 0, 4) == 'LOG_' && preg_match($keywords_pattern, $value)) { --- 2560,2566 ---- } $operations = array(); ! foreach ($user->lang as $key => $value) { if (substr($key, 0, 4) == 'LOG_' && preg_match($keywords_pattern, $value)) { *************** *** 2571,2579 **** $sql_keywords = 'AND ('; if (!empty($operations)) { ! $sql_keywords.= $db->sql_in_set('l.log_operation', $operations) . ' OR '; } ! $sql_keywords.= 'LOWER(l.log_data) ' . implode(' OR LOWER(l.log_data) ', $keywords) . ')'; } $sql = "SELECT l.*, u.username, u.username_clean, u.user_colour --- 2571,2579 ---- $sql_keywords = 'AND ('; if (!empty($operations)) { ! $sql_keywords .= $db->sql_in_set('l.log_operation', $operations) . ' OR '; } ! $sql_keywords .= 'LOWER(l.log_data) ' . implode(' OR LOWER(l.log_data) ', $keywords) . ')'; } $sql = "SELECT l.*, u.username, u.username_clean, u.user_colour |