package.xml0000664000175000017500000012447612654071446011326 0ustar janjan Horde_Share pear.horde.org Horde Shared Permissions System Horde_Share provides an interface to all shared resources a user owns or has access to. Jan Schneider jan jan@horde.org yes Chuck Hagenbuch chuck chuck@horde.org yes Michael J Rubinsky mrubinsk mrubinsk@horde.org yes 2016-02-02 2.0.8 1.3.0 stable stable LGPL-2.1 * [jan] Mark PHP 7 as supported. 5.3.0 8.0.0alpha1 8.0.0alpha1 1.7.0 Horde_Db pear.horde.org 2.0.0 3.0.0alpha1 3.0.0alpha1 Horde_Exception pear.horde.org 2.0.0 3.0.0alpha1 3.0.0alpha1 Horde_Group pear.horde.org 2.0.0 3.0.0alpha1 3.0.0alpha1 Horde_Perms pear.horde.org 2.1.0 3.0.0alpha1 3.0.0alpha1 Horde_Support pear.horde.org 2.0.0 3.0.0alpha1 3.0.0alpha1 Horde_Translation pear.horde.org 2.2.0 3.0.0alpha1 3.0.0alpha1 Horde_Url pear.horde.org 2.0.0 3.0.0alpha1 3.0.0alpha1 Horde_Util pear.horde.org 2.0.0 3.0.0alpha1 3.0.0alpha1 Horde_Kolab_Storage pear.horde.org 2.0.0 3.0.0alpha1 3.0.0alpha1 Horde_Test pear.horde.org 2.1.0 3.0.0alpha1 3.0.0alpha1 0.0.1 0.0.1 alpha alpha 2003-07-05 LGPL-2.1 Initial release as a PEAR package 0.0.2 0.0.2 beta beta 2004-10-29 LGPL-2.1 - Added countShares(). - listShares() and countShares() now treat the $owner argument as an optional username restricting the returned shares, not a modifier to the initial $userid. Now $userid is the user who must have permission to see the shares that are returned or counted, and $owner, if non-null, limits the shares returned to those owned by $owner. 0.0.3 0.0.3 beta beta 2006-05-08 LGPL-2.1 * Converted to package.xml 2.0 for pear.horde.org. * Split into a driver pattern. * Simplified the API greatly, removing unused functions. * Add a method for counting the number of shares at a certain access level. * Add native SQL driver (duck@obala.net, Request #6109). * Implemented extended free/busy access concept in the Kolab driver. 1.0.0alpha1 1.0.0 alpha alpha 2011-03-08 LGPL-2.1 * First alpha release for Horde 4. 1.0.0beta1 1.0.0 beta beta 2011-03-16 LGPL-2.1 * First beta release for Horde 4. 1.0.0RC1 1.0.0 beta beta 2011-03-22 LGPL-2.1 * First release candidate for Horde 4. * [gwr] Fix checking creators permission for Kolab shares. * [gwr] URL encode share ids in the Kolab driver. 1.0.0RC2 1.0.0 beta beta 2011-03-29 LGPL-2.1 * Second release candidate for Horde 4. 1.0.0 1.0.0 stable stable 2011-04-06 LGPL-2.1 * First stable release for Horde 4. 1.0.1 1.0.0 stable stable 2011-05-03 LGPL-2.1 * [jan] SECURITY: Fix permission checks of guest users on system shares. 1.1.0 1.1.0 stable stable 2011-05-18 LGPL-2.1 * [mjr] Fix usage of countOwners() and listOwners() in the Sqlng driver. * [mjr] Add ability to immediately save a single attribute change. * [jan] Updated Spanish translation. 1.1.1 1.1.0 stable stable 2011-07-05 LGPL-2.1 * [mjr] Fix returning shares in the proper order when fetching multiple shares by id. 1.1.2 1.1.0 stable stable 2011-07-27 LGPL-2.1 * [jan] Update Latvian translation. 1.2.0 1.2.0 stable stable 2011-08-17 LGPL-2.1 * [gwr] Fixed support for share parents in the Kolab driver. * [gwr] Fixed support for multiple namespaces of the same type in the Kolab driver. 1.2.1 1.2.0 stable stable 2011-09-20 LGPL-2.1 * [gwr] Fix usage of Horde_Exception_Wrapped. 1.2.2 1.2.0 stable stable 2011-11-08 LGPL-2.1 * [jan] Skip Kolab test if Horde_Kolab_Storage is not installed. 1.3.0 1.3.0 stable stable 2012-04-10 LGPL-2.1 * [jan] Add renameShare(). * [mjr] Properly cache empty listShares results (Bug #11045). 2.0.0alpha1 1.3.0 alpha stable 2012-07-06 LGPL-2.1 * First alpha release for Horde 5. 2.0.0beta1 1.3.0 beta stable 2012-07-19 LGPL-2.1 * First beta release for Horde 5. * [jan] Remove DataTree driver. 2.0.0beta2 1.3.0 beta stable 2012-07-21 LGPL-2.1 * [jan] Remove optional dependency on Horde_DataTree. 2.0.0beta3 1.3.0 beta stable 2012-08-29 LGPL-2.1 * [gwr] Adapt to API changes in Kolab_Storage. 2.0.0beta4 1.3.0 beta stable 2012-10-12 LGPL-2.1 * [gwr] Propagate setting the default attribute to the Kolab backend. 2.0.0RC1 1.3.0 beta stable 2012-10-26 LGPL-2.1 * [jan] Fix sorting of Kolab shares (Bug #11509). 2.0.0 1.3.0 stable stable 2012-10-30 LGPL-2.1 * First stable release for Horde 5. 2.0.1 1.3.0 stable stable 2012-11-06 LGPL-2.1 * [jan] Update Dutch translation (Arjen de Korte <build+horde@de-korte.org>). 2.0.2 1.3.0 stable stable 2013-01-10 LGPL-2.1 * [jan] Update Basque translation (Ibon Igartua <ibon.igartua@ehu.es>). 2.0.3 1.3.0 stable stable 2013-03-05 LGPL-2.1 * [jan] Fix testing for owner and user permissions in Kolab shares. 2.0.4 1.3.0 stable stable 2013-07-05 LGPL-2.1 * [mjr] Fix setting permissions while saving shares when using the sqlng driver (Bug #12413). 2.0.5 1.3.0 stable stable 2014-03-03 LGPL-2.1 * [jan] Make SQL backend compatible with Oracle. 2.0.6 1.3.0 stable stable 2015-01-09 LGPL-2.1 * [jan] Support loading translations from Composer-installed package. * [jan] Improve PSR-2 compatibility. 2.0.7 1.3.0 stable stable 2015-05-21 LGPL-2.1 * [jan] Fix returning user and group permissions for system shares using the SQLNG driver. 2.0.8 1.3.0 stable stable 2016-02-02 LGPL-2.1 * [jan] Mark PHP 7 as supported. Horde_Share-2.0.8/doc/Horde/Share/COPYING0000664000175000017500000005764612654071446015746 0ustar janjan GNU LESSER GENERAL PUBLIC LICENSE Version 2.1, February 1999 Copyright (C) 1991, 1999 Free Software Foundation, Inc. 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. [This is the first released version of the Lesser GPL. It also counts as the successor of the GNU Library Public License, version 2, hence the version number 2.1.] Preamble The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public Licenses are intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This license, the Lesser General Public License, applies to some specially designated software packages--typically libraries--of the Free Software Foundation and other authors who decide to use it. You can use it too, but we suggest you first think carefully about whether this license or the ordinary General Public License is the better strategy to use in any particular case, based on the explanations below. When we speak of free software, we are referring to freedom of use, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish); that you receive source code or can get it if you want it; that you can change the software and use pieces of it in new free programs; and that you are informed that you can do these things. To protect your rights, we need to make restrictions that forbid distributors to deny you these rights or to ask you to surrender these rights. These restrictions translate to certain responsibilities for you if you distribute copies of the library or if you modify it. For example, if you distribute copies of the library, whether gratis or for a fee, you must give the recipients all the rights that we gave you. You must make sure that they, too, receive or can get the source code. If you link other code with the library, you must provide complete object files to the recipients, so that they can relink them with the library after making changes to the library and recompiling it. And you must show them these terms so they know their rights. We protect your rights with a two-step method: (1) we copyright the library, and (2) we offer you this license, which gives you legal permission to copy, distribute and/or modify the library. To protect each distributor, we want to make it very clear that there is no warranty for the free library. Also, if the library is modified by someone else and passed on, the recipients should know that what they have is not the original version, so that the original author's reputation will not be affected by problems that might be introduced by others. Finally, software patents pose a constant threat to the existence of any free program. We wish to make sure that a company cannot effectively restrict the users of a free program by obtaining a restrictive license from a patent holder. Therefore, we insist that any patent license obtained for a version of the library must be consistent with the full freedom of use specified in this license. Most GNU software, including some libraries, is covered by the ordinary GNU General Public License. This license, the GNU Lesser General Public License, applies to certain designated libraries, and is quite different from the ordinary General Public License. We use this license for certain libraries in order to permit linking those libraries into non-free programs. When a program is linked with a library, whether statically or using a shared library, the combination of the two is legally speaking a combined work, a derivative of the original library. The ordinary General Public License therefore permits such linking only if the entire combination fits its criteria of freedom. The Lesser General Public License permits more lax criteria for linking other code with the library. We call this license the "Lesser" General Public License because it does Less to protect the user's freedom than the ordinary General Public License. It also provides other free software developers Less of an advantage over competing non-free programs. These disadvantages are the reason we use the ordinary General Public License for many libraries. However, the Lesser license provides advantages in certain special circumstances. For example, on rare occasions, there may be a special need to encourage the widest possible use of a certain library, so that it becomes a de-facto standard. To achieve this, non-free programs must be allowed to use the library. A more frequent case is that a free library does the same job as widely used non-free libraries. In this case, there is little to gain by limiting the free library to free software only, so we use the Lesser General Public License. In other cases, permission to use a particular library in non-free programs enables a greater number of people to use a large body of free software. For example, permission to use the GNU C Library in non-free programs enables many more people to use the whole GNU operating system, as well as its variant, the GNU/Linux operating system. Although the Lesser General Public License is Less protective of the users' freedom, it does ensure that the user of a program that is linked with the Library has the freedom and the wherewithal to run that program using a modified version of the Library. The precise terms and conditions for copying, distribution and modification follow. Pay close attention to the difference between a "work based on the library" and a "work that uses the library". The former contains code derived from the library, whereas the latter must be combined with the library in order to run. GNU LESSER GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License Agreement applies to any software library or other program which contains a notice placed by the copyright holder or other authorized party saying it may be distributed under the terms of this Lesser General Public License (also called "this License"). Each licensee is addressed as "you". A "library" means a collection of software functions and/or data prepared so as to be conveniently linked with application programs (which use some of those functions and data) to form executables. The "Library", below, refers to any such software library or work which has been distributed under these terms. A "work based on the Library" means either the Library or any derivative work under copyright law: that is to say, a work containing the Library or a portion of it, either verbatim or with modifications and/or translated straightforwardly into another language. (Hereinafter, translation is included without limitation in the term "modification".) "Source code" for a work means the preferred form of the work for making modifications to it. For a library, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the library. Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running a program using the Library is not restricted, and output from such a program is covered only if its contents constitute a work based on the Library (independent of the use of the Library in a tool for writing it). Whether that is true depends on what the Library does and what the program that uses the Library does. 1. You may copy and distribute verbatim copies of the Library's complete source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and distribute a copy of this License along with the Library. You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. 2. You may modify your copy or copies of the Library or any portion of it, thus forming a work based on the Library, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: a) The modified work must itself be a software library. b) You must cause the files modified to carry prominent notices stating that you changed the files and the date of any change. c) You must cause the whole of the work to be licensed at no charge to all third parties under the terms of this License. d) If a facility in the modified Library refers to a function or a table of data to be supplied by an application program that uses the facility, other than as an argument passed when the facility is invoked, then you must make a good faith effort to ensure that, in the event an application does not supply such function or table, the facility still operates, and performs whatever part of its purpose remains meaningful. (For example, a function in a library to compute square roots has a purpose that is entirely well-defined independent of the application. Therefore, Subsection 2d requires that any application-supplied function or table used by this function must be optional: if the application does not supply it, the square root function must still compute square roots.) These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Library, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Library, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Library. In addition, mere aggregation of another work not based on the Library with the Library (or with a work based on the Library) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. 3. You may opt to apply the terms of the ordinary GNU General Public License instead of this License to a given copy of the Library. To do this, you must alter all the notices that refer to this License, so that they refer to the ordinary GNU General Public License, version 2, instead of to this License. (If a newer version than version 2 of the ordinary GNU General Public License has appeared, then you can specify that version instead if you wish.) Do not make any other change in these notices. Once this change is made in a given copy, it is irreversible for that copy, so the ordinary GNU General Public License applies to all subsequent copies and derivative works made from that copy. This option is useful when you wish to copy part of the code of the Library into a program that is not a library. 4. You may copy and distribute the Library (or a portion or derivative of it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange. If distribution of object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place satisfies the requirement to distribute the source code, even though third parties are not compelled to copy the source along with the object code. 5. A program that contains no derivative of any portion of the Library, but is designed to work with the Library by being compiled or linked with it, is called a "work that uses the Library". Such a work, in isolation, is not a derivative work of the Library, and therefore falls outside the scope of this License. However, linking a "work that uses the Library" with the Library creates an executable that is a derivative of the Library (because it contains portions of the Library), rather than a "work that uses the library". The executable is therefore covered by this License. Section 6 states terms for distribution of such executables. When a "work that uses the Library" uses material from a header file that is part of the Library, the object code for the work may be a derivative work of the Library even though the source code is not. Whether this is true is especially significant if the work can be linked without the Library, or if the work is itself a library. The threshold for this to be true is not precisely defined by law. If such an object file uses only numerical parameters, data structure layouts and accessors, and small macros and small inline functions (ten lines or less in length), then the use of the object file is unrestricted, regardless of whether it is legally a derivative work. (Executables containing this object code plus portions of the Library will still fall under Section 6.) Otherwise, if the work is a derivative of the Library, you may distribute the object code for the work under the terms of Section 6. Any executables containing that work also fall under Section 6, whether or not they are linked directly with the Library itself. 6. As an exception to the Sections above, you may also combine or link a "work that uses the Library" with the Library to produce a work containing portions of the Library, and distribute that work under terms of your choice, provided that the terms permit modification of the work for the customer's own use and reverse engineering for debugging such modifications. You must give prominent notice with each copy of the work that the Library is used in it and that the Library and its use are covered by this License. You must supply a copy of this License. If the work during execution displays copyright notices, you must include the copyright notice for the Library among them, as well as a reference directing the user to the copy of this License. Also, you must do one of these things: a) Accompany the work with the complete corresponding machine-readable source code for the Library including whatever changes were used in the work (which must be distributed under Sections 1 and 2 above); and, if the work is an executable linked with the Library, with the complete machine-readable "work that uses the Library", as object code and/or source code, so that the user can modify the Library and then relink to produce a modified executable containing the modified Library. (It is understood that the user who changes the contents of definitions files in the Library will not necessarily be able to recompile the application to use the modified definitions.) b) Use a suitable shared library mechanism for linking with the Library. A suitable mechanism is one that (1) uses at run time a copy of the library already present on the user's computer system, rather than copying library functions into the executable, and (2) will operate properly with a modified version of the library, if the user installs one, as long as the modified version is interface-compatible with the version that the work was made with. c) Accompany the work with a written offer, valid for at least three years, to give the same user the materials specified in Subsection 6a, above, for a charge no more than the cost of performing this distribution. d) If distribution of the work is made by offering access to copy from a designated place, offer equivalent access to copy the above specified materials from the same place. e) Verify that the user has already received a copy of these materials or that you have already sent this user a copy. For an executable, the required form of the "work that uses the Library" must include any data and utility programs needed for reproducing the executable from it. However, as a special exception, the materials to be distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. It may happen that this requirement contradicts the license restrictions of other proprietary libraries that do not normally accompany the operating system. Such a contradiction means you cannot use both them and the Library together in an executable that you distribute. 7. You may place library facilities that are a work based on the Library side-by-side in a single library together with other library facilities not covered by this License, and distribute such a combined library, provided that the separate distribution of the work based on the Library and of the other library facilities is otherwise permitted, and provided that you do these two things: a) Accompany the combined library with a copy of the same work based on the Library, uncombined with any other library facilities. This must be distributed under the terms of the Sections above. b) Give prominent notice with the combined library of the fact that part of it is a work based on the Library, and explaining where to find the accompanying uncombined form of the same work. 8. You may not copy, modify, sublicense, link with, or distribute the Library except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense, link with, or distribute the Library is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. 9. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Library or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Library (or any work based on the Library), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Library or works based on it. 10. Each time you redistribute the Library (or any work based on the Library), the recipient automatically receives a license from the original licensor to copy, distribute, link with or modify the Library subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties with this License. 11. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Library at all. For example, if a patent license would not permit royalty-free redistribution of the Library by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Library. If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply, and the section as a whole is intended to apply in other circumstances. It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. 12. If the distribution and/or use of the Library is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Library under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. 13. The Free Software Foundation may publish revised and/or new versions of the Lesser General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Library specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Library does not specify a license version number, you may choose any version ever published by the Free Software Foundation. 14. If you wish to incorporate parts of the Library into other free programs whose distribution conditions are incompatible with these, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. NO WARRANTY 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS Horde_Share-2.0.8/lib/Horde/Share/Object/Kolab.php0000664000175000017500000003025112654071446017642 0ustar janjan * @license http://www.horde.org/licenses/lgpl21 LGPL 2.1 * @link http://pear.horde.org/index.php?package=Share */ /** * Extension of the Horde_Share_Object class for handling Kolab share * information. * * Copyright 2004-2016 Horde LLC (http://www.horde.org/) * * See the enclosed file COPYING for license information (LGPL). If you * did not receive this file, see http://www.horde.org/licenses/lgpl21. * * @category Horde * @package Share * @author Gunnar Wrobel * @license http://www.horde.org/licenses/lgpl21 LGPL 2.1 * @link http://pear.horde.org/index.php?package=Share */ class Horde_Share_Object_Kolab extends Horde_Share_Object implements Serializable, Horde_Perms_Permission_Kolab_Storage { /** * Serializable version. */ const VERSION = 2; /** * The old share id. * * @var string */ private $_old_id; /** * The share id. * * @var string */ private $_id; /** * The Horde_Group driver * * @var Horde_Group_Base */ private $_groups; /** * The share attributes. * * @var array */ protected $_data; /** * The permission cache holds any permission changes that will be executed * on saving. * * @var Horde_Perm_Permission_Kolab */ private $_permission; /** * Constructor. * * @param string $id The share id. * @param Horde_Group_Base $groups The Horde_Group driver * @param array $data The share data. */ public function __construct($id, Horde_Group_Base $groups, array $data = array()) { $this->_old_id = $id; $this->_id = $id; $this->_groups = $groups; $this->_data = $data; } /** * Serialize this object. * * @return string The serialized data. */ public function serialize() { return serialize(array( self::VERSION, $this->_id, $this->_data, $this->_shareCallback )); } /** * Unserialize object. * * @param $data */ public function unserialize($data) { $data = @unserialize($data); if (!is_array($data) || !isset($data[0]) || ($data[0] != self::VERSION)) { throw new Exception('Cache version change'); } $this->_id = $data[1]; $this->_data = $data[2]; if (empty($data[3])) { throw new Exception('Missing callback for unserializing Horde_Share_Object'); } $this->_shareCallback = $data[3]; $this->setShareOb(call_user_func($this->_shareCallback)); } /** * Returns the ID of this share. * * @return string The share's ID. */ public function getId() { if ($this->_id === null) { throw new Horde_Share_Exception( 'A new Kolab share requires a set("name", ...) and set("owner", ...) call before the ID is available.' ); } return $this->_id; } /** * Returns the permission ID of this share. * * @return string The share's permission ID. */ public function getPermissionId() { if ($this->_id === null) { /* We only get here if permissions are being set before the name * has been set. For the Kolab permission instance it should not * matter if the name is a random string. */ return md5(pack('I', mt_rand())); } return $this->_id; } /** * Returns the name of this share. * * @return string The share's name. */ public function getName() { if (isset($this->_data['share_name'])) { return $this->_data['share_name']; } else { return $this->getId(); } } /** * Returns the owner of this share. * * @return string The share's owner. */ public function getOwner() { return $this->get('owner'); } /** * Returns an attribute value from this object. * * @param string $attribute The attribute to return. * * @return mixed The value for $attribute. */ public function get($attribute) { if (isset($this->_data[$attribute])) { return $this->_data[$attribute]; } } /** * Sets an attribute value in this object. * * @param string $attribute The attribute to set. * @param mixed $value The value for $attribute. * @param boolean $update Update *only* this change immediately. * * @return NULL */ public function set($attribute, $value, $update = false) { if (in_array($attribute, array('owner', 'name', 'prefix'))) { $owner = $this->get('owner'); $name = $this->get('name'); $prefix = $this->get('prefix'); switch ($attribute) { case 'name': $name = $value; break; case 'owner': $owner = $value; break; case 'prefix': $prefix = $value; break; } $subpath = $name; $parent = $this->getParent(); if ($parent !== null) { $subpath = $parent->get('subpath') . $parent->get('delimiter') . $subpath; } $this->_data['folder'] = $this->getShareOb()->constructFolderName( $owner, $subpath, $prefix ); list($this->_data['prefix'], $this->_data['delimiter'], $this->_data['subpath']) = $this->getShareOb()->getFolderNameElements( $this->_data['folder'] ); $this->_id = $this->getShareOb()->constructId( $owner, $subpath, $this->_data['prefix'] ); } $this->_data[$attribute] = $value; //@TODO: Not sure how to update a single attribute in kolab. if ($update) { $this->_save(); } } /** * Return a count of the number of children this share has * * @param string $user The user to use for checking perms * @param integer $perm A Horde_Perms::* constant * @param boolean $allLevels Count grandchildren or just children * * @return integer The number of child shares */ public function countChildren($user, $perm = Horde_Perms::SHOW, $allLevels = true) { return $this->getShareOb()->countShares($user, $perm, null, $this, $allLevels); } /** * Get all children of this share. * * @param string $user The user to use for checking perms * @param integer $perm Horde_Perms::* constant. If NULL will return * all shares regardless of permissions. * @param boolean $allLevels Return all levels. * * @return array An array of Horde_Share_Object objects */ public function getChildren($user, $perm = Horde_Perms::SHOW, $allLevels = true) { return $this->getShareOb()->listShares( $user, array('perm' => $perm, 'direction' => 1, 'parent' => $this, 'all_levels' => $allLevels)); } /** * Returns a child's direct parent. * * @return Horde_Share_Object|NULL The direct parent Horde_Share_Object or * NULL in case the share has no parent. */ public function getParent() { $parent_id = $this->get('parent'); if (!empty($parent_id)) { try { return $this->getShareOb()->getShareById($parent_id); } catch (Horde_Exception_NotFound $e) { return null; } } return null; } /** * Get all of this share's parents. * * @return array() An array of Horde_Share_Objects. */ public function getParents() { $parents = array(); $share = $this->getParent(); while ($share instanceof Horde_Share_Object) { $parents[] = $share; $share = $share->getParent(); } return array_reverse($parents); } /** * Set the parent object for this share. * * @param mixed $parent A Horde_Share object or share id for the parent. * * @return NULL */ public function setParent($parent) { if (!$parent instanceof Horde_Share_Object) { $parent = $this->getShareOb()->getShareById($parent); } $this->_data['parent'] = $parent->getId(); $this->_data['prefix'] = $parent->get('prefix'); $this->set('owner', $parent->get('owner')); } /** * Saves the current attribute values. */ protected function _save() { if (!isset($this->_data['share_name'])) { $this->_data['share_name'] = $this->getName(); } $this->getShareOb()->save($this->getId(), $this->_old_id, $this->_data); $this->_old_id = $this->_id; $this->getPermission()->save(); } /** * Checks to see if a user has a given permission. * * @param string $userid The userid of the user. * @param integer $permission A Horde_Perms::* constant to test for. * @param string $creator The creator of the shared object. * * @return boolean Whether or not $userid has $permission. */ public function hasPermission($userid, $permission, $creator = null) { $owner = $this->getOwner(); if ($userid !== false && $userid == $owner) { return (bool)($this->getPermission()->getOwnerPermissions() & $permission); } if (empty($creator)) { $creator = $owner; } return $this->getShareOb()->getPermsObject()->hasPermission($this->getPermission(), $userid, $permission, $creator); } /** * Returns the permissions from this storage object. * * @return Horde_Perms_Permission_Kolab The permissions on the share. */ public function getPermission() { if ($this->_permission === null) { $this->_permission = new Horde_Perms_Permission_Kolab($this, $this->_groups); } return $this->_permission; } /** * Sets the permissions on the share. * * @param Horde_Perms_Permission_Kolab $perms Permission object to folder * on the object. * @param boolean $update Save the updated information? * * @return NULL */ public function setPermission($perms, $update = true) { if (!$perms instanceof Horde_Perms_Permission_Kolab) { $this->getPermission()->setData($perms->getData()); } else { $this->_permission = $perms; } if ($update) { $this->save(); } } /** * Retrieve the Kolab specific access rights for this share. * * @return An array of rights. */ public function getAcl() { if ($this->_old_id === null) { // The share has not been created yet. return array( $this->get('owner') => Horde_Perms_Permission_Kolab::ALL ); } return $this->getShareOb()->getAcl($this->_id); } /** * Set the Kolab specific access rights for this share. * * @param string $user The user to set the ACL for. * @param string $acl The ACL. * * @return NULL */ public function setAcl($user, $acl) { return $this->getShareOb()->setAcl($this->_id, $user, $acl); } /** * Delete Kolab specific access rights for this share. * * @param string $user The user to delete the ACL for. * * @return NULL */ public function deleteAcl($user) { return $this->getShareOb()->deleteAcl($this->_id, $user); } } Horde_Share-2.0.8/lib/Horde/Share/Object/Sql.php0000664000175000017500000003123112654071446017350 0ustar janjan * @author Michael J. Rubinsky * @package Share */ class Horde_Share_Object_Sql extends Horde_Share_Object implements Serializable { /** * Serializable version. */ const VERSION = 2; /** * The actual storage object that holds the data. * * @TODO: Check visibility - should be protected/private * @var array */ public $data = array(); /** * Constructor. * * @param array $data Share data array. */ public function __construct($data) { if (!isset($data['share_parents'])) { $data['share_parents'] = null; } if (!isset($data['perm']) || !is_array($data['perm'])) { $this->data['perm'] = array( 'users' => array(), 'type' => 'matrix', 'default' => isset($data['perm_default']) ? (int)$data['perm_default'] : 0, 'guest' => isset($data['perm_guest']) ? (int)$data['perm_guest'] : 0, 'creator' => isset($data['perm_creator']) ? (int)$data['perm_creator'] : 0, 'groups' => array()); unset($data['perm_creator'], $data['perm_guest'], $data['perm_default']); } $this->data = array_merge($data, $this->data); } /** * Serialize this object. * * @return string The serialized data. */ public function serialize() { return serialize(array( self::VERSION, $this->data, $this->_shareCallback, )); } /** * Reconstruct the object from serialized data. * * @param string $data The serialized data. */ public function unserialize($data) { $data = @unserialize($data); if (!is_array($data) || !isset($data[0]) || ($data[0] != self::VERSION)) { throw new Exception('Cache version change'); } $this->data = $data[1]; if (empty($data[2])) { throw new Exception('Missing callback for Horde_Share_Object unserializing'); } $this->_shareCallback = $data[2]; } /** * Sets an attribute value in this object. * * @param string $attribute The attribute to set. * @param mixed $value The value for $attribute. * @param boolean $update Update *only* this change immeditely. */ public function set($attribute, $value, $update = false) { if ($attribute == 'owner') { $driver_key = 'share_owner'; } else { $driver_key = 'attribute_' . $attribute; } $this->data[$driver_key] = $value; /* Update the backend, but only this current change */ if ($update) { $db = $this->getShareOb()->getStorage(); // Manually convert the charset since we're not going through save() $data = $this->getshareOb()->toDriverCharset(array($driver_key => $value)); $sql = 'UPDATE ' . $this->getShareOb()->getTable() . ' SET ' . $driver_key . ' = ? WHERE share_id = ?'; try { $db->update($sql, array($data[$driver_key], $this->getId())); } catch (Horde_Db_Exception $e) { throw new Horde_Share_Exception($e); } } } /** * Returns one of the attributes of the object, or null if it isn't * defined. * * @param string $attribute The attribute to retrieve. * * @return mixed The value of the attribute, or an empty string. */ public function get($attribute) { if ($attribute == 'owner' || $attribute == 'parents') { return $this->data['share_' . $attribute]; } elseif (isset($this->data['attribute_' . $attribute])) { return $this->data['attribute_' . $attribute]; } else { return null; } } /** * Returns the ID of this share. * * @return string The share's ID. */ public function getId() { return isset($this->data['share_id']) ? $this->data['share_id'] : null; } /** * Returns the name of this share. * * @return string The share's name. */ public function getName() { return $this->data['share_name']; } /** * Return a count of the number of children this share has * * @param string $user The user to use for checking perms * @param integer $perm A Horde_Perms::* constant * @param boolean $allLevels Count grandchildren or just children * * @return integer The number of child shares */ public function countChildren($user, $perm = Horde_Perms::SHOW, $allLevels = true) { return $this->getShareOb()->countShares($user, $perm, null, $this, $allLevels); } /** * Get all children of this share. * * @param string $user The user to use for checking perms * @param integer $perm Horde_Perms::* constant. If NULL will return * all shares regardless of permissions. * @param boolean $allLevels Return all levels. * * @return array An array of Horde_Share_Object objects */ public function getChildren($user, $perm = Horde_Perms::SHOW, $allLevels = true) { return $this->getShareOb()->listShares( $user, array('perm' => $perm, 'direction' => 1, 'parent' => $this, 'all_levels' => $allLevels)); } /** * Returns a child's direct parent * * @return Horde_Share_Object The direct parent Horde_Share_Object */ public function getParent() { return $this->getShareOb()->getParent($this); } /** * Get all of this share's parents. * * @return array() An array of Horde_Share_Objects */ public function getParents() { $parents = array(); $share = $this->getParent(); while ($share instanceof Horde_Share_Object) { $parents[] = $share; $share = $share->getParent(); } return array_reverse($parents); } /** * Set the parent object for this share. * * @param mixed $parent A Horde_Share object or share id for the parent. * * @return boolean */ public function setParent($parent) { if (!is_null($parent) && !is_a($parent, 'Horde_Share_Object')) { $parent = $this->getShareOb()->getShareById($parent); } /* If we are an existing share, check for any children */ if ($this->getId()) { $children = $this->getShareOb()->listShares(null, array('perm' => null, 'parent' => $this, 'all_levels' => true)); } else { $children = array(); } /* Can't set a child share as a parent */ if (!empty($parent) && in_array($parent->getId(), array_keys($children))) { throw new Horde_Share_Exception('Cannot set an existing child as the parent'); } if (!is_null($parent)) { $parent_string = $parent->get('parents') . ':' . $parent->getId(); } else { $parent_string = null; } $this->data['share_parents'] = $parent_string; $sql = 'UPDATE ' . $this->getShareOb()->getTable() . ' SET share_parents = ? WHERE share_id = ?'; try { $this->getShareOb()->getStorage()->update($sql, array($this->data['share_parents'], $this->getId())); } catch (Horde_Db_Exception $e) { throw new Horde_Share_Exception($e->getMessage()); } /* Now we can reset the children's parent */ foreach ($children as $child) { $child->setParent($this); } $this->_shareOb->expireListCache(); return true; } /** * Saves the current attribute values. */ protected function _save() { $db = $this->getShareOb()->getStorage(); $table = $this->getShareOb()->getTable(); $fields = array(); $params = array(); // Build the parameter arrays for the sql statement. foreach ($this->getShareOb()->toDriverCharset($this->data) as $key => $value) { if ($key != 'share_id' && $key != 'perm' && $key != 'share_flags') { $fields[] = $key; $params[] = $value; } } $fields[] = 'perm_creator'; $params[] = isset($this->data['perm']['creator']) ? (int)$this->data['perm']['creator'] : 0; $fields[] = 'perm_default'; $params[] = isset($this->data['perm']['default']) ? (int)$this->data['perm']['default'] : 0; $fields[] = 'perm_guest'; $params[] = isset($this->data['perm']['guest']) ? (int)$this->data['perm']['guest'] : 0; $fields[] = 'share_flags'; $flags = 0; if (!empty($this->data['perm']['users'])) { $flags |= Horde_Share_Sql::SQL_FLAG_USERS; } if (!empty($this->data['perm']['groups'])) { $flags |= Horde_Share_Sql::SQL_FLAG_GROUPS; } $params[] = $flags; // Insert new share record, or update existing if (empty($this->data['share_id'])) { $sql = 'INSERT INTO ' . $table . ' (' . implode(', ', $fields) . ') VALUES (?' . str_repeat(', ?', count($fields) - 1) . ')'; try { $this->data['share_id'] = $db->insert($sql, $params); } catch (Horde_Db_Exception $e) { throw new Horde_Share_Exception($e); } } else { $sql = 'UPDATE ' . $table . ' SET ' . implode(' = ?, ', $fields) . ' = ? WHERE share_id = ?'; $params[] = $this->data['share_id']; try { $db->update($sql, $params); } catch (Horde_Db_Exception $e) { throw new Horde_Share_Exception($e); } } // Update the share's user permissions $db->delete('DELETE FROM ' . $table . '_users WHERE share_id = ?', array($this->data['share_id'])); if (!empty($this->data['perm']['users'])) { $data = array(); foreach ($this->data['perm']['users'] as $user => $perm) { $db->insert('INSERT INTO ' . $table . '_users (share_id, user_uid, perm) VALUES (?, ?, ?)', array($this->data['share_id'], $user, $perm)); } } // Update the share's group permissions $db->delete('DELETE FROM ' . $table . '_groups WHERE share_id = ?', array($this->data['share_id'])); if (!empty($this->data['perm']['groups'])) { $data = array(); foreach ($this->data['perm']['groups'] as $group => $perm) { $db->insert('INSERT INTO ' . $table . '_groups (share_id, group_uid, perm) VALUES (?, ?, ?)', array($this->data['share_id'], $group, $perm)); } } return true; } /** * Checks to see if a user has a given permission. * * @param string $userid The userid of the user. * @param integer $permission A Horde_Perms::* constant to test for. * @param string $creator The creator of the event. * * @return boolean Whether or not $userid has $permission. */ public function hasPermission($userid, $permission, $creator = null) { /* Test identity because system share owners are null, and guests are * false. */ if ($userid === $this->data['share_owner']) { return true; } return $this->getShareOb()->getPermsObject()->hasPermission($this->getPermission(), $userid, $permission, $creator); } /** * Sets the permission of this share. * * @param Horde_Perms_Permission $perm Permission object. * @param boolean $update Should the share be saved * after this operation? */ public function setPermission($perm, $update = true) { $this->data['perm'] = $perm->getData(); if ($update) { $this->save(); } } /** * Returns the permission of this share. * * @return Horde_Perms_Permission Permission object that represents the * permissions on this share. */ public function getPermission() { $perm = new Horde_Perms_Permission($this->getName()); $perm->data = isset($this->data['perm']) ? $this->data['perm'] : array(); return $perm; } } Horde_Share-2.0.8/lib/Horde/Share/Object/Sqlng.php0000664000175000017500000001673312654071446017707 0ustar janjan * @package Share */ class Horde_Share_Object_Sqlng extends Horde_Share_Object_Sql { /** * Serializable version. */ const VERSION = 1; /** * A list of available permission. * * This is necessary to unset certain permission when updating existing * share objects. * * @param array */ public $availablePermissions = array(); /** * Constructor. * * @param array $data Share data array. */ public function __construct($data) { parent::__construct($data); $this->_setAvailablePermissions(); } /** * Serialize this object. * * @return string The serialized data. */ public function serialize() { return serialize(array( self::VERSION, $this->data, $this->_shareCallback, $this->availablePermissions, )); } /** * Reconstruct the object from serialized data. * * @param string $data The serialized data. */ public function unserialize($data) { $data = @unserialize($data); if (!is_array($data) || !isset($data[0]) || ($data[0] != self::VERSION)) { throw new Exception('Cache version change'); } $this->data = $data[1]; if (empty($data[2])) { throw new Exception('Missing callback for Horde_Share_Object unserializing'); } $this->_shareCallback = $data[2]; $this->availablePermissions = $data[3]; } /** * Saves the current attribute values. */ protected function _save() { $db = $this->getShareOb()->getStorage(); $table = $this->getShareOb()->getTable(); // Build the parameter arrays for the sql statement. $fields = $params = array(); foreach ($this->getShareOb()->toDriverCharset($this->data) as $key => $value) { if ($key != 'share_id' && $key != 'perm' && $key != 'share_flags') { $fields[] = $key; $params[] = $value; } } $fields[] = 'share_flags'; $flags = 0; if (!empty($this->data['perm']['users'])) { $flags |= Horde_Share_Sql::SQL_FLAG_USERS; } if (!empty($this->data['perm']['groups'])) { $flags |= Horde_Share_Sql::SQL_FLAG_GROUPS; } $params[] = $flags; // Insert new share record, or update existing if (empty($this->data['share_id'])) { foreach ($this->data['perm'] as $base => $perms) { if ($base == 'type' || $base == 'users' || $base == 'groups') { continue; } foreach (Horde_Share_Sqlng::convertBitmaskToArray($perms) as $perm) { $fields[] = 'perm_' . $base . '_' . $perm; $params[] = true; } } $sql = 'INSERT INTO ' . $table . ' (' . implode(', ', $fields) . ') VALUES (?' . str_repeat(', ?', count($fields) - 1) . ')'; try { $this->data['share_id'] = $db->insert($sql, $params); } catch (Horde_Db_Exception $e) { throw new Horde_Share_Exception($e); } } else { foreach ($this->data['perm'] as $base => $perms) { if ($base == 'type' || $base == 'users' || $base == 'groups') { continue; } $perms = array_flip(Horde_Share_Sqlng::convertBitmaskToArray($perms)); foreach ($this->availablePermissions as $perm) { $fields[] = 'perm_' . $base . '_' . $perm; $params[] = isset($perms[$perm]) ? true : false; } } $sql = 'UPDATE ' . $table . ' SET ' . implode(' = ?, ', $fields) . ' = ? WHERE share_id = ?'; $params[] = $this->data['share_id']; try { $db->update($sql, $params); } catch (Horde_Db_Exception $e) { throw new Horde_Share_Exception($e); } } // Update the share's user permissions $db->delete('DELETE FROM ' . $table . '_users WHERE share_id = ?', array($this->data['share_id'])); if (!empty($this->data['perm']['users'])) { $data = array(); foreach ($this->data['perm']['users'] as $user => $perms) { $fields = $params = array(); foreach (Horde_Share_Sqlng::convertBitmaskToArray($perms) as $perm) { $fields[] = 'perm_' . $perm; $params[] = true; } if (!$fields) { continue; } array_unshift($params, $user); array_unshift($params, $this->data['share_id']); $db->insert('INSERT INTO ' . $table . '_users (share_id, user_uid, ' . implode(', ', $fields) . ') VALUES (?, ?' . str_repeat(', ?', count($fields)) . ')', $params); } } // Update the share's group permissions $db->delete('DELETE FROM ' . $table . '_groups WHERE share_id = ?', array($this->data['share_id'])); if (!empty($this->data['perm']['groups'])) { $data = array(); foreach ($this->data['perm']['groups'] as $group => $perms) { $fields = $params = array(); foreach (Horde_Share_Sqlng::convertBitmaskToArray($perms) as $perm) { $fields[] = 'perm_' . $perm; $params[] = true; } if (!$fields) { continue; } array_unshift($params, $group); array_unshift($params, $this->data['share_id']); $db->insert('INSERT INTO ' . $table . '_groups (share_id, group_uid, ' . implode(', ', $fields) . ') VALUES (?, ?' . str_repeat(', ?', count($fields)) . ')', $params); } } return true; } /** * Sets the permission of this share. * * @param Horde_Perms_Permission $perm Permission object. * @param boolean $update Should the share be saved * after this operation? */ public function setPermission($perm, $update = true) { parent::setPermission($perm, false); $this->_setAvailablePermissions(); if ($update) { $this->save(); } } /** * Populates the $availablePermissions property with all seen permissions. * * This is necessary because the share tables might be extended with * arbitrary permissions. */ protected function _setAvailablePermissions() { $available = array(); foreach ($this->availablePermissions as $perm) { $available[$perm] = true; } foreach ($this->data['perm'] as $base => $perms) { if ($base == 'type') { continue; } if ($base != 'users' && $base != 'groups') { $perms = array($perms); } foreach ($perms as $subperms) { foreach (Horde_Share_Sqlng::convertBitmaskToArray($subperms) as $perm) { $available[$perm] = true; } } } $this->availablePermissions = array_keys($available); } } Horde_Share-2.0.8/lib/Horde/Share/Base.php0000664000175000017500000005103612654071446016262 0ustar janjan * * See the enclosed file COPYING for license information (LGPL). If you * did not receive this file, see http://www.horde.org/licenses/lgpl21. * * @author Joel Vandal * @author Mike Cochrame * @author Chuck Hagenbuch * @author Jan Schneider * @author Gunnar Wrobel * @author Michael J. Rubinsky * @package Share */ abstract class Horde_Share_Base { /** * The application we're managing shares for. * * @var string */ protected $_app; /** * The root of the Share tree. * * @var mixed */ protected $_root = null; /** * A cache of all shares that have been retrieved, so we don't hit the * backend again and again for them. * * @var array */ protected $_cache = array(); /** * Id-name-map of already cached share objects. * * @var array */ protected $_shareMap = array(); /** * Cache used for listShares(). * * @var array */ protected $_listcache = array(); /** * A list of objects that we're currently sorting, for reference during the * sorting algorithm. * * @var array */ protected $_sortList; /** * The Horde_Share_Object subclass to instantiate objects as * * @var string */ protected $_shareObject; /** * The Horde_Perms object * * @var Horde_Perms_Base */ protected $_permsObject; /** * The current user * * @var string */ protected $_user; /** * The Horde_Group driver * * @var Horde_Group_Base */ protected $_groups; /** * A callback that is passed to the share objects for setting the objects' * Horde_Share object. * * @var callback */ protected $_shareCallback; /** * Logger * * @var Horde_Log_Logger */ protected $_logger; /** * Configured callbacks. We currently support: *
     * add      - Called immediately before a new share is added. Receives the
     *            share object as a parameter.
     * modify   - Called immediately before a share object's changes are saved
     *            to storage. Receives the share object as a parameter.
     * remove   - Called immediately before a share is removed from storage.
     *            Receives the share object as a parameter.
     * list     - Called immediately after a list of shares is received from
     *            storage. Passed the userid, share list, and any parameters
     *            passed to the listShare call. Should return the (possibly
     *            modified) share list. @see listShares() for more
     *            info.
     *
* * @var array */ protected $_callbacks; /** * Constructor. * * @param string $app The application that the shares belong * to. * @param string $user The current user. * @param Horde_Perms_Base $perms The permissions object. * @param Horde_Group_Base $groups The Horde_Group driver. * */ public function __construct($app, $user, Horde_Perms_Base $perms, Horde_Group_Base $groups) { $this->_app = $app; $this->_user = $user; $this->_permsObject = $perms; $this->_groups = $groups; $this->_logger = new Horde_Support_Stub(); } /** * Set a logger object. * * @inject * * @var Horde_Log_Logger $logger The logger object. */ public function setLogger(Horde_Log_Logger $logger) { $this->_logger = $logger; } /** * (Re)connects the share object to this share driver. * * @param Horde_Share_Object $object */ public function initShareObject(Horde_Share_Object $object) { $object->setShareOb(empty($this->_shareCallback) ? $this : $this->_shareCallback); } public function setShareCallback($callback) { $this->_shareCallback = $callback; } /** * Returns the application we're managing shares for. * * @return string The application this share belongs to. */ public function getApp() { return $this->_app; } /** * Returns a Horde_Share_Object object corresponding to the given share * name, with the details retrieved appropriately. * * @param string $name The name of the share to retrieve. * * @return Horde_Share_Object The requested share. */ public function getShare($name) { if (isset($this->_cache[$name])) { return $this->_cache[$name]; } $share = $this->_getShare($name); $this->_shareMap[$share->getId()] = $name; $this->_cache[$name] = $share; return $share; } /** * Returns a Horde_Share_Object object corresponding to the given * share name, with the details retrieved appropriately. * * @param string $name The name of the share to retrieve. * * @return Horde_Share_Object The requested share. * @throws Horde_Exception_NotFound * @throws Horde_Share_Exception */ abstract protected function _getShare($name); /** * Returns a Horde_Share_Object object corresponding to the given unique * ID, with the details retrieved appropriately. * * @param string $cid The id of the share to retrieve. * * @return Horde_Share_Object The requested share. */ public function getShareById($cid) { if (!isset($this->_shareMap[$cid])) { $share = $this->_getShareById($cid); $name = $share->getName(); $this->_cache[$name] = $share; $this->_shareMap[$cid] = $name; } return $this->_cache[$this->_shareMap[$cid]]; } /** * Returns a Horde_Share_Object object corresponding to the given * unique ID, with the details retrieved appropriately. * * @param integer $id The id of the share to retrieve. * * @return Horde_Share_Object_sql The requested share. * @throws Horde_Share_Exception, Horde_Exception_NotFound */ abstract protected function _getShareById($id); /** * Returns an array of Horde_Share_Object objects corresponding to the * given set of unique IDs, with the details retrieved appropriately. * * @param array $cids The array of ids to retrieve. * * @return array The requested shares. */ public function getShares(array $cids) { $all_shares = $missing_ids = array(); foreach ($cids as $cid) { if (!isset($this->_shareMap[$cid])) { $missing_ids[] = $cid; } } if (count($missing_ids)) { $shares = $this->_getShares($missing_ids); foreach (array_keys($shares) as $key) { $this->_cache[$key] = $shares[$key]; $this->_shareMap[$shares[$key]->getId()] = $key; } } foreach ($cids as $cid) { $all_shares[$this->_shareMap[$cid]] = $this->_cache[$this->_shareMap[$cid]]; } return $all_shares; } /** * Returns an array of Horde_Share_Object objects corresponding * to the given set of unique IDs, with the details retrieved * appropriately. * * @param array $ids The array of ids to retrieve. * * @return array The requested shares. * @throws Horde_Share_Exception */ abstract protected function _getShares(array $ids); /** * Lists *all* shares for the current app/share, regardless of * permissions. * * This is for admin functionality and scripting tools, and shouldn't be * called from user-level code! * * @return array All shares for the current app/share. */ public function listAllShares() { $shares = $this->_listAllShares(); $this->_sortList = $shares; uasort($shares, array($this, '_sortShares')); $this->_sortList = null; return $shares; } /** * Lists *all* shares for the current app/share, regardless of permissions. * * @return array All shares for the current app/share. * @throws Horde_Share_Exception */ abstract protected function _listAllShares(); /** * Returns an array of all shares that $userid has access to. * * @param string $userid The userid of the user to check access for. An * empty value for the userid will only return shares * with guest access. * @param array $params Additional parameters for the search. *
     *  'perm'        Require this level of permissions. Horde_Perms constant.
     *  'attributes'  Restrict shares to these attributes. A hash or username.
     *  'from'        Offset. Start at this share
     *  'count'       Limit.  Only return this many.
     *  'sort_by'     Sort by attribute.
     *  'direction'   Sort by direction.
     *
* * @return array The shares the user has access to. */ public function listShares($userid, array $params = array()) { $params = array_merge(array('perm' => Horde_Perms::SHOW, 'attributes' => null, 'from' => 0, 'count' => 0, 'sort_by' => null, 'direction' => 0), $params); $shares = $this->_listShares($userid, $params); if (!count($shares)) { return $shares; } $shares = $this->getShares($shares); if (is_null($params['sort_by'])) { $this->_sortList = $shares; uasort($shares, array($this, '_sortShares')); $this->_sortList = null; } // Run the results through the callback, if configured. if (!empty($this->_callbacks['list'])) { return $this->runCallback('list', array($userid, $shares, $params)); } return $shares; } /** * Returns an array of all shares that $userid has access to. * * @param string $userid The userid of the user to check access for. * @param array $params See listShares(). * * @return array The shares the user has access to. */ abstract protected function _listShares($userid, array $params = array()); /** * Returns an array of all system shares. * * @return array All system shares. */ public function listSystemShares() { return array(); } /** * Returns the number of shares that $userid has access to. * * @param string $userid The userid of the user to check access for. * @param integer $perm The level of permissions required. * @param mixed $attributes Restrict the shares counted to those * matching $attributes. An array of * attribute/values pairs or a share owner * username. * * @return integer The number of shares */ public function countShares($userid, $perm = Horde_Perms::SHOW, $attributes = null) { return count($this->_listShares($userid, array('perm' => $perm, 'attributes' => $attributes))); } /** * Returns a new share object. * * @param string $owner The share owner name. * @param string $share_name The share's name. * @param string $name_attribute The name displayed to the user. * * @return Horde_Share_Object A new share object. * @throws Horde_Share_Exception */ public function newShare($owner, $share_name = '', $name_attribute = '') { $share = $this->_newShare($share_name); $share->set('owner', $owner); $share->set('name', $name_attribute); return $share; } /** * Returns a new share object. * * @param string $name The share's name. * * @return Horde_Share_Object A new share object * @throws InvalidArgumentException */ abstract protected function _newShare($name); /** * Adds a share to the shares system. * * The share must first be created with newShare(), and have any initial * details added to it, before this function is called. * * @param Horde_Share_Object $share The new share object. * * @throws Horde_Share_Exception */ public function addShare(Horde_Share_Object $share) { // Run the results through the callback, if configured. $this->runCallback('add', array($share)); $this->_addShare($share); /* Store new share in the caches. */ $id = $share->getId(); $name = $share->getName(); $this->_cache[$name] = $share; $this->_shareMap[$id] = $name; /* Reset caches that depend on unknown criteria. */ $this->expireListCache(); } /** * Adds a share to the shares system. * * The share must first be created with * Horde_Share_sql::_newShare(), and have any initial details added * to it, before this function is called. * * @param Horde_Share_Object $share The new share object. */ abstract protected function _addShare(Horde_Share_Object $share); /** * Renames a share in the shares system. * * @param Horde_Share_Object $share The share to rename. * @param string $name The share's new name. * * @throws Horde_Share_Exception */ public function renameShare(Horde_Share_Object $share, $name) { /* Move share in the caches. */ unset($this->_cache[$share->getName()]); $this->_cache[$name] = $share; /* Reset caches that depend on unknown criteria. */ $this->expireListCache(); $this->_renameShare($share, $name); } /** * Renames a share in the shares system. * * @param Horde_Share_Object $share The share to rename. * @param string $name The share's new name. * * @throws Horde_Share_Exception */ abstract protected function _renameShare(Horde_Share_Object $share, $name); /** * Removes a share from the shares system permanently. * * @param Horde_Share_Object $share The share to remove. * * @throws Horde_Share_Exception */ public function removeShare(Horde_Share_Object $share) { // Run the results through the callback, if configured. $this->runCallback('remove', array($share)); /* Remove share from the caches. */ $id = $share->getId(); unset($this->_shareMap[$id]); unset($this->_cache[$share->getName()]); /* Reset caches that depend on unknown criteria. */ $this->expireListCache(); $this->_removeShare($share); } /** * Removes a share from the shares system permanently. * * @param Horde_Share_Object $share The share to remove. * * @throws Horde_Share_Exception */ abstract protected function _removeShare(Horde_Share_Object $share); /** * Checks if a share name exists in the system. * * @param string $share The share name to check. * * @return boolean True if the share exists. */ public function exists($share) { if (isset($this->_cache[$share])) { return true; } return $this->_exists($share); } /** * Check that a share id exists in the system. * * @param integer $id The share id * * @return boolean True if the share exists. */ public function idExists($id) { if (isset($this->_shareMap[$id])) { return true; } return $this->_idExists($id); } /** * Checks if a share exists in the system. * * @param string $share The share to check. * * @return boolean True if the share exists. * @throws Horde_Share_Exception */ abstract protected function _exists($share); /** * Check that a share id exists in the system. * * @param integer $id The share id * * @return boolean True if the share exists. */ abstract protected function _idExists($id); /** * Finds out what rights the given user has to this object. * * @see Horde_Perms::getPermissions * * @param mixed $share The share that should be checked for the users * permissions. * @param string $user The user to check for. * * @return mixed A bitmask of permissions, a permission value, or an array * of permission values the user has, depending on the * permission type and whether the permission value is * ambiguous. False if there is no such permsission. */ public function getPermissions($share, $user = null) { if (!($share instanceof Horde_Share_Object)) { $share = $this->getShare($share); } return $this->_permsObject->getPermissions($share->getPermission(), $user); } /** * Set the class type to use for creating share objects. * * @var string $classname The classname to use. */ public function setShareClass($classname) { $this->_shareObject = $classname; } /** * Getter for Horde_Perms object * * @return Horde_Perms_Base */ public function getPermsObject() { return $this->_permsObject; } /** * Convert TO the storage driver's charset. Individual share objects should * implement this method if needed. * * @param array $data Data to be converted. */ public function toDriverCharset($data) { return $data; } /** * Add a callback to the collection * * @param string $type * @param array $callback */ public function addCallback($type, $callback) { $this->_callbacks[$type] = $callback; } /** * Returns the share's list cache. * * @return array */ public function getListCache() { return $this->_listcache; } /** * Set the list cache. * * @param array $cache */ public function setListCache($cache) { $this->_listcache = $cache; } /** * Resets the internal caches. */ public function resetCache() { $this->_cache = $this->_shareMap = array(); $this->expireListCache(); } /** * Give public access to call the share callbacks. Needed to run the * callbacks from the Horde_Share_Object objects. * * @param string $type The callback to run * @param array $params The parameters to pass to the callback. * * @return mixed */ public function runCallback($type, $params) { if (!empty($this->_callbacks[$type])) { return call_user_func_array($this->_callbacks[$type], $params); } } /** * Expire the current list cache. This would be needed anytime a share is * either added, deleted, had a change in owner, parent, or perms. */ public function expireListCache() { $this->_listcache = array(); } /** * Utility function to be used with uasort() for sorting arrays of * Horde_Share objects. * * Example: * * uasort($list, array('Horde_Share', '_sortShares')); * */ protected function _sortShares($a, $b) { $aParts = explode(':', $a->getName()); $bParts = explode(':', $b->getName()); $min = min(count($aParts), count($bParts)); $idA = ''; $idB = ''; for ($i = 0; $i < $min; $i++) { if ($idA) { $idA .= ':'; $idB .= ':'; } $idA .= $aParts[$i]; $idB .= $bParts[$i]; if ($idA != $idB) { $curA = isset($this->_sortList[$idA]) ? $this->_sortList[$idA]->get('name') : ''; $curB = isset($this->_sortList[$idB]) ? $this->_sortList[$idB]->get('name') : ''; return strnatcasecmp($curA, $curB); } } return count($aParts) > count($bParts); } } Horde_Share-2.0.8/lib/Horde/Share/Exception.php0000664000175000017500000000015412654071446017341 0ustar janjan * @author Gunnar Wrobel * @license http://www.horde.org/licenses/lgpl21 LGPL 2.1 * @link http://pear.horde.org/index.php?package=Share */ /** * Horde_Share_Kolab:: provides the Kolab backend for the horde share driver. * * Copyright 2004-2016 Horde LLC (http://www.horde.org/) * * See the enclosed file COPYING for license information (LGPL). If you * did not receive this file, see http://www.horde.org/licenses/lgpl21. * * @category Horde * @package Share * @author Stuart Binge * @author Gunnar Wrobel * @license http://www.horde.org/licenses/lgpl21 LGPL 2.1 * @link http://pear.horde.org/index.php?package=Share */ class Horde_Share_Kolab extends Horde_Share_Base { const VERSION = 1; /** * The Kolab storage handler * * @var Horde_Kolab_Storage */ private $_storage; /** * The folder type in the storage backend. * * @var string */ private $_type; /** * A map of IDs to folder names. * * @var array */ private $_id_map = array(); /** * Constructor. * * @param string $app The application that the shares belong * to * @param string $user The current user * @param Horde_Perms_Base $perms The permissions object * @param Horde_Group_Base $groups The Horde_Group driver. * */ public function __construct($app, $user, Horde_Perms_Base $perms, Horde_Group_Base $groups) { switch ($app) { case 'mnemo': case 'jonah': $this->_type = 'note'; break; case 'kronolith': $this->_type = 'event'; break; case 'turba': $this->_type = 'contact'; break; case 'nag': $this->_type = 'task'; break; default: throw new Horde_Share_Exception(sprintf(Horde_Share_Translation::t("The Horde/Kolab integration engine does not support \"%s\""), $app)); } parent::__construct($app, $user, $perms, $groups); } /** * Set the Kolab storage backend. * * @param Horde_Kolab_Storage $storage The Kolab storage handler. * * @return NULL */ public function setStorage(Horde_Kolab_Storage $storage) { $this->_storage = $storage; } /** * Return the Kolab storage backend associated with this driver. * * @return Horde_Kolab_Storage The Kolab storage driver. */ public function getStorage() { if ($this->_storage === null) { throw new Horde_Share_Exception('The storage backend has not yet been set!'); } return $this->_storage; } /** * Return the Kolab storage folder list handler. * * @return Horde_Kolab_Storage_List The folder list handler. */ public function getList() { try { return $this->getStorage()->getList(); } catch (Horde_Kolab_Storage_Exception $e) { throw new Horde_Share_Exception($e); } } /** * Return the type of folder this share driver will access in the Kolab * storage backend (depends on the application calling the share driver). * * @return string */ public function getType() { return $this->_type; } /** * Encode a share ID. * * @todo: In Horde3 share IDs were not properly escaped everywhere and it * made sense to escape them here just in case they are placed in a * URL. Needs checking in Horde4. * * @param string $id The ID to be encoded. * * @return string The encoded ID. */ private function _idEncode($id) { try { $folder = $this->getStorage()->getFolder($id); } catch (Horde_Kolab_Storage_Exception $e) { throw new Horde_Share_Exception($e); } return $this->constructId($folder->getOwner(), $folder->getSubpath(), $folder->getPrefix()); } /** * Construct the ID from the owner name and the folder subpath. * * @param string $owner The share owner. * @param string $name The name of the folder without the namespace prefix. * @param string $prefix The namespace prefix. * * @return string The encoded ID. */ public function constructId($owner, $name, $prefix = null) { return Horde_Url::uriB64Encode(serialize(array($owner, $name, $prefix))); } /** * Construct the Kolab storage folder name based on the share name and owner * attributes. * * @param string $owner The owner of the share. * @param string $subpath The folder subpath. * @param string $prefix The namespace prefix. * * @return string The folder name for the Kolab backend. */ public function constructFolderName($owner, $subpath, $prefix = null) { try { return $this->getList() ->getNamespace() ->constructFolderName($owner, $subpath, $prefix); } catch (Horde_Kolab_Storage_Exception $e) { throw new Horde_Share_Exception($e); } } /** * Retrieve namespace information for a folder name. * * @param string $folder The folder name. * * @return array A list of namespace prefix, the delimiter and the folder * subpath. */ public function getFolderNameElements($folder) { try { $ns = $this->getList()->getNamespace()->matchNamespace($folder); } catch (Horde_Kolab_Storage_Exception $e) { throw new Horde_Share_Exception($e); } return array( $ns->getName(), $ns->getDelimiter(), $ns->getSubpath($folder) ); } /** * Decode a share ID. * * @param string $id The ID to be decoded. * * @return string The decoded ID. */ private function _idDecode($id) { if (!isset($this->_id_map[$id])) { $result = $this->_idDeconstruct($id); $this->_id_map[$id] = $this->constructFolderName( $result[0], $result[1], isset($result[2]) ? $result[2] : null ); } return $this->_id_map[$id]; } /** * Deconstruct the ID elements from the ID string * * @param string $id The ID to be deconstructed. * * @return array A tuple of (owner, folder subpath). */ private function _idDeconstruct($id) { if (!$decoded_id = Horde_Url::uriB64Decode($id)) { $msg = sprintf('Share id %s is invalid.', $id); $this->_logger->err($msg); throw new Horde_Exception_NotFound($msg); } if (!$sid = @unserialize($decoded_id)) { $msg = sprintf('Share id %s is invalid.', $decoded_id); $this->_logger->err($msg); throw new Horde_Exception_NotFound($msg); } return $sid; } /** * Returns a Horde_Share_Object_Kolab object corresponding to the given * share name, with the details retrieved appropriately. * * @param string $id The id of the share to retrieve. * @param array $data The share data. * * @return Horde_Share_Object The requested share. */ private function _createObject($id, array $data = array()) { $object = new Horde_Share_Object_Kolab($id, $this->_groups, $data); $this->initShareObject($object); return $object; } /** * Returns a Horde_Share_Object_Kolab object corresponding to the given * share name, with the details retrieved appropriately. * * @param string $name The name of the share to retrieve. * * @return Horde_Share_Object The requested share. * @throws Horde_Exception_NotFound * @throws Horde_Share_Exception */ protected function _getShare($name) { try { $list = $this->getList() ->getQuery() ->dataByType($this->_type); $query = $this->getList() ->getQuery(Horde_Kolab_Storage_List_Tools::QUERY_SHARE); foreach ($list as $folder => $folder_data) { $data = $query->getParameters($folder); if (isset($data['share_name']) && $data['share_name'] == $name) { return $this->getShareById( $this->constructId( $folder_data['owner'], $folder_data['subpath'], isset($folder_data['prefix']) ? $folder_data['prefix'] : null ) ); } } } catch (Horde_Kolab_Storage_Exception $e) { throw new Horde_Share_Exception($e); } throw new Horde_Exception_NotFound(sprintf('Share name %s not found', $name)); } /** * Returns a Horde_Share_Object_sql object corresponding to the given * unique ID, with the details retrieved appropriately. * * @param integer $id The id of the share to retrieve. * * @return Horde_Share_Object_sql The requested share. * @throws Horde_Share_Exception, Horde_Exception_NotFound */ protected function _getShareById($id) { try { $list = $this->getList() ->getQuery() ->dataByType($this->_type); } catch (Horde_Kolab_Storage_Exception $e) { throw new Horde_Share_Exception($e); } if (!isset($list[$this->_idDecode($id)])) { throw new Horde_Exception_NotFound(sprintf('Share id %s not found', $id)); } try { $query = $this->getList() ->getQuery(Horde_Kolab_Storage_List_Tools::QUERY_SHARE); $data = array_merge( $query->getParameters($this->_idDecode($id)), $list[$this->_idDecode($id)] ); $data['desc'] = $query->getDescription($this->_idDecode($id)); } catch (Horde_Kolab_Storage_Exception $e) { throw new Horde_Share_Exception($e); } if (isset($data['parent'])) { try { $data['parent'] = $this->_idEncode($data['parent']); } catch (Horde_Kolab_Storage_Exception $e) { unset($data['parent']); } } return $this->_createObject($id, $data); } /** * Returns an array of Horde_Share_Object_kolab objects corresponding to * the requested folders. * * @param string $ids The ids of the shares to fetch. * * @return array An array of Horde_Share_Object_kolab objects. */ protected function _getShares(array $ids) { $objects = array(); foreach ($ids as $id) { $share = $this->_getShareById($id); $objects[$share->getName()] = $share; } return $objects; } /** * Checks if a share exists in the system. * * @param string $share The share to check. * * @return boolean True if the share exists. * @throws Horde_Share_Exception */ protected function _exists($share) { try { $this->getShare($share); return true; } catch (Horde_Exception_NotFound $e) { return false; } } /** * Check that a share id exists in the system. * * @param integer $id The share id * * @return boolean True if the share exists. */ protected function _idExists($id) { try { return in_array( $this->_idDecode($id), $this->getList()->getQuery()->listByType($this->_type) ); } catch (Horde_Kolab_Storage_Exception $e) { throw new Horde_Share_Exception($e); } } /** * Returns an array of all shares that $userid has access to. * * @param string $userid The userid of the user to check access for. * @param array $params See listShares(). * * @return array The shares the user has access to. */ protected function _listShares($userid, array $params = array()) { try { $stamp = $this->getList()->getQuery()->getStamp(); $key = md5(serialize(array($userid, $params, $stamp))); if (isset($this->_listcache[$key])) { return $this->_listcache[$key]; } $shares = array_map( array($this, '_idEncode'), $this->getList()->getQuery()->listByType($this->_type) ); $remove = array(); if ($params['perm'] != Horde_Perms::SHOW || empty($userid)) { foreach ($shares as $share) { $object = $this->_getShareById($share); if (!$object->hasPermission($userid, $params['perm'], $object->get('owner'))) { $remove[] = $share; } } } if (isset($params['parent'])) { foreach ($shares as $share) { $object = $this->getShareById($share); if ($params['parent'] instanceof Horde_Share_Object) { $parent = $params['parent']; } else { $parent = $this->getShare($params['parent']); } if (!$object->getParent() || $object->getParent()->getId() != $parent->getId()) { $remove[] = $share; } } } if (isset($params['all_levels']) && empty($params['all_levels'])) { foreach ($shares as $share) { $object = $this->getShareById($share); $parent = $object->get('parent'); if (!empty($parent) && in_array($parent, $shares)) { $remove[] = $share; } } } if (isset($params['attributes'])) { if (!is_array($params['attributes'])) { $attributes = array('owner' => $params['attributes']); } else { $attributes = $params['attributes']; } foreach ($shares as $share) { $object = $this->getShareById($share); foreach ($attributes as $key => $value) { if ($object->get($key) != $value) { $remove[] = $share; } } } } if (!empty($remove)) { $shares = array_diff($shares, $remove); } if (isset($params['sort_by'])) { if ($params['sort_by'] == 'id') { sort($shares); } else { $sorted = array(); foreach ($shares as $share) { $object = $this->getShareById($share); $sorted[$object->getId()] = $object->get($params['sort_by']); } asort($sorted); $shares = array_keys($sorted); } } if (!empty($params['direction'])) { $shares = array_reverse($shares); } if (isset($params['from']) && !empty($params['from'])) { $shares = array_slice($shares, $params['from']); } if (isset($params['count']) && !empty($params['count'])) { $shares = array_slice($shares, 0, $params['count']); } $this->_listcache[$key] = $shares; } catch (Horde_Kolab_Storage_Exception $e) { throw new Horde_Share_Exception($e); } return $this->_listcache[$key]; } /** * Returns the count of all shares that $userid has access to. * * @param string $userid The userid of the user to check access for. * @param integer $perm The level of permissions required. * @param mixed $attributes Restrict the shares counted to those * matching $attributes. An array of * attribute/values pairs or a share owner * username. * @param mixed $parent The share to start searching from * (Horde_Share_Object, share_id, or null) * @param boolean $allLevels Return all levels, or just the direct * children of $parent? * * @return integer Number of shares the user has access to. * @throws Horde_Share_Exception */ public function countShares($userid, $perm = Horde_Perms::SHOW, $attributes = null, $parent = null, $allLevels = true) { return count( $this->listShares( $userid, array( 'perm' => $perm, 'attributes' => $attributes, 'parent' => $parent, 'all_levels' => $allLevels ) ) ); } /** * Returns an array of all system shares. * * @return array All system shares. */ public function listSystemShares() { try { $shares = array_map( array($this, '_idEncode'), $this->getList()->getQuery()->listByType($this->_type) ); } catch (Horde_Kolab_Storage_Exception $e) { throw new Horde_Share_Exception($e); } $result = array(); foreach ($shares as $share) { $object = $this->_getShareById($share); //@todo: Remove "null" check as this is only required for BC if ($object->get('owner') === false || $object->get('owner') === null) { $result[$object->getName()] = $object; } } return $result; } /** * Lists *all* shares for the current app/share, regardless of * permissions. * * For the Kolab backend this cannot work in the same way as for the SQL * based backend. Permissions are always handled by the backend automatically (IMAP ACLs) and cannot be disabled. * * listAllShares() is apparently used during command line scipts where it * represents administrator access. This is possible on Kolab by using the * "manager" user. In that case a standard listShares() authenticated as * "manager" should be sufficient. * * @return array All shares for the current app/share. */ protected function _listAllShares() { try { $shares = array_map( array($this, '_idEncode'), $this->getList()->getQuery()->listByType($this->_type) ); } catch (Horde_Kolab_Storage_Exception $e) { throw new Horde_Share_Exception($e); } $result = array(); foreach ($shares as $share) { $object = $this->_getShareById($share); $result[$object->getName()] = $object; } return $result; } /** * Returns a new share object. * * @param string $name The share's name. * * @return Horde_Share_Object_kolab A new share object. */ protected function _newShare($name) { return $this->_createObject( null, array( 'type' => $this->_type, 'share_name' => $name ) ); } /** * Adds a share to the shares system. * * The share must first be created with Horde_Share::newShare(), * and have any initial details added to it, before this function is * called. * * @param Horde_Share_Object $share The new share object. */ protected function _addShare(Horde_Share_Object $share) { $share->save(); } /** * Removes a share from the shares system permanently. * * @param Horde_Share_Object $share The share to remove. */ protected function _removeShare(Horde_Share_Object $share) { try { $this->getList() ->getListManipulation() ->deleteFolder($this->_idDecode($share->getId())); } catch (Horde_Kolab_Storage_Exception $e) { throw new Horde_Share_Exception($e); } } /** * Renames a share in the shares system. * * @param Horde_Share_Object $share The share to rename. * @param string $name The share's new name. * * @throws Horde_Share_Exception */ protected function _renameShare(Horde_Share_Object $share, $name) { $share->set('share_name', $name); } /** * Retrieve the Kolab specific access rights for a share. * * @param string $id The share ID. * * @return An array of rights. */ public function getAcl($id) { try { return $this->getList() ->getQuery(Horde_Kolab_Storage_List_Tools::QUERY_ACL) ->getAcl($this->_idDecode($id)); } catch (Horde_Kolab_Storage_Exception $e) { throw new Horde_Share_Exception($e); } } /** * Set the Kolab specific access rights for a share. * * @param string $id The share ID. * @param string $user The user to set the ACL for. * @param string $acl The ACL. * * @return NULL */ public function setAcl($id, $user, $acl) { try { $this->getList() ->getQuery(Horde_Kolab_Storage_List_Tools::QUERY_ACL) ->setAcl($this->_idDecode($id), $user, $acl); } catch (Horde_Kolab_Storage_Exception $e) { throw new Horde_Share_Exception($e); } } /** * Delete Kolab specific access rights for a share. * * @param string $id The share ID. * @param string $user The user to delete the ACL for * * @return NULL */ public function deleteAcl($id, $user) { try { $this->getList() ->getQuery(Horde_Kolab_Storage_List_Tools::QUERY_ACL) ->deleteAcl($this->_idDecode($id), $user); } catch (Horde_Kolab_Storage_Exception $e) { throw new Horde_Share_Exception($e); } } /** * Save share data to the storage backend. * * @param string $id The share id. * @param string $old_id The old share id. * @param array $data The share data. * * @return NULL */ public function save($id, $old_id, $data) { try { if ($old_id === null) { $this->getList()->getListManipulation()->createFolder( $this->_idDecode($id), $this->_type ); } elseif ($id != $old_id) { $this->getList()->getListManipulation()->renameFolder( $this->_idDecode($old_id), $this->_idDecode($id), $this->_type ); } if (!empty($data['default'])) { $this->getList()->getQuery()->setDefault($this->_idDecode($id)); } $query = $this->getList() ->getQuery(Horde_Kolab_Storage_List_Tools::QUERY_SHARE); if (isset($data['desc']) && strlen($data['desc'])) { $query->setDescription($this->_idDecode($id), $data['desc']); } unset( $data['desc'], $data['owner'], $data['name'], $data['default'], $data['parent'], $data['type'], $data['delimiter'], $data['prefix'], $data['subpath'], $data['folder'], $data['namespace'] ); $query->setParameters($this->_idDecode($id), $data); } catch (Horde_Kolab_Storage_Exception $e) { throw new Horde_Share_Exception($e); } } } Horde_Share-2.0.8/lib/Horde/Share/Object.php0000664000175000017500000002365612654071446016625 0ustar janjan * @author Jan Schneider * @author Gunnar Wrobel * @package Share */ abstract class Horde_Share_Object implements Serializable { /** * A function to be called when a Horde_Share object is needed and not * available. * * @var callback */ protected $_shareCallback; /** * The Horde_Share object which this share is associated with. * If this is empty, the $_shareCallback is called to obtain it. * * @var Horde_Share */ protected $_shareOb; /** * Associates a Share object with this share, or provides a callback that * knows how to provide it. * * @param mixed Horde_Share | Callback $shareOb The Share object. */ public function setShareOb($shareOb) { if ($shareOb instanceof Horde_Share_Base) { $this->_shareOb = $shareOb; } else { $this->_shareCallback = $shareOb; } } /** * Obtain this object's share driver. * * @return Horde_Share The share driver. */ public function getShareOb() { if (empty($this->_shareOb)) { $this->_shareOb = call_user_func($this->_shareCallback); } if (empty($this->_shareOb)) { throw new Horde_Share_Exception('Unable to obtain a Horde_Share object'); } return $this->_shareOb; } /** * Sets an attribute value in this object. * * @param string $attribute The attribute to set. * @param mixed $value The value for $attribute. * @param boolean $update Immediately update only this change. * * @return boolean */ abstract public function set($attribute, $value, $update = false); /** * Returns an attribute value from this object. * * @param string $attribute The attribute to return. * * @return mixed The value for $attribute. */ abstract public function get($attribute); /** * Returns the ID of this share. * * @return string The share's ID. */ abstract public function getId(); /** * Returns the name of this share. * * @return string The share's name. */ abstract public function getName(); /** * Saves the current attribute values. * * @return boolean * @throws Horde_Exception */ public function save() { $this->getShareOb()->runCallback('modify', array($this)); $this->getShareOb()->expireListCache(); return $this->_save(); } /** * Saves the current attribute values. */ abstract protected function _save(); /** * Gives a user a certain privilege for this share. * * @param string $userid The userid of the user. * @param integer $permission A Horde_Perms::* constant. */ public function addUserPermission($userid, $permission) { $perm = $this->getPermission(); $perm->addUserPermission($userid, $permission, false); $this->setPermission($perm); } /** * Removes a certain privilege for a user from this share. * * @param string $userid The userid of the user. * @param integer $permission A Horde_Perms::* constant. */ public function removeUserPermission($userid, $permission) { $perm = $this->getPermission(); $perm->removeUserPermission($userid, $permission, false); $this->setPermission($perm); } /** * Gives a group certain privileges for this share. * * @param string $group The group to add permissions for. * @param integer $permission A Horde_Perms::* constant. */ public function addGroupPermission($group, $permission) { $perm = $this->getPermission(); $perm->addGroupPermission($group, $permission, false); $this->setPermission($perm); } /** * Removes a certain privilege from a group. * * @param string $group The group to remove permissions from. * @param constant $permission A Horde_Perms::* constant. */ public function removeGroupPermission($group, $permission) { $perm = $this->getPermission(); $perm->removeGroupPermission($group, $permission, false); $this->setPermission($perm); } /** * Removes a user from this share. * * @param string $userid The userid of the user to remove. */ public function removeUser($userid) { /* Remove all $userid's permissions. */ $perm = $this->getPermission(); $perm->removeUserPermission($userid, Horde_Perms::SHOW, false); $perm->removeUserPermission($userid, Horde_Perms::READ, false); $perm->removeUserPermission($userid, Horde_Perms::EDIT, false); $perm->removeUserPermission($userid, Horde_Perms::DELETE, false); return $this->setPermission($perm); } /** * Removes a group from this share. * * @param integer $groupId The group to remove. */ public function removeGroup($groupId) { /* Remove all $groupId's permissions. */ $perm = $this->getPermission(); $perm->removeGroupPermission($groupId, Horde_Perms::SHOW, false); $perm->removeGroupPermission($groupId, Horde_Perms::READ, false); $perm->removeGroupPermission($groupId, Horde_Perms::EDIT, false); $perm->removeGroupPermission($groupId, Horde_Perms::DELETE, false); return $this->setPermission($perm); } /** * Returns an array containing all the userids of the users with access to * this share. * * @param integer $perm_level List only users with this permission level. * Defaults to all users. * * @return array The users with access to this share. */ public function listUsers($perm_level = null) { $perm = $this->getPermission(); $results = array_keys($perm->getUserPermissions($perm_level)); // Always return the share's owner. $owner = $this->get('owner'); if ($owner && !in_array($owner, $results)) { $results[] = $owner; } return $results; } /** * Returns an array containing all the groupids of the groups with access * to this share. * * @param integer $perm_level List only users with this permission level. * Defaults to all users. * * @return array The IDs of the groups with access to this share. */ public function listGroups($perm_level = null) { $perm = $this->getPermission(); return array_keys($perm->getGroupPermissions($perm_level)); } /** * Gives guests a certain privilege for this share. * * @param integer $permission A Horde_Perms::* constant. */ public function addGuestPermission($permission) { $perm = $this->getPermission(); $perm->addGuestPermission($permission, false); $this->setPermission($perm); } /** * Removes a certain privilege for guests from this share. * * @param integer $permission A Horde_Perms::* constant. */ public function removeGuestPermission($permission) { $perm = $this->getPermission(); $perm->removeGuestPermission($permission, false); $this->setPermission($perm); } /** * Gives creators a certain privilege for this share. * * @param integer $permission A Horde_Perms::* constant. */ public function addCreatorPermission($permission) { $perm = $this->getPermission(); $perm->addCreatorPermission($permission, false); $this->setPermission($perm); } /** * Removes a certain privilege for creators from this share. * * @param integer $permission A Horde_Perms::* constant. */ public function removeCreatorPermission($permission) { $perm = $this->getPermission(); $perm->removeCreatorPermission($permission, false); $this->setPermission($perm); } /** * Gives all authenticated users a certain privilege for this share. * * @param integer $permission A Horde_Perms::* constant. */ public function addDefaultPermission($permission) { $perm = $this->getPermission(); $perm->addDefaultPermission($permission, false); $this->setPermission($perm); } /** * Removes a certain privilege for all authenticated users from this share. * * @param integer $permission A Horde_Perms::* constant. */ public function removeDefaultPermission($permission) { $perm = $this->getPermission(); $perm->removeDefaultPermission($permission, false); $this->setPermission($perm); } /** * Checks to see if a user has a given permission. * * @param string $userid The userid of the user. * @param integer $permission A Horde_Perms::* constant to test for. * @param string $creator The creator of the event. * * @return boolean Whether or not $userid has $permission. */ abstract public function hasPermission($userid, $permission, $creator = null); /** * Sets the permission of this share. * * @param Horde_Perms_Permission $perm Permission object. * @param boolean $update Should the share be saved * after this operation? */ abstract public function setPermission($perm, $update = true); /** * Returns the permission of this share. * * @return Horde_Perms_Permission Permission object that represents the * permissions on this share. */ abstract public function getPermission(); } Horde_Share-2.0.8/lib/Horde/Share/Sql.php0000664000175000017500000007632312654071446016155 0ustar janjan * @author Michael J. Rubinsky * @package Share */ /** * @package Share */ class Horde_Share_Sql extends Horde_Share_Base { /* Share has user perms */ const SQL_FLAG_USERS = 1; /* Share has group perms */ const SQL_FLAG_GROUPS = 2; /* Serializable version */ const VERSION = 1; /** * Handle for the current database connection. * * @var Horde_Db_Adapter */ protected $_db; /** * Main share table for the current scope. * * @var string */ protected $_table; /** * The Horde_Share_Object subclass to instantiate objects as * * @var string */ protected $_shareObject = 'Horde_Share_Object_Sql'; /** * * @see Horde_Share_Base::__construct() */ public function __construct($app, $user, Horde_Perms_Base $perms, Horde_Group_Base $groups) { parent::__construct($app, $user, $perms, $groups); $this->_table = $this->_app . '_shares'; } /** * Set the SQL table name to use for the current scope's share storage. * * @var string $table The table name */ public function setTable($table) { $this->_table = $table; } /** * Get storage table * * @return string */ public function getTable() { return $this->_table; } public function setStorage(Horde_Db_Adapter $db) { $this->_db = $db; } /** * * @return Horde_Db_Adapter */ public function getStorage() { return $this->_db; } /** * Finds out if the share has user set * * @param boolean */ protected function _hasUsers($share) { return $share['share_flags'] & self::SQL_FLAG_USERS; } /** * Finds out if the share has user set */ protected function _hasGroups($share) { return $share['share_flags'] & self::SQL_FLAG_GROUPS; } /** * Get users permissions * * @param array $share Share data array * * @throws Horde_Share_Exception */ protected function _getShareUsers(&$share) { if (!$this->_hasUsers($share)) { return; } try { $rows = $this->_db->selectAll('SELECT * FROM ' . $this->_table . '_users WHERE share_id = ?', array($share['share_id'])); } catch (Horde_Db_Exception $e) { throw new Horde_Share_Exception($e->getMessage()); } foreach ($rows as $row) { $share['perm']['users'][$row['user_uid']] = $this->_buildPermsFromRow($row); } } /** * Get groups permissions * * @param array $share Share data array * * @throws Horde_Share_Exception */ protected function _getShareGroups(&$share) { if (!$this->_hasGroups($share)) { return; } try { $rows = $this->_db->selectAll('SELECT * FROM ' . $this->_table . '_groups WHERE share_id = ?', array($share['share_id'])); } catch (Horde_Db_Exception $e) { throw new Horde_Share_Exception($e->getMessage()); } foreach ($rows as $row) { $share['perm']['groups'][$row['group_uid']] = $this->_buildPermsFromRow($row); } } /** * Returns a Horde_Share_Object_sql object corresponding to the given * share name, with the details retrieved appropriately. * * @param string $name The name of the share to retrieve. * * @return Horde_Share_Object The requested share. * @throws Horde_Exception_NotFound * @throws Horde_Share_Exception */ protected function _getShare($name) { try { $results = $this->_db->selectOne('SELECT * FROM ' . $this->_table . ' WHERE share_name = ?', array($name)); } catch (Horde_Db_Exception $e) { throw new Horde_Share_Exception($e->getMessage()); } if (!$results) { throw new Horde_Exception_NotFound(sprintf('Share name %s not found', $name)); } $data = $this->_fromDriverCharset($results); $this->_loadPermissions($data); return $this->_createObject($data); } protected function _createObject(array $data = array()) { $object = new $this->_shareObject($data); $this->initShareObject($object); return $object; } /** * Helper function to load the permissions data into the share data * * @param array $data Array of share attributes */ protected function _loadPermissions(&$data) { $this->_getShareUsers($data); $this->_getShareGroups($data); $this->_getSharePerms($data); } protected function _getSharePerms(&$data) { $data['perm']['type'] = 'matrix'; $data['perm']['default'] = isset($data['perm_default']) ? (int)$data['perm_default'] : 0; $data['perm']['guest'] = isset($data['perm_guest']) ? (int)$data['perm_guest'] : 0; $data['perm']['creator'] = isset($data['perm_creator']) ? (int)$data['perm_creator'] : 0; unset($data['perm_creator'], $data['perm_guest'], $data['perm_default']); } /** * Returns a Horde_Share_Object_sql object corresponding to the given * unique ID, with the details retrieved appropriately. * * @param integer $id The id of the share to retrieve. * * @return Horde_Share_Object_sql The requested share. * @throws Horde_Share_Exception, Horde_Exception_NotFound */ protected function _getShareById($id) { try { $results = $this->_db->selectOne('SELECT * FROM ' . $this->_table . ' WHERE share_id = ?', array($id)); } catch (Horde_Db_Exception $e) { throw new Horde_Share_Exception($e->getMessage()); } if (!$results) { throw new Horde_Exception_NotFound(sprintf('Share id %s not found', $id)); } $data = $this->_fromDriverCharset($results); $this->_loadPermissions($data); return $this->_createObject($data); } /** * Returns an array of Horde_Share_Object objects corresponding * to the given set of unique IDs, with the details retrieved * appropriately. * * @param array $ids The array of ids to retrieve. * @param string $key The column name that should for the list keys. * * @return array The requested shares. * @throws Horde_Share_Exception */ protected function _getShares(array $ids) { try { $rows = $this->_db->selectAll('SELECT * FROM ' . $this->_table . ' WHERE share_id IN (' . str_repeat('?, ', count($ids) - 1) . '?)', $ids); } catch (Horde_Db_Exception $e) { throw new Horde_Share_Exception($e->getMessage()); } $sharelist = array(); foreach ($rows as $share) { $this->_loadPermissions($share); $sharelist[$share['share_name']] = $this->_createObject($share); } return $sharelist; } /** * Lists *all* shares for the current app/share, regardless of permissions. * * This is for admin functionality and scripting tools, and shouldn't be * called from user-level code! * * @return array All shares for the current app/share. * @throws Horde_Share_Exception */ public function listAllShares() { return $this->_listAllShares(); } /** * Lists *all* shares for the current app/share, regardless of permissions. * * @return array All shares for the current app/share. * @throws Horde_Share_Exception */ protected function _listAllShares() { $shares = array(); try { $rows = $this->_db->selectAll('SELECT * FROM ' . $this->_table . ' ORDER BY share_name ASC'); } catch (Horde_Db_Exception $e) { throw new Horde_Share_Exception($e->getMessage()); } foreach ($rows as $share) { $shares[(int)$share['share_id']] = $this->_fromDriverCharset($share); } // Get users permissions try { $rows = $this->_db->selectAll('SELECT * FROM ' . $this->_table . '_users'); } catch (Horde_Db_Exception $e) { throw new Horde_Share_Exception($e); } foreach ($rows as $row) { $shares[$row['share_id']]['perm']['users'][$row['user_uid']] = $this->_buildPermsFromRow($row); } // Get groups permissions try { $rows = $this->_db->selectAll('SELECT * FROM ' . $this->_table . '_groups'); } catch (Horde_Db_Exception $e) { throw new Horde_Share_Exception($e->getMessage()); } foreach ($rows as $row) { $shares[$row['share_id']]['perm']['groups'][$row['group_uid']] = $this->_buildPermsFromRow($row); } $sharelist = array(); foreach ($shares as $data) { $this->_getSharePerms($data); if (!empty($data['share_name'])) { $sharelist[$data['share_name']] = $this->_createObject($data); } else { $sharelist[] = $this->_createObject($data); } } return $sharelist; } /** * Returns an array of all shares that $userid has access to. * * @param string $userid The userid of the user to check access for. An * empty value for the userid will only return shares * with guest access. * @param array $params Additional parameters for the search. *
     *  'perm'          Require this level of permissions. Horde_Perms constant.
     *  'attribtues'    Restrict shares to these attributes. A hash or username.
     *  'from'          Offset. Start at this share
     *  'count'         Limit.  Only return this many.
     *  'sort_by'       Sort by attribute.
     *  'direction'     Sort by direction.
     *  'parent'        Start at this share in the hierarchy. Either share_id or
     *                  Horde_Share_Object
     *  'all_levels'    List all levels or just the direct children of parent?
     *
* * @return array The shares the user has access to. * @throws Horde_Share_Exception */ public function listShares($userid, array $params = array()) { $params = array_merge(array('perm' => Horde_Perms::SHOW, 'attributes' => null, 'from' => 0, 'count' => 0, 'sort_by' => null, 'direction' => 0, 'parent' => null, 'all_levels' => true), $params); $key = md5(serialize(array($userid, $params))); if (isset($this->_listcache[$key])) { return $this->_listcache[$key]; } $shares = array(); if (is_null($params['sort_by'])) { $sortfield = 's.share_id'; } elseif ($params['sort_by'] == 'owner' || $params['sort_by'] == 'id') { $sortfield = 's.share_' . $params['sort_by']; } else { $sortfield = 's.attribute_' . $params['sort_by']; } $query = 'SELECT DISTINCT s.* ' . $this->getShareCriteria($userid, $params['perm'], $params['attributes'], $params['parent'], $params['all_levels']) . ' ORDER BY ' . $sortfield . (($params['direction'] == 0) ? ' ASC' : ' DESC'); $query = $this->_db->addLimitOffset($query, array('limit' => $params['count'], 'offset' => $params['from'])); try { $rows = $this->_db->selectAll($query); } catch (Horde_Db_Exception $e) { throw new Horde_Share_Exception($e->getMessage()); } $users = array(); $groups = array(); foreach ($rows as $share) { $shares[(int)$share['share_id']] = $this->_fromDriverCharset($share); if ($this->_hasUsers($share)) { $users[] = (int)$share['share_id']; } if ($this->_hasGroups($share)) { $groups[] = (int)$share['share_id']; } } // Get users permissions if (!empty($users)) { $query = 'SELECT share_id, user_uid, perm FROM ' . $this->_table . '_users WHERE share_id IN (' . str_repeat('?,', count($users) - 1) . '?)'; try { $rows = $this->_db->selectAll($query, $users); } catch (Horde_Db_Exception $e) { throw new Horde_Share_Exception($e->getMessage()); } foreach ($rows as $share) { $shares[$share['share_id']]['perm']['users'][$share['user_uid']] = (int)$share['perm']; } } // Get groups permissions if (!empty($groups)) { $query = 'SELECT share_id, group_uid, perm FROM ' . $this->_table . '_groups WHERE share_id IN (' . str_repeat('?,', count($groups) - 1) . '?)'; try { $rows = $this->_db->selectAll($query, $groups); } catch (Horde_Db_Exception $e) { throw new Horde_Share_Exception($e->getMessage()); } foreach ($rows as $share) { $shares[$share['share_id']]['perm']['groups'][$share['group_uid']] = (int)$share['perm']; } } $sharelist = array(); foreach ($shares as $id => $data) { $this->_getSharePerms($data); $sharelist[$data['share_name']] = $this->_createObject($data); } unset($shares); // Run the results through the callback, if configured. if (!empty($this->_callbacks['list'])) { $sharelist = $this->runCallback('list', array($userid, $sharelist, $params)); } $this->_listcache[$key] = $sharelist; return $sharelist; } /** * Return a list of users who have shares with the given permissions * for the current user. * * @param integer $perm The level of permissions required. * @param mixed $parent The parent share to start looking in. * (Horde_Share_Object, share_id, or null) * @param boolean $allLevels Return all levels, or just the direct * children of $parent? Defaults to all levels. * @param integer $from The user to start listing at. * @param integer $count The number of users to return. * * @return array List of users. * @throws Horde_Share_Exception */ public function listOwners($perm = Horde_Perms::SHOW, $parent = null, $allLevels = true, $from = 0, $count = 0) { $sql = 'SELECT DISTINCT(s.share_owner) ' . $this->getShareCriteria($this->_user, $perm, null, $parent, $allLevels); if ($count) { $sql = $this->_db->addLimitOffset($sql, array('limit' => $count, 'offset' => $from)); } try { $allowners = $this->_db->selectValues($sql); } catch (Horde_Db_Exception $e) { throw new Horde_Share_Exception($e); } $owners = array(); foreach ($allowners as $owner) { if ($this->countShares($this->_user, $perm, $owner, $parent, $allLevels)) { $owners[] = $owner; } } return $owners; } /** * Count the number of users who have shares with the given permissions * for the current user. * * @param integer $perm The level of permissions required. * @param mixed $parent The parent share to start looking in. * (Horde_Share_Object, share_id, or null). * @param boolean $allLevels Return all levels, or just the direct * children of $parent? * * @return integer Number of users. * @throws Horde_Share_Exception */ public function countOwners($perm = Horde_Perms::SHOW, $parent = null, $allLevels = true) { $sql = 'SELECT COUNT(DISTINCT(s.share_owner)) ' . $this->getShareCriteria($this->_user, $perm, null, $parent, $allLevels); try { $results = $this->_db->selectValue($sql); } catch (Horde_Db_Exception $e) { throw new Horde_Share_Exception($e); } return $results; } /** * Returns a share's direct parent object. * * @param Horde_Share_Object $child The share to get parent for. * * @return Horde_Share_Object The parent share, if it exists. */ public function getParent(Horde_Share_Object $child) { $parents = $child->get('parents'); // No parents, this is at the root. if (empty($parents)) { return null; } $parents = explode(':', $parents); return $this->getShareById(array_pop($parents)); } /** * Returns an array of all shares that $userid has access to. * * @param string $userid The userid of the user to check access for. * @param array $params See listShares(). * * @return array The shares the user has access to. */ protected function _listShares($userid, array $params = array()) { // We overwrite listShares(), this method is only implemented because // it's abstract in the base class. } /** * Returns an array of all system shares. * * @return array All system shares. * @throws Horde_Share_Exception */ public function listSystemShares() { $query = 'SELECT * FROM ' . $this->_table . ' WHERE share_owner IS NULL'; try { $rows = $this->_db->selectAll($query); } catch (Horde_Db_Exception $e) { throw new Horde_Share_Exception($e->getMessage()); } $sharelist = array(); foreach ($rows as $share) { $data = $this->_fromDriverCharset($share); $this->_getSharePerms($data); $sharelist[$data['share_name']] = $this->_createObject($data); } return $sharelist; } /** * Returns the count of all shares that $userid has access to. * * @param string $userid The userid of the user to check access for. * @param integer $perm The level of permissions required. * @param mixed $attributes Restrict the shares counted to those * matching $attributes. An array of * attribute/values pairs or a share owner * username. * @param mixed $parent The share to start searching from * (Horde_Share_Object, share_id, or null) * @param boolean $allLevels Return all levels, or just the direct * children of $parent? * * @return integer Number of shares the user has access to. * @throws Horde_Share_Exception */ public function countShares($userid, $perm = Horde_Perms::SHOW, $attributes = null, $parent = null, $allLevels = true) { $query = 'SELECT COUNT(DISTINCT s.share_id) ' . $this->getShareCriteria($userid, $perm, $attributes, $parent, $allLevels); try { $this->_db->selectValue($query); } catch (Horde_Db_Exception $e) { throw new Horde_Share_Exception($e); } return $this->_db->selectValue($query); } /** * Returns a new share object. * * @param string $name The share's name. * * @return Horde_Share_Object A new share object * @throws InvalidArgumentException */ protected function _newShare($name) { if (empty($name)) { throw new InvalidArgumentException('Share names must be non-empty'); } return $this->_createObject(array('share_name' => $name)); } /** * Adds a share to the shares system. * * The share must first be created with * Horde_Share_sql::_newShare(), and have any initial details added * to it, before this function is called. * * @param Horde_Share_Object $share The new share object. */ protected function _addShare(Horde_Share_Object $share) { $share->save(); } /** * Removes a share from the shares system permanently. * * @param Horde_Share_Object $share The share to remove. * * @throws Horde_Share_Exception */ public function removeShare(Horde_Share_Object $share) { // First Remove Children foreach ($share->getChildren(null, null, true) as $child) { $this->removeShare($child); } // Run the results through the callback, if configured. $this->runCallback('remove', array($share)); /* Remove share from the caches. */ $id = $share->getId(); unset($this->_shareMap[$id]); unset($this->_cache[$share->getName()]); /* Reset caches that depend on unknown criteria. */ $this->expireListCache(); $this->_removeShare($share); } /** * Removes a share from the shares system permanently. * * @param Horde_Share_Object $share The share to remove. * * @return boolean * @throws Horde_Share_Exception */ protected function _removeShare(Horde_Share_Object $share) { $params = array($share->getId()); $tables = array($this->_table, $this->_table . '_users', $this->_table . '_groups'); foreach ($tables as $table) { try { $this->_db->delete('DELETE FROM ' . $table . ' WHERE share_id = ?', $params); } catch (Horde_Db_Exception $e) { throw new Horde_Share_Exception($e->getMessage()); } } } /** * Renames a share in the shares system. * * @param Horde_Share_Object $share The share to rename. * @param string $name The share's new name. * * @throws Horde_Share_Exception */ protected function _renameShare(Horde_Share_Object $share, $name) { try { $this->_db->update( 'UPDATE ' . $this->_table . ' SET share_name = ? WHERE share_id = ?', array($name, $share->getId())); } catch (Horde_Db_Exception $e) { throw new Horde_Share_Exception($e); } } /** * Checks if a share exists in the system. * * @param string $share The share to check. * * @return boolean True if the share exists. * @throws Horde_Share_Exception */ protected function _exists($share) { try { return (boolean)$this->_db->selectOne('SELECT 1 FROM ' . $this->_table . ' WHERE share_name = ?', array($share)); } catch (Horde_Db_Exception $e) { throw new Horde_Share_Exception($e); } } /** * Check that a share id exists in the system. * * @param integer $id The share id * * @return boolean True if the share exists. */ protected function _idExists($id) { try { return (boolean)$this->_db->selectOne('SELECT 1 FROM ' . $this->_table . ' WHERE share_id = ?', array($id)); } catch (Horde_Db_Exception $e) { throw new Horde_Share_Exception($e); } } /** * Returns an array of criteria for querying shares. * * @TODO Make this method protected, like all the other drivers. * * @param string $userid The userid of the user to check access for. * @param integer $perm The level of permissions required. Set to null * to skip permission filtering. * @param mixed $attributes Restrict the shares returned to those who * have these attribute values. * @param mixed $parent The share to start searching in. * (A Horde_Share_Object, share_id or null) * @param boolean $allLevels Return all levels, or just the direct * children of $parent? Defaults to all levels. * * @return string The criteria string for fetching this user's shares. * @throws Horde_Share_Exception */ public function getShareCriteria($userid, $perm = Horde_Perms::SHOW, $attributes = null, $parent = null, $allLevels = true) { $query = $where = ''; if (!is_null($perm)) { list($query, $where) = $this->_getUserAndGroupCriteria($userid, $perm); } $query = ' FROM ' . $this->_table . ' s ' . $query; /* Convert to driver's keys */ $attributes = $this->_toDriverKeys($attributes); /* ...and to driver charset */ $attributes = $this->toDriverCharset($attributes); if (is_array($attributes)) { // Build attribute/key filter. if (!empty($where)) { $where = ' (' . $where . ') '; } foreach ($attributes as $key => $value) { if (is_array($value)) { $value = array_map(array($this->_db, 'quote'), $value); $where .= ' AND ' . $key . ' IN (' . implode(', ', $value) . ')'; } else { $where .= ' AND ' . $key . ' = ' . $this->_db->quote($value); } } } elseif (!empty($attributes)) { // Restrict to shares owned by the user specified $where = (!empty($where) ? ' (' . $where . ') AND ' : ' ') . 's.share_owner = ' . $this->_db->quote($attributes); } // See if we need to filter by parent or get the parent object if ($parent != null) { if (!($parent instanceof Horde_Share_Object)) { $parent = $this->getShareById($parent); } // Need to append the parent's share id to the list of parents in // order to search the share_parents field. $parents = $parent->get('parents') . ':' . $parent->getId(); if ($allLevels) { $where_parent = '(share_parents = ' . $this->_db->quote($parents) . ' OR share_parents LIKE ' . $this->_db->quote($parents . ':%') . ')'; } else { $where_parent = 's.share_parents = ' . $this->_db->quote($parents); } } elseif (!$allLevels) { // No parents, and we only want the root. $where_parent = "(s.share_parents = '' OR s.share_parents IS NULL)"; } if (!empty($where_parent)) { if (empty($where)) { $where = $where_parent; } else { $where = '(' . $where . ') AND ' . $where_parent; } } return $query . ' WHERE ' . $where; } /** * Returns criteria statement fragments for querying shares. * * @param string $userid The userid of the user to check access for. * @param integer $perm The level of permissions required. * * @return array An array with query and where string fragments. */ protected function _getUserAndGroupCriteria($userid, $perm = Horde_Perms::SHOW) { $query = $where = ''; if (empty($userid)) { $where = '(' . $this->_db->buildClause('s.perm_guest', '&', $perm) . ' > 0)'; } else { // (owner == $userid) $where .= 's.share_owner = ' . $this->_db->quote($userid); // (name == perm_creator and val & $perm) $where .= ' OR (' . $this->_db->buildClause('s.perm_creator', '&', $perm) . ' > 0)'; // (name == perm_creator and val & $perm) $where .= ' OR (' . $this->_db->buildClause('s.perm_default', '&', $perm) . ' > 0)'; // (name == perm_users and key == $userid and val & $perm) $query .= ' LEFT JOIN ' . $this->_table . '_users u ON u.share_id = s.share_id'; $where .= ' OR ( u.user_uid = ' . $this->_db->quote($userid) . ' AND (' . $this->_db->buildClause('u.perm', '&', $perm) . ' > 0))'; // If the user has any group memberships, check for those also. try { $groups = $this->_groups->listGroups($userid); if ($groups) { // (name == perm_groups and key in ($groups) and val & $perm) $ids = array_keys($groups); $group_ids = array(); foreach ($ids as $id) { $group_ids[] = $this->_db->quote((string)$id); } $query .= ' LEFT JOIN ' . $this->_table . '_groups g ON g.share_id = s.share_id'; $where .= ' OR (g.group_uid IN (' . implode(',', $group_ids) . ') AND (' . $this->_db->buildClause('g.perm', '&', $perm) . ' > 0))'; } } catch (Horde_Group_Exception $e) { $this->_logger->err($e); } } return array($query, $where); } /** * Builds a permission bit mask from the "perm" column. * * @param array $row A data row including permission columns. * * @return integer A permission mask. */ protected function _buildPermsFromRow($row) { return (int)$row['perm']; } /** * Utility function to convert from the SQL server's charset. */ protected function _fromDriverCharset($data) { foreach ($data as $key => &$value) { if (substr($key, 0, 9) == 'attribute') { $value = Horde_String::convertCharset( $value, $this->_db->getOption('charset'), 'UTF-8'); } } return $data; } /** * Utility function to convert TO the SQL server's charset. * * @see Horde_Share#toDriverCharset */ public function toDriverCharset($data) { if (!is_array($data)) { return $data; } foreach ($data as $key => &$value) { if (substr($key, 0, 9) == 'attribute') { $value = Horde_String::convertCharset( $value, 'UTF-8', $this->_db->getOption('charset')); } } return $data; } /** * Convert an array keyed on client keys to an array keyed on the driver * keys. * * @param array $data The client code keyed array. * * @return array The driver keyed array. */ protected function _toDriverKeys($data) { if (!is_array($data)) { return $data; } $driver_keys = array(); foreach ($data as $key => $value) { if ($key == 'owner') { $driver_keys['share_owner'] = $value; } else { $driver_keys['attribute_' . $key] = $value; } } return $driver_keys; } } Horde_Share-2.0.8/lib/Horde/Share/Sqlng.php0000664000175000017500000004322212654071446016472 0ustar janjan * @package Share */ /** * @package Share */ class Horde_Share_Sqlng extends Horde_Share_Sql { /* Serializable version */ const VERSION = 1; /** * The Horde_Share_Object subclass to instantiate objects as * * @var string */ protected $_shareObject = 'Horde_Share_Object_Sqlng'; /** * A list of available permission. * * This is necessary to unset certain permission when updating existing * share objects. * * @param array */ protected $_availablePermissions = array(); /** * * @see Horde_Share_Base::__construct() */ public function __construct($app, $user, Horde_Perms_Base $perms, Horde_Group_Base $groups) { parent::__construct($app, $user, $perms, $groups); $this->_table = $this->_app . '_sharesng'; } /** * Passes the available permissions to the share object. * * @param Horde_Share_Object $object */ public function initShareObject(Horde_Share_Object $object) { parent::initShareObject($object); $object->availablePermissions = array_keys($this->_availablePermissions); } /** * Returns an array of all shares that $userid has access to. * * @param string $userid The userid of the user to check access for. * @param array $params Additional parameters for the search. *
     *  'perm'          Require this level of permissions. Horde_Perms constant.
     *  'attributes'    Restrict shares to these attributes. A hash or username.
     *  'from'          Offset. Start at this share
     *  'count'         Limit.  Only return this many.
     *  'sort_by'       Sort by attribute.
     *  'direction'     Sort by direction.
     *  'parent'        Start at this share in the hierarchy. Either share_id or
     *                  Horde_Share_Object
     *  'all_levels'    List all levels or just the direct children of parent?
     *
* * @return array The shares the user has access to. * @throws Horde_Share_Exception */ public function listShares($userid, array $params = array()) { $params = array_merge(array('perm' => Horde_Perms::SHOW, 'attributes' => null, 'from' => 0, 'count' => 0, 'sort_by' => null, 'direction' => 0, 'parent' => null, 'all_levels' => true), $params); $key = md5(serialize(array($userid, $params))); if (isset($this->_listcache[$key])) { return $this->_listcache[$key]; } $perms = $this->convertBitmaskToArray($params['perm']); $shareids = null; if (!empty($userid)) { list($users, $groups, $shareids) = $this->_getUserAndGroupShares($userid, $perms); } if (is_null($params['sort_by'])) { $sortfield = 'share_id'; } elseif ($params['sort_by'] == 'owner' || $params['sort_by'] == 'id') { $sortfield = 'share_' . $params['sort_by']; } else { $sortfield = 'attribute_' . $params['sort_by']; } $where = $this->_getShareCriteria($userid, $perms, $params['attributes'], $shareids, $params['parent'], $params['all_levels']); $query = 'SELECT DISTINCT * FROM ' . $this->_table . ' s ' . (!empty($where) ? ' WHERE ' . $where : '') . ' ORDER BY ' . $sortfield . (($params['direction'] == 0) ? ' ASC' : ' DESC'); $query = $this->_db->addLimitOffset($query, array('limit' => $params['count'], 'offset' => $params['from'])); try { $rows = $this->_db->selectAll($query); } catch (Horde_Db_Exception $e) { throw new Horde_Share_Exception($e); } $sharelist = array(); foreach ($rows as $share) { $share = $this->_fromDriverCharset($share); $this->_loadPermissions($share); $sharelist[$share['share_name']] = $this->_createObject($share); } // Run the results through the callback, if configured. if (!empty($this->_callbacks['list'])) { $sharelist = $this->runCallback('list', array($userid, $sharelist, $params)); } $this->_listcache[$key] = $sharelist; return $this->_listcache[$key]; } /** * Returns an array of all system shares. * * @return array All system shares. * @throws Horde_Share_Exception */ public function listSystemShares() { $query = 'SELECT * FROM ' . $this->_table . ' WHERE share_owner IS NULL'; try { $rows = $this->_db->selectAll($query); } catch (Horde_Db_Exception $e) { throw new Horde_Share_Exception($e->getMessage()); } $sharelist = array(); foreach ($rows as $share) { $data = $this->_fromDriverCharset($share); $this->_loadPermissions($data); $sharelist[$data['share_name']] = $this->_createObject($data); } return $sharelist; } /** * Returns the count of all shares that $userid has access to. * * @param string $userid The userid of the user to check access for. * @param integer $perm The level of permissions required. * @param mixed $attributes Restrict the shares counted to those * matching $attributes. An array of * attribute/values pairs or a share owner * username. * @param mixed $parent The share to start searching from * (Horde_Share_Object, share_id, or null) * @param boolean $allLevels Return all levels, or just the direct * children of $parent? * * @return integer Number of shares the user has access to. * @throws Horde_Share_Exception */ public function countShares($userid, $perm = Horde_Perms::SHOW, $attributes = null, $parent = null, $allLevels = true) { $perms = $this->convertBitmaskToArray($perm); $shareids = null; if (!empty($userid)) { list(, , $shareids) = $this->_getUserAndGroupShares($userid, $perms); } $query = 'SELECT COUNT(DISTINCT share_id) FROM ' . $this->_table . ' s WHERE ' . $this->_getShareCriteria($userid, $perms, $attributes, $shareids, $parent, $allLevels); try { return $this->_db->selectValue($query); } catch (Horde_Db_Exception $e) { throw new Horde_Share_Exception($e); } } /** * Count the number of users who have shares with the given permissions * for the current user. * * @param integer $perm The level of permissions required. * @param mixed $parent The parent share to start looking in. * (Horde_Share_Object, share_id, or null). * @param boolean $allLevels Return all levels, or just the direct * children of $parent? * * @return integer Number of users. * @throws Horde_Share_Exception */ public function countOwners($perm = Horde_Perms::SHOW, $parent = null, $allLevels = true) { $perms = self::convertBitmaskToArray($perm); $sql = 'SELECT COUNT(DISTINCT(s.share_owner)) FROM ' . $this->_table . ' s WHERE ' . $this->_getShareCriteria($this->_user, $perms, null, $parent, $allLevels); try { $results = $this->_db->selectValue($sql); } catch (Horde_Db_Exception $e) { throw new Horde_Share_Exception($e); } return $results; } /** * Return a list of users who have shares with the given permissions * for the current user. * * @param integer $perm The level of permissions required. * @param mixed $parent The parent share to start looking in. * (Horde_Share_Object, share_id, or null) * @param boolean $allLevels Return all levels, or just the direct * children of $parent? Defaults to all levels. * @param integer $from The user to start listing at. * @param integer $count The number of users to return. * * @return array List of users. * @throws Horde_Share_Exception */ public function listOwners($perm = Horde_Perms::SHOW, $parent = null, $allLevels = true, $from = 0, $count = 0) { $perms = self::convertBitmaskToArray($perm); $sql = 'SELECT DISTINCT(s.share_owner) FROM ' . $this->_table . ' s WHERE ' . $this->_getShareCriteria($this->_user, $perms, null, $parent, $allLevels); if ($count) { $sql = $this->_db->addLimitOffset($sql, array('limit' => $count, 'offset' => $from)); } try { $allowners = $this->_db->selectValues($sql); } catch (Horde_Db_Exception $e) { throw new Horde_Share_Exception($e); } $owners = array(); foreach ($allowners as $owner) { if ($this->countShares($this->_user, $perm, $owner, $parent, $allLevels)) { $owners[] = $owner; } } return $owners; } /** * Converts a bit mask number to a bit mask array. * * @param integer A bit mask. * * @return array The bit mask as an array. */ public static function convertBitmaskToArray($perm) { $perms = array(); for ($bit = 1; $perm; $bit *= 2, $perm >>= 1) { if ($perm % 2) { $perms[] = $bit; } } return $perms; } /** * Builds a permission bit mask from all columns in a data row prefixed * with "perm_". * * @param array $row A data row including permission columns. * * @return integer A permission mask. */ protected function _buildPermsFromRow($row) { $perms = 0; foreach ($row as $column => $value) { if (substr($column, 0, 5) != 'perm_') { continue; } $perm = (int)substr($column, 5); $this->_availablePermissions[$perm] = true; if ($value) { $perms |= $perm; } } return $perms; } /** * Converts the permissions from the database table format into the * Horde_Share format. * * @param array $data The share object data to convert. */ protected function _getSharePerms(&$data) { $data['perm']['type'] = 'matrix'; $data['perm']['default'] = $data['perm']['guest'] = $data['perm']['creator'] = 0; foreach ($data as $column => $value) { $perm = explode('_', $column, 3); if ($perm[0] != 'perm' || count($perm) != 3) { continue; } $permvalue = (int)$perm[2]; $this->_availablePermissions[$permvalue] = true; if ($value) { $data['perm'][$perm[1]] |= $permvalue; } unset($data[$column]); } } /** * Returns the records and share IDs from the user and group tables that * match the search criteria. * * @param string $userid The userid of the user to check access for. * @param array $perms The level of permissions required. * * @return array A set of user, groups, and shareids. */ protected function _getUserAndGroupShares($userid, array $perms) { $shareids = array(); // Get users permissions. $query = 'SELECT * FROM ' . $this->_table . '_users WHERE user_uid = ' . $this->_db->quote($userid) . ' AND (' . $this->_getPermsCriteria('perm', $perms) . ')'; try { $users = $this->_db->selectAll($query); } catch (Horde_Db_Exception $e) { throw new Horde_Share_Exception($e->getMessage()); } foreach ($users as $user) { $shareids[] = $user['share_id']; } // Get groups permissions. $groups = array(); try { $groupNames = $this->_groups->listGroups($userid); if ($groupNames) { $group_ids = array(); foreach (array_keys($groupNames) as $id) { $group_ids[] = $this->_db->quote((string)$id); } $query = 'SELECT * FROM ' . $this->_table . '_groups WHERE group_uid IN (' . implode(',', $group_ids) . ') AND (' . $this->_getPermsCriteria('perm', $perms) . ')'; try { $groups = $this->_db->selectAll($query); } catch (Horde_Db_Exception $e) { throw new Horde_Share_Exception($e->getMessage()); } foreach ($groups as $group) { $shareids[] = $group['share_id']; } } } catch (Horde_Group_Exception $e) { $this->_logger->err($e); } return array($users, $groups, array_unique($shareids)); } /** * Returns a criteria statement for querying shares. * * @param string $userid The userid of the user to check access for. * @param array $perms The level of permissions required. * @param array $attributes Restrict the shares returned to those who * have these attribute values. * @param array $shareids Additional share IDs from user and group * permissions. * * @return string The criteria string for fetching this user's shares. */ protected function _getShareCriteria($userid, array $perms, $attributes, $shareids = null, $parent = null, $allLevels = true) { /* Convert to driver's keys */ $attributes = $this->_toDriverKeys($attributes); /* ...and to driver charset */ $attributes = $this->toDriverCharset($attributes); $where = ''; if (empty($userid)) { $where = $this->_getPermsCriteria('perm_guest', $perms); } else { // (owner == $userid) $where .= 'share_owner = ' . $this->_db->quote($userid); // (name == perm_creator and val & $perm) $where .= ' OR ' . $this->_getPermsCriteria('perm_creator', $perms); // (name == perm_default and val & $perm) $where .= ' OR ' . $this->_getPermsCriteria('perm_default', $perms); if ($shareids) { $where .= ' OR share_id IN (' . implode(',', $shareids) . ')'; } } if (is_array($attributes)) { // Build attribute/key filter. $where = '(' . $where . ') '; foreach ($attributes as $key => $value) { if (is_array($value)) { $value = array_map(array($this->_db, 'quote'), $value); $where .= ' AND ' . $key . ' IN (' . implode(', ', $value) . ')'; } else { $where .= ' AND ' . $key . ' = ' . $this->_db->quote($value); } } } elseif (!empty($attributes)) { // Restrict to shares owned by the user specified in the // $attributes string. $where = '(' . $where . ') AND share_owner = ' . $this->_db->quote($attributes); } // See if we need to filter by parent or get the parent object if ($parent != null) { if (!($parent instanceof Horde_Share_Object)) { $parent = $this->getShareById($parent); } // Need to append the parent's share id to the list of parents in // order to search the share_parents field. $parents = $parent->get('parents') . ':' . $parent->getId(); if ($allLevels) { $where_parent = '(share_parents = ' . $this->_db->quote($parents) . ' OR share_parents LIKE ' . $this->_db->quote($parents . ':%') . ')'; } else { $where_parent = 's.share_parents = ' . $this->_db->quote($parents); } } elseif (!$allLevels) { // No parents, and we only want the root. $where_parent = "(s.share_parents = '' OR s.share_parents IS NULL)"; } if (!empty($where_parent)) { if (empty($where)) { $where = $where_parent; } else { $where = '(' . $where . ') AND ' . $where_parent; } } return $where; } /** * Builds an ANDed criteria snippet for a set or permissions. * * @param string $base A column name prefix. * @param array $perms A list of permissions. * * @return string The generated criteria string. */ protected function _getPermsCriteria($base, array $perms) { $criteria = array(); foreach ($perms as $perm) { $criteria[] = $base . '_' . $perm . ' = ' . $this->_db->quoteTrue(); } return implode(' OR ', $criteria); } } Horde_Share-2.0.8/lib/Horde/Share/Translation.php0000664000175000017500000000136512654071446017706 0ustar janjan * @package Share */ class Horde_Share_Translation extends Horde_Translation_Autodetect { /** * The translation domain * * @var string */ protected static $_domain = 'Horde_Share'; /** * The absolute PEAR path to the translations for the default gettext handler. * * @var string */ protected static $_pearDirectory = '@data_dir@'; } Horde_Share-2.0.8/locale/ar/LC_MESSAGES/Horde_Share.mo0000664000175000017500000000076212654071446020174 0ustar janjan<\pqzB CalendarNotesTasksProject-Id-Version: Horde_Share Report-Msgid-Bugs-To: dev@lists.horde.org POT-Creation-Date: 2010-10-13 01:27+0200 PO-Revision-Date: 2010-10-13 01:27+0200 Last-Translator: Automatically generated Language-Team: i18n@lists.horde.org MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit أجندةملاحظاتالمهماتHorde_Share-2.0.8/locale/ar/LC_MESSAGES/Horde_Share.po0000664000175000017500000000323312654071446020173 0ustar janjan# Arabic translations for Horde_Share module. # Copyright 2010-2016 Horde LLC (http://www.horde.org/) # This file is distributed under the same license as the Horde_Share module. # Automatically generated, 2010. # msgid "" msgstr "" "Project-Id-Version: Horde_Share\n" "Report-Msgid-Bugs-To: dev@lists.horde.org\n" "POT-Creation-Date: 2010-10-13 01:27+0200\n" "PO-Revision-Date: 2010-10-13 01:27+0200\n" "Last-Translator: Automatically generated\n" "Language-Team: i18n@lists.horde.org\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: lib/Horde/Share/Object/Kolab.php:131 msgid "Calendar" msgstr "أجندة" #: lib/Horde/Share/Object/Kolab.php:127 msgid "Contacts" msgstr "" #: lib/Horde/Share/Object/Kolab.php:135 msgid "Filters" msgstr "" #: lib/Horde/Share/Object/Kolab.php:129 msgid "Notes" msgstr "ملاحظات" #: lib/Horde/Share/Object/Kolab.php:137 msgid "Preferences" msgstr "" #: lib/Horde/Share/Kolab.php:117 lib/Horde/Share/Sql.php:210 #, php-format msgid "Share \"%s\" does not exist." msgstr "" #: lib/Horde/Share/Sql.php:272 #, php-format msgid "Share ID %d does not exist." msgstr "" #: lib/Horde/Share/Sql/Hierarchical.php:547 msgid "Share names are not supported in this driver" msgstr "" #: lib/Horde/Share/Object/Kolab.php:133 msgid "Tasks" msgstr "المهمات" #: lib/Horde/Share/Kolab.php:81 #, php-format msgid "The Horde/Kolab integration engine does not support \"%s\"" msgstr "" #: lib/Horde/Share/Object/Kolab.php:373 msgid "The Kolab share object has not been initialized yet!" msgstr "" #: lib/Horde/Share/Object/Kolab.php:153 msgid "The share has already been initialized!" msgstr "" Horde_Share-2.0.8/locale/bg/LC_MESSAGES/Horde_Share.mo0000664000175000017500000000104312654071446020153 0ustar janjanDlB  CalendarFiltersNotesTasksProject-Id-Version: Horde_Share Report-Msgid-Bugs-To: dev@lists.horde.org POT-Creation-Date: 2010-10-13 01:27+0200 PO-Revision-Date: 2010-10-13 01:27+0200 Last-Translator: Automatically generated Language-Team: i18n@lists.horde.org MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit КалендарФилтърБележкиЗадачиHorde_Share-2.0.8/locale/bg/LC_MESSAGES/Horde_Share.po0000664000175000017500000000336212654071446020164 0ustar janjan# Bulgarian translations for Horde_Share module. # Copyright 2010-2016 Horde LLC (http://www.horde.org/) # This file is distributed under the same license as the Horde_Share module. # Automatically generated, 2010. # msgid "" msgstr "" "Project-Id-Version: Horde_Share\n" "Report-Msgid-Bugs-To: dev@lists.horde.org\n" "POT-Creation-Date: 2010-10-13 01:27+0200\n" "PO-Revision-Date: 2010-10-13 01:27+0200\n" "Last-Translator: Automatically generated\n" "Language-Team: i18n@lists.horde.org\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: lib/Horde/Share/Object/Kolab.php:131 msgid "Calendar" msgstr "Календар" #: lib/Horde/Share/Object/Kolab.php:127 msgid "Contacts" msgstr "" #: lib/Horde/Share/Object/Kolab.php:135 msgid "Filters" msgstr "Филтър" #: lib/Horde/Share/Object/Kolab.php:129 msgid "Notes" msgstr "Бележки" #: lib/Horde/Share/Object/Kolab.php:137 msgid "Preferences" msgstr "" #: lib/Horde/Share/Kolab.php:117 lib/Horde/Share/Sql.php:210 #, php-format msgid "Share \"%s\" does not exist." msgstr "" #: lib/Horde/Share/Sql.php:272 #, php-format msgid "Share ID %d does not exist." msgstr "" #: lib/Horde/Share/Sql/Hierarchical.php:547 msgid "Share names are not supported in this driver" msgstr "" #: lib/Horde/Share/Object/Kolab.php:133 msgid "Tasks" msgstr "Задачи" #: lib/Horde/Share/Kolab.php:81 #, php-format msgid "The Horde/Kolab integration engine does not support \"%s\"" msgstr "" #: lib/Horde/Share/Object/Kolab.php:373 msgid "The Kolab share object has not been initialized yet!" msgstr "" #: lib/Horde/Share/Object/Kolab.php:153 #, fuzzy msgid "The share has already been initialized!" msgstr "Тази форма вече беше обработена." Horde_Share-2.0.8/locale/bs/LC_MESSAGES/Horde_Share.mo0000664000175000017500000000070612654071446020174 0ustar janjan4L`ajBrCalendarFiltersProject-Id-Version: Horde_Share Report-Msgid-Bugs-To: dev@lists.horde.org POT-Creation-Date: 2010-10-13 01:27+0200 PO-Revision-Date: 2010-10-13 01:27+0200 Last-Translator: Automatically generated Language-Team: i18n@lists.horde.org MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit KalendarFilteriHorde_Share-2.0.8/locale/bs/LC_MESSAGES/Horde_Share.po0000664000175000017500000000325212654071446020176 0ustar janjan# Bosnian translations for Horde_Share module. # Copyright 2010-2016 Horde LLC (http://www.horde.org/) # This file is distributed under the same license as the Horde_Share module. # Automatically generated, 2010. # msgid "" msgstr "" "Project-Id-Version: Horde_Share\n" "Report-Msgid-Bugs-To: dev@lists.horde.org\n" "POT-Creation-Date: 2010-10-13 01:27+0200\n" "PO-Revision-Date: 2010-10-13 01:27+0200\n" "Last-Translator: Automatically generated\n" "Language-Team: i18n@lists.horde.org\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: lib/Horde/Share/Object/Kolab.php:131 msgid "Calendar" msgstr "Kalendar" #: lib/Horde/Share/Object/Kolab.php:127 msgid "Contacts" msgstr "" #: lib/Horde/Share/Object/Kolab.php:135 msgid "Filters" msgstr "Filteri" #: lib/Horde/Share/Object/Kolab.php:129 #, fuzzy msgid "Notes" msgstr "Nijedna" #: lib/Horde/Share/Object/Kolab.php:137 msgid "Preferences" msgstr "" #: lib/Horde/Share/Kolab.php:117 lib/Horde/Share/Sql.php:210 #, php-format msgid "Share \"%s\" does not exist." msgstr "" #: lib/Horde/Share/Sql.php:272 #, php-format msgid "Share ID %d does not exist." msgstr "" #: lib/Horde/Share/Sql/Hierarchical.php:547 msgid "Share names are not supported in this driver" msgstr "" #: lib/Horde/Share/Object/Kolab.php:133 #, fuzzy msgid "Tasks" msgstr "Login zadaci" #: lib/Horde/Share/Kolab.php:81 #, php-format msgid "The Horde/Kolab integration engine does not support \"%s\"" msgstr "" #: lib/Horde/Share/Object/Kolab.php:373 msgid "The Kolab share object has not been initialized yet!" msgstr "" #: lib/Horde/Share/Object/Kolab.php:153 msgid "The share has already been initialized!" msgstr "" Horde_Share-2.0.8/locale/ca/LC_MESSAGES/Horde_Share.mo0000664000175000017500000000130312654071446020145 0ustar janjanT 8B [ erz:CalendarContactsFiltersNotesTasksThe Horde/Kolab integration engine does not support "%s"Project-Id-Version: Horde_Share Report-Msgid-Bugs-To: dev@lists.horde.org POT-Creation-Date: 2010-10-13 01:27+0200 PO-Revision-Date: 2010-10-13 01:27+0200 Last-Translator: Automatically generated Language-Team: i18n@lists.horde.org MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Calendari%d contactesFiltresNotesTasquesEl motor d'integració Horde/Kolab no permet l'ús de "%s"Horde_Share-2.0.8/locale/ca/LC_MESSAGES/Horde_Share.po0000664000175000017500000000352112654071446020154 0ustar janjan# Catalan translations for Horde_Share module. # Copyright 2010-2016 Horde LLC (http://www.horde.org/) # This file is distributed under the same license as the Horde_Share module. # Automatically generated, 2010. # msgid "" msgstr "" "Project-Id-Version: Horde_Share\n" "Report-Msgid-Bugs-To: dev@lists.horde.org\n" "POT-Creation-Date: 2010-10-13 01:27+0200\n" "PO-Revision-Date: 2010-10-13 01:27+0200\n" "Last-Translator: Automatically generated\n" "Language-Team: i18n@lists.horde.org\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: lib/Horde/Share/Object/Kolab.php:131 msgid "Calendar" msgstr "Calendari" #: lib/Horde/Share/Object/Kolab.php:127 msgid "Contacts" msgstr "%d contactes" #: lib/Horde/Share/Object/Kolab.php:135 msgid "Filters" msgstr "Filtres" #: lib/Horde/Share/Object/Kolab.php:129 msgid "Notes" msgstr "Notes" #: lib/Horde/Share/Object/Kolab.php:137 msgid "Preferences" msgstr "" #: lib/Horde/Share/Kolab.php:117 lib/Horde/Share/Sql.php:210 #, fuzzy, php-format msgid "Share \"%s\" does not exist." msgstr "No existeix l'arxiu temporal \"%s\"." #: lib/Horde/Share/Sql.php:272 #, fuzzy, php-format msgid "Share ID %d does not exist." msgstr "La carpeta %s no existeix" #: lib/Horde/Share/Sql/Hierarchical.php:547 msgid "Share names are not supported in this driver" msgstr "" #: lib/Horde/Share/Object/Kolab.php:133 msgid "Tasks" msgstr "Tasques" #: lib/Horde/Share/Kolab.php:81 #, php-format msgid "The Horde/Kolab integration engine does not support \"%s\"" msgstr "El motor d'integració Horde/Kolab no permet l'ús de \"%s\"" #: lib/Horde/Share/Object/Kolab.php:373 msgid "The Kolab share object has not been initialized yet!" msgstr "" #: lib/Horde/Share/Object/Kolab.php:153 #, fuzzy msgid "The share has already been initialized!" msgstr "Ja s'ha processat aquest formulari." Horde_Share-2.0.8/locale/cs/LC_MESSAGES/Horde_Share.mo0000664000175000017500000000140412654071446020171 0ustar janjanT 8  6CalendarContactsFiltersNotesTasksThe Horde/Kolab integration engine does not support "%s"Project-Id-Version: Horde_Share Report-Msgid-Bugs-To: dev@lists.horde.org POT-Creation-Date: 2010-10-13 01:27+0200 PO-Revision-Date: 2010-10-13 01:27+0200 Last-Translator: Automatically generated Language-Team: i18n@lists.horde.org MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Plural-Forms: nplurals=3; plural=(n==1) ? 0 : (n>=2 && n<=4) ? 1 : 2; KalendářKontaktyFiltryPoznámkaÚkolyIntegrační algoritmy v Horde/Kolab nepodporují "%s"Horde_Share-2.0.8/locale/cs/LC_MESSAGES/Horde_Share.po0000664000175000017500000000362112654071446020177 0ustar janjan# Czech translations for Horde_Share module. # Copyright 2010-2016 Horde LLC (http://www.horde.org/) # This file is distributed under the same license as the Horde_Share module. # Automatically generated, 2010. # msgid "" msgstr "" "Project-Id-Version: Horde_Share\n" "Report-Msgid-Bugs-To: dev@lists.horde.org\n" "POT-Creation-Date: 2010-10-13 01:27+0200\n" "PO-Revision-Date: 2010-10-13 01:27+0200\n" "Last-Translator: Automatically generated\n" "Language-Team: i18n@lists.horde.org\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=3; plural=(n==1) ? 0 : (n>=2 && n<=4) ? 1 : 2;\n" #: lib/Horde/Share/Object/Kolab.php:131 msgid "Calendar" msgstr "Kalendář" #: lib/Horde/Share/Object/Kolab.php:127 msgid "Contacts" msgstr "Kontakty" #: lib/Horde/Share/Object/Kolab.php:135 msgid "Filters" msgstr "Filtry" #: lib/Horde/Share/Object/Kolab.php:129 msgid "Notes" msgstr "Poznámka" #: lib/Horde/Share/Object/Kolab.php:137 msgid "Preferences" msgstr "" #: lib/Horde/Share/Kolab.php:117 lib/Horde/Share/Sql.php:210 #, fuzzy, php-format msgid "Share \"%s\" does not exist." msgstr "Dočasný soubor \"%s\" neexistuje." #: lib/Horde/Share/Sql.php:272 #, fuzzy, php-format msgid "Share ID %d does not exist." msgstr "Složka %s neexistuje" #: lib/Horde/Share/Sql/Hierarchical.php:547 msgid "Share names are not supported in this driver" msgstr "" #: lib/Horde/Share/Object/Kolab.php:133 msgid "Tasks" msgstr "Úkoly" #: lib/Horde/Share/Kolab.php:81 #, php-format msgid "The Horde/Kolab integration engine does not support \"%s\"" msgstr "Integrační algoritmy v Horde/Kolab nepodporují \"%s\"" #: lib/Horde/Share/Object/Kolab.php:373 msgid "The Kolab share object has not been initialized yet!" msgstr "" #: lib/Horde/Share/Object/Kolab.php:153 #, fuzzy msgid "The share has already been initialized!" msgstr "Tento formulář již byl zpracován." Horde_Share-2.0.8/locale/da/LC_MESSAGES/Horde_Share.mo0000664000175000017500000000110612654071446020147 0ustar janjan,<P8Q3The Horde/Kolab integration engine does not support "%s"Project-Id-Version: Horde_Share Report-Msgid-Bugs-To: dev@lists.horde.org POT-Creation-Date: 2012-01-17 12:38+0100 PO-Revision-Date: 2014-03-20 21:54+0100 Last-Translator: Erling Preben Hansen Language-Team: i18n@lists.horde.org Language: da MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Plural-Forms: nplurals=2; plural=(n != 1); Horde / Kolab integrationen understøtter ikke "%s"Horde_Share-2.0.8/locale/da/LC_MESSAGES/Horde_Share.po0000664000175000017500000000153312654071446020156 0ustar janjan# Danish translations for Horde_Share package. # Copyright (C) 2014 Horde LLC (http://www.horde.org/) # This file is distributed under the same license as the Horde_Share package. # Erling Preben Hansen , 2014. # msgid "" msgstr "" "Project-Id-Version: Horde_Share\n" "Report-Msgid-Bugs-To: dev@lists.horde.org\n" "POT-Creation-Date: 2012-01-17 12:38+0100\n" "PO-Revision-Date: 2014-03-20 21:54+0100\n" "Last-Translator: Erling Preben Hansen \n" "Language-Team: i18n@lists.horde.org\n" "Language: da\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" #: lib/Horde/Share/Kolab.php:83 #, php-format msgid "The Horde/Kolab integration engine does not support \"%s\"" msgstr "Horde / Kolab integrationen understøtter ikke \"%s\"" Horde_Share-2.0.8/locale/de/LC_MESSAGES/Horde_Share.mo0000664000175000017500000000110312654071446020150 0ustar janjan,<P8Qx?The Horde/Kolab integration engine does not support "%s"Project-Id-Version: Horde_Share Report-Msgid-Bugs-To: dev@lists.horde.org POT-Creation-Date: 2011-08-02 15:24+0200 PO-Revision-Date: 2010-10-13 01:27+0200 Last-Translator: Automatically generated Language-Team: i18n@lists.horde.org Language: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Plural-Forms: nplurals=2; plural=(n != 1); Die Horde/Kolab Integrationsfunktionen unterstützen "%s" nichtHorde_Share-2.0.8/locale/de/LC_MESSAGES/Horde_Share.po0000664000175000017500000000151212654071446020157 0ustar janjan# German translations for Horde_Share module. # Copyright 2010-2016 Horde LLC (http://www.horde.org/) # This file is distributed under the same license as the Horde_Share module. # Automatically generated, 2010. # msgid "" msgstr "" "Project-Id-Version: Horde_Share\n" "Report-Msgid-Bugs-To: dev@lists.horde.org\n" "POT-Creation-Date: 2011-08-02 15:24+0200\n" "PO-Revision-Date: 2010-10-13 01:27+0200\n" "Last-Translator: Automatically generated\n" "Language-Team: i18n@lists.horde.org\n" "Language: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" #: lib/Horde/Share/Kolab.php:83 #, php-format msgid "The Horde/Kolab integration engine does not support \"%s\"" msgstr "Die Horde/Kolab Integrationsfunktionen unterstützen \"%s\" nicht" Horde_Share-2.0.8/locale/el/LC_MESSAGES/Horde_Share.mo0000664000175000017500000000137012654071446020166 0ustar janjanL |8mm BCalendarFiltersNotesTasksThe Horde/Kolab integration engine does not support "%s"Project-Id-Version: Horde_Share Report-Msgid-Bugs-To: dev@lists.horde.org POT-Creation-Date: 2010-10-13 01:27+0200 PO-Revision-Date: 2010-10-13 01:27+0200 Last-Translator: Automatically generated Language-Team: i18n@lists.horde.org MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Plural-Forms: nplurals=2; plural=(n != 1); ΗμερολόγιοΦίλτραΣημειώσειςΕργασίεςΤο σύστημα Horde/Kolab δεν υποστηρίζει "%s"Horde_Share-2.0.8/locale/el/LC_MESSAGES/Horde_Share.po0000664000175000017500000000402612654071446020172 0ustar janjan# Greek translations for Horde_Share module. # Copyright 2010-2016 Horde LLC (http://www.horde.org/) # This file is distributed under the same license as the Horde_Share module. # Automatically generated, 2010. # msgid "" msgstr "" "Project-Id-Version: Horde_Share\n" "Report-Msgid-Bugs-To: dev@lists.horde.org\n" "POT-Creation-Date: 2010-10-13 01:27+0200\n" "PO-Revision-Date: 2010-10-13 01:27+0200\n" "Last-Translator: Automatically generated\n" "Language-Team: i18n@lists.horde.org\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" #: lib/Horde/Share/Object/Kolab.php:131 msgid "Calendar" msgstr "Ημερολόγιο" #: lib/Horde/Share/Object/Kolab.php:127 #, fuzzy msgid "Contacts" msgstr "Αναζήτηση Επαφής" #: lib/Horde/Share/Object/Kolab.php:135 msgid "Filters" msgstr "Φίλτρα" #: lib/Horde/Share/Object/Kolab.php:129 msgid "Notes" msgstr "Σημειώσεις" #: lib/Horde/Share/Object/Kolab.php:137 msgid "Preferences" msgstr "" #: lib/Horde/Share/Kolab.php:117 lib/Horde/Share/Sql.php:210 #, fuzzy, php-format msgid "Share \"%s\" does not exist." msgstr "Το προσωρινό αρχείο \"%s\" δεν υπάρχει." #: lib/Horde/Share/Sql.php:272 #, fuzzy, php-format msgid "Share ID %d does not exist." msgstr "Ο φάκελος %s δεν υπάρχει" #: lib/Horde/Share/Sql/Hierarchical.php:547 msgid "Share names are not supported in this driver" msgstr "" #: lib/Horde/Share/Object/Kolab.php:133 msgid "Tasks" msgstr "Εργασίες" #: lib/Horde/Share/Kolab.php:81 #, php-format msgid "The Horde/Kolab integration engine does not support \"%s\"" msgstr "Το σύστημα Horde/Kolab δεν υποστηρίζει \"%s\"" #: lib/Horde/Share/Object/Kolab.php:373 msgid "The Kolab share object has not been initialized yet!" msgstr "" #: lib/Horde/Share/Object/Kolab.php:153 #, fuzzy msgid "The share has already been initialized!" msgstr "Αυτή η φόρμα έχει ήδη επεξεργασθεί." Horde_Share-2.0.8/locale/es/LC_MESSAGES/Horde_Share.mo0000664000175000017500000000115212654071446020173 0ustar janjan,<P8Q54The Horde/Kolab integration engine does not support "%s"Project-Id-Version: Horde_Share Report-Msgid-Bugs-To: dev@lists.horde.org POT-Creation-Date: 2012-01-17 12:38+0100 PO-Revision-Date: 2013-06-11 20:26+0200 Last-Translator: Manuel P. Ayala , Juan C. Blanco Language-Team: i18n@lists.horde.org Language: es MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Plural-Forms: nplurals=2; plural=(n != 1); El soporte de integración Horde/Kolab no admite "%s"Horde_Share-2.0.8/locale/es/LC_MESSAGES/Horde_Share.po0000664000175000017500000000156612654071446020207 0ustar janjan# Spanish translations for Horde_Share package. # Copyright (C) 2013 Horde LLC (http://www.horde.org/) # This file is distributed under the same license as the Horde_Share package. # Automatically generated, 2013. # msgid "" msgstr "" "Project-Id-Version: Horde_Share \n" "Report-Msgid-Bugs-To: dev@lists.horde.org\n" "POT-Creation-Date: 2012-01-17 12:38+0100\n" "PO-Revision-Date: 2013-06-11 20:26+0200\n" "Last-Translator: Manuel P. Ayala , Juan C. Blanco " "\n" "Language-Team: i18n@lists.horde.org\n" "Language: es\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" #: lib/Horde/Share/Kolab.php:83 #, php-format msgid "The Horde/Kolab integration engine does not support \"%s\"" msgstr "El soporte de integración Horde/Kolab no admite \"%s\"" Horde_Share-2.0.8/locale/et/LC_MESSAGES/Horde_Share.mo0000664000175000017500000000145012654071446020175 0ustar janjan\ 8 mC 0CalendarContactsFiltersNotesShare "%s" does not exist.TasksThe Horde/Kolab integration engine does not support "%s"Project-Id-Version: Horde_Share Report-Msgid-Bugs-To: dev@lists.horde.org POT-Creation-Date: 2010-10-13 01:27+0200 PO-Revision-Date: 2010-10-13 01:27+0200 Last-Translator: Automatically generated Language-Team: i18n@lists.horde.org MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Plural-Forms: nplurals=2; plural=(n != 1); KalenderKontaktidFiltridMärkmedJagatud "%s" ei eksisteeriTöödHorde/Kolab integratsioonimootor ei toeta "%s"-iHorde_Share-2.0.8/locale/et/LC_MESSAGES/Horde_Share.po0000664000175000017500000000356512654071446020211 0ustar janjan# Estonian translations for Horde_Share module. # Copyright 2010-2016 Horde LLC (http://www.horde.org/) # This file is distributed under the same license as the Horde_Share module. # Automatically generated, 2010. # msgid "" msgstr "" "Project-Id-Version: Horde_Share\n" "Report-Msgid-Bugs-To: dev@lists.horde.org\n" "POT-Creation-Date: 2010-10-13 01:27+0200\n" "PO-Revision-Date: 2010-10-13 01:27+0200\n" "Last-Translator: Automatically generated\n" "Language-Team: i18n@lists.horde.org\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" #: lib/Horde/Share/Object/Kolab.php:131 msgid "Calendar" msgstr "Kalender" #: lib/Horde/Share/Object/Kolab.php:127 msgid "Contacts" msgstr "Kontaktid" #: lib/Horde/Share/Object/Kolab.php:135 msgid "Filters" msgstr "Filtrid" #: lib/Horde/Share/Object/Kolab.php:129 msgid "Notes" msgstr "Märkmed" #: lib/Horde/Share/Object/Kolab.php:137 msgid "Preferences" msgstr "" #: lib/Horde/Share/Kolab.php:117 lib/Horde/Share/Sql.php:210 #, php-format msgid "Share \"%s\" does not exist." msgstr "Jagatud \"%s\" ei eksisteeri" #: lib/Horde/Share/Sql.php:272 #, fuzzy, php-format msgid "Share ID %d does not exist." msgstr "Jagatud \"%s\" ei eksisteeri" #: lib/Horde/Share/Sql/Hierarchical.php:547 msgid "Share names are not supported in this driver" msgstr "" #: lib/Horde/Share/Object/Kolab.php:133 msgid "Tasks" msgstr "Tööd" # php-format #: lib/Horde/Share/Kolab.php:81 #, php-format msgid "The Horde/Kolab integration engine does not support \"%s\"" msgstr "Horde/Kolab integratsioonimootor ei toeta \"%s\"-i" #: lib/Horde/Share/Object/Kolab.php:373 msgid "The Kolab share object has not been initialized yet!" msgstr "" #: lib/Horde/Share/Object/Kolab.php:153 #, fuzzy msgid "The share has already been initialized!" msgstr "See vorm on juba läbi töötatud." Horde_Share-2.0.8/locale/eu/LC_MESSAGES/Horde_Share.mo0000664000175000017500000000117512654071446020202 0ustar janjan,<P8Q8DThe Horde/Kolab integration engine does not support "%s"Project-Id-Version: Horde_Share Report-Msgid-Bugs-To: dev@lists.horde.org POT-Creation-Date: 2012-01-17 12:38+0100 PO-Revision-Date: 2013-01-17 14:47+0100 Last-Translator: Ibon Igartua Language-Team: Euskal Herriko Unibertsitatea Language: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Plural-Forms: nplurals=2; plural=(n != 1); X-Poedit-Language: Basque Horde/Kolab integratzaileak ez du ondokoa onartzen: "%s"Horde_Share-2.0.8/locale/eu/LC_MESSAGES/Horde_Share.po0000664000175000017500000000161012654071446020177 0ustar janjan# Basque translations for Horde_Share module. # Copyright 2010-2016 Horde LLC (http://www.horde.org/) # This file is distributed under the same license as the Horde_Share module. # Automatically generated, 2010. # msgid "" msgstr "" "Project-Id-Version: Horde_Share\n" "Report-Msgid-Bugs-To: dev@lists.horde.org\n" "POT-Creation-Date: 2012-01-17 12:38+0100\n" "PO-Revision-Date: 2013-01-17 14:47+0100\n" "Last-Translator: Ibon Igartua \n" "Language-Team: Euskal Herriko Unibertsitatea \n" "Language: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" "X-Poedit-Language: Basque\n" #: lib/Horde/Share/Kolab.php:83 #, php-format msgid "The Horde/Kolab integration engine does not support \"%s\"" msgstr "Horde/Kolab integratzaileak ez du ondokoa onartzen: \"%s\"" Horde_Share-2.0.8/locale/fa/LC_MESSAGES/Horde_Share.mo0000664000175000017500000000112712654071446020154 0ustar janjanL |B  *9 LCalendarContactsFiltersNotesTasksProject-Id-Version: Horde_Share Report-Msgid-Bugs-To: dev@lists.horde.org POT-Creation-Date: 2010-10-13 01:27+0200 PO-Revision-Date: 2010-10-13 01:27+0200 Last-Translator: Automatically generated Language-Team: i18n@lists.horde.org MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit تقویمنماسهافیلترهایادداشتهاوظایفHorde_Share-2.0.8/locale/fa/LC_MESSAGES/Horde_Share.po0000664000175000017500000000342612654071446020163 0ustar janjan# Persian translations for Horde_Share module. # Copyright 2010-2016 Horde LLC (http://www.horde.org/) # This file is distributed under the same license as the Horde_Share module. # Automatically generated, 2010. # msgid "" msgstr "" "Project-Id-Version: Horde_Share\n" "Report-Msgid-Bugs-To: dev@lists.horde.org\n" "POT-Creation-Date: 2010-10-13 01:27+0200\n" "PO-Revision-Date: 2010-10-13 01:27+0200\n" "Last-Translator: Automatically generated\n" "Language-Team: i18n@lists.horde.org\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: lib/Horde/Share/Object/Kolab.php:131 msgid "Calendar" msgstr "تقویم" #: lib/Horde/Share/Object/Kolab.php:127 msgid "Contacts" msgstr "نماسها" #: lib/Horde/Share/Object/Kolab.php:135 msgid "Filters" msgstr "فیلترها" #: lib/Horde/Share/Object/Kolab.php:129 msgid "Notes" msgstr "یادداشتها" #: lib/Horde/Share/Object/Kolab.php:137 msgid "Preferences" msgstr "" #: lib/Horde/Share/Kolab.php:117 lib/Horde/Share/Sql.php:210 #, fuzzy, php-format msgid "Share \"%s\" does not exist." msgstr "پرونده موقتی \"%s\"موجود نیست" #: lib/Horde/Share/Sql.php:272 #, fuzzy, php-format msgid "Share ID %d does not exist." msgstr "پوشه %s موجود نیست " #: lib/Horde/Share/Sql/Hierarchical.php:547 msgid "Share names are not supported in this driver" msgstr "" #: lib/Horde/Share/Object/Kolab.php:133 msgid "Tasks" msgstr "وظایف" #: lib/Horde/Share/Kolab.php:81 #, php-format msgid "The Horde/Kolab integration engine does not support \"%s\"" msgstr "" #: lib/Horde/Share/Object/Kolab.php:373 msgid "The Kolab share object has not been initialized yet!" msgstr "" #: lib/Horde/Share/Object/Kolab.php:153 msgid "The share has already been initialized!" msgstr "" Horde_Share-2.0.8/locale/fi/LC_MESSAGES/Horde_Share.mo0000664000175000017500000000110112654071446020154 0ustar janjan,<P8Q+The Horde/Kolab integration engine does not support "%s"Project-Id-Version: Horde_Share Report-Msgid-Bugs-To: dev@lists.horde.org POT-Creation-Date: 2012-01-17 12:38+0100 PO-Revision-Date: 2012-03-07 15:10:51+0200 Last-Translator: Leena Heino Language-Team: Finnish Language: fi MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Plural-Forms: nplurals=2; plural=(n != 1); Horde/Kolab integrointimoottori ei tue "%s"Horde_Share-2.0.8/locale/fi/LC_MESSAGES/Horde_Share.po0000664000175000017500000000152112654071446020165 0ustar janjan# Finnish translations for Horde_Share module. # Copyright 2010-2016 Horde LLC (http://www.horde.org/) # This file is distributed under the same license as the Horde_Share module. # Leena Heino , 2010-2012. # msgid "" msgstr "" "Project-Id-Version: Horde_Share\n" "Report-Msgid-Bugs-To: dev@lists.horde.org\n" "POT-Creation-Date: 2012-01-17 12:38+0100\n" "PO-Revision-Date: 2012-03-07 15:10:51+0200\n" "Last-Translator: Leena Heino \n" "Language-Team: Finnish \n" "Language: fi\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" #: lib/Horde/Share/Kolab.php:83 #, php-format msgid "The Horde/Kolab integration engine does not support \"%s\"" msgstr "Horde/Kolab integrointimoottori ei tue \"%s\"" Horde_Share-2.0.8/locale/fr/LC_MESSAGES/Horde_Share.mo0000664000175000017500000000147212654071446020200 0ustar janjan\ 8 lC#?CalendarContactsFiltersNotesShare "%s" does not exist.TasksThe Horde/Kolab integration engine does not support "%s"Project-Id-Version: Horde_Share Report-Msgid-Bugs-To: dev@lists.horde.org POT-Creation-Date: 2010-10-13 01:27+0200 PO-Revision-Date: 2010-10-13 01:27+0200 Last-Translator: Automatically generated Language-Team: i18n@lists.horde.org MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Plural-Forms: nplurals=2; plural=(n > 1); AgendaContactsFiltresNotesLe partage « %s » n'existe pas.TâchesLe moteur d'intégration Horde/Kolab ne supporte pas « %s »Horde_Share-2.0.8/locale/fr/LC_MESSAGES/Horde_Share.po0000664000175000017500000000357612654071446020212 0ustar janjan# French translations for Horde_Share module. # Copyright 2010-2016 Horde LLC (http://www.horde.org/) # This file is distributed under the same license as the Horde_Share module. # Automatically generated, 2010. # msgid "" msgstr "" "Project-Id-Version: Horde_Share\n" "Report-Msgid-Bugs-To: dev@lists.horde.org\n" "POT-Creation-Date: 2010-10-13 01:27+0200\n" "PO-Revision-Date: 2010-10-13 01:27+0200\n" "Last-Translator: Automatically generated\n" "Language-Team: i18n@lists.horde.org\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n > 1);\n" #: lib/Horde/Share/Object/Kolab.php:131 msgid "Calendar" msgstr "Agenda" #: lib/Horde/Share/Object/Kolab.php:127 msgid "Contacts" msgstr "Contacts" #: lib/Horde/Share/Object/Kolab.php:135 msgid "Filters" msgstr "Filtres" #: lib/Horde/Share/Object/Kolab.php:129 msgid "Notes" msgstr "Notes" #: lib/Horde/Share/Object/Kolab.php:137 msgid "Preferences" msgstr "" #: lib/Horde/Share/Kolab.php:117 lib/Horde/Share/Sql.php:210 #, php-format msgid "Share \"%s\" does not exist." msgstr "Le partage « %s » n'existe pas." #: lib/Horde/Share/Sql.php:272 #, fuzzy, php-format msgid "Share ID %d does not exist." msgstr "Le partage « %s » n'existe pas." #: lib/Horde/Share/Sql/Hierarchical.php:547 msgid "Share names are not supported in this driver" msgstr "" #: lib/Horde/Share/Object/Kolab.php:133 msgid "Tasks" msgstr "Tâches" #: lib/Horde/Share/Kolab.php:81 #, php-format msgid "The Horde/Kolab integration engine does not support \"%s\"" msgstr "Le moteur d'intégration Horde/Kolab ne supporte pas « %s »" #: lib/Horde/Share/Object/Kolab.php:373 msgid "The Kolab share object has not been initialized yet!" msgstr "" #: lib/Horde/Share/Object/Kolab.php:153 #, fuzzy msgid "The share has already been initialized!" msgstr "Ce formulaire a déjà été traité." Horde_Share-2.0.8/locale/gl/LC_MESSAGES/Horde_Share.mo0000664000175000017500000000074212654071446020172 0ustar janjan<\pqzB CalendarNotesTasksProject-Id-Version: Horde_Share Report-Msgid-Bugs-To: dev@lists.horde.org POT-Creation-Date: 2010-10-13 01:27+0200 PO-Revision-Date: 2010-10-13 01:27+0200 Last-Translator: Automatically generated Language-Team: i18n@lists.horde.org MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit CalendarioNotasTarefasHorde_Share-2.0.8/locale/gl/LC_MESSAGES/Horde_Share.po0000664000175000017500000000321512654071446020173 0ustar janjan# Galician translations for Horde_Share module. # Copyright 2010-2016 Horde LLC (http://www.horde.org/) # This file is distributed under the same license as the Horde_Share module. # Automatically generated, 2010. # msgid "" msgstr "" "Project-Id-Version: Horde_Share\n" "Report-Msgid-Bugs-To: dev@lists.horde.org\n" "POT-Creation-Date: 2010-10-13 01:27+0200\n" "PO-Revision-Date: 2010-10-13 01:27+0200\n" "Last-Translator: Automatically generated\n" "Language-Team: i18n@lists.horde.org\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: lib/Horde/Share/Object/Kolab.php:131 msgid "Calendar" msgstr "Calendario" #: lib/Horde/Share/Object/Kolab.php:127 msgid "Contacts" msgstr "" #: lib/Horde/Share/Object/Kolab.php:135 msgid "Filters" msgstr "" #: lib/Horde/Share/Object/Kolab.php:129 msgid "Notes" msgstr "Notas" #: lib/Horde/Share/Object/Kolab.php:137 msgid "Preferences" msgstr "" #: lib/Horde/Share/Kolab.php:117 lib/Horde/Share/Sql.php:210 #, php-format msgid "Share \"%s\" does not exist." msgstr "" #: lib/Horde/Share/Sql.php:272 #, php-format msgid "Share ID %d does not exist." msgstr "" #: lib/Horde/Share/Sql/Hierarchical.php:547 msgid "Share names are not supported in this driver" msgstr "" #: lib/Horde/Share/Object/Kolab.php:133 msgid "Tasks" msgstr "Tarefas" #: lib/Horde/Share/Kolab.php:81 #, php-format msgid "The Horde/Kolab integration engine does not support \"%s\"" msgstr "" #: lib/Horde/Share/Object/Kolab.php:373 msgid "The Kolab share object has not been initialized yet!" msgstr "" #: lib/Horde/Share/Object/Kolab.php:153 msgid "The share has already been initialized!" msgstr "" Horde_Share-2.0.8/locale/he/LC_MESSAGES/Horde_Share.mo0000664000175000017500000000064712654071446020170 0ustar janjan$,8m9Project-Id-Version: Horde_Share Report-Msgid-Bugs-To: dev@lists.horde.org POT-Creation-Date: 2010-10-13 01:27+0200 PO-Revision-Date: 2010-10-13 01:27+0200 Last-Translator: Automatically generated Language-Team: i18n@lists.horde.org MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Plural-Forms: nplurals=2; plural=(n != 1); Horde_Share-2.0.8/locale/he/LC_MESSAGES/Horde_Share.po0000664000175000017500000000324412654071446020167 0ustar janjan# Hebrew translations for Horde_Share module. # Copyright 2010-2016 Horde LLC (http://www.horde.org/) # This file is distributed under the same license as the Horde_Share module. # Automatically generated, 2010. # msgid "" msgstr "" "Project-Id-Version: Horde_Share\n" "Report-Msgid-Bugs-To: dev@lists.horde.org\n" "POT-Creation-Date: 2010-10-13 01:27+0200\n" "PO-Revision-Date: 2010-10-13 01:27+0200\n" "Last-Translator: Automatically generated\n" "Language-Team: i18n@lists.horde.org\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" #: lib/Horde/Share/Object/Kolab.php:131 msgid "Calendar" msgstr "" #: lib/Horde/Share/Object/Kolab.php:127 msgid "Contacts" msgstr "" #: lib/Horde/Share/Object/Kolab.php:135 msgid "Filters" msgstr "" #: lib/Horde/Share/Object/Kolab.php:129 msgid "Notes" msgstr "" #: lib/Horde/Share/Object/Kolab.php:137 msgid "Preferences" msgstr "" #: lib/Horde/Share/Kolab.php:117 lib/Horde/Share/Sql.php:210 #, php-format msgid "Share \"%s\" does not exist." msgstr "" #: lib/Horde/Share/Sql.php:272 #, php-format msgid "Share ID %d does not exist." msgstr "" #: lib/Horde/Share/Sql/Hierarchical.php:547 msgid "Share names are not supported in this driver" msgstr "" #: lib/Horde/Share/Object/Kolab.php:133 msgid "Tasks" msgstr "" #: lib/Horde/Share/Kolab.php:81 #, php-format msgid "The Horde/Kolab integration engine does not support \"%s\"" msgstr "" #: lib/Horde/Share/Object/Kolab.php:373 msgid "The Kolab share object has not been initialized yet!" msgstr "" #: lib/Horde/Share/Object/Kolab.php:153 msgid "The share has already been initialized!" msgstr "" Horde_Share-2.0.8/locale/hr/LC_MESSAGES/Horde_Share.mo0000664000175000017500000000122512654071446020176 0ustar janjan,<P8Q3aThe Horde/Kolab integration engine does not support "%s"Project-Id-Version: Horde_Share Report-Msgid-Bugs-To: dev@lists.horde.org POT-Creation-Date: 2011-08-02 15:24+0200 PO-Revision-Date: 2011-11-08 16:49+0200 Last-Translator: Valentin Vidic Language-Team: i18n@lists.horde.org Language: hr MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2); Horde/Kolab integracijski program ne podržava "%s"Horde_Share-2.0.8/locale/hr/LC_MESSAGES/Horde_Share.po0000664000175000017500000000166312654071446020207 0ustar janjan# Croatian translations for Horde_Share module. # Copyright 2010-2016 Horde LLC (http://www.horde.org/) # This file is distributed under the same license as the Horde_Share module. # Valentin Vidic , 2011. # msgid "" msgstr "" "Project-Id-Version: Horde_Share\n" "Report-Msgid-Bugs-To: dev@lists.horde.org\n" "POT-Creation-Date: 2011-08-02 15:24+0200\n" "PO-Revision-Date: 2011-11-08 16:49+0200\n" "Last-Translator: Valentin Vidic \n" "Language-Team: i18n@lists.horde.org\n" "Language: hr\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n" "%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n" #: lib/Horde/Share/Kolab.php:83 #, php-format msgid "The Horde/Kolab integration engine does not support \"%s\"" msgstr "Horde/Kolab integracijski program ne podržava \"%s\"" Horde_Share-2.0.8/locale/hu/LC_MESSAGES/Horde_Share.mo0000664000175000017500000000110512654071446020176 0ustar janjan,<P8Q3The Horde/Kolab integration engine does not support "%s"Project-Id-Version: Horde_Share Report-Msgid-Bugs-To: dev@lists.horde.org POT-Creation-Date: 2012-01-17 12:38+0100 PO-Revision-Date: 2014-07-14 11:35+0200 Last-Translator: Andras Galos Language-Team: i18n@lists.horde.org Language: hu MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Plural-Forms: nplurals=2; plural=(n != 1); A Horde/Kolab integráció ezt nem támogatja: "%s"Horde_Share-2.0.8/locale/hu/LC_MESSAGES/Horde_Share.po0000664000175000017500000000145612654071446020212 0ustar janjan# Hungarian translations for Horde_Share module. # Copyright 2010-2013 Horde LLC (http://www.horde.org/) # This file is distributed under the same license as the Horde_Share module. # msgid "" msgstr "" "Project-Id-Version: Horde_Share \n" "Report-Msgid-Bugs-To: dev@lists.horde.org\n" "POT-Creation-Date: 2012-01-17 12:38+0100\n" "PO-Revision-Date: 2014-07-14 11:35+0200\n" "Last-Translator: Andras Galos \n" "Language-Team: i18n@lists.horde.org\n" "Language: hu\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" #: lib/Horde/Share/Kolab.php:83 #, php-format msgid "The Horde/Kolab integration engine does not support \"%s\"" msgstr "A Horde/Kolab integráció ezt nem támogatja: \"%s\"" Horde_Share-2.0.8/locale/id/LC_MESSAGES/Horde_Share.mo0000664000175000017500000000106712654071446020165 0ustar janjanL |B")1CalendarContactsFiltersNotesTasksProject-Id-Version: Horde_Share Report-Msgid-Bugs-To: dev@lists.horde.org POT-Creation-Date: 2010-10-13 01:27+0200 PO-Revision-Date: 2010-10-13 01:27+0200 Last-Translator: Automatically generated Language-Team: i18n@lists.horde.org MIME-Version: 1.0 Content-Type: text/plain; charset=ASCII Content-Transfer-Encoding: 8bit KalenderKontakFilterCatatanTugasHorde_Share-2.0.8/locale/id/LC_MESSAGES/Horde_Share.po0000664000175000017500000000323112654071446020163 0ustar janjan# Indonesian translations for Horde_Share module. # Copyright 2010-2016 Horde LLC (http://www.horde.org/) # This file is distributed under the same license as the Horde_Share module. # Automatically generated, 2010. # msgid "" msgstr "" "Project-Id-Version: Horde_Share\n" "Report-Msgid-Bugs-To: dev@lists.horde.org\n" "POT-Creation-Date: 2010-10-13 01:27+0200\n" "PO-Revision-Date: 2010-10-13 01:27+0200\n" "Last-Translator: Automatically generated\n" "Language-Team: i18n@lists.horde.org\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=ASCII\n" "Content-Transfer-Encoding: 8bit\n" #: lib/Horde/Share/Object/Kolab.php:131 msgid "Calendar" msgstr "Kalender" #: lib/Horde/Share/Object/Kolab.php:127 msgid "Contacts" msgstr "Kontak" #: lib/Horde/Share/Object/Kolab.php:135 msgid "Filters" msgstr "Filter" #: lib/Horde/Share/Object/Kolab.php:129 msgid "Notes" msgstr "Catatan" #: lib/Horde/Share/Object/Kolab.php:137 msgid "Preferences" msgstr "" #: lib/Horde/Share/Kolab.php:117 lib/Horde/Share/Sql.php:210 #, php-format msgid "Share \"%s\" does not exist." msgstr "" #: lib/Horde/Share/Sql.php:272 #, php-format msgid "Share ID %d does not exist." msgstr "" #: lib/Horde/Share/Sql/Hierarchical.php:547 msgid "Share names are not supported in this driver" msgstr "" #: lib/Horde/Share/Object/Kolab.php:133 msgid "Tasks" msgstr "Tugas" #: lib/Horde/Share/Kolab.php:81 #, php-format msgid "The Horde/Kolab integration engine does not support \"%s\"" msgstr "" #: lib/Horde/Share/Object/Kolab.php:373 msgid "The Kolab share object has not been initialized yet!" msgstr "" #: lib/Horde/Share/Object/Kolab.php:153 msgid "The share has already been initialized!" msgstr "" Horde_Share-2.0.8/locale/is/LC_MESSAGES/Horde_Share.mo0000664000175000017500000000064212654071446020202 0ustar janjan,<PQBYFiltersProject-Id-Version: Horde_Share Report-Msgid-Bugs-To: dev@lists.horde.org POT-Creation-Date: 2010-10-13 01:27+0200 PO-Revision-Date: 2010-10-13 01:27+0200 Last-Translator: Automatically generated Language-Team: i18n@lists.horde.org MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit SíurHorde_Share-2.0.8/locale/is/LC_MESSAGES/Horde_Share.po0000664000175000017500000000325212654071446020205 0ustar janjan# Icelandic translations for Horde_Share module. # Copyright 2010-2016 Horde LLC (http://www.horde.org/) # This file is distributed under the same license as the Horde_Share module. # Automatically generated, 2010. # msgid "" msgstr "" "Project-Id-Version: Horde_Share\n" "Report-Msgid-Bugs-To: dev@lists.horde.org\n" "POT-Creation-Date: 2010-10-13 01:27+0200\n" "PO-Revision-Date: 2010-10-13 01:27+0200\n" "Last-Translator: Automatically generated\n" "Language-Team: i18n@lists.horde.org\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: lib/Horde/Share/Object/Kolab.php:131 msgid "Calendar" msgstr "" #: lib/Horde/Share/Object/Kolab.php:127 msgid "Contacts" msgstr "" #: lib/Horde/Share/Object/Kolab.php:135 msgid "Filters" msgstr "Síur" #: lib/Horde/Share/Object/Kolab.php:129 #, fuzzy msgid "Notes" msgstr "Engin" #: lib/Horde/Share/Object/Kolab.php:137 msgid "Preferences" msgstr "" #: lib/Horde/Share/Kolab.php:117 lib/Horde/Share/Sql.php:210 #, php-format msgid "Share \"%s\" does not exist." msgstr "" #: lib/Horde/Share/Sql.php:272 #, php-format msgid "Share ID %d does not exist." msgstr "" #: lib/Horde/Share/Sql/Hierarchical.php:547 msgid "Share names are not supported in this driver" msgstr "" #: lib/Horde/Share/Object/Kolab.php:133 #, fuzzy msgid "Tasks" msgstr "Verkefni við tengingu" #: lib/Horde/Share/Kolab.php:81 #, php-format msgid "The Horde/Kolab integration engine does not support \"%s\"" msgstr "" #: lib/Horde/Share/Object/Kolab.php:373 msgid "The Kolab share object has not been initialized yet!" msgstr "" #: lib/Horde/Share/Object/Kolab.php:153 msgid "The share has already been initialized!" msgstr "" Horde_Share-2.0.8/locale/it/LC_MESSAGES/Horde_Share.mo0000664000175000017500000000164312654071446020205 0ustar janjan d ,I8Om   97 q'{ CalendarContactsFiltersNotesShare "%s" does not exist.Share names are not supported in this driverTasksThe Horde/Kolab integration engine does not support "%s"Project-Id-Version: Horde_Share Report-Msgid-Bugs-To: dev@lists.horde.org POT-Creation-Date: 2010-10-13 01:27+0200 PO-Revision-Date: 2010-10-13 01:27+0200 Last-Translator: Automatically generated Language-Team: i18n@lists.horde.org MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Plural-Forms: nplurals=2; plural=(n != 1); CalendarioContattiFiltriNoteCondivisione "%s" non esistente.Nomi di condivisione non sono supportati da questo driverAttivitàIl motore Horde/Kolab non supporta "%s"Horde_Share-2.0.8/locale/it/LC_MESSAGES/Horde_Share.po0000664000175000017500000000365412654071446020214 0ustar janjan# Italian translations for Horde_Share module. # Copyright 2010-2016 Horde LLC (http://www.horde.org/) # This file is distributed under the same license as the Horde_Share module. # Automatically generated, 2010. # msgid "" msgstr "" "Project-Id-Version: Horde_Share\n" "Report-Msgid-Bugs-To: dev@lists.horde.org\n" "POT-Creation-Date: 2010-10-13 01:27+0200\n" "PO-Revision-Date: 2010-10-13 01:27+0200\n" "Last-Translator: Automatically generated\n" "Language-Team: i18n@lists.horde.org\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" #: lib/Horde/Share/Object/Kolab.php:131 msgid "Calendar" msgstr "Calendario" #: lib/Horde/Share/Object/Kolab.php:127 msgid "Contacts" msgstr "Contatti" #: lib/Horde/Share/Object/Kolab.php:135 msgid "Filters" msgstr "Filtri" #: lib/Horde/Share/Object/Kolab.php:129 msgid "Notes" msgstr "Note" #: lib/Horde/Share/Object/Kolab.php:137 msgid "Preferences" msgstr "" #: lib/Horde/Share/Kolab.php:117 lib/Horde/Share/Sql.php:210 #, php-format msgid "Share \"%s\" does not exist." msgstr "Condivisione \"%s\" non esistente." #: lib/Horde/Share/Sql.php:272 #, fuzzy, php-format msgid "Share ID %d does not exist." msgstr "ID Condivisione \"%s\" non esistente." #: lib/Horde/Share/Sql/Hierarchical.php:547 msgid "Share names are not supported in this driver" msgstr "Nomi di condivisione non sono supportati da questo driver" #: lib/Horde/Share/Object/Kolab.php:133 msgid "Tasks" msgstr "Attività" #: lib/Horde/Share/Kolab.php:81 #, php-format msgid "The Horde/Kolab integration engine does not support \"%s\"" msgstr "Il motore Horde/Kolab non supporta \"%s\"" #: lib/Horde/Share/Object/Kolab.php:373 msgid "The Kolab share object has not been initialized yet!" msgstr "" #: lib/Horde/Share/Object/Kolab.php:153 #, fuzzy msgid "The share has already been initialized!" msgstr "Questa richiesta è già stata processata" Horde_Share-2.0.8/locale/ja/LC_MESSAGES/Horde_Share.mo0000664000175000017500000000115412654071446020160 0ustar janjan,<P8QB)The Horde/Kolab integration engine does not support "%s"Project-Id-Version: Horde_Share Report-Msgid-Bugs-To: dev@lists.horde.org POT-Creation-Date: 2012-01-17 12:38+0100 PO-Revision-Date: 2012-10-14 11:33+0900 Last-Translator: Hiromi Kimura Language-Team: i18n@lists.horde.org Language: ja MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Plural-Forms: nplurals=1; plural=0; X-Generator: Poedit 1.5.4 Horde/Kolab 統合エンジンは "%s" をサポートしませんHorde_Share-2.0.8/locale/ja/LC_MESSAGES/Horde_Share.po0000664000175000017500000000156012654071446020164 0ustar janjan# Japanese translation for Horde. # Copyright 2004-2016 Horde LLC (http://www.horde.org/) # This file is distributed under the same license as the Horde package. # Hiromi Kimura # msgid "" msgstr "" "Project-Id-Version: Horde_Share\n" "Report-Msgid-Bugs-To: dev@lists.horde.org\n" "POT-Creation-Date: 2012-01-17 12:38+0100\n" "PO-Revision-Date: 2012-10-14 11:33+0900\n" "Last-Translator: Hiromi Kimura \n" "Language-Team: i18n@lists.horde.org\n" "Language: ja\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=1; plural=0;\n" "X-Generator: Poedit 1.5.4\n" #: lib/Horde/Share/Kolab.php:83 #, php-format msgid "The Horde/Kolab integration engine does not support \"%s\"" msgstr "Horde/Kolab 統合エンジンは \"%s\" をサポートしません" Horde_Share-2.0.8/locale/km/LC_MESSAGES/Horde_Share.mo0000664000175000017500000000115512654071446020176 0ustar janjanL |B+4DTCalendarContactsFiltersNotesTasksProject-Id-Version: Horde_Share Report-Msgid-Bugs-To: dev@lists.horde.org POT-Creation-Date: 2010-10-13 01:27+0200 PO-Revision-Date: 2010-10-13 01:27+0200 Last-Translator: Automatically generated Language-Team: i18n@lists.horde.org MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ប្រតិទិនContactsតម្រងចំណាំភារកិច្ចHorde_Share-2.0.8/locale/km/LC_MESSAGES/Horde_Share.po0000664000175000017500000000331212654071446020176 0ustar janjan# Khmer translations for Horde_Share module. # Copyright 2010-2016 Horde LLC (http://www.horde.org/) # This file is distributed under the same license as the Horde_Share module. # Automatically generated, 2010. # msgid "" msgstr "" "Project-Id-Version: Horde_Share\n" "Report-Msgid-Bugs-To: dev@lists.horde.org\n" "POT-Creation-Date: 2010-10-13 01:27+0200\n" "PO-Revision-Date: 2010-10-13 01:27+0200\n" "Last-Translator: Automatically generated\n" "Language-Team: i18n@lists.horde.org\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: lib/Horde/Share/Object/Kolab.php:131 msgid "Calendar" msgstr "ប្រតិទិន" #: lib/Horde/Share/Object/Kolab.php:127 msgid "Contacts" msgstr "Contacts" #: lib/Horde/Share/Object/Kolab.php:135 msgid "Filters" msgstr "តម្រង" #: lib/Horde/Share/Object/Kolab.php:129 msgid "Notes" msgstr "ចំណាំ" #: lib/Horde/Share/Object/Kolab.php:137 msgid "Preferences" msgstr "" #: lib/Horde/Share/Kolab.php:117 lib/Horde/Share/Sql.php:210 #, php-format msgid "Share \"%s\" does not exist." msgstr "" #: lib/Horde/Share/Sql.php:272 #, php-format msgid "Share ID %d does not exist." msgstr "" #: lib/Horde/Share/Sql/Hierarchical.php:547 msgid "Share names are not supported in this driver" msgstr "" #: lib/Horde/Share/Object/Kolab.php:133 msgid "Tasks" msgstr "ភារកិច្ច" #: lib/Horde/Share/Kolab.php:81 #, php-format msgid "The Horde/Kolab integration engine does not support \"%s\"" msgstr "" #: lib/Horde/Share/Object/Kolab.php:373 msgid "The Kolab share object has not been initialized yet!" msgstr "" #: lib/Horde/Share/Object/Kolab.php:153 msgid "The share has already been initialized!" msgstr "" Horde_Share-2.0.8/locale/ko/LC_MESSAGES/Horde_Share.mo0000664000175000017500000000105112654071446020173 0ustar janjanDlf "CalendarFiltersNotesTasksProject-Id-Version: Horde_Share Report-Msgid-Bugs-To: dev@lists.horde.org POT-Creation-Date: 2010-10-13 01:27+0200 PO-Revision-Date: 2010-10-13 01:27+0200 Last-Translator: Automatically generated Language-Team: i18n@lists.horde.org MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Plural-Forms: nplurals=1; plural=0; 달력필터참조작업Horde_Share-2.0.8/locale/ko/LC_MESSAGES/Horde_Share.po0000664000175000017500000000335412654071446020206 0ustar janjan# Korean translations for Horde_Share module. # Copyright 2010-2016 Horde LLC (http://www.horde.org/) # This file is distributed under the same license as the Horde_Share module. # Automatically generated, 2010. # msgid "" msgstr "" "Project-Id-Version: Horde_Share\n" "Report-Msgid-Bugs-To: dev@lists.horde.org\n" "POT-Creation-Date: 2010-10-13 01:27+0200\n" "PO-Revision-Date: 2010-10-13 01:27+0200\n" "Last-Translator: Automatically generated\n" "Language-Team: i18n@lists.horde.org\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=1; plural=0;\n" #: lib/Horde/Share/Object/Kolab.php:131 msgid "Calendar" msgstr "달력" #: lib/Horde/Share/Object/Kolab.php:127 msgid "Contacts" msgstr "" #: lib/Horde/Share/Object/Kolab.php:135 msgid "Filters" msgstr "필터" #: lib/Horde/Share/Object/Kolab.php:129 msgid "Notes" msgstr "참조" #: lib/Horde/Share/Object/Kolab.php:137 msgid "Preferences" msgstr "" #: lib/Horde/Share/Kolab.php:117 lib/Horde/Share/Sql.php:210 #, php-format msgid "Share \"%s\" does not exist." msgstr "" #: lib/Horde/Share/Sql.php:272 #, php-format msgid "Share ID %d does not exist." msgstr "" #: lib/Horde/Share/Sql/Hierarchical.php:547 msgid "Share names are not supported in this driver" msgstr "" #: lib/Horde/Share/Object/Kolab.php:133 msgid "Tasks" msgstr "작업" #: lib/Horde/Share/Kolab.php:81 #, php-format msgid "The Horde/Kolab integration engine does not support \"%s\"" msgstr "" #: lib/Horde/Share/Object/Kolab.php:373 msgid "The Kolab share object has not been initialized yet!" msgstr "" #: lib/Horde/Share/Object/Kolab.php:153 #, fuzzy msgid "The share has already been initialized!" msgstr "이미 주소록에 등록되어 있습니다." Horde_Share-2.0.8/locale/lt/LC_MESSAGES/Horde_Share.mo0000664000175000017500000000117112654071446020204 0ustar janjan,<P8Q3EThe Horde/Kolab integration engine does not support "%s"Project-Id-Version: Horde_Share Report-Msgid-Bugs-To: dev@lists.horde.org POT-Creation-Date: 2011-05-28 01:09+0300 PO-Revision-Date: 2011-06-28 01:06+0300 Last-Translator: Vilius Šumskas Language-Team: Lithuanian MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && (n%100<10 || n%100>=20) ? 1 : 2); Horde/Kolab integracijos varikliukas nepalaiko "%s"Horde_Share-2.0.8/locale/lt/LC_MESSAGES/Horde_Share.po0000664000175000017500000000161312654071446020210 0ustar janjan# Lithuanian translations for Horde_Share module. # Copyright 2010-2016 Horde LLC (http://www.horde.org/) # This file is distributed under the same license as the Horde_Share module. # Vilius Šumskas , 2011. # msgid "" msgstr "" "Project-Id-Version: Horde_Share\n" "Report-Msgid-Bugs-To: dev@lists.horde.org\n" "POT-Creation-Date: 2011-05-28 01:09+0300\n" "PO-Revision-Date: 2011-06-28 01:06+0300\n" "Last-Translator: Vilius Šumskas \n" "Language-Team: Lithuanian \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && (n" "%100<10 || n%100>=20) ? 1 : 2);\n" #: lib/Horde/Share/Kolab.php:83 #, php-format msgid "The Horde/Kolab integration engine does not support \"%s\"" msgstr "Horde/Kolab integracijos varikliukas nepalaiko \"%s\"" Horde_Share-2.0.8/locale/lv/LC_MESSAGES/Horde_Share.mo0000664000175000017500000000125712654071446020213 0ustar janjan,<P8Q0~The Horde/Kolab integration engine does not support "%s"Project-Id-Version: Horde_Share Report-Msgid-Bugs-To: dev@lists.horde.org POT-Creation-Date: 2011-03-15 13:27+0100 PO-Revision-Date: 2011-10-16 15:22+0300 Last-Translator: Jānis Eisaks Language-Team: i18n@lists.horde.org Language: lv MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n != 0 ? 1 : 2); X-Poedit-Language: Latvian X-Poedit-Country: LATVIA X-Poedit-SourceCharset: utf-8 Horde/Kolab integrācijas dzinis neatbalsta "%s"Horde_Share-2.0.8/locale/lv/LC_MESSAGES/Horde_Share.po0000664000175000017500000000171012654071446020210 0ustar janjan# Latvian translations for Horde_Share package. # Copyright 2011-2016 Horde LLC (http://www.horde.org/) # This file is distributed under the same license as the Horde_Share package. # Automatically generated, 2011. # msgid "" msgstr "" "Project-Id-Version: Horde_Share\n" "Report-Msgid-Bugs-To: dev@lists.horde.org\n" "POT-Creation-Date: 2011-03-15 13:27+0100\n" "PO-Revision-Date: 2011-10-16 15:22+0300\n" "Last-Translator: Jānis Eisaks \n" "Language-Team: i18n@lists.horde.org\n" "Language: lv\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n != 0 ? 1 : " "2);\n" "X-Poedit-Language: Latvian\n" "X-Poedit-Country: LATVIA\n" "X-Poedit-SourceCharset: utf-8\n" #: lib/Horde/Share/Kolab.php:82 #, php-format msgid "The Horde/Kolab integration engine does not support \"%s\"" msgstr "Horde/Kolab integrācijas dzinis neatbalsta \"%s\"" Horde_Share-2.0.8/locale/mk/LC_MESSAGES/Horde_Share.mo0000664000175000017500000000065512654071446020202 0ustar janjan,<PQBWNotesProject-Id-Version: Horde_Share Report-Msgid-Bugs-To: dev@lists.horde.org POT-Creation-Date: 2010-10-13 01:27+0200 PO-Revision-Date: 2010-10-13 01:27+0200 Last-Translator: Automatically generated Language-Team: i18n@lists.horde.org MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ЗабелешкиHorde_Share-2.0.8/locale/mk/LC_MESSAGES/Horde_Share.po0000664000175000017500000000321312654071446020176 0ustar janjan# Macedonian translations for Horde_Share module. # Copyright 2010-2016 Horde LLC (http://www.horde.org/) # This file is distributed under the same license as the Horde_Share module. # Automatically generated, 2010. # msgid "" msgstr "" "Project-Id-Version: Horde_Share\n" "Report-Msgid-Bugs-To: dev@lists.horde.org\n" "POT-Creation-Date: 2010-10-13 01:27+0200\n" "PO-Revision-Date: 2010-10-13 01:27+0200\n" "Last-Translator: Automatically generated\n" "Language-Team: i18n@lists.horde.org\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: lib/Horde/Share/Object/Kolab.php:131 msgid "Calendar" msgstr "" #: lib/Horde/Share/Object/Kolab.php:127 msgid "Contacts" msgstr "" #: lib/Horde/Share/Object/Kolab.php:135 msgid "Filters" msgstr "" #: lib/Horde/Share/Object/Kolab.php:129 msgid "Notes" msgstr "Забелешки" #: lib/Horde/Share/Object/Kolab.php:137 msgid "Preferences" msgstr "" #: lib/Horde/Share/Kolab.php:117 lib/Horde/Share/Sql.php:210 #, php-format msgid "Share \"%s\" does not exist." msgstr "" #: lib/Horde/Share/Sql.php:272 #, php-format msgid "Share ID %d does not exist." msgstr "" #: lib/Horde/Share/Sql/Hierarchical.php:547 msgid "Share names are not supported in this driver" msgstr "" #: lib/Horde/Share/Object/Kolab.php:133 msgid "Tasks" msgstr "" #: lib/Horde/Share/Kolab.php:81 #, php-format msgid "The Horde/Kolab integration engine does not support \"%s\"" msgstr "" #: lib/Horde/Share/Object/Kolab.php:373 msgid "The Kolab share object has not been initialized yet!" msgstr "" #: lib/Horde/Share/Object/Kolab.php:153 msgid "The share has already been initialized!" msgstr "" Horde_Share-2.0.8/locale/nb/LC_MESSAGES/Horde_Share.mo0000664000175000017500000000106512654071446020166 0ustar janjanDlm$,CalendarFiltersNotesTasksProject-Id-Version: Horde_Share Report-Msgid-Bugs-To: dev@lists.horde.org POT-Creation-Date: 2010-10-13 01:27+0200 PO-Revision-Date: 2010-10-13 01:27+0200 Last-Translator: Automatically generated Language-Team: i18n@lists.horde.org MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Plural-Forms: nplurals=2; plural=(n != 1); KalenderFilterNotaterOppgaverHorde_Share-2.0.8/locale/nb/LC_MESSAGES/Horde_Share.po0000664000175000017500000000352012654071446020167 0ustar janjan# Norwegian Bokmal translations for Horde_Share module. # Copyright 2010-2016 Horde LLC (http://www.horde.org/) # This file is distributed under the same license as the Horde_Share module. # Automatically generated, 2010. # msgid "" msgstr "" "Project-Id-Version: Horde_Share\n" "Report-Msgid-Bugs-To: dev@lists.horde.org\n" "POT-Creation-Date: 2010-10-13 01:27+0200\n" "PO-Revision-Date: 2010-10-13 01:27+0200\n" "Last-Translator: Automatically generated\n" "Language-Team: i18n@lists.horde.org\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" #: lib/Horde/Share/Object/Kolab.php:131 msgid "Calendar" msgstr "Kalender" #: lib/Horde/Share/Object/Kolab.php:127 msgid "Contacts" msgstr "" #: lib/Horde/Share/Object/Kolab.php:135 msgid "Filters" msgstr "Filter" #: lib/Horde/Share/Object/Kolab.php:129 msgid "Notes" msgstr "Notater" #: lib/Horde/Share/Object/Kolab.php:137 msgid "Preferences" msgstr "" #: lib/Horde/Share/Kolab.php:117 lib/Horde/Share/Sql.php:210 #, fuzzy, php-format msgid "Share \"%s\" does not exist." msgstr "Mappen %s eksisterer ikke" #: lib/Horde/Share/Sql.php:272 #, fuzzy, php-format msgid "Share ID %d does not exist." msgstr "Mappen %s eksisterer ikke" #: lib/Horde/Share/Sql/Hierarchical.php:547 msgid "Share names are not supported in this driver" msgstr "" #: lib/Horde/Share/Object/Kolab.php:133 msgid "Tasks" msgstr "Oppgaver" #: lib/Horde/Share/Kolab.php:81 #, fuzzy, php-format msgid "The Horde/Kolab integration engine does not support \"%s\"" msgstr "Horde/Kolab: Integrasjonsmotoren krever 'domxml' PHP-utvidelse" #: lib/Horde/Share/Object/Kolab.php:373 msgid "The Kolab share object has not been initialized yet!" msgstr "" #: lib/Horde/Share/Object/Kolab.php:153 msgid "The share has already been initialized!" msgstr "" Horde_Share-2.0.8/locale/nl/LC_MESSAGES/Horde_Share.mo0000664000175000017500000000116012654071446020174 0ustar janjan,<P8Q69The Horde/Kolab integration engine does not support "%s"Project-Id-Version: Horde_Share Report-Msgid-Bugs-To: dev@lists.horde.org POT-Creation-Date: 2012-01-17 12:38+0100 PO-Revision-Date: 2012-11-02 22:59+0100 Last-Translator: Arjen de Korte Language-Team: Dutch Language: nl MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Plural-Forms: nplurals=2; plural=(n != 1); X-Generator: Lokalize 1.4 De Horde/Kolab integratie module ondersteunt "%s" nietHorde_Share-2.0.8/locale/nl/LC_MESSAGES/Horde_Share.po0000664000175000017500000000161412654071446020203 0ustar janjan# Dutch translations for Horde_Share module. # Copyright 2010-2016 Horde LLC (http://www.horde.org/) # This file is distributed under the same license as the Horde_Share module. # # Arjen de Korte , 2012. msgid "" msgstr "" "Project-Id-Version: Horde_Share\n" "Report-Msgid-Bugs-To: dev@lists.horde.org\n" "POT-Creation-Date: 2012-01-17 12:38+0100\n" "PO-Revision-Date: 2012-11-02 22:59+0100\n" "Last-Translator: Arjen de Korte \n" "Language-Team: Dutch \n" "Language: nl\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" "X-Generator: Lokalize 1.4\n" #: lib/Horde/Share/Kolab.php:83 #, php-format msgid "The Horde/Kolab integration engine does not support \"%s\"" msgstr "De Horde/Kolab integratie module ondersteunt \"%s\" niet" Horde_Share-2.0.8/locale/nn/LC_MESSAGES/Horde_Share.mo0000664000175000017500000000101712654071446020177 0ustar janjan<\pqzm CalendarNotesTasksProject-Id-Version: Horde_Share Report-Msgid-Bugs-To: dev@lists.horde.org POT-Creation-Date: 2010-10-13 01:27+0200 PO-Revision-Date: 2010-10-13 01:27+0200 Last-Translator: Automatically generated Language-Team: i18n@lists.horde.org MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Plural-Forms: nplurals=2; plural=(n != 1); KalenderNotatarOppgåverHorde_Share-2.0.8/locale/nn/LC_MESSAGES/Horde_Share.po0000664000175000017500000000330712654071446020206 0ustar janjan# Norwegian Nynorsk translations for Horde_Share module. # Copyright 2010-2016 Horde LLC (http://www.horde.org/) # This file is distributed under the same license as the Horde_Share module. # Automatically generated, 2010. # msgid "" msgstr "" "Project-Id-Version: Horde_Share\n" "Report-Msgid-Bugs-To: dev@lists.horde.org\n" "POT-Creation-Date: 2010-10-13 01:27+0200\n" "PO-Revision-Date: 2010-10-13 01:27+0200\n" "Last-Translator: Automatically generated\n" "Language-Team: i18n@lists.horde.org\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" #: lib/Horde/Share/Object/Kolab.php:131 msgid "Calendar" msgstr "Kalender" #: lib/Horde/Share/Object/Kolab.php:127 msgid "Contacts" msgstr "" #: lib/Horde/Share/Object/Kolab.php:135 msgid "Filters" msgstr "" #: lib/Horde/Share/Object/Kolab.php:129 msgid "Notes" msgstr "Notatar" #: lib/Horde/Share/Object/Kolab.php:137 msgid "Preferences" msgstr "" #: lib/Horde/Share/Kolab.php:117 lib/Horde/Share/Sql.php:210 #, php-format msgid "Share \"%s\" does not exist." msgstr "" #: lib/Horde/Share/Sql.php:272 #, php-format msgid "Share ID %d does not exist." msgstr "" #: lib/Horde/Share/Sql/Hierarchical.php:547 msgid "Share names are not supported in this driver" msgstr "" #: lib/Horde/Share/Object/Kolab.php:133 msgid "Tasks" msgstr "Oppgåver" #: lib/Horde/Share/Kolab.php:81 #, php-format msgid "The Horde/Kolab integration engine does not support \"%s\"" msgstr "" #: lib/Horde/Share/Object/Kolab.php:373 msgid "The Kolab share object has not been initialized yet!" msgstr "" #: lib/Horde/Share/Object/Kolab.php:153 msgid "The share has already been initialized!" msgstr "" Horde_Share-2.0.8/locale/pl/LC_MESSAGES/Horde_Share.mo0000664000175000017500000000115512654071446020202 0ustar janjanDl NX_eCalendarFiltersNotesTasksProject-Id-Version: Horde_Share Report-Msgid-Bugs-To: dev@lists.horde.org POT-Creation-Date: 2010-10-13 01:27+0200 PO-Revision-Date: 2010-10-13 01:27+0200 Last-Translator: Automatically generated Language-Team: i18n@lists.horde.org MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Plural-Forms: nplurals=3; plural=(n==1 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2); KalendarzFiltryUwagiZadaniaHorde_Share-2.0.8/locale/pl/LC_MESSAGES/Horde_Share.po0000664000175000017500000000361012654071446020203 0ustar janjan# Polish translations for Horde_Share module. # Copyright 2010-2016 Horde LLC (http://www.horde.org/) # This file is distributed under the same license as the Horde_Share module. # Automatically generated, 2010. # msgid "" msgstr "" "Project-Id-Version: Horde_Share\n" "Report-Msgid-Bugs-To: dev@lists.horde.org\n" "POT-Creation-Date: 2010-10-13 01:27+0200\n" "PO-Revision-Date: 2010-10-13 01:27+0200\n" "Last-Translator: Automatically generated\n" "Language-Team: i18n@lists.horde.org\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=3; plural=(n==1 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 " "|| n%100>=20) ? 1 : 2);\n" #: lib/Horde/Share/Object/Kolab.php:131 msgid "Calendar" msgstr "Kalendarz" #: lib/Horde/Share/Object/Kolab.php:127 msgid "Contacts" msgstr "" #: lib/Horde/Share/Object/Kolab.php:135 msgid "Filters" msgstr "Filtry" #: lib/Horde/Share/Object/Kolab.php:129 msgid "Notes" msgstr "Uwagi" #: lib/Horde/Share/Object/Kolab.php:137 msgid "Preferences" msgstr "" #: lib/Horde/Share/Kolab.php:117 lib/Horde/Share/Sql.php:210 #, fuzzy, php-format msgid "Share \"%s\" does not exist." msgstr "Plik tymczasowy \"%s\" nie istnieje." #: lib/Horde/Share/Sql.php:272 #, fuzzy, php-format msgid "Share ID %d does not exist." msgstr "Folder %s nie istnieje" #: lib/Horde/Share/Sql/Hierarchical.php:547 msgid "Share names are not supported in this driver" msgstr "" #: lib/Horde/Share/Object/Kolab.php:133 msgid "Tasks" msgstr "Zadania" #: lib/Horde/Share/Kolab.php:81 #, fuzzy, php-format msgid "The Horde/Kolab integration engine does not support \"%s\"" msgstr "Horde/Kolab: Silnik integracyjny wymaga rozszerzenia 'domxml'" #: lib/Horde/Share/Object/Kolab.php:373 msgid "The Kolab share object has not been initialized yet!" msgstr "" #: lib/Horde/Share/Object/Kolab.php:153 msgid "The share has already been initialized!" msgstr "" Horde_Share-2.0.8/locale/pt/LC_MESSAGES/Horde_Share.mo0000664000175000017500000000135212654071446020211 0ustar janjanT 8m  7CalendarContactsFiltersNotesTasksThe Horde/Kolab integration engine does not support "%s"Project-Id-Version: Horde_Share Report-Msgid-Bugs-To: dev@lists.horde.org POT-Creation-Date: 2010-10-13 01:27+0200 PO-Revision-Date: 2010-10-13 01:27+0200 Last-Translator: Automatically generated Language-Team: i18n@lists.horde.org MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Plural-Forms: nplurals=2; plural=(n != 1); CalendárioContactosFiltrosNotasTarefasO engenho de integração Horde/Kolab não suporta "%s"Horde_Share-2.0.8/locale/pt/LC_MESSAGES/Horde_Share.po0000664000175000017500000000357612654071446020226 0ustar janjan# Portuguese translations for Horde_Share module. # Copyright 2010-2016 Horde LLC (http://www.horde.org/) # This file is distributed under the same license as the Horde_Share module. # Automatically generated, 2010. # msgid "" msgstr "" "Project-Id-Version: Horde_Share\n" "Report-Msgid-Bugs-To: dev@lists.horde.org\n" "POT-Creation-Date: 2010-10-13 01:27+0200\n" "PO-Revision-Date: 2010-10-13 01:27+0200\n" "Last-Translator: Automatically generated\n" "Language-Team: i18n@lists.horde.org\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" #: lib/Horde/Share/Object/Kolab.php:131 msgid "Calendar" msgstr "Calendário" #: lib/Horde/Share/Object/Kolab.php:127 msgid "Contacts" msgstr "Contactos" #: lib/Horde/Share/Object/Kolab.php:135 msgid "Filters" msgstr "Filtros" #: lib/Horde/Share/Object/Kolab.php:129 msgid "Notes" msgstr "Notas" #: lib/Horde/Share/Object/Kolab.php:137 msgid "Preferences" msgstr "" #: lib/Horde/Share/Kolab.php:117 lib/Horde/Share/Sql.php:210 #, fuzzy, php-format msgid "Share \"%s\" does not exist." msgstr "O arquivo temporário \"%s\" não existe." #: lib/Horde/Share/Sql.php:272 #, fuzzy, php-format msgid "Share ID %d does not exist." msgstr "A pasta %s não existe." #: lib/Horde/Share/Sql/Hierarchical.php:547 msgid "Share names are not supported in this driver" msgstr "" #: lib/Horde/Share/Object/Kolab.php:133 msgid "Tasks" msgstr "Tarefas" #: lib/Horde/Share/Kolab.php:81 #, php-format msgid "The Horde/Kolab integration engine does not support \"%s\"" msgstr "O engenho de integração Horde/Kolab não suporta \"%s\"" #: lib/Horde/Share/Object/Kolab.php:373 msgid "The Kolab share object has not been initialized yet!" msgstr "" #: lib/Horde/Share/Object/Kolab.php:153 #, fuzzy msgid "The share has already been initialized!" msgstr "Este modelo já foi processado." Horde_Share-2.0.8/locale/pt_BR/LC_MESSAGES/Horde_Share.mo0000664000175000017500000000112012654071446020565 0ustar janjan,<P8Q5The Horde/Kolab integration engine does not support "%s"Project-Id-Version: Horde_Share Report-Msgid-Bugs-To: dev@lists.horde.org POT-Creation-Date: 2011-06-08 22:11-0300 PO-Revision-Date: 2011-06-12 03:07-0300 Last-Translator: Luis Felipe Marzagao Language-Team: i18n@lists.horde.org Language: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Plural-Forms: nplurals=2; plural=(n > 1); O motor de integração Horde/Kolab não suporta "%s"Horde_Share-2.0.8/locale/pt_BR/LC_MESSAGES/Horde_Share.po0000664000175000017500000000153312654071446020600 0ustar janjan# Portuguese translations for Horde_Share module. # Copyright 2010-2016 Horde LLC (http://www.horde.org/) # This file is distributed under the same license as the Horde_Share module. # Automatically generated, 2010. # msgid "" msgstr "" "Project-Id-Version: Horde_Share\n" "Report-Msgid-Bugs-To: dev@lists.horde.org\n" "POT-Creation-Date: 2011-06-08 22:11-0300\n" "PO-Revision-Date: 2011-06-12 03:07-0300\n" "Last-Translator: Luis Felipe Marzagao \n" "Language-Team: i18n@lists.horde.org\n" "Language: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n > 1);\n" #: lib/Horde/Share/Kolab.php:83 #, php-format msgid "The Horde/Kolab integration engine does not support \"%s\"" msgstr "O motor de integração Horde/Kolab não suporta \"%s\"" Horde_Share-2.0.8/locale/ro/LC_MESSAGES/Horde_Share.mo0000664000175000017500000000107012654071446020203 0ustar janjan<\pqz"+0CalendarNotesTasksProject-Id-Version: Horde_Share Report-Msgid-Bugs-To: dev@lists.horde.org POT-Creation-Date: 2010-10-13 01:27+0200 PO-Revision-Date: 2010-10-13 01:27+0200 Last-Translator: Automatically generated Language-Team: i18n@lists.horde.org MIME-Version: 1.0 Content-Type: text/plain; charset=ASCII Content-Transfer-Encoding: 8bit Plural-Forms: nplurals=3; plural=n==1 ? 0 : (n==0 || (n%100 > 0 && n%100 < 20)) ? 1 : 2; CalendarNoteSarciniHorde_Share-2.0.8/locale/ro/LC_MESSAGES/Horde_Share.po0000664000175000017500000000335212654071446020213 0ustar janjan# Romanian translations for Horde_Share module. # Copyright 2010-2016 Horde LLC (http://www.horde.org/) # This file is distributed under the same license as the Horde_Share module. # Automatically generated, 2010. # msgid "" msgstr "" "Project-Id-Version: Horde_Share\n" "Report-Msgid-Bugs-To: dev@lists.horde.org\n" "POT-Creation-Date: 2010-10-13 01:27+0200\n" "PO-Revision-Date: 2010-10-13 01:27+0200\n" "Last-Translator: Automatically generated\n" "Language-Team: i18n@lists.horde.org\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=ASCII\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=3; plural=n==1 ? 0 : (n==0 || (n%100 > 0 && n%100 < " "20)) ? 1 : 2;\n" #: lib/Horde/Share/Object/Kolab.php:131 msgid "Calendar" msgstr "Calendar" #: lib/Horde/Share/Object/Kolab.php:127 msgid "Contacts" msgstr "" #: lib/Horde/Share/Object/Kolab.php:135 msgid "Filters" msgstr "" #: lib/Horde/Share/Object/Kolab.php:129 msgid "Notes" msgstr "Note" #: lib/Horde/Share/Object/Kolab.php:137 msgid "Preferences" msgstr "" #: lib/Horde/Share/Kolab.php:117 lib/Horde/Share/Sql.php:210 #, php-format msgid "Share \"%s\" does not exist." msgstr "" #: lib/Horde/Share/Sql.php:272 #, php-format msgid "Share ID %d does not exist." msgstr "" #: lib/Horde/Share/Sql/Hierarchical.php:547 msgid "Share names are not supported in this driver" msgstr "" #: lib/Horde/Share/Object/Kolab.php:133 msgid "Tasks" msgstr "Sarcini" #: lib/Horde/Share/Kolab.php:81 #, php-format msgid "The Horde/Kolab integration engine does not support \"%s\"" msgstr "" #: lib/Horde/Share/Object/Kolab.php:373 msgid "The Kolab share object has not been initialized yet!" msgstr "" #: lib/Horde/Share/Object/Kolab.php:153 msgid "The share has already been initialized!" msgstr "" Horde_Share-2.0.8/locale/ru/LC_MESSAGES/Horde_Share.mo0000664000175000017500000000132612654071446020215 0ustar janjanL | CalendarContactsFiltersNotesTasksProject-Id-Version: Horde_Share Report-Msgid-Bugs-To: dev@lists.horde.org POT-Creation-Date: 2010-10-13 01:27+0200 PO-Revision-Date: 2010-10-13 01:27+0200 Last-Translator: Automatically generated Language-Team: i18n@lists.horde.org MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2); КалендарьКонтактыФильтрыЗаметкиЗадачиHorde_Share-2.0.8/locale/ru/LC_MESSAGES/Horde_Share.po0000664000175000017500000000402612654071446020220 0ustar janjan# Russian translations for Horde_Share module. # Copyright 2010-2016 Horde LLC (http://www.horde.org/) # This file is distributed under the same license as the Horde_Share module. # Automatically generated, 2010. # msgid "" msgstr "" "Project-Id-Version: Horde_Share\n" "Report-Msgid-Bugs-To: dev@lists.horde.org\n" "POT-Creation-Date: 2010-10-13 01:27+0200\n" "PO-Revision-Date: 2010-10-13 01:27+0200\n" "Last-Translator: Automatically generated\n" "Language-Team: i18n@lists.horde.org\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%" "10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n" #: lib/Horde/Share/Object/Kolab.php:131 msgid "Calendar" msgstr "Календарь" #: lib/Horde/Share/Object/Kolab.php:127 msgid "Contacts" msgstr "Контакты" # fuzzy #: lib/Horde/Share/Object/Kolab.php:135 msgid "Filters" msgstr "Фильтры" #: lib/Horde/Share/Object/Kolab.php:129 msgid "Notes" msgstr "Заметки" #: lib/Horde/Share/Object/Kolab.php:137 #, fuzzy msgid "Preferences" msgstr "Рабочий адрес" #: lib/Horde/Share/Kolab.php:117 lib/Horde/Share/Sql.php:210 #, fuzzy, php-format msgid "Share \"%s\" does not exist." msgstr "Адресат уведомления %s не найден." #: lib/Horde/Share/Sql.php:272 #, fuzzy, php-format msgid "Share ID %d does not exist." msgstr "Адресат уведомления %s не найден." #: lib/Horde/Share/Sql/Hierarchical.php:547 msgid "Share names are not supported in this driver" msgstr "" #: lib/Horde/Share/Object/Kolab.php:133 msgid "Tasks" msgstr "Задачи" #: lib/Horde/Share/Kolab.php:81 #, php-format msgid "The Horde/Kolab integration engine does not support \"%s\"" msgstr "" #: lib/Horde/Share/Object/Kolab.php:373 msgid "The Kolab share object has not been initialized yet!" msgstr "" #: lib/Horde/Share/Object/Kolab.php:153 #, fuzzy msgid "The share has already been initialized!" msgstr "Сервер %s был создан" Horde_Share-2.0.8/locale/sk/LC_MESSAGES/Horde_Share.mo0000664000175000017500000000112412654071446020200 0ustar janjan,<P8Q(+The Horde/Kolab integration engine does not support "%s"Project-Id-Version: Horde_Share Report-Msgid-Bugs-To: dev@lists.horde.org POT-Creation-Date: 2011-03-15 13:27+0100 PO-Revision-Date: 2011-05-03 17:12+0100 Last-Translator: Martin Matuška Language-Team: i18n@lists.horde.org Language: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Plural-Forms: nplurals=3; plural=(n==1) ? 0 : (n>=2 && n<=4) ? 1 : 2; Integrácia Horde/Kolab nepodporuje "%s"Horde_Share-2.0.8/locale/sk/LC_MESSAGES/Horde_Share.po0000664000175000017500000000153312654071446020207 0ustar janjan# Slovak translations for Horde_Share module. # Copyright 2010-2016 Horde LLC (http://www.horde.org/) # This file is distributed under the same license as the Horde_Share module. # Automatically generated, 2010. # msgid "" msgstr "" "Project-Id-Version: Horde_Share\n" "Report-Msgid-Bugs-To: dev@lists.horde.org\n" "POT-Creation-Date: 2011-03-15 13:27+0100\n" "PO-Revision-Date: 2011-05-03 17:12+0100\n" "Last-Translator: Martin Matuška \n" "Language-Team: i18n@lists.horde.org\n" "Language: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=3; plural=(n==1) ? 0 : (n>=2 && n<=4) ? 1 : 2;\n" #: lib/Horde/Share/Kolab.php:82 #, php-format msgid "The Horde/Kolab integration engine does not support \"%s\"" msgstr "Integrácia Horde/Kolab nepodporuje \"%s\"" Horde_Share-2.0.8/locale/sl/LC_MESSAGES/Horde_Share.mo0000664000175000017500000000141012654071446020177 0ustar janjanT 8'CalendarContactsFiltersNotesTasksThe Horde/Kolab integration engine does not support "%s"Project-Id-Version: Horde_Share Report-Msgid-Bugs-To: dev@lists.horde.org POT-Creation-Date: 2010-10-13 01:27+0200 PO-Revision-Date: 2010-10-13 01:27+0200 Last-Translator: Automatically generated Language-Team: i18n@lists.horde.org MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Plural-Forms: nplurals=4; plural=(n%100==1 ? 0 : n%100==2 ? 1 : n%100==3 || n%100==4 ? 2 : 3); KoledarStikiFiltriZapiskiOpravilaHorde/Kolab integracija ne podpira "%s"Horde_Share-2.0.8/locale/sl/LC_MESSAGES/Horde_Share.po0000664000175000017500000000360412654071446020211 0ustar janjan# Slovenian translations for Horde_Share module. # Copyright 2010-2016 Horde LLC (http://www.horde.org/) # This file is distributed under the same license as the Horde_Share module. # Automatically generated, 2010. # msgid "" msgstr "" "Project-Id-Version: Horde_Share\n" "Report-Msgid-Bugs-To: dev@lists.horde.org\n" "POT-Creation-Date: 2010-10-13 01:27+0200\n" "PO-Revision-Date: 2010-10-13 01:27+0200\n" "Last-Translator: Automatically generated\n" "Language-Team: i18n@lists.horde.org\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=4; plural=(n%100==1 ? 0 : n%100==2 ? 1 : n%100==3 || n" "%100==4 ? 2 : 3);\n" #: lib/Horde/Share/Object/Kolab.php:131 msgid "Calendar" msgstr "Koledar" #: lib/Horde/Share/Object/Kolab.php:127 msgid "Contacts" msgstr "Stiki" #: lib/Horde/Share/Object/Kolab.php:135 msgid "Filters" msgstr "Filtri" #: lib/Horde/Share/Object/Kolab.php:129 msgid "Notes" msgstr "Zapiski" #: lib/Horde/Share/Object/Kolab.php:137 msgid "Preferences" msgstr "" #: lib/Horde/Share/Kolab.php:117 lib/Horde/Share/Sql.php:210 #, fuzzy, php-format msgid "Share \"%s\" does not exist." msgstr "%s mapa ne obstaja " #: lib/Horde/Share/Sql.php:272 #, fuzzy, php-format msgid "Share ID %d does not exist." msgstr "%s mapa ne obstaja " #: lib/Horde/Share/Sql/Hierarchical.php:547 msgid "Share names are not supported in this driver" msgstr "" #: lib/Horde/Share/Object/Kolab.php:133 msgid "Tasks" msgstr "Opravila" #: lib/Horde/Share/Kolab.php:81 #, php-format msgid "The Horde/Kolab integration engine does not support \"%s\"" msgstr "Horde/Kolab integracija ne podpira \"%s\"" #: lib/Horde/Share/Object/Kolab.php:373 msgid "The Kolab share object has not been initialized yet!" msgstr "" #: lib/Horde/Share/Object/Kolab.php:153 #, fuzzy msgid "The share has already been initialized!" msgstr "Ta oblika je bila že obdelana." Horde_Share-2.0.8/locale/sv/LC_MESSAGES/Horde_Share.mo0000664000175000017500000000115612654071446020220 0ustar janjanL |m= FP W dCalendarContactsFiltersNotesTasksProject-Id-Version: Horde_Share Report-Msgid-Bugs-To: dev@lists.horde.org POT-Creation-Date: 2010-10-13 01:27+0200 PO-Revision-Date: 2010-10-13 01:27+0200 Last-Translator: Automatically generated Language-Team: i18n@lists.horde.org MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Plural-Forms: nplurals=2; plural=(n != 1); KalenderKontakterFilterAnteckningarUppgifterHorde_Share-2.0.8/locale/sv/LC_MESSAGES/Horde_Share.po0000664000175000017500000000342412654071446020223 0ustar janjan# Swedish translations for Horde_Share module. # Copyright 2010-2016 Horde LLC (http://www.horde.org/) # This file is distributed under the same license as the Horde_Share module. # Automatically generated, 2010. # msgid "" msgstr "" "Project-Id-Version: Horde_Share\n" "Report-Msgid-Bugs-To: dev@lists.horde.org\n" "POT-Creation-Date: 2010-10-13 01:27+0200\n" "PO-Revision-Date: 2010-10-13 01:27+0200\n" "Last-Translator: Automatically generated\n" "Language-Team: i18n@lists.horde.org\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" #: lib/Horde/Share/Object/Kolab.php:131 msgid "Calendar" msgstr "Kalender" #: lib/Horde/Share/Object/Kolab.php:127 msgid "Contacts" msgstr "Kontakter" #: lib/Horde/Share/Object/Kolab.php:135 msgid "Filters" msgstr "Filter" #: lib/Horde/Share/Object/Kolab.php:129 msgid "Notes" msgstr "Anteckningar" #: lib/Horde/Share/Object/Kolab.php:137 msgid "Preferences" msgstr "" #: lib/Horde/Share/Kolab.php:117 lib/Horde/Share/Sql.php:210 #, fuzzy, php-format msgid "Share \"%s\" does not exist." msgstr "Temporär fil '%s' finns inte." #: lib/Horde/Share/Sql.php:272 #, fuzzy, php-format msgid "Share ID %d does not exist." msgstr "Mapp %s existerar inte." #: lib/Horde/Share/Sql/Hierarchical.php:547 msgid "Share names are not supported in this driver" msgstr "" #: lib/Horde/Share/Object/Kolab.php:133 msgid "Tasks" msgstr "Uppgifter" #: lib/Horde/Share/Kolab.php:81 #, php-format msgid "The Horde/Kolab integration engine does not support \"%s\"" msgstr "" #: lib/Horde/Share/Object/Kolab.php:373 msgid "The Kolab share object has not been initialized yet!" msgstr "" #: lib/Horde/Share/Object/Kolab.php:153 msgid "The share has already been initialized!" msgstr "" Horde_Share-2.0.8/locale/tr/LC_MESSAGES/Horde_Share.mo0000664000175000017500000000145312654071446020215 0ustar janjan\ 8 fC  <CalendarContactsFiltersNotesShare "%s" does not exist.TasksThe Horde/Kolab integration engine does not support "%s"Project-Id-Version: Horde_Share Report-Msgid-Bugs-To: dev@lists.horde.org POT-Creation-Date: 2010-10-13 01:27+0200 PO-Revision-Date: 2010-10-13 01:27+0200 Last-Translator: Automatically generated Language-Team: i18n@lists.horde.org MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Plural-Forms: nplurals=1; plural=0; TakvimKişilerSüzgeçlerNotlar"%s" paylaşımı yok.GörevlerHorde/Kolab bütünleştirme motoru desteklememektedir: "%s"Horde_Share-2.0.8/locale/tr/LC_MESSAGES/Horde_Share.po0000664000175000017500000000353712654071446020225 0ustar janjan# Turkish translations for Horde_Share module. # Copyright 2010-2016 Horde LLC (http://www.horde.org/) # This file is distributed under the same license as the Horde_Share module. # Automatically generated, 2010. # msgid "" msgstr "" "Project-Id-Version: Horde_Share\n" "Report-Msgid-Bugs-To: dev@lists.horde.org\n" "POT-Creation-Date: 2010-10-13 01:27+0200\n" "PO-Revision-Date: 2010-10-13 01:27+0200\n" "Last-Translator: Automatically generated\n" "Language-Team: i18n@lists.horde.org\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=1; plural=0;\n" #: lib/Horde/Share/Object/Kolab.php:131 msgid "Calendar" msgstr "Takvim" #: lib/Horde/Share/Object/Kolab.php:127 msgid "Contacts" msgstr "Kişiler" #: lib/Horde/Share/Object/Kolab.php:135 msgid "Filters" msgstr "Süzgeçler" #: lib/Horde/Share/Object/Kolab.php:129 msgid "Notes" msgstr "Notlar" #: lib/Horde/Share/Object/Kolab.php:137 msgid "Preferences" msgstr "" #: lib/Horde/Share/Kolab.php:117 lib/Horde/Share/Sql.php:210 #, php-format msgid "Share \"%s\" does not exist." msgstr "\"%s\" paylaşımı yok." #: lib/Horde/Share/Sql.php:272 #, fuzzy, php-format msgid "Share ID %d does not exist." msgstr "Paylaşım numarası %d yok." #: lib/Horde/Share/Sql/Hierarchical.php:547 msgid "Share names are not supported in this driver" msgstr "" #: lib/Horde/Share/Object/Kolab.php:133 msgid "Tasks" msgstr "Görevler" #: lib/Horde/Share/Kolab.php:81 #, php-format msgid "The Horde/Kolab integration engine does not support \"%s\"" msgstr "Horde/Kolab bütünleştirme motoru desteklememektedir: \"%s\"" #: lib/Horde/Share/Object/Kolab.php:373 msgid "The Kolab share object has not been initialized yet!" msgstr "" #: lib/Horde/Share/Object/Kolab.php:153 #, fuzzy msgid "The share has already been initialized!" msgstr "Bu form zaten işlendi." Horde_Share-2.0.8/locale/uk/LC_MESSAGES/Horde_Share.mo0000664000175000017500000000260712654071446020211 0ustar janjan | !*3; AMh,8'%4(M,vW= <J   CalendarContactsFiltersNotesPreferencesShare "%s" does not exist.Share ID %d does not exist.Share names are not supported in this driverTasksThe Horde/Kolab integration engine does not support "%s"The share has already been initialized!Project-Id-Version: Horde_Share Report-Msgid-Bugs-To: dev@lists.horde.org POT-Creation-Date: 2010-10-13 01:27+0200 PO-Revision-Date: 2010-10-13 01:27+0200 Last-Translator: Andriy Kopystyansky Language-Team: Ukrainian MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2); КалендарКонтактиФільтриНотаткиНалаштуванняПісочниці "%s" не існує.Пісочниці з ID %d не існує.Назви пісочниць не підтримуються цим драйверомЗавданняHorde/Kolab інтеграція не підтримує "%s"Ця пісочниця вже ініціалізована!Horde_Share-2.0.8/locale/uk/LC_MESSAGES/Horde_Share.po0000664000175000017500000000420312654071446020206 0ustar janjan# Ukrainian translations for Horde_Share module. # Copyright 2010-2016 Horde LLC (http://www.horde.org/) # This file is distributed under the same license as the Horde_Share module. # msgid "" msgstr "" "Project-Id-Version: Horde_Share\n" "Report-Msgid-Bugs-To: dev@lists.horde.org\n" "POT-Creation-Date: 2010-10-13 01:27+0200\n" "PO-Revision-Date: 2010-10-13 01:27+0200\n" "Last-Translator: Andriy Kopystyansky \n" "Language-Team: Ukrainian \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n" "%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n" #: lib/Horde/Share/Object/Kolab.php:131 msgid "Calendar" msgstr "Календар" #: lib/Horde/Share/Object/Kolab.php:127 msgid "Contacts" msgstr "Контакти" #: lib/Horde/Share/Object/Kolab.php:135 msgid "Filters" msgstr "Фільтри" #: lib/Horde/Share/Object/Kolab.php:129 msgid "Notes" msgstr "Нотатки" #: lib/Horde/Share/Object/Kolab.php:137 msgid "Preferences" msgstr "Налаштування" #: lib/Horde/Share/Kolab.php:117 lib/Horde/Share/Sql.php:210 #, php-format msgid "Share \"%s\" does not exist." msgstr "Пісочниці \"%s\" не існує." #: lib/Horde/Share/Sql.php:272 #, php-format msgid "Share ID %d does not exist." msgstr "Пісочниці з ID %d не існує." #: lib/Horde/Share/Sql/Hierarchical.php:547 msgid "Share names are not supported in this driver" msgstr "Назви пісочниць не підтримуються цим драйвером" #: lib/Horde/Share/Object/Kolab.php:133 msgid "Tasks" msgstr "Завдання" #: lib/Horde/Share/Kolab.php:81 #, php-format msgid "The Horde/Kolab integration engine does not support \"%s\"" msgstr "Horde/Kolab інтеграція не підтримує \"%s\"" #: lib/Horde/Share/Object/Kolab.php:373 msgid "The Kolab share object has not been initialized yet!" msgstr "" #: lib/Horde/Share/Object/Kolab.php:153 msgid "The share has already been initialized!" msgstr "Ця пісочниця вже ініціалізована!" Horde_Share-2.0.8/locale/zh_CN/LC_MESSAGES/Horde_Share.mo0000664000175000017500000000125612654071446020572 0ustar janjanT 8B[ b lv})CalendarContactsFiltersNotesTasksThe Horde/Kolab integration engine does not support "%s"Project-Id-Version: Horde_Share Report-Msgid-Bugs-To: dev@lists.horde.org POT-Creation-Date: 2010-10-13 01:27+0200 PO-Revision-Date: 2010-10-13 01:27+0200 Last-Translator: Automatically generated Language-Team: i18n@lists.horde.org MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 日历联系人过滤器便签任务Horde/Kolab 集成引擎不支持“%s”Horde_Share-2.0.8/locale/zh_CN/LC_MESSAGES/Horde_Share.po0000664000175000017500000000343012654071446020571 0ustar janjan# Chinese translations for Horde_Share module. # Copyright 2010-2016 Horde LLC (http://www.horde.org/) # This file is distributed under the same license as the Horde_Share module. # Automatically generated, 2010. # msgid "" msgstr "" "Project-Id-Version: Horde_Share\n" "Report-Msgid-Bugs-To: dev@lists.horde.org\n" "POT-Creation-Date: 2010-10-13 01:27+0200\n" "PO-Revision-Date: 2010-10-13 01:27+0200\n" "Last-Translator: Automatically generated\n" "Language-Team: i18n@lists.horde.org\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: lib/Horde/Share/Object/Kolab.php:131 msgid "Calendar" msgstr "日历" #: lib/Horde/Share/Object/Kolab.php:127 msgid "Contacts" msgstr "联系人" #: lib/Horde/Share/Object/Kolab.php:135 msgid "Filters" msgstr "过滤器" #: lib/Horde/Share/Object/Kolab.php:129 msgid "Notes" msgstr "便签" #: lib/Horde/Share/Object/Kolab.php:137 msgid "Preferences" msgstr "" #: lib/Horde/Share/Kolab.php:117 lib/Horde/Share/Sql.php:210 #, fuzzy, php-format msgid "Share \"%s\" does not exist." msgstr "目录 %s 不存在" #: lib/Horde/Share/Sql.php:272 #, fuzzy, php-format msgid "Share ID %d does not exist." msgstr "目录 %s 不存在" #: lib/Horde/Share/Sql/Hierarchical.php:547 msgid "Share names are not supported in this driver" msgstr "" #: lib/Horde/Share/Object/Kolab.php:133 msgid "Tasks" msgstr "任务" #: lib/Horde/Share/Kolab.php:81 #, php-format msgid "The Horde/Kolab integration engine does not support \"%s\"" msgstr "Horde/Kolab 集成引擎不支持“%s”" #: lib/Horde/Share/Object/Kolab.php:373 msgid "The Kolab share object has not been initialized yet!" msgstr "" #: lib/Horde/Share/Object/Kolab.php:153 #, fuzzy msgid "The share has already been initialized!" msgstr "此表格已处理过。" Horde_Share-2.0.8/locale/zh_TW/LC_MESSAGES/Horde_Share.mo0000664000175000017500000000166612654071446020631 0ustar janjan l  ,,Hu8{B    9'W )  CalendarContactsFiltersNotesShare "%s" does not exist.Share ID %d does not exist.Share names are not supported in this driverTasksThe Horde/Kolab integration engine does not support "%s"Project-Id-Version: Horde_Share Report-Msgid-Bugs-To: dev@lists.horde.org POT-Creation-Date: 2010-10-13 01:27+0200 PO-Revision-Date: 2010-10-13 01:27+0200 Last-Translator: Automatically generated Language-Team: i18n@lists.horde.org MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 行事曆連絡人過濾器備忘錄共享 "%s" 並不存在.共享號碼 %d 並不存在.此驅動程式並未支援共享名稱待辦事項Horde/Kolab 整合工程並未支援 "%s"Horde_Share-2.0.8/locale/zh_TW/LC_MESSAGES/Horde_Share.po0000664000175000017500000000352512654071446020630 0ustar janjan# Chinese translations for Horde_Share module. # Copyright 2010-2016 Horde LLC (http://www.horde.org/) # This file is distributed under the same license as the Horde_Share module. # Automatically generated, 2010. # msgid "" msgstr "" "Project-Id-Version: Horde_Share\n" "Report-Msgid-Bugs-To: dev@lists.horde.org\n" "POT-Creation-Date: 2010-10-13 01:27+0200\n" "PO-Revision-Date: 2010-10-13 01:27+0200\n" "Last-Translator: Automatically generated\n" "Language-Team: i18n@lists.horde.org\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: lib/Horde/Share/Object/Kolab.php:131 msgid "Calendar" msgstr "行事曆" #: lib/Horde/Share/Object/Kolab.php:127 msgid "Contacts" msgstr "連絡人" #: lib/Horde/Share/Object/Kolab.php:135 msgid "Filters" msgstr "過濾器" #: lib/Horde/Share/Object/Kolab.php:129 msgid "Notes" msgstr "備忘錄" #: lib/Horde/Share/Object/Kolab.php:137 msgid "Preferences" msgstr "" #: lib/Horde/Share/Kolab.php:117 lib/Horde/Share/Sql.php:210 #, php-format msgid "Share \"%s\" does not exist." msgstr "共享 \"%s\" 並不存在." #: lib/Horde/Share/Sql.php:272 #, php-format msgid "Share ID %d does not exist." msgstr "共享號碼 %d 並不存在." #: lib/Horde/Share/Sql/Hierarchical.php:547 msgid "Share names are not supported in this driver" msgstr "此驅動程式並未支援共享名稱" #: lib/Horde/Share/Object/Kolab.php:133 msgid "Tasks" msgstr "待辦事項" #: lib/Horde/Share/Kolab.php:81 #, php-format msgid "The Horde/Kolab integration engine does not support \"%s\"" msgstr "Horde/Kolab 整合工程並未支援 \"%s\"" #: lib/Horde/Share/Object/Kolab.php:373 msgid "The Kolab share object has not been initialized yet!" msgstr "" #: lib/Horde/Share/Object/Kolab.php:153 #, fuzzy msgid "The share has already been initialized!" msgstr "這個表單已被處理過." Horde_Share-2.0.8/locale/Horde_Share.pot0000664000175000017500000000133112654071446016165 0ustar janjan# SOME DESCRIPTIVE TITLE. # Copyright (C) YEAR Horde LLC (http://www.horde.org/) # This file is distributed under the same license as the Horde_Share package. # FIRST AUTHOR , YEAR. # #, fuzzy msgid "" msgstr "" "Project-Id-Version: Horde_Share \n" "Report-Msgid-Bugs-To: dev@lists.horde.org\n" "POT-Creation-Date: 2012-01-17 12:38+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" "Language: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=CHARSET\n" "Content-Transfer-Encoding: 8bit\n" #: lib/Horde/Share/Kolab.php:83 #, php-format msgid "The Horde/Kolab integration engine does not support \"%s\"" msgstr "" Horde_Share-2.0.8/test/Horde/Share/Kolab/MockTest.php0000664000175000017500000001410612654071446020377 0ustar janjan * @license http://www.horde.org/licenses/lgpl21 LGPL 2.1 * @link http://pear.horde.org/index.php?package=Share */ /** * Integration test for the Kolab driver based on the in-memory mock driver. * * Copyright 2011-2016 Horde LLC (http://www.horde.org/) * * See the enclosed file COPYING for license information (LGPL). If you * did not receive this file, see http://www.horde.org/licenses/lgpl21. * * @category Horde * @package Share * @subpackage UnitTests * @author Gunnar Wrobel * @license http://www.horde.org/licenses/lgpl21 LGPL 2.1 * @link http://pear.horde.org/index.php?package=Share */ class Horde_Share_Kolab_MockTest extends Horde_Share_TestBase { private static $_data; private static $_shares = array(); protected static $cache; public static function setUpBeforeClass() { if (!class_exists('Horde_Kolab_Storage_Driver_Mock_Data')) { return; } self::$_data = new Horde_Kolab_Storage_Driver_Mock_Data( array( '' => array('permissions' => array('anyone' => 'alrid')), 'user/john' => array('permissions' => array('anyone' => 'alrid')), 'user/jane' => array('permissions' => array('anyone' => 'alrid')), ) ); self::$cache = new Horde_Cache(new Horde_Cache_Storage_Mock()); $group = new Horde_Share_Stub_Group(); // FIXME $GLOBALS['injector'] = new Horde_Injector(new Horde_Injector_TopLevel()); $GLOBALS['injector']->setInstance('Horde_Group', $group); foreach (array('john', 'jane', '') as $user) { self::$_shares[$user] = new Horde_Share_Kolab( 'mnemo', $user, new Horde_Perms_Null(), $group ); $factory = new Horde_Kolab_Storage_Factory( array( 'driver' => 'mock', 'params' => array( 'data' => self::$_data, 'username' => $user ), 'queries' => array( 'list' => array( Horde_Kolab_Storage_List_Tools::QUERY_BASE => array( 'cache' => true ), Horde_Kolab_Storage_List_Tools::QUERY_ACL => array( 'cache' => true ), Horde_Kolab_Storage_List_Tools::QUERY_SHARE => array( 'cache' => true ), ) ), 'cache' => self::$cache, 'logger' => new Horde_Log_Logger() ) ); $storage = $factory->create(); $factory->getDriver()->setGroups( array('john' => array('mygroup')) ); self::$_shares[$user]->setStorage($storage); } } public function setUp() { if (!interface_exists('Horde_Kolab_Storage')) { $this->markTestSkipped('The Kolab_Storage package seems to be unavailable.'); } self::$share = self::$_shares['john']; self::$share->getStorage()->getList()->getListSynchronization()->synchronize(); } public function testGetApp() { $this->getApp('mnemo'); } public function testAddShare() { $share = parent::addShare(); $this->assertInstanceOf('Horde_Share_Object_Kolab', $share); } /** * @depends testAddShare */ public function testPermissions() { $this->permissions(); } /** * @depends testAddShare */ public function testExists() { $this->exists(); } /** * @depends testPermissions */ public function testCountShares() { $this->countShares(); } /** * @depends testPermissions */ public function testGetShare() { $share = $this->getShare(); $this->assertInstanceOf('Horde_Share_Object_Kolab', $share); } /** * @depends testAddShare */ public function testHierarchy() { $this->hierarchy(); } /** * @depends testGetShare */ public function testGetShareById() { $this->getShareById(); } /** * @depends testGetShare */ public function testGetShares() { $this->getShares(); } /** * @depends testPermissions */ public function testListAllShares() { $this->listAllShares(); } /** * @depends testPermissions */ public function testListShares() { $this->listShares(); } /** * @depends testPermissions */ public function testListSystemShares() { $this->listSystemShares(); } /** * @depends testPermissions */ public function testGetPermission() { return $this->getPermission(); } /** * @depends testPermissions */ public function testRemoveUserPermissions() { $this->removeUserPermissions(); } /** * @depends testRemoveUserPermissions */ public function testRemoveGroupPermissions() { $this->removeGroupPermissions(); } /** * @depends testGetShare */ public function testRemoveShare() { $this->removeShare(); } public function testCallback() { $this->callbackSetShareOb(new Horde_Share_Object_Sql(array())); } protected function switchAuth($user) { self::$share = self::$_shares[$user]; self::$share->getStorage()->getList()->getListSynchronization()->synchronize(); } protected function getCache() { return self::$cache; } } /** NOTES - Check extra API calls in SQL driver - add server test */ Horde_Share-2.0.8/test/Horde/Share/Kolab/UnitTest.php0000664000175000017500000005366312654071446020440 0ustar janjan * @license http://www.horde.org/licenses/lgpl21 LGPL 2.1 * @link http://pear.horde.org/index.php?package=Share */ /** * Unit testing for the Kolab driver. * * Copyright 2011-2016 Horde LLC (http://www.horde.org/) * * See the enclosed file COPYING for license information (LGPL). If you * did not receive this file, see http://www.horde.org/licenses/lgpl21. * * @category Horde * @package Share * @subpackage UnitTests * @author Gunnar Wrobel * @license http://www.horde.org/licenses/lgpl21 LGPL 2.1 * @link http://pear.horde.org/index.php?package=Share */ class Horde_Share_Kolab_UnitTest extends PHPUnit_Framework_TestCase { public function setUp() { if (!interface_exists('Horde_Kolab_Storage')) { $this->markTestSkipped('The Kolab_Storage package seems to be unavailable.'); } } public function testGetStorage() { $storage = $this->getMock('Horde_Kolab_Storage'); $list = $this->getMock('Horde_Kolab_Storage_List'); $storage->expects($this->once()) ->method('getList') ->will($this->returnValue($list)); $driver = $this->_getDriver(); $driver->setStorage($storage); $this->assertSame($list, $driver->getList()); } /** * @expectedException Horde_Share_Exception */ public function testStorageMissing() { $driver = $this->_getDriver(); $driver->getStorage(); } public function testListArray() { $this->assertInternalType( 'array', $this->_getCompleteDriver()->listShares('john') ); } public function testGetTypeString() { $driver = new Horde_Share_Kolab( 'mnemo', 'john', new Horde_Perms_Null(), new Horde_Share_Stub_Group() ); $this->assertInternalType('string', $driver->getType()); } public function testMnemoSupport() { $driver = new Horde_Share_Kolab( 'mnemo', 'john', new Horde_Perms_Null(), new Horde_Share_Stub_Group() ); $this->assertEquals('note', $driver->getType()); } public function testKronolithSupport() { $driver = new Horde_Share_Kolab( 'kronolith', 'john', new Horde_Perms_Null(), new Horde_Share_Stub_Group() ); $this->assertEquals('event', $driver->getType()); } public function testTurbaSupport() { $driver = new Horde_Share_Kolab( 'turba', 'john', new Horde_Perms_Null(), new Horde_Share_Stub_Group() ); $this->assertEquals('contact', $driver->getType()); } public function testNagSupport() { $driver = new Horde_Share_Kolab( 'nag', 'john', new Horde_Perms_Null(), new Horde_Share_Stub_Group() ); $this->assertEquals('task', $driver->getType()); } /** * @expectedException Horde_Share_Exception */ public function testSupportException() { $driver = new Horde_Share_Kolab( 'NOTSUPPORTED', 'john', new Horde_Perms_Null(), new Horde_Share_Stub_Group() ); } public function testListIds() { $this->assertEquals( array('internal_id'), array_keys( $this->_getPrefilledDriver()->listShares('john') ) ); } /** * @expectedException Horde_Share_Exception */ public function testUndefinedId() { $object = new Horde_Share_Object_Kolab(null, new Horde_Group_Mock()); $object->getId(); } /** * @expectedException Horde_Share_Exception */ public function testUndefinedName() { $object = new Horde_Share_Object_Kolab(null, new Horde_Group_Mock()); $object->getName(); } public function testUndefinedPermissionId() { $object = new Horde_Share_Object_Kolab(null, new Horde_Group_Mock()); $this->assertInternalType( 'string', $object->getPermissionId() ); } public function testIdFromName() { $share = $this->_getCompleteDriver(); $object = $share->newShare('john', 'IGNORED', 'test'); $this->assertEquals( array('john', 'test', 'INBOX'), $this->_decodeId($object->getId()) ); } public function testObjectId() { $object = new Horde_Share_Object_Kolab('test', new Horde_Group_Mock()); $this->assertEquals('test', $object->getId()); } public function testObjectName() { $object = new Horde_Share_Object_Kolab('test', new Horde_Group_Mock()); $this->assertEquals('test', $object->getName()); } public function testGetShare() { $result = $this->_decodeId( $this->_getPrefilledDriver()->getShare('internal_id')->getId() ); $this->assertContains('john', $result); $this->assertContains('Calendar', $result); } public function testGetShareName() { $this->assertEquals( 'internal_id', $this->_getPrefilledDriver()->getShare('internal_id')->getName() ); } public function testExistsByName() { $this->assertTrue( $this->_getPrefilledDriver()->exists('internal_id') ); } public function testDoesNotExists() { $this->assertFalse( $this->_getPrefilledDriver()->exists($this->_getId('john', 'DOES_NOT_EXIST')) ); } public function testIdExists() { $this->assertTrue( $this->_getPrefilledDriver()->idExists($this->_getId('john', 'Calendar')) ); } public function testIdDoesNotExists() { $this->assertFalse( $this->_getPrefilledDriver()->idExists($this->_getId('john', 'DOES_NOT_EXIST')) ); } public function testGetShareById() { $this->assertEquals( array('john', 'Calendar'), $this->_decodeId( $this->_getPrefilledDriver() ->getShareById($this->_getId('john', 'Calendar')) ->getId() ) ); } /** * @expectedException Horde_Exception_NotFound */ public function testMissingShare() { $this->_getPrefilledDriver()->getShareById('DOES_NOT_EXIST'); } public function testShareOwner() { $this->assertEquals( 'john', $this->_getPrefilledDriver() ->getShareById($this->_getId('john', 'Calendar')) ->get('owner') ); } public function testShareName() { $this->assertEquals( 'Calendar', $this->_getPrefilledDriver() ->getShareById($this->_getId('john', 'Calendar')) ->get('name') ); } public function testShareDescription() { $this->assertEquals( 'DESCRIPTION', $this->_getPrefilledDriver() ->getShareById($this->_getId('john', 'Calendar')) ->get('desc') ); } public function testShareShareName() { $this->assertEquals( 'internal_id', $this->_getPrefilledDriver() ->getShareById($this->_getId('john', 'Calendar')) ->get('share_name') ); } public function testShareFolder() { $this->assertEquals( 'INBOX/Calendar', $this->_getPrefilledDriver() ->getShareById($this->_getId('john', 'Calendar')) ->get('folder') ); } public function testShareData() { $share = $this->_getPrefilledDriver() ->getShareById($this->_getId('john', 'Calendar')); $share->set('other', 'OTHER'); $share->save(); $this->assertEquals( array( 'other' => 'OTHER', 'share_name' => 'internal_id' ), $this->list ->getQuery(Horde_Kolab_Storage_List_Tools::QUERY_SHARE) ->getParameters('INBOX/Calendar') ); } public function testSetDefault() { $share = $this->_getPrefilledDriver() ->getShareById($this->_getId('john', 'Calendar')); $share->set('default', true); $share->save(); $this->assertTrue( $this->_getPrefilledDriver() ->getShareById($this->_getId('john', 'Calendar')) ->get('default') ); } public function testNewShare() { $this->assertEquals( 'john', $this->_getPrefilledDriver() ->newShare('john', 'IGNORE', 'test') ->get('owner') ); } public function testNewShareSupportsName() { $this->assertEquals( 'SHARE', $this->_getPrefilledDriver() ->newShare('john', 'SHARE', 'test') ->getName() ); } public function testNewShareData() { $share = $this->_getPrefilledDriver() ->newShare('john', 'SHARE', 'test'); $share->set('other', 'OTHER'); $share->save(); $result = $this->list ->getQuery(Horde_Kolab_Storage_List_Tools::QUERY_SHARE) ->getParameters('INBOX/test'); $this->assertEquals( array( 'other' => 'OTHER', 'share_name' => 'SHARE' ), $result ); } public function testNewShareDelimiter() { $this->assertEquals( '/', $this->_getPrefilledDriver() ->newShare('john', 'IGNORE', 'test') ->get('delimiter') ); } public function testNewShareSubpath() { $this->assertEquals( 'test', $this->_getPrefilledDriver() ->newShare('john', 'IGNORE', 'test') ->get('subpath') ); } public function testNewShareFolder() { $this->assertEquals( 'INBOX/test', $this->_getPrefilledDriver() ->newShare('john', 'IGNORE', 'test') ->get('folder') ); } public function testNewShareType() { $this->assertEquals( 'event', $this->_getPrefilledDriver() ->newShare('john', 'IGNORE', 'test') ->get('type') ); } public function testAddShare() { $share = $this->_getPrefilledDriver(); $object = $share->newShare('john', 'IGNORED', 'Test'); $share->addShare($object); $this->assertEquals( array('john', 'Test'), $this->_decodeId( $share->getShareById($this->_getId('john', 'Test'))->getId() ) ); } public function testShareAddedToList() { $share = $this->_getPrefilledDriver(); $object = $share->newShare('john', 'SHARE_NAME', 'Test'); $share->addShare($object); $this->assertContains( 'SHARE_NAME', array_keys($share->listShares('john')) ); } public function testDeleteShare() { $share = $this->_getPrefilledDriver(); $object = $share->newShare('john', 'NAME', 'Test'); $share->addShare($object); $share->removeShare($object); $this->assertNotContains( 'NAME', array_keys($share->listShares('john')) ); } public function testGetPermission() { $share = $this->_getPrefilledDriver(); $object = $share->newShare('john', 'IGNORED', 'Test'); $object->addUserPermission('tina', Horde_Perms::SHOW); $share->addShare($object); $this->assertEquals( array('tina' => Horde_Perms::SHOW), $share->getShareById($this->_getId('john', 'Test')) ->getPermission()->getUserPermissions() ); } public function testSetPermission() { $share = $this->_getPrefilledDriver(); $object = $share->newShare('john', 'IGNORED', 'Test'); $object->addUserPermission('tina', Horde_Perms::SHOW); $share->addShare($object); $this->assertTrue( $share->getShareById($this->_getId('john', 'Test')) ->hasPermission('tina', Horde_Perms::SHOW) ); } public function testOwnerPermission() { $share = $this->_getPrefilledDriver(); $object = $share->newShare('john', 'IGNORED', 'Test'); $share->addShare($object); $this->assertTrue( $share->getShareById($this->_getId('john', 'Test')) ->hasPermission('john', Horde_Perms::SHOW) ); } public function testNewShareName() { $share = $this->_getCompleteDriver(); $object = $share->newShare('john', 'NAME', 'test'); $this->assertEquals('NAME', $object->get('share_name')); } public function testConstructFolderName() { $share = $this->_getCompleteDriver(); $this->assertEquals('INBOX/test', $share->constructFolderName('john', 'test')); } /** * @expectedException Horde_Share_Exception */ public function testConstructFolderNameInComplexNamespace() { $share = $this->_getComplexNamespaceDriver(); $this->assertEquals('INBOX/test', $share->constructFolderName('john', 'test')); } public function testConstructFolderNameInInbox() { $share = $this->_getComplexNamespaceDriver(); $this->assertEquals('INBOX/test', $share->constructFolderName('john', 'test', 'INBOX')); } public function testConstructFolderNameInSecond() { $share = $this->_getComplexNamespaceDriver(); $this->assertEquals('SECOND/test', $share->constructFolderName('john', 'test', 'SECOND')); } public function testSetDescription() { $share = $this->_getPrefilledDriver() ->getShareById($this->_getId('john', 'Calendar')); $share->set('desc', 'NEW'); $share->save(); $query = $this->assertEquals( 'NEW', $this->list ->getQuery(Horde_Kolab_Storage_List_Tools::QUERY_SHARE) ->getDescription('INBOX/Calendar') ); } public function testSetData() { $share = $this->_getPrefilledDriver() ->getShareById($this->_getId('john', 'Calendar')); $share->set('other', 'OTHER'); $share->save(); $result = $this->list ->getQuery(Horde_Kolab_Storage_List_Tools::QUERY_SHARE) ->getParameters('INBOX/Calendar'); $this->assertEquals('OTHER', $result['other']); $this->assertEquals('internal_id', $result['share_name']); } public function testListShareCache() { $storage = $this->getMock('Horde_Kolab_Storage'); $list = $this->getMock('Horde_Kolab_Storage_List_Tools', array(), array(), '', false, false); $query = $this->getMock('Horde_Kolab_Storage_List_Query_List'); $query->expects($this->once()) ->method('listByType') ->will($this->returnValue(array())); $list->expects($this->exactly(3)) ->method('getQuery') ->will($this->returnValue($query)); $storage->expects($this->exactly(3)) ->method('getList') ->will($this->returnValue($list)); $driver = $this->_getDriver(); $driver->setStorage($storage); $driver->listShares('test'); $driver->listShares('test'); } public function testEditableShares() { $this->assertEquals( 1, count( $this->_getPermissionDriver() ->listShares('john', array('perm' => Horde_Perms::EDIT)) ) ); } public function testRootLevel() { $this->assertEquals( 3, count( $this->_getHierarchyDriver() ->listShares('john', array('all_levels' => false)) ) ); } private function _getPrefilledDriver() { return $this->_getDriverWithData($this->_getPrefilledData()); } private function _getCompleteDriver() { return $this->_getDriverWithData($this->_getCompleteData()); } private function _getPermissionDriver() { return $this->_getDriverWithData($this->_getPermissionData()); } private function _getHierarchyDriver() { return $this->_getDriverWithData($this->_getHierarchyData()); } private function _getComplexNamespaceDriver() { return $this->_getDriverWithData($this->_getComplexNamespaceData()); } private function _getDriverWithData($data) { $factory = new Horde_Kolab_Storage_Factory( array( 'driver' => 'mock', 'queries' => array( 'list' => array( Horde_Kolab_Storage_List_Tools::QUERY_BASE => array( 'cache' => true ), Horde_Kolab_Storage_List_Tools::QUERY_ACL => array( 'cache' => true ), Horde_Kolab_Storage_List_Tools::QUERY_SHARE => array( 'cache' => true ), ) ), 'params' => $data, 'cache' => new Horde_Cache( new Horde_Cache_Storage_Mock() ), 'logger' => new Horde_Log_Logger() ) ); $driver = $this->_getDriver('kronolith'); $this->storage = $factory->create(); $this->list = $this->storage->getList(); $this->list->getListSynchronization()->synchronize(); $driver->setStorage($this->storage); return $driver; } private function _getPrefilledData() { return array( 'username' => 'john', 'data' => $this->_getMockData( array( 'user/john' => array(), 'user/john/Calendar' => array( 'a' => array( '/shared/vendor/kolab/folder-type' => 'event.default', '/shared/comment' => 'DESCRIPTION', '/shared/vendor/horde/share-params' => base64_encode(serialize(array('share_name' => 'internal_id'))), ), ), ) ), ); } private function _getCompleteData() { return array( 'username' => 'john', 'data' => $this->_getMockData( array( 'user/john' => null, ) ), ); } private function _getComplexNamespaceData() { return array( 'username' => 'john', 'data' => $this->_getMockData( array( 'user/john' => null, ) ), 'namespaces' => array( array( 'type' => Horde_Kolab_Storage_Folder_Namespace::PERSONAL, 'name' => 'INBOX/', 'delimiter' => '/', 'add' => true, ), array( 'type' => Horde_Kolab_Storage_Folder_Namespace::PERSONAL, 'name' => 'SECOND/', 'delimiter' => '/', 'add' => true, ), ) ); } private function _getPermissionData() { return array( 'username' => 'john', 'data' => $this->_getMockData( array( 'user/john' => array(), 'user/john/Calendar' => array( 't' => 'event.default', 'p' => array('john' => 'alrid'), ), 'user/john/Listable' => array( 't' => 'event', 'p' => array('john' => 'l'), ), ) ), ); } private function _getHierarchyData() { return array( 'username' => 'john', 'data' => $this->_getMockData( array( 'user/john' => array(), 'user/john/Calendar' => array('t' => 'event.default'), 'user/john/Calendar/Private' => null, 'user/john/Calendar/Private/Family' => array('t' => 'event'), 'user/john/Calendar/Private/Family/Cooking' => array('t' => 'event'), 'user/john/Calendar/Private/Family/Party' => array('t' => 'event'), 'user/john/Work' => array('t' => 'event'), ) ), ); } private function _getDriver($app = 'mnemo') { return new Horde_Share_Kolab( $app, 'john', new Horde_Perms_Null(), new Horde_Share_Stub_Group() ); } private function _getMockData($elements) { $result = array(); foreach ($elements as $path => $element) { if (!isset($element['p'])) { $folder = array('permissions' => array('anyone' => 'alrid')); } else { $folder = array('permissions' => $element['p']); } if (isset($element['a'])) { $folder['annotations'] = $element['a']; } if (isset($element['t'])) { $folder['annotations'] = array( '/shared/vendor/kolab/folder-type' => $element['t'], ); } $result[$path] = $folder; } return $result; } private function _getId($owner, $name) { return base64_encode(serialize(array($owner, $name))); } private function _decodeId($id) { return unserialize(base64_decode($id)); } } Horde_Share-2.0.8/test/Horde/Share/migration/sql.php0000664000175000017500000000451712654071446020413 0ustar janjandropTable('test_shares'); $migration->dropTable('test_shares_groups'); $migration->dropTable('test_shares_users'); } catch (Horde_Db_Exception $e) { } $t = $migration->createTable('test_shares', array('autoincrementKey' => 'share_id')); $t->column('share_name', 'string', array('limit' => 255, 'null' => false)); $t->column('share_owner', 'string', array('limit' => 255)); $t->column('share_parents', 'string', array('limit' => 4000)); $t->column('share_flags', 'integer', array('default' => 0, 'null' => false)); $t->column('perm_creator', 'integer', array('default' => 0, 'null' => false)); $t->column('perm_default', 'integer', array('default' => 0, 'null' => false)); $t->column('perm_guest', 'integer', array('default' => 0, 'null' => false)); $t->column('attribute_name', 'string', array('limit' => 255)); $t->column('attribute_desc', 'string', array('limit' => 255)); $t->end(); $migration->addIndex('test_shares', array('share_name')); $migration->addIndex('test_shares', array('share_owner')); $migration->addIndex('test_shares', array('perm_creator')); $migration->addIndex('test_shares', array('perm_default')); $migration->addIndex('test_shares', array('perm_guest')); $t = $migration->createTable('test_shares_groups'); $t->column('share_id', 'integer', array('null' => false)); $t->column('group_uid', 'string', array('limit' => 255, 'null' => false)); $t->column('perm', 'integer', array('null' => false)); $t->end(); $migration->addIndex('test_shares_groups', array('share_id')); $migration->addIndex('test_shares_groups', array('group_uid')); $migration->addIndex('test_shares_groups', array('perm')); $t = $migration->createTable('test_shares_users'); $t->column('share_id', 'integer', array('null' => false)); $t->column('user_uid', 'string', array('limit' => 255)); $t->column('perm', 'integer', array('null' => false)); $t->end(); $migration->addIndex('test_shares_users', array('share_id')); $migration->addIndex('test_shares_users', array('user_uid')); $migration->addIndex('test_shares_users', array('perm')); $migration->migrate('up'); } Horde_Share-2.0.8/test/Horde/Share/migration/sqlng.php0000664000175000017500000001256512654071446020742 0ustar janjandropTable('test_shares'); $migration->dropTable('test_shares_groups'); $migration->dropTable('test_shares_users'); } catch (Horde_Db_Exception $e) { } $t = $migration->createTable('test_shares', array('autoincrementKey' => 'share_id')); $t->column('share_name', 'string', array('limit' => 255, 'null' => false)); $t->column('share_owner', 'string', array('limit' => 255)); $t->column('share_parents', 'string', array('limit' => 4000)); $t->column('share_flags', 'integer', array('default' => 0, 'null' => false)); $t->column('perm_creator_' . Horde_Perms::SHOW, 'boolean', array('default' => false, 'null' => false)); $t->column('perm_creator_' . Horde_Perms::READ, 'boolean', array('default' => false, 'null' => false)); $t->column('perm_creator_' . Horde_Perms::EDIT, 'boolean', array('default' => false, 'null' => false)); $t->column('perm_creator_' . Horde_Perms::DELETE, 'boolean', array('default' => false, 'null' => false)); $t->column('perm_default_' . Horde_Perms::SHOW, 'boolean', array('default' => false, 'null' => false)); $t->column('perm_default_' . Horde_Perms::READ, 'boolean', array('default' => false, 'null' => false)); $t->column('perm_default_' . Horde_Perms::EDIT, 'boolean', array('default' => false, 'null' => false)); $t->column('perm_default_' . Horde_Perms::DELETE, 'boolean', array('default' => false, 'null' => false)); $t->column('perm_guest_' . Horde_Perms::SHOW, 'boolean', array('default' => false, 'null' => false)); $t->column('perm_guest_' . Horde_Perms::READ, 'boolean', array('default' => false, 'null' => false)); $t->column('perm_guest_' . Horde_Perms::EDIT, 'boolean', array('default' => false, 'null' => false)); $t->column('perm_guest_' . Horde_Perms::DELETE, 'boolean', array('default' => false, 'null' => false)); $t->column('attribute_name', 'string', array('limit' => 255)); $t->column('attribute_desc', 'string', array('limit' => 255)); $t->end(); $migration->addIndex('test_shares', array('share_name')); $migration->addIndex('test_shares', array('share_owner')); $migration->addIndex('test_shares', array('perm_creator_' . Horde_Perms::SHOW)); $migration->addIndex('test_shares', array('perm_creator_' . Horde_Perms::READ)); $migration->addIndex('test_shares', array('perm_creator_' . Horde_Perms::EDIT)); $migration->addIndex('test_shares', array('perm_creator_' . Horde_Perms::DELETE)); $migration->addIndex('test_shares', array('perm_default_' . Horde_Perms::SHOW)); $migration->addIndex('test_shares', array('perm_default_' . Horde_Perms::READ)); $migration->addIndex('test_shares', array('perm_default_' . Horde_Perms::EDIT)); $migration->addIndex('test_shares', array('perm_default_' . Horde_Perms::DELETE)); $migration->addIndex('test_shares', array('perm_guest_' . Horde_Perms::SHOW)); $migration->addIndex('test_shares', array('perm_guest_' . Horde_Perms::READ)); $migration->addIndex('test_shares', array('perm_guest_' . Horde_Perms::EDIT)); $migration->addIndex('test_shares', array('perm_guest_' . Horde_Perms::DELETE)); $t = $migration->createTable('test_shares_groups'); $t->column('share_id', 'integer', array('null' => false)); $t->column('group_uid', 'string', array('limit' => 255, 'null' => false)); $t->column('perm_' . Horde_Perms::SHOW, 'boolean', array('default' => false, 'null' => false)); $t->column('perm_' . Horde_Perms::READ, 'boolean', array('default' => false, 'null' => false)); $t->column('perm_' . Horde_Perms::EDIT, 'boolean', array('default' => false, 'null' => false)); $t->column('perm_' . Horde_Perms::DELETE, 'boolean', array('default' => false, 'null' => false)); $t->end(); $migration->addIndex('test_shares_groups', array('share_id')); $migration->addIndex('test_shares_groups', array('group_uid')); $migration->addIndex('test_shares_groups', array('perm_' . Horde_Perms::SHOW)); $migration->addIndex('test_shares_groups', array('perm_' . Horde_Perms::READ)); $migration->addIndex('test_shares_groups', array('perm_' . Horde_Perms::EDIT)); $migration->addIndex('test_shares_groups', array('perm_' . Horde_Perms::DELETE)); $t = $migration->createTable('test_shares_users'); $t->column('share_id', 'integer', array('null' => false)); $t->column('user_uid', 'string', array('limit' => 255)); $t->column('perm_' . Horde_Perms::SHOW, 'boolean', array('default' => false, 'null' => false)); $t->column('perm_' . Horde_Perms::READ, 'boolean', array('default' => false, 'null' => false)); $t->column('perm_' . Horde_Perms::EDIT, 'boolean', array('default' => false, 'null' => false)); $t->column('perm_' . Horde_Perms::DELETE, 'boolean', array('default' => false, 'null' => false)); $t->end(); $migration->addIndex('test_shares_users', array('share_id')); $migration->addIndex('test_shares_users', array('user_uid')); $migration->addIndex('test_shares_users', array('perm_' . Horde_Perms::SHOW)); $migration->addIndex('test_shares_users', array('perm_' . Horde_Perms::READ)); $migration->addIndex('test_shares_users', array('perm_' . Horde_Perms::EDIT)); $migration->addIndex('test_shares_users', array('perm_' . Horde_Perms::DELETE)); $migration->migrate('up'); } Horde_Share-2.0.8/test/Horde/Share/Sql/Pdo/MysqlTest.php0000664000175000017500000000206112654071446021041 0ustar janjan * @category Horde * @package Share * @subpackage UnitTests * @license http://www.horde.org/licenses/lgpl21 LGPL 2.1 */ class Horde_Share_Sql_Pdo_MysqlTest extends Horde_Share_Test_Sql_Base { public static function setUpBeforeClass() { if (!extension_loaded('pdo') || !in_array('mysql', PDO::getAvailableDrivers())) { self::$reason = 'No mysql extension or no mysql PDO driver'; return; } $config = self::getConfig('SHARE_SQL_PDO_MYSQL_TEST_CONFIG', __DIR__ . '/../..'); if ($config && !empty($config['share']['sql']['pdo_mysql'])) { self::$db = new Horde_Db_Adapter_Pdo_Mysql($config['share']['sql']['pdo_mysql']); parent::setUpBeforeClass(); } else { self::$reason = 'No pdo_mysql configuration'; } } } Horde_Share-2.0.8/test/Horde/Share/Sql/Pdo/PgsqlTest.php0000664000175000017500000000206112654071446021022 0ustar janjan * @category Horde * @package Share * @subpackage UnitTests * @license http://www.horde.org/licenses/lgpl21 LGPL 2.1 */ class Horde_Share_Sql_Pdo_PgsqlTest extends Horde_Share_Test_Sql_Base { public static function setUpBeforeClass() { if (!extension_loaded('pdo') || !in_array('pgsql', PDO::getAvailableDrivers())) { self::$reason = 'No pgsql extension or no pgsql PDO driver'; return; } $config = self::getConfig('SHARE_SQL_PDO_PGSQL_TEST_CONFIG', __DIR__ . '/../..'); if ($config && !empty($config['share']['sql']['pdo_pgsql'])) { self::$db = new Horde_Db_Adapter_Pdo_Pgsql($config['share']['sql']['pdo_pgsql']); parent::setUpBeforeClass(); } else { self::$reason = 'No pdo_pgsql configuration'; } } } Horde_Share-2.0.8/test/Horde/Share/Sql/Pdo/SqliteTest.php0000664000175000017500000000131212654071446021173 0ustar janjan * @category Horde * @package Share * @subpackage UnitTests * @license http://www.horde.org/licenses/lgpl21 LGPL 2.1 */ class Horde_Share_Sql_Pdo_SqliteTest extends Horde_Share_Test_Sql_Base { public static function setUpBeforeClass() { $factory_db = new Horde_Test_Factory_Db(); try { self::$db = $factory_db->create(); parent::setUpBeforeClass(); } catch (Horde_Test_Exception $e) { self::$reason = 'Sqlite not available'; } } } Horde_Share-2.0.8/test/Horde/Share/Sql/Base.php0000664000175000017500000001110512654071446017223 0ustar janjan * @category Horde * @package Share * @subpackage UnitTests * @license http://www.horde.org/licenses/lgpl21 LGPL 2.1 */ class Horde_Share_Test_Sql_Base extends Horde_Share_TestBase { protected static $db; protected static $reason; public function testGetApp() { $this->getApp('test'); } public function testSetTable() { $this->assertEquals('test_shares', self::$share->getTable()); self::$share->setTable('foo'); $this->assertEquals('foo', self::$share->getTable()); self::$share->setTable('test_shares'); } public function testSetStorage() { self::$share->setStorage(self::$db); $this->assertEquals(self::$db, self::$share->getStorage()); } public function testAddShare() { $share = $this->addShare(); $this->assertInstanceOf('Horde_Share_Object_Sql', $share); } /** * @depends testAddShare */ public function testPermissions() { $this->permissions(); } /** * @depends testAddShare */ public function testExists() { $this->exists(); } /** * @depends testPermissions */ public function testCountShares() { $this->countShares(); } /** * @depends testPermissions */ public function testGetShare() { $share = $this->getShare(); $this->assertInstanceOf('Horde_Share_Object_Sql', $share); } /** * @depends testAddShare */ public function testHierarchy() { $this->hierarchy(); } /** * @depends testGetShare */ public function testGetShareById() { $this->getShareById(); } /** * @depends testGetShare */ public function testGetShares() { $this->getShares(); } /** * @depends testPermissions */ public function testListOwners() { $owners = self::$share->listOwners(); $this->assertInternalType('array', $owners); $this->assertTrue(in_array('john', $owners)); } /** * @depends testPermissions */ public function testCountOwners() { $count = self::$share->countOwners(); $this->assertTrue($count > 0); } /** * @depends testPermissions */ public function testListAllShares() { $this->listAllShares(); } /** * @depends testPermissions */ public function testListShares() { $this->listShares(); } /** * @depends testPermissions */ public function testListSystemShares() { $this->listSystemShares(); } /** * @depends testPermissions */ public function testGetPermission() { return $this->getPermission(); } /** * @depends testPermissions */ public function testRemoveUserPermissions() { return $this->removeUserPermissions(); } /** * @depends testRemoveUserPermissions */ public function testRemoveGroupPermissions() { $this->removeGroupPermissions(); } /** * @depends testGetShare */ public function testRemoveShare() { $this->removeShare(); } /** * @depends testGetShare */ public function testRenameShare() { $this->renameShare(); } public function testCallback() { $this->callbackSetShareOb(new Horde_Share_Object_Sql(array())); } public static function setUpBeforeClass() { require_once __DIR__ . '/../migration/sql.php'; migrate_sql(self::$db); $group = new Horde_Share_Stub_Group(); self::$share = new Horde_Share_Sql('test', 'john', new Horde_Perms_Sql(array('db' => self::$db)), $group); self::$share->setStorage(self::$db); // FIXME $GLOBALS['injector'] = new Horde_Injector(new Horde_Injector_TopLevel()); $GLOBALS['injector']->setInstance('Horde_Group', $group); } public static function tearDownAfterClass() { if (self::$db) { $migration = new Horde_Db_Migration_Base(self::$db); $migration->dropTable('test_shares'); $migration->dropTable('test_shares_groups'); $migration->dropTable('test_shares_users'); self::$db->disconnect(); self::$db = null; } } public function setUp() { if (!self::$db) { $this->markTestSkipped(self::$reason); } } } Horde_Share-2.0.8/test/Horde/Share/Sql/MysqliTest.php0000664000175000017500000000171012654071446020470 0ustar janjan * @category Horde * @package Share * @subpackage UnitTests * @license http://www.horde.org/licenses/lgpl21 LGPL 2.1 */ class Horde_Share_Sql_MysqliTest extends Horde_Share_Test_Sql_Base { public static function setUpBeforeClass() { if (!extension_loaded('mysqli')) { self::$reason = 'No mysqli extension'; return; } $config = self::getConfig('SHARE_SQL_MYSQLI_TEST_CONFIG', __DIR__ . '/..'); if ($config && !empty($config['share']['sql']['mysqli'])) { self::$db = new Horde_Db_Adapter_Mysqli($config['share']['sql']['mysqli']); parent::setUpBeforeClass(); } else { self::$reason = 'No mysqli configuration'; } } } Horde_Share-2.0.8/test/Horde/Share/Sql/MysqlTest.php0000664000175000017500000000170012654071446020316 0ustar janjan * @category Horde * @package Share * @subpackage UnitTests * @license http://www.horde.org/licenses/lgpl21 LGPL 2.1 */ class Horde_Share_Sql_MysqlTest extends Horde_Share_Test_Sql_Base { public static function setUpBeforeClass() { if (!extension_loaded('mysql')) { self::$reason = 'No mysql extension'; return; } $config = self::getConfig('SHARE_SQL_MYSQL_TEST_CONFIG', __DIR__ . '/..'); if ($config && !empty($config['share']['sql']['mysql'])) { self::$db = new Horde_Db_Adapter_Mysql($config['share']['sql']['mysql']); parent::setUpBeforeClass(); } else { self::$reason = 'No mysql configuration'; } } } Horde_Share-2.0.8/test/Horde/Share/Sql/Oci8Test.php0000664000175000017500000000201712654071446020015 0ustar janjan * @category Horde * @package Share * @subpackage UnitTests * @license http://www.horde.org/licenses/lgpl21 LGPL 2.1 */ class Horde_Share_Sql_Oci8Test extends Horde_Share_Test_Sql_Base { public static function setUpBeforeClass() { if (!extension_loaded('oci8')) { self::$reason = 'No oci8 extension'; return; } $config = self::getConfig('SHARE_SQL_OCI8_TEST_CONFIG', __DIR__ . '/..'); if ($config && !empty($config['share']['sql']['oci8'])) { self::$db = new Horde_Db_Adapter_Oci8($config['share']['sql']['oci8']); //self::$db->setLogger(new Horde_Log_Logger(new Horde_Log_Handler_Cli())); parent::setUpBeforeClass(); } else { self::$reason = 'No oci8 configuration'; } } } Horde_Share-2.0.8/test/Horde/Share/Sqlng/Pdo/MysqlTest.php0000664000175000017500000000206512654071446021372 0ustar janjan * @category Horde * @package Share * @subpackage UnitTests * @license http://www.horde.org/licenses/lgpl21 LGPL 2.1 */ class Horde_Share_Sqlng_Pdo_MysqlTest extends Horde_Share_Test_Sqlng_Base { public static function setUpBeforeClass() { if (!extension_loaded('pdo') || !in_array('mysql', PDO::getAvailableDrivers())) { self::$reason = 'No mysql extension or no mysql PDO driver'; return; } $config = self::getConfig('SHARE_SQL_PDO_MYSQL_TEST_CONFIG', __DIR__ . '/../..'); if ($config && !empty($config['share']['sql']['pdo_mysql'])) { self::$db = new Horde_Db_Adapter_Pdo_Mysql($config['share']['sql']['pdo_mysql']); parent::setUpBeforeClass(); } else { self::$reason = 'No pdo_mysql configuration'; } } } Horde_Share-2.0.8/test/Horde/Share/Sqlng/Pdo/PgsqlTest.php0000664000175000017500000000206512654071446021353 0ustar janjan * @category Horde * @package Share * @subpackage UnitTests * @license http://www.horde.org/licenses/lgpl21 LGPL 2.1 */ class Horde_Share_Sqlng_Pdo_PgsqlTest extends Horde_Share_Test_Sqlng_Base { public static function setUpBeforeClass() { if (!extension_loaded('pdo') || !in_array('pgsql', PDO::getAvailableDrivers())) { self::$reason = 'No pgsql extension or no pgsql PDO driver'; return; } $config = self::getConfig('SHARE_SQL_PDO_PGSQL_TEST_CONFIG', __DIR__ . '/../..'); if ($config && !empty($config['share']['sql']['pdo_pgsql'])) { self::$db = new Horde_Db_Adapter_Pdo_Pgsql($config['share']['sql']['pdo_pgsql']); parent::setUpBeforeClass(); } else { self::$reason = 'No pdo_pgsql configuration'; } } } Horde_Share-2.0.8/test/Horde/Share/Sqlng/Pdo/SqliteTest.php0000664000175000017500000000131612654071446021524 0ustar janjan * @category Horde * @package Share * @subpackage UnitTests * @license http://www.horde.org/licenses/lgpl21 LGPL 2.1 */ class Horde_Share_Sqlng_Pdo_SqliteTest extends Horde_Share_Test_Sqlng_Base { public static function setUpBeforeClass() { $factory_db = new Horde_Test_Factory_Db(); try { self::$db = $factory_db->create(); parent::setUpBeforeClass(); } catch (Horde_Test_Exception $e) { self::$reason = 'Sqlite not available'; } } } Horde_Share-2.0.8/test/Horde/Share/Sqlng/Base.php0000664000175000017500000001134312654071446017554 0ustar janjan * @category Horde * @package Share * @subpackage UnitTests * @license http://www.horde.org/licenses/lgpl21 LGPL 2.1 */ class Horde_Share_Test_Sqlng_Base extends Horde_Share_TestBase { protected static $db; protected static $reason; public function testGetApp() { $this->getApp('test'); } public function testSetTable() { $this->assertEquals('test_sharesng', self::$share->getTable()); self::$share->setTable('foo'); $this->assertEquals('foo', self::$share->getTable()); self::$share->setTable('test_shares'); } public function testSetStorage() { self::$share->setStorage(self::$db); $this->assertEquals(self::$db, self::$share->getStorage()); } public function testAddShare() { $share = parent::addShare(); $this->assertInstanceOf('Horde_Share_Object_Sqlng', $share); } /** * @depends testAddShare */ public function testPermissions() { parent::permissions(); } /** * @depends testAddShare */ public function testExists() { parent::exists(); } /** * @depends testPermissions */ public function testCountShares() { parent::countShares(); } /** * @depends testPermissions */ public function testGetShare() { $share = parent::getShare(); $this->assertInstanceOf('Horde_Share_Object_Sqlng', $share); } /** * @depends testGetShare */ public function testGetShareById() { parent::getShareById(); } /** * @depends testGetShare */ public function testGetShares() { parent::getShares(); } /** */ public function testGetParent() { $share = self::$share->getShare('myshare'); $child = self::$share->getShare('mychildshare'); $this->assertEquals($share->getId(), $child->getParent()->getId()); } /** * @depends testPermissions */ public function testListOwners() { $owners = self::$share->listOwners(); $this->assertInternalType('array', $owners); $this->assertTrue(in_array('john', $owners)); } /** * @depends testPermissions */ public function testCountOwners() { $count = self::$share->countOwners(); $this->assertTrue($count > 0); } /** * @depends testPermissions */ public function testListAllShares() { parent::listAllShares(); } /** * @depends testPermissions */ public function testListShares() { parent::listShares(); } /** * @depends testPermissions */ public function testListSystemShares() { parent::listSystemShares(); } /** * @depends testPermissions */ public function testGetPermission() { return $this->getPermission(); } /** * @depends testPermissions */ public function testRemoveUserPermissions() { return parent::removeUserPermissions(); } /** * @depends testRemoveUserPermissions */ public function testRemoveGroupPermissions() { parent::removeGroupPermissions(); } /** * @depends testGetShare */ public function testRemoveShare() { parent::removeShare(); } /** * @depends testGetShare */ public function testRenameShare() { parent::renameShare(); } public function testCallback() { $this->callbackSetShareOb(new Horde_Share_Object_Sqlng(array())); } public static function setUpBeforeClass() { require_once __DIR__ . '/../migration/sqlng.php'; migrate_sqlng(self::$db); $group = new Horde_Share_Stub_Group(); self::$share = new Horde_Share_Sqlng('test', 'john', new Horde_Perms_Sql(array('db' => self::$db)), $group); self::$share->setStorage(self::$db); // FIXME $GLOBALS['injector'] = new Horde_Injector(new Horde_Injector_TopLevel()); $GLOBALS['injector']->setInstance('Horde_Group', $group); } public static function tearDownAfterClass() { if (self::$db) { $migration = new Horde_Db_Migration_Base(self::$db); $migration->dropTable('test_shares'); $migration->dropTable('test_shares_groups'); $migration->dropTable('test_shares_users'); self::$db->disconnect(); self::$db = null; } } public function setUp() { if (!self::$db) { $this->markTestSkipped(self::$reason); } } } Horde_Share-2.0.8/test/Horde/Share/Sqlng/MysqliTest.php0000664000175000017500000000171412654071446021021 0ustar janjan * @category Horde * @package Share * @subpackage UnitTests * @license http://www.horde.org/licenses/lgpl21 LGPL 2.1 */ class Horde_Share_Sqlng_MysqliTest extends Horde_Share_Test_Sqlng_Base { public static function setUpBeforeClass() { if (!extension_loaded('mysqli')) { self::$reason = 'No mysqli extension'; return; } $config = self::getConfig('SHARE_SQL_MYSQLI_TEST_CONFIG', __DIR__ . '/..'); if ($config && !empty($config['share']['sql']['mysqli'])) { self::$db = new Horde_Db_Adapter_Mysqli($config['share']['sql']['mysqli']); parent::setUpBeforeClass(); } else { self::$reason = 'No mysqli configuration'; } } } Horde_Share-2.0.8/test/Horde/Share/Sqlng/MysqlTest.php0000664000175000017500000000170412654071446020647 0ustar janjan * @category Horde * @package Share * @subpackage UnitTests * @license http://www.horde.org/licenses/lgpl21 LGPL 2.1 */ class Horde_Share_Sqlng_MysqlTest extends Horde_Share_Test_Sqlng_Base { public static function setUpBeforeClass() { if (!extension_loaded('mysql')) { self::$reason = 'No mysql extension'; return; } $config = self::getConfig('SHARE_SQL_MYSQL_TEST_CONFIG', __DIR__ . '/..'); if ($config && !empty($config['share']['sql']['mysql'])) { self::$db = new Horde_Db_Adapter_Mysql($config['share']['sql']['mysql']); parent::setUpBeforeClass(); } else { self::$reason = 'No mysql configuration'; } } } Horde_Share-2.0.8/test/Horde/Share/Sqlng/Oci8Test.php0000664000175000017500000000167412654071446020352 0ustar janjan * @category Horde * @package Share * @subpackage UnitTests * @license http://www.horde.org/licenses/lgpl21 LGPL 2.1 */ class Horde_Share_Sqlng_Oci8Test extends Horde_Share_Test_Sqlng_Base { public static function setUpBeforeClass() { if (!extension_loaded('oci8')) { self::$reason = 'No oci8 extension'; return; } $config = self::getConfig('SHARE_SQL_OCI8_TEST_CONFIG', __DIR__ . '/..'); if ($config && !empty($config['share']['sql']['oci8'])) { self::$db = new Horde_Db_Adapter_Oci8($config['share']['sql']['oci8']); parent::setUpBeforeClass(); } else { self::$reason = 'No oci8 configuration'; } } } Horde_Share-2.0.8/test/Horde/Share/Stub/Group.php0000664000175000017500000000032612654071446017626 0ustar janjan array('name' => 'mygroup', 'users' => array('john'))); } Horde_Share-2.0.8/test/Horde/Share/AllTests.php0000664000175000017500000000013212654071446017343 0ustar janjanrun(); Horde_Share-2.0.8/test/Horde/Share/Autoload.php0000664000175000017500000000102012654071446017355 0ustar janjan * @license http://www.horde.org/licenses/lgpl21 LGPL 2.1 */ /** Load stub definitions */ require_once __DIR__ . '/Stub/Group.php'; Horde_Share-2.0.8/test/Horde/Share/bootstrap.php0000664000175000017500000000014312654071446017627 0ustar janjan ../../../lib Horde_Share-2.0.8/test/Horde/Share/stress-test0000775000175000017500000001116212654071446017332 0ustar janjan#!/usr/bin/env php $description)); $argv->addOption( '-b', '--backend', array('type' => 'choice', 'choices' => array('sql', 'sqlng', 'kolab'), 'help' => 'The backend to test. Must be configured in the conf.php configuration file.')); $argv->addOption( '-c', '--configuration', array('help' => 'The configuration to use for the specified backend.')); $argv->addOption( '--users', array('type' => 'int', 'default' => 10000, 'help' => 'Number of users to create (default: 10000).')); $argv->addOption( '--groups', array('type' => 'int', 'default' => 10, 'help' => 'Number of groups to assume (default: 10).')); $argv->addOption( '--sharing-users', array('type' => 'int', 'default' => 5, 'help' => 'Percentage of users actually sharing with others (default: 5).')); $argv->addOption( '--max-users', array('type' => 'int', 'default' => 4, 'help' => 'Maximum number of users to share with (default: 4).')); $argv->addOption( '--max-groups', array('type' => 'int', 'default' => 1, 'help' => 'Maximum number of groups to share with (default: 1).')); $argv->addOption( '--runs', array('type' => 'int', 'default' => 500, 'help' => 'Number of executed test calls (default: 500).')); list($options) = $argv->parseArgs(); if (!$options['backend'] || !$options['configuration']) { $argv->printHelp(); exit(2); } /* Load configuration. */ if (!file_exists(__DIR__ . '/conf.php')) { echo "Configuration file conf.php missing.\n"; exit(1); } require __DIR__ . '/conf.php'; $config = isset($conf['share']['sql'][$options['configuration']]) ? $conf['share']['sql'][$options['configuration']] : array(); /* Create storage backend. */ switch ($options['backend']) { case 'sql': case 'sqlng': $class = 'Horde_Db_Adapter_' . implode('_', array_map(array('Horde_String', 'ucwords'), explode('_', $options['configuration']))); $storage = new $class($config); require_once __DIR__ . '/migration/' . $options['backend'] . '.php'; call_user_func('migrate_' . $options['backend'], $storage); break; default: echo "Storage configuration for ${options['backend']} not implemented yet.\n"; exit(1); } /* Create share backend. */ $class = 'Horde_Share_' . implode('_', array_map(array('Horde_String', 'ucwords'), explode('_', $options['backend']))); $shares = new $class('test', false, new Horde_Perms_Null(), new Horde_Group_Mock()); $shares->setStorage($storage); if ($options['backend'] == 'sqlng') { $shares->setTable('test_shares'); } /* Start timer. */ $timer = new Horde_Support_Timer(); /* Create test shares. */ echo "Creating ${options['users']} users.\n"; $timer->push(); $users = $groups = 0; for ($i = 0; $i < $options['users']; $i++) { /* Create share. */ $share = $shares->newShare(sprintf('user%0' . strlen($options['users']) . 'd', $i), (string)new Horde_Support_Randomid()); $shares->addShare($share); /* Add permissions with some probability. */ if (rand(0, 100) <= $options['sharing_users']) { for ($j = 0, $r = rand(0, $options['max_users']); $j < $r; $j++) { $share->addUserPermission(sprintf('user%0' . strlen($options['users']) . 'd', rand(0, $options['users'] - 1)), Horde_Perms::SHOW | Horde_Perms::READ); $users++; } for ($j = 0, $r = rand(0, $options['max_groups']); $j < $r; $j++) { $share->addGroupPermission(sprintf('group%0' . strlen($options['groups']) . 'd', rand(0, $options['groups'] - 1)), Horde_Perms::SHOW | Horde_Perms::READ); $groups++; } } /* Progress marker. */ if (!($i % ($options['users'] / 10))) { echo '.'; } } echo "\nTime spent: " . $timer->pop() . " seconds\n"; echo "Sharing with $users users and $groups groups.\n"; echo "\nExecuting ${options['runs']} listShares() calls.\n"; $timer->push(); for ($i = 0; $i < $options['runs']; $i++) { $shares->listShares(sprintf('user%0' . strlen($options['users']) . 'd', rand(0, $options['users'] - 1))); /* Progress marker. */ if (!($i % ($options['runs'] / 10))) { echo '.'; } } echo "\nTime spent: " . $timer->pop() . " seconds\n"; Horde_Share-2.0.8/test/Horde/Share/TestBase.php0000664000175000017500000005750712654071446017344 0ustar janjan * @category Horde * @package Share * @subpackage UnitTests * @license http://www.horde.org/licenses/lgpl21 LGPL 2.1 */ class Horde_Share_TestBase extends Horde_Test_Case { protected static $share; protected static $shares = array(); public function getApp($app) { $this->assertEquals($app, self::$share->getApp()); } public function addShare() { $share = self::$share->newShare('john', 'myshare', 'My Share'); $this->assertInstanceOf('Horde_Share_Object', $share); $share->set('desc', '行事曆'); $share->addDefaultPermission(Horde_Perms::SHOW); $share->addUserPermission('jane', Horde_Perms::SHOW); $share->addGroupPermission('mygroup', Horde_Perms::SHOW); self::$share->addShare($share); // Add a child to the share to test hierarchical functions $child = self::$share->newShare('john', 'mychildshare', 'My Child Share'); $child->set('desc', 'description'); $this->assertInstanceOf('Horde_Share_Object', $child); $child->setParent($share); $child->save(); return $share; } public function permissions() { $this->switchAuth(null); $this->permissionsSystemShare(); $this->switchAuth('john'); $this->permissionsChildShare(); $this->switchAuth('jane'); $this->permissionsJaneShare(); $this->permissionsGroupShare(); $this->permissionsNoShare(); $this->switchAuth('john'); } protected function permissionsSystemShare() { // System share. $share = self::$share->newShare(null, 'systemshare', 'System Share'); $this->assertInstanceOf('Horde_Perms_Permission', $share->getPermission()); $share->addDefaultPermission(Horde_Perms::SHOW | Horde_Perms::READ); $share->addGuestPermission(Horde_Perms::SHOW); $share->save(); $this->assertTrue($share->hasPermission('john', Horde_Perms::SHOW)); $this->assertTrue($share->hasPermission('john', Horde_Perms::READ)); $this->assertFalse($share->hasPermission('john', Horde_Perms::EDIT)); $this->assertFalse($share->hasPermission('john', Horde_Perms::DELETE)); $this->assertTrue($share->hasPermission(false, Horde_Perms::SHOW)); $this->assertFalse($share->hasPermission(false, Horde_Perms::EDIT)); } protected function permissionsChildShare() { // Child share $childshare = self::$share->getShare('mychildshare'); } protected function permissionsJaneShare() { // Foreign share with user permissions. $janeshare = self::$share->newShare('jane', 'janeshare', 'Jane\'s Share'); $janeshare->addUserPermission('john', Horde_Perms::SHOW | Horde_Perms::READ | Horde_Perms::EDIT); $janeshare->addUserPermission('peter', Horde_Perms::SHOW); $janeshare->save(); $this->assertTrue($janeshare->hasPermission('john', Horde_Perms::SHOW)); $this->assertTrue($janeshare->hasPermission('john', Horde_Perms::READ)); $this->assertTrue($janeshare->hasPermission('john', Horde_Perms::EDIT)); $this->assertFalse($janeshare->hasPermission('john', Horde_Perms::DELETE)); $this->assertTrue($janeshare->hasPermission('peter', Horde_Perms::SHOW)); } protected function permissionsGroupShare() { // Foreign share with group permissions. $groupshare = self::$share->newShare('jane', 'groupshare', 'Group Share'); $groupshare->addGroupPermission('mygroup', Horde_Perms::SHOW | Horde_Perms::READ | Horde_Perms::DELETE); $groupshare->save(); $this->assertTrue($groupshare->hasPermission('john', Horde_Perms::SHOW)); $this->assertTrue($groupshare->hasPermission('john', Horde_Perms::READ)); $this->assertFalse($groupshare->hasPermission('john', Horde_Perms::EDIT)); $this->assertTrue($groupshare->hasPermission('john', Horde_Perms::DELETE)); } protected function permissionsNoShare() { // Foreign share without permissions. $fshare = self::$share->newShare('jane', 'noshare', 'No Share'); $fshare->save(); } public function exists() { // Getting shares from cache. $this->assertTrue(self::$share->exists('myshare')); // Reset cache. self::$share->resetCache(); // Getting shares from backend. $this->assertTrue(self::$share->exists('myshare')); } public function countShares() { // Getting shares from cache. $this->assertEquals(5, self::$share->countShares('john')); // Top level only. $this->assertEquals(2, self::$share->countShares('john', Horde_Perms::EDIT, null, null, false)); $this->assertEquals(3, self::$share->countShares('john', Horde_Perms::EDIT)); // Reset cache. self::$share->resetCache(); // Getting shares from backend. $this->assertEquals(5, self::$share->countShares('john')); $this->assertEquals(2, self::$share->countShares('john', Horde_Perms::EDIT, null, null, false)); $this->assertEquals(3, self::$share->countShares('john', Horde_Perms::EDIT)); } public function hierarchy() { $share = self::$share->getShare('myshare'); $child = self::$share->getShare('mychildshare'); $this->assertEquals($share->getId(), $child->getParent()->getId()); $this->assertEquals(1, $share->countChildren('john')); $this->assertContains($child->getName(), array_keys($share->getChildren('john'))); } public function getShare() { // Getting shares from cache. $share = self::$share->getShare('myshare'); $this->assertInstanceOf('Horde_Share_Object', $share); try { self::$share->getShare('nonexistant'); $this->fail('Share "nonexistant" was expected to not exist.'); } catch (Horde_Exception_NotFound $e) { } // Reset cache. self::$share->resetCache(); // Getting shares from backend. $share = self::$share->getShare('myshare'); $this->assertInstanceOf('Horde_Share_Object', $share); self::$shares['myshare'] = $share; self::$shares['systemshare'] = self::$share->getShare('systemshare'); self::$shares['janeshare'] = self::$share->getShare('janeshare'); self::$shares['janeshare']->getPermission(); self::$shares['groupshare'] = self::$share->getShare('groupshare'); self::$shares['groupshare']->getPermission(); $this->switchAuth('jane'); self::$shares['jane']['janeshare'] = self::$share->getShare('janeshare'); self::$shares['jane']['groupshare'] = self::$share->getShare('groupshare'); $this->switchAuth(null); self::$shares['system']['systemshare'] = self::$share->getShare('systemshare'); $this->switchAuth('john'); return $share; } public function getShareById() { // Getting shares from cache. $this->_getShareById(); try { self::$share->getShareById(99999); $this->fail('Share 99999 was expected to not exist.'); } catch (Horde_Exception_NotFound $e) { } // Reset cache. self::$share->resetCache(); // Getting shares from backend. $this->_getShareById(); } protected function _getShareById() { $myshare = self::$share->getShareById(self::$shares['myshare']->getId()); $this->assertInstanceOf('Horde_Share_Object', $myshare); $this->assertEquals(self::$shares['myshare'], $myshare); $this->assertEquals('行事曆', $myshare->get('desc')); $this->switchAuth('jane'); $janeshare = self::$share->getShareById(self::$shares['jane']['janeshare']->getId()); $janeshare->getPermission(); $this->assertInstanceOf('Horde_Share_Object', $janeshare); $this->assertEquals(self::$shares['jane']['janeshare'], $janeshare); $users = $janeshare->listUsers(); sort($users); $this->assertEquals(array('jane', 'john', 'peter'), $users); $users = $janeshare->listUsers(Horde_Perms::EDIT); sort($users); $this->assertEquals(array('jane', 'john'), $users); $users = $janeshare->listUsers(Horde_Perms::DELETE); sort($users); $this->assertEquals(array('jane'), $users); $this->assertEquals('Jane\'s Share', $janeshare->get('name')); $this->assertTrue($janeshare->hasPermission('john', Horde_Perms::EDIT)); $groupshare = self::$share->getShareById(self::$shares['jane']['groupshare']->getId()); $groupshare->getPermission(); $this->assertInstanceOf('Horde_Share_Object', $groupshare); $this->assertEquals(self::$shares['jane']['groupshare'], $groupshare); $this->assertEquals(array('mygroup'), $groupshare->listGroups()); $this->assertEquals(array(), $groupshare->listGroups(Horde_Perms::EDIT)); $this->assertEquals(array('mygroup'), $groupshare->listGroups(Horde_Perms::DELETE)); $this->assertEquals('Group Share', $groupshare->get('name')); $this->switchAuth('john'); } public function getShares() { // Getting shares from cache. $this->_getShares(); // Reset cache. self::$share->resetCache(); // Getting shares from backend. $this->_getShares(); } protected function _getShares() { $newshares = self::$share->getShares(array(self::$shares['myshare']->getId(), self::$shares['janeshare']->getId(), self::$shares['groupshare']->getId())); $this->assertEquals( array('myshare', 'janeshare', 'groupshare'), array_keys($newshares)); $this->assertInstanceOf('Horde_Share_Object', $newshares['myshare']); $this->assertEquals(self::$shares['myshare'], $newshares['myshare']); $newshares['janeshare']->getPermission(); $this->assertEquals(self::$shares['janeshare'], $newshares['janeshare']); $newshares['groupshare']->getPermission(); $this->assertEquals(self::$shares['groupshare'], $newshares['groupshare']); } public function listAllShares() { // Getting shares from cache. $this->_listAllShares(); // Reset cache. self::$share->resetCache(); // Getting shares from backend. $this->_listAllShares(); } protected function _listAllShares() { $this->switchAuth(null); $shares = self::$share->listAllShares(); $this->assertInternalType('array', $shares); $this->assertEquals(6, count($shares)); $this->assertArrayHasKey('myshare', $shares); $this->assertArrayHasKey('systemshare', $shares); $this->assertArrayHasKey('janeshare', $shares); $this->assertArrayHasKey('groupshare', $shares); $this->assertArrayHasKey('noshare', $shares); $this->switchAuth('john'); } public function listShares() { // Getting shares from cache. $this->_listShares(); // Reset cache. self::$share->resetCache(); // Getting shares from backend. $this->_listShares(); } public function _listShares() { $this->_listSharesJohn(); $this->_listSharesGuest(); $this->_listSharesJohnTwo(); } public function _listSharesJohn() { // Default listing. $shares = self::$share->listShares('john'); $this->assertInternalType('array', $shares); $this->assertEquals(5, count($shares)); // Test arguments for default listing. $this->assertEquals($shares, self::$share->listShares('john', array('perm' => Horde_Perms::SHOW, 'attributes' => null, 'from' => 0, 'count' => 0, 'sort_by' => null, 'direction' => 0))); // Getting back the correct shares? $shares = self::$share->listShares('john', array('all_levels' => false, 'sort_by' => 'id')); $this->assertSortedById( array('myshare', 'systemshare', 'janeshare', 'groupshare'), $shares); // Shares of a certain owner. $shares = self::$share->listShares('john', array('attributes' => 'jane', 'sort_by' => 'id')); $this->assertSortedById( array('janeshare', 'groupshare'), $shares); } public function _listSharesGuest() { $this->switchAuth(null); // Guest shares. $shares = self::$share->listShares(false, array('perm' => Horde_Perms::SHOW, 'sort_by' => 'id')); $this->assertEquals( array('systemshare'), array_keys($shares)); $this->switchAuth('john'); } public function _listSharesJohnTwo() { // Shares with certain permissions. $this->assertEquals(5, count(self::$share->listShares('john', array('perm' => Horde_Perms::READ)))); $shares = self::$share->listShares('john', array('perm' => Horde_Perms::EDIT, 'sort_by' => 'id')); $this->assertSortedById( array('myshare', 'mychildshare', 'janeshare'), $shares ); // Again with only toplevel $shares = self::$share->listShares('john', array('all_levels' => false, 'perm' => Horde_Perms::EDIT, 'sort_by' => 'id')); $this->assertSortedById( array('myshare', 'janeshare'), $shares ); $shares = self::$share->listShares('john', array('perm' => Horde_Perms::DELETE, 'sort_by' => 'id')); $this->assertSortedById( array('myshare', 'mychildshare', 'groupshare'), $shares ); $shares = self::$share->listShares('john', array('perm' => Horde_Perms::EDIT | Horde_Perms::DELETE, 'sort_by' => 'id')); $this->assertSortedById( array('myshare', 'mychildshare', 'janeshare', 'groupshare'), $shares ); $shares = self::$share->listShares('john', array('perm' => Horde_Perms::ALL)); $this->assertInternalType('array', $shares); $this->assertEquals(5, count($shares)); // Paging. $all_shares = self::$share->listShares('john', array('perm' => Horde_Perms::ALL, 'sort_by' => 'id')); $this->assertSortedById( array('janeshare', 'groupshare', 'myshare', 'mychildshare', 'systemshare'), $all_shares); $shares = self::$share->listShares('john', array('perm' => Horde_Perms::ALL, 'sort_by' => 'id', 'from' => 2, 'count' => 2)); $this->assertEquals( array_slice(array_keys($all_shares), 2, 2), array_keys($shares)); // Paging with top level only $all_top_shares = self::$share->listShares('john', array('all_levels' => false, 'perm' => Horde_Perms::ALL, 'sort_by' => 'id')); $this->assertSortedById( array('janeshare', 'groupshare', 'myshare', 'systemshare'), $all_top_shares); $shares = self::$share->listShares('john', array('all_levels' => false, 'perm' => Horde_Perms::ALL, 'sort_by' => 'id', 'from' => 2, 'count' => 2)); $this->assertEquals( array_slice(array_keys($all_top_shares), 2, 2), array_keys($shares)); // Restrict to children of a share only $shares = self::$share->listShares('john', array('perm' => Horde_Perms::ALL, 'parent' => self::$shares['myshare'])); $this->assertEquals( array('mychildshare'), array_keys($shares)); // Sort order and direction. $shares = self::$share->listShares('john', array('perm' => Horde_Perms::ALL, 'sort_by' => 'id', 'direction' => 1)); $this->assertSortedById( array('groupshare', 'janeshare', 'systemshare', 'mychildshare', 'myshare'), array_reverse($shares)); // Attribute searching. $shares = self::$share->listShares('john', array('attributes' => array('name' => 'Jane\'s Share'))); $this->assertEquals( array('janeshare'), array_keys($shares)); $shares = self::$share->listShares('john', array('attributes' => array('desc' => '行事曆'))); $this->assertEquals( array('myshare'), array_keys($shares)); } public function listSystemShares() { // Getting shares from cache. $this->_listSystemShares(); // Reset cache. self::$share->resetCache(); // Getting shares from backend. $this->_listSystemShares(); } public function _listSystemShares() { $this->switchAuth(null); $shares = self::$share->listSystemShares(); $this->assertInternalType('array', $shares); $this->assertEquals(1, count($shares)); $this->assertArrayHasKey('systemshare', $shares); $this->switchAuth('john'); } public function getPermission() { $permission = self::$shares['myshare']->getPermission(); $this->assertEquals(Horde_Perms::SHOW, $permission->getDefaultPermissions()); $this->assertFalse((bool) $permission->getGuestPermissions()); $this->assertEquals(array('jane' => Horde_Perms::SHOW), $permission->getUserPermissions()); $this->assertEquals(array('mygroup' => Horde_Perms::SHOW), $permission->getGroupPermissions()); self::$share->resetCache(); $permission = self::$share->getShare('myshare')->getPermission(); $this->assertEquals(Horde_Perms::SHOW, $permission->getDefaultPermissions()); $this->assertFalse((bool) $permission->getGuestPermissions()); $this->assertEquals(array('jane' => Horde_Perms::SHOW), $permission->getUserPermissions()); $this->assertEquals(array('mygroup' => Horde_Perms::SHOW), $permission->getGroupPermissions()); self::$share->resetCache(); $shares = self::$share->getShares(array(self::$shares['myshare']->getId())); $permission = $shares['myshare']->getPermission(); $this->assertEquals(Horde_Perms::SHOW, $permission->getDefaultPermissions()); $this->assertFalse((bool) $permission->getGuestPermissions()); $this->assertEquals(array('jane' => Horde_Perms::SHOW), $permission->getUserPermissions()); $this->assertEquals(array('mygroup' => Horde_Perms::SHOW), $permission->getGroupPermissions()); self::$share->resetCache(); $shares = self::$share->listShares('john'); $permission = $shares['myshare']->getPermission(); $this->assertEquals(Horde_Perms::SHOW, $permission->getDefaultPermissions()); $this->assertFalse((bool) $permission->getGuestPermissions()); $this->assertEquals(array('jane' => Horde_Perms::SHOW), $permission->getUserPermissions()); $this->assertEquals(array('mygroup' => Horde_Perms::SHOW), $permission->getGroupPermissions()); $permission = self::$shares['system']['systemshare']->getPermission(); $this->assertEquals(Horde_Perms::SHOW | Horde_Perms::READ, $permission->getDefaultPermissions()); $this->assertEquals(Horde_Perms::SHOW, $permission->getGuestPermissions()); $permission = self::$shares['jane']['janeshare']->getPermission(); $this->assertEquals(array('john' => Horde_Perms::SHOW | Horde_Perms::READ | Horde_Perms::EDIT, 'peter' => Horde_Perms::SHOW), $permission->getUserPermissions()); $permission = self::$shares['jane']['groupshare']->getPermission(); $this->assertEquals(array('mygroup' => Horde_Perms::SHOW | Horde_Perms::READ | Horde_Perms::DELETE), $permission->getGroupPermissions()); $this->switchAuth('john'); } public function removeUserPermissions() { $this->removeUserPermissionsJane(); $this->switchAuth('john'); $this->removeUserPermissionsJohn(); } protected function removeUserPermissionsJane() { $janeshare = self::$shares['jane']['janeshare']; $janeshare->removeUserPermission('john', Horde_Perms::EDIT); $janeshare->save(); $this->switchAuth('john'); // Getting shares from cache. $this->assertEquals(5, count(self::$share->listShares('john', array('perm' => Horde_Perms::READ)))); $this->assertEquals(2, count(self::$share->listShares('john', array('perm' => Horde_Perms::EDIT)))); // Reset cache. self::$share->resetCache(); // Getting shares from backend. $this->assertEquals(5, count(self::$share->listShares('john', array('perm' => Horde_Perms::READ)))); $this->assertEquals(2, count(self::$share->listShares('john', array('perm' => Horde_Perms::EDIT)))); $janeshare->removeUser('john'); $janeshare->save(); } protected function removeUserPermissionsJohn() { // Getting shares from cache. $this->assertEquals(4, count(self::$share->listShares('john', array('perm' => Horde_Perms::READ)))); // Reset cache. self::$share->resetCache(); // Getting shares from backend. $this->assertEquals(4, count(self::$share->listShares('john', array('perm' => Horde_Perms::READ)))); } public function removeGroupPermissions() { $groupshare = self::$shares['jane']['groupshare']; $this->removeGroupPermissionsJane($groupshare); $this->removeGroupPermissionsJohn(); $this->removeGroupPermissionsJaneTwo($groupshare); $this->removeGroupPermissionsJohnTwo(); } public function removeGroupPermissionsJane($groupshare) { $groupshare->removeGroupPermission('mygroup', Horde_Perms::DELETE); $groupshare->save(); } public function removeGroupPermissionsJohn() { $this->switchAuth('john'); // Getting shares from cache. $this->assertEquals(4, count(self::$share->listShares('john', array('perm' => Horde_Perms::READ)))); $this->assertEquals(2, count(self::$share->listShares('john', array('perm' => Horde_Perms::DELETE)))); // Reset cache. self::$share->resetCache(); // Getting shares from backend. $this->assertEquals(4, count(self::$share->listShares('john', array('perm' => Horde_Perms::READ)))); $this->assertEquals(2, count(self::$share->listShares('john', array('perm' => Horde_Perms::DELETE)))); } public function removeGroupPermissionsJaneTwo($groupshare) { $groupshare->removeGroup('mygroup'); $groupshare->save(); } public function removeGroupPermissionsJohnTwo() { $this->switchAuth('john'); // Getting shares from cache. $this->assertEquals(3, count(self::$share->listShares('john', array('perm' => Horde_Perms::READ)))); // Reset cache. self::$share->resetCache(); // Getting shares from backend. $this->assertEquals(3, count(self::$share->listShares('john', array('perm' => Horde_Perms::READ)))); } public function removeShare() { self::$share->removeShare(self::$shares['myshare']); try { self::$share->getShareById(self::$shares['myshare']->getId()); $this->fail('Share "myshare" should be removed by now.'); } catch (Horde_Exception_NotFound $e) { } } public function renameShare() { self::$share->renameShare(self::$shares['janeshare'], 'joeshare'); $this->assertArrayNotHasKey('janeshare', self::$share->listAllShares()); $this->assertArrayHasKey('joeshare', self::$share->listAllShares()); } public function callbackSetShareOb($share) { $share->setShareOb(new Horde_Support_Stub()); $this->assertEquals($share, unserialize(serialize($share))); } protected function assertSortedById($expected, $shares) { $sort = array(); foreach ($shares as $key => $share) { $sort[$share->getId()] = $key; } ksort($sort); $keys = array_keys($shares); $this->assertEquals($keys, array_values($sort)); sort($expected); sort($keys); $this->assertEquals($expected, $keys); } protected function switchAuth($user) { } }