aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/phpbb/cache/driver/memory.php
diff options
context:
space:
mode:
authorJoas Schilling <nickvergessen@gmx.de>2014-10-06 23:21:35 +0200
committerJoas Schilling <nickvergessen@gmx.de>2014-10-06 23:21:35 +0200
commit8d9e6653b4d7b51896034853898452f2db65fa5c (patch)
treed0f38275665e992c196c0faed3ab5e0a47a826bb /phpBB/phpbb/cache/driver/memory.php
parentaf530b65cee056feb45a257bd8c494597d104176 (diff)
parentb300e06226f142a539fc73d4eeada2d05191461b (diff)
downloadforums-8d9e6653b4d7b51896034853898452f2db65fa5c.tar
forums-8d9e6653b4d7b51896034853898452f2db65fa5c.tar.gz
forums-8d9e6653b4d7b51896034853898452f2db65fa5c.tar.bz2
forums-8d9e6653b4d7b51896034853898452f2db65fa5c.tar.xz
forums-8d9e6653b4d7b51896034853898452f2db65fa5c.zip
Merge branch 'develop-ascraeus' into develop
Diffstat (limited to 'phpBB/phpbb/cache/driver/memory.php')
-rw-r--r--phpBB/phpbb/cache/driver/memory.php16
1 files changed, 14 insertions, 2 deletions
diff --git a/phpBB/phpbb/cache/driver/memory.php b/phpBB/phpbb/cache/driver/memory.php
index add87b9bfa..0cef9c3483 100644
--- a/phpBB/phpbb/cache/driver/memory.php
+++ b/phpBB/phpbb/cache/driver/memory.php
@@ -208,12 +208,24 @@ 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('/FROM \\(?(`?\\w+`?(?: \\w+)?(?:, ?`?\\w+`?(?: \\w+)?)*)\\)?/', $query, $regs))
+ if (!preg_match_all('/(?:FROM \\(?(`?\\w+`?(?: \\w+)?(?:, ?`?\\w+`?(?: \\w+)?)*)\\)?)|(?:JOIN (`?\\w+`?(?: \\w+)?))/', $query, $regs, PREG_SET_ORDER))
{
// Bail out if the match fails.
return $query_result;
}
- $tables = array_map('trim', explode(',', $regs[1]));
+
+ $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];
+ }
+ }
foreach ($tables as $table_name)
{