phpBB

Code Changes

File: phpbb/cache/driver/base.php

  Unmodified   Added   Modified   Removed
Line 49Line 49
				$this->remove_dir($fileInfo->getPathname());
}
else if (strpos($filename, 'container_') === 0 ||

				$this->remove_dir($fileInfo->getPathname());
}
else if (strpos($filename, 'container_') === 0 ||

 
				strpos($filename, 'autoload_') === 0 ||

				strpos($filename, 'url_matcher') === 0 ||

				strpos($filename, 'url_matcher') === 0 ||

 
				strpos($filename, 'url_generator') === 0 ||

				strpos($filename, 'sql_') === 0 ||
strpos($filename, 'data_') === 0)
{

				strpos($filename, 'sql_') === 0 ||
strpos($filename, 'data_') === 0)
{

Line 60Line 62
		unset($this->vars);
unset($this->sql_rowset);
unset($this->sql_row_pointer);

		unset($this->vars);
unset($this->sql_rowset);
unset($this->sql_row_pointer);

 

if (function_exists('opcache_reset'))
{
@opcache_reset();
}


$this->vars = array();
$this->sql_rowset = array();


$this->vars = array();
$this->sql_rowset = array();

Line 90Line 97
	{
// Remove extra spaces and tabs
$query = preg_replace('/[\n\r\s\t]+/', ' ', $query);

	{
// Remove extra spaces and tabs
$query = preg_replace('/[\n\r\s\t]+/', ' ', $query);

 
		$query_id = md5($query);





		if (($rowset = $this->_read('sql_' . md5($query))) === false)

		if (($result = $this->_read('sql_' . $query_id)) === false)

		{
return false;
}


		{
return false;
}


		$query_id = sizeof($this->sql_rowset);
$this->sql_rowset[$query_id] = $rowset;

		$this->sql_rowset[$query_id] = $result;


		$this->sql_row_pointer[$query_id] = 0;

return $query_id;

		$this->sql_row_pointer[$query_id] = 0;

return $query_id;

Line 176Line 183
	*/
function remove_file($filename, $check = false)
{

	*/
function remove_file($filename, $check = false)
{

		if (!function_exists('phpbb_is_writable'))
{
global $phpbb_root_path, $phpEx;
include($phpbb_root_path . 'includes/functions.' . $phpEx);
}

		global $phpbb_filesystem;









		if ($check && !phpbb_is_writable($this->cache_dir))

		if ($check && !$phpbb_filesystem->is_writable($this->cache_dir))

		{
// E_USER_ERROR - not using language entry - intended.
trigger_error('Unable to remove files within ' . $this->cache_dir . '. Please check directory permissions.', E_USER_ERROR);

		{
// E_USER_ERROR - not using language entry - intended.
trigger_error('Unable to remove files within ' . $this->cache_dir . '. Please check directory permissions.', E_USER_ERROR);