summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--plugins/libkolab/lib/kolab_storage_cache_configuration.php14
-rw-r--r--plugins/libkolab/lib/kolab_storage_cache_contact.php12
2 files changed, 25 insertions, 1 deletions
diff --git a/plugins/libkolab/lib/kolab_storage_cache_configuration.php b/plugins/libkolab/lib/kolab_storage_cache_configuration.php
index 5de4c1e..8380aa8 100644
--- a/plugins/libkolab/lib/kolab_storage_cache_configuration.php
+++ b/plugins/libkolab/lib/kolab_storage_cache_configuration.php
@@ -24,5 +24,17 @@
class kolab_storage_cache_configuration extends kolab_storage_cache
{
protected $extra_cols = array('type');
-
+
+ /**
+ * Helper method to convert the given Kolab object into a dataset to be written to cache
+ *
+ * @override
+ */
+ protected function _serialize($object)
+ {
+ $sql_data = parent::_serialize($object);
+ $sql_data['type'] = $object['type'];
+
+ return $sql_data;
+ }
} \ No newline at end of file
diff --git a/plugins/libkolab/lib/kolab_storage_cache_contact.php b/plugins/libkolab/lib/kolab_storage_cache_contact.php
index 5fc764f..3d1ecf0 100644
--- a/plugins/libkolab/lib/kolab_storage_cache_contact.php
+++ b/plugins/libkolab/lib/kolab_storage_cache_contact.php
@@ -25,4 +25,16 @@ class kolab_storage_cache_contact extends kolab_storage_cache
{
protected $extra_cols = array('type');
+ /**
+ * Helper method to convert the given Kolab object into a dataset to be written to cache
+ *
+ * @override
+ */
+ protected function _serialize($object)
+ {
+ $sql_data = parent::_serialize($object);
+ $sql_data['type'] = $object['_type'];
+
+ return $sql_data;
+ }
} \ No newline at end of file