From 40cd7570e6f4da7cc60d83a3e99c72a2fb99e3f7 Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Wed, 1 Oct 2014 11:38:45 +0200 Subject: [ticket/11224] Revert "Merge pull request #2460 from Nicofuma/ticket/11224" This reverts commit d26436944173d1fa28a1abd96bca861381246860, reversing changes made to 75fcfb1c1d68f1632e7beae3f59699ddff8e5292. PHPBB3-11224 --- phpBB/phpbb/cache/driver/memory.php | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) (limited to 'phpBB/phpbb/cache') diff --git a/phpBB/phpbb/cache/driver/memory.php b/phpBB/phpbb/cache/driver/memory.php index 0b0e323e3d..56308be8da 100644 --- a/phpBB/phpbb/cache/driver/memory.php +++ b/phpBB/phpbb/cache/driver/memory.php @@ -208,24 +208,12 @@ abstract class memory extends \phpbb\cache\driver\base // determine which tables this query belongs to // Some queries use backticks, namely the get_database_size() query // don't check for conformity, the SQL would error and not reach here. - if (!preg_match_all('/(?:FROM \\(?(`?\\w+`?(?: \\w+)?(?:, ?`?\\w+`?(?: \\w+)?)*)\\)?)|(?:JOIN (`?\\w+`?(?: \\w+)?))/', $query, $regs, PREG_SET_ORDER)) + if (!preg_match('/FROM \\(?(`?\\w+`?(?: \\w+)?(?:, ?`?\\w+`?(?: \\w+)?)*)\\)?/', $query, $regs)) { // Bail out if the match fails. return $query_result; } - - $tables = array(); - foreach ($regs as $match) - { - if ($match[0][0] == 'F') - { - $tables = array_merge($tables, array_map('trim', explode(',', $match[1]))); - } - else - { - $tables[] = $match[2]; - } - } + $tables = array_map('trim', explode(',', $regs[1])); foreach ($tables as $table_name) { -- cgit v1.2.1