summaryrefslogtreecommitdiff
path: root/program/lib/Roundcube/rcube_db.php
diff options
context:
space:
mode:
authorThomas Bruederli <thomas@roundcube.net>2013-05-15 23:07:35 +0200
committerThomas Bruederli <thomas@roundcube.net>2013-05-15 23:07:35 +0200
commit5e2fe0d195fb8b9c67c346cc8a5218082ccf0588 (patch)
treec33ef1d0a95549fe0bf56cc76f53d11f903aa73b /program/lib/Roundcube/rcube_db.php
parent3e78fc7fdf23f752ecad3874b196dceaf529976f (diff)
parent43079d8e2dbd8e195b63dd8fb9f5251ae7c66248 (diff)
Merge branch 'master' of github.com:roundcube/roundcubemail
Diffstat (limited to 'program/lib/Roundcube/rcube_db.php')
-rw-r--r--program/lib/Roundcube/rcube_db.php5
1 files changed, 3 insertions, 2 deletions
diff --git a/program/lib/Roundcube/rcube_db.php b/program/lib/Roundcube/rcube_db.php
index f8a9bdc37..5da38c899 100644
--- a/program/lib/Roundcube/rcube_db.php
+++ b/program/lib/Roundcube/rcube_db.php
@@ -257,8 +257,9 @@ class rcube_db
{
if ($this->options['debug_mode']) {
if (($len = strlen($query)) > self::DEBUG_LINE_LENGTH) {
- $query = substr_replace($query, "\n-----[debug cut]-----\n",
- self::DEBUG_LINE_LENGTH/2 - 11, $len - self::DEBUG_LINE_LENGTH - 22);
+ $diff = $len - self::DEBUG_LINE_LENGTH;
+ $query = substr($query, 0, self::DEBUG_LINE_LENGTH)
+ . "... [truncated $diff bytes]";
}
rcube::write_log('sql', '[' . (++$this->db_index) . '] ' . $query . ';');
}