aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/db/mysqli.php
diff options
context:
space:
mode:
authorNathan Guse <nathaniel.guse@gmail.com>2012-12-07 18:11:38 -0600
committerNathan Guse <nathaniel.guse@gmail.com>2012-12-07 18:11:38 -0600
commit92ec214537d041076187cc013d08175e8cff3fe8 (patch)
tree24ccc13c2205faf1a2ba98ae159078ddbe1d90f4 /phpBB/includes/db/mysqli.php
parentb25efd744db56f7565453caccf26630404db07c7 (diff)
parent108a6c35a6d718166a8bfd17042cac5f2ccc6d20 (diff)
downloadforums-92ec214537d041076187cc013d08175e8cff3fe8.tar
forums-92ec214537d041076187cc013d08175e8cff3fe8.tar.gz
forums-92ec214537d041076187cc013d08175e8cff3fe8.tar.bz2
forums-92ec214537d041076187cc013d08175e8cff3fe8.tar.xz
forums-92ec214537d041076187cc013d08175e8cff3fe8.zip
Merge branch 'develop' of git://github.com/phpbb/phpbb3 into ticket/8323
Conflicts: phpBB/viewtopic.php
Diffstat (limited to 'phpBB/includes/db/mysqli.php')
-rw-r--r--phpBB/includes/db/mysqli.php26
1 files changed, 17 insertions, 9 deletions
diff --git a/phpBB/includes/db/mysqli.php b/phpBB/includes/db/mysqli.php
index 4210a58002..6d81b8bc3e 100644
--- a/phpBB/includes/db/mysqli.php
+++ b/phpBB/includes/db/mysqli.php
@@ -123,6 +123,14 @@ class dbal_mysqli extends dbal
}
/**
+ * {@inheritDoc}
+ */
+ public function sql_concatenate($expr1, $expr2)
+ {
+ return 'CONCAT(' . $expr1 . ', ' . $expr2 . ')';
+ }
+
+ /**
* SQL Transaction
* @access private
*/
@@ -166,12 +174,12 @@ class dbal_mysqli extends dbal
global $cache;
// EXPLAIN only in extra debug mode
- if (defined('DEBUG_EXTRA'))
+ if (defined('DEBUG'))
{
$this->sql_report('start', $query);
}
- $this->query_result = ($cache_ttl && method_exists($cache, 'sql_load')) ? $cache->sql_load($query) : false;
+ $this->query_result = ($cache_ttl) ? $cache->sql_load($query) : false;
$this->sql_add_num_queries($this->query_result);
if ($this->query_result === false)
@@ -181,17 +189,17 @@ class dbal_mysqli extends dbal
$this->sql_error($query);
}
- if (defined('DEBUG_EXTRA'))
+ if (defined('DEBUG'))
{
$this->sql_report('stop', $query);
}
- if ($cache_ttl && method_exists($cache, 'sql_save'))
+ if ($cache_ttl)
{
- $cache->sql_save($query, $this->query_result, $cache_ttl);
+ $this->query_result = $cache->sql_save($query, $this->query_result, $cache_ttl);
}
}
- else if (defined('DEBUG_EXTRA'))
+ else if (defined('DEBUG'))
{
$this->sql_report('fromcache', $query);
}
@@ -243,7 +251,7 @@ class dbal_mysqli extends dbal
$query_id = $this->query_result;
}
- if (!is_object($query_id) && isset($cache->sql_rowset[$query_id]))
+ if (!is_object($query_id) && $cache->sql_exists($query_id))
{
return $cache->sql_fetchrow($query_id);
}
@@ -270,7 +278,7 @@ class dbal_mysqli extends dbal
$query_id = $this->query_result;
}
- if (!is_object($query_id) && isset($cache->sql_rowset[$query_id]))
+ if (!is_object($query_id) && $cache->sql_exists($query_id))
{
return $cache->sql_rowseek($rownum, $query_id);
}
@@ -298,7 +306,7 @@ class dbal_mysqli extends dbal
$query_id = $this->query_result;
}
- if (!is_object($query_id) && isset($cache->sql_rowset[$query_id]))
+ if (!is_object($query_id) && $cache->sql_exists($query_id))
{
return $cache->sql_freeresult($query_id);
}