From 9ab5ad2986a836554bbf137d577c38155540c0a8 Mon Sep 17 00:00:00 2001 From: Andreas Fischer Date: Thu, 31 May 2012 11:48:56 +0200 Subject: [ticket/10751] Use sql_lower_text() in view_log(). log_data is a text column. PHPBB3-10751 --- phpBB/includes/functions_admin.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'phpBB/includes/functions_admin.php') diff --git a/phpBB/includes/functions_admin.php b/phpBB/includes/functions_admin.php index 0e1a11b4aa..204fa9a43d 100644 --- a/phpBB/includes/functions_admin.php +++ b/phpBB/includes/functions_admin.php @@ -2557,7 +2557,8 @@ function view_log($mode, &$log, &$log_count, $limit = 0, $offset = 0, $forum_id { $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_lower = $db->sql_lower_text('l.log_data'); + $sql_keywords .= "$sql_lower " . implode(" OR $sql_lower ", $keywords) . ')'; } if ($log_count !== false) -- cgit v1.2.1 From 81d5327e4411a7044f1c90e002505cad309372d6 Mon Sep 17 00:00:00 2001 From: Andreas Fischer Date: Wed, 20 Jun 2012 13:56:11 +0200 Subject: [ticket/10937] Comment removal functions: Restore backward compatibility PHPBB3-10937 --- phpBB/includes/functions_admin.php | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'phpBB/includes/functions_admin.php') diff --git a/phpBB/includes/functions_admin.php b/phpBB/includes/functions_admin.php index 204fa9a43d..7352b3d1f3 100644 --- a/phpBB/includes/functions_admin.php +++ b/phpBB/includes/functions_admin.php @@ -2293,6 +2293,21 @@ function auto_prune($forum_id, $prune_mode, $prune_flags, $prune_days, $prune_fr return; } +/** +* remove_comments will strip the sql comment lines out of an uploaded sql file +* specifically for mssql and postgres type files in the install.... +* +* @deprecated Use phpbb_remove_comments() instead. +*/ +function remove_comments(&$output) +{ + // Remove /* */ comments (http://ostermiller.org/findcomment.html) + $output = preg_replace('#/\*(.|[\r\n])*?\*/#', "\n", $output); + + // Return by reference and value. + return $output; +} + /** * Cache moderators, called whenever permissions are changed via admin_permissions. Changes of username * and group names must be carried through for the moderators table -- cgit v1.2.1 From cb245b1fafae2fc0159d03072810f987b844c513 Mon Sep 17 00:00:00 2001 From: Andreas Fischer Date: Sun, 8 Jul 2012 21:36:12 +0200 Subject: [ticket/10969] Remove remove_remarks(&$sql) and remove_comments(&$output). Merge their bodies into phpbb_remove_comments($input). PHPBB3-10969 --- phpBB/includes/functions_admin.php | 15 --------------- 1 file changed, 15 deletions(-) (limited to 'phpBB/includes/functions_admin.php') diff --git a/phpBB/includes/functions_admin.php b/phpBB/includes/functions_admin.php index 3ebd6682a9..5d19cd7adb 100644 --- a/phpBB/includes/functions_admin.php +++ b/phpBB/includes/functions_admin.php @@ -2291,21 +2291,6 @@ function auto_prune($forum_id, $prune_mode, $prune_flags, $prune_days, $prune_fr return; } -/** -* remove_comments will strip the sql comment lines out of an uploaded sql file -* specifically for mssql and postgres type files in the install.... -* -* @deprecated Use phpbb_remove_comments() instead. -*/ -function remove_comments(&$output) -{ - // Remove /* */ comments (http://ostermiller.org/findcomment.html) - $output = preg_replace('#/\*(.|[\r\n])*?\*/#', "\n", $output); - - // Return by reference and value. - return $output; -} - /** * Cache moderators, called whenever permissions are changed via admin_permissions. Changes of username * and group names must be carried through for the moderators table -- cgit v1.2.1