diff options
| author | Joas Schilling <nickvergessen@gmx.de> | 2014-10-01 10:27:56 +0200 | 
|---|---|---|
| committer | Joas Schilling <nickvergessen@gmx.de> | 2014-10-01 10:27:56 +0200 | 
| commit | 0a58cca0318786a8239a73946ff5c3d56099eaf0 (patch) | |
| tree | b16994bf2681b7254bc8835ddf8a53bef0d9eb27 /phpBB/phpbb | |
| parent | b1d35363db8b63e51a1f451775651d3ce2af1fd5 (diff) | |
| parent | d26436944173d1fa28a1abd96bca861381246860 (diff) | |
| download | forums-0a58cca0318786a8239a73946ff5c3d56099eaf0.tar forums-0a58cca0318786a8239a73946ff5c3d56099eaf0.tar.gz forums-0a58cca0318786a8239a73946ff5c3d56099eaf0.tar.bz2 forums-0a58cca0318786a8239a73946ff5c3d56099eaf0.tar.xz forums-0a58cca0318786a8239a73946ff5c3d56099eaf0.zip  | |
Merge branch 'develop-ascraeus' into develop
Diffstat (limited to 'phpBB/phpbb')
| -rw-r--r-- | phpBB/phpbb/cache/driver/memory.php | 16 | 
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)  		{  | 
