aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/phpbb/cache
diff options
context:
space:
mode:
Diffstat (limited to 'phpBB/phpbb/cache')
-rw-r--r--phpBB/phpbb/cache/driver/file.php4
-rw-r--r--phpBB/phpbb/cache/service.php25
2 files changed, 8 insertions, 21 deletions
diff --git a/phpBB/phpbb/cache/driver/file.php b/phpBB/phpbb/cache/driver/file.php
index b32af32d25..2d538b739c 100644
--- a/phpBB/phpbb/cache/driver/file.php
+++ b/phpBB/phpbb/cache/driver/file.php
@@ -208,7 +208,7 @@ class file extends \phpbb\cache\driver\base
{
$iterator = new \DirectoryIterator($this->cache_dir);
}
- catch (Exception $e)
+ catch (\Exception $e)
{
return;
}
@@ -259,7 +259,7 @@ class file extends \phpbb\cache\driver\base
{
$iterator = new \DirectoryIterator($dir);
}
- catch (Exception $e)
+ catch (\Exception $e)
{
return;
}
diff --git a/phpBB/phpbb/cache/service.php b/phpBB/phpbb/cache/service.php
index c9aa6525c0..56727c2ad5 100644
--- a/phpBB/phpbb/cache/service.php
+++ b/phpBB/phpbb/cache/service.php
@@ -47,7 +47,7 @@ class service
protected $phpbb_root_path;
/**
- * PHP extension.
+ * PHP file extension.
*
* @var string
*/
@@ -60,7 +60,7 @@ class service
* @param \phpbb\config\config $config The config
* @param \phpbb\db\driver\driver_interface $db Database connection
* @param string $phpbb_root_path Root path
- * @param string $php_ext PHP extension
+ * @param string $php_ext PHP file extension
*/
public function __construct(\phpbb\cache\driver\driver_interface $driver, \phpbb\config\config $config, \phpbb\db\driver\driver_interface $db, $phpbb_root_path, $php_ext)
{
@@ -168,18 +168,12 @@ class service
{
if ($row['rank_special'])
{
- $ranks['special'][$row['rank_id']] = array(
- 'rank_title' => $row['rank_title'],
- 'rank_image' => $row['rank_image']
- );
+ unset($row['rank_min']);
+ $ranks['special'][$row['rank_id']] = $row;
}
else
{
- $ranks['normal'][] = array(
- 'rank_title' => $row['rank_title'],
- 'rank_min' => $row['rank_min'],
- 'rank_image' => $row['rank_image']
- );
+ $ranks['normal'][$row['rank_id']] = $row;
}
}
$this->db->sql_freeresult($result);
@@ -305,7 +299,7 @@ class service
{
if (($bots = $this->driver->get('_bots')) === false)
{
- switch ($this->db->sql_layer)
+ switch ($this->db->get_sql_layer())
{
case 'mssql':
case 'mssql_odbc':
@@ -316,13 +310,6 @@ class service
ORDER BY LEN(bot_agent) DESC';
break;
- case 'firebird':
- $sql = 'SELECT user_id, bot_agent, bot_ip
- FROM ' . BOTS_TABLE . '
- WHERE bot_active = 1
- ORDER BY CHAR_LENGTH(bot_agent) DESC';
- break;
-
// LENGTH supported by MySQL, IBM DB2 and Oracle for sure...
default:
$sql = 'SELECT user_id, bot_agent, bot_ip