From 8bed5e0151eb375e2d2dc91e4e6c6d5aa62daa5c Mon Sep 17 00:00:00 2001
From: Aleksander Machniak <alec@alec.pl>
Date: Sun, 19 Jul 2015 05:06:48 -0400
Subject: [PATCH] Fix regression where compose editor mode was set incorrectly
---
program/lib/Roundcube/rcube_cache_shared.php | 30 ++++++------------------------
1 files changed, 6 insertions(+), 24 deletions(-)
diff --git a/program/lib/Roundcube/rcube_cache_shared.php b/program/lib/Roundcube/rcube_cache_shared.php
index bd5fb6e..12b8fa2 100644
--- a/program/lib/Roundcube/rcube_cache_shared.php
+++ b/program/lib/Roundcube/rcube_cache_shared.php
@@ -1,6 +1,6 @@
<?php
-/*
+/**
+-----------------------------------------------------------------------+
| This file is part of the Roundcube Webmail client |
| Copyright (C) 2011-2013, The Roundcube Dev Team |
@@ -17,7 +17,6 @@
| Author: Aleksander Machniak <alec@alec.pl> |
+-----------------------------------------------------------------------+
*/
-
/**
* Interface class for accessing Roundcube shared cache
@@ -89,7 +88,6 @@
$this->prefix = $prefix;
}
-
/**
* Returns cached value.
*
@@ -106,7 +104,6 @@
return $this->cache[$key];
}
-
/**
* Sets (add/update) value in cache.
*
@@ -118,7 +115,6 @@
$this->cache[$key] = $data;
$this->cache_changes[$key] = true;
}
-
/**
* Returns cached value without storing it in internal memory.
@@ -136,7 +132,6 @@
return $this->read_record($key, true);
}
-
/**
* Sets (add/update) value in cache and immediately saves
* it in the backend, no internal memory will be used.
@@ -150,7 +145,6 @@
{
return $this->write_record($key, $this->serialize($data));
}
-
/**
* Clears the cache.
@@ -188,7 +182,6 @@
$this->remove_record($key, $prefix_mode);
}
-
/**
* Remove cache records older than ttl
*/
@@ -203,7 +196,6 @@
}
}
-
/**
* Remove expired records of all caches
*/
@@ -214,7 +206,6 @@
$db->query("DELETE FROM " . $db->table_name('cache_shared', true) . " WHERE `expires` < " . $db->now());
}
-
/**
* Writes the cache back to the DB.
@@ -238,7 +229,6 @@
$this->write_index();
}
}
-
/**
* Reads cache entry.
@@ -324,7 +314,6 @@
return $this->cache[$key];
}
-
/**
* Writes single cache record into DB.
*
@@ -397,7 +386,6 @@
return $this->db->affected_rows($result);
}
-
/**
* Deletes the cache record(s).
*
@@ -460,11 +448,10 @@
$this->db->query("DELETE FROM " . $this->table . $where);
}
-
/**
* Adds entry into memcache/apc DB.
*
- * @param string $key Cache key name
+ * @param string $key Cache internal key name
* @param mixed $data Serialized cache data
*
* @param boolean True on success, False on failure
@@ -493,11 +480,10 @@
return $result;
}
-
/**
* Deletes entry from memcache/apc DB.
*
- * @param string $key Cache key name
+ * @param string $key Cache internal key name
*
* @param boolean True on success, False on failure
*/
@@ -505,19 +491,18 @@
{
if ($this->type == 'memcache') {
// #1488592: use 2nd argument
- $result = $this->db->delete($ckey, 0);
+ $result = $this->db->delete($key, 0);
}
else {
- $result = apc_delete($ckey);
+ $result = apc_delete($key);
}
if ($this->debug) {
- $this->debug('delete', $ckey, null, $result);
+ $this->debug('delete', $key, null, $result);
}
return $result;
}
-
/**
* Writes the index entry into memcache/apc DB.
@@ -548,7 +533,6 @@
$this->add_record($this->ikey(), $data);
}
-
/**
* Gets the index entry from memcache/apc DB.
*/
@@ -578,7 +562,6 @@
$this->index = $data ? unserialize($data) : array();
}
-
/**
* Creates cache key name (for memcache and apc)
*
@@ -590,7 +573,6 @@
{
return $this->prefix . ':' . $key;
}
-
/**
* Creates index cache key name (for memcache and apc)
--
Gitblit v1.9.1