Projects
Kolab:Winterfell
roundcubemail-plugins-kolab
Log In
Username
Password
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
Expand all
Collapse all
Changes of Revision 30
View file
roundcubemail-plugins-kolab.spec
Changed
@@ -24,7 +24,7 @@ Name: roundcubemail-plugins-kolab Version: 3.3 -Release: 0.20160303.git%{?dist} +Release: 0.20160307.git%{?dist} Summary: Kolab Groupware plugins for Roundcube Webmail Group: Applications/Internet
View file
debian.changelog
Changed
@@ -1,4 +1,4 @@ -roundcubemail-plugins-kolab (1:3.3~dev20160303-0~kolab1) unstable; urgency=low +roundcubemail-plugins-kolab (1:3.3~dev20160307-0~kolab1) unstable; urgency=low * fix package version: we need epoch 1
View file
roundcubemail-plugins-kolab-3.3.tar.gz/.arcconfig
Added
@@ -0,0 +1,3 @@ +{ + "phabricator.uri": "https://git.kolab.org" +}
View file
roundcubemail-plugins-kolab-3.3.tar.gz/plugins/libkolab/lib/kolab_storage.php
Changed
@@ -221,7 +221,7 @@ else $folder->set_folder($foldername, $type, $folderdata[$foldername]); - if ($object = $folder->get_object($uid, '*')) + if ($object = $folder->get_object($uid)) return $object; }
View file
roundcubemail-plugins-kolab-3.3.tar.gz/plugins/libkolab/lib/kolab_storage_cache.php
Changed
@@ -323,6 +323,33 @@ return $this->objects[$msguid]; } + /** + * Getter for a single Kolab object identified by its UID + * + * @param string $uid Object UID + * + * @return array The Kolab object represented as hash array + */ + public function get_by_uid($uid) + { + $old_order_by = $this->order_by; + $old_limit = $this->limit; + + // set order to make sure we get most recent object version + // set limit to skip count query + $this->order_by = '`msguid` DESC'; + $this->limit = array(1, 0); + + $list = $this->select(array(array('uid', '=', $uid))); + + // set the order/limit back to defined value + $this->order_by = $old_order_by; + $this->limit = $old_limit; + + if (!empty($list) && !empty($list[0])) { + return $list[0]; + } + } /** * Insert/Update a cache entry
View file
roundcubemail-plugins-kolab-3.3.tar.gz/plugins/libkolab/lib/kolab_storage_folder.php
Changed
@@ -348,12 +348,6 @@ if ($length !== null) { $this->cache->set_limit($length, $offset); } - - $this->order_and_limit = array( - 'cols' => $sortcols, - 'limit' => $length, - 'offset' => $offset, - ); } /** @@ -383,48 +377,22 @@ } /** - * Getter for a single Kolab object, identified by its UID + * Getter for a single Kolab object identified by its UID * - * @param string $uid Object UID - * @param string $type Object type (e.g. contact, event, todo, journal, note, configuration) - * Defaults to folder type + * @param string $uid Object UID * * @return array The Kolab object represented as hash array */ - public function get_object($uid, $type = null) + public function get_object($uid) { if (!$this->valid || !$uid) { return false; } - $query = array(array('uid', '=', $uid)); - - if ($type) { - $query[] = array('type', '=', $type); - } - // synchronize caches $this->cache->synchronize(); - // we don't use cache->get() here because we don't have msguid - // yet, using select() is faster - - // set order to make sure we get most recent object version - // set limit to skip count query - $this->cache->set_order_by('msguid DESC'); - $this->cache->set_limit(1); - - $list = $this->cache->select($this->_prepare_query($query)); - - // set the order/limit back to defined value - $this->cache->set_order_by($this->order_and_limit['order']); - $this->cache->set_limit($this->order_and_limit['limit'], $this->order_and_limit['offset']); - - if (!empty($list) && !empty($list[0])) { - return $list[0]; - } - - return false; + return $this->cache->get_by_uid($uid); }
View file
roundcubemail-plugins-kolab.dsc
Changed
@@ -2,7 +2,7 @@ Source: roundcubemail-plugins-kolab Binary: roundcubemail-plugins-kolab Architecture: all -Version: 1:3.3~dev20160303-0~kolab1 +Version: 1:3.3~dev20160307-0~kolab1 Maintainer: Christoph Wickert <wickert@kolabsys.com> Uploaders: Jeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com>, Paul Klos <kolab@klos2day.nl> Standards-Version: 3.9.3
Locations
Projects
Search
Status Monitor
Help
Open Build Service
OBS Manuals
API Documentation
OBS Portal
Reporting a Bug
Contact
Mailing List
Forums
Chat (IRC)
Twitter
Open Build Service (OBS)
is an
openSUSE project
.