From 3f06070b89d545dc4e717a368c26510461bf541b Mon Sep 17 00:00:00 2001 From: Roland Gruber Date: Thu, 13 Feb 2020 21:31:32 +0100 Subject: [PATCH 1/7] added Horde IMAP lib --- lam-packaging/debian/copyright | 554 +- lam/composer.json | 9 +- lam/composer.lock | 550 +- lam/copyright | 554 +- .../assert/lib/Assert/LazyAssertion.php | 180 +- .../composer/composer/autoload_classmap.php | 230 + .../composer/composer/autoload_files.php | 1 + .../composer/composer/autoload_real.php | 4 + .../composer/composer/autoload_static.php | 235 + .../composer/composer/include_paths.php | 25 + .../3rdParty/composer/composer/installed.json | 586 +- .../Horde/Crypt/Blowfish.php | 178 + .../Horde/Crypt/Blowfish/Base.php | 128 + .../Horde/Crypt/Blowfish/Exception.php | 25 + .../Horde/Crypt/Blowfish/Mcrypt.php | 87 + .../Horde/Crypt/Blowfish/Openssl.php | 56 + .../Horde/Crypt/Blowfish/Pbkdf2.php | 128 + .../Horde/Crypt/Blowfish/Php.php | 75 + .../Horde/Crypt/Blowfish/Php/Base.php | 459 ++ .../Horde/Crypt/Blowfish/Php/Cbc.php | 73 + .../Horde/Crypt/Blowfish/Php/Ecb.php | 65 + .../Horde_Exception/Horde/Exception.php | 64 + .../Horde/Exception/LastError.php | 45 + .../Horde/Exception/NotFound.php | 31 + .../Horde_Exception/Horde/Exception/Pear.php | 83 + .../Horde/Exception/PermissionDenied.php | 31 + .../Horde/Exception/Translation.php | 32 + .../Horde/Exception/Wrapped.php | 46 + .../data/locale/Horde_Exception.pot | 26 + .../locale/ar/LC_MESSAGES/Horde_Exception.mo | Bin 0 -> 384 bytes .../locale/ar/LC_MESSAGES/Horde_Exception.po | 25 + .../locale/bg/LC_MESSAGES/Horde_Exception.mo | Bin 0 -> 384 bytes .../locale/bg/LC_MESSAGES/Horde_Exception.po | 26 + .../locale/bs/LC_MESSAGES/Horde_Exception.mo | Bin 0 -> 384 bytes .../locale/bs/LC_MESSAGES/Horde_Exception.po | 26 + .../locale/ca/LC_MESSAGES/Horde_Exception.mo | Bin 0 -> 441 bytes .../locale/ca/LC_MESSAGES/Horde_Exception.po | 25 + .../locale/cs/LC_MESSAGES/Horde_Exception.mo | Bin 0 -> 515 bytes .../locale/cs/LC_MESSAGES/Horde_Exception.po | 26 + .../locale/da/LC_MESSAGES/Horde_Exception.mo | Bin 0 -> 552 bytes .../locale/da/LC_MESSAGES/Horde_Exception.po | 26 + .../locale/de/LC_MESSAGES/Horde_Exception.mo | Bin 0 -> 540 bytes .../locale/de/LC_MESSAGES/Horde_Exception.po | 26 + .../locale/el/LC_MESSAGES/Horde_Exception.mo | Bin 0 -> 613 bytes .../locale/el/LC_MESSAGES/Horde_Exception.po | 27 + .../locale/es/LC_MESSAGES/Horde_Exception.mo | Bin 0 -> 586 bytes .../locale/es/LC_MESSAGES/Horde_Exception.po | 27 + .../locale/et/LC_MESSAGES/Horde_Exception.mo | Bin 0 -> 543 bytes .../locale/et/LC_MESSAGES/Horde_Exception.po | 26 + .../locale/eu/LC_MESSAGES/Horde_Exception.mo | Bin 0 -> 602 bytes .../locale/eu/LC_MESSAGES/Horde_Exception.po | 27 + .../locale/fa/LC_MESSAGES/Horde_Exception.mo | Bin 0 -> 384 bytes .../locale/fa/LC_MESSAGES/Horde_Exception.po | 26 + .../locale/fi/LC_MESSAGES/Horde_Exception.mo | Bin 0 -> 556 bytes .../locale/fi/LC_MESSAGES/Horde_Exception.po | 26 + .../locale/fr/LC_MESSAGES/Horde_Exception.mo | Bin 0 -> 613 bytes .../locale/fr/LC_MESSAGES/Horde_Exception.po | 28 + .../locale/gl/LC_MESSAGES/Horde_Exception.mo | Bin 0 -> 384 bytes .../locale/gl/LC_MESSAGES/Horde_Exception.po | 24 + .../locale/he/LC_MESSAGES/Horde_Exception.mo | Bin 0 -> 427 bytes .../locale/he/LC_MESSAGES/Horde_Exception.po | 25 + .../locale/hr/LC_MESSAGES/Horde_Exception.mo | Bin 0 -> 632 bytes .../locale/hr/LC_MESSAGES/Horde_Exception.po | 27 + .../locale/hu/LC_MESSAGES/Horde_Exception.mo | Bin 0 -> 561 bytes .../locale/hu/LC_MESSAGES/Horde_Exception.po | 25 + .../locale/id/LC_MESSAGES/Horde_Exception.mo | Bin 0 -> 384 bytes .../locale/id/LC_MESSAGES/Horde_Exception.po | 25 + .../locale/is/LC_MESSAGES/Horde_Exception.mo | Bin 0 -> 384 bytes .../locale/is/LC_MESSAGES/Horde_Exception.po | 25 + .../locale/it/LC_MESSAGES/Horde_Exception.mo | Bin 0 -> 485 bytes .../locale/it/LC_MESSAGES/Horde_Exception.po | 26 + .../locale/ja/LC_MESSAGES/Horde_Exception.mo | Bin 0 -> 603 bytes .../locale/ja/LC_MESSAGES/Horde_Exception.po | 27 + .../locale/km/LC_MESSAGES/Horde_Exception.mo | Bin 0 -> 384 bytes .../locale/km/LC_MESSAGES/Horde_Exception.po | 25 + .../locale/ko/LC_MESSAGES/Horde_Exception.mo | Bin 0 -> 420 bytes .../locale/ko/LC_MESSAGES/Horde_Exception.po | 26 + .../locale/lt/LC_MESSAGES/Horde_Exception.mo | Bin 0 -> 599 bytes .../locale/lt/LC_MESSAGES/Horde_Exception.po | 26 + .../locale/lv/LC_MESSAGES/Horde_Exception.mo | Bin 0 -> 655 bytes .../locale/lv/LC_MESSAGES/Horde_Exception.po | 41 + .../locale/mk/LC_MESSAGES/Horde_Exception.mo | Bin 0 -> 384 bytes .../locale/mk/LC_MESSAGES/Horde_Exception.po | 24 + .../locale/nb/LC_MESSAGES/Horde_Exception.mo | Bin 0 -> 427 bytes .../locale/nb/LC_MESSAGES/Horde_Exception.po | 27 + .../locale/nl/LC_MESSAGES/Horde_Exception.mo | Bin 0 -> 592 bytes .../locale/nl/LC_MESSAGES/Horde_Exception.po | 27 + .../locale/nn/LC_MESSAGES/Horde_Exception.mo | Bin 0 -> 427 bytes .../locale/nn/LC_MESSAGES/Horde_Exception.po | 26 + .../locale/pl/LC_MESSAGES/Horde_Exception.mo | Bin 0 -> 485 bytes .../locale/pl/LC_MESSAGES/Horde_Exception.po | 28 + .../locale/pt/LC_MESSAGES/Horde_Exception.mo | Bin 0 -> 487 bytes .../locale/pt/LC_MESSAGES/Horde_Exception.po | 26 + .../pt_BR/LC_MESSAGES/Horde_Exception.mo | Bin 0 -> 563 bytes .../pt_BR/LC_MESSAGES/Horde_Exception.po | 26 + .../locale/ro/LC_MESSAGES/Horde_Exception.mo | Bin 0 -> 473 bytes .../locale/ro/LC_MESSAGES/Horde_Exception.po | 26 + .../locale/ru/LC_MESSAGES/Horde_Exception.mo | Bin 0 -> 501 bytes .../locale/ru/LC_MESSAGES/Horde_Exception.po | 30 + .../locale/sk/LC_MESSAGES/Horde_Exception.mo | Bin 0 -> 579 bytes .../locale/sk/LC_MESSAGES/Horde_Exception.po | 26 + .../locale/sl/LC_MESSAGES/Horde_Exception.mo | Bin 0 -> 546 bytes .../locale/sl/LC_MESSAGES/Horde_Exception.po | 27 + .../locale/sv/LC_MESSAGES/Horde_Exception.mo | Bin 0 -> 427 bytes .../locale/sv/LC_MESSAGES/Horde_Exception.po | 27 + .../locale/tr/LC_MESSAGES/Horde_Exception.mo | Bin 0 -> 472 bytes .../locale/tr/LC_MESSAGES/Horde_Exception.po | 26 + .../locale/uk/LC_MESSAGES/Horde_Exception.mo | Bin 0 -> 627 bytes .../locale/uk/LC_MESSAGES/Horde_Exception.po | 25 + .../zh_CN/LC_MESSAGES/Horde_Exception.mo | Bin 0 -> 439 bytes .../zh_CN/LC_MESSAGES/Horde_Exception.po | 25 + .../zh_TW/LC_MESSAGES/Horde_Exception.mo | Bin 0 -> 439 bytes .../zh_TW/LC_MESSAGES/Horde_Exception.po | 25 + .../Horde_Idna/Horde/Idna.php | 172 + .../Horde_Idna/Horde/Idna/Exception.php | 24 + .../Horde_Idna/Horde/Idna/Punycode.php | 354 ++ .../Horde_Idna/Horde/Idna/Translation.php | 40 + .../Horde_Idna/data/locale/Horde_Idna.pot | 70 + .../data/locale/de/LC_MESSAGES/Horde_Idna.mo | Bin 0 -> 1645 bytes .../data/locale/de/LC_MESSAGES/Horde_Idna.po | 71 + .../data/locale/tr/LC_MESSAGES/Horde_Idna.mo | Bin 0 -> 1634 bytes .../data/locale/tr/LC_MESSAGES/Horde_Idna.po | 71 + .../Horde_Imap_Client/Horde/Imap/Client.php | 203 + .../Horde/Imap/Client/Auth/DigestMD5.php | 189 + .../Horde/Imap/Client/Auth/Scram.php | 270 + .../Horde/Imap/Client/Base.php | 4082 +++++++++++++ .../Horde/Imap/Client/Base/Alerts.php | 102 + .../Horde/Imap/Client/Base/Debug.php | 152 + .../Horde/Imap/Client/Base/Deprecated.php | 109 + .../Horde/Imap/Client/Base/Mailbox.php | 187 + .../Horde/Imap/Client/Base/Password.php | 33 + .../Horde/Imap/Client/Cache.php | 263 + .../Horde/Imap/Client/Cache/Backend.php | 165 + .../Horde/Imap/Client/Cache/Backend/Cache.php | 506 ++ .../Horde/Imap/Client/Cache/Backend/Db.php | 407 ++ .../Imap/Client/Cache/Backend/Hashtable.php | 421 ++ .../Horde/Imap/Client/Cache/Backend/Mongo.php | 440 ++ .../Horde/Imap/Client/Cache/Backend/Null.php | 79 + .../Horde/Imap/Client/Data/Acl.php | 164 + .../Horde/Imap/Client/Data/AclCommon.php | 72 + .../Horde/Imap/Client/Data/AclNegative.php | 25 + .../Horde/Imap/Client/Data/AclRights.php | 208 + .../Horde/Imap/Client/Data/BaseSubject.php | 231 + .../Horde/Imap/Client/Data/Capability.php | 214 + .../Imap/Client/Data/Capability/Imap.php | 117 + .../Horde/Imap/Client/Data/Envelope.php | 226 + .../Horde/Imap/Client/Data/Fetch.php | 666 +++ .../Horde/Imap/Client/Data/Fetch/Pop3.php | 36 + .../Horde/Imap/Client/Data/Format.php | 83 + .../Horde/Imap/Client/Data/Format/Astring.php | 32 + .../Client/Data/Format/Astring/Nonascii.php | 28 + .../Horde/Imap/Client/Data/Format/Atom.php | 57 + .../Horde/Imap/Client/Data/Format/Date.php | 49 + .../Imap/Client/Data/Format/DateTime.php | 39 + .../Imap/Client/Data/Format/Exception.php | 25 + .../Imap/Client/Data/Format/Filter/Quote.php | 64 + .../Imap/Client/Data/Format/Filter/String.php | 120 + .../Horde/Imap/Client/Data/Format/List.php | 106 + .../Imap/Client/Data/Format/ListMailbox.php | 38 + .../Client/Data/Format/ListMailbox/Utf8.php | 39 + .../Horde/Imap/Client/Data/Format/Mailbox.php | 99 + .../Imap/Client/Data/Format/Mailbox/Utf8.php | 57 + .../Horde/Imap/Client/Data/Format/Nil.php | 46 + .../Horde/Imap/Client/Data/Format/Nstring.php | 93 + .../Client/Data/Format/Nstring/Nonascii.php | 28 + .../Horde/Imap/Client/Data/Format/Number.php | 41 + .../Horde/Imap/Client/Data/Format/String.php | 219 + .../Client/Data/Format/String/Nonascii.php | 28 + .../Data/Format/String/Support/Nonascii.php | 27 + .../Horde/Imap/Client/Data/Namespace.php | 143 + .../Horde/Imap/Client/Data/SearchCharset.php | 178 + .../Imap/Client/Data/SearchCharset/Utf8.php | 66 + .../Horde/Imap/Client/Data/Sync.php | 267 + .../Horde/Imap/Client/Data/Thread.php | 216 + .../Horde/Imap/Client/DateTime.php | 119 + .../Horde/Imap/Client/Exception.php | 303 + .../Client/Exception/NoSupportExtension.php | 54 + .../Imap/Client/Exception/NoSupportPop3.php | 40 + .../Imap/Client/Exception/SearchCharset.php | 50 + .../Imap/Client/Exception/ServerResponse.php | 88 + .../Horde/Imap/Client/Exception/Sync.php | 37 + .../Horde/Imap/Client/Fetch/Query.php | 383 ++ .../Horde/Imap/Client/Fetch/Results.php | 182 + .../Horde/Imap/Client/Ids.php | 494 ++ .../Horde/Imap/Client/Ids/Map.php | 242 + .../Horde/Imap/Client/Ids/Pop3.php | 64 + .../Horde/Imap/Client/Interaction/Client.php | 61 + .../Horde/Imap/Client/Interaction/Command.php | 184 + .../Interaction/Command/Continuation.php | 74 + .../Imap/Client/Interaction/Pipeline.php | 160 + .../Horde/Imap/Client/Interaction/Server.php | 144 + .../Interaction/Server/Continuation.php | 25 + .../Imap/Client/Interaction/Server/Tagged.php | 49 + .../Client/Interaction/Server/Untagged.php | 25 + .../Horde/Imap/Client/Mailbox.php | 147 + .../Horde/Imap/Client/Mailbox/List.php | 158 + .../Horde/Imap/Client/Namespace/List.php | 130 + .../Horde/Imap/Client/Password/Xoauth2.php | 71 + .../Horde/Imap/Client/Search/Query.php | 904 +++ .../Horde/Imap/Client/Socket.php | 5167 +++++++++++++++++ .../Horde/Imap/Client/Socket/Catenate.php | 167 + .../Horde/Imap/Client/Socket/ClientSort.php | 373 ++ .../Imap/Client/Socket/Connection/Base.php | 76 + .../Imap/Client/Socket/Connection/Pop3.php | 93 + .../Imap/Client/Socket/Connection/Socket.php | 222 + .../Horde/Imap/Client/Socket/Pop3.php | 1543 +++++ .../Horde/Imap/Client/Tokenize.php | 413 ++ .../Horde/Imap/Client/Translation.php | 38 + .../Horde/Imap/Client/Url.php | 302 + .../Horde/Imap/Client/Url/Base.php | 173 + .../Horde/Imap/Client/Url/Imap.php | 230 + .../Horde/Imap/Client/Url/Imap/Relative.php | 45 + .../Horde/Imap/Client/Url/Pop3.php | 64 + .../Horde/Imap/Client/Utf7imap.php | 326 ++ .../data/locale/Horde_Imap_Client.pot | 273 + .../da/LC_MESSAGES/Horde_Imap_Client.mo | Bin 0 -> 6559 bytes .../da/LC_MESSAGES/Horde_Imap_Client.po | 266 + .../de/LC_MESSAGES/Horde_Imap_Client.mo | Bin 0 -> 7371 bytes .../de/LC_MESSAGES/Horde_Imap_Client.po | 291 + .../el/LC_MESSAGES/Horde_Imap_Client.mo | Bin 0 -> 9541 bytes .../el/LC_MESSAGES/Horde_Imap_Client.po | 283 + .../es/LC_MESSAGES/Horde_Imap_Client.mo | Bin 0 -> 6977 bytes .../es/LC_MESSAGES/Horde_Imap_Client.po | 276 + .../eu/LC_MESSAGES/Horde_Imap_Client.mo | Bin 0 -> 2044 bytes .../eu/LC_MESSAGES/Horde_Imap_Client.po | 198 + .../fi/LC_MESSAGES/Horde_Imap_Client.mo | Bin 0 -> 6574 bytes .../fi/LC_MESSAGES/Horde_Imap_Client.po | 259 + .../fr/LC_MESSAGES/Horde_Imap_Client.mo | Bin 0 -> 7074 bytes .../fr/LC_MESSAGES/Horde_Imap_Client.po | 272 + .../hu/LC_MESSAGES/Horde_Imap_Client.mo | Bin 0 -> 6742 bytes .../hu/LC_MESSAGES/Horde_Imap_Client.po | 257 + .../ja/LC_MESSAGES/Horde_Imap_Client.mo | Bin 0 -> 7415 bytes .../ja/LC_MESSAGES/Horde_Imap_Client.po | 262 + .../nl/LC_MESSAGES/Horde_Imap_Client.mo | Bin 0 -> 6737 bytes .../nl/LC_MESSAGES/Horde_Imap_Client.po | 262 + .../tr/LC_MESSAGES/Horde_Imap_Client.mo | Bin 0 -> 6865 bytes .../tr/LC_MESSAGES/Horde_Imap_Client.po | 278 + .../1_horde_imap_client_base_tables.php | 99 + ...2_horde_imap_client_change_column_name.php | 42 + .../Horde_ListHeaders/Horde/ListHeaders.php | 206 + .../Horde/ListHeaders/Base.php | 68 + .../Horde/ListHeaders/Id.php | 72 + .../Horde/ListHeaders/NoPost.php | 52 + .../Horde/ListHeaders/Object.php | 26 + .../Horde/ListHeaders/Translation.php | 39 + .../data/locale/Horde_ListHeaders.pot | 46 + .../da/LC_MESSAGES/Horde_ListHeaders.mo | Bin 0 -> 773 bytes .../da/LC_MESSAGES/Horde_ListHeaders.po | 46 + .../de/LC_MESSAGES/Horde_ListHeaders.mo | Bin 0 -> 717 bytes .../de/LC_MESSAGES/Horde_ListHeaders.po | 46 + .../el/LC_MESSAGES/Horde_ListHeaders.mo | Bin 0 -> 808 bytes .../el/LC_MESSAGES/Horde_ListHeaders.po | 47 + .../es/LC_MESSAGES/Horde_ListHeaders.mo | Bin 0 -> 764 bytes .../es/LC_MESSAGES/Horde_ListHeaders.po | 47 + .../hu/LC_MESSAGES/Horde_ListHeaders.mo | Bin 0 -> 795 bytes .../hu/LC_MESSAGES/Horde_ListHeaders.po | 45 + .../ja/LC_MESSAGES/Horde_ListHeaders.mo | Bin 0 -> 749 bytes .../ja/LC_MESSAGES/Horde_ListHeaders.po | 47 + .../tr/LC_MESSAGES/Horde_ListHeaders.mo | Bin 0 -> 728 bytes .../tr/LC_MESSAGES/Horde_ListHeaders.po | 47 + .../Horde_Mail/Horde/Mail/Exception.php | 25 + .../Horde_Mail/Horde/Mail/Mbox/Parse.php | 252 + .../Horde_Mail/Horde/Mail/Rfc822.php | 896 +++ .../Horde_Mail/Horde/Mail/Rfc822/Address.php | 242 + .../Horde_Mail/Horde/Mail/Rfc822/Group.php | 145 + .../Horde/Mail/Rfc822/GroupList.php | 55 + .../Horde/Mail/Rfc822/Identification.php | 118 + .../Horde_Mail/Horde/Mail/Rfc822/List.php | 518 ++ .../Horde_Mail/Horde/Mail/Rfc822/Object.php | 90 + .../Horde_Mail/Horde/Mail/Translation.php | 39 + .../Horde_Mail/Horde/Mail/Transport.php | 263 + .../Horde/Mail/Transport/Lmtphorde.php | 64 + .../Horde_Mail/Horde/Mail/Transport/Mail.php | 115 + .../Horde_Mail/Horde/Mail/Transport/Mock.php | 126 + .../Horde_Mail/Horde/Mail/Transport/Null.php | 58 + .../Horde/Mail/Transport/Sendmail.php | 195 + .../Horde_Mail/Horde/Mail/Transport/Smtp.php | 350 ++ .../Horde/Mail/Transport/Smtphorde.php | 169 + .../Horde/Mail/Transport/Smtpmx.php | 362 ++ .../Horde_Mail/data/locale/Horde_Mail.pot | 27 + .../data/locale/tr/LC_MESSAGES/Horde_Mail.mo | Bin 0 -> 708 bytes .../data/locale/tr/LC_MESSAGES/Horde_Mail.po | 29 + .../Horde_Mime/Horde/Mime.php | 397 ++ .../Horde/Mime/ContentParam/Decode.php | 142 + .../Horde_Mime/Horde/Mime/Exception.php | 25 + .../Horde_Mime/Horde/Mime/Filter/Encoding.php | 90 + .../Horde_Mime/Horde/Mime/Headers.php | 535 ++ .../Horde/Mime/Headers/Addresses.php | 176 + .../Horde/Mime/Headers/AddressesMulti.php | 107 + .../Horde/Mime/Headers/ContentDescription.php | 52 + .../Horde/Mime/Headers/ContentId.php | 71 + .../Horde/Mime/Headers/ContentLanguage.php | 84 + .../Horde/Mime/Headers/ContentParam.php | 429 ++ .../ContentParam/ContentDisposition.php | 103 + .../Mime/Headers/ContentParam/ContentType.php | 198 + .../Mime/Headers/ContentTransferEncoding.php | 95 + .../Horde_Mime/Horde/Mime/Headers/Date.php | 75 + .../Horde/Mime/Headers/Deprecated.php | 263 + .../Horde_Mime/Horde/Mime/Headers/Element.php | 181 + .../Horde/Mime/Headers/Element/Address.php | 38 + .../Horde/Mime/Headers/Element/Multiple.php | 57 + .../Horde/Mime/Headers/Element/Single.php | 91 + .../Horde/Mime/Headers/Extension/Mime.php | 27 + .../Horde/Mime/Headers/Identification.php | 48 + .../Horde/Mime/Headers/MessageId.php | 60 + .../Horde_Mime/Horde/Mime/Headers/Mime.php | 49 + .../Horde/Mime/Headers/MimeVersion.php | 56 + .../Horde/Mime/Headers/Received.php | 44 + .../Horde_Mime/Horde/Mime/Headers/Subject.php | 51 + .../Horde/Mime/Headers/UserAgent.php | 57 + .../Horde_Mime/Horde/Mime/Id.php | 152 + .../Horde_Mime/Horde/Mime/Magic.php | 235 + .../Horde_Mime/Horde/Mime/Mail.php | 524 ++ .../Horde_Mime/Horde/Mime/Mdn.php | 276 + .../Horde_Mime/Horde/Mime/Part.php | 2528 ++++++++ .../Horde_Mime/Horde/Mime/Part/Iterator.php | 137 + .../Horde_Mime/Horde/Mime/Part/Upgrade/V1.php | 118 + .../Horde_Mime/Horde/Mime/QuotedPrintable.php | 67 + .../Horde_Mime/Horde/Mime/Related.php | 161 + .../Horde_Mime/Horde/Mime/Translation.php | 38 + .../Horde_Mime/Horde/Mime/Uudecode.php | 129 + .../Horde_Mime/Horde/Mime/mime.mapping.php | 1445 +++++ .../Horde_Mime/data/locale/Horde_Mime.pot | 38 + .../data/locale/ar/LC_MESSAGES/Horde_Mime.mo | Bin 0 -> 379 bytes .../data/locale/ar/LC_MESSAGES/Horde_Mime.po | 70 + .../data/locale/bg/LC_MESSAGES/Horde_Mime.mo | Bin 0 -> 379 bytes .../data/locale/bg/LC_MESSAGES/Horde_Mime.po | 70 + .../data/locale/bs/LC_MESSAGES/Horde_Mime.mo | Bin 0 -> 379 bytes .../data/locale/bs/LC_MESSAGES/Horde_Mime.po | 75 + .../data/locale/ca/LC_MESSAGES/Horde_Mime.mo | Bin 0 -> 766 bytes .../data/locale/ca/LC_MESSAGES/Horde_Mime.po | 71 + .../data/locale/cs/LC_MESSAGES/Horde_Mime.mo | Bin 0 -> 871 bytes .../data/locale/cs/LC_MESSAGES/Horde_Mime.po | 72 + .../data/locale/da/LC_MESSAGES/Horde_Mime.mo | Bin 0 -> 1257 bytes .../data/locale/da/LC_MESSAGES/Horde_Mime.po | 69 + .../data/locale/de/LC_MESSAGES/Horde_Mime.mo | Bin 0 -> 971 bytes .../data/locale/de/LC_MESSAGES/Horde_Mime.po | 42 + .../data/locale/el/LC_MESSAGES/Horde_Mime.mo | Bin 0 -> 1276 bytes .../data/locale/el/LC_MESSAGES/Horde_Mime.po | 76 + .../data/locale/es/LC_MESSAGES/Horde_Mime.mo | Bin 0 -> 1309 bytes .../data/locale/es/LC_MESSAGES/Horde_Mime.po | 70 + .../data/locale/et/LC_MESSAGES/Horde_Mime.mo | Bin 0 -> 1312 bytes .../data/locale/et/LC_MESSAGES/Horde_Mime.po | 73 + .../data/locale/eu/LC_MESSAGES/Horde_Mime.mo | Bin 0 -> 1329 bytes .../data/locale/eu/LC_MESSAGES/Horde_Mime.po | 71 + .../data/locale/fa/LC_MESSAGES/Horde_Mime.mo | Bin 0 -> 829 bytes .../data/locale/fa/LC_MESSAGES/Horde_Mime.po | 71 + .../data/locale/fi/LC_MESSAGES/Horde_Mime.mo | Bin 0 -> 1296 bytes .../data/locale/fi/LC_MESSAGES/Horde_Mime.po | 69 + .../data/locale/fr/LC_MESSAGES/Horde_Mime.mo | Bin 0 -> 1425 bytes .../data/locale/fr/LC_MESSAGES/Horde_Mime.po | 72 + .../data/locale/gl/LC_MESSAGES/Horde_Mime.mo | Bin 0 -> 379 bytes .../data/locale/gl/LC_MESSAGES/Horde_Mime.po | 70 + .../data/locale/he/LC_MESSAGES/Horde_Mime.mo | Bin 0 -> 422 bytes .../data/locale/he/LC_MESSAGES/Horde_Mime.po | 71 + .../data/locale/hr/LC_MESSAGES/Horde_Mime.mo | Bin 0 -> 1435 bytes .../data/locale/hr/LC_MESSAGES/Horde_Mime.po | 78 + .../data/locale/hu/LC_MESSAGES/Horde_Mime.mo | Bin 0 -> 1411 bytes .../data/locale/hu/LC_MESSAGES/Horde_Mime.po | 69 + .../data/locale/id/LC_MESSAGES/Horde_Mime.mo | Bin 0 -> 379 bytes .../data/locale/id/LC_MESSAGES/Horde_Mime.po | 71 + .../data/locale/is/LC_MESSAGES/Horde_Mime.mo | Bin 0 -> 379 bytes .../data/locale/is/LC_MESSAGES/Horde_Mime.po | 73 + .../data/locale/it/LC_MESSAGES/Horde_Mime.mo | Bin 0 -> 1386 bytes .../data/locale/it/LC_MESSAGES/Horde_Mime.po | 73 + .../data/locale/ja/LC_MESSAGES/Horde_Mime.mo | Bin 0 -> 1355 bytes .../data/locale/ja/LC_MESSAGES/Horde_Mime.po | 69 + .../data/locale/km/LC_MESSAGES/Horde_Mime.mo | Bin 0 -> 379 bytes .../data/locale/km/LC_MESSAGES/Horde_Mime.po | 71 + .../data/locale/ko/LC_MESSAGES/Horde_Mime.mo | Bin 0 -> 415 bytes .../data/locale/ko/LC_MESSAGES/Horde_Mime.po | 76 + .../data/locale/lt/LC_MESSAGES/Horde_Mime.mo | Bin 0 -> 1515 bytes .../data/locale/lt/LC_MESSAGES/Horde_Mime.po | 74 + .../data/locale/lv/LC_MESSAGES/Horde_Mime.mo | Bin 0 -> 1556 bytes .../data/locale/lv/LC_MESSAGES/Horde_Mime.po | 78 + .../data/locale/mk/LC_MESSAGES/Horde_Mime.mo | Bin 0 -> 379 bytes .../data/locale/mk/LC_MESSAGES/Horde_Mime.po | 70 + .../data/locale/nb/LC_MESSAGES/Horde_Mime.mo | Bin 0 -> 490 bytes .../data/locale/nb/LC_MESSAGES/Horde_Mime.po | 72 + .../data/locale/nl/LC_MESSAGES/Horde_Mime.mo | Bin 0 -> 1326 bytes .../data/locale/nl/LC_MESSAGES/Horde_Mime.po | 71 + .../data/locale/nn/LC_MESSAGES/Horde_Mime.mo | Bin 0 -> 422 bytes .../data/locale/nn/LC_MESSAGES/Horde_Mime.po | 71 + .../data/locale/pl/LC_MESSAGES/Horde_Mime.mo | Bin 0 -> 480 bytes .../data/locale/pl/LC_MESSAGES/Horde_Mime.po | 76 + .../data/locale/pt/LC_MESSAGES/Horde_Mime.mo | Bin 0 -> 853 bytes .../data/locale/pt/LC_MESSAGES/Horde_Mime.po | 72 + .../locale/pt_BR/LC_MESSAGES/Horde_Mime.mo | Bin 0 -> 1256 bytes .../locale/pt_BR/LC_MESSAGES/Horde_Mime.po | 69 + .../data/locale/ro/LC_MESSAGES/Horde_Mime.mo | Bin 0 -> 468 bytes .../data/locale/ro/LC_MESSAGES/Horde_Mime.po | 72 + .../data/locale/ru/LC_MESSAGES/Horde_Mime.mo | Bin 0 -> 496 bytes .../data/locale/ru/LC_MESSAGES/Horde_Mime.po | 84 + .../data/locale/sk/LC_MESSAGES/Horde_Mime.mo | Bin 0 -> 1307 bytes .../data/locale/sk/LC_MESSAGES/Horde_Mime.po | 70 + .../data/locale/sl/LC_MESSAGES/Horde_Mime.mo | Bin 0 -> 1169 bytes .../data/locale/sl/LC_MESSAGES/Horde_Mime.po | 74 + .../data/locale/sv/LC_MESSAGES/Horde_Mime.mo | Bin 0 -> 422 bytes .../data/locale/sv/LC_MESSAGES/Horde_Mime.po | 72 + .../data/locale/tr/LC_MESSAGES/Horde_Mime.mo | Bin 0 -> 1462 bytes .../data/locale/tr/LC_MESSAGES/Horde_Mime.po | 75 + .../data/locale/uk/LC_MESSAGES/Horde_Mime.mo | Bin 0 -> 1531 bytes .../data/locale/uk/LC_MESSAGES/Horde_Mime.po | 73 + .../locale/zh_CN/LC_MESSAGES/Horde_Mime.mo | Bin 0 -> 1027 bytes .../locale/zh_CN/LC_MESSAGES/Horde_Mime.po | 71 + .../locale/zh_TW/LC_MESSAGES/Horde_Mime.mo | Bin 0 -> 1373 bytes .../locale/zh_TW/LC_MESSAGES/Horde_Mime.po | 72 + .../Horde_Secret/Horde/Secret.php | 224 + .../Horde_Secret/Horde/Secret/Exception.php | 21 + .../Horde/Socket/Client.php | 326 ++ .../Horde/Socket/Client/Exception.php | 28 + .../Horde_Stream/Horde/Stream.php | 624 ++ .../Horde_Stream/Horde/Stream/Exception.php | 25 + .../Horde_Stream/Horde/Stream/Existing.php | 48 + .../Horde_Stream/Horde/Stream/String.php | 49 + .../Horde_Stream/Horde/Stream/Temp.php | 56 + .../Horde_Stream/Horde/Stream/TempString.php | 279 + .../Horde/Stream/Filter/Bin2hex.php | 36 + .../Horde/Stream/Filter/Crc32.php | 123 + .../Horde/Stream/Filter/Eol.php | 101 + .../Horde/Stream/Filter/Htmlspecialchars.php | 40 + .../Horde/Stream/Filter/Null.php | 67 + .../Horde/Stream/Wrapper/Combine.php | 315 + .../Horde/Stream/Wrapper/CombineStream.php | 33 + .../Horde/Stream/Wrapper/String.php | 211 + .../Horde/Stream/Wrapper/StringStream.php | 32 + .../Horde_Support/Horde/Support/Array.php | 201 + .../Horde_Support/Horde/Support/Backtrace.php | 175 + .../Horde/Support/CaseInsensitiveArray.php | 84 + .../Horde/Support/CombineStream.php | 87 + .../Horde/Support/ConsistentHash.php | 244 + .../Horde_Support/Horde/Support/Guid.php | 73 + .../Horde_Support/Horde/Support/Inflector.php | 437 ++ .../Horde_Support/Horde/Support/Memory.php | 84 + .../Horde_Support/Horde/Support/Numerizer.php | 46 + .../Horde/Support/Numerizer/Locale/Base.php | 166 + .../Horde/Support/Numerizer/Locale/De.php | 132 + .../Horde/Support/Numerizer/Locale/Pt.php | 152 + .../Horde/Support/ObjectStub.php | 69 + .../Horde_Support/Horde/Support/Randomid.php | 77 + .../Horde_Support/Horde/Support/Stack.php | 41 + .../Horde/Support/StringStream.php | 100 + .../Horde_Support/Horde/Support/Stub.php | 140 + .../Horde_Support/Horde/Support/Timer.php | 59 + .../Horde_Support/Horde/Support/Uuid.php | 85 + .../Horde_Text_Flowed/Horde/Text/Flowed.php | 376 ++ .../Horde_Translation/Horde/Translation.php | 132 + .../Horde/Translation/Autodetect.php | 103 + .../Horde/Translation/Exception.php | 15 + .../Horde/Translation/Handler.php | 41 + .../Horde/Translation/Handler/Gettext.php | 82 + .../Horde_Util/Horde/Array.php | 147 + .../Horde_Util/Horde/Array/Sort/Helper.php | 77 + .../Horde_Util/Horde/Domhtml.php | 336 ++ .../Horde_Util/Horde/String.php | 917 +++ .../Horde_Util/Horde/String/Transliterate.php | 195 + .../Horde_Util/Horde/Util.php | 577 ++ .../Horde_Util/Horde/Variables.php | 403 ++ .../composer/ramsey/uuid/CHANGELOG.md | 719 ++- .../composer/ramsey/uuid/CODE_OF_CONDUCT.md | 74 - .../composer/ramsey/uuid/CONTRIBUTING.md | 75 - lam/lib/3rdParty/composer/ramsey/uuid/LICENSE | 12 +- .../3rdParty/composer/ramsey/uuid/README.md | 118 +- .../composer/ramsey/uuid/composer.json | 84 +- .../composer/ramsey/uuid/src/BinaryUtils.php | 2 - .../ramsey/uuid/src/Codec/CodecInterface.php | 8 +- .../ramsey/uuid/src/Codec/GuidStringCodec.php | 5 +- .../uuid/src/Codec/OrderedTimeCodec.php | 2 +- .../ramsey/uuid/src/Codec/StringCodec.php | 18 +- .../src/Codec/TimestampFirstCombCodec.php | 5 +- .../uuid/src/Codec/TimestampLastCombCodec.php | 1 - .../Converter/NumberConverterInterface.php | 6 +- .../Converter/Time/BigNumberTimeConverter.php | 7 +- .../src/Converter/Time/PhpTimeConverter.php | 4 +- .../src/Converter/TimeConverterInterface.php | 4 +- .../composer/ramsey/uuid/src/DegradedUuid.php | 6 +- .../Exception/InvalidUuidStringException.php | 4 +- .../UnsatisfiedDependencyException.php | 4 +- .../UnsupportedOperationException.php | 4 +- .../composer/ramsey/uuid/src/FeatureSet.php | 4 +- .../uuid/src/Generator/CombGenerator.php | 11 +- .../src/Generator/DefaultTimeGenerator.php | 19 +- .../uuid/src/Generator/MtRandGenerator.php | 4 + .../uuid/src/Generator/OpenSslGenerator.php | 5 + .../src/Generator/RandomBytesGenerator.php | 4 +- .../Generator/RandomGeneratorInterface.php | 10 +- .../uuid/src/Generator/RandomLibAdapter.php | 10 +- .../src/Generator/SodiumRandomGenerator.php | 5 + .../src/Generator/TimeGeneratorInterface.php | 10 +- .../Provider/Node/FallbackNodeProvider.php | 3 +- .../src/Provider/Node/RandomNodeProvider.php | 23 +- .../src/Provider/Node/SystemNodeProvider.php | 11 +- .../src/Provider/NodeProviderInterface.php | 4 +- .../src/Provider/Time/FixedTimeProvider.php | 5 +- .../composer/ramsey/uuid/src/Uuid.php | 103 +- .../composer/ramsey/uuid/src/UuidFactory.php | 7 +- .../ramsey/uuid/src/UuidFactoryInterface.php | 35 +- .../ramsey/uuid/src/UuidInterface.php | 12 +- .../composer/ramsey/uuid/src/functions.php | 78 + .../3rdParty/composer/symfony/mime/LICENSE | 2 +- .../mime/Part/Multipart/FormDataPart.php | 17 +- 501 files changed, 61589 insertions(+), 840 deletions(-) create mode 100644 lam/lib/3rdParty/composer/composer/include_paths.php create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Crypt_Blowfish/Horde/Crypt/Blowfish.php create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Crypt_Blowfish/Horde/Crypt/Blowfish/Base.php create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Crypt_Blowfish/Horde/Crypt/Blowfish/Exception.php create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Crypt_Blowfish/Horde/Crypt/Blowfish/Mcrypt.php create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Crypt_Blowfish/Horde/Crypt/Blowfish/Openssl.php create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Crypt_Blowfish/Horde/Crypt/Blowfish/Pbkdf2.php create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Crypt_Blowfish/Horde/Crypt/Blowfish/Php.php create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Crypt_Blowfish/Horde/Crypt/Blowfish/Php/Base.php create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Crypt_Blowfish/Horde/Crypt/Blowfish/Php/Cbc.php create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Crypt_Blowfish/Horde/Crypt/Blowfish/Php/Ecb.php create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Exception/Horde/Exception.php create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Exception/Horde/Exception/LastError.php create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Exception/Horde/Exception/NotFound.php create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Exception/Horde/Exception/Pear.php create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Exception/Horde/Exception/PermissionDenied.php create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Exception/Horde/Exception/Translation.php create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Exception/Horde/Exception/Wrapped.php create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Exception/data/locale/Horde_Exception.pot create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Exception/data/locale/ar/LC_MESSAGES/Horde_Exception.mo create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Exception/data/locale/ar/LC_MESSAGES/Horde_Exception.po create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Exception/data/locale/bg/LC_MESSAGES/Horde_Exception.mo create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Exception/data/locale/bg/LC_MESSAGES/Horde_Exception.po create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Exception/data/locale/bs/LC_MESSAGES/Horde_Exception.mo create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Exception/data/locale/bs/LC_MESSAGES/Horde_Exception.po create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Exception/data/locale/ca/LC_MESSAGES/Horde_Exception.mo create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Exception/data/locale/ca/LC_MESSAGES/Horde_Exception.po create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Exception/data/locale/cs/LC_MESSAGES/Horde_Exception.mo create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Exception/data/locale/cs/LC_MESSAGES/Horde_Exception.po create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Exception/data/locale/da/LC_MESSAGES/Horde_Exception.mo create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Exception/data/locale/da/LC_MESSAGES/Horde_Exception.po create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Exception/data/locale/de/LC_MESSAGES/Horde_Exception.mo create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Exception/data/locale/de/LC_MESSAGES/Horde_Exception.po create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Exception/data/locale/el/LC_MESSAGES/Horde_Exception.mo create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Exception/data/locale/el/LC_MESSAGES/Horde_Exception.po create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Exception/data/locale/es/LC_MESSAGES/Horde_Exception.mo create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Exception/data/locale/es/LC_MESSAGES/Horde_Exception.po create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Exception/data/locale/et/LC_MESSAGES/Horde_Exception.mo create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Exception/data/locale/et/LC_MESSAGES/Horde_Exception.po create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Exception/data/locale/eu/LC_MESSAGES/Horde_Exception.mo create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Exception/data/locale/eu/LC_MESSAGES/Horde_Exception.po create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Exception/data/locale/fa/LC_MESSAGES/Horde_Exception.mo create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Exception/data/locale/fa/LC_MESSAGES/Horde_Exception.po create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Exception/data/locale/fi/LC_MESSAGES/Horde_Exception.mo create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Exception/data/locale/fi/LC_MESSAGES/Horde_Exception.po create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Exception/data/locale/fr/LC_MESSAGES/Horde_Exception.mo create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Exception/data/locale/fr/LC_MESSAGES/Horde_Exception.po create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Exception/data/locale/gl/LC_MESSAGES/Horde_Exception.mo create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Exception/data/locale/gl/LC_MESSAGES/Horde_Exception.po create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Exception/data/locale/he/LC_MESSAGES/Horde_Exception.mo create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Exception/data/locale/he/LC_MESSAGES/Horde_Exception.po create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Exception/data/locale/hr/LC_MESSAGES/Horde_Exception.mo create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Exception/data/locale/hr/LC_MESSAGES/Horde_Exception.po create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Exception/data/locale/hu/LC_MESSAGES/Horde_Exception.mo create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Exception/data/locale/hu/LC_MESSAGES/Horde_Exception.po create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Exception/data/locale/id/LC_MESSAGES/Horde_Exception.mo create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Exception/data/locale/id/LC_MESSAGES/Horde_Exception.po create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Exception/data/locale/is/LC_MESSAGES/Horde_Exception.mo create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Exception/data/locale/is/LC_MESSAGES/Horde_Exception.po create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Exception/data/locale/it/LC_MESSAGES/Horde_Exception.mo create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Exception/data/locale/it/LC_MESSAGES/Horde_Exception.po create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Exception/data/locale/ja/LC_MESSAGES/Horde_Exception.mo create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Exception/data/locale/ja/LC_MESSAGES/Horde_Exception.po create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Exception/data/locale/km/LC_MESSAGES/Horde_Exception.mo create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Exception/data/locale/km/LC_MESSAGES/Horde_Exception.po create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Exception/data/locale/ko/LC_MESSAGES/Horde_Exception.mo create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Exception/data/locale/ko/LC_MESSAGES/Horde_Exception.po create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Exception/data/locale/lt/LC_MESSAGES/Horde_Exception.mo create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Exception/data/locale/lt/LC_MESSAGES/Horde_Exception.po create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Exception/data/locale/lv/LC_MESSAGES/Horde_Exception.mo create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Exception/data/locale/lv/LC_MESSAGES/Horde_Exception.po create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Exception/data/locale/mk/LC_MESSAGES/Horde_Exception.mo create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Exception/data/locale/mk/LC_MESSAGES/Horde_Exception.po create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Exception/data/locale/nb/LC_MESSAGES/Horde_Exception.mo create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Exception/data/locale/nb/LC_MESSAGES/Horde_Exception.po create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Exception/data/locale/nl/LC_MESSAGES/Horde_Exception.mo create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Exception/data/locale/nl/LC_MESSAGES/Horde_Exception.po create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Exception/data/locale/nn/LC_MESSAGES/Horde_Exception.mo create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Exception/data/locale/nn/LC_MESSAGES/Horde_Exception.po create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Exception/data/locale/pl/LC_MESSAGES/Horde_Exception.mo create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Exception/data/locale/pl/LC_MESSAGES/Horde_Exception.po create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Exception/data/locale/pt/LC_MESSAGES/Horde_Exception.mo create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Exception/data/locale/pt/LC_MESSAGES/Horde_Exception.po create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Exception/data/locale/pt_BR/LC_MESSAGES/Horde_Exception.mo create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Exception/data/locale/pt_BR/LC_MESSAGES/Horde_Exception.po create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Exception/data/locale/ro/LC_MESSAGES/Horde_Exception.mo create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Exception/data/locale/ro/LC_MESSAGES/Horde_Exception.po create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Exception/data/locale/ru/LC_MESSAGES/Horde_Exception.mo create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Exception/data/locale/ru/LC_MESSAGES/Horde_Exception.po create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Exception/data/locale/sk/LC_MESSAGES/Horde_Exception.mo create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Exception/data/locale/sk/LC_MESSAGES/Horde_Exception.po create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Exception/data/locale/sl/LC_MESSAGES/Horde_Exception.mo create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Exception/data/locale/sl/LC_MESSAGES/Horde_Exception.po create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Exception/data/locale/sv/LC_MESSAGES/Horde_Exception.mo create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Exception/data/locale/sv/LC_MESSAGES/Horde_Exception.po create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Exception/data/locale/tr/LC_MESSAGES/Horde_Exception.mo create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Exception/data/locale/tr/LC_MESSAGES/Horde_Exception.po create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Exception/data/locale/uk/LC_MESSAGES/Horde_Exception.mo create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Exception/data/locale/uk/LC_MESSAGES/Horde_Exception.po create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Exception/data/locale/zh_CN/LC_MESSAGES/Horde_Exception.mo create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Exception/data/locale/zh_CN/LC_MESSAGES/Horde_Exception.po create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Exception/data/locale/zh_TW/LC_MESSAGES/Horde_Exception.mo create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Exception/data/locale/zh_TW/LC_MESSAGES/Horde_Exception.po create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Idna/Horde/Idna.php create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Idna/Horde/Idna/Exception.php create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Idna/Horde/Idna/Punycode.php create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Idna/Horde/Idna/Translation.php create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Idna/data/locale/Horde_Idna.pot create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Idna/data/locale/de/LC_MESSAGES/Horde_Idna.mo create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Idna/data/locale/de/LC_MESSAGES/Horde_Idna.po create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Idna/data/locale/tr/LC_MESSAGES/Horde_Idna.mo create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Idna/data/locale/tr/LC_MESSAGES/Horde_Idna.po create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client.php create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Auth/DigestMD5.php create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Auth/Scram.php create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Base.php create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Base/Alerts.php create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Base/Debug.php create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Base/Deprecated.php create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Base/Mailbox.php create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Base/Password.php create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Cache.php create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Cache/Backend.php create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Cache/Backend/Cache.php create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Cache/Backend/Db.php create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Cache/Backend/Hashtable.php create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Cache/Backend/Mongo.php create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Cache/Backend/Null.php create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Data/Acl.php create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Data/AclCommon.php create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Data/AclNegative.php create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Data/AclRights.php create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Data/BaseSubject.php create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Data/Capability.php create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Data/Capability/Imap.php create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Data/Envelope.php create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Data/Fetch.php create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Data/Fetch/Pop3.php create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Data/Format.php create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Data/Format/Astring.php create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Data/Format/Astring/Nonascii.php create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Data/Format/Atom.php create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Data/Format/Date.php create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Data/Format/DateTime.php create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Data/Format/Exception.php create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Data/Format/Filter/Quote.php create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Data/Format/Filter/String.php create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Data/Format/List.php create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Data/Format/ListMailbox.php create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Data/Format/ListMailbox/Utf8.php create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Data/Format/Mailbox.php create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Data/Format/Mailbox/Utf8.php create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Data/Format/Nil.php create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Data/Format/Nstring.php create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Data/Format/Nstring/Nonascii.php create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Data/Format/Number.php create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Data/Format/String.php create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Data/Format/String/Nonascii.php create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Data/Format/String/Support/Nonascii.php create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Data/Namespace.php create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Data/SearchCharset.php create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Data/SearchCharset/Utf8.php create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Data/Sync.php create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Data/Thread.php create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/DateTime.php create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Exception.php create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Exception/NoSupportExtension.php create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Exception/NoSupportPop3.php create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Exception/SearchCharset.php create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Exception/ServerResponse.php create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Exception/Sync.php create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Fetch/Query.php create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Fetch/Results.php create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Ids.php create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Ids/Map.php create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Ids/Pop3.php create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Interaction/Client.php create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Interaction/Command.php create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Interaction/Command/Continuation.php create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Interaction/Pipeline.php create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Interaction/Server.php create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Interaction/Server/Continuation.php create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Interaction/Server/Tagged.php create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Interaction/Server/Untagged.php create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Mailbox.php create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Mailbox/List.php create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Namespace/List.php create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Password/Xoauth2.php create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Search/Query.php create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Socket.php create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Socket/Catenate.php create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Socket/ClientSort.php create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Socket/Connection/Base.php create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Socket/Connection/Pop3.php create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Socket/Connection/Socket.php create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Socket/Pop3.php create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Tokenize.php create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Translation.php create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Url.php create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Url/Base.php create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Url/Imap.php create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Url/Imap/Relative.php create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Url/Pop3.php create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Utf7imap.php create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/data/locale/Horde_Imap_Client.pot create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/data/locale/da/LC_MESSAGES/Horde_Imap_Client.mo create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/data/locale/da/LC_MESSAGES/Horde_Imap_Client.po create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/data/locale/de/LC_MESSAGES/Horde_Imap_Client.mo create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/data/locale/de/LC_MESSAGES/Horde_Imap_Client.po create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/data/locale/el/LC_MESSAGES/Horde_Imap_Client.mo create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/data/locale/el/LC_MESSAGES/Horde_Imap_Client.po create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/data/locale/es/LC_MESSAGES/Horde_Imap_Client.mo create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/data/locale/es/LC_MESSAGES/Horde_Imap_Client.po create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/data/locale/eu/LC_MESSAGES/Horde_Imap_Client.mo create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/data/locale/eu/LC_MESSAGES/Horde_Imap_Client.po create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/data/locale/fi/LC_MESSAGES/Horde_Imap_Client.mo create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/data/locale/fi/LC_MESSAGES/Horde_Imap_Client.po create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/data/locale/fr/LC_MESSAGES/Horde_Imap_Client.mo create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/data/locale/fr/LC_MESSAGES/Horde_Imap_Client.po create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/data/locale/hu/LC_MESSAGES/Horde_Imap_Client.mo create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/data/locale/hu/LC_MESSAGES/Horde_Imap_Client.po create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/data/locale/ja/LC_MESSAGES/Horde_Imap_Client.mo create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/data/locale/ja/LC_MESSAGES/Horde_Imap_Client.po create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/data/locale/nl/LC_MESSAGES/Horde_Imap_Client.mo create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/data/locale/nl/LC_MESSAGES/Horde_Imap_Client.po create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/data/locale/tr/LC_MESSAGES/Horde_Imap_Client.mo create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/data/locale/tr/LC_MESSAGES/Horde_Imap_Client.po create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/data/migration/1_horde_imap_client_base_tables.php create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/data/migration/2_horde_imap_client_change_column_name.php create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_ListHeaders/Horde/ListHeaders.php create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_ListHeaders/Horde/ListHeaders/Base.php create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_ListHeaders/Horde/ListHeaders/Id.php create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_ListHeaders/Horde/ListHeaders/NoPost.php create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_ListHeaders/Horde/ListHeaders/Object.php create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_ListHeaders/Horde/ListHeaders/Translation.php create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_ListHeaders/data/locale/Horde_ListHeaders.pot create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_ListHeaders/data/locale/da/LC_MESSAGES/Horde_ListHeaders.mo create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_ListHeaders/data/locale/da/LC_MESSAGES/Horde_ListHeaders.po create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_ListHeaders/data/locale/de/LC_MESSAGES/Horde_ListHeaders.mo create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_ListHeaders/data/locale/de/LC_MESSAGES/Horde_ListHeaders.po create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_ListHeaders/data/locale/el/LC_MESSAGES/Horde_ListHeaders.mo create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_ListHeaders/data/locale/el/LC_MESSAGES/Horde_ListHeaders.po create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_ListHeaders/data/locale/es/LC_MESSAGES/Horde_ListHeaders.mo create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_ListHeaders/data/locale/es/LC_MESSAGES/Horde_ListHeaders.po create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_ListHeaders/data/locale/hu/LC_MESSAGES/Horde_ListHeaders.mo create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_ListHeaders/data/locale/hu/LC_MESSAGES/Horde_ListHeaders.po create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_ListHeaders/data/locale/ja/LC_MESSAGES/Horde_ListHeaders.mo create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_ListHeaders/data/locale/ja/LC_MESSAGES/Horde_ListHeaders.po create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_ListHeaders/data/locale/tr/LC_MESSAGES/Horde_ListHeaders.mo create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_ListHeaders/data/locale/tr/LC_MESSAGES/Horde_ListHeaders.po create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mail/Horde/Mail/Exception.php create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mail/Horde/Mail/Mbox/Parse.php create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mail/Horde/Mail/Rfc822.php create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mail/Horde/Mail/Rfc822/Address.php create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mail/Horde/Mail/Rfc822/Group.php create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mail/Horde/Mail/Rfc822/GroupList.php create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mail/Horde/Mail/Rfc822/Identification.php create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mail/Horde/Mail/Rfc822/List.php create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mail/Horde/Mail/Rfc822/Object.php create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mail/Horde/Mail/Translation.php create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mail/Horde/Mail/Transport.php create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mail/Horde/Mail/Transport/Lmtphorde.php create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mail/Horde/Mail/Transport/Mail.php create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mail/Horde/Mail/Transport/Mock.php create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mail/Horde/Mail/Transport/Null.php create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mail/Horde/Mail/Transport/Sendmail.php create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mail/Horde/Mail/Transport/Smtp.php create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mail/Horde/Mail/Transport/Smtphorde.php create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mail/Horde/Mail/Transport/Smtpmx.php create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mail/data/locale/Horde_Mail.pot create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mail/data/locale/tr/LC_MESSAGES/Horde_Mail.mo create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mail/data/locale/tr/LC_MESSAGES/Horde_Mail.po create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mime/Horde/Mime.php create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mime/Horde/Mime/ContentParam/Decode.php create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mime/Horde/Mime/Exception.php create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mime/Horde/Mime/Filter/Encoding.php create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mime/Horde/Mime/Headers.php create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mime/Horde/Mime/Headers/Addresses.php create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mime/Horde/Mime/Headers/AddressesMulti.php create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mime/Horde/Mime/Headers/ContentDescription.php create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mime/Horde/Mime/Headers/ContentId.php create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mime/Horde/Mime/Headers/ContentLanguage.php create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mime/Horde/Mime/Headers/ContentParam.php create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mime/Horde/Mime/Headers/ContentParam/ContentDisposition.php create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mime/Horde/Mime/Headers/ContentParam/ContentType.php create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mime/Horde/Mime/Headers/ContentTransferEncoding.php create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mime/Horde/Mime/Headers/Date.php create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mime/Horde/Mime/Headers/Deprecated.php create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mime/Horde/Mime/Headers/Element.php create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mime/Horde/Mime/Headers/Element/Address.php create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mime/Horde/Mime/Headers/Element/Multiple.php create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mime/Horde/Mime/Headers/Element/Single.php create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mime/Horde/Mime/Headers/Extension/Mime.php create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mime/Horde/Mime/Headers/Identification.php create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mime/Horde/Mime/Headers/MessageId.php create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mime/Horde/Mime/Headers/Mime.php create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mime/Horde/Mime/Headers/MimeVersion.php create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mime/Horde/Mime/Headers/Received.php create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mime/Horde/Mime/Headers/Subject.php create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mime/Horde/Mime/Headers/UserAgent.php create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mime/Horde/Mime/Id.php create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mime/Horde/Mime/Magic.php create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mime/Horde/Mime/Mail.php create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mime/Horde/Mime/Mdn.php create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mime/Horde/Mime/Part.php create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mime/Horde/Mime/Part/Iterator.php create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mime/Horde/Mime/Part/Upgrade/V1.php create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mime/Horde/Mime/QuotedPrintable.php create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mime/Horde/Mime/Related.php create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mime/Horde/Mime/Translation.php create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mime/Horde/Mime/Uudecode.php create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mime/Horde/Mime/mime.mapping.php create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mime/data/locale/Horde_Mime.pot create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mime/data/locale/ar/LC_MESSAGES/Horde_Mime.mo create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mime/data/locale/ar/LC_MESSAGES/Horde_Mime.po create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mime/data/locale/bg/LC_MESSAGES/Horde_Mime.mo create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mime/data/locale/bg/LC_MESSAGES/Horde_Mime.po create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mime/data/locale/bs/LC_MESSAGES/Horde_Mime.mo create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mime/data/locale/bs/LC_MESSAGES/Horde_Mime.po create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mime/data/locale/ca/LC_MESSAGES/Horde_Mime.mo create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mime/data/locale/ca/LC_MESSAGES/Horde_Mime.po create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mime/data/locale/cs/LC_MESSAGES/Horde_Mime.mo create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mime/data/locale/cs/LC_MESSAGES/Horde_Mime.po create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mime/data/locale/da/LC_MESSAGES/Horde_Mime.mo create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mime/data/locale/da/LC_MESSAGES/Horde_Mime.po create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mime/data/locale/de/LC_MESSAGES/Horde_Mime.mo create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mime/data/locale/de/LC_MESSAGES/Horde_Mime.po create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mime/data/locale/el/LC_MESSAGES/Horde_Mime.mo create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mime/data/locale/el/LC_MESSAGES/Horde_Mime.po create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mime/data/locale/es/LC_MESSAGES/Horde_Mime.mo create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mime/data/locale/es/LC_MESSAGES/Horde_Mime.po create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mime/data/locale/et/LC_MESSAGES/Horde_Mime.mo create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mime/data/locale/et/LC_MESSAGES/Horde_Mime.po create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mime/data/locale/eu/LC_MESSAGES/Horde_Mime.mo create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mime/data/locale/eu/LC_MESSAGES/Horde_Mime.po create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mime/data/locale/fa/LC_MESSAGES/Horde_Mime.mo create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mime/data/locale/fa/LC_MESSAGES/Horde_Mime.po create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mime/data/locale/fi/LC_MESSAGES/Horde_Mime.mo create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mime/data/locale/fi/LC_MESSAGES/Horde_Mime.po create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mime/data/locale/fr/LC_MESSAGES/Horde_Mime.mo create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mime/data/locale/fr/LC_MESSAGES/Horde_Mime.po create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mime/data/locale/gl/LC_MESSAGES/Horde_Mime.mo create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mime/data/locale/gl/LC_MESSAGES/Horde_Mime.po create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mime/data/locale/he/LC_MESSAGES/Horde_Mime.mo create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mime/data/locale/he/LC_MESSAGES/Horde_Mime.po create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mime/data/locale/hr/LC_MESSAGES/Horde_Mime.mo create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mime/data/locale/hr/LC_MESSAGES/Horde_Mime.po create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mime/data/locale/hu/LC_MESSAGES/Horde_Mime.mo create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mime/data/locale/hu/LC_MESSAGES/Horde_Mime.po create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mime/data/locale/id/LC_MESSAGES/Horde_Mime.mo create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mime/data/locale/id/LC_MESSAGES/Horde_Mime.po create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mime/data/locale/is/LC_MESSAGES/Horde_Mime.mo create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mime/data/locale/is/LC_MESSAGES/Horde_Mime.po create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mime/data/locale/it/LC_MESSAGES/Horde_Mime.mo create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mime/data/locale/it/LC_MESSAGES/Horde_Mime.po create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mime/data/locale/ja/LC_MESSAGES/Horde_Mime.mo create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mime/data/locale/ja/LC_MESSAGES/Horde_Mime.po create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mime/data/locale/km/LC_MESSAGES/Horde_Mime.mo create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mime/data/locale/km/LC_MESSAGES/Horde_Mime.po create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mime/data/locale/ko/LC_MESSAGES/Horde_Mime.mo create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mime/data/locale/ko/LC_MESSAGES/Horde_Mime.po create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mime/data/locale/lt/LC_MESSAGES/Horde_Mime.mo create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mime/data/locale/lt/LC_MESSAGES/Horde_Mime.po create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mime/data/locale/lv/LC_MESSAGES/Horde_Mime.mo create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mime/data/locale/lv/LC_MESSAGES/Horde_Mime.po create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mime/data/locale/mk/LC_MESSAGES/Horde_Mime.mo create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mime/data/locale/mk/LC_MESSAGES/Horde_Mime.po create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mime/data/locale/nb/LC_MESSAGES/Horde_Mime.mo create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mime/data/locale/nb/LC_MESSAGES/Horde_Mime.po create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mime/data/locale/nl/LC_MESSAGES/Horde_Mime.mo create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mime/data/locale/nl/LC_MESSAGES/Horde_Mime.po create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mime/data/locale/nn/LC_MESSAGES/Horde_Mime.mo create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mime/data/locale/nn/LC_MESSAGES/Horde_Mime.po create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mime/data/locale/pl/LC_MESSAGES/Horde_Mime.mo create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mime/data/locale/pl/LC_MESSAGES/Horde_Mime.po create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mime/data/locale/pt/LC_MESSAGES/Horde_Mime.mo create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mime/data/locale/pt/LC_MESSAGES/Horde_Mime.po create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mime/data/locale/pt_BR/LC_MESSAGES/Horde_Mime.mo create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mime/data/locale/pt_BR/LC_MESSAGES/Horde_Mime.po create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mime/data/locale/ro/LC_MESSAGES/Horde_Mime.mo create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mime/data/locale/ro/LC_MESSAGES/Horde_Mime.po create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mime/data/locale/ru/LC_MESSAGES/Horde_Mime.mo create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mime/data/locale/ru/LC_MESSAGES/Horde_Mime.po create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mime/data/locale/sk/LC_MESSAGES/Horde_Mime.mo create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mime/data/locale/sk/LC_MESSAGES/Horde_Mime.po create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mime/data/locale/sl/LC_MESSAGES/Horde_Mime.mo create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mime/data/locale/sl/LC_MESSAGES/Horde_Mime.po create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mime/data/locale/sv/LC_MESSAGES/Horde_Mime.mo create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mime/data/locale/sv/LC_MESSAGES/Horde_Mime.po create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mime/data/locale/tr/LC_MESSAGES/Horde_Mime.mo create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mime/data/locale/tr/LC_MESSAGES/Horde_Mime.po create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mime/data/locale/uk/LC_MESSAGES/Horde_Mime.mo create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mime/data/locale/uk/LC_MESSAGES/Horde_Mime.po create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mime/data/locale/zh_CN/LC_MESSAGES/Horde_Mime.mo create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mime/data/locale/zh_CN/LC_MESSAGES/Horde_Mime.po create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mime/data/locale/zh_TW/LC_MESSAGES/Horde_Mime.mo create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mime/data/locale/zh_TW/LC_MESSAGES/Horde_Mime.po create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Secret/Horde/Secret.php create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Secret/Horde/Secret/Exception.php create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Socket_Client/Horde/Socket/Client.php create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Socket_Client/Horde/Socket/Client/Exception.php create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Stream/Horde/Stream.php create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Stream/Horde/Stream/Exception.php create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Stream/Horde/Stream/Existing.php create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Stream/Horde/Stream/String.php create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Stream/Horde/Stream/Temp.php create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Stream/Horde/Stream/TempString.php create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Stream_Filter/Horde/Stream/Filter/Bin2hex.php create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Stream_Filter/Horde/Stream/Filter/Crc32.php create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Stream_Filter/Horde/Stream/Filter/Eol.php create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Stream_Filter/Horde/Stream/Filter/Htmlspecialchars.php create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Stream_Filter/Horde/Stream/Filter/Null.php create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Stream_Wrapper/Horde/Stream/Wrapper/Combine.php create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Stream_Wrapper/Horde/Stream/Wrapper/CombineStream.php create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Stream_Wrapper/Horde/Stream/Wrapper/String.php create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Stream_Wrapper/Horde/Stream/Wrapper/StringStream.php create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Support/Horde/Support/Array.php create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Support/Horde/Support/Backtrace.php create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Support/Horde/Support/CaseInsensitiveArray.php create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Support/Horde/Support/CombineStream.php create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Support/Horde/Support/ConsistentHash.php create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Support/Horde/Support/Guid.php create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Support/Horde/Support/Inflector.php create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Support/Horde/Support/Memory.php create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Support/Horde/Support/Numerizer.php create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Support/Horde/Support/Numerizer/Locale/Base.php create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Support/Horde/Support/Numerizer/Locale/De.php create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Support/Horde/Support/Numerizer/Locale/Pt.php create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Support/Horde/Support/ObjectStub.php create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Support/Horde/Support/Randomid.php create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Support/Horde/Support/Stack.php create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Support/Horde/Support/StringStream.php create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Support/Horde/Support/Stub.php create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Support/Horde/Support/Timer.php create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Support/Horde/Support/Uuid.php create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Text_Flowed/Horde/Text/Flowed.php create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Translation/Horde/Translation.php create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Translation/Horde/Translation/Autodetect.php create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Translation/Horde/Translation/Exception.php create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Translation/Horde/Translation/Handler.php create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Translation/Horde/Translation/Handler/Gettext.php create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Util/Horde/Array.php create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Util/Horde/Array/Sort/Helper.php create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Util/Horde/Domhtml.php create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Util/Horde/String.php create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Util/Horde/String/Transliterate.php create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Util/Horde/Util.php create mode 100644 lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Util/Horde/Variables.php delete mode 100644 lam/lib/3rdParty/composer/ramsey/uuid/CODE_OF_CONDUCT.md delete mode 100644 lam/lib/3rdParty/composer/ramsey/uuid/CONTRIBUTING.md create mode 100644 lam/lib/3rdParty/composer/ramsey/uuid/src/functions.php diff --git a/lam-packaging/debian/copyright b/lam-packaging/debian/copyright index f8876244..548ed39e 100644 --- a/lam-packaging/debian/copyright +++ b/lam-packaging/debian/copyright @@ -87,7 +87,6 @@ The complete license can be found in the file COPYING or in Some parts of this package have other, compatible licences. These are: A: - DejaVu Fonts — License Fonts are © Bitstream (see below). DejaVu changes are in public domain. Explanation @@ -178,6 +177,7 @@ A: Software without prior written authorization from Tavmjong Bah. For further information, contact: tavmjong @ free . fr. + B: MIT License @@ -200,6 +200,7 @@ B: OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + C: New BSD License @@ -224,8 +225,8 @@ C: OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -D: +D: GNU LESSER GENERAL PUBLIC LICENSE Version 3, 29 June 2007 @@ -392,6 +393,7 @@ D: permanent authorization for you to choose that version for the Library. + E: Duo @@ -418,6 +420,7 @@ E: (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + F: 3-Clause BSD License @@ -446,6 +449,7 @@ F: NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + G: 2-Clause BSD License @@ -471,42 +475,518 @@ G: POSSIBILITY OF SUCH DAMAGE. +H: + 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. + + + Programs and licenses with other licenses and/or authors than the main license and authors: -lib/3rdParty/composer/beberlei G 2013 Benjamin Eberlei -lib/3rdParty/composer/composer B Nils Adermann, Jordi Boggiano -lib/3rdParty/composer/fgrosse B 2015 Friedrich Große -lib/3rdParty/composer/nyholm B 2016 Tobias Nyholm -lib/3rdParty/composer/paragonie B 2015 Paragon Initiative Enterprises -lib/3rdParty/composer/php-http B 2015 PHP HTTP Team -lib/3rdParty/composer/psr B 2018 PHP Framework Interoperability Group -lib/3rdParty/composer/ramsey B 2018 Ben Ramsey -lib/3rdParty/composer/spomky-labs B 2018 Spomky-Labs -lib/3rdParty/composer/symfony B 2019 Fabien Potencier -lib/3rdParty/composer/web-auth B 2018 Spomky-Labs -lib/3rdParty/tcpdf D 2018 Nicola Asuni - Tecnick.com LTD -lib/3rdParty/tcpdf/fonts/DejaVu*.ttf A Public Domain, Bitstream, Inc., Tavmjong Bah -lib/3rdParty/tcpdf/fonts/DejaVu*.z A Public Domain, Bitstream, Inc., Tavmjong Bah -lib/3rdParty/phpseclib B 2019 TerraFrost and other contributors -lib/3rdParty/Monolog B 2011 Jordi Boggiano -lib/3rdParty/Psr B 2012 PHP Framework Interoperability Group -lib/3rdParty/yubico/Yubico.php C 2015 Yubico AB -templates/lib/*jquery*.js B 2018 jQuery Foundation and other contributors -style/120_jquery-ui*.css B 2016 jQuery Foundation and other contributors -templates/lib/*jquery-dropmenu-*.js B 2010 Fred Heusschen -style/150_jquery-dropmenu*.css B 2010 Fred Heusschen -templates/lib/*jquery-fineuploader-*.js B 2010 Andrew Valums -style/150_jquery-fineuploader*.css B 2010 Andrew Valums -templates/lib/*jquery-validationEngine-*.js B 2010 Cedric Dugas and Olivier Refalo -style/150_jquery-validationEngine*.css B 2010 Cedric Dugas and Olivier Refalo -templates/lib/extra/cropperjs B 2018 Chen Fengyuan -style/600_cropper*.css B 2018 Chen Fengyuan -templates/lib/extra/duo/*.js E 2019 Duo Security -lib/3rdParty/duo/*.php E 2019 Duo Security -graphics/webauthn.svg F 2017 Duo Security, Inc. -templates/lib/600_jquery.magnific-popup.js B 2016 Dmitry Semenov -style/610_magnific-popup.css B 2016 Dmitry Semenov -style/responsive/105_normalize.css B Nicolas Gallagher and Jonathan Neal -style/responsive/110_grid.css B +lib/3rdParty/composer/beberlei G 2013 Benjamin Eberlei +lib/3rdParty/composer/composer B Nils Adermann, Jordi Boggiano +lib/3rdParty/composer/fgrosse B 2015 Friedrich Große +lib/3rdParty/composer/nyholm B 2016 Tobias Nyholm +lib/3rdParty/composer/paragonie B 2015 Paragon Initiative Enterprises +lib/3rdParty/composer/pear-pear.horde.org/Horde_Crypt_Blowfish H +lib/3rdParty/composer/pear-pear.horde.org/Horde_Exception H +lib/3rdParty/composer/pear-pear.horde.org/Horde_Idna G +lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client H +lib/3rdParty/composer/pear-pear.horde.org/Horde_ListHeaders H +lib/3rdParty/composer/pear-pear.horde.org/Horde_Mail G +lib/3rdParty/composer/pear-pear.horde.org/Horde_Mime H +lib/3rdParty/composer/pear-pear.horde.org/Horde_Secret H +lib/3rdParty/composer/pear-pear.horde.org/Horde_Socket_Client H +lib/3rdParty/composer/pear-pear.horde.org/Horde_Stream H +lib/3rdParty/composer/pear-pear.horde.org/Horde_Stream_Filter H +lib/3rdParty/composer/pear-pear.horde.org/Horde_Stream_Wrapper G +lib/3rdParty/composer/pear-pear.horde.org/Horde_Support G +lib/3rdParty/composer/pear-pear.horde.org/Horde_Text_Flowed H +lib/3rdParty/composer/pear-pear.horde.org/Horde_Translation H +lib/3rdParty/composer/pear-pear.horde.org/Horde_Util H +lib/3rdParty/composer/php-http B 2015 PHP HTTP Team +lib/3rdParty/composer/psr B 2018 PHP Framework Interoperability Group +lib/3rdParty/composer/ramsey B 2018 Ben Ramsey +lib/3rdParty/composer/spomky-labs B 2018 Spomky-Labs +lib/3rdParty/composer/symfony B 2019 Fabien Potencier +lib/3rdParty/composer/web-auth B 2018 Spomky-Labs +lib/3rdParty/tcpdf D 2018 Nicola Asuni - Tecnick.com LTD +lib/3rdParty/tcpdf/fonts/DejaVu*.ttf A Public Domain, Bitstream, Inc., Tavmjong Bah +lib/3rdParty/tcpdf/fonts/DejaVu*.z A Public Domain, Bitstream, Inc., Tavmjong Bah +lib/3rdParty/phpseclib B 2019 TerraFrost and other contributors +lib/3rdParty/Monolog B 2011 Jordi Boggiano +lib/3rdParty/Psr B 2012 PHP Framework Interoperability Group +lib/3rdParty/yubico/Yubico.php C 2015 Yubico AB +templates/lib/*jquery*.js B 2018 jQuery Foundation and other contributors +style/120_jquery-ui*.css B 2016 jQuery Foundation and other contributors +templates/lib/*jquery-dropmenu-*.js B 2010 Fred Heusschen +style/150_jquery-dropmenu*.css B 2010 Fred Heusschen +templates/lib/*jquery-fineuploader-*.js B 2010 Andrew Valums +style/150_jquery-fineuploader*.css B 2010 Andrew Valums +templates/lib/*jquery-validationEngine-*.js B 2010 Cedric Dugas and Olivier Refalo +style/150_jquery-validationEngine*.css B 2010 Cedric Dugas and Olivier Refalo +templates/lib/extra/cropperjs B 2018 Chen Fengyuan +style/600_cropper*.css B 2018 Chen Fengyuan +templates/lib/extra/duo/*.js E 2019 Duo Security +lib/3rdParty/duo/*.php E 2019 Duo Security +graphics/webauthn.svg F 2017 Duo Security, Inc. +templates/lib/600_jquery.magnific-popup.js B 2016 Dmitry Semenov +style/610_magnific-popup.css B 2016 Dmitry Semenov +style/responsive/105_normalize.css B Nicolas Gallagher and Jonathan Neal +style/responsive/110_grid.css B diff --git a/lam/composer.json b/lam/composer.json index 68a77fea..fdfdceca 100644 --- a/lam/composer.json +++ b/lam/composer.json @@ -2,9 +2,16 @@ "config": { "vendor-dir": "lib/3rdParty/composer" }, + "repositories": [ + { + "type": "pear", + "url": "https://pear.horde.org" + } + ], "require" : { "web-auth/webauthn-lib" : "2.1.7", "symfony/http-foundation" : "5.0.0", - "symfony/psr-http-message-bridge" : "1.3.0" + "symfony/psr-http-message-bridge" : "1.3.0", + "pear-pear.horde.org/Horde_Imap_Client" : "2.30.1" } } \ No newline at end of file diff --git a/lam/composer.lock b/lam/composer.lock index 93f7d6d8..6d13eec2 100644 --- a/lam/composer.lock +++ b/lam/composer.lock @@ -4,20 +4,20 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "ef5f7241f5ed768a1c63843aadbb54aa", + "content-hash": "faf0719c09b7ff85ee6e4adcc038afb7", "packages": [ { "name": "beberlei/assert", - "version": "v3.2.6", + "version": "v3.2.7", "source": { "type": "git", "url": "https://github.com/beberlei/assert.git", - "reference": "99508be011753690fe108ded450f5caaae180cfa" + "reference": "d63a6943fc4fd1a2aedb65994e3548715105abcf" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/beberlei/assert/zipball/99508be011753690fe108ded450f5caaae180cfa", - "reference": "99508be011753690fe108ded450f5caaae180cfa", + "url": "https://api.github.com/repos/beberlei/assert/zipball/d63a6943fc4fd1a2aedb65994e3548715105abcf", + "reference": "d63a6943fc4fd1a2aedb65994e3548715105abcf", "shasum": "" }, "require": { @@ -66,7 +66,7 @@ "assertion", "validation" ], - "time": "2019-10-10T10:33:57+00:00" + "time": "2019-12-19T17:51:41+00:00" }, { "name": "fgrosse/phpasn1", @@ -244,6 +244,483 @@ ], "time": "2018-07-02T15:55:56+00:00" }, + { + "name": "pear-pear.horde.org/Horde_Crypt_Blowfish", + "version": "1.1.3", + "dist": { + "type": "file", + "url": "https://pear.horde.org/get/Horde_Crypt_Blowfish-1.1.3.tgz" + }, + "require": { + "pear-pear.horde.org/horde_exception": "<3.0.0.0", + "pear-pear.horde.org/horde_support": "<3.0.0.0", + "php": "<8.0.0.0" + }, + "replace": { + "pear-horde/horde_crypt_blowfish": "== 1.1.3.0" + }, + "type": "pear-library", + "autoload": { + "classmap": [ + "" + ] + }, + "include-path": [ + "/" + ], + "license": [ + "LGPL-2.1" + ], + "description": "A library that provides blowfish encryption/decryption for PHP string data." + }, + { + "name": "pear-pear.horde.org/Horde_Exception", + "version": "2.0.8", + "dist": { + "type": "file", + "url": "https://pear.horde.org/get/Horde_Exception-2.0.8.tgz" + }, + "require": { + "pear-pear.horde.org/horde_translation": "<3.0.0.0", + "php": "<8.0.0.0" + }, + "replace": { + "pear-horde/horde_exception": "== 2.0.8.0" + }, + "type": "pear-library", + "autoload": { + "classmap": [ + "" + ] + }, + "include-path": [ + "/" + ], + "license": [ + "LGPL-2.1" + ], + "description": "This class provides the default exception handlers for the Horde Application Framework." + }, + { + "name": "pear-pear.horde.org/Horde_Idna", + "version": "1.1.2", + "dist": { + "type": "file", + "url": "https://pear.horde.org/get/Horde_Idna-1.1.2.tgz" + }, + "require": { + "pear-pear.horde.org/horde_exception": "<3.0.0.0", + "pear-pear.horde.org/horde_util": "<3.0.0.0", + "php": "<8.0.0.0" + }, + "replace": { + "pear-horde/horde_idna": "== 1.1.2.0" + }, + "type": "pear-library", + "autoload": { + "classmap": [ + "" + ] + }, + "include-path": [ + "/" + ], + "license": [ + "BSD-2-Clause" + ], + "description": "A library that wraps various backends providing IDNA (Internationalized Domain Names in Applications) support." + }, + { + "name": "pear-pear.horde.org/Horde_Imap_Client", + "version": "2.30.1", + "dist": { + "type": "file", + "url": "https://pear.horde.org/get/Horde_Imap_Client-2.30.1.tgz" + }, + "require": { + "ext-hash": "*", + "ext-json": "*", + "pear-pear.horde.org/horde_exception": "<3.0.0.0", + "pear-pear.horde.org/horde_mail": "<3.0.0.0", + "pear-pear.horde.org/horde_mime": "<3.0.0.0", + "pear-pear.horde.org/horde_secret": "<3.0.0.0", + "pear-pear.horde.org/horde_socket_client": "<3.0.0.0", + "pear-pear.horde.org/horde_stream": "<2.0.0.0", + "pear-pear.horde.org/horde_stream_filter": "<3.0.0.0", + "pear-pear.horde.org/horde_translation": "<3.0.0.0", + "pear-pear.horde.org/horde_util": "<3.0.0.0", + "php": "<8.0.0.0" + }, + "replace": { + "pear-horde/horde_imap_client": "== 2.30.1.0" + }, + "type": "pear-library", + "autoload": { + "classmap": [ + "" + ] + }, + "include-path": [ + "/" + ], + "license": [ + "LGPL-2.1" + ], + "description": "A library to access IMAP4rev1 (RFC 3501) mail servers. Also supports connections to POP3 (STD 53/RFC 1939)." + }, + { + "name": "pear-pear.horde.org/Horde_ListHeaders", + "version": "1.2.5", + "dist": { + "type": "file", + "url": "https://pear.horde.org/get/Horde_ListHeaders-1.2.5.tgz" + }, + "require": { + "pear-pear.horde.org/horde_mail": "<3.0.0.0", + "pear-pear.horde.org/horde_translation": "<3.0.0.0", + "pear-pear.horde.org/horde_util": "<3.0.0.0", + "php": "<8.0.0.0" + }, + "replace": { + "pear-horde/horde_listheaders": "== 1.2.5.0" + }, + "type": "pear-library", + "autoload": { + "classmap": [ + "" + ] + }, + "include-path": [ + "/" + ], + "license": [ + "LGPL-2.1" + ], + "description": "The Horde_ListHeaders library parses Mailing List Headers as defined in RFC 2369 & RFC 2919." + }, + { + "name": "pear-pear.horde.org/Horde_Mail", + "version": "2.6.5", + "dist": { + "type": "file", + "url": "https://pear.horde.org/get/Horde_Mail-2.6.5.tgz" + }, + "require": { + "pear-pear.horde.org/horde_exception": "<3.0.0.0", + "pear-pear.horde.org/horde_idna": "<2.0.0.0", + "pear-pear.horde.org/horde_mime": "<3.0.0.0", + "pear-pear.horde.org/horde_stream_filter": "<3.0.0.0", + "pear-pear.horde.org/horde_translation": "<3.0.0.0", + "pear-pear.horde.org/horde_util": "<3.0.0.0", + "php": "<8.0.0.0" + }, + "replace": { + "pear-horde/horde_mail": "== 2.6.5.0" + }, + "type": "pear-library", + "autoload": { + "classmap": [ + "" + ] + }, + "include-path": [ + "/" + ], + "license": [ + "BSD-2-Clause" + ], + "description": "Provides interfaces for sending e-mail messages and parsing e-mail addresses." + }, + { + "name": "pear-pear.horde.org/Horde_Mime", + "version": "2.11.0", + "dist": { + "type": "file", + "url": "https://pear.horde.org/get/Horde_Mime-2.11.0.tgz" + }, + "require": { + "pear-pear.horde.org/horde_exception": "<3.0.0.0", + "pear-pear.horde.org/horde_listheaders": "<2.0.0.0", + "pear-pear.horde.org/horde_mail": "<3.0.0.0", + "pear-pear.horde.org/horde_stream": "<2.0.0.0", + "pear-pear.horde.org/horde_stream_filter": "<3.0.0.0", + "pear-pear.horde.org/horde_support": "<3.0.0.0", + "pear-pear.horde.org/horde_text_flowed": "<3.0.0.0", + "pear-pear.horde.org/horde_translation": "<3.0.0.0", + "pear-pear.horde.org/horde_util": "<3.0.0.0", + "php": "<8.0.0.0" + }, + "replace": { + "pear-horde/horde_mime": "== 2.11.0.0" + }, + "type": "pear-library", + "autoload": { + "classmap": [ + "" + ] + }, + "include-path": [ + "/" + ], + "license": [ + "LGPL-2.1" + ], + "description": "Provides methods for dealing with Multipurpose Internet Mail Extensions (MIME) features (RFC 2045/2046/2047)." + }, + { + "name": "pear-pear.horde.org/Horde_Secret", + "version": "2.0.6", + "dist": { + "type": "file", + "url": "https://pear.horde.org/get/Horde_Secret-2.0.6.tgz" + }, + "require": { + "ext-hash": "*", + "pear-pear.horde.org/horde_crypt_blowfish": "<2.0.0.0", + "pear-pear.horde.org/horde_exception": "<3.0.0.0", + "pear-pear.horde.org/horde_support": "<3.0.0.0", + "php": "<8.0.0.0" + }, + "replace": { + "pear-horde/horde_secret": "== 2.0.6.0" + }, + "type": "pear-library", + "autoload": { + "classmap": [ + "" + ] + }, + "include-path": [ + "/" + ], + "license": [ + "LGPL-2.1" + ], + "description": "An API for encrypting and decrypting small pieces of data with the use of a shared key." + }, + { + "name": "pear-pear.horde.org/Horde_Socket_Client", + "version": "2.1.2", + "dist": { + "type": "file", + "url": "https://pear.horde.org/get/Horde_Socket_Client-2.1.2.tgz" + }, + "require": { + "pear-pear.horde.org/horde_exception": "<3.0.0.0", + "php": "<8.0.0.0" + }, + "replace": { + "pear-horde/horde_socket_client": "== 2.1.2.0" + }, + "type": "pear-library", + "autoload": { + "classmap": [ + "" + ] + }, + "include-path": [ + "/" + ], + "license": [ + "LGPL-2.1" + ], + "description": "Provides abstract class for use in creating PHP network socket clients." + }, + { + "name": "pear-pear.horde.org/Horde_Stream", + "version": "1.6.3", + "dist": { + "type": "file", + "url": "https://pear.horde.org/get/Horde_Stream-1.6.3.tgz" + }, + "require": { + "pear-pear.horde.org/horde_exception": "<3.0.0.0", + "php": "<8.0.0.0" + }, + "replace": { + "pear-horde/horde_stream": "== 1.6.3.0" + }, + "type": "pear-library", + "autoload": { + "classmap": [ + "" + ] + }, + "include-path": [ + "/" + ], + "license": [ + "LGPL-2.1" + ], + "description": "An object-oriented interface to assist in creating and storing PHP stream resources, and to provide utility methods to access and manipulate the stream contents." + }, + { + "name": "pear-pear.horde.org/Horde_Stream_Filter", + "version": "2.0.4", + "dist": { + "type": "file", + "url": "https://pear.horde.org/get/Horde_Stream_Filter-2.0.4.tgz" + }, + "require": { + "php": "<8.0.0.0" + }, + "replace": { + "pear-horde/horde_stream_filter": "== 2.0.4.0" + }, + "type": "pear-library", + "autoload": { + "classmap": [ + "" + ] + }, + "include-path": [ + "/" + ], + "license": [ + "LGPL-2.1" + ], + "description": "A collection of various stream filters." + }, + { + "name": "pear-pear.horde.org/Horde_Stream_Wrapper", + "version": "2.1.4", + "dist": { + "type": "file", + "url": "https://pear.horde.org/get/Horde_Stream_Wrapper-2.1.4.tgz" + }, + "require": { + "php": "<8.0.0.0" + }, + "replace": { + "pear-horde/horde_stream_wrapper": "== 2.1.4.0" + }, + "type": "pear-library", + "autoload": { + "classmap": [ + "" + ] + }, + "include-path": [ + "/" + ], + "license": [ + "BSD-2-Clause" + ], + "description": "A collection of stream wrappers." + }, + { + "name": "pear-pear.horde.org/Horde_Support", + "version": "2.2.0", + "dist": { + "type": "file", + "url": "https://pear.horde.org/get/Horde_Support-2.2.0.tgz" + }, + "require": { + "pear-pear.horde.org/horde_exception": "<3.0.0.0", + "pear-pear.horde.org/horde_stream_wrapper": "<3.0.0.0", + "pear-pear.horde.org/horde_util": "<3.0.0.0", + "php": "<8.0.0.0" + }, + "replace": { + "pear-horde/horde_support": "== 2.2.0.0" + }, + "type": "pear-library", + "autoload": { + "classmap": [ + "" + ] + }, + "include-path": [ + "/" + ], + "license": [ + "BSD-2-Clause" + ], + "description": "Support classes not tied to Horde but is used by it. These classes can be used outside of Horde as well." + }, + { + "name": "pear-pear.horde.org/Horde_Text_Flowed", + "version": "2.0.4", + "dist": { + "type": "file", + "url": "https://pear.horde.org/get/Horde_Text_Flowed-2.0.4.tgz" + }, + "require": { + "pear-pear.horde.org/horde_util": "<3.0.0.0", + "php": "<8.0.0.0" + }, + "replace": { + "pear-horde/horde_text_flowed": "== 2.0.4.0" + }, + "type": "pear-library", + "autoload": { + "classmap": [ + "" + ] + }, + "include-path": [ + "/" + ], + "license": [ + "LGPL-2.1" + ], + "description": "A library that provides common methods for manipulating text using the encoding described in RFC 3676 ('flowed' text)." + }, + { + "name": "pear-pear.horde.org/Horde_Translation", + "version": "2.2.2", + "dist": { + "type": "file", + "url": "https://pear.horde.org/get/Horde_Translation-2.2.2.tgz" + }, + "require": { + "php": "<8.0.0.0" + }, + "replace": { + "pear-horde/horde_translation": "== 2.2.2.0" + }, + "type": "pear-library", + "autoload": { + "classmap": [ + "" + ] + }, + "include-path": [ + "/" + ], + "license": [ + "LGPL-2.1" + ], + "description": "Translation wrappers." + }, + { + "name": "pear-pear.horde.org/Horde_Util", + "version": "2.5.9", + "dist": { + "type": "file", + "url": "https://pear.horde.org/get/Horde_Util-2.5.9.tgz" + }, + "require": { + "ext-dom": "*", + "php": "<8.0.0.0" + }, + "replace": { + "pear-horde/horde_util": "== 2.5.9.0" + }, + "type": "pear-library", + "autoload": { + "classmap": [ + "" + ] + }, + "include-path": [ + "/" + ], + "license": [ + "LGPL-2.1" + ], + "description": "A library that provides functionality useful for all kind of applications." + }, { "name": "php-http/message-factory", "version": "v1.0.2", @@ -447,44 +924,46 @@ }, { "name": "ramsey/uuid", - "version": "3.8.0", + "version": "3.9.2", "source": { "type": "git", "url": "https://github.com/ramsey/uuid.git", - "reference": "d09ea80159c1929d75b3f9c60504d613aeb4a1e3" + "reference": "7779489a47d443f845271badbdcedfe4df8e06fb" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/ramsey/uuid/zipball/d09ea80159c1929d75b3f9c60504d613aeb4a1e3", - "reference": "d09ea80159c1929d75b3f9c60504d613aeb4a1e3", + "url": "https://api.github.com/repos/ramsey/uuid/zipball/7779489a47d443f845271badbdcedfe4df8e06fb", + "reference": "7779489a47d443f845271badbdcedfe4df8e06fb", "shasum": "" }, "require": { - "paragonie/random_compat": "^1.0|^2.0|9.99.99", - "php": "^5.4 || ^7.0", + "ext-json": "*", + "paragonie/random_compat": "^1 | ^2 | 9.99.99", + "php": "^5.4 | ^7 | ^8", "symfony/polyfill-ctype": "^1.8" }, "replace": { "rhumsaa/uuid": "self.version" }, "require-dev": { - "codeception/aspect-mock": "^1.0 | ~2.0.0", - "doctrine/annotations": "~1.2.0", - "goaop/framework": "1.0.0-alpha.2 | ^1.0 | ~2.1.0", - "ircmaxell/random-lib": "^1.1", - "jakub-onderka/php-parallel-lint": "^0.9.0", - "mockery/mockery": "^0.9.9", + "codeception/aspect-mock": "^1 | ^2", + "doctrine/annotations": "^1.2", + "goaop/framework": "1.0.0-alpha.2 | ^1 | ^2.1", + "jakub-onderka/php-parallel-lint": "^1", + "mockery/mockery": "^0.9.11 | ^1", "moontoast/math": "^1.1", - "php-mock/php-mock-phpunit": "^0.3|^1.1", - "phpunit/phpunit": "^4.7|^5.0|^6.5", - "squizlabs/php_codesniffer": "^2.3" + "paragonie/random-lib": "^2", + "php-mock/php-mock-phpunit": "^0.3 | ^1.1", + "phpunit/phpunit": "^4.8 | ^5.4 | ^6.5", + "squizlabs/php_codesniffer": "^3.5" }, "suggest": { "ext-ctype": "Provides support for PHP Ctype functions", "ext-libsodium": "Provides the PECL libsodium extension for use with the SodiumRandomGenerator", + "ext-openssl": "Provides the OpenSSL extension for use with the OpenSslGenerator", "ext-uuid": "Provides the PECL UUID extension for use with the PeclUuidTimeGenerator and PeclUuidRandomGenerator", - "ircmaxell/random-lib": "Provides RandomLib for use with the RandomLibAdapter", "moontoast/math": "Provides support for converting UUID to 128-bit integer (in string form).", + "paragonie/random-lib": "Provides RandomLib for use with the RandomLibAdapter", "ramsey/uuid-console": "A console application for generating UUIDs with ramsey/uuid", "ramsey/uuid-doctrine": "Allows the use of Ramsey\\Uuid\\Uuid as Doctrine field type." }, @@ -497,13 +976,21 @@ "autoload": { "psr-4": { "Ramsey\\Uuid\\": "src/" - } + }, + "files": [ + "src/functions.php" + ] }, "notification-url": "https://packagist.org/downloads/", "license": [ "MIT" ], "authors": [ + { + "name": "Ben Ramsey", + "email": "ben@benramsey.com", + "homepage": "https://benramsey.com" + }, { "name": "Marijn Huizendveld", "email": "marijn.huizendveld@gmail.com" @@ -511,11 +998,6 @@ { "name": "Thibaud Fabre", "email": "thibaud@aztech.io" - }, - { - "name": "Ben Ramsey", - "email": "ben@benramsey.com", - "homepage": "https://benramsey.com" } ], "description": "Formerly rhumsaa/uuid. A PHP 5.4+ library for generating RFC 4122 version 1, 3, 4, and 5 universally unique identifiers (UUID).", @@ -525,7 +1007,7 @@ "identifier", "uuid" ], - "time": "2018-07-19T23:38:55+00:00" + "time": "2019-12-17T08:18:51+00:00" }, { "name": "spomky-labs/base64url", @@ -702,16 +1184,16 @@ }, { "name": "symfony/mime", - "version": "v5.0.0", + "version": "v5.0.4", "source": { "type": "git", "url": "https://github.com/symfony/mime.git", - "reference": "76f3c09b7382bf979af7bcd8e6f8033f1324285e" + "reference": "2a3c7fee1f1a0961fa9cf360d5da553d05095e59" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/mime/zipball/76f3c09b7382bf979af7bcd8e6f8033f1324285e", - "reference": "76f3c09b7382bf979af7bcd8e6f8033f1324285e", + "url": "https://api.github.com/repos/symfony/mime/zipball/2a3c7fee1f1a0961fa9cf360d5da553d05095e59", + "reference": "2a3c7fee1f1a0961fa9cf360d5da553d05095e59", "shasum": "" }, "require": { @@ -760,7 +1242,7 @@ "mime", "mime-type" ], - "time": "2019-11-18T17:27:11+00:00" + "time": "2020-01-04T14:08:26+00:00" }, { "name": "symfony/polyfill-ctype", diff --git a/lam/copyright b/lam/copyright index 9679a9f8..42b75396 100644 --- a/lam/copyright +++ b/lam/copyright @@ -86,7 +86,6 @@ The complete license can be found in the file COPYING. Some parts of this package have other, compatible licences. These are: A: - DejaVu Fonts — License Fonts are © Bitstream (see below). DejaVu changes are in public domain. Explanation @@ -177,6 +176,7 @@ A: Software without prior written authorization from Tavmjong Bah. For further information, contact: tavmjong @ free . fr. + B: MIT License @@ -199,6 +199,7 @@ B: OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + C: New BSD License @@ -223,8 +224,8 @@ C: OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -D: +D: GNU LESSER GENERAL PUBLIC LICENSE Version 3, 29 June 2007 @@ -391,6 +392,7 @@ D: permanent authorization for you to choose that version for the Library. + E: Duo @@ -417,6 +419,7 @@ E: (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + F: 3-Clause BSD License @@ -445,6 +448,7 @@ F: NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + G: 2-Clause BSD License @@ -470,42 +474,518 @@ G: POSSIBILITY OF SUCH DAMAGE. +H: + 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. + + + Programs and licenses with other licenses and/or authors than the main license and authors: -lib/3rdParty/composer/beberlei G 2013 Benjamin Eberlei -lib/3rdParty/composer/composer B Nils Adermann, Jordi Boggiano -lib/3rdParty/composer/fgrosse B 2015 Friedrich Große -lib/3rdParty/composer/nyholm B 2016 Tobias Nyholm -lib/3rdParty/composer/paragonie B 2015 Paragon Initiative Enterprises -lib/3rdParty/composer/php-http B 2015 PHP HTTP Team -lib/3rdParty/composer/psr B 2018 PHP Framework Interoperability Group -lib/3rdParty/composer/ramsey B 2018 Ben Ramsey -lib/3rdParty/composer/spomky-labs B 2018 Spomky-Labs -lib/3rdParty/composer/symfony B 2019 Fabien Potencier -lib/3rdParty/composer/web-auth B 2018 Spomky-Labs -lib/3rdParty/tcpdf D 2018 Nicola Asuni - Tecnick.com LTD -lib/3rdParty/tcpdf/fonts/DejaVu*.ttf A Public Domain, Bitstream, Inc., Tavmjong Bah -lib/3rdParty/tcpdf/fonts/DejaVu*.z A Public Domain, Bitstream, Inc., Tavmjong Bah -lib/3rdParty/phpseclib B 2019 TerraFrost and other contributors -lib/3rdParty/Monolog B 2011 Jordi Boggiano -lib/3rdParty/Psr B 2012 PHP Framework Interoperability Group -lib/3rdParty/yubico/Yubico.php C 2015 Yubico AB -templates/lib/*jquery*.js B 2018 jQuery Foundation and other contributors -style/120_jquery-ui*.css B 2016 jQuery Foundation and other contributors -templates/lib/*jquery-dropmenu-*.js B 2010 Fred Heusschen -style/150_jquery-dropmenu*.css B 2010 Fred Heusschen -templates/lib/*jquery-fineuploader-*.js B 2010 Andrew Valums -style/150_jquery-fineuploader*.css B 2010 Andrew Valums -templates/lib/*jquery-validationEngine-*.js B 2010 Cedric Dugas and Olivier Refalo -style/150_jquery-validationEngine*.css B 2010 Cedric Dugas and Olivier Refalo -templates/lib/extra/cropperjs B 2018 Chen Fengyuan -style/600_cropper*.css B 2018 Chen Fengyuan -templates/lib/extra/duo/*.js E 2019 Duo Security -lib/3rdParty/duo/*.php E 2019 Duo Security -graphics/webauthn.svg F 2017 Duo Security, Inc. -templates/lib/600_jquery.magnific-popup.js B 2016 Dmitry Semenov -style/610_magnific-popup.css B 2016 Dmitry Semenov -style/responsive/105_normalize.css B Nicolas Gallagher and Jonathan Neal -style/responsive/110_grid.css B +lib/3rdParty/composer/beberlei G 2013 Benjamin Eberlei +lib/3rdParty/composer/composer B Nils Adermann, Jordi Boggiano +lib/3rdParty/composer/fgrosse B 2015 Friedrich Große +lib/3rdParty/composer/nyholm B 2016 Tobias Nyholm +lib/3rdParty/composer/paragonie B 2015 Paragon Initiative Enterprises +lib/3rdParty/composer/pear-pear.horde.org/Horde_Crypt_Blowfish H +lib/3rdParty/composer/pear-pear.horde.org/Horde_Exception H +lib/3rdParty/composer/pear-pear.horde.org/Horde_Idna G +lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client H +lib/3rdParty/composer/pear-pear.horde.org/Horde_ListHeaders H +lib/3rdParty/composer/pear-pear.horde.org/Horde_Mail G +lib/3rdParty/composer/pear-pear.horde.org/Horde_Mime H +lib/3rdParty/composer/pear-pear.horde.org/Horde_Secret H +lib/3rdParty/composer/pear-pear.horde.org/Horde_Socket_Client H +lib/3rdParty/composer/pear-pear.horde.org/Horde_Stream H +lib/3rdParty/composer/pear-pear.horde.org/Horde_Stream_Filter H +lib/3rdParty/composer/pear-pear.horde.org/Horde_Stream_Wrapper G +lib/3rdParty/composer/pear-pear.horde.org/Horde_Support G +lib/3rdParty/composer/pear-pear.horde.org/Horde_Text_Flowed H +lib/3rdParty/composer/pear-pear.horde.org/Horde_Translation H +lib/3rdParty/composer/pear-pear.horde.org/Horde_Util H +lib/3rdParty/composer/php-http B 2015 PHP HTTP Team +lib/3rdParty/composer/psr B 2018 PHP Framework Interoperability Group +lib/3rdParty/composer/ramsey B 2018 Ben Ramsey +lib/3rdParty/composer/spomky-labs B 2018 Spomky-Labs +lib/3rdParty/composer/symfony B 2019 Fabien Potencier +lib/3rdParty/composer/web-auth B 2018 Spomky-Labs +lib/3rdParty/tcpdf D 2018 Nicola Asuni - Tecnick.com LTD +lib/3rdParty/tcpdf/fonts/DejaVu*.ttf A Public Domain, Bitstream, Inc., Tavmjong Bah +lib/3rdParty/tcpdf/fonts/DejaVu*.z A Public Domain, Bitstream, Inc., Tavmjong Bah +lib/3rdParty/phpseclib B 2019 TerraFrost and other contributors +lib/3rdParty/Monolog B 2011 Jordi Boggiano +lib/3rdParty/Psr B 2012 PHP Framework Interoperability Group +lib/3rdParty/yubico/Yubico.php C 2015 Yubico AB +templates/lib/*jquery*.js B 2018 jQuery Foundation and other contributors +style/120_jquery-ui*.css B 2016 jQuery Foundation and other contributors +templates/lib/*jquery-dropmenu-*.js B 2010 Fred Heusschen +style/150_jquery-dropmenu*.css B 2010 Fred Heusschen +templates/lib/*jquery-fineuploader-*.js B 2010 Andrew Valums +style/150_jquery-fineuploader*.css B 2010 Andrew Valums +templates/lib/*jquery-validationEngine-*.js B 2010 Cedric Dugas and Olivier Refalo +style/150_jquery-validationEngine*.css B 2010 Cedric Dugas and Olivier Refalo +templates/lib/extra/cropperjs B 2018 Chen Fengyuan +style/600_cropper*.css B 2018 Chen Fengyuan +templates/lib/extra/duo/*.js E 2019 Duo Security +lib/3rdParty/duo/*.php E 2019 Duo Security +graphics/webauthn.svg F 2017 Duo Security, Inc. +templates/lib/600_jquery.magnific-popup.js B 2016 Dmitry Semenov +style/610_magnific-popup.css B 2016 Dmitry Semenov +style/responsive/105_normalize.css B Nicolas Gallagher and Jonathan Neal +style/responsive/110_grid.css B diff --git a/lam/lib/3rdParty/composer/beberlei/assert/lib/Assert/LazyAssertion.php b/lam/lib/3rdParty/composer/beberlei/assert/lib/Assert/LazyAssertion.php index c032911a..6ccd6423 100644 --- a/lam/lib/3rdParty/composer/beberlei/assert/lib/Assert/LazyAssertion.php +++ b/lam/lib/3rdParty/composer/beberlei/assert/lib/Assert/LazyAssertion.php @@ -21,96 +21,96 @@ use LogicException; * * @author Benjamin Eberlei * - * @method static static alnum(string|callable $message = null, string $propertyPath = null) Assert that value is alphanumeric. - * @method static static base64(string|callable $message = null, string $propertyPath = null) Assert that a constant is defined. - * @method static static between(mixed $lowerLimit, mixed $upperLimit, string|callable $message = null, string $propertyPath = null) Assert that a value is greater or equal than a lower limit, and less than or equal to an upper limit. - * @method static static betweenExclusive(mixed $lowerLimit, mixed $upperLimit, string|callable $message = null, string $propertyPath = null) Assert that a value is greater than a lower limit, and less than an upper limit. - * @method static static betweenLength(int $minLength, int $maxLength, string|callable $message = null, string $propertyPath = null, string $encoding = 'utf8') Assert that string length is between min and max lengths. - * @method static static boolean(string|callable $message = null, string $propertyPath = null) Assert that value is php boolean. - * @method static static choice(array $choices, string|callable $message = null, string $propertyPath = null) Assert that value is in array of choices. - * @method static static choicesNotEmpty(array $choices, string|callable $message = null, string $propertyPath = null) Determines if the values array has every choice as key and that this choice has content. - * @method static static classExists(string|callable $message = null, string $propertyPath = null) Assert that the class exists. - * @method static static contains(string $needle, string|callable $message = null, string $propertyPath = null, string $encoding = 'utf8') Assert that string contains a sequence of chars. - * @method static static count(int $count, string|callable $message = null, string $propertyPath = null) Assert that the count of countable is equal to count. - * @method static static date(string $format, string|callable $message = null, string $propertyPath = null) Assert that date is valid and corresponds to the given format. - * @method static static defined(string|callable $message = null, string $propertyPath = null) Assert that a constant is defined. - * @method static static digit(string|callable $message = null, string $propertyPath = null) Validates if an integer or integerish is a digit. - * @method static static directory(string|callable $message = null, string $propertyPath = null) Assert that a directory exists. - * @method static static e164(string|callable $message = null, string $propertyPath = null) Assert that the given string is a valid E164 Phone Number. - * @method static static email(string|callable $message = null, string $propertyPath = null) Assert that value is an email address (using input_filter/FILTER_VALIDATE_EMAIL). - * @method static static endsWith(string $needle, string|callable $message = null, string $propertyPath = null, string $encoding = 'utf8') Assert that string ends with a sequence of chars. - * @method static static eq(mixed $value2, string|callable $message = null, string $propertyPath = null) Assert that two values are equal (using ==). - * @method static static eqArraySubset(mixed $value2, string|callable $message = null, string $propertyPath = null) Assert that the array contains the subset. - * @method static static extensionLoaded(string|callable $message = null, string $propertyPath = null) Assert that extension is loaded. - * @method static static extensionVersion(string $operator, mixed $version, string|callable $message = null, string $propertyPath = null) Assert that extension is loaded and a specific version is installed. - * @method static static false(string|callable $message = null, string $propertyPath = null) Assert that the value is boolean False. - * @method static static file(string|callable $message = null, string $propertyPath = null) Assert that a file exists. - * @method static static float(string|callable $message = null, string $propertyPath = null) Assert that value is a php float. - * @method static static greaterOrEqualThan(mixed $limit, string|callable $message = null, string $propertyPath = null) Determines if the value is greater or equal than given limit. - * @method static static greaterThan(mixed $limit, string|callable $message = null, string $propertyPath = null) Determines if the value is greater than given limit. - * @method static static implementsInterface(string $interfaceName, string|callable $message = null, string $propertyPath = null) Assert that the class implements the interface. - * @method static static inArray(array $choices, string|callable $message = null, string $propertyPath = null) Assert that value is in array of choices. This is an alias of Assertion::choice(). - * @method static static integer(string|callable $message = null, string $propertyPath = null) Assert that value is a php integer. - * @method static static integerish(string|callable $message = null, string $propertyPath = null) Assert that value is a php integer'ish. - * @method static static interfaceExists(string|callable $message = null, string $propertyPath = null) Assert that the interface exists. - * @method static static ip(int $flag = null, string|callable $message = null, string $propertyPath = null) Assert that value is an IPv4 or IPv6 address. - * @method static static ipv4(int $flag = null, string|callable $message = null, string $propertyPath = null) Assert that value is an IPv4 address. - * @method static static ipv6(int $flag = null, string|callable $message = null, string $propertyPath = null) Assert that value is an IPv6 address. - * @method static static isArray(string|callable $message = null, string $propertyPath = null) Assert that value is an array. - * @method static static isArrayAccessible(string|callable $message = null, string $propertyPath = null) Assert that value is an array or an array-accessible object. - * @method static static isCallable(string|callable $message = null, string $propertyPath = null) Determines that the provided value is callable. - * @method static static isCountable(string|callable $message = null, string $propertyPath = null) Assert that value is countable. - * @method static static isInstanceOf(string $className, string|callable $message = null, string $propertyPath = null) Assert that value is instance of given class-name. - * @method static static isJsonString(string|callable $message = null, string $propertyPath = null) Assert that the given string is a valid json string. - * @method static static isObject(string|callable $message = null, string $propertyPath = null) Determines that the provided value is an object. - * @method static static isResource(string|callable $message = null, string $propertyPath = null) Assert that value is a resource. - * @method static static isTraversable(string|callable $message = null, string $propertyPath = null) Assert that value is an array or a traversable object. - * @method static static keyExists(string|int $key, string|callable $message = null, string $propertyPath = null) Assert that key exists in an array. - * @method static static keyIsset(string|int $key, string|callable $message = null, string $propertyPath = null) Assert that key exists in an array/array-accessible object using isset(). - * @method static static keyNotExists(string|int $key, string|callable $message = null, string $propertyPath = null) Assert that key does not exist in an array. - * @method static static length(int $length, string|callable $message = null, string $propertyPath = null, string $encoding = 'utf8') Assert that string has a given length. - * @method static static lessOrEqualThan(mixed $limit, string|callable $message = null, string $propertyPath = null) Determines if the value is less or equal than given limit. - * @method static static lessThan(mixed $limit, string|callable $message = null, string $propertyPath = null) Determines if the value is less than given limit. - * @method static static max(mixed $maxValue, string|callable $message = null, string $propertyPath = null) Assert that a number is smaller as a given limit. - * @method static static maxCount(int $count, string|callable $message = null, string $propertyPath = null) Assert that the countable have at most $count elements. - * @method static static maxLength(int $maxLength, string|callable $message = null, string $propertyPath = null, string $encoding = 'utf8') Assert that string value is not longer than $maxLength chars. - * @method static static methodExists(mixed $object, string|callable $message = null, string $propertyPath = null) Determines that the named method is defined in the provided object. - * @method static static min(mixed $minValue, string|callable $message = null, string $propertyPath = null) Assert that a value is at least as big as a given limit. - * @method static static minCount(int $count, string|callable $message = null, string $propertyPath = null) Assert that the countable have at least $count elements. - * @method static static minLength(int $minLength, string|callable $message = null, string $propertyPath = null, string $encoding = 'utf8') Assert that a string is at least $minLength chars long. - * @method static static noContent(string|callable $message = null, string $propertyPath = null) Assert that value is empty. - * @method static static notBlank(string|callable $message = null, string $propertyPath = null) Assert that value is not blank. - * @method static static notContains(string $needle, string|callable $message = null, string $propertyPath = null, string $encoding = 'utf8') Assert that string does not contains a sequence of chars. - * @method static static notEmpty(string|callable $message = null, string $propertyPath = null) Assert that value is not empty. - * @method static static notEmptyKey(string|int $key, string|callable $message = null, string $propertyPath = null) Assert that key exists in an array/array-accessible object and its value is not empty. - * @method static static notEq(mixed $value2, string|callable $message = null, string $propertyPath = null) Assert that two values are not equal (using ==). - * @method static static notInArray(array $choices, string|callable $message = null, string $propertyPath = null) Assert that value is not in array of choices. - * @method static static notIsInstanceOf(string $className, string|callable $message = null, string $propertyPath = null) Assert that value is not instance of given class-name. - * @method static static notNull(string|callable $message = null, string $propertyPath = null) Assert that value is not null. - * @method static static notRegex(string $pattern, string|callable $message = null, string $propertyPath = null) Assert that value does not match a regex. - * @method static static notSame(mixed $value2, string|callable $message = null, string $propertyPath = null) Assert that two values are not the same (using ===). - * @method static static null(string|callable $message = null, string $propertyPath = null) Assert that value is null. - * @method static static numeric(string|callable $message = null, string $propertyPath = null) Assert that value is numeric. - * @method static static objectOrClass(string|callable $message = null, string $propertyPath = null) Assert that the value is an object, or a class that exists. - * @method static static phpVersion(mixed $version, string|callable $message = null, string $propertyPath = null) Assert on PHP version. - * @method static static propertiesExist(array $properties, string|callable $message = null, string $propertyPath = null) Assert that the value is an object or class, and that the properties all exist. - * @method static static propertyExists(string $property, string|callable $message = null, string $propertyPath = null) Assert that the value is an object or class, and that the property exists. - * @method static static range(mixed $minValue, mixed $maxValue, string|callable $message = null, string $propertyPath = null) Assert that value is in range of numbers. - * @method static static readable(string|callable $message = null, string $propertyPath = null) Assert that the value is something readable. - * @method static static regex(string $pattern, string|callable $message = null, string $propertyPath = null) Assert that value matches a regex. - * @method static static same(mixed $value2, string|callable $message = null, string $propertyPath = null) Assert that two values are the same (using ===). - * @method static static satisfy(callable $callback, string|callable $message = null, string $propertyPath = null) Assert that the provided value is valid according to a callback. - * @method static static scalar(string|callable $message = null, string $propertyPath = null) Assert that value is a PHP scalar. - * @method static static startsWith(string $needle, string|callable $message = null, string $propertyPath = null, string $encoding = 'utf8') Assert that string starts with a sequence of chars. - * @method static static string(string|callable $message = null, string $propertyPath = null) Assert that value is a string. - * @method static static subclassOf(string $className, string|callable $message = null, string $propertyPath = null) Assert that value is subclass of given class-name. - * @method static static true(string|callable $message = null, string $propertyPath = null) Assert that the value is boolean True. - * @method static static url(string|callable $message = null, string $propertyPath = null) Assert that value is an URL. - * @method static static uuid(string|callable $message = null, string $propertyPath = null) Assert that the given string is a valid UUID. - * @method static static version(string $operator, string $version2, string|callable $message = null, string $propertyPath = null) Assert comparison of two versions. - * @method static static writeable(string|callable $message = null, string $propertyPath = null) Assert that the value is something writeable. - * @method static static all() Switch chain into validation mode for an array of values. - * @method static static nullOr() Switch chain into mode allowing nulls, ignoring further assertions. + * @method LazyAssertion alnum(string|callable $message = null, string $propertyPath = null) Assert that value is alphanumeric. + * @method LazyAssertion base64(string|callable $message = null, string $propertyPath = null) Assert that a constant is defined. + * @method LazyAssertion between(mixed $lowerLimit, mixed $upperLimit, string|callable $message = null, string $propertyPath = null) Assert that a value is greater or equal than a lower limit, and less than or equal to an upper limit. + * @method LazyAssertion betweenExclusive(mixed $lowerLimit, mixed $upperLimit, string|callable $message = null, string $propertyPath = null) Assert that a value is greater than a lower limit, and less than an upper limit. + * @method LazyAssertion betweenLength(int $minLength, int $maxLength, string|callable $message = null, string $propertyPath = null, string $encoding = 'utf8') Assert that string length is between min and max lengths. + * @method LazyAssertion boolean(string|callable $message = null, string $propertyPath = null) Assert that value is php boolean. + * @method LazyAssertion choice(array $choices, string|callable $message = null, string $propertyPath = null) Assert that value is in array of choices. + * @method LazyAssertion choicesNotEmpty(array $choices, string|callable $message = null, string $propertyPath = null) Determines if the values array has every choice as key and that this choice has content. + * @method LazyAssertion classExists(string|callable $message = null, string $propertyPath = null) Assert that the class exists. + * @method LazyAssertion contains(string $needle, string|callable $message = null, string $propertyPath = null, string $encoding = 'utf8') Assert that string contains a sequence of chars. + * @method LazyAssertion count(int $count, string|callable $message = null, string $propertyPath = null) Assert that the count of countable is equal to count. + * @method LazyAssertion date(string $format, string|callable $message = null, string $propertyPath = null) Assert that date is valid and corresponds to the given format. + * @method LazyAssertion defined(string|callable $message = null, string $propertyPath = null) Assert that a constant is defined. + * @method LazyAssertion digit(string|callable $message = null, string $propertyPath = null) Validates if an integer or integerish is a digit. + * @method LazyAssertion directory(string|callable $message = null, string $propertyPath = null) Assert that a directory exists. + * @method LazyAssertion e164(string|callable $message = null, string $propertyPath = null) Assert that the given string is a valid E164 Phone Number. + * @method LazyAssertion email(string|callable $message = null, string $propertyPath = null) Assert that value is an email address (using input_filter/FILTER_VALIDATE_EMAIL). + * @method LazyAssertion endsWith(string $needle, string|callable $message = null, string $propertyPath = null, string $encoding = 'utf8') Assert that string ends with a sequence of chars. + * @method LazyAssertion eq(mixed $value2, string|callable $message = null, string $propertyPath = null) Assert that two values are equal (using ==). + * @method LazyAssertion eqArraySubset(mixed $value2, string|callable $message = null, string $propertyPath = null) Assert that the array contains the subset. + * @method LazyAssertion extensionLoaded(string|callable $message = null, string $propertyPath = null) Assert that extension is loaded. + * @method LazyAssertion extensionVersion(string $operator, mixed $version, string|callable $message = null, string $propertyPath = null) Assert that extension is loaded and a specific version is installed. + * @method LazyAssertion false(string|callable $message = null, string $propertyPath = null) Assert that the value is boolean False. + * @method LazyAssertion file(string|callable $message = null, string $propertyPath = null) Assert that a file exists. + * @method LazyAssertion float(string|callable $message = null, string $propertyPath = null) Assert that value is a php float. + * @method LazyAssertion greaterOrEqualThan(mixed $limit, string|callable $message = null, string $propertyPath = null) Determines if the value is greater or equal than given limit. + * @method LazyAssertion greaterThan(mixed $limit, string|callable $message = null, string $propertyPath = null) Determines if the value is greater than given limit. + * @method LazyAssertion implementsInterface(string $interfaceName, string|callable $message = null, string $propertyPath = null) Assert that the class implements the interface. + * @method LazyAssertion inArray(array $choices, string|callable $message = null, string $propertyPath = null) Assert that value is in array of choices. This is an alias of Assertion::choice(). + * @method LazyAssertion integer(string|callable $message = null, string $propertyPath = null) Assert that value is a php integer. + * @method LazyAssertion integerish(string|callable $message = null, string $propertyPath = null) Assert that value is a php integer'ish. + * @method LazyAssertion interfaceExists(string|callable $message = null, string $propertyPath = null) Assert that the interface exists. + * @method LazyAssertion ip(int $flag = null, string|callable $message = null, string $propertyPath = null) Assert that value is an IPv4 or IPv6 address. + * @method LazyAssertion ipv4(int $flag = null, string|callable $message = null, string $propertyPath = null) Assert that value is an IPv4 address. + * @method LazyAssertion ipv6(int $flag = null, string|callable $message = null, string $propertyPath = null) Assert that value is an IPv6 address. + * @method LazyAssertion isArray(string|callable $message = null, string $propertyPath = null) Assert that value is an array. + * @method LazyAssertion isArrayAccessible(string|callable $message = null, string $propertyPath = null) Assert that value is an array or an array-accessible object. + * @method LazyAssertion isCallable(string|callable $message = null, string $propertyPath = null) Determines that the provided value is callable. + * @method LazyAssertion isCountable(string|callable $message = null, string $propertyPath = null) Assert that value is countable. + * @method LazyAssertion isInstanceOf(string $className, string|callable $message = null, string $propertyPath = null) Assert that value is instance of given class-name. + * @method LazyAssertion isJsonString(string|callable $message = null, string $propertyPath = null) Assert that the given string is a valid json string. + * @method LazyAssertion isObject(string|callable $message = null, string $propertyPath = null) Determines that the provided value is an object. + * @method LazyAssertion isResource(string|callable $message = null, string $propertyPath = null) Assert that value is a resource. + * @method LazyAssertion isTraversable(string|callable $message = null, string $propertyPath = null) Assert that value is an array or a traversable object. + * @method LazyAssertion keyExists(string|int $key, string|callable $message = null, string $propertyPath = null) Assert that key exists in an array. + * @method LazyAssertion keyIsset(string|int $key, string|callable $message = null, string $propertyPath = null) Assert that key exists in an array/array-accessible object using isset(). + * @method LazyAssertion keyNotExists(string|int $key, string|callable $message = null, string $propertyPath = null) Assert that key does not exist in an array. + * @method LazyAssertion length(int $length, string|callable $message = null, string $propertyPath = null, string $encoding = 'utf8') Assert that string has a given length. + * @method LazyAssertion lessOrEqualThan(mixed $limit, string|callable $message = null, string $propertyPath = null) Determines if the value is less or equal than given limit. + * @method LazyAssertion lessThan(mixed $limit, string|callable $message = null, string $propertyPath = null) Determines if the value is less than given limit. + * @method LazyAssertion max(mixed $maxValue, string|callable $message = null, string $propertyPath = null) Assert that a number is smaller as a given limit. + * @method LazyAssertion maxCount(int $count, string|callable $message = null, string $propertyPath = null) Assert that the countable have at most $count elements. + * @method LazyAssertion maxLength(int $maxLength, string|callable $message = null, string $propertyPath = null, string $encoding = 'utf8') Assert that string value is not longer than $maxLength chars. + * @method LazyAssertion methodExists(mixed $object, string|callable $message = null, string $propertyPath = null) Determines that the named method is defined in the provided object. + * @method LazyAssertion min(mixed $minValue, string|callable $message = null, string $propertyPath = null) Assert that a value is at least as big as a given limit. + * @method LazyAssertion minCount(int $count, string|callable $message = null, string $propertyPath = null) Assert that the countable have at least $count elements. + * @method LazyAssertion minLength(int $minLength, string|callable $message = null, string $propertyPath = null, string $encoding = 'utf8') Assert that a string is at least $minLength chars long. + * @method LazyAssertion noContent(string|callable $message = null, string $propertyPath = null) Assert that value is empty. + * @method LazyAssertion notBlank(string|callable $message = null, string $propertyPath = null) Assert that value is not blank. + * @method LazyAssertion notContains(string $needle, string|callable $message = null, string $propertyPath = null, string $encoding = 'utf8') Assert that string does not contains a sequence of chars. + * @method LazyAssertion notEmpty(string|callable $message = null, string $propertyPath = null) Assert that value is not empty. + * @method LazyAssertion notEmptyKey(string|int $key, string|callable $message = null, string $propertyPath = null) Assert that key exists in an array/array-accessible object and its value is not empty. + * @method LazyAssertion notEq(mixed $value2, string|callable $message = null, string $propertyPath = null) Assert that two values are not equal (using ==). + * @method LazyAssertion notInArray(array $choices, string|callable $message = null, string $propertyPath = null) Assert that value is not in array of choices. + * @method LazyAssertion notIsInstanceOf(string $className, string|callable $message = null, string $propertyPath = null) Assert that value is not instance of given class-name. + * @method LazyAssertion notNull(string|callable $message = null, string $propertyPath = null) Assert that value is not null. + * @method LazyAssertion notRegex(string $pattern, string|callable $message = null, string $propertyPath = null) Assert that value does not match a regex. + * @method LazyAssertion notSame(mixed $value2, string|callable $message = null, string $propertyPath = null) Assert that two values are not the same (using ===). + * @method LazyAssertion null(string|callable $message = null, string $propertyPath = null) Assert that value is null. + * @method LazyAssertion numeric(string|callable $message = null, string $propertyPath = null) Assert that value is numeric. + * @method LazyAssertion objectOrClass(string|callable $message = null, string $propertyPath = null) Assert that the value is an object, or a class that exists. + * @method LazyAssertion phpVersion(mixed $version, string|callable $message = null, string $propertyPath = null) Assert on PHP version. + * @method LazyAssertion propertiesExist(array $properties, string|callable $message = null, string $propertyPath = null) Assert that the value is an object or class, and that the properties all exist. + * @method LazyAssertion propertyExists(string $property, string|callable $message = null, string $propertyPath = null) Assert that the value is an object or class, and that the property exists. + * @method LazyAssertion range(mixed $minValue, mixed $maxValue, string|callable $message = null, string $propertyPath = null) Assert that value is in range of numbers. + * @method LazyAssertion readable(string|callable $message = null, string $propertyPath = null) Assert that the value is something readable. + * @method LazyAssertion regex(string $pattern, string|callable $message = null, string $propertyPath = null) Assert that value matches a regex. + * @method LazyAssertion same(mixed $value2, string|callable $message = null, string $propertyPath = null) Assert that two values are the same (using ===). + * @method LazyAssertion satisfy(callable $callback, string|callable $message = null, string $propertyPath = null) Assert that the provided value is valid according to a callback. + * @method LazyAssertion scalar(string|callable $message = null, string $propertyPath = null) Assert that value is a PHP scalar. + * @method LazyAssertion startsWith(string $needle, string|callable $message = null, string $propertyPath = null, string $encoding = 'utf8') Assert that string starts with a sequence of chars. + * @method LazyAssertion string(string|callable $message = null, string $propertyPath = null) Assert that value is a string. + * @method LazyAssertion subclassOf(string $className, string|callable $message = null, string $propertyPath = null) Assert that value is subclass of given class-name. + * @method LazyAssertion true(string|callable $message = null, string $propertyPath = null) Assert that the value is boolean True. + * @method LazyAssertion url(string|callable $message = null, string $propertyPath = null) Assert that value is an URL. + * @method LazyAssertion uuid(string|callable $message = null, string $propertyPath = null) Assert that the given string is a valid UUID. + * @method LazyAssertion version(string $operator, string $version2, string|callable $message = null, string $propertyPath = null) Assert comparison of two versions. + * @method LazyAssertion writeable(string|callable $message = null, string $propertyPath = null) Assert that the value is something writeable. + * @method LazyAssertion all() Switch chain into validation mode for an array of values. + * @method LazyAssertion nullOr() Switch chain into mode allowing nulls, ignoring further assertions. */ class LazyAssertion { diff --git a/lam/lib/3rdParty/composer/composer/autoload_classmap.php b/lam/lib/3rdParty/composer/composer/autoload_classmap.php index 024622f7..af12d2d6 100644 --- a/lam/lib/3rdParty/composer/composer/autoload_classmap.php +++ b/lam/lib/3rdParty/composer/composer/autoload_classmap.php @@ -6,4 +6,234 @@ $vendorDir = dirname(dirname(__FILE__)); $baseDir = dirname(dirname(dirname($vendorDir))); return array( + 'HordeImapClientBaseTables' => $vendorDir . '/pear-pear.horde.org/Horde_Imap_Client/data/migration/1_horde_imap_client_base_tables.php', + 'HordeImapClientChangeColumnName' => $vendorDir . '/pear-pear.horde.org/Horde_Imap_Client/data/migration/2_horde_imap_client_change_column_name.php', + 'Horde\\Socket\\Client' => $vendorDir . '/pear-pear.horde.org/Horde_Socket_Client/Horde/Socket/Client.php', + 'Horde\\Socket\\Client\\Exception' => $vendorDir . '/pear-pear.horde.org/Horde_Socket_Client/Horde/Socket/Client/Exception.php', + 'Horde_Array' => $vendorDir . '/pear-pear.horde.org/Horde_Util/Horde/Array.php', + 'Horde_Array_Sort_Helper' => $vendorDir . '/pear-pear.horde.org/Horde_Util/Horde/Array/Sort/Helper.php', + 'Horde_Crypt_Blowfish' => $vendorDir . '/pear-pear.horde.org/Horde_Crypt_Blowfish/Horde/Crypt/Blowfish.php', + 'Horde_Crypt_Blowfish_Base' => $vendorDir . '/pear-pear.horde.org/Horde_Crypt_Blowfish/Horde/Crypt/Blowfish/Base.php', + 'Horde_Crypt_Blowfish_Exception' => $vendorDir . '/pear-pear.horde.org/Horde_Crypt_Blowfish/Horde/Crypt/Blowfish/Exception.php', + 'Horde_Crypt_Blowfish_Mcrypt' => $vendorDir . '/pear-pear.horde.org/Horde_Crypt_Blowfish/Horde/Crypt/Blowfish/Mcrypt.php', + 'Horde_Crypt_Blowfish_Openssl' => $vendorDir . '/pear-pear.horde.org/Horde_Crypt_Blowfish/Horde/Crypt/Blowfish/Openssl.php', + 'Horde_Crypt_Blowfish_Pbkdf2' => $vendorDir . '/pear-pear.horde.org/Horde_Crypt_Blowfish/Horde/Crypt/Blowfish/Pbkdf2.php', + 'Horde_Crypt_Blowfish_Php' => $vendorDir . '/pear-pear.horde.org/Horde_Crypt_Blowfish/Horde/Crypt/Blowfish/Php.php', + 'Horde_Crypt_Blowfish_Php_Base' => $vendorDir . '/pear-pear.horde.org/Horde_Crypt_Blowfish/Horde/Crypt/Blowfish/Php/Base.php', + 'Horde_Crypt_Blowfish_Php_Cbc' => $vendorDir . '/pear-pear.horde.org/Horde_Crypt_Blowfish/Horde/Crypt/Blowfish/Php/Cbc.php', + 'Horde_Crypt_Blowfish_Php_Ecb' => $vendorDir . '/pear-pear.horde.org/Horde_Crypt_Blowfish/Horde/Crypt/Blowfish/Php/Ecb.php', + 'Horde_Domhtml' => $vendorDir . '/pear-pear.horde.org/Horde_Util/Horde/Domhtml.php', + 'Horde_Exception' => $vendorDir . '/pear-pear.horde.org/Horde_Exception/Horde/Exception.php', + 'Horde_Exception_LastError' => $vendorDir . '/pear-pear.horde.org/Horde_Exception/Horde/Exception/LastError.php', + 'Horde_Exception_NotFound' => $vendorDir . '/pear-pear.horde.org/Horde_Exception/Horde/Exception/NotFound.php', + 'Horde_Exception_Pear' => $vendorDir . '/pear-pear.horde.org/Horde_Exception/Horde/Exception/Pear.php', + 'Horde_Exception_PermissionDenied' => $vendorDir . '/pear-pear.horde.org/Horde_Exception/Horde/Exception/PermissionDenied.php', + 'Horde_Exception_Translation' => $vendorDir . '/pear-pear.horde.org/Horde_Exception/Horde/Exception/Translation.php', + 'Horde_Exception_Wrapped' => $vendorDir . '/pear-pear.horde.org/Horde_Exception/Horde/Exception/Wrapped.php', + 'Horde_Idna' => $vendorDir . '/pear-pear.horde.org/Horde_Idna/Horde/Idna.php', + 'Horde_Idna_Exception' => $vendorDir . '/pear-pear.horde.org/Horde_Idna/Horde/Idna/Exception.php', + 'Horde_Idna_Punycode' => $vendorDir . '/pear-pear.horde.org/Horde_Idna/Horde/Idna/Punycode.php', + 'Horde_Idna_Translation' => $vendorDir . '/pear-pear.horde.org/Horde_Idna/Horde/Idna/Translation.php', + 'Horde_Imap_Client' => $vendorDir . '/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client.php', + 'Horde_Imap_Client_Auth_DigestMD5' => $vendorDir . '/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Auth/DigestMD5.php', + 'Horde_Imap_Client_Auth_Scram' => $vendorDir . '/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Auth/Scram.php', + 'Horde_Imap_Client_Base' => $vendorDir . '/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Base.php', + 'Horde_Imap_Client_Base_Alerts' => $vendorDir . '/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Base/Alerts.php', + 'Horde_Imap_Client_Base_Debug' => $vendorDir . '/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Base/Debug.php', + 'Horde_Imap_Client_Base_Deprecated' => $vendorDir . '/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Base/Deprecated.php', + 'Horde_Imap_Client_Base_Mailbox' => $vendorDir . '/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Base/Mailbox.php', + 'Horde_Imap_Client_Base_Password' => $vendorDir . '/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Base/Password.php', + 'Horde_Imap_Client_Cache' => $vendorDir . '/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Cache.php', + 'Horde_Imap_Client_Cache_Backend' => $vendorDir . '/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Cache/Backend.php', + 'Horde_Imap_Client_Cache_Backend_Cache' => $vendorDir . '/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Cache/Backend/Cache.php', + 'Horde_Imap_Client_Cache_Backend_Db' => $vendorDir . '/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Cache/Backend/Db.php', + 'Horde_Imap_Client_Cache_Backend_Hashtable' => $vendorDir . '/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Cache/Backend/Hashtable.php', + 'Horde_Imap_Client_Cache_Backend_Mongo' => $vendorDir . '/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Cache/Backend/Mongo.php', + 'Horde_Imap_Client_Cache_Backend_Null' => $vendorDir . '/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Cache/Backend/Null.php', + 'Horde_Imap_Client_Data_Acl' => $vendorDir . '/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Data/Acl.php', + 'Horde_Imap_Client_Data_AclCommon' => $vendorDir . '/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Data/AclCommon.php', + 'Horde_Imap_Client_Data_AclNegative' => $vendorDir . '/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Data/AclNegative.php', + 'Horde_Imap_Client_Data_AclRights' => $vendorDir . '/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Data/AclRights.php', + 'Horde_Imap_Client_Data_BaseSubject' => $vendorDir . '/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Data/BaseSubject.php', + 'Horde_Imap_Client_Data_Capability' => $vendorDir . '/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Data/Capability.php', + 'Horde_Imap_Client_Data_Capability_Imap' => $vendorDir . '/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Data/Capability/Imap.php', + 'Horde_Imap_Client_Data_Envelope' => $vendorDir . '/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Data/Envelope.php', + 'Horde_Imap_Client_Data_Fetch' => $vendorDir . '/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Data/Fetch.php', + 'Horde_Imap_Client_Data_Fetch_Pop3' => $vendorDir . '/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Data/Fetch/Pop3.php', + 'Horde_Imap_Client_Data_Format' => $vendorDir . '/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Data/Format.php', + 'Horde_Imap_Client_Data_Format_Astring' => $vendorDir . '/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Data/Format/Astring.php', + 'Horde_Imap_Client_Data_Format_Astring_Nonascii' => $vendorDir . '/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Data/Format/Astring/Nonascii.php', + 'Horde_Imap_Client_Data_Format_Atom' => $vendorDir . '/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Data/Format/Atom.php', + 'Horde_Imap_Client_Data_Format_Date' => $vendorDir . '/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Data/Format/Date.php', + 'Horde_Imap_Client_Data_Format_DateTime' => $vendorDir . '/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Data/Format/DateTime.php', + 'Horde_Imap_Client_Data_Format_Exception' => $vendorDir . '/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Data/Format/Exception.php', + 'Horde_Imap_Client_Data_Format_Filter_Quote' => $vendorDir . '/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Data/Format/Filter/Quote.php', + 'Horde_Imap_Client_Data_Format_Filter_String' => $vendorDir . '/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Data/Format/Filter/String.php', + 'Horde_Imap_Client_Data_Format_List' => $vendorDir . '/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Data/Format/List.php', + 'Horde_Imap_Client_Data_Format_ListMailbox' => $vendorDir . '/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Data/Format/ListMailbox.php', + 'Horde_Imap_Client_Data_Format_ListMailbox_Utf8' => $vendorDir . '/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Data/Format/ListMailbox/Utf8.php', + 'Horde_Imap_Client_Data_Format_Mailbox' => $vendorDir . '/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Data/Format/Mailbox.php', + 'Horde_Imap_Client_Data_Format_Mailbox_Utf8' => $vendorDir . '/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Data/Format/Mailbox/Utf8.php', + 'Horde_Imap_Client_Data_Format_Nil' => $vendorDir . '/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Data/Format/Nil.php', + 'Horde_Imap_Client_Data_Format_Nstring' => $vendorDir . '/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Data/Format/Nstring.php', + 'Horde_Imap_Client_Data_Format_Nstring_Nonascii' => $vendorDir . '/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Data/Format/Nstring/Nonascii.php', + 'Horde_Imap_Client_Data_Format_Number' => $vendorDir . '/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Data/Format/Number.php', + 'Horde_Imap_Client_Data_Format_String' => $vendorDir . '/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Data/Format/String.php', + 'Horde_Imap_Client_Data_Format_String_Nonascii' => $vendorDir . '/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Data/Format/String/Nonascii.php', + 'Horde_Imap_Client_Data_Format_String_Support_Nonascii' => $vendorDir . '/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Data/Format/String/Support/Nonascii.php', + 'Horde_Imap_Client_Data_Namespace' => $vendorDir . '/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Data/Namespace.php', + 'Horde_Imap_Client_Data_SearchCharset' => $vendorDir . '/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Data/SearchCharset.php', + 'Horde_Imap_Client_Data_SearchCharset_Utf8' => $vendorDir . '/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Data/SearchCharset/Utf8.php', + 'Horde_Imap_Client_Data_Sync' => $vendorDir . '/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Data/Sync.php', + 'Horde_Imap_Client_Data_Thread' => $vendorDir . '/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Data/Thread.php', + 'Horde_Imap_Client_DateTime' => $vendorDir . '/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/DateTime.php', + 'Horde_Imap_Client_Exception' => $vendorDir . '/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Exception.php', + 'Horde_Imap_Client_Exception_NoSupportExtension' => $vendorDir . '/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Exception/NoSupportExtension.php', + 'Horde_Imap_Client_Exception_NoSupportPop3' => $vendorDir . '/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Exception/NoSupportPop3.php', + 'Horde_Imap_Client_Exception_SearchCharset' => $vendorDir . '/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Exception/SearchCharset.php', + 'Horde_Imap_Client_Exception_ServerResponse' => $vendorDir . '/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Exception/ServerResponse.php', + 'Horde_Imap_Client_Exception_Sync' => $vendorDir . '/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Exception/Sync.php', + 'Horde_Imap_Client_Fetch_Query' => $vendorDir . '/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Fetch/Query.php', + 'Horde_Imap_Client_Fetch_Results' => $vendorDir . '/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Fetch/Results.php', + 'Horde_Imap_Client_Ids' => $vendorDir . '/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Ids.php', + 'Horde_Imap_Client_Ids_Map' => $vendorDir . '/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Ids/Map.php', + 'Horde_Imap_Client_Ids_Pop3' => $vendorDir . '/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Ids/Pop3.php', + 'Horde_Imap_Client_Interaction_Client' => $vendorDir . '/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Interaction/Client.php', + 'Horde_Imap_Client_Interaction_Command' => $vendorDir . '/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Interaction/Command.php', + 'Horde_Imap_Client_Interaction_Command_Continuation' => $vendorDir . '/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Interaction/Command/Continuation.php', + 'Horde_Imap_Client_Interaction_Pipeline' => $vendorDir . '/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Interaction/Pipeline.php', + 'Horde_Imap_Client_Interaction_Server' => $vendorDir . '/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Interaction/Server.php', + 'Horde_Imap_Client_Interaction_Server_Continuation' => $vendorDir . '/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Interaction/Server/Continuation.php', + 'Horde_Imap_Client_Interaction_Server_Tagged' => $vendorDir . '/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Interaction/Server/Tagged.php', + 'Horde_Imap_Client_Interaction_Server_Untagged' => $vendorDir . '/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Interaction/Server/Untagged.php', + 'Horde_Imap_Client_Mailbox' => $vendorDir . '/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Mailbox.php', + 'Horde_Imap_Client_Mailbox_List' => $vendorDir . '/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Mailbox/List.php', + 'Horde_Imap_Client_Namespace_List' => $vendorDir . '/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Namespace/List.php', + 'Horde_Imap_Client_Password_Xoauth2' => $vendorDir . '/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Password/Xoauth2.php', + 'Horde_Imap_Client_Search_Query' => $vendorDir . '/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Search/Query.php', + 'Horde_Imap_Client_Socket' => $vendorDir . '/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Socket.php', + 'Horde_Imap_Client_Socket_Catenate' => $vendorDir . '/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Socket/Catenate.php', + 'Horde_Imap_Client_Socket_ClientSort' => $vendorDir . '/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Socket/ClientSort.php', + 'Horde_Imap_Client_Socket_Connection_Base' => $vendorDir . '/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Socket/Connection/Base.php', + 'Horde_Imap_Client_Socket_Connection_Pop3' => $vendorDir . '/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Socket/Connection/Pop3.php', + 'Horde_Imap_Client_Socket_Connection_Socket' => $vendorDir . '/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Socket/Connection/Socket.php', + 'Horde_Imap_Client_Socket_Pop3' => $vendorDir . '/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Socket/Pop3.php', + 'Horde_Imap_Client_Tokenize' => $vendorDir . '/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Tokenize.php', + 'Horde_Imap_Client_Translation' => $vendorDir . '/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Translation.php', + 'Horde_Imap_Client_Url' => $vendorDir . '/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Url.php', + 'Horde_Imap_Client_Url_Base' => $vendorDir . '/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Url/Base.php', + 'Horde_Imap_Client_Url_Imap' => $vendorDir . '/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Url/Imap.php', + 'Horde_Imap_Client_Url_Imap_Relative' => $vendorDir . '/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Url/Imap/Relative.php', + 'Horde_Imap_Client_Url_Pop3' => $vendorDir . '/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Url/Pop3.php', + 'Horde_Imap_Client_Utf7imap' => $vendorDir . '/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Utf7imap.php', + 'Horde_ListHeaders' => $vendorDir . '/pear-pear.horde.org/Horde_ListHeaders/Horde/ListHeaders.php', + 'Horde_ListHeaders_Base' => $vendorDir . '/pear-pear.horde.org/Horde_ListHeaders/Horde/ListHeaders/Base.php', + 'Horde_ListHeaders_Id' => $vendorDir . '/pear-pear.horde.org/Horde_ListHeaders/Horde/ListHeaders/Id.php', + 'Horde_ListHeaders_NoPost' => $vendorDir . '/pear-pear.horde.org/Horde_ListHeaders/Horde/ListHeaders/NoPost.php', + 'Horde_ListHeaders_Object' => $vendorDir . '/pear-pear.horde.org/Horde_ListHeaders/Horde/ListHeaders/Object.php', + 'Horde_ListHeaders_Translation' => $vendorDir . '/pear-pear.horde.org/Horde_ListHeaders/Horde/ListHeaders/Translation.php', + 'Horde_Mail_Exception' => $vendorDir . '/pear-pear.horde.org/Horde_Mail/Horde/Mail/Exception.php', + 'Horde_Mail_Mbox_Parse' => $vendorDir . '/pear-pear.horde.org/Horde_Mail/Horde/Mail/Mbox/Parse.php', + 'Horde_Mail_Rfc822' => $vendorDir . '/pear-pear.horde.org/Horde_Mail/Horde/Mail/Rfc822.php', + 'Horde_Mail_Rfc822_Address' => $vendorDir . '/pear-pear.horde.org/Horde_Mail/Horde/Mail/Rfc822/Address.php', + 'Horde_Mail_Rfc822_Group' => $vendorDir . '/pear-pear.horde.org/Horde_Mail/Horde/Mail/Rfc822/Group.php', + 'Horde_Mail_Rfc822_GroupList' => $vendorDir . '/pear-pear.horde.org/Horde_Mail/Horde/Mail/Rfc822/GroupList.php', + 'Horde_Mail_Rfc822_Identification' => $vendorDir . '/pear-pear.horde.org/Horde_Mail/Horde/Mail/Rfc822/Identification.php', + 'Horde_Mail_Rfc822_List' => $vendorDir . '/pear-pear.horde.org/Horde_Mail/Horde/Mail/Rfc822/List.php', + 'Horde_Mail_Rfc822_Object' => $vendorDir . '/pear-pear.horde.org/Horde_Mail/Horde/Mail/Rfc822/Object.php', + 'Horde_Mail_Translation' => $vendorDir . '/pear-pear.horde.org/Horde_Mail/Horde/Mail/Translation.php', + 'Horde_Mail_Transport' => $vendorDir . '/pear-pear.horde.org/Horde_Mail/Horde/Mail/Transport.php', + 'Horde_Mail_Transport_Lmtphorde' => $vendorDir . '/pear-pear.horde.org/Horde_Mail/Horde/Mail/Transport/Lmtphorde.php', + 'Horde_Mail_Transport_Mail' => $vendorDir . '/pear-pear.horde.org/Horde_Mail/Horde/Mail/Transport/Mail.php', + 'Horde_Mail_Transport_Mock' => $vendorDir . '/pear-pear.horde.org/Horde_Mail/Horde/Mail/Transport/Mock.php', + 'Horde_Mail_Transport_Null' => $vendorDir . '/pear-pear.horde.org/Horde_Mail/Horde/Mail/Transport/Null.php', + 'Horde_Mail_Transport_Sendmail' => $vendorDir . '/pear-pear.horde.org/Horde_Mail/Horde/Mail/Transport/Sendmail.php', + 'Horde_Mail_Transport_Smtp' => $vendorDir . '/pear-pear.horde.org/Horde_Mail/Horde/Mail/Transport/Smtp.php', + 'Horde_Mail_Transport_Smtphorde' => $vendorDir . '/pear-pear.horde.org/Horde_Mail/Horde/Mail/Transport/Smtphorde.php', + 'Horde_Mail_Transport_Smtpmx' => $vendorDir . '/pear-pear.horde.org/Horde_Mail/Horde/Mail/Transport/Smtpmx.php', + 'Horde_Mime' => $vendorDir . '/pear-pear.horde.org/Horde_Mime/Horde/Mime.php', + 'Horde_Mime_ContentParam_Decode' => $vendorDir . '/pear-pear.horde.org/Horde_Mime/Horde/Mime/ContentParam/Decode.php', + 'Horde_Mime_Exception' => $vendorDir . '/pear-pear.horde.org/Horde_Mime/Horde/Mime/Exception.php', + 'Horde_Mime_Filter_Encoding' => $vendorDir . '/pear-pear.horde.org/Horde_Mime/Horde/Mime/Filter/Encoding.php', + 'Horde_Mime_Headers' => $vendorDir . '/pear-pear.horde.org/Horde_Mime/Horde/Mime/Headers.php', + 'Horde_Mime_Headers_Addresses' => $vendorDir . '/pear-pear.horde.org/Horde_Mime/Horde/Mime/Headers/Addresses.php', + 'Horde_Mime_Headers_AddressesMulti' => $vendorDir . '/pear-pear.horde.org/Horde_Mime/Horde/Mime/Headers/AddressesMulti.php', + 'Horde_Mime_Headers_ContentDescription' => $vendorDir . '/pear-pear.horde.org/Horde_Mime/Horde/Mime/Headers/ContentDescription.php', + 'Horde_Mime_Headers_ContentId' => $vendorDir . '/pear-pear.horde.org/Horde_Mime/Horde/Mime/Headers/ContentId.php', + 'Horde_Mime_Headers_ContentLanguage' => $vendorDir . '/pear-pear.horde.org/Horde_Mime/Horde/Mime/Headers/ContentLanguage.php', + 'Horde_Mime_Headers_ContentParam' => $vendorDir . '/pear-pear.horde.org/Horde_Mime/Horde/Mime/Headers/ContentParam.php', + 'Horde_Mime_Headers_ContentParam_ContentDisposition' => $vendorDir . '/pear-pear.horde.org/Horde_Mime/Horde/Mime/Headers/ContentParam/ContentDisposition.php', + 'Horde_Mime_Headers_ContentParam_ContentType' => $vendorDir . '/pear-pear.horde.org/Horde_Mime/Horde/Mime/Headers/ContentParam/ContentType.php', + 'Horde_Mime_Headers_ContentTransferEncoding' => $vendorDir . '/pear-pear.horde.org/Horde_Mime/Horde/Mime/Headers/ContentTransferEncoding.php', + 'Horde_Mime_Headers_Date' => $vendorDir . '/pear-pear.horde.org/Horde_Mime/Horde/Mime/Headers/Date.php', + 'Horde_Mime_Headers_Deprecated' => $vendorDir . '/pear-pear.horde.org/Horde_Mime/Horde/Mime/Headers/Deprecated.php', + 'Horde_Mime_Headers_Element' => $vendorDir . '/pear-pear.horde.org/Horde_Mime/Horde/Mime/Headers/Element.php', + 'Horde_Mime_Headers_Element_Address' => $vendorDir . '/pear-pear.horde.org/Horde_Mime/Horde/Mime/Headers/Element/Address.php', + 'Horde_Mime_Headers_Element_Multiple' => $vendorDir . '/pear-pear.horde.org/Horde_Mime/Horde/Mime/Headers/Element/Multiple.php', + 'Horde_Mime_Headers_Element_Single' => $vendorDir . '/pear-pear.horde.org/Horde_Mime/Horde/Mime/Headers/Element/Single.php', + 'Horde_Mime_Headers_Extension_Mime' => $vendorDir . '/pear-pear.horde.org/Horde_Mime/Horde/Mime/Headers/Extension/Mime.php', + 'Horde_Mime_Headers_Identification' => $vendorDir . '/pear-pear.horde.org/Horde_Mime/Horde/Mime/Headers/Identification.php', + 'Horde_Mime_Headers_MessageId' => $vendorDir . '/pear-pear.horde.org/Horde_Mime/Horde/Mime/Headers/MessageId.php', + 'Horde_Mime_Headers_Mime' => $vendorDir . '/pear-pear.horde.org/Horde_Mime/Horde/Mime/Headers/Mime.php', + 'Horde_Mime_Headers_MimeVersion' => $vendorDir . '/pear-pear.horde.org/Horde_Mime/Horde/Mime/Headers/MimeVersion.php', + 'Horde_Mime_Headers_Received' => $vendorDir . '/pear-pear.horde.org/Horde_Mime/Horde/Mime/Headers/Received.php', + 'Horde_Mime_Headers_Subject' => $vendorDir . '/pear-pear.horde.org/Horde_Mime/Horde/Mime/Headers/Subject.php', + 'Horde_Mime_Headers_UserAgent' => $vendorDir . '/pear-pear.horde.org/Horde_Mime/Horde/Mime/Headers/UserAgent.php', + 'Horde_Mime_Id' => $vendorDir . '/pear-pear.horde.org/Horde_Mime/Horde/Mime/Id.php', + 'Horde_Mime_Magic' => $vendorDir . '/pear-pear.horde.org/Horde_Mime/Horde/Mime/Magic.php', + 'Horde_Mime_Mail' => $vendorDir . '/pear-pear.horde.org/Horde_Mime/Horde/Mime/Mail.php', + 'Horde_Mime_Mdn' => $vendorDir . '/pear-pear.horde.org/Horde_Mime/Horde/Mime/Mdn.php', + 'Horde_Mime_Part' => $vendorDir . '/pear-pear.horde.org/Horde_Mime/Horde/Mime/Part.php', + 'Horde_Mime_Part_Iterator' => $vendorDir . '/pear-pear.horde.org/Horde_Mime/Horde/Mime/Part/Iterator.php', + 'Horde_Mime_Part_Upgrade_V1' => $vendorDir . '/pear-pear.horde.org/Horde_Mime/Horde/Mime/Part/Upgrade/V1.php', + 'Horde_Mime_QuotedPrintable' => $vendorDir . '/pear-pear.horde.org/Horde_Mime/Horde/Mime/QuotedPrintable.php', + 'Horde_Mime_Related' => $vendorDir . '/pear-pear.horde.org/Horde_Mime/Horde/Mime/Related.php', + 'Horde_Mime_Translation' => $vendorDir . '/pear-pear.horde.org/Horde_Mime/Horde/Mime/Translation.php', + 'Horde_Mime_Uudecode' => $vendorDir . '/pear-pear.horde.org/Horde_Mime/Horde/Mime/Uudecode.php', + 'Horde_Secret' => $vendorDir . '/pear-pear.horde.org/Horde_Secret/Horde/Secret.php', + 'Horde_Secret_Exception' => $vendorDir . '/pear-pear.horde.org/Horde_Secret/Horde/Secret/Exception.php', + 'Horde_Stream' => $vendorDir . '/pear-pear.horde.org/Horde_Stream/Horde/Stream.php', + 'Horde_Stream_Exception' => $vendorDir . '/pear-pear.horde.org/Horde_Stream/Horde/Stream/Exception.php', + 'Horde_Stream_Existing' => $vendorDir . '/pear-pear.horde.org/Horde_Stream/Horde/Stream/Existing.php', + 'Horde_Stream_Filter_Bin2hex' => $vendorDir . '/pear-pear.horde.org/Horde_Stream_Filter/Horde/Stream/Filter/Bin2hex.php', + 'Horde_Stream_Filter_Crc32' => $vendorDir . '/pear-pear.horde.org/Horde_Stream_Filter/Horde/Stream/Filter/Crc32.php', + 'Horde_Stream_Filter_Eol' => $vendorDir . '/pear-pear.horde.org/Horde_Stream_Filter/Horde/Stream/Filter/Eol.php', + 'Horde_Stream_Filter_Htmlspecialchars' => $vendorDir . '/pear-pear.horde.org/Horde_Stream_Filter/Horde/Stream/Filter/Htmlspecialchars.php', + 'Horde_Stream_Filter_Null' => $vendorDir . '/pear-pear.horde.org/Horde_Stream_Filter/Horde/Stream/Filter/Null.php', + 'Horde_Stream_String' => $vendorDir . '/pear-pear.horde.org/Horde_Stream/Horde/Stream/String.php', + 'Horde_Stream_Temp' => $vendorDir . '/pear-pear.horde.org/Horde_Stream/Horde/Stream/Temp.php', + 'Horde_Stream_TempString' => $vendorDir . '/pear-pear.horde.org/Horde_Stream/Horde/Stream/TempString.php', + 'Horde_Stream_Wrapper_Combine' => $vendorDir . '/pear-pear.horde.org/Horde_Stream_Wrapper/Horde/Stream/Wrapper/Combine.php', + 'Horde_Stream_Wrapper_CombineStream' => $vendorDir . '/pear-pear.horde.org/Horde_Stream_Wrapper/Horde/Stream/Wrapper/CombineStream.php', + 'Horde_Stream_Wrapper_String' => $vendorDir . '/pear-pear.horde.org/Horde_Stream_Wrapper/Horde/Stream/Wrapper/String.php', + 'Horde_Stream_Wrapper_StringStream' => $vendorDir . '/pear-pear.horde.org/Horde_Stream_Wrapper/Horde/Stream/Wrapper/StringStream.php', + 'Horde_String' => $vendorDir . '/pear-pear.horde.org/Horde_Util/Horde/String.php', + 'Horde_String_Transliterate' => $vendorDir . '/pear-pear.horde.org/Horde_Util/Horde/String/Transliterate.php', + 'Horde_Support_Array' => $vendorDir . '/pear-pear.horde.org/Horde_Support/Horde/Support/Array.php', + 'Horde_Support_Backtrace' => $vendorDir . '/pear-pear.horde.org/Horde_Support/Horde/Support/Backtrace.php', + 'Horde_Support_CaseInsensitiveArray' => $vendorDir . '/pear-pear.horde.org/Horde_Support/Horde/Support/CaseInsensitiveArray.php', + 'Horde_Support_CombineStream' => $vendorDir . '/pear-pear.horde.org/Horde_Support/Horde/Support/CombineStream.php', + 'Horde_Support_ConsistentHash' => $vendorDir . '/pear-pear.horde.org/Horde_Support/Horde/Support/ConsistentHash.php', + 'Horde_Support_Guid' => $vendorDir . '/pear-pear.horde.org/Horde_Support/Horde/Support/Guid.php', + 'Horde_Support_Inflector' => $vendorDir . '/pear-pear.horde.org/Horde_Support/Horde/Support/Inflector.php', + 'Horde_Support_Memory' => $vendorDir . '/pear-pear.horde.org/Horde_Support/Horde/Support/Memory.php', + 'Horde_Support_Numerizer' => $vendorDir . '/pear-pear.horde.org/Horde_Support/Horde/Support/Numerizer.php', + 'Horde_Support_Numerizer_Locale_Base' => $vendorDir . '/pear-pear.horde.org/Horde_Support/Horde/Support/Numerizer/Locale/Base.php', + 'Horde_Support_Numerizer_Locale_De' => $vendorDir . '/pear-pear.horde.org/Horde_Support/Horde/Support/Numerizer/Locale/De.php', + 'Horde_Support_Numerizer_Locale_Pt' => $vendorDir . '/pear-pear.horde.org/Horde_Support/Horde/Support/Numerizer/Locale/Pt.php', + 'Horde_Support_ObjectStub' => $vendorDir . '/pear-pear.horde.org/Horde_Support/Horde/Support/ObjectStub.php', + 'Horde_Support_Randomid' => $vendorDir . '/pear-pear.horde.org/Horde_Support/Horde/Support/Randomid.php', + 'Horde_Support_Stack' => $vendorDir . '/pear-pear.horde.org/Horde_Support/Horde/Support/Stack.php', + 'Horde_Support_StringStream' => $vendorDir . '/pear-pear.horde.org/Horde_Support/Horde/Support/StringStream.php', + 'Horde_Support_Stub' => $vendorDir . '/pear-pear.horde.org/Horde_Support/Horde/Support/Stub.php', + 'Horde_Support_Timer' => $vendorDir . '/pear-pear.horde.org/Horde_Support/Horde/Support/Timer.php', + 'Horde_Support_Uuid' => $vendorDir . '/pear-pear.horde.org/Horde_Support/Horde/Support/Uuid.php', + 'Horde_Text_Flowed' => $vendorDir . '/pear-pear.horde.org/Horde_Text_Flowed/Horde/Text/Flowed.php', + 'Horde_Translation' => $vendorDir . '/pear-pear.horde.org/Horde_Translation/Horde/Translation.php', + 'Horde_Translation_Autodetect' => $vendorDir . '/pear-pear.horde.org/Horde_Translation/Horde/Translation/Autodetect.php', + 'Horde_Translation_Exception' => $vendorDir . '/pear-pear.horde.org/Horde_Translation/Horde/Translation/Exception.php', + 'Horde_Translation_Handler' => $vendorDir . '/pear-pear.horde.org/Horde_Translation/Horde/Translation/Handler.php', + 'Horde_Translation_Handler_Gettext' => $vendorDir . '/pear-pear.horde.org/Horde_Translation/Horde/Translation/Handler/Gettext.php', + 'Horde_Util' => $vendorDir . '/pear-pear.horde.org/Horde_Util/Horde/Util.php', + 'Horde_Variables' => $vendorDir . '/pear-pear.horde.org/Horde_Util/Horde/Variables.php', ); diff --git a/lam/lib/3rdParty/composer/composer/autoload_files.php b/lam/lib/3rdParty/composer/composer/autoload_files.php index ada90386..1df9a325 100644 --- a/lam/lib/3rdParty/composer/composer/autoload_files.php +++ b/lam/lib/3rdParty/composer/composer/autoload_files.php @@ -11,4 +11,5 @@ return array( '25072dd6e2470089de65ae7bf11d3109' => $vendorDir . '/symfony/polyfill-php72/bootstrap.php', 'f598d06aa772fa33d905e87be6398fb1' => $vendorDir . '/symfony/polyfill-intl-idn/bootstrap.php', '320cde22f66dd4f5d3fd621d3e88b98f' => $vendorDir . '/symfony/polyfill-ctype/bootstrap.php', + 'e39a8b23c42d4e1452234d762b03835a' => $vendorDir . '/ramsey/uuid/src/functions.php', ); diff --git a/lam/lib/3rdParty/composer/composer/autoload_real.php b/lam/lib/3rdParty/composer/composer/autoload_real.php index 9fc69849..5f1ebb26 100644 --- a/lam/lib/3rdParty/composer/composer/autoload_real.php +++ b/lam/lib/3rdParty/composer/composer/autoload_real.php @@ -23,6 +23,10 @@ class ComposerAutoloaderInited73ceb9c1bdec18b7c6d09764d1bce5 self::$loader = $loader = new \Composer\Autoload\ClassLoader(); spl_autoload_unregister(array('ComposerAutoloaderInited73ceb9c1bdec18b7c6d09764d1bce5', 'loadClassLoader')); + $includePaths = require __DIR__ . '/include_paths.php'; + $includePaths[] = get_include_path(); + set_include_path(implode(PATH_SEPARATOR, $includePaths)); + $useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded()); if ($useStaticLoader) { require_once __DIR__ . '/autoload_static.php'; diff --git a/lam/lib/3rdParty/composer/composer/autoload_static.php b/lam/lib/3rdParty/composer/composer/autoload_static.php index 30a44942..131f5c98 100644 --- a/lam/lib/3rdParty/composer/composer/autoload_static.php +++ b/lam/lib/3rdParty/composer/composer/autoload_static.php @@ -12,6 +12,7 @@ class ComposerStaticInited73ceb9c1bdec18b7c6d09764d1bce5 '25072dd6e2470089de65ae7bf11d3109' => __DIR__ . '/..' . '/symfony/polyfill-php72/bootstrap.php', 'f598d06aa772fa33d905e87be6398fb1' => __DIR__ . '/..' . '/symfony/polyfill-intl-idn/bootstrap.php', '320cde22f66dd4f5d3fd621d3e88b98f' => __DIR__ . '/..' . '/symfony/polyfill-ctype/bootstrap.php', + 'e39a8b23c42d4e1452234d762b03835a' => __DIR__ . '/..' . '/ramsey/uuid/src/functions.php', ); public static $prefixLengthsPsr4 = array ( @@ -146,11 +147,245 @@ class ComposerStaticInited73ceb9c1bdec18b7c6d09764d1bce5 ), ); + public static $classMap = array ( + 'HordeImapClientBaseTables' => __DIR__ . '/..' . '/pear-pear.horde.org/Horde_Imap_Client/data/migration/1_horde_imap_client_base_tables.php', + 'HordeImapClientChangeColumnName' => __DIR__ . '/..' . '/pear-pear.horde.org/Horde_Imap_Client/data/migration/2_horde_imap_client_change_column_name.php', + 'Horde\\Socket\\Client' => __DIR__ . '/..' . '/pear-pear.horde.org/Horde_Socket_Client/Horde/Socket/Client.php', + 'Horde\\Socket\\Client\\Exception' => __DIR__ . '/..' . '/pear-pear.horde.org/Horde_Socket_Client/Horde/Socket/Client/Exception.php', + 'Horde_Array' => __DIR__ . '/..' . '/pear-pear.horde.org/Horde_Util/Horde/Array.php', + 'Horde_Array_Sort_Helper' => __DIR__ . '/..' . '/pear-pear.horde.org/Horde_Util/Horde/Array/Sort/Helper.php', + 'Horde_Crypt_Blowfish' => __DIR__ . '/..' . '/pear-pear.horde.org/Horde_Crypt_Blowfish/Horde/Crypt/Blowfish.php', + 'Horde_Crypt_Blowfish_Base' => __DIR__ . '/..' . '/pear-pear.horde.org/Horde_Crypt_Blowfish/Horde/Crypt/Blowfish/Base.php', + 'Horde_Crypt_Blowfish_Exception' => __DIR__ . '/..' . '/pear-pear.horde.org/Horde_Crypt_Blowfish/Horde/Crypt/Blowfish/Exception.php', + 'Horde_Crypt_Blowfish_Mcrypt' => __DIR__ . '/..' . '/pear-pear.horde.org/Horde_Crypt_Blowfish/Horde/Crypt/Blowfish/Mcrypt.php', + 'Horde_Crypt_Blowfish_Openssl' => __DIR__ . '/..' . '/pear-pear.horde.org/Horde_Crypt_Blowfish/Horde/Crypt/Blowfish/Openssl.php', + 'Horde_Crypt_Blowfish_Pbkdf2' => __DIR__ . '/..' . '/pear-pear.horde.org/Horde_Crypt_Blowfish/Horde/Crypt/Blowfish/Pbkdf2.php', + 'Horde_Crypt_Blowfish_Php' => __DIR__ . '/..' . '/pear-pear.horde.org/Horde_Crypt_Blowfish/Horde/Crypt/Blowfish/Php.php', + 'Horde_Crypt_Blowfish_Php_Base' => __DIR__ . '/..' . '/pear-pear.horde.org/Horde_Crypt_Blowfish/Horde/Crypt/Blowfish/Php/Base.php', + 'Horde_Crypt_Blowfish_Php_Cbc' => __DIR__ . '/..' . '/pear-pear.horde.org/Horde_Crypt_Blowfish/Horde/Crypt/Blowfish/Php/Cbc.php', + 'Horde_Crypt_Blowfish_Php_Ecb' => __DIR__ . '/..' . '/pear-pear.horde.org/Horde_Crypt_Blowfish/Horde/Crypt/Blowfish/Php/Ecb.php', + 'Horde_Domhtml' => __DIR__ . '/..' . '/pear-pear.horde.org/Horde_Util/Horde/Domhtml.php', + 'Horde_Exception' => __DIR__ . '/..' . '/pear-pear.horde.org/Horde_Exception/Horde/Exception.php', + 'Horde_Exception_LastError' => __DIR__ . '/..' . '/pear-pear.horde.org/Horde_Exception/Horde/Exception/LastError.php', + 'Horde_Exception_NotFound' => __DIR__ . '/..' . '/pear-pear.horde.org/Horde_Exception/Horde/Exception/NotFound.php', + 'Horde_Exception_Pear' => __DIR__ . '/..' . '/pear-pear.horde.org/Horde_Exception/Horde/Exception/Pear.php', + 'Horde_Exception_PermissionDenied' => __DIR__ . '/..' . '/pear-pear.horde.org/Horde_Exception/Horde/Exception/PermissionDenied.php', + 'Horde_Exception_Translation' => __DIR__ . '/..' . '/pear-pear.horde.org/Horde_Exception/Horde/Exception/Translation.php', + 'Horde_Exception_Wrapped' => __DIR__ . '/..' . '/pear-pear.horde.org/Horde_Exception/Horde/Exception/Wrapped.php', + 'Horde_Idna' => __DIR__ . '/..' . '/pear-pear.horde.org/Horde_Idna/Horde/Idna.php', + 'Horde_Idna_Exception' => __DIR__ . '/..' . '/pear-pear.horde.org/Horde_Idna/Horde/Idna/Exception.php', + 'Horde_Idna_Punycode' => __DIR__ . '/..' . '/pear-pear.horde.org/Horde_Idna/Horde/Idna/Punycode.php', + 'Horde_Idna_Translation' => __DIR__ . '/..' . '/pear-pear.horde.org/Horde_Idna/Horde/Idna/Translation.php', + 'Horde_Imap_Client' => __DIR__ . '/..' . '/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client.php', + 'Horde_Imap_Client_Auth_DigestMD5' => __DIR__ . '/..' . '/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Auth/DigestMD5.php', + 'Horde_Imap_Client_Auth_Scram' => __DIR__ . '/..' . '/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Auth/Scram.php', + 'Horde_Imap_Client_Base' => __DIR__ . '/..' . '/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Base.php', + 'Horde_Imap_Client_Base_Alerts' => __DIR__ . '/..' . '/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Base/Alerts.php', + 'Horde_Imap_Client_Base_Debug' => __DIR__ . '/..' . '/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Base/Debug.php', + 'Horde_Imap_Client_Base_Deprecated' => __DIR__ . '/..' . '/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Base/Deprecated.php', + 'Horde_Imap_Client_Base_Mailbox' => __DIR__ . '/..' . '/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Base/Mailbox.php', + 'Horde_Imap_Client_Base_Password' => __DIR__ . '/..' . '/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Base/Password.php', + 'Horde_Imap_Client_Cache' => __DIR__ . '/..' . '/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Cache.php', + 'Horde_Imap_Client_Cache_Backend' => __DIR__ . '/..' . '/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Cache/Backend.php', + 'Horde_Imap_Client_Cache_Backend_Cache' => __DIR__ . '/..' . '/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Cache/Backend/Cache.php', + 'Horde_Imap_Client_Cache_Backend_Db' => __DIR__ . '/..' . '/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Cache/Backend/Db.php', + 'Horde_Imap_Client_Cache_Backend_Hashtable' => __DIR__ . '/..' . '/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Cache/Backend/Hashtable.php', + 'Horde_Imap_Client_Cache_Backend_Mongo' => __DIR__ . '/..' . '/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Cache/Backend/Mongo.php', + 'Horde_Imap_Client_Cache_Backend_Null' => __DIR__ . '/..' . '/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Cache/Backend/Null.php', + 'Horde_Imap_Client_Data_Acl' => __DIR__ . '/..' . '/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Data/Acl.php', + 'Horde_Imap_Client_Data_AclCommon' => __DIR__ . '/..' . '/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Data/AclCommon.php', + 'Horde_Imap_Client_Data_AclNegative' => __DIR__ . '/..' . '/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Data/AclNegative.php', + 'Horde_Imap_Client_Data_AclRights' => __DIR__ . '/..' . '/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Data/AclRights.php', + 'Horde_Imap_Client_Data_BaseSubject' => __DIR__ . '/..' . '/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Data/BaseSubject.php', + 'Horde_Imap_Client_Data_Capability' => __DIR__ . '/..' . '/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Data/Capability.php', + 'Horde_Imap_Client_Data_Capability_Imap' => __DIR__ . '/..' . '/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Data/Capability/Imap.php', + 'Horde_Imap_Client_Data_Envelope' => __DIR__ . '/..' . '/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Data/Envelope.php', + 'Horde_Imap_Client_Data_Fetch' => __DIR__ . '/..' . '/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Data/Fetch.php', + 'Horde_Imap_Client_Data_Fetch_Pop3' => __DIR__ . '/..' . '/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Data/Fetch/Pop3.php', + 'Horde_Imap_Client_Data_Format' => __DIR__ . '/..' . '/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Data/Format.php', + 'Horde_Imap_Client_Data_Format_Astring' => __DIR__ . '/..' . '/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Data/Format/Astring.php', + 'Horde_Imap_Client_Data_Format_Astring_Nonascii' => __DIR__ . '/..' . '/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Data/Format/Astring/Nonascii.php', + 'Horde_Imap_Client_Data_Format_Atom' => __DIR__ . '/..' . '/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Data/Format/Atom.php', + 'Horde_Imap_Client_Data_Format_Date' => __DIR__ . '/..' . '/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Data/Format/Date.php', + 'Horde_Imap_Client_Data_Format_DateTime' => __DIR__ . '/..' . '/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Data/Format/DateTime.php', + 'Horde_Imap_Client_Data_Format_Exception' => __DIR__ . '/..' . '/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Data/Format/Exception.php', + 'Horde_Imap_Client_Data_Format_Filter_Quote' => __DIR__ . '/..' . '/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Data/Format/Filter/Quote.php', + 'Horde_Imap_Client_Data_Format_Filter_String' => __DIR__ . '/..' . '/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Data/Format/Filter/String.php', + 'Horde_Imap_Client_Data_Format_List' => __DIR__ . '/..' . '/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Data/Format/List.php', + 'Horde_Imap_Client_Data_Format_ListMailbox' => __DIR__ . '/..' . '/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Data/Format/ListMailbox.php', + 'Horde_Imap_Client_Data_Format_ListMailbox_Utf8' => __DIR__ . '/..' . '/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Data/Format/ListMailbox/Utf8.php', + 'Horde_Imap_Client_Data_Format_Mailbox' => __DIR__ . '/..' . '/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Data/Format/Mailbox.php', + 'Horde_Imap_Client_Data_Format_Mailbox_Utf8' => __DIR__ . '/..' . '/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Data/Format/Mailbox/Utf8.php', + 'Horde_Imap_Client_Data_Format_Nil' => __DIR__ . '/..' . '/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Data/Format/Nil.php', + 'Horde_Imap_Client_Data_Format_Nstring' => __DIR__ . '/..' . '/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Data/Format/Nstring.php', + 'Horde_Imap_Client_Data_Format_Nstring_Nonascii' => __DIR__ . '/..' . '/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Data/Format/Nstring/Nonascii.php', + 'Horde_Imap_Client_Data_Format_Number' => __DIR__ . '/..' . '/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Data/Format/Number.php', + 'Horde_Imap_Client_Data_Format_String' => __DIR__ . '/..' . '/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Data/Format/String.php', + 'Horde_Imap_Client_Data_Format_String_Nonascii' => __DIR__ . '/..' . '/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Data/Format/String/Nonascii.php', + 'Horde_Imap_Client_Data_Format_String_Support_Nonascii' => __DIR__ . '/..' . '/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Data/Format/String/Support/Nonascii.php', + 'Horde_Imap_Client_Data_Namespace' => __DIR__ . '/..' . '/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Data/Namespace.php', + 'Horde_Imap_Client_Data_SearchCharset' => __DIR__ . '/..' . '/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Data/SearchCharset.php', + 'Horde_Imap_Client_Data_SearchCharset_Utf8' => __DIR__ . '/..' . '/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Data/SearchCharset/Utf8.php', + 'Horde_Imap_Client_Data_Sync' => __DIR__ . '/..' . '/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Data/Sync.php', + 'Horde_Imap_Client_Data_Thread' => __DIR__ . '/..' . '/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Data/Thread.php', + 'Horde_Imap_Client_DateTime' => __DIR__ . '/..' . '/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/DateTime.php', + 'Horde_Imap_Client_Exception' => __DIR__ . '/..' . '/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Exception.php', + 'Horde_Imap_Client_Exception_NoSupportExtension' => __DIR__ . '/..' . '/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Exception/NoSupportExtension.php', + 'Horde_Imap_Client_Exception_NoSupportPop3' => __DIR__ . '/..' . '/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Exception/NoSupportPop3.php', + 'Horde_Imap_Client_Exception_SearchCharset' => __DIR__ . '/..' . '/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Exception/SearchCharset.php', + 'Horde_Imap_Client_Exception_ServerResponse' => __DIR__ . '/..' . '/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Exception/ServerResponse.php', + 'Horde_Imap_Client_Exception_Sync' => __DIR__ . '/..' . '/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Exception/Sync.php', + 'Horde_Imap_Client_Fetch_Query' => __DIR__ . '/..' . '/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Fetch/Query.php', + 'Horde_Imap_Client_Fetch_Results' => __DIR__ . '/..' . '/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Fetch/Results.php', + 'Horde_Imap_Client_Ids' => __DIR__ . '/..' . '/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Ids.php', + 'Horde_Imap_Client_Ids_Map' => __DIR__ . '/..' . '/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Ids/Map.php', + 'Horde_Imap_Client_Ids_Pop3' => __DIR__ . '/..' . '/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Ids/Pop3.php', + 'Horde_Imap_Client_Interaction_Client' => __DIR__ . '/..' . '/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Interaction/Client.php', + 'Horde_Imap_Client_Interaction_Command' => __DIR__ . '/..' . '/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Interaction/Command.php', + 'Horde_Imap_Client_Interaction_Command_Continuation' => __DIR__ . '/..' . '/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Interaction/Command/Continuation.php', + 'Horde_Imap_Client_Interaction_Pipeline' => __DIR__ . '/..' . '/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Interaction/Pipeline.php', + 'Horde_Imap_Client_Interaction_Server' => __DIR__ . '/..' . '/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Interaction/Server.php', + 'Horde_Imap_Client_Interaction_Server_Continuation' => __DIR__ . '/..' . '/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Interaction/Server/Continuation.php', + 'Horde_Imap_Client_Interaction_Server_Tagged' => __DIR__ . '/..' . '/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Interaction/Server/Tagged.php', + 'Horde_Imap_Client_Interaction_Server_Untagged' => __DIR__ . '/..' . '/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Interaction/Server/Untagged.php', + 'Horde_Imap_Client_Mailbox' => __DIR__ . '/..' . '/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Mailbox.php', + 'Horde_Imap_Client_Mailbox_List' => __DIR__ . '/..' . '/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Mailbox/List.php', + 'Horde_Imap_Client_Namespace_List' => __DIR__ . '/..' . '/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Namespace/List.php', + 'Horde_Imap_Client_Password_Xoauth2' => __DIR__ . '/..' . '/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Password/Xoauth2.php', + 'Horde_Imap_Client_Search_Query' => __DIR__ . '/..' . '/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Search/Query.php', + 'Horde_Imap_Client_Socket' => __DIR__ . '/..' . '/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Socket.php', + 'Horde_Imap_Client_Socket_Catenate' => __DIR__ . '/..' . '/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Socket/Catenate.php', + 'Horde_Imap_Client_Socket_ClientSort' => __DIR__ . '/..' . '/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Socket/ClientSort.php', + 'Horde_Imap_Client_Socket_Connection_Base' => __DIR__ . '/..' . '/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Socket/Connection/Base.php', + 'Horde_Imap_Client_Socket_Connection_Pop3' => __DIR__ . '/..' . '/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Socket/Connection/Pop3.php', + 'Horde_Imap_Client_Socket_Connection_Socket' => __DIR__ . '/..' . '/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Socket/Connection/Socket.php', + 'Horde_Imap_Client_Socket_Pop3' => __DIR__ . '/..' . '/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Socket/Pop3.php', + 'Horde_Imap_Client_Tokenize' => __DIR__ . '/..' . '/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Tokenize.php', + 'Horde_Imap_Client_Translation' => __DIR__ . '/..' . '/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Translation.php', + 'Horde_Imap_Client_Url' => __DIR__ . '/..' . '/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Url.php', + 'Horde_Imap_Client_Url_Base' => __DIR__ . '/..' . '/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Url/Base.php', + 'Horde_Imap_Client_Url_Imap' => __DIR__ . '/..' . '/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Url/Imap.php', + 'Horde_Imap_Client_Url_Imap_Relative' => __DIR__ . '/..' . '/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Url/Imap/Relative.php', + 'Horde_Imap_Client_Url_Pop3' => __DIR__ . '/..' . '/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Url/Pop3.php', + 'Horde_Imap_Client_Utf7imap' => __DIR__ . '/..' . '/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Utf7imap.php', + 'Horde_ListHeaders' => __DIR__ . '/..' . '/pear-pear.horde.org/Horde_ListHeaders/Horde/ListHeaders.php', + 'Horde_ListHeaders_Base' => __DIR__ . '/..' . '/pear-pear.horde.org/Horde_ListHeaders/Horde/ListHeaders/Base.php', + 'Horde_ListHeaders_Id' => __DIR__ . '/..' . '/pear-pear.horde.org/Horde_ListHeaders/Horde/ListHeaders/Id.php', + 'Horde_ListHeaders_NoPost' => __DIR__ . '/..' . '/pear-pear.horde.org/Horde_ListHeaders/Horde/ListHeaders/NoPost.php', + 'Horde_ListHeaders_Object' => __DIR__ . '/..' . '/pear-pear.horde.org/Horde_ListHeaders/Horde/ListHeaders/Object.php', + 'Horde_ListHeaders_Translation' => __DIR__ . '/..' . '/pear-pear.horde.org/Horde_ListHeaders/Horde/ListHeaders/Translation.php', + 'Horde_Mail_Exception' => __DIR__ . '/..' . '/pear-pear.horde.org/Horde_Mail/Horde/Mail/Exception.php', + 'Horde_Mail_Mbox_Parse' => __DIR__ . '/..' . '/pear-pear.horde.org/Horde_Mail/Horde/Mail/Mbox/Parse.php', + 'Horde_Mail_Rfc822' => __DIR__ . '/..' . '/pear-pear.horde.org/Horde_Mail/Horde/Mail/Rfc822.php', + 'Horde_Mail_Rfc822_Address' => __DIR__ . '/..' . '/pear-pear.horde.org/Horde_Mail/Horde/Mail/Rfc822/Address.php', + 'Horde_Mail_Rfc822_Group' => __DIR__ . '/..' . '/pear-pear.horde.org/Horde_Mail/Horde/Mail/Rfc822/Group.php', + 'Horde_Mail_Rfc822_GroupList' => __DIR__ . '/..' . '/pear-pear.horde.org/Horde_Mail/Horde/Mail/Rfc822/GroupList.php', + 'Horde_Mail_Rfc822_Identification' => __DIR__ . '/..' . '/pear-pear.horde.org/Horde_Mail/Horde/Mail/Rfc822/Identification.php', + 'Horde_Mail_Rfc822_List' => __DIR__ . '/..' . '/pear-pear.horde.org/Horde_Mail/Horde/Mail/Rfc822/List.php', + 'Horde_Mail_Rfc822_Object' => __DIR__ . '/..' . '/pear-pear.horde.org/Horde_Mail/Horde/Mail/Rfc822/Object.php', + 'Horde_Mail_Translation' => __DIR__ . '/..' . '/pear-pear.horde.org/Horde_Mail/Horde/Mail/Translation.php', + 'Horde_Mail_Transport' => __DIR__ . '/..' . '/pear-pear.horde.org/Horde_Mail/Horde/Mail/Transport.php', + 'Horde_Mail_Transport_Lmtphorde' => __DIR__ . '/..' . '/pear-pear.horde.org/Horde_Mail/Horde/Mail/Transport/Lmtphorde.php', + 'Horde_Mail_Transport_Mail' => __DIR__ . '/..' . '/pear-pear.horde.org/Horde_Mail/Horde/Mail/Transport/Mail.php', + 'Horde_Mail_Transport_Mock' => __DIR__ . '/..' . '/pear-pear.horde.org/Horde_Mail/Horde/Mail/Transport/Mock.php', + 'Horde_Mail_Transport_Null' => __DIR__ . '/..' . '/pear-pear.horde.org/Horde_Mail/Horde/Mail/Transport/Null.php', + 'Horde_Mail_Transport_Sendmail' => __DIR__ . '/..' . '/pear-pear.horde.org/Horde_Mail/Horde/Mail/Transport/Sendmail.php', + 'Horde_Mail_Transport_Smtp' => __DIR__ . '/..' . '/pear-pear.horde.org/Horde_Mail/Horde/Mail/Transport/Smtp.php', + 'Horde_Mail_Transport_Smtphorde' => __DIR__ . '/..' . '/pear-pear.horde.org/Horde_Mail/Horde/Mail/Transport/Smtphorde.php', + 'Horde_Mail_Transport_Smtpmx' => __DIR__ . '/..' . '/pear-pear.horde.org/Horde_Mail/Horde/Mail/Transport/Smtpmx.php', + 'Horde_Mime' => __DIR__ . '/..' . '/pear-pear.horde.org/Horde_Mime/Horde/Mime.php', + 'Horde_Mime_ContentParam_Decode' => __DIR__ . '/..' . '/pear-pear.horde.org/Horde_Mime/Horde/Mime/ContentParam/Decode.php', + 'Horde_Mime_Exception' => __DIR__ . '/..' . '/pear-pear.horde.org/Horde_Mime/Horde/Mime/Exception.php', + 'Horde_Mime_Filter_Encoding' => __DIR__ . '/..' . '/pear-pear.horde.org/Horde_Mime/Horde/Mime/Filter/Encoding.php', + 'Horde_Mime_Headers' => __DIR__ . '/..' . '/pear-pear.horde.org/Horde_Mime/Horde/Mime/Headers.php', + 'Horde_Mime_Headers_Addresses' => __DIR__ . '/..' . '/pear-pear.horde.org/Horde_Mime/Horde/Mime/Headers/Addresses.php', + 'Horde_Mime_Headers_AddressesMulti' => __DIR__ . '/..' . '/pear-pear.horde.org/Horde_Mime/Horde/Mime/Headers/AddressesMulti.php', + 'Horde_Mime_Headers_ContentDescription' => __DIR__ . '/..' . '/pear-pear.horde.org/Horde_Mime/Horde/Mime/Headers/ContentDescription.php', + 'Horde_Mime_Headers_ContentId' => __DIR__ . '/..' . '/pear-pear.horde.org/Horde_Mime/Horde/Mime/Headers/ContentId.php', + 'Horde_Mime_Headers_ContentLanguage' => __DIR__ . '/..' . '/pear-pear.horde.org/Horde_Mime/Horde/Mime/Headers/ContentLanguage.php', + 'Horde_Mime_Headers_ContentParam' => __DIR__ . '/..' . '/pear-pear.horde.org/Horde_Mime/Horde/Mime/Headers/ContentParam.php', + 'Horde_Mime_Headers_ContentParam_ContentDisposition' => __DIR__ . '/..' . '/pear-pear.horde.org/Horde_Mime/Horde/Mime/Headers/ContentParam/ContentDisposition.php', + 'Horde_Mime_Headers_ContentParam_ContentType' => __DIR__ . '/..' . '/pear-pear.horde.org/Horde_Mime/Horde/Mime/Headers/ContentParam/ContentType.php', + 'Horde_Mime_Headers_ContentTransferEncoding' => __DIR__ . '/..' . '/pear-pear.horde.org/Horde_Mime/Horde/Mime/Headers/ContentTransferEncoding.php', + 'Horde_Mime_Headers_Date' => __DIR__ . '/..' . '/pear-pear.horde.org/Horde_Mime/Horde/Mime/Headers/Date.php', + 'Horde_Mime_Headers_Deprecated' => __DIR__ . '/..' . '/pear-pear.horde.org/Horde_Mime/Horde/Mime/Headers/Deprecated.php', + 'Horde_Mime_Headers_Element' => __DIR__ . '/..' . '/pear-pear.horde.org/Horde_Mime/Horde/Mime/Headers/Element.php', + 'Horde_Mime_Headers_Element_Address' => __DIR__ . '/..' . '/pear-pear.horde.org/Horde_Mime/Horde/Mime/Headers/Element/Address.php', + 'Horde_Mime_Headers_Element_Multiple' => __DIR__ . '/..' . '/pear-pear.horde.org/Horde_Mime/Horde/Mime/Headers/Element/Multiple.php', + 'Horde_Mime_Headers_Element_Single' => __DIR__ . '/..' . '/pear-pear.horde.org/Horde_Mime/Horde/Mime/Headers/Element/Single.php', + 'Horde_Mime_Headers_Extension_Mime' => __DIR__ . '/..' . '/pear-pear.horde.org/Horde_Mime/Horde/Mime/Headers/Extension/Mime.php', + 'Horde_Mime_Headers_Identification' => __DIR__ . '/..' . '/pear-pear.horde.org/Horde_Mime/Horde/Mime/Headers/Identification.php', + 'Horde_Mime_Headers_MessageId' => __DIR__ . '/..' . '/pear-pear.horde.org/Horde_Mime/Horde/Mime/Headers/MessageId.php', + 'Horde_Mime_Headers_Mime' => __DIR__ . '/..' . '/pear-pear.horde.org/Horde_Mime/Horde/Mime/Headers/Mime.php', + 'Horde_Mime_Headers_MimeVersion' => __DIR__ . '/..' . '/pear-pear.horde.org/Horde_Mime/Horde/Mime/Headers/MimeVersion.php', + 'Horde_Mime_Headers_Received' => __DIR__ . '/..' . '/pear-pear.horde.org/Horde_Mime/Horde/Mime/Headers/Received.php', + 'Horde_Mime_Headers_Subject' => __DIR__ . '/..' . '/pear-pear.horde.org/Horde_Mime/Horde/Mime/Headers/Subject.php', + 'Horde_Mime_Headers_UserAgent' => __DIR__ . '/..' . '/pear-pear.horde.org/Horde_Mime/Horde/Mime/Headers/UserAgent.php', + 'Horde_Mime_Id' => __DIR__ . '/..' . '/pear-pear.horde.org/Horde_Mime/Horde/Mime/Id.php', + 'Horde_Mime_Magic' => __DIR__ . '/..' . '/pear-pear.horde.org/Horde_Mime/Horde/Mime/Magic.php', + 'Horde_Mime_Mail' => __DIR__ . '/..' . '/pear-pear.horde.org/Horde_Mime/Horde/Mime/Mail.php', + 'Horde_Mime_Mdn' => __DIR__ . '/..' . '/pear-pear.horde.org/Horde_Mime/Horde/Mime/Mdn.php', + 'Horde_Mime_Part' => __DIR__ . '/..' . '/pear-pear.horde.org/Horde_Mime/Horde/Mime/Part.php', + 'Horde_Mime_Part_Iterator' => __DIR__ . '/..' . '/pear-pear.horde.org/Horde_Mime/Horde/Mime/Part/Iterator.php', + 'Horde_Mime_Part_Upgrade_V1' => __DIR__ . '/..' . '/pear-pear.horde.org/Horde_Mime/Horde/Mime/Part/Upgrade/V1.php', + 'Horde_Mime_QuotedPrintable' => __DIR__ . '/..' . '/pear-pear.horde.org/Horde_Mime/Horde/Mime/QuotedPrintable.php', + 'Horde_Mime_Related' => __DIR__ . '/..' . '/pear-pear.horde.org/Horde_Mime/Horde/Mime/Related.php', + 'Horde_Mime_Translation' => __DIR__ . '/..' . '/pear-pear.horde.org/Horde_Mime/Horde/Mime/Translation.php', + 'Horde_Mime_Uudecode' => __DIR__ . '/..' . '/pear-pear.horde.org/Horde_Mime/Horde/Mime/Uudecode.php', + 'Horde_Secret' => __DIR__ . '/..' . '/pear-pear.horde.org/Horde_Secret/Horde/Secret.php', + 'Horde_Secret_Exception' => __DIR__ . '/..' . '/pear-pear.horde.org/Horde_Secret/Horde/Secret/Exception.php', + 'Horde_Stream' => __DIR__ . '/..' . '/pear-pear.horde.org/Horde_Stream/Horde/Stream.php', + 'Horde_Stream_Exception' => __DIR__ . '/..' . '/pear-pear.horde.org/Horde_Stream/Horde/Stream/Exception.php', + 'Horde_Stream_Existing' => __DIR__ . '/..' . '/pear-pear.horde.org/Horde_Stream/Horde/Stream/Existing.php', + 'Horde_Stream_Filter_Bin2hex' => __DIR__ . '/..' . '/pear-pear.horde.org/Horde_Stream_Filter/Horde/Stream/Filter/Bin2hex.php', + 'Horde_Stream_Filter_Crc32' => __DIR__ . '/..' . '/pear-pear.horde.org/Horde_Stream_Filter/Horde/Stream/Filter/Crc32.php', + 'Horde_Stream_Filter_Eol' => __DIR__ . '/..' . '/pear-pear.horde.org/Horde_Stream_Filter/Horde/Stream/Filter/Eol.php', + 'Horde_Stream_Filter_Htmlspecialchars' => __DIR__ . '/..' . '/pear-pear.horde.org/Horde_Stream_Filter/Horde/Stream/Filter/Htmlspecialchars.php', + 'Horde_Stream_Filter_Null' => __DIR__ . '/..' . '/pear-pear.horde.org/Horde_Stream_Filter/Horde/Stream/Filter/Null.php', + 'Horde_Stream_String' => __DIR__ . '/..' . '/pear-pear.horde.org/Horde_Stream/Horde/Stream/String.php', + 'Horde_Stream_Temp' => __DIR__ . '/..' . '/pear-pear.horde.org/Horde_Stream/Horde/Stream/Temp.php', + 'Horde_Stream_TempString' => __DIR__ . '/..' . '/pear-pear.horde.org/Horde_Stream/Horde/Stream/TempString.php', + 'Horde_Stream_Wrapper_Combine' => __DIR__ . '/..' . '/pear-pear.horde.org/Horde_Stream_Wrapper/Horde/Stream/Wrapper/Combine.php', + 'Horde_Stream_Wrapper_CombineStream' => __DIR__ . '/..' . '/pear-pear.horde.org/Horde_Stream_Wrapper/Horde/Stream/Wrapper/CombineStream.php', + 'Horde_Stream_Wrapper_String' => __DIR__ . '/..' . '/pear-pear.horde.org/Horde_Stream_Wrapper/Horde/Stream/Wrapper/String.php', + 'Horde_Stream_Wrapper_StringStream' => __DIR__ . '/..' . '/pear-pear.horde.org/Horde_Stream_Wrapper/Horde/Stream/Wrapper/StringStream.php', + 'Horde_String' => __DIR__ . '/..' . '/pear-pear.horde.org/Horde_Util/Horde/String.php', + 'Horde_String_Transliterate' => __DIR__ . '/..' . '/pear-pear.horde.org/Horde_Util/Horde/String/Transliterate.php', + 'Horde_Support_Array' => __DIR__ . '/..' . '/pear-pear.horde.org/Horde_Support/Horde/Support/Array.php', + 'Horde_Support_Backtrace' => __DIR__ . '/..' . '/pear-pear.horde.org/Horde_Support/Horde/Support/Backtrace.php', + 'Horde_Support_CaseInsensitiveArray' => __DIR__ . '/..' . '/pear-pear.horde.org/Horde_Support/Horde/Support/CaseInsensitiveArray.php', + 'Horde_Support_CombineStream' => __DIR__ . '/..' . '/pear-pear.horde.org/Horde_Support/Horde/Support/CombineStream.php', + 'Horde_Support_ConsistentHash' => __DIR__ . '/..' . '/pear-pear.horde.org/Horde_Support/Horde/Support/ConsistentHash.php', + 'Horde_Support_Guid' => __DIR__ . '/..' . '/pear-pear.horde.org/Horde_Support/Horde/Support/Guid.php', + 'Horde_Support_Inflector' => __DIR__ . '/..' . '/pear-pear.horde.org/Horde_Support/Horde/Support/Inflector.php', + 'Horde_Support_Memory' => __DIR__ . '/..' . '/pear-pear.horde.org/Horde_Support/Horde/Support/Memory.php', + 'Horde_Support_Numerizer' => __DIR__ . '/..' . '/pear-pear.horde.org/Horde_Support/Horde/Support/Numerizer.php', + 'Horde_Support_Numerizer_Locale_Base' => __DIR__ . '/..' . '/pear-pear.horde.org/Horde_Support/Horde/Support/Numerizer/Locale/Base.php', + 'Horde_Support_Numerizer_Locale_De' => __DIR__ . '/..' . '/pear-pear.horde.org/Horde_Support/Horde/Support/Numerizer/Locale/De.php', + 'Horde_Support_Numerizer_Locale_Pt' => __DIR__ . '/..' . '/pear-pear.horde.org/Horde_Support/Horde/Support/Numerizer/Locale/Pt.php', + 'Horde_Support_ObjectStub' => __DIR__ . '/..' . '/pear-pear.horde.org/Horde_Support/Horde/Support/ObjectStub.php', + 'Horde_Support_Randomid' => __DIR__ . '/..' . '/pear-pear.horde.org/Horde_Support/Horde/Support/Randomid.php', + 'Horde_Support_Stack' => __DIR__ . '/..' . '/pear-pear.horde.org/Horde_Support/Horde/Support/Stack.php', + 'Horde_Support_StringStream' => __DIR__ . '/..' . '/pear-pear.horde.org/Horde_Support/Horde/Support/StringStream.php', + 'Horde_Support_Stub' => __DIR__ . '/..' . '/pear-pear.horde.org/Horde_Support/Horde/Support/Stub.php', + 'Horde_Support_Timer' => __DIR__ . '/..' . '/pear-pear.horde.org/Horde_Support/Horde/Support/Timer.php', + 'Horde_Support_Uuid' => __DIR__ . '/..' . '/pear-pear.horde.org/Horde_Support/Horde/Support/Uuid.php', + 'Horde_Text_Flowed' => __DIR__ . '/..' . '/pear-pear.horde.org/Horde_Text_Flowed/Horde/Text/Flowed.php', + 'Horde_Translation' => __DIR__ . '/..' . '/pear-pear.horde.org/Horde_Translation/Horde/Translation.php', + 'Horde_Translation_Autodetect' => __DIR__ . '/..' . '/pear-pear.horde.org/Horde_Translation/Horde/Translation/Autodetect.php', + 'Horde_Translation_Exception' => __DIR__ . '/..' . '/pear-pear.horde.org/Horde_Translation/Horde/Translation/Exception.php', + 'Horde_Translation_Handler' => __DIR__ . '/..' . '/pear-pear.horde.org/Horde_Translation/Horde/Translation/Handler.php', + 'Horde_Translation_Handler_Gettext' => __DIR__ . '/..' . '/pear-pear.horde.org/Horde_Translation/Horde/Translation/Handler/Gettext.php', + 'Horde_Util' => __DIR__ . '/..' . '/pear-pear.horde.org/Horde_Util/Horde/Util.php', + 'Horde_Variables' => __DIR__ . '/..' . '/pear-pear.horde.org/Horde_Util/Horde/Variables.php', + ); + public static function getInitializer(ClassLoader $loader) { return \Closure::bind(function () use ($loader) { $loader->prefixLengthsPsr4 = ComposerStaticInited73ceb9c1bdec18b7c6d09764d1bce5::$prefixLengthsPsr4; $loader->prefixDirsPsr4 = ComposerStaticInited73ceb9c1bdec18b7c6d09764d1bce5::$prefixDirsPsr4; + $loader->classMap = ComposerStaticInited73ceb9c1bdec18b7c6d09764d1bce5::$classMap; }, null, ClassLoader::class); } diff --git a/lam/lib/3rdParty/composer/composer/include_paths.php b/lam/lib/3rdParty/composer/composer/include_paths.php new file mode 100644 index 00000000..41c63635 --- /dev/null +++ b/lam/lib/3rdParty/composer/composer/include_paths.php @@ -0,0 +1,25 @@ + + * Copyright 2012-2017 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. + * + * @author Matthew Fonda + * @author Michael Slusarz + * @category Horde + * @license http://www.horde.org/licenses/lgpl21 LGPL 2.1 + * @package Crypt_Blowfish + */ + +/** + * Provides blowfish encryption/decryption, with or without a secret key, + * for PHP strings. + * + * @author Matthew Fonda + * @author Michael Slusarz + * @category Horde + * @copyright 2005-2008 Matthew Fonda + * @copyright 2012-2017 Horde LLC + * @license http://www.horde.org/licenses/lgpl21 LGPL 2.1 + * @package Crypt_Blowfish + * + * @property string $cipher The cipher block mode ('ecb' or 'cbc'). + * @property string $key The encryption key in use. + * @property mixed $iv The initialization vector (false if using 'ecb'). + */ +class Horde_Crypt_Blowfish +{ + // Constants for 'ignore' parameter of constructor. + const IGNORE_OPENSSL = 1; + const IGNORE_MCRYPT = 2; + + // Block size for Blowfish + const BLOCKSIZE = 8; + + // Maximum key size for Blowfish + const MAXKEYSIZE = 56; + + // IV Length for CBC + const IV_LENGTH = 8; + + /** + * Blowfish crypt driver. + * + * @var Horde_Crypt_Blowfish_Base + */ + protected $_crypt; + + /** + * Constructor. + * + * @param string $key Encryption key. + * @param array $opts Additional options: + * - cipher: (string) Either 'ecb' or 'cbc'. + * - ignore: (integer) A mask of drivers to ignore (IGNORE_* constants). + * - iv: (string) IV to use. + */ + public function __construct($key, array $opts = array()) + { + $opts = array_merge(array( + 'cipher' => 'ecb', + 'ignore' => 0, + 'iv' => null + ), $opts); + + if (!($opts['ignore'] & self::IGNORE_OPENSSL) && + Horde_Crypt_Blowfish_Openssl::supported()) { + $this->_crypt = new Horde_Crypt_Blowfish_Openssl($opts['cipher']); + } elseif (!($opts['ignore'] & self::IGNORE_MCRYPT) && + Horde_Crypt_Blowfish_Mcrypt::supported()) { + $this->_crypt = new Horde_Crypt_Blowfish_Mcrypt($opts['cipher']); + } else { + $this->_crypt = new Horde_Crypt_Blowfish_Php($opts['cipher']); + } + + $this->setKey($key, $opts['iv']); + } + + /** + */ + public function __get($name) + { + switch ($name) { + case 'cipher': + case 'key': + case 'iv': + return $this->_crypt->$name; + } + } + + /** + * Encrypts a string. + * + * @param string $text The string to encrypt. + * + * @return string The ciphertext. + * @throws Horde_Crypt_Blowfish_Exception + */ + public function encrypt($text) + { + if (!is_string($text)) { + throw new Horde_Crypt_Blowfish_Exception('Data to encrypt must be a string.'); + } + + return $this->_crypt->encrypt($text); + } + + /** + * Decrypts a string. + * + * @param string $text The string to decrypt. + * + * @return string The plaintext. + * @throws Horde_Crypt_Blowfish_Exception + */ + public function decrypt($text) + { + if (!is_string($text)) { + throw new Horde_Crypt_Blowfish_Exception('Data to decrypt must be a string.'); + } + + return $this->_crypt->decrypt($text); + } + + /** + * Sets the secret key. + * + * The key must be non-zero, and less than or equal to MAXKEYSIZE + * characters (bytes) in length. + * + * @param string $key Key must be non-empty and less than MAXKEYSIZE + * bytes in length. + * @param string $iv The initialization vector to use. Only needed for + * 'cbc' cipher. If null, an IV is automatically + * generated. + * + * @throws Horde_Crypt_Blowfish_Exception + */ + public function setKey($key, $iv = null) + { + if (!is_string($key)) { + throw new Horde_Crypt_Blowfish_Exception('Encryption key must be a string.'); + } + + $len = strlen($key); + if (($len > self::MAXKEYSIZE) || ($len == 0)) { + throw new Horde_Crypt_Blowfish_Exception(sprintf('Encryption key must be less than %d characters (bytes) and non-zero. Supplied key length: %d', self::MAXKEYSIZE, $len)); + } + + $this->_crypt->key = $key; + + switch ($this->_crypt->cipher) { + case 'cbc': + if (is_null($iv)) { + if (is_null($this->iv)) { + $this->_crypt->setIv(); + } + } else { + $iv = substr($iv, 0, self::IV_LENGTH); + if (($len = strlen($iv)) < self::IV_LENGTH) { + $iv .= str_repeat(chr(0), self::IV_LENGTH - $len); + } + $this->_crypt->setIv($iv); + } + break; + + case 'ecb': + $this->iv = false; + break; + } + } + +} diff --git a/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Crypt_Blowfish/Horde/Crypt/Blowfish/Base.php b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Crypt_Blowfish/Horde/Crypt/Blowfish/Base.php new file mode 100644 index 00000000..8036d11f --- /dev/null +++ b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Crypt_Blowfish/Horde/Crypt/Blowfish/Base.php @@ -0,0 +1,128 @@ + + * @category Horde + * @license http://www.horde.org/licenses/lgpl21 LGPL 2.1 + * @package Crypt_Blowfish + */ + +/** + * Abstract base driver class for blowfish encryption. + * + * @author Michael Slusarz + * @category Horde + * @copyright 2012-2017 Horde LLC + * @license http://www.horde.org/licenses/lgpl21 LGPL 2.1 + * @package Crypt_Blowfish + */ +abstract class Horde_Crypt_Blowfish_Base +{ + /** + * Cipher method. + * + * @var string + */ + public $cipher; + + /** + * Initialization vector. + * + * @var string + */ + public $iv = null; + + /** + * Encryption key. + * + * @var string + */ + public $key; + + /** + * Is this driver supported on this system? + * + * @return boolean True if supported. + */ + public static function supported() + { + return true; + } + + /** + * Constructor. + * + * @param string $cipher Either 'ecb' or 'cbc'. + */ + public function __construct($cipher) + { + $this->cipher = $cipher; + } + + /** + * Encrypts a string. + * + * @param string $text The string to encrypt. + * + * @return string The ciphertext. + * @throws Horde_Crypt_Blowfish_Exception + */ + abstract public function encrypt($text); + + /** + * Decrypts a string. + * + * @param string $text The string to encrypt. + * + * @return string The ciphertext. + * @throws Horde_Crypt_Blowfish_Exception + */ + abstract public function decrypt($text); + + /** + * Sets the initialization vector (required for CBC mode). + * + * @param string $iv Initialization vector. + */ + public function setIv($iv = null) + { + $this->iv = is_null($iv) + ? substr(new Horde_Support_Randomid(), 0, 8) + : $iv; + } + + /** + * Pad text to match blocksize length. + * + * @param string $text Unpadded text. + * @param boolean $ignore Don't pad if already at blocksize length. + * + * @return string Padded text. + */ + protected function _pad($text, $ignore = false) + { + $blocksize = Horde_Crypt_Blowfish::BLOCKSIZE; + $padding = $blocksize - (strlen($text) % $blocksize); + + return ($ignore && ($padding == $blocksize)) + ? $text + : $text . str_repeat(chr($padding), $padding); + } + + /** + * Unpad text from blocksize boundary. + * + * @param string $text Padded text. + * + * @return string Unpadded text. + */ + protected function _unpad($text) + { + return substr($text, 0, ord(substr($text, -1)) * -1); + } + +} diff --git a/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Crypt_Blowfish/Horde/Crypt/Blowfish/Exception.php b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Crypt_Blowfish/Horde/Crypt/Blowfish/Exception.php new file mode 100644 index 00000000..64485766 --- /dev/null +++ b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Crypt_Blowfish/Horde/Crypt/Blowfish/Exception.php @@ -0,0 +1,25 @@ + + * @category Horde + * @license http://www.horde.org/licenses/lgpl21 LGPL 2.1 + * @package Crypt_Blowfish + */ + +/** + * Exception object for the Horde_Crypt_Blowfish package. + * + * @author Michael Slusarz + * @category Horde + * @copyright 2012-2017 Horde LLC + * @license http://www.horde.org/licenses/lgpl21 LGPL 2.1 + * @package Crypt_Blowfish + */ +class Horde_Crypt_Blowfish_Exception extends Horde_Exception_Wrapped +{ +} diff --git a/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Crypt_Blowfish/Horde/Crypt/Blowfish/Mcrypt.php b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Crypt_Blowfish/Horde/Crypt/Blowfish/Mcrypt.php new file mode 100644 index 00000000..429001bf --- /dev/null +++ b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Crypt_Blowfish/Horde/Crypt/Blowfish/Mcrypt.php @@ -0,0 +1,87 @@ + + * Copyright 2008 Philippe Jausions + * Copyright 2012-2017 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. + * + * @author Matthew Fonda + * @author Philippe Jausions + * @author Michael Slusarz + * @category Horde + * @license http://www.horde.org/licenses/lgpl21 LGPL 2.1 + * @package Crypt_Blowfish + */ + +/** + * Mcrypt driver for blowfish encryption. + * + * @author Matthew Fonda + * @author Philippe Jausions + * @author Michael Slusarz + * @category Horde + * @copyright 2005-2008 Matthew Fonda + * @copyright 2008 Philippe Jausions + * @copyright 2012-2017 Horde LLC + * @license http://www.horde.org/licenses/lgpl21 LGPL 2.1 + * @package Crypt_Blowfish + */ +class Horde_Crypt_Blowfish_Mcrypt extends Horde_Crypt_Blowfish_Base +{ + /** + * Mcrypt resource. + * + * @var resource + */ + private $_mcrypt; + + /** + */ + public static function supported() + { + return PHP_VERSION_ID < 70100 && extension_loaded('mcrypt'); + } + + /** + */ + public function __construct($cipher) + { + parent::__construct($cipher); + + $this->_mcrypt = mcrypt_module_open(MCRYPT_BLOWFISH, '', $cipher, ''); + } + + /** + */ + public function encrypt($text) + { + mcrypt_generic_init($this->_mcrypt, $this->key, empty($this->iv) ? str_repeat('0', Horde_Crypt_Blowfish::IV_LENGTH) : $this->iv); + $out = mcrypt_generic($this->_mcrypt, $this->_pad($text)); + mcrypt_generic_deinit($this->_mcrypt); + + return $out; + } + + /** + */ + public function decrypt($text) + { + mcrypt_generic_init($this->_mcrypt, $this->key, empty($this->iv) ? str_repeat('0', Horde_Crypt_Blowfish::IV_LENGTH) : $this->iv); + $out = mdecrypt_generic($this->_mcrypt, $this->_pad($text, true)); + mcrypt_generic_deinit($this->_mcrypt); + + return $this->_unpad($out); + } + + /** + */ + public function setIv($iv = null) + { + $this->iv = is_null($iv) + ? mcrypt_create_iv(Horde_Crypt_Blowfish::IV_LENGTH, MCRYPT_RAND) + : $iv; + } + +} diff --git a/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Crypt_Blowfish/Horde/Crypt/Blowfish/Openssl.php b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Crypt_Blowfish/Horde/Crypt/Blowfish/Openssl.php new file mode 100644 index 00000000..a23bfa8b --- /dev/null +++ b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Crypt_Blowfish/Horde/Crypt/Blowfish/Openssl.php @@ -0,0 +1,56 @@ + + * @category Horde + * @license http://www.horde.org/licenses/lgpl21 LGPL 2.1 + * @package Crypt_Blowfish + */ + +/** + * Openssl driver for blowfish encryption. + * + * @author Michael Slusarz + * @category Horde + * @copyright 2012-2017 Horde LLC + * @license http://www.horde.org/licenses/lgpl21 LGPL 2.1 + * @package Crypt_Blowfish + */ +class Horde_Crypt_Blowfish_Openssl extends Horde_Crypt_Blowfish_Base +{ + /** + */ + public static function supported() + { + return extension_loaded('openssl'); + } + + /** + */ + public function encrypt($text) + { + if (PHP_VERSION_ID <= 50302) { + return @openssl_encrypt($text, 'bf-' . $this->cipher, $this->key, true); + } elseif (PHP_VERSION_ID == 50303) { + // Need to mask error output, since an invalid warning message was + // issued prior to 5.3.4 for empty IVs in ECB mode. + return @openssl_encrypt($text, 'bf-' . $this->cipher, $this->key, true, strval($this->iv)); + } + + return openssl_encrypt($text, 'bf-' . $this->cipher, $this->key, true, strval($this->iv)); + } + + /** + */ + public function decrypt($text) + { + return (PHP_VERSION_ID <= 50302) + ? openssl_decrypt($text, 'bf-' . $this->cipher, $this->key, true) + : openssl_decrypt($text, 'bf-' . $this->cipher, $this->key, true, strval($this->iv)); + } + +} diff --git a/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Crypt_Blowfish/Horde/Crypt/Blowfish/Pbkdf2.php b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Crypt_Blowfish/Horde/Crypt/Blowfish/Pbkdf2.php new file mode 100644 index 00000000..adacfd0c --- /dev/null +++ b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Crypt_Blowfish/Horde/Crypt/Blowfish/Pbkdf2.php @@ -0,0 +1,128 @@ + + * @category Horde + * @license http://www.horde.org/licenses/lgpl21 LGPL 2.1 + * @package Crypt_Blowfish + */ + +/** + * PBKDF2 (Password-Based Key Derivation Function 2) implementation (RFC + * 2898; PKCS #5 v2.0). + * + * @author Michael Slusarz + * @category Horde + * @copyright 2015-2017 Horde LLC + * @license http://www.horde.org/licenses/lgpl21 LGPL 2.1 + * @package Crypt_Blowfish + * @link https://defuse.ca/php-pbkdf2.htm pbkdf2 code released to the + * public domain. + */ +class Horde_Crypt_Blowfish_Pbkdf2 +{ + /** + * Hash algorithm used to create key. + * + * @var string + */ + public $hashAlgo; + + /** + * Number of iterations to use. + * + * @var integer + */ + public $iterations; + + /** + * Salt. + * + * @var string + */ + public $salt; + + /** + * The derived key. + * + * @var string + */ + protected $_key; + + /** + * Constructor. + * + * @param string $pass The password. + * @param string $key_length Length of the derived key (in bytes). + * @param array $opts Additional options: + * - algo: (string) Hash algorithm. + * - i_count: (integer) Iteration count. + * - salt: (string) The salt to use. + */ + public function __construct($pass, $key_length, array $opts = array()) + { + $this->iterations = isset($opts['i_count']) + ? $opts['i_count'] + : 16384; + + if (($key_length <= 0) || ($this->iterations <= 0)) { + throw new InvalidArgumentException('Invalid arguments'); + } + + $this->hashAlgo = isset($opts['algo']) + ? $opts['algo'] + : 'SHA256'; + + /* Nice to have, but salt does not need to be cryptographically + * secure random value. */ + $this->salt = isset($opts['salt']) + ? $opts['salt'] + : (function_exists('openssl_random_pseudo_bytes') + ? openssl_random_pseudo_bytes($key_length) + : substr(hash('sha512', new Horde_Support_Randomid(), true), 0, $key_length)); + + if (function_exists('hash_pbkdf2')) { + $this->_key = hash_pbkdf2( + $this->hashAlgo, + $pass, + $this->salt, + $this->iterations, + $key_length, + true + ); + return; + } + + $hash_length = strlen(hash($this->hashAlgo, '', true)); + $block_count = ceil($key_length / $hash_length); + + $hash = ''; + for ($i = 1; $i <= $block_count; ++$i) { + // $i encoded as 4 bytes, big endian. + $last = $this->salt . pack('N', $i); + for ($j = 0; $j < $this->iterations; $j++) { + $last = hash_hmac($this->hashAlgo, $last, $pass, true); + if ($j) { + $xorsum ^= $last; + } else { + $xorsum = $last; + } + } + $hash .= $xorsum; + } + + $this->_key = substr($hash, 0, $key_length); + } + + /** + */ + public function __toString() + { + return $this->_key; + } + +} diff --git a/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Crypt_Blowfish/Horde/Crypt/Blowfish/Php.php b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Crypt_Blowfish/Horde/Crypt/Blowfish/Php.php new file mode 100644 index 00000000..3b164140 --- /dev/null +++ b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Crypt_Blowfish/Horde/Crypt/Blowfish/Php.php @@ -0,0 +1,75 @@ + + * Copyright 2008 Philippe Jausions + * Copyright 2012-2017 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. + * + * @author Matthew Fonda + * @author Philippe Jausions + * @author Michael Slusarz + * @category Horde + * @license http://www.horde.org/licenses/lgpl21 LGPL 2.1 + * @package Crypt_Blowfish + */ + +/** + * Native PHP driver for blowfish encryption. + * + * @author Matthew Fonda + * @author Philippe Jausions + * @author Michael Slusarz + * @category Horde + * @copyright 2005-2008 Matthew Fonda + * @copyright 2008 Philippe Jausions + * @copyright 2012-2017 Horde LLC + * @license http://www.horde.org/licenses/lgpl21 LGPL 2.1 + * @package Crypt_Blowfish + */ +class Horde_Crypt_Blowfish_Php extends Horde_Crypt_Blowfish_Base +{ + /** + * Subclass object. + * + * @var Horde_Crypt_Blowfish_Php_Base + */ + protected $_ob; + + /** + */ + public function encrypt($text) + { + $this->_init(); + return $this->_ob->encrypt($this->_pad($text), $this->iv); + } + + /** + */ + public function decrypt($text) + { + $this->_init(); + return $this->_unpad($this->_ob->decrypt($this->_pad($text, true), $this->iv)); + } + + /** + * Initialize the subclass. + */ + protected function _init() + { + if (!isset($this->_ob) || + ($this->_ob->md5 != hash('md5', $this->key))) { + switch ($this->cipher) { + case 'cbc': + $this->_ob = new Horde_Crypt_Blowfish_Php_Cbc($this->key); + break; + + case 'ecb': + $this->_ob = new Horde_Crypt_Blowfish_Php_Ecb($this->key); + break; + } + } + } + +} diff --git a/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Crypt_Blowfish/Horde/Crypt/Blowfish/Php/Base.php b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Crypt_Blowfish/Horde/Crypt/Blowfish/Php/Base.php new file mode 100644 index 00000000..65820b5c --- /dev/null +++ b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Crypt_Blowfish/Horde/Crypt/Blowfish/Php/Base.php @@ -0,0 +1,459 @@ + + * Copyright 2012-2017 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. + * + * @author Matthew Fonda + * @author Michael Slusarz + * @category Horde + * @license http://www.horde.org/licenses/lgpl21 LGPL 2.1 + * @package Crypt_Blowfish + */ + +/** + * Base subclass for the PHP driver. + * + * @author Matthew Fonda + * @author Michael Slusarz + * @category Horde + * @copyright 2005-2008 Matthew Fonda + * @copyright 2012-2017 Horde LLC + * @license http://www.horde.org/licenses/lgpl21 LGPL 2.1 + * @package Crypt_Blowfish + */ +abstract class Horde_Crypt_Blowfish_Php_Base +{ + /** + * MD5 sum of the key used. + * + * @var string + */ + public $md5; + + /** + * P-Array contains 18 32-bit subkeys. + * + * @var array + */ + protected $_P = array( + 0x243F6A88, 0x85A308D3, 0x13198A2E, 0x03707344, + 0xA4093822, 0x299F31D0, 0x082EFA98, 0xEC4E6C89, + 0x452821E6, 0x38D01377, 0xBE5466CF, 0x34E90C6C, + 0xC0AC29B7, 0xC97C50DD, 0x3F84D5B5, 0xB5470917, + 0x9216D5D9, 0x8979FB1B + ); + + /** + * Array of four S-Blocks each containing 256 32-bit entries. + * + * @var array + */ + protected $_S = array( + array( + 0xD1310BA6, 0x98DFB5AC, 0x2FFD72DB, 0xD01ADFB7, + 0xB8E1AFED, 0x6A267E96, 0xBA7C9045, 0xF12C7F99, + 0x24A19947, 0xB3916CF7, 0x0801F2E2, 0x858EFC16, + 0x636920D8, 0x71574E69, 0xA458FEA3, 0xF4933D7E, + 0x0D95748F, 0x728EB658, 0x718BCD58, 0x82154AEE, + 0x7B54A41D, 0xC25A59B5, 0x9C30D539, 0x2AF26013, + 0xC5D1B023, 0x286085F0, 0xCA417918, 0xB8DB38EF, + 0x8E79DCB0, 0x603A180E, 0x6C9E0E8B, 0xB01E8A3E, + 0xD71577C1, 0xBD314B27, 0x78AF2FDA, 0x55605C60, + 0xE65525F3, 0xAA55AB94, 0x57489862, 0x63E81440, + 0x55CA396A, 0x2AAB10B6, 0xB4CC5C34, 0x1141E8CE, + 0xA15486AF, 0x7C72E993, 0xB3EE1411, 0x636FBC2A, + 0x2BA9C55D, 0x741831F6, 0xCE5C3E16, 0x9B87931E, + 0xAFD6BA33, 0x6C24CF5C, 0x7A325381, 0x28958677, + 0x3B8F4898, 0x6B4BB9AF, 0xC4BFE81B, 0x66282193, + 0x61D809CC, 0xFB21A991, 0x487CAC60, 0x5DEC8032, + 0xEF845D5D, 0xE98575B1, 0xDC262302, 0xEB651B88, + 0x23893E81, 0xD396ACC5, 0x0F6D6FF3, 0x83F44239, + 0x2E0B4482, 0xA4842004, 0x69C8F04A, 0x9E1F9B5E, + 0x21C66842, 0xF6E96C9A, 0x670C9C61, 0xABD388F0, + 0x6A51A0D2, 0xD8542F68, 0x960FA728, 0xAB5133A3, + 0x6EEF0B6C, 0x137A3BE4, 0xBA3BF050, 0x7EFB2A98, + 0xA1F1651D, 0x39AF0176, 0x66CA593E, 0x82430E88, + 0x8CEE8619, 0x456F9FB4, 0x7D84A5C3, 0x3B8B5EBE, + 0xE06F75D8, 0x85C12073, 0x401A449F, 0x56C16AA6, + 0x4ED3AA62, 0x363F7706, 0x1BFEDF72, 0x429B023D, + 0x37D0D724, 0xD00A1248, 0xDB0FEAD3, 0x49F1C09B, + 0x075372C9, 0x80991B7B, 0x25D479D8, 0xF6E8DEF7, + 0xE3FE501A, 0xB6794C3B, 0x976CE0BD, 0x04C006BA, + 0xC1A94FB6, 0x409F60C4, 0x5E5C9EC2, 0x196A2463, + 0x68FB6FAF, 0x3E6C53B5, 0x1339B2EB, 0x3B52EC6F, + 0x6DFC511F, 0x9B30952C, 0xCC814544, 0xAF5EBD09, + 0xBEE3D004, 0xDE334AFD, 0x660F2807, 0x192E4BB3, + 0xC0CBA857, 0x45C8740F, 0xD20B5F39, 0xB9D3FBDB, + 0x5579C0BD, 0x1A60320A, 0xD6A100C6, 0x402C7279, + 0x679F25FE, 0xFB1FA3CC, 0x8EA5E9F8, 0xDB3222F8, + 0x3C7516DF, 0xFD616B15, 0x2F501EC8, 0xAD0552AB, + 0x323DB5FA, 0xFD238760, 0x53317B48, 0x3E00DF82, + 0x9E5C57BB, 0xCA6F8CA0, 0x1A87562E, 0xDF1769DB, + 0xD542A8F6, 0x287EFFC3, 0xAC6732C6, 0x8C4F5573, + 0x695B27B0, 0xBBCA58C8, 0xE1FFA35D, 0xB8F011A0, + 0x10FA3D98, 0xFD2183B8, 0x4AFCB56C, 0x2DD1D35B, + 0x9A53E479, 0xB6F84565, 0xD28E49BC, 0x4BFB9790, + 0xE1DDF2DA, 0xA4CB7E33, 0x62FB1341, 0xCEE4C6E8, + 0xEF20CADA, 0x36774C01, 0xD07E9EFE, 0x2BF11FB4, + 0x95DBDA4D, 0xAE909198, 0xEAAD8E71, 0x6B93D5A0, + 0xD08ED1D0, 0xAFC725E0, 0x8E3C5B2F, 0x8E7594B7, + 0x8FF6E2FB, 0xF2122B64, 0x8888B812, 0x900DF01C, + 0x4FAD5EA0, 0x688FC31C, 0xD1CFF191, 0xB3A8C1AD, + 0x2F2F2218, 0xBE0E1777, 0xEA752DFE, 0x8B021FA1, + 0xE5A0CC0F, 0xB56F74E8, 0x18ACF3D6, 0xCE89E299, + 0xB4A84FE0, 0xFD13E0B7, 0x7CC43B81, 0xD2ADA8D9, + 0x165FA266, 0x80957705, 0x93CC7314, 0x211A1477, + 0xE6AD2065, 0x77B5FA86, 0xC75442F5, 0xFB9D35CF, + 0xEBCDAF0C, 0x7B3E89A0, 0xD6411BD3, 0xAE1E7E49, + 0x00250E2D, 0x2071B35E, 0x226800BB, 0x57B8E0AF, + 0x2464369B, 0xF009B91E, 0x5563911D, 0x59DFA6AA, + 0x78C14389, 0xD95A537F, 0x207D5BA2, 0x02E5B9C5, + 0x83260376, 0x6295CFA9, 0x11C81968, 0x4E734A41, + 0xB3472DCA, 0x7B14A94A, 0x1B510052, 0x9A532915, + 0xD60F573F, 0xBC9BC6E4, 0x2B60A476, 0x81E67400, + 0x08BA6FB5, 0x571BE91F, 0xF296EC6B, 0x2A0DD915, + 0xB6636521, 0xE7B9F9B6, 0xFF34052E, 0xC5855664, + 0x53B02D5D, 0xA99F8FA1, 0x08BA4799, 0x6E85076A + ), array( + 0x4B7A70E9, 0xB5B32944, 0xDB75092E, 0xC4192623, + 0xAD6EA6B0, 0x49A7DF7D, 0x9CEE60B8, 0x8FEDB266, + 0xECAA8C71, 0x699A17FF, 0x5664526C, 0xC2B19EE1, + 0x193602A5, 0x75094C29, 0xA0591340, 0xE4183A3E, + 0x3F54989A, 0x5B429D65, 0x6B8FE4D6, 0x99F73FD6, + 0xA1D29C07, 0xEFE830F5, 0x4D2D38E6, 0xF0255DC1, + 0x4CDD2086, 0x8470EB26, 0x6382E9C6, 0x021ECC5E, + 0x09686B3F, 0x3EBAEFC9, 0x3C971814, 0x6B6A70A1, + 0x687F3584, 0x52A0E286, 0xB79C5305, 0xAA500737, + 0x3E07841C, 0x7FDEAE5C, 0x8E7D44EC, 0x5716F2B8, + 0xB03ADA37, 0xF0500C0D, 0xF01C1F04, 0x0200B3FF, + 0xAE0CF51A, 0x3CB574B2, 0x25837A58, 0xDC0921BD, + 0xD19113F9, 0x7CA92FF6, 0x94324773, 0x22F54701, + 0x3AE5E581, 0x37C2DADC, 0xC8B57634, 0x9AF3DDA7, + 0xA9446146, 0x0FD0030E, 0xECC8C73E, 0xA4751E41, + 0xE238CD99, 0x3BEA0E2F, 0x3280BBA1, 0x183EB331, + 0x4E548B38, 0x4F6DB908, 0x6F420D03, 0xF60A04BF, + 0x2CB81290, 0x24977C79, 0x5679B072, 0xBCAF89AF, + 0xDE9A771F, 0xD9930810, 0xB38BAE12, 0xDCCF3F2E, + 0x5512721F, 0x2E6B7124, 0x501ADDE6, 0x9F84CD87, + 0x7A584718, 0x7408DA17, 0xBC9F9ABC, 0xE94B7D8C, + 0xEC7AEC3A, 0xDB851DFA, 0x63094366, 0xC464C3D2, + 0xEF1C1847, 0x3215D908, 0xDD433B37, 0x24C2BA16, + 0x12A14D43, 0x2A65C451, 0x50940002, 0x133AE4DD, + 0x71DFF89E, 0x10314E55, 0x81AC77D6, 0x5F11199B, + 0x043556F1, 0xD7A3C76B, 0x3C11183B, 0x5924A509, + 0xF28FE6ED, 0x97F1FBFA, 0x9EBABF2C, 0x1E153C6E, + 0x86E34570, 0xEAE96FB1, 0x860E5E0A, 0x5A3E2AB3, + 0x771FE71C, 0x4E3D06FA, 0x2965DCB9, 0x99E71D0F, + 0x803E89D6, 0x5266C825, 0x2E4CC978, 0x9C10B36A, + 0xC6150EBA, 0x94E2EA78, 0xA5FC3C53, 0x1E0A2DF4, + 0xF2F74EA7, 0x361D2B3D, 0x1939260F, 0x19C27960, + 0x5223A708, 0xF71312B6, 0xEBADFE6E, 0xEAC31F66, + 0xE3BC4595, 0xA67BC883, 0xB17F37D1, 0x018CFF28, + 0xC332DDEF, 0xBE6C5AA5, 0x65582185, 0x68AB9802, + 0xEECEA50F, 0xDB2F953B, 0x2AEF7DAD, 0x5B6E2F84, + 0x1521B628, 0x29076170, 0xECDD4775, 0x619F1510, + 0x13CCA830, 0xEB61BD96, 0x0334FE1E, 0xAA0363CF, + 0xB5735C90, 0x4C70A239, 0xD59E9E0B, 0xCBAADE14, + 0xEECC86BC, 0x60622CA7, 0x9CAB5CAB, 0xB2F3846E, + 0x648B1EAF, 0x19BDF0CA, 0xA02369B9, 0x655ABB50, + 0x40685A32, 0x3C2AB4B3, 0x319EE9D5, 0xC021B8F7, + 0x9B540B19, 0x875FA099, 0x95F7997E, 0x623D7DA8, + 0xF837889A, 0x97E32D77, 0x11ED935F, 0x16681281, + 0x0E358829, 0xC7E61FD6, 0x96DEDFA1, 0x7858BA99, + 0x57F584A5, 0x1B227263, 0x9B83C3FF, 0x1AC24696, + 0xCDB30AEB, 0x532E3054, 0x8FD948E4, 0x6DBC3128, + 0x58EBF2EF, 0x34C6FFEA, 0xFE28ED61, 0xEE7C3C73, + 0x5D4A14D9, 0xE864B7E3, 0x42105D14, 0x203E13E0, + 0x45EEE2B6, 0xA3AAABEA, 0xDB6C4F15, 0xFACB4FD0, + 0xC742F442, 0xEF6ABBB5, 0x654F3B1D, 0x41CD2105, + 0xD81E799E, 0x86854DC7, 0xE44B476A, 0x3D816250, + 0xCF62A1F2, 0x5B8D2646, 0xFC8883A0, 0xC1C7B6A3, + 0x7F1524C3, 0x69CB7492, 0x47848A0B, 0x5692B285, + 0x095BBF00, 0xAD19489D, 0x1462B174, 0x23820E00, + 0x58428D2A, 0x0C55F5EA, 0x1DADF43E, 0x233F7061, + 0x3372F092, 0x8D937E41, 0xD65FECF1, 0x6C223BDB, + 0x7CDE3759, 0xCBEE7460, 0x4085F2A7, 0xCE77326E, + 0xA6078084, 0x19F8509E, 0xE8EFD855, 0x61D99735, + 0xA969A7AA, 0xC50C06C2, 0x5A04ABFC, 0x800BCADC, + 0x9E447A2E, 0xC3453484, 0xFDD56705, 0x0E1E9EC9, + 0xDB73DBD3, 0x105588CD, 0x675FDA79, 0xE3674340, + 0xC5C43465, 0x713E38D8, 0x3D28F89E, 0xF16DFF20, + 0x153E21E7, 0x8FB03D4A, 0xE6E39F2B, 0xDB83ADF7 + ), array( + 0xE93D5A68, 0x948140F7, 0xF64C261C, 0x94692934, + 0x411520F7, 0x7602D4F7, 0xBCF46B2E, 0xD4A20068, + 0xD4082471, 0x3320F46A, 0x43B7D4B7, 0x500061AF, + 0x1E39F62E, 0x97244546, 0x14214F74, 0xBF8B8840, + 0x4D95FC1D, 0x96B591AF, 0x70F4DDD3, 0x66A02F45, + 0xBFBC09EC, 0x03BD9785, 0x7FAC6DD0, 0x31CB8504, + 0x96EB27B3, 0x55FD3941, 0xDA2547E6, 0xABCA0A9A, + 0x28507825, 0x530429F4, 0x0A2C86DA, 0xE9B66DFB, + 0x68DC1462, 0xD7486900, 0x680EC0A4, 0x27A18DEE, + 0x4F3FFEA2, 0xE887AD8C, 0xB58CE006, 0x7AF4D6B6, + 0xAACE1E7C, 0xD3375FEC, 0xCE78A399, 0x406B2A42, + 0x20FE9E35, 0xD9F385B9, 0xEE39D7AB, 0x3B124E8B, + 0x1DC9FAF7, 0x4B6D1856, 0x26A36631, 0xEAE397B2, + 0x3A6EFA74, 0xDD5B4332, 0x6841E7F7, 0xCA7820FB, + 0xFB0AF54E, 0xD8FEB397, 0x454056AC, 0xBA489527, + 0x55533A3A, 0x20838D87, 0xFE6BA9B7, 0xD096954B, + 0x55A867BC, 0xA1159A58, 0xCCA92963, 0x99E1DB33, + 0xA62A4A56, 0x3F3125F9, 0x5EF47E1C, 0x9029317C, + 0xFDF8E802, 0x04272F70, 0x80BB155C, 0x05282CE3, + 0x95C11548, 0xE4C66D22, 0x48C1133F, 0xC70F86DC, + 0x07F9C9EE, 0x41041F0F, 0x404779A4, 0x5D886E17, + 0x325F51EB, 0xD59BC0D1, 0xF2BCC18F, 0x41113564, + 0x257B7834, 0x602A9C60, 0xDFF8E8A3, 0x1F636C1B, + 0x0E12B4C2, 0x02E1329E, 0xAF664FD1, 0xCAD18115, + 0x6B2395E0, 0x333E92E1, 0x3B240B62, 0xEEBEB922, + 0x85B2A20E, 0xE6BA0D99, 0xDE720C8C, 0x2DA2F728, + 0xD0127845, 0x95B794FD, 0x647D0862, 0xE7CCF5F0, + 0x5449A36F, 0x877D48FA, 0xC39DFD27, 0xF33E8D1E, + 0x0A476341, 0x992EFF74, 0x3A6F6EAB, 0xF4F8FD37, + 0xA812DC60, 0xA1EBDDF8, 0x991BE14C, 0xDB6E6B0D, + 0xC67B5510, 0x6D672C37, 0x2765D43B, 0xDCD0E804, + 0xF1290DC7, 0xCC00FFA3, 0xB5390F92, 0x690FED0B, + 0x667B9FFB, 0xCEDB7D9C, 0xA091CF0B, 0xD9155EA3, + 0xBB132F88, 0x515BAD24, 0x7B9479BF, 0x763BD6EB, + 0x37392EB3, 0xCC115979, 0x8026E297, 0xF42E312D, + 0x6842ADA7, 0xC66A2B3B, 0x12754CCC, 0x782EF11C, + 0x6A124237, 0xB79251E7, 0x06A1BBE6, 0x4BFB6350, + 0x1A6B1018, 0x11CAEDFA, 0x3D25BDD8, 0xE2E1C3C9, + 0x44421659, 0x0A121386, 0xD90CEC6E, 0xD5ABEA2A, + 0x64AF674E, 0xDA86A85F, 0xBEBFE988, 0x64E4C3FE, + 0x9DBC8057, 0xF0F7C086, 0x60787BF8, 0x6003604D, + 0xD1FD8346, 0xF6381FB0, 0x7745AE04, 0xD736FCCC, + 0x83426B33, 0xF01EAB71, 0xB0804187, 0x3C005E5F, + 0x77A057BE, 0xBDE8AE24, 0x55464299, 0xBF582E61, + 0x4E58F48F, 0xF2DDFDA2, 0xF474EF38, 0x8789BDC2, + 0x5366F9C3, 0xC8B38E74, 0xB475F255, 0x46FCD9B9, + 0x7AEB2661, 0x8B1DDF84, 0x846A0E79, 0x915F95E2, + 0x466E598E, 0x20B45770, 0x8CD55591, 0xC902DE4C, + 0xB90BACE1, 0xBB8205D0, 0x11A86248, 0x7574A99E, + 0xB77F19B6, 0xE0A9DC09, 0x662D09A1, 0xC4324633, + 0xE85A1F02, 0x09F0BE8C, 0x4A99A025, 0x1D6EFE10, + 0x1AB93D1D, 0x0BA5A4DF, 0xA186F20F, 0x2868F169, + 0xDCB7DA83, 0x573906FE, 0xA1E2CE9B, 0x4FCD7F52, + 0x50115E01, 0xA70683FA, 0xA002B5C4, 0x0DE6D027, + 0x9AF88C27, 0x773F8641, 0xC3604C06, 0x61A806B5, + 0xF0177A28, 0xC0F586E0, 0x006058AA, 0x30DC7D62, + 0x11E69ED7, 0x2338EA63, 0x53C2DD94, 0xC2C21634, + 0xBBCBEE56, 0x90BCB6DE, 0xEBFC7DA1, 0xCE591D76, + 0x6F05E409, 0x4B7C0188, 0x39720A3D, 0x7C927C24, + 0x86E3725F, 0x724D9DB9, 0x1AC15BB4, 0xD39EB8FC, + 0xED545578, 0x08FCA5B5, 0xD83D7CD3, 0x4DAD0FC4, + 0x1E50EF5E, 0xB161E6F8, 0xA28514D9, 0x6C51133C, + 0x6FD5C7E7, 0x56E14EC4, 0x362ABFCE, 0xDDC6C837, + 0xD79A3234, 0x92638212, 0x670EFA8E, 0x406000E0 + ), array( + 0x3A39CE37, 0xD3FAF5CF, 0xABC27737, 0x5AC52D1B, + 0x5CB0679E, 0x4FA33742, 0xD3822740, 0x99BC9BBE, + 0xD5118E9D, 0xBF0F7315, 0xD62D1C7E, 0xC700C47B, + 0xB78C1B6B, 0x21A19045, 0xB26EB1BE, 0x6A366EB4, + 0x5748AB2F, 0xBC946E79, 0xC6A376D2, 0x6549C2C8, + 0x530FF8EE, 0x468DDE7D, 0xD5730A1D, 0x4CD04DC6, + 0x2939BBDB, 0xA9BA4650, 0xAC9526E8, 0xBE5EE304, + 0xA1FAD5F0, 0x6A2D519A, 0x63EF8CE2, 0x9A86EE22, + 0xC089C2B8, 0x43242EF6, 0xA51E03AA, 0x9CF2D0A4, + 0x83C061BA, 0x9BE96A4D, 0x8FE51550, 0xBA645BD6, + 0x2826A2F9, 0xA73A3AE1, 0x4BA99586, 0xEF5562E9, + 0xC72FEFD3, 0xF752F7DA, 0x3F046F69, 0x77FA0A59, + 0x80E4A915, 0x87B08601, 0x9B09E6AD, 0x3B3EE593, + 0xE990FD5A, 0x9E34D797, 0x2CF0B7D9, 0x022B8B51, + 0x96D5AC3A, 0x017DA67D, 0xD1CF3ED6, 0x7C7D2D28, + 0x1F9F25CF, 0xADF2B89B, 0x5AD6B472, 0x5A88F54C, + 0xE029AC71, 0xE019A5E6, 0x47B0ACFD, 0xED93FA9B, + 0xE8D3C48D, 0x283B57CC, 0xF8D56629, 0x79132E28, + 0x785F0191, 0xED756055, 0xF7960E44, 0xE3D35E8C, + 0x15056DD4, 0x88F46DBA, 0x03A16125, 0x0564F0BD, + 0xC3EB9E15, 0x3C9057A2, 0x97271AEC, 0xA93A072A, + 0x1B3F6D9B, 0x1E6321F5, 0xF59C66FB, 0x26DCF319, + 0x7533D928, 0xB155FDF5, 0x03563482, 0x8ABA3CBB, + 0x28517711, 0xC20AD9F8, 0xABCC5167, 0xCCAD925F, + 0x4DE81751, 0x3830DC8E, 0x379D5862, 0x9320F991, + 0xEA7A90C2, 0xFB3E7BCE, 0x5121CE64, 0x774FBE32, + 0xA8B6E37E, 0xC3293D46, 0x48DE5369, 0x6413E680, + 0xA2AE0810, 0xDD6DB224, 0x69852DFD, 0x09072166, + 0xB39A460A, 0x6445C0DD, 0x586CDECF, 0x1C20C8AE, + 0x5BBEF7DD, 0x1B588D40, 0xCCD2017F, 0x6BB4E3BB, + 0xDDA26A7E, 0x3A59FF45, 0x3E350A44, 0xBCB4CDD5, + 0x72EACEA8, 0xFA6484BB, 0x8D6612AE, 0xBF3C6F47, + 0xD29BE463, 0x542F5D9E, 0xAEC2771B, 0xF64E6370, + 0x740E0D8D, 0xE75B1357, 0xF8721671, 0xAF537D5D, + 0x4040CB08, 0x4EB4E2CC, 0x34D2466A, 0x0115AF84, + 0xE1B00428, 0x95983A1D, 0x06B89FB4, 0xCE6EA048, + 0x6F3F3B82, 0x3520AB82, 0x011A1D4B, 0x277227F8, + 0x611560B1, 0xE7933FDC, 0xBB3A792B, 0x344525BD, + 0xA08839E1, 0x51CE794B, 0x2F32C9B7, 0xA01FBAC9, + 0xE01CC87E, 0xBCC7D1F6, 0xCF0111C3, 0xA1E8AAC7, + 0x1A908749, 0xD44FBD9A, 0xD0DADECB, 0xD50ADA38, + 0x0339C32A, 0xC6913667, 0x8DF9317C, 0xE0B12B4F, + 0xF79E59B7, 0x43F5BB3A, 0xF2D519FF, 0x27D9459C, + 0xBF97222C, 0x15E6FC2A, 0x0F91FC71, 0x9B941525, + 0xFAE59361, 0xCEB69CEB, 0xC2A86459, 0x12BAA8D1, + 0xB6C1075E, 0xE3056A0C, 0x10D25065, 0xCB03A442, + 0xE0EC6E0E, 0x1698DB3B, 0x4C98A0BE, 0x3278E964, + 0x9F1F9532, 0xE0D392DF, 0xD3A0342B, 0x8971F21E, + 0x1B0A7441, 0x4BA3348C, 0xC5BE7120, 0xC37632D8, + 0xDF359F8D, 0x9B992F2E, 0xE60B6F47, 0x0FE3F11D, + 0xE54CDA54, 0x1EDAD891, 0xCE6279CF, 0xCD3E7E6F, + 0x1618B166, 0xFD2C1D05, 0x848FD2C5, 0xF6FB2299, + 0xF523F357, 0xA6327623, 0x93A83531, 0x56CCCD02, + 0xACF08162, 0x5A75EBB5, 0x6E163697, 0x88D273CC, + 0xDE966292, 0x81B949D0, 0x4C50901B, 0x71C65614, + 0xE6C6C7BD, 0x327A140A, 0x45E1D006, 0xC3F27B9A, + 0xC9AA53FD, 0x62A80F00, 0xBB25BFE2, 0x35BDD2F6, + 0x71126905, 0xB2040222, 0xB6CBCF7C, 0xCD769C2B, + 0x53113EC0, 0x1640E3D3, 0x38ABBD60, 0x2547ADF0, + 0xBA38209C, 0xF746CE76, 0x77AFA1C5, 0x20756060, + 0x85CBFE4E, 0x8AE88DD8, 0x7AAAF9B0, 0x4CF9AA7E, + 0x1948C25C, 0x02FB8A8C, 0x01C36AE4, 0xD6EBE1F9, + 0x90D4F869, 0xA65CDEA0, 0x3F09252D, 0xC208E69F, + 0xB74E6132, 0xCE77E25B, 0x578FDFE3, 0x3AC372E6 + ) + ); + + /** + * Constructor. + * + * @param string $key Encrpytion key. + */ + public function __construct($key) + { + $data = $datal = $datar = $k = 0; + $len = strlen($key); + + for ($i = 0; $i < 18; ++$i) { + $data = 0; + for ($j = 4; $j > 0; --$j) { + $data = $data << 8 | ord($key[$k]); + $k = ($k + 1) % $len; + } + $this->_P[$i] ^= $data; + } + + for ($i = 0; $i <= 16; $i += 2) { + $this->_encipher($datal, $datar); + $this->_P[$i] = $datal; + $this->_P[$i+1] = $datar; + } + + for ($i = 0; $i < 256; $i += 2) { + $this->_encipher($datal, $datar); + $this->_S[0][$i] = $datal; + $this->_S[0][$i+1] = $datar; + } + + for ($i = 0; $i < 256; $i += 2) { + $this->_encipher($datal, $datar); + $this->_S[1][$i] = $datal; + $this->_S[1][$i+1] = $datar; + } + + for ($i = 0; $i < 256; $i += 2) { + $this->_encipher($datal, $datar); + $this->_S[2][$i] = $datal; + $this->_S[2][$i+1] = $datar; + } + + for ($i = 0; $i < 256; $i += 2) { + $this->_encipher($datal, $datar); + $this->_S[3][$i] = $datal; + $this->_S[3][$i+1] = $datar; + } + + $this->md5 = hash('md5', $key); + } + + /** + */ + abstract public function encrypt($text, $iv); + + /** + */ + abstract public function decrypt($text, $iv); + + /** + * Workaround for XOR on certain systems. + * + * @param integer|float $l + * @param integer|float $r + * + * @return float + */ + protected function _binxor($l, $r) + { + $x = (($l < 0) ? (float)($l + 4294967296) : (float)$l) + ^ (($r < 0) ? (float)($r + 4294967296) : (float)$r); + + return (float)(($x < 0) ? $x + 4294967296 : $x); + } + + /** + * Enciphers a single 64-bit block. + * + * @param int &$Xl + * @param int &$Xr + */ + protected function _encipher(&$Xl, &$Xr) + { + if ($Xl < 0) { + $Xl += 4294967296; + } + + if ($Xr < 0) { + $Xr += 4294967296; + } + + for ($i = 0; $i < 16; ++$i) { + $temp = $Xl ^ $this->_P[$i]; + if ($temp < 0) { + $temp += 4294967296; + } + + $Xl = fmod((fmod($this->_S[0][($temp >> 24) & 255] + + $this->_S[1][($temp >> 16) & 255], 4294967296) + ^ $this->_S[2][($temp >> 8) & 255]) + + $this->_S[3][$temp & 255], 4294967296) ^ $Xr; + $Xr = $temp; + } + + $Xr = $this->_binxor($Xl, $this->_P[16]); + $Xl = $this->_binxor($temp, $this->_P[17]); + } + + /** + * Deciphers a single 64-bit block. + * + * @param int &$Xl + * @param int &$Xr + */ + protected function _decipher(&$Xl, &$Xr) + { + if ($Xl < 0) { + $Xl += 4294967296; + } + if ($Xr < 0) { + $Xr += 4294967296; + } + + for ($i = 17; $i > 1; --$i) { + $temp = $Xl ^ $this->_P[$i]; + if ($temp < 0) { + $temp += 4294967296; + } + + $Xl = fmod((fmod($this->_S[0][($temp >> 24) & 255] + + $this->_S[1][($temp >> 16) & 255], 4294967296) + ^ $this->_S[2][($temp >> 8) & 255]) + + $this->_S[3][$temp & 255], 4294967296) ^ $Xr; + $Xr = $temp; + } + + $Xr = $this->_binxor($Xl, $this->_P[1]); + $Xl = $this->_binxor($temp, $this->_P[0]); + } + +} diff --git a/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Crypt_Blowfish/Horde/Crypt/Blowfish/Php/Cbc.php b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Crypt_Blowfish/Horde/Crypt/Blowfish/Php/Cbc.php new file mode 100644 index 00000000..28443529 --- /dev/null +++ b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Crypt_Blowfish/Horde/Crypt/Blowfish/Php/Cbc.php @@ -0,0 +1,73 @@ + + * Copyright 2008 Philippe Jausions + * Copyright 2012-2017 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. + * + * @author Matthew Fonda + * @author Philippe Jausions + * @author Michael Slusarz + * @category Horde + * @license http://www.horde.org/licenses/lgpl21 LGPL 2.1 + * @package Crypt_Blowfish + */ + +/** + * PHP implementation of the Blowfish algorithm in CBC mode. + * + * @author Matthew Fonda + * @author Philippe Jausions + * @author Michael Slusarz + * @category Horde + * @copyright 2005-2008 Matthew Fonda + * @copyright 2008 Philippe Jausions + * @copyright 2012-2017 Horde LLC + * @license http://www.horde.org/licenses/lgpl21 LGPL 2.1 + * @package Crypt_Blowfish + */ +class Horde_Crypt_Blowfish_Php_Cbc extends Horde_Crypt_Blowfish_Php_Base +{ + /** + */ + public function encrypt($text, $iv) + { + $cipherText = ''; + $len = strlen($text); + + list(, $Xl, $Xr) = unpack('N2', substr($text, 0, 8) ^ $iv); + $this->_encipher($Xl, $Xr); + $cipherText .= pack('N2', $Xl, $Xr); + + for ($i = 8; $i < $len; $i += 8) { + list(, $Xl, $Xr) = unpack('N2', substr($text, $i, 8) ^ substr($cipherText, $i - 8, 8)); + $this->_encipher($Xl, $Xr); + $cipherText .= pack('N2', $Xl, $Xr); + } + + return $cipherText; + } + + /** + */ + public function decrypt($text, $iv) + { + $plainText = ''; + $len = strlen($text); + + list(, $Xl, $Xr) = unpack('N2', substr($text, 0, 8)); + $this->_decipher($Xl, $Xr); + $plainText .= (pack('N2', $Xl, $Xr) ^ $iv); + + for ($i = 8; $i < $len; $i += 8) { + list(, $Xl, $Xr) = unpack('N2', substr($text, $i, 8)); + $this->_decipher($Xl, $Xr); + $plainText .= (pack('N2', $Xl, $Xr) ^ substr($text, $i - 8, 8)); + } + + return $plainText; + } + +} diff --git a/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Crypt_Blowfish/Horde/Crypt/Blowfish/Php/Ecb.php b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Crypt_Blowfish/Horde/Crypt/Blowfish/Php/Ecb.php new file mode 100644 index 00000000..35c708db --- /dev/null +++ b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Crypt_Blowfish/Horde/Crypt/Blowfish/Php/Ecb.php @@ -0,0 +1,65 @@ + + * Copyright 2008 Philippe Jausions + * Copyright 2012-2017 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. + * + * @author Matthew Fonda + * @author Philippe Jausions + * @author Michael Slusarz + * @category Horde + * @license http://www.horde.org/licenses/lgpl21 LGPL 2.1 + * @package Crypt_Blowfish + */ + +/** + * PHP implementation of the Blowfish algorithm in ECB mode. + * + * @author Matthew Fonda + * @author Philippe Jausions + * @author Michael Slusarz + * @category Horde + * @copyright 2005-2008 Matthew Fonda + * @copyright 2008 Philippe Jausions + * @copyright 2012-2017 Horde LLC + * @license http://www.horde.org/licenses/lgpl21 LGPL 2.1 + * @package Crypt_Blowfish + */ +class Horde_Crypt_Blowfish_Php_Ecb extends Horde_Crypt_Blowfish_Php_Base +{ + /** + */ + public function encrypt($text, $iv) + { + $cipherText = ''; + $len = strlen($text); + + for ($i = 0; $i < $len; $i += 8) { + list(, $Xl, $Xr) = unpack('N2', substr($text, $i, 8)); + $this->_encipher($Xl, $Xr); + $cipherText .= pack('N2', $Xl, $Xr); + } + + return $cipherText; + } + + /** + */ + public function decrypt($text, $iv) + { + $plainText = ''; + $len = strlen($text); + + for ($i = 0; $i < $len; $i += 8) { + list(, $Xl, $Xr) = unpack('N2', substr($text, $i, 8)); + $this->_decipher($Xl, $Xr); + $plainText .= pack('N2', $Xl, $Xr); + } + + return $plainText; + } + +} diff --git a/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Exception/Horde/Exception.php b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Exception/Horde/Exception.php new file mode 100644 index 00000000..f8f60c2d --- /dev/null +++ b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Exception/Horde/Exception.php @@ -0,0 +1,64 @@ +_logLevel; + } + + /** + * Sets the log level. + * + * @param mixed $level The log level. + */ + public function setLogLevel($level = 0) + { + if (is_string($level)) { + $level = defined('Horde_Log::' . $level) + ? constant('Horde_Log::' . $level) + : 0; + } + + $this->_logLevel = $level; + } + +} diff --git a/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Exception/Horde/Exception/LastError.php b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Exception/Horde/Exception/LastError.php new file mode 100644 index 00000000..aab84f0e --- /dev/null +++ b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Exception/Horde/Exception/LastError.php @@ -0,0 +1,45 @@ +file = $code_or_lasterror['file']; + $this->line = $code_or_lasterror['line']; + } else { + parent::__construct($message, $code_or_lasterror); + } + } + +} diff --git a/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Exception/Horde/Exception/NotFound.php b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Exception/Horde/Exception/NotFound.php new file mode 100644 index 00000000..cee88cfa --- /dev/null +++ b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Exception/Horde/Exception/NotFound.php @@ -0,0 +1,31 @@ +getMessage(), $error->getCode()); + $this->details = $this->_getPearTrace($error); + } + + /** + * Return a trace for the PEAR error. + * + * @param PEAR_Error $error The PEAR error. + * + * @return string The backtrace as a string. + */ + private function _getPearTrace(PEAR_Error $error) + { + $pear_error = ''; + $backtrace = $error->getBacktrace(); + if (!empty($backtrace)) { + $pear_error .= 'PEAR backtrace:' . "\n\n"; + foreach ($backtrace as $frame) { + $pear_error .= + (isset($frame['class']) ? $frame['class'] : '') + . (isset($frame['type']) ? $frame['type'] : '') + . (isset($frame['function']) ? $frame['function'] : 'unkown') . ' ' + . (isset($frame['file']) ? $frame['file'] : 'unkown') . ':' + . (isset($frame['line']) ? $frame['line'] : 'unkown') . "\n"; + } + } + $userinfo = $error->getUserInfo(); + if (!empty($userinfo)) { + $pear_error .= "\n" . 'PEAR user info:' . "\n\n"; + if (is_string($userinfo)) { + $pear_error .= $userinfo; + } else { + $pear_error .= print_r($userinfo, true); + } + } + return $pear_error; + } + + /** + * Exception handling. + * + * @param mixed $result The result to be checked for a PEAR_Error. + * + * @return mixed Returns the original result if it was no PEAR_Error. + * + * @throws Horde_Exception_Pear In case the result was a PEAR_Error. + */ + public static function catchError($result) + { + if ($result instanceof PEAR_Error) { + throw new self::$_class($result); + } + return $result; + } +} diff --git a/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Exception/Horde/Exception/PermissionDenied.php b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Exception/Horde/Exception/PermissionDenied.php new file mode 100644 index 00000000..2f5b0416 --- /dev/null +++ b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Exception/Horde/Exception/PermissionDenied.php @@ -0,0 +1,31 @@ + + * @package Exception + */ +class Horde_Exception_Translation extends Horde_Translation_Autodetect +{ + /** + * The translation domain + * + * @var string + */ + protected static $_domain = 'Horde_Exception'; + + /** + * The absolute PEAR path to the translations for the default gettext handler. + * + * @var string + */ + protected static $_pearDirectory = '/daten/dev/lam/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Exception/data'; +} diff --git a/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Exception/Horde/Exception/Wrapped.php b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Exception/Horde/Exception/Wrapped.php new file mode 100644 index 00000000..7143c8f9 --- /dev/null +++ b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Exception/Horde/Exception/Wrapped.php @@ -0,0 +1,46 @@ +getCode(); + } + if ($message instanceof Exception) { + $previous = $message; + } + if (method_exists($message, 'getUserinfo') && + $details = $message->getUserinfo()) { + $this->details = $details; + } elseif (!empty($message->details)) { + $this->details = $message->details; + } + $message = (string)$message->getMessage(); + } + + parent::__construct($message, $code, $previous); + } +} diff --git a/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Exception/data/locale/Horde_Exception.pot b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Exception/data/locale/Horde_Exception.pot new file mode 100644 index 00000000..901041dc --- /dev/null +++ b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Exception/data/locale/Horde_Exception.pot @@ -0,0 +1,26 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR Horde LLC (http://www.horde.org/) +# This file is distributed under the same license as the Horde_Exception package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Horde_Exception \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/Exception/NotFound.php:27 +msgid "Not Found" +msgstr "" + +#: lib/Horde/Exception/PermissionDenied.php:27 +msgid "Permission Denied" +msgstr "" diff --git a/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Exception/data/locale/ar/LC_MESSAGES/Horde_Exception.mo b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Exception/data/locale/ar/LC_MESSAGES/Horde_Exception.mo new file mode 100644 index 0000000000000000000000000000000000000000..71938c4918c093615e440aa24ab5caf931695704 GIT binary patch literal 384 zcmaKnF;BxV5QU3i%E-*%feo%WVIUYG0i_j{T2WPj6`AC4jZ!q&Qq9|Ii1MEuJeF1=MK_9yOs7h0GM=De|<9@396u7Y&H3y#C=bG&F|N`ZFj<;!@x03Hq*}Z+8|V@*GkyD zbbs2-r}Odtm-$d;Bku?uC+s?|O1PzquGQAvhq&Qq9|Ii1MEuJeF1=MK_9yOs7h0GM=De|<9@396u7Y&H3y#C=bG&F|N`ZFj<;!@x03Hq*}Z+8|V@*GkyD zbbs2-r}Odtm-$d;Bku?uC+s?|O1PzquGQAvhq&Qq9|Ii1MEuJeF1=MK_9yOs7h0GM=De|<9@396u7Y&H3y#C=bG&F|N`ZFj<;!@x03Hq*}Z+8|V@*GkyD zbbs2-r}Odtm-$d;Bku?uC+s?|O1PzquGQAvhvaF_ckNBWH#jjHSw@L_e8>97( z-GZ~AvoiQMsF9B}e}a&1B)juL!}DNOLyL5fPoebz`6L>v`OU&aUU|thEUy|HF?MFj z-|@lZ<$cBb0aQxkw+cbBt|$agamqv?yJttDD+C$&6qYvC``0&C5qTAqi;Y4bB)eXq zpVRxbYMM1O;2=;LosX3>3uS;;pyraQ1~)75DqycQ5-S9HXw?5vb7o|QA9>|j`z~{``0%T*0J0O zWozNI;jrI2J)!ptQP)$bP@$nVWjGS5YDI-CM={|b@74{p7wg;aegZiTVv(u@3v^?rSRk{dK^s0v+5RdMKDOBZH!YedbCw3%2As`)zF zbfXX7VY;l+G+u#Sh=9Yg+DQ{wS^~A5Zu(?Q$)q0!+1vB$i*;=Sy2R$~8CCEJ^M;b$ literal 0 HcmV?d00001 diff --git a/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Exception/data/locale/cs/LC_MESSAGES/Horde_Exception.po b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Exception/data/locale/cs/LC_MESSAGES/Horde_Exception.po new file mode 100644 index 00000000..9650a891 --- /dev/null +++ b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Exception/data/locale/cs/LC_MESSAGES/Horde_Exception.po @@ -0,0 +1,26 @@ +# Czech translations for Horde_Exception module. +# Copyright 2010-2016 Horde LLC (http://www.horde.org/) +# This file is distributed under the same license as the Horde_Exception module. +# Automatically generated, 2010. +# +msgid "" +msgstr "" +"Project-Id-Version: Horde_Exception\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/Exception/NotFound.php:32 +#, fuzzy +msgid "Not Found" +msgstr "Nenalezeno." + +#: lib/Horde/Exception/PermissionDenied.php:32 +msgid "Permission Denied" +msgstr "Přístup odepřen" diff --git a/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Exception/data/locale/da/LC_MESSAGES/Horde_Exception.mo b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Exception/data/locale/da/LC_MESSAGES/Horde_Exception.mo new file mode 100644 index 0000000000000000000000000000000000000000..2c7c20999be2fdfa3ba2777392e58a1713857044 GIT binary patch literal 552 zcmZXR&rTaL5XQIv4s1_F>aBfS=H^wBTyuWU zY`spBZO$J#v)l%k?S1Xymy0lRYg;BW@+%#Jb{3AvYGTE^|1^&{F7YqS$_Mf<{=_o z#&5Mz+V)|-P(Dx`{3%A*+xVIu&&lJ^&RxkZO6Z;Gn9j`FD}y8FS3!cU+hrK!eRwJd iUo3ncfcV-^lksv%aL)fkF)6e$sw5K#?EPI8S$YJS@|)BE literal 0 HcmV?d00001 diff --git a/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Exception/data/locale/da/LC_MESSAGES/Horde_Exception.po b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Exception/data/locale/da/LC_MESSAGES/Horde_Exception.po new file mode 100644 index 00000000..5c6c14e2 --- /dev/null +++ b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Exception/data/locale/da/LC_MESSAGES/Horde_Exception.po @@ -0,0 +1,26 @@ +# Danish translations for Horde_Exception package. +# Copyright (C) 2014 Horde LLC (http://www.horde.org/) +# This file is distributed under the same license as the Horde_Exception package. +# Erling Preben Hansen , 2013-2014. +# +msgid "" +msgstr "" +"Project-Id-Version: Horde_Exception\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-19 21:04+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/Exception/NotFound.php:27 +msgid "Not Found" +msgstr "Ikke fundet" + +#: lib/Horde/Exception/PermissionDenied.php:27 +msgid "Permission Denied" +msgstr "Tilladelse nægtet" diff --git a/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Exception/data/locale/de/LC_MESSAGES/Horde_Exception.mo b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Exception/data/locale/de/LC_MESSAGES/Horde_Exception.mo new file mode 100644 index 0000000000000000000000000000000000000000..8001cefb8ad41f30ee16576300be380e0d96d391 GIT binary patch literal 540 zcmZXR!EO^V5Qbd}hwcH1o_iQ>AmnttRBhxa63`~1Qd6R8%Yh4ZcPEZvW3R^E&`R(a zydDqIQ)h!v4vhS1X6)ad8Trrt)8B$^mpNdLm}krd)7uTR#~9`X^PTy*Bg8NE&zT2~ z_u20~5rV^wakzPJlU#-b)6n@^%#l_uMi)Gsp?AnT6ux1V*TJ& zHt|Mwg>9fDXVJP^e&}qJWzbOL`d#B7rSq{>x6gdux*UUk&<`>Y=fBI literal 0 HcmV?d00001 diff --git a/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Exception/data/locale/de/LC_MESSAGES/Horde_Exception.po b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Exception/data/locale/de/LC_MESSAGES/Horde_Exception.po new file mode 100644 index 00000000..22bd92d7 --- /dev/null +++ b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Exception/data/locale/de/LC_MESSAGES/Horde_Exception.po @@ -0,0 +1,26 @@ +# German translations for Horde_Exception module. +# Copyright 2010-2016 Horde LLC (http://www.horde.org/) +# This file is distributed under the same license as the Horde_Exception module. +# Automatically generated, 2010. +# +msgid "" +msgstr "" +"Project-Id-Version: Horde_Exception\n" +"Report-Msgid-Bugs-To: dev@lists.horde.org\n" +"POT-Creation-Date: 2011-02-02 16:17+0100\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/Exception/NotFound.php:27 +msgid "Not Found" +msgstr "Nicht gefunden" + +#: lib/Horde/Exception/PermissionDenied.php:27 +msgid "Permission Denied" +msgstr "Zugriff verweigert" diff --git a/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Exception/data/locale/el/LC_MESSAGES/Horde_Exception.mo b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Exception/data/locale/el/LC_MESSAGES/Horde_Exception.mo new file mode 100644 index 0000000000000000000000000000000000000000..3649388d7eb575aa6ce8bad692a88aaae918a9e6 GIT binary patch literal 613 zcmZXP&yLeD5XQs51G$03jl=8>gdCCpYUNV2u-n2)EmW(3xPeKAte4b|YM*C9Ew1^f%67D3zHVM2S)yBWPL=e29e1X_F83c@Shcd~_pmKTNvbnDv4E0PE!351zS}V1JZB!CTF?t_!$94+# z2u-`g;hr`HJ{cV5SUVEJU97cnY-~$eusgHTvP^R*@L;o&*4b#U^+(#2;p9QawhW5) z7~2*OIiztCvvysBIN@pMN}R?q8QCr#$o9Rp??&s3Q%F)CcUQiVu#RO$C|e1q4Tsyx zX(cU;lm|FdMS&+Sd;C91R<&To+Q69J3n$ggh>8uhnOY92UbeQM z_Fz@^FDcmQLvp!yJSYdO!pH0`Dm1HKPBa$MK@xSMBn\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" +"Language: el\n" +"X-Generator: Poedit 1.7.1\n" + +#: lib/Horde/Exception/NotFound.php:32 +msgid "Not Found" +msgstr "Δεν Υπάρχει" + +#: lib/Horde/Exception/PermissionDenied.php:32 +msgid "Permission Denied" +msgstr "Δεν υπάρχουν δικαιώματα" diff --git a/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Exception/data/locale/es/LC_MESSAGES/Horde_Exception.mo b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Exception/data/locale/es/LC_MESSAGES/Horde_Exception.mo new file mode 100644 index 0000000000000000000000000000000000000000..b43eaf6179a52d52fc05967e9647ac8788d810ba GIT binary patch literal 586 zcmZXR&2H2%5XZyUfk;TenZs}cEe>&t%Hr*!rQ2Om)GezjaE0k+nz|%*WINUNz+>tP zNglF)!=BTFaX9oF7N<7A()OlG*5q34y|xC9$Y|n>vsbhU;hlvY7S*Rw|Z;IqqEkXcu!>yM?FJHl8ejxdmdBA128rI4>d z7HV%i%4MFjP@K`VjtA~^dm`T#QgVqZ_D6Zax)bz4ln#w=Fj%Kxg{G$l))~CJ!3N== z#pq|fp>0O~?F;zOqk(w_hYgyIg@dcj`4G)6bk=um6meTq_gIrC30nnPj?I6w{L?5P zpRSHqi`@&!EKldw1TuWNn~tXpv<)x22DO>M<`SK!F#S|6#dxQSLtKy(3%*sQO|4*j zu0y(RdWVfzTGx67rW=-iT1?, 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/Exception/NotFound.php:27 +msgid "Not Found" +msgstr "No encontrado" + +#: lib/Horde/Exception/PermissionDenied.php:27 +msgid "Permission Denied" +msgstr "Permiso denegado" diff --git a/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Exception/data/locale/et/LC_MESSAGES/Horde_Exception.mo b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Exception/data/locale/et/LC_MESSAGES/Horde_Exception.mo new file mode 100644 index 0000000000000000000000000000000000000000..2efb015d3dbc6ef57ade23154140d8b562097744 GIT binary patch literal 543 zcmZXQ&raMh5QkG*4&(+BHx9#%s&a^<3KlP0QTC5mv|Cn7;0k6l1Vh%2YzM)CLm#4V zz?<+MeU)~+Rka63`IMh0U*d6oZ+!X{QGFz~h_A#dF(N`;6KjMd)`a2yy`#A zu=do5r&t^7+1Qn;V8>1ASZ)Lq_;^$)=Us9a{KVKYo}A^ZYf*;RSWkKskfofnG@}dn zp5XgmQl6$HvMD~Qu;0>4Sx^rk?XDvRkyQuV<#9Q3SMZl#eG>V`aq##?GApT`!idleOVr?CfaR?g0PXj-$SU Z5h~vl(P`7rkF4Kb-(DR&AkvYk`xjr(nXmu= literal 0 HcmV?d00001 diff --git a/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Exception/data/locale/et/LC_MESSAGES/Horde_Exception.po b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Exception/data/locale/et/LC_MESSAGES/Horde_Exception.po new file mode 100644 index 00000000..a205f9d6 --- /dev/null +++ b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Exception/data/locale/et/LC_MESSAGES/Horde_Exception.po @@ -0,0 +1,26 @@ +# Estonian translations for Horde_Exception module. +# Copyright 2010-2016 Horde LLC (http://www.horde.org/) +# This file is distributed under the same license as the Horde_Exception module. +# Automatically generated, 2010. +# +msgid "" +msgstr "" +"Project-Id-Version: Horde_Exception\n" +"Report-Msgid-Bugs-To: dev@lists.horde.org\n" +"POT-Creation-Date: 2011-02-02 16:17+0100\n" +"PO-Revision-Date: 2010-11-09 01:27+0200\n" +"Last-Translator: Alar Sing \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/Exception/NotFound.php:27 +msgid "Not Found" +msgstr "Ei Leitud" + +#: lib/Horde/Exception/PermissionDenied.php:27 +msgid "Permission Denied" +msgstr "Juurdepääs keelatud" diff --git a/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Exception/data/locale/eu/LC_MESSAGES/Horde_Exception.mo b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Exception/data/locale/eu/LC_MESSAGES/Horde_Exception.mo new file mode 100644 index 0000000000000000000000000000000000000000..2fc67250fdae15ac5cfab892fa4541a49583572b GIT binary patch literal 602 zcmZXQ&5qMR49COQfk;TenS;53(1fIm*lJ4As=KK+QVZ28i@1T?m~=MjOqh>lLE{+M(Z6nA^Tswgm_sj^TWSn zNgAIT?Md@Y-#cE;(~W=GwW#z2He0lg{PeP%i}69%&;Et1$o0llO4ky`Yvtor8!WbB zZtTuU(A^Na>1YD`Di)s8em KXwV0~i2ecrMy;O! literal 0 HcmV?d00001 diff --git a/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Exception/data/locale/eu/LC_MESSAGES/Horde_Exception.po b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Exception/data/locale/eu/LC_MESSAGES/Horde_Exception.po new file mode 100644 index 00000000..d2900baa --- /dev/null +++ b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Exception/data/locale/eu/LC_MESSAGES/Horde_Exception.po @@ -0,0 +1,27 @@ +# Basque translations for Horde_Exception module. +# Copyright 2010-2016 Horde LLC (http://www.horde.org/) +# This file is distributed under the same license as the Horde_Exception module. +# Automatically generated, 2010. +# +msgid "" +msgstr "" +"Project-Id-Version: Horde_Exception\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-16 10:17+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/Exception/NotFound.php:27 +msgid "Not Found" +msgstr "Ez da aurkitu" + +#: lib/Horde/Exception/PermissionDenied.php:27 +msgid "Permission Denied" +msgstr "Baimena ukatu da" diff --git a/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Exception/data/locale/fa/LC_MESSAGES/Horde_Exception.mo b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Exception/data/locale/fa/LC_MESSAGES/Horde_Exception.mo new file mode 100644 index 0000000000000000000000000000000000000000..71938c4918c093615e440aa24ab5caf931695704 GIT binary patch literal 384 zcmaKnF;BxV5QU3i%E-*%feo%WVIUYG0i_j{T2WPj6`AC4jZ!q&Qq9|Ii1MEuJeF1=MK_9yOs7h0GM=De|<9@396u7Y&H3y#C=bG&F|N`ZFj<;!@x03Hq*}Z+8|V@*GkyD zbbs2-r}Odtm-$d;Bku?uC+s?|O1PzquGQAvh4T-~W162;YA*GSipo%t8E0Pjb3s*4N$;Rzwys~Gj?xC;1 zjW^&K`T}{6K1*lAAyP;FX+He7XYBjk=YJ!yXTlqyC%h0QLTkT-mx2*q30K0OCsA}O zey8PW6zz(CEndnSlW=q2COLNuV^>oi&CsuG2-XptAX$`(cb7P4b(X6i=-V9)r_Sg2 zb96Juilq==VC6ikX((*2zSKofnbVNt^-*a9ht9IqcbqTc*|$s`do=Aabz&Gbbdxky zNmmx6pLBY#m!wG|LUn=Hw(YmoiRhzB4j|pv$-eIO_L8nhCnm7UyrEDUc3#5-kqn%o zB?pJ4wNxL~Y&r}3S+rEtra+aUS!ozsA{&-)XwyDD9(JqNu(0v;Y&zP0LE1^;V@Hf6 zy_-tj!Fa, 2010-2012. +# +msgid "" +msgstr "" +"Project-Id-Version: Horde_Exception\n" +"Report-Msgid-Bugs-To: dev@lists.horde.org\n" +"POT-Creation-Date: 2011-02-02 16:17+0100\n" +"PO-Revision-Date: 2012-03-07 15:05:44+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/Exception/NotFound.php:27 +msgid "Not Found" +msgstr "Ei löytynyt" + +#: lib/Horde/Exception/PermissionDenied.php:27 +msgid "Permission Denied" +msgstr "Käyttö kielletty" diff --git a/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Exception/data/locale/fr/LC_MESSAGES/Horde_Exception.mo b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Exception/data/locale/fr/LC_MESSAGES/Horde_Exception.mo new file mode 100644 index 0000000000000000000000000000000000000000..a97661646626e97ae7756d612fb5f47ec58ae74f GIT binary patch literal 613 zcmZ9J&2AGh5XYCV1KSfw+&IjU3VB(lK}1ed719JMC2dqK6*q8qCmXjLdo}h(r4o<9 zL-aW+UV~?0c5{ftNI#7|{*OH~{`>Oj?}+UQ^P1^1&zKq0+7ISAqnQ`X4fE$w6#Zhq z$BZ9G(JS`n>^a;SFT4A?&6x`@b&V~e1=8AhZ=8h_v<5js?i%wTP785~)Sf8#;;6vy zliM8Y&`RSAtQ`e0_oXSsr>68Ga|#OF99PB%pRC%1#8DY9&NDG4)NP(P(E%0oQrQ!! z6!HVeo;n!3O=X(0P+Z`~v=8od2c51DQmXg;t!}1$5E*IfD;*puSm>tW;^DF~SR%n; z&4GmL-E0HLYiCUplE#{ixT^DtTXr@iOFD{Y+LnzjQDmss3Z{fMU%{b~1N(m`JF$W# z#q-noWH%t0r16+9Ma#AQthvd6x8Yq~X=8_wuQYiKqp#Ui40gJu&2uy&-Iuqc;|gK<*FYZ{jmrr0p1H?nYPU4nZdUI6C8B3gnv2 V!+rFz;W-)KeE|?&V|cj7=pUiovrPa1 literal 0 HcmV?d00001 diff --git a/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Exception/data/locale/fr/LC_MESSAGES/Horde_Exception.po b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Exception/data/locale/fr/LC_MESSAGES/Horde_Exception.po new file mode 100644 index 00000000..13b4f42a --- /dev/null +++ b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Exception/data/locale/fr/LC_MESSAGES/Horde_Exception.po @@ -0,0 +1,28 @@ +# French translations for Horde_Exception module. +# Copyright 2010-2016 Horde LLC (http://www.horde.org/) +# This file is distributed under the same license as the Horde_Exception module. +# Automatically generated, 2010. +# Paul De Vlieger , 2013 +msgid "" +msgstr "" +"Project-Id-Version: Horde_Exception \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-14 11:54+0100\n" +"Last-Translator: Paul De Vlieger \n" +"Language-Team: French \n" +"Language: fr\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/Exception/NotFound.php:27 +msgid "Not Found" +msgstr "Non trouvé" + +#: lib/Horde/Exception/PermissionDenied.php:27 +msgid "Permission Denied" +msgstr "Autorisation rejetée" diff --git a/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Exception/data/locale/gl/LC_MESSAGES/Horde_Exception.mo b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Exception/data/locale/gl/LC_MESSAGES/Horde_Exception.mo new file mode 100644 index 0000000000000000000000000000000000000000..71938c4918c093615e440aa24ab5caf931695704 GIT binary patch literal 384 zcmaKnF;BxV5QU3i%E-*%feo%WVIUYG0i_j{T2WPj6`AC4jZ!q&Qq9|Ii1MEuJeF1=MK_9yOs7h0GM=De|<9@396u7Y&H3y#C=bG&F|N`ZFj<;!@x03Hq*}Z+8|V@*GkyD zbbs2-r}Odtm-$d;Bku?uC+s?|O1PzquGQAvhFHn z!ZMy;p0b=VG}1Y&RP6V!Zz6o4l@rEm5v=3nrVDn7@7F@>4Uu5LVVfqI2qQZofmR@v zoT#iYf6`6I)8Y1)S;~@uH31BE*t8fmz&f0_S}4;e^+Grgp?s`HwAlJ$l2>qaXlmOi nBRMHvR7hsJb3)URbxY5QX}`C=%=_eLSsoj5Sd#3dpY*-}wfcM% literal 0 HcmV?d00001 diff --git a/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Exception/data/locale/he/LC_MESSAGES/Horde_Exception.po b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Exception/data/locale/he/LC_MESSAGES/Horde_Exception.po new file mode 100644 index 00000000..3f5e3f18 --- /dev/null +++ b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Exception/data/locale/he/LC_MESSAGES/Horde_Exception.po @@ -0,0 +1,25 @@ +# Hebrew translations for Horde_Exception module. +# Copyright 2010-2016 Horde LLC (http://www.horde.org/) +# This file is distributed under the same license as the Horde_Exception module. +# Automatically generated, 2010. +# +msgid "" +msgstr "" +"Project-Id-Version: Horde_Exception\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/Exception/NotFound.php:32 +msgid "Not Found" +msgstr "" + +#: lib/Horde/Exception/PermissionDenied.php:32 +msgid "Permission Denied" +msgstr "" diff --git a/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Exception/data/locale/hr/LC_MESSAGES/Horde_Exception.mo b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Exception/data/locale/hr/LC_MESSAGES/Horde_Exception.mo new file mode 100644 index 0000000000000000000000000000000000000000..5339aa0eb4ddec0b1e100390ffca46f92db03dff GIT binary patch literal 632 zcmZXR-EPw`6vxBY1-U_R&Bft@iD`1MLj@&m#-MA(q_tF4sJH_!IZHfJJF=Z=NaG>6 z;Ei|+E_fDBQdL93%1`I(|Bs#c&!f9P16p^8$HaiRN1PJf`a;|%B=L~=O8mYR1m7t> zAU@sR#)=}f`$cL0zP?x(4>Qy1B3Po`DCd;XaEw|Zb*#C-+_RH{tlxAzR_4>h}9r*GY$+Zt(hm$D})z&a=!)?P}?bO<*l+)Lv;=t3u^4-qlfG zA5Gq_7U-kO9+Fj;tt^pcC^rcxG1UK^cc)39vf=z>KE3$~BI4o1XivMb>{~-$;_=Eq zZ)&OZ2=Yo=hd%w7&Diip*B$g6Et~4x6iSx~49}Dgmvw7p&1S}KTmri3OP9VF!8T2w z>8FCHservb=u-Y96$0J>2a;2Ln8v%&I309p@8Dy>;re=OAr0Rrk04LHKMI3|x, 2011. +# +msgid "" +msgstr "" +"Project-Id-Version: Horde_Exception\n" +"Report-Msgid-Bugs-To: dev@lists.horde.org\n" +"POT-Creation-Date: 2011-02-02 16:17+0100\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/Exception/NotFound.php:27 +msgid "Not Found" +msgstr "Nije pronađeno" + +#: lib/Horde/Exception/PermissionDenied.php:27 +msgid "Permission Denied" +msgstr "Pristup odbijen" diff --git a/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Exception/data/locale/hu/LC_MESSAGES/Horde_Exception.mo b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Exception/data/locale/hu/LC_MESSAGES/Horde_Exception.mo new file mode 100644 index 0000000000000000000000000000000000000000..be2e4faa81c93d48a849f9d37eb59af9cac3fdbf GIT binary patch literal 561 zcmZXP&2G~`5Xa4z1im0R^}u1cfvOE&H>lBuphBC_N==C>!xe^jVsEi`t=)B0D)9o` zd4L{!<`MiJJPYF>lmjFEG#~q)otfW{@BWO~?l4c7A#;y8WqSL}JYbM{#C&Cb+=`;_ z>>o1sZ%5G%`yKXN-WZ3Q|2D~)4KTB<$)g3iT6?dpfg>`SxZ>;uErU48#Yb}ei-Ke8 za{4sATv8KyX?#wNbwSL1p>y%JExgFAf}GX|mG;38%D!P>T@f$dXX4Ni_I=_A11U%o znTkXTxeqc`d!yY%CJ770Ijwa+aH|`NWM9Z3NU8Q-?j|YgPSFREIW)e)V4Z?DCU@xJ z9ah%EtD<*!U?^y_vaTMK?Q8BaMT-TAjIdUq<;eWE=s%5uvW@2_^Xc|{IY{C|YXTXb z{H@^=0$qj|O@-QwVOgT{6eb_CnHX(#{e~-YVrrH)*QQV~`l3U;s9J}WnDJ^}foV3W ypQK~>8%~}Xcsc?3d>lt-R71e3yRJ$M-LL4_UR`z9tM0~iHy&y#0v4FBG5Q0Sj-pop literal 0 HcmV?d00001 diff --git a/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Exception/data/locale/hu/LC_MESSAGES/Horde_Exception.po b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Exception/data/locale/hu/LC_MESSAGES/Horde_Exception.po new file mode 100644 index 00000000..a70e67be --- /dev/null +++ b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Exception/data/locale/hu/LC_MESSAGES/Horde_Exception.po @@ -0,0 +1,25 @@ +# Hungarian translations for Horde_Exception module. +# Copyright 2010-2013 Horde LLC (http://www.horde.org/) +# This file is distributed under the same license as the Horde_Exception module. +# +msgid "" +msgstr "" +"Project-Id-Version: Horde_Exception \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/Exception/NotFound.php:27 +msgid "Not Found" +msgstr "Nem található" + +#: lib/Horde/Exception/PermissionDenied.php:27 +msgid "Permission Denied" +msgstr "Hozzáférés megtagadva" diff --git a/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Exception/data/locale/id/LC_MESSAGES/Horde_Exception.mo b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Exception/data/locale/id/LC_MESSAGES/Horde_Exception.mo new file mode 100644 index 0000000000000000000000000000000000000000..70543261679e1689424e0934e4f6be3fd21b28a6 GIT binary patch literal 384 zcmaKnu};G<6h(_*%E-*%fejp-Fc6H8D4~c*ji^e*icIowjZ!!t9lsxS;Ej{4gUwxU0)})I{i*XhSv)tq^q}Gxe^3aL`hLeWSnw3nC39uPlvTC&#U>x%`OLPiGgeDh Iyc(^b literal 0 HcmV?d00001 diff --git a/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Exception/data/locale/id/LC_MESSAGES/Horde_Exception.po b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Exception/data/locale/id/LC_MESSAGES/Horde_Exception.po new file mode 100644 index 00000000..49f6c34a --- /dev/null +++ b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Exception/data/locale/id/LC_MESSAGES/Horde_Exception.po @@ -0,0 +1,25 @@ +# Indonesian translations for Horde_Exception module. +# Copyright 2010-2016 Horde LLC (http://www.horde.org/) +# This file is distributed under the same license as the Horde_Exception module. +# Automatically generated, 2010. +# +msgid "" +msgstr "" +"Project-Id-Version: Horde_Exception\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/Exception/NotFound.php:32 +msgid "Not Found" +msgstr "" + +#: lib/Horde/Exception/PermissionDenied.php:32 +#, fuzzy +msgid "Permission Denied" +msgstr "Izin" diff --git a/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Exception/data/locale/is/LC_MESSAGES/Horde_Exception.mo b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Exception/data/locale/is/LC_MESSAGES/Horde_Exception.mo new file mode 100644 index 0000000000000000000000000000000000000000..71938c4918c093615e440aa24ab5caf931695704 GIT binary patch literal 384 zcmaKnF;BxV5QU3i%E-*%feo%WVIUYG0i_j{T2WPj6`AC4jZ!q&Qq9|Ii1MEuJeF1=MK_9yOs7h0GM=De|<9@396u7Y&H3y#C=bG&F|N`ZFj<;!@x03Hq*}Z+8|V@*GkyD zbbs2-r}Odtm-$d;Bku?uC+s?|O1PzquGQAvhbF-HG2pTD*YOf9XI zT9E-L31yHO{RV}j4j4(IIHKM!NEEZ=@-#}K2!(V83+e0qtDA7^Xl}T&6?fV& za??6p~UMmr@Bvx-Zg&S=Aa|(UCT_WkfaWtxc02`3ciw WMUGMupY+1O{{i415CsAU3BCav#fmHd literal 0 HcmV?d00001 diff --git a/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Exception/data/locale/it/LC_MESSAGES/Horde_Exception.po b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Exception/data/locale/it/LC_MESSAGES/Horde_Exception.po new file mode 100644 index 00000000..ad8c82ff --- /dev/null +++ b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Exception/data/locale/it/LC_MESSAGES/Horde_Exception.po @@ -0,0 +1,26 @@ +# Italian translations for Horde_Exception module. +# Copyright 2010-2016 Horde LLC (http://www.horde.org/) +# This file is distributed under the same license as the Horde_Exception module. +# Automatically generated, 2010. +# +msgid "" +msgstr "" +"Project-Id-Version: Horde_Exception\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/Exception/NotFound.php:32 +#, fuzzy +msgid "Not Found" +msgstr "Nessun suono" + +#: lib/Horde/Exception/PermissionDenied.php:32 +msgid "Permission Denied" +msgstr "Permessi negati" diff --git a/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Exception/data/locale/ja/LC_MESSAGES/Horde_Exception.mo b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Exception/data/locale/ja/LC_MESSAGES/Horde_Exception.mo new file mode 100644 index 0000000000000000000000000000000000000000..2c15ac8035c8b1bd798d3c7670cfacb8ab9bd01e GIT binary patch literal 603 zcmZXQzi-qq6vxA_foveLF?e9B9OC1EYmP$|?HyF~;8X>~25$1m`I^{~?Nnu8NJfqU zfhq&LLNkK5_xsLRx!)Ttql> z3E4#s&v@Qz^j8pa*7L5Rzl9#lonhGB*CmgXB@i#0~Un-x{?+o&VNt)V`9FkM#hRM+nL5;PslM5RJz5gF_V z>(6rBHK!A$3lkApcBvV$Avp<0;n06Z?}G$=^2nKjR9M1-n?c|AejhDe{l(Qw*SvA{ pcUOOM%?Hmlhpstx%{SM4b@lPD<@=xSj$D1 +# +msgid "" +msgstr "" +"Project-Id-Version: Horde_Exception\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:19+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/Exception/NotFound.php:27 +msgid "Not Found" +msgstr "見つかりません" + +#: lib/Horde/Exception/PermissionDenied.php:27 +msgid "Permission Denied" +msgstr "アクセスは拒否されました" diff --git a/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Exception/data/locale/km/LC_MESSAGES/Horde_Exception.mo b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Exception/data/locale/km/LC_MESSAGES/Horde_Exception.mo new file mode 100644 index 0000000000000000000000000000000000000000..71938c4918c093615e440aa24ab5caf931695704 GIT binary patch literal 384 zcmaKnF;BxV5QU3i%E-*%feo%WVIUYG0i_j{T2WPj6`AC4jZ!q&Qq9|Ii1MEuJeF1=MK_9yOs7h0GM=De|<9@396u7Y&H3y#C=bG&F|N`ZFj<;!@x03Hq*}Z+8|V@*GkyD zbbs2-r}Odtm-$d;Bku?uC+s?|O1PzquGQAvhXSmIWve*gMrGDIl7w86;eykPfjbQ^lVlE&qTC3k z^TPf~H=oW&hhOGho(-LiXsN@#p{Nme@v1RW+divS(g%!#=W-0i!IzS}qlb~LT&=AV fta#HgTbR~M17qhmK``5VZ^Iz(v!CUF_p{CyNC@5C3Zzc9R5XcNDJfC4^a>_BY)m%x%JxP@Dv!av z@6da1c@3V0+0CIsjPz+d*X&3*wJygm zqpLYqfg14zR@MbJ^@Yya$GY$=vl4P#AD7w(-&r(%$GRe(eahI0L)9E(Llsa$!i8Y` zElYa9h2)2Cc$ae$*#)k3bKgJSJC?kMq$~Ns)|)6FSmu=Rr3%(bxYVVtJ#233m0v0k zgLT_DF3qx2hNF0*Oi`->S%zvQVWPvLRz@rHpE*67j_&_iba;GXO+Z8U{j6y4fLCF^ zDwQ^Um@ky`7}C$#nDy?xX0Gq(*vQOnu1z7K_f3a*R@P3HY;4`iOE6Vi`n21J?J|9B zUJ0J20(N(yS@M^u5byywkWTecnlxLj#s`AK_4U@H4ZcUBATinN$I&@DdLc!*-rUjf MOGR_jvu, 2011. +# +msgid "" +msgstr "" +"Project-Id-Version: Horde_Exception\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-27 23:04+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/Exception/NotFound.php:27 +msgid "Not Found" +msgstr "Nerasta" + +#: lib/Horde/Exception/PermissionDenied.php:27 +msgid "Permission Denied" +msgstr "Neužtenka teisių" diff --git a/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Exception/data/locale/lv/LC_MESSAGES/Horde_Exception.mo b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Exception/data/locale/lv/LC_MESSAGES/Horde_Exception.mo new file mode 100644 index 0000000000000000000000000000000000000000..9a0e2f350c058a58ae3cf8bff91d5007b27a0314 GIT binary patch literal 655 zcmZXR%Wl&^6o$=hfe{N>vp8L}YE?~`Nufj&Ok2`K1SQ2PreX(!ed zjIVO60}bL+tgQ=d?n_;;w@v9;W+fEZ9#+~1-@EAaJ?qLi{gAPdL)G2Jj#WSjeJ%v! zeY!yGOYv%#3(iT%PO;V9dH?DJXJQ}3OW7B@e2;W9}^Ld5|HYWh3F_%ll_7CNxC`#D#)NV;NNR2i%ytQvd(} literal 0 HcmV?d00001 diff --git a/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Exception/data/locale/lv/LC_MESSAGES/Horde_Exception.po b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Exception/data/locale/lv/LC_MESSAGES/Horde_Exception.po new file mode 100644 index 00000000..a9c5dea1 --- /dev/null +++ b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Exception/data/locale/lv/LC_MESSAGES/Horde_Exception.po @@ -0,0 +1,41 @@ +# Latvian translations for Horde_Exception package. +# Copyright 2011-2016 Horde LLC (http://www.horde.org/) +# This file is distributed under the same license as the Horde_Exception package. +# Automatically generated, 2011. +# +msgid "" +msgstr "" +"Project-Id-Version: Horde_Exception\n" +"Report-Msgid-Bugs-To: dev@lists.horde.org\n" +"POT-Creation-Date: 2011-02-02 16:17+0100\n" +"PO-Revision-Date: 2011-10-16 15:21+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/Exception/NotFound.php:27 +msgid "Not Found" +msgstr "Nav atrasts" + +# #-#-#-#-# horde.po (Horde 2.1) #-#-#-#-# +# #-#-#-#-# lv_LV.po (Mnemo 2.1.2) #-#-#-#-# +# +# #-#-#-#-# lv_LV.po (Ingo H3 (1.1.5)) #-#-#-#-# +# #-#-#-#-# lv_LV.po (Mnemo 2.1.2) #-#-#-#-# +# +# #-#-#-#-# mnemo.po (Mnemo 2.1.2) #-#-#-#-# +# +# #-#-#-#-# ingo.po (Ingo H3 (1.1.5)) #-#-#-#-# +# #-#-#-#-# lv_LV.po (Mnemo 2.1.2) #-#-#-#-# +# +#: lib/Horde/Exception/PermissionDenied.php:27 +msgid "Permission Denied" +msgstr "Pieeja liegta" diff --git a/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Exception/data/locale/mk/LC_MESSAGES/Horde_Exception.mo b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Exception/data/locale/mk/LC_MESSAGES/Horde_Exception.mo new file mode 100644 index 0000000000000000000000000000000000000000..71938c4918c093615e440aa24ab5caf931695704 GIT binary patch literal 384 zcmaKnF;BxV5QU3i%E-*%feo%WVIUYG0i_j{T2WPj6`AC4jZ!q&Qq9|Ii1MEuJeF1=MK_9yOs7h0GM=De|<9@396u7Y&H3y#C=bG&F|N`ZFj<;!@x03Hq*}Z+8|V@*GkyD zbbs2-r}Odtm-$d;Bku?uC+s?|O1PzquGQAvhFHn z!ZMy;p0b=VG}1Y&RP6V!Zz6o4l@rEm5v=3nrVDn7@7F@>4Uu5LVVfqI2qQZofmR@v zoT#iYf6`6I)8Y1)S;~@uH31BE*t8fmz&f0_S}4;e^+Grgp?s`HwAlJ$l2>qaXlmOi nBRMHvR7hsJb3)URbxY5QX}`C=%=_eLSsoj5Sd#3dpY*-}wfcM% literal 0 HcmV?d00001 diff --git a/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Exception/data/locale/nb/LC_MESSAGES/Horde_Exception.po b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Exception/data/locale/nb/LC_MESSAGES/Horde_Exception.po new file mode 100644 index 00000000..e6b5cff4 --- /dev/null +++ b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Exception/data/locale/nb/LC_MESSAGES/Horde_Exception.po @@ -0,0 +1,27 @@ +# Norwegian Bokmal translations for Horde_Exception module. +# Copyright 2010-2016 Horde LLC (http://www.horde.org/) +# This file is distributed under the same license as the Horde_Exception module. +# Automatically generated, 2010. +# +msgid "" +msgstr "" +"Project-Id-Version: Horde_Exception\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/Exception/NotFound.php:32 +#, fuzzy +msgid "Not Found" +msgstr "ikke funnet" + +#: lib/Horde/Exception/PermissionDenied.php:32 +#, fuzzy +msgid "Permission Denied" +msgstr "Rettighet" diff --git a/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Exception/data/locale/nl/LC_MESSAGES/Horde_Exception.mo b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Exception/data/locale/nl/LC_MESSAGES/Horde_Exception.mo new file mode 100644 index 0000000000000000000000000000000000000000..cc8c1054eea65b184c7ee8cff2dd601f65b6d5d3 GIT binary patch literal 592 zcmZ9I&u$Yj5XP5(2Ug-x&K!mtsG4-0R%*0qszQ@MMN*<_LEOMy500CSy|TTbAn_Qy zNFS)r!tCY{#7IBc{`~FEH@<)V_)o(1hYK4Y?n zTm6(*mb>C@_rLCN=^{*BV^y*szcwKlXJJg%5G&r@P#N(;;b-#gO%Cs!SM+sqTT&fa zNUx}NKH@xRqwsB`0~Rg^MVqtAgcy3u*57kpr;CpTo_mt*XE>ITa_DEGkC{Mm45FVO z4)!yVWo*PN+L*TAzdj)_J8XU8cx?}t{YRS{Vu_o zB3!j<8|5^eNvj*F2@8_z9L7y7mvCal!2Tb5=gq-Z>HK0o**%8nW$C%Ikt_%KS@T4Z zZsS2+Nn?jlE~O6?N1uu*4tBma@OSb!v87YS>Kq2wCZ>z3@v_3H^XtH^>h2gu{UL0( zqgNJQjzGK~reE+KS@PSVXKp1c^NT?Aj?(1PPy|gIXBF9`aHM%s7JiV?, 2012. +msgid "" +msgstr "" +"Project-Id-Version: Horde_Exception\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-03 12:17+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/Exception/NotFound.php:27 +msgid "Not Found" +msgstr "Niet gevonden" + +#: lib/Horde/Exception/PermissionDenied.php:27 +msgid "Permission Denied" +msgstr "Toegang geweigerd" diff --git a/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Exception/data/locale/nn/LC_MESSAGES/Horde_Exception.mo b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Exception/data/locale/nn/LC_MESSAGES/Horde_Exception.mo new file mode 100644 index 0000000000000000000000000000000000000000..b8d6164080f7861d426890a579024fc68c4a5924 GIT binary patch literal 427 zcmaKn%}N6?6oo6gnx$(O5nL#mF*7b4QwG%9Vxh%SMz<1Yu4yDq#w1hP2l4fM7H<^n zLhz7}{M?h=lh6IVj~;3VIY5q(UE~ajDv)<9Uf~=)znVGw26dq0hCYGw${J4Yt!vFHn z!ZMy;p0b=VG}1Y&RP6V!Zz6o4l@rEm5v=3nrVDn7@7F@>4Uu5LVVfqI2qQZofmR@v zoT#iYf6`6I)8Y1)S;~@uH31BE*t8fmz&f0_S}4;e^+Grgp?s`HwAlJ$l2>qaXlmOi nBRMHvR7hsJb3)URbxY5QX}`C=%=_eLSsoj5Sd#3dpY*-}wfcM% literal 0 HcmV?d00001 diff --git a/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Exception/data/locale/nn/LC_MESSAGES/Horde_Exception.po b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Exception/data/locale/nn/LC_MESSAGES/Horde_Exception.po new file mode 100644 index 00000000..243ac478 --- /dev/null +++ b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Exception/data/locale/nn/LC_MESSAGES/Horde_Exception.po @@ -0,0 +1,26 @@ +# Norwegian Nynorsk translations for Horde_Exception module. +# Copyright 2010-2016 Horde LLC (http://www.horde.org/) +# This file is distributed under the same license as the Horde_Exception module. +# Automatically generated, 2010. +# +msgid "" +msgstr "" +"Project-Id-Version: Horde_Exception\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/Exception/NotFound.php:32 +msgid "Not Found" +msgstr "" + +#: lib/Horde/Exception/PermissionDenied.php:32 +#, fuzzy +msgid "Permission Denied" +msgstr "Tilgang" diff --git a/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Exception/data/locale/pl/LC_MESSAGES/Horde_Exception.mo b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Exception/data/locale/pl/LC_MESSAGES/Horde_Exception.mo new file mode 100644 index 0000000000000000000000000000000000000000..ed9a15d9a56efb27daf7143c884e12c537ee0d2a GIT binary patch literal 485 zcmaJ+O-}+b5Y^~ukDfjBpai1Db}lZ>Kfk?>e)zsZ_S+lg8wo4%4Z}=tO$52eFGhL>?jckf%tGHu4jTml(b07Zao3A#rq=(q}L>*GiBF zZBlsYFB2#oCW0xH+BiD4S)S6nDzh}!f~2sxDRS#D%bNbRbB` zIHUfw2;(BWIAI}UXrxnEhy2K>uA+#OYr+VYk2$-FLQ<=3WH&nZ ZvhLHY%Nbd(H+k=24ea6A6E-@*&NsQFh*bap literal 0 HcmV?d00001 diff --git a/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Exception/data/locale/pl/LC_MESSAGES/Horde_Exception.po b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Exception/data/locale/pl/LC_MESSAGES/Horde_Exception.po new file mode 100644 index 00000000..6391ca25 --- /dev/null +++ b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Exception/data/locale/pl/LC_MESSAGES/Horde_Exception.po @@ -0,0 +1,28 @@ +# Polish translations for Horde_Exception module. +# Copyright 2010-2016 Horde LLC (http://www.horde.org/) +# This file is distributed under the same license as the Horde_Exception module. +# Automatically generated, 2010. +# +msgid "" +msgstr "" +"Project-Id-Version: Horde_Exception\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/Exception/NotFound.php:32 +#, fuzzy +msgid "Not Found" +msgstr "%s nieznaleziony." + +#: lib/Horde/Exception/PermissionDenied.php:32 +#, fuzzy +msgid "Permission Denied" +msgstr "Uprawnienie" diff --git a/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Exception/data/locale/pt/LC_MESSAGES/Horde_Exception.mo b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Exception/data/locale/pt/LC_MESSAGES/Horde_Exception.mo new file mode 100644 index 0000000000000000000000000000000000000000..39337a359a218493b14d6c5134acd667b3c9a787 GIT binary patch literal 487 zcmaKpO-{ow5QPJRO?I$mVRj&JNy36EB@)mdQK^Mc1-8f}gKL!7!FHk9q0*NPo(v1DaGnT)0x86L|CbEYdBiqP1;*=sg$Q|;!;d%Kg|HK&AuU!37Dd>s=qQ+4z z%?T(vRw&$SCqQWV)@lO_nag%=K1hEA|@`f^im(*cukayRW>Cc&zaw`?R9qo%5PMO)uBn zMG^87?wpUf2#wMBwr>K~PJ!l&gVux?24~4XaK6b`?`u5tOlcb)QDg;GQC3)#Snfet zsp05(Q5J<5@q{l-I`1Ff5UV|?D)s6$7DMsPDMYM2+0asSUctOK0cPBqj$uLm8#UzM zjqY1>z!a`pbIRTBN~xiJDPWtP8pfJwqrj9S`(M}B9tHX0crm?sh;mTmht5W}(!^CK zw~2fiUvw=QJBIZc`M`1Vp`PLB#+RBsWsg(4cG}oR!RU*L`Ks+bwK#Kr6BO8Pn}$g> ihTU}X)WSZL&&GMS{Qb*8+HRvK?XG_\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/Exception/NotFound.php:27 +msgid "Not Found" +msgstr "Não Encontrado" + +#: lib/Horde/Exception/PermissionDenied.php:27 +msgid "Permission Denied" +msgstr "Permissão Negada" diff --git a/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Exception/data/locale/ro/LC_MESSAGES/Horde_Exception.mo b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Exception/data/locale/ro/LC_MESSAGES/Horde_Exception.mo new file mode 100644 index 0000000000000000000000000000000000000000..212e68824f445232e0cadab677a9bed9813f740f GIT binary patch literal 473 zcmaKoy-ve05XXyP%E-)c15{Mt;-mw`B|s@fL~2DT59bW;_cQ zD$xOnlmGI4{OmjXYk%*fLAFCWARUr+NvEXRx};AkUeI1Mzcw-Y9TUf*ls%)dxmE%m zv`O)0xJj!_N?aH+GO73F=hjUvOdP{q(cD# z_c^Oq2e>bS^AjF$P9U4&BCq@X%Z;RUEH+ZvLON{(^ed<5bblg?Vg(s0G}I>bMp9*! z%#g(>=K^xStNu(kj>g07EB!Y223k2()L~W9s1BFztSn@%dXUVdvFO77(;$krTs_Gf z8a7mkPIHwB=)UI8n-rCi1-sW~ZUw0FC$wRw2OBq3Vd%p(a1d}zK8N+1oFkuexT0*c S37g=O{;Sm@(kC+Ld5v#fd4;+F literal 0 HcmV?d00001 diff --git a/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Exception/data/locale/ro/LC_MESSAGES/Horde_Exception.po b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Exception/data/locale/ro/LC_MESSAGES/Horde_Exception.po new file mode 100644 index 00000000..c57b456d --- /dev/null +++ b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Exception/data/locale/ro/LC_MESSAGES/Horde_Exception.po @@ -0,0 +1,26 @@ +# Romanian translations for Horde_Exception module. +# Copyright 2010-2016 Horde LLC (http://www.horde.org/) +# This file is distributed under the same license as the Horde_Exception module. +# Automatically generated, 2010. +# +msgid "" +msgstr "" +"Project-Id-Version: Horde_Exception\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/Exception/NotFound.php:32 +msgid "Not Found" +msgstr "" + +#: lib/Horde/Exception/PermissionDenied.php:32 +msgid "Permission Denied" +msgstr "" diff --git a/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Exception/data/locale/ru/LC_MESSAGES/Horde_Exception.mo b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Exception/data/locale/ru/LC_MESSAGES/Horde_Exception.mo new file mode 100644 index 0000000000000000000000000000000000000000..0aa090c6a13e0a681f9072974bab6c96e06f6cd6 GIT binary patch literal 501 zcmaKn&q@O^5XKcf?a{M`5mYRinrsE@w(GyzV!>i5t5=D;<9216EJ<2g=xg{izKhS| zMA04uhkRs``F)wm$JXZC8pS$ko3u;XARUo>G)eDNJfqz+zcDoW6;sFh8GA%y3#}r! z)h5HI?mWfH(M2%AN*l)pHZL-EJ=2 && n%" +"10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n" + +#: lib/Horde/Exception/NotFound.php:32 +#, fuzzy +msgid "Not Found" +msgstr "Отменить изменения" + +# #-#-#-#-# ru_RU.po (Mnemo H3 2.2) #-#-#-#-# +# fuzzy +#: lib/Horde/Exception/PermissionDenied.php:32 +#, fuzzy +msgid "Permission Denied" +msgstr "Изменить права доступа" diff --git a/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Exception/data/locale/sk/LC_MESSAGES/Horde_Exception.mo b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Exception/data/locale/sk/LC_MESSAGES/Horde_Exception.mo new file mode 100644 index 0000000000000000000000000000000000000000..e01418ea7c46bbd4e81d36503cdacdb0b5dd2fe6 GIT binary patch literal 579 zcmZXR!EV$r5QbAI2htN2M-C$nRZ-<7-WFJSn^Mv4ib}g>RfS%`Y=+d`WE|N}RSrA` z4^W8<2Ofdbs;|*!VUh|}6(fHh`}c2qEZ?lJ{)jjpGS8SD<`FYt+W5>oW;FAJSuj6W zqUby4HRkz)D0<4d$C>3Wc-WoSO^$7Vv27@iX6P#8y|Dy`NCsJP_8jLy9OdE^UAv;- zy>&T$8ePt@4lKkcSX&pw)E6cf@0!Ak%qqz7V!t##_}*FT?^##Gvk#d#aH!jD;!p=v z&`+ckNuL|Y*Gj(GN@S9-QJmm~Y45w|dnM$c^Ch>wiS|KcPLnTnuuj2LyI_b@Xs)jo z8g{Er*soad3*A<+7f&=5jV@4Rs4E3V4(Pv9|9KR|)1&F=?)9>l#0QoF65sr-<|hQa z3@__a8ydp=OgoPu{g{o#;Lg`p_!XTP(cI>S3I&5NCd9L{ak>;^>ng8+>Tc@O?IGL_ z(@jcK`2yZT0tz;1FYUv|2GDN0(~6SC{xFV?k(O8IIrqQ#!\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/Exception/NotFound.php:27 +msgid "Not Found" +msgstr "Nenájdené" + +#: lib/Horde/Exception/PermissionDenied.php:27 +msgid "Permission Denied" +msgstr "Prístup odmietnutý" diff --git a/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Exception/data/locale/sl/LC_MESSAGES/Horde_Exception.mo b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Exception/data/locale/sl/LC_MESSAGES/Horde_Exception.mo new file mode 100644 index 0000000000000000000000000000000000000000..8705e01d6d242933bb6ebc0185c45f90daa834d4 GIT binary patch literal 546 zcmaKnOHRWu5QYPS1=+!h1&i4rfxyK{D^aCHJo*roS`koSi%c>ESE(J@ZUv~<;0Roc zvoHZc7f6i!$^Je6c*Y-FYi}OKDzQTx66?eXQAa{-64%80isxmtZxb6-K=L>0`madP zOr^C_E9jw;n0txQ6U-bN=Ijnlor&O5n;h@^&ly&ZF8mv;v~g@~3z@TvSz%eKBgk=n zR!Zw^VW@;l))t9t! zs{`N1cu(yHoX2qhr@(A5Z^s3r)sUd7zdQR#;F E2`JB(*Z=?k literal 0 HcmV?d00001 diff --git a/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Exception/data/locale/sl/LC_MESSAGES/Horde_Exception.po b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Exception/data/locale/sl/LC_MESSAGES/Horde_Exception.po new file mode 100644 index 00000000..c4bd1ae3 --- /dev/null +++ b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Exception/data/locale/sl/LC_MESSAGES/Horde_Exception.po @@ -0,0 +1,27 @@ +# Slovenian translations for Horde_Exception module. +# Copyright 2010-2016 Horde LLC (http://www.horde.org/) +# This file is distributed under the same license as the Horde_Exception module. +# Automatically generated, 2010. +# +msgid "" +msgstr "" +"Project-Id-Version: Horde_Exception\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/Exception/NotFound.php:32 +#, fuzzy +msgid "Not Found" +msgstr "Ni najden." + +#: lib/Horde/Exception/PermissionDenied.php:32 +msgid "Permission Denied" +msgstr "Dovoljenje je zavrnjeno." diff --git a/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Exception/data/locale/sv/LC_MESSAGES/Horde_Exception.mo b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Exception/data/locale/sv/LC_MESSAGES/Horde_Exception.mo new file mode 100644 index 0000000000000000000000000000000000000000..b8d6164080f7861d426890a579024fc68c4a5924 GIT binary patch literal 427 zcmaKn%}N6?6oo6gnx$(O5nL#mF*7b4QwG%9Vxh%SMz<1Yu4yDq#w1hP2l4fM7H<^n zLhz7}{M?h=lh6IVj~;3VIY5q(UE~ajDv)<9Uf~=)znVGw26dq0hCYGw${J4Yt!vFHn z!ZMy;p0b=VG}1Y&RP6V!Zz6o4l@rEm5v=3nrVDn7@7F@>4Uu5LVVfqI2qQZofmR@v zoT#iYf6`6I)8Y1)S;~@uH31BE*t8fmz&f0_S}4;e^+Grgp?s`HwAlJ$l2>qaXlmOi nBRMHvR7hsJb3)URbxY5QX}`C=%=_eLSsoj5Sd#3dpY*-}wfcM% literal 0 HcmV?d00001 diff --git a/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Exception/data/locale/sv/LC_MESSAGES/Horde_Exception.po b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Exception/data/locale/sv/LC_MESSAGES/Horde_Exception.po new file mode 100644 index 00000000..fdb96635 --- /dev/null +++ b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Exception/data/locale/sv/LC_MESSAGES/Horde_Exception.po @@ -0,0 +1,27 @@ +# Swedish translations for Horde_Exception module. +# Copyright 2010-2016 Horde LLC (http://www.horde.org/) +# This file is distributed under the same license as the Horde_Exception module. +# Automatically generated, 2010. +# +msgid "" +msgstr "" +"Project-Id-Version: Horde_Exception\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/Exception/NotFound.php:32 +#, fuzzy +msgid "Not Found" +msgstr "%s saknas." + +#: lib/Horde/Exception/PermissionDenied.php:32 +#, fuzzy +msgid "Permission Denied" +msgstr "Behörighet" diff --git a/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Exception/data/locale/tr/LC_MESSAGES/Horde_Exception.mo b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Exception/data/locale/tr/LC_MESSAGES/Horde_Exception.mo new file mode 100644 index 0000000000000000000000000000000000000000..fd7b827372e71083a7d3316d6a55488d0d7e941e GIT binary patch literal 472 zcmaKnu};G<5QYPSfow1{cn24!3{)r&mp3X{tHNVR2DP z>uhW0{Vi>ZFu6%--+=ICbRZmX(q<8(K28aXc>C;#wHZSrox(!;e*gN$!aAB7p=>Ff zHk@2GPFMJTCdzU}3Q%CMO&*SgDjHD$O+i$g$f%?KOg9-#;>|Ck77P1YIZ)VPRpY1* zmhPl3g;ZUV&4jVwdUxrNb~Zjg$uk%lt4!xo6`XXQqzjX>F`}eHZ7R!&s@GfFi@M|| R?Xhkce7wI(MIQ7^@C_WshVcLZ literal 0 HcmV?d00001 diff --git a/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Exception/data/locale/tr/LC_MESSAGES/Horde_Exception.po b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Exception/data/locale/tr/LC_MESSAGES/Horde_Exception.po new file mode 100644 index 00000000..c75c2626 --- /dev/null +++ b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Exception/data/locale/tr/LC_MESSAGES/Horde_Exception.po @@ -0,0 +1,26 @@ +# Turkish translations for Horde_Exception module. +# Copyright 2010-2016 Horde LLC (http://www.horde.org/) +# This file is distributed under the same license as the Horde_Exception module. +# Automatically generated, 2010. +# +msgid "" +msgstr "" +"Project-Id-Version: Horde_Exception\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/Exception/NotFound.php:32 +#, fuzzy +msgid "Not Found" +msgstr "Ses Yok" + +#: lib/Horde/Exception/PermissionDenied.php:32 +msgid "Permission Denied" +msgstr "İzin Yok" diff --git a/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Exception/data/locale/uk/LC_MESSAGES/Horde_Exception.mo b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Exception/data/locale/uk/LC_MESSAGES/Horde_Exception.mo new file mode 100644 index 0000000000000000000000000000000000000000..235eba1150144ccaba5e385d478e5b5be6382353 GIT binary patch literal 627 zcmZXP-D=c86vyM&g}GDk&Wj^rvB<2G?1F2y@vGg%!meFP^j61YOs8gN!px+!P{EH^ z&`aN;f<=qCzQXJa_$;1Dkp(^E$NBo7IVZm_pZ^q~okOl7J>&v1M!da1E+P!MguF(6 zoC$(A=&vAm&j!JD^jqk$+!}`Mdu{SWSs1BC7QvM3nJ`8u2^(ArjuowTd2Y#OL7s8# zI|)2iy5P@;`#G;I7Q$^_D{aZdl%gPyn$nO=B~b9a2bD0^bauSHqjVWgw=%M>IrC#= zgIS(HOe0GC*996S@ts>VrWA!_o9_v~Z>j4N+WSX0X2z0CGifSjl}_McW7Q1b&skL+ zK*=T7xTXllOqLBRImtMiB_N`{{O`KS=4811%cw)cbtNsAxZ$A2Q!U@Ox9f@tIe>hJ zX~S*$G#iorQs*yu#WfkqTopo=3G`nI8&0c6vx-KHk(4&XFQZ^|1HP16Wg zR=|h!S{g-gA1I(4^LuIhx3!k`eArIVwTQyu;pqr!=qk=cI1{f9!oYoY$KbxXpYF(= lxUcRQqj}&yy7}VW;{D=-`{lbw?h6*)x;b{e;=4Nu{s5ikz##wt literal 0 HcmV?d00001 diff --git a/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Exception/data/locale/uk/LC_MESSAGES/Horde_Exception.po b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Exception/data/locale/uk/LC_MESSAGES/Horde_Exception.po new file mode 100644 index 00000000..ca6dc35d --- /dev/null +++ b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Exception/data/locale/uk/LC_MESSAGES/Horde_Exception.po @@ -0,0 +1,25 @@ +# Ukrainian translations for Horde_Exception module. +# Copyright 2010-2016 Horde LLC (http://www.horde.org/) +# This file is distributed under the same license as the Horde_Exception module. +# +msgid "" +msgstr "" +"Project-Id-Version: Horde_Exception\n" +"Report-Msgid-Bugs-To: dev@lists.horde.org\n" +"POT-Creation-Date: 2010-10-13 01:27+0200\n" +"PO-Revision-Date: 2013-04-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/Exception/NotFound.php:32 +msgid "Not Found" +msgstr "Не знайдено" + +#: lib/Horde/Exception/PermissionDenied.php:32 +msgid "Permission Denied" +msgstr "Доступ заборонений" diff --git a/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Exception/data/locale/zh_CN/LC_MESSAGES/Horde_Exception.mo b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Exception/data/locale/zh_CN/LC_MESSAGES/Horde_Exception.mo new file mode 100644 index 0000000000000000000000000000000000000000..cfa09fd1f3a5d692c2441414e3c5a7fad823beb2 GIT binary patch literal 439 zcmaKnKT88K7{*W0<#5s2A-ksL>R^cqYX4xN#j~8Q67OEq$Tc~Vw6wFc;Nsxm7jPBC zPvaz_-@-Qzb`X4ce0#&-hRG3 FN8cCGeyjih literal 0 HcmV?d00001 diff --git a/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Exception/data/locale/zh_CN/LC_MESSAGES/Horde_Exception.po b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Exception/data/locale/zh_CN/LC_MESSAGES/Horde_Exception.po new file mode 100644 index 00000000..98a6ec86 --- /dev/null +++ b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Exception/data/locale/zh_CN/LC_MESSAGES/Horde_Exception.po @@ -0,0 +1,25 @@ +# Chinese translations for Horde_Exception module. +# Copyright 2010-2016 Horde LLC (http://www.horde.org/) +# This file is distributed under the same license as the Horde_Exception module. +# Automatically generated, 2010. +# +msgid "" +msgstr "" +"Project-Id-Version: Horde_Exception\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/Exception/NotFound.php:32 +#, fuzzy +msgid "Not Found" +msgstr "未找到。" + +#: lib/Horde/Exception/PermissionDenied.php:32 +msgid "Permission Denied" +msgstr "权限不足" diff --git a/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Exception/data/locale/zh_TW/LC_MESSAGES/Horde_Exception.mo b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Exception/data/locale/zh_TW/LC_MESSAGES/Horde_Exception.mo new file mode 100644 index 0000000000000000000000000000000000000000..5062a7c62afd7d897cadcce9968f79941308c296 GIT binary patch literal 439 zcmaKn%}N6?6op68&EQ7YF0$9uOkG%_g4!P}v^bX0t;CsY8kr_Tl9qPq+Jzt}K7-I# za#z8(@WzE*2p;Z7LUL}-&BxZ-ON3fQwvk-`l;gUAyyG70SE2t$ zDcF&6P8m&FpcNERYRx_5o^}g*4L00xa&Bw^H|=Q-mB)j40F|+x_MKD(JsV3$Gs8&% zlao?8?`p%~uNf=j^dh583nH}9mhiwyoh6Kh+9xdG^@AN&XAF&W023AR{`K{Q^E9(U zyHa>#IXNABGs5?CQI<0zL4(DZBJK$-$3gk$2Z;PkbuZQ{P<8$;4 D7sq~R literal 0 HcmV?d00001 diff --git a/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Exception/data/locale/zh_TW/LC_MESSAGES/Horde_Exception.po b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Exception/data/locale/zh_TW/LC_MESSAGES/Horde_Exception.po new file mode 100644 index 00000000..367c479c --- /dev/null +++ b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Exception/data/locale/zh_TW/LC_MESSAGES/Horde_Exception.po @@ -0,0 +1,25 @@ +# Chinese translations for Horde_Exception module. +# Copyright 2010-2016 Horde LLC (http://www.horde.org/) +# This file is distributed under the same license as the Horde_Exception module. +# Automatically generated, 2010. +# +msgid "" +msgstr "" +"Project-Id-Version: Horde_Exception\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/Exception/NotFound.php:32 +#, fuzzy +msgid "Not Found" +msgstr "靜音" + +#: lib/Horde/Exception/PermissionDenied.php:32 +msgid "Permission Denied" +msgstr "存取遭拒" diff --git a/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Idna/Horde/Idna.php b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Idna/Horde/Idna.php new file mode 100644 index 00000000..4eb1f3ca --- /dev/null +++ b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Idna/Horde/Idna.php @@ -0,0 +1,172 @@ + + * @category Horde + * @license http://www.horde.org/licenses/bsd BSD + * @package Idna + */ + +/** + * Provide normalized encoding/decoding support for IDNA strings. + * + * @author Michael Slusarz + * @category Horde + * @copyright 2014-2017 Horde LLC + * @license http://www.horde.org/licenses/bsd BSD + * @package Idna + */ +class Horde_Idna +{ + /** + * The backend to use. + * + * @var mixed + */ + protected static $_backend; + + /** + * @throws Horde_Idna_Exception + */ + public static function encode($data) + { + switch ($backend = static::_getBackend()) { + case 'INTL': + return idn_to_ascii($data); + + case 'INTL_UTS46': + $result = idn_to_ascii($data, 0, INTL_IDNA_VARIANT_UTS46, $info); + self::_checkForError($info); + return $result; + + default: + return $backend->encode($data); + } + } + + /** + * @throws Horde_Idna_Exception + */ + public static function decode($data) + { + switch ($backend = static::_getBackend()) { + case 'INTL': + case 'INTL_UTS46': + $parts = explode('.', $data); + foreach ($parts as &$part) { + if (strpos($part, 'xn--') === 0) { + switch ($backend) { + case 'INTL': + $part = idn_to_utf8($part); + break; + + case 'INTL_UTS46': + $part = idn_to_utf8($part, 0, INTL_IDNA_VARIANT_UTS46, $info); + self::_checkForError($info); + break; + } + } + } + return implode('.', $parts); + + default: + return $backend->decode($data); + } + } + + /** + * Checks if the $idna_info parameter of idn_to_ascii() or idn_to_utf8() + * contains errors. + * + * @param array $info Fourth parameter to idn_to_ascii() or idn_to_utf8(). + * + * @throws Horde_Idna_Exception + */ + protected static function _checkForError($info) + { + if (!isset($info['errors'])) { + return; + } + switch (true) { + case $info['errors'] & IDNA_ERROR_EMPTY_LABEL: + throw new Horde_Idna_Exception(Horde_Idna_Translation::t( + "Domain name is empty" + )); + case $info['errors'] & IDNA_ERROR_LABEL_TOO_LONG: + case $info['errors'] & IDNA_ERROR_DOMAIN_NAME_TOO_LONG: + throw new Horde_Idna_Exception(Horde_Idna_Translation::t( + "Domain name is too long" + )); + case $info['errors'] & IDNA_ERROR_LEADING_HYPHEN: + throw new Horde_Idna_Exception(Horde_Idna_Translation::t( + "Starts with a hyphen" + )); + case $info['errors'] & IDNA_ERROR_TRAILING_HYPHEN: + throw new Horde_Idna_Exception(Horde_Idna_Translation::t( + "Ends with a hyphen" + )); + case $info['errors'] & IDNA_ERROR_HYPHEN_3_4: + throw new Horde_Idna_Exception(Horde_Idna_Translation::t( + "Contains hyphen in the third and fourth positions" + )); + case $info['errors'] & IDNA_ERROR_LEADING_COMBINING_MARK: + throw new Horde_Idna_Exception(Horde_Idna_Translation::t( + "Starts with a combining mark" + )); + case $info['errors'] & IDNA_ERROR_DISALLOWED: + throw new Horde_Idna_Exception(Horde_Idna_Translation::t( + "Contains disallowed characters" + )); + case $info['errors'] & IDNA_ERROR_PUNYCODE: + throw new Horde_Idna_Exception(Horde_Idna_Translation::t( + "Starts with \"xn--\" but does not contain valid Punycode" + )); + case $info['errors'] & IDNA_ERROR_LABEL_HAS_DOT: + throw new Horde_Idna_Exception(Horde_Idna_Translation::t( + "Contains a dot" + )); + case $info['errors'] & IDNA_ERROR_INVALID_ACE_LABEL: + throw new Horde_Idna_Exception(Horde_Idna_Translation::t( + "ACE label does not contain a valid label string" + )); + case $info['errors'] & IDNA_ERROR_BIDI: + throw new Horde_Idna_Exception(Horde_Idna_Translation::t( + "Does not meet the IDNA BiDi requirements (for right-to-left characters)" + )); + case $info['errors'] & IDNA_ERROR_CONTEXTJ: + throw new Horde_Idna_Exception(Horde_Idna_Translation::t( + "Does not meet the IDNA CONTEXTJ requirements" + )); + case $info['errors']: + throw new Horde_Idna_Exception(Horde_Idna_Translation::t( + "Unknown error" + )); + } + } + + /** + * Return the IDNA backend. + * + * @return mixed IDNA backend (false if none available). + */ + protected static function _getBackend() + { + if (!isset(self::$_backend)) { + if (extension_loaded('intl')) { + /* Only available in PHP > 5.4.0 */ + self::$_backend = defined('INTL_IDNA_VARIANT_UTS46') + ? 'INTL_UTS46' + : 'INTL'; + } else { + self::$_backend = new Horde_Idna_Punycode(); + } + } + + return self::$_backend; + } + +} diff --git a/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Idna/Horde/Idna/Exception.php b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Idna/Horde/Idna/Exception.php new file mode 100644 index 00000000..b3f57cbe --- /dev/null +++ b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Idna/Horde/Idna/Exception.php @@ -0,0 +1,24 @@ + + * @category Horde + * @license http://www.horde.org/licenses/bsd BSD + * @package Idna + */ + +/** + * Exception class for the Horde_Idna package. + * + * @author Michael Slusarz + * @category Horde + * @copyright 2014-2017 Horde LLC + * @license http://www.horde.org/licenses/bsd BSD + * @package Idna + */ +class Horde_Idna_Exception extends Horde_Exception +{} diff --git a/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Idna/Horde/Idna/Punycode.php b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Idna/Horde/Idna/Punycode.php new file mode 100644 index 00000000..d940ed31 --- /dev/null +++ b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Idna/Horde/Idna/Punycode.php @@ -0,0 +1,354 @@ + + * @author Michael Slusarz + * @category Horde + * @license http://www.horde.org/licenses/bsd BSD + * @package Idna + */ + +/** + * Punycode implementation as described in RFC 3492. + * + * Original code (v1.0.1; released under the MIT License): + * https://github.com/true/php-punycode/ + * + * @author Renan Gonçalves + * @author Michael Slusarz + * @category Horde + * @copyright 2014 TrueServer B.V. + * @copyright 2015-2017 Horde LLC + * @license http://www.horde.org/licenses/bsd BSD + * @package Idna + * @link http://tools.ietf.org/html/rfc3492 + */ +class Horde_Idna_Punycode +{ + /** + * Bootstring parameter values. + */ + const BASE = 36; + const TMIN = 1; + const TMAX = 26; + const SKEW = 38; + const DAMP = 700; + const INITIAL_BIAS = 72; + const INITIAL_N = 128; + const PREFIX = 'xn--'; + const DELIMITER = '-'; + + /** + * Encode table. + * + * @param array + */ + protected static $_encodeTable = array( + 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', + 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', + 'y', 'z', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', + ); + + /** + * Decode table. + * + * @param array + */ + protected static $_decodeTable = array( + 'a' => 0, 'b' => 1, 'c' => 2, 'd' => 3, 'e' => 4, 'f' => 5, + 'g' => 6, 'h' => 7, 'i' => 8, 'j' => 9, 'k' => 10, 'l' => 11, + 'm' => 12, 'n' => 13, 'o' => 14, 'p' => 15, 'q' => 16, 'r' => 17, + 's' => 18, 't' => 19, 'u' => 20, 'v' => 21, 'w' => 22, 'x' => 23, + 'y' => 24, 'z' => 25, '0' => 26, '1' => 27, '2' => 28, '3' => 29, + '4' => 30, '5' => 31, '6' => 32, '7' => 33, '8' => 34, '9' => 35 + ); + + /** + * Encode a domain to its Punycode version. + * + * @param string $input Domain name in Unicde to be encoded. + * + * @return string Punycode representation in ASCII. + */ + public function encode($input) + { + $parts = explode('.', $input); + + foreach ($parts as &$part) { + $part = $this->_encodePart($part); + } + + return implode('.', $parts); + } + + /** + * Encode a part of a domain name, such as tld, to its Punycode version. + * + * @param string $input Part of a domain name. + * + * @return string Punycode representation of a domain part. + */ + protected function _encodePart($input) + { + $codePoints = $this->_codePoints($input); + + $n = static::INITIAL_N; + $bias = static::INITIAL_BIAS; + $delta = 0; + $h = $b = count($codePoints['basic']); + + $output = ''; + foreach ($codePoints['basic'] as $code) { + $output .= $this->_codePointToChar($code); + } + if ($input === $output) { + return $output; + } + if ($b > 0) { + $output .= static::DELIMITER; + } + + $codePoints['nonBasic'] = array_unique($codePoints['nonBasic']); + sort($codePoints['nonBasic']); + + $i = 0; + $length = Horde_String::length($input, 'UTF-8'); + + while ($h < $length) { + $m = $codePoints['nonBasic'][$i++]; + $delta = $delta + ($m - $n) * ($h + 1); + $n = $m; + + foreach ($codePoints['all'] as $c) { + if (($c < $n) || ($c < static::INITIAL_N)) { + ++$delta; + } + + if ($c === $n) { + $q = $delta; + for ($k = static::BASE; ; $k += static::BASE) { + $t = $this->_calculateThreshold($k, $bias); + if ($q < $t) { + break; + } + + $code = $t + (($q - $t) % (static::BASE - $t)); + $output .= static::$_encodeTable[$code]; + + $q = ($q - $t) / (static::BASE - $t); + } + + $output .= static::$_encodeTable[$q]; + $bias = $this->_adapt($delta, $h + 1, ($h === $b)); + $delta = 0; + ++$h; + } + } + + ++$delta; + ++$n; + } + + return static::PREFIX . $output; + } + + /** + * Decode a Punycode domain name to its Unicode counterpart. + * + * @param string $input Domain name in Punycode + * + * @return string Unicode domain name. + */ + public function decode($input) + { + $parts = explode('.', $input); + + foreach ($parts as &$part) { + if (strpos($part, static::PREFIX) === 0) { + $part = $this->_decodePart( + substr($part, strlen(static::PREFIX)) + ); + } + } + + return implode('.', $parts); + } + + /** + * Decode a part of domain name, such as tld. + * + * @param string $input Part of a domain name. + * + * @return string Unicode domain part. + */ + protected function _decodePart($input) + { + $n = static::INITIAL_N; + $i = 0; + $bias = static::INITIAL_BIAS; + $output = ''; + + $pos = strrpos($input, static::DELIMITER); + if ($pos !== false) { + $output = substr($input, 0, $pos++); + } else { + $pos = 0; + } + + $outputLength = strlen($output); + $inputLength = strlen($input); + + /* Punycode lookup is case-insensitive. */ + $input = Horde_String::lower($input); + + while ($pos < $inputLength) { + $oldi = $i; + $w = 1; + + for ($k = static::BASE; ; $k += static::BASE) { + $digit = static::$_decodeTable[$input[$pos++]]; + $i = $i + ($digit * $w); + $t = $this->_calculateThreshold($k, $bias); + + if ($digit < $t) { + break; + } + + $w = $w * (static::BASE - $t); + } + + $bias = $this->_adapt($i - $oldi, ++$outputLength, ($oldi === 0)); + $n = $n + (int) ($i / $outputLength); + $i = $i % ($outputLength); + + $output = Horde_String::substr($output, 0, $i, 'UTF-8') . + $this->_codePointToChar($n) . + Horde_String::substr($output, $i, $outputLength - 1, 'UTF-8'); + + ++$i; + } + + return $output; + } + + /** + * Calculate the bias threshold to fall between TMIN and TMAX. + * + * @param integer $k + * @param integer $bias + * + * @return integer + */ + protected function _calculateThreshold($k, $bias) + { + if ($k <= ($bias + static::TMIN)) { + return static::TMIN; + } elseif ($k >= ($bias + static::TMAX)) { + return static::TMAX; + } + return $k - $bias; + } + + /** + * Bias adaptation. + * + * @param integer $delta + * @param integer $numPoints + * @param boolean $firstTime + * + * @return integer + */ + protected function _adapt($delta, $numPoints, $firstTime) + { + $delta = (int) ( + ($firstTime) + ? $delta / static::DAMP + : $delta / 2 + ); + $delta += (int) ($delta / $numPoints); + + $k = 0; + while ($delta > ((static::BASE - static::TMIN) * static::TMAX) / 2) { + $delta = (int) ($delta / (static::BASE - static::TMIN)); + $k = $k + static::BASE; + } + $k = $k + (int) (((static::BASE - static::TMIN + 1) * $delta) / ($delta + static::SKEW)); + + return $k; + } + + /** + * List code points for a given input. + * + * @param string $input + * + * @return array Multi-dimension array with basic, non-basic and + * aggregated code points. + */ + protected function _codePoints($input) + { + $codePoints = array( + 'all' => array(), + 'basic' => array(), + 'nonBasic' => array() + ); + + $len = Horde_String::length($input, 'UTF-8'); + for ($i = 0; $i < $len; ++$i) { + $char = Horde_String::substr($input, $i, 1, 'UTF-8'); + $code = $this->_charToCodePoint($char); + if ($code < 128) { + $codePoints['all'][] = $codePoints['basic'][] = $code; + } else { + $codePoints['all'][] = $codePoints['nonBasic'][] = $code; + } + } + + return $codePoints; + } + + /** + * Convert a single or multi-byte character to its code point. + * + * @param string $char + * + * @return integer + */ + protected function _charToCodePoint($char) + { + $code = ord($char[0]); + if ($code < 128) { + return $code; + } elseif ($code < 224) { + return (($code - 192) * 64) + (ord($char[1]) - 128); + } elseif ($code < 240) { + return (($code - 224) * 4096) + ((ord($char[1]) - 128) * 64) + (ord($char[2]) - 128); + } + return (($code - 240) * 262144) + ((ord($char[1]) - 128) * 4096) + ((ord($char[2]) - 128) * 64) + (ord($char[3]) - 128); + } + + /** + * Convert a code point to its single or multi-byte character + * + * @param integer $code + * + * @return string + */ + protected function _codePointToChar($code) + { + if ($code <= 0x7F) { + return chr($code); + } elseif ($code <= 0x7FF) { + return chr(($code >> 6) + 192) . chr(($code & 63) + 128); + } elseif ($code <= 0xFFFF) { + return chr(($code >> 12) + 224) . chr((($code >> 6) & 63) + 128) . chr(($code & 63) + 128); + } + return chr(($code >> 18) + 240) . chr((($code >> 12) & 63) + 128) . chr((($code >> 6) & 63) + 128) . chr(($code & 63) + 128); + } + +} diff --git a/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Idna/Horde/Idna/Translation.php b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Idna/Horde/Idna/Translation.php new file mode 100644 index 00000000..e4820f22 --- /dev/null +++ b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Idna/Horde/Idna/Translation.php @@ -0,0 +1,40 @@ + + * @category Horde + * @license http://www.horde.org/licenses/bsd BSD + * @package Idna + */ + +/** + * Horde_Idna_Translation is the translation wrapper class for + * Horde_Idna. + * + * @author Jan Schneider + * @category Horde + * @copyright 2017 Horde LLC + * @license http://www.horde.org/licenses/bsd BSD + * @package Idna + * @since Horde_Idna 1.1.0 + */ +class Horde_Idna_Translation extends Horde_Translation_Autodetect +{ + /** + * The translation domain + * + * @var string + */ + protected static $_domain = 'Horde_Idna'; + + /** + * The absolute PEAR path to the translations for the default gettext handler. + * + * @var string + */ + protected static $_pearDirectory = '/daten/dev/lam/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Idna/data'; +} diff --git a/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Idna/data/locale/Horde_Idna.pot b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Idna/data/locale/Horde_Idna.pot new file mode 100644 index 00000000..89a4a026 --- /dev/null +++ b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Idna/data/locale/Horde_Idna.pot @@ -0,0 +1,70 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR Horde LLC (http://www.horde.org/) +# This file is distributed under the same license as the Horde_Idna package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Horde_Idna\n" +"Report-Msgid-Bugs-To: dev@lists.horde.org\n" +"POT-Creation-Date: 2017-07-26 12:13+0200\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/Idna.php:131 +msgid "ACE label does not contain a valid label string" +msgstr "" + +#: lib/Horde/Idna.php:127 +msgid "Contains a dot" +msgstr "" + +#: lib/Horde/Idna.php:119 +msgid "Contains disallowed characters" +msgstr "" + +#: lib/Horde/Idna.php:111 +msgid "Contains hyphen in the third and fourth positions" +msgstr "" + +#: lib/Horde/Idna.php:135 +msgid "Does not meet the IDNA BiDi requirements (for right-to-left characters)" +msgstr "" + +#: lib/Horde/Idna.php:139 +msgid "Does not meet the IDNA CONTEXTJ requirements" +msgstr "" + +#: lib/Horde/Idna.php:94 +msgid "Domain name is empty" +msgstr "" + +#: lib/Horde/Idna.php:99 +msgid "Domain name is too long" +msgstr "" + +#: lib/Horde/Idna.php:107 +msgid "Ends with a hyphen" +msgstr "" + +#: lib/Horde/Idna.php:123 +msgid "Starts with \"xn--\" but does not contain valid Punycode" +msgstr "" + +#: lib/Horde/Idna.php:115 +msgid "Starts with a combining mark" +msgstr "" + +#: lib/Horde/Idna.php:103 +msgid "Starts with a hyphen" +msgstr "" + +#: lib/Horde/Idna.php:143 +msgid "Unknown error" +msgstr "" diff --git a/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Idna/data/locale/de/LC_MESSAGES/Horde_Idna.mo b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Idna/data/locale/de/LC_MESSAGES/Horde_Idna.mo new file mode 100644 index 0000000000000000000000000000000000000000..8d922e4df03e54d895523cf6756be8e0d7d1415d GIT binary patch literal 1645 zcmaKsOOG2x5XT!xc$mi_KsfMFB@)uEpf?@|B`Ys0u}@;iZdQpGp8h^Rboue63qK01S0Hae zzJt69`42$|@84XQ=zj&@#QX1HJpUNn0bjo;L=#NGnC}nZW$+g;+W!W& z!N0(F!OPDI@izD&81uOgB3!*1Q@#Yo8le(Mqs|Ku&qH2-z?FCr5*N~~*K_zqNvho9c(FOlqGS%Wac6UPjn?(1CdXe@+HuJycv|RN zM^5L1AcK_!_mTK<;Ke8T*|@XY-TJ)y$thnjE@Qz)l}y?bm!mK~yBVyd!lDCPCi8Tt zk+q^pS>j$$4k^`}S05NDuTrlH=Q}#-=U!#Tsm=J*F@?65J#ElqDwP|aQBDKxo1w9X zhS)jl#GbQXavEeOlb@m6=wF*|S(ot_oy@4lT^?B%+dyN%_a=xT|Uq;)G50}wmzUF zX$^f>4gmt;&i8+Hhj!O-ND%2{?V9`yF3;^^T77nM%it@Z-)&m% z>Co6KDyIs$ZC&ZxWJdL?Uu~_>EnSqd356V f(|V}ti|rpyyL;a1WcYp4y~pQH literal 0 HcmV?d00001 diff --git a/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Idna/data/locale/de/LC_MESSAGES/Horde_Idna.po b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Idna/data/locale/de/LC_MESSAGES/Horde_Idna.po new file mode 100644 index 00000000..f1708261 --- /dev/null +++ b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Idna/data/locale/de/LC_MESSAGES/Horde_Idna.po @@ -0,0 +1,71 @@ +# German translations for Horde_Idna package. +# Copyright (C) 2017 Horde LLC (http://www.horde.org/) +# This file is distributed under the same license as the Horde_Idna package. +# Jan Schneider , 2017. +# +msgid "" +msgstr "" +"Project-Id-Version: Horde_Idna\n" +"Report-Msgid-Bugs-To: dev@lists.horde.org\n" +"POT-Creation-Date: 2017-07-26 12:13+0200\n" +"PO-Revision-Date: 2017-01-24 11:33+0100\n" +"Last-Translator: Automatically generated\n" +"Language-Team: i18n@lists.horde.org\n" +"Language: de\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/Idna.php:131 +msgid "ACE label does not contain a valid label string" +msgstr "ACE-Label enthält keinen gültigen Labeltext" + +#: lib/Horde/Idna.php:127 +msgid "Contains a dot" +msgstr "Enthält einen Punkt" + +#: lib/Horde/Idna.php:119 +msgid "Contains disallowed characters" +msgstr "Enthält ungültige Zeichen" + +#: lib/Horde/Idna.php:111 +msgid "Contains hyphen in the third and fourth positions" +msgstr "Enthält Bindestrich an der dritten und vierten Stelle" + +#: lib/Horde/Idna.php:135 +msgid "Does not meet the IDNA BiDi requirements (for right-to-left characters)" +msgstr "" +"Entspricht nicht den IDNA-BiDi-Anforderungen (für rechts-nach-links Zeichen)" + +#: lib/Horde/Idna.php:139 +msgid "Does not meet the IDNA CONTEXTJ requirements" +msgstr "Entspricht nicht den IDNA-CONTEXTJ-Anforderungen" + +#: lib/Horde/Idna.php:94 +msgid "Domain name is empty" +msgstr "Domainname ist leer" + +#: lib/Horde/Idna.php:99 +msgid "Domain name is too long" +msgstr "Domainname ist zu lang" + +#: lib/Horde/Idna.php:107 +msgid "Ends with a hyphen" +msgstr "Endet mit einem Bindestrich" + +#: lib/Horde/Idna.php:123 +msgid "Starts with \"xn--\" but does not contain valid Punycode" +msgstr "Beginnt mit \"xn--\" aber enthält keinen gültigen Punycode" + +#: lib/Horde/Idna.php:115 +msgid "Starts with a combining mark" +msgstr "Beginnt mit einem Kombinationszeichen" + +#: lib/Horde/Idna.php:103 +msgid "Starts with a hyphen" +msgstr "Beginnt mit einem Bindestrich" + +#: lib/Horde/Idna.php:143 +msgid "Unknown error" +msgstr "Unbekannter Fehler" diff --git a/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Idna/data/locale/tr/LC_MESSAGES/Horde_Idna.mo b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Idna/data/locale/tr/LC_MESSAGES/Horde_Idna.mo new file mode 100644 index 0000000000000000000000000000000000000000..4d6f96ee2c73ae5ef2f6b5d4828f261fa259f362 GIT binary patch literal 1634 zcmaiz&u?2r5XWDk<%jvHf`o(+ng$6ag6G<)8iGTr=2zQ5lSaWsxuLapVlUpeYj*b~ zb&xo7Ks~{&l8-qdB^OS)+2+g@4oL7%aN)rBy_d#Gpz2EFk9TKw_Peuh{)g($iTu7X)i4}2H=4y=Ov;BD|X@I&y*Gg0&=xDLJrHo?o_H{cBT z5X{aQfmz&N;49$Y;6voN^lXv$hl_=dU%>a_{~fG=7cNE7XW%qg2EPR}T|a@D?j!JZ z@Kneb5Xz9C9if#xcKhIzX+=wg)59xm7*D10LTkIrlA3MdL^H7S zV|TmPZL=X{4Q+-gCrKDd+ctHfORI450U}MeO5Pov-)RXco-CM7(Y}G$KlMBH~c3~qDCgq8fZs?s~4AzpisKAPm zo^};f3o5P^eIA5^q#|Pav z9bm+}Lulbge@nYKYaoyHP^3F}I zeDLLV7FxEhRob{$kCz;a>(@T0T&q+N7;o~9%8vS< zxS3jYwurkcOe+;Fj_WLv8VwKXgGaPDJXl_&PdpCiL^6ImH&sZ>EYosuH%e=(Yb)c6 zRLhl8_Oaoy<9e?PNr4}Pt6hzkn#-TsbC|zhzZK7pk?lh)6J)TetM3Izw?uZuFO+) zY7U!=YeJhV<*md)bzs!u!9F{!sG%GcizL+^dqpbqB&vr8T!houP7uXnzBWAA!>72z zPU(bu=$Q_>se^9P>`sLZ9u4*fN2WPALM+L_&rTjsJJzI$6co@Zr#6h+sKt&u9-mr* zlt6aEs6RZ^A{ib+7EO9F>`P(DTP@C?ugp}G=Q?Snr{#+lG;#?!Jfwyl^-oO)`?f>r zUTUIxE><(@74kAnY~^jFvL!L<>q40@P0<+__i-nktEuKuAGgn%dDIsU, YEAR. +# +msgid "" +msgstr "" +"Project-Id-Version: Horde_Idna\n" +"Report-Msgid-Bugs-To: dev@lists.horde.org\n" +"POT-Creation-Date: 2017-06-09 15:53+0300\n" +"PO-Revision-Date: 2017-06-09 16:18+0300\n" +"Language-Team: İTÜ BİDB \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Generator: Poedit 1.8.12\n" +"Last-Translator: \n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" +"Language: tr\n" + +#: lib/Horde/Idna.php:83 +msgid "ACE label does not contain a valid label string" +msgstr "ACE etiketi geçerli bir etiket dizesi içermiyor" + +#: lib/Horde/Idna.php:79 +msgid "Contains a dot" +msgstr "Bir nokta içeriyor" + +#: lib/Horde/Idna.php:71 +msgid "Contains disallowed characters" +msgstr "İzin verilmeyen karakterler içeriyor" + +#: lib/Horde/Idna.php:63 +msgid "Contains hyphen in the third and fourth positions" +msgstr "Üçüncü ve dördüncü konumda tire içeriyor" + +#: lib/Horde/Idna.php:87 +msgid "Does not meet the IDNA BiDi requirements (for right-to-left characters)" +msgstr "IDNA BiDi gereksinimlerini karşılamıyor (sağdan sola karakterler için)" + +#: lib/Horde/Idna.php:91 +msgid "Does not meet the IDNA CONTEXTJ requirements" +msgstr "IDNA CONTEXTJ gereksinimlerini karşılamıyor" + +#: lib/Horde/Idna.php:46 +msgid "Domain name is empty" +msgstr "Alan adı boş" + +#: lib/Horde/Idna.php:51 +msgid "Domain name is too long" +msgstr "Alan adı çok uzun" + +#: lib/Horde/Idna.php:59 +msgid "Ends with a hyphen" +msgstr "Tire ile bitiyor" + +#: lib/Horde/Idna.php:75 +msgid "Starts with \"xn--\" but does not contain valid Punycode" +msgstr "\"Xn--\" ile başlıyor ancak geçerli Punycode içermiyor" + +#: lib/Horde/Idna.php:67 +msgid "Starts with a combining mark" +msgstr "Birleştirme işaretiyle başlıyor" + +#: lib/Horde/Idna.php:55 +msgid "Starts with a hyphen" +msgstr "Tire ile başlıyor" + +#: lib/Horde/Idna.php:95 +msgid "Unknown error" +msgstr "Bilinmeyen hata" diff --git a/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client.php b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client.php new file mode 100644 index 00000000..36064b85 --- /dev/null +++ b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client.php @@ -0,0 +1,203 @@ + + * @category Horde + * @copyright 2008-2017 Horde LLC + * @license http://www.horde.org/licenses/lgpl21 LGPL 2.1 + * @package Imap_Client + */ +class Horde_Imap_Client +{ + /* Constants for openMailbox() */ + const OPEN_READONLY = 1; + const OPEN_READWRITE = 2; + const OPEN_AUTO = 3; + + /* Constants for listMailboxes() */ + const MBOX_SUBSCRIBED = 1; + const MBOX_SUBSCRIBED_EXISTS = 2; + const MBOX_UNSUBSCRIBED = 3; + const MBOX_ALL = 4; + /* @since 2.23.0 */ + const MBOX_ALL_SUBSCRIBED = 5; + + /* Constants for status() */ + const STATUS_MESSAGES = 1; + const STATUS_RECENT = 2; + const STATUS_UIDNEXT = 4; + const STATUS_UIDVALIDITY = 8; + const STATUS_UNSEEN = 16; + const STATUS_ALL = 32; + const STATUS_FIRSTUNSEEN = 64; + const STATUS_FLAGS = 128; + const STATUS_PERMFLAGS = 256; + const STATUS_HIGHESTMODSEQ = 512; + const STATUS_SYNCMODSEQ = 1024; + const STATUS_SYNCFLAGUIDS = 2048; + const STATUS_UIDNOTSTICKY = 4096; + const STATUS_UIDNEXT_FORCE = 8192; + const STATUS_SYNCVANISHED = 16384; + /* @since 2.12.0 */ + const STATUS_RECENT_TOTAL = 32768; + /* @since 2.14.0 */ + const STATUS_FORCE_REFRESH = 65536; + + /* Constants for search() */ + const SORT_ARRIVAL = 1; + const SORT_CC = 2; + const SORT_DATE = 3; + const SORT_FROM = 4; + const SORT_REVERSE = 5; + const SORT_SIZE = 6; + const SORT_SUBJECT = 7; + const SORT_TO = 8; + /* SORT_THREAD provided for completeness - it is not a valid sort criteria + * for search() (use thread() instead). */ + const SORT_THREAD = 9; + /* Sort criteria defined in RFC 5957 */ + const SORT_DISPLAYFROM = 10; + const SORT_DISPLAYTO = 11; + /* SORT_SEQUENCE does a simple numerical sort on the returned + * UIDs/sequence numbers. */ + const SORT_SEQUENCE = 12; + /* Fuzzy sort criteria defined in RFC 6203 */ + const SORT_RELEVANCY = 13; + /* @since 2.4.0 */ + const SORT_DISPLAYFROM_FALLBACK = 14; + /* @since 2.4.0 */ + const SORT_DISPLAYTO_FALLBACK = 15; + + /* Search results constants */ + const SEARCH_RESULTS_COUNT = 1; + const SEARCH_RESULTS_MATCH = 2; + const SEARCH_RESULTS_MAX = 3; + const SEARCH_RESULTS_MIN = 4; + const SEARCH_RESULTS_SAVE = 5; + /* Fuzzy sort criteria defined in RFC 6203 */ + const SEARCH_RESULTS_RELEVANCY = 6; + + /* Constants for thread() */ + const THREAD_ORDEREDSUBJECT = 1; + const THREAD_REFERENCES = 2; + const THREAD_REFS = 3; + + /* Fetch criteria constants. */ + const FETCH_STRUCTURE = 1; + const FETCH_FULLMSG = 2; + const FETCH_HEADERTEXT = 3; + const FETCH_BODYTEXT = 4; + const FETCH_MIMEHEADER = 5; + const FETCH_BODYPART = 6; + const FETCH_BODYPARTSIZE = 7; + const FETCH_HEADERS = 8; + const FETCH_ENVELOPE = 9; + const FETCH_FLAGS = 10; + const FETCH_IMAPDATE = 11; + const FETCH_SIZE = 12; + const FETCH_UID = 13; + const FETCH_SEQ = 14; + const FETCH_MODSEQ = 15; + /* @since 2.11.0 */ + const FETCH_DOWNGRADED = 16; + + /* Namespace constants. @deprecated */ + const NS_PERSONAL = 1; + const NS_OTHER = 2; + const NS_SHARED = 3; + + /* ACL constants (RFC 4314 [2.1]). */ + const ACL_LOOKUP = 'l'; + const ACL_READ = 'r'; + const ACL_SEEN = 's'; + const ACL_WRITE = 'w'; + const ACL_INSERT = 'i'; + const ACL_POST = 'p'; + const ACL_CREATEMBOX = 'k'; + const ACL_DELETEMBOX = 'x'; + const ACL_DELETEMSGS = 't'; + const ACL_EXPUNGE = 'e'; + const ACL_ADMINISTER = 'a'; + // Old constants (RFC 2086 [3]; RFC 4314 [2.1.1]) + const ACL_CREATE = 'c'; + const ACL_DELETE = 'd'; + + /* System flags. */ + // RFC 3501 [2.3.2] + const FLAG_ANSWERED = '\\answered'; + const FLAG_DELETED = '\\deleted'; + const FLAG_DRAFT = '\\draft'; + const FLAG_FLAGGED = '\\flagged'; + const FLAG_RECENT = '\\recent'; + const FLAG_SEEN = '\\seen'; + // RFC 3503 [3.3] + const FLAG_MDNSENT = '$mdnsent'; + // RFC 5550 [2.8] + const FLAG_FORWARDED = '$forwarded'; + // RFC 5788 registered keywords: + // http://www.ietf.org/mail-archive/web/morg/current/msg00441.html + const FLAG_JUNK = '$junk'; + const FLAG_NOTJUNK = '$notjunk'; + + /* Special-use mailbox attributes (RFC 6154 [2]). */ + const SPECIALUSE_ALL = '\\All'; + const SPECIALUSE_ARCHIVE = '\\Archive'; + const SPECIALUSE_DRAFTS = '\\Drafts'; + const SPECIALUSE_FLAGGED = '\\Flagged'; + const SPECIALUSE_JUNK = '\\Junk'; + const SPECIALUSE_SENT = '\\Sent'; + const SPECIALUSE_TRASH = '\\Trash'; + + /* Constants for sync(). */ + const SYNC_UIDVALIDITY = 0; + const SYNC_FLAGS = 1; + const SYNC_FLAGSUIDS = 2; + const SYNC_NEWMSGS = 4; + const SYNC_NEWMSGSUIDS = 8; + const SYNC_VANISHED = 16; + const SYNC_VANISHEDUIDS = 32; + const SYNC_ALL = 64; + + /** + * Capability dependencies. + * + * @deprecated + * + * @var array + */ + public static $capability_deps = array( + // RFC 7162 [3.2] + 'QRESYNC' => array( + // QRESYNC requires CONDSTORE, but the latter is implied and is + // not required to be listed. + 'ENABLE' + ), + // RFC 5182 [2.1] + 'SEARCHRES' => array( + 'ESEARCH' + ), + // RFC 5255 [3.1] + 'LANGUAGE' => array( + 'NAMESPACE' + ), + // RFC 5957 [1] + 'SORT=DISPLAY' => array( + 'SORT' + ) + ); + +} diff --git a/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Auth/DigestMD5.php b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Auth/DigestMD5.php new file mode 100644 index 00000000..bbeeb4ec --- /dev/null +++ b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Auth/DigestMD5.php @@ -0,0 +1,189 @@ + + * @author Michael Slusarz + * @copyright 2002-2003 Richard Heyes + * @copyright 2011-2017 Horde LLC + * @license http://www.horde.org/licenses/lgpl21 LGPL 2.1 + * @package Imap_Client + */ +class Horde_Imap_Client_Auth_DigestMD5 +{ + /** + * Digest response components. + * + * @var string + */ + protected $_response; + + /** + * Generate the Digest-MD5 response. + * + * @param string $id Authentication id (username). + * @param string $pass Password. + * @param string $challenge The digest challenge sent by the server. + * @param string $hostname The hostname of the machine connecting to. + * @param string $service The service name (e.g. 'imap', 'pop3'). + * + * @throws Horde_Imap_Client_Exception + */ + public function __construct($id, $pass, $challenge, $hostname, $service) + { + $challenge = $this->_parseChallenge($challenge); + $cnonce = $this->_getCnonce(); + $digest_uri = sprintf('%s/%s', $service, $hostname); + + /* Get response value. */ + $A1 = sprintf('%s:%s:%s', pack('H32', hash('md5', sprintf('%s:%s:%s', $id, $challenge['realm'], $pass))), $challenge['nonce'], $cnonce); + $A2 = 'AUTHENTICATE:' . $digest_uri; + $response_value = hash('md5', sprintf('%s:%s:00000001:%s:auth:%s', hash('md5', $A1), $challenge['nonce'], $cnonce, hash('md5', $A2))); + + $this->_response = array( + 'cnonce' => '"' . $cnonce . '"', + 'digest-uri' => '"' . $digest_uri . '"', + 'maxbuf' => $challenge['maxbuf'], + 'nc' => '00000001', + 'nonce' => '"' . $challenge['nonce'] . '"', + 'qop' => 'auth', + 'response' => $response_value, + 'username' => '"' . $id . '"' + ); + + if (strlen($challenge['realm'])) { + $this->_response['realm'] = '"' . $challenge['realm'] . '"'; + } + } + + /** + * Cooerce to string. + * + * @return string The digest response (not base64 encoded). + */ + public function __toString() + { + $out = array(); + foreach ($this->_response as $key => $val) { + $out[] = $key . '=' . $val; + } + return implode(',', $out); + } + + /** + * Return specific digest response directive. + * + * @return mixed Requested directive, or null if it does not exist. + */ + public function __get($name) + { + return isset($this->_response[$name]) + ? $this->_response[$name] + : null; + } + + /** + * Parses and verifies the digest challenge. + * + * @param string $challenge The digest challenge + * + * @return array The parsed challenge as an array with directives as keys. + * + * @throws Horde_Imap_Client_Exception + */ + protected function _parseChallenge($challenge) + { + $tokens = array( + 'maxbuf' => 65536, + 'realm' => '' + ); + + preg_match_all('/([a-z-]+)=("[^"]+(? + * @category Horde + * @copyright 2015-2017 Horde LLC + * @license http://www.horde.org/licenses/lgpl21 LGPL 2.1 + * @package Imap_Client + * @since 2.29.0 + */ +class Horde_Imap_Client_Auth_Scram +{ + /** + * AuthMessage (RFC 5802 [3]). + * + * @var string + */ + protected $_authmsg; + + /** + * Hash name. + * + * @var string + */ + protected $_hash; + + /** + * Number of Hi iterations (RFC 5802 [2]). + * + * @var integer + */ + protected $_iterations; + + /** + * Nonce. + * + * @var string + */ + protected $_nonce; + + /** + * Password. + * + * @var string + */ + protected $_pass; + + /** + * Server salt. + * + * @var string + */ + protected $_salt; + + /** + * Calculated server signature value. + * + * @var string + */ + protected $_serversig; + + /** + * Username. + * + * @var string + */ + protected $_user; + + /** + * Constructor. + * + * @param string $user Username. + * @param string $pass Password. + * @param string $hash Hash name. + * + * @throws Horde_Imap_Client_Exception + */ + public function __construct($user, $pass, $hash = 'SHA1') + { + $error = false; + + $this->_hash = $hash; + + try { + if (!class_exists('Horde_Stringprep') || + !class_exists('Horde_Crypt_Blowfish_Pbkdf2')) { + throw new Exception(); + } + + Horde_Stringprep::autoload(); + $saslprep = new Znerol\Component\Stringprep\Profile\SASLprep(); + + $this->_user = $saslprep->apply( + $user, + 'UTF-8', + Znerol\Component\Stringprep\Profile::MODE_QUERY + ); + $this->_pass = $saslprep->apply( + $pass, + 'UTF-8', + Znerol\Component\Stringprep\Profile::MODE_STORE + ); + } catch (Znerol\Component\Stringprep\ProfileException $e) { + $error = true; + } catch (Exception $e) { + $error = true; + } + + if ($error) { + throw new Horde_Imap_Client_Exception( + Horde_Imap_Client_Translation::r("Authentication failure."), + Horde_Imap_Client_Exception::LOGIN_AUTHORIZATIONFAILED + ); + } + + /* Generate nonce. (Done here so this can be overwritten for + * testing purposes.) */ + $this->_nonce = strval(new Horde_Support_Randomid()); + } + + /** + * Return the initial client message. + * + * @return string Initial client message. + */ + public function getClientFirstMessage() + { + /* n: client doesn't support channel binding, + * , + * n=: SASLprepped username with "," and "=" escaped, + * r=: Random nonce */ + $this->_authmsg = 'n=' . str_replace( + array(',', '='), + array('=2C', '=3D'), + $this->_user + ) . ',r=' . $this->_nonce; + + return 'n,,' . $this->_authmsg; + } + + /** + * Process the initial server message response. + * + * @param string $msg Initial server response. + * + * @return boolean False if authentication failed at this stage. + */ + public function parseServerFirstMessage($msg) + { + $i = $r = $s = false; + + foreach (explode(',', $msg) as $val) { + list($attr, $aval) = array_map('trim', explode('=', $val, 2)); + + switch ($attr) { + case 'i': + $this->_iterations = intval($aval); + $i = true; + break; + + case 'r': + /* Beginning of server-provided nonce MUST be the same as the + * nonce we provided. */ + if (strpos($aval, $this->_nonce) !== 0) { + return false; + } + $this->_nonce = $aval; + $r = true; + break; + + case 's': + $this->_salt = base64_decode($aval); + $s = true; + break; + } + } + + if ($i && $r && $s) { + $this->_authmsg .= ',' . $msg; + return true; + } + + return false; + } + + /** + * Return the final client message. + * + * @return string Final client message. + */ + public function getClientFinalMessage() + { + $final_msg = 'c=biws,r=' . $this->_nonce; + + /* Salted password. */ + $s_pass = strval(new Horde_Crypt_Blowfish_Pbkdf2( + $this->_pass, + strlen(hash($this->_hash, '', true)), + array( + 'algo' => $this->_hash, + 'i_count' => $this->_iterations, + 'salt' => $this->_salt + ) + )); + + /* Client key. */ + $c_key = hash_hmac($this->_hash, 'Client Key', $s_pass, true); + + /* Stored key. */ + $s_key = hash($this->_hash, $c_key, true); + + /* Client signature. */ + $auth_msg = $this->_authmsg . ',' . $final_msg; + $c_sig = hash_hmac($this->_hash, $auth_msg, $s_key, true); + + /* Proof. */ + $proof = $c_key ^ $c_sig; + + /* Server signature. */ + $this->_serversig = hash_hmac( + $this->_hash, + $auth_msg, + hash_hmac($this->_hash, 'Server Key', $s_pass, true), + true + ); + + /* c=biws: channel-binding ("biws" = base64('n,,')), + * p=: base64 encoded ClientProof, + * r=: Nonce as returned from the server. */ + return $final_msg . ',p=' . base64_encode($proof); + } + + /** + * Process the final server message response. + * + * @param string $msg Final server response. + * + * @return boolean False if authentication failed. + */ + public function parseServerFinalMessage($msg) + { + foreach (explode(',', $msg) as $val) { + list($attr, $aval) = array_map('trim', explode('=', $val, 2)); + + switch ($attr) { + case 'e': + return false; + + case 'v': + return (base64_decode($aval) === $this->_serversig); + } + } + + return false; + } + +} diff --git a/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Base.php b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Base.php new file mode 100644 index 00000000..1a2f53cd --- /dev/null +++ b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Base.php @@ -0,0 +1,4082 @@ + + * @category Horde + * @copyright 2008-2017 Horde LLC + * @license http://www.horde.org/licenses/lgpl21 LGPL 2.1 + * @package Imap_Client + * + * @property-read Horde_Imap_Client_Base_Alert $alerts_ob + The alert reporting object (@since 2.26.0) + * @property-read Horde_Imap_Client_Data_Capability $capability + * A capability object. (@since 2.24.0) + * @property-read Horde_Imap_Client_Data_SearchCharset $search_charset + * A search charset object. (@since 2.24.0) + * @property-read Horde_Imap_Client_Url $url The URL object for the current + * connection parameters (@since 2.24.0) + */ +abstract class Horde_Imap_Client_Base +implements Serializable, SplObserver +{ + /** Serialized version. */ + const VERSION = 3; + + /** Cache names for miscellaneous data. */ + const CACHE_MODSEQ = '_m'; + const CACHE_SEARCH = '_s'; + /* @since 2.9.0 */ + const CACHE_SEARCHID = '_i'; + + /** Cache names used exclusively within this class. @since 2.11.0 */ + const CACHE_DOWNGRADED = 'HICdg'; + + /** + * The list of fetch fields that can be cached, and their cache names. + * + * @var array + */ + public $cacheFields = array( + Horde_Imap_Client::FETCH_ENVELOPE => 'HICenv', + Horde_Imap_Client::FETCH_FLAGS => 'HICflags', + Horde_Imap_Client::FETCH_HEADERS => 'HIChdrs', + Horde_Imap_Client::FETCH_IMAPDATE => 'HICdate', + Horde_Imap_Client::FETCH_SIZE => 'HICsize', + Horde_Imap_Client::FETCH_STRUCTURE => 'HICstruct' + ); + + /** + * Has the internal configuration changed? + * + * @var boolean + */ + public $changed = false; + + /** + * Horde_Imap_Client is optimized for short (i.e. 1 seconds) scripts. It + * makes heavy use of mailbox caching to save on server accesses. This + * property should be set to false for long-running scripts, or else + * status() data may not reflect the current state of the mailbox on the + * server. + * + * @since 2.14.0 + * + * @var boolean + */ + public $statuscache = true; + + /** + * Alerts reporting object. + * + * @var Horde_Imap_Client_Base_Alerts + */ + protected $_alerts; + + /** + * The Horde_Imap_Client_Cache object. + * + * @var Horde_Imap_Client_Cache + */ + protected $_cache = null; + + /** + * Connection to the IMAP server. + * + * @var Horde\Socket\Client + */ + protected $_connection = null; + + /** + * The debug object. + * + * @var Horde_Imap_Client_Base_Debug + */ + protected $_debug = null; + + /** + * The default ports to use for a connection. + * First element is non-secure, second is SSL. + * + * @var array + */ + protected $_defaultPorts = array(); + + /** + * The fetch data object type to return. + * + * @var string + */ + protected $_fetchDataClass = 'Horde_Imap_Client_Data_Fetch'; + + /** + * Cached server data. + * + * @var array + */ + protected $_init; + + /** + * Is there an active authenticated connection to the IMAP Server? + * + * @var boolean + */ + protected $_isAuthenticated = false; + + /** + * The current mailbox selection mode. + * + * @var integer + */ + protected $_mode = 0; + + /** + * Hash containing connection parameters. + * This hash never changes. + * + * @var array + */ + protected $_params = array(); + + /** + * The currently selected mailbox. + * + * @var Horde_Imap_Client_Mailbox + */ + protected $_selected = null; + + /** + * Temp array (destroyed at end of process). + * + * @var array + */ + protected $_temp = array(); + + /** + * Constructor. + * + * @param array $params Configuration parameters: + *
+     * - cache: (array) If set, caches data from fetch(), search(), and
+     *          thread() calls. Requires the horde/Cache package to be
+     *          installed. The array can contain the following keys (see
+     *          Horde_Imap_Client_Cache for default values):
+     *   - backend: [REQUIRED (or cacheob)] (Horde_Imap_Client_Cache_Backend)
+     *              Backend cache driver [@since 2.9.0].
+     *   - fetch_ignore: (array) A list of mailboxes to ignore when storing
+     *                   fetch data.
+     *   - fields: (array) The fetch criteria to cache. If not defined, all
+     *             cacheable data is cached. The following is a list of
+     *             criteria that can be cached:
+     *     - Horde_Imap_Client::FETCH_ENVELOPE
+     *     - Horde_Imap_Client::FETCH_FLAGS
+     *       Only if server supports CONDSTORE extension
+     *     - Horde_Imap_Client::FETCH_HEADERS
+     *       Only for queries that specifically request caching
+     *     - Horde_Imap_Client::FETCH_IMAPDATE
+     *     - Horde_Imap_Client::FETCH_SIZE
+     *     - Horde_Imap_Client::FETCH_STRUCTURE
+     * - capability_ignore: (array) A list of IMAP capabilites to ignore, even
+     *                      if they are supported on the server.
+     *                      DEFAULT: No supported capabilities are ignored.
+     * - comparator: (string) The search comparator to use instead of the
+     *               default server comparator. See setComparator() for
+     *               format.
+     *               DEFAULT: Use the server default
+     * - context: (array) Any context parameters passed to
+     *            stream_create_context(). @since 2.27.0
+     * - debug: (string) If set, will output debug information to the stream
+     *          provided. The value can be any PHP supported wrapper that can
+     *          be opened via PHP's fopen() function.
+     *          DEFAULT: No debug output
+     * - hostspec: (string) The hostname or IP address of the server.
+     *             DEFAULT: 'localhost'
+     * - id: (array) Send ID information to the server (only if server
+     *       supports the ID extension). An array with the keys as the fields
+     *       to send and the values being the associated values. See RFC 2971
+     *       [3.3] for a list of standard field values.
+     *       DEFAULT: No info sent to server
+     * - lang: (array) A list of languages (in priority order) to be used to
+     *         display human readable messages.
+     *         DEFAULT: Messages output in IMAP server default language
+     * - password: (mixed) The user password. Either a string or a
+     *             Horde_Imap_Client_Base_Password object [@since 2.14.0].
+     * - port: (integer) The server port to which we will connect.
+     *         DEFAULT: 143 (imap or imap w/TLS) or 993 (imaps)
+     * - secure: (string) Use SSL or TLS to connect. Values:
+     *   - false (No encryption)
+     *   - 'ssl' (Auto-detect SSL version)
+     *   - 'sslv2' (Force SSL version 3)
+     *   - 'sslv3' (Force SSL version 2)
+     *   - 'tls' (TLS; started via protocol-level negotation over
+     *     unencrypted channel; RECOMMENDED way of initiating secure
+     *     connection)
+     *   - 'tlsv1' (TLS direct version 1.x connection to server) [@since
+     *     2.16.0]
+     *   - true (TLS if available/necessary) [@since 2.15.0]
+     *     DEFAULT: false
+     * - timeout: (integer)  Connection timeout, in seconds.
+     *            DEFAULT: 30 seconds
+     * - username: (string) [REQUIRED] The username.
+     * - authusername (string) The username used for SASL authentication.
+     * 	 If specified this is the user name whose password is used 
+     * 	 (e.g. administrator).
+     * 	 Only valid for RFC 2595/4616 - PLAIN SASL mechanism.
+     * 	 DEFAULT: the same value provided in the username parameter.
+     * 
+ */ + public function __construct(array $params = array()) + { + if (!isset($params['username'])) { + throw new InvalidArgumentException('Horde_Imap_Client requires a username.'); + } + + $this->_setInit(); + + // Default values. + $params = array_merge(array( + 'context' => array(), + 'hostspec' => 'localhost', + 'secure' => false, + 'timeout' => 30 + ), array_filter($params)); + + if (!isset($params['port']) && strpos($params['hostspec'], 'unix://') !== 0) { + $params['port'] = (!empty($params['secure']) && in_array($params['secure'], array('ssl', 'sslv2', 'sslv3'), true)) + ? $this->_defaultPorts[1] + : $this->_defaultPorts[0]; + } + + if (empty($params['cache'])) { + $params['cache'] = array('fields' => array()); + } elseif (empty($params['cache']['fields'])) { + $params['cache']['fields'] = $this->cacheFields; + } else { + $params['cache']['fields'] = array_flip($params['cache']['fields']); + } + + if (empty($params['cache']['fetch_ignore'])) { + $params['cache']['fetch_ignore'] = array(); + } + + $this->_params = $params; + if (isset($params['password'])) { + $this->setParam('password', $params['password']); + } + + $this->changed = true; + $this->_initOb(); + } + + /** + * Get encryption key. + * + * @deprecated Pass callable into 'password' parameter instead. + * + * @return string The encryption key. + */ + protected function _getEncryptKey() + { + if (is_callable($ekey = $this->getParam('encryptKey'))) { + return call_user_func($ekey); + } + + throw new InvalidArgumentException('encryptKey parameter is not a valid callback.'); + } + + /** + * Do initialization tasks. + */ + protected function _initOb() + { + register_shutdown_function(array($this, 'shutdown')); + + $this->_alerts = new Horde_Imap_Client_Base_Alerts(); + // @todo: Remove (BC) + $this->_alerts->attach($this); + + $this->_debug = ($debug = $this->getParam('debug')) + ? new Horde_Imap_Client_Base_Debug($debug) + : new Horde_Support_Stub(); + + // @todo: Remove (BC purposes) + if (isset($this->_init['capability']) && + !is_object($this->_init['capability'])) { + $this->_setInit('capability'); + } + + foreach (array('capability', 'search_charset') as $val) { + if (isset($this->_init[$val])) { + $this->_init[$val]->attach($this); + } + } + } + + /** + * Shutdown actions. + */ + public function shutdown() + { + try { + $this->logout(); + } catch (Horde_Imap_Client_Exception $e) { + } + } + + /** + * This object can not be cloned. + */ + public function __clone() + { + throw new LogicException('Object cannot be cloned.'); + } + + /** + */ + public function update(SplSubject $subject) + { + if (($subject instanceof Horde_Imap_Client_Data_Capability) || + ($subject instanceof Horde_Imap_Client_Data_SearchCharset)) { + $this->changed = true; + } + + /* @todo: BC - remove */ + if ($subject instanceof Horde_Imap_Client_Base_Alerts) { + $this->_temp['alerts'][] = $subject->getLast()->alert; + } + } + + /** + */ + public function serialize() + { + return serialize(array( + 'i' => $this->_init, + 'p' => $this->_params, + 'v' => self::VERSION + )); + } + + /** + */ + public function unserialize($data) + { + $data = @unserialize($data); + if (!is_array($data) || + !isset($data['v']) || + ($data['v'] != self::VERSION)) { + throw new Exception('Cache version change'); + } + + $this->_init = $data['i']; + $this->_params = $data['p']; + + $this->_initOb(); + } + + /** + */ + public function __get($name) + { + switch ($name) { + case 'alerts_ob': + return $this->_alerts; + + case 'capability': + return $this->_capability(); + + case 'search_charset': + if (!isset($this->_init['search_charset'])) { + $this->_init['search_charset'] = new Horde_Imap_Client_Data_SearchCharset(); + $this->_init['search_charset']->attach($this); + } + $this->_init['search_charset']->setBaseOb($this); + return $this->_init['search_charset']; + + case 'url': + $url = new Horde_Imap_Client_Url(); + $url->hostspec = $this->getParam('hostspec'); + $url->port = $this->getParam('port'); + $url->protocol = 'imap'; + return $url; + } + } + + /** + * Set an initialization value. + * + * @param string $key The initialization key. If null, resets all keys. + * @param mixed $val The cached value. If null, removes the key. + */ + public function _setInit($key = null, $val = null) + { + if (is_null($key)) { + $this->_init = array(); + } elseif (is_null($val)) { + unset($this->_init[$key]); + } else { + switch ($key) { + case 'capability': + if ($ci = $this->getParam('capability_ignore')) { + $ignored = array(); + + foreach ($ci as $val2) { + $c = explode('=', $val2); + + if ($val->query($c[0], isset($c[1]) ? $c[1] : null)) { + $ignored[] = $val2; + $val->remove($c[0], isset($c[1]) ? $c[1] : null); + } + } + + if ($this->_debug->debug && !empty($ignored)) { + $this->_debug->info(sprintf( + 'CONFIG: IGNORING these IMAP capabilities: %s', + implode(', ', $ignored) + )); + } + } + + $val->attach($this); + break; + } + + /* Nothing has changed. */ + if (isset($this->_init[$key]) && ($this->_init[$key] === $val)) { + return; + } + + $this->_init[$key] = $val; + } + + $this->changed = true; + } + + /** + * Initialize the Horde_Imap_Client_Cache object, if necessary. + * + * @param boolean $current If true, we are going to update the currently + * selected mailbox. Add an additional check to + * see if caching is available in current + * mailbox. + * + * @return boolean Returns true if caching is enabled. + */ + protected function _initCache($current = false) + { + $c = $this->getParam('cache'); + + if (empty($c['fields'])) { + return false; + } + + if (is_null($this->_cache)) { + if (isset($c['backend'])) { + $backend = $c['backend']; + } elseif (isset($c['cacheob'])) { + /* Deprecated */ + $backend = new Horde_Imap_Client_Cache_Backend_Cache($c); + } else { + return false; + } + + $this->_cache = new Horde_Imap_Client_Cache(array( + 'backend' => $backend, + 'baseob' => $this, + 'debug' => $this->_debug + )); + } + + return $current + /* If UIDs are labeled as not sticky, don't cache since UIDs will + * change on every access. */ + ? !($this->_mailboxOb()->getStatus(Horde_Imap_Client::STATUS_UIDNOTSTICKY)) + : true; + } + + /** + * Returns a value from the internal params array. + * + * @param string $key The param key. + * + * @return mixed The param value, or null if not found. + */ + public function getParam($key) + { + /* Passwords may be stored encrypted. */ + switch ($key) { + case 'password': + if (isset($this->_params[$key]) && + ($this->_params[$key] instanceof Horde_Imap_Client_Base_Password)) { + return $this->_params[$key]->getPassword(); + } + + // DEPRECATED + if (!empty($this->_params['_passencrypt'])) { + try { + $secret = new Horde_Secret(); + return $secret->read($this->_getEncryptKey(), $this->_params['password']); + } catch (Exception $e) { + return null; + } + } + break; + } + + return isset($this->_params[$key]) + ? $this->_params[$key] + : null; + } + + /** + * Sets a configuration parameter value. + * + * @param string $key The param key. + * @param mixed $val The param value. + */ + public function setParam($key, $val) + { + switch ($key) { + case 'password': + if ($val instanceof Horde_Imap_Client_Base_Password) { + break; + } + + // DEPRECATED: Encrypt password. + try { + $encrypt_key = $this->_getEncryptKey(); + if (strlen($encrypt_key)) { + $secret = new Horde_Secret(); + $val = $secret->write($encrypt_key, $val); + $this->_params['_passencrypt'] = true; + } + } catch (Exception $e) {} + break; + } + + $this->_params[$key] = $val; + $this->changed = true; + } + + /** + * Returns the Horde_Imap_Client_Cache object used, if available. + * + * @return mixed Either the cache object or null. + */ + public function getCache() + { + $this->_initCache(); + return $this->_cache; + } + + /** + * Returns the correct IDs object for use with this driver. + * + * @param mixed $ids Either self::ALL, self::SEARCH_RES, self::LARGEST, + * Horde_Imap_Client_Ids object, array, or sequence + * string. + * @param boolean $sequence Are $ids message sequence numbers? + * + * @return Horde_Imap_Client_Ids The IDs object. + */ + public function getIdsOb($ids = null, $sequence = false) + { + return new Horde_Imap_Client_Ids($ids, $sequence); + } + + /** + * Returns whether the IMAP server supports the given capability + * (See RFC 3501 [6.1.1]). + * + * @deprecated Use $capability property instead. + * + * @param string $capability The capability string to query. + * + * @return mixed True if the server supports the queried capability, + * false if it doesn't, or an array if the capability can + * contain multiple values. + */ + public function queryCapability($capability) + { + try { + $c = $this->_capability(); + return ($out = $c->getParams($capability)) + ? $out + : $c->query($capability); + } catch (Horde_Imap_Client_Exception $e) { + return false; + } + } + + /** + * Get CAPABILITY information from the IMAP server. + * + * @deprecated Use $capability property instead. + * + * @return array The capability array. + * + * @throws Horde_Imap_Client_Exception + */ + public function capability() + { + return $this->_capability()->toArray(); + } + + /** + * Query server capability. + * + * Required because internal code can't call capability via magic method + * directly - it may not exist yet, the creation code may call capability + * recursively, and __get() doesn't allow recursive calls to the same + * property (chicken/egg issue). + * + * @return mixed The capability object if no arguments provided. If + * arguments are provided, they are passed to the query() + * method and this value is returned. + * @throws Horde_Imap_Client_Exception + */ + protected function _capability() + { + if (!isset($this->_init['capability'])) { + $this->_initCapability(); + } + + return ($args = func_num_args()) + ? $this->_init['capability']->query(func_get_arg(0), ($args > 1) ? func_get_arg(1) : null) + : $this->_init['capability']; + } + + /** + * Retrieve capability information from the IMAP server. + * + * @throws Horde_Imap_Client_Exception + */ + abstract protected function _initCapability(); + + /** + * Send a NOOP command (RFC 3501 [6.1.2]). + * + * @throws Horde_Imap_Client_Exception + */ + public function noop() + { + if (!$this->_connection) { + // NOOP can be called in the unauthenticated state. + $this->_connect(); + } + $this->_noop(); + } + + /** + * Send a NOOP command. + * + * @throws Horde_Imap_Client_Exception + */ + abstract protected function _noop(); + + /** + * Get the NAMESPACE information from the IMAP server (RFC 2342). + * + * @param array $additional If the server supports namespaces, any + * additional namespaces to add to the + * namespace list that are not broadcast by + * the server. The namespaces must be UTF-8 + * strings. + * @param array $opts Additional options: + * - ob_return: (boolean) If true, returns a + * Horde_Imap_Client_Namespace_List object instead of an + * array. + * + * @return mixed A Horde_Imap_Client_Namespace_List object if + * 'ob_return', is true. Otherwise, an array of namespace + * objects (@deprecated) with the name as the key (UTF-8) + * and the following values: + *
+     *  - delimiter: (string) The namespace delimiter.
+     *  - hidden: (boolean) Is this a hidden namespace?
+     *  - name: (string) The namespace name (UTF-8).
+     *  - translation: (string) Returns the translated name of the namespace
+     *                 (UTF-8). Requires RFC 5255 and a previous call to
+     *                 setLanguage().
+     *  - type: (integer) The namespace type. Either:
+     *    - Horde_Imap_Client::NS_PERSONAL
+     *    - Horde_Imap_Client::NS_OTHER
+     *    - Horde_Imap_Client::NS_SHARED
+     * 
+ * + * @throws Horde_Imap_Client_Exception + */ + public function getNamespaces( + array $additional = array(), array $opts = array() + ) + { + $additional = array_map('strval', $additional); + $sig = hash( + 'md5', + json_encode($additional) . intval(empty($opts['ob_return'])) + ); + + if (isset($this->_init['namespace'][$sig])) { + $ns = $this->_init['namespace'][$sig]; + } else { + $this->login(); + + $ns = $this->_getNamespaces(); + + /* Skip namespaces if we have already auto-detected them. Also, + * hidden namespaces cannot be empty. */ + $to_process = array_diff(array_filter($additional, 'strlen'), array_map('strlen', iterator_to_array($ns))); + if (!empty($to_process)) { + foreach ($this->listMailboxes($to_process, Horde_Imap_Client::MBOX_ALL, array('delimiter' => true)) as $key => $val) { + $ob = new Horde_Imap_Client_Data_Namespace(); + $ob->delimiter = $val['delimiter']; + $ob->hidden = true; + $ob->name = $key; + $ob->type = $ob::NS_SHARED; + $ns[$val] = $ob; + } + } + + if (!count($ns)) { + /* This accurately determines the namespace information of the + * base namespace if the NAMESPACE command is not supported. + * See: RFC 3501 [6.3.8] */ + $mbox = $this->listMailboxes('', Horde_Imap_Client::MBOX_ALL, array('delimiter' => true)); + $first = reset($mbox); + + $ob = new Horde_Imap_Client_Data_Namespace(); + $ob->delimiter = $first['delimiter']; + $ns[''] = $ob; + } + + $this->_init['namespace'][$sig] = $ns; + $this->_setInit('namespace', $this->_init['namespace']); + } + + if (!empty($opts['ob_return'])) { + return $ns; + } + + /* @todo Remove for 3.0 */ + $out = array(); + foreach ($ns as $key => $val) { + $out[$key] = array( + 'delimiter' => $val->delimiter, + 'hidden' => $val->hidden, + 'name' => $val->name, + 'translation' => $val->translation, + 'type' => $val->type + ); + } + + return $out; + } + + /** + * Get the NAMESPACE information from the IMAP server. + * + * @return Horde_Imap_Client_Namespace_List Namespace list object. + * + * @throws Horde_Imap_Client_Exception + */ + abstract protected function _getNamespaces(); + + /** + * Display if connection to the server has been secured via TLS or SSL. + * + * @return boolean True if the IMAP connection is secured. + */ + public function isSecureConnection() + { + return ($this->_connection && $this->_connection->secure); + } + + /** + * Connect to the remote server. + * + * @throws Horde_Imap_Client_Exception + */ + abstract protected function _connect(); + + /** + * Return a list of alerts that MUST be presented to the user (RFC 3501 + * [7.1]). + * + * @deprecated Add an observer to the $alerts_ob property instead. + * + * @return array An array of alert messages. + */ + public function alerts() + { + $alerts = isset($this->_temp['alerts']) + ? $this->_temp['alerts'] + : array(); + unset($this->_temp['alerts']); + return $alerts; + } + + /** + * Login to the IMAP server. + * + * @throws Horde_Imap_Client_Exception + */ + public function login() + { + if (!$this->_isAuthenticated && $this->_login()) { + if ($this->getParam('id')) { + try { + $this->sendID(); + /* ID is queued - force sending the queued command. */ + $this->_sendCmd($this->_pipeline()); + } catch (Horde_Imap_Client_Exception_NoSupportExtension $e) { + // Ignore if server doesn't support ID extension. + } + } + + if ($this->getParam('comparator')) { + try { + $this->setComparator(); + } catch (Horde_Imap_Client_Exception_NoSupportExtension $e) { + // Ignore if server doesn't support I18NLEVEL=2 + } + } + } + + $this->_isAuthenticated = true; + } + + /** + * Login to the IMAP server. + * + * @return boolean Return true if global login tasks should be run. + * + * @throws Horde_Imap_Client_Exception + */ + abstract protected function _login(); + + /** + * Logout from the IMAP server (see RFC 3501 [6.1.3]). + */ + public function logout() + { + if ($this->_isAuthenticated && $this->_connection->connected) { + $this->_logout(); + $this->_connection->close(); + } + + $this->_connection = $this->_selected = null; + $this->_isAuthenticated = false; + $this->_mode = 0; + } + + /** + * Logout from the IMAP server (see RFC 3501 [6.1.3]). + */ + abstract protected function _logout(); + + /** + * Send ID information to the IMAP server (RFC 2971). + * + * @param array $info Overrides the value of the 'id' param and sends + * this information instead. + * + * @throws Horde_Imap_Client_Exception + * @throws Horde_Imap_Client_Exception_NoSupportExtension + */ + public function sendID($info = null) + { + if (!$this->_capability('ID')) { + throw new Horde_Imap_Client_Exception_NoSupportExtension('ID'); + } + + $this->_sendID(is_null($info) ? ($this->getParam('id') ?: array()) : $info); + } + + /** + * Send ID information to the IMAP server (RFC 2971). + * + * @param array $info The information to send to the server. + * + * @throws Horde_Imap_Client_Exception + */ + abstract protected function _sendID($info); + + /** + * Return ID information from the IMAP server (RFC 2971). + * + * @return array An array of information returned, with the keys as the + * 'field' and the values as the 'value'. + * + * @throws Horde_Imap_Client_Exception + * @throws Horde_Imap_Client_Exception_NoSupportExtension + */ + public function getID() + { + if (!$this->_capability('ID')) { + throw new Horde_Imap_Client_Exception_NoSupportExtension('ID'); + } + + return $this->_getID(); + } + + /** + * Return ID information from the IMAP server (RFC 2971). + * + * @return array An array of information returned, with the keys as the + * 'field' and the values as the 'value'. + * + * @throws Horde_Imap_Client_Exception + */ + abstract protected function _getID(); + + /** + * Sets the preferred language for server response messages (RFC 5255). + * + * @param array $langs Overrides the value of the 'lang' param and sends + * this list of preferred languages instead. The + * special string 'i-default' can be used to restore + * the language to the server default. + * + * @return string The language accepted by the server, or null if the + * default language is used. + * + * @throws Horde_Imap_Client_Exception + */ + public function setLanguage($langs = null) + { + $lang = null; + + if ($this->_capability('LANGUAGE')) { + $lang = is_null($langs) + ? $this->getParam('lang') + : $langs; + } + + return is_null($lang) + ? null + : $this->_setLanguage($lang); + } + + /** + * Sets the preferred language for server response messages (RFC 5255). + * + * @param array $langs The preferred list of languages. + * + * @return string The language accepted by the server, or null if the + * default language is used. + * + * @throws Horde_Imap_Client_Exception + */ + abstract protected function _setLanguage($langs); + + /** + * Gets the preferred language for server response messages (RFC 5255). + * + * @param array $list If true, return the list of available languages. + * + * @return mixed If $list is true, the list of languages available on the + * server (may be empty). If false, the language used by + * the server, or null if the default language is used. + * + * @throws Horde_Imap_Client_Exception + */ + public function getLanguage($list = false) + { + if (!$this->_capability('LANGUAGE')) { + return $list ? array() : null; + } + + return $this->_getLanguage($list); + } + + /** + * Gets the preferred language for server response messages (RFC 5255). + * + * @param array $list If true, return the list of available languages. + * + * @return mixed If $list is true, the list of languages available on the + * server (may be empty). If false, the language used by + * the server, or null if the default language is used. + * + * @throws Horde_Imap_Client_Exception + */ + abstract protected function _getLanguage($list); + + /** + * Open a mailbox. + * + * @param mixed $mailbox The mailbox to open. Either a + * Horde_Imap_Client_Mailbox object or a string + * (UTF-8). + * @param integer $mode The access mode. Either + * - Horde_Imap_Client::OPEN_READONLY + * - Horde_Imap_Client::OPEN_READWRITE + * - Horde_Imap_Client::OPEN_AUTO + * + * @throws Horde_Imap_Client_Exception + */ + public function openMailbox($mailbox, $mode = Horde_Imap_Client::OPEN_AUTO) + { + $this->login(); + + $change = false; + $mailbox = Horde_Imap_Client_Mailbox::get($mailbox); + + if ($mode == Horde_Imap_Client::OPEN_AUTO) { + if (is_null($this->_selected) || + !$mailbox->equals($this->_selected)) { + $mode = Horde_Imap_Client::OPEN_READONLY; + $change = true; + } + } else { + $change = (is_null($this->_selected) || + !$mailbox->equals($this->_selected) || + ($mode != $this->_mode)); + } + + if ($change) { + $this->_openMailbox($mailbox, $mode); + $this->_mailboxOb()->open = true; + if ($this->_initCache(true)) { + $this->_condstoreSync(); + } + } + } + + /** + * Open a mailbox. + * + * @param Horde_Imap_Client_Mailbox $mailbox The mailbox to open. + * @param integer $mode The access mode. + * + * @throws Horde_Imap_Client_Exception + */ + abstract protected function _openMailbox(Horde_Imap_Client_Mailbox $mailbox, + $mode); + + /** + * Called when the selected mailbox is changed. + * + * @param mixed $mailbox The selected mailbox or null. + * @param integer $mode The access mode. + */ + protected function _changeSelected($mailbox = null, $mode = null) + { + $this->_mode = $mode; + if (is_null($mailbox)) { + $this->_selected = null; + } else { + $this->_selected = clone $mailbox; + $this->_mailboxOb()->reset(); + } + } + + /** + * Return the Horde_Imap_Client_Base_Mailbox object. + * + * @param string $mailbox The mailbox name. Defaults to currently + * selected mailbox. + * + * @return Horde_Imap_Client_Base_Mailbox Mailbox object. + */ + protected function _mailboxOb($mailbox = null) + { + $name = is_null($mailbox) + ? strval($this->_selected) + : strval($mailbox); + + if (!isset($this->_temp['mailbox_ob'][$name])) { + $this->_temp['mailbox_ob'][$name] = new Horde_Imap_Client_Base_Mailbox(); + } + + return $this->_temp['mailbox_ob'][$name]; + } + + /** + * Return the currently opened mailbox and access mode. + * + * @return mixed Null if no mailbox selected, or an array with two + * elements: + * - mailbox: (Horde_Imap_Client_Mailbox) The mailbox object. + * - mode: (integer) Current mode. + * + * @throws Horde_Imap_Client_Exception + */ + public function currentMailbox() + { + return is_null($this->_selected) + ? null + : array( + 'mailbox' => clone $this->_selected, + 'mode' => $this->_mode + ); + } + + /** + * Create a mailbox. + * + * @param mixed $mailbox The mailbox to create. Either a + * Horde_Imap_Client_Mailbox object or a string + * (UTF-8). + * @param array $opts Additional options: + * - special_use: (array) An array of special-use flags to mark the + * mailbox with. The server MUST support RFC 6154. + * + * @throws Horde_Imap_Client_Exception + */ + public function createMailbox($mailbox, array $opts = array()) + { + $this->login(); + + if (!$this->_capability('CREATE-SPECIAL-USE')) { + unset($opts['special_use']); + } + + $this->_createMailbox(Horde_Imap_Client_Mailbox::get($mailbox), $opts); + } + + /** + * Create a mailbox. + * + * @param Horde_Imap_Client_Mailbox $mailbox The mailbox to create. + * @param array $opts Additional options. See + * createMailbox(). + * + * @throws Horde_Imap_Client_Exception + */ + abstract protected function _createMailbox(Horde_Imap_Client_Mailbox $mailbox, + $opts); + + /** + * Delete a mailbox. + * + * @param mixed $mailbox The mailbox to delete. Either a + * Horde_Imap_Client_Mailbox object or a string + * (UTF-8). + * + * @throws Horde_Imap_Client_Exception + */ + public function deleteMailbox($mailbox) + { + $this->login(); + + $mailbox = Horde_Imap_Client_Mailbox::get($mailbox); + + $this->_deleteMailbox($mailbox); + $this->_deleteMailboxPost($mailbox); + } + + /** + * Delete a mailbox. + * + * @param Horde_Imap_Client_Mailbox $mailbox The mailbox to delete. + * + * @throws Horde_Imap_Client_Exception + */ + abstract protected function _deleteMailbox(Horde_Imap_Client_Mailbox $mailbox); + + /** + * Actions to perform after a mailbox delete. + * + * @param Horde_Imap_Client_Mailbox $mailbox The deleted mailbox. + */ + protected function _deleteMailboxPost(Horde_Imap_Client_Mailbox $mailbox) + { + /* Delete mailbox caches. */ + if ($this->_initCache()) { + $this->_cache->deleteMailbox($mailbox); + } + unset($this->_temp['mailbox_ob'][strval($mailbox)]); + + /* Unsubscribe from mailbox. */ + try { + $this->subscribeMailbox($mailbox, false); + } catch (Horde_Imap_Client_Exception $e) { + // Ignore failed unsubscribe request + } + } + + /** + * Rename a mailbox. + * + * @param mixed $old The old mailbox name. Either a + * Horde_Imap_Client_Mailbox object or a string (UTF-8). + * @param mixed $new The new mailbox name. Either a + * Horde_Imap_Client_Mailbox object or a string (UTF-8). + * + * @throws Horde_Imap_Client_Exception + */ + public function renameMailbox($old, $new) + { + // Login will be handled by first listMailboxes() call. + + $old = Horde_Imap_Client_Mailbox::get($old); + $new = Horde_Imap_Client_Mailbox::get($new); + + /* Check if old mailbox(es) were subscribed to. */ + $base = $this->listMailboxes($old, Horde_Imap_Client::MBOX_SUBSCRIBED, array('delimiter' => true)); + if (empty($base)) { + $base = $this->listMailboxes($old, Horde_Imap_Client::MBOX_ALL, array('delimiter' => true)); + $base = reset($base); + $subscribed = array(); + } else { + $base = reset($base); + $subscribed = array($base['mailbox']); + } + + $all_mboxes = array($base['mailbox']); + if (strlen($base['delimiter'])) { + $search = $old->list_escape . $base['delimiter'] . '*'; + $all_mboxes = array_merge($all_mboxes, $this->listMailboxes($search, Horde_Imap_Client::MBOX_ALL, array('flat' => true))); + $subscribed = array_merge($subscribed, $this->listMailboxes($search, Horde_Imap_Client::MBOX_SUBSCRIBED, array('flat' => true))); + } + + $this->_renameMailbox($old, $new); + + /* Delete mailbox actions. */ + foreach ($all_mboxes as $val) { + $this->_deleteMailboxPost($val); + } + + foreach ($subscribed as $val) { + try { + $this->subscribeMailbox(new Horde_Imap_Client_Mailbox(substr_replace($val, $new, 0, strlen($old)))); + } catch (Horde_Imap_Client_Exception $e) { + // Ignore failed subscription requests + } + } + } + + /** + * Rename a mailbox. + * + * @param Horde_Imap_Client_Mailbox $old The old mailbox name. + * @param Horde_Imap_Client_Mailbox $new The new mailbox name. + * + * @throws Horde_Imap_Client_Exception + */ + abstract protected function _renameMailbox(Horde_Imap_Client_Mailbox $old, + Horde_Imap_Client_Mailbox $new); + + /** + * Manage subscription status for a mailbox. + * + * @param mixed $mailbox The mailbox to [un]subscribe to. Either a + * Horde_Imap_Client_Mailbox object or a string + * (UTF-8). + * @param boolean $subscribe True to subscribe, false to unsubscribe. + * + * @throws Horde_Imap_Client_Exception + */ + public function subscribeMailbox($mailbox, $subscribe = true) + { + $this->login(); + $this->_subscribeMailbox(Horde_Imap_Client_Mailbox::get($mailbox), (bool)$subscribe); + } + + /** + * Manage subscription status for a mailbox. + * + * @param Horde_Imap_Client_Mailbox $mailbox The mailbox to [un]subscribe + * to. + * @param boolean $subscribe True to subscribe, false to + * unsubscribe. + * + * @throws Horde_Imap_Client_Exception + */ + abstract protected function _subscribeMailbox(Horde_Imap_Client_Mailbox $mailbox, + $subscribe); + + /** + * Obtain a list of mailboxes matching a pattern. + * + * @param mixed $pattern The mailbox search pattern(s) (see RFC 3501 + * [6.3.8] for the format). A UTF-8 string or an + * array of strings. If a Horde_Imap_Client_Mailbox + * object is given, it is escaped (i.e. wildcard + * patterns are converted to return the miminal + * number of matches possible). + * @param integer $mode Which mailboxes to return. Either: + * - Horde_Imap_Client::MBOX_SUBSCRIBED + * Return subscribed mailboxes. + * - Horde_Imap_Client::MBOX_SUBSCRIBED_EXISTS + * Return subscribed mailboxes that exist on the server. + * - Horde_Imap_Client::MBOX_UNSUBSCRIBED + * Return unsubscribed mailboxes. + * - Horde_Imap_Client::MBOX_ALL + * Return all mailboxes regardless of subscription status. + * - Horde_Imap_Client::MBOX_ALL_SUBSCRIBED (@since 2.23.0) + * Return all mailboxes regardless of subscription status, and ensure + * the '\subscribed' attribute is set if mailbox is subscribed + * (implies 'attributes' option is true). + * @param array $options Additional options: + *
+     *   - attributes: (boolean) If true, return attribute information under
+     *                 the 'attributes' key.
+     *                 DEFAULT: Do not return this information.
+     *   - children: (boolean) Tell server to return children attribute
+     *               information (\HasChildren, \HasNoChildren). Requires the
+     *               LIST-EXTENDED extension to guarantee this information is
+     *               returned. Server MAY return this attribute without this
+     *               option, or if the CHILDREN extension is available, but it
+     *               is not guaranteed.
+     *               DEFAULT: false
+     *   - flat: (boolean) If true, return a flat list of mailbox names only.
+     *           Overrides the 'attributes' option.
+     *           DEFAULT: Do not return flat list.
+     *   - recursivematch: (boolean) Force the server to return information
+     *                     about parent mailboxes that don't match other
+     *                     selection options, but have some sub-mailboxes that
+     *                     do. Information about children is returned in the
+     *                     CHILDINFO extended data item ('extended'). Requires
+     *                     the LIST-EXTENDED extension.
+     *                     DEFAULT: false
+     *   - remote: (boolean) Tell server to return mailboxes that reside on
+     *             another server. Requires the LIST-EXTENDED extension.
+     *             DEFAULT: false
+     *   - special_use: (boolean) Tell server to return special-use attribute
+     *                  information (see Horde_Imap_Client SPECIALUSE_*
+     *                  constants). Server must support the SPECIAL-USE return
+     *                  option for this setting to have any effect.
+     *                  DEFAULT: false
+     *   - status: (integer) Tell server to return status information. The
+     *             value is a bitmask that may contain any of:
+     *     - Horde_Imap_Client::STATUS_MESSAGES
+     *     - Horde_Imap_Client::STATUS_RECENT
+     *     - Horde_Imap_Client::STATUS_UIDNEXT
+     *     - Horde_Imap_Client::STATUS_UIDVALIDITY
+     *     - Horde_Imap_Client::STATUS_UNSEEN
+     *     - Horde_Imap_Client::STATUS_HIGHESTMODSEQ
+     *     DEFAULT: 0
+     *   - sort: (boolean) If true, return a sorted list of mailboxes?
+     *           DEFAULT: Do not sort the list.
+     *   - sort_delimiter: (string) If 'sort' is true, this is the delimiter
+     *                     used to sort the mailboxes.
+     *                     DEFAULT: '.'
+     * 
+ * + * @return array If 'flat' option is true, the array values are a list + * of Horde_Imap_Client_Mailbox objects. Otherwise, the + * keys are UTF-8 mailbox names and the values are arrays + * with these keys: + * - attributes: (array) List of lower-cased attributes [only if + * 'attributes' option is true]. + * - delimiter: (string) The delimiter for the mailbox. + * - extended: (TODO) TODO [only if 'recursivematch' option is true and + * LIST-EXTENDED extension is supported on the server]. + * - mailbox: (Horde_Imap_Client_Mailbox) The mailbox object. + * - status: (array) See status() [only if 'status' option is true]. + * + * @throws Horde_Imap_Client_Exception + */ + public function listMailboxes($pattern, + $mode = Horde_Imap_Client::MBOX_ALL, + array $options = array()) + { + $this->login(); + + $pattern = is_array($pattern) + ? array_unique($pattern) + : array($pattern); + + /* Prepare patterns. */ + $plist = array(); + foreach ($pattern as $val) { + if ($val instanceof Horde_Imap_Client_Mailbox) { + $val = $val->list_escape; + } + $plist[] = Horde_Imap_Client_Mailbox::get(preg_replace( + array("/\*{2,}/", "/\%{2,}/"), + array('*', '%'), + Horde_Imap_Client_Utf7imap::Utf8ToUtf7Imap($val) + ), true); + } + + if (isset($options['special_use']) && + !$this->_capability('SPECIAL-USE')) { + unset($options['special_use']); + } + + $ret = $this->_listMailboxes($plist, $mode, $options); + + if (!empty($options['status']) && + !$this->_capability('LIST-STATUS')) { + foreach ($this->status(array_keys($ret), $options['status']) as $key => $val) { + $ret[$key]['status'] = $val; + } + } + + if (empty($options['sort'])) { + return $ret; + } + + $list_ob = new Horde_Imap_Client_Mailbox_List(empty($options['flat']) ? array_keys($ret) : $ret); + $sorted = $list_ob->sort(array( + 'delimiter' => empty($options['sort_delimiter']) ? '.' : $options['sort_delimiter'] + )); + + if (!empty($options['flat'])) { + return $sorted; + } + + $out = array(); + foreach ($sorted as $val) { + $out[$val] = $ret[$val]; + } + + return $out; + } + + /** + * Obtain a list of mailboxes matching a pattern. + * + * @param array $pattern The mailbox search patterns + * (Horde_Imap_Client_Mailbox objects). + * @param integer $mode Which mailboxes to return. + * @param array $options Additional options. + * + * @return array See listMailboxes(). + * + * @throws Horde_Imap_Client_Exception + */ + abstract protected function _listMailboxes($pattern, $mode, $options); + + /** + * Obtain status information for a mailbox. + * + * @param mixed $mailbox The mailbox(es) to query. Either a + * Horde_Imap_Client_Mailbox object, a string + * (UTF-8), or an array of objects/strings (since + * 2.10.0). + * @param integer $flags A bitmask of information requested from the + * server. Allowed flags: + *
+     *   - Horde_Imap_Client::STATUS_MESSAGES
+     *     Return key: messages
+     *     Return format: (integer) The number of messages in the mailbox.
+     *
+     *   - Horde_Imap_Client::STATUS_RECENT
+     *     Return key: recent
+     *     Return format: (integer) The number of messages with the \Recent
+     *                    flag set as currently reported in the mailbox
+     *
+     *   - Horde_Imap_Client::STATUS_RECENT_TOTAL
+     *     Return key: recent_total
+     *     Return format: (integer) The number of messages with the \Recent
+     *                    flag set. This returns the total number of messages
+     *                    that have been marked as recent in this mailbox
+     *                    since the PHP process began. (since 2.12.0)
+     *
+     *   - Horde_Imap_Client::STATUS_UIDNEXT
+     *     Return key: uidnext
+     *     Return format: (integer) The next UID to be assigned in the
+     *                    mailbox. Only returned if the server automatically
+     *                    provides the data.
+     *
+     *   - Horde_Imap_Client::STATUS_UIDNEXT_FORCE
+     *     Return key: uidnext
+     *     Return format: (integer) The next UID to be assigned in the
+     *                    mailbox. This option will always determine this
+     *                    value, even if the server does not automatically
+     *                    provide this data.
+     *
+     *   - Horde_Imap_Client::STATUS_UIDVALIDITY
+     *     Return key: uidvalidity
+     *     Return format: (integer) The unique identifier validity of the
+     *                    mailbox.
+     *
+     *   - Horde_Imap_Client::STATUS_UNSEEN
+     *     Return key: unseen
+     *     Return format: (integer) The number of messages which do not have
+     *                    the \Seen flag set.
+     *
+     *   - Horde_Imap_Client::STATUS_FIRSTUNSEEN
+     *     Return key: firstunseen
+     *     Return format: (integer) The sequence number of the first unseen
+     *                    message in the mailbox.
+     *
+     *   - Horde_Imap_Client::STATUS_FLAGS
+     *     Return key: flags
+     *     Return format: (array) The list of defined flags in the mailbox
+     *                    (all flags are in lowercase).
+     *
+     *   - Horde_Imap_Client::STATUS_PERMFLAGS
+     *     Return key: permflags
+     *     Return format: (array) The list of flags that a client can change
+     *                    permanently (all flags are in lowercase).
+     *
+     *   - Horde_Imap_Client::STATUS_HIGHESTMODSEQ
+     *     Return key: highestmodseq
+     *     Return format: (integer) If the server supports the CONDSTORE
+     *                    IMAP extension, this will be the highest
+     *                    mod-sequence value of all messages in the mailbox.
+     *                    Else 0 if CONDSTORE not available or the mailbox
+     *                    does not support mod-sequences.
+     *
+     *   - Horde_Imap_Client::STATUS_SYNCMODSEQ
+     *     Return key: syncmodseq
+     *     Return format: (integer) If caching, and the server supports the
+     *                    CONDSTORE IMAP extension, this is the cached
+     *                    mod-sequence value of the mailbox when it was opened
+     *                    for the first time in this access. Will be null if
+     *                    not caching, CONDSTORE not available, or the mailbox
+     *                    does not support mod-sequences.
+     *
+     *   - Horde_Imap_Client::STATUS_SYNCFLAGUIDS
+     *     Return key: syncflaguids
+     *     Return format: (Horde_Imap_Client_Ids) If caching, the server
+     *                    supports the CONDSTORE IMAP extension, and the
+     *                    mailbox contained cached data when opened for the
+     *                    first time in this access, this is the list of UIDs
+     *                    in which flags have changed since STATUS_SYNCMODSEQ.
+     *
+     *   - Horde_Imap_Client::STATUS_SYNCVANISHED
+     *     Return key: syncvanished
+     *     Return format: (Horde_Imap_Client_Ids) If caching, the server
+     *                    supports the CONDSTORE IMAP extension, and the
+     *                    mailbox contained cached data when opened for the
+     *                    first time in this access, this is the list of UIDs
+     *                    which have been deleted since STATUS_SYNCMODSEQ.
+     *
+     *   - Horde_Imap_Client::STATUS_UIDNOTSTICKY
+     *     Return key: uidnotsticky
+     *     Return format: (boolean) If the server supports the UIDPLUS IMAP
+     *                    extension, and the queried mailbox does not support
+     *                    persistent UIDs, this value will be true. In all
+     *                    other cases, this value will be false.
+     *
+     *   - Horde_Imap_Client::STATUS_FORCE_REFRESH
+     *     Normally, the status information will be cached for a given
+     *     mailbox. Since most PHP requests are generally less than a second,
+     *     this is fine. However, if your script is long running, the status
+     *     information may not be up-to-date. Specifying this flag will ensure
+     *     that the server is always polled for the current mailbox status
+     *     before results are returned. (since 2.14.0)
+     *
+     *   - Horde_Imap_Client::STATUS_ALL (DEFAULT)
+     *     Shortcut to return 'messages', 'recent', 'uidnext', 'uidvalidity',
+     *     and 'unseen' values.
+     * 
+     * @param array $opts     Additional options:
+     * 
+     *   - sort: (boolean) If true, sort the list of mailboxes? (since 2.10.0)
+     *           DEFAULT: Do not sort the list.
+     *   - sort_delimiter: (string) If 'sort' is true, this is the delimiter
+     *                     used to sort the mailboxes. (since 2.10.0)
+     *                     DEFAULT: '.'
+     * 
+ * + * @return array If $mailbox contains multiple mailboxes, an array with + * keys being the UTF-8 mailbox name and values as arrays + * containing the requested keys (see above). + * Otherwise, an array with keys as the requested keys (see + * above) and values as the key data. + * + * @throws Horde_Imap_Client_Exception + */ + public function status($mailbox, $flags = Horde_Imap_Client::STATUS_ALL, + array $opts = array()) + { + $opts = array_merge(array( + 'sort' => false, + 'sort_delimiter' => '.' + ), $opts); + + $this->login(); + + if (is_array($mailbox)) { + if (empty($mailbox)) { + return array(); + } + $ret_array = true; + } else { + $mailbox = array($mailbox); + $ret_array = false; + } + + $mlist = array_map(array('Horde_Imap_Client_Mailbox', 'get'), $mailbox); + + $unselected_flags = array( + 'messages' => Horde_Imap_Client::STATUS_MESSAGES, + 'recent' => Horde_Imap_Client::STATUS_RECENT, + 'uidnext' => Horde_Imap_Client::STATUS_UIDNEXT, + 'uidvalidity' => Horde_Imap_Client::STATUS_UIDVALIDITY, + 'unseen' => Horde_Imap_Client::STATUS_UNSEEN + ); + + if (!$this->statuscache) { + $flags |= Horde_Imap_Client::STATUS_FORCE_REFRESH; + } + + if ($flags & Horde_Imap_Client::STATUS_ALL) { + foreach ($unselected_flags as $val) { + $flags |= $val; + } + } + + $master = $ret = array(); + + /* Catch flags that are not supported. */ + if (($flags & Horde_Imap_Client::STATUS_HIGHESTMODSEQ) && + !$this->_capability()->isEnabled('CONDSTORE')) { + $master['highestmodseq'] = 0; + $flags &= ~Horde_Imap_Client::STATUS_HIGHESTMODSEQ; + } + + if (($flags & Horde_Imap_Client::STATUS_UIDNOTSTICKY) && + !$this->_capability('UIDPLUS')) { + $master['uidnotsticky'] = false; + $flags &= ~Horde_Imap_Client::STATUS_UIDNOTSTICKY; + } + + /* UIDNEXT return options. */ + if ($flags & Horde_Imap_Client::STATUS_UIDNEXT_FORCE) { + $flags |= Horde_Imap_Client::STATUS_UIDNEXT; + } + + foreach ($mlist as $val) { + $name = strval($val); + $tmp_flags = $flags; + + if ($val->equals($this->_selected)) { + /* Check if already in mailbox. */ + $opened = true; + + if ($flags & Horde_Imap_Client::STATUS_FORCE_REFRESH) { + $this->noop(); + } + } else { + /* A list of STATUS options (other than those handled directly + * below) that require the mailbox to be explicitly opened. */ + $opened = ($flags & Horde_Imap_Client::STATUS_FIRSTUNSEEN) || + ($flags & Horde_Imap_Client::STATUS_FLAGS) || + ($flags & Horde_Imap_Client::STATUS_PERMFLAGS) || + ($flags & Horde_Imap_Client::STATUS_UIDNOTSTICKY) || + /* Force mailboxes containing wildcards to be accessed via + * STATUS so that wildcards do not return a bunch of + * mailboxes in the LIST-STATUS response. */ + (strpbrk($name, '*%') !== false); + } + + $ret[$name] = $master; + $ptr = &$ret[$name]; + + /* STATUS_PERMFLAGS requires a read/write mailbox. */ + if ($flags & Horde_Imap_Client::STATUS_PERMFLAGS) { + $this->openMailbox($val, Horde_Imap_Client::OPEN_READWRITE); + $opened = true; + } + + /* Handle SYNC related return options. These require the mailbox + * to be opened at least once. */ + if ($flags & Horde_Imap_Client::STATUS_SYNCMODSEQ) { + $this->openMailbox($val); + $ptr['syncmodseq'] = $this->_mailboxOb($val)->getStatus(Horde_Imap_Client::STATUS_SYNCMODSEQ); + $tmp_flags &= ~Horde_Imap_Client::STATUS_SYNCMODSEQ; + $opened = true; + } + + if ($flags & Horde_Imap_Client::STATUS_SYNCFLAGUIDS) { + $this->openMailbox($val); + $ptr['syncflaguids'] = $this->getIdsOb($this->_mailboxOb($val)->getStatus(Horde_Imap_Client::STATUS_SYNCFLAGUIDS)); + $tmp_flags &= ~Horde_Imap_Client::STATUS_SYNCFLAGUIDS; + $opened = true; + } + + if ($flags & Horde_Imap_Client::STATUS_SYNCVANISHED) { + $this->openMailbox($val); + $ptr['syncvanished'] = $this->getIdsOb($this->_mailboxOb($val)->getStatus(Horde_Imap_Client::STATUS_SYNCVANISHED)); + $tmp_flags &= ~Horde_Imap_Client::STATUS_SYNCVANISHED; + $opened = true; + } + + /* Handle RECENT_TOTAL option. */ + if ($flags & Horde_Imap_Client::STATUS_RECENT_TOTAL) { + $this->openMailbox($val); + $ptr['recent_total'] = $this->_mailboxOb($val)->getStatus(Horde_Imap_Client::STATUS_RECENT_TOTAL); + $tmp_flags &= ~Horde_Imap_Client::STATUS_RECENT_TOTAL; + $opened = true; + } + + if ($opened) { + if ($tmp_flags) { + $tmp = $this->_status(array($val), $tmp_flags); + $ptr += reset($tmp); + } + } else { + $to_process[] = $val; + } + } + + if ($flags && !empty($to_process)) { + if ((count($to_process) > 1) && + $this->_capability('LIST-STATUS')) { + foreach ($this->listMailboxes($to_process, Horde_Imap_Client::MBOX_ALL, array('status' => $flags)) as $key => $val) { + if (isset($val['status'])) { + $ret[$key] += $val['status']; + } + } + } else { + foreach ($this->_status($to_process, $flags) as $key => $val) { + $ret[$key] += $val; + } + } + } + + if (!$opts['sort'] || (count($ret) === 1)) { + return $ret_array + ? $ret + : reset($ret); + } + + $list_ob = new Horde_Imap_Client_Mailbox_List(array_keys($ret)); + $sorted = $list_ob->sort(array( + 'delimiter' => $opts['sort_delimiter'] + )); + + $out = array(); + foreach ($sorted as $val) { + $out[$val] = $ret[$val]; + } + + return $out; + } + + /** + * Obtain status information for mailboxes. + * + * @param array $mboxes The list of mailbox objects to query. + * @param integer $flags A bitmask of information requested from the + * server. + * + * @return array See array return for status(). + * + * @throws Horde_Imap_Client_Exception + */ + abstract protected function _status($mboxes, $flags); + + /** + * Perform a STATUS call on multiple mailboxes at the same time. + * + * This method leverages the LIST-EXTENDED and LIST-STATUS extensions on + * the IMAP server to improve the efficiency of this operation. + * + * @deprecated Use status() instead. + * + * @param array $mailboxes The mailboxes to query. Either + * Horde_Imap_Client_Mailbox objects, strings + * (UTF-8), or a combination of the two. + * @param integer $flags See status(). + * @param array $opts Additional options: + * - sort: (boolean) If true, sort the list of mailboxes? + * DEFAULT: Do not sort the list. + * - sort_delimiter: (string) If 'sort' is true, this is the delimiter + * used to sort the mailboxes. + * DEFAULT: '.' + * + * @return array An array with the keys as the mailbox names (UTF-8) and + * the values as arrays with the requested keys (from the + * mask given in $flags). + */ + public function statusMultiple($mailboxes, + $flags = Horde_Imap_Client::STATUS_ALL, + array $opts = array()) + { + return $this->status($mailboxes, $flags, $opts); + } + + /** + * Append message(s) to a mailbox. + * + * @param mixed $mailbox The mailbox to append the message(s) to. Either + * a Horde_Imap_Client_Mailbox object or a string + * (UTF-8). + * @param array $data The message data to append, along with + * additional options. An array of arrays with + * each embedded array having the following + * entries: + *
+     *   - data: (mixed) The data to append. If a string or a stream resource,
+     *           this will be used as the entire contents of a single message.
+     *           If an array, will catenate all given parts into a single
+     *           message. This array contains one or more arrays with
+     *           two keys:
+     *     - t: (string) Either 'url' or 'text'.
+     *     - v: (mixed) If 't' is 'url', this is the IMAP URL to the message
+     *          part to append. If 't' is 'text', this is either a string or
+     *          resource representation of the message part data.
+     *     DEFAULT: NONE (entry is MANDATORY)
+     *   - flags: (array) An array of flags/keywords to set on the appended
+     *            message.
+     *            DEFAULT: Only the \Recent flag is set.
+     *   - internaldate: (DateTime) The internaldate to set for the appended
+     *                   message.
+     *                   DEFAULT: internaldate will be the same date as when
+     *                   the message was appended.
+     * 
+ * @param array $options Additonal options: + *
+     *   - create: (boolean) Try to create $mailbox if it does not exist?
+     *             DEFAULT: No.
+     * 
+ * + * @return Horde_Imap_Client_Ids The UIDs of the appended messages. + * + * @throws Horde_Imap_Client_Exception + */ + public function append($mailbox, $data, array $options = array()) + { + $this->login(); + + $mailbox = Horde_Imap_Client_Mailbox::get($mailbox); + + $ret = $this->_append($mailbox, $data, $options); + + if ($ret instanceof Horde_Imap_Client_Ids) { + return $ret; + } + + $uids = $this->getIdsOb(); + + foreach ($data as $val) { + if (is_resource($val['data'])) { + rewind($val['data']); + } + + $uids->add($this->_getUidByMessageId( + $mailbox, + Horde_Mime_Headers::parseHeaders($val['data'])->getHeader('Message-ID') + )); + } + + return $uids; + } + + /** + * Append message(s) to a mailbox. + * + * @param Horde_Imap_Client_Mailbox $mailbox The mailbox to append the + * message(s) to. + * @param array $data The message data. + * @param array $options Additional options. + * + * @return mixed A Horde_Imap_Client_Ids object containing the UIDs of + * the appended messages (if server supports UIDPLUS + * extension) or true. + * + * @throws Horde_Imap_Client_Exception + */ + abstract protected function _append(Horde_Imap_Client_Mailbox $mailbox, + $data, $options); + + /** + * Request a checkpoint of the currently selected mailbox (RFC 3501 + * [6.4.1]). + * + * @throws Horde_Imap_Client_Exception + */ + public function check() + { + // CHECK only useful if we are already authenticated. + if ($this->_isAuthenticated) { + $this->_check(); + } + } + + /** + * Request a checkpoint of the currently selected mailbox. + * + * @throws Horde_Imap_Client_Exception + */ + abstract protected function _check(); + + /** + * Close the connection to the currently selected mailbox, optionally + * expunging all deleted messages (RFC 3501 [6.4.2]). + * + * @param array $options Additional options: + * - expunge: (boolean) Expunge all messages flagged as deleted? + * DEFAULT: No + * + * @throws Horde_Imap_Client_Exception + */ + public function close(array $options = array()) + { + // This check catches the non-logged in case. + if (is_null($this->_selected)) { + return; + } + + /* If we are caching, search for deleted messages. */ + if (!empty($options['expunge']) && $this->_initCache(true)) { + /* Make sure mailbox is read-write to expunge. */ + $this->openMailbox($this->_selected, Horde_Imap_Client::OPEN_READWRITE); + if ($this->_mode == Horde_Imap_Client::OPEN_READONLY) { + throw new Horde_Imap_Client_Exception( + Horde_Imap_Client_Translation::r("Cannot expunge read-only mailbox."), + Horde_Imap_Client_Exception::MAILBOX_READONLY + ); + } + + $search_query = new Horde_Imap_Client_Search_Query(); + $search_query->flag(Horde_Imap_Client::FLAG_DELETED, true); + $search_res = $this->search($this->_selected, $search_query); + $mbox = $this->_selected; + } else { + $search_res = null; + } + + $this->_close($options); + $this->_selected = null; + $this->_mode = 0; + + if (!is_null($search_res)) { + $this->_deleteMsgs($mbox, $search_res['match']); + } + } + + /** + * Close the connection to the currently selected mailbox, optionally + * expunging all deleted messages (RFC 3501 [6.4.2]). + * + * @param array $options Additional options. + * + * @throws Horde_Imap_Client_Exception + */ + abstract protected function _close($options); + + /** + * Expunge deleted messages from the given mailbox. + * + * @param mixed $mailbox The mailbox to expunge. Either a + * Horde_Imap_Client_Mailbox object or a string + * (UTF-8). + * @param array $options Additional options: + * - delete: (boolean) If true, will flag all messages in 'ids' as + * deleted (since 2.10.0). + * DEFAULT: false + * - ids: (Horde_Imap_Client_Ids) A list of messages to expunge. These + * messages must already be flagged as deleted (unless 'delete' + * is true). + * DEFAULT: All messages marked as deleted will be expunged. + * - list: (boolean) If true, returns the list of expunged messages + * (UIDs only). + * DEFAULT: false + * + * @return Horde_Imap_Client_Ids If 'list' option is true, returns the + * UID list of expunged messages. + * + * @throws Horde_Imap_Client_Exception + */ + public function expunge($mailbox, array $options = array()) + { + // Open mailbox call will handle the login. + $this->openMailbox($mailbox, Horde_Imap_Client::OPEN_READWRITE); + + /* Don't expunge if the mailbox is readonly. */ + if ($this->_mode == Horde_Imap_Client::OPEN_READONLY) { + throw new Horde_Imap_Client_Exception( + Horde_Imap_Client_Translation::r("Cannot expunge read-only mailbox."), + Horde_Imap_Client_Exception::MAILBOX_READONLY + ); + } + + if (empty($options['ids'])) { + $options['ids'] = $this->getIdsOb(Horde_Imap_Client_Ids::ALL); + } elseif ($options['ids']->isEmpty()) { + return $this->getIdsOb(); + } + + return $this->_expunge($options); + } + + /** + * Expunge all deleted messages from the given mailbox. + * + * @param array $options Additional options. + * + * @return Horde_Imap_Client_Ids If 'list' option is true, returns the + * list of expunged messages. + * + * @throws Horde_Imap_Client_Exception + */ + abstract protected function _expunge($options); + + /** + * Search a mailbox. + * + * @param mixed $mailbox The mailbox to search. + * Either a + * Horde_Imap_Client_Mailbox + * object or a string + * (UTF-8). + * @param Horde_Imap_Client_Search_Query $query The search query. + * Defaults to an ALL + * search. + * @param array $options Additional options: + *
+     *   - nocache: (boolean) Don't cache the results.
+     *              DEFAULT: false (results cached, if possible)
+     *   - partial: (mixed) The range of results to return (message sequence
+     *              numbers) Only a single range is supported (represented by
+     *              the minimum and maximum values contained in the range
+     *              given).
+     *              DEFAULT: All messages are returned.
+     *   - results: (array) The data to return. Consists of zero or more of
+     *              the following flags:
+     *     - Horde_Imap_Client::SEARCH_RESULTS_COUNT
+     *     - Horde_Imap_Client::SEARCH_RESULTS_MATCH (DEFAULT)
+     *     - Horde_Imap_Client::SEARCH_RESULTS_MAX
+     *     - Horde_Imap_Client::SEARCH_RESULTS_MIN
+     *     - Horde_Imap_Client::SEARCH_RESULTS_SAVE
+     *     - Horde_Imap_Client::SEARCH_RESULTS_RELEVANCY
+     *   - sequence: (boolean) If true, returns an array of sequence numbers.
+     *               DEFAULT: Returns an array of UIDs
+     *   - sort: (array) Sort the returned list of messages. Multiple sort
+     *           criteria can be specified. Any sort criteria can be sorted in
+     *           reverse order (instead of the default ascending order) by
+     *           adding a Horde_Imap_Client::SORT_REVERSE element to the array
+     *           directly before adding the sort element. The following sort
+     *           criteria are available:
+     *     - Horde_Imap_Client::SORT_ARRIVAL
+     *     - Horde_Imap_Client::SORT_CC
+     *     - Horde_Imap_Client::SORT_DATE
+     *     - Horde_Imap_Client::SORT_DISPLAYFROM
+     *       On servers that don't support SORT=DISPLAY, this criteria will
+     *       fallback to doing client-side sorting.
+     *     - Horde_Imap_Client::SORT_DISPLAYFROM_FALLBACK
+     *       On servers that don't support SORT=DISPLAY, this criteria will
+     *       fallback to Horde_Imap_Client::SORT_FROM [since 2.4.0].
+     *     - Horde_Imap_Client::SORT_DISPLAYTO
+     *       On servers that don't support SORT=DISPLAY, this criteria will
+     *       fallback to doing client-side sorting.
+     *     - Horde_Imap_Client::SORT_DISPLAYTO_FALLBACK
+     *       On servers that don't support SORT=DISPLAY, this criteria will
+     *       fallback to Horde_Imap_Client::SORT_TO [since 2.4.0].
+     *     - Horde_Imap_Client::SORT_FROM
+     *     - Horde_Imap_Client::SORT_SEQUENCE
+     *     - Horde_Imap_Client::SORT_SIZE
+     *     - Horde_Imap_Client::SORT_SUBJECT
+     *     - Horde_Imap_Client::SORT_TO
+     *
+     *     [On servers that support SEARCH=FUZZY, this criteria is also
+     *     available:]
+     *     - Horde_Imap_Client::SORT_RELEVANCY
+     * 
+ * + * @return array An array with the following keys: + *
+     *   - count: (integer) The number of messages that match the search
+     *            criteria. Always returned.
+     *   - match: (Horde_Imap_Client_Ids) The IDs that match $criteria, sorted
+     *            if the 'sort' modifier was set. Returned if
+     *            Horde_Imap_Client::SEARCH_RESULTS_MATCH is set.
+     *   - max: (integer) The UID (default) or message sequence number (if
+     *          'sequence' is true) of the highest message that satisifies
+     *          $criteria. Returns null if no matches found. Returned if
+     *          Horde_Imap_Client::SEARCH_RESULTS_MAX is set.
+     *   - min: (integer) The UID (default) or message sequence number (if
+     *          'sequence' is true) of the lowest message that satisifies
+     *          $criteria. Returns null if no matches found. Returned if
+     *          Horde_Imap_Client::SEARCH_RESULTS_MIN is set.
+     *   - modseq: (integer) The highest mod-sequence for all messages being
+     *            returned. Returned if 'sort' is false, the search query
+     *            includes a MODSEQ command, and the server supports the
+     *            CONDSTORE IMAP extension.
+     *   - relevancy: (array) The list of relevancy scores. Returned if
+     *                Horde_Imap_Client::SEARCH_RESULTS_RELEVANCY is set and
+     *                the server supports FUZZY search matching.
+     *   - save: (boolean) Whether the search results were saved. Returned if
+     *           Horde_Imap_Client::SEARCH_RESULTS_SAVE is set.
+     * 
+ * + * @throws Horde_Imap_Client_Exception + */ + public function search($mailbox, $query = null, array $options = array()) + { + $this->login(); + + if (empty($options['results'])) { + $options['results'] = array( + Horde_Imap_Client::SEARCH_RESULTS_MATCH, + Horde_Imap_Client::SEARCH_RESULTS_COUNT + ); + } elseif (!in_array(Horde_Imap_Client::SEARCH_RESULTS_COUNT, $options['results'])) { + $options['results'][] = Horde_Imap_Client::SEARCH_RESULTS_COUNT; + } + + // Default to an ALL search. + if (is_null($query)) { + $query = new Horde_Imap_Client_Search_Query(); + } + + // Check for SEARCHRES support. + if ((($pos = array_search(Horde_Imap_Client::SEARCH_RESULTS_SAVE, $options['results'])) !== false) && + !$this->_capability('SEARCHRES')) { + unset($options['results'][$pos]); + } + + // Check for SORT-related options. + if (!empty($options['sort'])) { + foreach ($options['sort'] as $key => $val) { + switch ($val) { + case Horde_Imap_Client::SORT_DISPLAYFROM_FALLBACK: + $options['sort'][$key] = $this->_capability('SORT', 'DISPLAY') + ? Horde_Imap_Client::SORT_DISPLAYFROM + : Horde_Imap_Client::SORT_FROM; + break; + + case Horde_Imap_Client::SORT_DISPLAYTO_FALLBACK: + $options['sort'][$key] = $this->_capability('SORT', 'DISPLAY') + ? Horde_Imap_Client::SORT_DISPLAYTO + : Horde_Imap_Client::SORT_TO; + break; + } + } + } + + /* Default search results. */ + $default_ret = array( + 'count' => 0, + 'match' => $this->getIdsOb(), + 'max' => null, + 'min' => null, + 'relevancy' => array() + ); + + /* Build search query. */ + $squery = $query->build($this); + + /* Check for query contents. If empty, this means that the query + * object has identified that this query can NEVER return any results. + * Immediately return now. */ + if (!count($squery['query'])) { + return $default_ret; + } + + // Check for supported charset. + if (!is_null($squery['charset']) && + ($this->search_charset->query($squery['charset'], true) === false)) { + foreach ($this->search_charset->charsets as $val) { + try { + $new_query = clone $query; + $new_query->charset($val); + break; + } catch (Horde_Imap_Client_Exception_SearchCharset $e) { + unset($new_query); + } + } + + if (!isset($new_query)) { + throw $e; + } + + $query = $new_query; + $squery = $query->build($this); + } + + // Store query in $options array to pass to child method. + $options['_query'] = $squery; + + /* RFC 6203: MUST NOT request relevancy results if we are not using + * FUZZY searching. */ + if (in_array(Horde_Imap_Client::SEARCH_RESULTS_RELEVANCY, $options['results']) && + !in_array('SEARCH=FUZZY', $squery['exts_used'])) { + throw new InvalidArgumentException('Cannot specify RELEVANCY results if not doing a FUZZY search.'); + } + + /* Check for partial matching. */ + if (!empty($options['partial'])) { + $pids = $this->getIdsOb($options['partial'], true)->range_string; + if (!strlen($pids)) { + throw new InvalidArgumentException('Cannot specify empty sequence range for a PARTIAL search.'); + } + + if (strpos($pids, ':') === false) { + $pids .= ':' . $pids; + } + + $options['partial'] = $pids; + } + + /* Optimization - if query is just for a count of either RECENT or + * ALL messages, we can send status information instead. Can't + * optimize with unseen queries because we may cause an infinite loop + * between here and the status() call. */ + if ((count($options['results']) === 1) && + (reset($options['results']) == Horde_Imap_Client::SEARCH_RESULTS_COUNT)) { + switch ($squery['query']) { + case 'ALL': + $ret = $this->status($mailbox, Horde_Imap_Client::STATUS_MESSAGES); + return array('count' => $ret['messages']); + + case 'RECENT': + $ret = $this->status($mailbox, Horde_Imap_Client::STATUS_RECENT); + return array('count' => $ret['recent']); + } + } + + $this->openMailbox($mailbox, Horde_Imap_Client::OPEN_AUTO); + + /* Take advantage of search result caching. If CONDSTORE available, + * we can cache all queries and invalidate the cache when the MODSEQ + * changes. If CONDSTORE not available, we can only store queries + * that don't involve flags. We store results by hashing the options + * array. */ + $cache = null; + if (empty($options['nocache']) && + $this->_initCache(true) && + ($this->_capability()->isEnabled('CONDSTORE') || + !$query->flagSearch())) { + $cache = $this->_getSearchCache('search', $options); + if (isset($cache['data'])) { + if (isset($cache['data']['match'])) { + $cache['data']['match'] = $this->getIdsOb($cache['data']['match']); + } + return $cache['data']; + } + } + + /* Optimization: Catch when there are no messages in a mailbox. */ + $status_res = $this->status($this->_selected, Horde_Imap_Client::STATUS_MESSAGES | Horde_Imap_Client::STATUS_HIGHESTMODSEQ); + if ($status_res['messages'] || + in_array(Horde_Imap_Client::SEARCH_RESULTS_SAVE, $options['results'])) { + /* RFC 7162 [3.1.2.2] - trying to do a MODSEQ SEARCH on a mailbox + * that doesn't support it will return BAD. */ + if (in_array('CONDSTORE', $squery['exts']) && + !$this->_mailboxOb()->getStatus(Horde_Imap_Client::STATUS_HIGHESTMODSEQ)) { + throw new Horde_Imap_Client_Exception( + Horde_Imap_Client_Translation::r("Mailbox does not support mod-sequences."), + Horde_Imap_Client_Exception::MBOXNOMODSEQ + ); + } + + $ret = $this->_search($query, $options); + } else { + $ret = $default_ret; + if (isset($status_res['highestmodseq'])) { + $ret['modseq'] = $status_res['highestmodseq']; + } + } + + if ($cache) { + $save = $ret; + if (isset($save['match'])) { + $save['match'] = strval($ret['match']); + } + $this->_setSearchCache($save, $cache); + } + + return $ret; + } + + /** + * Search a mailbox. + * + * @param object $query The search query. + * @param array $options Additional options. The '_query' key contains + * the value of $query->build(). + * + * @return Horde_Imap_Client_Ids An array of IDs. + * + * @throws Horde_Imap_Client_Exception + */ + abstract protected function _search($query, $options); + + /** + * Set the comparator to use for searching/sorting (RFC 5255). + * + * @param string $comparator The comparator string (see RFC 4790 [3.1] - + * "collation-id" - for format). The reserved + * string 'default' can be used to select + * the default comparator. + * + * @throws Horde_Imap_Client_Exception + * @throws Horde_Imap_Client_Exception_NoSupportExtension + */ + public function setComparator($comparator = null) + { + $comp = is_null($comparator) + ? $this->getParam('comparator') + : $comparator; + if (is_null($comp)) { + return; + } + + $this->login(); + + if (!$this->_capability('I18NLEVEL', '2')) { + throw new Horde_Imap_Client_Exception_NoSupportExtension( + 'I18NLEVEL', + 'The IMAP server does not support changing SEARCH/SORT comparators.' + ); + } + + $this->_setComparator($comp); + } + + /** + * Set the comparator to use for searching/sorting (RFC 5255). + * + * @param string $comparator The comparator string (see RFC 4790 [3.1] - + * "collation-id" - for format). The reserved + * string 'default' can be used to select + * the default comparator. + * + * @throws Horde_Imap_Client_Exception + */ + abstract protected function _setComparator($comparator); + + /** + * Get the comparator used for searching/sorting (RFC 5255). + * + * @return mixed Null if the default comparator is being used, or an + * array of comparator information (see RFC 5255 [4.8]). + * + * @throws Horde_Imap_Client_Exception + */ + public function getComparator() + { + $this->login(); + + return $this->_capability('I18NLEVEL', '2') + ? $this->_getComparator() + : null; + } + + /** + * Get the comparator used for searching/sorting (RFC 5255). + * + * @return mixed Null if the default comparator is being used, or an + * array of comparator information (see RFC 5255 [4.8]). + * + * @throws Horde_Imap_Client_Exception + */ + abstract protected function _getComparator(); + + /** + * Thread sort a given list of messages (RFC 5256). + * + * @param mixed $mailbox The mailbox to query. Either a + * Horde_Imap_Client_Mailbox object or a string + * (UTF-8). + * @param array $options Additional options: + *
+     *   - criteria: (mixed) The following thread criteria are available:
+     *     - Horde_Imap_Client::THREAD_ORDEREDSUBJECT
+     *     - Horde_Imap_Client::THREAD_REFERENCES
+     *     - Horde_Imap_Client::THREAD_REFS
+     *       Other algorithms can be explicitly specified by passing the IMAP
+     *       thread algorithm in as a string value.
+     *     DEFAULT: Horde_Imap_Client::THREAD_ORDEREDSUBJECT
+     *   - search: (Horde_Imap_Client_Search_Query) The search query.
+     *             DEFAULT: All messages in mailbox included in thread sort.
+     *   - sequence: (boolean) If true, each message is stored and referred to
+     *               by its message sequence number.
+     *               DEFAULT: Stored/referred to by UID.
+     * 
+ * + * @return Horde_Imap_Client_Data_Thread A thread data object. + * + * @throws Horde_Imap_Client_Exception + */ + public function thread($mailbox, array $options = array()) + { + // Open mailbox call will handle the login. + $this->openMailbox($mailbox, Horde_Imap_Client::OPEN_AUTO); + + /* Take advantage of search result caching. If CONDSTORE available, + * we can cache all queries and invalidate the cache when the MODSEQ + * changes. If CONDSTORE not available, we can only store queries + * that don't involve flags. See search() for similar caching. */ + $cache = null; + if ($this->_initCache(true) && + ($this->_capability()->isEnabled('CONDSTORE') || + empty($options['search']) || + !$options['search']->flagSearch())) { + $cache = $this->_getSearchCache('thread', $options); + if (isset($cache['data']) && + ($cache['data'] instanceof Horde_Imap_Client_Data_Thread)) { + return $cache['data']; + } + } + + $status_res = $this->status($this->_selected, Horde_Imap_Client::STATUS_MESSAGES); + + $ob = $status_res['messages'] + ? $this->_thread($options) + : new Horde_Imap_Client_Data_Thread(array(), empty($options['sequence']) ? 'uid' : 'sequence'); + + if ($cache) { + $this->_setSearchCache($ob, $cache); + } + + return $ob; + } + + /** + * Thread sort a given list of messages (RFC 5256). + * + * @param array $options Additional options. See thread(). + * + * @return Horde_Imap_Client_Data_Thread A thread data object. + * + * @throws Horde_Imap_Client_Exception + */ + abstract protected function _thread($options); + + /** + * Fetch message data (see RFC 3501 [6.4.5]). + * + * @param mixed $mailbox The mailbox to search. + * Either a + * Horde_Imap_Client_Mailbox + * object or a string (UTF-8). + * @param Horde_Imap_Client_Fetch_Query $query Fetch query object. + * @param array $options Additional options: + * - changedsince: (integer) Only return messages that have a + * mod-sequence larger than this value. This option + * requires the CONDSTORE IMAP extension (if not present, + * this value is ignored). Additionally, the mailbox + * must support mod-sequences or an exception will be + * thrown. If valid, this option implicity adds the + * mod-sequence fetch criteria to the fetch command. + * DEFAULT: Mod-sequence values are ignored. + * - exists: (boolean) Ensure that all ids returned exist on the server. + * If false, the list of ids returned in the results object + * is not guaranteed to reflect the current state of the + * remote mailbox. + * DEFAULT: false + * - ids: (Horde_Imap_Client_Ids) A list of messages to fetch data from. + * DEFAULT: All messages in $mailbox will be fetched. + * - nocache: (boolean) If true, will not cache the results (previously + * cached data will still be used to generate results) [since + * 2.8.0]. + * DEFAULT: false + * + * @return Horde_Imap_Client_Fetch_Results A results object. + * + * @throws Horde_Imap_Client_Exception + * @throws Horde_Imap_Client_Exception_NoSupportExtension + */ + public function fetch($mailbox, $query, array $options = array()) + { + try { + $ret = $this->_fetchWrapper($mailbox, $query, $options); + unset($this->_temp['fetch_nocache']); + return $ret; + } catch (Exception $e) { + unset($this->_temp['fetch_nocache']); + throw $e; + } + } + + /** + * Wrapper for fetch() to allow internal state to be reset on exception. + * + * @internal + * @see fetch() + */ + private function _fetchWrapper($mailbox, $query, $options) + { + $this->login(); + + $query = clone $query; + + $cache_array = $header_cache = $new_query = array(); + + if (empty($options['ids'])) { + $options['ids'] = $this->getIdsOb(Horde_Imap_Client_Ids::ALL); + } elseif ($options['ids']->isEmpty()) { + return new Horde_Imap_Client_Fetch_Results($this->_fetchDataClass); + } elseif ($options['ids']->search_res && + !$this->_capability('SEARCHRES')) { + /* SEARCHRES requires server support. */ + throw new Horde_Imap_Client_Exception_NoSupportExtension('SEARCHRES'); + } + + $this->openMailbox($mailbox, Horde_Imap_Client::OPEN_AUTO); + $mbox_ob = $this->_mailboxOb(); + + if (!empty($options['nocache'])) { + $this->_temp['fetch_nocache'] = true; + } + + $cf = $this->_initCache(true) + ? $this->_cacheFields() + : array(); + + if (!empty($cf)) { + /* If using cache, we store by UID so we need to return UIDs. */ + $query->uid(); + } + + $modseq_check = !empty($options['changedsince']); + if ($query->contains(Horde_Imap_Client::FETCH_MODSEQ)) { + if (!$this->_capability()->isEnabled('CONDSTORE')) { + unset($query[Horde_Imap_Client::FETCH_MODSEQ]); + } elseif (empty($options['changedsince'])) { + $modseq_check = true; + } + } + + if ($modseq_check && + !$mbox_ob->getStatus(Horde_Imap_Client::STATUS_HIGHESTMODSEQ)) { + /* RFC 7162 [3.1.2.2] - trying to do a MODSEQ FETCH on a mailbox + * that doesn't support it will return BAD. */ + throw new Horde_Imap_Client_Exception( + Horde_Imap_Client_Translation::r("Mailbox does not support mod-sequences."), + Horde_Imap_Client_Exception::MBOXNOMODSEQ + ); + } + + /* Determine if caching is available and if anything in $query is + * cacheable. */ + foreach ($cf as $k => $v) { + if (isset($query[$k])) { + switch ($k) { + case Horde_Imap_Client::FETCH_ENVELOPE: + case Horde_Imap_Client::FETCH_FLAGS: + case Horde_Imap_Client::FETCH_IMAPDATE: + case Horde_Imap_Client::FETCH_SIZE: + case Horde_Imap_Client::FETCH_STRUCTURE: + $cache_array[$k] = $v; + break; + + case Horde_Imap_Client::FETCH_HEADERS: + $this->_temp['headers_caching'] = array(); + + foreach ($query[$k] as $key => $val) { + /* Only cache if directly requested. Iterate through + * requests to ensure at least one can be cached. */ + if (!empty($val['cache']) && !empty($val['peek'])) { + $cache_array[$k] = $v; + ksort($val); + $header_cache[$key] = hash('md5', serialize($val)); + } + } + break; + } + } + } + + $ret = new Horde_Imap_Client_Fetch_Results( + $this->_fetchDataClass, + $options['ids']->sequence ? Horde_Imap_Client_Fetch_Results::SEQUENCE : Horde_Imap_Client_Fetch_Results::UID + ); + + /* If nothing is cacheable, we can do a straight search. */ + if (empty($cache_array)) { + $options['_query'] = $query; + $this->_fetch($ret, array($options)); + return $ret; + } + + $cs_ret = empty($options['changedsince']) + ? null + : clone $ret; + + /* Convert special searches to UID lists and create mapping. */ + $ids = $this->resolveIds( + $this->_selected, + $options['ids'], + empty($options['exists']) ? 1 : 2 + ); + + /* Add non-user settable cache fields. */ + $cache_array[Horde_Imap_Client::FETCH_DOWNGRADED] = self::CACHE_DOWNGRADED; + + /* Get the cached values. */ + $data = $this->_cache->get( + $this->_selected, + $ids->ids, + array_values($cache_array), + $mbox_ob->getStatus(Horde_Imap_Client::STATUS_UIDVALIDITY) + ); + + /* Build a list of what we still need. */ + $map = array_flip($mbox_ob->map->map); + $sequence = $options['ids']->sequence; + foreach ($ids as $uid) { + $crit = clone $query; + + if ($sequence) { + if (!isset($map[$uid])) { + continue; + } + $entry_idx = $map[$uid]; + } else { + $entry_idx = $uid; + unset($crit[Horde_Imap_Client::FETCH_UID]); + } + + $entry = $ret->get($entry_idx); + + if (isset($map[$uid])) { + $entry->setSeq($map[$uid]); + unset($crit[Horde_Imap_Client::FETCH_SEQ]); + } + + $entry->setUid($uid); + + foreach ($cache_array as $key => $cid) { + switch ($key) { + case Horde_Imap_Client::FETCH_DOWNGRADED: + if (!empty($data[$uid][$cid])) { + $entry->setDowngraded(true); + } + break; + + case Horde_Imap_Client::FETCH_ENVELOPE: + if (isset($data[$uid][$cid]) && + ($data[$uid][$cid] instanceof Horde_Imap_Client_Data_Envelope)) { + $entry->setEnvelope($data[$uid][$cid]); + unset($crit[$key]); + } + break; + + case Horde_Imap_Client::FETCH_FLAGS: + if (isset($data[$uid][$cid]) && + is_array($data[$uid][$cid])) { + $entry->setFlags($data[$uid][$cid]); + unset($crit[$key]); + } + break; + + case Horde_Imap_Client::FETCH_HEADERS: + foreach ($header_cache as $hkey => $hval) { + if (isset($data[$uid][$cid][$hval])) { + /* We have found a cached entry with the same + * MD5 sum. */ + $entry->setHeaders($hkey, $data[$uid][$cid][$hval]); + $crit->remove($key, $hkey); + } else { + $this->_temp['headers_caching'][$hkey] = $hval; + } + } + break; + + case Horde_Imap_Client::FETCH_IMAPDATE: + if (isset($data[$uid][$cid]) && + ($data[$uid][$cid] instanceof Horde_Imap_Client_DateTime)) { + $entry->setImapDate($data[$uid][$cid]); + unset($crit[$key]); + } + break; + + case Horde_Imap_Client::FETCH_SIZE: + if (isset($data[$uid][$cid])) { + $entry->setSize($data[$uid][$cid]); + unset($crit[$key]); + } + break; + + case Horde_Imap_Client::FETCH_STRUCTURE: + if (isset($data[$uid][$cid]) && + ($data[$uid][$cid] instanceof Horde_Mime_Part)) { + $entry->setStructure($data[$uid][$cid]); + unset($crit[$key]); + } + break; + } + } + + if (count($crit)) { + $sig = $crit->hash(); + if (isset($new_query[$sig])) { + $new_query[$sig]['i'][] = $entry_idx; + } else { + $new_query[$sig] = array( + 'c' => $crit, + 'i' => array($entry_idx) + ); + } + } + } + + $to_fetch = array(); + foreach ($new_query as $val) { + $ids_ob = $this->getIdsOb(null, $sequence); + $ids_ob->duplicates = true; + $ids_ob->add($val['i']); + $to_fetch[] = array_merge($options, array( + '_query' => $val['c'], + 'ids' => $ids_ob + )); + } + + if (!empty($to_fetch)) { + $this->_fetch(is_null($cs_ret) ? $ret : $cs_ret, $to_fetch); + } + + if (is_null($cs_ret)) { + return $ret; + } + + /* If doing changedsince query, and all other data is cached, we still + * need to hit IMAP server to determine proper results set. */ + if (empty($new_query)) { + $squery = new Horde_Imap_Client_Search_Query(); + $squery->modseq($options['changedsince'] + 1); + $squery->ids($options['ids']); + + $cs = $this->search($this->_selected, $squery, array( + 'sequence' => $sequence + )); + + foreach ($cs['match'] as $val) { + $entry = $ret->get($val); + if ($sequence) { + $entry->setSeq($val); + } else { + $entry->setUid($val); + } + $cs_ret[$val] = $entry; + } + } else { + foreach ($cs_ret as $key => $val) { + $val->merge($ret->get($key)); + } + } + + return $cs_ret; + } + + /** + * Fetch message data. + * + * Fetch queries should be grouped in the $queries argument. Each value + * is an array of fetch options, with the fetch query stored in the + * '_query' parameter. IMPORTANT: All queries must have the same ID + * type (either sequence or UID). + * + * @param Horde_Imap_Client_Fetch_Results $results Fetch results. + * @param array $queries The list of queries. + * + * @throws Horde_Imap_Client_Exception + */ + abstract protected function _fetch(Horde_Imap_Client_Fetch_Results $results, + $queries); + + /** + * Get the list of vanished messages (UIDs that have been expunged since a + * given mod-sequence value). + * + * @param mixed $mailbox The mailbox to query. Either a + * Horde_Imap_Client_Mailbox object or a string + * (UTF-8). + * @param integer $modseq Search for expunged messages after this + * mod-sequence value. + * @param array $opts Additional options: + * - ids: (Horde_Imap_Client_Ids) Restrict to these UIDs. + * DEFAULT: Returns full list of UIDs vanished (QRESYNC only). + * This option is REQUIRED for non-QRESYNC servers or + * else an empty list will be returned. + * + * @return Horde_Imap_Client_Ids List of UIDs that have vanished. + * + * @throws Horde_Imap_Client_NoSupportExtension + */ + public function vanished($mailbox, $modseq, array $opts = array()) + { + $this->login(); + + if (empty($opts['ids'])) { + if (!$this->_capability()->isEnabled('QRESYNC')) { + return $this->getIdsOb(); + } + $opts['ids'] = $this->getIdsOb(Horde_Imap_Client_Ids::ALL); + } elseif ($opts['ids']->isEmpty()) { + return $this->getIdsOb(); + } elseif ($opts['ids']->sequence) { + throw new InvalidArgumentException('Vanished requires UIDs.'); + } + + $this->openMailbox($mailbox, Horde_Imap_Client::OPEN_AUTO); + + if ($this->_capability()->isEnabled('QRESYNC')) { + if (!$this->_mailboxOb()->getStatus(Horde_Imap_Client::STATUS_HIGHESTMODSEQ)) { + throw new Horde_Imap_Client_Exception( + Horde_Imap_Client_Translation::r("Mailbox does not support mod-sequences."), + Horde_Imap_Client_Exception::MBOXNOMODSEQ + ); + } + + return $this->_vanished(max(1, $modseq), $opts['ids']); + } + + $ids = $this->resolveIds($mailbox, $opts['ids']); + + $squery = new Horde_Imap_Client_Search_Query(); + $squery->ids($ids); + $search = $this->search($mailbox, $squery, array( + 'nocache' => true + )); + + return $this->getIdsOb(array_diff($ids->ids, $search['match']->ids)); + } + + /** + * Get the list of vanished messages. + * + * @param integer $modseq Mod-sequence value. + * @param Horde_Imap_Client_Ids $ids UIDs. + * + * @return Horde_Imap_Client_Ids List of UIDs that have vanished. + */ + abstract protected function _vanished($modseq, Horde_Imap_Client_Ids $ids); + + /** + * Store message flag data (see RFC 3501 [6.4.6]). + * + * @param mixed $mailbox The mailbox containing the messages to modify. + * Either a Horde_Imap_Client_Mailbox object or a + * string (UTF-8). + * @param array $options Additional options: + * - add: (array) An array of flags to add. + * DEFAULT: No flags added. + * - ids: (Horde_Imap_Client_Ids) The list of messages to modify. + * DEFAULT: All messages in $mailbox will be modified. + * - remove: (array) An array of flags to remove. + * DEFAULT: No flags removed. + * - replace: (array) Replace the current flags with this set + * of flags. Overrides both the 'add' and 'remove' options. + * DEFAULT: No replace is performed. + * - unchangedsince: (integer) Only changes flags if the mod-sequence ID + * of the message is equal or less than this value. + * Requires the CONDSTORE IMAP extension on the server. + * Also requires the mailbox to support mod-sequences. + * Will throw an exception if either condition is not + * met. + * DEFAULT: mod-sequence is ignored when applying + * changes + * + * @return Horde_Imap_Client_Ids A Horde_Imap_Client_Ids object + * containing the list of IDs that failed + * the 'unchangedsince' test. + * + * @throws Horde_Imap_Client_Exception + * @throws Horde_Imap_Client_Exception_NoSupportExtension + */ + public function store($mailbox, array $options = array()) + { + // Open mailbox call will handle the login. + $this->openMailbox($mailbox, Horde_Imap_Client::OPEN_READWRITE); + + /* SEARCHRES requires server support. */ + if (empty($options['ids'])) { + $options['ids'] = $this->getIdsOb(Horde_Imap_Client_Ids::ALL); + } elseif ($options['ids']->isEmpty()) { + return $this->getIdsOb(); + } elseif ($options['ids']->search_res && + !$this->_capability('SEARCHRES')) { + throw new Horde_Imap_Client_Exception_NoSupportExtension('SEARCHRES'); + } + + if (!empty($options['unchangedsince'])) { + if (!$this->_capability()->isEnabled('CONDSTORE')) { + throw new Horde_Imap_Client_Exception_NoSupportExtension('CONDSTORE'); + } + + /* RFC 7162 [3.1.2.2] - trying to do a UNCHANGEDSINCE STORE on a + * mailbox that doesn't support it will return BAD. */ + if (!$this->_mailboxOb()->getStatus(Horde_Imap_Client::STATUS_HIGHESTMODSEQ)) { + throw new Horde_Imap_Client_Exception( + Horde_Imap_Client_Translation::r("Mailbox does not support mod-sequences."), + Horde_Imap_Client_Exception::MBOXNOMODSEQ + ); + } + } + + return $this->_store($options); + } + + /** + * Store message flag data. + * + * @param array $options Additional options. + * + * @return Horde_Imap_Client_Ids A Horde_Imap_Client_Ids object + * containing the list of IDs that failed + * the 'unchangedsince' test. + * + * @throws Horde_Imap_Client_Exception + */ + abstract protected function _store($options); + + /** + * Copy messages to another mailbox. + * + * @param mixed $source The source mailbox. Either a + * Horde_Imap_Client_Mailbox object or a string + * (UTF-8). + * @param mixed $dest The destination mailbox. Either a + * Horde_Imap_Client_Mailbox object or a string + * (UTF-8). + * @param array $options Additional options: + * - create: (boolean) Try to create $dest if it does not exist? + * DEFAULT: No. + * - force_map: (boolean) Forces the array mapping to always be + * returned. [@since 2.19.0] + * - ids: (Horde_Imap_Client_Ids) The list of messages to copy. + * DEFAULT: All messages in $mailbox will be copied. + * - move: (boolean) If true, delete the original messages. + * DEFAULT: Original messages are not deleted. + * + * @return mixed An array mapping old UIDs (keys) to new UIDs (values) on + * success (only guaranteed if 'force_map' is true) or + * true. + * + * @throws Horde_Imap_Client_Exception + * @throws Horde_Imap_Client_Exception_NoSupportExtension + */ + public function copy($source, $dest, array $options = array()) + { + // Open mailbox call will handle the login. + $this->openMailbox($source, empty($options['move']) ? Horde_Imap_Client::OPEN_AUTO : Horde_Imap_Client::OPEN_READWRITE); + + /* SEARCHRES requires server support. */ + if (empty($options['ids'])) { + $options['ids'] = $this->getIdsOb(Horde_Imap_Client_Ids::ALL); + } elseif ($options['ids']->isEmpty()) { + return array(); + } elseif ($options['ids']->search_res && + !$this->_capability('SEARCHRES')) { + throw new Horde_Imap_Client_Exception_NoSupportExtension('SEARCHRES'); + } + + $dest = Horde_Imap_Client_Mailbox::get($dest); + $res = $this->_copy($dest, $options); + + if (($res === true) && !empty($options['force_map'])) { + /* Need to manually create mapping from Message-ID data. */ + $query = new Horde_Imap_Client_Fetch_Query(); + $query->envelope(); + $fetch = $this->fetch($source, $query, array( + 'ids' => $options['ids'] + )); + + $res = array(); + foreach ($fetch as $val) { + if ($uid = $this->_getUidByMessageId($dest, $val->getEnvelope()->message_id)) { + $res[$val->getUid()] = $uid; + } + } + } + + return $res; + } + + /** + * Copy messages to another mailbox. + * + * @param Horde_Imap_Client_Mailbox $dest The destination mailbox. + * @param array $options Additional options. + * + * @return mixed An array mapping old UIDs (keys) to new UIDs (values) on + * success (if the IMAP server and/or driver support the + * UIDPLUS extension) or true. + * + * @throws Horde_Imap_Client_Exception + */ + abstract protected function _copy(Horde_Imap_Client_Mailbox $dest, + $options); + + /** + * Set quota limits. The server must support the IMAP QUOTA extension + * (RFC 2087). + * + * @param mixed $root The quota root. Either a + * Horde_Imap_Client_Mailbox object or a string + * (UTF-8). + * @param array $resources The resource values to set. Keys are the + * resource atom name; value is the resource + * value. + * + * @throws Horde_Imap_Client_Exception + * @throws Horde_Imap_Client_Exception_NoSupportExtension + */ + public function setQuota($root, array $resources = array()) + { + $this->login(); + + if (!$this->_capability('QUOTA')) { + throw new Horde_Imap_Client_Exception_NoSupportExtension('QUOTA'); + } + + if (!empty($resources)) { + $this->_setQuota(Horde_Imap_Client_Mailbox::get($root), $resources); + } + } + + /** + * Set quota limits. + * + * @param Horde_Imap_Client_Mailbox $root The quota root. + * @param array $resources The resource values to set. + * + * @return boolean True on success. + * + * @throws Horde_Imap_Client_Exception + */ + abstract protected function _setQuota(Horde_Imap_Client_Mailbox $root, + $resources); + + /** + * Get quota limits. The server must support the IMAP QUOTA extension + * (RFC 2087). + * + * @param mixed $root The quota root. Either a Horde_Imap_Client_Mailbox + * object or a string (UTF-8). + * + * @return mixed An array with resource keys. Each key holds an array + * with 2 values: 'limit' and 'usage'. + * + * @throws Horde_Imap_Client_Exception + * @throws Horde_Imap_Client_Exception_NoSupportExtension + */ + public function getQuota($root) + { + $this->login(); + + if (!$this->_capability('QUOTA')) { + throw new Horde_Imap_Client_Exception_NoSupportExtension('QUOTA'); + } + + return $this->_getQuota(Horde_Imap_Client_Mailbox::get($root)); + } + + /** + * Get quota limits. + * + * @param Horde_Imap_Client_Mailbox $root The quota root. + * + * @return mixed An array with resource keys. Each key holds an array + * with 2 values: 'limit' and 'usage'. + * + * @throws Horde_Imap_Client_Exception + */ + abstract protected function _getQuota(Horde_Imap_Client_Mailbox $root); + + /** + * Get quota limits for a mailbox. The server must support the IMAP QUOTA + * extension (RFC 2087). + * + * @param mixed $mailbox A mailbox. Either a Horde_Imap_Client_Mailbox + * object or a string (UTF-8). + * + * @return mixed An array with the keys being the quota roots. Each key + * holds an array with resource keys: each of these keys + * holds an array with 2 values: 'limit' and 'usage'. + * + * @throws Horde_Imap_Client_Exception + * @throws Horde_Imap_Client_Exception_NoSupportExtension + */ + public function getQuotaRoot($mailbox) + { + $this->login(); + + if (!$this->_capability('QUOTA')) { + throw new Horde_Imap_Client_Exception_NoSupportExtension('QUOTA'); + } + + return $this->_getQuotaRoot(Horde_Imap_Client_Mailbox::get($mailbox)); + } + + /** + * Get quota limits for a mailbox. + * + * @param Horde_Imap_Client_Mailbox $mailbox A mailbox. + * + * @return mixed An array with the keys being the quota roots. Each key + * holds an array with resource keys: each of these keys + * holds an array with 2 values: 'limit' and 'usage'. + * + * @throws Horde_Imap_Client_Exception + */ + abstract protected function _getQuotaRoot(Horde_Imap_Client_Mailbox $mailbox); + + /** + * Get the ACL rights for a given mailbox. The server must support the + * IMAP ACL extension (RFC 2086/4314). + * + * @param mixed $mailbox A mailbox. Either a Horde_Imap_Client_Mailbox + * object or a string (UTF-8). + * + * @return array An array with identifiers as the keys and + * Horde_Imap_Client_Data_Acl objects as the values. + * + * @throws Horde_Imap_Client_Exception + */ + public function getACL($mailbox) + { + $this->login(); + return $this->_getACL(Horde_Imap_Client_Mailbox::get($mailbox)); + } + + /** + * Get ACL rights for a given mailbox. + * + * @param Horde_Imap_Client_Mailbox $mailbox A mailbox. + * + * @return array An array with identifiers as the keys and + * Horde_Imap_Client_Data_Acl objects as the values. + * + * @throws Horde_Imap_Client_Exception + */ + abstract protected function _getACL(Horde_Imap_Client_Mailbox $mailbox); + + /** + * Set ACL rights for a given mailbox/identifier. + * + * @param mixed $mailbox A mailbox. Either a Horde_Imap_Client_Mailbox + * object or a string (UTF-8). + * @param string $identifier The identifier to alter (UTF-8). + * @param array $options Additional options: + * - rights: (string) The rights to alter or set. + * - action: (string, optional) If 'add' or 'remove', adds or removes the + * specified rights. Sets the rights otherwise. + * + * @throws Horde_Imap_Client_Exception + * @throws Horde_Imap_Client_Exception_NoSupportExtension + */ + public function setACL($mailbox, $identifier, $options) + { + $this->login(); + + if (!$this->_capability('ACL')) { + throw new Horde_Imap_Client_Exception_NoSupportExtension('ACL'); + } + + if (empty($options['rights'])) { + if (!isset($options['action']) || + (($options['action'] != 'add') && + $options['action'] != 'remove')) { + $this->_deleteACL( + Horde_Imap_Client_Mailbox::get($mailbox), + Horde_Imap_Client_Utf7imap::Utf8ToUtf7Imap($identifier) + ); + } + return; + } + + $acl = ($options['rights'] instanceof Horde_Imap_Client_Data_Acl) + ? $options['rights'] + : new Horde_Imap_Client_Data_Acl(strval($options['rights'])); + + $options['rights'] = $acl->getString( + $this->_capability('RIGHTS') + ? Horde_Imap_Client_Data_AclCommon::RFC_4314 + : Horde_Imap_Client_Data_AclCommon::RFC_2086 + ); + if (isset($options['action'])) { + switch ($options['action']) { + case 'add': + $options['rights'] = '+' . $options['rights']; + break; + case 'remove': + $options['rights'] = '-' . $options['rights']; + break; + } + } + + $this->_setACL( + Horde_Imap_Client_Mailbox::get($mailbox), + Horde_Imap_Client_Utf7imap::Utf8ToUtf7Imap($identifier), + $options + ); + } + + /** + * Set ACL rights for a given mailbox/identifier. + * + * @param Horde_Imap_Client_Mailbox $mailbox A mailbox. + * @param string $identifier The identifier to alter + * (UTF7-IMAP). + * @param array $options Additional options. 'rights' + * contains the string of + * rights to set on the server. + * + * @throws Horde_Imap_Client_Exception + */ + abstract protected function _setACL(Horde_Imap_Client_Mailbox $mailbox, + $identifier, $options); + + /** + * Deletes ACL rights for a given mailbox/identifier. + * + * @param mixed $mailbox A mailbox. Either a Horde_Imap_Client_Mailbox + * object or a string (UTF-8). + * @param string $identifier The identifier to delete (UTF-8). + * + * @throws Horde_Imap_Client_Exception + * @throws Horde_Imap_Client_Exception_NoSupportExtension + */ + public function deleteACL($mailbox, $identifier) + { + $this->login(); + + if (!$this->_capability('ACL')) { + throw new Horde_Imap_Client_Exception_NoSupportExtension('ACL'); + } + + $this->_deleteACL( + Horde_Imap_Client_Mailbox::get($mailbox), + Horde_Imap_Client_Utf7imap::Utf8ToUtf7Imap($identifier) + ); + } + + /** + * Deletes ACL rights for a given mailbox/identifier. + * + * @param Horde_Imap_Client_Mailbox $mailbox A mailbox. + * @param string $identifier The identifier to delete + * (UTF7-IMAP). + * + * @throws Horde_Imap_Client_Exception + */ + abstract protected function _deleteACL(Horde_Imap_Client_Mailbox $mailbox, + $identifier); + + /** + * List the ACL rights for a given mailbox/identifier. The server must + * support the IMAP ACL extension (RFC 2086/4314). + * + * @param mixed $mailbox A mailbox. Either a Horde_Imap_Client_Mailbox + * object or a string (UTF-8). + * @param string $identifier The identifier to query (UTF-8). + * + * @return Horde_Imap_Client_Data_AclRights An ACL data rights object. + * + * @throws Horde_Imap_Client_Exception + * @throws Horde_Imap_Client_Exception_NoSupportExtension + */ + public function listACLRights($mailbox, $identifier) + { + $this->login(); + + if (!$this->_capability('ACL')) { + throw new Horde_Imap_Client_Exception_NoSupportExtension('ACL'); + } + + return $this->_listACLRights( + Horde_Imap_Client_Mailbox::get($mailbox), + Horde_Imap_Client_Utf7imap::Utf8ToUtf7Imap($identifier) + ); + } + + /** + * Get ACL rights for a given mailbox/identifier. + * + * @param Horde_Imap_Client_Mailbox $mailbox A mailbox. + * @param string $identifier The identifier to query + * (UTF7-IMAP). + * + * @return Horde_Imap_Client_Data_AclRights An ACL data rights object. + * + * @throws Horde_Imap_Client_Exception + */ + abstract protected function _listACLRights(Horde_Imap_Client_Mailbox $mailbox, + $identifier); + + /** + * Get the ACL rights for the current user for a given mailbox. The + * server must support the IMAP ACL extension (RFC 2086/4314). + * + * @param mixed $mailbox A mailbox. Either a Horde_Imap_Client_Mailbox + * object or a string (UTF-8). + * + * @return Horde_Imap_Client_Data_Acl An ACL data object. + * + * @throws Horde_Imap_Client_Exception + * @throws Horde_Imap_Client_Exception_NoSupportExtension + */ + public function getMyACLRights($mailbox) + { + $this->login(); + + if (!$this->_capability('ACL')) { + throw new Horde_Imap_Client_Exception_NoSupportExtension('ACL'); + } + + return $this->_getMyACLRights(Horde_Imap_Client_Mailbox::get($mailbox)); + } + + /** + * Get the ACL rights for the current user for a given mailbox. + * + * @param Horde_Imap_Client_Mailbox $mailbox A mailbox. + * + * @return Horde_Imap_Client_Data_Acl An ACL data object. + * + * @throws Horde_Imap_Client_Exception + */ + abstract protected function _getMyACLRights(Horde_Imap_Client_Mailbox $mailbox); + + /** + * Return master list of ACL rights available on the server. + * + * @return array A list of ACL rights. + */ + public function allAclRights() + { + $this->login(); + + $rights = array( + Horde_Imap_Client::ACL_LOOKUP, + Horde_Imap_Client::ACL_READ, + Horde_Imap_Client::ACL_SEEN, + Horde_Imap_Client::ACL_WRITE, + Horde_Imap_Client::ACL_INSERT, + Horde_Imap_Client::ACL_POST, + Horde_Imap_Client::ACL_ADMINISTER + ); + + if ($capability = $this->_capability()->getParams('RIGHTS')) { + // Add rights defined in CAPABILITY string (RFC 4314). + return array_merge($rights, str_split(reset($capability))); + } + + // Add RFC 2086 rights (deprecated by RFC 4314, but need to keep for + // compatibility with old servers). + return array_merge($rights, array( + Horde_Imap_Client::ACL_CREATE, + Horde_Imap_Client::ACL_DELETE + )); + } + + /** + * Get metadata for a given mailbox. The server must support either the + * IMAP METADATA extension (RFC 5464) or the ANNOTATEMORE extension + * (http://ietfreport.isoc.org/idref/draft-daboo-imap-annotatemore/). + * + * @param mixed $mailbox A mailbox. Either a Horde_Imap_Client_Mailbox + * object or a string (UTF-8). + * @param array $entries The entries to fetch (UTF-8 strings). + * @param array $options Additional options: + * - depth: (string) Either "0", "1" or "infinity". Returns only the + * given value (0), only values one level below the specified + * value (1) or all entries below the specified value + * (infinity). + * - maxsize: (integer) The maximal size the returned values may have. + * DEFAULT: No maximal size. + * + * @return array An array with metadata names as the keys and metadata + * values as the values. If 'maxsize' is set, and entries + * exist on the server larger than this size, the size will + * be returned in the key '*longentries'. + * + * @throws Horde_Imap_Client_Exception + */ + public function getMetadata($mailbox, $entries, array $options = array()) + { + $this->login(); + + if (!is_array($entries)) { + $entries = array($entries); + } + + return $this->_getMetadata(Horde_Imap_Client_Mailbox::get($mailbox), array_map(array('Horde_Imap_Client_Utf7imap', 'Utf8ToUtf7Imap'), $entries), $options); + } + + /** + * Get metadata for a given mailbox. + * + * @param Horde_Imap_Client_Mailbox $mailbox A mailbox. + * @param array $entries The entries to fetch + * (UTF7-IMAP strings). + * @param array $options Additional options. + * + * @return array An array with metadata names as the keys and metadata + * values as the values. + * + * @throws Horde_Imap_Client_Exception + */ + abstract protected function _getMetadata(Horde_Imap_Client_Mailbox $mailbox, + $entries, $options); + + /** + * Set metadata for a given mailbox/identifier. + * + * @param mixed $mailbox A mailbox. Either a Horde_Imap_Client_Mailbox + * object or a string (UTF-8). If empty, sets a + * server annotation. + * @param array $data A set of data values. The metadata values + * corresponding to the keys of the array will + * be set to the values in the array. + * + * @throws Horde_Imap_Client_Exception + */ + public function setMetadata($mailbox, $data) + { + $this->login(); + $this->_setMetadata(Horde_Imap_Client_Mailbox::get($mailbox), $data); + } + + /** + * Set metadata for a given mailbox/identifier. + * + * @param Horde_Imap_Client_Mailbox $mailbox A mailbox. + * @param array $data A set of data values. See + * setMetadata() for format. + * + * @throws Horde_Imap_Client_Exception + */ + abstract protected function _setMetadata(Horde_Imap_Client_Mailbox $mailbox, + $data); + + /* Public utility functions. */ + + /** + * Returns a unique identifier for the current mailbox status. + * + * @deprecated + * + * @param mixed $mailbox A mailbox. Either a Horde_Imap_Client_Mailbox + * object or a string (UTF-8). + * @param array $addl Additional cache info to add to the cache ID + * string. + * + * @return string The cache ID string, which will change when the + * composition of the mailbox changes. The uidvalidity + * will always be the first element, and will be delimited + * by the '|' character. + * + * @throws Horde_Imap_Client_Exception + */ + public function getCacheId($mailbox, array $addl = array()) + { + return Horde_Imap_Client_Base_Deprecated::getCacheId($this, $mailbox, $this->_capability()->isEnabled('CONDSTORE'), $addl); + } + + /** + * Parses a cacheID created by getCacheId(). + * + * @deprecated + * + * @param string $id The cache ID. + * + * @return array An array with the following information: + * - highestmodseq: (integer) + * - messages: (integer) + * - uidnext: (integer) + * - uidvalidity: (integer) Always present + */ + public function parseCacheId($id) + { + return Horde_Imap_Client_Base_Deprecated::parseCacheId($id); + } + + /** + * Resolves an IDs object into a list of IDs. + * + * @param Horde_Imap_Client_Mailbox $mailbox The mailbox. + * @param Horde_Imap_Client_Ids $ids The Ids object. + * @param integer $convert Convert to UIDs? + * - 0: No + * - 1: Only if $ids is not already a UIDs object + * - 2: Always + * + * @return Horde_Imap_Client_Ids The list of IDs. + */ + public function resolveIds(Horde_Imap_Client_Mailbox $mailbox, + Horde_Imap_Client_Ids $ids, $convert = 0) + { + $map = $this->_mailboxOb($mailbox)->map; + + if ($ids->special) { + /* Optimization for ALL sequence searches. */ + if (!$convert && $ids->all && $ids->sequence) { + $res = $this->status($mailbox, Horde_Imap_Client::STATUS_MESSAGES); + return $this->getIdsOb($res['messages'] ? ('1:' . $res['messages']) : array(), true); + } + + $convert = 2; + } elseif (!$convert || + (!$ids->sequence && ($convert == 1)) || + $ids->isEmpty()) { + return clone $ids; + } else { + /* Do an all or nothing: either we have all the numbers/UIDs in + * memory and can return, or just send the whole ID query to the + * server. Any advantage we would get by a partial search are + * outweighed by the complexities needed to make the search and + * then merge back into the original results. */ + $lookup = $map->lookup($ids); + if (count($lookup) === count($ids)) { + return $this->getIdsOb(array_values($lookup)); + } + } + + $query = new Horde_Imap_Client_Search_Query(); + $query->ids($ids); + + $res = $this->search($mailbox, $query, array( + 'results' => array( + Horde_Imap_Client::SEARCH_RESULTS_MATCH, + Horde_Imap_Client::SEARCH_RESULTS_SAVE + ), + 'sequence' => (!$convert && $ids->sequence), + 'sort' => array(Horde_Imap_Client::SORT_SEQUENCE) + )); + + /* Update mapping. */ + if ($convert) { + if ($ids->all) { + $ids = $this->getIdsOb('1:' . count($res['match'])); + } elseif ($ids->special) { + return $res['match']; + } + + /* Sanity checking (Bug #12911). */ + $list1 = array_slice($ids->ids, 0, count($res['match'])); + $list2 = $res['match']->ids; + if (!empty($list1) && + !empty($list2) && + (count($list1) === count($list2))) { + $map->update(array_combine($list1, $list2)); + } + } + + return $res['match']; + } + + /** + * Determines if the given charset is valid for search-related queries. + * This check pertains just to the basic IMAP SEARCH command. + * + * @deprecated Use $search_charset property instead. + * + * @param string $charset The query charset. + * + * @return boolean True if server supports this charset. + */ + public function validSearchCharset($charset) + { + return $this->search_charset->query($charset); + } + + /* Mailbox syncing functions. */ + + /** + * Returns a unique token for the current mailbox synchronization status. + * + * @since 2.2.0 + * + * @param mixed $mailbox A mailbox. Either a Horde_Imap_Client_Mailbox + * object or a string (UTF-8). + * + * @return string The sync token. + * + * @throws Horde_Imap_Client_Exception + */ + public function getSyncToken($mailbox) + { + $out = array(); + + foreach ($this->_syncStatus($mailbox) as $key => $val) { + $out[] = $key . $val; + } + + return base64_encode(implode(',', $out)); + } + + /** + * Synchronize a mailbox from a sync token. + * + * @since 2.2.0 + * + * @param mixed $mailbox A mailbox. Either a Horde_Imap_Client_Mailbox + * object or a string (UTF-8). + * @param string $token A sync token generated by getSyncToken(). + * @param array $opts Additional options: + * - criteria: (integer) Mask of Horde_Imap_Client::SYNC_* criteria to + * return. Defaults to SYNC_ALL. + * - ids: (Horde_Imap_Client_Ids) A cached list of UIDs. Unless QRESYNC + * is available on the server, failure to specify this option + * means SYNC_VANISHEDUIDS information cannot be returned. + * + * @return Horde_Imap_Client_Data_Sync A sync object. + * + * @throws Horde_Imap_Client_Exception + * @throws Horde_Imap_Client_Exception_Sync + */ + public function sync($mailbox, $token, array $opts = array()) + { + if (($token = base64_decode($token, true)) === false) { + throw new Horde_Imap_Client_Exception_Sync('Bad token.', Horde_Imap_Client_Exception_Sync::BAD_TOKEN); + } + + $sync = array(); + foreach (explode(',', $token) as $val) { + $sync[substr($val, 0, 1)] = substr($val, 1); + } + + return new Horde_Imap_Client_Data_Sync( + $this, + $mailbox, + $sync, + $this->_syncStatus($mailbox), + (isset($opts['criteria']) ? $opts['criteria'] : Horde_Imap_Client::SYNC_ALL), + (isset($opts['ids']) ? $opts['ids'] : null) + ); + } + + /* Private utility functions. */ + + /** + * Store FETCH data in cache. + * + * @param Horde_Imap_Client_Fetch_Results $data The fetch results. + * + * @throws Horde_Imap_Client_Exception + */ + protected function _updateCache(Horde_Imap_Client_Fetch_Results $data) + { + if (!empty($this->_temp['fetch_nocache']) || + empty($this->_selected) || + !count($data) || + !$this->_initCache(true)) { + return; + } + + $c = $this->getParam('cache'); + if (in_array(strval($this->_selected), $c['fetch_ignore'])) { + $this->_debug->info(sprintf( + 'CACHE: Ignoring FETCH data [%s]', + $this->_selected + )); + return; + } + + /* Optimization: we can directly use getStatus() here since we know + * these values are initialized. */ + $mbox_ob = $this->_mailboxOb(); + $highestmodseq = $mbox_ob->getStatus(Horde_Imap_Client::STATUS_HIGHESTMODSEQ); + $uidvalidity = $mbox_ob->getStatus(Horde_Imap_Client::STATUS_UIDVALIDITY); + + $mapping = $modseq = $tocache = array(); + if (count($data)) { + $cf = $this->_cacheFields(); + } + + foreach ($data as $v) { + /* It is possible that we received FETCH information that doesn't + * contain UID data. This is uncacheable so don't process. */ + if (!($uid = $v->getUid())) { + return; + } + + $tmp = array(); + + if ($v->isDowngraded()) { + $tmp[self::CACHE_DOWNGRADED] = true; + } + + foreach ($cf as $key => $val) { + if ($v->exists($key)) { + switch ($key) { + case Horde_Imap_Client::FETCH_ENVELOPE: + $tmp[$val] = $v->getEnvelope(); + break; + + case Horde_Imap_Client::FETCH_FLAGS: + if ($highestmodseq) { + $modseq[$uid] = $v->getModSeq(); + $tmp[$val] = $v->getFlags(); + } + break; + + case Horde_Imap_Client::FETCH_HEADERS: + foreach ($this->_temp['headers_caching'] as $label => $hash) { + if ($hdr = $v->getHeaders($label)) { + $tmp[$val][$hash] = $hdr; + } + } + break; + + case Horde_Imap_Client::FETCH_IMAPDATE: + $tmp[$val] = $v->getImapDate(); + break; + + case Horde_Imap_Client::FETCH_SIZE: + $tmp[$val] = $v->getSize(); + break; + + case Horde_Imap_Client::FETCH_STRUCTURE: + $tmp[$val] = clone $v->getStructure(); + break; + } + } + } + + if (!empty($tmp)) { + $tocache[$uid] = $tmp; + } + + $mapping[$v->getSeq()] = $uid; + } + + if (!empty($mapping)) { + if (!empty($tocache)) { + $this->_cache->set($this->_selected, $tocache, $uidvalidity); + } + + $this->_mailboxOb()->map->update($mapping); + } + + if (!empty($modseq)) { + $this->_updateModSeq(max(array_merge($modseq, array($highestmodseq)))); + $mbox_ob->setStatus(Horde_Imap_Client::STATUS_SYNCFLAGUIDS, array_keys($modseq)); + } + } + + /** + * Moves cache entries from the current mailbox to another mailbox. + * + * @param Horde_Imap_Client_Mailbox $to The destination mailbox. + * @param array $map Mapping of source UIDs (keys) to + * destination UIDs (values). + * @param string $uidvalid UIDVALIDITY of destination + * mailbox. + * + * @throws Horde_Imap_Client_Exception + */ + protected function _moveCache(Horde_Imap_Client_Mailbox $to, $map, + $uidvalid) + { + if (!$this->_initCache()) { + return; + } + + $c = $this->getParam('cache'); + if (in_array(strval($to), $c['fetch_ignore'])) { + $this->_debug->info(sprintf( + 'CACHE: Ignoring moving FETCH data (%s => %s)', + $this->_selected, + $to + )); + return; + } + + $old = $this->_cache->get($this->_selected, array_keys($map), null); + $new = array(); + + foreach ($map as $key => $val) { + if (!empty($old[$key])) { + $new[$val] = $old[$key]; + } + } + + if (!empty($new)) { + $this->_cache->set($to, $new, $uidvalid); + } + } + + /** + * Delete messages in the cache. + * + * @param Horde_Imap_Client_Mailbox $mailbox The mailbox. + * @param Horde_Imap_Client_Ids $ids The list of IDs to delete in + * $mailbox. + * @param array $opts Additional options (not used + * in base class). + * + * @return Horde_Imap_Client_Ids UIDs that were deleted. + * @throws Horde_Imap_Client_Exception + */ + protected function _deleteMsgs(Horde_Imap_Client_Mailbox $mailbox, + Horde_Imap_Client_Ids $ids, + array $opts = array()) + { + if (!$this->_initCache()) { + return $ids; + } + + $mbox_ob = $this->_mailboxOb(); + $ids_ob = $ids->sequence + ? $this->getIdsOb($mbox_ob->map->lookup($ids)) + : $ids; + + $this->_cache->deleteMsgs($mailbox, $ids_ob->ids); + $mbox_ob->setStatus(Horde_Imap_Client::STATUS_SYNCVANISHED, $ids_ob->ids); + $mbox_ob->map->remove($ids); + + return $ids_ob; + } + + /** + * Retrieve data from the search cache. + * + * @param string $type The cache type ('search' or 'thread'). + * @param array $options The options array of the calling function. + * + * @return mixed Returns search cache metadata. If search was retrieved, + * data is in key 'data'. + * Returns null if caching is not available. + */ + protected function _getSearchCache($type, $options) + { + $status = $this->status($this->_selected, Horde_Imap_Client::STATUS_HIGHESTMODSEQ | Horde_Imap_Client::STATUS_UIDVALIDITY); + + /* Search caching requires MODSEQ, which may not be active for a + * mailbox. */ + if (empty($status['highestmodseq'])) { + return null; + } + + ksort($options); + $cache = hash('md5', $type . serialize($options)); + $cacheid = $this->getSyncToken($this->_selected); + $ret = array(); + + $md = $this->_cache->getMetaData( + $this->_selected, + $status['uidvalidity'], + array(self::CACHE_SEARCH, self::CACHE_SEARCHID) + ); + + if (!isset($md[self::CACHE_SEARCHID]) || + ($md[self::CACHE_SEARCHID] != $cacheid)) { + $md[self::CACHE_SEARCH] = array(); + $md[self::CACHE_SEARCHID] = $cacheid; + if ($this->_debug->debug && + !isset($this->_temp['searchcacheexpire'][strval($this->_selected)])) { + $this->_debug->info(sprintf( + 'SEARCH: Expired from cache [%s]', + $this->_selected + )); + $this->_temp['searchcacheexpire'][strval($this->_selected)] = true; + } + } elseif (isset($md[self::CACHE_SEARCH][$cache])) { + $this->_debug->info(sprintf( + 'SEARCH: Retrieved %s from cache (%s [%s])', + $type, + $cache, + $this->_selected + )); + $ret['data'] = $md[self::CACHE_SEARCH][$cache]; + unset($md[self::CACHE_SEARCHID]); + } + + return array_merge($ret, array( + 'id' => $cache, + 'metadata' => $md, + 'type' => $type + )); + } + + /** + * Set data in the search cache. + * + * @param mixed $data The cache data to store. + * @param string $sdata The search data returned from _getSearchCache(). + */ + protected function _setSearchCache($data, $sdata) + { + $sdata['metadata'][self::CACHE_SEARCH][$sdata['id']] = $data; + + $this->_cache->setMetaData($this->_selected, null, $sdata['metadata']); + + if ($this->_debug->debug) { + $this->_debug->info(sprintf( + 'SEARCH: Saved %s to cache (%s [%s])', + $sdata['type'], + $sdata['id'], + $this->_selected + )); + unset($this->_temp['searchcacheexpire'][strval($this->_selected)]); + } + } + + /** + * Updates the cached MODSEQ value. + * + * @param integer $modseq MODSEQ value to store. + * + * @return mixed The MODSEQ of the old value if it was replaced (or false + * if it didn't exist or is the same). + */ + protected function _updateModSeq($modseq) + { + if (!$this->_initCache(true)) { + return false; + } + + $mbox_ob = $this->_mailboxOb(); + $uidvalid = $mbox_ob->getStatus(Horde_Imap_Client::STATUS_UIDVALIDITY); + $md = $this->_cache->getMetaData($this->_selected, $uidvalid, array(self::CACHE_MODSEQ)); + + if (isset($md[self::CACHE_MODSEQ])) { + if ($md[self::CACHE_MODSEQ] < $modseq) { + $set = true; + $sync = $md[self::CACHE_MODSEQ]; + } else { + $set = false; + $sync = 0; + } + $mbox_ob->setStatus(Horde_Imap_Client::STATUS_SYNCMODSEQ, $md[self::CACHE_MODSEQ]); + } else { + $set = true; + $sync = 0; + } + + /* $modseq can be 0 - NOMODSEQ - so don't store in that case. */ + if ($set && $modseq) { + $this->_cache->setMetaData($this->_selected, $uidvalid, array( + self::CACHE_MODSEQ => $modseq + )); + } + + return $sync; + } + + /** + * Synchronizes the current mailbox cache with the server (using CONDSTORE + * or QRESYNC). + */ + protected function _condstoreSync() + { + $mbox_ob = $this->_mailboxOb(); + + /* Check that modseqs are available in mailbox. */ + if (!($highestmodseq = $mbox_ob->getStatus(Horde_Imap_Client::STATUS_HIGHESTMODSEQ)) || + !($modseq = $this->_updateModSeq($highestmodseq))) { + $mbox_ob->sync = true; + } + + if ($mbox_ob->sync) { + return; + } + + $uids_ob = $this->getIdsOb($this->_cache->get( + $this->_selected, + array(), + array(), + $mbox_ob->getStatus(Horde_Imap_Client::STATUS_UIDVALIDITY) + )); + + if (!count($uids_ob)) { + $mbox_ob->sync = true; + return; + } + + /* Are we caching flags? */ + if (array_key_exists(Horde_Imap_Client::FETCH_FLAGS, $this->_cacheFields())) { + $fquery = new Horde_Imap_Client_Fetch_Query(); + $fquery->flags(); + + /* Update flags in cache. Cache will be updated in _fetch(). */ + $this->_fetch(new Horde_Imap_Client_Fetch_Results(), array( + array( + '_query' => $fquery, + 'changedsince' => $modseq, + 'ids' => $uids_ob + ) + )); + } + + /* Search for deleted messages, and remove from cache. */ + $vanished = $this->vanished($this->_selected, $modseq, array( + 'ids' => $uids_ob + )); + $disappear = array_diff($uids_ob->ids, $vanished->ids); + if (!empty($disappear)) { + $this->_deleteMsgs($this->_selected, $this->getIdsOb($disappear)); + } + + $mbox_ob->sync = true; + } + + /** + * Provide the list of available caching fields. + * + * @return array The list of available caching fields (fields are in the + * key). + */ + protected function _cacheFields() + { + $c = $this->getParam('cache'); + $out = $c['fields']; + + if (!$this->_capability()->isEnabled('CONDSTORE')) { + unset($out[Horde_Imap_Client::FETCH_FLAGS]); + } + + return $out; + } + + /** + * Return the current mailbox synchronization status. + * + * @param mixed $mailbox A mailbox. Either a Horde_Imap_Client_Mailbox + * object or a string (UTF-8). + * + * @return array An array with status data. (This data is not guaranteed + * to have any specific format). + */ + protected function _syncStatus($mailbox) + { + $status = $this->status( + $mailbox, + Horde_Imap_Client::STATUS_HIGHESTMODSEQ | + Horde_Imap_Client::STATUS_MESSAGES | + Horde_Imap_Client::STATUS_UIDNEXT_FORCE | + Horde_Imap_Client::STATUS_UIDVALIDITY + ); + + $fields = array('uidnext', 'uidvalidity'); + if (empty($status['highestmodseq'])) { + $fields[] = 'messages'; + } else { + $fields[] = 'highestmodseq'; + } + + $out = array(); + $sync_map = array_flip(Horde_Imap_Client_Data_Sync::$map); + + foreach ($fields as $val) { + $out[$sync_map[$val]] = $status[$val]; + } + + return array_filter($out); + } + + /** + * Get a message UID by the Message-ID. Returns the last message in a + * mailbox that matches. + * + * @param Horde_Imap_Client_Mailbox $mailbox The mailbox to search + * @param string $msgid Message-ID. + * + * @return string UID (null if not found). + */ + protected function _getUidByMessageId($mailbox, $msgid) + { + if (!$msgid) { + return null; + } + + $query = new Horde_Imap_Client_Search_Query(); + $query->headerText('Message-ID', $msgid); + $res = $this->search($mailbox, $query, array( + 'results' => array(Horde_Imap_Client::SEARCH_RESULTS_MAX) + )); + + return $res['max']; + } + +} diff --git a/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Base/Alerts.php b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Base/Alerts.php new file mode 100644 index 00000000..5d820ddb --- /dev/null +++ b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Base/Alerts.php @@ -0,0 +1,102 @@ + + * @category Horde + * @copyright 2014-2017 Horde LLC + * @license http://www.horde.org/licenses/lgpl21 LGPL 2.1 + * @package Imap_Client + * @since 2.24.0 + */ +class Horde_Imap_Client_Base_Alerts +implements SplSubject +{ + /** + * Alert data. + * + * @var object + */ + protected $_alert; + + /** + * Observers. + * + * @var array + */ + protected $_observers = array(); + + /** + * Add an alert. + * + * @param string $alert The alert string. + * @param string $type The alert type. + */ + public function add($alert, $type = null) + { + $this->_alert = new stdClass; + $this->_alert->alert = $alert; + if (!is_null($type)) { + $this->_alert->type = $type; + } + + $this->notify(); + } + + /** + * Returns the last alert received. + * + * @return object Alert information. Object with these properties: + *
+     *   - alert: (string) Alert string.
+     *   - type: (string) [OPTIONAL] Alert type.
+     * 
+ */ + public function getLast() + { + return $this->_alert; + } + + /* SplSubject methods. */ + + /** + */ + public function attach(SplObserver $observer) + { + $this->detach($observer); + $this->_observers[] = $observer; + } + + /** + */ + public function detach(SplObserver $observer) + { + if (($key = array_search($observer, $this->_observers, true)) !== false) { + unset($this->_observers[$key]); + } + } + + /** + * Notification is triggered internally whenever the object's internal + * data storage is altered. + */ + public function notify() + { + foreach ($this->_observers as $val) { + $val->update($this); + } + } + +} diff --git a/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Base/Debug.php b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Base/Debug.php new file mode 100644 index 00000000..13559696 --- /dev/null +++ b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Base/Debug.php @@ -0,0 +1,152 @@ + + * @category Horde + * @copyright 2012-2017 Horde LLC + * @internal + * @license http://www.horde.org/licenses/lgpl21 LGPL 2.1 + * @package Imap_Client + */ +class Horde_Imap_Client_Base_Debug +{ + /** Time, in seconds, to be labeled a slow command. */ + const SLOW_CMD = 5; + + /** + * Is debugging active? + * + * @var boolean + */ + public $debug = true; + + /** + * The debug stream. + * + * @var resource + */ + protected $_stream; + + /** + * Timestamp of last command. + * + * @var integer + */ + protected $_time = null; + + /** + * Constructor. + * + * @param mixed $debug The debug target. + */ + public function __construct($debug) + { + $this->_stream = is_resource($debug) + ? $debug + : @fopen($debug, 'a'); + register_shutdown_function(array($this, 'shutdown')); + } + + /** + * Shutdown function. + */ + public function shutdown() + { + if (is_resource($this->_stream)) { + fflush($this->_stream); + fclose($this->_stream); + $this->_stream = null; + } + } + + /** + * Write client output to debug log. + * + * @param string $msg Debug message. + */ + public function client($msg) + { + $this->_write($msg . "\n", 'C: '); + } + + /** + * Write informational message to debug log. + * + * @param string $msg Debug message. + */ + public function info($msg) + { + $this->_write($msg . "\n", '>> '); + } + + /** + * Write server output to debug log. + * + * @param string $msg Debug message. + */ + public function raw($msg) + { + $this->_write($msg); + } + + /** + * Write server output to debug log. + * + * @param string $msg Debug message. + */ + public function server($msg) + { + $this->_write($msg . "\n", 'S: '); + } + + /** + * Write debug information to the output stream. + * + * @param string $msg Debug data. + */ + protected function _write($msg, $pre = null) + { + if (!$this->debug || !$this->_stream) { + return; + } + + if (!is_null($pre)) { + $new_time = microtime(true); + + if (is_null($this->_time)) { + fwrite( + $this->_stream, + str_repeat('-', 30) . "\n" . '>> ' . date('r') . "\n" + ); + } elseif (($diff = ($new_time - $this->_time)) > self::SLOW_CMD) { + fwrite( + $this->_stream, + '>> Slow Command: ' . round($diff, 3) . " seconds\n" + ); + } + + $this->_time = $new_time; + } + + fwrite($this->_stream, $pre . $msg); + } + +} diff --git a/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Base/Deprecated.php b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Base/Deprecated.php new file mode 100644 index 00000000..288d6f89 --- /dev/null +++ b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Base/Deprecated.php @@ -0,0 +1,109 @@ + + * @category Horde + * @copyright 2012-2017 Horde LLC + * @internal + * @license http://www.horde.org/licenses/lgpl21 LGPL 2.1 + * @package Imap_Client + */ +class Horde_Imap_Client_Base_Deprecated +{ + /** + * Returns a unique identifier for the current mailbox status. + * + * @param Horde_Imap_Client_Base $base_ob The base driver object. + * @param mixed $mailbox A mailbox. Either a + * Horde_Imap_Client_Mailbox + * object or a string (UTF-8). + * @param boolean $condstore Is CONDSTORE enabled? + * @param array $addl Additional cache info to add to + * the cache ID string. + * + * @return string The cache ID string, which will change when the + * composition of the mailbox changes. The uidvalidity + * will always be the first element, and will be delimited + * by the '|' character. + * + * @throws Horde_Imap_Client_Exception + */ + public static function getCacheId($base_ob, $mailbox, $condstore, + array $addl = array()) + { + $query = Horde_Imap_Client::STATUS_UIDVALIDITY | Horde_Imap_Client::STATUS_MESSAGES | Horde_Imap_Client::STATUS_UIDNEXT; + + /* Use MODSEQ as cache ID if CONDSTORE extension is available. */ + if ($condstore) { + $query |= Horde_Imap_Client::STATUS_HIGHESTMODSEQ; + } else { + $query |= Horde_Imap_Client::STATUS_UIDNEXT_FORCE; + } + + $status = $base_ob->status($mailbox, $query); + + if (empty($status['highestmodseq'])) { + $parts = array( + 'V' . $status['uidvalidity'], + 'U' . $status['uidnext'], + 'M' . $status['messages'] + ); + } else { + $parts = array( + 'V' . $status['uidvalidity'], + 'H' . $status['highestmodseq'] + ); + } + + return implode('|', array_merge($parts, $addl)); + } + + /** + * Parses a cacheID created by getCacheId(). + * + * @param string $id The cache ID. + * + * @return array An array with the following information: + * - highestmodseq: (integer) + * - messages: (integer) + * - uidnext: (integer) + * - uidvalidity: (integer) Always present + */ + public static function parseCacheId($id) + { + $data = array( + 'H' => 'highestmodseq', + 'M' => 'messages', + 'U' => 'uidnext', + 'V' => 'uidvalidity' + ); + $info = array(); + + foreach (explode('|', $id) as $part) { + if (isset($data[$part[0]])) { + $info[$data[$part[0]]] = intval(substr($part, 1)); + } + } + + return $info; + } + +} diff --git a/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Base/Mailbox.php b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Base/Mailbox.php new file mode 100644 index 00000000..0125a22f --- /dev/null +++ b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Base/Mailbox.php @@ -0,0 +1,187 @@ + + * @category Horde + * @copyright 2012-2017 Horde LLC + * @internal + * @license http://www.horde.org/licenses/lgpl21 LGPL 2.1 + * @package Imap_Client + */ +class Horde_Imap_Client_Base_Mailbox +{ + /** + * Mapping object. + * + * @var Horde_Imap_Client_Ids_Map + */ + public $map; + + /** + * Is mailbox opened? + * + * @var boolean + */ + public $open; + + /** + * Is mailbox sync'd with remote server (via CONDSTORE/QRESYNC)? + * + * @var boolean + */ + public $sync; + + /** + * Status information. + * + * @var array + */ + protected $_status = array(); + + /** + * Constructor. + */ + public function __construct() + { + $this->reset(); + } + + /** + * Get status information for the mailbox. + * + * @param integer $entry STATUS_* constant. + * + * @return mixed Status information. + */ + public function getStatus($entry) + { + if (isset($this->_status[$entry])) { + return $this->_status[$entry]; + } + + switch ($entry) { + case Horde_Imap_Client::STATUS_FLAGS: + case Horde_Imap_Client::STATUS_SYNCFLAGUIDS: + case Horde_Imap_Client::STATUS_SYNCVANISHED: + return array(); + + case Horde_Imap_Client::STATUS_FIRSTUNSEEN: + /* If we know there are no messages in the current mailbox, we + * know there are no unseen messages. */ + return empty($this->_status[Horde_Imap_Client::STATUS_MESSAGES]) + ? false + : null; + + case Horde_Imap_Client::STATUS_RECENT_TOTAL: + case Horde_Imap_Client::STATUS_SYNCMODSEQ: + return 0; + + case Horde_Imap_Client::STATUS_PERMFLAGS: + /* If PERMFLAGS is not returned by server, must assume that all + * flags can be changed permanently (RFC 3501 [6.3.1]). */ + $flags = isset($this->_status[Horde_Imap_Client::STATUS_FLAGS]) + ? $this->_status[Horde_Imap_Client::STATUS_FLAGS] + : array(); + $flags[] = "\\*"; + return $flags; + + case Horde_Imap_Client::STATUS_UIDNOTSTICKY: + /* In the absence of explicit uidnotsticky identification, assume + * that UIDs are sticky. */ + return false; + + case Horde_Imap_Client::STATUS_UNSEEN: + /* If we know there are no messages in the current mailbox, we + * know there are no unseen messages . */ + return empty($this->_status[Horde_Imap_Client::STATUS_MESSAGES]) + ? 0 + : null; + + default: + return null; + } + } + + /** + * Set status information for the mailbox. + * + * @param integer $entry STATUS_* constant. + * @param mixed $value Status information. + */ + public function setStatus($entry, $value) + { + switch ($entry) { + case Horde_Imap_Client::STATUS_FIRSTUNSEEN: + case Horde_Imap_Client::STATUS_HIGHESTMODSEQ: + case Horde_Imap_Client::STATUS_MESSAGES: + case Horde_Imap_Client::STATUS_UNSEEN: + case Horde_Imap_Client::STATUS_UIDNEXT: + case Horde_Imap_Client::STATUS_UIDVALIDITY: + $value = intval($value); + break; + + case Horde_Imap_Client::STATUS_RECENT: + /* Keep track of RECENT_TOTAL information. */ + $this->_status[Horde_Imap_Client::STATUS_RECENT_TOTAL] = isset($this->_status[Horde_Imap_Client::STATUS_RECENT_TOTAL]) + ? ($this->_status[Horde_Imap_Client::STATUS_RECENT_TOTAL] + $value) + : intval($value); + break; + + case Horde_Imap_Client::STATUS_SYNCMODSEQ: + /* This is only set once per access. */ + if (isset($this->_status[$entry])) { + return; + } + $value = intval($value); + break; + + case Horde_Imap_Client::STATUS_SYNCFLAGUIDS: + case Horde_Imap_Client::STATUS_SYNCVANISHED: + if (!isset($this->_status[$entry])) { + $this->_status[$entry] = array(); + } + $this->_status[$entry] = array_merge($this->_status[$entry], $value); + return; + } + + $this->_status[$entry] = $value; + } + + /** + * Reset the mailbox information. + */ + public function reset() + { + $keep = array( + Horde_Imap_Client::STATUS_SYNCFLAGUIDS, + Horde_Imap_Client::STATUS_SYNCMODSEQ, + Horde_Imap_Client::STATUS_SYNCVANISHED + ); + + foreach (array_diff(array_keys($this->_status), $keep) as $val) { + unset($this->_status[$val]); + } + + $this->map = new Horde_Imap_Client_Ids_Map(); + $this->open = $this->sync = false; + } + +} diff --git a/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Base/Password.php b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Base/Password.php new file mode 100644 index 00000000..2895618d --- /dev/null +++ b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Base/Password.php @@ -0,0 +1,33 @@ + + * @category Horde + * @copyright 2013-2017 Horde LLC + * @license http://www.horde.org/licenses/lgpl21 LGPL 2.1 + * @package Imap_Client + * @since 2.14.0 + */ +interface Horde_Imap_Client_Base_Password +{ + /** + * Return the password to use for the server connection. + * + * @return string The password. + */ + public function getPassword(); + +} diff --git a/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Cache.php b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Cache.php new file mode 100644 index 00000000..d858fe4f --- /dev/null +++ b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Cache.php @@ -0,0 +1,263 @@ + + * @category Horde + * @copyright 2005-2017 Horde LLC + * @license http://www.horde.org/licenses/lgpl21 LGPL 2.1 + * @package Imap_Client + */ +class Horde_Imap_Client_Cache +{ + /** + * Base client object. + * + * @var Horde_Imap_Client_Base + */ + protected $_baseob; + + /** + * Storage backend. + * + * @var Horde_Imap_Client_Cache_Backend + */ + protected $_backend; + + /** + * Debug output. + * + * @var Horde_Imap_Client_Base_Debug + */ + protected $_debug = false; + + /** + * The configuration params. + * + * @var array + */ + protected $_params = array(); + + /** + * Constructor. + * + * @param array $params Configuration parameters: + *
+     *   - REQUIRED Parameters:
+     *     - backend: (Horde_Imap_Client_Cache_Backend) The cache backend.
+     *     - baseob: (Horde_Imap_Client_Base) The base client object.
+     *
+     *   - Optional Parameters:
+     *     - debug: (Horde_Imap_Client_Base_Debug) Debug object.
+     *              DEFAULT: No debug output
+     * 
+ */ + public function __construct(array $params = array()) + { + $this->_backend = $params['backend']; + $this->_baseob = $params['baseob']; + + $this->_backend->setParams(array( + 'hostspec' => $this->_baseob->getParam('hostspec'), + 'port' => $this->_baseob->getParam('port'), + 'username' => $this->_baseob->getParam('username') + )); + + if (isset($params['debug']) && + ($params['debug'] instanceof Horde_Imap_Client_Base_Debug)) { + $this->_debug = $params['debug']; + $this->_debug->info(sprintf( + 'CACHE: Using the %s storage driver.', + get_class($this->_backend) + )); + } + } + + /** + * Get information from the cache. + * + * @param string $mailbox An IMAP mailbox string. + * @param array $uids The list of message UIDs to retrieve + * information for. If empty, returns the list + * of cached UIDs. + * @param array $fields An array of fields to retrieve. If empty, + * returns all cached fields. + * @param integer $uidvalid The IMAP uidvalidity value of the mailbox. + * + * @return array An array of arrays with the UID of the message as the + * key (if found) and the fields as values (will be + * undefined if not found). If $uids is empty, returns the + * full (unsorted) list of cached UIDs. + */ + public function get($mailbox, array $uids = array(), $fields = array(), + $uidvalid = null) + { + $mailbox = strval($mailbox); + + if (empty($uids)) { + $ret = $this->_backend->getCachedUids($mailbox, $uidvalid); + } else { + $ret = $this->_backend->get($mailbox, $uids, $fields, $uidvalid); + + if ($this->_debug && !empty($ret)) { + $this->_debug->info(sprintf( + 'CACHE: Retrieved messages (%s [%s; %s])', + empty($fields) ? 'ALL' : implode(',', $fields), + $mailbox, + $this->_baseob->getIdsOb(array_keys($ret))->tostring_sort + )); + } + } + + return $ret; + } + + /** + * Store information in cache. + * + * @param string $mailbox An IMAP mailbox string. + * @param array $data The list of data to save. The keys are the + * UIDs, the values are an array of information + * to save. If empty, do a check to make sure + * the uidvalidity is still valid. + * @param integer $uidvalid The IMAP uidvalidity value of the mailbox. + */ + public function set($mailbox, $data, $uidvalid) + { + $mailbox = strval($mailbox); + + if (empty($data)) { + $this->_backend->getMetaData($mailbox, $uidvalid, array('uidvalid')); + } else { + $this->_backend->set($mailbox, $data, $uidvalid); + + if ($this->_debug) { + $this->_debug->info(sprintf( + 'CACHE: Stored messages [%s; %s]', + $mailbox, + $this->_baseob->getIdsOb(array_keys($data))->tostring_sort + )); + } + } + } + + /** + * Get metadata information for a mailbox. + * + * @param string $mailbox An IMAP mailbox string. + * @param integer $uidvalid The IMAP uidvalidity value of the mailbox. + * @param array $entries An array of entries to return. If empty, + * returns all metadata. + * + * @return array The requested metadata. Requested entries that do not + * exist will be undefined. The following entries are + * defaults and always present: + * - uidvalid: (integer) The UIDVALIDITY of the mailbox. + */ + public function getMetaData($mailbox, $uidvalid = null, + array $entries = array()) + { + return $this->_backend->getMetaData(strval($mailbox), $uidvalid, $entries); + } + + /** + * Set metadata information for a mailbox. + * + * @param string $mailbox An IMAP mailbox string. + * @param integer $uidvalid The IMAP uidvalidity value of the mailbox. + * @param array $data The list of data to save. The keys are the + * metadata IDs, the values are the associated + * data. The following labels are reserved: + * 'uidvalid'. + */ + public function setMetaData($mailbox, $uidvalid, array $data = array()) + { + unset($data['uidvalid']); + + if (!empty($data)) { + if (!empty($uidvalid)) { + $data['uidvalid'] = $uidvalid; + } + $mailbox = strval($mailbox); + + $this->_backend->setMetaData($mailbox, $data); + + if ($this->_debug) { + $this->_debug->info(sprintf( + 'CACHE: Stored metadata (%s [%s])', + implode(',', array_keys($data)), + $mailbox + )); + } + } + } + + /** + * Delete messages in the cache. + * + * @param string $mailbox An IMAP mailbox string. + * @param array $uids The list of message UIDs to delete. + */ + public function deleteMsgs($mailbox, $uids) + { + if (empty($uids)) { + return; + } + + $mailbox = strval($mailbox); + + $this->_backend->deleteMsgs($mailbox, $uids); + + if ($this->_debug) { + $this->_debug->info(sprintf( + 'CACHE: Deleted messages [%s; %s]', + $mailbox, + $this->_baseob->getIdsOb($uids)->tostring_sort + )); + } + } + + /** + * Delete a mailbox from the cache. + * + * @param string $mbox The mailbox to delete. + */ + public function deleteMailbox($mbox) + { + $mbox = strval($mbox); + $this->_backend->deleteMailbox($mbox); + + if ($this->_debug) { + $this->_debug->info(sprintf( + 'CACHE: Deleted mailbox [%s]', + $mbox + )); + } + } + + /** + * Clear the cache. + * + * @since 2.9.0 + * + * @param integer $lifetime Only delete entries older than this (in + * seconds). If null, deletes all entries. + */ + public function clear($lifetime = null) + { + $this->_backend->clear($lifetime); + } + +} diff --git a/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Cache/Backend.php b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Cache/Backend.php new file mode 100644 index 00000000..75ed98c7 --- /dev/null +++ b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Cache/Backend.php @@ -0,0 +1,165 @@ + + * @category Horde + * @copyright 2013-2017 Horde LLC + * @license http://www.horde.org/licenses/lgpl21 LGPL 2.1 + * @package Imap_Client + */ +abstract class Horde_Imap_Client_Cache_Backend implements Serializable +{ + /** + * Configuration paramters. + * Values set by the base Cache object: hostspec, port, username + * + * @var array + */ + protected $_params = array(); + + /** + * Constructor. + * + * @param array $params Configuration parameters. + */ + public function __construct(array $params = array()) + { + $this->setParams($params); + $this->_initOb(); + } + + /** + * Initialization tasks. + */ + protected function _initOb() + { + } + + /** + * Add configuration parameters. + * + * @param array $params Configuration parameters. + */ + public function setParams(array $params = array()) + { + $this->_params = array_merge($this->_params, $params); + } + + /** + * Get information from the cache for a set of UIDs. + * + * @param string $mailbox An IMAP mailbox string. + * @param array $uids The list of message UIDs to retrieve + * information for. + * @param array $fields An array of fields to retrieve. If empty, + * returns all cached fields. + * @param integer $uidvalid The IMAP uidvalidity value of the mailbox. + * + * @return array An array of arrays with the UID of the message as the + * key (if found) and the fields as values (will be + * undefined if not found). + */ + abstract public function get($mailbox, $uids, $fields, $uidvalid); + + /** + * Get the list of cached UIDs. + * + * @param string $mailbox An IMAP mailbox string. + * @param integer $uidvalid The IMAP uidvalidity value of the mailbox. + * + * @return array The (unsorted) list of cached UIDs. + */ + abstract public function getCachedUids($mailbox, $uidvalid); + + /** + * Store data in cache. + * + * @param string $mailbox An IMAP mailbox string. + * @param array $data The list of data to save. The keys are the + * UIDs, the values are an array of information + * to save. + * @param integer $uidvalid The IMAP uidvalidity value of the mailbox. + */ + abstract public function set($mailbox, $data, $uidvalid); + + /** + * Get metadata information for a mailbox. + * + * @param string $mailbox An IMAP mailbox string. + * @param integer $uidvalid The IMAP uidvalidity value of the mailbox. + * @param array $entries An array of entries to return. If empty, + * returns all metadata. + * + * @return array The requested metadata. Requested entries that do not + * exist will be undefined. The following entries are + * defaults and always present: + * - uidvalid: (integer) The UIDVALIDITY of the mailbox. + */ + abstract public function getMetaData($mailbox, $uidvalid, $entries); + + /** + * Set metadata information for a mailbox. + * + * @param string $mailbox An IMAP mailbox string. + * @param array $data The list of data to save. The keys are the + * metadata IDs, the values are the associated + * data. (If present, uidvalidity appears as + * the 'uidvalid' key in $data.) + */ + abstract public function setMetaData($mailbox, $data); + + /** + * Delete messages in the cache. + * + * @param string $mailbox An IMAP mailbox string. + * @param array $uids The list of message UIDs to delete. + */ + abstract public function deleteMsgs($mailbox, $uids); + + /** + * Delete a mailbox from the cache. + * + * @param string $mailbox The mailbox to delete. + */ + abstract public function deleteMailbox($mailbox); + + /** + * Clear the cache. + * + * @param integer $lifetime Only delete entries older than this (in + * seconds). If null, deletes all entries. + */ + abstract public function clear($lifetime); + + + /* Serializable methods. */ + + /** + */ + public function serialize() + { + return serialize($this->_params); + } + + /** + */ + public function unserialize($data) + { + $this->_params = unserialize($data); + $this->_initOb(); + } + +} diff --git a/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Cache/Backend/Cache.php b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Cache/Backend/Cache.php new file mode 100644 index 00000000..cea22c5f --- /dev/null +++ b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Cache/Backend/Cache.php @@ -0,0 +1,506 @@ + + * @category Horde + * @copyright 2005-2017 Horde LLC + * @license http://www.horde.org/licenses/lgpl21 LGPL 2.1 + * @package Imap_Client + */ +class Horde_Imap_Client_Cache_Backend_Cache +extends Horde_Imap_Client_Cache_Backend +{ + /** Cache structure version. */ + const VERSION = 3; + + /** + * The cache object. + * + * @var Horde_Cache + */ + protected $_cache; + + /** + * The working data for the current pageload. All changes take place to + * this data. + * + * @var array + */ + protected $_data = array(); + + /** + * The list of cache slices loaded. + * + * @var array + */ + protected $_loaded = array(); + + /** + * The mapping of UIDs to slices. + * + * @var array + */ + protected $_slicemap = array(); + + /** + * The list of items to update: + * - add: (array) List of IDs that were added. + * - slice: (array) List of slices that were modified. + * - slicemap: (boolean) Was slicemap info changed? + * + * @var array + */ + protected $_update = array(); + + /** + * Constructor. + * + * @param array $params Configuration parameters: + *
+     *   - REQUIRED Parameters:
+     *     - cacheob: (Horde_Cache) The cache object to use.
+     *
+     *   - Optional Parameters:
+     *     - lifetime: (integer) The lifetime of the cache data (in seconds).
+     *                 DEFAULT: 1 week (604800 seconds)
+     *     - slicesize: (integer) The slicesize to use.
+     *                  DEFAULT: 50
+     * 
+ */ + public function __construct(array $params = array()) + { + // Default parameters. + $params = array_merge(array( + 'lifetime' => 604800, + 'slicesize' => 50 + ), array_filter($params)); + + if (!isset($params['cacheob'])) { + throw new InvalidArgumentException('Missing cacheob parameter.'); + } + + foreach (array('lifetime', 'slicesize') as $val) { + $params[$val] = intval($params[$val]); + } + + parent::__construct($params); + } + + /** + * Initialization tasks. + */ + protected function _initOb() + { + $this->_cache = $this->_params['cacheob']; + register_shutdown_function(array($this, 'save')); + } + + /** + * Updates the cache. + */ + public function save() + { + $lifetime = $this->_params['lifetime']; + + foreach ($this->_update as $mbox => $val) { + $s = &$this->_slicemap[$mbox]; + + try { + if (!empty($val['add'])) { + if ($s['c'] <= $this->_params['slicesize']) { + $val['slice'][] = $s['i']; + $this->_loadSlice($mbox, $s['i']); + } + $val['slicemap'] = true; + + foreach (array_keys(array_flip($val['add'])) as $uid) { + if ($s['c']++ > $this->_params['slicesize']) { + $s['c'] = 0; + $val['slice'][] = ++$s['i']; + $this->_loadSlice($mbox, $s['i']); + } + $s['s'][$uid] = $s['i']; + } + } + + if (!empty($val['slice'])) { + $d = &$this->_data[$mbox]; + $val['slicemap'] = true; + + foreach (array_keys(array_flip($val['slice'])) as $slice) { + $data = array(); + foreach (array_keys($s['s'], $slice) as $uid) { + $data[$uid] = is_array($d[$uid]) + ? serialize($d[$uid]) + : $d[$uid]; + } + $this->_cache->set($this->_getCid($mbox, $slice), serialize($data), $lifetime); + } + } + + if (!empty($val['slicemap'])) { + $this->_cache->set($this->_getCid($mbox, 'slicemap'), serialize($s), $lifetime); + } + } catch (Horde_Exception $e) { + } + } + + $this->_update = array(); + } + + /** + */ + public function get($mailbox, $uids, $fields, $uidvalid) + { + $ret = array(); + $this->_loadUids($mailbox, $uids, $uidvalid); + + if (empty($this->_data[$mailbox])) { + return $ret; + } + + if (!empty($fields)) { + $fields = array_flip($fields); + } + $ptr = &$this->_data[$mailbox]; + + foreach (array_intersect($uids, array_keys($ptr)) as $val) { + if (is_string($ptr[$val])) { + try { + $ptr[$val] = @unserialize($ptr[$val]); + } catch (Exception $e) {} + } + + $ret[$val] = (empty($fields) || empty($ptr[$val])) + ? $ptr[$val] + : array_intersect_key($ptr[$val], $fields); + } + + return $ret; + } + + /** + */ + public function getCachedUids($mailbox, $uidvalid) + { + $this->_loadSliceMap($mailbox, $uidvalid); + return array_unique(array_merge( + array_keys($this->_slicemap[$mailbox]['s']), + (isset($this->_update[$mailbox]) ? $this->_update[$mailbox]['add'] : array()) + )); + } + + /** + */ + public function set($mailbox, $data, $uidvalid) + { + $update = array_keys($data); + + try { + $this->_loadUids($mailbox, $update, $uidvalid); + } catch (Horde_Imap_Client_Exception $e) { + // Ignore invalidity - just start building the new cache + } + + $d = &$this->_data[$mailbox]; + $s = &$this->_slicemap[$mailbox]['s']; + $add = $updated = array(); + + foreach ($data as $k => $v) { + if (isset($d[$k])) { + if (is_string($d[$k])) { + try { + $d[$k] = @unserialize($d[$k]); + } catch (Exception $e) {} + } + $d[$k] = is_array($d[$k]) + ? array_merge($d[$k], $v) + : $v; + if (isset($s[$k])) { + $updated[$s[$k]] = true; + } + } else { + $d[$k] = $v; + $add[] = $k; + } + } + + $this->_toUpdate($mailbox, 'add', $add); + $this->_toUpdate($mailbox, 'slice', array_keys($updated)); + } + + /** + */ + public function getMetaData($mailbox, $uidvalid, $entries) + { + $this->_loadSliceMap($mailbox, $uidvalid); + + return empty($entries) + ? $this->_slicemap[$mailbox]['d'] + : array_intersect_key($this->_slicemap[$mailbox]['d'], array_flip($entries)); + } + + /** + */ + public function setMetaData($mailbox, $data) + { + $this->_loadSliceMap($mailbox, isset($data['uidvalid']) ? $data['uidvalid'] : null); + $this->_slicemap[$mailbox]['d'] = array_merge($this->_slicemap[$mailbox]['d'], $data); + $this->_toUpdate($mailbox, 'slicemap', true); + } + + /** + */ + public function deleteMsgs($mailbox, $uids) + { + if (empty($uids)) { + return; + } + + $this->_loadSliceMap($mailbox); + + $slicemap = &$this->_slicemap[$mailbox]; + $deleted = array_intersect_key($slicemap['s'], array_flip($uids)); + + if (isset($this->_update[$mailbox])) { + $this->_update[$mailbox]['add'] = array_diff( + $this->_update[$mailbox]['add'], + $uids + ); + } + + if (empty($deleted)) { + return; + } + + $this->_loadUids($mailbox, array_keys($deleted)); + $d = &$this->_data[$mailbox]; + + foreach (array_keys($deleted) as $id) { + unset($d[$id], $slicemap['s'][$id]); + } + + foreach (array_unique($deleted) as $slice) { + /* Get rid of slice if less than 10% of capacity. */ + if (($slice != $slicemap['i']) && + ($slice_uids = array_keys($slicemap['s'], $slice)) && + ($this->_params['slicesize'] * 0.1) > count($slice_uids)) { + $this->_toUpdate($mailbox, 'add', $slice_uids); + $this->_cache->expire($this->_getCid($mailbox, $slice)); + foreach ($slice_uids as $val) { + unset($slicemap['s'][$val]); + } + } else { + $this->_toUpdate($mailbox, 'slice', array($slice)); + } + } + } + + /** + */ + public function deleteMailbox($mailbox) + { + $this->_loadSliceMap($mailbox); + $this->_deleteMailbox($mailbox); + } + + /** + */ + public function clear($lifetime) + { + $this->_cache->clear(); + $this->_data = $this->_loaded = $this->_slicemap = $this->_update = array(); + } + + /** + * Create the unique ID used to store the data in the cache. + * + * @param string $mailbox The mailbox to cache. + * @param string $slice The cache slice. + * + * @return string The cache ID. + */ + protected function _getCid($mailbox, $slice) + { + return implode('|', array( + 'horde_imap_client', + $this->_params['username'], + $mailbox, + $this->_params['hostspec'], + $this->_params['port'], + $slice, + self::VERSION + )); + } + + /** + * Delete a mailbox from the cache. + * + * @param string $mbox The mailbox to delete. + */ + protected function _deleteMailbox($mbox) + { + foreach (array_merge(array_keys(array_flip($this->_slicemap[$mbox]['s'])), array('slicemap')) as $slice) { + $cid = $this->_getCid($mbox, $slice); + $this->_cache->expire($cid); + unset($this->_loaded[$cid]); + } + + unset( + $this->_data[$mbox], + $this->_slicemap[$mbox], + $this->_update[$mbox] + ); + } + + /** + * Load UIDs by regenerating from the cache. + * + * @param string $mailbox The mailbox to load. + * @param array $uids The UIDs to load. + * @param integer $uidvalid The IMAP uidvalidity value of the mailbox. + */ + protected function _loadUids($mailbox, $uids, $uidvalid = null) + { + if (!isset($this->_data[$mailbox])) { + $this->_data[$mailbox] = array(); + } + + $this->_loadSliceMap($mailbox, $uidvalid); + + if (!empty($uids)) { + foreach (array_unique(array_intersect_key($this->_slicemap[$mailbox]['s'], array_flip($uids))) as $slice) { + $this->_loadSlice($mailbox, $slice); + } + } + } + + /** + * Load UIDs from a cache slice. + * + * @param string $mailbox The mailbox to load. + * @param integer $slice The slice to load. + */ + protected function _loadSlice($mailbox, $slice) + { + $cache_id = $this->_getCid($mailbox, $slice); + + if (!empty($this->_loaded[$cache_id])) { + return; + } + + if (($data = $this->_cache->get($cache_id, 0)) !== false) { + try { + $data = @unserialize($data); + } catch (Exception $e) {} + } + + if (($data !== false) && is_array($data)) { + $this->_data[$mailbox] += $data; + $this->_loaded[$cache_id] = true; + } else { + $ptr = &$this->_slicemap[$mailbox]; + + // Slice data is corrupt; remove from slicemap. + foreach (array_keys($ptr['s'], $slice) as $val) { + unset($ptr['s'][$val]); + } + + if ($slice == $ptr['i']) { + $ptr['c'] = 0; + } + } + } + + /** + * Load the slicemap for a given mailbox. The slicemap contains + * the uidvalidity information, the UIDs->slice lookup table, and any + * metadata that needs to be saved for the mailbox. + * + * @param string $mailbox The mailbox. + * @param integer $uidvalid The IMAP uidvalidity value of the mailbox. + */ + protected function _loadSliceMap($mailbox, $uidvalid = null) + { + if (!isset($this->_slicemap[$mailbox]) && + (($data = $this->_cache->get($this->_getCid($mailbox, 'slicemap'), 0)) !== false)) { + try { + if (($slice = @unserialize($data)) && + is_array($slice)) { + $this->_slicemap[$mailbox] = $slice; + } + } catch (Exception $e) {} + } + + if (isset($this->_slicemap[$mailbox])) { + $ptr = &$this->_slicemap[$mailbox]; + if (is_null($ptr['d']['uidvalid'])) { + $ptr['d']['uidvalid'] = $uidvalid; + return; + } elseif (!is_null($uidvalid) && + ($ptr['d']['uidvalid'] != $uidvalid)) { + $this->_deleteMailbox($mailbox); + } else { + return; + } + } + + $this->_slicemap[$mailbox] = array( + // Tracking count for purposes of determining slices + 'c' => 0, + // Metadata storage + // By default includes UIDVALIDITY of mailbox. + 'd' => array('uidvalid' => $uidvalid), + // The ID of the last slice. + 'i' => 0, + // The slice list. + 's' => array() + ); + } + + /** + * Add update entry for a mailbox. + * + * @param string $mailbox The mailbox. + * @param string $type 'add', 'slice', or 'slicemap'. + * @param mixed $data The data to update. + */ + protected function _toUpdate($mailbox, $type, $data) + { + if (!isset($this->_update[$mailbox])) { + $this->_update[$mailbox] = array( + 'add' => array(), + 'slice' => array() + ); + } + + $this->_update[$mailbox][$type] = ($type == 'slicemap') + ? $data + : array_merge($this->_update[$mailbox][$type], $data); + } + + /* Serializable methods. */ + + /** + */ + public function serialize() + { + $this->save(); + return parent::serialize(); + } + +} diff --git a/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Cache/Backend/Db.php b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Cache/Backend/Db.php new file mode 100644 index 00000000..98d8a0d7 --- /dev/null +++ b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Cache/Backend/Db.php @@ -0,0 +1,407 @@ + + * @category Horde + * @copyright 2013-2017 Horde LLC + * @license http://www.horde.org/licenses/lgpl21 LGPL 2.1 + * @package Imap_Client + */ +class Horde_Imap_Client_Cache_Backend_Db +extends Horde_Imap_Client_Cache_Backend +{ + /** SQL table names. */ + const BASE_TABLE = 'horde_imap_client_data'; + const MD_TABLE = 'horde_imap_client_metadata'; + const MSG_TABLE = 'horde_imap_client_message'; + + /** + * Handle for the database connection. + * + * @var Horde_Db_Adapter + */ + protected $_db; + + /** + * Constructor. + * + * @param array $params Configuration parameters: + *
+     *   - REQUIRED Parameters:
+     *     - db: (Horde_Db_Adapter) DB object.
+     * 
+ */ + public function __construct(array $params = array()) + { + if (!isset($params['db'])) { + throw new InvalidArgumentException('Missing db parameter.'); + } + + parent::__construct($params); + } + + /** + */ + protected function _initOb() + { + $this->_db = $this->_params['db']; + } + + /** + */ + public function get($mailbox, $uids, $fields, $uidvalid) + { + $this->getMetaData($mailbox, $uidvalid, array('uidvalid')); + + $query = $this->_baseSql($mailbox, self::MSG_TABLE); + $query[0] = 'SELECT t.data, t.msguid ' . $query[0]; + + $uid_query = array(); + foreach ($uids as $val) { + $uid_query[] = 't.msguid = ?'; + $query[1][] = strval($val); + } + $query[0] .= ' AND (' . implode(' OR ', $uid_query) . ')'; + + $compress = new Horde_Compress_Fast(); + $out = array(); + + try { + $columns = $this->_db->columns(self::MSG_TABLE); + $res = $this->_db->select($query[0], $query[1]); + + foreach ($res as $row) { + try { + $out[$row['msguid']] = @unserialize($compress->decompress( + $columns['data']->binaryToString($row['data']) + )); + } catch (Exception $e) {} + } + } catch (Horde_Db_Exception $e) {} + + return $out; + } + + /** + */ + public function getCachedUids($mailbox, $uidvalid) + { + $this->getMetaData($mailbox, $uidvalid, array('uidvalid')); + + $query = $this->_baseSql($mailbox, self::MSG_TABLE); + $query[0] = 'SELECT DISTINCT t.msguid ' . $query[0]; + + try { + return $this->_db->selectValues($query[0], $query[1]); + } catch (Horde_Db_Exception $e) { + return array(); + } + } + + /** + */ + public function set($mailbox, $data, $uidvalid) + { + if ($uid = $this->_getUid($mailbox)) { + $res = $this->get($mailbox, array_keys($data), array(), $uidvalid); + } else { + $res = array(); + $uid = $this->_createUid($mailbox); + } + + $compress = new Horde_Compress_Fast(); + + foreach ($data as $key => $val) { + if (isset($res[$key])) { + try { + /* Update */ + $this->_db->updateBlob( + self::MSG_TABLE, + array('data' => new Horde_Db_Value_Binary($compress->compress(serialize(array_merge($res[$key], $val))))), + array( + 'messageid = ? AND msguid = ?', + array($uid, strval($key)) + ) + ); + } catch (Horde_Db_Exception $e) {} + } else { + /* Insert */ + try { + $this->_db->insertBlob( + self::MSG_TABLE, + array( + 'data' => new Horde_Db_Value_Binary($compress->compress(serialize($val))), + 'msguid' => strval($key), + 'messageid' => $uid + ) + ); + } catch (Horde_Db_Exception $e) {} + } + } + + /* Update modified time. */ + try { + $this->_db->update( + sprintf( + 'UPDATE %s SET modified = ? WHERE messageid = ?', + self::BASE_TABLE + ), + array(time(), $uid) + ); + } catch (Horde_Db_Exception $e) {} + + /* Update uidvalidity. */ + $this->setMetaData($mailbox, array('uidvalid' => $uidvalid)); + } + + /** + */ + public function getMetaData($mailbox, $uidvalid, $entries) + { + $query = $this->_baseSql($mailbox, self::MD_TABLE); + $query[0] = 'SELECT t.field, t.data ' . $query[0]; + + if (!empty($entries)) { + $entries[] = 'uidvalid'; + $entry_query = array(); + + foreach (array_unique($entries) as $val) { + $entry_query[] = 't.field = ?'; + $query[1][] = $val; + } + $query[0] .= ' AND (' . implode(' OR ', $entry_query) . ')'; + } + + try { + if ($res = $this->_db->selectAssoc($query[0], $query[1])) { + $columns = $this->_db->columns(self::MD_TABLE); + foreach ($res as $key => $val) { + switch ($key) { + case 'uidvalid': + $res[$key] = $columns['data']->binaryToString($val); + break; + + default: + try { + $res[$key] = @unserialize( + $columns['data']->binaryToString($val) + ); + } catch (Exception $e) {} + break; + } + } + + if (is_null($uidvalid) || + !isset($res['uidvalid']) || + ($res['uidvalid'] == $uidvalid)) { + return $res; + } + + $this->deleteMailbox($mailbox); + } + } catch (Horde_Db_Exception $e) {} + + return array(); + } + + /** + */ + public function setMetaData($mailbox, $data) + { + if (!($uid = $this->_getUid($mailbox))) { + $uid = $this->_createUid($mailbox); + } + + $query = sprintf('SELECT field FROM %s where messageid = ?', self::MD_TABLE); + $values = array($uid); + + try { + $fields = $this->_db->selectValues($query, $values); + } catch (Horde_Db_Exception $e) { + return; + } + + foreach ($data as $key => $val) { + $val = new Horde_Db_Value_Binary(($key == 'uidvalid') ? $val : serialize($val)); + + if (in_array($key, $fields)) { + /* Update */ + try { + $this->_db->updateBlob( + self::MD_TABLE, + array('data' => $val), + array('field = ? AND messageid = ?', array($key, $uid)) + ); + } catch (Horde_Db_Exception $e) {} + } else { + /* Insert */ + try { + $this->_db->insertBlob( + self::MD_TABLE, + array('data' => $val, 'field' => $key, 'messageid' => $uid) + ); + } catch (Horde_Db_Exception $e) {} + } + } + } + + /** + */ + public function deleteMsgs($mailbox, $uids) + { + if (empty($uids)) { + return; + } + + $query = $this->_baseSql($mailbox); + $query[0] = sprintf( + 'DELETE FROM %s WHERE messageid IN (SELECT messageid ' . $query[0] . ')', + self::MSG_TABLE + ); + + $uid_query = array(); + foreach ($uids as $val) { + $uid_query[] = 'msguid = ?'; + $query[1][] = strval($val); + } + $query[0] .= ' AND (' . implode(' OR ', $uid_query) . ')'; + + try { + $this->_db->delete($query[0], $query[1]); + } catch (Horde_Db_Exception $e) {} + } + + /** + */ + public function deleteMailbox($mailbox) + { + if (is_null($uid = $this->_getUid($mailbox))) { + return; + } + + foreach (array(self::BASE_TABLE, self::MD_TABLE, self::MSG_TABLE) as $val) { + try { + $this->_db->delete( + sprintf('DELETE FROM %s WHERE messageid = ?', $val), + array($uid) + ); + } catch (Horde_Db_Exception $e) {} + } + } + + /** + */ + public function clear($lifetime) + { + if (is_null($lifetime)) { + try { + $this->_db->delete(sprintf('DELETE FROM %s', self::BASE_TABLE)); + $this->_db->delete(sprintf('DELETE FROM %s', self::MD_TABLE)); + $this->_db->delete(sprintf('DELETE FROM %s', self::MSG_TABLE)); + } catch (Horde_Db_Exception $e) {} + return; + } + + $purge = time() - $lifetime; + $sql = 'DELETE FROM %s WHERE messageid IN (SELECT messageid FROM %s WHERE modified < ?)'; + + foreach (array(self::MD_TABLE, self::MSG_TABLE) as $val) { + try { + $this->_db->delete( + sprintf($sql, $val, self::BASE_TABLE), + array($purge) + ); + } catch (Horde_Db_Exception $e) { + } + } + + try { + $this->_db->delete( + sprintf('DELETE FROM %s WHERE modified < ?', self::BASE_TABLE), + array($purge) + ); + } catch (Horde_Db_Exception $e) { + } + } + + /** + * Prepare the base SQL query. + * + * @param string $mailbox The mailbox. + * @param string $join The table to join with the base table. + * + * @return array SQL query and bound parameters. + */ + protected function _baseSql($mailbox, $join = null) + { + $sql = sprintf('FROM %s d', self::BASE_TABLE); + + if (!is_null($join)) { + $sql .= sprintf(' INNER JOIN %s t ON d.messageid = t.messageid', $join); + } + + return array( + $sql . ' WHERE d.hostspec = ? AND d.port = ? AND d.username = ? AND d.mailbox = ?', + array( + $this->_params['hostspec'], + $this->_params['port'], + $this->_params['username'], + $mailbox + ) + ); + } + + /** + * @param string $mailbox + * + * @return string UID from base table. + */ + protected function _getUid($mailbox) + { + $query = $this->_baseSql($mailbox); + $query[0] = 'SELECT d.messageid ' . $query[0]; + + try { + return $this->_db->selectValue($query[0], $query[1]); + } catch (Horde_Db_Exception $e) { + return null; + } + } + + /** + * @param string $mailbox + * + * @return string UID from base table. + */ + protected function _createUid($mailbox) + { + return $this->_db->insert( + sprintf( + 'INSERT INTO %s (hostspec, mailbox, port, username) ' . + 'VALUES (?, ?, ?, ?)', + self::BASE_TABLE + ), + array( + $this->_params['hostspec'], + $mailbox, + $this->_params['port'], + $this->_params['username'] + ) + ); + } + +} diff --git a/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Cache/Backend/Hashtable.php b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Cache/Backend/Hashtable.php new file mode 100644 index 00000000..d4fa67d3 --- /dev/null +++ b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Cache/Backend/Hashtable.php @@ -0,0 +1,421 @@ + + * @category Horde + * @copyright 2013-2017 Horde LLC + * @license http://www.horde.org/licenses/lgpl21 LGPL 2.1 + * @package Imap_Client + * @since 2.17.0 + */ +class Horde_Imap_Client_Cache_Backend_Hashtable +extends Horde_Imap_Client_Cache_Backend +{ + /** Separator for CID between mailbox and UID. */ + const CID_SEPARATOR = '|'; + + /** + * The working data for the current pageload. All changes take place to + * this data. + * + * @var array + */ + protected $_data = array(); + + /** + * HashTable object. + * + * @var Horde_HashTable + */ + protected $_hash; + + /** + * Mailbox level data. + * + * @var array + */ + protected $_mbox = array(); + + /** + * Horde_Pack singleton object. + * + * @var Horde_Pack + */ + protected $_pack; + + /** + * List of mailbox/UIDs to update. + * Keys are mailboxes. Values are arrays with three possible keys: + *
+     *   - d: UIDs to delete
+     *   - m: Was metadata updated?
+     *   - u: UIDs to update
+     * 
+ * + * @var array + */ + protected $_update = array(); + + /** + * Constructor. + * + * @param array $params Configuration parameters: + *
+     *   - REQUIRED parameters:
+     *     - hashtable: (Horde_HashTable) A HashTable object.
+     *
+     *   - Optional Parameters:
+     *     - lifetime: (integer) The lifetime of the cache data (in seconds).
+     *                 DEFAULT: 604800 seconds (1 week) [@since 2.19.0]
+     * 
+ */ + public function __construct(array $params = array()) + { + if (!isset($params['hashtable'])) { + throw new InvalidArgumentException('Missing hashtable parameter.'); + } + + parent::__construct(array_merge(array( + 'lifetime' => 604800 + ), $params)); + } + + /** + */ + protected function _initOb() + { + $this->_hash = $this->_params['hashtable']; + $this->_pack = new Horde_Pack(); + register_shutdown_function(array($this, 'save')); + } + + /** + */ + public function get($mailbox, $uids, $fields, $uidvalid) + { + $ret = array(); + + if (empty($uids)) { + return $ret; + } + + $this->_loadUids($mailbox, $uids, $uidvalid); + + if (empty($this->_data[$mailbox])) { + return $ret; + } + + if (!empty($fields)) { + $fields = array_flip($fields); + } + $ptr = &$this->_data[$mailbox]; + $to_delete = array(); + + foreach ($uids as $val) { + if (isset($ptr[$val])) { + if (is_string($ptr[$val])) { + try { + $ptr[$val] = $this->_pack->unpack($ptr[$val]); + } catch (Horde_Pack_Exception $e) { + $to_delete[] = $val; + continue; + } + } + + $ret[$val] = (empty($fields) || empty($ptr[$val])) + ? $ptr[$val] + : array_intersect_key($ptr[$val], $fields); + } else { + $to_delete[] = $val; + } + } + + $this->deleteMsgs($mailbox, $to_delete); + + return $ret; + } + + /** + */ + public function getCachedUids($mailbox, $uidvalid) + { + $this->_loadMailbox($mailbox, $uidvalid); + return $this->_mbox[$mailbox]['u']->ids; + } + + /** + */ + public function set($mailbox, $data, $uidvalid) + { + $this->_loadUids($mailbox, array_keys($data), $uidvalid); + + $d = &$this->_data[$mailbox]; + $to_add = array(); + + foreach ($data as $k => $v) { + if (isset($d[$k]) && is_string($d[$k])) { + try { + $d[$k] = $this->_pack->unpack($d[$k]); + } catch (Horde_Pack_Exception $e) { + continue; + } + } + + $d[$k] = (isset($d[$k]) && is_array($d[$k])) + ? array_merge($d[$k], $v) + : $v; + $this->_update[$mailbox]['u'][$k] = true; + unset($this->_update[$mailbox]['d'][$k]); + $to_add[] = $k; + } + + if (!empty($to_add)) { + $this->_mbox[$mailbox]['u']->add($to_add); + $this->_update[$mailbox]['m'] = true; + } + } + + /** + */ + public function getMetaData($mailbox, $uidvalid, $entries) + { + $this->_loadMailbox($mailbox, $uidvalid); + + return empty($entries) + ? $this->_mbox[$mailbox]['d'] + : array_intersect_key($this->_mbox[$mailbox]['d'], array_flip($entries)); + } + + /** + */ + public function setMetaData($mailbox, $data) + { + $this->_loadMailbox($mailbox, isset($data['uidvalid']) ? $data['uidvalid'] : null); + + $this->_mbox[$mailbox]['d'] = array_merge( + $this->_mbox[$mailbox]['d'], + $data + ); + $this->_update[$mailbox]['m'] = true; + } + + /** + */ + public function deleteMsgs($mailbox, $uids) + { + if (empty($uids)) { + return; + } + + $this->_loadMailbox($mailbox); + + foreach ($uids as $val) { + unset( + $this->_data[$mailbox][$val], + $this->_update[$mailbox]['u'][$val] + ); + $this->_update[$mailbox]['d'][$val] = true; + } + + $this->_mbox[$mailbox]['u']->remove($uids); + $this->_update[$mailbox]['m'] = true; + } + + /** + */ + public function deleteMailbox($mailbox) + { + /* Do this action immediately, instead of at shutdown. Makes coding + * simpler. */ + $this->_loadMailbox($mailbox); + + $this->_hash->delete(array_merge( + array($this->_getCid($mailbox)), + array_values($this->_getMsgCids($mailbox, $this->_mbox[$mailbox]['u'])) + )); + + unset( + $this->_data[$mailbox], + $this->_mbox[$mailbox], + $this->_update[$mailbox] + ); + } + + /** + */ + public function clear($lifetime) + { + /* Only can clear mailboxes we know about. */ + foreach (array_keys($this->_mbox) as $val) { + $this->deleteMailbox($val); + } + + $this->_data = $this->_mbox = $this->_update = array(); + } + + /** + * Updates the cache. + */ + public function save() + { + foreach ($this->_update as $mbox => $val) { + try { + if (!empty($val['u'])) { + $ptr = &$this->_data[$mbox]; + foreach ($this->_getMsgCids($mbox, array_keys($val['u'])) as $k2 => $v2) { + try { + $this->_hash->set( + $v2, + $this->_pack->pack($ptr[$k2]), + array('expire' => $this->_params['lifetime']) + ); + } catch (Horde_Pack_Exception $e) { + $this->deleteMsgs($mbox, array($v2)); + $val['d'][] = $v2; + } + } + } + + if (!empty($val['d'])) { + $this->_hash->delete(array_values( + $this->_getMsgCids($mbox, $val['d']) + )); + } + + if (!empty($val['m'])) { + try { + $this->_hash->set( + $this->_getCid($mbox), + $this->_pack->pack($this->_mbox[$mbox]), + array('expire' => $this->_params['lifetime']) + ); + } catch (Horde_Pack_Exception $e) {} + } + } catch (Horde_Exception $e) { + } + } + + $this->_update = array(); + } + + /** + * Loads basic mailbox information. + * + * @param string $mailbox The mailbox to load. + * @param integer $uidvalid The IMAP uidvalidity value of the mailbox. + */ + protected function _loadMailbox($mailbox, $uidvalid = null) + { + if (!isset($this->_mbox[$mailbox]) && + ($ob = $this->_hash->get($this->_getCid($mailbox)))) { + try { + $this->_mbox[$mailbox] = $this->_pack->unpack($ob); + } catch (Horde_Pack_Exception $e) {} + } + + if (isset($this->_mbox[$mailbox])) { + if (is_null($uidvalid) || + ($uidvalid == $this->_mbox[$mailbox]['d']['uidvalid'])) { + return; + } + $this->deleteMailbox($mailbox); + } + + $this->_mbox[$mailbox] = array( + // Metadata storage + // By default includes UIDVALIDITY of mailbox. + 'd' => array('uidvalid' => $uidvalid), + // List of UIDs + 'u' => new Horde_Imap_Client_Ids() + ); + } + + /** + * Load UIDs by regenerating from the cache. + * + * @param string $mailbox The mailbox to load. + * @param array $uids The UIDs to load. + * @param integer $uidvalid The IMAP uidvalidity value of the mailbox. + */ + protected function _loadUids($mailbox, $uids, $uidvalid = null) + { + if (!isset($this->_data[$mailbox])) { + $this->_data[$mailbox] = array(); + } + + $this->_loadMailbox($mailbox, $uidvalid); + + if (empty($uids)) { + return; + } + + $ptr = &$this->_data[$mailbox]; + + $load = array_flip( + array_diff_key( + $this->_getMsgCids( + $mailbox, + array_unique(array_intersect($this->_mbox[$mailbox]['u']->ids, $uids)) + ), + $this->_data[$mailbox] + ) + ); + + foreach (array_filter($this->_hash->get(array_keys($load))) as $key => $val) { + $ptr[$load[$key]] = $val; + } + } + + /** + * Create the unique ID used to store the mailbox data in the cache. + * + * @param string $mailbox The mailbox to cache. + * + * @return string The cache ID. + */ + protected function _getCid($mailbox) + { + return implode(self::CID_SEPARATOR, array( + 'horde_imap_client', + $this->_params['username'], + $mailbox, + $this->_params['hostspec'], + $this->_params['port'] + )); + } + + /** + * Return a list of cache IDs for mailbox/UID pairs. + * + * @param string $mailbox The mailbox to cache. + * @param array $ids The UID list. + * + * @return array List of UIDs => cache IDs. + */ + protected function _getMsgCids($mailbox, $ids) + { + $cid = $this->_getCid($mailbox); + $out = array(); + + foreach ($ids as $val) { + $out[$val] = $cid . self::CID_SEPARATOR . $val; + } + + return $out; + } + +} diff --git a/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Cache/Backend/Mongo.php b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Cache/Backend/Mongo.php new file mode 100644 index 00000000..9fb6511e --- /dev/null +++ b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Cache/Backend/Mongo.php @@ -0,0 +1,440 @@ + + * @category Horde + * @copyright 2013-2017 Horde LLC + * @license http://www.horde.org/licenses/lgpl21 LGPL 2.1 + * @package Imap_Client + */ +class Horde_Imap_Client_Cache_Backend_Mongo +extends Horde_Imap_Client_Cache_Backend +implements Horde_Mongo_Collection_Index +{ + /** Mongo collection names. */ + const BASE = 'horde_imap_client_cache_data'; + const MD = 'horde_imap_client_cache_metadata'; + const MSG = 'horde_imap_client_cache_message'; + + /** Mongo field names: BASE collection. */ + const BASE_HOSTSPEC = 'hostspec'; + const BASE_MAILBOX = 'mailbox'; + const BASE_MODIFIED = 'modified'; + const BASE_PORT = 'port'; + const BASE_UID = 'data'; + const BASE_USERNAME = 'username'; + + /** Mongo field names: MD collection. */ + const MD_DATA = 'data'; + const MD_FIELD = 'field'; + const MD_UID = 'uid'; + + /** Mongo field names: MSG collection. */ + const MSG_DATA = 'data'; + const MSG_MSGUID = 'msguid'; + const MSG_UID = 'uid'; + + /** + * The MongoDB object for the cache data. + * + * @var MongoDB + */ + protected $_db; + + /** + * The list of indices. + * + * @var array + */ + protected $_indices = array( + self::BASE => array( + 'base_index_1' => array( + self::BASE_HOSTSPEC => 1, + self::BASE_MAILBOX => 1, + self::BASE_PORT => 1, + self::BASE_USERNAME => 1, + ) + ), + self::MSG => array( + 'msg_index_1' => array( + self::MSG_MSGUID => 1, + self::MSG_UID => 1 + ) + ) + ); + + /** + * Constructor. + * + * @param array $params Configuration parameters: + *
+     *   - REQUIRED parameters:
+     *     - mongo_db: (Horde_Mongo_Client) A MongoDB client object.
+     * 
+ */ + public function __construct(array $params = array()) + { + if (!isset($params['mongo_db'])) { + throw new InvalidArgumentException('Missing mongo_db parameter.'); + } + + parent::__construct($params); + } + + /** + */ + protected function _initOb() + { + $this->_db = $this->_params['mongo_db']->selectDB(null); + } + + /** + */ + public function get($mailbox, $uids, $fields, $uidvalid) + { + $this->getMetaData($mailbox, $uidvalid, array('uidvalid')); + + if (!($uid = $this->_getUid($mailbox))) { + return array(); + } + + $out = array(); + $query = array( + self::MSG_MSGUID => array('$in' => array_map('strval', $uids)), + self::MSG_UID => $uid + ); + + try { + $cursor = $this->_db->selectCollection(self::MSG)->find( + $query, + array(self::MSG_DATA => true, self::MSG_MSGUID => true) + ); + foreach ($cursor as $val) { + try { + $out[$val[self::MSG_MSGUID]] = $this->_value($val[self::MSG_DATA]); + } catch (Exception $e) {} + } + } catch (MongoException $e) {} + + return $out; + } + + /** + */ + public function getCachedUids($mailbox, $uidvalid) + { + $this->getMetaData($mailbox, $uidvalid, array('uidvalid')); + + if (!($uid = $this->_getUid($mailbox))) { + return array(); + } + + $out = array(); + $query = array( + self::MSG_UID => $uid + ); + + try { + $cursor = $this->_db->selectCollection(self::MSG)->find( + $query, array(self::MSG_MSGUID => true) + ); + foreach ($cursor as $val) { + $out[] = $val[self::MSG_MSGUID]; + } + } catch (MongoException $e) {} + + return $out; + } + + /** + */ + public function set($mailbox, $data, $uidvalid) + { + if ($uid = $this->_getUid($mailbox)) { + $res = $this->get($mailbox, array_keys($data), array(), $uidvalid); + } else { + $res = array(); + $uid = $this->_createUid($mailbox); + } + + $coll = $this->_db->selectCollection(self::MSG); + + foreach ($data as $key => $val) { + try { + if (isset($res[$key])) { + $coll->update(array( + self::MSG_MSGUID => strval($key), + self::MSG_UID => $uid + ), array( + self::MSG_DATA => $this->_value(array_merge($res[$key], $val)), + self::MSG_MSGUID => strval($key), + self::MSG_UID => $uid + )); + } else { + $doc = array( + self::MSG_DATA => $this->_value($val), + self::MSG_MSGUID => strval($key), + self::MSG_UID => $uid + ); + $coll->insert($doc); + } + } catch (MongoException $e) {} + } + + /* Update modified time. */ + try { + $this->_db->selectCollection(self::BASE)->update( + array(self::BASE_UID => $uid), + array(self::BASE_MODIFIED => time()) + ); + } catch (MongoException $e) {} + + /* Update uidvalidity. */ + $this->setMetaData($mailbox, array('uidvalid' => $uidvalid)); + } + + /** + */ + public function getMetaData($mailbox, $uidvalid, $entries) + { + if (!($uid = $this->_getUid($mailbox))) { + return array(); + } + + $out = array(); + $query = array( + self::MD_UID => $uid + ); + + if (!empty($entries)) { + $entries[] = 'uidvalid'; + $query[self::MD_FIELD] = array( + '$in' => array_unique($entries) + ); + } + + try { + $cursor = $this->_db->selectCollection(self::MD)->find( + $query, + array(self::MD_DATA => true, self::MD_FIELD => true) + ); + foreach ($cursor as $val) { + try { + $out[$val[self::MD_FIELD]] = $this->_value($val[self::MD_DATA]); + } catch (Exception $e) {} + } + + if (is_null($uidvalid) || + !isset($out['uidvalid']) || + ($out['uidvalid'] == $uidvalid)) { + return $out; + } + + $this->deleteMailbox($mailbox); + } catch (MongoException $e) {} + + return array(); + } + + /** + */ + public function setMetaData($mailbox, $data) + { + if (!($uid = $this->_getUid($mailbox))) { + $uid = $this->_createUid($mailbox); + } + + $coll = $this->_db->selectCollection(self::MD); + + foreach ($data as $key => $val) { + try { + $coll->update( + array( + self::MD_FIELD => $key, + self::MD_UID => $uid + ), + array( + self::MD_DATA => $this->_value($val), + self::MD_FIELD => $key, + self::MD_UID => $uid + ), + array('upsert' => true) + ); + } catch (MongoException $e) {} + } + } + + /** + */ + public function deleteMsgs($mailbox, $uids) + { + if (!empty($uids) && ($uid = $this->_getUid($mailbox))) { + try { + $this->_db->selectCollection(self::MSG)->remove(array( + self::MSG_MSGUID => array( + '$in' => array_map('strval', $uids) + ), + self::MSG_UID => $uid + )); + } catch (MongoException $e) {} + } + } + + /** + */ + public function deleteMailbox($mailbox) + { + if (!($uid = $this->_getUid($mailbox))) { + return; + } + + foreach (array(self::BASE, self::MD, self::MSG) as $val) { + try { + $this->_db->selectCollection($val) + ->remove(array('uid' => $uid)); + } catch (MongoException $e) {} + } + } + + /** + */ + public function clear($lifetime) + { + if (is_null($lifetime)) { + foreach (array(self::BASE, self::MD, self::MSG) as $val) { + $this->_db->selectCollection($val)->drop(); + } + return; + } + + $query = array( + self::BASE_MODIFIED => array('$lt' => (time() - $lifetime)) + ); + $uids = array(); + + try { + $cursor = $this->_db->selectCollection(self::BASE)->find($query); + foreach ($cursor as $val) { + $uids[] = strval($val['_id']); + } + } catch (MongoException $e) {} + + if (empty($uids)) { + return; + } + + foreach (array(self::BASE, self::MD, self::MSG) as $val) { + try { + $this->_db->selectCollection($val) + ->remove(array('uid' => array('$in' => $uids))); + } catch (MongoException $e) {} + } + } + + /** + * Return the UID for a mailbox/user/server combo. + * + * @param string $mailbox Mailbox name. + * + * @return string UID from base table. + */ + protected function _getUid($mailbox) + { + $query = array( + self::BASE_HOSTSPEC => $this->_params['hostspec'], + self::BASE_MAILBOX => $mailbox, + self::BASE_PORT => $this->_params['port'], + self::BASE_USERNAME => $this->_params['username'] + ); + + try { + if ($result = $this->_db->selectCollection(self::BASE)->findOne($query)) { + return strval($result['_id']); + } + } catch (MongoException $e) {} + + return null; + } + + /** + * Create and return the UID for a mailbox/user/server combo. + * + * @param string $mailbox Mailbox name. + * + * @return string UID from base table. + */ + protected function _createUid($mailbox) + { + $doc = array( + self::BASE_HOSTSPEC => $this->_params['hostspec'], + self::BASE_MAILBOX => $mailbox, + self::BASE_PORT => $this->_params['port'], + self::BASE_USERNAME => $this->_params['username'] + ); + $this->_db->selectCollection(self::BASE)->insert($doc); + + return $this->_getUid($mailbox); + } + + /** + * Convert data from/to storage format. + * + * @param mixed|MongoBinData $data The data object. + * + * @return mixed|MongoBinData The converted data. + */ + protected function _value($data) + { + static $compress; + + if (!isset($compress)) { + $compress = new Horde_Compress_Fast(); + } + + return ($data instanceof MongoBinData) + ? @unserialize($compress->decompress($data->bin)) + : new MongoBinData( + $compress->compress(serialize($data)), MongoBinData::BYTE_ARRAY + ); + } + + /* Horde_Mongo_Collection_Index methods. */ + + /** + */ + public function checkMongoIndices() + { + foreach ($this->_indices as $key => $val) { + if (!$this->_params['mongo_db']->checkIndices($key, $val)) { + return false; + } + } + + return true; + } + + /** + */ + public function createMongoIndices() + { + foreach ($this->_indices as $key => $val) { + $this->_params['mongo_db']->createIndices($key, $val); + } + } + +} diff --git a/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Cache/Backend/Null.php b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Cache/Backend/Null.php new file mode 100644 index 00000000..ca4fe8bc --- /dev/null +++ b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Cache/Backend/Null.php @@ -0,0 +1,79 @@ + + * @category Horde + * @copyright 2013-2017 Horde LLC + * @license http://www.horde.org/licenses/lgpl21 LGPL 2.1 + * @package Imap_Client + */ +class Horde_Imap_Client_Cache_Backend_Null +extends Horde_Imap_Client_Cache_Backend +{ + /** + */ + public function get($mailbox, $uids, $fields, $uidvalid) + { + return array(); + } + + /** + */ + public function getCachedUids($mailbox, $uidvalid) + { + return array(); + } + + /** + */ + public function set($mailbox, $data, $uidvalid) + { + } + + /** + */ + public function getMetaData($mailbox, $uidvalid, $entries) + { + return array( + 'uidvalid' => 0 + ); + } + + /** + */ + public function setMetaData($mailbox, $data) + { + } + + /** + */ + public function deleteMsgs($mailbox, $uids) + { + } + + /** + */ + public function deleteMailbox($mailbox) + { + } + + /** + */ + public function clear($lifetime) + { + } + +} diff --git a/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Data/Acl.php b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Data/Acl.php new file mode 100644 index 00000000..1f0461c9 --- /dev/null +++ b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Data/Acl.php @@ -0,0 +1,164 @@ + + * @category Horde + * @copyright 2011-2017 Horde LLC + * @license http://www.horde.org/licenses/lgpl21 LGPL 2.1 + * @package Imap_Client + */ +class Horde_Imap_Client_Data_Acl extends Horde_Imap_Client_Data_AclCommon implements ArrayAccess, IteratorAggregate, Serializable +{ + /** + * ACL rights. + * + * @var array + */ + protected $_rights; + + /** + * Constructor. + * + * @param string $rights The rights (see RFC 4314 [2.1]). + */ + public function __construct($rights = '') + { + $this->_rights = str_split($rights); + $this->_normalize(); + } + + /** + * String representation of the ACL. + * + * @return string String representation (RFC 4314 compliant). + */ + public function __toString() + { + return implode('', $this->_rights); + } + + /** + * Computes the difference to another rights string. + * Virtual rights are ignored. + * + * @param string $rights The rights to compute against. + * + * @return array Two element array: added and removed. + */ + public function diff($rights) + { + $rlist = array_diff(str_split($rights), array_keys($this->_virtual)); + + return array( + 'added' => implode('', array_diff($rlist, $this->_rights)), + 'removed' => implode('', array_diff($this->_rights, $rlist)) + ); + } + + /** + * Normalize virtual rights (see RFC 4314 [2.1.1]). + */ + protected function _normalize() + { + /* Clients conforming to RFC 4314 MUST ignore the virtual ACL_CREATE + * and ACL_DELETE rights. See RFC 4314 [2.1]. However, we still need + * to handle these rights when dealing with RFC 2086 servers since + * we are abstracting out use of ACL_CREATE/ACL_DELETE to their + * component RFC 4314 rights. */ + foreach ($this->_virtual as $key => $val) { + foreach ($val as $right) { + if ($this[$right]) { + foreach (array_keys($this->_virtual) as $virtual) { + unset($this[$virtual]); + } + return; + } + } + } + foreach ($this->_virtual as $key => $val) { + if ($this[$key]) { + unset($this[$key]); + $this->_rights = array_unique(array_merge($this->_rights, $val)); + } + } + } + + /* ArrayAccess methods. */ + + /** + */ + public function offsetExists($offset) + { + return $this[$offset]; + } + + /** + */ + public function offsetGet($offset) + { + return in_array($offset, $this->_rights); + } + + /** + */ + public function offsetSet($offset, $value) + { + if ($value) { + if (!$this[$offset]) { + $this->_rights[] = $offset; + $this->_normalize(); + } + } elseif ($this[$offset]) { + if (isset($this->_virtual[$offset])) { + foreach ($this->_virtual[$offset] as $val) { + unset($this[$val]); + } + } + unset($this[$offset]); + } + } + + /** + */ + public function offsetUnset($offset) + { + $this->_rights = array_values(array_diff($this->_rights, array($offset))); + } + + /* IteratorAggregate method. */ + + public function getIterator() + { + return new ArrayIterator($this->_rights); + } + + /* Serializable methods. */ + + /** + */ + public function serialize() + { + return json_encode($this->_rights); + } + + /** + */ + public function unserialize($data) + { + $this->_rights = json_decode($data); + } + +} diff --git a/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Data/AclCommon.php b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Data/AclCommon.php new file mode 100644 index 00000000..7b5e3cfd --- /dev/null +++ b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Data/AclCommon.php @@ -0,0 +1,72 @@ + + * @category Horde + * @copyright 2011-2017 Horde LLC + * @license http://www.horde.org/licenses/lgpl21 LGPL 2.1 + * @package Imap_Client + */ +class Horde_Imap_Client_Data_AclCommon +{ + /** Constants for getString(). */ + const RFC_2086 = 1; + const RFC_4314 = 2; + + /** + * List of virtual rights (RFC 4314 [2.1.1]). + * + * @var array + */ + protected $_virtual = array( + Horde_Imap_Client::ACL_CREATE => array( + Horde_Imap_Client::ACL_CREATEMBOX, + Horde_Imap_Client::ACL_DELETEMBOX + ), + Horde_Imap_Client::ACL_DELETE => array( + Horde_Imap_Client::ACL_DELETEMSGS, + // Don't put this first - we do checks on the existence of the + // first element in this array to determine the RFC type, and this + // is duplicate of right contained in ACL_CREATE. + Horde_Imap_Client::ACL_DELETEMBOX, + Horde_Imap_Client::ACL_EXPUNGE + ) + ); + + /** + * Returns the raw string to use in IMAP server calls. + * + * @param integer $type The RFC type to use (RFC_* constant). + * + * @return string The string representation of the ACL. + */ + public function getString($type = self::RFC_4314) + { + $acl = strval($this); + + if ($type == self::RFC_2086) { + foreach ($this->_virtual as $key => $val) { + $acl = str_replace($val, '', $acl, $count); + if ($count) { + $acl .= $key; + } + } + } + + return $acl; + } + +} diff --git a/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Data/AclNegative.php b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Data/AclNegative.php new file mode 100644 index 00000000..4ef352bd --- /dev/null +++ b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Data/AclNegative.php @@ -0,0 +1,25 @@ + + * @category Horde + * @copyright 2011-2017 Horde LLC + * @license http://www.horde.org/licenses/lgpl21 LGPL 2.1 + * @package Imap_Client + */ +class Horde_Imap_Client_Data_AclNegative extends Horde_Imap_Client_Data_Acl +{ +} diff --git a/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Data/AclRights.php b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Data/AclRights.php new file mode 100644 index 00000000..5b21468d --- /dev/null +++ b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Data/AclRights.php @@ -0,0 +1,208 @@ + + * @category Horde + * @copyright 2011-2017 Horde LLC + * @license http://www.horde.org/licenses/lgpl21 LGPL 2.1 + * @package Imap_Client + */ +class Horde_Imap_Client_Data_AclRights extends Horde_Imap_Client_Data_AclCommon implements ArrayAccess, Iterator, Serializable +{ + /** + * ACL optional rights. + * + * @var array + */ + protected $_optional = array(); + + /** + * ACL required rights. + * + * @var array + */ + protected $_required = array(); + + /** + * Constructor. + * + * @param array $required The required rights (see RFC 4314 [2.1]). + * @param array $optional The optional rights (see RFC 4314 [2.1]). + */ + public function __construct(array $required = array(), + array $optional = array()) + { + $this->_required = $required; + + foreach ($optional as $val) { + foreach (str_split($val) as $right) { + $this->_optional[$right] = $val; + } + } + + $this->_normalize(); + } + + /** + * String representation of the ACL. + * + * @return string String representation (RFC 4314 compliant). + * + */ + public function __toString() + { + return implode('', array_keys(array_flip(array_merge(array_values($this->_required), array_keys($this->_optional))))); + } + + /** + * Normalize virtual rights (see RFC 4314 [2.1.1]). + */ + protected function _normalize() + { + /* Clients conforming to RFC 4314 MUST ignore the virtual ACL_CREATE + * and ACL_DELETE rights. See RFC 4314 [2.1]. However, we still need + * to handle these rights when dealing with RFC 2086 servers since + * we are abstracting out use of ACL_CREATE/ACL_DELETE to their + * component RFC 4314 rights. */ + foreach ($this->_virtual as $key => $val) { + if (isset($this->_optional[$key])) { + unset($this->_optional[$key]); + foreach ($val as $val2) { + $this->_optional[$val2] = implode('', $val); + } + } elseif (($pos = array_search($key, $this->_required)) !== false) { + unset($this->_required[$pos]); + $this->_required = array_unique(array_merge($this->_required, $val)); + } + } + } + + /* ArrayAccess methods. */ + + /** + */ + public function offsetExists($offset) + { + return (bool)$this[$offset]; + } + + /** + */ + public function offsetGet($offset) + { + if (isset($this->_optional[$offset])) { + return $this->_optional[$offset]; + } + + $pos = array_search($offset, $this->_required); + + return ($pos === false) + ? null + : $this->_required[$pos]; + } + + /** + */ + public function offsetSet($offset, $value) + { + $this->_optional[$offset] = $value; + $this->_normalize(); + } + + /** + */ + public function offsetUnset($offset) + { + unset($this->_optional[$offset]); + $this->_required = array_values(array_diff($this->_required, array($offset))); + + if (isset($this->_virtual[$offset])) { + foreach ($this->_virtual[$offset] as $val) { + unset($this[$val]); + } + } + } + + /* Iterator methods. */ + + /** + */ + public function current() + { + $val = current($this->_required); + return is_null($val) + ? current($this->_optional) + : $val; + } + + /** + */ + public function key() + { + $key = key($this->_required); + return is_null($key) + ? key($this->_optional) + : $key; + } + + /** + */ + public function next() + { + if (key($this->_required) === null) { + next($this->_optional); + } else { + next($this->_required); + } + } + + /** + */ + public function rewind() + { + reset($this->_required); + reset($this->_optional); + } + + /** + */ + public function valid() + { + return ((key($this->_required) !== null) || + (key($this->_optional) !== null)); + + } + + /* Serializable methods. */ + + /** + */ + public function serialize() + { + return json_encode(array( + $this->_required, + $this->_optional + )); + } + + /** + */ + public function unserialize($data) + { + list($this->_required, $this->_optional) = json_decode($data); + } + +} diff --git a/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Data/BaseSubject.php b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Data/BaseSubject.php new file mode 100644 index 00000000..615d7164 --- /dev/null +++ b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Data/BaseSubject.php @@ -0,0 +1,231 @@ + + * + * 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 + * @copyright 2002-2008 Timo Sirainen + * @copyright 2008-2017 Horde LLC + * @license http://www.horde.org/licenses/lgpl21 LGPL 2.1 + * @package Imap_Client + */ + +/** + * Determines the "base subject" of a string (RFC 5256 [2.1]). + * + * @author Timo Sirainen + * @author Michael Slusarz + * @category Horde + * @copyright 2002-2008 Timo Sirainen + * @copyright 2011-2017 Horde LLC + * @license http://www.horde.org/licenses/lgpl21 LGPL 2.1 + * @package Imap_Client + */ +class Horde_Imap_Client_Data_BaseSubject +{ + /** + * The base subject. + * + * @var string + */ + protected $_subject; + + /** + * Constructor. + * + * @param string $str The subject string. + * @param array $opts Additional options: + * - keepblob: (boolean) Don't remove any "blob" information (i.e. text + * leading text between square brackets) from string. + * + * @return string The cleaned up subject string. + */ + public function __construct($str, array $opts = array()) + { + // Rule 1a: MIME decode. + $str = Horde_Mime::decode($str); + + // Rule 1b: Remove superfluous whitespace. + $str = preg_replace("/[\t\r\n ]+/", ' ', $str); + + do { + /* (2) Remove all trailing text of the subject that matches the + * the subj-trailer ABNF, repeat until no more matches are + * possible. */ + $str = preg_replace("/(?:\s*\(fwd\)\s*)+$/i", '', $str); + + do { + /* (3) Remove all prefix text of the subject that matches the + * subj-leader ABNF. */ + $found = $this->_removeSubjLeader($str, !empty($opts['keepblob'])); + + /* (4) If there is prefix text of the subject that matches + * the subj-blob ABNF, and removing that prefix leaves a + * non-empty subj-base, then remove the prefix text. */ + $found = (empty($opts['keepblob']) && $this->_removeBlobWhenNonempty($str)) || $found; + + /* (5) Repeat (3) and (4) until no matches remain. */ + } while ($found); + + /* (6) If the resulting text begins with the subj-fwd-hdr ABNF and + * ends with the subj-fwd-trl ABNF, remove the subj-fwd-hdr and + * subj-fwd-trl and repeat from step (2). */ + } while ($this->_removeSubjFwdHdr($str)); + + $this->_subject = strval($str); + } + + /** + * Return the "base subject" defined in RFC 5256 [2.1]. + * + * @return string The base subject. + */ + public function __toString() + { + return $this->_subject; + } + + /** + * Remove all prefix text of the subject that matches the subj-leader + * ABNF. + * + * @param string &$str The subject string. + * @param boolean $keepblob Remove blob information? + * + * @return boolean True if string was altered. + */ + protected function _removeSubjLeader(&$str, $keepblob = false) + { + $ret = false; + + if (!strlen($str)) { + return $ret; + } + + if ($len = strspn($str, " \t")) { + $str = substr($str, $len); + $ret = true; + } + + $i = 0; + + if (!$keepblob) { + while (isset($str[$i]) && ($str[$i] === '[')) { + if (($i = $this->_removeBlob($str, $i)) === false) { + return $ret; + } + } + } + + if (stripos($str, 're', $i) === 0) { + $i += 2; + } elseif (stripos($str, 'fw', $i) === 0) { + $i += (stripos($str, 'fwd', $i) === 0) ? 3 : 2; + } else { + return $ret; + } + + $i += strspn($str, " \t", $i); + + if (!$keepblob) { + while (isset($str[$i]) && ($str[$i] === '[')) { + if (($i = $this->_removeBlob($str, $i)) === false) { + return $ret; + } + } + } + + if (!isset($str[$i]) || ($str[$i] !== ':')) { + return $ret; + } + + $str = substr($str, ++$i); + + return true; + } + + /** + * Remove "[...]" text. + * + * @param string $str The subject string. + * @param integer $i Current position. + * + * @return boolean|integer False if blob was not found, otherwise the + * string position of the first non-blob char. + */ + protected function _removeBlob($str, $i) + { + if ($str[$i] !== '[') { + return false; + } + + ++$i; + + for ($cnt = strlen($str); $i < $cnt; ++$i) { + if ($str[$i] === ']') { + break; + } + + if ($str[$i] === '[') { + return false; + } + } + + if ($i === ($cnt - 1)) { + return false; + } + + ++$i; + + if ($str[$i] === ' ') { + ++$i; + } + + return $i; + } + + /** + * Remove "[...]" text if it doesn't result in the subject becoming + * empty. + * + * @param string &$str The subject string. + * + * @return boolean True if string was altered. + */ + protected function _removeBlobWhenNonempty(&$str) + { + if ($str && + ($str[0] === '[') && + (($i = $this->_removeBlob($str, 0)) !== false) && + ($i !== strlen($str))) { + $str = substr($str, $i); + return true; + } + + return false; + } + + /** + * Remove a "[fwd: ... ]" string. + * + * @param string &$str The subject string. + * + * @return boolean True if string was altered. + */ + protected function _removeSubjFwdHdr(&$str) + { + if ((stripos($str, '[fwd:') !== 0) || (substr($str, -1) !== ']')) { + return false; + } + + $str = substr($str, 5, -1); + return true; + } + +} diff --git a/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Data/Capability.php b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Data/Capability.php new file mode 100644 index 00000000..98c25135 --- /dev/null +++ b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Data/Capability.php @@ -0,0 +1,214 @@ + + * @category Horde + * @copyright 2014-2017 Horde LLC + * @license http://www.horde.org/licenses/lgpl21 LGPL 2.1 + * @package Imap_Client + * @since 2.24.0 + */ +class Horde_Imap_Client_Data_Capability +implements Serializable, SplSubject +{ + /** + * Capability data. + * + * @var array + */ + protected $_data = array(); + + /** + * Observers. + * + * @var array + */ + protected $_observers = array(); + + /** + * Add a capability (and optional parameters). + * + * @param string $capability The capability to add. + * @param mixed $params A parameter (or array of parameters) to add. + */ + public function add($capability, $params = null) + { + $capability = Horde_String::upper($capability); + + if (is_null($params)) { + if (isset($this->_data[$capability])) { + return; + } + $params = true; + } else { + if (!is_array($params)) { + $params = array($params); + } + $params = array_map('Horde_String::upper', $params); + + if (isset($this->_data[$capability]) && + is_array($this->_data[$capability])) { + $params = array_merge($this->_data[$capability], $params); + } + } + + $this->_data[$capability] = $params; + $this->notify(); + } + + /** + * Remove a capability. + * + * @param string $capability The capability to remove. + * @param string $params A parameter (or array of parameters) to + * remove from the capability. + */ + public function remove($capability, $params = null) + { + $capability = Horde_String::upper($capability); + + if (is_null($params)) { + unset($this->_data[$capability]); + } elseif (isset($this->_data[$capability])) { + if (!is_array($params)) { + $params = array($params); + } + $params = array_map('Horde_String::upper', $params); + + $this->_data[$capability] = is_array($this->_data[$capability]) + ? array_diff($this->_data[$capability], $params) + : array(); + + if (empty($this->_data[$capability])) { + unset($this->_data[$capability]); + } + } + + $this->notify(); + } + + /** + * Returns whether the server supports the given capability. + * + * @param string $capability The capability string to query. + * @param string $parameter If set, require the parameter to exist. + * + * @return boolean True if the capability (and parameter) exist. + */ + public function query($capability, $parameter = null) + { + $capability = Horde_String::upper($capability); + + if (!isset($this->_data[$capability])) { + return false; + } + + return is_null($parameter) ?: + (is_array($this->_data[$capability]) && + in_array(Horde_String::upper($parameter), $this->_data[$capability])); + } + + /** + * Return the list of parameters for an extension. + * + * @param string $capability The capability string to query. + * + * @return array An array of parameters if the extension exists and + * supports parameters. Otherwise, an empty array. + */ + public function getParams($capability) + { + return ($this->query($capability) && is_array($out = $this->_data[Horde_String::upper($capability)])) + ? $out + : array(); + } + + /** + * Is the extension enabled? + * + * @param string $capability The extension (+ parameter) to query. If + * null, returns all enabled extensions. + * + * @return mixed If $capability is null, return all enabled extensions. + * Otherwise, true if the extension (+ parameter) is + * enabled. + */ + public function isEnabled($capability = null) + { + return is_null($capability) + ? array() + : false; + } + + /** + * Returns the raw data. + * + * @deprecated + * + * @return array Capability data. + */ + public function toArray() + { + return $this->_data; + } + + /* SplSubject methods. */ + + /** + */ + public function attach(SplObserver $observer) + { + $this->detach($observer); + $this->_observers[] = $observer; + } + + /** + */ + public function detach(SplObserver $observer) + { + if (($key = array_search($observer, $this->_observers, true)) !== false) { + unset($this->_observers[$key]); + } + } + + /** + * Notification is triggered internally whenever the object's internal + * data storage is altered. + */ + public function notify() + { + foreach ($this->_observers as $val) { + $val->update($this); + } + } + + /* Serializable methods. */ + + /** + */ + public function serialize() + { + return json_encode($this->_data); + } + + /** + */ + public function unserialize($data) + { + $this->_data = json_decode($data, true); + } + +} diff --git a/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Data/Capability/Imap.php b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Data/Capability/Imap.php new file mode 100644 index 00000000..96a058a5 --- /dev/null +++ b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Data/Capability/Imap.php @@ -0,0 +1,117 @@ + + * @category Horde + * @copyright 2014-2017 Horde LLC + * @license http://www.horde.org/licenses/lgpl21 LGPL 2.1 + * @package Imap_Client + * @since 2.24.0 + * + * @property-read integer $cmdlength Allowable command length (in octets). + */ +class Horde_Imap_Client_Data_Capability_Imap +extends Horde_Imap_Client_Data_Capability +{ + /** + * The list of enabled extensions. + * + * @var array + */ + protected $_enabled = array(); + + /** + */ + public function __get($name) + { + switch ($name) { + case 'cmdlength': + /* RFC 2683 [3.2.1.5] originally recommended that lines should + * be limited to "approximately 1000 octets". However, servers + * should allow a command line of at least "8000 octets". + * RFC 7162 [4] updates the recommendation to 8192 octets. + * As a compromise, assume all modern IMAP servers handle + * ~2000 octets and, if CONDSTORE/QRESYNC is supported, assume + * they can handle ~8000 octets. (Don't need dependency support + * checks here - the simple presence of CONDSTORE/QRESYNC is + * enough to trigger.) */ + return (isset($this->_data['CONDSTORE']) || isset($this->_data['QRESYNC'])) + ? 8000 + : 2000; + } + } + + /** + */ + public function query($capability, $parameter = null) + { + if (parent::query($capability, $parameter)) { + return true; + } + + switch (Horde_String::upper($capability)) { + case 'CONDSTORE': + case 'ENABLE': + /* RFC 7162 [3.2.3] - QRESYNC implies CONDSTORE and ENABLE. */ + return (is_null($parameter) && $this->query('QRESYNC')); + + case 'UTF8': + /* RFC 6855 [3] - UTF8=ONLY implies UTF8=ACCEPT. */ + return ((Horde_String::upper($parameter) === 'ACCEPT') && + $this->query('UTF8', 'ONLY')); + } + + return false; + } + + /** + */ + public function isEnabled($capability = null) + { + return is_null($capability) + ? $this->_enabled + : in_array(Horde_String::upper($capability), $this->_enabled); + } + + /** + * Set a capability as enabled/disabled. + * + * @param array $capability A capability (+ parameter). + * @param boolean $enable If true, enables the capability. + */ + public function enable($capability, $enable = true) + { + $capability = Horde_String::upper($capability); + $enabled = $this->isEnabled($capability); + + if ($enable && !$enabled) { + switch ($capability) { + case 'QRESYNC': + /* RFC 7162 [3.2.3] - Enabling QRESYNC also implies enabling + * of CONDSTORE. */ + $this->enable('CONDSTORE'); + break; + } + + $this->_enabled[] = $capability; + $this->notify(); + } elseif (!$enable && $enabled) { + $this->_enabled = array_diff($this->_enabled, array($capability)); + $this->notify(); + } + } + +} diff --git a/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Data/Envelope.php b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Data/Envelope.php new file mode 100644 index 00000000..5903e89d --- /dev/null +++ b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Data/Envelope.php @@ -0,0 +1,226 @@ + + * @category Horde + * @copyright 2011-2017 Horde LLC + * @license http://www.horde.org/licenses/lgpl21 LGPL 2.1 + * @package Imap_Client + * + * @todo $date should return null if it doesn't exist. + * + * @property Horde_Mail_Rfc822_List $bcc Bcc address(es). + * @property Horde_Mail_Rfc822_List $cc Cc address(es). + * @property Horde_Imap_Client_DateTime $date Message date. + * @property Horde_Mail_Rfc822_List $from From address(es). + * @property string $in_reply_to Message-ID of the message replied to. + * @property string $message_id Message-ID of the message. + * @property Horde_Mail_Rfc822_List $reply_to Reply-to address(es). + * @property Horde_Mail_Rfc822_List $sender Sender address. + * @property string $subject Subject. + * @property Horde_Mail_Rfc822_List $to To address(es). + */ +class Horde_Imap_Client_Data_Envelope implements Serializable +{ + /* Serializable version. */ + const VERSION = 3; + + /** + * Data object. + * + * @var Horde_Mime_Headers + */ + protected $_data; + + /** + * Constructor. + * + * @var array $data An array of property names (keys) and values to set + * in this object. + */ + public function __construct(array $data = array()) + { + $this->_data = new Horde_Mime_Headers(); + + foreach ($data as $key => $val) { + $this->$key = $val; + } + } + + /** + */ + public function __get($name) + { + $name = $this->_normalizeProperty($name); + + switch ($name) { + case 'bcc': + case 'cc': + case 'from': + case 'reply-to': + case 'sender': + case 'to': + if ($h = $this->_data[$name]) { + return $h->getAddressList(true); + } + + if (in_array($name, array('sender', 'reply-to'))) { + return $this->from; + } + break; + + case 'date': + if ($val = $this->_data['date']) { + return new Horde_Imap_Client_DateTime($val->value); + } + break; + + case 'in-reply-to': + case 'message-id': + case 'subject': + if ($val = $this->_data[$name]) { + return $val->value; + } + break; + } + + // Default values. + switch ($name) { + case 'bcc': + case 'cc': + case 'from': + case 'to': + return new Horde_Mail_Rfc822_List(); + + case 'date': + return new Horde_Imap_Client_DateTime(); + + case 'in-reply-to': + case 'message-id': + case 'subject': + return ''; + } + + return null; + } + + /** + */ + public function __set($name, $value) + { + if (!strlen($value)) { + return; + } + + $name = $this->_normalizeProperty($name); + + switch ($name) { + case 'bcc': + case 'cc': + case 'date': + case 'from': + case 'in-reply-to': + case 'message-id': + case 'reply-to': + case 'sender': + case 'subject': + case 'to': + switch ($name) { + case 'from': + if ($this->reply_to->match($value)) { + unset($this->_data['reply-to']); + } + if ($this->sender->match($value)) { + unset($this->_data['sender']); + } + break; + + case 'reply-to': + case 'sender': + if ($this->from->match($value)) { + unset($this->_data[$name]); + return; + } + break; + } + + $this->_data->addHeader($name, $value); + break; + } + } + + /** + */ + public function __isset($name) + { + $name = $this->_normalizeProperty($name); + + switch ($name) { + case 'reply-to': + case 'sender': + if (isset($this->_data[$name])) { + return true; + } + $name = 'from'; + break; + } + + return isset($this->_data[$name]); + } + + /** + */ + protected function _normalizeProperty($name) + { + switch ($name) { + case 'in_reply_to': + return 'in-reply-to'; + + case 'message_id': + return 'message-id'; + + case 'reply_to': + return 'reply-to'; + } + + return $name; + } + + /* Serializable methods. */ + + /** + */ + public function serialize() + { + return serialize(array( + 'd' => $this->_data, + 'v' => self::VERSION + )); + } + + /** + */ + public function unserialize($data) + { + $data = @unserialize($data); + if (empty($data['v']) || ($data['v'] != self::VERSION)) { + throw new Exception('Cache version change'); + } + + $this->_data = $data['d']; + } + +} diff --git a/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Data/Fetch.php b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Data/Fetch.php new file mode 100644 index 00000000..0dba67de --- /dev/null +++ b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Data/Fetch.php @@ -0,0 +1,666 @@ + + * @category Horde + * @copyright 2011-2017 Horde LLC + * @license http://www.horde.org/licenses/lgpl21 LGPL 2.1 + * @package Imap_Client + */ +class Horde_Imap_Client_Data_Fetch +{ + /** Header formatting constants. */ + const HEADER_PARSE = 1; + const HEADER_STREAM = 2; + + /** + * Internal data array. + * + * @var array + */ + protected $_data = array(); + + /** + */ + public function __clone() + { + $this->_data = unserialize(serialize($this->_data)); + } + + /** + * Set the full message property. + * + * @param mixed $msg The full message text, as either a string or stream + * resource. + */ + public function setFullMsg($msg) + { + $this->_data[Horde_Imap_Client::FETCH_FULLMSG] = $this->_setMixed($msg); + } + + /** + * Returns the full message. + * + * @param boolean $stream Return as a stream? + * + * @return mixed The full text of the entire message. + */ + public function getFullMsg($stream = false) + { + return $this->_msgText( + $stream, + isset($this->_data[Horde_Imap_Client::FETCH_FULLMSG]) + ? $this->_data[Horde_Imap_Client::FETCH_FULLMSG] + : null + ); + } + + /** + * Set the message structure. + * + * @param Horde_Mime_Part $structure The base MIME part of the message. + */ + public function setStructure(Horde_Mime_Part $structure) + { + $this->_data[Horde_Imap_Client::FETCH_STRUCTURE] = $structure; + } + + /** + * Get the message structure. + * + * @return Horde_Mime_Part $structure The base MIME part of the message. + */ + public function getStructure() + { + return isset($this->_data[Horde_Imap_Client::FETCH_STRUCTURE]) + ? clone $this->_data[Horde_Imap_Client::FETCH_STRUCTURE] + : new Horde_Mime_Part(); + } + + /** + * Set a header entry. + * + * @param string $label The search label. + * @param mixed $data Either a Horde_Mime_Headers object or the raw + * header text. + */ + public function setHeaders($label, $data) + { + if ($data instanceof Horde_Stream) { + $data = $data->stream; + } + $this->_data[Horde_Imap_Client::FETCH_HEADERS][$label] = $data; + } + + /** + * Get a header entry. + * + * @param string $label The search label. + * @param integer $format The return format. If self::HEADER_PARSE, + * returns a Horde_Mime_Headers object. If + * self::HEADER_STREAM, returns a stream. + * Otherwise, returns header text. + * + * @return mixed See $format. + */ + public function getHeaders($label, $format = 0) + { + return $this->_getHeaders( + $label, + $format, + Horde_Imap_Client::FETCH_HEADERS + ); + } + + /** + * Set a header text entry. + * + * @param string $id The MIME ID. + * @param mixed $text The header text, as either a string or stream + * resource. + */ + public function setHeaderText($id, $text) + { + $this->_data[Horde_Imap_Client::FETCH_HEADERTEXT][$id] = $this->_setMixed($text); + } + + /** + * Get a header text entry. + * + * @param string $id The MIME ID. + * @param integer $format The return format. If self::HEADER_PARSE, + * returns a Horde_Mime_Headers object. If + * self::HEADER_STREAM, returns a stream. + * Otherwise, returns header text. + * + * @return mixed See $format. + */ + public function getHeaderText($id = 0, $format = 0) + { + return $this->_getHeaders( + $id, + $format, + Horde_Imap_Client::FETCH_HEADERTEXT + ); + } + + /** + * Set a MIME header entry. + * + * @param string $id The MIME ID. + * @param mixed $text The header text, as either a string or stream + * resource. + */ + public function setMimeHeader($id, $text) + { + $this->_data[Horde_Imap_Client::FETCH_MIMEHEADER][$id] = $this->_setMixed($text); + } + + /** + * Get a MIME header entry. + * + * @param string $id The MIME ID. + * @param integer $format The return format. If self::HEADER_PARSE, + * returns a Horde_Mime_Headers object. If + * self::HEADER_STREAM, returns a stream. + * Otherwise, returns header text. + * + * @return mixed See $format. + */ + public function getMimeHeader($id, $format = 0) + { + return $this->_getHeaders( + $id, + $format, + Horde_Imap_Client::FETCH_MIMEHEADER + ); + } + + /** + * Set a body part entry. + * + * @param string $id The MIME ID. + * @param mixed $text The body part text, as either a string or stream + * resource. + * @param string $decode Either '8bit', 'binary', or null. + */ + public function setBodyPart($id, $text, $decode = null) + { + $this->_data[Horde_Imap_Client::FETCH_BODYPART][$id] = array( + 'd' => $decode, + 't' => $this->_setMixed($text) + ); + } + + /** + * Get a body part entry. + * + * @param string $id The MIME ID. + * @param boolean $stream Return as a stream? + * + * @return mixed The full text of the body part. + */ + public function getBodyPart($id, $stream = false) + { + return $this->_msgText( + $stream, + isset($this->_data[Horde_Imap_Client::FETCH_BODYPART][$id]) + ? $this->_data[Horde_Imap_Client::FETCH_BODYPART][$id]['t'] + : null + ); + } + + /** + * Determines if/how a body part was MIME decoded on the server. + * + * @param string $id The MIME ID. + * + * @return string Either '8bit', 'binary', or null. + */ + public function getBodyPartDecode($id) + { + return isset($this->_data[Horde_Imap_Client::FETCH_BODYPART][$id]) + ? $this->_data[Horde_Imap_Client::FETCH_BODYPART][$id]['d'] + : null; + } + + /** + * Set the body part size for a body part. + * + * @param string $id The MIME ID. + * @param integer $size The size (in bytes). + */ + public function setBodyPartSize($id, $size) + { + $this->_data[Horde_Imap_Client::FETCH_BODYPARTSIZE][$id] = intval($size); + } + + /** + * Returns the body part size, if returned by the server. + * + * @param string $id The MIME ID. + * + * @return integer The body part size, in bytes. + */ + public function getBodyPartSize($id) + { + return isset($this->_data[Horde_Imap_Client::FETCH_BODYPARTSIZE][$id]) + ? $this->_data[Horde_Imap_Client::FETCH_BODYPARTSIZE][$id] + : null; + } + + /** + * Set a body text entry. + * + * @param string $id The MIME ID. + * @param mixed $text The body part text, as either a string or stream + * resource. + */ + public function setBodyText($id, $text) + { + $this->_data[Horde_Imap_Client::FETCH_BODYTEXT][$id] = $this->_setMixed($text); + } + + /** + * Get a body text entry. + * + * @param string $id The MIME ID. + * @param boolean $stream Return as a stream? + * + * @return mixed The full text of the body text. + */ + public function getBodyText($id = 0, $stream = false) + { + return $this->_msgText( + $stream, + isset($this->_data[Horde_Imap_Client::FETCH_BODYTEXT][$id]) + ? $this->_data[Horde_Imap_Client::FETCH_BODYTEXT][$id] + : null + ); + } + + /** + * Set envelope data. + * + * @param array $data The envelope data to pass to the Envelope object + * constructor, or an Envelope object. + */ + public function setEnvelope($data) + { + $this->_data[Horde_Imap_Client::FETCH_ENVELOPE] = is_array($data) + ? new Horde_Imap_Client_Data_Envelope($data) + : $data; + } + + /** + * Get envelope data. + * + * @return Horde_Imap_Client_Data_Envelope An envelope object. + */ + public function getEnvelope() + { + return isset($this->_data[Horde_Imap_Client::FETCH_ENVELOPE]) + ? clone $this->_data[Horde_Imap_Client::FETCH_ENVELOPE] + : new Horde_Imap_Client_Data_Envelope(); + } + + /** + * Set IMAP flags. + * + * @param array $flags An array of IMAP flags. + */ + public function setFlags(array $flags) + { + $this->_data[Horde_Imap_Client::FETCH_FLAGS] = array_map( + 'Horde_String::lower', + array_map('trim', $flags) + ); + } + + /** + * Get IMAP flags. + * + * @return array An array of IMAP flags (all flags in lowercase). + */ + public function getFlags() + { + return isset($this->_data[Horde_Imap_Client::FETCH_FLAGS]) + ? $this->_data[Horde_Imap_Client::FETCH_FLAGS] + : array(); + } + + /** + * Set IMAP internal date. + * + * @param mixed $date Either a Horde_Imap_Client_DateTime object or a + * date string. + */ + public function setImapDate($date) + { + $this->_data[Horde_Imap_Client::FETCH_IMAPDATE] = is_object($date) + ? $date + : new Horde_Imap_Client_DateTime($date); + } + + /** + * Get internal IMAP date. + * + * @return Horde_Imap_Client_DateTime A date object. + */ + public function getImapDate() + { + return isset($this->_data[Horde_Imap_Client::FETCH_IMAPDATE]) + ? clone $this->_data[Horde_Imap_Client::FETCH_IMAPDATE] + : new Horde_Imap_Client_DateTime(); + } + + /** + * Set message size. + * + * @param integer $size The size of the message, in bytes. + */ + public function setSize($size) + { + $this->_data[Horde_Imap_Client::FETCH_SIZE] = intval($size); + } + + /** + * Get message size. + * + * @return integer The size of the message, in bytes. + */ + public function getSize() + { + return isset($this->_data[Horde_Imap_Client::FETCH_SIZE]) + ? $this->_data[Horde_Imap_Client::FETCH_SIZE] + : 0; + } + + /** + * Set UID. + * + * @param integer $uid The message UID. + */ + public function setUid($uid) + { + $this->_data[Horde_Imap_Client::FETCH_UID] = intval($uid); + } + + /** + * Get UID. + * + * @return integer The message UID. + */ + public function getUid() + { + return isset($this->_data[Horde_Imap_Client::FETCH_UID]) + ? $this->_data[Horde_Imap_Client::FETCH_UID] + : null; + } + + /** + * Set message sequence number. + * + * @param integer $seq The message sequence number. + */ + public function setSeq($seq) + { + $this->_data[Horde_Imap_Client::FETCH_SEQ] = intval($seq); + } + + /** + * Get message sequence number. + * + * @return integer The message sequence number. + */ + public function getSeq() + { + return isset($this->_data[Horde_Imap_Client::FETCH_SEQ]) + ? $this->_data[Horde_Imap_Client::FETCH_SEQ] + : null; + } + + /** + * Set the modified sequence value for the message. + * + * @param integer $modseq The modseq value. + */ + public function setModSeq($modseq) + { + $this->_data[Horde_Imap_Client::FETCH_MODSEQ] = intval($modseq); + } + + /** + * Get the modified sequence value for the message. + * + * @return integer The modseq value. + */ + public function getModSeq() + { + return isset($this->_data[Horde_Imap_Client::FETCH_MODSEQ]) + ? $this->_data[Horde_Imap_Client::FETCH_MODSEQ] + : null; + } + + /** + * Set the internationalized downgraded status for the message. + * + * @since 2.11.0 + * + * @param boolean $downgraded True if at least one message component has + * been downgraded. + */ + public function setDowngraded($downgraded) + { + if ($downgraded) { + $this->_data[Horde_Imap_Client::FETCH_DOWNGRADED] = true; + } else { + unset($this->_data[Horde_Imap_Client::FETCH_DOWNGRADED]); + } + } + + /** + * Does the message contain internationalized downgraded data (i.e. it + * is a "surrogate" message)? + * + * @since 2.11.0 + * + * @return boolean True if at least one message components has been + * downgraded. + */ + public function isDowngraded() + { + return !empty($this->_data[Horde_Imap_Client::FETCH_DOWNGRADED]); + } + + /** + * Return the internal representation of the data. + * + * @return array The data array. + */ + public function getRawData() + { + return $this->_data; + } + + /** + * Merge a fetch object into this one. + * + * @param Horde_Imap_Client_Data_Fetch $data A fetch object. + */ + public function merge(Horde_Imap_Client_Data_Fetch $data) + { + $this->_data = array_replace_recursive( + $this->_data, + $data->getRawData() + ); + } + + /** + * Does this object containing cacheable data of the given type? + * + * @param integer $type The type to query. + * + * @return boolean True if the type is cacheable. + */ + public function exists($type) + { + return isset($this->_data[$type]); + } + + /** + * Does this object contain only default values for all fields? + * + * @return boolean True if object contains default data. + */ + public function isDefault() + { + return empty($this->_data); + } + + /** + * Return text representation of a field. + * + * @param boolean $stream Return as a stream? + * @param mixed $data The field data (string or resource) or null if + * field does not exist. + * + * @return mixed Requested text representation. + */ + protected function _msgText($stream, $data) + { + if ($data instanceof Horde_Stream) { + if ($stream) { + $data->rewind(); + return $data->stream; + } + return strval($data); + } + + if (is_resource($data)) { + rewind($data); + return $stream + ? $data + : stream_get_contents($data); + } + + if (!$stream) { + return strval($data); + } + + $tmp = fopen('php://temp', 'w+'); + + if (!is_null($data)) { + fwrite($tmp, $data); + rewind($tmp); + } + + return $tmp; + } + + /** + * Return representation of a header field. + * + * @param string $id The header id. + * @param integer $format The return format. If self::HEADER_PARSE, + * returns a Horde_Mime_Headers object. If + * self::HEADER_STREAM, returns a stream. + * Otherwise, returns header text. + * @param integer $key The array key where the data is stored in the + * internal array. + * + * @return mixed The data in the format specified by $format. + */ + protected function _getHeaders($id, $format, $key) + { + switch ($format) { + case self::HEADER_STREAM: + if (!isset($this->_data[$key][$id])) { + $data = null; + } elseif (is_object($this->_data[$key][$id])) { + switch ($key) { + case Horde_Imap_Client::FETCH_HEADERS: + $data = $this->_getHeaders($id, 0, $key); + break; + + case Horde_Imap_Client::FETCH_HEADERTEXT: + case Horde_Imap_Client::FETCH_MIMEHEADER: + $data = $this->_data[$key][$id]; + break; + } + } else { + $data = $this->_data[$key][$id]; + } + + return $this->_msgText(true, $data); + + case self::HEADER_PARSE: + if (!isset($this->_data[$key][$id])) { + return new Horde_Mime_Headers(); + } elseif (is_object($this->_data[$key][$id])) { + switch ($key) { + case Horde_Imap_Client::FETCH_HEADERS: + return clone $this->_data[$key][$id]; + + case Horde_Imap_Client::FETCH_HEADERTEXT: + case Horde_Imap_Client::FETCH_MIMEHEADER: + $hdrs = $this->_data[$key][$id]; + break; + } + } else { + $hdrs = $this->_getHeaders($id, self::HEADER_STREAM, $key); + } + + return Horde_Mime_Headers::parseHeaders($hdrs); + } + + if (!isset($this->_data[$key][$id])) { + return ''; + } + + if (is_object($this->_data[$key][$id])) { + switch ($key) { + case Horde_Imap_Client::FETCH_HEADERS: + return $this->_data[$key][$id]->toString( + array('nowrap' => true) + ); + + case Horde_Imap_Client::FETCH_HEADERTEXT: + case Horde_Imap_Client::FETCH_MIMEHEADER: + return strval($this->_data[$key][$id]); + } + } + + return $this->_msgText(false, $this->_data[$key][$id]); + } + + /** + * Converts mixed input (string or resource) to the correct internal + * representation. + * + * @param mixed $data Mixed data (string, resource, Horde_Stream object). + * + * @return mixed The internal representation of that data. + */ + protected function _setMixed($data) + { + return is_resource($data) + ? new Horde_Stream_Existing(array('stream' => $data)) + : $data; + } + +} diff --git a/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Data/Fetch/Pop3.php b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Data/Fetch/Pop3.php new file mode 100644 index 00000000..500de384 --- /dev/null +++ b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Data/Fetch/Pop3.php @@ -0,0 +1,36 @@ + + * @category Horde + * @copyright 2011-2017 Horde LLC + * @license http://www.horde.org/licenses/lgpl21 LGPL 2.1 + * @package Imap_Client + */ +class Horde_Imap_Client_Data_Fetch_Pop3 extends Horde_Imap_Client_Data_Fetch +{ + /** + * Set UID. + * + * @param string $uid The message UID. Unlike IMAP, this UID does not + * have to be an integer. + */ + public function setUid($uid) + { + $this->_data[Horde_Imap_Client::FETCH_UID] = strval($uid); + } + +} diff --git a/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Data/Format.php b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Data/Format.php new file mode 100644 index 00000000..e3cf3123 --- /dev/null +++ b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Data/Format.php @@ -0,0 +1,83 @@ + + * @category Horde + * @copyright 2012-2017 Horde LLC + * @license http://www.horde.org/licenses/lgpl21 LGPL 2.1 + * @package Imap_Client + */ +class Horde_Imap_Client_Data_Format +{ + /** + * Data. + * + * @var mixed + */ + protected $_data; + + /** + * Constructor. + * + * @param mixed $data Data. + */ + public function __construct($data) + { + $this->_data = is_resource($data) + ? stream_get_contents($data, -1, 0) + : $data; + } + + /** + * Returns the string value of the raw data. + * + * @return string String value. + */ + public function __toString() + { + return strval($this->_data); + } + + /** + * Returns the raw data. + * + * @return mixed Raw data. + */ + public function getData() + { + return $this->_data; + } + + /** + * Returns the data formatted for output to the IMAP server. + * + * @return string IMAP escaped string. + */ + public function escape() + { + return strval($this); + } + + /** + * Verify the data. + * + * @throws Horde_Imap_Client_Data_Format_Exception + */ + public function verify() + { + } + +} diff --git a/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Data/Format/Astring.php b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Data/Format/Astring.php new file mode 100644 index 00000000..5695c7cd --- /dev/null +++ b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Data/Format/Astring.php @@ -0,0 +1,32 @@ + + * @category Horde + * @copyright 2012-2017 Horde LLC + * @license http://www.horde.org/licenses/lgpl21 LGPL 2.1 + * @package Imap_Client + */ +class Horde_Imap_Client_Data_Format_Astring extends Horde_Imap_Client_Data_Format_String +{ + /** + */ + public function quoted() + { + return $this->_filter->quoted || !$this->_data->length(); + } + +} diff --git a/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Data/Format/Astring/Nonascii.php b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Data/Format/Astring/Nonascii.php new file mode 100644 index 00000000..7741b42c --- /dev/null +++ b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Data/Format/Astring/Nonascii.php @@ -0,0 +1,28 @@ + + * @category Horde + * @copyright 2014-2017 Horde LLC + * @license http://www.horde.org/licenses/lgpl21 LGPL 2.1 + * @package Imap_Client + * @since 2.25.0 + */ +class Horde_Imap_Client_Data_Format_Astring_Nonascii +extends Horde_Imap_Client_Data_Format_Astring +implements Horde_Imap_Client_Data_Format_String_Support_Nonascii +{ +} diff --git a/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Data/Format/Atom.php b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Data/Format/Atom.php new file mode 100644 index 00000000..2575a7e6 --- /dev/null +++ b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Data/Format/Atom.php @@ -0,0 +1,57 @@ + + * @category Horde + * @copyright 2012-2017 Horde LLC + * @license http://www.horde.org/licenses/lgpl21 LGPL 2.1 + * @package Imap_Client + */ +class Horde_Imap_Client_Data_Format_Atom extends Horde_Imap_Client_Data_Format +{ + /** + */ + public function escape() + { + return strlen($this->_data) + ? parent::escape() + : '""'; + } + + /** + */ + public function verify() + { + if (strlen($this->_data) !== strlen($this->stripNonAtomCharacters())) { + throw new Horde_Imap_Client_Data_Format_Exception('Illegal character in IMAP atom.'); + } + } + + /** + * Strip out any characters that are not allowed in an IMAP atom. + * + * @return string The atom data disallowed characters removed. + */ + public function stripNonAtomCharacters() + { + return str_replace( + array('(', ')', '{', ' ', '%', '*', '"', '\\', ']'), + '', + preg_replace('/[^\x20-\x7e]/', '', $this->_data) + ); + } + +} diff --git a/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Data/Format/Date.php b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Data/Format/Date.php new file mode 100644 index 00000000..ee223877 --- /dev/null +++ b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Data/Format/Date.php @@ -0,0 +1,49 @@ + + * @category Horde + * @copyright 2012-2017 Horde LLC + * @license http://www.horde.org/licenses/lgpl21 LGPL 2.1 + * @package Imap_Client + */ +class Horde_Imap_Client_Data_Format_Date extends Horde_Imap_Client_Data_Format +{ + /** + * Constructor. + * + * @param mixed $data Either a DateTime object, or a date format that + * can be converted to a DateTime object. + * + * @throws Exception + */ + public function __construct($data) + { + if (!($data instanceof DateTime)) { + $data = new Horde_Imap_Client_DateTime($data); + } + + parent::__construct($data); + } + + /** + */ + public function __toString() + { + return $this->_data->format('j-M-Y'); + } + +} diff --git a/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Data/Format/DateTime.php b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Data/Format/DateTime.php new file mode 100644 index 00000000..5553f01a --- /dev/null +++ b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Data/Format/DateTime.php @@ -0,0 +1,39 @@ + + * @category Horde + * @copyright 2012-2017 Horde LLC + * @license http://www.horde.org/licenses/lgpl21 LGPL 2.1 + * @package Imap_Client + */ +class Horde_Imap_Client_Data_Format_DateTime extends Horde_Imap_Client_Data_Format_Date +{ + /** + */ + public function __toString() + { + return $this->_data->format('j-M-Y H:i:s O'); + } + + /** + */ + public function escape() + { + return '"' . strval($this) . '"'; + } + +} diff --git a/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Data/Format/Exception.php b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Data/Format/Exception.php new file mode 100644 index 00000000..1bc89fcb --- /dev/null +++ b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Data/Format/Exception.php @@ -0,0 +1,25 @@ + + * @category Horde + * @copyright 2012-2017 Horde LLC + * @license http://www.horde.org/licenses/lgpl21 LGPL 2.1 + * @package Imap_Client + */ +class Horde_Imap_Client_Data_Format_Exception extends Horde_Exception_Wrapped +{ +} diff --git a/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Data/Format/Filter/Quote.php b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Data/Format/Filter/Quote.php new file mode 100644 index 00000000..7b0026eb --- /dev/null +++ b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Data/Format/Filter/Quote.php @@ -0,0 +1,64 @@ + + * @category Horde + * @copyright 2012-2017 Horde LLC + * @license http://www.horde.org/licenses/lgpl21 LGPL 2.1 + * @package Imap_Client + */ +class Horde_Imap_Client_Data_Format_Filter_Quote extends php_user_filter +{ + /** + * Has the initial quote been prepended? + * + * @var boolean + */ + protected $_prepend; + + /** + */ + public function onCreate() + { + $this->_prepend = false; + } + + /** + * @see stream_filter_register() + */ + public function filter($in, $out, &$consumed, $closing) + { + if (!$this->_prepend) { + stream_bucket_append($out, stream_bucket_new($this->stream, '"')); + $this->_prepend = true; + } + + while ($bucket = stream_bucket_make_writeable($in)) { + $consumed += $bucket->datalen; + $bucket->data = addcslashes($bucket->data, '"\\'); + stream_bucket_append($out, $bucket); + } + + /* feof() call needed due to: + * http://news.php.net/php.internals/80363 */ + if ($closing || feof($this->stream)) { + stream_bucket_append($out, stream_bucket_new($this->stream, '"')); + } + + return PSFS_PASS_ON; + } + +} diff --git a/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Data/Format/Filter/String.php b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Data/Format/Filter/String.php new file mode 100644 index 00000000..e608343e --- /dev/null +++ b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Data/Format/Filter/String.php @@ -0,0 +1,120 @@ + + * @category Horde + * @copyright 2012-2017 Horde LLC + * @license http://www.horde.org/licenses/lgpl21 LGPL 2.1 + * @package Imap_Client + */ +class Horde_Imap_Client_Data_Format_Filter_String extends php_user_filter +{ + /** + * Skip status. + * + * @var boolean + */ + protected $_skip = false; + + /** + * @see stream_filter_register() + */ + public function onCreate() + { + $this->params->binary = false; + $this->params->literal = false; + $this->params->nonascii = false; + // no_quote_list is used below as a config option + $this->params->quoted = false; + + return true; + } + + /** + * @see stream_filter_register() + */ + public function filter($in, $out, &$consumed, $closing) + { + $p = $this->params; + + while ($bucket = stream_bucket_make_writeable($in)) { + if (!$this->_skip) { + $len = $bucket->datalen; + $str = $bucket->data; + + for ($i = 0; $i < $len; ++$i) { + $chr = ord($str[$i]); + + switch ($chr) { + case 0: // null + $p->binary = true; + $p->literal = true; + + // No need to scan input anymore. + $this->_skip = true; + break 2; + + case 10: // LF + case 13: // CR + $p->literal = true; + break; + + case 32: // SPACE + case 34: // " + case 40: // ( + case 41: // ) + case 92: // \ + case 123: // { + case 127: // DEL + // These are all invalid ATOM characters. + $p->quoted = true; + break; + + case 37: // % + case 42: // * + // These are not quoted if being used as wildcards. + if (empty($p->no_quote_list)) { + $p->quoted = true; + } + break; + + default: + if ($chr < 32) { + // CTL characters must be, at a minimum, quoted. + $p->quoted = true; + } elseif ($chr > 127) { + $p->nonascii = true; + // 8-bit chars must be in a literal. + $p->literal = true; + } + break; + } + } + } + + $consumed += $bucket->datalen; + stream_bucket_append($out, $bucket); + } + + if ($p->literal) { + $p->quoted = false; + } + + return PSFS_PASS_ON; + } + +} diff --git a/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Data/Format/List.php b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Data/Format/List.php new file mode 100644 index 00000000..e0326f5e --- /dev/null +++ b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Data/Format/List.php @@ -0,0 +1,106 @@ + + * @category Horde + * @copyright 2012-2017 Horde LLC + * @license http://www.horde.org/licenses/lgpl21 LGPL 2.1 + * @package Imap_Client + */ +class Horde_Imap_Client_Data_Format_List extends Horde_Imap_Client_Data_Format implements Countable, IteratorAggregate +{ + /** + * @see add() + */ + public function __construct($data = null) + { + parent::__construct(array()); + + if (!is_null($data)) { + $this->add($data); + } + } + + /** + * Add an element to the list. + * + * @param mixed $data The data element(s) to add. Either a + * Horde_Imap_Client_Data_Format object, a string + * value that will be treated as an IMAP atom, or + * an array (or iterable object) of objects to add. + * @param boolean $merge Merge the contents of any container objects, + * instead of adding the objects themselves? + * + * @return Horde_Imap_Client_Data_Format_List This object to allow for + * chainable calls (since + * 2.10.0). + */ + public function add($data, $merge = false) + { + if (is_array($data) || ($merge && ($data instanceof Traversable))) { + foreach ($data as $val) { + $this->add($val); + } + } elseif (is_object($data)) { + $this->_data[] = $data; + } elseif (!is_null($data)) { + $this->_data[] = new Horde_Imap_Client_Data_Format_Atom($data); + } + + return $this; + } + + /** + */ + public function __toString() + { + $out = ''; + + foreach ($this as $val) { + if ($val instanceof $this) { + $out .= '(' . $val->escape() . ') '; + } elseif (($val instanceof Horde_Imap_Client_Data_Format_String) && + $val->literal()) { + /* ERROR: Requires literal output. */ + return ''; + } else { + $out .= $val->escape() . ' '; + } + } + + return rtrim($out); + } + + /* Countable methods. */ + + /** + */ + public function count() + { + return count($this->_data); + } + + /* IteratorAggregate method. */ + + /** + * Iterator loops through the data elements contained in this list. + */ + public function getIterator() + { + return new ArrayIterator($this->_data); + } + +} diff --git a/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Data/Format/ListMailbox.php b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Data/Format/ListMailbox.php new file mode 100644 index 00000000..3f186bea --- /dev/null +++ b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Data/Format/ListMailbox.php @@ -0,0 +1,38 @@ + + * @category Horde + * @copyright 2012-2017 Horde LLC + * @license http://www.horde.org/licenses/lgpl21 LGPL 2.1 + * @package Imap_Client + */ +class Horde_Imap_Client_Data_Format_ListMailbox +extends Horde_Imap_Client_Data_Format_Mailbox +{ + /** + */ + protected function _filterParams() + { + $ob = parent::_filterParams(); + + /* Don't quote % or * characters. */ + $ob->no_quote_list = true; + + return $ob; + } + +} diff --git a/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Data/Format/ListMailbox/Utf8.php b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Data/Format/ListMailbox/Utf8.php new file mode 100644 index 00000000..69cca6cc --- /dev/null +++ b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Data/Format/ListMailbox/Utf8.php @@ -0,0 +1,39 @@ + + * @category Horde + * @copyright 2014-2017 Horde LLC + * @license http://www.horde.org/licenses/lgpl21 LGPL 2.1 + * @package Imap_Client + */ +class Horde_Imap_Client_Data_Format_ListMailbox_Utf8 +extends Horde_Imap_Client_Data_Format_Mailbox_Utf8 +{ + /** + */ + protected function _filterParams() + { + $ob = parent::_filterParams(); + + /* Don't quote % or * characters. */ + $ob->no_quote_list = true; + + return $ob; + } + +} diff --git a/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Data/Format/Mailbox.php b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Data/Format/Mailbox.php new file mode 100644 index 00000000..1b0620f3 --- /dev/null +++ b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Data/Format/Mailbox.php @@ -0,0 +1,99 @@ + + * @category Horde + * @copyright 2012-2017 Horde LLC + * @license http://www.horde.org/licenses/lgpl21 LGPL 2.1 + * @package Imap_Client + */ +class Horde_Imap_Client_Data_Format_Mailbox +extends Horde_Imap_Client_Data_Format_Astring +{ + /** + * Mailbox encoding. + * + * @var string + */ + protected $_encoding = 'utf7imap'; + + /** + * Mailbox object. + * + * @var Horde_Imap_Client_Mailbox + */ + protected $_mailbox; + + /** + * @param mixed $data Either a mailbox object or a UTF-8 mailbox name. + */ + public function __construct($data) + { + $this->_mailbox = Horde_Imap_Client_Mailbox::get($data); + + parent::__construct($this->_mailbox->{$this->_encoding}); + } + + /** + */ + public function __toString() + { + return strval($this->_mailbox); + } + + /** + */ + public function getData() + { + return $this->_mailbox; + } + + /** + * @throws Horde_Imap_Client_Exception + */ + public function binary() + { + if (parent::binary()) { + // Mailbox data can NEVER be sent as binary. + /* @todo: Disable until Horde_Imap_Client 3.0 */ + // throw new Horde_Imap_Client_Exception( + // 'Client error: can not send mailbox to IMAP server as binary data.' + // ); + + // Temporary fix: send a blank mailbox string. + $this->_mailbox = Horde_Imap_Client_Mailbox::get(''); + } + + return false; + } + + /** + */ + public function length() + { + return strlen($this->_mailbox->{$this->_encoding}); + } + + /** + */ + public function getStream() + { + $stream = new Horde_Stream_Temp(); + $stream->add($this->_mailbox->{$this->_encoding}); + return $stream; + } + +} diff --git a/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Data/Format/Mailbox/Utf8.php b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Data/Format/Mailbox/Utf8.php new file mode 100644 index 00000000..9b8c95b6 --- /dev/null +++ b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Data/Format/Mailbox/Utf8.php @@ -0,0 +1,57 @@ + + * @category Horde + * @copyright 2014-2017 Horde LLC + * @license http://www.horde.org/licenses/lgpl21 LGPL 2.1 + * @package Imap_Client + */ +class Horde_Imap_Client_Data_Format_Mailbox_Utf8 +extends Horde_Imap_Client_Data_Format_Mailbox +implements Horde_Imap_Client_Data_Format_String_Support_Nonascii +{ + /** + */ + protected $_encoding = 'utf8'; + + /** + */ + public function __construct($data) + { + parent::__construct($data); + + /* RFC 3501 allows any US-ASCII character, except null (\0), in + * mailbox data. + * RFC 6855 [3] institutes additional limitations on valid mailbox + * characters, to comply with RFC 5198 [2] (Net-Unicode Definition): + * "MUST NOT contain control characters (U+0000-U+001F and + * U+0080-U+009F), a delete character (U+007F), a line separator + * (U+2028), or a paragraph separator (U+2029)." */ + if ($this->quoted() && + preg_match('/[\x00-\x1f\x7f\x80-\x9f\x{2028}\x{2029}]/u', strval($this))) { + throw new Horde_Imap_Client_Data_Format_Exception( + 'Invalid character found in mailbox data.' + ); + } + + if ($this->literal()) { + $this->forceQuoted(); + } + } + +} diff --git a/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Data/Format/Nil.php b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Data/Format/Nil.php new file mode 100644 index 00000000..4a69d8aa --- /dev/null +++ b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Data/Format/Nil.php @@ -0,0 +1,46 @@ + + * @category Horde + * @copyright 2012-2017 Horde LLC + * @license http://www.horde.org/licenses/lgpl21 LGPL 2.1 + * @package Imap_Client + */ +class Horde_Imap_Client_Data_Format_Nil extends Horde_Imap_Client_Data_Format +{ + /** + */ + public function __construct($data = null) + { + // Don't store any data in object. + } + + /** + */ + public function __toString() + { + return ''; + } + + /** + */ + public function escape() + { + return 'NIL'; + } + +} diff --git a/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Data/Format/Nstring.php b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Data/Format/Nstring.php new file mode 100644 index 00000000..58048bca --- /dev/null +++ b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Data/Format/Nstring.php @@ -0,0 +1,93 @@ + + * @category Horde + * @copyright 2012-2017 Horde LLC + * @license http://www.horde.org/licenses/lgpl21 LGPL 2.1 + * @package Imap_Client + */ +class Horde_Imap_Client_Data_Format_Nstring extends Horde_Imap_Client_Data_Format_String +{ + /** + */ + public function __construct($data = null) + { + /* Data can be null (NIL) here. */ + if (is_null($data)) { + $this->_data = null; + } else { + parent::__construct($data); + } + } + + /** + */ + public function __toString() + { + return is_null($this->_data) + ? '' + : parent::__toString(); + } + + /** + */ + public function escape() + { + return is_null($this->_data) + ? 'NIL' + : parent::escape(); + } + + public function escapeStream() + { + if (is_null($this->_data)) { + $stream = new Horde_Stream_Temp(); + $stream->add('NIL', true); + return $stream->stream; + } + + return parent::escapeStream(); + } + + /** + */ + public function quoted() + { + return is_null($this->_data) + ? false + : parent::quoted(); + } + + /** + */ + public function length() + { + return is_null($this->_data) + ? 0 + : parent::length(); + } + + /** + */ + public function getStream() + { + return is_null($this->_data) + ? new Horde_Stream_Temp() + : parent::getStream(); + } + +} diff --git a/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Data/Format/Nstring/Nonascii.php b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Data/Format/Nstring/Nonascii.php new file mode 100644 index 00000000..1d47f0f5 --- /dev/null +++ b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Data/Format/Nstring/Nonascii.php @@ -0,0 +1,28 @@ + + * @category Horde + * @copyright 2014-2017 Horde LLC + * @license http://www.horde.org/licenses/lgpl21 LGPL 2.1 + * @package Imap_Client + * @since 2.25.0 + */ +class Horde_Imap_Client_Data_Format_Nstring_Nonascii +extends Horde_Imap_Client_Data_Format_Nstring +implements Horde_Imap_Client_Data_Format_String_Support_Nonascii +{ +} diff --git a/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Data/Format/Number.php b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Data/Format/Number.php new file mode 100644 index 00000000..dc33f4be --- /dev/null +++ b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Data/Format/Number.php @@ -0,0 +1,41 @@ + + * @category Horde + * @copyright 2012-2017 Horde LLC + * @license http://www.horde.org/licenses/lgpl21 LGPL 2.1 + * @package Imap_Client + */ +class Horde_Imap_Client_Data_Format_Number extends Horde_Imap_Client_Data_Format +{ + /** + */ + public function __toString() + { + return strval(intval($this->_data)); + } + + /** + */ + public function verify() + { + if (!is_numeric($this->_data)) { + throw new Horde_Imap_Client_Data_Format_Exception('Illegal character in IMAP number.'); + } + } + +} diff --git a/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Data/Format/String.php b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Data/Format/String.php new file mode 100644 index 00000000..927a3944 --- /dev/null +++ b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Data/Format/String.php @@ -0,0 +1,219 @@ + + * @category Horde + * @copyright 2012-2017 Horde LLC + * @license http://www.horde.org/licenses/lgpl21 LGPL 2.1 + * @package Imap_Client + */ +class Horde_Imap_Client_Data_Format_String +extends Horde_Imap_Client_Data_Format +{ + /** + * String filter parameters. + * + * @var string + */ + protected $_filter; + + /** + * @param array $opts Additional options: + * - eol: (boolean) If true, normalize EOLs in input. @since 2.2.0 + * - skipscan: (boolean) If true, don't scan input for + * binary/literal/quoted data. @since 2.2.0 + * + * @throws Horde_Imap_Client_Data_Format_Exception + */ + public function __construct($data, array $opts = array()) + { + /* String data is stored in a stream. */ + $this->_data = new Horde_Stream_Temp(); + + if (empty($opts['skipscan'])) { + $this->_filter = $this->_filterParams(); + stream_filter_register('horde_imap_client_string', 'Horde_Imap_Client_Data_Format_Filter_String'); + $res = stream_filter_append($this->_data->stream, 'horde_imap_client_string', STREAM_FILTER_WRITE, $this->_filter); + } else { + $res = null; + } + + if (empty($opts['eol'])) { + $res2 = null; + } else { + stream_filter_register('horde_eol', 'Horde_Stream_Filter_Eol'); + $res2 = stream_filter_append($this->_data->stream, 'horde_eol', STREAM_FILTER_WRITE); + } + + $this->_data->add($data); + + if (!is_null($res)) { + stream_filter_remove($res); + } + if (!is_null($res2)) { + stream_filter_remove($res2); + } + + if (isset($this->_filter) && + $this->_filter->nonascii && + !($this instanceof Horde_Imap_Client_Data_Format_String_Support_Nonascii)) { + throw new Horde_Imap_Client_Data_Format_Exception( + 'String contains non-ASCII characters.' + ); + } + } + + /** + * Return the base string filter parameters. + * + * @return object Filter parameters. + */ + protected function _filterParams() + { + return new stdClass; + } + + /** + */ + public function __toString() + { + return $this->_data->getString(0); + } + + /** + */ + public function escape() + { + if ($this->literal()) { + throw new Horde_Imap_Client_Data_Format_Exception('String requires literal to output.'); + } + + return $this->quoted() + ? stream_get_contents($this->escapeStream()) + : $this->_data->getString(0); + } + + /** + * Return the escaped string as a stream. + * + * @return resource The IMAP escaped stream. + */ + public function escapeStream() + { + if ($this->literal()) { + throw new Horde_Imap_Client_Data_Format_Exception('String requires literal to output.'); + } + + rewind($this->_data->stream); + + $stream = new Horde_Stream_Temp(); + $stream->add($this->_data, true); + + stream_filter_register('horde_imap_client_string_quote', 'Horde_Imap_Client_Data_Format_Filter_Quote'); + stream_filter_append($stream->stream, 'horde_imap_client_string_quote', STREAM_FILTER_READ); + + return $stream->stream; + } + + /** + * Does this data item require quoted string output? + * + * @return boolean True if quoted output is required. + */ + public function quoted() + { + /* IMAP strings MUST be quoted if they are not a literal. */ + return (!isset($this->_filter) || !$this->_filter->literal); + } + + /** + * Force item to be output quoted. + */ + public function forceQuoted() + { + $this->_filter = $this->_filterParams(); + $this->_filter->binary = false; + $this->_filter->literal = false; + $this->_filter->quoted = true; + } + + /** + * Does this data item require literal string output? + * + * @return boolean True if literal output is required. + */ + public function literal() + { + return (isset($this->_filter) && $this->_filter->literal); + } + + /** + * Force item to be output as a literal. + */ + public function forceLiteral() + { + $this->_filter = $this->_filterParams(); + // Keep binary status, if set + $this->_filter->literal = true; + $this->_filter->quoted = false; + } + + /** + * If literal output, is the data binary? + * + * @return boolean True if the literal output is binary. + */ + public function binary() + { + return (isset($this->_filter) && !empty($this->_filter->binary)); + } + + /** + * Force item to be output as a binary literal. + */ + public function forceBinary() + { + $this->_filter = $this->_filterParams(); + $this->_filter->binary = true; + $this->_filter->literal = true; + $this->_filter->quoted = false; + } + + /** + * Return the length of the data. + * + * @since 2.2.0 + * + * @return integer Data length. + */ + public function length() + { + return $this->_data->length(); + } + + /** + * Return the contents of the string as a stream object. + * + * @since 2.3.0 + * + * @return Horde_Stream The stream object. + */ + public function getStream() + { + return $this->_data; + } + +} diff --git a/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Data/Format/String/Nonascii.php b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Data/Format/String/Nonascii.php new file mode 100644 index 00000000..1150b648 --- /dev/null +++ b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Data/Format/String/Nonascii.php @@ -0,0 +1,28 @@ + + * @category Horde + * @copyright 2014-2017 Horde LLC + * @license http://www.horde.org/licenses/lgpl21 LGPL 2.1 + * @package Imap_Client + * @since 2.25.0 + */ +class Horde_Imap_Client_Data_Format_String_Nonascii +extends Horde_Imap_Client_Data_Format_String +implements Horde_Imap_Client_Data_Format_String_Support_Nonascii +{ +} diff --git a/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Data/Format/String/Support/Nonascii.php b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Data/Format/String/Support/Nonascii.php new file mode 100644 index 00000000..0db89bae --- /dev/null +++ b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Data/Format/String/Support/Nonascii.php @@ -0,0 +1,27 @@ + + * @category Horde + * @copyright 2014-2017 Horde LLC + * @license http://www.horde.org/licenses/lgpl21 LGPL 2.1 + * @package Imap_Client + * @since 2.25.0 + */ +interface Horde_Imap_Client_Data_Format_String_Support_Nonascii +{ +} diff --git a/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Data/Namespace.php b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Data/Namespace.php new file mode 100644 index 00000000..242293d8 --- /dev/null +++ b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Data/Namespace.php @@ -0,0 +1,143 @@ + + * @category Horde + * @copyright 2013-2017 Horde LLC + * @license http://www.horde.org/licenses/lgpl21 LGPL 2.1 + * @package Imap_Client + * @since 2.21.0 + * + * @property-read string $base The namespace base ($name without trailing + * delimiter) (UTF-8). + * @property string $delimiter The namespace delimiter. + * @property boolean $hidden Is this a hidden namespace? + * @property string $name The namespace name (UTF-8). + * @property string $translation Returns the translated name of the namespace + * (UTF-8). + * @property integer $type The namespace type. Either self::NS_PERSONAL, + * self::NS_OTHER, or self::NS_SHARED. + */ +class Horde_Imap_Client_Data_Namespace implements Serializable +{ + /* Namespace type constants. */ + const NS_PERSONAL = 1; + const NS_OTHER = 2; + const NS_SHARED = 3; + + /** + * Data object. + * + * @var array + */ + protected $_data = array(); + + /** + * Strips namespace information from the given mailbox name. + * + * @param string $mbox Mailbox name. + * + * @return string Mailbox name with namespace prefix stripped. + */ + public function stripNamespace($mbox) + { + $mbox = strval($mbox); + $name = $this->name; + + return (strlen($name) && (strpos($mbox, $name) === 0)) + ? substr($mbox, strlen($name)) + : $mbox; + } + + /** + */ + public function __get($name) + { + if (isset($this->_data[$name])) { + return $this->_data[$name]; + } + + switch ($name) { + case 'base': + return rtrim($this->name, $this->delimiter); + + case 'delimiter': + case 'name': + case 'translation': + return ''; + + case 'hidden': + return false; + + case 'type': + return self::NS_PERSONAL; + } + + return null; + } + + /** + */ + public function __set($name, $value) + { + switch ($name) { + case 'delimiter': + case 'name': + case 'translation': + $this->_data[$name] = strval($value); + break; + + case 'hidden': + $this->_data[$name] = (bool)$value; + break; + + case 'type': + $this->_data[$name] = intval($value); + break; + } + } + + /** + */ + public function __isset($name) + { + return isset($this->_data[$name]); + } + + /** + */ + public function __toString() + { + return $this->name; + } + + /* Serializable methods. */ + + /** + */ + public function serialize() + { + return json_encode($this->_data); + } + + /** + */ + public function unserialize($data) + { + $this->_data = json_decode($data, true); + } + +} diff --git a/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Data/SearchCharset.php b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Data/SearchCharset.php new file mode 100644 index 00000000..554284b6 --- /dev/null +++ b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Data/SearchCharset.php @@ -0,0 +1,178 @@ + + * @category Horde + * @copyright 2014-2017 Horde LLC + * @license http://www.horde.org/licenses/lgpl21 LGPL 2.1 + * @package Imap_Client + * @since 2.24.0 + * + * @property-read array $charsets The list of valid charsets that have been + * discovered on the server. + */ +class Horde_Imap_Client_Data_SearchCharset +implements Serializable, SplSubject +{ + /** + * Base client object. + * + * @var Horde_Imap_Client_Base + */ + protected $_baseob; + + /** + * Charset data. + * + * @var array + */ + protected $_charsets = array( + 'US-ASCII' => true + ); + + /** + * Observers. + * + * @var array + */ + protected $_observers = array(); + + /** + */ + public function __get($name) + { + switch ($name) { + case 'charsets': + return array_keys(array_filter($this->_charsets)); + } + } + + /** + */ + public function setBaseOb(Horde_Imap_Client_Base $ob) + { + $this->_baseob = $ob; + } + + /** + * Query the validity of a charset. + * + * @param string $charset The charset to query. + * @param boolean $cached If true, only query cached values. + * + * @return boolean True if the charset is valid for searching. + */ + public function query($charset, $cached = false) + { + $charset = Horde_String::upper($charset); + + if (isset($this->_charsets[$charset])) { + return $this->_charsets[$charset]; + } elseif ($cached) { + return null; + } + + if (!$this->_baseob) { + throw new RuntimeException( + 'Base object needs to be defined to query for charset.' + ); + } + + /* Use a dummy search query and search for BADCHARSET response. */ + $query = new Horde_Imap_Client_Search_Query(); + $query->charset($charset, false); + $query->ids($this->_baseob->getIdsOb(1, true)); + $query->text('a'); + try { + $this->_baseob->search('INBOX', $query, array( + 'nocache' => true, + 'sequence' => true + )); + $this->_charsets[$charset] = true; + } catch (Horde_Imap_Client_Exception $e) { + $this->_charsets[$charset] = ($e->getCode() !== Horde_Imap_Client_Exception::BADCHARSET); + } + + $this->notify(); + + return $this->_charsets[$charset]; + } + + /** + * Set the validity of a given charset. + * + * @param string $charset The charset. + * @param boolean $valid Is charset valid? + */ + public function setValid($charset, $valid = true) + { + $charset = Horde_String::upper($charset); + $valid = (bool)$valid; + + if (!isset($this->_charsets[$charset]) || + ($this->_charsets[$charset] !== $valid)) { + $this->_charsets[$charset] = $valid; + $this->notify(); + } + } + + /* SplSubject methods. */ + + /** + */ + public function attach(SplObserver $observer) + { + $this->detach($observer); + $this->_observers[] = $observer; + } + + /** + */ + public function detach(SplObserver $observer) + { + if (($key = array_search($observer, $this->_observers, true)) !== false) { + unset($this->_observers[$key]); + } + } + + /** + * Notification is triggered internally whenever the object's internal + * data storage is altered. + */ + public function notify() + { + foreach ($this->_observers as $val) { + $val->update($this); + } + } + + /* Serializable methods. */ + + /** + */ + public function serialize() + { + return json_encode($this->_charsets); + } + + /** + */ + public function unserialize($data) + { + $this->_charsets = json_decode($data, true); + } + +} diff --git a/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Data/SearchCharset/Utf8.php b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Data/SearchCharset/Utf8.php new file mode 100644 index 00000000..a6851c0f --- /dev/null +++ b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Data/SearchCharset/Utf8.php @@ -0,0 +1,66 @@ + + * @category Horde + * @copyright 2014-2017 Horde LLC + * @license http://www.horde.org/licenses/lgpl21 LGPL 2.1 + * @package Imap_Client + * @since 2.24.0 + */ +class Horde_Imap_Client_Data_SearchCharset_Utf8 +extends Horde_Imap_Client_Data_SearchCharset +{ + /** + * Charset data. + * + * @var array + */ + protected $_charsets = array( + 'US-ASCII' => true, + 'UTF-8' => true + ); + + /** + */ + public function query($charset, $cached = false) + { + return isset($this->_charsets[Horde_String::upper($charset)]); + } + + /** + */ + public function setValid($charset, $valid = true) + { + } + + /* Serializable methods. */ + + /** + */ + public function serialize() + { + return ''; + } + + /** + */ + public function unserialize($data) + { + } + +} diff --git a/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Data/Sync.php b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Data/Sync.php new file mode 100644 index 00000000..701ab71c --- /dev/null +++ b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Data/Sync.php @@ -0,0 +1,267 @@ + + * @category Horde + * @copyright 2012-2017 Horde LLC + * @license http://www.horde.org/licenses/lgpl21 LGPL 2.1 + * @package Imap_Client + * @since 2.2.0 + * + * @property-read Horde_Imap_Client_Ids $flagsuids List of messages with flag + * changes. + * @property-read Horde_Imap_Client_Ids $newmsgsuids List of new messages. + * @property-read Horde_Imap_Client_Ids $vanisheduids List of messages that + * have vanished. + */ +class Horde_Imap_Client_Data_Sync +{ + /** + * Mappings of status() values to sync keys. + * + * @since 2.8.0 + * + * @var array + */ + public static $map = array( + 'H' => 'highestmodseq', + 'M' => 'messages', + 'U' => 'uidnext', + 'V' => 'uidvalidity' + ); + + /** + * Are there messages that have had flag changes? + * + * @var boolean + */ + public $flags = null; + + /** + * The previous value of HIGHESTMODSEQ. + * + * @since 2.8.0 + * + * @var integer + */ + public $highestmodseq = null; + + /** + * The synchronized mailbox. + * + * @var Horde_Imap_Client_Mailbox + */ + public $mailbox; + + /** + * The previous number of messages in the mailbox. + * + * @since 2.8.0 + * + * @var integer + */ + public $messages = null; + + /** + * Are there new messages? + * + * @var boolean + */ + public $newmsgs = null; + + /** + * The previous value of UIDNEXT. + * + * @since 2.8.0 + * + * @var integer + */ + public $uidnext = null; + + /** + * The previous value of UIDVALIDITY. + * + * @since 2.8.0 + * + * @var integer + */ + public $uidvalidity = null; + + /** + * The UIDs of messages that are guaranteed to have vanished. This list is + * only guaranteed to be available if the server supports QRESYNC or a + * list of known UIDs is passed to the sync() method. + * + * @var Horde_Imap_Client_Ids + */ + public $vanished = null; + + /** + * UIDs of messages that have had flag changes. + * + * @var Horde_Imap_Client_Ids + */ + protected $_flagsuids; + + /** + * UIDs of new messages. + * + * @var Horde_Imap_Client_Ids + */ + protected $_newmsgsuids; + + /** + * UIDs of messages that have vanished. + * + * @var Horde_Imap_Client_Ids + */ + protected $_vanisheduids; + + /** + * Constructor. + * + * @param Horde_Imap_Client_Base $base_ob Base driver object. + * @param mixed $mailbox Mailbox to sync. + * @param array $sync Token sync data. + * @param array $curr Current sync data. + * @param integer $criteria Mask of criteria to return. + * @param Horde_Imap_Client_Ids $ids List of known UIDs. + * + * @throws Horde_Imap_Client_Exception + * @throws Horde_Imap_Client_Exception_Sync + */ + public function __construct(Horde_Imap_Client_Base $base_ob, $mailbox, + $sync, $curr, $criteria, $ids) + { + foreach (self::$map as $key => $val) { + if (isset($sync[$key])) { + $this->$val = $sync[$key]; + } + } + + /* Check uidvalidity. */ + if (!$this->uidvalidity || ($curr['V'] != $this->uidvalidity)) { + throw new Horde_Imap_Client_Exception_Sync('UIDs in cached mailbox have changed.', Horde_Imap_Client_Exception_Sync::UIDVALIDITY_CHANGED); + } + + $this->mailbox = $mailbox; + + /* This was a UIDVALIDITY check only. */ + if (!$criteria) { + return; + } + + $sync_all = ($criteria & Horde_Imap_Client::SYNC_ALL); + + /* New messages. */ + if ($sync_all || + ($criteria & Horde_Imap_Client::SYNC_NEWMSGS) || + ($criteria & Horde_Imap_Client::SYNC_NEWMSGSUIDS)) { + $this->newmsgs = empty($this->uidnext) + ? !empty($curr['U']) + : (!empty($curr['U']) && ($curr['U'] > $this->uidnext)); + + if ($this->newmsgs && + ($sync_all || + ($criteria & Horde_Imap_Client::SYNC_NEWMSGSUIDS))) { + $new_ids = empty($this->uidnext) + ? Horde_Imap_Client_Ids::ALL + : ($this->uidnext . ':' . $curr['U']); + + $squery = new Horde_Imap_Client_Search_Query(); + $squery->ids(new Horde_Imap_Client_Ids($new_ids)); + $sres = $base_ob->search($mailbox, $squery); + + $this->_newmsgsuids = $sres['match']; + } + } + + /* Do single status call to get all necessary data. */ + if ($this->highestmodseq && + ($sync_all || + ($criteria & Horde_Imap_Client::SYNC_FLAGS) || + ($criteria & Horde_Imap_Client::SYNC_FLAGSUIDS) || + ($criteria & Horde_Imap_Client::SYNC_VANISHED) || + ($criteria & Horde_Imap_Client::SYNC_VANISHEDUIDS))) { + $status_sync = $base_ob->status($mailbox, Horde_Imap_Client::STATUS_SYNCMODSEQ | Horde_Imap_Client::STATUS_SYNCFLAGUIDS | Horde_Imap_Client::STATUS_SYNCVANISHED); + + if (!is_null($ids)) { + $ids = $base_ob->resolveIds($mailbox, $ids); + } + } + + /* Flag changes. */ + if ($sync_all || ($criteria & Horde_Imap_Client::SYNC_FLAGS)) { + $this->flags = $this->highestmodseq + ? ($this->highestmodseq != $curr['H']) + : true; + } + + if ($sync_all || ($criteria & Horde_Imap_Client::SYNC_FLAGSUIDS)) { + if ($this->highestmodseq) { + if ($this->highestmodseq == $status_sync['syncmodseq']) { + $this->_flagsuids = is_null($ids) + ? $status_sync['syncflaguids'] + : $base_ob->getIdsOb(array_intersect($ids->ids, $status_sync['syncflaguids']->ids)); + } else { + $squery = new Horde_Imap_Client_Search_Query(); + $squery->modseq($this->highestmodseq + 1); + $sres = $base_ob->search($mailbox, $squery, array( + 'ids' => $ids + )); + $this->_flagsuids = $sres['match']; + } + } else { + /* Without MODSEQ, need to mark all FLAGS as changed. */ + $this->_flagsuids = $base_ob->resolveIds($mailbox, is_null($ids) ? $base_ob->getIdsOb(Horde_Imap_Client_Ids::ALL) : $ids); + } + } + + /* Vanished messages. */ + if ($sync_all || + ($criteria & Horde_Imap_Client::SYNC_VANISHED) || + ($criteria & Horde_Imap_Client::SYNC_VANISHEDUIDS)) { + if ($this->highestmodseq && + ($this->highestmodseq == $status_sync['syncmodseq'])) { + $vanished = is_null($ids) + ? $status_sync['syncvanished'] + : $base_ob->getIdsOb(array_intersect($ids->ids, $status_sync['syncvanished']->ids)); + } else { + $vanished = $base_ob->vanished($mailbox, $this->highestmodseq ? $this->highestmodseq : 1, array( + 'ids' => $ids + )); + } + + $this->vanished = (bool)count($vanished); + $this->_vanisheduids = $vanished; + } + } + + /** + */ + public function __get($name) + { + switch ($name) { + case 'flagsuids': + case 'newmsgsuids': + case 'vanisheduids': + return empty($this->{'_' . $name}) + ? new Horde_Imap_Client_Ids() + : $this->{'_' . $name}; + } + } + +} diff --git a/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Data/Thread.php b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Data/Thread.php new file mode 100644 index 00000000..b487f6fc --- /dev/null +++ b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Data/Thread.php @@ -0,0 +1,216 @@ + + * @category Horde + * @copyright 2008-2017 Horde LLC + * @license http://www.horde.org/licenses/lgpl21 LGPL 2.1 + * @package Imap_Client + */ +class Horde_Imap_Client_Data_Thread implements Countable, Serializable +{ + /** + * Internal thread data structure. Keys are base values, values are arrays + * with keys as the ID and values as the level. + * + * @var array + */ + protected $_thread = array(); + + /** + * The index type. + * + * @var string + */ + protected $_type; + + /** + * Constructor. + * + * @param array $data See $_thread. + * @param string $type Either 'sequence' or 'uid'. + */ + public function __construct($data, $type) + { + $this->_thread = $data; + $this->_type = $type; + } + + /** + * Return the ID type. + * + * @return string Either 'sequence' or 'uid'. + */ + public function getType() + { + return $this->_type; + } + + /** + * Return the sorted list of messages indices. + * + * @return Horde_Imap_Client_Ids The sorted list of messages. + */ + public function messageList() + { + return new Horde_Imap_Client_Ids($this->_getAllIndices(), $this->getType() == 'sequence'); + } + + /** + * Returns the list of messages in a thread. + * + * @param integer $index An index contained in the thread. + * + * @return array Keys are indices, values are objects with the following + * properties: + * - base: (integer) Base ID of the thread. If null, thread is a single + * message. + * - last: (boolean) If true, this is the last index in the sublevel. + * - level: (integer) The sublevel of the index. + */ + public function getThread($index) + { + foreach ($this->_thread as $v) { + if (isset($v[$index])) { + reset($v); + + $ob = new stdClass; + $ob->base = (count($v) > 1) ? key($v) : null; + $ob->last = false; + + $levels = $out = array(); + $last = 0; + + while (($v2 = current($v)) !== false) { + $k2 = key($v); + $ob2 = clone $ob; + $ob2->level = $v2; + $out[$k2] = $ob2; + + if (($last < $v2) && isset($levels[$v2])) { + $out[$levels[$v2]]->last = true; + } + $levels[$v2] = $k2; + $last = $v2; + next($v); + } + + foreach ($levels as $v) { + $out[$v]->last = true; + } + + return $out; + } + } + + return array(); + } + + /** + * Returns array of all threads. + * + * @return array Keys of thread arrays are indices, values are objects with the following + * properties: + * - base: (integer) Base ID of the thread. If null, thread is a single + * message. + * - last: (boolean) If true, this is the last index in the sublevel. + * - level: (integer) The sublevel of the index. + */ + public function getThreads() + { + $data = array(); + foreach ($this->_thread as $v) { + reset($v); + + $ob = new stdClass; + $ob->base = (count($v) > 1) ? key($v) : null; + $ob->last = false; + + $levels = $out = array(); + $last = 0; + + while (($v2 = current($v)) !== false) { + $k2 = key($v); + $ob2 = clone $ob; + $ob2->level = $v2; + $out[$k2] = $ob2; + + if (($last < $v2) && isset($levels[$v2])) { + $out[$levels[$v2]]->last = true; + } + $levels[$v2] = $k2; + $last = $v2; + next($v); + } + + foreach ($levels as $v) { + $out[$v]->last = true; + } + + $data[] = $out; + } + + return $data; + } + + /* Countable methods. */ + + /** + */ + public function count() + { + return count($this->_getAllIndices()); + } + + /* Serializable methods. */ + + /** + */ + public function serialize() + { + return json_encode(array( + $this->_thread, + $this->_type + )); + } + + /** + */ + public function unserialize($data) + { + list($this->_thread, $this->_type) = json_decode($data, true); + } + + /* Protected methods. */ + + /** + * Return all indices. + * + * @return array An array of indices. + */ + protected function _getAllIndices() + { + $out = array(); + + foreach ($this->_thread as $val) { + $out += $val; + } + + return array_keys($out); + } + +} diff --git a/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/DateTime.php b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/DateTime.php new file mode 100644 index 00000000..bc167f28 --- /dev/null +++ b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/DateTime.php @@ -0,0 +1,119 @@ + + * @category Horde + * @copyright 2012-2017 Horde LLC + * @license http://www.horde.org/licenses/lgpl21 LGPL 2.1 + * @package Imap_Client + */ +class Horde_Imap_Client_DateTime extends DateTime +{ + /** + */ + public function __construct($time = null, $tz = null) + { + /* See https://bugs.php.net/bug.php?id=67118 */ + $bug_67118 = (version_compare(PHP_VERSION, '5.6', '>=')) || + in_array(PHP_VERSION, array('5.4.29', '5.5.13')); + $tz = new DateTimeZone('UTC'); + + /* Bug #14381 Catch malformed offset - which doesn't cause + DateTime to throw exception. */ + if (substr(rtrim($time), -5) === ' 0000') { + $time = substr(trim($time), 0, strlen(trim($time)) - 5) . ' +0000'; + try { + if ($bug_67118) { + new DateTime($time, $tz); + } + parent::__construct($time, $tz); + return; + } catch (Exception $e) {} + } + + try { + if ($bug_67118) { + new DateTime($time, $tz); + } + parent::__construct($time, $tz); + return; + } catch (Exception $e) {} + + /* Check for malformed day-of-week parts, usually incorrectly + * localized. E.g. Fr, 15 Apr 2016 15:15:09 +0000 */ + if (!preg_match("/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun),/", $time)) { + $time = preg_replace("/^(\S*,)/", '', $time, 1, $i); + if ($i) { + try { + if ($bug_67118) { + new DateTime($time, $tz); + } + parent::__construct($time, $tz); + return; + } catch (Exception $e) {} + } + } + + /* Bug #5717 - Check for UT vs. UTC. */ + if (substr(rtrim($time), -3) === ' UT') { + try { + if ($bug_67118) { + new DateTime($time . 'C', $tz); + } + parent::__construct($time . 'C', $tz); + return; + } catch (Exception $e) {} + } + + /* Bug #9847 - Catch paranthesized timezone information at end of date + * string. */ + $date = preg_replace("/\s*\([^\)]+\)\s*$/", '', $time, -1, $i); + if ($i) { + try { + if ($bug_67118) { + new DateTime($date, $tz); + } + parent::__construct($date, $tz); + return; + } catch (Exception $e) {} + } + + parent::__construct('@-1', $tz); + } + + /** + * String representation: UNIX timestamp. + */ + public function __toString() + { + return $this->error() + ? '0' + : strval($this->getTimestamp()); + } + + /** + * Was this an unparseable date? + * + * @return boolean True if unparseable. + */ + public function error() + { + return ($this->getTimestamp() === -1); + } + +} diff --git a/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Exception.php b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Exception.php new file mode 100644 index 00000000..024de04b --- /dev/null +++ b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Exception.php @@ -0,0 +1,303 @@ + + * @category Horde + * @copyright 2008-2017 Horde LLC + * @license http://www.horde.org/licenses/lgpl21 LGPL 2.1 + * @package Imap_Client + */ +class Horde_Imap_Client_Exception extends Horde_Exception_Wrapped +{ + /* Error message codes. */ + + /** + * Unspecified error (DEFAULT). + */ + const UNSPECIFIED = 0; + + /** + * There was an unrecoverable error in UTF7IMAP -> UTF8 conversion. + */ + const UTF7IMAP_CONVERSION = 3; + + /** + * The server ended the connection. + */ + const DISCONNECT = 4; + + /** + * The charset used in the search query is not supported on the + * server. */ + const BADCHARSET = 5; + + /** + * There were errors parsing the MIME/RFC 2822 header of the part. + */ + const PARSEERROR = 6; + + /** + * The server could not decode the MIME part (see RFC 3516). + */ + const UNKNOWNCTE = 7; + + /** + * The comparator specified by setComparator() was not recognized by the + * IMAP server + */ + const BADCOMPARATOR = 9; + + /** + * RFC 7162 [3.1.2.2] - All mailboxes are not required to support + * mod-sequences. + */ + const MBOXNOMODSEQ = 10; + + /** + * Thrown if server denies the network connection. + */ + const SERVER_CONNECT = 11; + + /** + * Thrown if read error for server response. + */ + const SERVER_READERROR = 12; + + /** + * Thrown if write error in server interaction. + */ + const SERVER_WRITEERROR = 16; + + /** + * Thrown on CATENATE if the URL is invalid. + */ + const CATENATE_BADURL = 13; + + /** + * Thrown on CATENATE if the message was too big. + */ + const CATENATE_TOOBIG = 14; + + /** + * Thrown on CREATE if special-use attribute is not supported. + */ + const USEATTR = 15; + + /** + * The user did not have permissions to carry out the operation. + */ + const NOPERM = 17; + + /** + * The operation was not successful because another user is holding + * a necessary resource. The operation may succeed if attempted later. + */ + const INUSE = 18; + + /** + * The operation failed because data on the server was corrupt. + */ + const CORRUPTION = 19; + + /** + * The operation failed because it exceeded some limit on the server. + */ + const LIMIT = 20; + + /** + * The operation failed because the user is over their quota. + */ + const OVERQUOTA = 21; + + /** + * The operation failed because the requested creation object already + * exists. + */ + const ALREADYEXISTS = 22; + + /** + * The operation failed because the requested deletion object did not + * exist. + */ + const NONEXISTENT = 23; + + /** + * Setting metadata failed because the size of its value is too large. + * The maximum octet count the server is willing to accept will be + * in the exception message string. + */ + const METADATA_MAXSIZE = 24; + + /** + * Setting metadata failed because the maximum number of allowed + * annotations has already been reached. + */ + const METADATA_TOOMANY = 25; + + /** + * Setting metadata failed because the server does not support private + * annotations on one of the specified mailboxes. + */ + const METADATA_NOPRIVATE = 26; + + /** + * Invalid metadata entry. + */ + const METADATA_INVALID = 27; + + + // Login failures + + /** + * Could not start mandatory TLS connection. + */ + const LOGIN_TLSFAILURE = 100; + + /** + * Could not find an available authentication method. + */ + const LOGIN_NOAUTHMETHOD = 101; + + /** + * Generic authentication failure. + */ + const LOGIN_AUTHENTICATIONFAILED = 102; + + /** + * Remote server is unavailable. + */ + const LOGIN_UNAVAILABLE = 103; + + /** + * Authentication succeeded, but authorization failed. + */ + const LOGIN_AUTHORIZATIONFAILED = 104; + + /** + * Authentication is no longer permitted with this passphrase. + */ + const LOGIN_EXPIRED = 105; + + /** + * Login requires privacy. + */ + const LOGIN_PRIVACYREQUIRED = 106; + + /** + * Server verification failed (SCRAM authentication). + */ + const LOGIN_SERVER_VERIFICATION_FAILED = 107; + + + // Mailbox access failures + + /** + * Could not open/access mailbox + */ + const MAILBOX_NOOPEN = 200; + + /** + * Could not complete the command because the mailbox is read-only + */ + const MAILBOX_READONLY = 201; + + + // POP3 specific error codes + + /** + * Temporary issue. Generally, there is no need to alarm the user for + * errors of this type. + */ + const POP3_TEMP_ERROR = 300; + + /** + * Permanent error indicated by server. + */ + const POP3_PERM_ERROR = 301; + + + // Unsupported feature error codes + + /** + * Function/feature is not supported on this server. + */ + const NOT_SUPPORTED = 400; + + + /** + * Raw error message (in English). + * + * @since 2.18.0 + * + * @var string + */ + public $raw_msg = ''; + + /** + * Constructor. + * + * @param string $message Error message (non-translated). + * @param code $code Error code. + */ + public function __construct($message = null, $code = null) + { + parent::__construct($message, $code); + + $this->raw_msg = $this->message; + try { + $this->message = Horde_Imap_Client_Translation::t($this->message); + } catch (Horde_Translation_Exception $e) {} + } + + /** + * Allow the error message to be altered. + * + * @param string $msg Error message. + */ + public function setMessage($msg) + { + $this->message = strval($msg); + } + + /** + * Allow the error code to be altered. + * + * @param integer $code Error code. + */ + public function setCode($code) + { + $this->code = intval($code); + } + + /** + * Perform substitution of variables in the error message. + * + * Needed to allow for correct translation of error message. + * + * @since 2.22.0 + * + * @param array $args Arguments used for substitution. + */ + public function messagePrintf(array $args = array()) + { + $this->raw_msg = vsprintf($this->raw_msg, $args); + $this->message = vsprintf($this->message, $args); + } + +} diff --git a/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Exception/NoSupportExtension.php b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Exception/NoSupportExtension.php new file mode 100644 index 00000000..dc76b42f --- /dev/null +++ b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Exception/NoSupportExtension.php @@ -0,0 +1,54 @@ + + * @category Horde + * @copyright 2012-2017 Horde LLC + * @license http://www.horde.org/licenses/lgpl21 LGPL 2.1 + * @package Imap_Client + */ +class Horde_Imap_Client_Exception_NoSupportExtension +extends Horde_Imap_Client_Exception +{ + /** + * The extension not supported on the server. + * + * @var string + */ + public $extension; + + /** + * Constructor. + * + * @param string $extension The extension not supported on the server. + * @param string $msg A non-standard error message to use instead + * of the default. + */ + public function __construct($extension, $msg = null) + { + $this->extension = $extension; + + if (is_null($msg)) { + $msg = sprintf( + Horde_Imap_Client_Translation::r("The server does not support the %s extension."), + $extension + ); + } + + parent::__construct($msg, self::NOT_SUPPORTED); + } + +} diff --git a/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Exception/NoSupportPop3.php b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Exception/NoSupportPop3.php new file mode 100644 index 00000000..a76c4a5c --- /dev/null +++ b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Exception/NoSupportPop3.php @@ -0,0 +1,40 @@ + + * @category Horde + * @copyright 2012-2017 Horde LLC + * @license http://www.horde.org/licenses/lgpl21 LGPL 2.1 + * @package Imap_Client + */ +class Horde_Imap_Client_Exception_NoSupportPop3 +extends Horde_Imap_Client_Exception +{ + /** + * Constructor. + * + * @param string $feature The feature not supported in POP3. + */ + public function __construct($feature) + { + parent::__construct( + Horde_Imap_Client_Translation::r("%s not supported on POP3 servers."), + self::NOT_SUPPORTED + ); + $this->messagePrintf(array($feature)); + } + +} diff --git a/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Exception/SearchCharset.php b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Exception/SearchCharset.php new file mode 100644 index 00000000..50bdb8ce --- /dev/null +++ b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Exception/SearchCharset.php @@ -0,0 +1,50 @@ + + * @category Horde + * @copyright 2012-2017 Horde LLC + * @license http://www.horde.org/licenses/lgpl21 LGPL 2.1 + * @package Imap_Client + */ +class Horde_Imap_Client_Exception_SearchCharset +extends Horde_Imap_Client_Exception +{ + /** + * Charset that was attempted to be converted to. + * + * @var string + */ + public $charset; + + /** + * Constructor. + * + * @param string $charset The charset that was attempted to be converted + * to. + */ + public function __construct($charset) + { + $this->charset = $charset; + + parent::__construct( + Horde_Imap_Client_Translation::r("Cannot convert search query text to new charset"), + self::BADCHARSET + ); + } + +} diff --git a/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Exception/ServerResponse.php b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Exception/ServerResponse.php new file mode 100644 index 00000000..7d154949 --- /dev/null +++ b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Exception/ServerResponse.php @@ -0,0 +1,88 @@ + + * @category Horde + * @copyright 2012-2017 Horde LLC + * @license http://www.horde.org/licenses/lgpl21 LGPL 2.1 + * @package Imap_Client + * + * @property-read string $command The command that caused the BAD/NO error + * status. + * @property-read array $resp_data The response data array. + * @property-read integer $status Server error status. + */ +class Horde_Imap_Client_Exception_ServerResponse extends Horde_Imap_Client_Exception +{ + /** + * Pipeline object. + * + * @var Horde_Imap_Client_Interaction_Pipeline + */ + protected $_pipeline; + + /** + * Server response object. + * + * @var Horde_Imap_Client_Interaction_Server + */ + protected $_server; + + /** + * Constructor. + * + * @param string $msg Error message. + * @param integer $code Error code. + * @param Horde_Imap_Client_Interaction_Server $server Server ob. + * @param Horde_Imap_Client_Interaction_Pipeline $pipeline Pipeline ob. + */ + public function __construct( + $msg = null, + $code = 0, + Horde_Imap_Client_Interaction_Server $server, + Horde_Imap_Client_Interaction_Pipeline $pipeline + ) + { + $this->details = strval($server->token); + + $this->_pipeline = $pipeline; + $this->_server = $server; + + parent::__construct($msg, $code); + } + + /** + */ + public function __get($name) + { + switch ($name) { + case 'command': + return ($this->_server instanceof Horde_Imap_Client_Interaction_Server_Tagged) + ? $this->_pipeline->getCmd($this->_server->tag)->getCommand() + : null; + + case 'resp_data': + return $this->_pipeline->data; + + case 'status': + return $this->_server->status; + + default: + return parent::__get($name); + } + } + +} diff --git a/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Exception/Sync.php b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Exception/Sync.php new file mode 100644 index 00000000..cc3af5ad --- /dev/null +++ b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Exception/Sync.php @@ -0,0 +1,37 @@ + + * @category Horde + * @copyright 2012-2017 Horde LLC + * @license http://www.horde.org/licenses/lgpl21 LGPL 2.1 + * @package Imap_Client + */ +class Horde_Imap_Client_Exception_Sync extends Horde_Exception_Wrapped +{ + /* Error message codes. */ + + /** + * Token could not be parsed. + */ + const BAD_TOKEN = 1; + + /** + * UIDVALIDITY of the mailbox changed. + */ + const UIDVALIDITY_CHANGED = 2; + +} diff --git a/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Fetch/Query.php b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Fetch/Query.php new file mode 100644 index 00000000..1c777a1b --- /dev/null +++ b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Fetch/Query.php @@ -0,0 +1,383 @@ + + * @category Horde + * @copyright 2011-2017 Horde LLC + * @license http://www.horde.org/licenses/lgpl21 LGPL 2.1 + * @package Imap_Client + */ +class Horde_Imap_Client_Fetch_Query implements ArrayAccess, Countable, Iterator +{ + /** + * Internal data array. + * + * @var array + */ + protected $_data = array(); + + /** + * Get the full text of the message. + * + * @param array $opts The following options are available: + * - length: (integer) The length of the substring to return. + * DEFAULT: The entire text is returned. + * - peek: (boolean) If set, does not set the '\Seen' flag on the + * message. + * DEFAULT: The seen flag is set. + * - start: (integer) If a portion of the full text is desired to be + * returned, the starting position is identified here. + * DEFAULT: The entire text is returned. + */ + public function fullText(array $opts = array()) + { + $this->_data[Horde_Imap_Client::FETCH_FULLMSG] = $opts; + } + + /** + * Return header text. + * + * Header text is defined only for the base RFC 2822 message or + * message/rfc822 parts. + * + * @param array $opts The following options are available: + * - id: (string) The MIME ID to obtain the header text for. + * DEFAULT: The header text for the base message will be + * returned. + * - length: (integer) The length of the substring to return. + * DEFAULT: The entire text is returned. + * - peek: (boolean) If set, does not set the '\Seen' flag on the + * message. + * DEFAULT: The seen flag is set. + * - start: (integer) If a portion of the full text is desired to be + * returned, the starting position is identified here. + * DEFAULT: The entire text is returned. + */ + public function headerText(array $opts = array()) + { + $id = isset($opts['id']) + ? $opts['id'] + : 0; + $this->_data[Horde_Imap_Client::FETCH_HEADERTEXT][$id] = $opts; + } + + /** + * Return body text. + * + * Body text is defined only for the base RFC 2822 message or + * message/rfc822 parts. + * + * @param array $opts The following options are available: + * - id: (string) The MIME ID to obtain the body text for. + * DEFAULT: The body text for the entire message will be + * returned. + * - length: (integer) The length of the substring to return. + * DEFAULT: The entire text is returned. + * - peek: (boolean) If set, does not set the '\Seen' flag on the + * message. + * DEFAULT: The seen flag is set. + * - start: (integer) If a portion of the full text is desired to be + * returned, the starting position is identified here. + * DEFAULT: The entire text is returned. + */ + public function bodyText(array $opts = array()) + { + $id = isset($opts['id']) + ? $opts['id'] + : 0; + $this->_data[Horde_Imap_Client::FETCH_BODYTEXT][$id] = $opts; + } + + /** + * Return MIME header text. + * + * MIME header text is defined only for non-RFC 2822 messages and + * non-message/rfc822 parts. + * + * @param string $id The MIME ID to obtain the MIME header text for. + * @param array $opts The following options are available: + * - length: (integer) The length of the substring to return. + * DEFAULT: The entire text is returned. + * - peek: (boolean) If set, does not set the '\Seen' flag on the + * message. + * DEFAULT: The seen flag is set. + * - start: (integer) If a portion of the full text is desired to be + * returned, the starting position is identified here. + * DEFAULT: The entire text is returned. + */ + public function mimeHeader($id, array $opts = array()) + { + $this->_data[Horde_Imap_Client::FETCH_MIMEHEADER][$id] = $opts; + } + + /** + * Return the body part data for a MIME ID. + * + * @param string $id The MIME ID to obtain the body part text for. + * @param array $opts The following options are available: + * - decode: (boolean) Attempt to server-side decode the bodypart data + * if it is MIME transfer encoded. + * DEFAULT: false + * - length: (integer) The length of the substring to return. + * DEFAULT: The entire text is returned. + * - peek: (boolean) If set, does not set the '\Seen' flag on the + * message. + * DEFAULT: The seen flag is set. + * - start: (integer) If a portion of the full text is desired to be + * returned, the starting position is identified here. + * DEFAULT: The entire text is returned. + */ + public function bodyPart($id, array $opts = array()) + { + $this->_data[Horde_Imap_Client::FETCH_BODYPART][$id] = $opts; + } + + /** + * Returns the decoded body part size for a MIME ID. + * + * @param string $id The MIME ID to obtain the decoded body part size + * for. + */ + public function bodyPartSize($id) + { + $this->_data[Horde_Imap_Client::FETCH_BODYPARTSIZE][$id] = true; + } + + /** + * Returns RFC 2822 header text that matches a search string. + * + * This header search work only with the base RFC 2822 message or + * message/rfc822 parts. + * + * @param string $label A unique label associated with this particular + * search. This is how the results are stored. + * @param array $search The search string(s) (case-insensitive). + * @param array $opts The following options are available: + * - cache: (boolean) If true, and 'peek' is also true, will cache + * the result of this call. + * DEFAULT: false + * - id: (string) The MIME ID to search. + * DEFAULT: The base message part + * - length: (integer) The length of the substring to return. + * DEFAULT: The entire text is returned. + * - notsearch: (boolean) Do a 'NOT' search on the headers. + * DEFAULT: false + * - peek: (boolean) If set, does not set the '\Seen' flag on the + * message. + * DEFAULT: The seen flag is set. + * - start: (integer) If a portion of the full text is desired to be + * returned, the starting position is identified here. + * DEFAULT: The entire text is returned. + */ + public function headers($label, $search, array $opts = array()) + { + $this->_data[Horde_Imap_Client::FETCH_HEADERS][$label] = array_merge( + $opts, + array( + 'headers' => array_map('strval', $search) + ) + ); + } + + /** + * Return MIME structure information. + */ + public function structure() + { + $this->_data[Horde_Imap_Client::FETCH_STRUCTURE] = true; + } + + /** + * Return envelope header data. + */ + public function envelope() + { + $this->_data[Horde_Imap_Client::FETCH_ENVELOPE] = true; + } + + /** + * Return flags set for the message. + */ + public function flags() + { + $this->_data[Horde_Imap_Client::FETCH_FLAGS] = true; + } + + /** + * Return the internal (IMAP) date of the message. + */ + public function imapDate() + { + $this->_data[Horde_Imap_Client::FETCH_IMAPDATE] = true; + } + + /** + * Return the size (in bytes) of the message. + */ + public function size() + { + $this->_data[Horde_Imap_Client::FETCH_SIZE] = true; + } + + /** + * Return the unique ID of the message. + */ + public function uid() + { + $this->_data[Horde_Imap_Client::FETCH_UID] = true; + } + + /** + * Return the sequence number of the message. + */ + public function seq() + { + $this->_data[Horde_Imap_Client::FETCH_SEQ] = true; + } + + /** + * Return the mod-sequence value for the message. + * + * The server must support the CONDSTORE IMAP extension, and the mailbox + * must support mod-sequences. + */ + public function modseq() + { + $this->_data[Horde_Imap_Client::FETCH_MODSEQ] = true; + } + + /** + * Does the query contain the given criteria? + * + * @param integer $criteria The criteria to remove. + * + * @return boolean True if the query contains the given criteria. + */ + public function contains($criteria) + { + return isset($this->_data[$criteria]); + } + + /** + * Remove an entry under a given criteria. + * + * @param integer $criteria Criteria ID. + * @param string $key The key to remove. + */ + public function remove($criteria, $key) + { + if (isset($this->_data[$criteria]) && + is_array($this->_data[$criteria])) { + unset($this->_data[$criteria][$key]); + if (empty($this->_data[$criteria])) { + unset($this->_data[$criteria]); + } + } + } + + /** + * Returns a hash of the current query object. + * + * @return string Hash. + */ + public function hash() + { + return hash('md5', serialize($this)); + } + + /* ArrayAccess methods. */ + + /** + */ + public function offsetExists($offset) + { + return isset($this->_data[$offset]); + } + + /** + */ + public function offsetGet($offset) + { + return isset($this->_data[$offset]) + ? $this->_data[$offset] + : null; + } + + /** + */ + public function offsetSet($offset, $value) + { + $this->_data[$offset] = $value; + } + + /** + */ + public function offsetUnset($offset) + { + unset($this->_data[$offset]); + } + + /* Countable methods. */ + + /** + */ + public function count() + { + return count($this->_data); + } + + /* Iterator methods. */ + + /** + */ + public function current() + { + $opts = current($this->_data); + + return (!empty($opts) && ($this->key() == Horde_Imap_Client::FETCH_BODYPARTSIZE)) + ? array_keys($opts) + : $opts; + } + + /** + */ + public function key() + { + return key($this->_data); + } + + /** + */ + public function next() + { + next($this->_data); + } + + /** + */ + public function rewind() + { + reset($this->_data); + } + + /** + */ + public function valid() + { + return !is_null($this->key()); + } + +} diff --git a/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Fetch/Results.php b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Fetch/Results.php new file mode 100644 index 00000000..a39246b0 --- /dev/null +++ b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Fetch/Results.php @@ -0,0 +1,182 @@ + + * @category Horde + * @copyright 2012-2017 Horde LLC + * @license http://www.horde.org/licenses/lgpl21 LGPL 2.1 + * @package Imap_Client + * + * @property-read integer $key_type The key type (sequence or UID). + */ +class Horde_Imap_Client_Fetch_Results +implements ArrayAccess, Countable, IteratorAggregate +{ + /** + * Key type constants. + */ + const SEQUENCE = 1; + const UID = 2; + + /** + * Internal data array. + * + * @var array + */ + protected $_data = array(); + + /** + * Key type. + * + * @var integer + */ + protected $_keyType; + + /** + * Class to use when creating a new fetch object. + * + * @var string + */ + protected $_obClass; + + /** + * Constructor. + * + * @param string $ob_class Class to use when creating a new fetch + * object. + * @param integer $key_type Key type. + */ + public function __construct($ob_class = 'Horde_Imap_Client_Data_Fetch', + $key_type = self::UID) + { + $this->_obClass = $ob_class; + $this->_keyType = $key_type; + } + + /** + */ + public function __get($name) + { + switch ($name) { + case 'key_type': + return $this->_keyType; + } + } + + /** + * Return a fetch object, creating and storing an empty object in the + * results set if it doesn't currently exist. + * + * @param string $key The key to retrieve. + * + * @return Horde_Imap_Client_Data_Fetch The fetch object. + */ + public function get($key) + { + if (!isset($this->_data[$key])) { + $this->_data[$key] = new $this->_obClass(); + } + + return $this->_data[$key]; + } + + /** + * Return the list of IDs. + * + * @return array ID list. + */ + public function ids() + { + ksort($this->_data); + return array_keys($this->_data); + } + + /** + * Return the first fetch object in the results, if there is only one + * object. + * + * @return null|Horde_Imap_Client_Data_Fetch The fetch object if there is + * only one object, or null. + */ + public function first() + { + return (count($this->_data) === 1) + ? reset($this->_data) + : null; + } + + /** + * Clears all fetch results. + * + * @since 2.6.0 + */ + public function clear() + { + $this->_data = array(); + } + + /* ArrayAccess methods. */ + + /** + */ + public function offsetExists($offset) + { + return isset($this->_data[$offset]); + } + + /** + */ + public function offsetGet($offset) + { + return isset($this->_data[$offset]) + ? $this->_data[$offset] + : null; + } + + /** + */ + public function offsetSet($offset, $value) + { + $this->_data[$offset] = $value; + } + + /** + */ + public function offsetUnset($offset) + { + unset($this->_data[$offset]); + } + + /* Countable methods. */ + + /** + */ + public function count() + { + return count($this->_data); + } + + /* IteratorAggregate methods. */ + + /** + */ + public function getIterator() + { + ksort($this->_data); + return new ArrayIterator($this->_data); + } + +} diff --git a/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Ids.php b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Ids.php new file mode 100644 index 00000000..187b646c --- /dev/null +++ b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Ids.php @@ -0,0 +1,494 @@ + + * @category Horde + * @copyright 2011-2017 Horde LLC + * @license http://www.horde.org/licenses/lgpl21 LGPL 2.1 + * @package Imap_Client + * + * @property-read boolean $all Does this represent an ALL message set? + * @property-read array $ids The list of IDs. + * @property-read boolean $largest Does this represent the largest ID in use? + * @property-read string $max The largest ID (@since 2.20.0). + * @property-read string $min The smallest ID (@since 2.20.0). + * @property-read string $range_string Generates a range string consisting of + * all messages between begin and end of + * ID list. + * @property-read boolean $search_res Does this represent a search result? + * @property-read boolean $sequence Are these sequence IDs? If false, these + * are UIDs. + * @property-read boolean $special True if this is a "special" ID + * representation. + * @property-read string $tostring Return the non-sorted string + * representation. + * @property-read string $tostring_sort Return the sorted string + * representation. + */ +class Horde_Imap_Client_Ids implements Countable, Iterator, Serializable +{ + /** + * "Special" representation constants. + */ + const ALL = "\01"; + const SEARCH_RES = "\02"; + const LARGEST = "\03"; + + /** + * Allow duplicate IDs? + * + * @var boolean + */ + public $duplicates = false; + + /** + * List of IDs. + * + * @var mixed + */ + protected $_ids = array(); + + /** + * Are IDs message sequence numbers? + * + * @var boolean + */ + protected $_sequence = false; + + /** + * Are IDs sorted? + * + * @var boolean + */ + protected $_sorted = false; + + /** + * Constructor. + * + * @param mixed $ids See self::add(). + * @param boolean $sequence Are $ids message sequence numbers? + */ + public function __construct($ids = null, $sequence = false) + { + $this->add($ids); + $this->_sequence = $sequence; + } + + /** + */ + public function __get($name) + { + switch ($name) { + case 'all': + return ($this->_ids === self::ALL); + + case 'ids': + return is_array($this->_ids) + ? $this->_ids + : array(); + + case 'largest': + return ($this->_ids === self::LARGEST); + + case 'max': + $this->sort(); + return end($this->_ids); + + case 'min': + $this->sort(); + return reset($this->_ids); + + case 'range_string': + if (!count($this)) { + return ''; + } + + $min = $this->min; + $max = $this->max; + + return ($min == $max) + ? $min + : $min . ':' . $max; + + case 'search_res': + return ($this->_ids === self::SEARCH_RES); + + case 'sequence': + return (bool)$this->_sequence; + + case 'special': + return is_string($this->_ids); + + case 'tostring': + case 'tostring_sort': + if ($this->all) { + return '1:*'; + } elseif ($this->largest) { + return '*'; + } elseif ($this->search_res) { + return '$'; + } + return strval($this->_toSequenceString($name == 'tostring_sort')); + } + } + + /** + */ + public function __toString() + { + return $this->tostring; + } + + /** + * Add IDs to the current object. + * + * @param mixed $ids Either self::ALL, self::SEARCH_RES, self::LARGEST, + * Horde_Imap_Client_Ids object, array, or sequence + * string. + */ + public function add($ids) + { + if (!is_null($ids)) { + if (is_string($ids) && + in_array($ids, array(self::ALL, self::SEARCH_RES, self::LARGEST))) { + $this->_ids = $ids; + } elseif ($add = $this->_resolveIds($ids)) { + if (is_array($this->_ids) && !empty($this->_ids)) { + foreach ($add as $val) { + $this->_ids[] = $val; + } + } else { + $this->_ids = $add; + } + if (!$this->duplicates) { + $this->_ids = (count($this->_ids) > 25000) + ? array_unique($this->_ids) + : array_keys(array_flip($this->_ids)); + } + } + + $this->_sorted = is_array($this->_ids) && (count($this->_ids) === 1); + } + } + + /** + * Removed IDs from the current object. + * + * @since 2.17.0 + * + * @param mixed $ids Either Horde_Imap_Client_Ids object, array, or + * sequence string. + */ + public function remove($ids) + { + if (!$this->isEmpty() && + ($remove = $this->_resolveIds($ids))) { + $this->_ids = array_diff($this->_ids, array_unique($remove)); + } + } + + /** + * Is this object empty (i.e. does not contain IDs)? + * + * @return boolean True if object is empty. + */ + public function isEmpty() + { + return (is_array($this->_ids) && !count($this->_ids)); + } + + /** + * Reverses the order of the IDs. + */ + public function reverse() + { + if (is_array($this->_ids)) { + $this->_ids = array_reverse($this->_ids); + } + } + + /** + * Sorts the IDs. + */ + public function sort() + { + if (!$this->_sorted && is_array($this->_ids)) { + $this->_sort($this->_ids); + $this->_sorted = true; + } + } + + /** + * Sorts the IDs numerically. + * + * @param array $ids The array list. + */ + protected function _sort(&$ids) + { + sort($ids, SORT_NUMERIC); + } + + /** + * Split the sequence string at an approximate length. + * + * @since 2.7.0 + * + * @param integer $length Length to split. + * + * @return array A list containing individual sequence strings. + */ + public function split($length) + { + $id = new Horde_Stream_Temp(); + $id->add($this->tostring_sort, true); + + $out = array(); + + do { + $out[] = $id->substring(0, $length) . $id->getToChar(','); + } while (!$id->eof()); + + return $out; + } + + /** + * Resolve the $ids input to add() and remove(). + * + * @param mixed $ids Either Horde_Imap_Client_Ids object, array, or + * sequence string. + * + * @return array An array of IDs. + */ + protected function _resolveIds($ids) + { + if ($ids instanceof Horde_Imap_Client_Ids) { + return $ids->ids; + } elseif (is_array($ids)) { + return $ids; + } elseif (is_string($ids) || is_integer($ids)) { + return is_numeric($ids) + ? array($ids) + : $this->_fromSequenceString($ids); + } + + return array(); + } + + /** + * Create an IMAP message sequence string from a list of indices. + * + * Index Format: range_start:range_end,uid,uid2,... + * + * @param boolean $sort Numerically sort the IDs before creating the + * range? + * + * @return string The IMAP message sequence string. + */ + protected function _toSequenceString($sort = true) + { + if (empty($this->_ids)) { + return ''; + } + + $in = $this->_ids; + + if ($sort && !$this->_sorted) { + $this->_sort($in); + } + + $first = $last = array_shift($in); + $i = count($in) - 1; + $out = array(); + + foreach ($in as $key => $val) { + if (($last + 1) == $val) { + $last = $val; + } + + if (($i == $key) || ($last != $val)) { + if ($last == $first) { + $out[] = $first; + if ($i == $key) { + $out[] = $val; + } + } else { + $out[] = $first . ':' . $last; + if (($i == $key) && ($last != $val)) { + $out[] = $val; + } + } + $first = $last = $val; + } + } + + return empty($out) + ? $first + : implode(',', $out); + } + + /** + * Parse an IMAP message sequence string into a list of indices. + * + * @see _toSequenceString() + * + * @param string $str The IMAP message sequence string. + * + * @return array An array of indices. + */ + protected function _fromSequenceString($str) + { + $ids = array(); + $str = trim($str); + + if (!strlen($str)) { + return $ids; + } + + $idarray = explode(',', $str); + + foreach ($idarray as $val) { + $range = explode(':', $val); + if (isset($range[1])) { + for ($i = min($range), $j = max($range); $i <= $j; ++$i) { + $ids[] = $i; + } + } else { + $ids[] = $val; + } + } + + return $ids; + } + + /* Countable methods. */ + + /** + */ + public function count() + { + return is_array($this->_ids) + ? count($this->_ids) + : 0; + } + + /* Iterator methods. */ + + /** + */ + public function current() + { + return is_array($this->_ids) + ? current($this->_ids) + : null; + } + + /** + */ + public function key() + { + return is_array($this->_ids) + ? key($this->_ids) + : null; + } + + /** + */ + public function next() + { + if (is_array($this->_ids)) { + next($this->_ids); + } + } + + /** + */ + public function rewind() + { + if (is_array($this->_ids)) { + reset($this->_ids); + } + } + + /** + */ + public function valid() + { + return !is_null($this->key()); + } + + /* Serializable methods. */ + + /** + */ + public function serialize() + { + $save = array(); + + if ($this->duplicates) { + $save['d'] = 1; + } + + if ($this->_sequence) { + $save['s'] = 1; + } + + if ($this->_sorted) { + $save['is'] = 1; + } + + switch ($this->_ids) { + case self::ALL: + $save['a'] = true; + break; + + case self::LARGEST: + $save['l'] = true; + break; + + case self::SEARCH_RES: + $save['sr'] = true; + break; + + default: + $save['i'] = strval($this); + break; + } + + return serialize($save); + } + + /** + */ + public function unserialize($data) + { + $save = @unserialize($data); + + $this->duplicates = !empty($save['d']); + $this->_sequence = !empty($save['s']); + $this->_sorted = !empty($save['is']); + + if (isset($save['a'])) { + $this->_ids = self::ALL; + } elseif (isset($save['l'])) { + $this->_ids = self::LARGEST; + } elseif (isset($save['sr'])) { + $this->_ids = self::SEARCH_RES; + } elseif (isset($save['i'])) { + $this->add($save['i']); + } + } + +} diff --git a/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Ids/Map.php b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Ids/Map.php new file mode 100644 index 00000000..85a2ec07 --- /dev/null +++ b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Ids/Map.php @@ -0,0 +1,242 @@ + + * @category Horde + * @copyright 2012-2017 Horde LLC + * @license http://www.horde.org/licenses/lgpl21 LGPL 2.1 + * @package Imap_Client + * @since 2.1.0 + * + * @property-read array $map The raw ID mapping data. + * @property-read Horde_Imap_Client_Ids $seq The sorted sequence values. + * @property-read Horde_Imap_Client_Ids $uids The sorted UIDs. + */ +class Horde_Imap_Client_Ids_Map implements Countable, IteratorAggregate, Serializable +{ + /** + * Sequence -> UID mapping. + * + * @var array + */ + protected $_ids = array(); + + /** + * Is the array sorted? + * + * @var boolean + */ + protected $_sorted = true; + + /** + * Constructor. + * + * @param array $ids Array of sequence -> UID mapping. + */ + public function __construct(array $ids = array()) + { + $this->update($ids); + } + + /** + */ + public function __get($name) + { + switch ($name) { + case 'map': + return $this->_ids; + + case 'seq': + $this->sort(); + return new Horde_Imap_Client_Ids(array_keys($this->_ids), true); + + case 'uids': + $this->sort(); + return new Horde_Imap_Client_Ids($this->_ids); + } + } + + /** + * Updates the mapping. + * + * @param array $ids Array of sequence -> UID mapping. + * + * @return boolean True if the mapping changed. + */ + public function update($ids) + { + if (empty($ids)) { + return false; + } elseif (empty($this->_ids)) { + $this->_ids = $ids; + $change = true; + } else { + $change = false; + foreach ($ids as $k => $v) { + if (!isset($this->_ids[$k]) || ($this->_ids[$k] != $v)) { + $this->_ids[$k] = $v; + $change = true; + } + } + } + + if ($change) { + $this->_sorted = false; + } + + return $change; + } + + /** + * Create a Sequence <-> UID lookup table. + * + * @param Horde_Imap_Client_Ids $ids IDs to lookup. + * + * @return array Keys are sequence numbers, values are UIDs. + */ + public function lookup(Horde_Imap_Client_Ids $ids) + { + if ($ids->all) { + return $this->_ids; + } elseif ($ids->sequence) { + return array_intersect_key($this->_ids, array_flip($ids->ids)); + } + + return array_intersect($this->_ids, $ids->ids); + } + + /** + * Removes messages from the ID mapping. + * + * @param Horde_Imap_Client_Ids $ids IDs to remove. + */ + public function remove(Horde_Imap_Client_Ids $ids) + { + /* For sequence numbers, we need to reindex anytime we have an index + * that appears equal to or after a previously seen index. If an IMAP + * server is smart, it will expunge in reverse order instead. */ + if ($ids->sequence) { + $remove = $ids->ids; + } else { + $ids->sort(); + $remove = array_reverse(array_keys($this->lookup($ids))); + } + + if (empty($remove)) { + return; + } + + $this->sort(); + + if (count($remove) == count($this->_ids) && + !array_diff($remove, array_keys($this->_ids))) { + $this->_ids = array(); + return; + } + + /* Find the minimum sequence number to remove. We know entries before + * this are untouched so no need to process them multiple times. */ + $first = min($remove); + $edit = $newids = array(); + foreach (array_keys($this->_ids) as $i => $seq) { + if ($seq >= $first) { + $i += (($seq == $first) ? 0 : 1); + $newids = array_slice($this->_ids, 0, $i, true); + $edit = array_slice($this->_ids, $i + (($seq == $first) ? 0 : 1), null, true); + break; + } + } + + if (!empty($edit)) { + foreach ($remove as $val) { + $found = false; + $tmp = array(); + + foreach (array_keys($edit) as $i => $seq) { + if ($found) { + $tmp[$seq - 1] = $edit[$seq]; + } elseif ($seq >= $val) { + $tmp = array_slice($edit, 0, ($seq == $val) ? $i : $i + 1, true); + $found = true; + } + } + + $edit = $tmp; + } + } + + $this->_ids = $newids + $edit; + } + + /** + * Sort the map. + */ + public function sort() + { + if (!$this->_sorted) { + ksort($this->_ids, SORT_NUMERIC); + $this->_sorted = true; + } + } + + /* Countable methods. */ + + /** + */ + public function count() + { + return count($this->_ids); + } + + /* IteratorAggregate method. */ + + /** + */ + public function getIterator() + { + return new ArrayIterator($this->_ids); + } + + /* Serializable methods. */ + + /** + */ + public function serialize() + { + /* Sort before storing; provides more compressible representation. */ + $this->sort(); + + return json_encode(array( + strval(new Horde_Imap_Client_Ids(array_keys($this->_ids))), + strval(new Horde_Imap_Client_Ids(array_values($this->_ids))) + )); + } + + /** + */ + public function unserialize($data) + { + $data = json_decode($data, true); + + $keys = new Horde_Imap_Client_Ids($data[0]); + $vals = new Horde_Imap_Client_Ids($data[1]); + $this->_ids = array_combine($keys->ids, $vals->ids); + + /* Guaranteed to be sorted if unserializing. */ + $this->_sorted = true; + } + +} diff --git a/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Ids/Pop3.php b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Ids/Pop3.php new file mode 100644 index 00000000..a3ff9cb1 --- /dev/null +++ b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Ids/Pop3.php @@ -0,0 +1,64 @@ + + * @category Horde + * @copyright 2011-2017 Horde LLC + * @license http://www.horde.org/licenses/lgpl21 LGPL 2.1 + * @package Imap_Client + */ +class Horde_Imap_Client_Ids_Pop3 extends Horde_Imap_Client_Ids +{ + /** + */ + protected function _sort(&$ids) + { + /* There is no guarantee of POP3 UIDL order - IDs need to be unique, + * but there is no requirement they need be incrementing. RFC + * 1939[7] */ + } + + /** + * Create a POP3 message sequence string. + * + * Index Format: UID1[SPACE]UID2... + * + * @param boolean $sort Not used in this class. + * + * @return string The POP3 message sequence string. + */ + protected function _toSequenceString($sort = true) + { + /* $sort is ignored - see _sort(). */ + + /* Use space as delimiter as it is the only printable ASCII character + * that is not allowed as part of the UID (RFC 1939 [7]). */ + return implode(' ', count($this->_ids) > 25000 ? array_unique($this->_ids) : array_keys(array_flip($this->_ids))); + } + + /** + * Parse a POP3 message sequence string into a list of indices. + * + * @param string $str The POP3 message sequence string. + * + * @return array An array of UIDs. + */ + protected function _fromSequenceString($str) + { + return explode(' ', trim($str)); + } + +} diff --git a/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Interaction/Client.php b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Interaction/Client.php new file mode 100644 index 00000000..8a585ada --- /dev/null +++ b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Interaction/Client.php @@ -0,0 +1,61 @@ + + * @category Horde + * @copyright 2012-2016 Horde LLC + * @deprecated + * @license http://www.horde.org/licenses/lgpl21 LGPL 2.1 + * @package Imap_Client + */ +class Horde_Imap_Client_Interaction_Client extends Horde_Imap_Client_Data_Format_List +{ + /** + * The command tag. + * + * @var string + */ + public $tag; + + /** + * Constructor. + * + * @param string $tag The tag to use. If not set, will be automatically + * generated. + */ + public function __construct($tag = null) + { + $this->tag = is_null($tag) + ? substr(strval(new Horde_Support_Randomid()), 0, 10) + : strval($tag); + + parent::__construct($this->tag); + } + + /** + * Get the command. + * + * @return string The command. + */ + public function getCommand() + { + return isset($this->_data[1]) + ? $this->_data[1] + : null; + } + +} diff --git a/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Interaction/Command.php b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Interaction/Command.php new file mode 100644 index 00000000..93628d36 --- /dev/null +++ b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Interaction/Command.php @@ -0,0 +1,184 @@ + + * @category Horde + * @copyright 2012-2017 Horde LLC + * @license http://www.horde.org/licenses/lgpl21 LGPL 2.1 + * @package Imap_Client + * @since 2.10.0 + * + * @property-read boolean $continuation True if the command requires a server + * continuation response. + */ +class Horde_Imap_Client_Interaction_Command +extends Horde_Imap_Client_Data_Format_List +{ + /** + * Debug string(s) to use instead of command text. + * + * Multiple entries refer to the various steps in a continuation command. + * + * @var array + */ + public $debug = array(); + + /** + * Use LITERAL+ if available + * + * @var boolean + */ + public $literalplus = true; + + /** + * Are literal8's available? + * + * @var boolean + */ + public $literal8 = false; + + /** + * A callback to run on error. + * + * If callback returns true, the command will be treated as successful. + * + * @since 2.24.0 + * + * @var callback + */ + public $on_error = null; + + /** + * A callback to run on success. + * + * @since 2.28.0 + * + * @var callback + */ + public $on_success = null; + + /** + * Pipeline object associated with this command. + * + * @since 2.28.0 + * + * @var Horde_Imap_Client_Interaction_Pipeline + */ + public $pipeline; + + /** + * Server response. + * + * @var Horde_Imap_Client_Interaction_Server + */ + public $response; + + /** + * The command tag. + * + * @var string + */ + public $tag; + + /** + * Command timer. + * + * @var Horde_Support_Timer + */ + protected $_timer; + + /** + * Constructor. + * + * @param string $cmd The IMAP command. + * @param string $tag The tag to use. If not set, will be automatically + * generated. + */ + public function __construct($cmd, $tag = null) + { + $this->tag = is_null($tag) + ? substr(new Horde_Support_Randomid(), 0, 10) + : strval($tag); + + parent::__construct($this->tag); + + $this->add($cmd); + } + + /** + */ + public function __get($name) + { + switch ($name) { + case 'continuation': + return $this->_continuationCheck($this); + } + } + + /** + * Get the command. + * + * @return string The command. + */ + public function getCommand() + { + return $this->_data[1]; + } + + /** + * Start the command timer. + */ + public function startTimer() + { + $this->_timer = new Horde_Support_Timer(); + $this->_timer->push(); + } + + /** + * Return the timer data. + * + * @return mixed Null if timer wasn't started, or a float containing + * elapsed command time. + */ + public function getTimer() + { + return $this->_timer + ? round($this->_timer->pop(), 4) + : null; + } + + /** + * Recursive check for continuation functions. + */ + protected function _continuationCheck($list) + { + foreach ($list as $val) { + if (($val instanceof Horde_Imap_Client_Interaction_Command_Continuation) || + (($val instanceof Horde_Imap_Client_Data_Format_String) && + $val->literal())) { + return true; + } + + if (($val instanceof Horde_Imap_Client_Data_Format_List) && + $this->_continuationCheck($val)) { + return true; + } + } + + return false; + } + +} diff --git a/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Interaction/Command/Continuation.php b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Interaction/Command/Continuation.php new file mode 100644 index 00000000..061834ed --- /dev/null +++ b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Interaction/Command/Continuation.php @@ -0,0 +1,74 @@ + + * @category Horde + * @copyright 2013-2017 Horde LLC + * @license http://www.horde.org/licenses/lgpl21 LGPL 2.1 + * @package Imap_Client + * @since 2.10.0 + */ +class Horde_Imap_Client_Interaction_Command_Continuation +{ + /** + * Is this an optional continuation request? + * + * @since 2.13.0 + * @var boolean + */ + public $optional = false; + + /** + * Closure function to run after continuation response. + * + * @var Closure + */ + protected $_closure; + + /** + * Constructor. + * + * @param Closure $closure A function to run after the continuation + * response is received. It receives one + * argument - a Continuation object - and should + * return a list of arguments to send to the + * server (via a + * Horde_Imap_Client_Data_Format_List object). + */ + public function __construct($closure) + { + $this->_closure = $closure; + } + + /** + * Calls the closure object. + * + * @param Horde_Imap_Client_Interaction_Server_Continuation $ob Continuation + * object. + * + * @return Horde_Imap_Client_Data_Format_List Further commands to issue + * to the server. + */ + public function getCommands( + Horde_Imap_Client_Interaction_Server_Continuation $ob + ) + { + $closure = $this->_closure; + return $closure($ob); + } + +} diff --git a/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Interaction/Pipeline.php b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Interaction/Pipeline.php new file mode 100644 index 00000000..50d2e038 --- /dev/null +++ b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Interaction/Pipeline.php @@ -0,0 +1,160 @@ + + * @category Horde + * @copyright 2013-2017 Horde LLC + * @license http://www.horde.org/licenses/lgpl21 LGPL 2.1 + * @package Imap_Client + * @since 2.10.0 + * + * @property-read boolean $finished True if all commands have finished. + */ +class Horde_Imap_Client_Interaction_Pipeline implements Countable, IteratorAggregate +{ + /** + * Data storage from server responses. + * + * @var array + */ + public $data = array( + 'modseqs' => array(), + 'modseqs_nouid' => array() + ); + + /** + * Fetch results. + * + * @var Horde_Imap_Client_Fetch_Results + */ + public $fetch; + + /** + * The list of commands. + * + * @var array + */ + protected $_commands = array(); + + /** + * The list of commands to complete. + * + * @var array + */ + protected $_todo = array(); + + /** + * Constructor. + * + * @param Horde_Imap_Client_Fetch_Results $fetch Fetch results object. + */ + public function __construct(Horde_Imap_Client_Fetch_Results $fetch) + { + $this->fetch = $fetch; + } + + /** + */ + public function __get($name) + { + switch ($name) { + case 'finished': + return empty($this->_todo); + } + } + + /** + * Add a command to the pipeline. + * + * @param Horde_Imap_Client_Interaction_Command $cmd Command object. + * @param boolean $top Add command to top + * of queue? + */ + public function add(Horde_Imap_Client_Interaction_Command $cmd, + $top = false) + { + if ($top) { + // This won't re-index keys, which may be numerical. + $this->_commands = array($cmd->tag => $cmd) + $this->_commands; + } else { + $this->_commands[$cmd->tag] = $cmd; + } + $this->_todo[$cmd->tag] = true; + } + + /** + * Mark a command as completed. + * + * @param Horde_Imap_Client_Interaction_Server_Tagged $resp Tagged server + * response. + * + * @return Horde_Imap_Client_Interaction_Command Command that was + * completed. Returns null + * if tagged response + * is not contained in this + * pipeline object. + */ + public function complete(Horde_Imap_Client_Interaction_Server_Tagged $resp) + { + if (isset($this->_commands[$resp->tag])) { + $cmd = $this->_commands[$resp->tag]; + $cmd->response = $resp; + unset($this->_todo[$resp->tag]); + } else { + /* This can be reached if a previous pipeline action was aborted, + * e.g. via an Exception. */ + $cmd = null; + } + + return $cmd; + } + + /** + * Return the command for a given tag. + * + * @param string $tag The command tag. + * + * @return Horde_Imap_Client_Interaction_Command A command object (or + * null if the tag does + * not exist). + */ + public function getCmd($tag) + { + return isset($this->_commands[$tag]) + ? $this->_commands[$tag] + : null; + } + + /* Countable methods. */ + + /** + */ + public function count() + { + return count($this->_commands); + } + + /* IteratorAggregate methods. */ + + /** + */ + public function getIterator() + { + return new ArrayIterator($this->_commands); + } + +} diff --git a/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Interaction/Server.php b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Interaction/Server.php new file mode 100644 index 00000000..28962a6b --- /dev/null +++ b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Interaction/Server.php @@ -0,0 +1,144 @@ + + * @category Horde + * @copyright 2012-2017 Horde LLC + * @license http://www.horde.org/licenses/lgpl21 LGPL 2.1 + * @package Imap_Client + */ +class Horde_Imap_Client_Interaction_Server +{ + /** + * Response codes (RFC 3501 [7.1]). + */ + const BAD = 1; + const BYE = 2; + const NO = 3; + const OK = 4; + const PREAUTH = 5; + + /** + * Check for status response? + * + * @var boolean + */ + protected $_checkStatus = true; + + /** + * Response code (RFC 3501 [7.1]). Properties: + * - code: (string) Response code. + * - data: (array) Data associated with response. + * + * @var object + */ + public $responseCode = null; + + /** + * Status response from the server. + * + * @var string + */ + public $status = null; + + /** + * IMAP server data. + * + * @var Horde_Imap_Client_Tokenize + */ + public $token; + + /** + * Auto-scan an incoming line to determine the response type. + * + * @param Horde_Imap_Client_Tokenize $t Tokenized data returned from the + * server. + * + * @return Horde_Imap_Client_Interaction_Server A server response object. + */ + public static function create(Horde_Imap_Client_Tokenize $t) + { + $t->rewind(); + $tag = $t->next(); + $t->next(); + + switch ($tag) { + case '+': + return new Horde_Imap_Client_Interaction_Server_Continuation($t); + + case '*': + return new Horde_Imap_Client_Interaction_Server_Untagged($t); + + default: + return new Horde_Imap_Client_Interaction_Server_Tagged($t, $tag); + } + } + + /** + * Constructor. + * + * @param Horde_Imap_Client_Tokenize $token Tokenized data returned from + * the server. + */ + public function __construct(Horde_Imap_Client_Tokenize $token) + { + $this->token = $token; + + /* Check for response status. */ + $status = $token->current(); + $valid = array('BAD', 'BYE', 'NO', 'OK', 'PREAUTH'); + + if (in_array($status, $valid)) { + $this->status = constant(__CLASS__ . '::' . $status); + $resp_text = $token->next(); + + /* Check for response code. Only occurs if there is a response + * status. */ + if (is_string($resp_text) && ($resp_text[0] === '[')) { + $resp = new stdClass; + $resp->data = array(); + + if ($resp_text[strlen($resp_text) - 1] === ']') { + $resp->code = substr($resp_text, 1, -1); + } else { + $resp->code = substr($resp_text, 1); + + while (($elt = $token->next()) !== false) { + if (is_string($elt) && $elt[strlen($elt) - 1] === ']') { + $resp->data[] = substr($elt, 0, -1); + break; + } + $resp->data[] = is_string($elt) + ? $elt + : $token->flushIterator(); + } + } + + $token->next(); + $this->responseCode = $resp; + } + } + } + + /** + */ + public function __toString() + { + return strval($this->token); + } + +} diff --git a/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Interaction/Server/Continuation.php b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Interaction/Server/Continuation.php new file mode 100644 index 00000000..1f27dabd --- /dev/null +++ b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Interaction/Server/Continuation.php @@ -0,0 +1,25 @@ + + * @category Horde + * @copyright 2012-2017 Horde LLC + * @license http://www.horde.org/licenses/lgpl21 LGPL 2.1 + * @package Imap_Client + */ +class Horde_Imap_Client_Interaction_Server_Continuation extends Horde_Imap_Client_Interaction_Server +{ +} diff --git a/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Interaction/Server/Tagged.php b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Interaction/Server/Tagged.php new file mode 100644 index 00000000..ef90fc2f --- /dev/null +++ b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Interaction/Server/Tagged.php @@ -0,0 +1,49 @@ + + * @category Horde + * @copyright 2012-2017 Horde LLC + * @license http://www.horde.org/licenses/lgpl21 LGPL 2.1 + * @package Imap_Client + */ +class Horde_Imap_Client_Interaction_Server_Tagged +extends Horde_Imap_Client_Interaction_Server +{ + /** + * Tag. + * + * @var string + */ + public $tag; + + /** + * @param string $tag Response tag. + */ + public function __construct(Horde_Imap_Client_Tokenize $token, $tag) + { + $this->tag = $tag; + + parent::__construct($token); + + if (is_null($this->status)) { + throw new Horde_Imap_Client_Exception( + Horde_Imap_Client_Translation::r("Bad tagged response.") + ); + } + } + +} diff --git a/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Interaction/Server/Untagged.php b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Interaction/Server/Untagged.php new file mode 100644 index 00000000..91d51882 --- /dev/null +++ b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Interaction/Server/Untagged.php @@ -0,0 +1,25 @@ + + * @category Horde + * @copyright 2012-2017 Horde LLC + * @license http://www.horde.org/licenses/lgpl21 LGPL 2.1 + * @package Imap_Client + */ +class Horde_Imap_Client_Interaction_Server_Untagged extends Horde_Imap_Client_Interaction_Server +{ +} diff --git a/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Mailbox.php b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Mailbox.php new file mode 100644 index 00000000..2d10e141 --- /dev/null +++ b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Mailbox.php @@ -0,0 +1,147 @@ + + * @category Horde + * @copyright 2011-2017 Horde LLC + * @license http://www.horde.org/licenses/lgpl21 LGPL 2.1 + * @package Imap_Client + * + * @property-read string $list_escape Escapes mailbox for use in LIST + * command (UTF-8). + * @property-read string $utf7imap Mailbox in UTF7-IMAP. + * @property-read string $utf8 Mailbox in UTF-8. + */ +class Horde_Imap_Client_Mailbox implements Serializable +{ + /** + * UTF7-IMAP representation of mailbox. + * If boolean true, it is identical to UTF-8 representation. + * + * @var mixed + */ + protected $_utf7imap; + + /** + * UTF8 representation of mailbox. + * + * @var string + */ + protected $_utf8; + + /** + * Shortcut to obtaining mailbox object. + * + * @param string $mbox The mailbox name. + * @param boolean $utf7imap Is mailbox UTF7-IMAP encoded? Otherwise, + * mailbox is assumed to be UTF-8. + * + * @return Horde_Imap_Client_Mailbox A mailbox object. + */ + public static function get($mbox, $utf7imap = false) + { + return ($mbox instanceof Horde_Imap_Client_Mailbox) + ? $mbox + : new Horde_Imap_Client_Mailbox($mbox, $utf7imap); + } + + /** + * Constructor. + * + * @param string $mbox The mailbox name. + * @param boolean $utf7imap Is mailbox UTF7-IMAP encoded (true). + * Otherwise, mailbox is assumed to be UTF-8 + * encoded. + */ + public function __construct($mbox, $utf7imap = false) + { + if (strcasecmp($mbox, 'INBOX') === 0) { + $mbox = 'INBOX'; + } + + if ($utf7imap) { + $this->_utf7imap = $mbox; + } else { + $this->_utf8 = $mbox; + } + } + + /** + */ + public function __get($name) + { + switch ($name) { + case 'list_escape': + return preg_replace("/\*+/", '%', $this->utf8); + + case 'utf7imap': + if (!isset($this->_utf7imap)) { + $n = Horde_Imap_Client_Utf7imap::Utf8ToUtf7Imap($this->_utf8); + $this->_utf7imap = ($n == $this->_utf8) + ? true + : $n; + } + + return ($this->_utf7imap === true) + ? $this->_utf8 + : $this->_utf7imap; + + case 'utf8': + if (!isset($this->_utf8)) { + $this->_utf8 = Horde_Imap_Client_Utf7imap::Utf7ImapToUtf8($this->_utf7imap); + if ($this->_utf8 == $this->_utf7imap) { + $this->_utf7imap = true; + } + } + return (string)$this->_utf8; + } + } + + /** + */ + public function __toString() + { + return $this->utf8; + } + + /** + * Compares this mailbox to another mailbox string. + * + * @return boolean True if the items are equal. + */ + public function equals($mbox) + { + return ($this->utf8 == $mbox); + } + + /* Serializable methods. */ + + /** + */ + public function serialize() + { + return json_encode(array($this->_utf7imap, $this->_utf8)); + } + + /** + */ + public function unserialize($data) + { + list($this->_utf7imap, $this->_utf8) = json_decode($data, true); + } + +} diff --git a/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Mailbox/List.php b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Mailbox/List.php new file mode 100644 index 00000000..2df2357d --- /dev/null +++ b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Mailbox/List.php @@ -0,0 +1,158 @@ + + * @category Horde + * @copyright 2004-2017 Horde LLC + * @license http://www.horde.org/licenses/lgpl21 LGPL 2.1 + * @package Imap_Client + */ +class Horde_Imap_Client_Mailbox_List implements Countable, IteratorAggregate +{ + /** + * The delimiter character to use. + * + * @var string + */ + protected $_delimiter; + + /** + * Mailbox list. + * + * @var array + */ + protected $_mboxes = array(); + + /** + * Should we sort with INBOX at the front of the list? + * + * @var boolean + */ + protected $_sortinbox; + + /** + * Constructor. + * + * @param mixed $mboxes A mailbox or list of mailboxes. + */ + public function __construct($mboxes) + { + $this->_mboxes = is_array($mboxes) + ? $mboxes + : array($mboxes); + } + + /** + * Sort the list of mailboxes. + * + * @param array $opts Options: + * - delimiter: (string) The delimiter to use. + * DEFAULT: '.' + * - inbox: (boolean) Always put INBOX at the head of the list? + * DEFAULT: Yes + * - noupdate: (boolean) Do not update the object's mailbox list? + * DEFAULT: true + * + * @return array List of sorted mailboxes (index association is kept). + */ + public function sort(array $opts = array()) + { + $this->_delimiter = isset($opts['delimiter']) + ? $opts['delimiter'] + : '.'; + $this->_sortinbox = (!isset($opts['inbox']) || !empty($opts['inbox'])); + + if (empty($opts['noupdate'])) { + $mboxes = &$this->_mboxes; + } else { + $mboxes = $this->_mboxes; + } + + uasort($mboxes, array($this, '_mboxCompare')); + + return $mboxes; + } + + /** + * Hierarchical folder sorting function (used with usort()). + * + * @param string $a Comparison item 1. + * @param string $b Comparison item 2. + * + * @return integer See usort(). + */ + final protected function _mboxCompare($a, $b) + { + /* Always return INBOX as "smaller". */ + if ($this->_sortinbox) { + if (strcasecmp($a, 'INBOX') === 0) { + return -1; + } elseif (strcasecmp($b, 'INBOX') === 0) { + return 1; + } + } + + $a_parts = explode($this->_delimiter, $a); + $b_parts = explode($this->_delimiter, $b); + + $a_count = count($a_parts); + $b_count = count($b_parts); + + for ($i = 0, $iMax = min($a_count, $b_count); $i < $iMax; ++$i) { + if ($a_parts[$i] != $b_parts[$i]) { + /* If only one of the folders is under INBOX, return it as + * "smaller". */ + if ($this->_sortinbox && ($i === 0)) { + $a_base = (strcasecmp($a_parts[0], 'INBOX') === 0); + $b_base = (strcasecmp($b_parts[0], 'INBOX') === 0); + if ($a_base && !$b_base) { + return -1; + } elseif (!$a_base && $b_base) { + return 1; + } + } + + $cmp = strnatcasecmp($a_parts[$i], $b_parts[$i]); + return ($cmp === 0) + ? strcmp($a_parts[$i], $b_parts[$i]) + : $cmp; + } elseif ($a_parts[$i] !== $b_parts[$i]) { + return strlen($a_parts[$i]) - strlen($b_parts[$i]); + } + } + + return ($a_count - $b_count); + } + + /* Countable methods. */ + + /** + */ + public function count() + { + return count($this->_mboxes); + } + + /* IteratorAggregate methods. */ + + /** + */ + public function getIterator() + { + return new ArrayIterator($this->_mboxes); + } + +} diff --git a/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Namespace/List.php b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Namespace/List.php new file mode 100644 index 00000000..4ace338e --- /dev/null +++ b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Namespace/List.php @@ -0,0 +1,130 @@ + + * @category Horde + * @copyright 2014-2017 Horde LLC + * @license http://www.horde.org/licenses/lgpl21 LGPL 2.1 + * @package Imap_Client + * @since 2.21.0 + */ +class Horde_Imap_Client_Namespace_List +implements ArrayAccess, Countable, IteratorAggregate +{ + /** + * The list of namespace objects. + * + * @var array + */ + protected $_ns = array(); + + /** + * Constructor. + * + * @param array $ns The list of namespace objects. + */ + public function __construct($ns = array()) + { + foreach ($ns as $val) { + $this->_ns[strval($val)] = $val; + } + } + + /** + * Get namespace info for a full mailbox path. + * + * @param string $mbox The mailbox path. + * @param boolean $personal If true, will return the empty namespace only + * if it is a personal namespace. + * + * @return mixed The Horde_Imap_Client_Data_Namespace object for the + * mailbox path, or null if the path doesn't exist. + */ + public function getNamespace($mbox, $personal = false) + { + $mbox = strval($mbox); + + if ($ns = $this[$mbox]) { + return $ns; + } + + foreach ($this->_ns as $val) { + $mbox = $mbox . $val->delimiter; + if (strlen($val->name) && (strpos($mbox, $val->name) === 0)) { + return $val; + } + } + + return (($ns = $this['']) && (!$personal || ($ns->type === $ns::NS_PERSONAL))) + ? $ns + : null; + } + + /* ArrayAccess methods. */ + + /** + */ + public function offsetExists($offset) + { + return isset($this->_ns[strval($offset)]); + } + + /** + */ + public function offsetGet($offset) + { + $offset = strval($offset); + + return isset($this->_ns[$offset]) + ? $this->_ns[$offset] + : null; + } + + /** + */ + public function offsetSet($offset, $value) + { + if ($value instanceof Horde_Imap_Client_Data_Namespace) { + $this->_ns[strval($value)] = $value; + } + } + + /** + */ + public function offsetUnset($offset) + { + unset($this->_ns[strval($offset)]); + } + + /* Countable methods. */ + + /** + */ + public function count() + { + return count($this->_ns); + } + + /* IteratorAggregate methods. */ + + /** + */ + public function getIterator() + { + return new ArrayIterator($this->_ns); + } + +} diff --git a/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Password/Xoauth2.php b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Password/Xoauth2.php new file mode 100644 index 00000000..f608e208 --- /dev/null +++ b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Password/Xoauth2.php @@ -0,0 +1,71 @@ + + * @category Horde + * @copyright 2013-2017 Horde LLC + * @license http://www.horde.org/licenses/lgpl21 LGPL 2.1 + * @package Imap_Client + * @since 2.16.0 + */ +class Horde_Imap_Client_Password_Xoauth2 +implements Horde_Imap_Client_Base_Password +{ + /** + * Access token. + * + * @var string + */ + public $access_token; + + /** + * Username. + * + * @var string + */ + public $username; + + /** + * Constructor. + * + * @param string $username The username. + * @param string $access_token The access token. + */ + public function __construct($username, $access_token) + { + $this->username = $username; + $this->access_token = $access_token; + } + + /** + * Return the password to use for the server connection. + * + * @return string The password. + */ + public function getPassword() + { + // base64("user=" {User} "^Aauth=Bearer " {Access Token} "^A^A") + // ^A represents a Control+A (\001) + return base64_encode( + 'user=' . $this->username . "\1" . + 'auth=Bearer ' . $this->access_token . "\1\1" + ); + } + +} diff --git a/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Search/Query.php b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Search/Query.php new file mode 100644 index 00000000..c0474f1c --- /dev/null +++ b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Search/Query.php @@ -0,0 +1,904 @@ + + * @category Horde + * @copyright 2008-2017 Horde LLC + * @license http://www.horde.org/licenses/lgpl21 LGPL 2.1 + * @package Imap_Client + */ +class Horde_Imap_Client_Search_Query implements Serializable +{ + /** + * Serialized version. + */ + const VERSION = 3; + + /** + * Constants for dateSearch() + */ + const DATE_BEFORE = 'BEFORE'; + const DATE_ON = 'ON'; + const DATE_SINCE = 'SINCE'; + + /** + * Constants for intervalSearch() + */ + const INTERVAL_OLDER = 'OLDER'; + const INTERVAL_YOUNGER = 'YOUNGER'; + + /** + * The charset of the search strings. All text strings must be in + * this charset. By default, this is 'US-ASCII' (see RFC 3501 [6.4.4]). + * + * @var string + */ + protected $_charset = null; + + /** + * The list of search params. + * + * @var array + */ + protected $_search = array(); + + /** + * String representation: The IMAP search string. + */ + public function __toString() + { + try { + $res = $this->build(null); + return $res['query']->escape(); + } catch (Exception $e) { + return ''; + } + } + + /** + * Sets the charset of the search text. + * + * @param string $charset The charset to use for the search. + * @param boolean $convert Convert existing text values? + * + * @throws Horde_Imap_Client_Exception_SearchCharset + */ + public function charset($charset, $convert = true) + { + $oldcharset = $this->_charset; + $this->_charset = Horde_String::upper($charset); + + if (!$convert || ($oldcharset == $this->_charset)) { + return; + } + + foreach (array('and', 'or') as $item) { + if (isset($this->_search[$item])) { + foreach ($this->_search[$item] as &$val) { + $val->charset($charset, $convert); + } + } + } + + // Unset the reference to avoid corrupting $this->_search below. + unset($val); + + foreach (array('header', 'text') as $item) { + if (isset($this->_search[$item])) { + foreach ($this->_search[$item] as $key => $val) { + $new_val = Horde_String::convertCharset($val['text'], $oldcharset, $this->_charset); + if (Horde_String::convertCharset($new_val, $this->_charset, $oldcharset) != $val['text']) { + throw new Horde_Imap_Client_Exception_SearchCharset($this->_charset); + } + $this->_search[$item][$key]['text'] = $new_val; + } + } + } + } + + /** + * Builds an IMAP4rev1 compliant search string. + * + * @todo Change default of $exts to null. + * + * @param Horde_Imap_Client_Base $exts The server object this query will + * be run on (@since 2.24.0), a + * Horde_Imap_Client_Data_Capability + * object (@since 2.24.0), or the + * list of extensions present + * on the server (@deprecated). + * If null, all extensions are + * assumed to be available. + * + * @return array An array with these elements: + * - charset: (string) The charset of the search string. If null, no + * text strings appear in query. + * - exts: (array) The list of IMAP extensions used to create the + * string. + * - query: (Horde_Imap_Client_Data_Format_List) The IMAP search + * command. + * + * @throws Horde_Imap_Client_Data_Format_Exception + * @throws Horde_Imap_Client_Exception_NoSupportExtension + */ + public function build($exts = array()) + { + /* @todo: BC */ + if (is_array($exts)) { + $tmp = new Horde_Imap_Client_Data_Capability_Imap(); + foreach ($exts as $key => $val) { + $tmp->add($key, is_array($val) ? $val : null); + } + $exts = $tmp; + } elseif (!is_null($exts)) { + if ($exts instanceof Horde_Imap_Client_Base) { + $exts = $exts->capability; + } elseif (!($exts instanceof Horde_Imap_Client_Data_Capability)) { + throw new InvalidArgumentException('Incorrect $exts parameter'); + } + } + + $temp = array( + 'cmds' => new Horde_Imap_Client_Data_Format_List(), + 'exts' => $exts, + 'exts_used' => array() + ); + $cmds = &$temp['cmds']; + $charset = $charset_cname = null; + $default_search = true; + $exts_used = &$temp['exts_used']; + $ptr = &$this->_search; + + $charset_get = function ($c) use (&$charset, &$charset_cname) { + $charset = is_null($c) + ? 'US-ASCII' + : strval($c); + $charset_cname = ($charset === 'US-ASCII') + ? 'Horde_Imap_Client_Data_Format_Astring' + : 'Horde_Imap_Client_Data_Format_Astring_Nonascii'; + }; + $create_return = function ($charset, $exts_used, $cmds) { + return array( + 'charset' => $charset, + 'exts' => array_keys(array_flip($exts_used)), + 'query' => $cmds + ); + }; + + /* Do IDs check first. If there is an empty ID query (without a NOT + * qualifier), the rest of this query is irrelevant since we already + * know the search will return no results. */ + if (isset($ptr['ids'])) { + if (!count($ptr['ids']['ids']) && !$ptr['ids']['ids']->special) { + if (empty($ptr['ids']['not'])) { + /* This is a match on an empty list of IDs. We do need to + * process any OR queries that may exist, since they are + * independent of this result. */ + if (isset($ptr['or'])) { + $this->_buildAndOr( + 'OR', $ptr['or'], $charset, $exts_used, $cmds + ); + } + return $create_return($charset, $exts_used, $cmds); + } + + /* If reached here, this a NOT search of an empty list. We can + * safely discard this from the output. */ + } else { + $this->_addFuzzy(!empty($ptr['ids']['fuzzy']), $temp); + if (!empty($ptr['ids']['not'])) { + $cmds->add('NOT'); + } + if (!$ptr['ids']['ids']->sequence) { + $cmds->add('UID'); + } + $cmds->add(strval($ptr['ids']['ids'])); + } + } + + if (isset($ptr['new'])) { + $this->_addFuzzy(!empty($ptr['newfuzzy']), $temp); + if ($ptr['new']) { + $cmds->add('NEW'); + unset($ptr['flag']['UNSEEN']); + } else { + $cmds->add('OLD'); + } + unset($ptr['flag']['RECENT']); + } + + if (!empty($ptr['flag'])) { + foreach ($ptr['flag'] as $key => $val) { + $this->_addFuzzy(!empty($val['fuzzy']), $temp); + + $tmp = ''; + if (empty($val['set'])) { + // This is a 'NOT' search. All system flags but \Recent + // have 'UN' equivalents. + if ($key == 'RECENT') { + $cmds->add('NOT'); + } else { + $tmp = 'UN'; + } + } + + if ($val['type'] == 'keyword') { + $cmds->add(array( + $tmp . 'KEYWORD', + $key + )); + } else { + $cmds->add($tmp . $key); + } + } + } + + if (!empty($ptr['header'])) { + /* The list of 'system' headers that have a specific search + * query. */ + $systemheaders = array( + 'BCC', 'CC', 'FROM', 'SUBJECT', 'TO' + ); + + foreach ($ptr['header'] as $val) { + $this->_addFuzzy(!empty($val['fuzzy']), $temp); + + if (!empty($val['not'])) { + $cmds->add('NOT'); + } + + if (in_array($val['header'], $systemheaders)) { + $cmds->add($val['header']); + } else { + $cmds->add(array( + 'HEADER', + new Horde_Imap_Client_Data_Format_Astring($val['header']) + )); + } + + $charset_get($this->_charset); + $cmds->add( + new $charset_cname(isset($val['text']) ? $val['text'] : '') + ); + } + } + + if (!empty($ptr['text'])) { + foreach ($ptr['text'] as $val) { + $this->_addFuzzy(!empty($val['fuzzy']), $temp); + + if (!empty($val['not'])) { + $cmds->add('NOT'); + } + + $charset_get($this->_charset); + $cmds->add(array( + $val['type'], + new $charset_cname($val['text']) + )); + } + } + + if (!empty($ptr['size'])) { + foreach ($ptr['size'] as $key => $val) { + $this->_addFuzzy(!empty($val['fuzzy']), $temp); + if (!empty($val['not'])) { + $cmds->add('NOT'); + } + $cmds->add(array( + $key, + new Horde_Imap_Client_Data_Format_Number( + empty($val['size']) ? 0 : $val['size'] + ) + )); + } + } + + if (!empty($ptr['date'])) { + foreach ($ptr['date'] as $val) { + $this->_addFuzzy(!empty($val['fuzzy']), $temp); + + if (!empty($val['not'])) { + $cmds->add('NOT'); + } + + if (empty($val['header'])) { + $cmds->add($val['range']); + } else { + $cmds->add('SENT' . $val['range']); + } + $cmds->add($val['date']); + } + } + + if (!empty($ptr['within'])) { + if (is_null($exts) || $exts->query('WITHIN')) { + $exts_used[] = 'WITHIN'; + } + + foreach ($ptr['within'] as $key => $val) { + $this->_addFuzzy(!empty($val['fuzzy']), $temp); + if (!empty($val['not'])) { + $cmds->add('NOT'); + } + + if (is_null($exts) || $exts->query('WITHIN')) { + $cmds->add(array( + $key, + new Horde_Imap_Client_Data_Format_Number($val['interval']) + )); + } else { + // This workaround is only accurate to within 1 day, due + // to limitations with the IMAP4rev1 search commands. + $cmds->add(array( + ($key == self::INTERVAL_OLDER) ? self::DATE_BEFORE : self::DATE_SINCE, + new Horde_Imap_Client_Data_Format_Date('now -' . $val['interval'] . ' seconds') + )); + } + } + } + + if (!empty($ptr['modseq'])) { + if (!is_null($exts) && !$exts->query('CONDSTORE')) { + throw new Horde_Imap_Client_Exception_NoSupportExtension('CONDSTORE'); + } + + $exts_used[] = 'CONDSTORE'; + + $this->_addFuzzy(!empty($ptr['modseq']['fuzzy']), $temp); + + if (!empty($ptr['modseq']['not'])) { + $cmds->add('NOT'); + } + $cmds->add('MODSEQ'); + if (isset($ptr['modseq']['name'])) { + $cmds->add(array( + new Horde_Imap_Client_Data_Format_String($ptr['modseq']['name']), + $ptr['modseq']['type'] + )); + } + $cmds->add(new Horde_Imap_Client_Data_Format_Number($ptr['modseq']['value'])); + } + + if (isset($ptr['prevsearch'])) { + if (!is_null($exts) && !$exts->query('SEARCHRES')) { + throw new Horde_Imap_Client_Exception_NoSupportExtension('SEARCHRES'); + } + + $exts_used[] = 'SEARCHRES'; + + $this->_addFuzzy(!empty($ptr['prevsearchfuzzy']), $temp); + + if (!$ptr['prevsearch']) { + $cmds->add('NOT'); + } + $cmds->add('$'); + } + + // Add AND'ed queries + if (!empty($ptr['and'])) { + $default_search = $this->_buildAndOr( + 'AND', $ptr['and'], $charset, $exts_used, $cmds + ); + } + + // Add OR'ed queries + if (!empty($ptr['or'])) { + $default_search = $this->_buildAndOr( + 'OR', $ptr['or'], $charset, $exts_used, $cmds + ); + } + + // Default search is 'ALL' + if ($default_search && !count($cmds)) { + $cmds->add('ALL'); + } + + return $create_return($charset, $exts_used, $cmds); + } + + /** + * Builds the AND/OR query. + * + * @param string $type 'AND' or 'OR'. + * @param array $data Query data. + * @param string &$charset Search charset. + * @param array &$exts_used IMAP extensions used. + * @param Horde_Imap_Client_Data_Format_List &$cmds Command list. + * + * @return boolean True if query might return results. + */ + protected function _buildAndOr($type, $data, &$charset, &$exts_used, + &$cmds) + { + $results = false; + + foreach ($data as $val) { + $ret = $val->build(); + + /* Empty sub-query. */ + if (!count($ret['query'])) { + switch ($type) { + case 'AND': + /* Any empty sub-query means that the query MUST return + * no results. */ + $cmds = new Horde_Imap_Client_Data_Format_List(); + $exts_used = array(); + return false; + + case 'OR': + /* Skip this query. */ + continue 2; + } + } + + $results = true; + + if (!is_null($ret['charset']) && ($ret['charset'] != 'US-ASCII')) { + if (!is_null($charset) && + ($charset != 'US-ASCII') && + ($charset != $ret['charset'])) { + throw new InvalidArgumentException( + 'AND/OR queries must all have the same charset.' + ); + } + $charset = $ret['charset']; + } + + $exts_used = array_merge($exts_used, $ret['exts']); + + switch ($type) { + case 'AND': + $cmds->add($ret['query'], true); + break; + + case 'OR': + // First OR'd query + if (count($cmds)) { + $new_cmds = new Horde_Imap_Client_Data_Format_List(); + $new_cmds->add(array( + 'OR', + $ret['query'], + $cmds + )); + $cmds = $new_cmds; + } else { + $cmds = $ret['query']; + } + break; + } + } + + return $results; + } + + /** + * Adds fuzzy modifier to search keys. + * + * @param boolean $add Add the fuzzy modifier? + * @param array $temp Temporary build data. + * + * @throws Horde_Imap_Client_Exception_NoSupport_Extension + */ + protected function _addFuzzy($add, &$temp) + { + if ($add) { + if (!$temp['exts']->query('SEARCH', 'FUZZY')) { + throw new Horde_Imap_Client_Exception_NoSupportExtension('SEARCH=FUZZY'); + } + $temp['cmds']->add('FUZZY'); + $temp['exts_used'][] = 'SEARCH=FUZZY'; + } + } + + /** + * Search for a flag/keywords. + * + * @param string $name The flag or keyword name. + * @param boolean $set If true, search for messages that have the flag + * set. If false, search for messages that do not + * have the flag set. + * @param array $opts Additional options: + * - fuzzy: (boolean) If true, perform a fuzzy search. The IMAP server + * MUST support RFC 6203. + */ + public function flag($name, $set = true, array $opts = array()) + { + $name = Horde_String::upper(ltrim($name, '\\')); + if (!isset($this->_search['flag'])) { + $this->_search['flag'] = array(); + } + + /* The list of defined system flags (see RFC 3501 [2.3.2]). */ + $systemflags = array( + 'ANSWERED', 'DELETED', 'DRAFT', 'FLAGGED', 'RECENT', 'SEEN' + ); + + $this->_search['flag'][$name] = array_filter(array( + 'fuzzy' => !empty($opts['fuzzy']), + 'set' => $set, + 'type' => in_array($name, $systemflags) ? 'flag' : 'keyword' + )); + } + + /** + * Determines if flags are a part of the search. + * + * @return boolean True if search query involves flags. + */ + public function flagSearch() + { + return !empty($this->_search['flag']); + } + + /** + * Search for either new messages (messages that have the '\Recent' flag + * but not the '\Seen' flag) or old messages (messages that do not have + * the '\Recent' flag). If new messages are searched, this will clear + * any '\Recent' or '\Unseen' flag searches. If old messages are searched, + * this will clear any '\Recent' flag search. + * + * @param boolean $newmsgs If true, searches for new messages. Else, + * search for old messages. + * @param array $opts Additional options: + * - fuzzy: (boolean) If true, perform a fuzzy search. The IMAP server + * MUST support RFC 6203. + */ + public function newMsgs($newmsgs = true, array $opts = array()) + { + $this->_search['new'] = $newmsgs; + if (!empty($opts['fuzzy'])) { + $this->_search['newfuzzy'] = true; + } + } + + /** + * Search for text in the header of a message. + * + * @param string $header The header field. + * @param string $text The search text. + * @param boolean $not If true, do a 'NOT' search of $text. + * @param array $opts Additional options: + * - fuzzy: (boolean) If true, perform a fuzzy search. The IMAP server + * MUST support RFC 6203. + */ + public function headerText($header, $text, $not = false, + array $opts = array()) + { + if (!isset($this->_search['header'])) { + $this->_search['header'] = array(); + } + $this->_search['header'][] = array_filter(array( + 'fuzzy' => !empty($opts['fuzzy']), + 'header' => Horde_String::upper($header), + 'text' => $text, + 'not' => $not + )); + } + + /** + * Search for text in either the entire message, or just the body. + * + * @param string $text The search text. + * @param string $bodyonly If true, only search in the body of the + * message. If false, also search in the headers. + * @param boolean $not If true, do a 'NOT' search of $text. + * @param array $opts Additional options: + * - fuzzy: (boolean) If true, perform a fuzzy search. The IMAP server + * MUST support RFC 6203. + */ + public function text($text, $bodyonly = true, $not = false, + array $opts = array()) + { + if (!isset($this->_search['text'])) { + $this->_search['text'] = array(); + } + + $this->_search['text'][] = array_filter(array( + 'fuzzy' => !empty($opts['fuzzy']), + 'not' => $not, + 'text' => $text, + 'type' => $bodyonly ? 'BODY' : 'TEXT' + )); + } + + /** + * Search for messages smaller/larger than a certain size. + * + * @todo: Remove $not for 3.0 + * + * @param integer $size The size (in bytes). + * @param boolean $larger Search for messages larger than $size? + * @param boolean $not If true, do a 'NOT' search of $text. + * @param array $opts Additional options: + * - fuzzy: (boolean) If true, perform a fuzzy search. The IMAP server + * MUST support RFC 6203. + */ + public function size($size, $larger = false, $not = false, + array $opts = array()) + { + if (!isset($this->_search['size'])) { + $this->_search['size'] = array(); + } + $this->_search['size'][$larger ? 'LARGER' : 'SMALLER'] = array_filter(array( + 'fuzzy' => !empty($opts['fuzzy']), + 'not' => $not, + 'size' => (float)$size + )); + } + + /** + * Search for messages within a given UID range. Only one message range + * can be specified per query. + * + * @param Horde_Imap_Client_Ids $ids The list of UIDs to search. + * @param boolean $not If true, do a 'NOT' search of the + * UIDs. + * @param array $opts Additional options: + * - fuzzy: (boolean) If true, perform a fuzzy search. The IMAP server + * MUST support RFC 6203. + */ + public function ids(Horde_Imap_Client_Ids $ids, $not = false, + array $opts = array()) + { + $this->_search['ids'] = array_filter(array( + 'fuzzy' => !empty($opts['fuzzy']), + 'ids' => $ids, + 'not' => $not + )); + } + + /** + * Search for messages within a date range. + * + * @param mixed $date DateTime or Horde_Date object. + * @param string $range Either: + * - Horde_Imap_Client_Search_Query::DATE_BEFORE + * - Horde_Imap_Client_Search_Query::DATE_ON + * - Horde_Imap_Client_Search_Query::DATE_SINCE + * @param boolean $header If true, search using the date in the message + * headers. If false, search using the internal + * IMAP date (usually arrival time). + * @param boolean $not If true, do a 'NOT' search of the range. + * @param array $opts Additional options: + * - fuzzy: (boolean) If true, perform a fuzzy search. The IMAP server + * MUST support RFC 6203. + */ + public function dateSearch($date, $range, $header = true, $not = false, + array $opts = array()) + { + if (!isset($this->_search['date'])) { + $this->_search['date'] = array(); + } + + // We should really be storing the raw DateTime object as data, + // but all versions of the query object have converted at this stage. + $ob = new Horde_Imap_Client_Data_Format_Date($date); + + $this->_search['date'][] = array_filter(array( + 'date' => $ob->escape(), + 'fuzzy' => !empty($opts['fuzzy']), + 'header' => $header, + 'range' => $range, + 'not' => $not + )); + } + + /** + * Search for messages within a date and time range. + * + * @param mixed $date DateTime or Horde_Date object. + * @param string $range Either: + * - Horde_Imap_Client_Search_Query::DATE_BEFORE + * - Horde_Imap_Client_Search_Query::DATE_ON + * - Horde_Imap_Client_Search_Query::DATE_SINCE + * @param boolean $header If true, search using the date in the message + * headers. If false, search using the internal + * IMAP date (usually arrival time). + * @param boolean $not If true, do a 'NOT' search of the range. + * @param array $opts Additional options: + * - fuzzy: (boolean) If true, perform a fuzzy search. The IMAP server + * MUST support RFC 6203. + */ + public function dateTimeSearch($date, $range, $header = true, $not = false, + array $opts = array()) + { + if (!isset($this->_search['date'])) { + $this->_search['date'] = array(); + } + + // We should really be storing the raw DateTime object as data, + // but all versions of the query object have converted at this stage. + $ob = new Horde_Imap_Client_Data_Format_DateTime($date); + + $this->_search['date'][] = array_filter(array( + 'date' => $ob->escape(), + 'fuzzy' => !empty($opts['fuzzy']), + 'header' => $header, + 'range' => $range, + 'not' => $not + )); + } + + /** + * Search for messages within a given interval. Only one interval of each + * type can be specified per search query. If the IMAP server supports + * the WITHIN extension (RFC 5032), it will be used. Otherwise, the + * search query will be dynamically created using IMAP4rev1 search + * terms. + * + * @param integer $interval Seconds from the present. + * @param string $range Either: + * - Horde_Imap_Client_Search_Query::INTERVAL_OLDER + * - Horde_Imap_Client_Search_Query::INTERVAL_YOUNGER + * @param boolean $not If true, do a 'NOT' search. + * @param array $opts Additional options: + * - fuzzy: (boolean) If true, perform a fuzzy search. The IMAP server + * MUST support RFC 6203. + */ + public function intervalSearch($interval, $range, $not = false, + array $opts = array()) + { + if (!isset($this->_search['within'])) { + $this->_search['within'] = array(); + } + $this->_search['within'][$range] = array( + 'fuzzy' => !empty($opts['fuzzy']), + 'interval' => $interval, + 'not' => $not + ); + } + + /** + * AND queries - the contents of this query will be AND'ed (in its + * entirety) with the contents of EACH of the queries passed in. All + * AND'd queries must share the same charset as this query. + * + * @param mixed $queries A query, or an array of queries, to AND with the + * current query. + */ + public function andSearch($queries) + { + if (!isset($this->_search['and'])) { + $this->_search['and'] = array(); + } + + if ($queries instanceof Horde_Imap_Client_Search_Query) { + $queries = array($queries); + } + + $this->_search['and'] = array_merge($this->_search['and'], $queries); + } + + /** + * OR a query - the contents of this query will be OR'ed (in its entirety) + * with the contents of EACH of the queries passed in. All OR'd queries + * must share the same charset as this query. All contents of any single + * query will be AND'ed together. + * + * @param mixed $queries A query, or an array of queries, to OR with the + * current query. + */ + public function orSearch($queries) + { + if (!isset($this->_search['or'])) { + $this->_search['or'] = array(); + } + + if ($queries instanceof Horde_Imap_Client_Search_Query) { + $queries = array($queries); + } + + $this->_search['or'] = array_merge($this->_search['or'], $queries); + } + + /** + * Search for messages modified since a specific moment. The IMAP server + * must support the CONDSTORE extension (RFC 7162) for this query to be + * used. + * + * @param integer $value The mod-sequence value. + * @param string $name The entry-name string. + * @param string $type Either 'shared', 'priv', or 'all'. Defaults to + * 'all' + * @param boolean $not If true, do a 'NOT' search. + * @param array $opts Additional options: + * - fuzzy: (boolean) If true, perform a fuzzy search. The IMAP server + * MUST support RFC 6203. + */ + public function modseq($value, $name = null, $type = null, $not = false, + array $opts = array()) + { + if (!is_null($type)) { + $type = Horde_String::lower($type); + if (!in_array($type, array('shared', 'priv', 'all'))) { + $type = 'all'; + } + } + + $this->_search['modseq'] = array_filter(array( + 'fuzzy' => !empty($opts['fuzzy']), + 'name' => $name, + 'not' => $not, + 'type' => (!is_null($name) && is_null($type)) ? 'all' : $type, + 'value' => $value + )); + } + + /** + * Use the results from the previous SEARCH command. The IMAP server must + * support the SEARCHRES extension (RFC 5182) for this query to be used. + * + * @param boolean $not If true, don't match the previous query. + * @param array $opts Additional options: + * - fuzzy: (boolean) If true, perform a fuzzy search. The IMAP server + * MUST support RFC 6203. + */ + public function previousSearch($not = false, array $opts = array()) + { + $this->_search['prevsearch'] = $not; + if (!empty($opts['fuzzy'])) { + $this->_search['prevsearchfuzzy'] = true; + } + } + + /* Serializable methods. */ + + /** + * Serialization. + * + * @return string Serialized data. + */ + public function serialize() + { + $data = array( + // Serialized data ID. + self::VERSION, + $this->_search + ); + + if (!is_null($this->_charset)) { + $data[] = $this->_charset; + } + + return serialize($data); + } + + /** + * Unserialization. + * + * @param string $data Serialized data. + * + * @throws Exception + */ + 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->_search = $data[1]; + if (isset($data[2])) { + $this->_charset = $data[2]; + } + } + +} diff --git a/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Socket.php b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Socket.php new file mode 100644 index 00000000..12d6dfae --- /dev/null +++ b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Socket.php @@ -0,0 +1,5167 @@ + + * - RFC 2086/4314: ACL + * - RFC 2087: QUOTA + * - RFC 2088: LITERAL+ + * - RFC 2195: AUTH=CRAM-MD5 + * - RFC 2221: LOGIN-REFERRALS + * - RFC 2342: NAMESPACE + * - RFC 2595/4616: TLS & AUTH=PLAIN + * - RFC 2831: DIGEST-MD5 authentication mechanism (obsoleted by RFC 6331) + * - RFC 2971: ID + * - RFC 3348: CHILDREN + * - RFC 3501: IMAP4rev1 specification + * - RFC 3502: MULTIAPPEND + * - RFC 3516: BINARY + * - RFC 3691: UNSELECT + * - RFC 4315: UIDPLUS + * - RFC 4422: SASL Authentication (for DIGEST-MD5) + * - RFC 4466: Collected extensions (updates RFCs 2088, 3501, 3502, 3516) + * - RFC 4469/5550: CATENATE + * - RFC 4731: ESEARCH + * - RFC 4959: SASL-IR + * - RFC 5032: WITHIN + * - RFC 5161: ENABLE + * - RFC 5182: SEARCHRES + * - RFC 5255: LANGUAGE/I18NLEVEL + * - RFC 5256: THREAD/SORT + * - RFC 5258: LIST-EXTENDED + * - RFC 5267: ESORT; PARTIAL search return option + * - RFC 5464: METADATA + * - RFC 5530: IMAP Response Codes + * - RFC 5802: AUTH=SCRAM-SHA-1 + * - RFC 5819: LIST-STATUS + * - RFC 5957: SORT=DISPLAY + * - RFC 6154: SPECIAL-USE/CREATE-SPECIAL-USE + * - RFC 6203: SEARCH=FUZZY + * - RFC 6851: MOVE + * - RFC 6855: UTF8=ACCEPT/UTF8=ONLY + * - RFC 6858: DOWNGRADED response code + * - RFC 7162: CONDSTORE/QRESYNC + *
+ * + * Implements the following non-RFC extensions: + *
+ *   - draft-ietf-morg-inthread-01: THREAD=REFS
+ *   - draft-daboo-imap-annotatemore-07: ANNOTATEMORE
+ *   - draft-daboo-imap-annotatemore-08: ANNOTATEMORE2
+ *   - XIMAPPROXY
+ *     Requires imapproxy v1.2.7-rc1 or later
+ *     See https://squirrelmail.svn.sourceforge.net/svnroot/squirrelmail/trunk/imap_proxy/README
+ *   - AUTH=XOAUTH2
+ *     https://developers.google.com/gmail/xoauth2_protocol
+ * 
+ * + * TODO (or not necessary?): + *
+ *   - RFC 2177: IDLE
+ *   - RFC 2193: MAILBOX-REFERRALS
+ *   - RFC 4467/5092/5524/5550/5593: URLAUTH, URLAUTH=BINARY, URL-PARTIAL
+ *   - RFC 4978: COMPRESS=DEFLATE
+ *     See: http://bugs.php.net/bug.php?id=48725
+ *   - RFC 5257: ANNOTATE (Experimental)
+ *   - RFC 5259: CONVERT
+ *   - RFC 5267: CONTEXT=SEARCH; CONTEXT=SORT
+ *   - RFC 5465: NOTIFY
+ *   - RFC 5466: FILTERS
+ *   - RFC 6785: IMAPSIEVE
+ *   - RFC 7377: MULTISEARCH
+ * 
+ * + * @author Michael Slusarz + * @category Horde + * @copyright 1999-2007 The SquirrelMail Project Team + * @copyright 2005-2017 Horde LLC + * @license http://www.horde.org/licenses/lgpl21 LGPL 2.1 + * @package Imap_Client + */ +class Horde_Imap_Client_Socket extends Horde_Imap_Client_Base +{ + /** + * Cache names used exclusively within this class. + */ + const CACHE_FLAGS = 'HICflags'; + + /** + * Queued commands to send to the server. + * + * @var array + */ + protected $_cmdQueue = array(); + + /** + * The default ports to use for a connection. + * + * @var array + */ + protected $_defaultPorts = array(143, 993); + + /** + * Mapping of status fields to IMAP names. + * + * @var array + */ + protected $_statusFields = array( + 'messages' => Horde_Imap_Client::STATUS_MESSAGES, + 'recent' => Horde_Imap_Client::STATUS_RECENT, + 'uidnext' => Horde_Imap_Client::STATUS_UIDNEXT, + 'uidvalidity' => Horde_Imap_Client::STATUS_UIDVALIDITY, + 'unseen' => Horde_Imap_Client::STATUS_UNSEEN, + 'firstunseen' => Horde_Imap_Client::STATUS_FIRSTUNSEEN, + 'flags' => Horde_Imap_Client::STATUS_FLAGS, + 'permflags' => Horde_Imap_Client::STATUS_PERMFLAGS, + 'uidnotsticky' => Horde_Imap_Client::STATUS_UIDNOTSTICKY, + 'highestmodseq' => Horde_Imap_Client::STATUS_HIGHESTMODSEQ + ); + + /** + * The unique tag to use when making an IMAP query. + * + * @var integer + */ + protected $_tag = 0; + + /** + * @param array $params A hash containing configuration parameters. + * Additional parameters to base driver: + * - debug_literal: (boolean) If true, will output the raw text of + * literal responses to the debug stream. Otherwise, + * outputs a summary of the literal response. + * - envelope_addrs: (integer) The maximum number of address entries to + * read for FETCH ENVELOPE address fields. + * DEFAULT: 1000 + * - envelope_string: (integer) The maximum length of string fields + * returned by the FETCH ENVELOPE command. + * DEFAULT: 2048 + * - xoauth2_token: (mixed) If set, will authenticate via the XOAUTH2 + * mechanism (if available) with this token. Either a + * string (since 2.13.0) or a + * Horde_Imap_Client_Base_Password object (since + * 2.14.0). + */ + public function __construct(array $params = array()) + { + parent::__construct(array_merge(array( + 'debug_literal' => false, + 'envelope_addrs' => 1000, + 'envelope_string' => 2048 + ), $params)); + } + + /** + */ + public function __get($name) + { + switch ($name) { + case 'search_charset': + if (!isset($this->_init['search_charset']) && + $this->_capability()->isEnabled('UTF8=ACCEPT')) { + $this->_init['search_charset'] = new Horde_Imap_Client_Data_SearchCharset_Utf8(); + } + break; + } + + return parent::__get($name); + } + + /** + */ + public function getParam($key) + { + switch ($key) { + case 'xoauth2_token': + if (isset($this->_params[$key]) && + ($this->_params[$key] instanceof Horde_Imap_Client_Base_Password)) { + return $this->_params[$key]->getPassword(); + } + break; + } + + return parent::getParam($key); + } + + /** + */ + public function update(SplSubject $subject) + { + if (!empty($this->_init['imapproxy']) && + ($subject instanceof Horde_Imap_Client_Data_Capability_Imap)) { + $this->_setInit('enabled', $subject->isEnabled()); + } + + return parent::update($subject); + } + + /** + */ + protected function _initCapability() + { + // Need to use connect call here or else we run into loop issues + // because _connect() can generate the capability object internally. + $this->_connect(); + + // It is possible the server provided capability information on + // connect, so check for it now. + if (!isset($this->_init['capability'])) { + $this->_sendCmd($this->_command('CAPABILITY')); + } + } + + /** + * Parse a CAPABILITY Response (RFC 3501 [7.2.1]). + * + * @param Horde_Imap_Client_Interaction_Pipeline $pipeline Pipeline + * object. + * @param array $data An array of CAPABILITY strings. + */ + protected function _parseCapability( + Horde_Imap_Client_Interaction_Pipeline $pipeline, + $data + ) + { + if (!empty($this->_temp['no_cap'])) { + return; + } + + $pipeline->data['capability_set'] = true; + + $c = new Horde_Imap_Client_Data_Capability_Imap(); + + foreach ($data as $val) { + $cap_list = explode('=', $val); + $c->add( + $cap_list[0], + isset($cap_list[1]) ? array($cap_list[1]) : null + ); + } + + $this->_setInit('capability', $c); + } + + /** + */ + protected function _noop() + { + // NOOP doesn't return any specific response + $this->_sendCmd($this->_command('NOOP')); + } + + /** + */ + protected function _getNamespaces() + { + if ($this->_capability('NAMESPACE')) { + $data = $this->_sendCmd($this->_command('NAMESPACE'))->data; + if (isset($data['namespace'])) { + return $data['namespace']; + } + } + + return new Horde_Imap_Client_Namespace_List(); + } + + /** + * Parse a NAMESPACE response (RFC 2342 [5] & RFC 5255 [3.4]). + * + * @param Horde_Imap_Client_Interaction_Pipeline $pipeline Pipeline + * object. + * @param Horde_Imap_Client_Tokenize $data The NAMESPACE data. + */ + protected function _parseNamespace( + Horde_Imap_Client_Interaction_Pipeline $pipeline, + Horde_Imap_Client_Tokenize $data + ) + { + $namespace_array = array( + Horde_Imap_Client_Data_Namespace::NS_PERSONAL, + Horde_Imap_Client_Data_Namespace::NS_OTHER, + Horde_Imap_Client_Data_Namespace::NS_SHARED + ); + + $c = array(); + + // Per RFC 2342, response from NAMESPACE command is: + // (PERSONAL NAMESPACES) (OTHER_USERS NAMESPACE) (SHARED NAMESPACES) + foreach ($namespace_array as $val) { + $entry = $data->next(); + + if (is_null($entry)) { + continue; + } + + while ($data->next() !== false) { + $ob = Horde_Imap_Client_Mailbox::get($data->next(), true); + + $ns = new Horde_Imap_Client_Data_Namespace(); + $ns->delimiter = $data->next(); + $ns->name = strval($ob); + $ns->type = $val; + $c[strval($ob)] = $ns; + + // RFC 4466: NAMESPACE extensions + while (($ext = $data->next()) !== false) { + switch (Horde_String::upper($ext)) { + case 'TRANSLATION': + // RFC 5255 [3.4] - TRANSLATION extension + $data->next(); + $ns->translation = $data->next(); + $data->next(); + break; + } + } + } + } + + $pipeline->data['namespace'] = new Horde_Imap_Client_Namespace_List($c); + } + + /** + */ + protected function _login() + { + $secure = $this->getParam('secure'); + + if (!empty($this->_temp['preauth'])) { + unset($this->_temp['preauth']); + + /* Don't allow PREAUTH if we are requring secure access, since + * PREAUTH cannot provide secure access. */ + if (!$this->isSecureConnection() && ($secure !== false)) { + $this->logout(); + throw new Horde_Imap_Client_Exception( + Horde_Imap_Client_Translation::r("Could not open secure TLS connection to the IMAP server."), + Horde_Imap_Client_Exception::LOGIN_TLSFAILURE + ); + } + + return $this->_loginTasks(); + } + + /* Blank passwords are not allowed, so no need to even try + * authentication to determine this. */ + if (!strlen($this->getParam('password'))) { + throw new Horde_Imap_Client_Exception( + Horde_Imap_Client_Translation::r("No password provided."), + Horde_Imap_Client_Exception::LOGIN_AUTHENTICATIONFAILED + ); + } + + $this->_connect(); + + $first_login = empty($this->_init['authmethod']); + + // Switch to secure channel if using TLS. + if (!$this->isSecureConnection() && + (($secure === 'tls') || + (($secure === true) && + $this->_capability('LOGINDISABLED')))) { + if ($first_login && !$this->_capability('STARTTLS')) { + /* We should never hit this - STARTTLS is required pursuant to + * RFC 3501 [6.2.1]. */ + throw new Horde_Imap_Client_Exception( + Horde_Imap_Client_Translation::r("Server does not support TLS connections."), + Horde_Imap_Client_Exception::LOGIN_TLSFAILURE + ); + } + + // Switch over to a TLS connection. + // STARTTLS returns no untagged response. + $this->_sendCmd($this->_command('STARTTLS')); + + if (!$this->_connection->startTls()) { + $this->logout(); + throw new Horde_Imap_Client_Exception( + Horde_Imap_Client_Translation::r("Could not open secure TLS connection to the IMAP server."), + Horde_Imap_Client_Exception::LOGIN_TLSFAILURE + ); + } + + $this->_debug->info('Successfully completed TLS negotiation.'); + + $this->setParam('secure', 'tls'); + $secure = 'tls'; + + if ($first_login) { + // Expire cached CAPABILITY information (RFC 3501 [6.2.1]) + $this->_setInit('capability'); + + // Reset language (RFC 5255 [3.1]) + $this->_setInit('lang'); + } + + // Set language if using imapproxy + if (!empty($this->_init['imapproxy'])) { + $this->setLanguage(); + } + } + + /* If we reached this point and don't have a secure connection, then + * a secure connections is not available. */ + if (($secure === true) && !$this->isSecureConnection()) { + $this->setParam('secure', false); + $secure = false; + } + + if ($first_login) { + // Add authentication methods. + $auth_mech = array(); + $auth = array_flip($this->_capability()->getParams('AUTH')); + + // XOAUTH2 + if (isset($auth['XOAUTH2']) && $this->getParam('xoauth2_token')) { + $auth_mech[] = 'XOAUTH2'; + } + unset($auth['XOAUTH2']); + + /* 'AUTH=PLAIN' authentication always exists if under TLS (RFC 3501 + * [7.2.1]; RFC 2595), even though we might get here with a + * non-TLS secure connection too. Use it over all other + * authentication methods, although we need to do sanity checking + * since broken IMAP servers may not support as required - + * fallback to LOGIN instead, if not explicitly disabled. */ + if ($secure) { + if (isset($auth['PLAIN'])) { + $auth_mech[] = 'PLAIN'; + unset($auth['PLAIN']); + } elseif (!$this->_capability('LOGINDISABLED')) { + $auth_mech[] = 'LOGIN'; + } + } + + // Check for supported SCRAM AUTH mechanisms. Preferred because it + // provides verification of server authenticity. + foreach (array_keys($auth) as $key) { + switch ($key) { + case 'SCRAM-SHA-1': + $auth_mech[] = $key; + unset($auth[$key]); + break; + } + } + + // Check for supported CRAM AUTH mechanisms. + foreach (array_keys($auth) as $key) { + switch ($key) { + case 'CRAM-SHA1': + case 'CRAM-SHA256': + $auth_mech[] = $key; + unset($auth[$key]); + break; + } + } + + // Prefer CRAM-MD5 over DIGEST-MD5, as the latter has been + // obsoleted (RFC 6331). + if (isset($auth['CRAM-MD5'])) { + $auth_mech[] = 'CRAM-MD5'; + } elseif (isset($auth['DIGEST-MD5'])) { + $auth_mech[] = 'DIGEST-MD5'; + } + unset($auth['CRAM-MD5'], $auth['DIGEST-MD5']); + + // Add other auth mechanisms. + $auth_mech = array_merge($auth_mech, array_keys($auth)); + + // Fall back to 'LOGIN' if available. + if (!$secure && !$this->_capability('LOGINDISABLED')) { + $auth_mech[] = 'LOGIN'; + } + + if (empty($auth_mech)) { + throw new Horde_Imap_Client_Exception( + Horde_Imap_Client_Translation::r("No supported IMAP authentication method could be found."), + Horde_Imap_Client_Exception::LOGIN_NOAUTHMETHOD + ); + } + + $auth_mech = array_unique($auth_mech); + } else { + $auth_mech = array($this->_init['authmethod']); + } + + $login_err = null; + + foreach ($auth_mech as $method) { + try { + $resp = $this->_tryLogin($method); + $data = $resp->data; + $this->_setInit('authmethod', $method); + unset($this->_temp['referralcount']); + } catch (Horde_Imap_Client_Exception_ServerResponse $e) { + $data = $e->resp_data; + if (isset($data['loginerr'])) { + $login_err = $data['loginerr']; + } + $resp = false; + } catch (Horde_Imap_Client_Exception $e) { + $resp = false; + } + + // Check for login referral (RFC 2221) response - can happen for + // an OK, NO, or BYE response. + if (isset($data['referral'])) { + foreach (array('host', 'port', 'username') as $val) { + if (!is_null($data['referral']->$val)) { + $this->setParam($val, $data['referral']->$val); + } + } + + if (!is_null($data['referral']->auth)) { + $this->_setInit('authmethod', $data['referral']->auth); + } + + if (!isset($this->_temp['referralcount'])) { + $this->_temp['referralcount'] = 0; + } + + // RFC 2221 [3] - Don't follow more than 10 levels of referral + // without consulting the user. + if (++$this->_temp['referralcount'] < 10) { + $this->logout(); + $this->_setInit('capability'); + $this->_setInit('namespace'); + return $this->login(); + } + + unset($this->_temp['referralcount']); + } + + if ($resp) { + return $this->_loginTasks($first_login, $resp->data); + } + } + + /* Try again from scratch if authentication failed in an established, + * previously-authenticated object. */ + if (!empty($this->_init['authmethod'])) { + $this->_setInit(); + unset($this->_temp['no_cap']); + try { + return $this->_login(); + } catch (Horde_Imap_Client_Exception $e) {} + } + + /* Default to AUTHENTICATIONFAILED error (see RFC 5530[3]). */ + if (is_null($login_err)) { + throw new Horde_Imap_Client_Exception( + Horde_Imap_Client_Translation::r("Mail server denied authentication."), + Horde_Imap_Client_Exception::LOGIN_AUTHENTICATIONFAILED + ); + } + + throw $login_err; + } + + /** + * Connects to the IMAP server. + * + * @throws Horde_Imap_Client_Exception + */ + protected function _connect() + { + if (!is_null($this->_connection)) { + return; + } + + try { + $this->_connection = new Horde_Imap_Client_Socket_Connection_Socket( + $this->getParam('hostspec'), + $this->getParam('port'), + $this->getParam('timeout'), + $this->getParam('secure'), + $this->getParam('context'), + array( + 'debug' => $this->_debug, + 'debugliteral' => $this->getParam('debug_literal') + ) + ); + } catch (Horde\Socket\Client\Exception $e) { + $e2 = new Horde_Imap_Client_Exception( + Horde_Imap_Client_Translation::r("Error connecting to mail server."), + Horde_Imap_Client_Exception::SERVER_CONNECT + ); + $e2->details = $e->details; + throw $e2; + } + + // If we already have capability information, don't re-set with + // (possibly) limited information sent in the initial banner. + if (isset($this->_init['capability'])) { + $this->_temp['no_cap'] = true; + } + + /* Get greeting information (untagged response). */ + try { + $this->_getLine($this->_pipeline()); + } catch (Horde_Imap_Client_Exception_ServerResponse $e) { + if ($e->status === Horde_Imap_Client_Interaction_Server::BYE) { + /* Server is explicitly rejecting our connection (RFC 3501 + * [7.1.5]). */ + $e->setMessage(Horde_Imap_Client_Translation::r("Server rejected connection.")); + $e->setCode(Horde_Imap_Client_Exception::SERVER_CONNECT); + } + throw $e; + } + + // Check for IMAP4rev1 support + if (!$this->_capability('IMAP4REV1')) { + throw new Horde_Imap_Client_Exception( + Horde_Imap_Client_Translation::r("The mail server does not support IMAP4rev1 (RFC 3501)."), + Horde_Imap_Client_Exception::SERVER_CONNECT + ); + } + + // Set language if NOT using imapproxy + if (empty($this->_init['imapproxy'])) { + if ($this->_capability('XIMAPPROXY')) { + $this->_setInit('imapproxy', true); + } else { + $this->setLanguage(); + } + } + + // If pre-authenticated, we need to do all login tasks now. + if (!empty($this->_temp['preauth'])) { + $this->login(); + } + } + + /** + * Authenticate to the IMAP server. + * + * @param string $method IMAP login method. + * + * @return Horde_Imap_Client_Interaction_Pipeline Pipeline object. + * + * @throws Horde_Imap_Client_Exception + */ + protected function _tryLogin($method) + { + $username = $this->getParam('username'); + if (is_null($authusername = $this->getParam('authusername'))) { + $authusername = $username; + } + $password = $this->getParam('password'); + + switch ($method) { + case 'CRAM-MD5': + case 'CRAM-SHA1': + case 'CRAM-SHA256': + // RFC 2195: CRAM-MD5 + // CRAM-SHA1 & CRAM-SHA256 supported by Courier SASL library + + $args = array( + $username, + Horde_String::lower(substr($method, 5)), + $password + ); + + $cmd = $this->_command('AUTHENTICATE')->add(array( + $method, + new Horde_Imap_Client_Interaction_Command_Continuation(function($ob) use ($args) { + return new Horde_Imap_Client_Data_Format_List( + base64_encode($args[0] . ' ' . hash_hmac($args[1], base64_decode($ob->token->current()), $args[2], false)) + ); + }) + )); + $cmd->debug = array( + null, + sprintf('[AUTHENTICATE response (username: %s)]', $username) + ); + break; + + case 'DIGEST-MD5': + // RFC 2831/4422; obsoleted by RFC 6331 + + // Need $args because PHP 5.3 doesn't allow access to $this in + // anonymous functions. + $args = array( + $username, + $password, + $this->getParam('hostspec') + ); + + $cmd = $this->_command('AUTHENTICATE')->add(array( + $method, + new Horde_Imap_Client_Interaction_Command_Continuation(function($ob) use ($args) { + return new Horde_Imap_Client_Data_Format_List( + base64_encode(new Horde_Imap_Client_Auth_DigestMD5( + $args[0], + $args[1], + base64_decode($ob->token->current()), + $args[2], + 'imap' + )) + ); + }), + new Horde_Imap_Client_Interaction_Command_Continuation(function($ob) { + if (strpos(base64_decode($ob->token->current()), 'rspauth=') === false) { + throw new Horde_Imap_Client_Exception( + Horde_Imap_Client_Translation::r("Unexpected response from server when authenticating."), + Horde_Imap_Client_Exception::SERVER_CONNECT + ); + } + + return new Horde_Imap_Client_Data_Format_List(); + }) + )); + $cmd->debug = array( + null, + sprintf('[AUTHENTICATE Response (username: %s)]', $username), + null + ); + break; + + case 'LOGIN': + /* See, e.g., RFC 6855 [5] - LOGIN command does not support + * non-ASCII characters. If we reach this point, treat as an + * authentication failure. */ + try { + $username = new Horde_Imap_Client_Data_Format_Astring($username); + $password = new Horde_Imap_Client_Data_Format_Astring($password); + } catch (Horde_Imap_Client_Data_Format_Exception $e) { + throw new Horde_Imap_Client_Exception( + Horde_Imap_Client_Translation::r("Authentication failed."), + Horde_Imap_Client_Exception::LOGIN_AUTHENTICATIONFAILED + ); + } + + $cmd = $this->_command('LOGIN')->add(array( + $username, + $password + )); + $cmd->debug = array( + sprintf('LOGIN %s [PASSWORD]', $username) + ); + break; + + case 'PLAIN': + // RFC 2595/4616 - PLAIN SASL mechanism + $cmd = $this->_authInitialResponse( + $method, + base64_encode(implode("\0", array( + $username, + $authusername, + $password + ))), + $username + ); + break; + + case 'SCRAM-SHA-1': + $scram = new Horde_Imap_Client_Auth_Scram( + $username, + $password, + 'SHA1' + ); + + $cmd = $this->_authInitialResponse( + $method, + base64_encode($scram->getClientFirstMessage()) + ); + + $cmd->add( + new Horde_Imap_Client_Interaction_Command_Continuation(function($ob) use ($scram) { + $sr1 = base64_decode($ob->token->current()); + return new Horde_Imap_Client_Data_Format_List( + $scram->parseServerFirstMessage($sr1) + ? base64_encode($scram->getClientFinalMessage()) + : '*' + ); + }) + ); + + $self = $this; + $cmd->add( + new Horde_Imap_Client_Interaction_Command_Continuation(function($ob) use ($scram, $self) { + $sr2 = base64_decode($ob->token->current()); + if (!$scram->parseServerFinalMessage($sr2)) { + /* This means authentication passed, according to the + * server, but the server signature is incorrect. + * This indicates that server verification has failed. + * Immediately disconnect from the server, since this + * is a possible security issue. */ + $self->logout(); + throw new Horde_Imap_Client_Exception( + Horde_Imap_Client_Translation::r("Server failed verification check."), + Horde_Imap_Client_Exception::LOGIN_SERVER_VERIFICATION_FAILED + ); + } + + return new Horde_Imap_Client_Data_Format_List(); + }) + ); + break; + + case 'XOAUTH2': + // Google XOAUTH2 + $cmd = $this->_authInitialResponse( + $method, + $this->getParam('xoauth2_token') + ); + + /* This is an optional command continuation. XOAUTH2 will return + * error information in continuation response. */ + $error_continuation = new Horde_Imap_Client_Interaction_Command_Continuation( + function($ob) { + return new Horde_Imap_Client_Data_Format_List(); + } + ); + $error_continuation->optional = true; + $cmd->add($error_continuation); + break; + + default: + $e = new Horde_Imap_Client_Exception( + Horde_Imap_Client_Translation::r("Unknown authentication method: %s"), + Horde_Imap_Client_Exception::SERVER_CONNECT + ); + $e->messagePrintf(array($method)); + throw $e; + } + + return $this->_sendCmd($this->_pipeline($cmd)); + } + + /** + * Create the AUTHENTICATE command for the initial client response. + * + * @param string $method AUTHENTICATE SASL method. + * @param string $ir Initial client response. + * @param string $username If set, log a username message in debug log + * instead of raw data. + * + * @return Horde_Imap_Client_Interaction_Command A command object. + */ + protected function _authInitialResponse($method, $ir, $username = null) + { + $cmd = $this->_command('AUTHENTICATE')->add($method); + + if ($this->_capability('SASL-IR')) { + // IMAP Extension for SASL Initial Client Response (RFC 4959) + $cmd->add($ir); + if ($username) { + $cmd->debug = array( + sprintf('AUTHENTICATE %s [INITIAL CLIENT RESPONSE (username: %s)]', $method, $username) + ); + } + } else { + $cmd->add( + new Horde_Imap_Client_Interaction_Command_Continuation(function($ob) use ($ir) { + return new Horde_Imap_Client_Data_Format_List($ir); + }) + ); + if ($username) { + $cmd->debug = array( + null, + sprintf('[INITIAL CLIENT RESPONSE (username: %s)]', $username) + ); + } + } + + return $cmd; + } + + /** + * Perform login tasks. + * + * @param boolean $firstlogin Is this the first login? + * @param array $resp The data response from the login command. + * May include: + * - capability_set: (boolean) True if CAPABILITY was set after login. + * - proxyreuse: (boolean) True if re-used connection via imapproxy. + * + * @return boolean True if global login tasks should be performed. + */ + protected function _loginTasks($firstlogin = true, array $resp = array()) + { + /* If reusing an imapproxy connection, no need to do any of these + * login tasks again. */ + if (!$firstlogin && !empty($resp['proxyreuse'])) { + if (isset($this->_init['enabled'])) { + foreach ($this->_init['enabled'] as $val) { + $this->_capability()->enable($val); + } + } + + // If we have not yet set the language, set it now. + if (!isset($this->_init['lang'])) { + $this->_temp['lang_queue'] = true; + $this->setLanguage(); + unset($this->_temp['lang_queue']); + } + return false; + } + + /* If we logged in for first time, and server did not return + * capability information, we need to mark for retrieval. */ + if ($firstlogin && empty($resp['capability_set'])) { + $this->_setInit('capability'); + } + + $this->_temp['lang_queue'] = true; + $this->setLanguage(); + unset($this->_temp['lang_queue']); + + /* Only active QRESYNC/CONDSTORE if caching is enabled. */ + $enable = array(); + if ($this->_initCache()) { + if ($this->_capability('QRESYNC')) { + $enable[] = 'QRESYNC'; + } elseif ($this->_capability('CONDSTORE')) { + $enable[] = 'CONDSTORE'; + } + } + + /* Use UTF8=ACCEPT, if available. */ + if ($this->_capability('UTF8', 'ACCEPT')) { + $enable[] = 'UTF8=ACCEPT'; + } + + $this->_enable($enable); + + return true; + } + + /** + */ + protected function _logout() + { + if (empty($this->_temp['logout'])) { + /* If using imapproxy, force sending these commands, since they + * may not be sent again if they are (likely) initialization + * commands. */ + if (!empty($this->_cmdQueue) && + !empty($this->_init['imapproxy'])) { + $this->_sendCmd($this->_pipeline()); + } + + $this->_temp['logout'] = true; + try { + $this->_sendCmd($this->_command('LOGOUT')); + } catch (Horde_Imap_Client_Exception_ServerResponse $e) { + // Ignore server errors + } + unset($this->_temp['logout']); + } + } + + /** + */ + protected function _sendID($info) + { + $cmd = $this->_command('ID'); + + if (empty($info)) { + $cmd->add(new Horde_Imap_Client_Data_Format_Nil()); + } else { + $tmp = new Horde_Imap_Client_Data_Format_List(); + foreach ($info as $key => $val) { + $tmp->add(array( + new Horde_Imap_Client_Data_Format_String(Horde_String::lower($key)), + new Horde_Imap_Client_Data_Format_Nstring($val) + )); + } + $cmd->add($tmp); + } + + $temp = &$this->_temp; + + /* Add to queue - this doesn't need to be sent immediately. */ + $cmd->on_error = function() use (&$temp) { + /* Ignore server errors. E.g. Cyrus returns this: + * 001 NO Only one Id allowed in non-authenticated state + * even though NO is not allowed in RFC 2971[3.1]. */ + $temp['id'] = array(); + return true; + }; + $cmd->on_success = function() use ($cmd, &$temp) { + $temp['id'] = $cmd->pipeline->data['id']; + }; + $this->_cmdQueue[] = $cmd; + } + + /** + * Parse an ID response (RFC 2971 [3.2]). + * + * @param Horde_Imap_Client_Interaction_Pipeline $pipeline Pipeline + * object. + * @param Horde_Imap_Client_Tokenize $data The server response. + */ + protected function _parseID( + Horde_Imap_Client_Interaction_Pipeline $pipeline, + Horde_Imap_Client_Tokenize $data + ) + { + if (!isset($pipeline->data['id'])) { + $pipeline->data['id'] = array(); + } + + if (!is_null($data->next())) { + while (($curr = $data->next()) !== false) { + if (!is_null($id = $data->next())) { + $pipeline->data['id'][$curr] = $id; + } + } + } + } + + /** + */ + protected function _getID() + { + if (!isset($this->_temp['id'])) { + $this->sendID(); + /* ID is queued - force sending the queued command. */ + $this->_sendCmd($this->_pipeline()); + } + + return $this->_temp['id']; + } + + /** + */ + protected function _setLanguage($langs) + { + $cmd = $this->_command('LANGUAGE'); + foreach ($langs as $lang) { + $cmd->add(new Horde_Imap_Client_Data_Format_Astring($lang)); + } + + if (!empty($this->_temp['lang_queue'])) { + $this->_cmdQueue[] = $cmd; + return array(); + } + + try { + $this->_sendCmd($cmd); + } catch (Horde_Imap_Client_Exception $e) { + $this->_setInit('lang', false); + return null; + } + + return $this->_init['lang']; + } + + /** + */ + protected function _getLanguage($list) + { + if (!$list) { + return empty($this->_init['lang']) + ? null + : $this->_init['lang']; + } + + if (!isset($this->_init['langavail'])) { + try { + $this->_sendCmd($this->_command('LANGUAGE')); + } catch (Horde_Imap_Client_Exception $e) { + $this->_setInit('langavail', array()); + } + } + + return $this->_init['langavail']; + } + + /** + * Parse a LANGUAGE response (RFC 5255 [3.3]). + * + * @param Horde_Imap_Client_Tokenize $data The server response. + */ + protected function _parseLanguage(Horde_Imap_Client_Tokenize $data) + { + $lang_list = $data->flushIterator(); + + if (count($lang_list) === 1) { + // This is the language that was set. + $this->_setInit('lang', reset($lang_list)); + } else { + // These are the languages that are available. + $this->_setInit('langavail', $lang_list); + } + } + + /** + * Enable an IMAP extension (see RFC 5161). + * + * @param array $exts The extensions to enable. + * + * @throws Horde_Imap_Client_Exception + */ + protected function _enable($exts) + { + if (!empty($exts) && $this->_capability('ENABLE')) { + $c = $this->_capability(); + $todo = array(); + + // Only enable non-enabled extensions. + foreach ($exts as $val) { + if (!$c->isEnabled($val)) { + $c->enable($val); + $todo[] = $val; + } + } + + if (!empty($todo)) { + $cmd = $this->_command('ENABLE')->add($todo); + $cmd->on_error = function() use ($todo, $c) { + /* Something went wrong... disable the extensions. */ + foreach ($todo as $val) { + $c->enable($val, false); + } + }; + $this->_cmdQueue[] = $cmd; + } + } + } + + /** + * Parse an ENABLED response (RFC 5161 [3.2]). + * + * @param Horde_Imap_Client_Tokenize $data The server response. + */ + protected function _parseEnabled(Horde_Imap_Client_Tokenize $data) + { + $c = $this->_capability(); + + foreach ($data->flushIterator() as $val) { + $c->enable($val); + } + } + + /** + */ + protected function _openMailbox(Horde_Imap_Client_Mailbox $mailbox, $mode) + { + $c = $this->_capability(); + $qresync = $c->isEnabled('QRESYNC'); + + $cmd = $this->_command( + ($mode == Horde_Imap_Client::OPEN_READONLY) ? 'EXAMINE' : 'SELECT' + )->add( + $this->_getMboxFormatOb($mailbox) + ); + $pipeline = $this->_pipeline($cmd); + + /* If QRESYNC is available, synchronize the mailbox. */ + if ($qresync) { + $this->_initCache(); + $md = $this->_cache->getMetaData($mailbox, null, array(self::CACHE_MODSEQ, 'uidvalid')); + + /* CACHE_MODSEQ can be set but 0 (NOMODSEQ was returned). */ + if (!empty($md[self::CACHE_MODSEQ])) { + if ($uids = $this->_cache->get($mailbox)) { + $uids = $this->getIdsOb($uids); + + /* Check for extra long UID string. Assume that any + * server that can handle QRESYNC can also handle long + * input strings (at least 8 KB), so 7 KB is as good as + * any guess as to an upper limit. If this occurs, provide + * a range string (min -> max) instead. */ + if (strlen($uid_str = $uids->tostring_sort) > 7000) { + $uid_str = $uids->range_string; + } + } else { + $uid_str = null; + } + + /* Several things can happen with a QRESYNC: + * 1. UIDVALIDITY may have changed. If so, we need to expire + * the cache immediately (done below). + * 2. NOMODSEQ may have been returned. We can keep current + * message cache data but won't be able to do flag caching. + * 3. VANISHED/FETCH information was returned. These responses + * will have already been handled by those response handlers. + * 4. We are already synced with the local server in which + * case it acts like a normal EXAMINE/SELECT. */ + $cmd->add(new Horde_Imap_Client_Data_Format_List(array( + 'QRESYNC', + new Horde_Imap_Client_Data_Format_List(array_filter(array( + $md['uidvalid'], + $md[self::CACHE_MODSEQ], + $uid_str + ))) + ))); + } + + /* Let the 'CLOSED' response code handle mailbox switching if + * QRESYNC is active. */ + if ($this->_selected) { + $pipeline->data['qresyncmbox'] = array($mailbox, $mode); + } else { + $this->_changeSelected($mailbox, $mode); + } + } else { + if (!$c->isEnabled('CONDSTORE') && + $this->_initCache() && + $c->query('CONDSTORE')) { + /* Activate CONDSTORE now if ENABLE is not available. */ + $cmd->add(new Horde_Imap_Client_Data_Format_List('CONDSTORE')); + $c->enable('CONDSTORE'); + } + + $this->_changeSelected($mailbox, $mode); + } + + try { + $this->_sendCmd($pipeline); + } catch (Horde_Imap_Client_Exception_ServerResponse $e) { + // An EXAMINE/SELECT failure with a return of 'NO' will cause the + // current mailbox to be unselected. + if ($e->status === Horde_Imap_Client_Interaction_Server::NO) { + $this->_changeSelected(null); + $this->_mode = 0; + if (!$e->getCode()) { + $e = new Horde_Imap_Client_Exception( + Horde_Imap_Client_Translation::r("Could not open mailbox \"%s\"."), + Horde_Imap_Client_Exception::MAILBOX_NOOPEN + ); + $e->messagePrintf(array($mailbox)); + } + } + throw $e; + } + + if ($qresync) { + /* Mailbox is fully sync'd. */ + $this->_mailboxOb()->sync = true; + } + } + + /** + */ + protected function _createMailbox(Horde_Imap_Client_Mailbox $mailbox, $opts) + { + $cmd = $this->_command('CREATE')->add( + $this->_getMboxFormatOb($mailbox) + ); + + // RFC 6154 Sec. 3 + if (!empty($opts['special_use'])) { + $use = new Horde_Imap_Client_Data_Format_List('USE'); + $use->add( + new Horde_Imap_Client_Data_Format_List($opts['special_use']) + ); + $cmd->add($use); + } + + // CREATE returns no untagged information (RFC 3501 [6.3.3]) + $this->_sendCmd($cmd); + } + + /** + */ + protected function _deleteMailbox(Horde_Imap_Client_Mailbox $mailbox) + { + // Some IMAP servers will not allow a delete of a currently open + // mailbox. + if ($mailbox->equals($this->_selected)) { + $this->close(); + } + + $cmd = $this->_command('DELETE')->add( + $this->_getMboxFormatOb($mailbox) + ); + + try { + // DELETE returns no untagged information (RFC 3501 [6.3.4]) + $this->_sendCmd($cmd); + } catch (Horde_Imap_Client_Exception $e) { + // Some IMAP servers won't allow a mailbox delete unless all + // messages in that mailbox are deleted. + $this->expunge($mailbox, array( + 'delete' => true + )); + $this->_sendCmd($cmd); + } + } + + /** + */ + protected function _renameMailbox(Horde_Imap_Client_Mailbox $old, + Horde_Imap_Client_Mailbox $new) + { + // Some IMAP servers will not allow a rename of a currently open + // mailbox. + if ($old->equals($this->_selected)) { + $this->close(); + } + + // RENAME returns no untagged information (RFC 3501 [6.3.5]) + $this->_sendCmd( + $this->_command('RENAME')->add(array( + $this->_getMboxFormatOb($old), + $this->_getMboxFormatOb($new) + )) + ); + } + + /** + */ + protected function _subscribeMailbox(Horde_Imap_Client_Mailbox $mailbox, + $subscribe) + { + // SUBSCRIBE/UNSUBSCRIBE returns no untagged information (RFC 3501 + // [6.3.6 & 6.3.7]) + $this->_sendCmd( + $this->_command( + $subscribe ? 'SUBSCRIBE' : 'UNSUBSCRIBE' + )->add( + $this->_getMboxFormatOb($mailbox) + ) + ); + } + + /** + */ + protected function _listMailboxes($pattern, $mode, $options) + { + // RFC 5258 [3.1]: Use LSUB for MBOX_SUBSCRIBED if no other server + // return options are specified. + if (($mode == Horde_Imap_Client::MBOX_SUBSCRIBED) && + !array_intersect(array_keys($options), array('attributes', 'children', 'recursivematch', 'remote', 'special_use', 'status'))) { + return $this->_getMailboxList( + $pattern, + Horde_Imap_Client::MBOX_SUBSCRIBED, + array( + 'flat' => !empty($options['flat']), + 'no_listext' => true + ) + ); + } + + // Get the list of subscribed/unsubscribed mailboxes. Since LSUB is + // not guaranteed to have correct attributes, we must use LIST to + // ensure we receive the correct information. + if (($mode != Horde_Imap_Client::MBOX_ALL) && + !$this->_capability('LIST-EXTENDED')) { + $subscribed = $this->_getMailboxList( + $pattern, + Horde_Imap_Client::MBOX_SUBSCRIBED, + array('flat' => true) + ); + + // If mode is subscribed, and 'flat' option is true, we can + // return now. + if (($mode == Horde_Imap_Client::MBOX_SUBSCRIBED) && + !empty($options['flat'])) { + return $subscribed; + } + } else { + $subscribed = null; + } + + return $this->_getMailboxList($pattern, $mode, $options, $subscribed); + } + + /** + * Obtain a list of mailboxes. + * + * @param array $pattern The mailbox search pattern(s). + * @param integer $mode Which mailboxes to return. + * @param array $options Additional options. 'no_listext' will skip + * using the LIST-EXTENDED capability. + * @param array $subscribed A list of subscribed mailboxes. + * + * @return array See listMailboxes((). + * + * @throws Horde_Imap_Client_Exception + */ + protected function _getMailboxList($pattern, $mode, $options, + $subscribed = null) + { + // Setup entry for use in _parseList(). + $pipeline = $this->_pipeline(); + $pipeline->data['mailboxlist'] = array( + 'ext' => false, + 'mode' => $mode, + 'opts' => $options, + /* Can't use array_merge here because it will destroy any mailbox + * name (key) that is "numeric". */ + 'sub' => (is_null($subscribed) ? null : array_flip(array_map('strval', $subscribed)) + array('INBOX' => true)) + ); + $pipeline->data['listresponse'] = array(); + + $cmds = array(); + $return_opts = new Horde_Imap_Client_Data_Format_List(); + + if ($this->_capability('LIST-EXTENDED') && + empty($options['no_listext'])) { + $cmd = $this->_command('LIST'); + $pipeline->data['mailboxlist']['ext'] = true; + + $select_opts = new Horde_Imap_Client_Data_Format_List(); + $subscribed = false; + + switch ($mode) { + case Horde_Imap_Client::MBOX_ALL_SUBSCRIBED: + case Horde_Imap_Client::MBOX_UNSUBSCRIBED: + $return_opts->add('SUBSCRIBED'); + break; + + case Horde_Imap_Client::MBOX_SUBSCRIBED: + case Horde_Imap_Client::MBOX_SUBSCRIBED_EXISTS: + $select_opts->add('SUBSCRIBED'); + $return_opts->add('SUBSCRIBED'); + $subscribed = true; + break; + } + + if (!empty($options['remote'])) { + $select_opts->add('REMOTE'); + } + + if (!empty($options['recursivematch'])) { + $select_opts->add('RECURSIVEMATCH'); + } + + if (!empty($select_opts)) { + $cmd->add($select_opts); + } + + $cmd->add(''); + + $tmp = new Horde_Imap_Client_Data_Format_List(); + foreach ($pattern as $val) { + if ($subscribed && (strcasecmp($val, 'INBOX') === 0)) { + $cmds[] = $this->_command('LIST')->add(array( + '', + 'INBOX' + )); + } else { + $tmp->add($this->_getMboxFormatOb($val, true)); + } + } + + if (count($tmp)) { + $cmd->add($tmp); + $cmds[] = $cmd; + } + + if (!empty($options['children'])) { + $return_opts->add('CHILDREN'); + } + + if (!empty($options['special_use'])) { + $return_opts->add('SPECIAL-USE'); + } + } else { + foreach ($pattern as $val) { + $cmds[] = $this->_command( + ($mode == Horde_Imap_Client::MBOX_SUBSCRIBED) ? 'LSUB' : 'LIST' + )->add(array( + '', + $this->_getMboxFormatOb($val, true) + )); + } + } + + /* LIST-STATUS does NOT depend on LIST-EXTENDED. */ + if (!empty($options['status']) && + $this->_capability('LIST-STATUS')) { + $available_status = array( + Horde_Imap_Client::STATUS_MESSAGES, + Horde_Imap_Client::STATUS_RECENT, + Horde_Imap_Client::STATUS_UIDNEXT, + Horde_Imap_Client::STATUS_UIDVALIDITY, + Horde_Imap_Client::STATUS_UNSEEN, + Horde_Imap_Client::STATUS_HIGHESTMODSEQ + ); + + $status_opts = array(); + foreach (array_intersect($this->_statusFields, $available_status) as $key => $val) { + if ($options['status'] & $val) { + $status_opts[] = $key; + } + } + + if (count($status_opts)) { + $return_opts->add(array( + 'STATUS', + new Horde_Imap_Client_Data_Format_List( + array_map('Horde_String::upper', $status_opts) + ) + )); + } + } + + foreach ($cmds as $val) { + if (count($return_opts)) { + $val->add(array( + 'RETURN', + $return_opts + )); + } + + $pipeline->add($val); + } + + try { + $lr = $this->_sendCmd($pipeline)->data['listresponse']; + } catch (Horde_Imap_Client_Exception_ServerResponse $e) { + /* Archiveopteryx 3.1.3 can't process empty list-select-opts list. + * Retry using base IMAP4rev1 functionality. */ + if (($e->status === Horde_Imap_Client_Interaction_Server::BAD) && + $this->_capability('LIST-EXTENDED')) { + $this->_capability()->remove('LIST-EXTENDED'); + return $this->_listMailboxes($pattern, $mode, $options); + } + + throw $e; + } + + if (!empty($options['flat'])) { + return array_values($lr); + } + + /* Add in STATUS return, if needed. */ + if (!empty($options['status']) && $this->_capability('LIST-STATUS')) { + foreach($lr as $val_utf8 => $tmp) { + $lr[$val_utf8]['status'] = $this->_prepareStatusResponse($status_opts, $val_utf8); + } + } + + return $lr; + } + + /** + * Parse a LIST/LSUB response (RFC 3501 [7.2.2 & 7.2.3]). + * + * @param Horde_Imap_Client_Interaction_Pipeline $pipeline Pipeline + * object. + * @param Horde_Imap_Client_Tokenize $data The server response (includes + * type as first token). + * + * @throws Horde_Imap_Client_Exception + */ + protected function _parseList( + Horde_Imap_Client_Interaction_Pipeline $pipeline, + Horde_Imap_Client_Tokenize $data + ) + { + $data->next(); + $attr = null; + $attr_raw = $data->flushIterator(); + $delimiter = $data->next(); + $mbox = Horde_Imap_Client_Mailbox::get( + $data->next(), + !$this->_capability()->isEnabled('UTF8=ACCEPT') + ); + $ml = $pipeline->data['mailboxlist']; + + switch ($ml['mode']) { + case Horde_Imap_Client::MBOX_ALL_SUBSCRIBED: + case Horde_Imap_Client::MBOX_SUBSCRIBED_EXISTS: + case Horde_Imap_Client::MBOX_UNSUBSCRIBED: + $attr = array_flip(array_map('Horde_String::lower', $attr_raw)); + + /* Subscribed list is in UTF-8. */ + if (is_null($ml['sub']) && + !isset($attr['\\subscribed']) && + (strcasecmp($mbox, 'INBOX') === 0)) { + $attr['\\subscribed'] = 1; + } elseif (isset($ml['sub'][strval($mbox)])) { + $attr['\\subscribed'] = 1; + } + break; + } + + switch ($ml['mode']) { + case Horde_Imap_Client::MBOX_SUBSCRIBED_EXISTS: + if (isset($attr['\\nonexistent']) || + !isset($attr['\\subscribed'])) { + return; + } + break; + + case Horde_Imap_Client::MBOX_UNSUBSCRIBED: + if (isset($attr['\\subscribed'])) { + return; + } + break; + } + + if (!empty($ml['opts']['flat'])) { + $pipeline->data['listresponse'][] = $mbox; + return; + } + + $tmp = array( + 'delimiter' => $delimiter, + 'mailbox' => $mbox + ); + + if ($attr || !empty($ml['opts']['attributes'])) { + if (is_null($attr)) { + $attr = array_flip(array_map('Horde_String::lower', $attr_raw)); + } + + /* RFC 5258 [3.4]: inferred attributes. */ + if ($ml['ext']) { + if (isset($attr['\\noinferiors'])) { + $attr['\\hasnochildren'] = 1; + } + if (isset($attr['\\nonexistent'])) { + $attr['\\noselect'] = 1; + } + } + $tmp['attributes'] = array_keys($attr); + } + + if ($data->next() !== false) { + $tmp['extended'] = $data->flushIterator(); + } + + $pipeline->data['listresponse'][strval($mbox)] = $tmp; + } + + /** + */ + protected function _status($mboxes, $flags) + { + $on_error = null; + $out = $to_process = array(); + $pipeline = $this->_pipeline(); + $unseen_flags = array( + Horde_Imap_Client::STATUS_FIRSTUNSEEN, + Horde_Imap_Client::STATUS_UNSEEN + ); + + foreach ($mboxes as $mailbox) { + /* If FLAGS/PERMFLAGS/UIDNOTSTICKY/FIRSTUNSEEN are needed, we must + * do a SELECT/EXAMINE to get this information (data will be + * caught in the code below). */ + if (($flags & Horde_Imap_Client::STATUS_FIRSTUNSEEN) || + ($flags & Horde_Imap_Client::STATUS_FLAGS) || + ($flags & Horde_Imap_Client::STATUS_PERMFLAGS) || + ($flags & Horde_Imap_Client::STATUS_UIDNOTSTICKY)) { + $this->openMailbox($mailbox); + } + + $mbox_ob = $this->_mailboxOb($mailbox); + $data = $query = array(); + + foreach ($this->_statusFields as $key => $val) { + if (!($val & $flags)) { + continue; + } + + if ($val == Horde_Imap_Client::STATUS_HIGHESTMODSEQ) { + $c = $this->_capability(); + + /* Don't include modseq returns if server does not support + * it. */ + if (!$c->query('CONDSTORE')) { + continue; + } + + /* Even though CONDSTORE is available, it may not yet have + * been enabled. */ + $c->enable('CONDSTORE'); + $on_error = function() use ($c) { + $c->enable('CONDSTORE', false); + }; + } + + if ($mailbox->equals($this->_selected)) { + if (!is_null($tmp = $mbox_ob->getStatus($val))) { + $data[$key] = $tmp; + } elseif (($val == Horde_Imap_Client::STATUS_UIDNEXT) && + ($flags & Horde_Imap_Client::STATUS_UIDNEXT_FORCE)) { + /* UIDNEXT is not mandatory. */ + if ($mbox_ob->getStatus(Horde_Imap_Client::STATUS_MESSAGES) == 0) { + $data[$key] = 0; + } else { + $fquery = new Horde_Imap_Client_Fetch_Query(); + $fquery->uid(); + $fetch_res = $this->fetch($this->_selected, $fquery, array( + 'ids' => $this->getIdsOb(Horde_Imap_Client_Ids::LARGEST) + )); + $data[$key] = $fetch_res->first()->getUid() + 1; + } + } elseif (in_array($val, $unseen_flags)) { + /* RFC 3501 [6.3.1] - FIRSTUNSEEN information is not + * mandatory. If missing in EXAMINE/SELECT results, we + * need to do a search. An UNSEEN count also requires + * a search. */ + $squery = new Horde_Imap_Client_Search_Query(); + $squery->flag(Horde_Imap_Client::FLAG_SEEN, false); + $search = $this->search($mailbox, $squery, array( + 'results' => array( + Horde_Imap_Client::SEARCH_RESULTS_MIN, + Horde_Imap_Client::SEARCH_RESULTS_COUNT + ), + 'sequence' => true + )); + + $mbox_ob->setStatus(Horde_Imap_Client::STATUS_FIRSTUNSEEN, $search['min']); + $mbox_ob->setStatus(Horde_Imap_Client::STATUS_UNSEEN, $search['count']); + + $data[$key] = $mbox_ob->getStatus($val); + } + } else { + $query[] = $key; + } + } + + $out[strval($mailbox)] = $data; + + if (count($query)) { + $cmd = $this->_command('STATUS')->add(array( + $this->_getMboxFormatOb($mailbox), + new Horde_Imap_Client_Data_Format_List( + array_map('Horde_String::upper', $query) + ) + )); + $cmd->on_error = $on_error; + + $pipeline->add($cmd); + $to_process[] = array($query, $mailbox); + } + } + + if (count($pipeline)) { + $this->_sendCmd($pipeline); + + foreach ($to_process as $val) { + $out[strval($val[1])] += $this->_prepareStatusResponse($val[0], $val[1]); + } + } + + return $out; + } + + /** + * Parse a STATUS response (RFC 3501 [7.2.4]). + * + * @param Horde_Imap_Client_Tokenize $data Token data + */ + protected function _parseStatus(Horde_Imap_Client_Tokenize $data) + { + // Mailbox name is in UTF7-IMAP (unless UTF8 has been enabled). + $mbox_ob = $this->_mailboxOb( + Horde_Imap_Client_Mailbox::get( + $data->next(), + !$this->_capability()->isEnabled('UTF8=ACCEPT') + ) + ); + + $data->next(); + + while (($k = $data->next()) !== false) { + $mbox_ob->setStatus( + $this->_statusFields[Horde_String::lower($k)], + $data->next() + ); + } + } + + /** + * Prepares a status response for a mailbox. + * + * @param array $request The status keys to return. + * @param string $mailbox The mailbox to query. + */ + protected function _prepareStatusResponse($request, $mailbox) + { + $mbox_ob = $this->_mailboxOb($mailbox); + $out = array(); + + foreach ($request as $val) { + $out[$val] = $mbox_ob->getStatus($this->_statusFields[$val]); + } + + return $out; + } + + /** + */ + protected function _append(Horde_Imap_Client_Mailbox $mailbox, $data, + $options) + { + $c = $this->_capability(); + + // Check for MULTIAPPEND extension (RFC 3502) + if ((count($data) > 1) && !$c->query('MULTIAPPEND')) { + $result = $this->getIdsOb(); + foreach (array_keys($data) as $key) { + $res = $this->_append($mailbox, array($data[$key]), $options); + if (($res === true) || ($result === true)) { + $result = true; + } else { + $result->add($res); + } + } + return $result; + } + + // Check for extensions. + $binary = $c->query('BINARY'); + $catenate = $c->query('CATENATE'); + $utf8 = $c->isEnabled('UTF8=ACCEPT'); + + $asize = 0; + + $cmd = $this->_command('APPEND')->add( + $this->_getMboxFormatOb($mailbox) + ); + $cmd->literal8 = true; + + foreach (array_keys($data) as $key) { + if (!empty($data[$key]['flags'])) { + $tmp = new Horde_Imap_Client_Data_Format_List(); + foreach ($data[$key]['flags'] as $val) { + /* Ignore recent flag. RFC 3501 [9]: flag definition */ + if (strcasecmp($val, Horde_Imap_Client::FLAG_RECENT) !== 0) { + $tmp->add($val); + } + } + $cmd->add($tmp); + } + + if (!empty($data[$key]['internaldate'])) { + $cmd->add(new Horde_Imap_Client_Data_Format_DateTime($data[$key]['internaldate'])); + } + + $adata = null; + + if (is_array($data[$key]['data'])) { + if ($catenate) { + $cmd->add('CATENATE'); + $tmp = new Horde_Imap_Client_Data_Format_List(); + } else { + $data_stream = new Horde_Stream_Temp(); + } + + foreach ($data[$key]['data'] as $v) { + switch ($v['t']) { + case 'text': + if ($catenate) { + $tdata = $this->_appendData($v['v'], $asize); + if ($utf8) { + /* RFC 6855 [4]: CATENATE UTF8 extension. */ + $tdata->forceBinary(); + $tmp->add(array( + 'UTF8', + new Horde_Imap_Client_Data_Format_List($tdata) + )); + } else { + $tmp->add(array( + 'TEXT', + $tdata + )); + } + } else { + if (is_resource($v['v'])) { + rewind($v['v']); + } + $data_stream->add($v['v']); + } + break; + + case 'url': + if ($catenate) { + $tmp->add(array( + 'URL', + new Horde_Imap_Client_Data_Format_Astring($v['v']) + )); + } else { + $data_stream->add($this->_convertCatenateUrl($v['v'])); + } + break; + } + } + + if ($catenate) { + $cmd->add($tmp); + } else { + $adata = $this->_appendData($data_stream->stream, $asize); + } + } else { + $adata = $this->_appendData($data[$key]['data'], $asize); + } + + if (!is_null($adata)) { + if ($utf8) { + /* RFC 6855 [4]: APPEND UTF8 extension. */ + $adata->forceBinary(); + $cmd->add(array( + 'UTF8', + new Horde_Imap_Client_Data_Format_List($adata) + )); + } else { + $cmd->add($adata); + } + } + } + + /* Although it is normally more efficient to use LITERAL+, disable if + * payload is over 50 KB because it allows the server to throw error + * before we potentially push a lot of data to server that would + * otherwise be ignored (see RFC 4549 [4.2.2.3]). + * Additionally, since so many IMAP servers have issues with APPEND + * + BINARY, don't use LITERAL+ since servers may send BAD + * (incorrectly) after initial command. */ + $cmd->literalplus = (($asize < (1024 * 50)) && !$binary); + + // If the mailbox is currently selected read-only, we need to close + // because some IMAP implementations won't allow an append. And some + // implementations don't support append on ANY open mailbox. Be safe + // and always make sure we are in a non-selected state. + $this->close(); + + try { + $resp = $this->_sendCmd($cmd); + } catch (Horde_Imap_Client_Exception $e) { + switch ($e->getCode()) { + case $e::CATENATE_BADURL: + case $e::CATENATE_TOOBIG: + /* Cyrus 2.4 (at least as of .14) has a broken CATENATE (see + * Bug #11111). Regardless, if CATENATE is broken, we can try + * to fallback to APPEND. */ + $c->remove('CATENATE'); + return $this->_append($mailbox, $data, $options); + + case $e::DISCONNECT: + /* Workaround broken literal8 on Cyrus. */ + if ($binary) { + // Need to re-login first before removing capability. + $this->login(); + $c->remove('BINARY'); + return $this->_append($mailbox, $data, $options); + } + break; + } + + if (!empty($options['create']) && + !empty($e->resp_data['trycreate'])) { + $this->createMailbox($mailbox); + unset($options['create']); + return $this->_append($mailbox, $data, $options); + } + + /* RFC 3516/4466 says we should be able to append binary data + * using literal8 "~{#} format", but it doesn't seem to work on + * all servers tried (UW-IMAP/Cyrus). Do a last-ditch check for + * broken BINARY and attempt to fix here. */ + if ($c->query('BINARY') && + ($e instanceof Horde_Imap_Client_Exception_ServerResponse)) { + switch ($e->status) { + case Horde_Imap_Client_Interaction_Server::BAD: + case Horde_Imap_Client_Interaction_Server::NO: + $c->remove('BINARY'); + return $this->_append($mailbox, $data, $options); + } + } + + throw $e; + } + + /* If we reach this point and have data in 'appenduid', UIDPLUS (RFC + * 4315) has done the dirty work for us. */ + return isset($resp->data['appenduid']) + ? $resp->data['appenduid'] + : true; + } + + /** + * Prepares append message data for insertion into the IMAP command + * string. + * + * @param mixed $data Either a resource or a string. + * @param integer &$asize Total append size. + * + * @return Horde_Imap_Client_Data_Format_String_Nonascii The data object. + */ + protected function _appendData($data, &$asize) + { + if (is_resource($data)) { + rewind($data); + } + + /* Since this is body text, with possible embedded charset + * information, non-ASCII characters are supported. */ + $ob = new Horde_Imap_Client_Data_Format_String_Nonascii($data, array( + 'eol' => true, + 'skipscan' => true + )); + + // APPEND data MUST be sent in a literal (RFC 3501 [6.3.11]). + $ob->forceLiteral(); + + $asize += $ob->length(); + + return $ob; + } + + /** + * Converts a CATENATE URL to stream data. + * + * @param string $url The CATENATE URL. + * + * @return resource A stream containing the data. + */ + protected function _convertCatenateUrl($url) + { + $e = $part = null; + $url = new Horde_Imap_Client_Url_Imap($url); + + if (!is_null($url->mailbox) && !is_null($url->uid)) { + try { + $status_res = is_null($url->uidvalidity) + ? null + : $this->status($url->mailbox, Horde_Imap_Client::STATUS_UIDVALIDITY); + + if (is_null($status_res) || + ($status_res['uidvalidity'] == $url->uidvalidity)) { + if (!isset($this->_temp['catenate_ob'])) { + $this->_temp['catenate_ob'] = new Horde_Imap_Client_Socket_Catenate($this); + } + $part = $this->_temp['catenate_ob']->fetchFromUrl($url); + } + } catch (Horde_Imap_Client_Exception $e) {} + } + + if (is_null($part)) { + $message = 'Bad IMAP URL given in CATENATE data: ' . strval($url); + if ($e) { + $message .= ' ' . $e->getMessage(); + } + + throw new InvalidArgumentException($message); + } + + return $part; + } + + /** + */ + protected function _check() + { + // CHECK returns no untagged information (RFC 3501 [6.4.1]) + $this->_sendCmd($this->_command('CHECK')); + } + + /** + */ + protected function _close($options) + { + if (empty($options['expunge'])) { + if ($this->_capability('UNSELECT')) { + // RFC 3691 defines 'UNSELECT' for precisely this purpose + $this->_sendCmd($this->_command('UNSELECT')); + } else { + /* RFC 3501 [6.4.2]: to close a mailbox without expunge, + * select a non-existent mailbox. */ + try { + $this->_sendCmd($this->_command('EXAMINE')->add( + $this->_getMboxFormatOb("\24nonexist\24") + )); + + /* Not pipelining, since the odds that this CLOSE is even + * needed is tiny; and it returns BAD, which should be + * avoided, if possible. */ + $this->_sendCmd($this->_command('CLOSE')); + } catch (Horde_Imap_Client_Exception_ServerResponse $e) { + // Ignore error; it is expected. + } + } + } else { + // If caching, we need to know the UIDs being deleted, so call + // expunge() before calling close(). + if ($this->_initCache(true)) { + $this->expunge($this->_selected); + } + + // CLOSE returns no untagged information (RFC 3501 [6.4.2]) + $this->_sendCmd($this->_command('CLOSE')); + } + } + + /** + */ + protected function _expunge($options) + { + $expunged_ob = $modseq = null; + $ids = $options['ids']; + $list_msgs = !empty($options['list']); + $mailbox = $this->_selected; + $uidplus = $this->_capability('UIDPLUS'); + $unflag = array(); + $use_cache = $this->_initCache(true); + + if ($ids->all) { + if (!$uidplus || $list_msgs || $use_cache) { + $ids = $this->resolveIds($mailbox, $ids, 2); + } + } elseif ($uidplus) { + /* If QRESYNC is not available, and we are returning the list of + * expunged messages (or we are caching), we have to make sure we + * have a mapping of Sequence -> UIDs. If we have QRESYNC, the + * server SHOULD return a VANISHED response with UIDs. However, + * even if the server returns EXPUNGEs instead, we can use + * vanished() to grab the list. */ + unset($this->_temp['search_save']); + if ($this->_capability()->isEnabled('QRESYNC')) { + $ids = $this->resolveIds($mailbox, $ids, 1); + if ($list_msgs) { + $modseq = $this->_mailboxOb()->getStatus(Horde_Imap_Client::STATUS_HIGHESTMODSEQ); + } + } else { + $ids = $this->resolveIds($mailbox, $ids, ($list_msgs || $use_cache) ? 2 : 1); + } + if (!empty($this->_temp['search_save'])) { + $ids = $this->getIdsOb(Horde_Imap_Client_Ids::SEARCH_RES); + } + } else { + /* Without UIDPLUS, need to temporarily unflag all messages marked + * as deleted but not a part of requested IDs to delete. Use NOT + * searches to accomplish this goal. */ + $squery = new Horde_Imap_Client_Search_Query(); + $squery->flag(Horde_Imap_Client::FLAG_DELETED, true); + $squery->ids($ids, true); + + $s_res = $this->search($mailbox, $squery, array( + 'results' => array( + Horde_Imap_Client::SEARCH_RESULTS_MATCH, + Horde_Imap_Client::SEARCH_RESULTS_SAVE + ) + )); + + $this->store($mailbox, array( + 'ids' => empty($s_res['save']) ? $s_res['match'] : $this->getIdsOb(Horde_Imap_Client_Ids::SEARCH_RES), + 'remove' => array(Horde_Imap_Client::FLAG_DELETED) + )); + + $unflag = $s_res['match']; + } + + if ($list_msgs) { + $expunged_ob = $this->getIdsOb(); + $this->_temp['expunged'] = $expunged_ob; + } + + /* Always use UID EXPUNGE if available. */ + if ($uidplus) { + /* We can only pipeline STORE w/ EXPUNGE if using UIDs and UIDPLUS + * is available. */ + if (empty($options['delete'])) { + $pipeline = $this->_pipeline(); + } else { + $pipeline = $this->_storeCmd(array( + 'add' => array( + Horde_Imap_Client::FLAG_DELETED + ), + 'ids' => $ids + )); + } + + foreach ($ids->split(2000) as $val) { + $pipeline->add( + $this->_command('UID EXPUNGE')->add($val) + ); + } + + $resp = $this->_sendCmd($pipeline); + } else { + if (!empty($options['delete'])) { + $this->store($mailbox, array( + 'add' => array(Horde_Imap_Client::FLAG_DELETED), + 'ids' => $ids + )); + } + + if ($use_cache || $list_msgs) { + $this->_sendCmd($this->_command('EXPUNGE')); + } else { + /* This is faster than an EXPUNGE because the server will not + * return untagged EXPUNGE responses. We can only do this if + * we are not updating cache information. */ + $this->close(array('expunge' => true)); + } + } + + unset($this->_temp['expunged']); + + if (!empty($unflag)) { + $this->store($mailbox, array( + 'add' => array(Horde_Imap_Client::FLAG_DELETED), + 'ids' => $unflag + )); + } + + if (!is_null($modseq) && !empty($resp->data['expunge_seen'])) { + /* There's a chance we actually did a full map of sequence -> UID, + * but this code should never be reached in the first place so + * be ultra-safe and just do a full VANISHED search. */ + $expunged_ob = $this->vanished($mailbox, $modseq, array( + 'ids' => $ids + )); + $this->_deleteMsgs($mailbox, $expunged_ob, array( + 'pipeline' => $resp + )); + } + + return $expunged_ob; + } + + /** + * Parse a VANISHED response (RFC 7162 [3.2.10]). + * + * @param Horde_Imap_Client_Interaction_Pipeline $pipeline Pipeline + * object. + * @param Horde_Imap_Client_Tokenize $data The response data. + */ + protected function _parseVanished( + Horde_Imap_Client_Interaction_Pipeline $pipeline, + Horde_Imap_Client_Tokenize $data + ) + { + /* There are two forms of VANISHED. VANISHED (EARLIER) will be sent + * in a FETCH (VANISHED) or SELECT/EXAMINE (QRESYNC) call. + * If this is the case, we can go ahead and update the cache + * immediately (we know we are caching or else QRESYNC would not be + * enabled). HIGHESTMODSEQ information will be updated via the tagged + * response. */ + if (($curr = $data->next()) === true) { + if (Horde_String::upper($data->next()) === 'EARLIER') { + /* Caching is guaranteed to be active if we are using + * QRESYNC. */ + $data->next(); + $vanished = $this->getIdsOb($data->next()); + if (isset($pipeline->data['vanished'])) { + $pipeline->data['vanished']->add($vanished); + } else { + $this->_deleteMsgs($this->_selected, $vanished, array( + 'pipeline' => $pipeline + )); + } + } + } else { + /* The second form is just VANISHED. This is analogous to EXPUNGE + * and requires the message count to decrement. */ + $this->_deleteMsgs($this->_selected, $this->getIdsOb($curr), array( + 'decrement' => true, + 'pipeline' => $pipeline + )); + } + } + + /** + * Search a mailbox. This driver supports all IMAP4rev1 search criteria + * as defined in RFC 3501. + */ + protected function _search($query, $options) + { + $sort_criteria = array( + Horde_Imap_Client::SORT_ARRIVAL => 'ARRIVAL', + Horde_Imap_Client::SORT_CC => 'CC', + Horde_Imap_Client::SORT_DATE => 'DATE', + Horde_Imap_Client::SORT_DISPLAYFROM => 'DISPLAYFROM', + Horde_Imap_Client::SORT_DISPLAYTO => 'DISPLAYTO', + Horde_Imap_Client::SORT_FROM => 'FROM', + Horde_Imap_Client::SORT_REVERSE => 'REVERSE', + Horde_Imap_Client::SORT_RELEVANCY => 'RELEVANCY', + // This is a bogus entry to allow the sort options check to + // correctly work below. + Horde_Imap_Client::SORT_SEQUENCE => 'SEQUENCE', + Horde_Imap_Client::SORT_SIZE => 'SIZE', + Horde_Imap_Client::SORT_SUBJECT => 'SUBJECT', + Horde_Imap_Client::SORT_TO => 'TO' + ); + + $results_criteria = array( + Horde_Imap_Client::SEARCH_RESULTS_COUNT => 'COUNT', + Horde_Imap_Client::SEARCH_RESULTS_MATCH => 'ALL', + Horde_Imap_Client::SEARCH_RESULTS_MAX => 'MAX', + Horde_Imap_Client::SEARCH_RESULTS_MIN => 'MIN', + Horde_Imap_Client::SEARCH_RESULTS_RELEVANCY => 'RELEVANCY', + Horde_Imap_Client::SEARCH_RESULTS_SAVE => 'SAVE' + ); + + // Check if the server supports sorting (RFC 5256). + $esearch = $return_sort = $server_seq_sort = $server_sort = false; + if (!empty($options['sort'])) { + /* Make sure sort options are correct. If not, default to no + * sort. */ + if (count(array_intersect($options['sort'], array_keys($sort_criteria))) === 0) { + unset($options['sort']); + } else { + $return_sort = true; + + if ($this->_capability('SORT')) { + /* Make sure server supports DISPLAYFROM & DISPLAYTO. */ + $server_sort = + !array_intersect($options['sort'], array(Horde_Imap_Client::SORT_DISPLAYFROM, Horde_Imap_Client::SORT_DISPLAYTO)) || + $this->_capability('SORT', 'DISPLAY'); + } + + /* If doing a sequence sort, need to do this on the client + * side. */ + if ($server_sort && + in_array(Horde_Imap_Client::SORT_SEQUENCE, $options['sort'])) { + $server_sort = false; + + /* Optimization: If doing only a sequence sort, just do a + * simple search and sort UIDs/sequences on client side. */ + switch (count($options['sort'])) { + case 1: + $server_seq_sort = true; + break; + + case 2: + $server_seq_sort = (reset($options['sort']) == Horde_Imap_Client::SORT_REVERSE); + break; + } + } + } + } + + $charset = is_null($options['_query']['charset']) + ? 'US-ASCII' + : $options['_query']['charset']; + $partial = false; + + if ($server_sort) { + $cmd = $this->_command( + empty($options['sequence']) ? 'UID SORT' : 'SORT' + ); + $results = array(); + + // Use ESEARCH (RFC 4466) response if server supports. + $esearch = false; + + // Check for ESORT capability (RFC 5267) + if ($this->_capability('ESORT')) { + foreach ($options['results'] as $val) { + if (isset($results_criteria[$val]) && + ($val != Horde_Imap_Client::SEARCH_RESULTS_SAVE)) { + $results[] = $results_criteria[$val]; + } + } + $esearch = true; + } + + // Add PARTIAL limiting (RFC 5267 [4.4]) + if ((!$esearch || !empty($options['partial'])) && + $this->_capability('CONTEXT', 'SORT')) { + /* RFC 5267 indicates RFC 4466 ESEARCH-like support, + * notwithstanding "real" RFC 4731 support. */ + $esearch = true; + + if (!empty($options['partial'])) { + /* Can't have both ALL and PARTIAL returns. */ + $results = array_diff($results, array('ALL')); + + $results[] = 'PARTIAL'; + $results[] = $options['partial']; + $partial = true; + } + } + + if ($esearch && empty($this->_init['noesearch'])) { + $cmd->add(array( + 'RETURN', + new Horde_Imap_Client_Data_Format_List($results) + )); + } + + $tmp = new Horde_Imap_Client_Data_Format_List(); + foreach ($options['sort'] as $val) { + if (isset($sort_criteria[$val])) { + $tmp->add($sort_criteria[$val]); + } + } + $cmd->add($tmp); + + /* Charset is mandatory for SORT (RFC 5256 [3]). + * If UTF-8 support is activated, a client MUST ONLY + * send the 'UTF-8' specification (RFC 6855 [3]; Errata 4029). */ + if (!$this->_capability()->isEnabled('UTF8=ACCEPT')) { + $cmd->add($charset); + } else { + $cmd->add('UTF-8'); + } + } else { + $cmd = $this->_command( + empty($options['sequence']) ? 'UID SEARCH' : 'SEARCH' + ); + $esearch = false; + $results = array(); + + // Check if the server supports ESEARCH (RFC 4731). + if ($this->_capability('ESEARCH')) { + foreach ($options['results'] as $val) { + if (isset($results_criteria[$val])) { + $results[] = $results_criteria[$val]; + } + } + $esearch = true; + } + + // Add PARTIAL limiting (RFC 5267 [4.4]). + if ((!$esearch || !empty($options['partial'])) && + $this->_capability('CONTEXT', 'SEARCH')) { + /* RFC 5267 indicates RFC 4466 ESEARCH-like support, + * notwithstanding "real" RFC 4731 support. */ + $esearch = true; + + if (!empty($options['partial'])) { + // Can't have both ALL and PARTIAL returns. + $results = array_diff($results, array('ALL')); + + $results[] = 'PARTIAL'; + $results[] = $options['partial']; + $partial = true; + } + } + + if ($esearch && empty($this->_init['noesearch'])) { + // Always use ESEARCH if available because it returns results + // in a more compact sequence-set list + $cmd->add(array( + 'RETURN', + new Horde_Imap_Client_Data_Format_List($results) + )); + } + + /* Charset is optional for SEARCH (RFC 3501 [6.4.4]). + * If UTF-8 support is activated, a client MUST NOT + * send the charset specification (RFC 6855 [3]; Errata 4029). */ + if (($charset != 'US-ASCII') && + !$this->_capability()->isEnabled('UTF8=ACCEPT')) { + $cmd->add(array( + 'CHARSET', + $options['_query']['charset'] + )); + } + } + + $cmd->add($options['_query']['query'], true); + + $pipeline = $this->_pipeline($cmd); + $pipeline->data['esearchresp'] = array(); + $er = &$pipeline->data['esearchresp']; + $pipeline->data['searchresp'] = $this->getIdsOb(array(), !empty($options['sequence'])); + $sr = &$pipeline->data['searchresp']; + + try { + $resp = $this->_sendCmd($pipeline); + } catch (Horde_Imap_Client_Exception $e) { + if (($e instanceof Horde_Imap_Client_Exception_ServerResponse) && + ($e->status === Horde_Imap_Client_Interaction_Server::NO) && + ($charset != 'US-ASCII')) { + /* RFC 3501 [6.4.4]: BADCHARSET response code is only a + * SHOULD return. If it doesn't exist, need to check for + * command status of 'NO'. List of supported charsets in + * the BADCHARSET response has already been parsed and stored + * at this point. */ + $this->search_charset->setValid($charset, false); + $e->setCode(Horde_Imap_Client_Exception::BADCHARSET); + } + + if (empty($this->_temp['search_retry'])) { + $this->_temp['search_retry'] = true; + + /* Bug #9842: Workaround broken Cyrus servers (as of + * 2.4.7). */ + if ($esearch && ($charset != 'US-ASCII')) { + $this->_capability()->remove('ESEARCH'); + $this->_setInit('noesearch', true); + + try { + return $this->_search($query, $options); + } catch (Horde_Imap_Client_Exception $e) {} + } + + /* Try to convert charset. */ + if (($e->getCode() === Horde_Imap_Client_Exception::BADCHARSET) && + ($charset != 'US-ASCII')) { + foreach ($this->search_charset->charsets as $val) { + $this->_temp['search_retry'] = 1; + $new_query = clone($query); + try { + $new_query->charset($val); + $options['_query'] = $new_query->build($this); + return $this->_search($new_query, $options); + } catch (Horde_Imap_Client_Exception $e) {} + } + } + + unset($this->_temp['search_retry']); + } + + throw $e; + } + + if ($return_sort && !$server_sort) { + if ($server_seq_sort) { + $sr->sort(); + if (reset($options['sort']) == Horde_Imap_Client::SORT_REVERSE) { + $sr->reverse(); + } + } else { + if (!isset($this->_temp['clientsort'])) { + $this->_temp['clientsort'] = new Horde_Imap_Client_Socket_ClientSort($this); + } + $sr = $this->getIdsOb($this->_temp['clientsort']->clientSort($sr, $options), !empty($options['sequence'])); + } + } + + if (!$partial && !empty($options['partial'])) { + $partial = $this->getIdsOb($options['partial'], true); + $min = $partial->min - 1; + + $sr = $this->getIdsOb( + array_slice($sr->ids, $min, $partial->max - $min), + !empty($options['sequence']) + ); + } + + $ret = array(); + foreach ($options['results'] as $val) { + switch ($val) { + case Horde_Imap_Client::SEARCH_RESULTS_COUNT: + $ret['count'] = ($esearch && !$partial) + ? $er['count'] + : count($sr); + break; + + case Horde_Imap_Client::SEARCH_RESULTS_MATCH: + $ret['match'] = $sr; + break; + + case Horde_Imap_Client::SEARCH_RESULTS_MAX: + $ret['max'] = $esearch + ? (!$partial && isset($er['max']) ? $er['max'] : null) + : (count($sr) ? max($sr->ids) : null); + break; + + case Horde_Imap_Client::SEARCH_RESULTS_MIN: + $ret['min'] = $esearch + ? (!$partial && isset($er['min']) ? $er['min'] : null) + : (count($sr) ? min($sr->ids) : null); + break; + + case Horde_Imap_Client::SEARCH_RESULTS_RELEVANCY: + $ret['relevancy'] = ($esearch && isset($er['relevancy'])) ? $er['relevancy'] : array(); + break; + + case Horde_Imap_Client::SEARCH_RESULTS_SAVE: + $this->_temp['search_save'] = $ret['save'] = $esearch ? empty($resp->data['searchnotsaved']) : false; + break; + } + } + + // Add modseq data, if needed. + if (!empty($er['modseq'])) { + $ret['modseq'] = $er['modseq']; + } + + unset($this->_temp['search_retry']); + + /* Check for EXPUNGEISSUED (RFC 2180 [4.3]/RFC 5530 [3]). */ + if (!empty($resp->data['expungeissued'])) { + $this->noop(); + } + + return $ret; + } + + /** + * Parse a SEARCH/SORT response (RFC 3501 [7.2.5]; RFC 4466 [3]; + * RFC 5256 [4]; RFC 5267 [3]). + * + * @param Horde_Imap_Client_Interaction_Pipeline $pipeline Pipeline + * object. + * @param array $data A list of IDs (message sequence numbers or UIDs). + */ + protected function _parseSearch( + Horde_Imap_Client_Interaction_Pipeline $pipeline, + $data + ) + { + /* More than one search response may be sent. */ + $pipeline->data['searchresp']->add($data); + } + + /** + * Parse an ESEARCH response (RFC 4466 [2.6.2]) + * Format: (TAG "a567") UID COUNT 5 ALL 4:19,21,28 + * + * @param Horde_Imap_Client_Interaction_Pipeline $pipeline Pipeline + * object. + * @param Horde_Imap_Client_Tokenize $data The server response. + */ + protected function _parseEsearch( + Horde_Imap_Client_Interaction_Pipeline $pipeline, + Horde_Imap_Client_Tokenize $data + ) + { + // Ignore search correlator information + if ($data->next() === true) { + $data->flushIterator(false); + } + + // Ignore UID tag + $current = $data->next(); + if (Horde_String::upper($current) === 'UID') { + $current = $data->next(); + } + + do { + $val = $data->next(); + $tag = Horde_String::upper($current); + + switch ($tag) { + case 'ALL': + $this->_parseSearch($pipeline, $val); + break; + + case 'COUNT': + case 'MAX': + case 'MIN': + case 'MODSEQ': + case 'RELEVANCY': + $pipeline->data['esearchresp'][Horde_String::lower($tag)] = $val; + break; + + case 'PARTIAL': + // RFC 5267 [4.4] + $partial = $val->flushIterator(); + $this->_parseSearch($pipeline, end($partial)); + break; + } + } while (($current = $data->next()) !== false); + } + + /** + */ + protected function _setComparator($comparator) + { + $cmd = $this->_command('COMPARATOR'); + foreach ($comparator as $val) { + $cmd->add(new Horde_Imap_Client_Data_Format_Astring($val)); + } + $this->_sendCmd($cmd); + } + + /** + */ + protected function _getComparator() + { + $resp = $this->_sendCmd($this->_command('COMPARATOR')); + + return isset($resp->data['comparator']) + ? $resp->data['comparator'] + : null; + } + + /** + * Parse a COMPARATOR response (RFC 5255 [4.8]) + * + * @param Horde_Imap_Client_Interaction_Pipeline $pipeline Pipeline + * object. + * @param Horde_Imap_Client_Tokenize $data The server response. + */ + protected function _parseComparator( + Horde_Imap_Client_Interaction_Pipeline $pipeline, + $data + ) + { + $pipeline->data['comparator'] = $data->next(); + // Ignore optional matching comparator list + } + + /** + * @throws Horde_Imap_Client_Exception_NoSupportExtension + */ + protected function _thread($options) + { + $thread_criteria = array( + Horde_Imap_Client::THREAD_ORDEREDSUBJECT => 'ORDEREDSUBJECT', + Horde_Imap_Client::THREAD_REFERENCES => 'REFERENCES', + Horde_Imap_Client::THREAD_REFS => 'REFS' + ); + + $tsort = (isset($options['criteria'])) + ? (is_string($options['criteria']) ? Horde_String::upper($options['criteria']) : $thread_criteria[$options['criteria']]) + : 'ORDEREDSUBJECT'; + + if (!$this->_capability('THREAD', $tsort)) { + switch ($tsort) { + case 'ORDEREDSUBJECT': + if (empty($options['search'])) { + $ids = $this->getIdsOb(Horde_Imap_Client_Ids::ALL, !empty($options['sequence'])); + } else { + $search_res = $this->search($this->_selected, $options['search'], array('sequence' => !empty($options['sequence']))); + $ids = $search_res['match']; + } + + /* Do client-side ORDEREDSUBJECT threading. */ + $query = new Horde_Imap_Client_Fetch_Query(); + $query->envelope(); + $query->imapDate(); + + $fetch_res = $this->fetch($this->_selected, $query, array( + 'ids' => $ids + )); + + if (!isset($this->_temp['clientsort'])) { + $this->_temp['clientsort'] = new Horde_Imap_Client_Socket_ClientSort($this); + } + return $this->_temp['clientsort']->threadOrderedSubject($fetch_res, empty($options['sequence'])); + + case 'REFERENCES': + case 'REFS': + throw new Horde_Imap_Client_Exception_NoSupportExtension( + 'THREAD', + sprintf('Server does not support "%s" thread sort.', $tsort) + ); + } + } + + $cmd = $this->_command( + empty($options['sequence']) ? 'UID THREAD' : 'THREAD' + )->add($tsort); + + /* If UTF-8 support is activated, a client MUST send the UTF-8 + * charset specification since charset is mandatory for this + * command (RFC 6855 [3]; Errata 4029). */ + if (empty($options['search'])) { + if (!$this->_capability()->isEnabled('UTF8=ACCEPT')) { + $cmd->add('US-ASCII'); + } else { + $cmd->add('UTF-8'); + } + $cmd->add('ALL'); + } else { + $search_query = $options['search']->build(); + if (!$this->_capability()->isEnabled('UTF8=ACCEPT')) { + $cmd->add(is_null($search_query['charset']) ? 'US-ASCII' : $search_query['charset']); + } + $cmd->add($search_query['query'], true); + } + + return new Horde_Imap_Client_Data_Thread( + $this->_sendCmd($cmd)->data['threadparse'], + empty($options['sequence']) ? 'uid' : 'sequence' + ); + } + + /** + * Parse a THREAD response (RFC 5256 [4]). + * + * @param Horde_Imap_Client_Interaction_Pipeline $pipeline Pipeline + * object. + * @param Horde_Imap_Client_Tokenize $data Thread data. + */ + protected function _parseThread( + Horde_Imap_Client_Interaction_Pipeline $pipeline, + Horde_Imap_Client_Tokenize $data + ) + { + $out = array(); + + while ($data->next() !== false) { + $thread = array(); + $this->_parseThreadLevel($thread, $data); + $out[] = $thread; + } + + $pipeline->data['threadparse'] = $out; + } + + /** + * Parse a level of a THREAD response (RFC 5256 [4]). + * + * @param array $thread Results. + * @param Horde_Imap_Client_Tokenize $data Thread data. + * @param integer $level The current tree level. + */ + protected function _parseThreadLevel(&$thread, + Horde_Imap_Client_Tokenize $data, + $level = 0) + { + while (($curr = $data->next()) !== false) { + if ($curr === true) { + $this->_parseThreadLevel($thread, $data, $level); + } elseif (!is_bool($curr)) { + $thread[$curr] = $level++; + } + } + } + + /** + */ + protected function _fetch(Horde_Imap_Client_Fetch_Results $results, + $queries) + { + $pipeline = $this->_pipeline(); + $pipeline->data['fetch_lookup'] = array(); + $pipeline->data['fetch_followup'] = array(); + + foreach ($queries as $options) { + $this->_fetchCmd($pipeline, $options); + $sequence = $options['ids']->sequence; + } + + try { + $resp = $this->_sendCmd($pipeline); + + /* Check for EXPUNGEISSUED (RFC 2180 [4.1]/RFC 5530 [3]). */ + if (!empty($resp->data['expungeissued'])) { + $this->noop(); + } + + foreach ($resp->fetch as $k => $v) { + $results->get($sequence ? $k : $v->getUid())->merge($v); + } + } catch (Horde_Imap_Client_Exception_ServerResponse $e) { + if ($e->status === Horde_Imap_Client_Interaction_Server::NO) { + if ($e->getCode() === $e::UNKNOWNCTE || + $e->getCode() === $e::PARSEERROR) { + /* UNKNOWN-CTE error. Redo the query without the BINARY + * elements. Also include PARSEERROR in this as + * Dovecot >= 2.2 binary fetch treats broken email as PARSE + * error and no longer UNKNOWN-CTE + */ + if (!empty($pipeline->data['binaryquery'])) { + foreach ($queries as $val) { + foreach ($pipeline->data['binaryquery'] as $key2 => $val2) { + unset($val2['decode']); + $val['_query']->bodyPart($key2, $val2); + $val['_query']->remove(Horde_Imap_Client::FETCH_BODYPARTSIZE, $key2); + } + $pipeline->data['fetch_followup'][] = $val; + } + $pipeline->data['fetch_followup'][] = $val; + } else { + $this->noop(); + } + } elseif ($sequence) { + /* A NO response, when coupled with a sequence FETCH, most + * likely means that messages were expunged. (RFC 2180 + * [4.1]) */ + $this->noop(); + } + } + } catch (Exception $e) { + // For any other error, ignore the Exception - fetch() is nice in + // that the return value explicitly handles missing data for any + // given message. + } + + if (!empty($pipeline->data['fetch_followup'])) { + $this->_fetch($results, $pipeline->data['fetch_followup']); + } + } + + /** + * Add a FETCH command to the given pipeline. + * + * @param Horde_Imap_Client_Interaction_Pipeline $pipeline Pipeline + * object. + * @param array $options Fetch query + * options + */ + protected function _fetchCmd( + Horde_Imap_Client_Interaction_Pipeline $pipeline, + $options + ) + { + $fetch = new Horde_Imap_Client_Data_Format_List(); + $sequence = $options['ids']->sequence; + + /* Build an IMAP4rev1 compliant FETCH query. We handle the following + * criteria: + * BINARY[.PEEK][
]<> (RFC 3516) + * see BODY[] response + * BINARY.SIZE[
] (RFC 3516) + * BODY[.PEEK][
]<> + *
= HEADER, HEADER.FIELDS, HEADER.FIELDS.NOT, MIME, + * TEXT, empty + * <> = 0.# (# of bytes) + * BODYSTRUCTURE + * ENVELOPE + * FLAGS + * INTERNALDATE + * MODSEQ (RFC 7162) + * RFC822.SIZE + * UID + * + * No need to support these (can be built from other queries): + * =========================================================== + * ALL macro => (FLAGS INTERNALDATE RFC822.SIZE ENVELOPE) + * BODY => Use BODYSTRUCTURE instead + * FAST macro => (FLAGS INTERNALDATE RFC822.SIZE) + * FULL macro => (FLAGS INTERNALDATE RFC822.SIZE ENVELOPE BODY) + * RFC822 => BODY[] + * RFC822.HEADER => BODY[HEADER] + * RFC822.TEXT => BODY[TEXT] + */ + + foreach ($options['_query'] as $type => $c_val) { + switch ($type) { + case Horde_Imap_Client::FETCH_STRUCTURE: + $fetch->add('BODYSTRUCTURE'); + break; + + case Horde_Imap_Client::FETCH_FULLMSG: + if (empty($c_val['peek'])) { + $this->openMailbox($this->_selected, Horde_Imap_Client::OPEN_READWRITE); + } + $fetch->add( + 'BODY' . + (!empty($c_val['peek']) ? '.PEEK' : '') . + '[]' . + $this->_partialAtom($c_val) + ); + break; + + case Horde_Imap_Client::FETCH_HEADERTEXT: + case Horde_Imap_Client::FETCH_BODYTEXT: + case Horde_Imap_Client::FETCH_MIMEHEADER: + case Horde_Imap_Client::FETCH_BODYPART: + case Horde_Imap_Client::FETCH_HEADERS: + foreach ($c_val as $key => $val) { + $cmd = ($key == 0) + ? '' + : $key . '.'; + $main_cmd = 'BODY'; + + switch ($type) { + case Horde_Imap_Client::FETCH_HEADERTEXT: + $cmd .= 'HEADER'; + break; + + case Horde_Imap_Client::FETCH_BODYTEXT: + $cmd .= 'TEXT'; + break; + + case Horde_Imap_Client::FETCH_MIMEHEADER: + $cmd .= 'MIME'; + break; + + case Horde_Imap_Client::FETCH_BODYPART: + // Remove the last dot from the string. + $cmd = substr($cmd, 0, -1); + + if (!empty($val['decode']) && + $this->_capability('BINARY')) { + $main_cmd = 'BINARY'; + $pipeline->data['binaryquery'][$key] = $val; + } + break; + + case Horde_Imap_Client::FETCH_HEADERS: + $cmd .= 'HEADER.FIELDS'; + if (!empty($val['notsearch'])) { + $cmd .= '.NOT'; + } + $cmd .= ' (' . implode(' ', array_map('Horde_String::upper', $val['headers'])) . ')'; + + // Maintain a command -> label lookup so we can put + // the results in the proper location. + $pipeline->data['fetch_lookup'][$cmd] = $key; + } + + if (empty($val['peek'])) { + $this->openMailbox($this->_selected, Horde_Imap_Client::OPEN_READWRITE); + } + + $fetch->add( + $main_cmd . + (!empty($val['peek']) ? '.PEEK' : '') . + '[' . $cmd . ']' . + $this->_partialAtom($val) + ); + } + break; + + case Horde_Imap_Client::FETCH_BODYPARTSIZE: + if ($this->_capability('BINARY')) { + foreach ($c_val as $val) { + $fetch->add('BINARY.SIZE[' . $val . ']'); + } + } + break; + + case Horde_Imap_Client::FETCH_ENVELOPE: + $fetch->add('ENVELOPE'); + break; + + case Horde_Imap_Client::FETCH_FLAGS: + $fetch->add('FLAGS'); + break; + + case Horde_Imap_Client::FETCH_IMAPDATE: + $fetch->add('INTERNALDATE'); + break; + + case Horde_Imap_Client::FETCH_SIZE: + $fetch->add('RFC822.SIZE'); + break; + + case Horde_Imap_Client::FETCH_UID: + /* A UID FETCH will always return UID information (RFC 3501 + * [6.4.8]). Don't add to query as it just creates a longer + * FETCH command. */ + if ($sequence) { + $fetch->add('UID'); + } + break; + + case Horde_Imap_Client::FETCH_SEQ: + /* Nothing we need to add to fetch request unless sequence is + * the only criteria (see below). */ + break; + + case Horde_Imap_Client::FETCH_MODSEQ: + /* The 'changedsince' modifier implicitly adds the MODSEQ + * FETCH item (RFC 7162 [3.1.4.1]). Don't add to query as it + * just creates a longer FETCH command. */ + if (empty($options['changedsince'])) { + $fetch->add('MODSEQ'); + } + break; + } + } + + /* If empty fetch, add UID to make command valid. */ + if (!count($fetch)) { + $fetch->add('UID'); + } + + /* Add changedsince parameters. */ + if (empty($options['changedsince'])) { + $fetch_cmd = $fetch; + } else { + /* We might just want the list of UIDs changed since a given + * modseq. In that case, we don't have any other FETCH attributes, + * but RFC 3501 requires at least one specified attribute. */ + $fetch_cmd = array( + $fetch, + new Horde_Imap_Client_Data_Format_List(array( + 'CHANGEDSINCE', + new Horde_Imap_Client_Data_Format_Number($options['changedsince']) + )) + ); + } + + /* The FETCH command should be the only command issued by this library + * that should ever approach the command length limit. + * @todo Move this check to a more centralized location (_command()?). + * For simplification, assume that the UID list is the limiting factor + * and split this list at a sequence comma delimiter if it exceeds + * the character limit. */ + foreach ($options['ids']->split($this->_capability()->cmdlength) as $val) { + $cmd = $this->_command( + $sequence ? 'FETCH' : 'UID FETCH' + )->add(array( + $val, + $fetch_cmd + )); + $pipeline->add($cmd); + } + } + + /** + * Add a partial atom to an IMAP command based on the criteria options. + * + * @param array $opts Criteria options. + * + * @return string The partial atom. + */ + protected function _partialAtom($opts) + { + if (!empty($opts['length'])) { + return '<' . (empty($opts['start']) ? 0 : intval($opts['start'])) . '.' . intval($opts['length']) . '>'; + } + + return empty($opts['start']) + ? '' + : ('<' . intval($opts['start']) . '>'); + } + + /** + * Parse a FETCH response (RFC 3501 [7.4.2]). A FETCH response may occur + * due to a FETCH command, or due to a change in a message's state (i.e. + * the flags change). + * + * @param Horde_Imap_Client_Interaction_Pipeline $pipeline Pipeline + * object. + * @param integer $id The message sequence number. + * @param Horde_Imap_Client_Tokenize $data The server response. + */ + protected function _parseFetch( + Horde_Imap_Client_Interaction_Pipeline $pipeline, + $id, + Horde_Imap_Client_Tokenize $data + ) + { + if ($data->next() !== true) { + return; + } + + $ob = $pipeline->fetch->get($id); + $ob->setSeq($id); + + $flags = $modseq = $uid = false; + + while (($tag = $data->next()) !== false) { + $tag = Horde_String::upper($tag); + + /* Catch equivalent RFC822 tags, in case server returns them + * (in error, since we only use BODY in FETCH requests). */ + switch ($tag) { + case 'RFC822': + $tag = 'BODY[]'; + break; + + case 'RFC822.HEADER': + $tag = 'BODY[HEADER]'; + break; + + case 'RFC822.TEXT': + $tag = 'BODY[TEXT]'; + break; + } + + switch ($tag) { + case 'BODYSTRUCTURE': + $data->next(); + $structure = $this->_parseBodystructure($data); + $structure->buildMimeIds(); + $ob->setStructure($structure); + break; + + case 'ENVELOPE': + $data->next(); + $ob->setEnvelope($this->_parseEnvelope($data)); + break; + + case 'FLAGS': + $data->next(); + $ob->setFlags($data->flushIterator()); + $flags = true; + break; + + case 'INTERNALDATE': + $ob->setImapDate($data->next()); + break; + + case 'RFC822.SIZE': + $ob->setSize($data->next()); + break; + + case 'UID': + $ob->setUid($data->next()); + $uid = true; + break; + + case 'MODSEQ': + $data->next(); + $modseq = $data->next(); + $data->next(); + + /* MODSEQ must be greater than 0, so do sanity checking. */ + if ($modseq > 0) { + $ob->setModSeq($modseq); + + /* Store MODSEQ value. It may be used as the highestmodseq + * once a tagged response is received (RFC 7162 [6]). */ + $pipeline->data['modseqs'][] = $modseq; + } + break; + + default: + // Catch BODY[*]<#> responses + if (strpos($tag, 'BODY[') === 0) { + // Remove the beginning 'BODY[' + $tag = substr($tag, 5); + + // BODY[HEADER.FIELDS] request + if (!empty($pipeline->data['fetch_lookup']) && + (strpos($tag, 'HEADER.FIELDS') !== false)) { + $data->next(); + $sig = $tag . ' (' . implode(' ', array_map('Horde_String::upper', $data->flushIterator())) . ')'; + + // Ignore the trailing bracket + $data->next(); + + $ob->setHeaders($pipeline->data['fetch_lookup'][$sig], $data->next()); + } else { + // Remove trailing bracket and octet start info + $tag = substr($tag, 0, strrpos($tag, ']')); + + if (!strlen($tag)) { + // BODY[] request + if (!is_null($tmp = $data->nextStream())) { + $ob->setFullMsg($tmp); + } + } elseif (is_numeric(substr($tag, -1))) { + // BODY[MIMEID] request + if (!is_null($tmp = $data->nextStream())) { + $ob->setBodyPart($tag, $tmp); + } + } else { + // BODY[HEADER|TEXT|MIME] request + if (($last_dot = strrpos($tag, '.')) === false) { + $mime_id = 0; + } else { + $mime_id = substr($tag, 0, $last_dot); + $tag = substr($tag, $last_dot + 1); + } + + if (!is_null($tmp = $data->nextStream())) { + switch ($tag) { + case 'HEADER': + $ob->setHeaderText($mime_id, $tmp); + break; + + case 'TEXT': + $ob->setBodyText($mime_id, $tmp); + break; + + case 'MIME': + $ob->setMimeHeader($mime_id, $tmp); + break; + } + } + } + } + } elseif (strpos($tag, 'BINARY[') === 0) { + // Catch BINARY[*]<#> responses + // Remove the beginning 'BINARY[' and the trailing bracket + // and octet start info + $tag = substr($tag, 7, strrpos($tag, ']') - 7); + $body = $data->nextStream(); + + if (is_null($body)) { + /* Dovecot bug (as of 2.2.12): binary fetch of body + * part may fail with NIL return if decoding failed on + * server. Try again with non-decoded body. */ + $bq = $pipeline->data['binaryquery'][$tag]; + unset($bq['decode']); + + $query = new Horde_Imap_Client_Fetch_Query(); + $query->bodyPart($tag, $bq); + + $qids = ($quid = $ob->getUid()) + ? new Horde_Imap_Client_Ids($quid) + : new Horde_Imap_Client_Ids($id, true); + + $pipeline->data['fetch_followup'][] = array( + '_query' => $query, + 'ids' => $qids + ); + } else { + $ob->setBodyPart( + $tag, + $body, + empty($this->_temp['literal8']) ? '8bit' : 'binary' + ); + } + } elseif (strpos($tag, 'BINARY.SIZE[') === 0) { + // Catch BINARY.SIZE[*] responses + // Remove the beginning 'BINARY.SIZE[' and the trailing + // bracket and octet start info + $tag = substr($tag, 12, strrpos($tag, ']') - 12); + $ob->setBodyPartSize($tag, $data->next()); + } + break; + } + } + + /* MODSEQ issue: Oh joy. Per RFC 5162 (see Errata #1807), FETCH FLAGS + * responses are NOT required to provide UID information, even if + * QRESYNC is explicitly enabled. Caveat: the FLAGS information + * returned during a SELECT/EXAMINE MUST contain UIDs so we are OK + * there. + * The good news: all decent IMAP servers (Cyrus, Dovecot) will always + * provide UID information, so this is not normally an issue. + * The bad news: spec-wise, this behavior cannot be 100% guaranteed. + * Compromise: We will watch for a FLAGS response with a MODSEQ and + * check if a UID exists also. If not, put the sequence number in a + * queue - it is possible the UID information may appear later in an + * untagged response. When the command is over, double check to make + * sure there are none of these MODSEQ/FLAGS that are still UID-less. + * In the (rare) event that there is, don't cache anything and + * immediately close the mailbox: flags will be correctly sync'd next + * mailbox open so we only lose a bit of caching efficiency. + * Otherwise, we could end up with an inconsistent cached state. + * This Errata has been fixed in 7162 [3.2.4]. */ + if ($flags && $modseq && !$uid) { + $pipeline->data['modseqs_nouid'][] = $id; + } + } + + /** + * Recursively parse BODYSTRUCTURE data from a FETCH return (see + * RFC 3501 [7.4.2]). + * + * @param Horde_Imap_Client_Tokenize $data Data returned from the server. + * + * @return Horde_Mime_Part Mime part object. + */ + protected function _parseBodystructure(Horde_Imap_Client_Tokenize $data) + { + $ob = new Horde_Mime_Part(); + + // If index 0 is an array, this is a multipart part. + if (($entry = $data->next()) === true) { + do { + $ob->addPart($this->_parseBodystructure($data)); + } while (($entry = $data->next()) === true); + + // The subpart type. + $ob->setType('multipart/' . $entry); + + // After the subtype is further extension information. This + // information MAY appear for BODYSTRUCTURE requests. + + // This is parameter information. + if (($tmp = $data->next()) === false) { + return $ob; + } elseif ($tmp === true) { + foreach ($this->_parseStructureParams($data) as $key => $val) { + $ob->setContentTypeParameter($key, $val); + } + } + } else { + $ob->setType($entry . '/' . $data->next()); + + if ($data->next() === true) { + foreach ($this->_parseStructureParams($data) as $key => $val) { + $ob->setContentTypeParameter($key, $val); + } + } + + if (!is_null($tmp = $data->next())) { + $ob->setContentId($tmp); + } + + if (!is_null($tmp = $data->next())) { + $ob->setDescription(Horde_Mime::decode($tmp)); + } + + $te = $data->next(); + $bytes = $data->next(); + + if (!is_null($te)) { + $ob->setTransferEncoding($te); + + /* Base64 transfer encoding is approx. 33% larger than + * original data size (RFC 2045 [6.8]). Return from + * BODYSTRUCTURE is the size of the ENCODED data (RFC 3501 + * [7.4.2]). */ + if (strcasecmp($te, 'base64') === 0) { + $bytes *= 0.75; + } + } + + $ob->setBytes($bytes); + + // If the type is 'message/rfc822' or 'text/*', several extra + // fields are included + switch ($ob->getPrimaryType()) { + case 'message': + if ($ob->getSubType() == 'rfc822') { + if ($data->next() === true) { + // Ignore: envelope + $data->flushIterator(false); + } + if ($data->next() === true) { + $ob->addPart($this->_parseBodystructure($data)); + } + $data->next(); // Ignore: lines + } + break; + + case 'text': + $data->next(); // Ignore: lines + break; + } + + // After the subtype is further extension information. This + // information MAY appear for BODYSTRUCTURE requests. + + // Ignore: MD5 + if ($data->next() === false) { + return $ob; + } + } + + // This is disposition information + if (($tmp = $data->next()) === false) { + return $ob; + } elseif ($tmp === true) { + $ob->setDisposition($data->next()); + + if ($data->next() === true) { + foreach ($this->_parseStructureParams($data) as $key => $val) { + $ob->setDispositionParameter($key, $val); + } + } + $data->next(); + } + + // This is language information. It is either a single value or a list + // of values. + if (($tmp = $data->next()) === false) { + return $ob; + } elseif (!is_null($tmp)) { + $ob->setLanguage(($tmp === true) ? $data->flushIterator() : $tmp); + } + + // Ignore location (RFC 2557) and consume closing paren. + $data->flushIterator(false); + + return $ob; + } + + /** + * Helper function to parse a parameters-like tokenized array. + * + * @param mixed $data Message data. Either a Horde_Imap_Client_Tokenize + * object or null. + * + * @return array The parameter array. + */ + protected function _parseStructureParams($data) + { + $params = array(); + + if (is_null($data)) { + return $params; + } + + while (($name = $data->next()) !== false) { + $params[Horde_String::lower($name)] = $data->next(); + } + + $cp = new Horde_Mime_Headers_ContentParam('Unused', $params); + + return $cp->params; + } + + /** + * Parse ENVELOPE data from a FETCH return (see RFC 3501 [7.4.2]). + * + * @param Horde_Imap_Client_Tokenize $data Data returned from the server. + * + * @return Horde_Imap_Client_Data_Envelope An envelope object. + */ + protected function _parseEnvelope(Horde_Imap_Client_Tokenize $data) + { + // 'route', the 2nd element, is deprecated by RFC 2822. + $addr_structure = array( + 0 => 'personal', + 2 => 'mailbox', + 3 => 'host' + ); + $env_data = array( + 0 => 'date', + 1 => 'subject', + 2 => 'from', + 3 => 'sender', + 4 => 'reply_to', + 5 => 'to', + 6 => 'cc', + 7 => 'bcc', + 8 => 'in_reply_to', + 9 => 'message_id' + ); + + $addr_ob = new Horde_Mail_Rfc822_Address(); + $env_addrs = $this->getParam('envelope_addrs'); + $env_str = $this->getParam('envelope_string'); + $key = 0; + $ret = new Horde_Imap_Client_Data_Envelope(); + + while (($val = $data->next()) !== false) { + if (!isset($env_data[$key]) || is_null($val)) { + ++$key; + continue; + } + + if (is_string($val)) { + // These entries are text fields. + $ret->{$env_data[$key]} = substr($val, 0, $env_str); + } else { + // These entries are address structures. + $group = null; + $key2 = 0; + $tmp = new Horde_Mail_Rfc822_List(); + + while ($data->next() !== false) { + $a_val = $data->flushIterator(); + + // RFC 3501 [7.4.2]: Group entry when host is NIL. + // Group end when mailbox is NIL; otherwise, this is + // mailbox name. + if (is_null($a_val[3])) { + if (is_null($a_val[2])) { + $group = null; + } else { + $group = new Horde_Mail_Rfc822_Group($a_val[2]); + $tmp->add($group); + } + } else { + $addr = clone $addr_ob; + + foreach ($addr_structure as $add_key => $add_val) { + if (!is_null($a_val[$add_key])) { + $addr->$add_val = $a_val[$add_key]; + } + } + + if ($group) { + $group->addresses->add($addr); + } else { + $tmp->add($addr); + } + } + + if (++$key2 >= $env_addrs) { + $data->flushIterator(false); + break; + } + } + + $ret->{$env_data[$key]} = $tmp; + } + + ++$key; + } + + return $ret; + } + + /** + */ + protected function _vanished($modseq, Horde_Imap_Client_Ids $ids) + { + $pipeline = $this->_pipeline( + $this->_command('UID FETCH')->add(array( + strval($ids), + 'UID', + new Horde_Imap_Client_Data_Format_List(array( + 'VANISHED', + 'CHANGEDSINCE', + new Horde_Imap_Client_Data_Format_Number($modseq) + )) + )) + ); + $pipeline->data['vanished'] = $this->getIdsOb(); + + return $this->_sendCmd($pipeline)->data['vanished']; + } + + /** + */ + protected function _store($options) + { + $pipeline = $this->_storeCmd($options); + $pipeline->data['modified'] = $this->getIdsOb(); + + try { + $resp = $this->_sendCmd($pipeline); + + /* Check for EXPUNGEISSUED (RFC 2180 [4.2]/RFC 5530 [3]). */ + if (!empty($resp->data['expungeissued'])) { + $this->noop(); + } + + return $resp->data['modified']; + } catch (Horde_Imap_Client_Exception_ServerResponse $e) { + /* A NO response, when coupled with a sequence STORE and + * non-SILENT behavior, most likely means that messages were + * expunged. RFC 2180 [4.2] */ + if (empty($pipeline->data['store_silent']) && + !empty($options['sequence']) && + ($e->status === Horde_Imap_Client_Interaction_Server::NO)) { + $this->noop(); + } + + return $pipeline->data['modified']; + } + } + + /** + * Create a store command. + * + * @param array $options See Horde_Imap_Client_Base#_store(). + * + * @return Horde_Imap_Client_Interaction_Pipeline Pipeline object. + */ + protected function _storeCmd($options) + { + $cmds = array(); + $silent = empty($options['unchangedsince']) + ? !($this->_debug->debug || $this->_initCache(true)) + : false; + + if (!empty($options['replace'])) { + $cmds[] = array( + 'FLAGS' . ($silent ? '.SILENT' : ''), + $options['replace'] + ); + } else { + foreach (array('add' => '+', 'remove' => '-') as $k => $v) { + if (!empty($options[$k])) { + $cmds[] = array( + $v . 'FLAGS' . ($silent ? '.SILENT' : ''), + $options[$k] + ); + } + } + } + + $pipeline = $this->_pipeline(); + $pipeline->data['store_silent'] = $silent; + + foreach ($cmds as $val) { + $cmd = $this->_command( + empty($options['sequence']) ? 'UID STORE' : 'STORE' + )->add(strval($options['ids'])); + if (!empty($options['unchangedsince'])) { + $cmd->add(new Horde_Imap_Client_Data_Format_List(array( + 'UNCHANGEDSINCE', + new Horde_Imap_Client_Data_Format_Number(intval($options['unchangedsince'])) + ))); + } + $cmd->add($val); + + $pipeline->add($cmd); + } + + return $pipeline; + } + + /** + */ + protected function _copy(Horde_Imap_Client_Mailbox $dest, $options) + { + /* Check for MOVE command (RFC 6851). */ + $move_cmd = (!empty($options['move']) && + $this->_capability('MOVE')); + + $cmd = $this->_pipeline( + $this->_command( + ($options['ids']->sequence ? '' : 'UID ') . ($move_cmd ? 'MOVE' : 'COPY') + )->add(array( + strval($options['ids']), + $this->_getMboxFormatOb($dest) + )) + ); + $cmd->data['copydest'] = $dest; + + // COPY returns no untagged information (RFC 3501 [6.4.7]) + try { + $resp = $this->_sendCmd($cmd); + } catch (Horde_Imap_Client_Exception $e) { + if (!empty($options['create']) && + !empty($e->resp_data['trycreate'])) { + $this->createMailbox($dest); + unset($options['create']); + return $this->_copy($dest, $options); + } + throw $e; + } + + // If moving, delete the old messages now. Short-circuit if nothing + // was moved. + if (!$move_cmd && + !empty($options['move']) && + (isset($resp->data['copyuid']) || + !$this->_capability('UIDPLUS'))) { + $this->expunge($this->_selected, array( + 'delete' => true, + 'ids' => $options['ids'] + )); + } + + return isset($resp->data['copyuid']) + ? $resp->data['copyuid'] + : true; + } + + /** + */ + protected function _setQuota(Horde_Imap_Client_Mailbox $root, $resources) + { + $limits = new Horde_Imap_Client_Data_Format_List(); + + foreach ($resources as $key => $val) { + $limits->add(array( + Horde_String::upper($key), + new Horde_Imap_Client_Data_Format_Number($val) + )); + } + + $this->_sendCmd( + $this->_command('SETQUOTA')->add(array( + $this->_getMboxFormatOb($root), + $limits + )) + ); + } + + /** + */ + protected function _getQuota(Horde_Imap_Client_Mailbox $root) + { + $pipeline = $this->_pipeline( + $this->_command('GETQUOTA')->add( + $this->_getMboxFormatOb($root) + ) + ); + $pipeline->data['quotaresp'] = array(); + + return reset($this->_sendCmd($pipeline)->data['quotaresp']); + } + + /** + * Parse a QUOTA response (RFC 2087 [5.1]). + * + * @param Horde_Imap_Client_Interaction_Pipeline $pipeline Pipeline + * object. + * @param Horde_Imap_Client_Tokenize $data The server response. + */ + protected function _parseQuota( + Horde_Imap_Client_Interaction_Pipeline $pipeline, + Horde_Imap_Client_Tokenize $data + ) + { + $c = &$pipeline->data['quotaresp']; + + $root = $data->next(); + $c[$root] = array(); + + $data->next(); + + while (($curr = $data->next()) !== false) { + $c[$root][Horde_String::lower($curr)] = array( + 'usage' => $data->next(), + 'limit' => $data->next() + ); + } + } + + /** + */ + protected function _getQuotaRoot(Horde_Imap_Client_Mailbox $mailbox) + { + $pipeline = $this->_pipeline( + $this->_command('GETQUOTAROOT')->add( + $this->_getMboxFormatOb($mailbox) + ) + ); + $pipeline->data['quotaresp'] = array(); + + return $this->_sendCmd($pipeline)->data['quotaresp']; + } + + /** + */ + protected function _setACL(Horde_Imap_Client_Mailbox $mailbox, $identifier, + $options) + { + // SETACL returns no untagged information (RFC 4314 [3.1]). + $this->_sendCmd( + $this->_command('SETACL')->add(array( + $this->_getMboxFormatOb($mailbox), + new Horde_Imap_Client_Data_Format_Astring($identifier), + new Horde_Imap_Client_Data_Format_Astring($options['rights']) + )) + ); + } + + /** + */ + protected function _deleteACL(Horde_Imap_Client_Mailbox $mailbox, $identifier) + { + // DELETEACL returns no untagged information (RFC 4314 [3.2]). + $this->_sendCmd( + $this->_command('DELETEACL')->add(array( + $this->_getMboxFormatOb($mailbox), + new Horde_Imap_Client_Data_Format_Astring($identifier) + )) + ); + } + + /** + */ + protected function _getACL(Horde_Imap_Client_Mailbox $mailbox) + { + return $this->_sendCmd( + $this->_command('GETACL')->add( + $this->_getMboxFormatOb($mailbox) + ) + )->data['getacl']; + } + + /** + * Parse an ACL response (RFC 4314 [3.6]). + * + * @param Horde_Imap_Client_Interaction_Pipeline $pipeline Pipeline + * object. + * @param Horde_Imap_Client_Tokenize $data The server response. + */ + protected function _parseACL( + Horde_Imap_Client_Interaction_Pipeline $pipeline, + Horde_Imap_Client_Tokenize $data + ) + { + $acl = array(); + + // Ignore mailbox argument -> index 1 + $data->next(); + + while (($curr = $data->next()) !== false) { + $acl[$curr] = ($curr[0] === '-') + ? new Horde_Imap_Client_Data_AclNegative($data->next()) + : new Horde_Imap_Client_Data_Acl($data->next()); + } + + $pipeline->data['getacl'] = $acl; + } + + /** + */ + protected function _listACLRights(Horde_Imap_Client_Mailbox $mailbox, + $identifier) + { + $resp = $this->_sendCmd( + $this->_command('LISTRIGHTS')->add(array( + $this->_getMboxFormatOb($mailbox), + new Horde_Imap_Client_Data_Format_Astring($identifier) + )) + ); + + return isset($resp->data['listaclrights']) + ? $resp->data['listaclrights'] + : new Horde_Imap_Client_Data_AclRights(); + } + + /** + * Parse a LISTRIGHTS response (RFC 4314 [3.7]). + * + * @param Horde_Imap_Client_Interaction_Pipeline $pipeline Pipeline + * object. + * @param Horde_Imap_Client_Tokenize $data The server response. + */ + protected function _parseListRights( + Horde_Imap_Client_Interaction_Pipeline $pipeline, + Horde_Imap_Client_Tokenize $data + ) + { + // Ignore mailbox and identifier arguments + $data->next(); + $data->next(); + + $pipeline->data['listaclrights'] = new Horde_Imap_Client_Data_AclRights( + str_split($data->next()), + $data->flushIterator() + ); + } + + /** + */ + protected function _getMyACLRights(Horde_Imap_Client_Mailbox $mailbox) + { + $resp = $this->_sendCmd( + $this->_command('MYRIGHTS')->add( + $this->_getMboxFormatOb($mailbox) + ) + ); + + return isset($resp->data['myrights']) + ? $resp->data['myrights'] + : new Horde_Imap_Client_Data_Acl(); + } + + /** + * Parse a MYRIGHTS response (RFC 4314 [3.8]). + * + * @param Horde_Imap_Client_Interaction_Pipeline $pipeline Pipeline + * object. + * @param Horde_Imap_Client_Tokenize $data The server response. + */ + protected function _parseMyRights( + Horde_Imap_Client_Interaction_Pipeline $pipeline, + Horde_Imap_Client_Tokenize $data + ) + { + // Ignore 1st token (mailbox name) + $data->next(); + + $pipeline->data['myrights'] = new Horde_Imap_Client_Data_Acl($data->next()); + } + + /** + */ + protected function _getMetadata(Horde_Imap_Client_Mailbox $mailbox, + $entries, $options) + { + $pipeline = $this->_pipeline(); + $pipeline->data['metadata'] = array(); + + if ($this->_capability('METADATA') || + (strlen($mailbox) && $this->_capability('METADATA-SERVER'))) { + $cmd_options = new Horde_Imap_Client_Data_Format_List(); + + if (!empty($options['maxsize'])) { + $cmd_options->add(array( + 'MAXSIZE', + new Horde_Imap_Client_Data_Format_Number($options['maxsize']) + )); + } + if (!empty($options['depth'])) { + $cmd_options->add(array( + 'DEPTH', + new Horde_Imap_Client_Data_Format_Number($options['depth']) + )); + } + + $queries = new Horde_Imap_Client_Data_Format_List(); + foreach ($entries as $md_entry) { + $queries->add(new Horde_Imap_Client_Data_Format_Astring($md_entry)); + } + + $cmd = $this->_command('GETMETADATA')->add( + $this->_getMboxFormatOb($mailbox) + ); + if (count($cmd_options)) { + $cmd->add($cmd_options); + } + $cmd->add($queries); + + $pipeline->add($cmd); + } else { + if (!$this->_capability('ANNOTATEMORE') && + !$this->_capability('ANNOTATEMORE2')) { + throw new Horde_Imap_Client_Exception_NoSupportExtension('METADATA'); + } + + $queries = array(); + foreach ($entries as $md_entry) { + list($entry, $type) = $this->_getAnnotateMoreEntry($md_entry); + + if (!isset($queries[$type])) { + $queries[$type] = new Horde_Imap_Client_Data_Format_List(); + } + $queries[$type]->add(new Horde_Imap_Client_Data_Format_String($entry)); + } + + foreach ($queries as $key => $val) { + // TODO: Honor maxsize and depth options. + $pipeline->add( + $this->_command('GETANNOTATION')->add(array( + $this->_getMboxFormatOb($mailbox), + $val, + new Horde_Imap_Client_Data_Format_String($key) + )) + ); + } + } + + return $this->_sendCmd($pipeline)->data['metadata']; + } + + /** + * Split a name for the METADATA extension into the correct syntax for the + * older ANNOTATEMORE version. + * + * @param string $name A name for a metadata entry. + * + * @return array A list of two elements: The entry name and the value + * type. + * + * @throws Horde_Imap_Client_Exception + */ + protected function _getAnnotateMoreEntry($name) + { + if (substr($name, 0, 7) === '/shared') { + return array(substr($name, 7), 'value.shared'); + } else if (substr($name, 0, 8) === '/private') { + return array(substr($name, 8), 'value.priv'); + } + + $e = new Horde_Imap_Client_Exception( + Horde_Imap_Client_Translation::r("Invalid METADATA entry: \"%s\"."), + Horde_Imap_Client_Exception::METADATA_INVALID + ); + $e->messagePrintf(array($name)); + throw $e; + } + + /** + */ + protected function _setMetadata(Horde_Imap_Client_Mailbox $mailbox, $data) + { + if ($this->_capability('METADATA') || + (strlen($mailbox) && $this->_capability('METADATA-SERVER'))) { + $data_elts = new Horde_Imap_Client_Data_Format_List(); + + foreach ($data as $key => $value) { + $data_elts->add(array( + new Horde_Imap_Client_Data_Format_Astring($key), + /* METADATA supports literal8 - thus, it implicitly + * supports non-ASCII characters in the data. */ + new Horde_Imap_Client_Data_Format_Nstring_Nonascii($value) + )); + } + + $cmd = $this->_command('SETMETADATA')->add(array( + $this->_getMboxFormatOb($mailbox), + $data_elts + )); + } else { + if (!$this->_capability('ANNOTATEMORE') && + !$this->_capability('ANNOTATEMORE2')) { + throw new Horde_Imap_Client_Exception_NoSupportExtension('METADATA'); + } + + $cmd = $this->_pipeline(); + + foreach ($data as $md_entry => $value) { + list($entry, $type) = $this->_getAnnotateMoreEntry($md_entry); + + $cmd->add( + $this->_command('SETANNOTATION')->add(array( + $this->_getMboxFormatOb($mailbox), + new Horde_Imap_Client_Data_Format_String($entry), + new Horde_Imap_Client_Data_Format_List(array( + new Horde_Imap_Client_Data_Format_String($type), + /* ANNOTATEMORE supports literal8 - thus, it + * implicitly supports non-ASCII characters in the + * data. */ + new Horde_Imap_Client_Data_Format_Nstring_Nonascii($value) + )) + )) + ); + } + } + + $this->_sendCmd($cmd); + } + + /** + * Parse an ANNOTATION response (ANNOTATEMORE/ANNOTATEMORE2). + * + * @param Horde_Imap_Client_Interaction_Pipeline $pipeline Pipeline + * object. + * @param Horde_Imap_Client_Tokenize $data The server response. + * + * @throws Horde_Imap_Client_Exception + */ + protected function _parseAnnotation( + Horde_Imap_Client_Interaction_Pipeline $pipeline, + Horde_Imap_Client_Tokenize $data + ) + { + // Mailbox name is in UTF7-IMAP. + $mbox = Horde_Imap_Client_Mailbox::get($data->next(), true); + $entry = $data->next(); + + // Ignore unsolicited responses. + if ($data->next() !== true) { + return; + } + + while (($type = $data->next()) !== false) { + switch ($type) { + case 'value.priv': + $pipeline->data['metadata'][strval($mbox)]['/private' . $entry] = $data->next(); + break; + + case 'value.shared': + $pipeline->data['metadata'][strval($mbox)]['/shared' . $entry] = $data->next(); + break; + + default: + $e = new Horde_Imap_Client_Exception( + Horde_Imap_Client_Translation::r("Invalid METADATA value type \"%s\"."), + Horde_Imap_Client_Exception::METADATA_INVALID + ); + $e->messagePrintf(array($type)); + throw $e; + } + } + } + + /** + * Parse a METADATA response (RFC 5464 [4.4]). + * + * @param Horde_Imap_Client_Interaction_Pipeline $pipeline Pipeline + * object. + * @param Horde_Imap_Client_Tokenize $data The server response. + * + * @throws Horde_Imap_Client_Exception + */ + protected function _parseMetadata( + Horde_Imap_Client_Interaction_Pipeline $pipeline, + Horde_Imap_Client_Tokenize $data + ) + { + // Mailbox name is in UTF7-IMAP. + $mbox = Horde_Imap_Client_Mailbox::get($data->next(), true); + + // Ignore unsolicited responses. + if ($data->next() === true) { + while (($entry = $data->next()) !== false) { + $pipeline->data['metadata'][strval($mbox)][$entry] = $data->next(); + } + } + } + + /* Overriden methods. */ + + /** + * @param array $opts Options: + * - decrement: (boolean) If true, decrement the message count. + * - pipeline: (Horde_Imap_Client_Interaction_Pipeline) Pipeline object. + */ + protected function _deleteMsgs(Horde_Imap_Client_Mailbox $mailbox, + Horde_Imap_Client_Ids $ids, + array $opts = array()) + { + /* If there are pending FETCH cache writes, we need to write them + * before the UID -> sequence number mapping changes. */ + if (isset($opts['pipeline'])) { + $this->_updateCache($opts['pipeline']->fetch); + } + + $res = parent::_deleteMsgs($mailbox, $ids); + + if (isset($this->_temp['expunged'])) { + $this->_temp['expunged']->add($res); + } + + if (!empty($opts['decrement'])) { + $mbox_ob = $this->_mailboxOb(); + $mbox_ob->setStatus( + Horde_Imap_Client::STATUS_MESSAGES, + $mbox_ob->getStatus(Horde_Imap_Client::STATUS_MESSAGES) - count($ids) + ); + } + } + + /* Internal functions. */ + + /** + * Return the proper mailbox format object based on the server's + * capabilities. + * + * @param string $mailbox The mailbox. + * @param boolean $list Is this object used in a LIST command? + * + * @return Horde_Imap_Client_Data_Format_Mailbox A mailbox format object. + */ + protected function _getMboxFormatOb($mailbox, $list = false) + { + if ($this->_capability()->isEnabled('UTF8=ACCEPT')) { + try { + return $list + ? new Horde_Imap_Client_Data_Format_ListMailbox_Utf8($mailbox) + : new Horde_Imap_Client_Data_Format_Mailbox_Utf8($mailbox); + } catch (Horde_Imap_Client_Data_Format_Exception $e) {} + } + + return $list + ? new Horde_Imap_Client_Data_Format_ListMailbox($mailbox) + : new Horde_Imap_Client_Data_Format_Mailbox($mailbox); + } + + /** + * Sends command(s) to the IMAP server. A connection to the server must + * have already been made. + * + * @param mixed $cmd Either a Command object or a Pipeline object. + * + * @return Horde_Imap_Client_Interaction_Pipeline A pipeline object. + * @throws Horde_Imap_Client_Exception + */ + protected function _sendCmd($cmd) + { + $pipeline = ($cmd instanceof Horde_Imap_Client_Interaction_Command) + ? $this->_pipeline($cmd) + : $cmd; + + if (!empty($this->_cmdQueue)) { + /* Add commands in reverse order. */ + foreach (array_reverse($this->_cmdQueue) as $val) { + $pipeline->add($val, true); + } + + $this->_cmdQueue = array(); + } + + $cmd_list = array(); + + foreach ($pipeline as $val) { + if ($val->continuation) { + $this->_sendCmdChunk($pipeline, $cmd_list); + $this->_sendCmdChunk($pipeline, array($val)); + $cmd_list = array(); + } else { + $cmd_list[] = $val; + } + } + + $this->_sendCmdChunk($pipeline, $cmd_list); + + /* If any FLAGS responses contain MODSEQs but not UIDs, don't + * cache any data and immediately close the mailbox. */ + foreach ($pipeline->data['modseqs_nouid'] as $val) { + if (!$pipeline->fetch[$val]->getUid()) { + $this->_debug->info( + 'Server provided FLAGS MODSEQ without providing UID.' + ); + $this->close(); + return $pipeline; + } + } + + /* Update HIGHESTMODSEQ value. */ + if (!empty($pipeline->data['modseqs'])) { + $modseq = max($pipeline->data['modseqs']); + $this->_mailboxOb()->setStatus(Horde_Imap_Client::STATUS_HIGHESTMODSEQ, $modseq); + /* CONDSTORE has not yet updated flag information, so don't update + * modseq yet. */ + if ($this->_capability()->isEnabled('QRESYNC')) { + $this->_updateModSeq($modseq); + } + } + + /* Update cache items. */ + $this->_updateCache($pipeline->fetch); + + return $pipeline; + } + + /** + * Send a chunk of commands and/or continuation fragments to the server. + * + * @param Horde_Imap_Client_Interaction_Pipeline $pipeline The pipeline + * object. + * @param array $chunk List of commands to send. + * + * @throws Horde_Imap_Client_Exception + */ + protected function _sendCmdChunk($pipeline, $chunk) + { + if (empty($chunk)) { + return; + } + + $cmd_count = count($chunk); + $exception = null; + + foreach ($chunk as $val) { + $val->pipeline = $pipeline; + + try { + if ($this->_processCmd($pipeline, $val, $val)) { + $this->_connection->write('', true); + } else { + $cmd_count = 0; + } + } catch (Horde_Imap_Client_Exception $e) { + switch ($e->getCode()) { + case Horde_Imap_Client_Exception::SERVER_WRITEERROR: + $this->_temp['logout'] = true; + $this->logout(); + break; + } + + throw $e; + } + } + + while ($cmd_count) { + try { + if ($this->_getLine($pipeline) instanceof Horde_Imap_Client_Interaction_Server_Tagged) { + --$cmd_count; + } + } catch (Horde_Imap_Client_Exception $e) { + switch ($e->getCode()) { + case $e::DISCONNECT: + /* Guaranteed to have no more data incoming, so we can + * immediately logout. */ + $this->_temp['logout'] = true; + $this->logout(); + throw $e; + } + + /* For all other issues, catch and store exception; don't + * throw until all input is read since we need to clear + * incoming queue. (For now, only store first exception.) */ + if (is_null($exception)) { + $exception = $e; + } + + if (($e instanceof Horde_Imap_Client_Exception_ServerResponse) && + $e->command) { + --$cmd_count; + } + } + } + + if (!is_null($exception)) { + throw $exception; + } + } + + /** + * Process/send a command to the remote server. + * + * @param Horde_Imap_Client_Interaction_Pipeline $pipeline The pipeline + * object. + * @param Horde_Imap_Client_Interaction_Command $cmd The master command. + * @param Horde_Imap_Client_Data_Format_List $data Commands to send. + * + * @return boolean True if EOL needed to finish command. + * @throws Horde_Imap_Client_Exception + * @throws Horde_Imap_Client_Exception_NoSupport + */ + protected function _processCmd($pipeline, $cmd, $data) + { + if ($this->_debug->debug && + ($data instanceof Horde_Imap_Client_Interaction_Command)) { + $data->startTimer(); + } + + foreach ($data as $key => $val) { + if ($val instanceof Horde_Imap_Client_Interaction_Command_Continuation) { + $this->_connection->write('', true); + + /* Check for optional continuation responses when the command + * has already finished. */ + if (!$cmd_continuation = $this->_processCmdContinuation($pipeline, $val->optional)) { + return false; + } + + $this->_processCmd( + $pipeline, + $cmd, + $val->getCommands($cmd_continuation) + ); + continue; + } + + if (!is_null($debug_msg = array_shift($cmd->debug))) { + $this->_debug->client( + (($cmd == $data) ? $cmd->tag . ' ' : '') . $debug_msg + ); + $this->_connection->client_debug = false; + } + + if ($key) { + $this->_connection->write(' '); + } + + if ($val instanceof Horde_Imap_Client_Data_Format_List) { + $this->_connection->write('('); + $this->_processCmd($pipeline, $cmd, $val); + $this->_connection->write(')'); + } elseif (($val instanceof Horde_Imap_Client_Data_Format_String) && + $val->literal()) { + $c = $this->_capability(); + + /* RFC 6855: If UTF8 extension is available, quote short + * strings instead of sending as literal. */ + if ($c->isEnabled('UTF8=ACCEPT') && ($val->length() < 100)) { + $val->forceQuoted(); + $this->_connection->write($val->escape()); + } else { + /* RFC 3516/4466: Send literal8 if we have binary data. */ + if ($cmd->literal8 && + $val->binary() && + ($c->query('BINARY') || $c->isEnabled('UTF8=ACCEPT'))) { + $binary = true; + $this->_connection->write('~'); + } else { + $binary = false; + } + + $literal_len = $val->length(); + $this->_connection->write('{' . $literal_len); + + /* RFC 2088 - If LITERAL+ is available, saves a roundtrip + * from the server. */ + if ($cmd->literalplus && $c->query('LITERAL+')) { + $this->_connection->write('+}', true); + } else { + $this->_connection->write('}', true); + $this->_processCmdContinuation($pipeline); + } + + if ($debug_msg) { + $this->_connection->client_debug = false; + } + + $this->_connection->writeLiteral( + $val->getStream(), + $literal_len, + $binary + ); + } + } else { + $this->_connection->write($val->escape()); + } + } + + return true; + } + + /** + * Process a command continuation response. + * + * @param Horde_Imap_Client_Interaction_Pipeline $pipeline The pipeline + * object. + * @param boolean $noexception Don't throw + * exception if + * continuation + * does not occur. + * + * @return mixed A Horde_Imap_Client_Interaction_Server_Continuation + * object or false. + * + * @throws Horde_Imap_Client_Exception + */ + protected function _processCmdContinuation($pipeline, $noexception = false) + { + do { + $ob = $this->_getLine($pipeline); + } while ($ob instanceof Horde_Imap_Client_Interaction_Server_Untagged); + + if ($ob instanceof Horde_Imap_Client_Interaction_Server_Continuation) { + return $ob; + } elseif ($noexception) { + return false; + } + + $this->_debug->info( + 'ERROR: Unexpected response from server while waiting for a continuation request.' + ); + $e = new Horde_Imap_Client_Exception( + Horde_Imap_Client_Translation::r("Error when communicating with the mail server."), + Horde_Imap_Client_Exception::SERVER_READERROR + ); + $e->details = strval($ob); + + throw $e; + } + + /** + * Shortcut to creating a new IMAP client command object. + * + * @param string $cmd The IMAP command. + * + * @return Horde_Imap_Client_Interaction_Command A command object. + */ + protected function _command($cmd) + { + return new Horde_Imap_Client_Interaction_Command($cmd, ++$this->_tag); + } + + /** + * Shortcut to creating a new pipeline object. + * + * @param Horde_Imap_Client_Interaction_Command $cmd An IMAP command to + * add. + * + * @return Horde_Imap_Client_Interaction_Pipeline A pipeline object. + */ + protected function _pipeline($cmd = null) + { + if (!isset($this->_temp['fetchob'])) { + $this->_temp['fetchob'] = new Horde_Imap_Client_Fetch_Results( + $this->_fetchDataClass, + Horde_Imap_Client_Fetch_Results::SEQUENCE + ); + } + + $ob = new Horde_Imap_Client_Interaction_Pipeline( + clone $this->_temp['fetchob'] + ); + + if (!is_null($cmd)) { + $ob->add($cmd); + } + + return $ob; + } + + /** + * Gets data from the IMAP server stream and parses it. + * + * @param Horde_Imap_Client_Interaction_Pipeline $pipeline Pipeline + * object. + * + * @return Horde_Imap_Client_Interaction_Server Server object. + * + * @throws Horde_Imap_Client_Exception + */ + protected function _getLine( + Horde_Imap_Client_Interaction_Pipeline $pipeline + ) + { + $server = Horde_Imap_Client_Interaction_Server::create( + $this->_connection->read() + ); + + switch (get_class($server)) { + case 'Horde_Imap_Client_Interaction_Server_Continuation': + $this->_responseCode($pipeline, $server); + break; + + case 'Horde_Imap_Client_Interaction_Server_Tagged': + $cmd = $pipeline->complete($server); + if (is_null($cmd)) { + /* This indicates a "dangling" tagged response - it was either + * generated by an aborted previous pipeline object or is the + * result of spurious output by the server. Ignore. */ + return $this->_getLine($pipeline); + } + + if ($timer = $cmd->getTimer()) { + $this->_debug->info(sprintf( + 'Command %s took %s seconds.', + $cmd->tag, + $timer + )); + } + $this->_responseCode($pipeline, $server); + + if (is_callable($cmd->on_success)) { + call_user_func($cmd->on_success); + } + break; + + case 'Horde_Imap_Client_Interaction_Server_Untagged': + if (is_null($server->status)) { + $this->_serverResponse($pipeline, $server); + } else { + $this->_responseCode($pipeline, $server); + } + break; + } + + switch ($server->status) { + case $server::BAD: + case $server::NO: + /* A tagged BAD response indicates that the tagged command caused + * the error. This information is unknown if untagged (RFC 3501 + * [7.1.3]) - ignore these untagged responses. + * An untagged NO response indicates a warning; ignore and assume + * that it also included response text code that is handled + * elsewhere. Throw exception if tagged; command handlers can + * catch this if able to workaround this issue (RFC 3501 + * [7.1.2]). */ + if ($server instanceof Horde_Imap_Client_Interaction_Server_Tagged) { + /* Check for a on_error callback. If function returns true, + * ignore the error. */ + if (($cmd = $pipeline->getCmd($server->tag)) && + is_callable($cmd->on_error) && + call_user_func($cmd->on_error)) { + break; + } + + throw new Horde_Imap_Client_Exception_ServerResponse( + Horde_Imap_Client_Translation::r("IMAP error reported by server."), + 0, + $server, + $pipeline + ); + } + break; + + case $server::BYE: + /* A BYE response received as part of a logout command should be + * be treated like a regular command: a client MUST process the + * entire command until logging out (RFC 3501 [3.4; 7.1.5]). */ + if (empty($this->_temp['logout'])) { + $e = new Horde_Imap_Client_Exception( + Horde_Imap_Client_Translation::r("IMAP Server closed the connection."), + Horde_Imap_Client_Exception::DISCONNECT + ); + $e->details = strval($server); + throw $e; + } + break; + + case $server::PREAUTH: + /* The user was pre-authenticated. (RFC 3501 [7.1.4]) */ + $this->_temp['preauth'] = true; + break; + } + + return $server; + } + + /** + * Handle untagged server responses (see RFC 3501 [2.2.2]). + * + * @param Horde_Imap_Client_Interaction_Pipeline $pipeline Pipeline + * object. + * @param Horde_Imap_Client_Interaction_Server $ob Server + * response. + */ + protected function _serverResponse( + Horde_Imap_Client_Interaction_Pipeline $pipeline, + Horde_Imap_Client_Interaction_Server $ob + ) + { + $token = $ob->token; + + /* First, catch untagged responses where the name appears first on the + * line. */ + switch ($first = Horde_String::upper($token->current())) { + case 'CAPABILITY': + $this->_parseCapability($pipeline, $token->flushIterator()); + break; + + case 'LIST': + case 'LSUB': + $this->_parseList($pipeline, $token); + break; + + case 'STATUS': + // Parse a STATUS response (RFC 3501 [7.2.4]). + $this->_parseStatus($token); + break; + + case 'SEARCH': + case 'SORT': + // Parse a SEARCH/SORT response (RFC 3501 [7.2.5] & RFC 5256 [4]). + $this->_parseSearch($pipeline, $token->flushIterator()); + break; + + case 'ESEARCH': + // Parse an ESEARCH response (RFC 4466 [2.6.2]). + $this->_parseEsearch($pipeline, $token); + break; + + case 'FLAGS': + $token->next(); + $this->_mailboxOb()->setStatus(Horde_Imap_Client::STATUS_FLAGS, array_map('Horde_String::lower', $token->flushIterator())); + break; + + case 'QUOTA': + $this->_parseQuota($pipeline, $token); + break; + + case 'QUOTAROOT': + // Ignore this line - we can get this information from + // the untagged QUOTA responses. + break; + + case 'NAMESPACE': + $this->_parseNamespace($pipeline, $token); + break; + + case 'THREAD': + $this->_parseThread($pipeline, $token); + break; + + case 'ACL': + $this->_parseACL($pipeline, $token); + break; + + case 'LISTRIGHTS': + $this->_parseListRights($pipeline, $token); + break; + + case 'MYRIGHTS': + $this->_parseMyRights($pipeline, $token); + break; + + case 'ID': + // ID extension (RFC 2971) + $this->_parseID($pipeline, $token); + break; + + case 'ENABLED': + // ENABLE extension (RFC 5161) + $this->_parseEnabled($token); + break; + + case 'LANGUAGE': + // LANGUAGE extension (RFC 5255 [3.2]) + $this->_parseLanguage($token); + break; + + case 'COMPARATOR': + // I18NLEVEL=2 extension (RFC 5255 [4.7]) + $this->_parseComparator($pipeline, $token); + break; + + case 'VANISHED': + // QRESYNC extension (RFC 7162 [3.2.10]) + $this->_parseVanished($pipeline, $token); + break; + + case 'ANNOTATION': + // Parse an ANNOTATION response. + $this->_parseAnnotation($pipeline, $token); + break; + + case 'METADATA': + // Parse a METADATA response. + $this->_parseMetadata($pipeline, $token); + break; + + default: + // Next, look for responses where the keywords occur second. + switch (Horde_String::upper($token->next())) { + case 'EXISTS': + // EXISTS response - RFC 3501 [7.3.2] + $mbox_ob = $this->_mailboxOb(); + + // Increment UIDNEXT if it is set. + if ($mbox_ob->open && + ($uidnext = $mbox_ob->getStatus(Horde_Imap_Client::STATUS_UIDNEXT))) { + $mbox_ob->setStatus(Horde_Imap_Client::STATUS_UIDNEXT, $uidnext + $first - $mbox_ob->getStatus(Horde_Imap_Client::STATUS_MESSAGES)); + } + + $mbox_ob->setStatus(Horde_Imap_Client::STATUS_MESSAGES, $first); + break; + + case 'RECENT': + // RECENT response - RFC 3501 [7.3.1] + $this->_mailboxOb()->setStatus(Horde_Imap_Client::STATUS_RECENT, $first); + break; + + case 'EXPUNGE': + // EXPUNGE response - RFC 3501 [7.4.1] + $this->_deleteMsgs($this->_selected, $this->getIdsOb($first, true), array( + 'decrement' => true, + 'pipeline' => $pipeline + )); + $pipeline->data['expunge_seen'] = true; + break; + + case 'FETCH': + // FETCH response - RFC 3501 [7.4.2] + $this->_parseFetch($pipeline, $first, $token); + break; + } + break; + } + } + + /** + * Handle status responses (see RFC 3501 [7.1]). + * + * @param Horde_Imap_Client_Interaction_Pipeline $pipeline Pipeline + * object. + * @param Horde_Imap_Client_Interaction_Server $ob Server object. + * + * @throws Horde_Imap_Client_Exception_ServerResponse + */ + protected function _responseCode( + Horde_Imap_Client_Interaction_Pipeline $pipeline, + Horde_Imap_Client_Interaction_Server $ob + ) + { + if (is_null($ob->responseCode)) { + return; + } + + $rc = $ob->responseCode; + + switch ($rc->code) { + case 'ALERT': + // Defined by RFC 5530 [3] - Treat as an alert for now. + case 'CONTACTADMIN': + // Used by Gmail - Treat as an alert for now. + // http://mailman13.u.washington.edu/pipermail/imap-protocol/2014-September/002324.html + case 'WEBALERT': + $this->_alerts->add(strval($ob->token), $rc->code); + break; + + case 'BADCHARSET': + /* Store valid search charsets if returned by server. */ + $s = $this->search_charset; + foreach ($rc->data[0] as $val) { + $s->setValid($val, true); + } + + throw new Horde_Imap_Client_Exception_ServerResponse( + Horde_Imap_Client_Translation::r("Charset used in search query is not supported on the mail server."), + Horde_Imap_Client_Exception::BADCHARSET, + $ob, + $pipeline + ); + + case 'CAPABILITY': + $this->_parseCapability($pipeline, $rc->data); + break; + + case 'PARSE': + /* Only throw error on NO/BAD. Message is human readable. */ + switch ($ob->status) { + case Horde_Imap_Client_Interaction_Server::BAD: + case Horde_Imap_Client_Interaction_Server::NO: + $e = new Horde_Imap_Client_Exception_ServerResponse( + Horde_Imap_Client_Translation::r("The mail server was unable to parse the contents of the mail message: %s"), + Horde_Imap_Client_Exception::PARSEERROR, + $ob, + $pipeline + ); + $e->messagePrintf(array(strval($ob->token))); + throw $e; + } + break; + + case 'READ-ONLY': + $this->_mode = Horde_Imap_Client::OPEN_READONLY; + break; + + case 'READ-WRITE': + $this->_mode = Horde_Imap_Client::OPEN_READWRITE; + break; + + case 'TRYCREATE': + // RFC 3501 [7.1] + $pipeline->data['trycreate'] = true; + break; + + case 'PERMANENTFLAGS': + $this->_mailboxOb()->setStatus(Horde_Imap_Client::STATUS_PERMFLAGS, array_map('Horde_String::lower', $rc->data[0])); + break; + + case 'UIDNEXT': + $this->_mailboxOb()->setStatus(Horde_Imap_Client::STATUS_UIDNEXT, $rc->data[0]); + break; + + case 'UIDVALIDITY': + $this->_mailboxOb()->setStatus(Horde_Imap_Client::STATUS_UIDVALIDITY, $rc->data[0]); + break; + + case 'UNSEEN': + /* This is different from the STATUS UNSEEN response - this item, + * if defined, returns the first UNSEEN message in the mailbox. */ + $this->_mailboxOb()->setStatus(Horde_Imap_Client::STATUS_FIRSTUNSEEN, $rc->data[0]); + break; + + case 'REFERRAL': + // Defined by RFC 2221 + $pipeline->data['referral'] = new Horde_Imap_Client_Url_Imap($rc->data[0]); + break; + + case 'UNKNOWN-CTE': + // Defined by RFC 3516 + throw new Horde_Imap_Client_Exception_ServerResponse( + Horde_Imap_Client_Translation::r("The mail server was unable to parse the contents of the mail message."), + Horde_Imap_Client_Exception::UNKNOWNCTE, + $ob, + $pipeline + ); + + case 'APPENDUID': + // Defined by RFC 4315 + // APPENDUID: [0] = UIDVALIDITY, [1] = UID(s) + $pipeline->data['appenduid'] = $this->getIdsOb($rc->data[1]); + break; + + case 'COPYUID': + // Defined by RFC 4315 + // COPYUID: [0] = UIDVALIDITY, [1] = UIDFROM, [2] = UIDTO + $pipeline->data['copyuid'] = array_combine( + $this->getIdsOb($rc->data[1])->ids, + $this->getIdsOb($rc->data[2])->ids + ); + + /* Use UIDPLUS information to move cached data to new mailbox (see + * RFC 4549 [4.2.2.1]). Need to move now, because a MOVE might + * EXPUNGE immediately afterwards. */ + $this->_moveCache($pipeline->data['copydest'], $pipeline->data['copyuid'], $rc->data[0]); + break; + + case 'UIDNOTSTICKY': + // Defined by RFC 4315 [3] + $this->_mailboxOb()->setStatus(Horde_Imap_Client::STATUS_UIDNOTSTICKY, true); + break; + + case 'BADURL': + // Defined by RFC 4469 [4.1] + throw new Horde_Imap_Client_Exception_ServerResponse( + Horde_Imap_Client_Translation::r("Could not save message on server."), + Horde_Imap_Client_Exception::CATENATE_BADURL, + $ob, + $pipeline + ); + + case 'TOOBIG': + // Defined by RFC 4469 [4.2] + throw new Horde_Imap_Client_Exception_ServerResponse( + Horde_Imap_Client_Translation::r("Could not save message data because it is too large."), + Horde_Imap_Client_Exception::CATENATE_TOOBIG, + $ob, + $pipeline + ); + + case 'HIGHESTMODSEQ': + // Defined by RFC 7162 [3.1.2.1] + $pipeline->data['modseqs'][] = $rc->data[0]; + break; + + case 'NOMODSEQ': + // Defined by RFC 7162 [3.1.2.2] + $pipeline->data['modseqs'][] = 0; + break; + + case 'MODIFIED': + // Defined by RFC 7162 [3.1.3] + $pipeline->data['modified']->add($rc->data[0]); + break; + + case 'CLOSED': + // Defined by RFC 7162 [3.2.11] + if (isset($pipeline->data['qresyncmbox'])) { + /* If there is any pending FETCH cache entries, flush them + * now before changing mailboxes. */ + $this->_updateCache($pipeline->fetch); + $pipeline->fetch->clear(); + + $this->_changeSelected( + $pipeline->data['qresyncmbox'][0], + $pipeline->data['qresyncmbox'][1] + ); + unset($pipeline->data['qresyncmbox']); + } + break; + + case 'NOTSAVED': + // Defined by RFC 5182 [2.5] + $pipeline->data['searchnotsaved'] = true; + break; + + case 'BADCOMPARATOR': + // Defined by RFC 5255 [4.9] + throw new Horde_Imap_Client_Exception_ServerResponse( + Horde_Imap_Client_Translation::r("The comparison algorithm was not recognized by the server."), + Horde_Imap_Client_Exception::BADCOMPARATOR, + $ob, + $pipeline + ); + + case 'METADATA': + $md = $rc->data[0]; + + switch ($md[0]) { + case 'LONGENTRIES': + // Defined by RFC 5464 [4.2.1] + $pipeline->data['metadata']['*longentries'] = intval($md[1]); + break; + + case 'MAXSIZE': + // Defined by RFC 5464 [4.3] + throw new Horde_Imap_Client_Exception_ServerResponse( + Horde_Imap_Client_Translation::r("The metadata item could not be saved because it is too large."), + Horde_Imap_Client_Exception::METADATA_MAXSIZE, + $ob, + $pipeline + ); + + case 'NOPRIVATE': + // Defined by RFC 5464 [4.3] + throw new Horde_Imap_Client_Exception_ServerResponse( + Horde_Imap_Client_Translation::r("The metadata item could not be saved because the server does not support private annotations."), + Horde_Imap_Client_Exception::METADATA_NOPRIVATE, + $ob, + $pipeline + ); + + case 'TOOMANY': + // Defined by RFC 5464 [4.3] + throw new Horde_Imap_Client_Exception_ServerResponse( + Horde_Imap_Client_Translation::r("The metadata item could not be saved because the maximum number of annotations has been exceeded."), + Horde_Imap_Client_Exception::METADATA_TOOMANY, + $ob, + $pipeline + ); + } + break; + + case 'UNAVAILABLE': + // Defined by RFC 5530 [3] + $pipeline->data['loginerr'] = new Horde_Imap_Client_Exception( + Horde_Imap_Client_Translation::r("Remote server is temporarily unavailable."), + Horde_Imap_Client_Exception::LOGIN_UNAVAILABLE + ); + break; + + case 'AUTHENTICATIONFAILED': + // Defined by RFC 5530 [3] + $pipeline->data['loginerr'] = new Horde_Imap_Client_Exception( + Horde_Imap_Client_Translation::r("Authentication failed."), + Horde_Imap_Client_Exception::LOGIN_AUTHENTICATIONFAILED + ); + break; + + case 'AUTHORIZATIONFAILED': + // Defined by RFC 5530 [3] + $pipeline->data['loginerr'] = new Horde_Imap_Client_Exception( + Horde_Imap_Client_Translation::r("Authentication was successful, but authorization failed."), + Horde_Imap_Client_Exception::LOGIN_AUTHORIZATIONFAILED + ); + break; + + case 'EXPIRED': + // Defined by RFC 5530 [3] + $pipeline->data['loginerr'] = new Horde_Imap_Client_Exception( + Horde_Imap_Client_Translation::r("Authentication credentials have expired."), + Horde_Imap_Client_Exception::LOGIN_EXPIRED + ); + break; + + case 'PRIVACYREQUIRED': + // Defined by RFC 5530 [3] + $pipeline->data['loginerr'] = new Horde_Imap_Client_Exception( + Horde_Imap_Client_Translation::r("Operation failed due to a lack of a secure connection."), + Horde_Imap_Client_Exception::LOGIN_PRIVACYREQUIRED + ); + break; + + case 'NOPERM': + // Defined by RFC 5530 [3] + throw new Horde_Imap_Client_Exception_ServerResponse( + Horde_Imap_Client_Translation::r("You do not have adequate permissions to carry out this operation."), + Horde_Imap_Client_Exception::NOPERM, + $ob, + $pipeline + ); + + case 'INUSE': + // Defined by RFC 5530 [3] + throw new Horde_Imap_Client_Exception_ServerResponse( + Horde_Imap_Client_Translation::r("There was a temporary issue when attempting this operation. Please try again later."), + Horde_Imap_Client_Exception::INUSE, + $ob, + $pipeline + ); + + case 'EXPUNGEISSUED': + // Defined by RFC 5530 [3] + $pipeline->data['expungeissued'] = true; + break; + + case 'CORRUPTION': + // Defined by RFC 5530 [3] + throw new Horde_Imap_Client_Exception_ServerResponse( + Horde_Imap_Client_Translation::r("The mail server is reporting corrupt data in your mailbox."), + Horde_Imap_Client_Exception::CORRUPTION, + $ob, + $pipeline + ); + + case 'SERVERBUG': + case 'CLIENTBUG': + case 'CANNOT': + // Defined by RFC 5530 [3] + $this->_debug->info( + 'ERROR: mail server explicitly reporting an error.' + ); + break; + + case 'LIMIT': + // Defined by RFC 5530 [3] + throw new Horde_Imap_Client_Exception_ServerResponse( + Horde_Imap_Client_Translation::r("The mail server has denied the request."), + Horde_Imap_Client_Exception::LIMIT, + $ob, + $pipeline + ); + + case 'OVERQUOTA': + // Defined by RFC 5530 [3] + throw new Horde_Imap_Client_Exception_ServerResponse( + Horde_Imap_Client_Translation::r("The operation failed because the quota has been exceeded on the mail server."), + Horde_Imap_Client_Exception::OVERQUOTA, + $ob, + $pipeline + ); + + case 'ALREADYEXISTS': + // Defined by RFC 5530 [3] + throw new Horde_Imap_Client_Exception_ServerResponse( + Horde_Imap_Client_Translation::r("The object could not be created because it already exists."), + Horde_Imap_Client_Exception::ALREADYEXISTS, + $ob, + $pipeline + ); + + case 'NONEXISTENT': + // Defined by RFC 5530 [3] + throw new Horde_Imap_Client_Exception_ServerResponse( + Horde_Imap_Client_Translation::r("The object could not be deleted because it does not exist."), + Horde_Imap_Client_Exception::NONEXISTENT, + $ob, + $pipeline + ); + + case 'USEATTR': + // Defined by RFC 6154 [3] + throw new Horde_Imap_Client_Exception_ServerResponse( + Horde_Imap_Client_Translation::r("The special-use attribute requested for the mailbox is not supported."), + Horde_Imap_Client_Exception::USEATTR, + $ob, + $pipeline + ); + + case 'DOWNGRADED': + // Defined by RFC 6858 [3] + $downgraded = $this->getIdsOb($rc->data[0]); + foreach ($pipeline->fetch as $val) { + if (in_array($val->getUid(), $downgraded)) { + $val->setDowngraded(true); + } + } + break; + + case 'XPROXYREUSE': + // The proxy connection was reused, so no need to do login tasks. + $pipeline->data['proxyreuse'] = true; + break; + + default: + // Unknown response codes SHOULD be ignored - RFC 3501 [7.1] + break; + } + } + +} diff --git a/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Socket/Catenate.php b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Socket/Catenate.php new file mode 100644 index 00000000..7aca25f4 --- /dev/null +++ b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Socket/Catenate.php @@ -0,0 +1,167 @@ + + * @category Horde + * @copyright 2012-2017 Horde LLC + * @internal + * @license http://www.horde.org/licenses/lgpl21 LGPL 2.1 + * @package Imap_Client + */ +class Horde_Imap_Client_Socket_Catenate +{ + /** + * Socket object. + * + * @var Horde_Imap_Client_Socket + */ + protected $_socket; + + /** + * Constructor. + * + * @param Horde_Imap_Client_Socket $socket Socket object. + */ + public function __construct(Horde_Imap_Client_Socket $socket) + { + $this->_socket = $socket; + } + + /** + * Given an IMAP URL, fetches the corresponding part. + * + * @param Horde_Imap_Client_Url_Imap $url An IMAP URL. + * + * @return resource The section contents in a stream. Returns null if + * the part could not be found. + * + * @throws Horde_Imap_Client_Exception + */ + public function fetchFromUrl(Horde_Imap_Client_Url_Imap $url) + { + $ids_ob = $this->_socket->getIdsOb($url->uid); + + // BODY[] + if (is_null($url->section)) { + $query = new Horde_Imap_Client_Fetch_Query(); + $query->fullText(array( + 'peek' => true + )); + + $fetch = $this->_socket->fetch($url->mailbox, $query, array( + 'ids' => $ids_ob + )); + return $fetch[$url->uid]->getFullMsg(true); + } + + $section = trim($url->section); + + // BODY[<#.>HEADER.FIELDS<.NOT>()] + if (($pos = stripos($section, 'HEADER.FIELDS')) !== false) { + $hdr_pos = strpos($section, '('); + $cmd = substr($section, 0, $hdr_pos); + + $query = new Horde_Imap_Client_Fetch_Query(); + $query->headers( + 'section', + explode(' ', substr($section, $hdr_pos + 1, strrpos($section, ')') - $hdr_pos)), + array( + 'id' => ($pos ? substr($section, 0, $pos - 1) : 0), + 'notsearch' => (stripos($cmd, '.NOT') !== false), + 'peek' => true + ) + ); + + $fetch = $this->_socket->fetch($url->mailbox, $query, array( + 'ids' => $ids_ob + )); + return $fetch[$url->uid]->getHeaders('section', Horde_Imap_Client_Data_Fetch::HEADER_STREAM); + } + + // BODY[#] + if (is_numeric(substr($section, -1))) { + $query = new Horde_Imap_Client_Fetch_Query(); + $query->bodyPart($section, array( + 'peek' => true + )); + + $fetch = $this->_socket->fetch($url->mailbox, $query, array( + 'ids' => $ids_ob + )); + return $fetch[$url->uid]->getBodyPart($section, true); + } + + // BODY[<#.>HEADER] + if (($pos = stripos($section, 'HEADER')) !== false) { + $id = $pos + ? substr($section, 0, $pos - 1) + : 0; + + $query = new Horde_Imap_Client_Fetch_Query(); + $query->headerText(array( + 'id' => $id, + 'peek' => true + )); + + $fetch = $this->_socket->fetch($url->mailbox, $query, array( + 'ids' => $ids_ob + )); + return $fetch[$url->uid]->getHeaderText($id, Horde_Imap_Client_Data_Fetch::HEADER_STREAM); + } + + // BODY[<#.>TEXT] + if (($pos = stripos($section, 'TEXT')) !== false) { + $id = $pos + ? substr($section, 0, $pos - 1) + : 0; + + $query = new Horde_Imap_Client_Fetch_Query(); + $query->bodyText(array( + 'id' => $id, + 'peek' => true + )); + + $fetch = $this->_socket->fetch($url->mailbox, $query, array( + 'ids' => $ids_ob + )); + return $fetch[$url->uid]->getBodyText($id, true); + } + + // BODY[<#.>MIMEHEADER] + if (($pos = stripos($section, 'MIME')) !== false) { + $id = $pos + ? substr($section, 0, $pos - 1) + : 0; + + $query = new Horde_Imap_Client_Fetch_Query(); + $query->mimeHeader($id, array( + 'peek' => true + )); + + $fetch = $this->_socket->fetch($url->mailbox, $query, array( + 'ids' => $ids_ob + )); + return $fetch[$url->uid]->getMimeHeader($id, Horde_Imap_Client_Data_Fetch::HEADER_STREAM); + } + + return null; + } + +} diff --git a/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Socket/ClientSort.php b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Socket/ClientSort.php new file mode 100644 index 00000000..5823cdac --- /dev/null +++ b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Socket/ClientSort.php @@ -0,0 +1,373 @@ + + * @category Horde + * @copyright 2012-2017 Horde LLC + * @internal + * @license http://www.horde.org/licenses/lgpl21 LGPL 2.1 + * @package Imap_Client + */ +class Horde_Imap_Client_Socket_ClientSort +{ + /** + * Collator object to use for sotring. + * + * @var Collator + */ + protected $_collator; + + /** + * Socket object. + * + * @var Horde_Imap_Client_Socket + */ + protected $_socket; + + /** + * Constructor. + * + * @param Horde_Imap_Client_Socket $socket Socket object. + */ + public function __construct(Horde_Imap_Client_Socket $socket) + { + $this->_socket = $socket; + + if (class_exists('Collator')) { + $this->_collator = new Collator(null); + } + } + + /** + * Sort search results client side if the server does not support the SORT + * IMAP extension (RFC 5256). + * + * @param Horde_Imap_Client_Ids $res The search results. + * @param array $opts The options to _search(). + * + * @return array The sort results. + * + * @throws Horde_Imap_Client_Exception + */ + public function clientSort($res, $opts) + { + if (!count($res)) { + return $res; + } + + /* Generate the FETCH command needed. */ + $query = new Horde_Imap_Client_Fetch_Query(); + + foreach ($opts['sort'] as $val) { + switch ($val) { + case Horde_Imap_Client::SORT_ARRIVAL: + $query->imapDate(); + break; + + case Horde_Imap_Client::SORT_DATE: + $query->imapDate(); + $query->envelope(); + break; + + case Horde_Imap_Client::SORT_CC: + case Horde_Imap_Client::SORT_DISPLAYFROM: + case Horde_Imap_Client::SORT_DISPLAYTO: + case Horde_Imap_Client::SORT_FROM: + case Horde_Imap_Client::SORT_SUBJECT: + case Horde_Imap_Client::SORT_TO: + $query->envelope(); + break; + + case Horde_Imap_Client::SORT_SEQUENCE: + $query->seq(); + break; + + case Horde_Imap_Client::SORT_SIZE: + $query->size(); + break; + } + } + + if (!count($query)) { + return $res; + } + + $mbox = $this->_socket->currentMailbox(); + $fetch_res = $this->_socket->fetch(isset($mbox['mailbox']) ? $mbox['mailbox'] : null, $query, array( + 'ids' => $res + )); + + return $this->_clientSortProcess($res->ids, $fetch_res, $opts['sort']); + } + + /** + * If server does not support the THREAD IMAP extension (RFC 5256), do + * ORDEREDSUBJECT threading on the client side. + * + * @param Horde_Imap_Client_Fetch_Results $data Fetch results. + * @param boolean $uids Are IDs UIDs? + * + * @return array The thread sort results. + */ + public function threadOrderedSubject(Horde_Imap_Client_Fetch_Results $data, + $uids) + { + $dates = $this->_getSentDates($data, $data->ids()); + $out = $sorted = $tsort = array(); + + foreach ($data as $k => $v) { + $subject = strval(new Horde_Imap_Client_Data_BaseSubject($v->getEnvelope()->subject)); + $sorted[$subject][$k] = $dates[$k]; + } + + /* Step 1: Sort by base subject (already done). + * Step 2: Sort by sent date within each thread. */ + foreach (array_keys($sorted) as $key) { + $this->_stableAsort($sorted[$key]); + $tsort[$key] = reset($sorted[$key]); + } + + /* Step 3: Sort by the sent date of the first message in the + * thread. */ + $this->_stableAsort($tsort); + + /* Now, $tsort contains the order of the threads, and each thread + * is sorted in $sorted. */ + foreach (array_keys($tsort) as $key) { + $keys = array_keys($sorted[$key]); + $out[$keys[0]] = array( + $keys[0] => 0 + ) + array_fill_keys(array_slice($keys, 1) , 1); + } + + return new Horde_Imap_Client_Data_Thread( + $out, + $uids ? 'uid' : 'sequence' + ); + } + + /** + */ + protected function _clientSortProcess($res, $fetch_res, $sort) + { + /* The initial sort is on the entire set. */ + $slices = array(0 => $res); + $reverse = false; + + foreach ($sort as $val) { + if ($val == Horde_Imap_Client::SORT_REVERSE) { + $reverse = true; + continue; + } + + $slices_list = $slices; + $slices = array(); + + foreach ($slices_list as $slice_start => $slice) { + $sorted = array(); + + switch ($val) { + case Horde_Imap_Client::SORT_SEQUENCE: + /* There is no requirement that IDs be returned in + * sequence order (see RFC 4549 [4.3.1]). So we must sort + * ourselves. */ + $sorted = array_flip($slice); + ksort($sorted, SORT_NUMERIC); + break; + + case Horde_Imap_Client::SORT_SIZE: + foreach ($slice as $num) { + $sorted[$num] = $fetch_res[$num]->getSize(); + } + asort($sorted, SORT_NUMERIC); + break; + + case Horde_Imap_Client::SORT_DISPLAYFROM: + case Horde_Imap_Client::SORT_DISPLAYTO: + $field = ($val == Horde_Imap_Client::SORT_DISPLAYFROM) + ? 'from' + : 'to'; + + foreach ($slice as $num) { + $ob = $fetch_res[$num]->getEnvelope()->$field; + $sorted[$num] = ($addr_ob = $ob[0]) + ? $addr_ob->personal ?: $addr_ob->mailbox + : null; + } + + $this->_sortString($sorted); + break; + + case Horde_Imap_Client::SORT_CC: + case Horde_Imap_Client::SORT_FROM: + case Horde_Imap_Client::SORT_TO: + if ($val == Horde_Imap_Client::SORT_CC) { + $field = 'cc'; + } elseif ($val == Horde_Imap_Client::SORT_FROM) { + $field = 'from'; + } else { + $field = 'to'; + } + + foreach ($slice as $num) { + $tmp = $fetch_res[$num]->getEnvelope()->$field; + $sorted[$num] = count($tmp) + ? $tmp[0]->mailbox + : null; + } + + $this->_sortString($sorted); + break; + + case Horde_Imap_Client::SORT_ARRIVAL: + $sorted = $this->_getSentDates($fetch_res, $slice, true); + asort($sorted, SORT_NUMERIC); + break; + + case Horde_Imap_Client::SORT_DATE: + // Date sorting rules in RFC 5256 [2.2] + $sorted = $this->_getSentDates($fetch_res, $slice); + asort($sorted, SORT_NUMERIC); + break; + + case Horde_Imap_Client::SORT_SUBJECT: + // Subject sorting rules in RFC 5256 [2.1] + foreach ($slice as $num) { + $sorted[$num] = strval(new Horde_Imap_Client_Data_BaseSubject($fetch_res[$num]->getEnvelope()->subject)); + } + + $this->_sortString($sorted); + break; + } + + // At this point, keys of $sorted are sequence/UID and values + // are the sort strings + if (!empty($sorted)) { + if ($reverse) { + $sorted = array_reverse($sorted, true); + } + + if (count($sorted) === count($res)) { + $res = array_keys($sorted); + } else { + array_splice($res, $slice_start, count($slice), array_keys($sorted)); + } + + // Check for ties. + $last = $start = null; + $i = 0; + $todo = array(); + + foreach ($sorted as $k => $v) { + if (is_null($last) || ($last != $v)) { + if ($i) { + $todo[] = array($start, $i); + $i = 0; + } + $last = $v; + $start = $k; + } else { + ++$i; + } + } + if ($i) { + $todo[] = array($start, $i); + } + + foreach ($todo as $v) { + $slices[array_search($v[0], $res)] = array_keys( + array_slice( + $sorted, + array_search($v[0], $sorted), + $v[1] + 1, + true + ) + ); + } + } + } + + $reverse = false; + } + + return $res; + } + + /** + * Get the sent dates for purposes of SORT/THREAD sorting under RFC 5256 + * [2.2]. + * + * @param Horde_Imap_Client_Fetch_Results $data Data returned from + * fetch() that includes + * both date and envelope + * items. + * @param array $ids The IDs to process. + * @param boolean $internal Only use internal date? + * + * @return array A mapping of IDs -> UNIX timestamps. + */ + protected function _getSentDates(Horde_Imap_Client_Fetch_Results $data, + $ids, $internal = false) + { + $dates = array(); + + foreach ($ids as $num) { + $dt = ($internal || !isset($data[$num]->getEnvelope()->date)) + // RFC 5256 [3] & 3501 [6.4.4]: disregard timezone when + // using internaldate. + ? $data[$num]->getImapDate() + : $data[$num]->getEnvelope()->date; + $dates[$num] = $dt->format('U'); + } + + return $dates; + } + + /** + * Stable asort() function. + * + * PHP's asort() (BWT) is not a stable sort - identical values have no + * guarantee of key order. Use Schwartzian Transform instead. See: + * http://notmysock.org/blog/php/schwartzian-transform.html + * + * @param array &$a Array to sort. + */ + protected function _stableAsort(&$a) + { + array_walk($a, function(&$v, $k) { $v = array($v, $k); }); + asort($a); + array_walk($a, function(&$v, $k) { $v = $v[0]; }); + } + + /** + * Sort an array of strings based on current locale. + * + * @param array &$sorted Array of strings. + */ + protected function _sortString(&$sorted) + { + if (empty($this->_collator)) { + asort($sorted, SORT_LOCALE_STRING); + } else { + $this->_collator->asort($sorted, Collator::SORT_STRING); + } + } + +} diff --git a/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Socket/Connection/Base.php b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Socket/Connection/Base.php new file mode 100644 index 00000000..8f616a3f --- /dev/null +++ b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Socket/Connection/Base.php @@ -0,0 +1,76 @@ + + * @category Horde + * @copyright 2014-2017 Horde LLC + * @internal + * @license http://www.horde.org/licenses/lgpl21 LGPL 2.1 + * @package Imap_Client + */ +class Horde_Imap_Client_Socket_Connection_Base extends Horde\Socket\Client +{ + /** + * Protocol type. + * + * @var string + */ + protected $_protocol = 'imap'; + + /** + */ + protected function _connect($host, $port, $timeout, $secure, $context, $retries = 0) + { + if ($retries || !$this->_params['debug']->debug) { + $timer = null; + } else { + $url = ($this->_protocol == 'imap') + ? new Horde_Imap_Client_Url_Imap() + : new Horde_Imap_Client_Url_Pop3(); + $url->host = $host; + $url->port = $port; + $this->_params['debug']->info(sprintf( + 'Connection to: %s', + strval($url) + )); + + $timer = new Horde_Support_Timer(); + $timer->push(); + } + + try { + parent::_connect($host, $port, $timeout, $secure, $context, $retries); + } catch (Horde\Socket\Client\Exception $e) { + $this->_params['debug']->info(sprintf( + 'Connection failed: %s', + $e->getMessage() + )); + throw $e; + } + + if ($timer) { + $this->_params['debug']->info(sprintf( + 'Server connection took %s seconds.', + round($timer->pop(), 4) + )); + } + } + +} diff --git a/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Socket/Connection/Pop3.php b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Socket/Connection/Pop3.php new file mode 100644 index 00000000..2c7c6e86 --- /dev/null +++ b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Socket/Connection/Pop3.php @@ -0,0 +1,93 @@ + + * @category Horde + * @copyright 2013-2017 Horde LLC + * @internal + * @license http://www.horde.org/licenses/lgpl21 LGPL 2.1 + * @package Imap_Client + */ +class Horde_Imap_Client_Socket_Connection_Pop3 +extends Horde_Imap_Client_Socket_Connection_Base +{ + /** + */ + protected $_protocol = 'pop3'; + + /** + * Writes data to the POP3 output stream. + * + * @param string $data String data. + * @param boolean $debug Output line to debug? + * + * @throws Horde_Imap_Client_Exception + */ + public function write($data, $debug = true) + { + if (fwrite($this->_stream, $data . "\r\n") === false) { + throw new Horde_Imap_Client_Exception( + Horde_Imap_Client_Translation::r("Server write error."), + Horde_Imap_Client_Exception::SERVER_WRITEERROR + ); + } + + if ($debug) { + $this->_params['debug']->client($data); + } + } + + /** + * Read data from incoming POP3 stream. + * + * @param integer $size UNUSED: The number of bytes to read from the + * socket. + * + * @return string Line of data. + * + * @throws Horde_Imap_Client_Exception + */ + public function read($size = null) + { + if (feof($this->_stream)) { + $this->close(); + $this->_params['debug']->info( + 'ERROR: Server closed the connection.' + ); + throw new Horde_Imap_Client_Exception( + Horde_Imap_Client_Translation::r("Server closed the connection unexpectedly."), + Horde_Imap_Client_Exception::DISCONNECT + ); + } + + if (($read = fgets($this->_stream)) === false) { + $this->_params['debug']->info('ERROR: read/timeout error.'); + throw new Horde_Imap_Client_Exception( + Horde_Imap_Client_Translation::r("Error when communicating with the mail server."), + Horde_Imap_Client_Exception::SERVER_READERROR + ); + } + + $this->_params['debug']->server(rtrim($read, "\r\n")); + + return $read; + } + +} diff --git a/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Socket/Connection/Socket.php b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Socket/Connection/Socket.php new file mode 100644 index 00000000..d95ccdc1 --- /dev/null +++ b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Socket/Connection/Socket.php @@ -0,0 +1,222 @@ + + * @category Horde + * @copyright 2013-2017 Horde LLC + * @internal + * @license http://www.horde.org/licenses/lgpl21 LGPL 2.1 + * @package Imap_Client + */ +class Horde_Imap_Client_Socket_Connection_Socket +extends Horde_Imap_Client_Socket_Connection_Base +{ + /** + * If false, does not outpt the current line of client output to debug. + * + * @var boolean + */ + public $client_debug = true; + + /** + * Sending buffer. + * + * @var string + */ + protected $_buffer = ''; + + /** + * Writes data to the IMAP output stream. + * + * @param string $data String data. + * @param boolean $eol Append EOL? + * + * @throws Horde_Imap_Client_Exception + */ + public function write($data, $eol = false) + { + if ($eol) { + $buffer = $this->_buffer; + $debug = $this->client_debug; + $this->_buffer = ''; + + $this->client_debug = true; + + if (fwrite($this->_stream, $buffer . $data . ($eol ? "\r\n" : '')) === false) { + throw new Horde_Imap_Client_Exception( + Horde_Imap_Client_Translation::r("Server write error."), + Horde_Imap_Client_Exception::SERVER_WRITEERROR + ); + } + + if ($debug) { + $this->_params['debug']->client($buffer . $data); + } + } else { + $this->_buffer .= $data; + } + } + + /** + * Writes literal data to the IMAP output stream. + * + * @param mixed $data Either a stream resource, or Horde_Stream + * object. + * @param integer $length The literal length. + * @param boolean $binary If true, this is binary data. + * + * @throws Horde_Imap_Client_Exception + */ + public function writeLiteral($data, $length, $binary = false) + { + $this->_buffer = ''; + $success = false; + + if ($data instanceof Horde_Stream) { + $data = $data->stream; + } + + if (rewind($data)) { + $success = true; + while (!feof($data)) { + if ((($read_data = fread($data, 8192)) === false) || + (fwrite($this->_stream, $read_data) === false)) { + $success = false; + break; + } + } + } + + if (!$success) { + $this->client_debug = true; + throw new Horde_Imap_Client_Exception( + Horde_Imap_Client_Translation::r("Server write error."), + Horde_Imap_Client_Exception::SERVER_WRITEERROR + ); + } + + if ($this->client_debug && !empty($this->_params['debugliteral'])) { + rewind($data); + while (!feof($data)) { + $this->_params['debug']->raw(fread($data, 8192)); + } + } else { + $this->_params['debug']->client('[' . ($binary ? 'BINARY' : 'LITERAL') . ' DATA: ' . $length . ' bytes]'); + } + } + + /** + * Read data from incoming IMAP stream. + * + * @param integer $size UNUSED: The number of bytes to read from the + * socket. + * + * @return Horde_Imap_Client_Tokenize The tokenized data. + * + * @throws Horde_Imap_Client_Exception + */ + public function read($size = null) + { + $got_data = false; + $literal_len = null; + $token = new Horde_Imap_Client_Tokenize(); + + do { + if (feof($this->_stream)) { + $this->close(); + $this->_params['debug']->info( + 'ERROR: Server closed the connection.' + ); + throw new Horde_Imap_Client_Exception( + Horde_Imap_Client_Translation::r("Mail server closed the connection unexpectedly."), + Horde_Imap_Client_Exception::DISCONNECT + ); + } + + if (is_null($literal_len)) { + $buffer = ''; + + while (($in = fgets($this->_stream)) !== false) { + $got_data = true; + + if (substr($in, -1) === "\n") { + $in = rtrim($in); + $this->_params['debug']->server($buffer . $in); + $token->add($in); + break; + } + + $buffer .= $in; + $token->add($in); + } + + /* Check for literal data. */ + if (is_null($len = $token->getLiteralLength())) { + break; + } + + // Skip 0-length literal data. + if ($len['length']) { + $binary = $len['binary']; + $literal_len = $len['length']; + } + + continue; + } + + $old_len = $literal_len; + + while (($literal_len > 0) && !feof($this->_stream)) { + $in = fread($this->_stream, min($literal_len, 8192)); + /* Only store in stream if this is something more than a + * nominal number of bytes. */ + if ($old_len > 256) { + $token->addLiteralStream($in); + } else { + $token->add($in); + } + + if (!empty($this->_params['debugliteral'])) { + $this->_params['debug']->raw($in); + } + + $got_data = true; + $literal_len -= strlen($in); + } + + $literal_len = null; + + if (empty($this->_params['debugliteral'])) { + $this->_params['debug']->server('[' . ($binary ? 'BINARY' : 'LITERAL') . ' DATA: ' . $old_len . ' bytes]'); + } + } while (true); + + if (!$got_data) { + $this->_params['debug']->info('ERROR: read/timeout error.'); + throw new Horde_Imap_Client_Exception( + Horde_Imap_Client_Translation::r("Error when communicating with the mail server."), + Horde_Imap_Client_Exception::SERVER_READERROR + ); + } + + return $token; + } + +} diff --git a/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Socket/Pop3.php b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Socket/Pop3.php new file mode 100644 index 00000000..8833de96 --- /dev/null +++ b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Socket/Pop3.php @@ -0,0 +1,1543 @@ + + * Damian Fernandez Sosa + * + * Copyright (c) 2002, Richard Heyes + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * o Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * o Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * o The names of the authors may not be used to endorse or promote + * products derived from this software without specific prior written + * permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * --------------------------------------------------------------------------- + * + * @category Horde + * @copyright 2002 Richard Heyes + * @copyright 2009-2017 Horde LLC + * @license http://www.horde.org/licenses/lgpl21 LGPL 2.1 + * @package Imap_Client + */ + +/** + * An interface to a POP3 server using PHP functions. + * + * It is an abstraction layer allowing POP3 commands to be used based on + * IMAP equivalents. + * + * This driver implements the following POP3-related RFCs: + *
+ *   - STD 53/RFC 1939: POP3 specification
+ *   - RFC 2195: CRAM-MD5 authentication
+ *   - RFC 2449: POP3 extension mechanism
+ *   - RFC 2595/4616: PLAIN authentication
+ *   - RFC 2831: DIGEST-MD5 SASL Authentication (obsoleted by RFC 6331)
+ *   - RFC 3206: AUTH/SYS response codes
+ *   - RFC 4616: AUTH=PLAIN
+ *   - RFC 5034: POP3 SASL
+ *   - RFC 5802: AUTH=SCRAM-SHA-1
+ *   - RFC 6856: UTF8, LANG
+ * 
+ * + * @author Richard Heyes + * @author Michael Slusarz + * @category Horde + * @copyright 2002 Richard Heyes + * @copyright 2009-2017 Horde LLC + * @license http://www.horde.org/licenses/lgpl21 LGPL 2.1 + * @package Imap_Client + */ +class Horde_Imap_Client_Socket_Pop3 extends Horde_Imap_Client_Base +{ + /* Internal key used to store mailbox level cache data. \1 is not a valid + * ID in POP3, so it should be safe to use. */ + const MBOX_CACHE = "\1mbox"; + + /** + * The default ports to use for a connection. + * + * @var array + */ + protected $_defaultPorts = array(110, 995); + + /** + * The list of deleted messages. + * + * @var array + */ + protected $_deleted = array(); + + /** + * This object returns POP3 Fetch data objects. + * + * @var string + */ + protected $_fetchDataClass = 'Horde_Imap_Client_Data_Fetch_Pop3'; + + /** + */ + public function __get($name) + { + $out = parent::__get($name); + + switch ($name) { + case 'url': + $out->protocol = 'pop3'; + break; + } + + return $out; + } + + /** + */ + protected function _initCache($current = false) + { + return parent::_initCache($current) && + $this->_capability('UIDL'); + } + + /** + */ + public function getIdsOb($ids = null, $sequence = false) + { + return new Horde_Imap_Client_Ids_Pop3($ids, $sequence); + } + + /** + */ + protected function _initCapability() + { + $this->_connect(); + + $c = new Horde_Imap_Client_Data_Capability(); + + try { + $res = $this->_sendLine('CAPA', array( + 'multiline' => 'array' + )); + + foreach ($res['data'] as $val) { + $prefix = explode(' ', $val); + $c->add($prefix[0], array_slice($prefix, 1)); + } + } catch (Horde_Imap_Client_Exception $e) { + $this->_temp['no_capa'] = true; + + /* Need to probe for capabilities if CAPA command is not + * available. */ + $c->add('USER'); + + /* Capability sniffing only guaranteed after authentication is + * completed (if any). */ + if (!empty($this->_init['authmethod'])) { + $this->_pop3Cache('uidl'); + if (empty($this->_temp['no_uidl'])) { + $c->add('UIDL'); + } + + $this->_pop3Cache('top', 1); + if (empty($this->_temp['no_top'])) { + $c->add('TOP'); + } + } + } + + $this->_setInit('capability', $c); + } + + /** + */ + protected function _noop() + { + $this->_sendLine('NOOP'); + } + + /** + * @throws Horde_Imap_Client_Exception_NoSupportPop3 + */ + protected function _getNamespaces() + { + throw new Horde_Imap_Client_Exception_NoSupportPop3('Namespaces'); + } + + /** + */ + protected function _login() + { + /* Blank passwords are not allowed, so no need to even try + * authentication to determine this. */ + if (!strlen($this->getParam('password'))) { + throw new Horde_Imap_Client_Exception( + Horde_Imap_Client_Translation::r("No password provided."), + Horde_Imap_Client_Exception::LOGIN_AUTHENTICATIONFAILED + ); + } + + $this->_connect(); + + $first_login = empty($this->_init['authmethod']); + + // Switch to secure channel if using TLS. + if (!$this->isSecureConnection()) { + $secure = $this->getParam('secure'); + + if (($secure === 'tls') || $secure === true) { + // Switch over to a TLS connection. + if ($first_login && !$this->_capability('STLS')) { + if ($secure === 'tls') { + throw new Horde_Imap_Client_Exception( + Horde_Imap_Client_Translation::r("Could not open secure connection to the POP3 server.") . ' ' . Horde_Imap_Client_Translation::r("Server does not support secure connections."), + Horde_Imap_Client_Exception::LOGIN_TLSFAILURE + ); + } else { + $this->setParam('secure', false); + } + } else { + $this->_sendLine('STLS'); + + $this->setParam('secure', 'tls'); + + if (!$this->_connection->startTls()) { + $this->logout(); + throw new Horde_Imap_Client_Exception( + Horde_Imap_Client_Translation::r("Could not open secure connection to the POP3 server."), + Horde_Imap_Client_Exception::LOGIN_TLSFAILURE + ); + } + $this->_debug->info('Successfully completed TLS negotiation.'); + } + + // Expire cached CAPABILITY information + $this->_setInit('capability'); + } else { + $this->setParam('secure', false); + } + } + + if ($first_login) { + /* At least one server (Dovecot 1.x) may return SASL capability + * with no arguments. */ + $auth_mech = $this->_capability()->getParams('SASL'); + + if (isset($this->_temp['pop3timestamp'])) { + $auth_mech[] = 'APOP'; + } + + $auth_mech[] = 'USER'; + + /* Enable UTF-8 mode (RFC 6856). MUST occur after STLS is + * issued. */ + if ($this->_capability('UTF8')) { + try { + $this->_sendLine('UTF8'); + $this->_temp['utf8'] = true; + } catch (Horde_Imap_Client_Exception $e) { + /* If server responds to UTF8 command with error, + * fallback to legacy non-UTF8 behavior. */ + } + } + } else { + $auth_mech = array($this->_init['authmethod']); + } + + foreach ($auth_mech as $method) { + try { + $this->_tryLogin($method); + $this->_setInit('authmethod', $method); + + if (!empty($this->_temp['no_capa']) || + !$this->_capability('UIDL')) { + $this->_setInit('capability'); + } + + return true; + } catch (Horde_Imap_Client_Exception $e) { + if (!empty($this->_init['authmethod']) && + ($e->getCode() != $e::LOGIN_UNAVAILABLE) && + ($e->getCode() != $e::POP3_TEMP_ERROR)) { + $this->_setInit(); + return $this->login(); + } + } + } + + throw new Horde_Imap_Client_Exception( + Horde_Imap_Client_Translation::r("POP3 server denied authentication."), + $e->getCode() ?: $e::LOGIN_AUTHENTICATIONFAILED + ); + } + + /** + * Connects to the server. + * + * @throws Horde_Imap_Client_Exception + */ + protected function _connect() + { + if (!is_null($this->_connection)) { + return; + } + + try { + $this->_connection = new Horde_Imap_Client_Socket_Connection_Pop3( + $this->getParam('hostspec'), + $this->getParam('port'), + $this->getParam('timeout'), + $this->getParam('secure'), + $this->getParam('context'), + array( + 'debug' => $this->_debug + ) + ); + } catch (Horde\Socket\Client\Exception $e) { + $e2 = new Horde_Imap_Client_Exception( + Horde_Imap_Client_Translation::r("Error connecting to mail server."), + Horde_Imap_Client_Exception::SERVER_CONNECT + ); + $e2->details = $e->details; + throw $e2; + } + + $line = $this->_getResponse(); + + // Check for string matching APOP timestamp + if (preg_match('/<.+@.+>/U', $line['resp'], $matches)) { + $this->_temp['pop3timestamp'] = $matches[0]; + } + } + + /** + * Authenticate to the POP3 server. + * + * @param string $method POP3 login method. + * + * @throws Horde_Imap_Client_Exception + */ + protected function _tryLogin($method) + { + $username = $this->getParam('username'); + $password = $this->getParam('password'); + + switch ($method) { + case 'CRAM-MD5': + case 'CRAM-SHA1': + case 'CRAM-SHA256': + // RFC 5034: CRAM-MD5 + // CRAM-SHA1 & CRAM-SHA256 supported by Courier SASL library + $challenge = $this->_sendLine('AUTH ' . $method); + $response = base64_encode($username . ' ' . hash_hmac(Horde_String::lower(substr($method, 5)), base64_decode(substr($challenge['resp'], 2)), $password, true)); + $this->_sendLine($response, array( + 'debug' => sprintf('[AUTH Response (username: %s)]', $username) + )); + break; + + case 'DIGEST-MD5': + // RFC 2831; Obsoleted by RFC 6331 + $challenge = $this->_sendLine('AUTH DIGEST-MD5'); + $response = base64_encode(new Horde_Imap_Client_Auth_DigestMD5( + $username, + $password, + base64_decode(substr($challenge['resp'], 2)), + $this->getParam('hostspec'), + 'pop3' + )); + $sresponse = $this->_sendLine($response, array( + 'debug' => sprintf('[AUTH Response (username: %s)]', $username) + )); + if (stripos(base64_decode(substr($sresponse['resp'], 2)), 'rspauth=') === false) { + throw new Horde_Imap_Client_Exception( + Horde_Imap_Client_Translation::r("Unexpected response from server when authenticating."), + Horde_Imap_Client_Exception::SERVER_CONNECT + ); + } + + /* POP3 doesn't use protocol's third step. */ + $this->_sendLine(''); + break; + + case 'LOGIN': + // RFC 4616 (AUTH=PLAIN) & 5034 (POP3 SASL) + $this->_sendLine('AUTH LOGIN'); + $this->_sendLine(base64_encode($username)); + $this->_sendLine(base64_encode($password), array( + 'debug' => sprintf('[AUTH Password (username: %s)]', $username) + )); + break; + + case 'PLAIN': + // RFC 5034 + $this->_sendLine('AUTH PLAIN ' . base64_encode(implode("\0", array( + $username, + $username, + $password + ))), array( + 'debug' => sprintf('AUTH PLAIN [Auth Response (username: %s)]', $username) + )); + break; + + case 'APOP': + /* If UTF8 (+ USER) is active, and non-ASCII exists, need to apply + * SASLprep to username/password. RFC 6856[2.2]. Reject if + * UTF8 (+ USER) is not supported and 8-bit characters exist. */ + if (Horde_Mime::is8bit($username) || + Horde_Mime::is8bit($password)) { + if (empty($this->_temp['utf8']) || + !$this->_capability('UTF8', 'USER') || + !class_exists('Horde_Stringprep')) { + $error = true; + } else { + Horde_Stringprep::autoload(); + $saslprep = new Znerol\Component\Stringprep\Profile\SASLprep(); + + try { + $username = $saslprep->apply( + $username, + 'UTF-8', + Znerol\Compnonent\Stringprep\Profile::MODE_QUERY + ); + $password = $saslprep->apply( + $password, + 'UTF-8', + Znerol\Compnonent\Stringprep\Profile::MODE_STORE + ); + $error = false; + } catch (Znerol\Component\Stringprep\ProfileException $e) { + $error = true; + } + } + + if ($error) { + throw new Horde_Imap_Client_Exception( + Horde_Imap_Client_Translation::r("Authentication failed."), + Horde_Imap_Client_Exception::LOGIN_AUTHENTICATIONFAILED + ); + } + } + + // RFC 1939 [7] + $this->_sendLine('APOP ' . $username . ' ' . + hash('md5', $this->_temp['pop3timestamp'] . $password)); + break; + + case 'USER': + /* POP3 servers without UTF8 (+ USER) does not accept non-ASCII + * in USER/PASS. RFC 6856[2.2] */ + if ((empty($this->_temp['utf8']) || + !$this->_capability('UTF8', 'USER')) && + (Horde_Mime::is8bit($username) || + Horde_Mime::is8bit($password))) { + throw new Horde_Imap_Client_Exception( + Horde_Imap_Client_Translation::r("Authentication failed."), + Horde_Imap_Client_Exception::LOGIN_AUTHENTICATIONFAILED + ); + } + + // RFC 1939 [7] + $this->_sendLine('USER ' . $username); + $this->_sendLine('PASS ' . $password, array( + 'debug' => 'PASS [Password]' + )); + break; + + case 'SCRAM-SHA-1': + $scram = new Horde_Imap_Client_Auth_Scram( + $username, + $password, + 'SHA1' + ); + + $c1 = $this->_sendLine( + 'AUTH ' . $method . ' ' . base64_encode($scram->getClientFirstMessage()) + ); + + $sr1 = base64_decode(substr($c1['resp'], 2)); + if (!$scram->parseServerFirstMessage($sr1)) { + throw new Horde_Imap_Client_Exception( + Horde_Imap_Client_Translation::r("Authentication failed."), + Horde_Imap_Client_Exception::LOGIN_AUTHENTICATIONFAILED + ); + } + + $c2 = $this->_sendLine( + base64_encode($scram->getClientFinalMessage()) + ); + + $sr2 = base64_decode(substr($c2['resp'], 2)); + if (!$scram->parseServerFirstMessage($sr)) { + throw new Horde_Imap_Client_Exception( + Horde_Imap_Client_Translation::r("Authentication failed."), + Horde_Imap_Client_Exception::LOGIN_AUTHENTICATIONFAILED + ); + + /* This means authentication passed, according to the server, + * but the server signature is incorrect. This indicates that + * server verification has failed. Immediately disconnect from + * the server, since this is a possible security issue. */ + $this->logout(); + throw new Horde_Imap_Client_Exception( + Horde_Imap_Client_Translation::r("Server failed verification check."), + Horde_Imap_Client_Exception::LOGIN_SERVER_VERIFICATION_FAILED + ); + } + + $this->_sendLine(''); + break; + + default: + $e = new Horde_Imap_Client_Exception( + Horde_Imap_Client_Translation::r("Unknown authentication method: %s"), + Horde_Imap_Client_Exception::SERVER_CONNECT + ); + $e->messagePrintf(array($method)); + throw $e; + } + } + + /** + */ + protected function _logout() + { + try { + $this->_sendLine('QUIT'); + } catch (Horde_Imap_Client_Exception $e) {} + $this->_deleted = array(); + } + + /** + * @throws Horde_Imap_Client_Exception_NoSupportPop3 + */ + protected function _sendID($info) + { + throw new Horde_Imap_Client_Exception_NoSupportPop3('ID command'); + } + + /** + * Return implementation information from the POP3 server (RFC 2449 [6.9]). + */ + protected function _getID() + { + return ($id = $this->_capability()->getParams('IMPLEMENTATION')) + ? array('implementation' => reset($id)) + : array(); + } + + /** + * @throws Horde_Imap_Client_Exception_NoSupportPop3 + */ + protected function _setLanguage($langs) + { + // RFC 6856 [3] + if (!$this->_capability('LANG')) { + throw new Horde_Imap_Client_Exception_NoSupportPop3('LANGUAGE extension'); + } + + foreach ($langs as $val) { + try { + $this->_sendLine('LANG ' . $val); + $this->_temp['lang'] = $val; + } catch (Horde_Imap_Client_Exception $e) { + // Setting language failed - move on to next one. + } + } + + return $this->_getLanguage(false); + } + + /** + * @throws Horde_Imap_Client_Exception_NoSupportPop3 + */ + protected function _getLanguage($list) + { + // RFC 6856 [3] + if (!$this->_capability('LANG')) { + throw new Horde_Imap_Client_Exception_NoSupportPop3('LANGUAGE extension'); + } + + if (!$list) { + return isset($this->_temp['lang']) + ? $this->_temp['lang'] + : null; + } + + $langs = array(); + + try { + $res = $this->_sendLine('LANG', array( + 'multiline' => 'array' + )); + + foreach ($res['data'] as $val) { + $parts = explode(' ', $val); + $langs[] = $parts[0]; + // $parts[1] - lanuage description (not used) + } + } catch (Horde_Imap_Client_Exception $e) { + // Ignore: language listing might fail. RFC 6856 [3.3] + } + + return $langs; + } + + /** + * @throws Horde_Imap_Client_Exception_NoSupportPop3 + */ + protected function _openMailbox(Horde_Imap_Client_Mailbox $mailbox, $mode) + { + if ($mailbox != 'INBOX') { + throw new Horde_Imap_Client_Exception_NoSupportPop3('Mailboxes other than INBOX'); + } + $this->_changeSelected($mailbox, $mode); + } + + /** + * @throws Horde_Imap_Client_Exception_NoSupportPop3 + */ + protected function _createMailbox(Horde_Imap_Client_Mailbox $mailbox, $opts) + { + throw new Horde_Imap_Client_Exception_NoSupportPop3('Creating mailboxes'); + } + + /** + * @throws Horde_Imap_Client_Exception_NoSupportPop3 + */ + protected function _deleteMailbox(Horde_Imap_Client_Mailbox $mailbox) + { + throw new Horde_Imap_Client_Exception_NoSupportPop3('Deleting mailboxes'); + } + + /** + * @throws Horde_Imap_Client_Exception_NoSupportPop3 + */ + protected function _renameMailbox(Horde_Imap_Client_Mailbox $old, + Horde_Imap_Client_Mailbox $new) + { + throw new Horde_Imap_Client_Exception_NoSupportPop3('Renaming mailboxes'); + } + + /** + * @throws Horde_Imap_Client_Exception_NoSupportPop3 + */ + protected function _subscribeMailbox(Horde_Imap_Client_Mailbox $mailbox, + $subscribe) + { + throw new Horde_Imap_Client_Exception_NoSupportPop3('Mailboxes other than INBOX'); + } + + /** + */ + protected function _listMailboxes($pattern, $mode, $options) + { + if (empty($options['flat'])) { + return array( + 'INBOX' => array( + 'attributes' => array(), + 'delimiter' => '', + 'mailbox' => Horde_Imap_Client_Mailbox::get('INBOX') + ) + ); + } + + return array('INBOX' => Horde_Imap_Client_Mailbox::get('INBOX')); + } + + /** + * @param integer $flags This driver only supports the options listed + * under Horde_Imap_Client::STATUS_ALL. + * @throws Horde_Imap_Client_Exception_NoSupportPop3 + */ + protected function _status($mboxes, $flags) + { + if ((count($mboxes) > 1) || (reset($mboxes) != 'INBOX')) { + throw new Horde_Imap_Client_Exception_NoSupportPop3('Mailboxes other than INBOX'); + } + + $this->openMailbox('INBOX'); + + $ret = array(); + + if ($flags & Horde_Imap_Client::STATUS_MESSAGES) { + $res = $this->_pop3Cache('stat'); + $ret['messages'] = $res['msgs']; + } + + if ($flags & Horde_Imap_Client::STATUS_RECENT) { + $res = $this->_pop3Cache('stat'); + $ret['recent'] = $res['msgs']; + } + + // No need for STATUS_UIDNEXT_FORCE handling since STATUS_UIDNEXT will + // always return a value. + $uidl = $this->_capability('UIDL'); + if ($flags & Horde_Imap_Client::STATUS_UIDNEXT) { + if ($uidl) { + $ctx = hash_init('md5'); + foreach ($this->_pop3Cache('uidl') as $key => $val) { + hash_update($ctx, '|' . $key . '|' . $val); + } + $ret['uidnext'] = hash_final($ctx); + } else { + $res = $this->_pop3Cache('stat'); + $ret['uidnext'] = $res['msgs'] + 1; + } + } + + if ($flags & Horde_Imap_Client::STATUS_UIDVALIDITY) { + $ret['uidvalidity'] = $uidl + ? 1 + : microtime(true); + } + + if ($flags & Horde_Imap_Client::STATUS_UNSEEN) { + $ret['unseen'] = 0; + } + + return array('INBOX' => $ret); + } + + /** + * @throws Horde_Imap_Client_Exception_NoSupportPop3 + */ + protected function _append(Horde_Imap_Client_Mailbox $mailbox, $data, + $options) + { + throw new Horde_Imap_Client_Exception_NoSupportPop3('Appending messages'); + } + + /** + */ + protected function _check() + { + $this->noop(); + } + + /** + */ + protected function _close($options) + { + if (!empty($options['expunge'])) { + $this->logout(); + } + } + + /** + * @param array $options Additional options. 'ids' has no effect in this + * driver. + */ + protected function _expunge($options) + { + $msg_list = $this->_deleted; + $this->logout(); + return empty($options['list']) + ? null + : $msg_list; + } + + /** + * @throws Horde_Imap_Client_Exception_NoSupportPop3 + */ + protected function _search($query, $options) + { + $sort = empty($options['sort']) + ? null + : reset($options['sort']); + + // Only support a single query: an ALL search sorted by sequence. + if ((strval($options['_query']['query']) != 'ALL') || + ($sort && + ((count($options['sort']) > 1) || + ($sort != Horde_Imap_Client::SORT_SEQUENCE)))) { + throw new Horde_Imap_Client_Exception_NoSupportPop3('Server search'); + } + + $status = $this->status($this->_selected, Horde_Imap_Client::STATUS_MESSAGES); + $res = range(1, $status['messages']); + + if (empty($options['sequence'])) { + $tmp = array(); + $uidllist = $this->_pop3Cache('uidl'); + foreach ($res as $val) { + $tmp[] = $uidllist[$val]; + } + $res = $tmp; + } + + if (!empty($options['partial'])) { + $partial = $this->getIdsOb($options['partial'], true); + $min = $partial->min - 1; + $res = array_slice($res, $min, $partial->max - $min); + } + + $ret = array(); + foreach ($options['results'] as $val) { + switch ($val) { + case Horde_Imap_Client::SEARCH_RESULTS_COUNT: + $ret['count'] = count($res); + break; + + case Horde_Imap_Client::SEARCH_RESULTS_MATCH: + $ret['match'] = $this->getIdsOb($res); + break; + + case Horde_Imap_Client::SEARCH_RESULTS_MAX: + $ret['max'] = empty($res) ? null : max($res); + break; + + case Horde_Imap_Client::SEARCH_RESULTS_MIN: + $ret['min'] = empty($res) ? null : min($res); + break; + } + } + + return $ret; + } + + /** + * @throws Horde_Imap_Client_Exception_NoSupportPop3 + */ + protected function _setComparator($comparator) + { + throw new Horde_Imap_Client_Exception_NoSupportPop3('Search comparators'); + } + + /** + * @throws Horde_Imap_Client_Exception_NoSupportPop3 + */ + protected function _getComparator() + { + throw new Horde_Imap_Client_Exception_NoSupportPop3('Search comparators'); + } + + /** + * @throws Horde_Imap_Client_Exception_NoSupportPop3 + */ + protected function _thread($options) + { + throw new Horde_Imap_Client_Exception_NoSupportPop3('Server threading'); + } + + /** + */ + protected function _fetch(Horde_Imap_Client_Fetch_Results $results, + $queries) + { + foreach ($queries as $options) { + $this->_fetchCmd($results, $options); + } + + $this->_updateCache($results); + } + + /** + * Fetch data for a given fetch query. + * + * @param Horde_Imap_Client_Fetch_Results $results Fetch results. + * @param array $options Fetch query options. + */ + protected function _fetchCmd(Horde_Imap_Client_Fetch_Results $results, + $options) + { + // Grab sequence IDs - IDs will always be the message number for + // POP3 fetch commands. + $seq_ids = $this->_getSeqIds($options['ids']); + if (empty($seq_ids)) { + return; + } + + $lookup = $options['ids']->sequence + ? array_combine($seq_ids, $seq_ids) + : $this->_pop3Cache('uidl'); + + foreach ($options['_query'] as $type => $c_val) { + switch ($type) { + case Horde_Imap_Client::FETCH_FULLMSG: + foreach ($seq_ids as $id) { + $tmp = $this->_pop3Cache('msg', $id); + + if (empty($c_val['start']) && empty($c_val['length'])) { + $tmp2 = fopen('php://temp', 'r+'); + stream_copy_to_stream($tmp, $tmp2, empty($c_val['length']) ? -1 : $c_val['length'], empty($c_val['start']) ? 0 : $c_val['start']); + $results->get($lookup[$id])->setFullMsg($tmp2); + } else { + $results->get($lookup[$id])->setFullMsg($tmp); + } + } + break; + + case Horde_Imap_Client::FETCH_HEADERTEXT: + // Ignore 'peek' option + foreach ($c_val as $key => $val) { + foreach ($seq_ids as $id) { + /* Message header can be retrieved via TOP, if the + * command is available. */ + try { + $tmp = ($key == 0) + ? $this->_pop3Cache('hdr', $id) + : Horde_Mime_Part::getRawPartText(stream_get_contents($this->_pop3Cache('msg', $id)), 'header', $key); + $results->get($lookup[$id])->setHeaderText($key, $this->_processString($tmp, $c_val)); + } catch (Horde_Mime_Exception $e) {} + } + } + break; + + case Horde_Imap_Client::FETCH_BODYTEXT: + // Ignore 'peek' option + foreach ($c_val as $key => $val) { + foreach ($seq_ids as $id) { + try { + $results->get($lookup[$id])->setBodyText($key, $this->_processString(Horde_Mime_Part::getRawPartText(stream_get_contents($this->_pop3Cache('msg', $id)), 'body', $key), $val)); + } catch (Horde_Mime_Exception $e) {} + } + } + break; + + case Horde_Imap_Client::FETCH_MIMEHEADER: + // Ignore 'peek' option + foreach ($c_val as $key => $val) { + foreach ($seq_ids as $id) { + try { + $results->get($lookup[$id])->setMimeHeader($key, $this->_processString(Horde_Mime_Part::getRawPartText(stream_get_contents($this->_pop3Cache('msg', $id)), 'header', $key), $val)); + } catch (Horde_Mime_Exception $e) {} + } + } + break; + + case Horde_Imap_Client::FETCH_BODYPART: + // Ignore 'decode', 'peek' + foreach ($c_val as $key => $val) { + foreach ($seq_ids as $id) { + try { + $results->get($lookup[$id])->setBodyPart($key, $this->_processString(Horde_Mime_Part::getRawPartText(stream_get_contents($this->_pop3Cache('msg', $id)), 'body', $key), $val)); + } catch (Horde_Mime_Exception $e) {} + } + } + break; + + case Horde_Imap_Client::FETCH_HEADERS: + // Ignore 'length', 'peek' + foreach ($seq_ids as $id) { + $ob = $this->_pop3Cache('hdrob', $id); + foreach ($c_val as $key => $val) { + $tmp = $ob; + + if (empty($val['notsearch'])) { + $tmp2 = $tmp->toArray(array('nowrap' => true)); + foreach (array_keys($tmp2) as $hdr) { + if (!in_array($hdr, $val['headers'])) { + unset($tmp[$hdr]); + } + } + } else { + foreach ($val['headers'] as $hdr) { + unset($tmp[$hdr]); + } + } + + $results->get($lookup[$id])->setHeaders($key, $tmp); + } + } + break; + + case Horde_Imap_Client::FETCH_STRUCTURE: + foreach ($seq_ids as $id) { + if ($ptr = $this->_pop3Cache('msg', $id)) { + try { + $results->get($lookup[$id])->setStructure(Horde_Mime_Part::parseMessage(stream_get_contents($ptr), array('no_body' => true))); + } catch (Horde_Exception $e) {} + } + } + break; + + case Horde_Imap_Client::FETCH_ENVELOPE: + foreach ($seq_ids as $id) { + $tmp = $this->_pop3Cache('hdrob', $id); + $results->get($lookup[$id])->setEnvelope(array( + 'date' => $tmp['Date'], + 'subject' => $tmp['Subject'], + 'from' => ($h = $tmp['From']) ? $h->getAddressList(true) : null, + 'sender' => ($h = $tmp['Sender']) ? $h->getAddressList(true) : null, + 'reply_to' => ($h = $tmp['Reply-to']) ? $h->getAddressList(true) : null, + 'to' => ($h = $tmp['To']) ? $h->getAddressList(true) : null, + 'cc' => ($h = $tmp['Cc']) ? $h->getAddressList(true) : null, + 'bcc' => ($h = $tmp['Bcc']) ? $h->getAddressList(true) : null, + 'in_reply_to' => $tmp['In-Reply-To'], + 'message_id' => $tmp['Message-ID'] + )); + } + break; + + case Horde_Imap_Client::FETCH_IMAPDATE: + foreach ($seq_ids as $id) { + $tmp = $this->_pop3Cache('hdrob', $id); + $results->get($lookup[$id])->setImapDate($tmp['Date']); + } + break; + + case Horde_Imap_Client::FETCH_SIZE: + $sizelist = $this->_pop3Cache('size'); + foreach ($seq_ids as $id) { + $results->get($lookup[$id])->setSize($sizelist[$id]); + } + break; + + case Horde_Imap_Client::FETCH_SEQ: + foreach ($seq_ids as $id) { + $results->get($lookup[$id])->setSeq($id); + } + break; + + case Horde_Imap_Client::FETCH_UID: + $uidllist = $this->_pop3Cache('uidl'); + foreach ($seq_ids as $id) { + if (isset($uidllist[$id])) { + $results->get($lookup[$id])->setUid($uidllist[$id]); + } + } + break; + } + } + } + + /** + * Retrieve locally cached message data. + * + * @param string $type Either 'hdr', 'hdrob', 'msg', 'size', 'stat', + * 'top', or 'uidl'. + * @param integer $index The message index. + * @param mixed $data Additional information needed. + * + * @return mixed The cached data. 'msg' returns a stream resource. All + * other types return strings. + * + * @throws Horde_Imap_Client_Exception + */ + protected function _pop3Cache( + $type, $index = self::MBOX_CACHE, $data = null + ) + { + if (isset($this->_temp['pop3cache'][$index][$type])) { + if ($type == 'msg') { + rewind($this->_temp['pop3cache'][$index][$type]); + } + return $this->_temp['pop3cache'][$index][$type]; + } + + switch ($type) { + case 'hdr': + case 'top': + $data = null; + if (($type == 'top') || $this->_capability('TOP')) { + try { + $res = $this->_sendLine('TOP ' . $index . ' 0', array( + 'multiline' => 'stream' + )); + rewind($res['data']); + $data = stream_get_contents($res['data']); + fclose($res['data']); + } catch (Horde_Imap_Client_Exception $e) { + $this->_temp['no_top'] = true; + if ($type == 'top') { + return null; + } + } + } + + if (is_null($data)) { + $data = Horde_Mime_Part::getRawPartText(stream_get_contents($this->_pop3Cache('msg', $index)), 'header', 0); + } + break; + + case 'hdrob': + $data = Horde_Mime_Headers::parseHeaders($this->_pop3Cache('hdr', $index)); + break; + + case 'msg': + $res = $this->_sendLine('RETR ' . $index, array( + 'multiline' => 'stream' + )); + $data = $res['data']; + rewind($data); + break; + + case 'size': + case 'uidl': + $data = array(); + try { + $res = $this->_sendLine(($type == 'size') ? 'LIST' : 'UIDL', array( + 'multiline' => 'array' + )); + foreach ($res['data'] as $val) { + $resp_data = explode(' ', $val, 2); + $data[$resp_data[0]] = $resp_data[1]; + } + } catch (Horde_Imap_Client_Exception $e) { + if ($type == 'uidl') { + $this->_temp['no_uidl'] = true; + } + } + break; + + case 'stat': + $resp = $this->_sendLine('STAT'); + $resp_data = explode(' ', $resp['resp'], 2); + $data = array('msgs' => $resp_data[0], 'size' => $resp_data[1]); + break; + } + + $this->_temp['pop3cache'][$index][$type] = $data; + + return $data; + } + + /** + * Process a string response based on criteria options. + * + * @param string $str The original string. + * @param array $opts The criteria options. + * + * @return string The requested string. + */ + protected function _processString($str, $opts) + { + if (!empty($opts['length'])) { + return substr($str, empty($opts['start']) ? 0 : $opts['start'], $opts['length']); + } elseif (!empty($opts['start'])) { + return substr($str, $opts['start']); + } + + return $str; + } + + /** + * @throws Horde_Imap_Client_Exception_NoSupportPop3 + */ + protected function _vanished($modseq, Horde_Imap_Client_Ids $ids) + { + throw new Horde_Imap_Client_Exception_NoSupportPop3('QRESYNC commands'); + } + + /** + * @param array $options Additional options. This driver does not support + * 'unchangedsince'. + */ + protected function _store($options) + { + $delete = $reset = false; + + /* Only support deleting/undeleting messages. */ + if (isset($options['replace'])) { + $delete = (bool)(count(array_intersect($options['replace'], array( + Horde_Imap_Client::FLAG_DELETED + )))); + $reset = !$delete; + } else { + if (!empty($options['add'])) { + $delete = (bool)(count(array_intersect($options['add'], array( + Horde_Imap_Client::FLAG_DELETED + )))); + } + + if (!empty($options['remove'])) { + $reset = !(bool)(count(array_intersect($options['remove'], array( + Horde_Imap_Client::FLAG_DELETED + )))); + } + } + + if ($reset) { + $this->_sendLine('RSET'); + } elseif ($delete) { + foreach ($this->_getSeqIds($options['ids']) as $id) { + try { + $this->_sendLine('DELE ' . $id); + $this->_deleted[] = $id; + + unset( + $this->_temp['pop3cache'][self::MBOX_CACHE], + $this->_temp['pop3cache'][$id] + ); + } catch (Horde_Imap_Client_Exception $e) {} + } + } + + return $this->getIdsOb(); + } + + /** + * @throws Horde_Imap_Client_Exception_NoSupportPop3 + */ + protected function _copy(Horde_Imap_Client_Mailbox $dest, $options) + { + throw new Horde_Imap_Client_Exception_NoSupportPop3('Copying messages'); + } + + /** + * @throws Horde_Imap_Client_Exception_NoSupportPop3 + */ + protected function _setQuota(Horde_Imap_Client_Mailbox $root, $options) + { + throw new Horde_Imap_Client_Exception_NoSupportPop3('Quotas'); + } + + /** + * @throws Horde_Imap_Client_Exception_NoSupportPop3 + */ + protected function _getQuota(Horde_Imap_Client_Mailbox $root) + { + throw new Horde_Imap_Client_Exception_NoSupportPop3('Quotas'); + } + + /** + * @throws Horde_Imap_Client_Exception_NoSupportPop3 + */ + protected function _getQuotaRoot(Horde_Imap_Client_Mailbox $mailbox) + { + throw new Horde_Imap_Client_Exception_NoSupportPop3('Quotas'); + } + + /** + * @throws Horde_Imap_Client_Exception_NoSupportPop3 + */ + protected function _setACL(Horde_Imap_Client_Mailbox $mailbox, $identifier, + $options) + { + throw new Horde_Imap_Client_Exception_NoSupportPop3('ACLs'); + } + + /** + * @throws Horde_Imap_Client_Exception_NoSupportPop3 + */ + protected function _deleteACL(Horde_Imap_Client_Mailbox $mailbox, $identifier) + { + throw new Horde_Imap_Client_Exception_NoSupportPop3('ACLs'); + } + + /** + * @throws Horde_Imap_Client_Exception_NoSupportPop3 + */ + protected function _getACL(Horde_Imap_Client_Mailbox $mailbox) + { + throw new Horde_Imap_Client_Exception_NoSupportPop3('ACLs'); + } + + /** + * @throws Horde_Imap_Client_Exception_NoSupportPop3 + */ + protected function _listACLRights(Horde_Imap_Client_Mailbox $mailbox, + $identifier) + { + throw new Horde_Imap_Client_Exception_NoSupportPop3('ACLs'); + } + + /** + * @throws Horde_Imap_Client_Exception_NoSupportPop3 + */ + protected function _getMyACLRights(Horde_Imap_Client_Mailbox $mailbox) + { + throw new Horde_Imap_Client_Exception_NoSupportPop3('ACLs'); + } + + /** + * @throws Horde_Imap_Client_Exception_NoSupportPop3 + */ + protected function _getMetadata(Horde_Imap_Client_Mailbox $mailbox, + $entries, $options) + { + throw new Horde_Imap_Client_Exception_NoSupportPop3('Metadata'); + } + + /** + * @throws Horde_Imap_Client_Exception_NoSupportPop3 + */ + protected function _setMetadata(Horde_Imap_Client_Mailbox $mailbox, $data) + { + throw new Horde_Imap_Client_Exception_NoSupportPop3('Metadata'); + } + + /** + */ + protected function _getSearchCache($type, $options) + { + /* POP3 does not support search caching. */ + return null; + } + + /** + */ + public function resolveIds(Horde_Imap_Client_Mailbox $mailbox, + Horde_Imap_Client_Ids $ids, $convert = 0) + { + if (!$ids->special && + (!$convert || + (!$ids->sequence && ($convert == 1)) || + $ids->isEmpty())) { + return clone $ids; + } + + $uids = $this->_pop3Cache('uidl'); + + return $this->getIdsOb( + $ids->all ? array_values($uids) : array_intersect_keys($uids, $ids->ids) + ); + } + + /* Internal functions. */ + + /** + * Perform a command on the server. A connection to the server must have + * already been made. + * + * @param string $cmd The command to execute. + * @param array $options Additional options: + *
+     *   - debug: (string) When debugging, send this string instead of the
+     *            actual command/data sent.
+     *            DEFAULT: Raw data output to debug stream.
+     *   - multiline: (mixed) 'array', 'none', or 'stream'.
+     * 
+ * + * @return array See _getResponse(). + * + * @throws Horde_Imap_Client_Exception + */ + protected function _sendLine($cmd, $options = array()) + { + if (!empty($options['debug'])) { + $this->_debug->client($options['debug']); + } + + if ($this->_debug->debug) { + $timer = new Horde_Support_Timer(); + $timer->push(); + } + + try { + $this->_connection->write($cmd, empty($options['debug'])); + } catch (Horde_Imap_Client_Exception $e) { + throw $e; + } + + $resp = $this->_getResponse( + empty($options['multiline']) ? false : $options['multiline'] + ); + + if ($this->_debug->debug) { + $this->_debug->info(sprintf( + 'Command took %s seconds.', + round($timer->pop(), 4) + )); + } + + return $resp; + } + + /** + * Gets a line from the stream and parses it. + * + * @param mixed $multiline 'array', 'none', 'stream', or null. + * + * @return array An array with the following keys: + * - data: (mixed) Stream, array, or null. + * - resp: (string) The server response text. + * + * @throws Horde_Imap_Client_Exception + */ + protected function _getResponse($multiline = false) + { + $ob = array('resp' => ''); + + $read = explode(' ', rtrim($this->_connection->read(), "\r\n"), 2); + if (!in_array($read[0], array('+OK', '-ERR', '+'))) { + $this->_debug->info('ERROR: IMAP read/timeout error.'); + throw new Horde_Imap_Client_Exception( + Horde_Imap_Client_Translation::r("Error when communicating with the mail server."), + Horde_Imap_Client_Exception::SERVER_READERROR + ); + } + + $respcode = null; + if (isset($read[1]) && + isset($this->_init['capability']) && + $this->_capability('RESP-CODES')) { + $respcode = $this->_parseResponseCode($read[1]); + } + + switch ($read[0]) { + case '+OK': + case '+': + if ($respcode) { + $ob['resp'] = $respcode->text; + } elseif (isset($read[1])) { + $ob['resp'] = $read[1]; + } + break; + + case '-ERR': + $errcode = 0; + if ($respcode) { + $errtext = $respcode->text; + + if (isset($respcode->code)) { + switch ($respcode->code) { + // RFC 2449 [8.1.1] + case 'IN-USE': + // RFC 2449 [8.1.2] + case 'LOGIN-DELAY': + $errcode = Horde_Imap_Client_Exception::LOGIN_UNAVAILABLE; + break; + + // RFC 3206 [4] + case 'SYS/TEMP': + $errcode = Horde_Imap_Client_Exception::POP3_TEMP_ERROR; + break; + + // RFC 3206 [4] + case 'SYS/PERM': + $errcode = Horde_Imap_Client_Exception::POP3_PERM_ERROR; + break; + + // RFC 3206 [5] + case 'AUTH': + $errcode = Horde_Imap_Client_Exception::LOGIN_AUTHENTICATIONFAILED; + break; + + // RFC 6856 [5] + case 'UTF8': + /* This code can only be issued if we (as client) are + * broken, so no need to handle since we should never + * be broken. */ + break; + } + } + } elseif (isset($read[1])) { + $errtext = $read[1]; + } else { + $errtext = '[No error message provided by server]'; + } + + $e = new Horde_Imap_Client_Exception( + Horde_Imap_Client_Translation::r("POP3 error reported by server."), + $errcode + ); + $e->details = $errtext; + throw $e; + } + + switch ($multiline) { + case 'array': + $ob['data'] = array(); + break; + + case 'none': + $ob['data'] = null; + break; + + case 'stream': + $ob['data'] = fopen('php://temp', 'r+'); + break; + + default: + return $ob; + } + + do { + $orig_read = $this->_connection->read(); + $read = rtrim($orig_read, "\r\n"); + + if ($read === '.') { + break; + } elseif (substr($read, 0, 2) === '..') { + $read = substr($read, 1); + } + + if (is_array($ob['data'])) { + $ob['data'][] = $read; + } elseif (!is_null($ob['data'])) { + fwrite($ob['data'], $orig_read); + } + } while (true); + + return $ob; + } + + /** + * Returns a list of sequence IDs. + * + * @param Horde_Imap_Client_Ids $ids The ID list. + * + * @return array A list of sequence IDs. + */ + protected function _getSeqIds(Horde_Imap_Client_Ids $ids) + { + if (!count($ids)) { + $status = $this->status($this->_selected, Horde_Imap_Client::STATUS_MESSAGES); + return range(1, $status['messages']); + } elseif ($ids->sequence) { + return $ids->ids; + } + + return array_keys(array_intersect($this->_pop3Cache('uidl'), $ids->ids)); + } + + /** + * Parses response text for response codes (RFC 2449 [8]). + * + * @param string $text The response text. + * + * @return object An object with the following properties: + * - code: (string) The response code, if it exists. + * - data: (string) The response code data, if it exists. + * - text: (string) The human-readable response text. + */ + protected function _parseResponseCode($text) + { + $ret = new stdClass; + + $text = trim($text); + if ($text[0] === '[') { + $pos = strpos($text, ' ', 2); + $end_pos = strpos($text, ']', 2); + if ($pos > $end_pos) { + $ret->code = Horde_String::upper(substr($text, 1, $end_pos - 1)); + } else { + $ret->code = Horde_String::upper(substr($text, 1, $pos - 1)); + $ret->data = substr($text, $pos + 1, $end_pos - $pos - 1); + } + $ret->text = trim(substr($text, $end_pos + 1)); + } else { + $ret->text = $text; + } + + return $ret; + } + +} diff --git a/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Tokenize.php b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Tokenize.php new file mode 100644 index 00000000..84c64596 --- /dev/null +++ b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Tokenize.php @@ -0,0 +1,413 @@ + + * @category Horde + * @copyright 2012-2017 Horde LLC + * @internal + * @license http://www.horde.org/licenses/lgpl21 LGPL 2.1 + * @package Imap_Client + * + * @property-read boolean $eos Has the end of the stream been reached? + */ +class Horde_Imap_Client_Tokenize implements Iterator +{ + /** + * Current data. + * + * @var mixed + */ + protected $_current = false; + + /** + * Current key. + * + * @var integer + */ + protected $_key = false; + + /** + * Sublevel. + * + * @var integer + */ + protected $_level = false; + + /** + * Array of literal stream objects. + * + * @var array + */ + protected $_literals = array(); + + /** + * Return Horde_Stream object for literal tokens? + * + * @var boolean + */ + protected $_literalStream = false; + + /** + * next() modifiers. + * + * @var array + */ + protected $_nextModify = array(); + + /** + * Data stream. + * + * @var Horde_Stream + */ + protected $_stream; + + /** + * Constructor. + * + * @param mixed $data Data to add (string, resource, or Horde_Stream + * object). + */ + public function __construct($data = null) + { + $this->_stream = new Horde_Stream_Temp(); + + if (!is_null($data)) { + $this->add($data); + } + } + + /** + */ + public function __clone() + { + throw new LogicException('Object can not be cloned.'); + } + + /** + */ + public function __get($name) + { + switch ($name) { + case 'eos': + return $this->_stream->eof(); + } + } + + /** + */ + public function __sleep() + { + throw new LogicException('Object can not be serialized.'); + } + + /** + */ + public function __toString() + { + $pos = $this->_stream->pos(); + $out = $this->_current . ' ' . $this->_stream->getString(); + $this->_stream->seek($pos, false); + return $out; + } + + /** + * Add data to buffer. + * + * @param mixed $data Data to add (string, resource, or Horde_Stream + * object). + */ + public function add($data) + { + $this->_stream->add($data); + } + + /** + * Add data to literal stream at the current position. + * + * @param mixed $data Data to add (string, resource, or Horde_Stream + * object). + */ + public function addLiteralStream($data) + { + $pos = $this->_stream->pos(); + if (!isset($this->_literals[$pos])) { + $this->_literals[$pos] = new Horde_Stream_Temp(); + } + $this->_literals[$pos]->add($data); + } + + /** + * Flush the remaining entries left in the iterator. + * + * @param boolean $return If true, return entries. Only returns entries + * on the current level. + * @param boolean $sublevel Only flush items in current sublevel? + * + * @return array The entries if $return is true. + */ + public function flushIterator($return = true, $sublevel = true) + { + $out = array(); + + if ($return) { + $this->_nextModify = array( + 'level' => $sublevel ? $this->_level : 0, + 'out' => array() + ); + $this->next(); + $out = $this->_nextModify['out']; + $this->_nextModify = array(); + } elseif ($sublevel && $this->_level) { + $this->_nextModify = array( + 'level' => $this->_level + ); + $this->next(); + $this->_nextModify = array(); + } else { + $this->_stream->end(); + $this->_stream->getChar(); + $this->_current = $this->_key = $this->_level = false; + } + + return $out; + } + + /** + * Return literal length data located at the end of the stream. + * + * @return mixed Null if no literal data found, or an array with these + * keys: + * - binary: (boolean) True if this is a literal8. + * - length: (integer) Length of the literal. + */ + public function getLiteralLength() + { + if ($this->_stream->substring(-1, 1) === '}') { + $literal_data = $this->_stream->getString( + $this->_stream->search('{', true) - 1 + ); + $literal_len = substr($literal_data, 2, -1); + + if (is_numeric($literal_len)) { + return array( + 'binary' => ($literal_data[0] === '~'), + 'length' => intval($literal_len) + ); + } + } + + return null; + } + + /* Iterator methods. */ + + /** + */ + public function current() + { + return $this->_current; + } + + /** + */ + public function key() + { + return $this->_key; + } + + /** + * @return mixed Either a string, boolean (true for open paren, false for + * close paren/EOS), Horde_Stream object, or null. + */ + public function next() + { + $level = isset($this->_nextModify['level']) + ? $this->_nextModify['level'] + : null; + /* Directly access stream here to drastically reduce the number of + * getChar() calls we would have to make. */ + $stream = $this->_stream->stream; + + do { + $check_len = true; + $in_quote = $text = $binary = false; + + while (($c = fgetc($stream)) !== false) { + switch ($c) { + case '\\': + $text .= $in_quote + ? fgetc($stream) + : $c; + break; + + case '"': + if ($in_quote) { + $check_len = false; + break 2; + } + $in_quote = true; + /* Set $text to non-false (could be empty string). */ + $text = ''; + break; + + default: + if ($in_quote) { + $text .= $c; + break; + } + + switch ($c) { + case '(': + ++$this->_level; + $check_len = false; + $text = true; + break 3; + + case ')': + if ($text === false) { + --$this->_level; + $check_len = $text = false; + } else { + $this->_stream->seek(-1); + } + break 3; + + case '~': + // Ignore binary string identifier. PHP strings are + // binary-safe. But keep it if it is not used as string + // identifier. + $binary = true; + $text .= $c; + continue 3; + + case '{': + if ($binary) { + $text = substr($text, 0, -1); + } + $literal_len = intval($this->_stream->getToChar('}')); + $pos = $this->_stream->pos(); + if (isset($this->_literals[$pos])) { + $text = $this->_literals[$pos]; + if (!$this->_literalStream) { + $text = strval($text); + } + } elseif ($this->_literalStream) { + $text = new Horde_Stream_Temp(); + while (($literal_len > 0) && !feof($stream)) { + $part = $this->_stream->substring( + 0, + min($literal_len, 8192) + ); + $text->add($part); + $literal_len -= strlen($part); + } + } else { + $text = $this->_stream->substring(0, $literal_len); + } + $check_len = false; + break 3; + + case ' ': + if ($text !== false) { + break 3; + } + break; + + default: + $text .= $c; + break; + } + break; + } + $binary = false; + } + + if ($check_len) { + switch (strlen($text)) { + case 0: + $text = false; + break; + + case 3: + if (strcasecmp($text, 'NIL') === 0) { + $text = null; + } + break; + } + } + + if (($text === false) && feof($stream)) { + $this->_key = $this->_level = false; + break; + } + + ++$this->_key; + + if (is_null($level) || ($level > $this->_level)) { + break; + } + + if (($level === $this->_level) && !is_bool($text)) { + $this->_nextModify['out'][] = $text; + } + } while (true); + + $this->_current = $text; + + return $text; + } + + /** + * Force return of literal data as stream, if next token. + * + * @see next() + */ + public function nextStream() + { + $changed = $this->_literalStream; + $this->_literalStream = true; + + $out = $this->next(); + + if ($changed) { + $this->_literalStream = false; + } + + return $out; + } + + /** + */ + public function rewind() + { + $this->_stream->rewind(); + $this->_current = false; + $this->_key = -1; + $this->_level = 0; + } + + /** + */ + public function valid() + { + return ($this->_level !== false); + } + +} diff --git a/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Translation.php b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Translation.php new file mode 100644 index 00000000..9b449b98 --- /dev/null +++ b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Translation.php @@ -0,0 +1,38 @@ + + * @category Horde + * @copyright 2010-2017 Horde LLC + * @license http://www.horde.org/licenses/lgpl21 LGPL + * @package Imap_Client + */ +class Horde_Imap_Client_Translation extends Horde_Translation_Autodetect +{ + /** + * The translation domain + * + * @var string + */ + protected static $_domain = 'Horde_Imap_Client'; + + /** + * The absolute PEAR path to the translations for the default gettext handler. + * + * @var string + */ + protected static $_pearDirectory = '/daten/dev/lam/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/data'; +} diff --git a/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Url.php b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Url.php new file mode 100644 index 00000000..c6c913bc --- /dev/null +++ b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Url.php @@ -0,0 +1,302 @@ + + * @category Horde + * @copyright 2008-2016 Horde LLC + * @deprecated Use Horde_Imap_Client_Url_Base instead + * @license http://www.horde.org/licenses/lgpl21 LGPL 2.1 + * @package Imap_Client + * + * @property-read boolean $relative Is this a relative URL? + */ +class Horde_Imap_Client_Url implements Serializable +{ + /** + * The authentication method to use. + * + * @var string + */ + public $auth = null; + + /** + * The remote server (not present for relative URLs). + * + * @var string + */ + public $hostspec = null; + + /** + * The IMAP mailbox. + * + * @todo Make this a Horde_Imap_Client_Mailbox object. + * + * @var string + */ + public $mailbox = null; + + /** + * A byte range for use with IMAP FETCH. + * + * @var string + */ + public $partial = null; + + /** + * The remote port (not present for relative URLs). + * + * @var integer + */ + public $port = null; + + /** + * The protocol type. Either 'imap' or 'pop' (not present for relative + * URLs). + * + * @var string + */ + public $protocol = null; + + /** + * A search query to be run with IMAP SEARCH. + * + * @var string + */ + public $search = null; + + /** + * A MIME part ID. + * + * @var string + */ + public $section = null; + + /** + * The username to use on the remote server. + * + * @var string + */ + public $username = null; + + /** + * The IMAP UID. + * + * @var string + */ + public $uid = null; + + /** + * The IMAP UIDVALIDITY for the given mailbox. + * + * @var integer + */ + public $uidvalidity = null; + + /** + * URLAUTH info (not parsed). + * + * @var string + */ + public $urlauth = null; + + /** + * Constructor. + * + * Absolute IMAP URLs takes one of the following forms: + * - imap://[/] + * - imap:///[][?] + * - imap:///[][][][] + * + * POP URLs take one of the following forms: + * - pop://;auth=@: + * + * @param string $url A URL string. + */ + public function __construct($url = null) + { + if (!is_null($url)) { + $this->_parse($url); + } + } + + /** + * Create a POP3 (RFC 2384) or IMAP (RFC 5092/5593) URL. + * + * @return string A URL string. + */ + public function __toString() + { + $url = ''; + + if (!is_null($this->protocol)) { + $url = $this->protocol . '://'; + + if (!is_null($this->username)) { + $url .= $this->username; + if (!is_null($this->auth)) { + $url .= ';AUTH=' . $this->auth; + } + $url .= '@'; + } + + $url .= $this->hostspec; + + if (!is_null($this->port)) { + switch ($this->protocol) { + case 'imap': + if ($this->port != 143) { + $url .= ':' . $this->port; + } + break; + + case 'pop': + if ($this->port != 110) { + $url .= ':' . $this->port; + } + break; + } + } + } + + $url .= '/'; + + if (is_null($this->protocol) || ($this->protocol == 'imap')) { + $url .= rawurlencode($this->mailbox); + + if (!empty($this->uidvalidity)) { + $url .= ';UIDVALIDITY=' . $this->uidvalidity; + } + + if (!is_null($this->search)) { + $url .= '?' . rawurlencode($this->search); + } else { + if (!is_null($this->uid)) { + $url .= '/;UID=' . $this->uid; + } + + if (!is_null($this->section)) { + $url .= '/;SECTION=' . $this->section; + } + + if (!is_null($this->partial)) { + $url .= '/;PARTIAL=' . $this->partial; + } + + if (!is_null($this->urlauth)) { + $url .= '/;URLAUTH=' . $this->urlauth; + } + } + } + + return $url; + } + + /** + */ + public function __get($name) + { + switch ($name) { + case 'relative': + return (is_null($this->hostspec) && + is_null($this->port) && + is_null($this->protocol)); + } + } + + /** + */ + protected function _parse($url) + { + $data = parse_url(trim($url)); + + if (isset($data['scheme'])) { + $protocol = Horde_String::lower($data['scheme']); + if (!in_array($protocol, array('imap', 'pop'))) { + return; + } + + if (isset($data['host'])) { + $this->hostspec = $data['host']; + } + $this->port = isset($data['port']) + ? $data['port'] + : (($protocol === 'imap') ? 143 : 110); + $this->protocol = $protocol; + } + + /* Check for username/auth information. */ + if (isset($data['user'])) { + if (($pos = stripos($data['user'], ';AUTH=')) !== false) { + $auth = substr($data['user'], $pos + 6); + if ($auth !== '*') { + $this->auth = $auth; + } + $data['user'] = substr($data['user'], 0, $pos); + } + + if (strlen($data['user'])) { + $this->username = $data['user']; + } + } + + /* IMAP-only information. */ + if (is_null($this->protocol) || ($this->protocol == 'imap')) { + if (isset($data['path'])) { + $data['path'] = ltrim($data['path'], '/'); + $parts = explode('/;', $data['path']); + + $mbox = array_shift($parts); + if (($pos = stripos($mbox, ';UIDVALIDITY=')) !== false) { + $this->uidvalidity = intval(substr($mbox, $pos + 13)); + $mbox = substr($mbox, 0, $pos); + } + $this->mailbox = rawurldecode($mbox); + + if (isset($data['query'])) { + $this->search = rawurldecode($data['query']); + $parts = array(); + } + } else { + $parts = array(); + } + + if (count($parts)) { + foreach ($parts as $val) { + list($k, $v) = explode('=', $val); + $property = Horde_String::lower($k); + $this->$property = $v; + } + } + } + } + + /* Serializable methods. */ + + /** + */ + public function serialize() + { + return strval($this); + } + + /** + */ + public function unserialize($data) + { + $this->_parse($data); + } + +} diff --git a/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Url/Base.php b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Url/Base.php new file mode 100644 index 00000000..6a46c4ad --- /dev/null +++ b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Url/Base.php @@ -0,0 +1,173 @@ + + * @category Horde + * @copyright 2008-2017 Horde LLC + * @license http://www.horde.org/licenses/lgpl21 LGPL 2.1 + * @package Imap_Client + * @since 2.25.0 + * + * @property string $auth The authentication method. + * @property string $host The server. + * @property integer $port The port. + * @property string $username The username. + */ +abstract class Horde_Imap_Client_Url_Base implements Serializable +{ + /** + * The authentication method to use. + * + * @var string + */ + protected $_auth = null; + + /** + * The server name. + * + * @var string + */ + protected $_host = null; + + /** + * The port. + * + * @var integer + */ + protected $_port = null; + + /** + * The username. + * + * @var string + */ + protected $_username = null; + + /** + * Constructor. + * + * @param string $url A URL string. + */ + public function __construct($url = null) + { + if (!is_null($url)) { + $this->_parse($url); + } + } + + /** + */ + public function __get($name) + { + switch ($name) { + case 'auth': + case 'host': + case 'port': + case 'username': + return $this->{'_' . $name}; + } + } + + /** + */ + public function __set($name, $value) + { + switch ($name) { + case 'auth': + case 'host': + case 'port': + case 'username': + $this->{'_' . $name} = $value; + break; + } + } + + /** + * Create a POP3 (RFC 2384) or IMAP (RFC 5092/5593) URL. + * + * @return string A URL string. + */ + public function __toString() + { + $url = ''; + + if (!is_null($this->username)) { + $url .= $this->username; + if (!is_null($this->auth)) { + $url .= ';AUTH=' . $this->auth; + } + $url .= '@'; + } + + $url .= $this->host; + + return $url; + } + + /** + */ + protected function _parse($url) + { + $data = parse_url(trim($url)); + + if (isset($data['scheme'])) { + if (isset($data['host'])) { + $this->host = $data['host']; + } + if (isset($data['port'])) { + $this->port = $data['port']; + } + } + + /* Check for username/auth information. */ + if (isset($data['user'])) { + if (($pos = stripos($data['user'], ';AUTH=')) !== false) { + $auth = substr($data['user'], $pos + 6); + if ($auth !== '*') { + $this->auth = $auth; + } + $data['user'] = substr($data['user'], 0, $pos); + } + + if (strlen($data['user'])) { + $this->username = $data['user']; + } + } + + $this->_parseUrl($data); + } + + /** + */ + abstract protected function _parseUrl(array $data); + + /* Serializable methods. */ + + /** + */ + public function serialize() + { + return strval($this); + } + + /** + */ + public function unserialize($data) + { + $this->_parse($data); + } + +} diff --git a/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Url/Imap.php b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Url/Imap.php new file mode 100644 index 00000000..bfb94219 --- /dev/null +++ b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Url/Imap.php @@ -0,0 +1,230 @@ +[/] + * - imap:///[][?] + * - imap:///[][][][] + * + * @author Michael Slusarz + * @category Horde + * @copyright 2008-2017 Horde LLC + * @license http://www.horde.org/licenses/lgpl21 LGPL 2.1 + * @package Imap_Client + * @since 2.25.0 + * + * @property Horde_Imap_Client_Mailbox $mailbox IMAP Mailbox. + * @property string $partial Byte range for use with IMAP FETCH command. + * @property string $search Search query to be run with IMAP SEARCH. + * @property string $section MIME part ID. + * @property string $uid IMAP UID. + * @property string $uidvalidity IMAP UIDVALIDITY for the mailbox. + * @property string $urlauth URLAUTH info. + */ +class Horde_Imap_Client_Url_Imap extends Horde_Imap_Client_Url_Base +{ + /** + * IMAP mailbox. + * + * @var Horde_Imap_Client_Mailbox + */ + protected $_mailbox; + + /** + * Byte range for use with IMAP FETCH command. + * + * @var string + */ + protected $_partial; + + /** + * Search query to be run with IMAP SEARCH. + * + * @var string + */ + protected $_search; + + /** + * MIME part ID. + * + * @var string + */ + protected $_section; + + /** + * IMAP UID. + * + * @var string + */ + protected $_uid; + + /** + * IMAP UIDVALIDITY for the given mailbox. + * + * @var integer + */ + protected $_uidvalidity; + + /** + * URLAUTH info (not parsed). + * + * @var string + */ + protected $_urlauth; + + /** + */ + public function __get($name) + { + switch ($name) { + case 'mailbox': + return $this->_mailbox; + + case 'partial': + case 'search': + case 'section': + case 'uid': + case 'uidvalidity': + case 'urlauth': + return isset($this->{'_' . $name}) + ? $this->{'_' . $name} + : null; + + case 'port': + return parent::__get($name) ?: 143; + + default: + return parent::__get($name); + } + } + + /** + */ + public function __set($name, $value) + { + switch ($name) { + case 'mailbox': + $this->_mailbox = Horde_Imap_Client_Mailbox::get($value); + break; + + case 'partial': + case 'search': + case 'section': + case 'uid': + case 'uidvalidity': + case 'urlauth': + $this->{'_' . $name} = $value; + break; + + default: + parent::__set($name, $value); + break; + } + } + + /** + * Create an IMAP URL (RFC 5092/5593). + * + * @return string A URL string. + */ + public function __toString() + { + $url = 'imap://' . parent::__toString(); + + if (($port = $this->port) != 143) { + $url .= ':' . $port; + } + + return $url . '/' . $this->_toImapString(); + } + + /** + */ + protected function _toImapString() + { + $url = ''; + + if ($mbox = $this->mailbox) { + $url .= rawurlencode($mbox->utf7imap); + } + + if ($uidvalid = $this->uidvalidity) { + $url .= ';UIDVALIDITY=' . $uidvalid; + } + + if ($search = $this->search) { + $url .= '?' . rawurlencode($search); + } else { + if ($uid = $this->uid) { + $url .= '/;UID=' . $uid; + } + + if ($section = $this->section) { + $url .= '/;SECTION=' . $section; + } + + if ($partial = $this->partial) { + $url .= '/;PARTIAL=' . $partial; + } + + if ($urlauth = $this->urlauth) { + $url .= '/;URLAUTH=' . $urlauth; + } + } + + return $url; + } + + /** + */ + protected function _parseUrl(array $data) + { + if (isset($data['path']) && + strlen($path = ltrim($data['path'], '/'))) { + $parts = explode('/;', $path); + + $mbox = array_shift($parts); + if (($pos = stripos($mbox, ';UIDVALIDITY=')) !== false) { + $this->uidvalidity = intval(substr($mbox, $pos + 13)); + $mbox = substr($mbox, 0, $pos); + } + + if ($mbox[0] === ';') { + array_unshift($parts, substr($mbox, 1)); + } elseif (strlen($mbox)) { + $this->_mailbox = Horde_Imap_Client_Mailbox::get( + rawurldecode($mbox), + true + ); + } + + if (isset($data['query'])) { + $this->search = rawurldecode($data['query']); + $parts = array(); + } + } else { + $parts = array(); + } + + if (count($parts)) { + foreach ($parts as $val) { + list($k, $v) = explode('=', $val); + $this->{Horde_String::lower($k)} = $v; + } + } + } + +} diff --git a/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Url/Imap/Relative.php b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Url/Imap/Relative.php new file mode 100644 index 00000000..762099a1 --- /dev/null +++ b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Url/Imap/Relative.php @@ -0,0 +1,45 @@ + + * @category Horde + * @copyright 2008-2017 Horde LLC + * @license http://www.horde.org/licenses/lgpl21 LGPL 2.1 + * @package Imap_Client + * @since 2.25.0 + */ +class Horde_Imap_Client_Url_Imap_Relative +extends Horde_Imap_Client_Url_Imap +{ + /** + * Create a relative IMAP URL (RFC 5092/5593). + * + * @return string A URL string. + */ + public function __toString() + { + if ($out = $this->_toImapString()) { + if (substr($out, 0, 2) === '/;') { + $out = substr($out, 1); + } elseif ($out[0] !== ';') { + $out = '/' . $out; + } + } + + return $out; + } + +} diff --git a/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Url/Pop3.php b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Url/Pop3.php new file mode 100644 index 00000000..eb103c17 --- /dev/null +++ b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Url/Pop3.php @@ -0,0 +1,64 @@ +;auth=@: + * + * @author Michael Slusarz + * @category Horde + * @copyright 2014-2017 Horde LLC + * @license http://www.horde.org/licenses/lgpl21 LGPL 2.1 + * @package Imap_Client + * @since 2.25.0 + */ +class Horde_Imap_Client_Url_Pop3 extends Horde_Imap_Client_Url_Base +{ + /** + */ + public function __get($name) + { + switch ($name) { + case 'port': + return parent::__get($name) ?: 110; + + default: + return parent::__get($name); + } + } + + /** + * Create a POP3 URL (RFC 2384). + * + * @return string A URL string. + */ + public function __toString() + { + $url = 'pop://' . parent::__toString(); + + if (($port = $this->port) != 110) { + $url .= ':' . $port; + } + + return $url . '/'; + } + + /** + */ + protected function _parseUrl(array $data) + { + } + +} diff --git a/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Utf7imap.php b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Utf7imap.php new file mode 100644 index 00000000..aa3a5cc3 --- /dev/null +++ b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Utf7imap.php @@ -0,0 +1,326 @@ + + * Released under the GPL (version 2) + * + * Translated from C to PHP by Thomas Bruederli + * Code extracted from the RoundCube Webmail (http://roundcube.net) project, + * SVN revision 1757 + * The RoundCube project is released under the GPL (version 2) + * + * Copyright 2008-2017 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 + * @copyright 2000 Edmund Grimley Evans + * @copyright 2008-2017 Horde LLC + * @license http://www.horde.org/licenses/lgpl21 LGPL 2.1 + * @package Imap_Client + */ + +/** + * Allows conversions between UTF-8 and UTF7-IMAP (RFC 3501 [5.1.3]). + * + * @author Michael Slusarz + * @category Horde + * @copyright 2000 Edmund Grimley Evans + * @copyright 2008-2017 Horde LLC + * @license http://www.horde.org/licenses/lgpl21 LGPL 2.1 + * @package Imap_Client + */ +class Horde_Imap_Client_Utf7imap +{ + /** + * Lookup table for conversion. + * + * @var array + */ + private static $_index64 = array( + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 62, 63, -1, -1, -1, + 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, -1, -1, -1, -1, -1, -1, + -1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, + 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, -1, -1, -1, -1, -1, + -1, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, + 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, -1, -1, -1, -1, -1 + ); + + /** + * Lookup table for conversion. + * + * @var array + */ + private static $_base64 = array( + 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', + 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', 'a', 'b', + 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', + 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', '0', '1', '2', '3', + '4', '5', '6', '7', '8', '9', '+', ',' + ); + + /** + * Is mbstring extension available? + * + * @var array + */ + protected static $_mbstring = null; + + /** + * Convert a string from UTF7-IMAP to UTF-8. + * + * @param string $str The UTF7-IMAP string. + * + * @return string The converted UTF-8 string. + * @throws Horde_Imap_Client_Exception + */ + public static function Utf7ImapToUtf8($str) + { + if ($str instanceof Horde_Imap_Client_Mailbox) { + return $str->utf8; + } + + $str = strval($str); + + /* Try mbstring, if available, which should be faster. Don't use the + * IMAP utf7_* functions because they are known to be buggy. */ + if (is_null(self::$_mbstring)) { + self::$_mbstring = extension_loaded('mbstring'); + } + if (self::$_mbstring) { + return @mb_convert_encoding($str, 'UTF-8', 'UTF7-IMAP'); + } + + $p = ''; + $ptr = &self::$_index64; + + for ($i = 0, $u7len = strlen($str); $u7len > 0; ++$i, --$u7len) { + $u7 = $str[$i]; + if ($u7 === '&') { + $u7 = $str[++$i]; + if (--$u7len && ($u7 === '-')) { + $p .= '&'; + continue; + } + + $ch = 0; + $k = 10; + for (; $u7len > 0; ++$i, --$u7len) { + $u7 = $str[$i]; + + if ((ord($u7) & 0x80) || ($b = $ptr[ord($u7)]) === -1) { + break; + } + + if ($k > 0) { + $ch |= $b << $k; + $k -= 6; + } else { + $ch |= $b >> (-$k); + if ($ch < 0x80) { + /* Printable US-ASCII */ + if ((0x20 <= $ch) && ($ch < 0x7f)) { + throw new Horde_Imap_Client_Exception( + Horde_Imap_Client_Translation::r("Error converting UTF7-IMAP string."), + Horde_Imap_Client_Exception::UTF7IMAP_CONVERSION + ); + } + $p .= chr($ch); + } else if ($ch < 0x800) { + $p .= chr(0xc0 | ($ch >> 6)) . + chr(0x80 | ($ch & 0x3f)); + } else { + $p .= chr(0xe0 | ($ch >> 12)) . + chr(0x80 | (($ch >> 6) & 0x3f)) . + chr(0x80 | ($ch & 0x3f)); + } + + $ch = ($b << (16 + $k)) & 0xffff; + $k += 10; + } + } + + /* Non-zero or too many extra bits -OR- + * Base64 not properly terminated -OR- + * Adjacent Base64 sections. */ + if (($ch || ($k < 6)) || + (!$u7len || $u7 !== '-') || + (($u7len > 2) && + ($str[$i + 1] === '&') && + ($str[$i + 2] !== '-'))) { + throw new Horde_Imap_Client_Exception( + Horde_Imap_Client_Translation::r("Error converting UTF7-IMAP string."), + Horde_Imap_Client_Exception::UTF7IMAP_CONVERSION + ); + } + } elseif ((ord($u7) < 0x20) || (ord($u7) >= 0x7f)) { + /* Not printable US-ASCII */ + throw new Horde_Imap_Client_Exception( + Horde_Imap_Client_Translation::r("Error converting UTF7-IMAP string."), + Horde_Imap_Client_Exception::UTF7IMAP_CONVERSION + ); + } else { + $p .= $u7; + } + } + + return $p; + } + + /** + * Convert a string from UTF-8 to UTF7-IMAP. + * + * @param string $str The UTF-8 string. + * @param boolean $force Assume $str is UTF-8 (no-autodetection)? If + * false, attempts to auto-detect if string is + * already in UTF7-IMAP. + * + * @return string The converted UTF7-IMAP string. + * @throws Horde_Imap_Client_Exception + */ + public static function Utf8ToUtf7Imap($str, $force = true) + { + if ($str instanceof Horde_Imap_Client_Mailbox) { + return $str->utf7imap; + } + + $str = strval($str); + + /* No need to do conversion if all chars are in US-ASCII range or if + * no ampersand is present. But will assume that an already encoded + * ampersand means string is in UTF7-IMAP already. */ + if (!$force && + !preg_match('/[\x80-\xff]|&$|&(?![,+A-Za-z0-9]*-)/', $str)) { + return $str; + } + + /* Try mbstring, if available, which should be faster. Don't use the + * IMAP utf7_* functions because they are known to be buggy. */ + if (is_null(self::$_mbstring)) { + self::$_mbstring = extension_loaded('mbstring'); + } + if (self::$_mbstring) { + return @mb_convert_encoding($str, 'UTF7-IMAP', 'UTF-8'); + } + + $u8len = strlen($str); + $i = 0; + $base64 = false; + $p = ''; + $ptr = &self::$_base64; + + while ($u8len) { + $u8 = $str[$i]; + $c = ord($u8); + + if ($c < 0x80) { + $ch = $c; + $n = 0; + } elseif ($c < 0xc2) { + throw new Horde_Imap_Client_Exception( + Horde_Imap_Client_Translation::r("Error converting UTF7-IMAP string."), + Horde_Imap_Client_Exception::UTF7IMAP_CONVERSION + ); + } elseif ($c < 0xe0) { + $ch = $c & 0x1f; + $n = 1; + } elseif ($c < 0xf0) { + $ch = $c & 0x0f; + $n = 2; + } elseif ($c < 0xf8) { + $ch = $c & 0x07; + $n = 3; + } elseif ($c < 0xfc) { + $ch = $c & 0x03; + $n = 4; + } elseif ($c < 0xfe) { + $ch = $c & 0x01; + $n = 5; + } else { + throw new Horde_Imap_Client_Exception( + Horde_Imap_Client_Translation::r("Error converting UTF7-IMAP string."), + Horde_Imap_Client_Exception::UTF7IMAP_CONVERSION + ); + } + + if ($n > --$u8len) { + throw new Horde_Imap_Client_Exception( + Horde_Imap_Client_Translation::r("Error converting UTF7-IMAP string."), + Horde_Imap_Client_Exception::UTF7IMAP_CONVERSION + ); + } + + ++$i; + + for ($j = 0; $j < $n; ++$j) { + $o = ord($str[$i + $j]); + if (($o & 0xc0) !== 0x80) { + throw new Horde_Imap_Client_Exception( + Horde_Imap_Client_Translation::r("Error converting UTF7-IMAP string."), + Horde_Imap_Client_Exception::UTF7IMAP_CONVERSION + ); + } + $ch = ($ch << 6) | ($o & 0x3f); + } + + if (($n > 1) && !($ch >> ($n * 5 + 1))) { + throw new Horde_Imap_Client_Exception( + Horde_Imap_Client_Translation::r("Error converting UTF7-IMAP string."), + Horde_Imap_Client_Exception::UTF7IMAP_CONVERSION + ); + } + + $i += $n; + $u8len -= $n; + + if (($ch < 0x20) || ($ch >= 0x7f)) { + if (!$base64) { + $p .= '&'; + $base64 = true; + $b = 0; + $k = 10; + } + + if ($ch & ~0xffff) { + $ch = 0xfffe; + } + + $p .= $ptr[($b | $ch >> $k)]; + $k -= 6; + for (; $k >= 0; $k -= 6) { + $p .= $ptr[(($ch >> $k) & 0x3f)]; + } + + $b = ($ch << (-$k)) & 0x3f; + $k += 16; + } else { + if ($base64) { + if ($k > 10) { + $p .= $ptr[$b]; + } + $p .= '-'; + $base64 = false; + } + + $p .= chr($ch); + if (chr($ch) === '&') { + $p .= '-'; + } + } + } + + if ($base64) { + if ($k > 10) { + $p .= $ptr[$b]; + } + $p .= '-'; + } + + return $p; + } + +} diff --git a/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/data/locale/Horde_Imap_Client.pot b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/data/locale/Horde_Imap_Client.pot new file mode 100644 index 00000000..9ba4bebe --- /dev/null +++ b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/data/locale/Horde_Imap_Client.pot @@ -0,0 +1,273 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR Horde LLC (http://www.horde.org/) +# This file is distributed under the same license as the Horde_Imap_Client package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Horde_Imap_Client\n" +"Report-Msgid-Bugs-To: dev@lists.horde.org\n" +"POT-Creation-Date: 2017-07-26 12:13+0200\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/Imap/Client/Exception/NoSupportPop3.php:34 +#, php-format +msgid "%s not supported on POP3 servers." +msgstr "" + +#: lib/Horde/Imap/Client/Socket.php:5035 +msgid "Authentication credentials have expired." +msgstr "" + +#: lib/Horde/Imap/Client/Socket.php:747 lib/Horde/Imap/Client/Socket.php:5019 +#: lib/Horde/Imap/Client/Socket/Pop3.php:441 +#: lib/Horde/Imap/Client/Socket/Pop3.php:460 +#: lib/Horde/Imap/Client/Socket/Pop3.php:486 +#: lib/Horde/Imap/Client/Socket/Pop3.php:498 +msgid "Authentication failed." +msgstr "" + +#: lib/Horde/Imap/Client/Auth/DigestMD5.php:158 +#: lib/Horde/Imap/Client/Auth/Scram.php:124 +msgid "Authentication failure." +msgstr "" + +#: lib/Horde/Imap/Client/Socket.php:5027 +msgid "Authentication was successful, but authorization failed." +msgstr "" + +#: lib/Horde/Imap/Client/Interaction/Server/Tagged.php:44 +msgid "Bad tagged response." +msgstr "" + +#: lib/Horde/Imap/Client/Exception/SearchCharset.php:45 +msgid "Cannot convert search query text to new charset" +msgstr "" + +#: lib/Horde/Imap/Client/Base.php:1924 lib/Horde/Imap/Client/Base.php:1987 +msgid "Cannot expunge read-only mailbox." +msgstr "" + +#: lib/Horde/Imap/Client/Socket.php:4811 +msgid "Charset used in search query is not supported on the mail server." +msgstr "" + +#: lib/Horde/Imap/Client/Socket.php:1240 +#, php-format +msgid "Could not open mailbox \"%s\"." +msgstr "" + +#: lib/Horde/Imap/Client/Socket.php:358 lib/Horde/Imap/Client/Socket.php:400 +msgid "Could not open secure TLS connection to the IMAP server." +msgstr "" + +#: lib/Horde/Imap/Client/Socket/Pop3.php:219 +#: lib/Horde/Imap/Client/Socket/Pop3.php:233 +msgid "Could not open secure connection to the POP3 server." +msgstr "" + +#: lib/Horde/Imap/Client/Socket.php:4919 +msgid "Could not save message data because it is too large." +msgstr "" + +#: lib/Horde/Imap/Client/Socket.php:4910 +msgid "Could not save message on server." +msgstr "" + +#: lib/Horde/Imap/Client/Socket.php:606 +#: lib/Horde/Imap/Client/Socket/Pop3.php:324 +msgid "Error connecting to mail server." +msgstr "" + +#: lib/Horde/Imap/Client/Utf7imap.php:128 +#: lib/Horde/Imap/Client/Utf7imap.php:156 +#: lib/Horde/Imap/Client/Utf7imap.php:163 +#: lib/Horde/Imap/Client/Utf7imap.php:225 +#: lib/Horde/Imap/Client/Utf7imap.php:245 +#: lib/Horde/Imap/Client/Utf7imap.php:252 +#: lib/Horde/Imap/Client/Utf7imap.php:263 +#: lib/Horde/Imap/Client/Utf7imap.php:272 +msgid "Error converting UTF7-IMAP string." +msgstr "" + +#: lib/Horde/Imap/Client/Socket.php:4467 +#: lib/Horde/Imap/Client/Socket/Connection/Pop3.php:83 +#: lib/Horde/Imap/Client/Socket/Connection/Socket.php:214 +#: lib/Horde/Imap/Client/Socket/Pop3.php:1382 +msgid "Error when communicating with the mail server." +msgstr "" + +#: lib/Horde/Imap/Client/Socket.php:4605 +msgid "IMAP Server closed the connection." +msgstr "" + +#: lib/Horde/Imap/Client/Socket.php:4591 +msgid "IMAP error reported by server." +msgstr "" + +#: lib/Horde/Imap/Client/Socket.php:4009 +#, php-format +msgid "Invalid METADATA entry: \"%s\"." +msgstr "" + +#: lib/Horde/Imap/Client/Socket.php:4102 +#, php-format +msgid "Invalid METADATA value type \"%s\"." +msgstr "" + +#: lib/Horde/Imap/Client/Socket/Connection/Socket.php:148 +msgid "Mail server closed the connection unexpectedly." +msgstr "" + +#: lib/Horde/Imap/Client/Socket.php:573 +msgid "Mail server denied authentication." +msgstr "" + +#: lib/Horde/Imap/Client/Base.php:2257 lib/Horde/Imap/Client/Base.php:2536 +#: lib/Horde/Imap/Client/Base.php:2808 lib/Horde/Imap/Client/Base.php:2893 +msgid "Mailbox does not support mod-sequences." +msgstr "" + +#: lib/Horde/Imap/Client/Socket.php:370 +#: lib/Horde/Imap/Client/Socket/Pop3.php:201 +msgid "No password provided." +msgstr "" + +#: lib/Horde/Imap/Client/Socket.php:498 +msgid "No supported IMAP authentication method could be found." +msgstr "" + +#: lib/Horde/Imap/Client/Socket.php:5043 +msgid "Operation failed due to a lack of a secure connection." +msgstr "" + +#: lib/Horde/Imap/Client/Socket/Pop3.php:1448 +msgid "POP3 error reported by server." +msgstr "" + +#: lib/Horde/Imap/Client/Socket/Pop3.php:295 +msgid "POP3 server denied authentication." +msgstr "" + +#: lib/Horde/Imap/Client/Socket.php:5011 +msgid "Remote server is temporarily unavailable." +msgstr "" + +#: lib/Horde/Imap/Client/Socket/Connection/Pop3.php:75 +msgid "Server closed the connection unexpectedly." +msgstr "" + +#: lib/Horde/Imap/Client/Socket.php:388 +msgid "Server does not support TLS connections." +msgstr "" + +#: lib/Horde/Imap/Client/Socket/Pop3.php:219 +msgid "Server does not support secure connections." +msgstr "" + +#: lib/Horde/Imap/Client/Socket.php:809 +#: lib/Horde/Imap/Client/Socket/Pop3.php:508 +msgid "Server failed verification check." +msgstr "" + +#: lib/Horde/Imap/Client/Socket.php:626 +msgid "Server rejected connection." +msgstr "" + +#: lib/Horde/Imap/Client/Socket/Connection/Pop3.php:47 +#: lib/Horde/Imap/Client/Socket/Connection/Socket.php:64 +#: lib/Horde/Imap/Client/Socket/Connection/Socket.php:110 +msgid "Server write error." +msgstr "" + +#: lib/Horde/Imap/Client/Socket.php:4964 +msgid "The comparison algorithm was not recognized by the server." +msgstr "" + +#: lib/Horde/Imap/Client/Socket.php:635 +msgid "The mail server does not support IMAP4rev1 (RFC 3501)." +msgstr "" + +#: lib/Horde/Imap/Client/Socket.php:5092 +msgid "The mail server has denied the request." +msgstr "" + +#: lib/Horde/Imap/Client/Socket.php:5074 +msgid "The mail server is reporting corrupt data in your mailbox." +msgstr "" + +#: lib/Horde/Imap/Client/Socket.php:4876 +msgid "The mail server was unable to parse the contents of the mail message." +msgstr "" + +#: lib/Horde/Imap/Client/Socket.php:4827 +#, php-format +msgid "" +"The mail server was unable to parse the contents of the mail message: %s" +msgstr "" + +#: lib/Horde/Imap/Client/Socket.php:4982 +msgid "The metadata item could not be saved because it is too large." +msgstr "" + +#: lib/Horde/Imap/Client/Socket.php:5000 +msgid "" +"The metadata item could not be saved because the maximum number of " +"annotations has been exceeded." +msgstr "" + +#: lib/Horde/Imap/Client/Socket.php:4991 +msgid "" +"The metadata item could not be saved because the server does not support " +"private annotations." +msgstr "" + +#: lib/Horde/Imap/Client/Socket.php:5110 +msgid "The object could not be created because it already exists." +msgstr "" + +#: lib/Horde/Imap/Client/Socket.php:5119 +msgid "The object could not be deleted because it does not exist." +msgstr "" + +#: lib/Horde/Imap/Client/Socket.php:5101 +msgid "" +"The operation failed because the quota has been exceeded on the mail server." +msgstr "" + +#: lib/Horde/Imap/Client/Exception/NoSupportExtension.php:46 +#, php-format +msgid "The server does not support the %s extension." +msgstr "" + +#: lib/Horde/Imap/Client/Socket.php:5128 +msgid "The special-use attribute requested for the mailbox is not supported." +msgstr "" + +#: lib/Horde/Imap/Client/Socket.php:5060 +msgid "" +"There was a temporary issue when attempting this operation. Please try again " +"later." +msgstr "" + +#: lib/Horde/Imap/Client/Socket.php:723 +#: lib/Horde/Imap/Client/Socket/Pop3.php:379 +msgid "Unexpected response from server when authenticating." +msgstr "" + +#: lib/Horde/Imap/Client/Socket.php:839 +#: lib/Horde/Imap/Client/Socket/Pop3.php:518 +#, php-format +msgid "Unknown authentication method: %s" +msgstr "" + +#: lib/Horde/Imap/Client/Socket.php:5051 +msgid "You do not have adequate permissions to carry out this operation." +msgstr "" diff --git a/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/data/locale/da/LC_MESSAGES/Horde_Imap_Client.mo b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/data/locale/da/LC_MESSAGES/Horde_Imap_Client.mo new file mode 100644 index 0000000000000000000000000000000000000000..76322ef14c55890b28c547269519ba32c84d6e78 GIT binary patch literal 6559 zcmb`LON<;x8OJ*hLa+%5frMwENa8#_1g0>BpqH zd)6DlfeV5YC{hFp+>k9H1Y8jKfCOTB9gw&naX^5OK#2rLPDl~_zN(&`o|)YQ1TD?} zx4XZp`X2x9G4sdUZ+to6dW6ph`TXpWM$1^xtlFZgFr_WdU)e!UB4iXAK9esBniKfeZwzkUOX{4J15_G^I$ z!44?;egSNN-vJMRzXv6*doh}&!9(B^;1i(i`#Dhd`#vcA`yKc(@U}aHU=@50d<6U! z_$lyD;HSZ(kX-ol74T8;SKtZoU*JRF35*lJCEyzPLs0a*`F&oWHYjm?79>oL%WNG; zdWqd^6Wq&3E>sGjyR!${1c&*^#g^`RphBqQE?ntyfRu8V*ew@SaK0y$0cjAtpO4rs z{vllMf(`+x>o_HO37rC{>|%R8h&!Eqfb+AU#7j6ZxrA?WNj&8eyZ7-q#7AO=$?g)r zLg(Pad`L4FKfqm*TkhJIt28TAUXDhYEljAgRIQy|JFIeJ$HwN(V5uzDO zSrf{wj&rrH$3~gUqljk63CeQn2ykB+8LTQf9Z1kc(d9vXN z9jZbP1}JMyKFZRZ-A?LM?C51FT4RsVwzsZcD2?4zg}Gd)B2%f^P`!0+b5l&@QNBzE zhK+RC$kKRIC8*uaF0-STRAtUVQ98S2w1eAllUrT6jvcZx4xM|mkx3^ztGoB*cQ3rm zO%JcA&YAOKLuz`?*(fc$uBC8Y5LyD9kFd zOvTy`#HZW(&n$ujo*d0!+1ku*E1V9*%i_RA0f|b4z=h7~qYZCQVRo^M4>T+l4)KX_j zL1(+!uHv%r7U9yUVsm6FiPforJ8PiI6kZWR6ULj(pe|49L})C;p5~MnfpjX&%nY$q zl7)@jK;x9eXa*n8YMJWHoZX4Qk})CP5axA_>Stw2YMvb#TTdbtibXk!F{37FEhz?iqR@Y4u;9 z;2E$O@R5zi8g98J=FjuHXI-J=tl4y6WM>T5u{5wvREzQgGK*q6Ee%a<=9X?}ky~3W zoi7&?AB&e>C~?W6H)L?|POO!G(PKB8MVRS>-fYsG$-*CHNOhY$BIa@?4i;TOPY^RIIa}=Io1OQ?12D3&j~4^gxpy zF`l-~;KFu6Czbrjq53vUCdT=FYeiie+l6$PW*d}-+H;)bOSI$nvsnojT(xkcln%*Z z;Q<;YXpC2+A*-IYXp}J#%_$tL*-Qx1SP2`SWLjfETRolG&|F+e^yuQrI3i8=oO4~U zv6>H}uyLXs|oE@*-qo6@Qa-qr%4z&&*X|xVE4z*OP z)jss-!>xm@7J`j)W*o_hi*kor?bb0bcSh$$qhocN>X$5XdIi$i8g&>8_Q`g3sI)6j&-AAPatfxDjE(AMK8pi#nv^rQmE0^6*bC6lcCrI zPi5iIAQI>FYio)k8mvicMf;+;xfeA2b$fPry#^WEK7>vx7!f2L%{ z^@?s?>GH4dAaYDvjadsKyvZdv)=kM2f^OtP;B0c!kgqj69xz=!zp^&Q%&i=lBrz2I zoN)M#8ER>{5@abvIgFmMrM>_$;muT~Q>@BH1>+g7B#fSAveU#8AD;Oo95cUWJG#)9 z-E`j#)+j^(dC&~}VLPsLGxl)8rv%exg5$^Mi4H0*9T{h|Y+Kd{sh2~I*ii=|))gUQHR z$XV?O=m;@&CSQL0HFwT%lvfL867tiRC_vkB!;mBjWBJ-e9LQ8DYm)qS>k1DjSCjep zO?`ac&8>*lt77FpnYm}Jc_Zm6e`^bBN=&S(y~QfOoyv!dNH`A4LGERVP_D_&G>#au z(*fPyPvDZUu^D@N35e9`IcLstW(T8op1)_8O|;c16cP<2>t;o!(X?vo8r?z@2S3Xy z`i@Jxs|G_7=WNa0kvG*w9LHgLNp3z8m?!tlyOHcqUwv(q7MJVR&GRDoea=2 zI;Qp9aJ7yewNpuavsFSFa$XEb^e~SSjZr!+bX*&OVX#z8`4x(sK^FhMi8j@~+exs{ z%dJ`*wIzYiGG`B^t<{o08%bv;{in+6n1qr-=L^Hm>vCr7*=0@*`mfX`yGyivucNp?D>k`@frcI(<$QLsr>zA{EqC9x4tFeCdq&J3l8?ia7Vm0u#{r$?lm z3iV=+F&BJ7?@)&wUr&{sT-7Gxl#+KGLBVsy5AVv%##abZhJ-4^{?;|>v8e1dmMY#1 F{tb;f`pEzQ literal 0 HcmV?d00001 diff --git a/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/data/locale/da/LC_MESSAGES/Horde_Imap_Client.po b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/data/locale/da/LC_MESSAGES/Horde_Imap_Client.po new file mode 100644 index 00000000..376b2065 --- /dev/null +++ b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/data/locale/da/LC_MESSAGES/Horde_Imap_Client.po @@ -0,0 +1,266 @@ +# Danish translations for Horde_Imap_Client package. +# Copyright (C) 2014 Horde LLC (http://www.horde.org/) +# This file is distributed under the same license as the Horde_Imap_Client package. +# FIRST AUTHOR , 2014. +# +msgid "" +msgstr "" +"Project-Id-Version: Horde_Imap_Client\n" +"Report-Msgid-Bugs-To: dev@lists.horde.org\n" +"POT-Creation-Date: 2014-03-20 00:26+0100\n" +"PO-Revision-Date: 2014-03-20 20:08+0100\n" +"Last-Translator: Erling Preben Hansen \n" +"Language-Team: \n" +"Language: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: lib/Horde/Imap/Client/Exception/NoSupportPop3.php:34 +#, php-format +msgid "%s not supported on POP3 servers." +msgstr "%s er ikke understøttet på pop3 servere" + +#: lib/Horde/Imap/Client/Socket.php:4635 +msgid "Authentication credentials have expired." +msgstr "Godkendelses rettighederne er udløbet." + +#: lib/Horde/Imap/Client/Socket.php:4619 +msgid "Authentication failed." +msgstr "Godkendelsen fejlede." + +#: lib/Horde/Imap/Client/Auth/DigestMD5.php:158 +msgid "Authentication failure." +msgstr "Godkendelses fejl." + +#: lib/Horde/Imap/Client/Socket.php:4627 +msgid "Authentication was successful, but authorization failed." +msgstr "Godkendelsen lykkedes, men autorisationen fejlede." + +#: lib/Horde/Imap/Client/Interaction/Server/Tagged.php:44 +msgid "Bad tagged response." +msgstr "Forkert mærket svar." + +#: lib/Horde/Imap/Client/Exception/SearchCharset.php:45 +msgid "Cannot convert search query text to new charset" +msgstr "Kan ikke konvertere søgeteksten til det nye tegnsæt" + +#: lib/Horde/Imap/Client/Base.php:2032 lib/Horde/Imap/Client/Base.php:2095 +msgid "Cannot expunge read-only mailbox." +msgstr "Kan ikke rense en Læs kun mail mappe." + +#: lib/Horde/Imap/Client/Socket.php:4413 +msgid "Charset used in search query is not supported on the mail server." +msgstr "Tegnsættet brugt i søgeteksten er ikke understøttet på mail serveren." + +#: lib/Horde/Imap/Client/Socket.php:1077 +#, php-format +msgid "Could not open mailbox \"%s\"." +msgstr "Kunne ikke åbne mail mappen \"%s\"." + +#: lib/Horde/Imap/Client/Socket.php:393 +msgid "Could not open secure TLS connection to the IMAP server." +msgstr "Kunne ikke åbne en sikker TLS forbindelse til IMAP serveren." + +#: lib/Horde/Imap/Client/Socket/Pop3.php:194 +#: lib/Horde/Imap/Client/Socket/Pop3.php:208 +msgid "Could not open secure connection to the POP3 server." +msgstr "Kunne ikke åbne en sikker forbindelse til POP3 serveren." + +#: lib/Horde/Imap/Client/Socket.php:4519 +msgid "Could not save message data because it is too large." +msgstr "Kunne ikke gemme besked data da den er for stor." + +#: lib/Horde/Imap/Client/Socket.php:4510 +msgid "Could not save message on server." +msgstr "Kunne ikke gemme beskeden på serveren." + +#: lib/Horde/Imap/Client/Socket.php:574 +#: lib/Horde/Imap/Client/Socket/Pop3.php:284 +msgid "Error connecting to mail server." +msgstr "Der optod en fejl under forbindelsen til serveren." + +#: lib/Horde/Imap/Client/Utf7imap.php:128 +#: lib/Horde/Imap/Client/Utf7imap.php:156 +#: lib/Horde/Imap/Client/Utf7imap.php:163 +#: lib/Horde/Imap/Client/Utf7imap.php:225 +#: lib/Horde/Imap/Client/Utf7imap.php:245 +#: lib/Horde/Imap/Client/Utf7imap.php:252 +#: lib/Horde/Imap/Client/Utf7imap.php:263 +#: lib/Horde/Imap/Client/Utf7imap.php:272 +msgid "Error converting UTF7-IMAP string." +msgstr "Der opstod en fejl under konverteringen af UTF7 strengen." + +#: lib/Horde/Imap/Client/Socket.php:4081 +#: lib/Horde/Imap/Client/Socket/Connection/Pop3.php:71 +#: lib/Horde/Imap/Client/Socket/Connection/Socket.php:180 +#: lib/Horde/Imap/Client/Socket/Pop3.php:1191 +msgid "Error when communicating with the mail server." +msgstr "Der opstod en fejl under kommunikationen med mail serveren" + +#: lib/Horde/Imap/Client/Socket.php:4200 +msgid "IMAP Server closed the connection." +msgstr "IMAP serveren lukkede forbindelsen." + +#: lib/Horde/Imap/Client/Socket.php:4186 +msgid "IMAP error reported by server." +msgstr "IMAP Fejl rapporterede serveren." + +#: lib/Horde/Imap/Client/Socket.php:3682 +#, php-format +msgid "Invalid METADATA entry: \"%s\"." +msgstr "Ugyldig METADATA : \"%s\"." + +#: lib/Horde/Imap/Client/Socket.php:3768 +#, php-format +msgid "Invalid METADATA value type \"%s\"." +msgstr "Ugyldig METADATA værdi type \"%s\"." + +#: lib/Horde/Imap/Client/Socket/Connection/Socket.php:121 +msgid "Mail server closed the connection unexpectedly." +msgstr "Mail serveren lukkede forbindelsen uventet." + +#: lib/Horde/Imap/Client/Socket.php:542 +msgid "Mail server denied authentication." +msgstr "Mail serveren afviste godkendelse" + +#: lib/Horde/Imap/Client/Base.php:2365 lib/Horde/Imap/Client/Base.php:2685 +#: lib/Horde/Imap/Client/Base.php:2950 lib/Horde/Imap/Client/Base.php:3035 +msgid "Mailbox does not support mod-sequences." +msgstr "Mailmappen understøtter ikke mod-sequences." + +#: lib/Horde/Imap/Client/Socket.php:469 +msgid "No supported IMAP authentication method could be found." +msgstr "Der kunne ikke findes nogen IMAP godkendelses metoder." + +#: lib/Horde/Imap/Client/Socket.php:4643 +msgid "Operation failed due to a lack of a secure connection." +msgstr "Handlingen fejlede på grund af manglende sikre forbindelser." + +#: lib/Horde/Imap/Client/Socket/Pop3.php:1250 +msgid "POP3 error reported by server." +msgstr "POP3 fejl rapporteret af serveren." + +#: lib/Horde/Imap/Client/Socket/Pop3.php:253 +msgid "POP3 server denied authentication." +msgstr "POP3 serveren afviste godkendelsen." + +#: lib/Horde/Imap/Client/Socket.php:4611 +msgid "Remote server is temporarily unavailable." +msgstr "Fjernserveren er midlertidigt ikke til rådighed." + +#: lib/Horde/Imap/Client/Socket/Connection/Pop3.php:63 +msgid "Server closed the connection unexpectedly." +msgstr "Serveren lukkede forbindelsen uventet." + +#: lib/Horde/Imap/Client/Socket.php:381 +msgid "Server does not support TLS connections." +msgstr "Serveren understøtter ikke TLS forbindelser." + +#: lib/Horde/Imap/Client/Socket/Pop3.php:194 +msgid "Server does not support secure connections." +msgstr "Serveren understøtter ikke sikker forbindelse." + +#: lib/Horde/Imap/Client/Socket.php:594 +msgid "Server rejected connection." +msgstr "Serveren afviste forbindelsen." + +#: lib/Horde/Imap/Client/Socket/Connection/Pop3.php:42 +#: lib/Horde/Imap/Client/Socket/Connection/Socket.php:54 +#: lib/Horde/Imap/Client/Socket/Connection/Socket.php:87 +msgid "Server write error." +msgstr "Server skrive fejl." + +#: lib/Horde/Imap/Client/Socket.php:4564 +msgid "The comparison algorithm was not recognized by the server." +msgstr "DEnne sammenlignings algoritme blev ikke genkendt af serveren." + +#: lib/Horde/Imap/Client/Socket.php:603 +msgid "The mail server does not support IMAP4rev1 (RFC 3501)." +msgstr "Mail serveren understøtter ikke IMAP4rev1 (RFC 3501)." + +#: lib/Horde/Imap/Client/Socket.php:4690 +msgid "The mail server has denied the request." +msgstr "Mail serveren afviste anmodningen." + +#: lib/Horde/Imap/Client/Socket.php:4674 +msgid "The mail server is reporting corrupt data in your mailbox." +msgstr "Mail serveren rapporterer ødelagt data i din mailmappe." + +#: lib/Horde/Imap/Client/Socket.php:4476 +msgid "The mail server was unable to parse the contents of the mail message." +msgstr "" +"Mail serveren var ude af stand til at behandle indholdet af mail beskeden." + +#: lib/Horde/Imap/Client/Socket.php:4429 +#, php-format +msgid "" +"The mail server was unable to parse the contents of the mail message: %s" +msgstr "" +"Mail serveren var ude af stand til at behandle indholdet af mail beskeden: %s" + +#: lib/Horde/Imap/Client/Socket.php:4582 +msgid "The metadata item could not be saved because it is too large." +msgstr "Metadata delen kunne ikke gemmes, da den er for stor." + +#: lib/Horde/Imap/Client/Socket.php:4600 +msgid "" +"The metadata item could not be saved because the maximum number of " +"annotations has been exceeded." +msgstr "" +"Metadata delen kunne ikke gemmes fordi det maksimale antal annotationer er " +"overskredet." + +#: lib/Horde/Imap/Client/Socket.php:4591 +msgid "" +"The metadata item could not be saved because the server does not support " +"private annotations." +msgstr "" +"Metadata delen kunne ikke gemmes fordi serveren ikke understøtter private " +"annotationer." + +#: lib/Horde/Imap/Client/Socket.php:4708 +msgid "The object could not be created because it already exists." +msgstr "Objektet kunne ikke oprettes fordi det allerede findes." + +#: lib/Horde/Imap/Client/Socket.php:4717 +msgid "The object could not be deleted because it does not exist." +msgstr "Objektet kunne ikke slettes fordi det ikke eksisterer." + +#: lib/Horde/Imap/Client/Socket.php:4699 +msgid "" +"The operation failed because the quota has been exceeded on the mail server." +msgstr "Handlingen fejlede fordi pladsen på mail serveren er overskredet." + +#: lib/Horde/Imap/Client/Exception/NoSupportExtension.php:46 +#, php-format +msgid "The server does not support the %s extension." +msgstr "Serveren understøtter ikke %s udvidelsen." + +#: lib/Horde/Imap/Client/Socket.php:4726 +msgid "The special-use attribute requested for the mailbox is not supported." +msgstr "" +"Den specielle attribut for mail mappen som er anmodet understøttes ikke." + +#: lib/Horde/Imap/Client/Socket.php:4660 +msgid "" +"There was a temporary issue when attempting this operation. Please try again " +"later." +msgstr "" +"Der opstod en midlertidig fejl under denne handling. Prøv venligts igen " +"senere." + +#: lib/Horde/Imap/Client/Socket.php:692 +#: lib/Horde/Imap/Client/Socket/Pop3.php:339 +msgid "Unexpected response from server when authenticating." +msgstr "Uventet reaktion fra serveren under godkendelsen." + +#: lib/Horde/Imap/Client/Socket.php:729 +#: lib/Horde/Imap/Client/Socket/Pop3.php:385 +#, php-format +msgid "Unknown authentication method: %s" +msgstr "Ukendt godkendelses metode: %s" + +#: lib/Horde/Imap/Client/Socket.php:4651 +msgid "You do not have adequate permissions to carry out this operation." +msgstr "Du har ikke de nødvendige tilladelser til at udføre denn handlling." diff --git a/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/data/locale/de/LC_MESSAGES/Horde_Imap_Client.mo b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/data/locale/de/LC_MESSAGES/Horde_Imap_Client.mo new file mode 100644 index 0000000000000000000000000000000000000000..dd3e96b520316c333eaf339cba8b6e1dd643dcdc GIT binary patch literal 7371 zcmb`LOKcri8ONujrN#6`TV93I(?CjIb89e#>bWzw zXJ+i!Y$2!!u>y%*Sa<;oB#=;qAQBRW6{>^;D37Xqu`_W zc-|@S82A_%g3o|kpzQl0xB&hZ6!{Ol->p9iKFfQn!ta5y{!LJUe*+JK58vx~4e$gg z?@jPi;Mc(?z#UNb{R)(G-vVXbWA}O9XTdq}!{Do+*jR$kfjLe`_Xc;H3(` z2}=Cl1TTY+;=}~}3Yg3H;3aV3adZUV06X$MD0)5zSw!y+_!{_AQ1pBfrwhMc0mXke zLBeJ^iOVhL0BegNX4rg_-{nJiJwj(?2tS_Sd6q{$hj?(eH^uWAp8I*k_LDrLpC@^d zSjY#pJW|g3K;Fft_wbzHkvKiY^E8iqNPTOY{C*z~sbF(o-rvUqHSI_80Jm9x<0kug zh@Z1O!V%%!QJy&-(!k~);7RF$Rvs?&6i@$iul#Z-S7}zLyzKQdQ|M4-sam1)Mla^O+QN1aC;NO|8eLny8RTfuYUw<0 zm&tL}EDIHIbY|jhcXD6gxgbsL2)`RGM?Zz++=rGu0ujr zCZTn2*3)TUvO0JuKUn)?u3LCTtzBLf8&ch}&PHjGy0pBovY*syV|~*|6h}|XC1zc` z9AI`B6oG2$R)CQzE)-@JS*DV}MB>wd{$raUfg?x5TQnv!1BKH_yetl^FOaCjEV#aQ zan5)46oxPQGB)8Dg1X%@wM=8_W?Xcv`C}68-c?IZ)k-o6j<{%Of5Wp&v{lXMiq_4o zflf>5Mv%mzT3%dRxUjIcprEtany=zg`zwn}t%|Llu2w7$4V+LhNBqxh0TJg_#~Bmg;7qpKEBGk{Au|N~U^2o^NI*R6Ubz#Gzyu-wyNF8b2M&mRS3{cZ7FpA9JtiZdT|j zAeMBxOPm4|lYnI!Y~bObnLxp}3-lg0S4(Ry98W2nxZlE>sl&Cd^e9Liw+Dr=qg(3( zX-2ZDB*W3BaA!&|dt?e;J>CzFCCqQVuOu95;MCCunn7NzkvG=a3j?cB26 zZ5_#lI$I?6&lJ6-6|Q1X z4Y#t=^eb9@tJp#u38C-_TPZJc7Fk-r`&_ss@79{C82x{w%&SAW^)Z|eYNxXM`f@45E z;5`#>1aQkXKX;y!o;8Jz<7U&jSvzKUkVxa(LbW(Apt~qGX=|txy=Utn&+Oi6>)wLW z_px~C^%9rVy&(gKbK*$b5Iy#@Sr#+3(9?CAGm*HXbLuTKi7$;TC}=Ir4+Cyvbelfa zKSnC;-Ue=^(13-x0TY9(M_a7RDT=l`A(pRg7b`mKr>VR0*-$Hq4us+i8$lG19toZ{ z4e$D(5s*r5R8eh{b^FFSxg*U$8shbIJL4I|&iHxlO{cEe?&&Y* zQ5^c`$|(2OvUzI9#@WR3h2bpJjm$(-D_7V2^TIDA`4>=SUd>L=%=y!E{_JyVW_Et& z#Ifnw>1h`F*Yrj#Cl1%0^k-)M+2_^F-2BPsk4?|8?sAY9{+bEW99L#$UcDHkYPHo# zH9gO$&%G9;X9vfBp5JI_S=;c;-}E)3LusESOqeT3#HQKGT?Lc1QW}VOF*DtKUZp+znxC0H zt=z9?4yWp=Giv6@=_#4MH)DEvP`2&V?YoYVDu$p=K?#LLd9iz^*rq;Th_zZsyE>tU z;9;h)IAy%FE4#X5RJ401DPkDpRx#MBw(ca6&Rd-X=a4G<|79p$_H71+hSkoJ$Y>5w zffTk-6ex)X;nPNz!GhWm*V9T5ts<&u6v4}dv|wft8xXTvVw;TQ>kPX5(OE#!(3Gf@ z>F#Ze5c|F)N0a11v8{IRpaFyXcA+*ktizTorSUK8T&Mn36Q&4W-@VP`+;<*6jkMX_ zDZ9fha{P$Y;~Z&Zwigh!g0yX9E=G&e9#wMGaTlWvaxkQoEc!CgRgsz)s7f7~^T%zB z^zQ9;JJmylR>eX$_X``FL{$8`O*fHd-aloX0$&})aspcDB&kc;BS9vycPQaX(CQdr zl1?4BTx|M>a$?U0gR7NuKTgq7u%X0usUnl@-m-jjG#!W=w_j*pcVS(4!`oxYxX<^J z`XVGJfK45D)%EUXkkYPbw{glaJ-Bc9tMas-?OI>&?RU&P(n*10hj~U!g{Kc3HNLZbWEaE$z5@Ov~sC+u~;p0 zm02BLWnSV-wc;)_-1NDGN1C+bK1fZJw5zs_O0wl=T!GxRMea1acZ|CzN4m}R#`>S& z3@s27QM~#%I$y!d>Ho>>D_Z&5BcZWhR z%7PL9-tM*KA7TINVW>V%6jueS8{6>My+a=N zkHv(3knWj}_VRimd zQ2sT(JZuL7Q@- oLWhyPKfVd`-B`_6*R+gz#}y-{wYqO~Sn?n9?UI%vV^PEV4_aRl-2eap literal 0 HcmV?d00001 diff --git a/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/data/locale/de/LC_MESSAGES/Horde_Imap_Client.po b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/data/locale/de/LC_MESSAGES/Horde_Imap_Client.po new file mode 100644 index 00000000..cd512d8b --- /dev/null +++ b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/data/locale/de/LC_MESSAGES/Horde_Imap_Client.po @@ -0,0 +1,291 @@ +# German translations for Horde_Imap_Client package. +# Copyright 2012-2017 Horde LLC (http://www.horde.org/) +# This file is distributed under the same license as the Horde_Imap_Client package. +# Jan Schneider , 2012-2015. +# +msgid "" +msgstr "" +"Project-Id-Version: Horde_Imap_Client\n" +"Report-Msgid-Bugs-To: dev@lists.horde.org\n" +"POT-Creation-Date: 2017-07-26 12:13+0200\n" +"PO-Revision-Date: 2015-12-29 17:59+0100\n" +"Last-Translator: Jan Schneider \n" +"Language-Team: i18n@lists.horde.org\n" +"Language: de\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/Imap/Client/Exception/NoSupportPop3.php:34 +#, php-format +msgid "%s not supported on POP3 servers." +msgstr "%s wird auf POP3-Servern nicht unterstützt." + +#: lib/Horde/Imap/Client/Socket.php:5035 +msgid "Authentication credentials have expired." +msgstr "Die Anmeldedaten sind nicht mehr gültig." + +#: lib/Horde/Imap/Client/Socket.php:747 lib/Horde/Imap/Client/Socket.php:5019 +#: lib/Horde/Imap/Client/Socket/Pop3.php:441 +#: lib/Horde/Imap/Client/Socket/Pop3.php:460 +#: lib/Horde/Imap/Client/Socket/Pop3.php:486 +#: lib/Horde/Imap/Client/Socket/Pop3.php:498 +msgid "Authentication failed." +msgstr "Anmeldung fehlgeschlagen." + +#: lib/Horde/Imap/Client/Auth/DigestMD5.php:158 +#: lib/Horde/Imap/Client/Auth/Scram.php:124 +msgid "Authentication failure." +msgstr "Anmeldung fehlgeschlagen." + +#: lib/Horde/Imap/Client/Socket.php:5027 +msgid "Authentication was successful, but authorization failed." +msgstr "" +"Die Anmeldung war erfolgreich aber die Autorisierung ist fehlgeschlagen." + +#: lib/Horde/Imap/Client/Interaction/Server/Tagged.php:44 +msgid "Bad tagged response." +msgstr "Ungültige getaggte Antwort." + +#: lib/Horde/Imap/Client/Exception/SearchCharset.php:45 +msgid "Cannot convert search query text to new charset" +msgstr "" +"Der Suchtext konnte nicht in den benötigten Zeichensatz übersetzt werden." + +#: lib/Horde/Imap/Client/Base.php:1924 lib/Horde/Imap/Client/Base.php:1987 +msgid "Cannot expunge read-only mailbox." +msgstr "Nur-Lesen-Ordner können nicht aufgeräumt werden." + +#: lib/Horde/Imap/Client/Socket.php:4811 +msgid "Charset used in search query is not supported on the mail server." +msgstr "" +"Der Zeichensatz, der in der Suchanfrage benutzt wurde, wird von dem E-Mail-" +"Server nicht unterstützt." + +#: lib/Horde/Imap/Client/Socket.php:1240 +#, php-format +msgid "Could not open mailbox \"%s\"." +msgstr "Ordner \"%s\" konnte nicht geöffnet werden." + +#: lib/Horde/Imap/Client/Socket.php:358 lib/Horde/Imap/Client/Socket.php:400 +msgid "Could not open secure TLS connection to the IMAP server." +msgstr "Sichere TLS-Verbindung zum IMAP-Server kann nicht hergestellt werden." + +#: lib/Horde/Imap/Client/Socket/Pop3.php:219 +#: lib/Horde/Imap/Client/Socket/Pop3.php:233 +msgid "Could not open secure connection to the POP3 server." +msgstr "Sichere Verbindung zum POP3-Server kann nicht hergestellt werden." + +#: lib/Horde/Imap/Client/Socket.php:4919 +msgid "Could not save message data because it is too large." +msgstr "" +"Nachrichtendaten konnten nicht gespeichert werden, weil sie zu groß sind." + +#: lib/Horde/Imap/Client/Socket.php:4910 +msgid "Could not save message on server." +msgstr "Die Nachricht konnte nicht auf dem E-Mail-Server gespeichert werden." + +#: lib/Horde/Imap/Client/Socket.php:606 +#: lib/Horde/Imap/Client/Socket/Pop3.php:324 +msgid "Error connecting to mail server." +msgstr "Verbindung zum E-Mail-Server fehlgeschlagen." + +#: lib/Horde/Imap/Client/Utf7imap.php:128 +#: lib/Horde/Imap/Client/Utf7imap.php:156 +#: lib/Horde/Imap/Client/Utf7imap.php:163 +#: lib/Horde/Imap/Client/Utf7imap.php:225 +#: lib/Horde/Imap/Client/Utf7imap.php:245 +#: lib/Horde/Imap/Client/Utf7imap.php:252 +#: lib/Horde/Imap/Client/Utf7imap.php:263 +#: lib/Horde/Imap/Client/Utf7imap.php:272 +msgid "Error converting UTF7-IMAP string." +msgstr "Fehler beim Umwandeln eines UTF7-IMAP-Strings." + +#: lib/Horde/Imap/Client/Socket.php:4467 +#: lib/Horde/Imap/Client/Socket/Connection/Pop3.php:83 +#: lib/Horde/Imap/Client/Socket/Connection/Socket.php:214 +#: lib/Horde/Imap/Client/Socket/Pop3.php:1382 +msgid "Error when communicating with the mail server." +msgstr "Fehler während der Kommunikation mit dem E-Mail-Server." + +#: lib/Horde/Imap/Client/Socket.php:4605 +msgid "IMAP Server closed the connection." +msgstr "Der IMAP-Server hat die Verbindung unterbrochen." + +#: lib/Horde/Imap/Client/Socket.php:4591 +msgid "IMAP error reported by server." +msgstr "Der E-Mail-Server hat einen IMAP-Fehler gemeldet." + +#: lib/Horde/Imap/Client/Socket.php:4009 +#, php-format +msgid "Invalid METADATA entry: \"%s\"." +msgstr "Ungültiger METADATA-Eintrag: \"%s\"" + +#: lib/Horde/Imap/Client/Socket.php:4102 +#, php-format +msgid "Invalid METADATA value type \"%s\"." +msgstr "Ungültiger METADATA-Wertetyp \"%s\"." + +#: lib/Horde/Imap/Client/Socket/Connection/Socket.php:148 +msgid "Mail server closed the connection unexpectedly." +msgstr "Der E-Mail-Server hat die Verbindung unerwartet unterbrochen." + +#: lib/Horde/Imap/Client/Socket.php:573 +msgid "Mail server denied authentication." +msgstr "Der E-Mail-Server hat die Authentifizierung verweigert." + +#: lib/Horde/Imap/Client/Base.php:2257 lib/Horde/Imap/Client/Base.php:2536 +#: lib/Horde/Imap/Client/Base.php:2808 lib/Horde/Imap/Client/Base.php:2893 +msgid "Mailbox does not support mod-sequences." +msgstr "Der Ordner unterstützt keine Mod-Sequences." + +#: lib/Horde/Imap/Client/Socket.php:370 +#: lib/Horde/Imap/Client/Socket/Pop3.php:201 +msgid "No password provided." +msgstr "Kein Passwort angegeben." + +#: lib/Horde/Imap/Client/Socket.php:498 +msgid "No supported IMAP authentication method could be found." +msgstr "" +"Es wurde keine unterstützte Authentifizierungsmethode für IMAP gefunden." + +#: lib/Horde/Imap/Client/Socket.php:5043 +msgid "Operation failed due to a lack of a secure connection." +msgstr "" +"Die Operation ist wegen einer fehlenden sicheren Verbindung fehlgeschlagen." + +#: lib/Horde/Imap/Client/Socket/Pop3.php:1448 +msgid "POP3 error reported by server." +msgstr "Der E-Mail-Server hat einen POP3-Fehler gemeldet." + +#: lib/Horde/Imap/Client/Socket/Pop3.php:295 +msgid "POP3 server denied authentication." +msgstr "Der POP3-Server hat die Authentifizierung zurückgewiesen." + +#: lib/Horde/Imap/Client/Socket.php:5011 +msgid "Remote server is temporarily unavailable." +msgstr "Der E-Mail-Server ist zur Zeit nicht verfügbar." + +#: lib/Horde/Imap/Client/Socket/Connection/Pop3.php:75 +msgid "Server closed the connection unexpectedly." +msgstr "Der E-Mail-Server hat die Verbindung unerwartet unterbrochen." + +#: lib/Horde/Imap/Client/Socket.php:388 +msgid "Server does not support TLS connections." +msgstr "Der E-Mail-Server unterstützt keine TLS-Verbindungen." + +#: lib/Horde/Imap/Client/Socket/Pop3.php:219 +msgid "Server does not support secure connections." +msgstr "Der E-Mail-Server unterstützt keine sicheren Verbindungen." + +#: lib/Horde/Imap/Client/Socket.php:809 +#: lib/Horde/Imap/Client/Socket/Pop3.php:508 +msgid "Server failed verification check." +msgstr "Bestätigung des E-Mail-Servers fehlgeschlagen." + +#: lib/Horde/Imap/Client/Socket.php:626 +msgid "Server rejected connection." +msgstr "Der E-Mail-Server hat die Verbindung abgelehnt." + +#: lib/Horde/Imap/Client/Socket/Connection/Pop3.php:47 +#: lib/Horde/Imap/Client/Socket/Connection/Socket.php:64 +#: lib/Horde/Imap/Client/Socket/Connection/Socket.php:110 +msgid "Server write error." +msgstr "Server-Schreibfehler." + +#: lib/Horde/Imap/Client/Socket.php:4964 +msgid "The comparison algorithm was not recognized by the server." +msgstr "Der Vergleichsalgorithmus wurde vom E-Mail-Server nicht erkannt." + +#: lib/Horde/Imap/Client/Socket.php:635 +msgid "The mail server does not support IMAP4rev1 (RFC 3501)." +msgstr "Der E-Mail-Server unterstützt kein IMAP4rev1 (RFC 3501)." + +#: lib/Horde/Imap/Client/Socket.php:5092 +msgid "The mail server has denied the request." +msgstr "Der E-Mail-Server hat die Anfrage abgelehnt." + +#: lib/Horde/Imap/Client/Socket.php:5074 +msgid "The mail server is reporting corrupt data in your mailbox." +msgstr "Der E-Mail-Server hat beschädigte Daten in Ihrem Ordner gemeldet." + +#: lib/Horde/Imap/Client/Socket.php:4876 +msgid "The mail server was unable to parse the contents of the mail message." +msgstr "Der E-Mail-Server konnte den Inhalt der Nachricht nicht auswerten." + +#: lib/Horde/Imap/Client/Socket.php:4827 +#, php-format +msgid "" +"The mail server was unable to parse the contents of the mail message: %s" +msgstr "Der E-Mail-Server konnte den Inhalt der Nachricht nicht auswerten: %s" + +#: lib/Horde/Imap/Client/Socket.php:4982 +msgid "The metadata item could not be saved because it is too large." +msgstr "" +"Der Metadaten-Eintrag konnte nicht gespeichert werden, weil er zu groß ist." + +#: lib/Horde/Imap/Client/Socket.php:5000 +msgid "" +"The metadata item could not be saved because the maximum number of " +"annotations has been exceeded." +msgstr "" +"Der Metadaten-Eintrag konnte nicht gespeichert werden, weil die maximale " +"Anzahl an Vermerken erschöpft ist." + +#: lib/Horde/Imap/Client/Socket.php:4991 +msgid "" +"The metadata item could not be saved because the server does not support " +"private annotations." +msgstr "" +"Der Metadaten-Eintrag konnte nicht gespeichert werden, weil der E-Mail-" +"Server keine privaten Vermerke unterstützt." + +#: lib/Horde/Imap/Client/Socket.php:5110 +msgid "The object could not be created because it already exists." +msgstr "" +"Das Element konnte nicht gespeichert werden, weil es bereits existiert." + +#: lib/Horde/Imap/Client/Socket.php:5119 +msgid "The object could not be deleted because it does not exist." +msgstr "Das Element konnte nicht gelöscht werden, weil es nicht existiert." + +#: lib/Horde/Imap/Client/Socket.php:5101 +msgid "" +"The operation failed because the quota has been exceeded on the mail server." +msgstr "" +"Die Operation ist fehlgeschlagen, weil das Speicherplatzkontingent auf dem E-" +"Mail-Server erschöpft ist." + +#: lib/Horde/Imap/Client/Exception/NoSupportExtension.php:46 +#, php-format +msgid "The server does not support the %s extension." +msgstr "Der Server unterstützt die %s-Erweiterung nicht." + +#: lib/Horde/Imap/Client/Socket.php:5128 +msgid "The special-use attribute requested for the mailbox is not supported." +msgstr "" +"Das Attribut für spezielle Nutzung wird von dem Ordner nicht unterstützt." + +#: lib/Horde/Imap/Client/Socket.php:5060 +msgid "" +"There was a temporary issue when attempting this operation. Please try again " +"later." +msgstr "" +"Bei dieser Aktion ist ein vorübergehender Fehler aufgetreten. Bitte " +"versuchen Sie es später noch einmal." + +#: lib/Horde/Imap/Client/Socket.php:723 +#: lib/Horde/Imap/Client/Socket/Pop3.php:379 +msgid "Unexpected response from server when authenticating." +msgstr "Unerwartete Antwort vom E-Mail-Server während der Anmeldung." + +#: lib/Horde/Imap/Client/Socket.php:839 +#: lib/Horde/Imap/Client/Socket/Pop3.php:518 +#, php-format +msgid "Unknown authentication method: %s" +msgstr "Unbekannte Authentifizierungsmethode: %s" + +#: lib/Horde/Imap/Client/Socket.php:5051 +msgid "You do not have adequate permissions to carry out this operation." +msgstr "Sie haben nicht die nötigen Rechte, um diese Aktion durchzuführen." diff --git a/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/data/locale/el/LC_MESSAGES/Horde_Imap_Client.mo b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/data/locale/el/LC_MESSAGES/Horde_Imap_Client.mo new file mode 100644 index 0000000000000000000000000000000000000000..36a9cbc1d5b290b570b0b71a7e871f1a657c43b3 GIT binary patch literal 9541 zcmdUzTWlOx8ONu0aDhTwDEFQQ0!iE5+PRR(X=vRvX#+`P5*MfdRpZ@>y<~T0J2Pv? zQ6AzrP8z9+KniMsN=2j*Anb%RaUJJE9;j3*q}e|3fIvb*6%q)<3$F-An5 zDiC6&_1`mlF5l({0oQ{!+~hcSf)9cZfL{V--Xu5xo&;t6KY}v;`kNhR4Y(o2GAQFufd+gXTn7FL z%!0SxVxRlLPxAZ?@Dt#EQ09FPlzlIQGVib8XTjUvVQ=e(+=9kHI^@*T8=8H=wL{M~~g_3!uCY!Oh?-_&E4?a3lEO zt;i1U19g6icf7}Ow(N>~y2e^gjAKvCT zUjzRPt^_x~-(mn3dHyb#0dM|*<4l2Tz{B7L@OAK^+a2d=@D`Mm_amU}^EdDXuooxq z0p9?3fNL?X>^BYi;2*$Va1fGg04Kps;1y8xzYfv_;6q>@JOh3Oyz|4>jzw@k&nLkM zG#|0+oB*HT`Atyvx%;DzGXx$7MUJ`(nH|4K(X(epp3s2@{NM~z^A~sz!$-d zkmwZnTkt2~0Z1Ww-g`Hk0Dl1<2VXLd6N6cd|1U<&<+Kji~u9MpAim2&td zP(HXwKkwr&;yJk5AqkL%lQO}PHIX5owV=naa^5_;LGwP0c#@kyi@UCUxZnseE@VXLuEyKs% z2q|(oFN$_oiuar0N^D%V4#L7dyK`;9N8G%L-H{Q54ZWxw_z|mZa(&Sw7x+kxKAs!q zM$I!7FPt#3w>LI%V0>@f|FmJMYG>8TN86N}57!P%91sQ*^@-v1wiYrb&>%k|XPE4#Oa< z3+#`GmBoOq1H>x@20S^mWnISV6NkL0tuYSASg2I0_{ubfju+xlRljLPox4lPX>!Ft zoFgV`=%00Th^L~3UP|lXiMmW%{V}&#$eZn(hXx)U7#c9pIh^QE{nGL)gDakiC(2$r zVtYfu_7a$i53g{cmoH9aoyFq`odOaIu^TaEhd?@$54@Hu35=}sL}1Ep z6paUA-ju^&tdN%o<832;Rr%)iaW`?4$40`(VbAOiDn9del)Z3qXqmhy8WAVtta>D`vSn=I4EbI;!pa@kH@#Pn7!h-cS?-dLYmv2)8NvwCfB-^$i$qimF#T~-f;JW<>_j!?J3 zAyJtN!mv_~Z9X8^O$3#&makf;iY|Bw2MJrymE<9N5rZ+Tj)Xb#tlFfh=0CGazgZrs zjbXH_$qU<;QeumFA-CizVR?t7HY9>w>uk}&`lr<$<*+d3;(0AR8bZ#{PbOY&Vavl9ZMv90Vlh&!-b>^|lZfZnr8_9A@i>Iza@e^LT zRBM|HCKwlykhC(eEU&eK#G}lopxV@xHG@UZ6#`P|-4Pe^7O`}gb)KvzVTf+q1hYE~ zN;QYtbr&UKDMnBFd;DOWz+Lp7IJOB?+4odXfeRYT+WxqCB20LIL?tA~DpEvE&JB?$ zpo>`|urnA2LXgbXeCEq^SWM_QkCV~8r?-~e^3$7&1%jw&r&g}a_GqM#&pc8Yi84b$ zKaoB5a8da}W0d!@K{(PgxML`@N%+M|nMV<&->mBGTbt=!omsWU^!4_y>AkPFueXG z_TP;wd~?r6)3Xh)JUvifc3rlw$ARX_`D8A+Vye^C1Ig9uRP|6Y zU!6?OB(ElO{C_rCFx9DKPKGV;bTPS_Tuv5r+-&urcF{09Ihzh(5&PpD3m!^NvlP<| zTU<(JlXKN0>@jU*VfnrKoNgyi2Td|-e?=GupH6&ZTUHUKEtl<=T#4OS<@i0XpIbWI^C{*x_a<__Cu~q$;^_CjfgUbxM+r4 z3rKiARSYRpv1XDhs;bI;Q4PtOvdJN4Tog6L2r`=4)5#TvTt-t&ciB1uy(Zb>00JH~ zVnHz^GcgiFW|^Tc5S^*7sv2r0Myt238h)8guFBIf8I3AD9AVo@k%txWR`qCd#Ys-E zs#pL4WVHpHYh{u_s_#{Ctgb84^Ul)aoUBzn%nM5zeMY>?yhY;V0wxl2oma)G&xsr+ zIcGT{qR;SfrFvBS>m)BY7LCOmmM9CN0sC4K^Uu6!)nXwL{%t}4@efp= zQ>)ihT^tGMZ@DoqMuq0q3b;>QnwqoDthzB-GF=mXFmVCxF_pZV7j|?pA3rZ!ZX&}W ztLCl?V$`;qupVY^-UHdD@RZ1XwR+65M0kNM#QMCDo)Wc%b#O@BhxJ<1z-c|X(Qy`X zqaFp0bU$41^PD)%zDh|mL?-Pb_s~Wdjy|KYVdw}gn^!ExX51soQ)X+5wCa$uP68eh zksRQ?M%z4s31_Vj&-1Isg1!=wB}Oib-{E{pLJegJZi$@pvT}pxy8fl=F^xK$F(cM_ z$AWd(z8;TlY{_0H@rvv#L_kjooEc?AEpk&2rOR}3ikFdwr|Wubp*g;hT58OL8q@sx z3icFwPymSb$z%p1G|sl&))uKWfue!%nwW-LwS1;*YR{!^f%K>sD%Was8g*&r3r&ox z(42?EVE`3{P%pLJ1T8cR%wp*|)S44hHjFMu5au2xCrY*=yIU`utsbc!mlqNr^}MXf zqltKO$W9~kMHxult1pE!B|kyB)b_2@8?%xA1jC!Fu9l6C*+zD|h|k1dQnuNT5V0A* z#v4s$64g^us2D!asIzZlEvbBMvYXVxNj!U+sGMghyCdEwl5Blws@ZJveAl#QTtk7~lYNIfQnk<0jJ3R;u zu@$MslUi=O3fXl%VRTx}rRTu{lEIrc=(@ON+@x3wQnk$+%x@}9bFj76=}1yyM`+yE zadvB=uTZl7gJrs zsZ-8un>4Z9S?yNmB_7_X3X~hMTcfh2wTqrktGt{lA-AQ*hYaQA!V9&o(fz`wwzr$^>@bhKK~z5 z>U~S{vOVgc5dp|)mh=W8I`;@mZP_@W5g4f{HMgdK+j>jxXI9SD0Vl2e*^IPXB>|AKDk>4Kyh)0@E9b39#WHM`b?848{_ zn#1*JluD1g61}PL!U5Y?s4=wc=@GBis)%+PLTNZlr&vqKt*%~VxBAxD;2K+yrt^|q z8)zpi8JzG<)!@P=jZ`T{mTtBvbULGGM>$9K*Sig9E0+nVC7~_d_B6DnQB^Y#5Y_3f znP-uPOD?jc;HIa45s?;IHz4gS=T16N9xT2HksGl3?S=%D4H&)ZkV+?44W}h*$%DOq z;L1hX=tdum^Kppmi~E-5)QkM~3MLeq*1g-VRbT|S7sz;uedIO`BTJ7jE>F+q^(IG3 zqPDm+xYDe*93ZtV7lY!J1Idh1Q)I-}_OcFb(wm1iZ7CsRk{>WuuZs}tQuTO4h6B7% zs$16^1eIK_mt_P3WgkMwRCLi(kLsPU(GR3AQZu$WFxL)e_K4i=;Bgp_ z=+%dg-JjXGiQRyb-mo I&E(F%0Lv7kA^-pY literal 0 HcmV?d00001 diff --git a/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/data/locale/el/LC_MESSAGES/Horde_Imap_Client.po b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/data/locale/el/LC_MESSAGES/Horde_Imap_Client.po new file mode 100644 index 00000000..9714263f --- /dev/null +++ b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/data/locale/el/LC_MESSAGES/Horde_Imap_Client.po @@ -0,0 +1,283 @@ +# German translations for Horde_Imap_Client package. +# Copyright 2012-2015 Horde LLC (http://www.horde.org/) +# This file is distributed under the same license as the Horde_Imap_Client package. +# Jan Schneider , 2012-2014. +# +msgid "" +msgstr "" +"Project-Id-Version: Horde_Imap_Client\n" +"Report-Msgid-Bugs-To: dev@lists.horde.org\n" +"POT-Creation-Date: 2015-03-24 10:40+0100\n" +"PO-Revision-Date: 2015-10-02 15:23+0200\n" +"Last-Translator: Antonis Limperis \n" +"Language-Team: i18n@lists.horde.org\n" +"Language: de\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: Poedit 1.7.1\n" + +#: lib/Horde/Imap/Client/Exception/NoSupportPop3.php:34 +#, php-format +msgid "%s not supported on POP3 servers." +msgstr "%s δεν υποστηρίζεται σε διακομιστές POP3." + +#: lib/Horde/Imap/Client/Socket.php:4922 +msgid "Authentication credentials have expired." +msgstr "Tα διαπιστευτήρια ελέγχου ταυτότητας έχουν λήξει." + +#: lib/Horde/Imap/Client/Socket.php:725 lib/Horde/Imap/Client/Socket.php:4906 +#: lib/Horde/Imap/Client/Socket/Pop3.php:440 +#: lib/Horde/Imap/Client/Socket/Pop3.php:459 +msgid "Authentication failed." +msgstr "Η πιστοποίηση απέτυχε." + +#: lib/Horde/Imap/Client/Auth/DigestMD5.php:158 +msgid "Authentication failure." +msgstr "Αποτυχία πιστοποίησης" + +#: lib/Horde/Imap/Client/Socket.php:4914 +msgid "Authentication was successful, but authorization failed." +msgstr "Η πιστοποίηση ήταν επιτυχής, αλλά απέτυχε η εξουσιοδότηση." + +#: lib/Horde/Imap/Client/Interaction/Server/Tagged.php:44 +msgid "Bad tagged response." +msgstr "Απάντηση κακής ετικέτας." + +#: lib/Horde/Imap/Client/Exception/SearchCharset.php:45 +msgid "Cannot convert search query text to new charset" +msgstr "Αδυναμία μετατροπής του κειμένου αναζήτησης στο νέο σύνολο χαρακτήρων" + +#: lib/Horde/Imap/Client/Base.php:1920 lib/Horde/Imap/Client/Base.php:1983 +msgid "Cannot expunge read-only mailbox." +msgstr "" +"Δεν είναι δυνατή η οριστική διαγραφή σε γραμματοθυρίδα μόνο για ανάγνωση" + +#: lib/Horde/Imap/Client/Socket.php:4698 +msgid "Charset used in search query is not supported on the mail server." +msgstr "" +"Το σύνολο χαρακτήρων που χρησιμοποιείται στην αναζήτηση δεν υποστηρίζεται " +"από το διακομιστή αλληλογραφίας." + +#: lib/Horde/Imap/Client/Socket.php:1139 +#, php-format +msgid "Could not open mailbox \"%s\"." +msgstr "Δεν ήταν δυνατό το άνοιγμα της γραμματοθυρίδας \"% s \"." + +#: lib/Horde/Imap/Client/Socket.php:357 lib/Horde/Imap/Client/Socket.php:399 +msgid "Could not open secure TLS connection to the IMAP server." +msgstr "" +"Δεν θα ήταν δυνατό το άνοιγμα ασφαλούς σύνδεσης TLS προς τον διακομιστή IMAP." + +#: lib/Horde/Imap/Client/Socket/Pop3.php:218 +#: lib/Horde/Imap/Client/Socket/Pop3.php:232 +msgid "Could not open secure connection to the POP3 server." +msgstr "Sichere Verbindung zum POP3-Server kann nicht hergestellt werden." + +#: lib/Horde/Imap/Client/Socket.php:4806 +msgid "Could not save message data because it is too large." +msgstr "" +"Δεν ήταν δυνατή η αποθήκευση των δεδομένων του μηνύματος, επειδή είναι πολύ " +"μεγάλο." + +#: lib/Horde/Imap/Client/Socket.php:4797 +msgid "Could not save message on server." +msgstr "Δεν ήταν δυνατή η αποθήκευση του μηνύματος στο διακομιστή." + +#: lib/Horde/Imap/Client/Socket.php:580 +#: lib/Horde/Imap/Client/Socket/Pop3.php:323 +msgid "Error connecting to mail server." +msgstr "Σφάλμα κατά τη σύνδεση στον διακομιστή e-mail." + +#: lib/Horde/Imap/Client/Utf7imap.php:128 +#: lib/Horde/Imap/Client/Utf7imap.php:156 +#: lib/Horde/Imap/Client/Utf7imap.php:163 +#: lib/Horde/Imap/Client/Utf7imap.php:225 +#: lib/Horde/Imap/Client/Utf7imap.php:245 +#: lib/Horde/Imap/Client/Utf7imap.php:252 +#: lib/Horde/Imap/Client/Utf7imap.php:263 +#: lib/Horde/Imap/Client/Utf7imap.php:272 +msgid "Error converting UTF7-IMAP string." +msgstr "Σφάλμα κατά τη μετατροπή της συμβολοσειράς UTF7-IMAP ." + +#: lib/Horde/Imap/Client/Socket.php:4360 +#: lib/Horde/Imap/Client/Socket/Connection/Pop3.php:83 +#: lib/Horde/Imap/Client/Socket/Connection/Socket.php:207 +#: lib/Horde/Imap/Client/Socket/Pop3.php:1337 +msgid "Error when communicating with the mail server." +msgstr "Σφάλμα κατά την επικοινωνία με το διακομιστή αλληλογραφίας." + +#: lib/Horde/Imap/Client/Socket.php:4492 +msgid "IMAP Server closed the connection." +msgstr "Der IMAP-Server hat die Verbindung unterbrochen." + +#: lib/Horde/Imap/Client/Socket.php:4478 +msgid "IMAP error reported by server." +msgstr "Ο διακομιστής ανέφερε σφάλμα IMAP." + +#: lib/Horde/Imap/Client/Socket.php:3904 +#, php-format +msgid "Invalid METADATA entry: \"%s\"." +msgstr "Άκυρη καταχώρηση μεταδεδομένων: \"% s \"." + +#: lib/Horde/Imap/Client/Socket.php:3997 +#, php-format +msgid "Invalid METADATA value type \"%s\"." +msgstr "Μη έγκυρη τιμή μεταδεδομένων \"% s \"." + +#: lib/Horde/Imap/Client/Socket/Connection/Socket.php:148 +msgid "Mail server closed the connection unexpectedly." +msgstr "Ο Διακομιστής αλληλογραφίας έκλεισε τη σύνδεση απροσδόκητα." + +#: lib/Horde/Imap/Client/Socket.php:547 +msgid "Mail server denied authentication." +msgstr "Ο διακομιστής αλληλογραφίας αρνήθηκε την πιστοποίηση." + +#: lib/Horde/Imap/Client/Base.php:2233 lib/Horde/Imap/Client/Base.php:2518 +#: lib/Horde/Imap/Client/Base.php:2790 lib/Horde/Imap/Client/Base.php:2875 +msgid "Mailbox does not support mod-sequences." +msgstr "Η γραμματοθυρίδα δεν υποστηρίζει mod-ακολουθίες." + +#: lib/Horde/Imap/Client/Socket.php:369 +#: lib/Horde/Imap/Client/Socket/Pop3.php:200 +msgid "No password provided." +msgstr "Δεν δόθηκε κωδικός πρόσβασης." + +#: lib/Horde/Imap/Client/Socket.php:472 +msgid "No supported IMAP authentication method could be found." +msgstr "Δεν μπορεί να εντοπιστεί η υποστηριζόμενη IMAP μέθοδος πιστοποίησης." + +#: lib/Horde/Imap/Client/Socket.php:4930 +msgid "Operation failed due to a lack of a secure connection." +msgstr "Η λειτουργία απέτυχε λόγω της έλλειψης μιας ασφαλούς σύνδεσης." + +#: lib/Horde/Imap/Client/Socket/Pop3.php:1403 +msgid "POP3 error reported by server." +msgstr "Ο διακομιστής ανέφερε σφάλμα POP3." + +#: lib/Horde/Imap/Client/Socket/Pop3.php:294 +msgid "POP3 server denied authentication." +msgstr "Ο διακομιστής POP3 αρνήθηκε την πιστοποίηση." + +#: lib/Horde/Imap/Client/Socket.php:4898 +msgid "Remote server is temporarily unavailable." +msgstr "O απομακρυσμένο διακομιστής δεν είναι διαθέσιμος προσωρινά." + +#: lib/Horde/Imap/Client/Socket/Connection/Pop3.php:75 +msgid "Server closed the connection unexpectedly." +msgstr "Ο διακομιστής έκλεισε τη σύνδεση απροσδόκητα." + +#: lib/Horde/Imap/Client/Socket.php:387 +msgid "Server does not support TLS connections." +msgstr "Ο διακομιστής δεν υποστηρίζει συνδέσεις TLS." + +#: lib/Horde/Imap/Client/Socket/Pop3.php:218 +msgid "Server does not support secure connections." +msgstr "Ο διακομιστής δεν υποστηρίζει ασφαλείς συνδέσεις." + +#: lib/Horde/Imap/Client/Socket.php:600 +msgid "Server rejected connection." +msgstr "Ο διακομιστής απέρριψε τη σύνδεση." + +#: lib/Horde/Imap/Client/Socket/Connection/Pop3.php:47 +#: lib/Horde/Imap/Client/Socket/Connection/Socket.php:64 +#: lib/Horde/Imap/Client/Socket/Connection/Socket.php:110 +msgid "Server write error." +msgstr "Σφάλμα εγγραφής στο διακομιστή." + +#: lib/Horde/Imap/Client/Socket.php:4851 +msgid "The comparison algorithm was not recognized by the server." +msgstr "Ο αλγόριθμος σύγκρισης δεν αναγνωρίζεται από το διακομιστή." + +#: lib/Horde/Imap/Client/Socket.php:609 +msgid "The mail server does not support IMAP4rev1 (RFC 3501)." +msgstr "Ο διακομιστής αλληλογραφίας δεν υποστηρίζει IMAP4rev1 (RFC 3501)." + +#: lib/Horde/Imap/Client/Socket.php:4979 +msgid "The mail server has denied the request." +msgstr "Ο διακομιστής αλληλογραφίας αρνήθηκε το αίτημα." + +#: lib/Horde/Imap/Client/Socket.php:4961 +msgid "The mail server is reporting corrupt data in your mailbox." +msgstr "" +"Ο διακομιστής αλληλογραφίας η ανέφερε κατεστραμένα δεδομένα στη " +"γραμματοθυρίδα σας." + +#: lib/Horde/Imap/Client/Socket.php:4763 +msgid "The mail server was unable to parse the contents of the mail message." +msgstr "" +"Ο διακομιστής αλληλογραφίας δεν ήταν σε θέση να αναλύσει το περιεχόμενο του " +"μηνύματος e-mail" + +#: lib/Horde/Imap/Client/Socket.php:4714 +#, php-format +msgid "" +"The mail server was unable to parse the contents of the mail message: %s" +msgstr "" +"Ο διακομιστής αλληλογραφίας δεν ήταν σε θέση να αναλύσει το περιεχόμενο του " +"μηνύματος e-mail: %s" + +#: lib/Horde/Imap/Client/Socket.php:4869 +msgid "The metadata item could not be saved because it is too large." +msgstr "" +"Το στοιχείο μεταδεδομένων δεν ήταν δυνατό να αποθηκευτεί επειδή είναι πολύ " +"μεγάλο." + +#: lib/Horde/Imap/Client/Socket.php:4878 +msgid "" +"The metadata item could not be saved because the server does not support " +"private annotations." +msgstr "" +"Το στοιχείο μεταδεδομένων δεν ήταν δυνατό να αποθηκευτεί επειδή ο " +"διακομιστής δεν υποστηρίζει ιδιωτικούς σχολιασμούς." + +#: lib/Horde/Imap/Client/Socket.php:4997 +msgid "The object could not be created because it already exists." +msgstr "" +"Το στοιχείο μεταδεδομένων δεν ήταν δυνατό να δημιουργηθεί επειδή υπάρχει ήδη" + +#: lib/Horde/Imap/Client/Socket.php:5006 +msgid "The object could not be deleted because it does not exist." +msgstr "Το αντικείμενο δεν θα μπορούσε να διαγραφεί επειδή δεν υπάρχει." + +#: lib/Horde/Imap/Client/Socket.php:4988 +msgid "" +"The operation failed because the quota has been exceeded on the mail server." +msgstr "" +"Η λειτουργία απέτυχε επειδή ο χώρος έχει ξεπεραστεί στον διακομιστή " +"ηλεκτρονικού ταχυδρομείου." + +#: lib/Horde/Imap/Client/Exception/NoSupportExtension.php:46 +#, php-format +msgid "The server does not support the %s extension." +msgstr "Ο διακομιστής δεν υποστηρίζει την επέκταση%s." + +#: lib/Horde/Imap/Client/Socket.php:5015 +msgid "The special-use attribute requested for the mailbox is not supported." +msgstr "" +"Το χαρακτηριστικό ειδικής χρήσης που ζητήθηκε για το γραμματοκιβώτιο δεν " +"υποστηρίζεται." + +#: lib/Horde/Imap/Client/Socket.php:4947 +msgid "" +"There was a temporary issue when attempting this operation. Please try again " +"later." +msgstr "" +"Υπήρξε ένα προσωρινό πρόβλημα κατά την προσπάθεια αυτής της λειτουργίας. " +"Παρακαλώ προσπαθείστε ξανά αργότερα." + +#: lib/Horde/Imap/Client/Socket.php:701 +#: lib/Horde/Imap/Client/Socket/Pop3.php:378 +msgid "Unexpected response from server when authenticating." +msgstr "Μη αναμενόμενη απόκριση από το διακομιστή κατά την πιστοποίηση." + +#: lib/Horde/Imap/Client/Socket.php:757 +#: lib/Horde/Imap/Client/Socket/Pop3.php:473 +#, php-format +msgid "Unknown authentication method: %s" +msgstr "Άγνωστη μέθοδος πιστοποίησης: %s" + +#: lib/Horde/Imap/Client/Socket.php:4938 +msgid "You do not have adequate permissions to carry out this operation." +msgstr "Δεν έχετε επαρκή δικαιώματα για την εκτέλεση αυτής της λειτουργίας." diff --git a/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/data/locale/es/LC_MESSAGES/Horde_Imap_Client.mo b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/data/locale/es/LC_MESSAGES/Horde_Imap_Client.mo new file mode 100644 index 0000000000000000000000000000000000000000..efb29cb138ba141344c502bec0d3731a9e6071c2 GIT binary patch literal 6977 zcmb`LU5p$@5yvOQfpCEU2?>yd&~`AfWAFOz{1Imp2cOTjV&t<==M54_5cTf#?TtM% zy_t_aU*H`GLP#hm;sFWsf)G!{;>9Qe>4ZQC-hy}`Amxz{2?4K2{Hl9)clLJAB2h+~ z``^q|S65a4tGasseBYk$23#k&AL0Jp9YJsb{OX$>k^eV%5Pb0c zLGT248ax1A0}p|(fDePe1n&p`1h&9`f}-!xoS&})%KMkWbKtMQ=fHdJ34&8#8`R); zz%POS0Y!f810KHxUgY^VU;}*MgI>=vc!lS0fD*SiLGk;(dwqP5fq%Rs2nOIm-e3A~ z5G;b%L9zQM;6vcA!Dqp@Kn3poh_~+yC~^KKDD&I`<@>$&dApB*Pw||9;@6Krk^cuM zaejoLd>T9pHoyqn558Kxf4zEs3w(n2cS9EO`zR=JPC;3RS1Y^)p5ggTa0yf_qUi5{ zqW^2)aqws0Joq+<{_Zm8(4&+wP| zq>2iKTZOeM)>%(tI0x{wZZ9EED- zTzl#4QhP~3=WMH0t;^I`giE7}t-h%wR>ls_wm_9BykZGW7;iO$x;&{9VX+Wpb7IS*ZG%9YmpI7;ne<>ztp|&vKJTAu$p@c8prL zWy-kAeUsHwONHX7RT=_xuPM9Ee^c~o298*}hquN%wTruJCb5O77Q~UxB&?IpA`-An z^?(TLP7DQax6nJnT!~JFa5AL`;%91kEZvn^}Y}E*{OG?WmaaaU~~D zbljtU6&s0?@+Ji;GhN$Dqn987loaOXj>~>%jp@@|kd-}_nZbfOuy%e~9X&q3aBzCq z1`}0b7wwslCoiVuNOhkal9gSXWo5tc^?+KpWy@?>ucn8JFRT&^By7P~iigZa4i>OF z7v{*b^QI~_?~az1+Ml}^!)Wb_7qL$&VoP`-x6~?O`7TAREr$KSqrDf`qohn!S|%Nn zxvY?_#wCtyfjM(gyUg{jVP_<*-u4Wh0n-cK&!T~bTW)Lf^Lg#IBXpc}n|&GC3CDFT z+u9bUMR@_4#jsgJLlc`FLq}QU##TdjmWyGGB}y-rgk(Az(oXmw);0yPV>h2gn4W|k z+oU=DhMzj8n$mGJWSi0j8wcINh}$^5&Mq{ZM(XI!?b&Hzdllwt`T<{Uwvfvyd2a7P zEw9}kRctVxE!!8zrdo}S7K+nK=$cOUh+5BVGIY-Ct(AJ&?w(Jt zrFN6jP#xf~yv;!O|f)EIh!X1dEA^Y}2Z%Gc2<7NjnSLEX6@2LZ++IvbZ9DI7tH|v;FY~N71mCi;(6pD{zQxsZQ z=$iLtK!B@GUGj$4A&EoI(73M?jc&AkGbLMTxpY`^+h%Z{7;WE#+f#!6o1LXYW}1>$ z>m-$IDR58=Ypq(ZD|aouGocx*kvOtJX=RFttxC!|-S%*_Z*HJ|No|!4#`Tezf-BP1 zJDWP&w{k`@PRCSfGqCDvX?pG(Iil&q2#o8JhKf2Er!zJ&ju|gWC{Uhn-;8N}v6%&- zE%i;TL{+{zgCr@H4imTG$FpV;Q6h+;c^Tsrk0bNOzOZPzlSR&r$^d^TkWOxBV?-ky zIU}7u3b7a}-ArzJm?+*3*WH~ECOn)ydd5g;*XkovMP_6n6VqHvLm+<%cS1eZSB=`z za;k!ayiIf-2?OQ40E6n*50%tL$|gBBdD!?9Dxpa#F&TfA!1<8Z3G7fir|VLbzi|eZmQqwV7PQ+@*i>Pivf@F1MU;Oane z`3eLcY~SFFp@*l6cGP!#f!!t#=kOw}BJJdqS4vt0FX z8?7%$Rh5t!lSH^DjSH$H7v5_ADiJ)Dhl}J69V1Jp7pb=1P89mwHaerk%H*ix^4^!- zFp`Zva=ou_BjOpsf7`1yUIx!UNSI5mPp;`qDIW;hyZY)=dN(wcttv*7jAmU--sM~( zRb(nFYoTI3Ij^KvmPcq`oo5nXTdkaP{9ZCS``FIeXO_C9qeK_3xn=Pcg?)p4TWa2< z?y-E7()K039Bt^Ws#ZzW;3z}Yl6|qPcs{8E`}(CMb7nbKSEWt}%;`MbQSV0cy$dQ_ zdx!J%+d>)_#p*1=tXSoWKZXsf=WUAZJ5b~EnV$-zW{|V&mfN=y*`AZ_8ys?c#>&~I zO9LmrH@t&M&^k(|2esQH$PAG(i9F~2C2>2>6DP3*gOg1Ub zj6-o6lUiwkTvA=C5-yr~BWJdd6&Id#-2rAY8+O|=#(q(zs-uc*&ij4Hv_GJ@aF)4k zNR^g0jGirq(ynQf%#jrsmtj`Nw-)jXg;)nW>CMDE`V{|rOLcOQM5H`QJ0~%d?rH2Q z=N0Pbx*pixe(zH12+RS9=o@LJ%H(=xK1ix#m$XvBD&bephHuXKEvbcf~ la+ct*zO1Pr{Ln~S1jYRchJTp9Te29ua)IEuQqJ-v_#fK^hz|e& literal 0 HcmV?d00001 diff --git a/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/data/locale/es/LC_MESSAGES/Horde_Imap_Client.po b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/data/locale/es/LC_MESSAGES/Horde_Imap_Client.po new file mode 100644 index 00000000..14a8e33e --- /dev/null +++ b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/data/locale/es/LC_MESSAGES/Horde_Imap_Client.po @@ -0,0 +1,276 @@ +# Spanish translations for Horde_Imap_Client package. +# Copyright (C) 2014 Horde LLC (http://www.horde.org/) +# This file is distributed under the same license as the Horde_Imap_Client package. +# Automatically generated, 2014. +# +msgid "" +msgstr "" +"Project-Id-Version: Horde_Imap_Client\n" +"Report-Msgid-Bugs-To: dev@lists.horde.org\n" +"POT-Creation-Date: 2014-06-12 16:24+0200\n" +"PO-Revision-Date: 2014-06-16 09:05+0100\n" +"Last-Translator: Manuel P. Ayala , Juan C. Blanco " +"\n" +"Last-Translator: Automatically generated\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/Imap/Client/Exception/NoSupportPop3.php:34 +#, php-format +msgid "%s not supported on POP3 servers." +msgstr "%s no está soportado en servidores POP3." + +#: lib/Horde/Imap/Client/Socket.php:4742 +msgid "Authentication credentials have expired." +msgstr "Las credenciales de autentificación han caducado." + +#: lib/Horde/Imap/Client/Socket.php:4726 +msgid "Authentication failed." +msgstr "Falló la autentificación." + +#: lib/Horde/Imap/Client/Auth/DigestMD5.php:158 +msgid "Authentication failure." +msgstr "Fallo de autentificación." + +#: lib/Horde/Imap/Client/Socket.php:4734 +msgid "Authentication was successful, but authorization failed." +msgstr "La autentificación fue correcta pero falló la autorización." + +#: lib/Horde/Imap/Client/Interaction/Server/Tagged.php:44 +msgid "Bad tagged response." +msgstr "Respuesta etiquetada incorrecta." + +#: lib/Horde/Imap/Client/Exception/SearchCharset.php:45 +msgid "Cannot convert search query text to new charset" +msgstr "" +"No se puede convertir el texto de búsqueda al nuevo juego de caracteres" + +#: lib/Horde/Imap/Client/Base.php:1873 lib/Horde/Imap/Client/Base.php:1936 +msgid "Cannot expunge read-only mailbox." +msgstr "No se puede borrar un buzón de sólo lectura." + +#: lib/Horde/Imap/Client/Socket.php:4518 +msgid "Charset used in search query is not supported on the mail server." +msgstr "" +"El servidor de correo no admite el juego de caracteres de la consulta de " +"búsqueda." + +#: lib/Horde/Imap/Client/Socket.php:1084 +#, php-format +msgid "Could not open mailbox \"%s\"." +msgstr "No se pudo abrir el buzón \"%s\"." + +#: lib/Horde/Imap/Client/Socket.php:357 lib/Horde/Imap/Client/Socket.php:398 +msgid "Could not open secure TLS connection to the IMAP server." +msgstr "No se puede iniciar una conexión TLS segura al servidor IMAP" + +#: lib/Horde/Imap/Client/Socket/Pop3.php:207 +#: lib/Horde/Imap/Client/Socket/Pop3.php:221 +msgid "Could not open secure connection to the POP3 server." +msgstr "No se puede iniciar una conexión segura al servidor POP3" + +#: lib/Horde/Imap/Client/Socket.php:4626 +msgid "Could not save message data because it is too large." +msgstr "No se pueden guardar los datos del mensaje ya que es demasiado largo." + +#: lib/Horde/Imap/Client/Socket.php:4617 +msgid "Could not save message on server." +msgstr "No se puede guardar el mensaje en el servidor." + +#: lib/Horde/Imap/Client/Socket.php:579 +#: lib/Horde/Imap/Client/Socket/Pop3.php:301 +msgid "Error connecting to mail server." +msgstr "Error conectando al servidor de correo." + +#: lib/Horde/Imap/Client/Utf7imap.php:128 +#: lib/Horde/Imap/Client/Utf7imap.php:156 +#: lib/Horde/Imap/Client/Utf7imap.php:163 +#: lib/Horde/Imap/Client/Utf7imap.php:225 +#: lib/Horde/Imap/Client/Utf7imap.php:245 +#: lib/Horde/Imap/Client/Utf7imap.php:252 +#: lib/Horde/Imap/Client/Utf7imap.php:263 +#: lib/Horde/Imap/Client/Utf7imap.php:272 +msgid "Error converting UTF7-IMAP string." +msgstr "Error convirtiendo cadena UTF7-IMAP." + +#: lib/Horde/Imap/Client/Socket.php:4186 +#: lib/Horde/Imap/Client/Socket/Connection/Pop3.php:77 +#: lib/Horde/Imap/Client/Socket/Connection/Socket.php:189 +#: lib/Horde/Imap/Client/Socket/Pop3.php:1211 +msgid "Error when communicating with the mail server." +msgstr "Error al comunicar con el servidor de correo." + +#: lib/Horde/Imap/Client/Socket.php:4305 +msgid "IMAP Server closed the connection." +msgstr "El servidor IMAP cerró la conexión." + +#: lib/Horde/Imap/Client/Socket.php:4291 +msgid "IMAP error reported by server." +msgstr "Error IMAP indicado por el servidor." + +#: lib/Horde/Imap/Client/Socket.php:3775 +#, php-format +msgid "Invalid METADATA entry: \"%s\"." +msgstr "Entrada de METADATOS inválida: \"%s\"." + +#: lib/Horde/Imap/Client/Socket.php:3863 +#, php-format +msgid "Invalid METADATA value type \"%s\"." +msgstr "Tipo de valor de METADATOS inválido \"%s\"." + +#: lib/Horde/Imap/Client/Socket/Connection/Socket.php:130 +msgid "Mail server closed the connection unexpectedly." +msgstr "El servidor de correo cerró la conexión inesperadamente." + +#: lib/Horde/Imap/Client/Socket.php:547 +msgid "Mail server denied authentication." +msgstr "El servidor denegó la autentificación." + +#: lib/Horde/Imap/Client/Base.php:2188 lib/Horde/Imap/Client/Base.php:2477 +#: lib/Horde/Imap/Client/Base.php:2745 lib/Horde/Imap/Client/Base.php:2830 +msgid "Mailbox does not support mod-sequences." +msgstr "El buzón no admite mod-sequences." + +#: lib/Horde/Imap/Client/Socket.php:369 +#: lib/Horde/Imap/Client/Socket/Pop3.php:189 +msgid "No password provided." +msgstr "No se ha indicado una contraseña." + +#: lib/Horde/Imap/Client/Socket.php:474 +msgid "No supported IMAP authentication method could be found." +msgstr "No se pudo encontrar un método de autentificación IMAP admitido." + +#: lib/Horde/Imap/Client/Socket.php:4750 +msgid "Operation failed due to a lack of a secure connection." +msgstr "La operación falló por la inexistencia de una conexión segura." + +#: lib/Horde/Imap/Client/Socket/Pop3.php:1270 +msgid "POP3 error reported by server." +msgstr "Error POP3 indicado por el servidor." + +#: lib/Horde/Imap/Client/Socket/Pop3.php:273 +msgid "POP3 server denied authentication." +msgstr "El servidor POP3 denegó la autentificación." + +#: lib/Horde/Imap/Client/Socket.php:4718 +msgid "Remote server is temporarily unavailable." +msgstr "El servidor remoto no está disponible temporalmente." + +#: lib/Horde/Imap/Client/Socket/Connection/Pop3.php:69 +msgid "Server closed the connection unexpectedly." +msgstr "El servidor cerró la conexión inesperadamente." + +#: lib/Horde/Imap/Client/Socket.php:386 +msgid "Server does not support TLS connections." +msgstr "El servidor no admite conexiones TLS." + +#: lib/Horde/Imap/Client/Socket/Pop3.php:207 +msgid "Server does not support secure connections." +msgstr "El servidor no admite conexiones seguras." + +#: lib/Horde/Imap/Client/Socket.php:599 +msgid "Server rejected connection." +msgstr "El servidor rechazó la conexión." + +#: lib/Horde/Imap/Client/Socket/Connection/Pop3.php:46 +#: lib/Horde/Imap/Client/Socket/Connection/Socket.php:54 +#: lib/Horde/Imap/Client/Socket/Connection/Socket.php:85 +#: lib/Horde/Imap/Client/Socket/Connection/Socket.php:94 +msgid "Server write error." +msgstr "Error de escritura en el servidor." + +#: lib/Horde/Imap/Client/Socket.php:4671 +msgid "The comparison algorithm was not recognized by the server." +msgstr "El servidor no reconoció el algoritmo de comparación." + +#: lib/Horde/Imap/Client/Socket.php:608 +msgid "The mail server does not support IMAP4rev1 (RFC 3501)." +msgstr "El servidor no admite IMAP4rev1 (RFC 3501)." + +#: lib/Horde/Imap/Client/Socket.php:4799 +msgid "The mail server has denied the request." +msgstr "El servidor de correo ha denegado la petición." + +#: lib/Horde/Imap/Client/Socket.php:4781 +msgid "The mail server is reporting corrupt data in your mailbox." +msgstr "El servidor de correo informa que hay datos corruptos en su buzón." + +#: lib/Horde/Imap/Client/Socket.php:4583 +msgid "The mail server was unable to parse the contents of the mail message." +msgstr "El servidor no pudo procesar los contenidos del mensaje de correo." + +#: lib/Horde/Imap/Client/Socket.php:4534 +#, php-format +msgid "" +"The mail server was unable to parse the contents of the mail message: %s" +msgstr "El servidor no pudo procesar los contenidos del mensaje de correo: %s" + +#: lib/Horde/Imap/Client/Socket.php:4689 +msgid "The metadata item could not be saved because it is too large." +msgstr "El elemento de metadatos no se pudo guardar ya que es demasiado largo." + +#: lib/Horde/Imap/Client/Socket.php:4707 +msgid "" +"The metadata item could not be saved because the maximum number of " +"annotations has been exceeded." +msgstr "" +"El elemento de metadatos no se pudo guardar ya que se ha superado el número " +"máximo de anotaciones." + +#: lib/Horde/Imap/Client/Socket.php:4698 +msgid "" +"The metadata item could not be saved because the server does not support " +"private annotations." +msgstr "" +"El elemento de metadatos no se pudo guardar ya que el servidor no admite " +"anotaciones privadas." + +#: lib/Horde/Imap/Client/Socket.php:4817 +msgid "The object could not be created because it already exists." +msgstr "No se puede crear el objeto porque ya existe." + +#: lib/Horde/Imap/Client/Socket.php:4826 +msgid "The object could not be deleted because it does not exist." +msgstr "No se puede borrar el objeto porque no existe." + +#: lib/Horde/Imap/Client/Socket.php:4808 +msgid "" +"The operation failed because the quota has been exceeded on the mail server." +msgstr "" +"La operación ha fallado porque ha excedido su cuota en el servidor de correo." + +#: lib/Horde/Imap/Client/Exception/NoSupportExtension.php:46 +#, php-format +msgid "The server does not support the %s extension." +msgstr "El servidor no admite la extensión %s." + +#: lib/Horde/Imap/Client/Socket.php:4835 +msgid "The special-use attribute requested for the mailbox is not supported." +msgstr "El atributo de uso-especial solicitado para el buzón no se admite." + +#: lib/Horde/Imap/Client/Socket.php:4767 +msgid "" +"There was a temporary issue when attempting this operation. Please try again " +"later." +msgstr "" +"Se ha producido un error temporal al intentar esta operación. Por favor, " +"vuelva a intentarlo mas adelante." + +#: lib/Horde/Imap/Client/Socket.php:697 +#: lib/Horde/Imap/Client/Socket/Pop3.php:356 +msgid "Unexpected response from server when authenticating." +msgstr "Respuesta inesperada del servidor al autentificar." + +#: lib/Horde/Imap/Client/Socket.php:734 +#: lib/Horde/Imap/Client/Socket/Pop3.php:402 +#, php-format +msgid "Unknown authentication method: %s" +msgstr "Método de autentificación desconocido: %s" + +#: lib/Horde/Imap/Client/Socket.php:4758 +msgid "You do not have adequate permissions to carry out this operation." +msgstr "Carece de los permisos adecuados para ejecutar esta operación." diff --git a/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/data/locale/eu/LC_MESSAGES/Horde_Imap_Client.mo b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/data/locale/eu/LC_MESSAGES/Horde_Imap_Client.mo new file mode 100644 index 0000000000000000000000000000000000000000..80367e62b4275cad709cccbd30244c5a761597ab GIT binary patch literal 2044 zcmbtVOK%)S5FQ}BHi1YS-~y;(6bTg1uxp19jWLR29NChstde!a;}F&ClxLcG^rpMV zk2!Hc`~i^Qj0C@cGZ&;toH=twNc;!B96RPz$4%S@YgB+ z30%VYKj23|dKt37dq8jRXQ0pHArNjm9st3s*sox}?hjb_+%1G1z*M)+X@#g5e-XW5bvPC8LJw^JJ0KGUDWyjs%JZ(5|`^Vrpq??LN}D^E{@z6 zlv8=oK$&2?f^#&CFC~rHz_@N4$Ufsc7#i)V3b)emo*1tX)2245+~2Bra(}&4=)K;Z zt_8kWM(5K2r-{lQW=7=-<6G`JRD z?O*8+`h5t7cVu6Ak2AUDus;X~kn6|GOUH8CY+X1qTwAcBO-x$}ZoyW@#x+czD4Zg7 ze7Yfd6N&w_x6O6dps~Y|a23-=V+$^66Fs8}O}n*9#5k)Q!h?weNh&xI^O$~2y`8O{ zjTtk8sNY-HwF4*N=xBoEoE*9jCnc)3LgSo`6}P%Ox)olZ$@$p##Dp95Sf{u@FkZ4sa2ejxrm`{BlkR9&msaTbarOP0F0InwgO%Rr;ZRGeTzHaLOgGs+Xr$-IfFBNf zs^C^>E+}uDCCSi5X%hvT)00mWZ8R@hwmEJjnaNTuL@r>dZYQ_l2B z{`1_Psz}QTD4SD~79^f(?Sd9fY`6s>H7q*H(5q1KCBnqWR3RAFIXAw@C~FLCXUO~fR_ZKl&a1_mH3=3%yMAp>YO^^-mzCrWA-s9F0OCsoMRMiKgDgm`o@IU9g BYl8p) literal 0 HcmV?d00001 diff --git a/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/data/locale/eu/LC_MESSAGES/Horde_Imap_Client.po b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/data/locale/eu/LC_MESSAGES/Horde_Imap_Client.po new file mode 100644 index 00000000..9f2880e3 --- /dev/null +++ b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/data/locale/eu/LC_MESSAGES/Horde_Imap_Client.po @@ -0,0 +1,198 @@ +# Basque translations for Horde_Imap_Client package. +# Copyright 2012-2017 Horde LLC (http://www.horde.org/) +# This file is distributed under the same license as the Horde_Imap_Client package. +# Automatically generated, 2012. +# +msgid "" +msgstr "" +"Project-Id-Version: Horde_Imap_Client\n" +"Report-Msgid-Bugs-To: dev@lists.horde.org\n" +"POT-Creation-Date: 2012-11-06 16:40+0100\n" +"PO-Revision-Date: 2013-01-16 10:32+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/Imap/Client/Exception/NoSupportPop3.php:25 +#, fuzzy, php-format +msgid "%s not supported on POP3 servers." +msgstr "ACL ez dago konfiguratuta zerbitzari honetarako." + +#: lib/Horde/Imap/Client/Socket.php:4364 +msgid "Authentication failed." +msgstr "Autentifikazioak huts egin du." + +#: lib/Horde/Imap/Client/Auth/DigestMD5.php:149 +msgid "Authentication failure." +msgstr "Huts egitea autentifikazioan." + +#: lib/Horde/Imap/Client/Socket.php:931 +#, php-format +msgid "Could not open mailbox \"%s\"." +msgstr "Ezin izan da ireki \"%s\" postontzia." + +#: lib/Horde/Imap/Client/Socket.php:335 +#, fuzzy +msgid "Could not open secure TLS connection to the IMAP server." +msgstr "Ezin izan da PGP gako-zerbitzari publikora konektatu" + +#: lib/Horde/Imap/Client/Socket/Pop3.php:189 +#: lib/Horde/Imap/Client/Socket/Pop3.php:201 +#, fuzzy +msgid "Could not open secure connection to the POP3 server." +msgstr "Ezin izan da PGP gako-zerbitzari publikora konektatu" + +#: lib/Horde/Imap/Client/Socket.php:4265 +msgid "Could not save message data because it is too large." +msgstr "Ezin izan dira gorde mezuaren datuak, handiegia delako." + +#: lib/Horde/Imap/Client/Socket.php:4256 +#, fuzzy +msgid "Could not save message on server." +msgstr "Ezin izan da mezu-daturik eskuratu posta-zerbitzaritik." + +#: lib/Horde/Imap/Client/Socket/Pop3.php:280 +msgid "Error connecting to POP3 server." +msgstr "Errorea POP3 zerbitzariarekin konektatzean." + +#: lib/Horde/Imap/Client/Socket.php:504 +msgid "Error connecting to mail server." +msgstr "Errorea posta-zerbitzariarekin konektatzean." + +#: lib/Horde/Imap/Client/Socket.php:3683 lib/Horde/Imap/Client/Socket.php:3964 +msgid "Error when communicating with the mail server." +msgstr "Errorea posta-zerbitzariarekin komunikatzean." + +#: lib/Horde/Imap/Client/Socket.php:3823 lib/Horde/Imap/Client/Socket.php:3854 +msgid "IMAP error reported by server." +msgstr "Zerbitzariak IMAP errorea eman du." + +#: lib/Horde/Imap/Client/Socket.php:3389 +#, fuzzy, php-format +msgid "Invalid METADATA entry: \"%s\"." +msgstr "Sarrera ez da baliozkoa" + +#: lib/Horde/Imap/Client/Socket.php:395 +#, fuzzy +msgid "Mail server denied authentication." +msgstr "Erabiltzailea ez dago autentifikatuta." + +#: lib/Horde/Imap/Client/Socket.php:1812 lib/Horde/Imap/Client/Socket.php:2483 +#: lib/Horde/Imap/Client/Socket.php:2504 lib/Horde/Imap/Client/Socket.php:2933 +#: lib/Horde/Imap/Client/Socket.php:2988 +#, fuzzy +msgid "Mailbox does not support mod-sequences." +msgstr "Ez dago %s postontzirik." + +#: lib/Horde/Imap/Client/Socket/Pop3.php:1156 +msgid "POP3 error reported by server." +msgstr "Zerbitzariak POP3 errorea eman du." + +#: lib/Horde/Imap/Client/Socket/Pop3.php:240 +#, fuzzy +msgid "POP3 server denied authentication." +msgstr "Erabiltzailea ez dago autentifikatuta." + +#: lib/Horde/Imap/Client/Socket.php:4356 +#, fuzzy +msgid "Remote server is temporarily unavailable." +msgstr "Urruneko zerbitzaria erorita dago. Saiatu berriro geroago." + +#: lib/Horde/Imap/Client/Socket.php:323 +#, fuzzy +msgid "Server does not support TLS connections." +msgstr "Zerbitzariak ez du onartzen ACLrik." + +#: lib/Horde/Imap/Client/Socket/Pop3.php:189 +#, fuzzy +msgid "Server does not support secure connections." +msgstr "Zerbitzariak ez du onartzen ACLrik." + +#: lib/Horde/Imap/Client/Socket.php:536 +#, fuzzy +msgid "The mail server does not support IMAP4rev1 (RFC 3501)." +msgstr "Zerbitzariak ez du onartzen ACLrik." + +#: lib/Horde/Imap/Client/Socket.php:4435 +#, fuzzy +msgid "The mail server has denied the request." +msgstr "" +"Posta-zerbitzariak eskaera ukatu du. Errorearen xehetasunak erregistratu " +"dira administratzailearentzat." + +#: lib/Horde/Imap/Client/Socket.php:4419 +#, fuzzy +msgid "The mail server is reporting corrupt data in your mailbox." +msgstr "" +"Zure postontzian hondatutako datuak daudela jakinarazi du posta-" +"zerbitzariak. Errorearen xehetasunak erregistratu dira " +"administratzailearentzat." + +#: lib/Horde/Imap/Client/Socket.php:4177 lib/Horde/Imap/Client/Socket.php:4222 +#, fuzzy +msgid "The mail server was unable to parse the contents of the mail message." +msgstr "Zerbitzariak ezin izan du mezu-zerrenda sortu." + +#: lib/Horde/Imap/Client/Socket.php:4327 +#, fuzzy +msgid "The metadata item could not be saved because it is too large." +msgstr "Mezu-zati hau ezin da bistaratu, handiegia delako." + +#: lib/Horde/Imap/Client/Socket.php:4336 +#, fuzzy +msgid "" +"The metadata item could not be saved because the server does not support " +"private annotations." +msgstr "Ezin izan da objektua ezabatu, lehendik ez dagoelako." + +#: lib/Horde/Imap/Client/Socket.php:4453 +msgid "The object could not be created because it already exists." +msgstr "Ezin izan da objektua sortu, lehendik badagoelako." + +#: lib/Horde/Imap/Client/Socket.php:4462 +msgid "The object could not be deleted because it does not exist." +msgstr "Ezin izan da objektua ezabatu, lehendik ez dagoelako." + +#: lib/Horde/Imap/Client/Socket.php:4444 +#, fuzzy +msgid "" +"The operation failed because the quota has been exceeded on the mail server." +msgstr "Huts egin du eragiketak, posta-zerbitzariko kuota gainditu duzulako." + +#: lib/Horde/Imap/Client/Exception/NoSupportExtension.php:36 +#, fuzzy, php-format +msgid "The server does not support the %s extension." +msgstr "Arakatzaileak ez du eginbide hori onartzen." + +#: lib/Horde/Imap/Client/Socket.php:4471 +#, fuzzy +msgid "The special-use attribute requested for the mailbox is not supported." +msgstr "Fitxategi-formatu hau ez da onartzen." + +#: lib/Horde/Imap/Client/Socket.php:4405 +msgid "" +"There was a temporary issue when attempting this operation. Please try again " +"later." +msgstr "" +"Uneko arazoren bat gertatu da eragiketa hau egitean. Saiatu berriro geroago." + +#: lib/Horde/Imap/Client/Socket.php:604 +#: lib/Horde/Imap/Client/Socket/Pop3.php:334 +#, fuzzy +msgid "Unexpected response from server when authenticating." +msgstr "Ustekabeko erantzuna urruneko zerbitzaritik." + +#: lib/Horde/Imap/Client/Socket.php:648 +#: lib/Horde/Imap/Client/Socket/Pop3.php:374 +#, php-format +msgid "Unknown authentication method: %s" +msgstr "Autentifikazio metodo ezezaguna: %s" + +#: lib/Horde/Imap/Client/Socket.php:4396 +msgid "You do not have adequate permissions to carry out this operation." +msgstr "Ez daukazu eragiketa hau egiteko behar den baimenik." diff --git a/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/data/locale/fi/LC_MESSAGES/Horde_Imap_Client.mo b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/data/locale/fi/LC_MESSAGES/Horde_Imap_Client.mo new file mode 100644 index 0000000000000000000000000000000000000000..543966c87cd981587a935d4b2cd34f9ba2d65c91 GIT binary patch literal 6574 zcmb7|TZ~&r8OKjAT)MRM2IW#H(?B61vAerXo773FZZ{j6Dod7RTPPP*v-Ye#>vPVy z=i<#N5>gQlAXOD0@raP<(iafC1tj1Bxl%#mu@6Y7MF=5P;sJ>l-VncU&hgsE-mSor z^I!XXGxL4_`F|JZt-EgiLBQ)_-XG)r+6_VQIWWA5e|UZS<{-Eq{0?{&{3&=3_y+hP z@E_o5@TPYK!3V&z;Dg{7Kw0-9xB|Wc%Km=`#s0>32f<13Ooanb?0*6(@bwDc29NOh zmiGif6FdRR=dXbGf!_c>4*n37^}hz?{5L_dyY0O}@ELFsJOzFUd<6V1D0Z)dvd_Ok zvA^e*AUFm-3LXX9;BoLJ@Lup&;N9RGU<-U3l>I)rP@eN;P`>{rxCZ_fJO|$Nz97)x z3ivhf6;SMMxV6Ny;3Yoqf(`IBP}ctoyb7Mat>o(^P~!X@xB~tS{N4>g@WA`=fzQ9Z zJqSJx{uva1Z@i=Q_df6}pO-<2*MX0MFN05kzXyenyYDR5uYzazyaP&nuY%{nH$ma^ z$X##>K2_n@!6iQb3|t1^0_9%rge<`a!B2qe;HSU{JO+Lr6yARW%K3i*8{qATX%##N zo&aA2WuKpeV*f`_&iN-O`yTlq9Dq-N5_b>$DEKW<&iN5|68r-wI{XhPao>xWCC+W| zG4RLWSHZu6UGOnPE^)mIihlkCUI6d-aCz<*LHT|cly$$TKHvJ0($Djt*mps$$!nM` z0!c543v=%`;PVQ(dmfNY@DT6M@@A=jNgVP*I{pP!K6X;dzo5dukb=J(t|}l6JRhPB z#hYvKFXR!Bx}Fo!12PJbve*2LAoO^?0e>HY!uvt5<9vyHJWrxMxfi)(;a^@4^G3#A zx1^cZ58z*N7yk7?s$!R^G#?CHl9`TjvD&!2@sLVQGBior3|8{2XX4DZb!K_kPE1EW z>M&J3Jv7Q(8(6-ZGu+lTJml*~g-I>n22+ob7s9-dHJd8RZ+yTrawo;=?03Efed z?sjoDG3mg?DZ8!eSmJ2A7_W)P=%n3K&*vs7RA#PaDsw6}yQY_WaIjl_5j+T$*-=cV+WUq9Z#V+OVQF zFI|-wV$=3yI37w^P2F+2YDYO1RC*-b1C`XHOZrdM7xz`vBd(P5W*mh~bf!c^Q^KCVdb!?{i5V`bqgO7hs)rt4Tsk(ttj9qWm$G{zT1m5cJ5s;Q1xdoT zOOkw$mGyzzSGYVG*RT1d5)0JBx=4mtDJF6jDVHJQROBO{eKb|+sdh1$_B9B~qDqv) z3c{3Y9!%1RC!*xyW0{K)x)N}Vp|Jbhti!2T(fD02F0<1mUc{NW|r=Y->~ajJBSABV*(#*7v;UK6K`4du}(HIKoeA>Br2ly{o^z9b2Hn`SaT zMylOxm-V~QB}H(Wwq9m_fn7?u@*RS0`Pz4qtjBsfZ&}!yY9lmSl*vS(yBbx8Fr74m zr}v978Bop>YCCb!IJk1(se&v`>FKy1yInGR>U&5k%WI3+gJ)fi7JQQXIZ1a&J<$Ok zMR*J=(rr~+CwSx-cV-+8HWDWSXP&a z4Xusy$MZ}#x9wxt#@(E`qp@jp)KV909NV;~&f2BZ@vO5G>z3NK3+orx*Cs41H5V6F z%j(kDr17@=jQ8Lm+XS{Qa5{=UnJMnSbB#pJW?K)JsmO8yq`9R2+?qi% zct-XxVQ6DY9JBLiFUtxXN;4)uCM>Il&UQ2#<#DE^0QB=vhC(qn{WP z@pE*2bUmJ|%!=L)!HxDX95|kvEZ@-_A$gYf*_U$@NRbB|ixInq8ZGwuOEXK9EK-84 zu!|2lL#pbJ_6pWy1shL}-Wxm39q7ETIk2{6-|1=?D`T5BOEpT(axKGlqv&O($ne__ z+51-sS8)CgYbWbuXsN9WE?KLYk#h!mqP8Y;k?@j?_JoAKg%(Q>h8h15nh2Q-z{yO9 zu&ANq8E=ALvaw~oGS1U~Nqd^tDj;Ee@nDALV=UkvI&-go3SK7ta^H*q|=?z3H-nm|Z^D6_OzfW6@x*?>bDa!bRuqGQ9UE_4 zIUig6^(Ljb`)(}g+NiD?18b86CP!#_(^nH+YH(^Z3Wy$%k7ytqT`#gCE@X6b)S8&q zFSdD*gv@?9tc(A#K``U0LWHx<4T{ujNUCaT8I?lgOA|LzuSopj z91qtA)u^%(o#5!SFFyYbIrpyA1IzSL3=V zVHWaLnE>_8XXA?Ydw!XTCUuE$-{rRYvI56UtdON-)HF#~#^|LUr0Fb;*e z>*%rX5_hb2oTON!y=v!I_-3dlYb>cC`^gY7wNA!VnagT9JwB+<6h#ZZUZY{Ij2@6Q zlptvJ(J+!$f~cAKsf%#EF@RQO-Fw4 z`cmOr4)IBde(;uvAW}Vx3ExG<=z7mY6fcH}4yms-g1, 2011-2012. +# +msgid "" +msgstr "" +"Project-Id-Version: Horde_Imap_Client \n" +"Report-Msgid-Bugs-To: dev@lists.horde.org\n" +"POT-Creation-Date: 2012-11-06 16:40+0100\n" +"PO-Revision-Date: 2012-11-07 17:24:08+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/Imap/Client/Exception/NoSupportPop3.php:25 +#, php-format +msgid "%s not supported on POP3 servers." +msgstr "%s ei ole tuettu POP3-palvelimille." + +#: lib/Horde/Imap/Client/Socket.php:4380 +msgid "Authentication credentials have expired." +msgstr "Autentikointitiedot ovat vanhentuneet." + +#: lib/Horde/Imap/Client/Socket.php:4364 +msgid "Authentication failed." +msgstr "Autentikointi epäonnistui." + +#: lib/Horde/Imap/Client/Auth/DigestMD5.php:149 +msgid "Authentication failure." +msgstr "Autentikointivirhe." + +#: lib/Horde/Imap/Client/Socket.php:4372 +msgid "Authentication was successful, but authorization failed." +msgstr "Autentikointi epäonnistui, mutta autorisointi epäonnistui." + +#: lib/Horde/Imap/Client/Interaction/Server/Tagged.php:34 +msgid "Bad tagged response." +msgstr "Virheellinen tagätty vastaus." + +#: lib/Horde/Imap/Client/Exception/SearchCharset.php:36 +msgid "Cannot convert search query text to new charset" +msgstr "Ei voida muuntaa hakulauseen tekstiä uuteen merkistöön" + +#: lib/Horde/Imap/Client/Base.php:1899 lib/Horde/Imap/Client/Base.php:1958 +msgid "Cannot expunge read-only mailbox." +msgstr "" +"Ei voida tyhjentää poistetuja vain lukuun tarkoitetusta postilaatikosta." + +#: lib/Horde/Imap/Client/Socket.php:4165 +msgid "Charset used in search query is not supported on the mail server." +msgstr "Palvelin ei tue haussa käytettyä merkistöä." + +#: lib/Horde/Imap/Client/Socket.php:931 +#, php-format +msgid "Could not open mailbox \"%s\"." +msgstr "Ei voitu aukaista postilaatikkoa \"%s\"." + +#: lib/Horde/Imap/Client/Socket.php:335 +msgid "Could not open secure TLS connection to the IMAP server." +msgstr "Ei voitu aukaista salattua TLS-yhteyttä IMAP-palvelimelle." + +#: lib/Horde/Imap/Client/Socket/Pop3.php:189 +#: lib/Horde/Imap/Client/Socket/Pop3.php:201 +msgid "Could not open secure connection to the POP3 server." +msgstr "Ei voitu aukaista salattua yhteyttä POP3-palvelimelle" + +#: lib/Horde/Imap/Client/Socket.php:4265 +msgid "Could not save message data because it is too large." +msgstr "Liian suuren tietomäärän takia viestin tietoja ei voitu talentaa." + +#: lib/Horde/Imap/Client/Socket.php:4256 +msgid "Could not save message on server." +msgstr "Viestiä ei voi tallentaa palvelimelle." + +#: lib/Horde/Imap/Client/Socket/Pop3.php:280 +msgid "Error connecting to POP3 server." +msgstr "Virhetilanne yhdistettäessä POP3-palvelimelle." + +#: lib/Horde/Imap/Client/Socket.php:504 +msgid "Error connecting to mail server." +msgstr "Virhetilanne yhdistettäessä postipalvelimelle." + +#: lib/Horde/Imap/Client/Utf7imap.php:117 +#: lib/Horde/Imap/Client/Utf7imap.php:142 +#: lib/Horde/Imap/Client/Utf7imap.php:146 +#: lib/Horde/Imap/Client/Utf7imap.php:205 +#: lib/Horde/Imap/Client/Utf7imap.php:222 +#: lib/Horde/Imap/Client/Utf7imap.php:226 +#: lib/Horde/Imap/Client/Utf7imap.php:234 +#: lib/Horde/Imap/Client/Utf7imap.php:240 +msgid "Error converting UTF7-IMAP string." +msgstr "Virhetilanne muunnettaessa UTF7-IMAP merkkijonoa." + +#: lib/Horde/Imap/Client/Socket.php:3683 lib/Horde/Imap/Client/Socket.php:3964 +msgid "Error when communicating with the mail server." +msgstr "Virhetilanne liikennöinnissä postipalvelimelle. " + +#: lib/Horde/Imap/Client/Socket.php:3838 +msgid "IMAP Server closed the connection." +msgstr "IMAP-palvelin sulki yhteyden." + +#: lib/Horde/Imap/Client/Socket.php:3823 lib/Horde/Imap/Client/Socket.php:3854 +msgid "IMAP error reported by server." +msgstr "IMAP-palvelimen antama virhe." + +#: lib/Horde/Imap/Client/Socket.php:3389 +#, php-format +msgid "Invalid METADATA entry: \"%s\"." +msgstr "Epäkelpo METADATA tieto: \"%s\"." + +#: lib/Horde/Imap/Client/Socket.php:3476 +#, php-format +msgid "Invalid METADATA value type \"%s\"." +msgstr "Epäkelpo METADATA arvotyyppi: \"%s\"." + +#: lib/Horde/Imap/Client/Socket.php:3890 +msgid "Mail server closed the connection unexpectedly." +msgstr "Postipalvelin sulki yhteyden odottamatta." + +#: lib/Horde/Imap/Client/Socket.php:395 +msgid "Mail server denied authentication." +msgstr "Postipalvelin esti autentikoinnin." + +#: lib/Horde/Imap/Client/Socket.php:1812 lib/Horde/Imap/Client/Socket.php:2483 +#: lib/Horde/Imap/Client/Socket.php:2504 lib/Horde/Imap/Client/Socket.php:2933 +#: lib/Horde/Imap/Client/Socket.php:2988 +msgid "Mailbox does not support mod-sequences." +msgstr "Postilaatikko ei tue mod-sequences -piirrettä." + +#: lib/Horde/Imap/Client/Socket.php:378 +msgid "No supported IMAP authentication method could be found." +msgstr "Tuettua IMAP-autentikointitapaa ei löytynyt." + +#: lib/Horde/Imap/Client/Socket.php:4388 +msgid "Operation failed due to a lack of a secure connection." +msgstr "Toiminto epäonnistui salatut yhteydet eivät ole käytettävissä." + +#: lib/Horde/Imap/Client/Socket/Pop3.php:1096 +msgid "POP3 Server closed the connection unexpectedly." +msgstr "POP3-palvelin katkaisi yhteyden yllättäen." + +#: lib/Horde/Imap/Client/Socket/Pop3.php:1156 +msgid "POP3 error reported by server." +msgstr "POP3-palvelimen antama virhe." + +#: lib/Horde/Imap/Client/Socket/Pop3.php:240 +msgid "POP3 server denied authentication." +msgstr "POP3-palvelin esti autentikoinnin." + +#: lib/Horde/Imap/Client/Socket.php:4356 +msgid "Remote server is temporarily unavailable." +msgstr "Etäpalvelin on väliakaisesti saavuttamattomissa." + +#: lib/Horde/Imap/Client/Socket.php:323 +msgid "Server does not support TLS connections." +msgstr "Palvelin ei tue TLS-yhteyksiä." + +#: lib/Horde/Imap/Client/Socket/Pop3.php:189 +msgid "Server does not support secure connections." +msgstr "Palvelin ei tue salattuja yhteyksiä." + +#: lib/Horde/Imap/Client/Socket.php:527 +msgid "Server rejected connection." +msgstr "Palvelin hylkäsi yhteyden." + +#: lib/Horde/Imap/Client/Socket.php:3748 +msgid "Server write error." +msgstr "Palvelimen kirjoitusvirhe." + +#: lib/Horde/Imap/Client/Socket.php:4309 +msgid "The comparison algorithm was not recognized by the server." +msgstr "Palvelin ei tunnista vertailualgoritmiä." + +#: lib/Horde/Imap/Client/Socket.php:536 +msgid "The mail server does not support IMAP4rev1 (RFC 3501)." +msgstr "Postipalvelin ei tue toimintoa IMAP4rev1 (RFC 3501)." + +#: lib/Horde/Imap/Client/Socket.php:4435 +msgid "The mail server has denied the request." +msgstr "Postipalvelin esti pyynnön." + +#: lib/Horde/Imap/Client/Socket.php:4419 +msgid "The mail server is reporting corrupt data in your mailbox." +msgstr "" +"Postipalvelin raportoi, että postilaatikossa on korruptoituneita tietoja." + +#: lib/Horde/Imap/Client/Socket.php:4177 lib/Horde/Imap/Client/Socket.php:4222 +msgid "The mail server was unable to parse the contents of the mail message." +msgstr "Postipalvelin ei pystynyt käsittelemään viestin tietoja." + +#: lib/Horde/Imap/Client/Socket.php:4327 +msgid "The metadata item could not be saved because it is too large." +msgstr "Metadata tietoja ei voitu tallentaa, koska se oli liian suuri." + +#: lib/Horde/Imap/Client/Socket.php:4345 +msgid "" +"The metadata item could not be saved because the maximum number of " +"annotations has been exceeded." +msgstr "" +"Metadata tietoa ei voi tallentaa, koska lisätietojen suurin sallittu määrä " +"on ylittynyt." + +#: lib/Horde/Imap/Client/Socket.php:4336 +msgid "" +"The metadata item could not be saved because the server does not support " +"private annotations." +msgstr "" +"Metadata tietoja ei voitu tallentaa, koska palvelin ei tue yksilökohtaisten " +"lisätietojen tallennusta." + +#: lib/Horde/Imap/Client/Socket.php:4453 +msgid "The object could not be created because it already exists." +msgstr "Objektia ei voitu luoda, koska se on jo olemassa." + +#: lib/Horde/Imap/Client/Socket.php:4462 +msgid "The object could not be deleted because it does not exist." +msgstr "Objektia ei voitu poistaa, koska sitä ei ole olemassa." + +#: lib/Horde/Imap/Client/Socket.php:4444 +msgid "" +"The operation failed because the quota has been exceeded on the mail server." +msgstr "Operaatio epäonnistui, koska kiintiö on ylittynyt postipalvelimella." + +#: lib/Horde/Imap/Client/Exception/NoSupportExtension.php:36 +#, php-format +msgid "The server does not support the %s extension." +msgstr "Palvelin ei tue laajennusta %s." + +#: lib/Horde/Imap/Client/Socket.php:4471 +msgid "The special-use attribute requested for the mailbox is not supported." +msgstr "Postilaatikon erikoiskäyttö atribuutti ei ole tuettu." + +#: lib/Horde/Imap/Client/Socket.php:4405 +msgid "" +"There was a temporary issue when attempting this operation. Please try again " +"later." +msgstr "" +"Väliaikainen ongelmatilanne yritettäessä tätä operaatiota. Yritä myöhemmin " +"uudestaan." + +#: lib/Horde/Imap/Client/Socket.php:604 +#: lib/Horde/Imap/Client/Socket/Pop3.php:334 +msgid "Unexpected response from server when authenticating." +msgstr "Odottamaton vastaus palvelimelta autentikoinnin aikana." + +#: lib/Horde/Imap/Client/Socket.php:648 +#: lib/Horde/Imap/Client/Socket/Pop3.php:374 +#, php-format +msgid "Unknown authentication method: %s" +msgstr "Tuntematon autentikointimetori: %s" + +#: lib/Horde/Imap/Client/Socket.php:4396 +msgid "You do not have adequate permissions to carry out this operation." +msgstr "Sinulla ei ole riittäviä oikeuksia tämän toiminnon suorittamiseen." diff --git a/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/data/locale/fr/LC_MESSAGES/Horde_Imap_Client.mo b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/data/locale/fr/LC_MESSAGES/Horde_Imap_Client.mo new file mode 100644 index 0000000000000000000000000000000000000000..b5db9930758843fa53f544412ce9933cdba185a5 GIT binary patch literal 7074 zcmb`LTZ|-C8OIA)1jh>qg38Uq>NvYXH`9A#>17GCH+GWQW!Rma$b;aSs?$BSR9E$$ zs_NZYdGN{TgZhLCB*fJiWi;xOz7P|#ZNiHWCSu}~Jot(UG2xNK-*>92uhZxfE2;i> zRiDdu`G1$w|F~<{D<0P&?gzO4e3R!bgD>C02iLV-p7${LQ*aO12k!;n1HS;?a;xVZ z2JZ(y53YfafgvdKUImxHH$hqdLr})w_X*EC0G==Ld!UT}BdEZ4OZ0B@yxlxM4A#LD z<#P%?#Pg5A2f^QiGXJlj?Ee8M^X6~&yan(y_&C@FMb|e#8TT$I>)i3lVtgIk%ky*K z9`M`XBjC@$`@z3}cZ2VNP0*Vw);j{qJ{FYsuYo7Qzk#R0`#_EkV2$@@@ASMcf-i$# z0$%~eU%vwnf^UO&fgge*-<_W;-aik1i{~GKvd;UU*zF+(3$B9=@Q0wt@fIk0e*i9m z4`Lj7J`0MSd*Ii=-+*Gjcffh@eekQ`y^!Vvcm$OFz5~j-zXhKH{|O!eci&Us3!tp? z8Yuqx1Gpc27ZiTn4LL>5W1#r|YKgCdOFX{?%DOjW4DtUGcn-V-u7ZC8p9Al~crvaH zz5xCLY=gIAOwqpsikv?Ip8?+ig(nZ(SLkyZ40!$lcnthEDEl2m_$NUF;x6yY+?dY$ zI=5U03vj*?|5X=m^>Br=?W5pB+@iN!Vn@s*RP?^W4RxF?M845W@gO$Y%Plq}#GK54 zla0_ET*57hE4g-Yi*Mz+og3?OXH_!r+F;)edt ze}E^c20D09(c8yeUAM`X`BcS8rqaCIO>AZYmBecG+133jHMVDLTKAUnY}3S9=<6)x zN8g%29(9zeP2DrfT8)kB|OVhDJl1G6vZ_+h!wX)hhpYERe zF*QC`QEMybMTgk<&e#Yot1h2eTAj6OIdOW@h!;n9OT}j$tgKNx(3w^n#@8sR!c3u7 zmLw|Dwk_FhSEmj`ecc%ej;pr8`Z6PaMSUdH2tx!0#yr?$0 z3<=q()5&8;MTTAuvrT88u@&9i^NzjBj}q~o*l=i|y61)%C%ZKz?>DvvGA+kF9fg59 zb8>Cz#M0W5g70>#Svqd&R|e-sWm{cSjyN+^aAyfr9z#5QY=UU3?v0Kown8Kp<`09e z7y>I*keD&%sZJ8qQUlLpBB$=1O-4f5sX4w9o+qRNtRd9gFsha0F|qq>*Vxf0Q-P?I zC=D0E$#;FP|@vDRF4-Wy|8xz1%9BA`>U?yWiIb-Kux5;r<(lh3lvj*@gI z3CkKkX~*GJd=3MJsHvlFF?EF4)2$Gr7dN3D_lvl z>2ZX95epK8eqwFj&5Ha$?%PUoTjj6msiF&}$Lc~EbS0U{UW8l*iBqAEJUea5)bsyY zrK#pqXJcrsT{6S=os!*RUKlR9OQ=30$*qZC|Lg2Riz{I#@2EKMY#8f8LrRZ}9w~__ zdy%Tl72i-PiLD#np+fgUlk> zPE!LDnTe@`C~|YlsgpUQvawj{QjSTcts(72VZ@OdAacyoSq9UiP{B={(ti|NrzB50 zkeZY&olz&~76#l#=@wO~+D6jmWVv>$P;P~}n*N|jAzO?~$$PHUuq>}#Ny;{vPYEwF zWL>RBMhnGhEp%HG9ubzdb??F;s}o8^W1?C%=~T)U>yBi0scskIm*V6ysbSi;exY#YU}hKrKGeY&`MEVqI^968w$b$?Y(cuIx9n4MD>`oHv^TXi zqdQG?%2FIR)stc4a6GBWaBve>&7E03b8={+MtyPac#*?uYn1n<>m(oRM)>?l)kz+u zVW}M+juRbP#@0^8eiD#No9ggJn9Z$5xrMN&65C0eD(i&jG%Y#hm`Gt{*`_ZOY0QyQ!6r!I+CIc*Im6yG?b4M(Xhy_I-ZMH^ z7YzZxXl=Eh_1_@2>fY!=3#Qf5J|v;7QX7esUsr0#!V$EWzB)Cz^aLwrhs9K$g%BJ= z78{R>5)aHRg*uM&(%6-)MXs`<*^mv!#6o-!(K;&vxdSi8gQ1kd4VhH^Bqs%N+u-OB7H0`^$I$WKx{gG?j~+B4&6u1- z@(yB&vMt^JC0d5D)UKEg-g&%I$%TY)yOj&qU9h?{MitUBn&w5~CoKYqaH{?opgu^_ zku)=L^O9sxFYmdOv$BwM``hK=L#shDQq5rk8jFaI zjwye1mSftvqr;6@ru1TQ2#CF##nKsgw(>qM_h#k&YDBFy==RprpOA z#YgNru;78pbQ=w&F~D^Imb&er6CxbJ#g(HUQKLG8-}~&Mj;j#cXV+OBH%|3KoY{j2g(Nt z15SS2<*U3k$rDLIqZ`VpNZiLh3v!yt_@9r~m^QemXZ}EDjvVgzg3J5c7yH*{&5)dD zLrMIiDYNJTZ@EJmOywv^wUfl+ESv1F1-b zXi_+q8Z{)XNIcmlQp_X8iAB*(Ny6qI3MoS6;fGws-&|y`RBuTd3#6%%<_RMEhI*pt zy$G1PS~qzZMdqq--3@01JuF8MdWO1puI%+j$`F4hO{K{}4WFtO1HR0vCi5HzQ7)vx crXeHd*AsRp7<&liiqu#ix`Qgiic|Og1ME-E2mk;8 literal 0 HcmV?d00001 diff --git a/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/data/locale/fr/LC_MESSAGES/Horde_Imap_Client.po b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/data/locale/fr/LC_MESSAGES/Horde_Imap_Client.po new file mode 100644 index 00000000..63db8e06 --- /dev/null +++ b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/data/locale/fr/LC_MESSAGES/Horde_Imap_Client.po @@ -0,0 +1,272 @@ +# French translations for Horde_Imap_Client package. +# Copyright (C) 2013 Horde LLC (http://www.horde.org/) +# This file is distributed under the same license as the Horde_Imap_Client package. +# +# Paul De Vlieger , 2013 +msgid "" +msgstr "" +"Project-Id-Version: Horde_Imap_Client \n" +"Report-Msgid-Bugs-To: dev@lists.horde.org\n" +"POT-Creation-Date: 2013-01-14 09:19+0100\n" +"PO-Revision-Date: 2013-01-16 16:26+0100\n" +"Last-Translator: Paul De Vlieger \n" +"Language-Team: French \n" +"Language: fr\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/Imap/Client/Exception/NoSupportPop3.php:33 +#, php-format +msgid "%s not supported on POP3 servers." +msgstr "%s n'est pas supporté sur les serveurs POP3." + +#: lib/Horde/Imap/Client/Socket.php:4419 +msgid "Authentication credentials have expired." +msgstr "Votre session a expiré." + +#: lib/Horde/Imap/Client/Socket.php:4403 +msgid "Authentication failed." +msgstr "La connexion a échouée." + +#: lib/Horde/Imap/Client/Auth/DigestMD5.php:157 +msgid "Authentication failure." +msgstr "Échec de la connexion." + +#: lib/Horde/Imap/Client/Socket.php:4411 +msgid "Authentication was successful, but authorization failed." +msgstr "L'authentification a réussi mais pas l'autorisation." + +#: lib/Horde/Imap/Client/Interaction/Server/Tagged.php:42 +msgid "Bad tagged response." +msgstr "Mauvaise réponse." + +#: lib/Horde/Imap/Client/Exception/SearchCharset.php:44 +msgid "Cannot convert search query text to new charset" +msgstr "" +"Impossible de convertir la recherche dans le nouveau jeu de caractères." + +#: lib/Horde/Imap/Client/Base.php:1900 lib/Horde/Imap/Client/Base.php:1959 +msgid "Cannot expunge read-only mailbox." +msgstr "Impossible d'effacer une boite mail en lecture seule." + +#: lib/Horde/Imap/Client/Socket.php:4198 +msgid "Charset used in search query is not supported on the mail server." +msgstr "" +"Le jeu de caractères utilisé dans la recherche n'est pas reconnu sur le " +"serveur de messagerie." + +#: lib/Horde/Imap/Client/Socket.php:950 +#, php-format +msgid "Could not open mailbox \"%s\"." +msgstr "Impossible d'ouvrir la boite mail « %s »." + +#: lib/Horde/Imap/Client/Socket.php:357 +msgid "Could not open secure TLS connection to the IMAP server." +msgstr "Échec de la connexion sécurisée TLS au serveur IMAP." + +#: lib/Horde/Imap/Client/Socket/Pop3.php:200 +#: lib/Horde/Imap/Client/Socket/Pop3.php:212 +msgid "Could not open secure connection to the POP3 server." +msgstr "Échec de la connexion sécurisée TLS au serveur POP3." + +#: lib/Horde/Imap/Client/Socket.php:4304 +msgid "Could not save message data because it is too large." +msgstr "Le message est trop grand pour être sauvegardé." + +#: lib/Horde/Imap/Client/Socket.php:4295 +msgid "Could not save message on server." +msgstr "Impossible de sauvegarder le message sur le serveur." + +#: lib/Horde/Imap/Client/Socket/Pop3.php:291 +msgid "Error connecting to POP3 server." +msgstr "Échec de la connexion au serveur POP3." + +#: lib/Horde/Imap/Client/Socket.php:526 +msgid "Error connecting to mail server." +msgstr "Échec de la connexion au serveur de messagerie." + +#: lib/Horde/Imap/Client/Utf7imap.php:127 +#: lib/Horde/Imap/Client/Utf7imap.php:152 +#: lib/Horde/Imap/Client/Utf7imap.php:156 +#: lib/Horde/Imap/Client/Utf7imap.php:215 +#: lib/Horde/Imap/Client/Utf7imap.php:232 +#: lib/Horde/Imap/Client/Utf7imap.php:236 +#: lib/Horde/Imap/Client/Utf7imap.php:244 +#: lib/Horde/Imap/Client/Utf7imap.php:250 +msgid "Error converting UTF7-IMAP string." +msgstr "Erreur lors de la conversion UTF7-IMAP." + +#: lib/Horde/Imap/Client/Socket.php:3736 lib/Horde/Imap/Client/Socket.php:4012 +msgid "Error when communicating with the mail server." +msgstr "Erreur de communication avec le serveur de messagerie." + +#: lib/Horde/Imap/Client/Socket.php:3891 +msgid "IMAP Server closed the connection." +msgstr "Le serveur IMAP a fermé la connexion." + +#: lib/Horde/Imap/Client/Socket.php:3876 lib/Horde/Imap/Client/Socket.php:3907 +msgid "IMAP error reported by server." +msgstr "Erreur IMAP sur le serveur." + +#: lib/Horde/Imap/Client/Socket.php:3460 +#, php-format +msgid "Invalid METADATA entry: \"%s\"." +msgstr "Entrée METADATA invalide: « %s »" + +#: lib/Horde/Imap/Client/Socket.php:3545 +#, php-format +msgid "Invalid METADATA value type \"%s\"." +msgstr "Valeur METADATA invalide: « %s »" + +#: lib/Horde/Imap/Client/Socket.php:3943 +msgid "Mail server closed the connection unexpectedly." +msgstr "Le serveur de messagerie a fermé la connexion de façon inattendue." + +#: lib/Horde/Imap/Client/Socket.php:417 +msgid "Mail server denied authentication." +msgstr "Le serveur mail a refusé l'authentification." + +#: lib/Horde/Imap/Client/Socket.php:1867 lib/Horde/Imap/Client/Socket.php:2536 +#: lib/Horde/Imap/Client/Socket.php:2557 lib/Horde/Imap/Client/Socket.php:3001 +#: lib/Horde/Imap/Client/Socket.php:3057 +msgid "Mailbox does not support mod-sequences." +msgstr "Les boites mail ne supportent pas les mod-sequences." + +#: lib/Horde/Imap/Client/Socket.php:400 +msgid "No supported IMAP authentication method could be found." +msgstr "Aucune méthode d'authentification IMAP n'a pu être trouvée." + +#: lib/Horde/Imap/Client/Socket.php:4427 +msgid "Operation failed due to a lack of a secure connection." +msgstr "L'opération a échouée : connexion sécurisée manquante." + +#: lib/Horde/Imap/Client/Socket/Pop3.php:1107 +msgid "POP3 Server closed the connection unexpectedly." +msgstr "Le serveur POP3 a fermé la connexion de façon inattendue." + +#: lib/Horde/Imap/Client/Socket/Pop3.php:1175 +msgid "POP3 error reported by server." +msgstr "Erreur POP3 sur le serveur." + +#: lib/Horde/Imap/Client/Socket/Pop3.php:251 +msgid "POP3 server denied authentication." +msgstr "Le serveur a refusé l'authentification." + +#: lib/Horde/Imap/Client/Socket.php:4395 +msgid "Remote server is temporarily unavailable." +msgstr "Le serveur distant est temporairement indisponible." + +#: lib/Horde/Imap/Client/Socket.php:345 +msgid "Server does not support TLS connections." +msgstr "Le serveur ne supporte pas les connexions TLS." + +#: lib/Horde/Imap/Client/Socket/Pop3.php:200 +msgid "Server does not support secure connections." +msgstr "Le serveur ne supporte pas les connexions sécurisées." + +#: lib/Horde/Imap/Client/Socket.php:549 +msgid "Server rejected connection." +msgstr "Le serveur a rejeté la connexion." + +#: lib/Horde/Imap/Client/Socket.php:3801 +msgid "Server write error." +msgstr "Erreur d'écriture sur le serveur." + +#: lib/Horde/Imap/Client/Socket.php:4348 +msgid "The comparison algorithm was not recognized by the server." +msgstr "L'algorithme de comparaison n'a pas été reconnu par le serveur." + +#: lib/Horde/Imap/Client/Socket.php:558 +msgid "The mail server does not support IMAP4rev1 (RFC 3501)." +msgstr "Le serveur de messagerie ne supporte pas IMAP4rev1 (RFC 3501)." + +#: lib/Horde/Imap/Client/Socket.php:4474 +msgid "The mail server has denied the request." +msgstr "Le serveur de messagerie a refusé la requête." + +#: lib/Horde/Imap/Client/Socket.php:4458 +msgid "The mail server is reporting corrupt data in your mailbox." +msgstr "" +"Le serveur de messagerie signale une corruption de données dans votre boite " +"mail." + +#: lib/Horde/Imap/Client/Socket.php:4261 +msgid "The mail server was unable to parse the contents of the mail message." +msgstr "" +"Le serveur de messagerie n'a pas réussi à récupérer le contenu des messages." + +#: lib/Horde/Imap/Client/Socket.php:4214 +#, php-format +msgid "" +"The mail server was unable to parse the contents of the mail message: %s" +msgstr "" +"Le serveur de messagerie n'a pas réussi à récupérer le contenu du message: %s" + +#: lib/Horde/Imap/Client/Socket.php:4366 +msgid "The metadata item could not be saved because it is too large." +msgstr "Les méta-données sont trop grandes pour être sauvegardées." + +#: lib/Horde/Imap/Client/Socket.php:4384 +msgid "" +"The metadata item could not be saved because the maximum number of " +"annotations has been exceeded." +msgstr "" +"La méta-donnée n'a pas pu être enregistrée car le maximum d'annotations a " +"été dépassé." + +#: lib/Horde/Imap/Client/Socket.php:4375 +msgid "" +"The metadata item could not be saved because the server does not support " +"private annotations." +msgstr "" +"La méta-donnée n'a pas pu être enregistrée car le serveur ne supporte pas " +"les annotations privées." + +#: lib/Horde/Imap/Client/Socket.php:4492 +msgid "The object could not be created because it already exists." +msgstr "L'objet ne peut être crée car il existe déjà." + +#: lib/Horde/Imap/Client/Socket.php:4501 +msgid "The object could not be deleted because it does not exist." +msgstr "L'objet ne peut être supprimé car il n'existe pas." + +#: lib/Horde/Imap/Client/Socket.php:4483 +msgid "" +"The operation failed because the quota has been exceeded on the mail server." +msgstr "L'opération a échouée car le quota a été dépassé sur ce serveur." + +#: lib/Horde/Imap/Client/Exception/NoSupportExtension.php:44 +#, php-format +msgid "The server does not support the %s extension." +msgstr "Le serveur ne supporte pas l'extension: %s." + +#: lib/Horde/Imap/Client/Socket.php:4510 +msgid "The special-use attribute requested for the mailbox is not supported." +msgstr "L'attribut spécial demandé pour la boite mail n'est pas supporté." + +#: lib/Horde/Imap/Client/Socket.php:4444 +msgid "" +"There was a temporary issue when attempting this operation. Please try again " +"later." +msgstr "" +"Il y a eu une erreur temporaire en essayant d'effectuer cette action. " +"Veuillez réessayer plus tard." + +#: lib/Horde/Imap/Client/Socket.php:626 +#: lib/Horde/Imap/Client/Socket/Pop3.php:345 +msgid "Unexpected response from server when authenticating." +msgstr "Réponse inattendue du serveur distant lors de l'authentification." + +#: lib/Horde/Imap/Client/Socket.php:670 +#: lib/Horde/Imap/Client/Socket/Pop3.php:385 +#, php-format +msgid "Unknown authentication method: %s" +msgstr "La méthode d'authentification %s est inconnue." + +#: lib/Horde/Imap/Client/Socket.php:4435 +msgid "You do not have adequate permissions to carry out this operation." +msgstr "Vous n'avez pas l'autorisation d'effectuer cette opération." diff --git a/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/data/locale/hu/LC_MESSAGES/Horde_Imap_Client.mo b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/data/locale/hu/LC_MESSAGES/Horde_Imap_Client.mo new file mode 100644 index 0000000000000000000000000000000000000000..7dd734598065d4df192c6252971bfc647314a462 GIT binary patch literal 6742 zcmb`K?T;i?6~>D<(E&tJP*n7SEbPK|Gc&vEYFTQH zR#op#M-z=PkwiW~q9%MWnHWqq1`OGV2_bx-UHu32ixFQEjTrSWFh+mp-s+yN?im8c zN_w8Ds{3-zbDnd~t>52p<@W-vL;OC&?-!Q^!AUT>fW!>@8>djH}~t{r@4V zcozI6DC^vQt;eUqhq-?dtbl(7Wt|(Z3xdbNr$FKBr=a-zXK)4lz=wn2yO*&SxQF}S zT<_oi3;Z1Sw|vCoGI*5xvmmd6AAv!N?;I)Y77`OzU1P7qR z_bpK3@JG;%yV3Kr1j;@J6uX`S<^7xB&EVg_Bj6Q?^&ogZD0XL{=x+;L1b+)20xb@X+x!SkPi74T*@6W&jPt6&#A3cd-7eg6SPzjuBr2ndt= zpDhDPFR_Q^9WOwD$pLbAyv%_I_{qgq?%G=*(s375JC3d@?xE6MNFh-C2x)LNKel!; zka!SAcZmi_UB`{&C2|Uova|Ve5V{?ofb&!ER(`_u=#se0CGn9<^dMXaub=0K>+TYM zk+ahyX%^h!p87wMTkhJEsyNA1n)iB%%}i4zv08m}^?*u^?Hij`gOxmMn>Y&_ItzK( zu%;=uI!aYr_l+{=dm+ze2CnNc+U0R>&CKv~I>m}c!=&kY9_?54JX4yj6B`cv&Z7m7 z>88qbtA(-Fq`f3gS?#!v#g9f3V>SL5Z5wU%Om6I^%FOvpWr>Q-In`)uo0@Di9^>=4 zWmrfzD@hz}sxD^Nlk=?TN2)w!qcAQn8SX$EG`ZOYb*zx&QPa_z^h`WjS>3iLy=~@Y zY8tSj)*gObe27iMk&V%^>Z#K!tGlgQOq`uG5yi>fQi)j?mNjlSb*5F_G&D}CFjKgd zC5ei(Z3(Ai`%9A$ffq+LIALvK#|FnOVOa>A9UxH&8Suo~gG&|fPiA>ATH_oVW1((0 zkDbyOdM?b`&i&GgZtmkwoT?Ee5*(pu+y83dh8Sm>HHEC}n`4_!#eE%xO?CRj+R6hf zYby#l+s#@LmzlQ=&W*}8d!`t1dfUOBEl_!kt_Y!NMw``Oay+RMVzCH&JE!~*M5mgG zDG5t;lV&9~$T%i3s=*`4M5a17%PSFBGNuU|qP)6M>q#DynveF3olGLt6qgdE33a2R zl6C%@5mGg9655@}35BU$96MvWNoES_oxDt!h-e#8mu|db$hsyk`X#;QK_9#;nr%`fbmoz`Zff_7QmicHdMb{t9V(?IgC zkyxAeGN1WWwap~AqslZpReT{z1W43^uapVdi)_o#Zz{@>d*@A2RQ^A!)YP8Tag3t1 zD^qaaErc!fB5tWlqViqJ*P0miUT1qR&WGK+tKz&{H`Zl^G!>UP((F?9qDqT9{^tSq$50YSTn!YU((P z+}vX7bh#LDEG#{fL&+=~a&Yh@PLzMKV>h2=FsBcCvx!qq7JloLy2;t1A`MArv?{!sCAokN6z_mCyKf>wkP6FoSdUHOgx7qU!tA9zmnu=!Bq=) zl+sOdSag6zT`YzbX~?RfEfyu5h^7nyZDHx|`Gxs;23F3Pekfa(#vQ86A5sfTwF8TH&o46WVV!1`HLK$kE)!c* zD{<2joRga7t?q3J=%cYA9>lg=ZRhtfCvN4OPbzChcWWwKI2_LyIvP_`?R@U^snaL6 z30SDk&mH#_skLT_u=A=bC84QM7 z>%$8c3lL;WQ5Fyvns4@XHFzkj54Td)A8tiD9mt04ZBiLLe0@W8wACH*qQip$GbzO# zf9_@i6Lr~OrZ-Z}DI@CZw5_w@MfydrM|OtkVE8g*P0yIzu};OM^bTUy&L+0L*i2+E zx7FyqUz|gY=|l10((`G-JH=(io!*L_B}nlm?b=&o$ks=AH0DXw!$C&!4Yyi|RL&J0 z-D{)?5?0ahLS_vVI=l6tIGy{Q+6KD**QH8YaVxEeE5i$s^U_Hog0Qy9EvX*yja%~qcWK|56PBpqepf~PF4K@zbzuo6s!zHyyG3J z!SGoNY4K(zc{Xv(j||1ce|_yTBpbfm%gJ*;$dOqRlB5K^BGPdl?P}c)(}HvbdczbD#wOaW{}lp&i|7E91oT<<30u^$_CmGRhO_y^d+@PmdJ%rbuYat>5<{g zg%(QI8$Ja~n%~xYd-(Fka4Vh;@XAP6UbW?DphN$0;Il%s`fmQSe?N)B@rqvQlqI3W zkZ{&XUgTYf`8@_=G5I0Jn2$=V03di;uncB{f*%G8c9f0F}2}zU4+{y z(|t>DoQwyLj20iH;<|?A5|8ZCs+XjhUMGb+K8Lrf?|7o4HE%k0{IYU>cm2Ria(1tG zo#GBpE2t{dMfV(+JDE2wantpYgt%ZSp066$W#7+yMA*xQZ**`NF>jdGrgU%9p`q~6 zKyGo6q?>K=uTSasXxlhKrPz`F5X(n_RJhW9#z$Wc_nnMym2x-Q$$QjG`s#%5CB_c@zcbqBrqTSp`6OuKqsxOI5 zx&(l}grV$C43r#qEcOvDam$|NqZ`f*sj@5 Y\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/Imap/Client/Exception/NoSupportPop3.php:33 +msgid "%s not supported on POP3 servers." +msgstr "A %s nem támogatott POP3 szervereken" + +#: lib/Horde/Imap/Client/Socket.php:4622 +msgid "Authentication credentials have expired." +msgstr "Bejelentkezési adatok elavultak." + +#: lib/Horde/Imap/Client/Socket.php:4606 +msgid "Authentication failed." +msgstr "A bejelentkezés nem sikerült." + +#: lib/Horde/Imap/Client/Auth/DigestMD5.php:157 +msgid "Authentication failure." +msgstr "A bejelentkezés nem sikerült." + +#: lib/Horde/Imap/Client/Socket.php:4614 +msgid "Authentication was successful, but authorization failed." +msgstr "A bejelentkezés sikerült, de a hozzáférés meg lett tagadva." + +#: lib/Horde/Imap/Client/Interaction/Server/Tagged.php:42 +msgid "Bad tagged response." +msgstr "Hibás válasz." + +#: lib/Horde/Imap/Client/Exception/SearchCharset.php:44 +msgid "Cannot convert search query text to new charset" +msgstr "A keresés új karakterkészletbe konvertálása nem sikerült" + +#: lib/Horde/Imap/Client/Base.php:2032 lib/Horde/Imap/Client/Base.php:2095 +msgid "Cannot expunge read-only mailbox." +msgstr "A csak olvasható mappa tiszítása nem sikerült." + +#: lib/Horde/Imap/Client/Socket.php:4400 +msgid "Charset used in search query is not supported on the mail server." +msgstr "" +"A keresésben használt karakterkódolás nem használható a levelezőszerveren." + +#: lib/Horde/Imap/Client/Socket.php:1076 +msgid "Could not open mailbox \"%s\"." +msgstr "A \"%s\" mappa nem nyitható meg." + +#: lib/Horde/Imap/Client/Socket.php:393 +msgid "Could not open secure TLS connection to the IMAP server." +msgstr "Nem sikerült biztonságos TLS kapcsolat létrehozása az IMAP szerverhez." + +#: lib/Horde/Imap/Client/Socket/Pop3.php:194 +#: lib/Horde/Imap/Client/Socket/Pop3.php:208 +msgid "Could not open secure connection to the POP3 server." +msgstr "Nem sikerült biztonságos TLS kapcsolat létrehozása a POP3 szerverhez." + +#: lib/Horde/Imap/Client/Socket.php:4506 +msgid "Could not save message data because it is too large." +msgstr "A levél nem jelenlíthető meg, mert túl nagy." + +#: lib/Horde/Imap/Client/Socket.php:4497 +msgid "Could not save message on server." +msgstr "A levél mentése a szerverre nem sikerült." + +#: lib/Horde/Imap/Client/Socket.php:573 +#: lib/Horde/Imap/Client/Socket/Pop3.php:284 +msgid "Error connecting to mail server." +msgstr "Nem sikerült a levelezőszerverhez kapcsolódni." + +#: lib/Horde/Imap/Client/Utf7imap.php:127 +#: lib/Horde/Imap/Client/Utf7imap.php:152 +#: lib/Horde/Imap/Client/Utf7imap.php:156 +#: lib/Horde/Imap/Client/Utf7imap.php:215 +#: lib/Horde/Imap/Client/Utf7imap.php:232 +#: lib/Horde/Imap/Client/Utf7imap.php:236 +#: lib/Horde/Imap/Client/Utf7imap.php:244 +#: lib/Horde/Imap/Client/Utf7imap.php:250 +msgid "Error converting UTF7-IMAP string." +msgstr "Az UTF7-IMAP konvertálás nem sikerült." + +#: lib/Horde/Imap/Client/Socket.php:4075 +#: lib/Horde/Imap/Client/Socket/Connection/Pop3.php:70 +#: lib/Horde/Imap/Client/Socket/Connection/Socket.php:179 +#: lib/Horde/Imap/Client/Socket/Pop3.php:1177 +msgid "Error when communicating with the mail server." +msgstr "Hiba történt a szerverrel való kommunikációban." + +#: lib/Horde/Imap/Client/Socket.php:4187 +msgid "IMAP Server closed the connection." +msgstr "Az IMAP szerver lezárta a kapcsolatot." + +#: lib/Horde/Imap/Client/Socket.php:4173 +msgid "IMAP error reported by server." +msgstr "IMAP hibát jelzett a szerver." + +#: lib/Horde/Imap/Client/Socket.php:3682 +msgid "Invalid METADATA entry: \"%s\"." +msgstr "Érvénytelen METADATA elem: \"%s\"." + +#: lib/Horde/Imap/Client/Socket.php:3769 +msgid "Invalid METADATA value type \"%s\"." +msgstr "Érvénytelen METADATA típus: \"%s\"." + +#: lib/Horde/Imap/Client/Socket/Connection/Socket.php:120 +msgid "Mail server closed the connection unexpectedly." +msgstr "A levelezőszerver váratlanul lezárta a kapcsolatot." + +#: lib/Horde/Imap/Client/Socket.php:541 +msgid "Mail server denied authentication." +msgstr "A levelezőszerver megtagadta a hozzáférést." + +#: lib/Horde/Imap/Client/Base.php:2365 lib/Horde/Imap/Client/Base.php:2685 +#: lib/Horde/Imap/Client/Base.php:2950 lib/Horde/Imap/Client/Base.php:3035 +msgid "Mailbox does not support mod-sequences." +msgstr "A mappa nem támogatja ezt: mod-sequences." + +#: lib/Horde/Imap/Client/Socket.php:469 +msgid "No supported IMAP authentication method could be found." +msgstr "Nem sikerült támogatott IMAP bejelentkezősi módszert találni." + +#: lib/Horde/Imap/Client/Socket.php:4630 +msgid "Operation failed due to a lack of a secure connection." +msgstr "A művelet végrehajtása biztonságos kapcsolat híján nem sikerült." + +#: lib/Horde/Imap/Client/Socket/Pop3.php:1236 +msgid "POP3 error reported by server." +msgstr "A szerver POP3 hibát jelzett" + +#: lib/Horde/Imap/Client/Socket/Pop3.php:253 +msgid "POP3 server denied authentication." +msgstr "A POP3 szerver megtagadta a hozzáférést." + +#: lib/Horde/Imap/Client/Socket.php:4598 +msgid "Remote server is temporarily unavailable." +msgstr "A távoli szerver jelenleg nem elérhető." + +#: lib/Horde/Imap/Client/Socket/Connection/Pop3.php:62 +msgid "Server closed the connection unexpectedly." +msgstr "A szerver váratlanul lezárta a kapcsolatot." + +#: lib/Horde/Imap/Client/Socket.php:381 +msgid "Server does not support TLS connections." +msgstr "A szerver nem támogat TLS kapcsolatot." + +#: lib/Horde/Imap/Client/Socket/Pop3.php:194 +msgid "Server does not support secure connections." +msgstr "A szerver nem támogat biztonságos kapcsolatot." + +#: lib/Horde/Imap/Client/Socket.php:593 +msgid "Server rejected connection." +msgstr "A szerver visszautasította a kapcsolatot." + +#: lib/Horde/Imap/Client/Socket/Connection/Pop3.php:41 +#: lib/Horde/Imap/Client/Socket/Connection/Socket.php:53 +#: lib/Horde/Imap/Client/Socket/Connection/Socket.php:86 +msgid "Server write error." +msgstr "Írási hiba a szerveren." + +#: lib/Horde/Imap/Client/Socket.php:4551 +msgid "The comparison algorithm was not recognized by the server." +msgstr "A szerver nem ismerte fel az összehasonlító algoritmust." + +#: lib/Horde/Imap/Client/Socket.php:602 +msgid "The mail server does not support IMAP4rev1 (RFC 3501)." +msgstr "Az IMAP4rev1 (RFC 3501) nem támogatott a szerveren." + +#: lib/Horde/Imap/Client/Socket.php:4677 +msgid "The mail server has denied the request." +msgstr "A levelezőszerver elutasította a kérést." + +#: lib/Horde/Imap/Client/Socket.php:4661 +msgid "The mail server is reporting corrupt data in your mailbox." +msgstr "A levelező szerver hibás adatot jelen a postafiókban." + +#: lib/Horde/Imap/Client/Socket.php:4463 +msgid "The mail server was unable to parse the contents of the mail message." +msgstr "A levelező szerver nem tudta a levelet beolvasni." + +#: lib/Horde/Imap/Client/Socket.php:4416 +msgid "" +"The mail server was unable to parse the contents of the mail message: %s" +msgstr "A levelező szerver nem tudta a levelet beolvasni: %s" + +#: lib/Horde/Imap/Client/Socket.php:4569 +msgid "The metadata item could not be saved because it is too large." +msgstr "A metaadatok mentése nem sikerült, mert túl nagy méretűek." + +#: lib/Horde/Imap/Client/Socket.php:4587 +msgid "" +"The metadata item could not be saved because the maximum number of " +"annotations has been exceeded." +msgstr "" +"A metaadatok mentése nem sikerült, mert túlléptük a megjegyzések maximális " +"számát." + +#: lib/Horde/Imap/Client/Socket.php:4578 +msgid "" +"The metadata item could not be saved because the server does not support " +"private annotations." +msgstr "" +"A metaadatok mentése nem sikerült, mert a szerver nem támogatja a privát " +"megjegyzéseket." + +#: lib/Horde/Imap/Client/Socket.php:4695 +msgid "The object could not be created because it already exists." +msgstr "Az objektum létrehozása nem sikerült, mert az már létezik." + +#: lib/Horde/Imap/Client/Socket.php:4704 +msgid "The object could not be deleted because it does not exist." +msgstr "Az elem nem létezik, ezért a törlése nem sikerült." + +#: lib/Horde/Imap/Client/Socket.php:4686 +msgid "" +"The operation failed because the quota has been exceeded on the mail server." +msgstr "" +"A művelet végrehajtása nem sikerült, mert túlléptük a rendelkezésre álló " +"kvóta méretet." + +#: lib/Horde/Imap/Client/Exception/NoSupportExtension.php:44 +msgid "The server does not support the %s extension." +msgstr "A szerver nem támogatja a %s kiterjesztést." + +#: lib/Horde/Imap/Client/Socket.php:4713 +msgid "The special-use attribute requested for the mailbox is not supported." +msgstr "Az egyedi paraméter nem támogatott." + +#: lib/Horde/Imap/Client/Socket.php:4647 +msgid "" +"There was a temporary issue when attempting this operation. Please try again " +"later." +msgstr "Hiba történt a művelet végrehajtása során. Kérem próbálja meg később." + +#: lib/Horde/Imap/Client/Socket.php:691 +#: lib/Horde/Imap/Client/Socket/Pop3.php:339 +msgid "Unexpected response from server when authenticating." +msgstr "Váratlan válasz a távoli szervertőt a bejelentkezés során." + +#: lib/Horde/Imap/Client/Socket.php:728 +#: lib/Horde/Imap/Client/Socket/Pop3.php:385 +msgid "Unknown authentication method: %s" +msgstr "Ismeretlen bejelentkezési módszer: %s" + +#: lib/Horde/Imap/Client/Socket.php:4638 +msgid "You do not have adequate permissions to carry out this operation." +msgstr "Ön nem jogosult a művelet végrehajtására." diff --git a/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/data/locale/ja/LC_MESSAGES/Horde_Imap_Client.mo b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/data/locale/ja/LC_MESSAGES/Horde_Imap_Client.mo new file mode 100644 index 0000000000000000000000000000000000000000..d7fab9be19455d5062019f00269a869d8d08c043 GIT binary patch literal 7415 zcmb_g`EMNM86J*OFfFuDdP4b12?fF|wsW!}fD;@@!QdoL4_ZXWyPxezc4wA3oEY_o z%$g*2VkaSobD4yYkT|xoPQ;-kI9RHBsOk@hivHND(s)_XmN`0{;qJ4t(HN zNm77m;LE_@14+*PU-9u3;PbdY0+fN%K$3IUS0!m3@E1Vx*Eo>uodPxiZ@NvAPF;ty zfaKSI-R|4*z}I{`*8snb=Q-e$!2aO*AAu`yKNH~muS?ReaIXRDfgb}`0i`>9y`BNm z{{6tmfS&@%{@dUbTHhRCH}DbMp8+<|I^YAqn?MfolME!ktOqUt9s~Xu_-Ekbz0KrE>@+-wUydDbv zm>(d;dmcWG`1}wbxK3P)@EdfN?#1V3e25R>1$X(^Jd(o5({!t3OxC4zbH+F4R6MI%*rBMI8jo#*S1sS9n9w4X z;-=YQXC7hgw#5`2tsClV{>h=h6-t^}N@pjOHMp76H51ZSDjM05(luxed$?kxy4b5W zH+q=GH(SionZ`GaEYxn-H$$SolG!E>QnhlC>Ktx^ zo5b$Gb&#OjnY3`Pp5t05ncX+fyszp@lc(Sn*7p25vO(i1;cO^PQdhS$wbqgvY^>fC zi(>pVlVX;Imlc?uRxE|J^OOQ3nQAeZW$8N0C`Kpww4{I8CXm1a$FmdfZ99CA@) ze?k&VxKPdD0j=A6N;<99x|NKYW-ZNaO;0zqH8IfH=t%}~srnX+ZO*Ko91m8sLr(3prF<&?h!q+@BFml2C)^|Wkq&{#uaB%~MgSf&ay%OxSO z$e1*|LCkCCtV6doq~?n`Zp4#_rO70nDF}6HBhx$ZR~3;GlAus+N5&Y&Y8bYbXLXAQ zt{3#;SwuuJRHT}%Dc$g;(w+g?t`^b?hXzZloK>DYa96E`Ri;L34ZcAHu8dHDoK1!b zTZBInQkx)MHV0EoWQ3CGM5VI2vWyBDl_GFTIcWEUE| zyMaBpcGXI@U{QU;L)F{5a8TfOl5P-9OsjewlG;xL%Dy2D$6&M~$`pK`4Tw$d1-Ypz5zA|o zuQpQbT6g&mT7jjof{%6sHup=p=M{|EL17JImOWfkyfAk1fK!b0nZs~w*qd7 zCgz{#OV`_pj^$>f17mHO;Yx-YSPxWFO$%fu#pc?Y<{4hGwUk9-Z?LtpT!cO*FTHBR zCDq=b!NGT8to)N6wQQ!vm_E>(xn^Rr@Q*f8H!)kt)Q}VlEdp~uiQ6!`1N|mEhAL)d zBNkH7NQt=$I=^3Sda%w!$rD`$V)0mXBdZJh(VYF_m|(3Lt`NmBG$@@4(jx;;8wqKB zsh}g3{E>ro7eSfQYa2Cv6G}tuIh^E|Xuo&L`s)ZP(lr(afcmR#E z&=_8!hRjlm0gZG_L=_54t%gnnkyoeXpI}lJ= zLt&41iQA_vC6%yDd!ya1B=F~k+!NTTb=nwG_UKa-!~8WD+%Y}I)h<5WXpabiK8XrpfaeYbbQ?cL)# z<3xKmzgIkZQ#|c+orA7(+I3!cosV4SsGHyCZplkCqk}Ue6Vv-g@Vj_uSMlgY>@E%; zpFO)Y<;2VCcj>l}`jy3Uw)>O%1Vgy9F0@cVfDYb+m};|LPlx5wLYylkH{;BIlC zgSUIUrr@cIgT-?vU1!wIPrCW@-sJG~x&4t^#Z$x6@4a0d+U}h@==B|h)y1Ln;*i(< zhi?8ux3|~rg$JN|e{uIwu{lx_PB`Z}liv2r*yf$j!y9hz3E{Odw|AH}=f~arC79s# z@0dM&s$xG`AJ<~)BE%J{4j+$%Mv;QIAR2)yMd^TWdR3sJ%`uI{xX4^*V0LJy>%39s zcIxmkN+7NUOfSVxLQEIjD;zFTPzg**%^O<)ybyh6XXbp!$V+`@zr@FoH> z;pU;zfOpF0%VF2q<>p~T0m@8GzUiGiRH+rbT)97BxF9_wI%8MgiFIQYwuC0sAa&_o zBI1`ro(y=D2T{(FEu|!h!W6|At}4uKIWjeQ!mZvQM(mhUe}+WVs1-`_E)?JRneIY{zb%ryFTQQ+;+Ep!{PYntg0ZP9lc;ux{!H(c7>Q#s zDbcY;WGg}x+bRCjP}*MZaqOzDaIw9WF20sl7Pqlig$z34ud-QKrQvSR0)p%74|D)C$N)p-4kNE@C>j4i!>(c71J z`MO5l&Y3o+o#KW3HKa{U1J}t5x*}Bzk&0z`h37%BpgMhWN7R?7PLIUuO(~ROPKd#I~p8Z zGduixL@gC|e6dqeLx!kT=g-g(L_^eg@!;E3*v=jDhSAy%M{WDcFh;zqCPRJ>aiJhM zD$;lEK`ZWbGKa?9ctglPA;Nt=6SEzP=CqY+0Tw|7_^Yw>iKZs5^ea~@> zm^BW8@uPvbp-bMxZojJpITsb3F|s;t5V~IB_zYQ4BGi~S=y-kGh!&{BG=hJKDZDsx T7GWq3IIe@2f>P-TUugaZ(Rlbc literal 0 HcmV?d00001 diff --git a/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/data/locale/ja/LC_MESSAGES/Horde_Imap_Client.po b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/data/locale/ja/LC_MESSAGES/Horde_Imap_Client.po new file mode 100644 index 00000000..bc98ae29 --- /dev/null +++ b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/data/locale/ja/LC_MESSAGES/Horde_Imap_Client.po @@ -0,0 +1,262 @@ +# Japanese translation for Horde. +# Copyright (C) 2012-2013 Horde LLC (http://www.horde.org/) +# This file is distributed under the same license as the Horde_Imap_Client package. +# Hiromi Kimura +# +msgid "" +msgstr "" +"Project-Id-Version: Horde_Imap_Client\n" +"Report-Msgid-Bugs-To: dev@lists.horde.org\n" +"POT-Creation-Date: 2014-01-28 00:26-0700\n" +"PO-Revision-Date: 2014-02-22 12:49+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.6.3\n" + +#: lib/Horde/Imap/Client/Exception/NoSupportPop3.php:34 +#, php-format +msgid "%s not supported on POP3 servers." +msgstr "POP3サーバは %s をサポートしていません。" + +#: lib/Horde/Imap/Client/Socket.php:4635 +msgid "Authentication credentials have expired." +msgstr "認証用証明書は期限切れです。" + +#: lib/Horde/Imap/Client/Socket.php:4619 +msgid "Authentication failed." +msgstr "認証に失敗しました。" + +#: lib/Horde/Imap/Client/Auth/DigestMD5.php:158 +msgid "Authentication failure." +msgstr "認証できません。" + +#: lib/Horde/Imap/Client/Socket.php:4627 +msgid "Authentication was successful, but authorization failed." +msgstr "認証は成功しましたが、認可に失敗しました。" + +#: lib/Horde/Imap/Client/Interaction/Server/Tagged.php:44 +msgid "Bad tagged response." +msgstr "不正なタグ応答です。" + +#: lib/Horde/Imap/Client/Exception/SearchCharset.php:45 +msgid "Cannot convert search query text to new charset" +msgstr "検索文字列を新しい文字セットに変換できません" + +#: lib/Horde/Imap/Client/Base.php:2032 lib/Horde/Imap/Client/Base.php:2095 +msgid "Cannot expunge read-only mailbox." +msgstr "読み出し専用メールボックスは削除できません。" + +#: lib/Horde/Imap/Client/Socket.php:4413 +msgid "Charset used in search query is not supported on the mail server." +msgstr "検索文字中の文字セットはメールサーバではサポートされていません。" + +#: lib/Horde/Imap/Client/Socket.php:1077 +#, php-format +msgid "Could not open mailbox \"%s\"." +msgstr "メールボックス \"%s\" が開けません。" + +#: lib/Horde/Imap/Client/Socket.php:393 +msgid "Could not open secure TLS connection to the IMAP server." +msgstr "IMAPサーバへのTLS接続はオープンできませんでした。" + +#: lib/Horde/Imap/Client/Socket/Pop3.php:194 +#: lib/Horde/Imap/Client/Socket/Pop3.php:208 +msgid "Could not open secure connection to the POP3 server." +msgstr "POP3サーバへの安全な接続はオープンできませんでした。" + +#: lib/Horde/Imap/Client/Socket.php:4519 +msgid "Could not save message data because it is too large." +msgstr "メッセージが大きすぎるので保存できません。" + +#: lib/Horde/Imap/Client/Socket.php:4510 +msgid "Could not save message on server." +msgstr "メッセージをサーバーに保存できません。" + +#: lib/Horde/Imap/Client/Socket.php:574 +#: lib/Horde/Imap/Client/Socket/Pop3.php:284 +msgid "Error connecting to mail server." +msgstr "メールサーバへの接続に失敗しました。" + +#: lib/Horde/Imap/Client/Utf7imap.php:128 +#: lib/Horde/Imap/Client/Utf7imap.php:156 +#: lib/Horde/Imap/Client/Utf7imap.php:163 +#: lib/Horde/Imap/Client/Utf7imap.php:225 +#: lib/Horde/Imap/Client/Utf7imap.php:245 +#: lib/Horde/Imap/Client/Utf7imap.php:252 +#: lib/Horde/Imap/Client/Utf7imap.php:263 +#: lib/Horde/Imap/Client/Utf7imap.php:272 +msgid "Error converting UTF7-IMAP string." +msgstr "UTF7-IMAP文字列への変換エラーです。" + +#: lib/Horde/Imap/Client/Socket.php:4081 +#: lib/Horde/Imap/Client/Socket/Connection/Pop3.php:71 +#: lib/Horde/Imap/Client/Socket/Connection/Socket.php:180 +#: lib/Horde/Imap/Client/Socket/Pop3.php:1191 +msgid "Error when communicating with the mail server." +msgstr "メールサーバとの通信エラーです。" + +#: lib/Horde/Imap/Client/Socket.php:4200 +msgid "IMAP Server closed the connection." +msgstr "IMAP サーバは接続を閉じました。" + +#: lib/Horde/Imap/Client/Socket.php:4186 +msgid "IMAP error reported by server." +msgstr "サーバはIMAPエラーを報告しました。" + +#: lib/Horde/Imap/Client/Socket.php:3682 +#, php-format +msgid "Invalid METADATA entry: \"%s\"." +msgstr "不正なメタデータ項目:\"%s\"." + +#: lib/Horde/Imap/Client/Socket.php:3768 +#, php-format +msgid "Invalid METADATA value type \"%s\"." +msgstr "不正なメタデータの種類 \"%s\"." + +#: lib/Horde/Imap/Client/Socket/Connection/Socket.php:121 +msgid "Mail server closed the connection unexpectedly." +msgstr "メールサーバとの接続が予期せずに切断されました。" + +#: lib/Horde/Imap/Client/Socket.php:542 +msgid "Mail server denied authentication." +msgstr "メールサーバは認証を拒否しました。" + +#: lib/Horde/Imap/Client/Base.php:2365 lib/Horde/Imap/Client/Base.php:2685 +#: lib/Horde/Imap/Client/Base.php:2950 lib/Horde/Imap/Client/Base.php:3035 +msgid "Mailbox does not support mod-sequences." +msgstr "メールボックスは mod-sequence をサポートしていません。" + +#: lib/Horde/Imap/Client/Socket.php:469 +msgid "No supported IMAP authentication method could be found." +msgstr "サポートされた IMAP 認証が見つかりません。" + +#: lib/Horde/Imap/Client/Socket.php:4643 +msgid "Operation failed due to a lack of a secure connection." +msgstr "安全な接続ができないため操作に失敗しました。" + +#: lib/Horde/Imap/Client/Socket/Pop3.php:1250 +msgid "POP3 error reported by server." +msgstr "サーバは POP3 エラーを報告しました。" + +#: lib/Horde/Imap/Client/Socket/Pop3.php:253 +msgid "POP3 server denied authentication." +msgstr "POP3 サーバは認証を拒否しました。" + +#: lib/Horde/Imap/Client/Socket.php:4611 +msgid "Remote server is temporarily unavailable." +msgstr "リモートサーバは一時的に使用不能です。" + +#: lib/Horde/Imap/Client/Socket/Connection/Pop3.php:63 +msgid "Server closed the connection unexpectedly." +msgstr "サーバは接続を予期せずに切断しました。" + +#: lib/Horde/Imap/Client/Socket.php:381 +msgid "Server does not support TLS connections." +msgstr "サーバは TLS 接続をサポートしていません。" + +#: lib/Horde/Imap/Client/Socket/Pop3.php:194 +msgid "Server does not support secure connections." +msgstr "サーバは安全な接続をサポートしていません。" + +#: lib/Horde/Imap/Client/Socket.php:594 +msgid "Server rejected connection." +msgstr "サーバは接続を拒絶しました。" + +#: lib/Horde/Imap/Client/Socket/Connection/Pop3.php:42 +#: lib/Horde/Imap/Client/Socket/Connection/Socket.php:54 +#: lib/Horde/Imap/Client/Socket/Connection/Socket.php:87 +msgid "Server write error." +msgstr "サーバ書き込みエラー。" + +#: lib/Horde/Imap/Client/Socket.php:4564 +msgid "The comparison algorithm was not recognized by the server." +msgstr "比較アルゴリズムがサーバで認識されませんでした。" + +#: lib/Horde/Imap/Client/Socket.php:603 +msgid "The mail server does not support IMAP4rev1 (RFC 3501)." +msgstr "メールサーバは IMAP4rev1(RFC3501) をサポートしていません。" + +#: lib/Horde/Imap/Client/Socket.php:4690 +msgid "The mail server has denied the request." +msgstr "メールサーバは要求を拒否しました。" + +#: lib/Horde/Imap/Client/Socket.php:4674 +msgid "The mail server is reporting corrupt data in your mailbox." +msgstr "" +"メールサーバはあなたのメールボックスのデータが壊れていると報告しています。" + +#: lib/Horde/Imap/Client/Socket.php:4476 +msgid "The mail server was unable to parse the contents of the mail message." +msgstr "メールサーバはメッセージの内容を解析できませんでした。" + +#: lib/Horde/Imap/Client/Socket.php:4429 +#, php-format +msgid "" +"The mail server was unable to parse the contents of the mail message: %s" +msgstr "メールサーバはメッセージの内容を解析できませんでした:%s" + +#: lib/Horde/Imap/Client/Socket.php:4582 +msgid "The metadata item could not be saved because it is too large." +msgstr "メタデータが大きすぎたため、保存できませんでした。" + +#: lib/Horde/Imap/Client/Socket.php:4600 +msgid "" +"The metadata item could not be saved because the maximum number of " +"annotations has been exceeded." +msgstr "注釈の最大数を超過しているため、メタデータは保存できませんでした。" + +#: lib/Horde/Imap/Client/Socket.php:4591 +msgid "" +"The metadata item could not be saved because the server does not support " +"private annotations." +msgstr "" +"サーバが私的な注釈をサポートしていないので、メタデータは保存できませんでし" +"た。" + +#: lib/Horde/Imap/Client/Socket.php:4708 +msgid "The object could not be created because it already exists." +msgstr "オブジェクトは既に存在するので作成されませんでした。" + +#: lib/Horde/Imap/Client/Socket.php:4717 +msgid "The object could not be deleted because it does not exist." +msgstr "オブジェクトは存在しないので削除できませんでした。" + +#: lib/Horde/Imap/Client/Socket.php:4699 +msgid "" +"The operation failed because the quota has been exceeded on the mail server." +msgstr "メールサーバのクォータを超過しているので、操作は失敗しました。" + +#: lib/Horde/Imap/Client/Exception/NoSupportExtension.php:46 +#, php-format +msgid "The server does not support the %s extension." +msgstr "サーバは %s 拡張をサポートしていません。" + +#: lib/Horde/Imap/Client/Socket.php:4726 +msgid "The special-use attribute requested for the mailbox is not supported." +msgstr "メールボックスの特別な属性の使用はサポートされていません。" + +#: lib/Horde/Imap/Client/Socket.php:4660 +msgid "" +"There was a temporary issue when attempting this operation. Please try again " +"later." +msgstr "この操作には一時的な問題がありました。後で再度試して下さい。" + +#: lib/Horde/Imap/Client/Socket.php:692 +#: lib/Horde/Imap/Client/Socket/Pop3.php:339 +msgid "Unexpected response from server when authenticating." +msgstr "認証時にサーバから予期しない応答がありました。" + +#: lib/Horde/Imap/Client/Socket.php:729 +#: lib/Horde/Imap/Client/Socket/Pop3.php:385 +#, php-format +msgid "Unknown authentication method: %s" +msgstr "不明な認証方式です:%s" + +#: lib/Horde/Imap/Client/Socket.php:4651 +msgid "You do not have adequate permissions to carry out this operation." +msgstr "あなたにはこの操作を実行するのに十分なアクセス権を持っていません。" diff --git a/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/data/locale/nl/LC_MESSAGES/Horde_Imap_Client.mo b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/data/locale/nl/LC_MESSAGES/Horde_Imap_Client.mo new file mode 100644 index 0000000000000000000000000000000000000000..56e48f6496354a879e5bc1ec920099b9c6a45702 GIT binary patch literal 6737 zcmbW5+m9qw9mfk6#2vv4Ab9rxuI{>YGczo(%eWFr)NOvZ0&ct z=6BBdUB17|nZMn7!_Nag5Ab}7=e6sC;BhcH#D9E#a6=H>1^y5`3cdv10lop=3H}p2 z2_CvJ2yO>YgZF`70cG8H!Da9TQ1*Wd6#47l7X&B3Q#B4ik^dE_z}IWM2Hws0!#4#% z8@v~k@81AF1AYhmH24cp*8dTd^ZyEp+%4}9f-ivc;6vck;Dg{#K#_YLlzsjUiu@gi zgWwqWFnAQ~g2%zakD0aRAE`$F7U%oB~j(ji(KF9aBK7=md z+=r`pv_bv_EByB`xB-eCKL$mw7eNJH1J8knKN18V2cH5(z6VOYep%z6!O!#k_FIGC zOW-N+5%AmK3it<5^!g7demje^#QzDXz@LGl=WjsS_f7B^cpK!A_h&%iRR@&#?1JLo z7eNL79hA6S|50KJ9tUOpH|y`;2PKZb1KB!w6Fd$63p@cHhrC||p9LQPe*}IRd<7K! zZ{~0Vu7l5lzXeZ$cYdt$*JV)Te+tSze*xFPn{ZkTUI7=um%+Qhw?R4o_D>LNP&h31 z9pbr{hvmT$9{Hd`0NuUabKw0vat2%YkJu?6sN+9k-)DJltiJmElOLgi_YI*6NCO}5 zdqBlQSo{Z?1UK-APlW%_C^*dHeGB3)pI3nAqoDY8zmLQj`UDF+!VR%sVu{KABYuX) z-XEly=Y#(R|4B{opCh@-Y@zaUFtDyLp|Y7;zqo$C%8lDLE^i0RWzjQP5qEVF^UJO? zp?uXzu6lagD06iX^KM3PQ^&~xuS;iU#D_XZi*DEC`DU5it2$+&G)G$(?^Y*|Hhffv zs?bq{vd-iKo8|1bqBF6hYcsUQ9;02ir=BZ~+fjwNTByRR%nVhxr(JG}kvz(mS!CEq zhb@~WJ1Rx(j=jo`m82?j4vMqsE#rOMhMWBA+I8$;%Ov#fwF8rlc2;*E$?u-|Wp287 zMQvQTEH-4O>z$3#vg`S^<@JMhtryNNYDBSlS}rk5@v_G3P#0QtOjl#1iVKBVg|#Zt zE)t)P^`BY<2`X~5gH`9O8!Mbe;^nDx_Y)8g&+Z^$i`n7I#$yk)DuWBhi_sxNNXSWP zT4tV#hz{eT=lwIaqhEX3vsZN!E721lP8`$@yom9-J5%$%voqG|e73EVI8s-M+G$ z{4~R~cHm?EPQKn_sh2<4@eS&z0~~S5q_!}1s61ayN(8lw$=x#3+xT9064+a-HRG}A z6vJl+3C`F%k#%OvM{kN%^*%!vqo6mk9c*~!r33WK$s3(S)U%?ODk*nTu$<}ID2sQA zISdq{=AOFM(gv|-LoeYy;mr1eI(q4`6?Oju^9#pjm-RTP_NDCZge!S5D@W>Axgbf{ zwa%4;qN)$nz8zb-QT>`-Dz@Nyye^c%R*H$7MamVBI2ZcJcW+Hydg@(Fp?wX)Wob=H z@e0J0k|PW~pf+vDe*f$0>hP;^TBa&1(~fbT(b6$I>7|q9oJEB(SG$G=M@szPCscu( zjnlxz+Zsyv4pp63?QT25qG_{fugFdrt`q4_JE#`t1soK`_FEd7#Ozr*Ccj@>FWsB! zBOi;Go-1+5tT$vTsGQg+-J-`qHj6N$1&!BaIb%b0bWY7y!5-#{8_j8gCNj>2K z8l`BASESpju6Af-8F%(59IQJl1ZkZQTVG`qW5JSo!n)8rb3WCBXI7G!?3%meJ6LNi zkK(ZPXc^_L4ZB3jZ=X#(Uzngm)3z>}Tfex`S`mJ+Q|lb6EUCr$g~iswLTmm(weaB5 ziTUI63-j{`wl10NSWes{xA?GHTwGdQsN^o_yl8DWo#nXFx+S&jw#cE-s3&EZRHr*- zoP@`{24_Rl>dRYE<&n7yI*Uq1kk*FLDGO8MXzQ6;%_7w9sndPrQke+?+oKb>*PdEbl)_twVHKpNab5n zCp&R5x1N*^o<3$>nsd~^f6dPJA1XO3p-t}|-k*r~avTaTMeI41UAuzeiP%Tfe z)eB6Pk&;u#3{jvyY>x{$R+`DERmv%3gde|Zm*cn5`H|H14vvkJIAWy?0Qj~OXA*Hq z+2(-FMt#4MY~H)Fxk{w`T6S#AEtSc1m{=S&4rs-L0eOO|Hl^pO9_NxHk+U?s7$!W) ziKB(n@&obn$k<}t4g};-jPQ2xJt<^k0zxS}d>Fal2K8n8DuBfx$ME`Ck zj0Szl##VCWNQy z0-i+w;MTA z+smnqN;ob~m#eEBg;Q_lg{Fo=|03RE+=;jPRl0Xf-tEQx4$&CT^Ap=84{^qH-b;>; zwjS5#T5?}kG!|4*op`AkoO)06aq-q>Rhge4)sd#UqA`BY>w7@T&@!oUJ%VB|ZDM|;nrN?$2BXdxxGsqpmvlLV0|94oXWQT>+!3UoP?O1t*}f18n3 zhXgUAx-mYnD$aVg41FPx(?`{fvWFrR)sd1D}8pc7j^F8j7 zYAywudkcwH=wv*ibIGm(W6@JWDSz{NPnzO{I(a+?s=ZN5HFE(CsRsCC}wQb1c13)z`@$Y~uxp}JU0n{VXIz)EAB@2LK!z$hO{rKGrCl)o}oC44j~`8{g8r4i#KWJU!| wmUN7y_tfk9zQC+{BoD6Cb&!f`6K-xI%by2&3{r%F4V(HYl$Y_LGN2v&7vkd}zW@LL literal 0 HcmV?d00001 diff --git a/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/data/locale/nl/LC_MESSAGES/Horde_Imap_Client.po b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/data/locale/nl/LC_MESSAGES/Horde_Imap_Client.po new file mode 100644 index 00000000..167ad200 --- /dev/null +++ b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/data/locale/nl/LC_MESSAGES/Horde_Imap_Client.po @@ -0,0 +1,262 @@ +# Dutch translations for Horde_Imap_Client package. +# Copyright 2012-2017 Horde LLC (http://www.horde.org/) +# This file is distributed under the same license as the Horde_Imap_Client package. +# +# Automatically generated, 2012. +# Arjen de Korte , 2012. +msgid "" +msgstr "" +"Project-Id-Version: Horde_Imap_Client\n" +"Report-Msgid-Bugs-To: dev@lists.horde.org\n" +"POT-Creation-Date: 2012-11-06 16:40+0100\n" +"PO-Revision-Date: 2012-11-29 22:21+0100\n" +"Last-Translator: Arjen de Korte \n" +"Language-Team: American English \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/Imap/Client/Exception/NoSupportPop3.php:25 +#, php-format +msgid "%s not supported on POP3 servers." +msgstr "%s niet ondersteund op POP3 servers." + +#: lib/Horde/Imap/Client/Socket.php:4380 +msgid "Authentication credentials have expired." +msgstr "Verificatie gegevens zijn verlopen." + +#: lib/Horde/Imap/Client/Socket.php:4364 +msgid "Authentication failed." +msgstr "Verificatie mislukt." + +#: lib/Horde/Imap/Client/Auth/DigestMD5.php:149 +msgid "Authentication failure." +msgstr "Verificatiefout." + +#: lib/Horde/Imap/Client/Socket.php:4372 +msgid "Authentication was successful, but authorization failed." +msgstr "Verificatie was succesvol, maar toestemming is geweigerd." + +#: lib/Horde/Imap/Client/Interaction/Server/Tagged.php:34 +msgid "Bad tagged response." +msgstr "Ongeldig gelabeld antwoord." + +#: lib/Horde/Imap/Client/Exception/SearchCharset.php:36 +msgid "Cannot convert search query text to new charset" +msgstr "Kan de zoekopdracht niet naar de nieuwe karakterset omzetten." + +#: lib/Horde/Imap/Client/Base.php:1899 lib/Horde/Imap/Client/Base.php:1958 +msgid "Cannot expunge read-only mailbox." +msgstr "Kan alleen-lezen map niet legen." + +#: lib/Horde/Imap/Client/Socket.php:4165 +msgid "Charset used in search query is not supported on the mail server." +msgstr "Karakterset in zoekopdracht wordt niet ondersteund op de mailserver." + +#: lib/Horde/Imap/Client/Socket.php:931 +#, php-format +msgid "Could not open mailbox \"%s\"." +msgstr "Kan map \"%s\" niet openen." + +#: lib/Horde/Imap/Client/Socket.php:335 +msgid "Could not open secure TLS connection to the IMAP server." +msgstr "Kan geen beveiligde TLS verbinding met IMAP server maken." + +#: lib/Horde/Imap/Client/Socket/Pop3.php:189 +#: lib/Horde/Imap/Client/Socket/Pop3.php:201 +msgid "Could not open secure connection to the POP3 server." +msgstr "Kon geen beveiligde verbinding maken met de POP3 server." + +#: lib/Horde/Imap/Client/Socket.php:4265 +msgid "Could not save message data because it is too large." +msgstr "Kan bericht gegevens niet opslaan omdat het te groot is." + +#: lib/Horde/Imap/Client/Socket.php:4256 +msgid "Could not save message on server." +msgstr "Kon bericht niet opslaan op de server." + +#: lib/Horde/Imap/Client/Socket/Pop3.php:280 +msgid "Error connecting to POP3 server." +msgstr "Er is een fout opgetreden bij het verbinden met de POP3 server." + +#: lib/Horde/Imap/Client/Socket.php:504 +msgid "Error connecting to mail server." +msgstr "Er is een fout opgetreden bij het verbinden met de mailserver." + +#: lib/Horde/Imap/Client/Utf7imap.php:117 +#: lib/Horde/Imap/Client/Utf7imap.php:142 +#: lib/Horde/Imap/Client/Utf7imap.php:146 +#: lib/Horde/Imap/Client/Utf7imap.php:205 +#: lib/Horde/Imap/Client/Utf7imap.php:222 +#: lib/Horde/Imap/Client/Utf7imap.php:226 +#: lib/Horde/Imap/Client/Utf7imap.php:234 +#: lib/Horde/Imap/Client/Utf7imap.php:240 +msgid "Error converting UTF7-IMAP string." +msgstr "Er is een fout opgetreden bij het omzetten van de UTF7-IMAP string." + +#: lib/Horde/Imap/Client/Socket.php:3683 lib/Horde/Imap/Client/Socket.php:3964 +msgid "Error when communicating with the mail server." +msgstr "Er is een fout opgetreden bij het communiceren met de mailserver." + +#: lib/Horde/Imap/Client/Socket.php:3838 +msgid "IMAP Server closed the connection." +msgstr "IMAP server heeft de verbinding beëindigd." + +#: lib/Horde/Imap/Client/Socket.php:3823 lib/Horde/Imap/Client/Socket.php:3854 +msgid "IMAP error reported by server." +msgstr "IMAP fout gerapporteerd door de server." + +#: lib/Horde/Imap/Client/Socket.php:3389 +#, php-format +msgid "Invalid METADATA entry: \"%s\"." +msgstr "Ongeldige METADATA invoer: \"%s\"." + +#: lib/Horde/Imap/Client/Socket.php:3476 +#, php-format +msgid "Invalid METADATA value type \"%s\"." +msgstr "Ongeldige METADATA waarde type \"%s\"." + +#: lib/Horde/Imap/Client/Socket.php:3890 +msgid "Mail server closed the connection unexpectedly." +msgstr "De mailserver heeft de verbinding onverwacht beëindigd." + +#: lib/Horde/Imap/Client/Socket.php:395 +msgid "Mail server denied authentication." +msgstr "Mailserver heeft de aanmelding geweigerd." + +#: lib/Horde/Imap/Client/Socket.php:1812 lib/Horde/Imap/Client/Socket.php:2483 +#: lib/Horde/Imap/Client/Socket.php:2504 lib/Horde/Imap/Client/Socket.php:2933 +#: lib/Horde/Imap/Client/Socket.php:2988 +msgid "Mailbox does not support mod-sequences." +msgstr "Map ondersteund geen mod-sequenties." + +#: lib/Horde/Imap/Client/Socket.php:378 +msgid "No supported IMAP authentication method could be found." +msgstr "Geen ondersteunde IMAP " + +#: lib/Horde/Imap/Client/Socket.php:4388 +msgid "Operation failed due to a lack of a secure connection." +msgstr "De bewerking vereist een beveiligde verbinding." + +#: lib/Horde/Imap/Client/Socket/Pop3.php:1096 +msgid "POP3 Server closed the connection unexpectedly." +msgstr "POP3 server heeft de verbinding onverwacht beëindigd." + +#: lib/Horde/Imap/Client/Socket/Pop3.php:1156 +msgid "POP3 error reported by server." +msgstr "POP3 fout gemeld door de server." + +#: lib/Horde/Imap/Client/Socket/Pop3.php:240 +msgid "POP3 server denied authentication." +msgstr "POP3 server heeft verificatie geweigerd." + +#: lib/Horde/Imap/Client/Socket.php:4356 +msgid "Remote server is temporarily unavailable." +msgstr "Server op afstand is tijdelijk niet beschikbaar." + +#: lib/Horde/Imap/Client/Socket.php:323 +msgid "Server does not support TLS connections." +msgstr "Server ondersteunt geen TLS verbindingen." + +#: lib/Horde/Imap/Client/Socket/Pop3.php:189 +msgid "Server does not support secure connections." +msgstr "Server ondersteunt geen beveiligde verbindingen." + +#: lib/Horde/Imap/Client/Socket.php:527 +msgid "Server rejected connection." +msgstr "Server heeft verbinding geweigerd." + +#: lib/Horde/Imap/Client/Socket.php:3748 +msgid "Server write error." +msgstr "Server schrijffout." + +#: lib/Horde/Imap/Client/Socket.php:4309 +msgid "The comparison algorithm was not recognized by the server." +msgstr "Het vergelijkingsalgoritme wordt niet herkend door de server" + +#: lib/Horde/Imap/Client/Socket.php:536 +msgid "The mail server does not support IMAP4rev1 (RFC 3501)." +msgstr "De mailserver ondersteunt IMAP4rev1 (RFC 3501) niet." + +#: lib/Horde/Imap/Client/Socket.php:4435 +msgid "The mail server has denied the request." +msgstr "De mailserver heeft het verzoek geweigerd." + +#: lib/Horde/Imap/Client/Socket.php:4419 +msgid "The mail server is reporting corrupt data in your mailbox." +msgstr "De mailserver rapporteert beschadigde data in uw map." + +#: lib/Horde/Imap/Client/Socket.php:4177 lib/Horde/Imap/Client/Socket.php:4222 +msgid "The mail server was unable to parse the contents of the mail message." +msgstr "" +"De mailserver was niet in staat om de inhoud van het bericht te verwerken." + +#: lib/Horde/Imap/Client/Socket.php:4327 +msgid "The metadata item could not be saved because it is too large." +msgstr "Het metadata item kon niet worden opgeslagen omdat het te groot is." + +#: lib/Horde/Imap/Client/Socket.php:4345 +msgid "" +"The metadata item could not be saved because the maximum number of " +"annotations has been exceeded." +msgstr "" +"Het metadata item kon niet worden opgeslagen omdat het maximale aantal " +"annotaties wordt overschreden." + +#: lib/Horde/Imap/Client/Socket.php:4336 +msgid "" +"The metadata item could not be saved because the server does not support " +"private annotations." +msgstr "" +"Het metadata item kon niet worden opgeslagen omdat de server geen privé " +"annotaties ondersteund." + +#: lib/Horde/Imap/Client/Socket.php:4453 +msgid "The object could not be created because it already exists." +msgstr "Het object kon niet worden aangemaakt omdat het al bestaat." + +#: lib/Horde/Imap/Client/Socket.php:4462 +msgid "The object could not be deleted because it does not exist." +msgstr "Het object kon niet worden verwijderd omdat het niet bestaat." + +#: lib/Horde/Imap/Client/Socket.php:4444 +msgid "" +"The operation failed because the quota has been exceeded on the mail server." +msgstr "" +"De bewerking is mislukt omdat het quotum op de mailserver is overschreden." + +#: lib/Horde/Imap/Client/Exception/NoSupportExtension.php:36 +#, php-format +msgid "The server does not support the %s extension." +msgstr "De server ondersteunt de %s extensie niet." + +#: lib/Horde/Imap/Client/Socket.php:4471 +msgid "The special-use attribute requested for the mailbox is not supported." +msgstr "" +"Het special-use attribuut dat is gevraagd voor de map wordt niet ondersteund." + +#: lib/Horde/Imap/Client/Socket.php:4405 +msgid "" +"There was a temporary issue when attempting this operation. Please try again " +"later." +msgstr "" +"Er is een tijdelijk probleem opgetreden bij het uitvoeren van deze " +"bewerking. Probeer het later nog eens." + +#: lib/Horde/Imap/Client/Socket.php:604 +#: lib/Horde/Imap/Client/Socket/Pop3.php:334 +msgid "Unexpected response from server when authenticating." +msgstr "Onverwacht antwoord van server bij de verificatie." + +#: lib/Horde/Imap/Client/Socket.php:648 +#: lib/Horde/Imap/Client/Socket/Pop3.php:374 +#, php-format +msgid "Unknown authentication method: %s" +msgstr "Onbekende verificatie methode: %s" + +#: lib/Horde/Imap/Client/Socket.php:4396 +msgid "You do not have adequate permissions to carry out this operation." +msgstr "U heeft onvoldoende rechten om deze bewerking uit te voeren." diff --git a/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/data/locale/tr/LC_MESSAGES/Horde_Imap_Client.mo b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/data/locale/tr/LC_MESSAGES/Horde_Imap_Client.mo new file mode 100644 index 0000000000000000000000000000000000000000..eae6032331e02831879c4a84996bedef489f1643 GIT binary patch literal 6865 zcmb`LTZ|-C8OI9&!I7JQHxxN6F6;u`%Cp1RgLG6U^cR$q1t=h{u4_aL|d?g4)feh&Nq{5*Ki z&7OA%d3O>nwv&1(*k^e2Iz`udJz`JhoygIla zl=}ww74V1P{oq@mtos!x=e`e$+`YGY-Xq{a@U!40P;AV>r@(hW+2?&wN_xqlVB5BxbO`n(599Pj^(=RFM`03QV{DChqe`~vt_P~v>!-JUlGJ`ElQ zWAI_{ZSZmMT~OA40PY7L!AZNpZ-L^+?}6gScR*S9E_ej|Cn$FAgGBQD+aUkE@ALI6 z_&RtB`~xWaJU~$8yyr{20!n;;3d;F^Du2HfvWmV3K#6w?=aPCLu{y{_8aRIdo|GQw<9MpT>T`?yu{%|9lBqQBbP}5xUnQ|xd~tEV zN{wALHm!RLdA4HWENJR1;9=7mUv71nsujIzl)2Ig_-#sXSqI?`Kj+p=iC@+!S~Qy` zO_%fVan;B(r8zpW!CG;0wc#=Ct4z0AC~HmHN#c~aoAN6YB!QA>{v*uJmsJu9^W$9#%;LCtu9^1 z4oM#R&b>*;#MRDf*Y0%J)Wg&?@rqhHdqHf7P189WrDfMM=N1-s+O=Fby=Wwgqo<`3 zvj{J1%=UGrRl_tjMyeoFn3W}o3bk#CPY3#sErJ9EIqKd?YZE(AIBtoT#evfT5|sdf zi%X{t)(U$v%MaBam*E&2MNu9*rXhMc$X1;BV>`OF7aTcNGfX5n;-aDbb>1kx!#F=ND1QR3H91C3)6qwc+ssE$t4%Zc?>$0no$s->h2_G9qEhl-*x)(dfj;5CK#n41)2+(Y+WSPIF=vDU|v37Rv2=CMm=AJiE zl9@6fj&vp>PTB?}U>@sLJggfb6#TG2Pq?`hopRxLO5wzv1gA_L$`++ZLE>O}PzYB{ zvpv|&n(w%Pj}fsv>9P&5)_JV%EjhAA9gI!MBptS>aM?eyZ^9m$1hwn*%sv}Scq?KywyxY~bUc5d(VvK0<010%azp;wws%TWx9^pU)6Cf4Si ztf&}N!)}t>s-jIV67FxKUbG$WT<(j-&PqPm$YO+)V_@&4-* z3IrQR}=)TEK=jMl>ZFyJ;u zFVm;0W2DkfHgLBK4Op0~nHY+C)I~0(D7x;%w*2h6Shm7?ntD+_>uNDHS}4x2p<9~t z2=TP7dlv_dfK)0*6}4=Ws4}kDccd9eL%bNbVdQt5R1|T??{6kKTyWLGjbPd* zhlK}d6rnL*kw&hX+M-dyBsHP1w`da~NbQVY`#Mt|3+B~xbQN>yOr$%Pj)wthI&@zdx&YU|rv}dk9J9E4!IJG6(_q-bfpXh`H=twmP9%Ue@ z9U9769jD92)=tLF#HaAht3!<-oB2lVw239$iJe!AiSZeh=IV#)bNgn_>NKk@$vT2A zk7pLc+(N}uiH*{E6?fcidUW3rRs4B$Pplq1s^<0{VR2z5y4e|q@yE;IJCE~b&KTC; zh<%O6#njNmQP54G)$>6V25l(NU$;m_%y2>2V%%n;l1a6<3EKjmhd5?CX}z^Bd#C-4 zHMNt_3bP>sAGSX1Z*=|s2IZ%z+p24_Haf(9U?Za%+nmw6p7l1B$%3}Y!a#L(+~1(_ zELbrig-3as3(sSoF(|3Fwz^FskuIbi<7)4E+}qq*XBXSs3{7O#ybC(aRMN&_R{6mi z4p3jP>{ah- z(pHV$X1BM=_(t&i>$wVgS5dUByR;s{6Y*X5%9Vwhs<*i&)bY)v*y6Yw;8~%6f5W!v zXhIRr$%zO&8;Dvy>#fuHhK_fDJMRVjXJ!&iY8&rqUz8Q4Zb$OIz`3YKpK z6Xp!#CAu|=%*E|(wY6?Y5$ESh;fb~F$<&rDc)j*bmZ5UNI^GH#*NcQ7ln2s*>0H|+ zgt|qbN=}}r3Wx*^LNo$fxMk`%)g{NMt^qILAtPM5!Rd;`vT|sjGVL^IhXMJ;+qDdp zT?ysZIy^&cs>*B=9mo3ZqBE8bYD&>@zg%3S0F`WR5!Rp?KujqgBS{`X7Ac>l7DF>8 z!z4y-6RL9Ecpeu;njlq0+C`xh9pwJ-EGNIM@JKmt)3yjB#S5LBT!*LG`N3Ki)}0`sVR`G};>SKb@VoJ@*iTvA|ysN213jGHyFK$^DjWJu--fuefz z<|8&IYk9jWY*o^_;7u&*xC-Tphg6(c${n?ggD5|`OOq?Ct%&?TEqBA$x$4zG-Ue0g zI^}>~`|(Tf$yhDxHByuo(2RAGvfdYihwFHSysH7| z8F#$vzVbe>owXlXKN$b>wW^Ck(IM}O`KUOnoo6yn6h;gCV(ckAR5kvnxGxG=mB7`M zb&R#HlF`Rx_>-1Y)fTA`3@mv(Xn*Q#Z!=p)#Mdh_%*0k+Bighwx4H`-sm{}rTXh7X zw~~kAnRL2|Rb7O+XfQV&6Zb|&ewr$egF5awJ7P-9STclRlDv>Xtz9~Z>CITClwgf4 Ma, YEAR. +# +msgid "" +msgstr "" +"Project-Id-Version: Horde_Imap_Client\n" +"Report-Msgid-Bugs-To: dev@lists.horde.org\n" +"POT-Creation-Date: 2017-06-09 15:57+0300\n" +"PO-Revision-Date: 2017-06-09 16:19+0300\n" +"Language-Team: İTÜ BİDB \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Generator: Poedit 1.8.12\n" +"Last-Translator: \n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" +"Language: tr\n" + +#: lib/Horde/Imap/Client/Exception/NoSupportPop3.php:34 +#, php-format +msgid "%s not supported on POP3 servers." +msgstr "%s, POP3 sunucularında desteklenmiyor." + +#: lib/Horde/Imap/Client/Socket.php:5035 +msgid "Authentication credentials have expired." +msgstr "Kimlik doğrulama bilgilerinin süresi doldu." + +#: lib/Horde/Imap/Client/Socket.php:747 lib/Horde/Imap/Client/Socket.php:5019 +#: lib/Horde/Imap/Client/Socket/Pop3.php:441 +#: lib/Horde/Imap/Client/Socket/Pop3.php:460 +#: lib/Horde/Imap/Client/Socket/Pop3.php:486 +#: lib/Horde/Imap/Client/Socket/Pop3.php:498 +msgid "Authentication failed." +msgstr "Kimlik doğrulama başarısız oldu." + +#: lib/Horde/Imap/Client/Auth/DigestMD5.php:158 +#: lib/Horde/Imap/Client/Auth/Scram.php:124 +msgid "Authentication failure." +msgstr "Kimlik doğrulama hatası." + +#: lib/Horde/Imap/Client/Socket.php:5027 +msgid "Authentication was successful, but authorization failed." +msgstr "Kimlik doğrulama başarılıydı ancak yetkilendirme başarısız oldu." + +#: lib/Horde/Imap/Client/Interaction/Server/Tagged.php:44 +msgid "Bad tagged response." +msgstr "Kötü etiketli yanıt." + +#: lib/Horde/Imap/Client/Exception/SearchCharset.php:45 +msgid "Cannot convert search query text to new charset" +msgstr "Arama sorgusu metni yeni karakter setine dönüştürülemez" + +#: lib/Horde/Imap/Client/Base.php:1922 lib/Horde/Imap/Client/Base.php:1985 +msgid "Cannot expunge read-only mailbox." +msgstr "Salt okunur dizini silmek mümkün değil." + +#: lib/Horde/Imap/Client/Socket.php:4811 +msgid "Charset used in search query is not supported on the mail server." +msgstr "" +"Arama sorgusunda kullanılan karakter seti posta sunucusunda desteklenmiyor." + +#: lib/Horde/Imap/Client/Socket.php:1240 +#, php-format +msgid "Could not open mailbox \"%s\"." +msgstr "Dizin \"%s\" açılamadı." + +#: lib/Horde/Imap/Client/Socket.php:358 lib/Horde/Imap/Client/Socket.php:400 +msgid "Could not open secure TLS connection to the IMAP server." +msgstr "IMAP sunucusuna güvenli TLS bağlantısı açılamadı." + +#: lib/Horde/Imap/Client/Socket/Pop3.php:219 +#: lib/Horde/Imap/Client/Socket/Pop3.php:233 +msgid "Could not open secure connection to the POP3 server." +msgstr "POP3 sunucusuna güvenli bağlantı açılamadı." + +#: lib/Horde/Imap/Client/Socket.php:4919 +msgid "Could not save message data because it is too large." +msgstr "İleti verileri çok büyük olduğu için kaydedilemedi." + +#: lib/Horde/Imap/Client/Socket.php:4910 +msgid "Could not save message on server." +msgstr "İleti sunucu üzerinde kaydedilemedi." + +#: lib/Horde/Imap/Client/Socket.php:606 +#: lib/Horde/Imap/Client/Socket/Pop3.php:324 +msgid "Error connecting to mail server." +msgstr "Posta sunucusuna bağlanırken hata oluştu." + +#: lib/Horde/Imap/Client/Utf7imap.php:128 +#: lib/Horde/Imap/Client/Utf7imap.php:156 +#: lib/Horde/Imap/Client/Utf7imap.php:163 +#: lib/Horde/Imap/Client/Utf7imap.php:225 +#: lib/Horde/Imap/Client/Utf7imap.php:245 +#: lib/Horde/Imap/Client/Utf7imap.php:252 +#: lib/Horde/Imap/Client/Utf7imap.php:263 +#: lib/Horde/Imap/Client/Utf7imap.php:272 +msgid "Error converting UTF7-IMAP string." +msgstr "UTF7-IMAP dizesini dönüştürme hatası." + +#: lib/Horde/Imap/Client/Socket.php:4467 +#: lib/Horde/Imap/Client/Socket/Connection/Pop3.php:83 +#: lib/Horde/Imap/Client/Socket/Connection/Socket.php:214 +#: lib/Horde/Imap/Client/Socket/Pop3.php:1382 +msgid "Error when communicating with the mail server." +msgstr "Posta sunucusu ile iletişim kurarken hata oluştu." + +#: lib/Horde/Imap/Client/Socket.php:4605 +msgid "IMAP Server closed the connection." +msgstr "IMAP Sunucusu bağlantıyı kapattı." + +#: lib/Horde/Imap/Client/Socket.php:4591 +msgid "IMAP error reported by server." +msgstr "Sunucu tarafından IMAP hatası bildirildi." + +#: lib/Horde/Imap/Client/Socket.php:4009 +#, php-format +msgid "Invalid METADATA entry: \"%s\"." +msgstr "Geçersiz METADATA girişi: \"%s\"." + +#: lib/Horde/Imap/Client/Socket.php:4102 +#, php-format +msgid "Invalid METADATA value type \"%s\"." +msgstr "Geçersiz METADATA değer türü \"%s\"." + +#: lib/Horde/Imap/Client/Socket/Connection/Socket.php:148 +msgid "Mail server closed the connection unexpectedly." +msgstr "Posta sunucusu bağlantıyı beklenmedik şekilde kapattı." + +#: lib/Horde/Imap/Client/Socket.php:573 +msgid "Mail server denied authentication." +msgstr "Posta sunucusu kimlik doğrulamayı reddetti." + +#: lib/Horde/Imap/Client/Base.php:2255 lib/Horde/Imap/Client/Base.php:2534 +#: lib/Horde/Imap/Client/Base.php:2806 lib/Horde/Imap/Client/Base.php:2891 +msgid "Mailbox does not support mod-sequences." +msgstr "Dizin mod dizilerini desteklemez." + +#: lib/Horde/Imap/Client/Socket.php:370 +#: lib/Horde/Imap/Client/Socket/Pop3.php:201 +msgid "No password provided." +msgstr "Parola sağlanmadı." + +#: lib/Horde/Imap/Client/Socket.php:498 +msgid "No supported IMAP authentication method could be found." +msgstr "Desteklenen hiçbir IMAP kimlik doğrulama yöntemi bulunamadı." + +#: lib/Horde/Imap/Client/Socket.php:5043 +msgid "Operation failed due to a lack of a secure connection." +msgstr "Güvenli bir bağlantı eksikliği nedeniyle işlem başarısız oldu." + +#: lib/Horde/Imap/Client/Socket/Pop3.php:1448 +msgid "POP3 error reported by server." +msgstr "Sunucu tarafından POP3 hatası bildirildi." + +#: lib/Horde/Imap/Client/Socket/Pop3.php:295 +msgid "POP3 server denied authentication." +msgstr "POP3 sunucusu kimlik doğrulamayı reddetti." + +#: lib/Horde/Imap/Client/Socket.php:5011 +msgid "Remote server is temporarily unavailable." +msgstr "Uzak sunucu geçici olarak kullanılamıyor." + +#: lib/Horde/Imap/Client/Socket/Connection/Pop3.php:75 +msgid "Server closed the connection unexpectedly." +msgstr "Sunucu bağlantıyı beklenmedik bir şekilde kapattı." + +#: lib/Horde/Imap/Client/Socket.php:388 +msgid "Server does not support TLS connections." +msgstr "Sunucu TLS bağlantılarını desteklemez." + +#: lib/Horde/Imap/Client/Socket/Pop3.php:219 +msgid "Server does not support secure connections." +msgstr "Sunucu güvenli bağlantıları desteklemez." + +#: lib/Horde/Imap/Client/Socket.php:809 +#: lib/Horde/Imap/Client/Socket/Pop3.php:508 +msgid "Server failed verification check." +msgstr "Sunucu doğrulama kontrolünde başarısız oldu." + +#: lib/Horde/Imap/Client/Socket.php:626 +msgid "Server rejected connection." +msgstr "Sunucu bağlantıyı reddetti." + +#: lib/Horde/Imap/Client/Socket/Connection/Pop3.php:47 +#: lib/Horde/Imap/Client/Socket/Connection/Socket.php:64 +#: lib/Horde/Imap/Client/Socket/Connection/Socket.php:110 +msgid "Server write error." +msgstr "Sunucu yazma hatası." + +#: lib/Horde/Imap/Client/Socket.php:4964 +msgid "The comparison algorithm was not recognized by the server." +msgstr "Karşılaştırma algoritması sunucu tarafından tanınmadı." + +#: lib/Horde/Imap/Client/Socket.php:635 +msgid "The mail server does not support IMAP4rev1 (RFC 3501)." +msgstr "Posta sunucusu IMAP4rev1 (RFC 3501) desteklemez." + +#: lib/Horde/Imap/Client/Socket.php:5092 +msgid "The mail server has denied the request." +msgstr "Posta sunucusu isteği reddetti." + +#: lib/Horde/Imap/Client/Socket.php:5074 +msgid "The mail server is reporting corrupt data in your mailbox." +msgstr "Posta sunucusu dizininizde bozuk veriler bildiriyor." + +#: lib/Horde/Imap/Client/Socket.php:4876 +msgid "The mail server was unable to parse the contents of the mail message." +msgstr "Posta sunucusu posta iletisinin içeriğini ayrıştıramadı." + +#: lib/Horde/Imap/Client/Socket.php:4827 +#, php-format +msgid "" +"The mail server was unable to parse the contents of the mail message: %s" +msgstr "Posta sunucusu posta iletisinin içeriğini ayrıştıramadı: %s" + +#: lib/Horde/Imap/Client/Socket.php:4982 +msgid "The metadata item could not be saved because it is too large." +msgstr "Metadata veri öğesi çok büyük olduğu için kaydedilemedi." + +#: lib/Horde/Imap/Client/Socket.php:5000 +msgid "" +"The metadata item could not be saved because the maximum number of " +"annotations has been exceeded." +msgstr "" +"En fazla ek açıklama sayısı aşıldığı için meta veri öğesi kaydedilemedi." + +#: lib/Horde/Imap/Client/Socket.php:4991 +msgid "" +"The metadata item could not be saved because the server does not support " +"private annotations." +msgstr "Sunucu özel notları desteklemediği için meta veri öğesi kaydedilemedi." + +#: lib/Horde/Imap/Client/Socket.php:5110 +msgid "The object could not be created because it already exists." +msgstr "Nesne zaten var olduğu için oluşturulamadı." + +#: lib/Horde/Imap/Client/Socket.php:5119 +msgid "The object could not be deleted because it does not exist." +msgstr "Nesne bulunmadığından silinemedi." + +#: lib/Horde/Imap/Client/Socket.php:5101 +msgid "" +"The operation failed because the quota has been exceeded on the mail server." +msgstr "Posta sunucusunda kota aşıldığı için işlem başarısız oldu." + +#: lib/Horde/Imap/Client/Exception/NoSupportExtension.php:46 +#, php-format +msgid "The server does not support the %s extension." +msgstr "Sunucu %s uzantısını desteklemiyor." + +#: lib/Horde/Imap/Client/Socket.php:5128 +msgid "The special-use attribute requested for the mailbox is not supported." +msgstr "Posta kutusu için istenen özel kullanım özelliği desteklenmiyor." + +#: lib/Horde/Imap/Client/Socket.php:5060 +msgid "" +"There was a temporary issue when attempting this operation. Please try again " +"later." +msgstr "" +"Bu işlemi denerken geçici bir sorun oluştu. Lütfen daha sonra tekrar " +"deneyiniz." + +#: lib/Horde/Imap/Client/Socket.php:723 +#: lib/Horde/Imap/Client/Socket/Pop3.php:379 +msgid "Unexpected response from server when authenticating." +msgstr "Kimlik doğrulama işlemi sırasında sunucu tarafından beklenmeyen yanıt." + +#: lib/Horde/Imap/Client/Socket.php:839 +#: lib/Horde/Imap/Client/Socket/Pop3.php:518 +#, php-format +msgid "Unknown authentication method: %s" +msgstr "Bilinmeyen kimlik doğrulama yöntemi: %s" + +#: lib/Horde/Imap/Client/Socket.php:5051 +msgid "You do not have adequate permissions to carry out this operation." +msgstr "Bu işlemi gerçekleştirmek için yeterli izninizin yok." diff --git a/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/data/migration/1_horde_imap_client_base_tables.php b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/data/migration/1_horde_imap_client_base_tables.php new file mode 100644 index 00000000..008be358 --- /dev/null +++ b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/data/migration/1_horde_imap_client_base_tables.php @@ -0,0 +1,99 @@ + + * @category Horde + * @copyright 2013-2017 Horde LLC + * @ignore + * @license http://www.horde.org/licenses/lgpl21 LGPL 2.1 + * @package Imap_Client + */ +class HordeImapClientBaseTables extends Horde_Db_Migration_Base +{ + public function up() + { + if (in_array('horde_imap_client_data', $this->tables())) { + return; + } + + $t = $this->createTable('horde_imap_client_data', array( + 'autoincrementKey' => 'messageid' + )); + $t->column('hostspec', 'string', array( + 'limit' => 255, + 'null' => false + )); + $t->column('mailbox', 'string', array( + 'limit' => 255, + 'null' => false + )); + $t->column('modified', 'bigint'); + $t->column('port', 'integer', array( + 'null' => false + )); + $t->column('username', 'string', array( + 'limit' => 255, + 'null' => false + )); + $t->end(); + + $this->addIndex( + 'horde_imap_client_data', + array('hostspec', 'mailbox', 'port', 'username') + ); + + $t = $this->createTable('horde_imap_client_message', array( + 'autoincrementKey' => false + )); + $t->column('data', 'binary'); + $t->column('msguid', 'string', array( + 'null' => false + )); + $t->column('messageid', 'bigint', array( + 'null' => false + )); + $t->end(); + + $this->addIndex( + 'horde_imap_client_message', + array('msguid', 'messageid') + ); + + $t = $this->createTable('horde_imap_client_metadata', array( + 'autoincrementKey' => false + )); + $t->column('data', 'binary'); + $t->column('field', 'string', array( + 'null' => false + )); + $t->column('messageid', 'bigint', array( + 'null' => false + )); + $t->end(); + + $this->addIndex( + 'horde_imap_client_metadata', + array('messageid') + ); + } + + public function down() + { + $this->dropTable('horde_imap_client_data'); + $this->dropTable('horde_imap_client_message'); + $this->dropTable('horde_imap_client_metadata'); + } +} diff --git a/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/data/migration/2_horde_imap_client_change_column_name.php b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/data/migration/2_horde_imap_client_change_column_name.php new file mode 100644 index 00000000..a32be590 --- /dev/null +++ b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Imap_Client/data/migration/2_horde_imap_client_change_column_name.php @@ -0,0 +1,42 @@ + + * @category Horde + * @copyright 2014-2017 Horde LLC + * @ignore + * @license http://www.horde.org/licenses/lgpl21 LGPL 2.1 + * @package Imap_Client + */ +class HordeImapClientChangeColumnName extends Horde_Db_Migration_Base +{ + public function up() + { + if (array_key_exists('uid', $this->columns('horde_imap_client_data'))) { + $this->renameColumn('horde_imap_client_data', 'uid', 'messageid'); + } + if (array_key_exists('uid', $this->columns('horde_imap_client_message'))) { + $this->renameColumn('horde_imap_client_message', 'uid', 'messageid'); + } + if (array_key_exists('uid', $this->columns('horde_imap_client_metadata'))) { + $this->renameColumn('horde_imap_client_metadata', 'uid', 'messageid'); + } + } + + public function down() + { + } +} diff --git a/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_ListHeaders/Horde/ListHeaders.php b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_ListHeaders/Horde/ListHeaders.php new file mode 100644 index 00000000..251fda88 --- /dev/null +++ b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_ListHeaders/Horde/ListHeaders.php @@ -0,0 +1,206 @@ + + * @category Horde + * @license http://www.horde.org/licenses/lgpl21 LGPL 2.1 + * @package ListHeaders + */ + +/** + * Class to parse List Header fields (RFC 2369/2919). + * + * @author Michael Slusarz + * @category Horde + * @license http://www.horde.org/licenses/lgpl21 LGPL 2.1 + * @package ListHeaders + */ +class Horde_ListHeaders extends Horde_Mail_Rfc822 +{ + /** + * Returns the list of valid mailing list headers. + * + * @return array The list of valid mailing list headers. + */ + public function headers() + { + return array( + /* RFC 2369 */ + 'list-help' => Horde_ListHeaders_Translation::t("Help"), + 'list-unsubscribe' => Horde_ListHeaders_Translation::t("Unsubscribe"), + 'list-subscribe' => Horde_ListHeaders_Translation::t("Subscribe"), + 'list-owner' => Horde_ListHeaders_Translation::t("Owner"), + 'list-post' => Horde_ListHeaders_Translation::t("Post"), + 'list-archive' => Horde_ListHeaders_Translation::t("Archive"), + /* RFC 2919 */ + 'list-id' => Horde_ListHeaders_Translation::t("Identification") + ); + } + + /** + * Do any mailing list headers exist? + * + * @since 1.2.0 + * + * @param Horde_Mime_Headers $ob Headers object. + * + * @return boolean True if any mailing list headers exist. + */ + public function listHeadersExist(Horde_Mime_Headers $ob) + { + foreach (array_keys($this->headers()) as $hdr) { + if (isset($ob[$hdr])) { + return true; + } + } + + return false; + } + + /** + * Parse a list header. + * + * @param string $id Header ID. + * @param string $value Header value. + * + * @return mixed An array of Horde_ListHeaders_Base objects, a + * Horde_ListHeaders_Id object, or false if unable to + * parse. + */ + public function parse($id, $value) + { + if (!strlen($value)) { + return false; + } + + $this->_data = strval($value); + $this->_datalen = strlen($this->_data); + $this->_params['validate'] = true; + + switch (Horde_String::lower($id)) { + case 'list-archive': + case 'list-help': + case 'list-owner': + case 'list-subscribe': + case 'list-unsubscribe': + return $this->_parseBase(); + + case 'list-id': + return $this->_parseListId(); + + case 'list-post': + return $this->_parseListPost(); + + default: + return false; + } + } + + /** + * Parse a base list header (RFC 2369). + * + * @return array List of Horde_List_Headers_Base objects. + */ + protected function _parseBase() + { + $this->_ptr = 0; + + $out = array(); + + while ($this->_curr() !== false) { + $this->_comments = array(); + + $this->_rfc822SkipLwsp(); + + if ($this->_curr(true) != '<') { + break; + } + + $this->_rfc822SkipLwsp(); + + $url = ''; + while ((($curr = $this->_curr(true)) !== false) && + ($curr != '>')) { + $url .= $curr; + } + + if ($curr != '>') { + return false; + } + + $this->_rfc822SkipLwsp(); + + switch ($this->_curr()) { + case ',': + $this->_rfc822SkipLwsp(true); + break; + + case false: + // No-op + break; + + default: + // RFC 2369 [2] Need to ignore this and all other fields. + break 2; + } + + $out[] = new Horde_ListHeaders_Base(rtrim($url), $this->_comments); + } + + return $out; + } + + /** + * Parse a List-ID (RFC 2919). + * + * @return Horde_ListHeaders_Id Id object. + */ + protected function _parseListId() + { + $this->_ptr = 0; + + $phrase = ''; + $this->_rfc822ParsePhrase($phrase); + + if ($this->_curr(true) != '<') { + return false; + } + + $this->_rfc822ParseDotAtom($listid); + + if ($this->_curr(true) != '>') { + return false; + } + + return new Horde_ListHeaders_Id($listid, $phrase); + } + + /** + * Parse a List-Post header (RFC 2369 [3.4]). + * + * @return array List of Horde_List_Headers_Base objects. + */ + protected function _parseListPost() + { + /* This value can be the special phrase "NO". */ + $this->_comments = array(); + $this->_ptr = 0; + + $this->_rfc822SkipLwsp(); + + $phrase = ''; + $this->_rfc822ParsePhrase($phrase); + + if (strcasecmp(rtrim($phrase), 'NO') !== 0) { + return $this->_parseBase(); + } + + $this->_rfc822SkipLwsp(); + return array(new Horde_ListHeaders_NoPost($this->_comments)); + } + +} diff --git a/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_ListHeaders/Horde/ListHeaders/Base.php b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_ListHeaders/Horde/ListHeaders/Base.php new file mode 100644 index 00000000..1ab1881d --- /dev/null +++ b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_ListHeaders/Horde/ListHeaders/Base.php @@ -0,0 +1,68 @@ + + * @category Horde + * @license http://www.horde.org/licenses/lgpl21 LGPL 2.1 + * @package ListHeaders + */ + +/** + * Object representation of a basic list header (RFC 2369) element. + * + * @author Michael Slusarz + * @category Horde + * @license http://www.horde.org/licenses/lgpl21 LGPL 2.1 + * @package ListHeaders + * + * @property string $comments Comments. + * @property string $url URL. + */ +class Horde_ListHeaders_Base extends Horde_ListHeaders_Object +{ + /** + * Comments. + * + * @var array + */ + protected $_comments = array(); + + /** + * URL. + * + * @var string. + */ + protected $_url; + + /** + * Constructor. + * + * @param string $url URL. + * @param array $comments Comments. + */ + public function __construct($url, array $comments = array()) + { + $this->_url = $url; + $this->_comments = $comments; + } + + /** + */ + public function __get($name) + { + switch ($name) { + case 'comments': + return $this->_comments; + + case 'url': + return $this->_url; + } + } + +} diff --git a/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_ListHeaders/Horde/ListHeaders/Id.php b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_ListHeaders/Horde/ListHeaders/Id.php new file mode 100644 index 00000000..519b93f1 --- /dev/null +++ b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_ListHeaders/Horde/ListHeaders/Id.php @@ -0,0 +1,72 @@ + + * @category Horde + * @license http://www.horde.org/licenses/lgpl21 LGPL 2.1 + * @package ListHeaders + */ + +/** + * Object representation of a List-ID (RFC 2919) element. + * + * @author Michael Slusarz + * @category Horde + * @license http://www.horde.org/licenses/lgpl21 LGPL 2.1 + * @package ListHeaders + * + * @property string $id List ID. + * @property string $label List label. + */ +class Horde_ListHeaders_Id extends Horde_ListHeaders_Object +{ + /** + * List ID. + * + * @var string + */ + protected $_id; + + /** + * List label. + * + * @var string. + */ + protected $_label = null; + + /** + * Constructor. + * + * @param string $id List ID. + * @param string $label List label. + */ + public function __construct($id, $label = null) + { + // RFC 2919 [2]: Limited to 255 characters. + $this->_id = substr($id, 0, 255); + if (strlen($label)) { + // MIME encoding NOT allowed, so it is ignored. + $this->_label = $label; + } + } + + /** + */ + public function __get($name) + { + switch ($name) { + case 'id': + return $this->_id; + + case 'label': + return $this->_label; + } + } + +} diff --git a/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_ListHeaders/Horde/ListHeaders/NoPost.php b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_ListHeaders/Horde/ListHeaders/NoPost.php new file mode 100644 index 00000000..6533a8ad --- /dev/null +++ b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_ListHeaders/Horde/ListHeaders/NoPost.php @@ -0,0 +1,52 @@ + + * @category Horde + * @license http://www.horde.org/licenses/lgpl21 LGPL 2.1 + * @package ListHeaders + */ + +/** + * Object representation of a basic list header (RFC 2369) element. + * + * @author Michael Slusarz + * @category Horde + * @license http://www.horde.org/licenses/lgpl21 LGPL 2.1 + * @package ListHeaders + * + * @property string $comments Comments. + * @property string $url URL. + */ +class Horde_ListHeaders_NoPost extends Horde_ListHeaders_Base +{ + /** + * Constructor. + * + * @param array $comments Comments. + */ + public function __construct(array $comments = array()) + { + $this->_comments = $comments; + } + + /** + */ + public function __get($name) + { + switch ($name) { + case 'comments': + return $this->_comments; + + case 'url': + return null; + } + } + +} diff --git a/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_ListHeaders/Horde/ListHeaders/Object.php b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_ListHeaders/Horde/ListHeaders/Object.php new file mode 100644 index 00000000..6dd7936b --- /dev/null +++ b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_ListHeaders/Horde/ListHeaders/Object.php @@ -0,0 +1,26 @@ + + * @category Horde + * @license http://www.horde.org/licenses/lgpl21 LGPL 2.1 + * @package ListHeaders + */ + +/** + * Object representation of a list header element. + * + * @author Michael Slusarz + * @category Horde + * @license http://www.horde.org/licenses/lgpl21 LGPL 2.1 + * @package ListHeaders + */ +class Horde_ListHeaders_Object +{ +} diff --git a/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_ListHeaders/Horde/ListHeaders/Translation.php b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_ListHeaders/Horde/ListHeaders/Translation.php new file mode 100644 index 00000000..4a40845e --- /dev/null +++ b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_ListHeaders/Horde/ListHeaders/Translation.php @@ -0,0 +1,39 @@ + + * @category Horde + * @copyright 2010-2017 Horde LLC + * @license http://www.horde.org/licenses/lgpl21 LGPL 2.1 + * @package ListHeaders + */ +class Horde_ListHeaders_Translation extends Horde_Translation_Autodetect +{ + /** + * The translation domain + * + * @var string + */ + protected static $_domain = 'Horde_ListHeaders'; + + /** + * The absolute PEAR path to the translations for the default gettext handler. + * + * @var string + */ + protected static $_pearDirectory = '/daten/dev/lam/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_ListHeaders/data'; +} diff --git a/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_ListHeaders/data/locale/Horde_ListHeaders.pot b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_ListHeaders/data/locale/Horde_ListHeaders.pot new file mode 100644 index 00000000..735416b3 --- /dev/null +++ b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_ListHeaders/data/locale/Horde_ListHeaders.pot @@ -0,0 +1,46 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR Horde LLC (http://www.horde.org/) +# This file is distributed under the same license as the Horde_ListHeaders package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Horde_ListHeaders\n" +"Report-Msgid-Bugs-To: dev@lists.horde.org\n" +"POT-Creation-Date: 2015-12-28 17:25+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/ListHeaders.php:38 +msgid "Archive" +msgstr "" + +#: lib/Horde/ListHeaders.php:33 +msgid "Help" +msgstr "" + +#: lib/Horde/ListHeaders.php:40 +msgid "Identification" +msgstr "" + +#: lib/Horde/ListHeaders.php:36 +msgid "Owner" +msgstr "" + +#: lib/Horde/ListHeaders.php:37 +msgid "Post" +msgstr "" + +#: lib/Horde/ListHeaders.php:35 +msgid "Subscribe" +msgstr "" + +#: lib/Horde/ListHeaders.php:34 +msgid "Unsubscribe" +msgstr "" diff --git a/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_ListHeaders/data/locale/da/LC_MESSAGES/Horde_ListHeaders.mo b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_ListHeaders/data/locale/da/LC_MESSAGES/Horde_ListHeaders.mo new file mode 100644 index 0000000000000000000000000000000000000000..189e6af3bfe8c2118e726426a9b069b39c3a6024 GIT binary patch literal 773 zcmZXS!D|yi6vkJrR@W-xxx#o;Wa4aEP1qQz)|3Pq8fxlEkV*D+v*~tbnVCfWBRqQZ zEQo)B=Yr_Tn+Ff#Mewdy!Edr@b8z6t_vY>U_RZ|u?^l;z2UzF9DtHPmf;YggPhbUn z1{c6runc~H5c~o@{~KHef58>7aw-U3fotFr_U})Z@A&}ry*@&{|I1vzLB0Pc)cgNH zVV(7Y1WN#^nfDy@Eb!}0DM7HES;rrk;V7F@xoJ~glu;)sb?3PvQ-(clT^T)|4D8Tk zgSl%@*^@-i=rIi)?9mPi%jB6#S!FT7(fFV8Z3> lh_}Z_Z|74cjA>re8qdc}{AA8>4zyB7@5&zl+kJVQ_y;b@(4znV literal 0 HcmV?d00001 diff --git a/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_ListHeaders/data/locale/da/LC_MESSAGES/Horde_ListHeaders.po b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_ListHeaders/data/locale/da/LC_MESSAGES/Horde_ListHeaders.po new file mode 100644 index 00000000..4b601063 --- /dev/null +++ b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_ListHeaders/data/locale/da/LC_MESSAGES/Horde_ListHeaders.po @@ -0,0 +1,46 @@ +# Danish translations for Horde_ListHeaders package. +# Copyright (C) 2014 Horde LLC (http://www.horde.org/) +# This file is distributed under the same license as the Horde_ListHeaders package. +# Erling Preben Hansen , 2013-2014. +# +msgid "" +msgstr "" +"Project-Id-Version: Horde_ListHeaders\n" +"Report-Msgid-Bugs-To: dev@lists.horde.org\n" +"POT-Creation-Date: 2013-10-17 17:50-0600\n" +"PO-Revision-Date: 2014-03-20 21:07+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/ListHeaders.php:40 +msgid "List-Archive" +msgstr "Liste-Arkivet" + +#: lib/Horde/ListHeaders.php:35 +msgid "List-Help" +msgstr "Liste-Hjælp" + +#: lib/Horde/ListHeaders.php:42 +msgid "List-Id" +msgstr "Liste-Id" + +#: lib/Horde/ListHeaders.php:38 +msgid "List-Owner" +msgstr "Liste-Ejer" + +#: lib/Horde/ListHeaders.php:39 +msgid "List-Post" +msgstr "Liste-Post" + +#: lib/Horde/ListHeaders.php:37 +msgid "List-Subscribe" +msgstr "Liste-Abonnér" + +#: lib/Horde/ListHeaders.php:36 +msgid "List-Unsubscribe" +msgstr "Liste-Afabonnér" diff --git a/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_ListHeaders/data/locale/de/LC_MESSAGES/Horde_ListHeaders.mo b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_ListHeaders/data/locale/de/LC_MESSAGES/Horde_ListHeaders.mo new file mode 100644 index 0000000000000000000000000000000000000000..34e391548eceda517579264a689b0967c5594447 GIT binary patch literal 717 zcmZXRF>ezw6vqt|D2D_RGlSWRDu?qy#OXp%)6yzIjT*IACM4wCy%`w z8!U)Vz{<$V03!<{8xspN6VFLV2A=fOd(ZcOe$V%Q+**4}(AJUL$aCa6@*eT_1-XiR zMb?mS$PMH>avAxF`14=LHRLzq>;E9<7YMoH!T9yXx&96Mo0z{t?|Xhg@9+P($UiOo zXY^P)`{w&#N-iPZe4RJn*WW#}j>*Py3Zx5VMS3|XCr2_9PHIICUMetTpsgcE_0VQU z4uKpiyNm}$pFrkVFK5rdSgc8CSDPGO>`UvqAaXnn4x!SHXcY1$;}MHu${!|Cb2H>&h(dMFfHVJ(y6g|qu3M7t3ADsxbwQT4HI78&R@7Z6-FMs+y&?9ku8@Y;P!fr%n0YRzT)EBwbmKV7bFH38q#B*#;}! W8Sb%@8?Y8gM@^u_MU&2O5&Q+QTDyh- literal 0 HcmV?d00001 diff --git a/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_ListHeaders/data/locale/de/LC_MESSAGES/Horde_ListHeaders.po b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_ListHeaders/data/locale/de/LC_MESSAGES/Horde_ListHeaders.po new file mode 100644 index 00000000..5558a029 --- /dev/null +++ b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_ListHeaders/data/locale/de/LC_MESSAGES/Horde_ListHeaders.po @@ -0,0 +1,46 @@ +# German translations for Horde_ListHeaders package. +# Copyright (C) 2014 Horde LLC (http://www.horde.org/) +# This file is distributed under the same license as the Horde_ListHeaders package. +# Jan Schneider , 2014. +# +msgid "" +msgstr "" +"Project-Id-Version: Horde_ListHeaders\n" +"Report-Msgid-Bugs-To: dev@lists.horde.org\n" +"POT-Creation-Date: 2015-12-28 17:25+0100\n" +"PO-Revision-Date: 2014-05-21 15:38+0200\n" +"Last-Translator: Jan Schneider \n" +"Language-Team: i18n@lists.horde.org\n" +"Language: de\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/ListHeaders.php:38 +msgid "Archive" +msgstr "Archiv" + +#: lib/Horde/ListHeaders.php:33 +msgid "Help" +msgstr "Hilfe" + +#: lib/Horde/ListHeaders.php:40 +msgid "Identification" +msgstr "Identifizierung" + +#: lib/Horde/ListHeaders.php:36 +msgid "Owner" +msgstr "Besitzer" + +#: lib/Horde/ListHeaders.php:37 +msgid "Post" +msgstr "Adresse" + +#: lib/Horde/ListHeaders.php:35 +msgid "Subscribe" +msgstr "Anmelden" + +#: lib/Horde/ListHeaders.php:34 +msgid "Unsubscribe" +msgstr "Abmelden" diff --git a/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_ListHeaders/data/locale/el/LC_MESSAGES/Horde_ListHeaders.mo b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_ListHeaders/data/locale/el/LC_MESSAGES/Horde_ListHeaders.mo new file mode 100644 index 0000000000000000000000000000000000000000..fbbfc2a973e28a9bb6dda461a2a19e9d8ade9e43 GIT binary patch literal 808 zcmZXRJ!lj`6vs!6F|HsYqK(DaDKhKs#nZ6oNn%V);6jdg5eq@~b|;&Wy_scZE^23t zAHA4Du+&ZxLJSv0xKeFqv9U~NWh2;G`DX7lf)9TCzW#6D% zfVEG+0pK$*0DJ)s17Cstz&F6wzXJz>AAp_z1-#ya&>&#*H+y??+u)Bw{t^5!@H>6~ zv)>=uhtLtIp8yY|#csO?+6YR8*|S=+dk2dM9%C|EWJ?rH(KJKTG3A;quqf0_a5Q_D zQ;F(AX>`5aRFPy&isrfc8`q_{LnBS5V{(H^1v3Gj5;CT@YfR}W8pcp{=4d9QCNnBw zF}c!C6lsV6$8>2l1(k9a?Sw02;?!pwWL(l>JGmNa8sL)WpC?|Klzi-$gW(Hjy^`mF zkj&8~W;gEY%Eb4GSF*bDa8FkYl_m`ta+QW!$N-OVEjUxS##$Mb5L`<8(P*TZo5;&f zE#yf%Oeks4uoYnDkMREv`bQIBs+^hWnTg%|`>yAV3$EcylE(cEuAu2XeJ)Ew#w$2l z45gyFI^UQiBfC0#!UZbH1dl|_coN`|CeuzmZObqvlR~ysfO%G=s#>bxURXWN@u@2I z&s3b7\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" +"X-Generator: Poedit 1.7.1\n" + +#: lib/Horde/ListHeaders.php:40 +msgid "Archive" +msgstr "Aρχείο" + +#: lib/Horde/ListHeaders.php:35 +msgid "Help" +msgstr "Βοήθεια" + +#: lib/Horde/ListHeaders.php:42 +msgid "Identification" +msgstr "Ταυτοποίηση" + +#: lib/Horde/ListHeaders.php:38 +msgid "Owner" +msgstr "Ιδιοκτήτης" + +#: lib/Horde/ListHeaders.php:39 +msgid "Post" +msgstr "Δημοσίευση" + +#: lib/Horde/ListHeaders.php:37 +msgid "Subscribe" +msgstr "Εγγραφή" + +#: lib/Horde/ListHeaders.php:36 +msgid "Unsubscribe" +msgstr "Διαγραφή" diff --git a/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_ListHeaders/data/locale/es/LC_MESSAGES/Horde_ListHeaders.mo b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_ListHeaders/data/locale/es/LC_MESSAGES/Horde_ListHeaders.mo new file mode 100644 index 0000000000000000000000000000000000000000..6d42f0e846de31ddac517c68127c8a7c8ea25f54 GIT binary patch literal 764 zcmZXRF>ezw6vqve0*3?=GlSVc#m8MBQMfcHX__iQjT)6J6B2UnUM{XK_R02z=7X^D z8CVb_Qx_N!5+h8ouykhP`2sD7C;jxEt^eQ8_WN>U?IppujNC+?Ay<)Ch>Q2gCFBFL zhI~Y>A)k?p$T!68|3I!FCy4X^L|&gGWF2w-x93;-cbKo^`WUm*eZsts`737U|NeXb z1T$JIuj_+LashGS?&`wzb>1qvI+=+DkOAZc8Kxkun2Lm3p(NRRAwiR|GL}3kCnnKi z0^~rN(|WAcAtaU!Q}z_JK~F>nN~iFAR~S10p5m^z4~5c}jZ7v|wpC_^#VVpHEIK)= zj6ZV@U+K&n@5QXAq3X`IxrK<Z}&hupZrSYy`C+Kq1?Qg>W7J(KT4upuxi^ zsBZ)z>UO!YEY@6_oLi+MI^wc~oQ{3kUGkjM%{h0uQ%X4U!92Q4AD3Lxo=>-OE)zvJ z50gn%b*92Ei@6iwu`(-p1}p|XkEjTn^1rwI(L@xCHyV!mXI~Whf!9;g;%BpXS>P)z z9NBwC&V_8zWX81t+dhbQSo2Kh9x(;Y`gp5U$Sk7GiLl-{FE!8Ej?!}zQCU<=)2_AX zs%+nu^j4dOcUm4<&03M}vP}73!%oEU8%c1Og#gR7P^2#xf@_?5HFTlLHki};7i3w@ ArvLx| literal 0 HcmV?d00001 diff --git a/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_ListHeaders/data/locale/es/LC_MESSAGES/Horde_ListHeaders.po b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_ListHeaders/data/locale/es/LC_MESSAGES/Horde_ListHeaders.po new file mode 100644 index 00000000..c9f4abee --- /dev/null +++ b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_ListHeaders/data/locale/es/LC_MESSAGES/Horde_ListHeaders.po @@ -0,0 +1,47 @@ +# Spanish translations for Horde_ListHeaders package. +# Copyright (C) 2014 Horde LLC (http://www.horde.org/) +# This file is distributed under the same license as the Horde_ListHeaders package. +# Automatically generated, 2014. +# +msgid "" +msgstr "" +"Project-Id-Version: Horde_ListHeaders\n" +"Report-Msgid-Bugs-To: dev@lists.horde.org\n" +"POT-Creation-Date: 2014-05-21 15:36+0200\n" +"PO-Revision-Date: 2014-06-16 09:05+0100\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/ListHeaders.php:40 +msgid "Archive" +msgstr "Archivo" + +#: lib/Horde/ListHeaders.php:35 +msgid "Help" +msgstr "Ayuda" + +#: lib/Horde/ListHeaders.php:42 +msgid "Identification" +msgstr "Identificación" + +#: lib/Horde/ListHeaders.php:38 +msgid "Owner" +msgstr "Propietario" + +#: lib/Horde/ListHeaders.php:39 +msgid "Post" +msgstr "Enviar" + +#: lib/Horde/ListHeaders.php:37 +msgid "Subscribe" +msgstr "Suscribir" + +#: lib/Horde/ListHeaders.php:36 +msgid "Unsubscribe" +msgstr "Desuscribir" diff --git a/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_ListHeaders/data/locale/hu/LC_MESSAGES/Horde_ListHeaders.mo b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_ListHeaders/data/locale/hu/LC_MESSAGES/Horde_ListHeaders.mo new file mode 100644 index 0000000000000000000000000000000000000000..3cb6d2365fe1202f8cf04f92c6b88bbb73f9d898 GIT binary patch literal 795 zcmZvazi$&U6vqve0taGXM#5}~kV7tMOLQTqp|m6-QKRCmy4^59ofDB`5V{} z6D(bjGIV0CSZ)AD7DhJ2z{1SLa|(?RJn3^^KkNJM`PY{#OD_q=dE_ec2)T&7MqGSA z&LJO>CFB!w8TpKyMZO|#{yTC3`GL6lpUCr5ge)Vj{>5oRJk(dHmr&pQ&flWC-tSPa zp}t40qJBfg(s`}xgDE+KxNv?KuJ7`EgrBC4hGGJw1?iZyV~|!1M8vI7l59Vbph-^| zOLnuqiL~eg*^}mE+|z0wBFow_dkETKO+Z^p$MCo#jBNprah7^JFjm^Ku1Q49?q-Q$ zp$cdWll2sBrZjXVC8ZOuw;i$#4fFQw9=8zCO4(mw3OAisTn1fZ{>` literal 0 HcmV?d00001 diff --git a/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_ListHeaders/data/locale/hu/LC_MESSAGES/Horde_ListHeaders.po b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_ListHeaders/data/locale/hu/LC_MESSAGES/Horde_ListHeaders.po new file mode 100644 index 00000000..47e54353 --- /dev/null +++ b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_ListHeaders/data/locale/hu/LC_MESSAGES/Horde_ListHeaders.po @@ -0,0 +1,45 @@ +# Hungarian translations for Horde_ListHeaders package. +# Copyright (C) 2014 Horde LLC (http://www.horde.org/) +# This file is distributed under the same license as the Horde_ListHeaders package. +# +msgid "" +msgstr "" +"Project-Id-Version: Horde_ListHeaders \n" +"Report-Msgid-Bugs-To: dev@lists.horde.org\n" +"POT-Creation-Date: 2014-05-21 15:36+0200\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/ListHeaders.php:40 +msgid "Archive" +msgstr "Archív" + +#: lib/Horde/ListHeaders.php:35 +msgid "Help" +msgstr "Segítség" + +#: lib/Horde/ListHeaders.php:42 +msgid "Identification" +msgstr "Azonosítás" + +#: lib/Horde/ListHeaders.php:38 +msgid "Owner" +msgstr "Tulajdonos" + +#: lib/Horde/ListHeaders.php:39 +msgid "Post" +msgstr "Küldés" + +#: lib/Horde/ListHeaders.php:37 +msgid "Subscribe" +msgstr "Használatba vétel (subscribe)" + +#: lib/Horde/ListHeaders.php:36 +msgid "Unsubscribe" +msgstr "A használatba vétel megszüntetése (unsubscribe)" diff --git a/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_ListHeaders/data/locale/ja/LC_MESSAGES/Horde_ListHeaders.mo b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_ListHeaders/data/locale/ja/LC_MESSAGES/Horde_ListHeaders.mo new file mode 100644 index 0000000000000000000000000000000000000000..d26ccb8d09eaab17eaa0ea37deaa0fdc322d3ab5 GIT binary patch literal 749 zcmZXRzi-n(6vq!J1&jm|GsErG89OCWa0x2(2Z?CZsJMs$30>@Ka>4Ogcjo|G6$^>} z0sI(R2Gog&i3!masf;i%Ar^}&h=rMncS)c^Jo%&du9!_11UNN7&E&XGjmPP$gawu&3g=0S(Kn!$YRYmctAB5F>DfszCB4L+i2n8#korut1YqNNzEypvS{iAwza|g)3cUG=!?P#u6blsjC(b$+fhl zh%Y=Gvfg|IDrL7#hb?5wYOMNXL9)?wvPd=aaKUje5~oNCE_RFFY-z?RI1UKO8tZX0 z@gH4@I3-*tc(d+|a|v`SRB7T%8mowEAz?c%MVI3nyqijjFSkeOyrzMzReCRNQX9ff zas@i$R!Uop_>6Wv%-wSQ-@1P^9_~=9UaK!1zJhBz)`EyNyeIJ=CU6nW9_R~6M0q@i zgEp0l>B_plOv;Bkv*!krWGN0r$m5oW%T2DWMg+S?WLe0r@^GAtQdM#1@HnhEbJlHg zox#rEoTH+=OPecyR8iGBl2zS!mf literal 0 HcmV?d00001 diff --git a/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_ListHeaders/data/locale/ja/LC_MESSAGES/Horde_ListHeaders.po b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_ListHeaders/data/locale/ja/LC_MESSAGES/Horde_ListHeaders.po new file mode 100644 index 00000000..5a1b6f61 --- /dev/null +++ b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_ListHeaders/data/locale/ja/LC_MESSAGES/Horde_ListHeaders.po @@ -0,0 +1,47 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2014 Horde LLC (http://www.horde.org/) +# This file is distributed under the same license as the Horde_ListHeaders package. +# Hiromi Kimura +# +msgid "" +msgstr "" +"Project-Id-Version: Horde_ListHeaders\n" +"Report-Msgid-Bugs-To: dev@lists.horde.org\n" +"POT-Creation-Date: 2014-05-21 15:36+0200\n" +"PO-Revision-Date: 2014-06-06 22:31+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.6.5\n" + +#: lib/Horde/ListHeaders.php:40 +msgid "Archive" +msgstr "アーカイブ" + +#: lib/Horde/ListHeaders.php:35 +msgid "Help" +msgstr "ヘルプ" + +#: lib/Horde/ListHeaders.php:42 +msgid "Identification" +msgstr "ID" + +#: lib/Horde/ListHeaders.php:38 +msgid "Owner" +msgstr "所有者" + +#: lib/Horde/ListHeaders.php:39 +msgid "Post" +msgstr "ポスト" + +#: lib/Horde/ListHeaders.php:37 +msgid "Subscribe" +msgstr "購読" + +#: lib/Horde/ListHeaders.php:36 +msgid "Unsubscribe" +msgstr "非購読" diff --git a/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_ListHeaders/data/locale/tr/LC_MESSAGES/Horde_ListHeaders.mo b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_ListHeaders/data/locale/tr/LC_MESSAGES/Horde_ListHeaders.mo new file mode 100644 index 0000000000000000000000000000000000000000..c3a3875cd412ba0a9278e7e146c77c755d977a44 GIT binary patch literal 728 zcmZvYJC74F5XTK1uSG(Ln!%Z0wco4csT- z6I>UGf|4djMMse!proOsqoSdvVw{|~hLL`r8GHVov431&IwEM7kQ>M|`eFp60eL~1DM%|0M8d65l5}25(4?!3C3|Jh zBwF-<>`U`6?rQY{63dz?dkos3CZY|cQ+VDI#x{Vbxa;jgp|oXflZlko%gnG?MKp!c zdX81b?>mLBbmnzCG27HI@6NWkg@{&yaD@fSELfxAaulrG3GM{}7P4I!3D@zzb>Z5g zuEk|m@(frEd>GN$B%Y3GeKy&u)B6US!!QM02kXL?KBT2@^#iZnY;T{wC-ehvQ%Q?I z!{WmNN3!tB-Ys%2WR)g;t_|4Qe!Rn0PwO<7<^VL?mWfJ*%p$tl6V`je9s+(Tw@OE} zs~{DYhW@G_R=gHBc)!!-i({{wmzw8nN9m!7s4V8Gsa2|U5!P-=db38u+f@`Vo{6(* yk8J2qZ^Vc^, YEAR. +# +msgid "" +msgstr "" +"Project-Id-Version: Horde_ListHeaders\n" +"Report-Msgid-Bugs-To: dev@lists.horde.org\n" +"POT-Creation-Date: 2017-06-09 16:07+0300\n" +"PO-Revision-Date: 2017-06-09 16:19+0300\n" +"Language-Team: İTÜ BİDB \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Generator: Poedit 1.8.12\n" +"Last-Translator: \n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" +"Language: tr\n" + +#: lib/Horde/ListHeaders.php:38 +msgid "Archive" +msgstr "Arşiv" + +#: lib/Horde/ListHeaders.php:33 +msgid "Help" +msgstr "Yardım" + +#: lib/Horde/ListHeaders.php:40 +msgid "Identification" +msgstr "Kimlik" + +#: lib/Horde/ListHeaders.php:36 +msgid "Owner" +msgstr "Sahip" + +#: lib/Horde/ListHeaders.php:37 +msgid "Post" +msgstr "İleti" + +#: lib/Horde/ListHeaders.php:35 +msgid "Subscribe" +msgstr "Üye Ol" + +#: lib/Horde/ListHeaders.php:34 +msgid "Unsubscribe" +msgstr "Üyelikten Çık" diff --git a/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mail/Horde/Mail/Exception.php b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mail/Horde/Mail/Exception.php new file mode 100644 index 00000000..83970ce0 --- /dev/null +++ b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mail/Horde/Mail/Exception.php @@ -0,0 +1,25 @@ + + * @category Horde + * @copyright 2010-2017 Horde LLC + * @license http://www.horde.org/licenses/bsd New BSD License + * @package Mail + */ +class Horde_Mail_Exception extends Horde_Exception_Wrapped +{ +} diff --git a/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mail/Horde/Mail/Mbox/Parse.php b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mail/Horde/Mail/Mbox/Parse.php new file mode 100644 index 00000000..a25b384c --- /dev/null +++ b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mail/Horde/Mail/Mbox/Parse.php @@ -0,0 +1,252 @@ + + * @category Horde + * @copyright 2011-2017 Horde LLC + * @license http://www.horde.org/licenses/bsd New BSD License + * @package Mail + * @since 2.5.0 + */ +class Horde_Mail_Mbox_Parse +implements ArrayAccess, Countable, Iterator +{ + /** + * Data stream. + * + * @var resource + */ + protected $_data; + + /** + * Parsed data. Each entry is an array containing 3 keys: + * - date: (mixed) Date information, in DateTime object. Null if date + * cannot be parsed. False if message is not MBOX data. + * - start: (integer) Start boundary. + * + * @var array + */ + protected $_parsed = array(); + + /** + * Constructor. + * + * @param mixed $data The mbox data. Either a resource or a filename + * as interpreted by fopen() (string). + * @param integer $limit Limit to this many messages; additional messages + * will throw an exception. + * + * @throws Horde_Mail_Parse_Exception + */ + public function __construct($data, $limit = null) + { + $this->_data = is_resource($data) + ? $data + : @fopen($data, 'r'); + + if ($this->_data === false) { + throw new Horde_Mail_Exception( + Horde_Mail_Translation::t("Could not parse mailbox data.") + ); + } + + rewind($this->_data); + + $i = 0; + $last_line = null; + /* Is this a MBOX format file? */ + $mbox = false; + + while (!feof($this->_data)) { + if (is_null($last_line)) { + $start = ftell($this->_data); + } + + $line = fgets($this->_data); + + if (is_null($last_line)) { + ltrim($line); + } + + if (substr($line, 0, 5) == 'From ') { + if (is_null($last_line)) { + /* This file is in MBOX format. */ + $mbox = true; + } elseif (!$mbox || (trim($last_line) !== '')) { + continue; + } + + if ($limit && ($i++ > $limit)) { + throw new Horde_Mail_Exception( + sprintf( + Horde_Mail_Translation::t("Imported mailbox contains more than enforced limit of %u messages."), + $limit + ) + ); + } + + $from_line = explode(' ', $line, 3); + try { + $date = new DateTime($from_line[2]); + } catch (Exception $e) { + $date = null; + } + + $this->_parsed[] = array( + 'date' => $date, + 'start' => ftell($this->_data) + ); + } + + /* Strip all empty lines before first data. */ + if (!is_null($last_line) || (trim($line) !== '')) { + $last_line = $line; + } + } + + /* This was a single message, not a MBOX file. */ + if (empty($this->_parsed)) { + $this->_parsed[] = array( + 'date' => false, + 'start' => $start + ); + } + } + + /* ArrayAccess methods. */ + + /** + */ + public function offsetExists($offset) + { + return isset($this->_parsed[$offset]); + } + + /** + */ + public function offsetGet($offset) + { + if (!isset($this->_parsed[$offset])) { + return null; + } + + $p = $this->_parsed[$offset]; + $end = isset($this->_parsed[$offset + 1]) + ? $this->_parsed[$offset + 1]['start'] + : null; + $fd = fopen('php://temp', 'w+'); + + fseek($this->_data, $p['start']); + while (!feof($this->_data)) { + $line = fgets($this->_data); + if ($end && (ftell($this->_data) >= $end)) { + break; + } + + fwrite( + $fd, + (($p['date'] !== false) && substr($line, 0, 6) == '>From ') + ? substr($line, 1) + : $line + ); + } + + $out = array( + 'data' => $fd, + 'date' => ($p['date'] === false) ? null : $p['date'], + 'size' => intval(ftell($fd)) + ); + rewind($fd); + + return $out; + } + + /** + */ + public function offsetSet($offset, $value) + { + // NOOP + } + + /** + */ + public function offsetUnset($offset) + { + // NOOP + } + + /* Countable methods. */ + + /** + * Index count. + * + * @return integer The number of messages. + */ + public function count() + { + return count($this->_parsed); + } + + /* Magic methods. */ + + /** + * String representation of the object. + * + * @return string String representation. + */ + public function __toString() + { + rewind($this->_data); + return stream_get_contents($this->_data); + } + + /* Iterator methods. */ + + public function current() + { + $key = $this->key(); + + return is_null($key) + ? null + : $this[$key]; + } + + public function key() + { + return key($this->_parsed); + } + + public function next() + { + if ($this->valid()) { + next($this->_parsed); + } + } + + public function rewind() + { + reset($this->_parsed); + } + + public function valid() + { + return !is_null($this->key()); + } + +} diff --git a/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mail/Horde/Mail/Rfc822.php b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mail/Horde/Mail/Rfc822.php new file mode 100644 index 00000000..9b5eafa3 --- /dev/null +++ b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mail/Horde/Mail/Rfc822.php @@ -0,0 +1,896 @@ + + * + * @category Horde + * @copyright 2001-2010 Richard Heyes + * @copyright 2002-2011 Timo Sirainen + * @copyright 2011-2017 Horde LLC + * @license http://www.horde.org/licenses/bsd New BSD License + * @package Mail + */ + +/** + * RFC 822/2822/3490/5322 Email parser/validator. + * + * @author Richard Heyes + * @author Chuck Hagenbuch + * @author Michael Slusarz + * @author Timo Sirainen + * @category Horde + * @copyright 2001-2010 Richard Heyes + * @copyright 2002-2011 Timo Sirainen + * @copyright 2011-2017 Horde LLC + * @license http://www.horde.org/licenses/bsd New BSD License + * @package Mail + */ +class Horde_Mail_Rfc822 +{ + /** + * Valid atext characters. + * + * @deprecated + * @since 2.0.3 + */ + const ATEXT = '!#$%&\'*+-./0123456789=?ABCDEFGHIJKLMNOPQRSTUVWXYZ^_`abcdefghijklmnopqrstuvwxyz{|}~'; + + /** + * Excluded (in ASCII decimal): 0-8, 10-31, 34, 40-41, 44, 58-60, 62, 64, + * 91-93, 127 + * + * @since 2.0.3 + */ + const ENCODE_FILTER = "\0\1\2\3\4\5\6\7\10\12\13\14\15\16\17\20\21\22\23\24\25\26\27\30\31\32\33\34\35\36\37\"(),:;<>@[\\]\177"; + + /** + * The address string to parse. + * + * @var string + */ + protected $_data; + + /** + * Length of the address string. + * + * @var integer + */ + protected $_datalen; + + /** + * Comment cache. + * + * @var string + */ + protected $_comments = array(); + + /** + * List object to return in parseAddressList(). + * + * @var Horde_Mail_Rfc822_List + */ + protected $_listob; + + /** + * Configuration parameters. + * + * @var array + */ + protected $_params = array(); + + /** + * Data pointer. + * + * @var integer + */ + protected $_ptr; + + /** + * Starts the whole process. + * + * @param mixed $address The address(es) to validate. Either a string, + * a Horde_Mail_Rfc822_Object, or an array of + * strings and/or Horde_Mail_Rfc822_Objects. + * @param array $params Optional parameters: + * - default_domain: (string) Default domain/host. + * DEFAULT: None + * - group: (boolean) Return a GroupList object instead of a List object? + * DEFAULT: false + * - limit: (integer) Stop processing after this many addresses. + * DEFAULT: No limit (0) + * - validate: (mixed) Strict validation of personal part data? If + * false, attempts to allow non-ASCII characters and + * non-quoted strings in the personal data, and will + * silently abort if an unparseable address is found. + * If true, does strict RFC 5322 (ASCII-only) parsing. If + * 'eai' (@since 2.5.0), allows RFC 6532 (EAI/UTF-8) + * addresses. + * DEFAULT: false + * + * @return Horde_Mail_Rfc822_List A list object. + * + * @throws Horde_Mail_Exception + */ + public function parseAddressList($address, array $params = array()) + { + if ($address instanceof Horde_Mail_Rfc822_List) { + return $address; + } + + if (empty($params['limit'])) { + $params['limit'] = -1; + } + + $this->_params = array_merge(array( + 'default_domain' => null, + 'validate' => false + ), $params); + + $this->_listob = empty($this->_params['group']) + ? new Horde_Mail_Rfc822_List() + : new Horde_Mail_Rfc822_GroupList(); + + if (!is_array($address)) { + $address = array($address); + } + + $tmp = array(); + foreach ($address as $val) { + if ($val instanceof Horde_Mail_Rfc822_Object) { + $this->_listob->add($val); + } else { + $tmp[] = rtrim(trim($val), ','); + } + } + + if (!empty($tmp)) { + $this->_data = implode(',', $tmp); + $this->_datalen = strlen($this->_data); + $this->_ptr = 0; + + $this->_parseAddressList(); + } + + $ret = $this->_listob; + unset($this->_listob); + + return $ret; + } + + /** + * Quotes and escapes the given string if necessary using rules contained + * in RFC 2822 [3.2.5]. + * + * @param string $str The string to be quoted and escaped. + * @param string $type Either 'address', 'comment' (@since 2.6.0), or + * 'personal'. + * + * @return string The correctly quoted and escaped string. + */ + public function encode($str, $type = 'address') + { + switch ($type) { + case 'comment': + // RFC 5322 [3.2.2]: Filter out non-printable US-ASCII and ( ) \ + $filter = "\0\1\2\3\4\5\6\7\10\12\13\14\15\16\17\20\21\22\23\24\25\26\27\30\31\32\33\34\35\36\37\50\51\134\177"; + break; + + case 'personal': + // RFC 2822 [3.4]: Period not allowed in display name + $filter = self::ENCODE_FILTER . '.'; + break; + + case 'address': + default: + // RFC 2822 [3.4.1]: (HTAB, SPACE) not allowed in address + $filter = self::ENCODE_FILTER . "\11\40"; + break; + } + + // Strip double quotes if they are around the string already. + // If quoted, we know that the contents are already escaped, so + // unescape now. + $str = trim($str); + if ($str && ($str[0] === '"') && (substr($str, -1) === '"')) { + $str = stripslashes(substr($str, 1, -1)); + } + + return (strcspn($str, $filter) != strlen($str)) + ? '"' . addcslashes($str, '\\"') . '"' + : $str; + } + + /** + * If an email address has no personal information, get rid of any angle + * brackets (<>) around it. + * + * @param string $address The address to trim. + * + * @return string The trimmed address. + */ + public function trimAddress($address) + { + $address = trim($address); + + return (($address[0] == '<') && (substr($address, -1) == '>')) + ? substr($address, 1, -1) + : $address; + } + + /* RFC 822 parsing methods. */ + + /** + * address-list = (address *("," address)) / obs-addr-list + */ + protected function _parseAddressList() + { + $limit = $this->_params['limit']; + + while (($this->_curr() !== false) && ($limit-- !== 0)) { + try { + $this->_parseAddress(); + } catch (Horde_Mail_Exception $e) { + if ($this->_params['validate']) { + throw $e; + } + ++$this->_ptr; + } + + switch ($this->_curr()) { + case ',': + $this->_rfc822SkipLwsp(true); + break; + + case false: + // No-op + break; + + default: + if ($this->_params['validate']) { + throw new Horde_Mail_Exception('Error when parsing address list.'); + } + break; + } + } + } + + /** + * address = mailbox / group + */ + protected function _parseAddress() + { + $start = $this->_ptr; + if (!$this->_parseGroup()) { + $this->_ptr = $start; + if ($mbox = $this->_parseMailbox()) { + $this->_listob->add($mbox); + } + } + } + + /** + * group = display-name ":" [mailbox-list / CFWS] ";" [CFWS] + * display-name = phrase + * + * @return boolean True if a group was parsed. + * + * @throws Horde_Mail_Exception + */ + protected function _parseGroup() + { + $this->_rfc822ParsePhrase($groupname); + + if ($this->_curr(true) != ':') { + return false; + } + + $addresses = new Horde_Mail_Rfc822_GroupList(); + + $this->_rfc822SkipLwsp(); + + while (($chr = $this->_curr()) !== false) { + if ($chr == ';') { + ++$this->_ptr; + + if (count($addresses)) { + $this->_listob->add(new Horde_Mail_Rfc822_Group($groupname, $addresses)); + } + + return true; + } + + /* mailbox-list = (mailbox *("," mailbox)) / obs-mbox-list */ + $addresses->add($this->_parseMailbox()); + + switch ($this->_curr()) { + case ',': + $this->_rfc822SkipLwsp(true); + break; + + case ';': + // No-op + break; + + default: + break 2; + } + } + + throw new Horde_Mail_Exception('Error when parsing group.'); + } + + /** + * mailbox = name-addr / addr-spec + * + * @return mixed Mailbox object if mailbox was parsed, or false. + */ + protected function _parseMailbox() + { + $this->_comments = array(); + $start = $this->_ptr; + + if (!($ob = $this->_parseNameAddr())) { + $this->_comments = array(); + $this->_ptr = $start; + $ob = $this->_parseAddrSpec(); + } + + if ($ob) { + $ob->comment = $this->_comments; + } + + return $ob; + } + + /** + * name-addr = [display-name] angle-addr + * display-name = phrase + * + * @return mixed Mailbox object, or false. + */ + protected function _parseNameAddr() + { + $this->_rfc822ParsePhrase($personal); + + if ($ob = $this->_parseAngleAddr()) { + $ob->personal = $personal; + return $ob; + } + + return false; + } + + /** + * addr-spec = local-part "@" domain + * + * @return mixed Mailbox object. + * + * @throws Horde_Mail_Exception + */ + protected function _parseAddrSpec() + { + $ob = new Horde_Mail_Rfc822_Address(); + $ob->mailbox = $this->_parseLocalPart(); + + if ($this->_curr() == '@') { + try { + $this->_rfc822ParseDomain($host); + if (strlen($host)) { + $ob->host = $host; + } + } catch (Horde_Mail_Exception $e) { + if (!empty($this->_params['validate'])) { + throw $e; + } + } + } + + if (is_null($ob->host)) { + if (!is_null($this->_params['default_domain'])) { + $ob->host = $this->_params['default_domain']; + } elseif (!empty($this->_params['validate'])) { + throw new Horde_Mail_Exception('Address is missing domain.'); + } + } + + return $ob; + } + + /** + * local-part = dot-atom / quoted-string / obs-local-part + * obs-local-part = word *("." word) + * + * @return string The local part. + * + * @throws Horde_Mail_Exception + */ + protected function _parseLocalPart() + { + if (($curr = $this->_curr()) === false) { + throw new Horde_Mail_Exception('Error when parsing local part.'); + } + + if ($curr == '"') { + $this->_rfc822ParseQuotedString($str); + } else { + $this->_rfc822ParseDotAtom($str, ',;@'); + } + + return $str; + } + + /** + * "<" [ "@" route ":" ] local-part "@" domain ">" + * + * @return mixed Mailbox object, or false. + * + * @throws Horde_Mail_Exception + */ + protected function _parseAngleAddr() + { + if ($this->_curr() != '<') { + return false; + } + + $this->_rfc822SkipLwsp(true); + + if ($this->_curr() == '@') { + // Route information is ignored. + $this->_parseDomainList(); + if ($this->_curr() != ':') { + throw new Horde_Mail_Exception('Invalid route.'); + } + + $this->_rfc822SkipLwsp(true); + } + + $ob = $this->_parseAddrSpec(); + + if ($this->_curr() != '>') { + throw new Horde_Mail_Exception('Error when parsing angle address.'); + } + + $this->_rfc822SkipLwsp(true); + + return $ob; + } + + /** + * obs-domain-list = "@" domain *(*(CFWS / "," ) [CFWS] "@" domain) + * + * @return array Routes. + * + * @throws Horde_Mail_Exception + */ + protected function _parseDomainList() + { + $route = array(); + + while ($this->_curr() !== false) { + $this->_rfc822ParseDomain($str); + $route[] = '@' . $str; + + $this->_rfc822SkipLwsp(); + if ($this->_curr() != ',') { + return $route; + } + ++$this->_ptr; + } + + throw new Horde_Mail_Exception('Invalid domain list.'); + } + + /* RFC 822 parsing methods. */ + + /** + * phrase = 1*word / obs-phrase + * word = atom / quoted-string + * obs-phrase = word *(word / "." / CFWS) + * + * @param string &$phrase The phrase data. + * + * @throws Horde_Mail_Exception + */ + protected function _rfc822ParsePhrase(&$phrase) + { + $curr = $this->_curr(); + if (($curr === false) || ($curr == '.')) { + throw new Horde_Mail_Exception('Error when parsing a group.'); + } + + do { + if ($curr == '"') { + $this->_rfc822ParseQuotedString($phrase); + } else { + $this->_rfc822ParseAtomOrDot($phrase); + } + + $curr = $this->_curr(); + if (($curr != '"') && + ($curr != '.') && + !$this->_rfc822IsAtext($curr)) { + break; + } + + $phrase .= ' '; + } while ($this->_ptr < $this->_datalen); + + $this->_rfc822SkipLwsp(); + } + + /** + * @param string &$phrase The quoted string data. + * + * @throws Horde_Mail_Exception + */ + protected function _rfc822ParseQuotedString(&$str) + { + if ($this->_curr(true) != '"') { + throw new Horde_Mail_Exception('Error when parsing a quoted string.'); + } + + while (($chr = $this->_curr(true)) !== false) { + switch ($chr) { + case '"': + $this->_rfc822SkipLwsp(); + return; + + case "\n": + /* Folding whitespace, remove the (CR)LF. */ + if (substr($str, -1) == "\r") { + $str = substr($str, 0, -1); + } + continue 2; + + case '\\': + if (($chr = $this->_curr(true)) === false) { + break 2; + } + break; + } + + $str .= $chr; + } + + /* Missing trailing '"', or partial quoted character. */ + throw new Horde_Mail_Exception('Error when parsing a quoted string.'); + } + + /** + * dot-atom = [CFWS] dot-atom-text [CFWS] + * dot-atom-text = 1*atext *("." 1*atext) + * + * atext = ; Any character except controls, SP, and specials. + * + * For RFC-822 compatibility allow LWSP around '.'. + * + * + * @param string &$str The atom/dot data. + * @param string $validate Use these characters as delimiter. + * + * @throws Horde_Mail_Exception + */ + protected function _rfc822ParseDotAtom(&$str, $validate = null) + { + $valid = false; + + while ($this->_ptr < $this->_datalen) { + $chr = $this->_data[$this->_ptr]; + + /* TODO: Optimize by duplicating rfc822IsAtext code here */ + if ($this->_rfc822IsAtext($chr, $validate)) { + $str .= $chr; + ++$this->_ptr; + } elseif (!$valid) { + throw new Horde_Mail_Exception('Error when parsing dot-atom.'); + } else { + $this->_rfc822SkipLwsp(); + + if ($this->_curr() != '.') { + return; + } + $str .= $chr; + + $this->_rfc822SkipLwsp(true); + } + + $valid = true; + } + } + + /** + * atom = [CFWS] 1*atext [CFWS] + * atext = ; Any character except controls, SP, and specials. + * + * This method doesn't just silently skip over WS. + * + * @param string &$str The atom/dot data. + * + * @throws Horde_Mail_Exception + */ + protected function _rfc822ParseAtomOrDot(&$str) + { + while ($this->_ptr < $this->_datalen) { + $chr = $this->_data[$this->_ptr]; + if (($chr != '.') && + /* TODO: Optimize by duplicating rfc822IsAtext code here */ + !$this->_rfc822IsAtext($chr, ',<:')) { + $this->_rfc822SkipLwsp(); + if (!$this->_params['validate']) { + $str = trim($str); + } + return; + } + + $str .= $chr; + ++$this->_ptr; + } + } + + /** + * domain = dot-atom / domain-literal / obs-domain + * domain-literal = [CFWS] "[" *([FWS] dcontent) [FWS] "]" [CFWS] + * obs-domain = atom *("." atom) + * + * @param string &$str The domain string. + * + * @throws Horde_Mail_Exception + */ + protected function _rfc822ParseDomain(&$str) + { + if ($this->_curr(true) != '@') { + throw new Horde_Mail_Exception('Error when parsing domain.'); + } + + $this->_rfc822SkipLwsp(); + + if ($this->_curr() == '[') { + $this->_rfc822ParseDomainLiteral($str); + } else { + $this->_rfc822ParseDotAtom($str, ';,> '); + } + } + + /** + * domain-literal = [CFWS] "[" *([FWS] dcontent) [FWS] "]" [CFWS] + * dcontent = dtext / quoted-pair + * dtext = NO-WS-CTL / ; Non white space controls + * %d33-90 / ; The rest of the US-ASCII + * %d94-126 ; characters not including "[", + * ; "]", or "\" + * + * @param string &$str The domain string. + * + * @throws Horde_Mail_Exception + */ + protected function _rfc822ParseDomainLiteral(&$str) + { + if ($this->_curr(true) != '[') { + throw new Horde_Mail_Exception('Error parsing domain literal.'); + } + + while (($chr = $this->_curr(true)) !== false) { + switch ($chr) { + case '\\': + if (($chr = $this->_curr(true)) === false) { + break 2; + } + break; + + case ']': + $this->_rfc822SkipLwsp(); + return; + } + + $str .= $chr; + } + + throw new Horde_Mail_Exception('Error parsing domain literal.'); + } + + /** + * @param boolean $advance Advance cursor? + * + * @throws Horde_Mail_Exception + */ + protected function _rfc822SkipLwsp($advance = false) + { + if ($advance) { + ++$this->_ptr; + } + + while (($chr = $this->_curr()) !== false) { + switch ($chr) { + case ' ': + case "\n": + case "\r": + case "\t": + ++$this->_ptr; + continue 2; + + case '(': + $this->_rfc822SkipComment(); + break; + + default: + return; + } + } + } + + /** + * @throws Horde_Mail_Exception + */ + protected function _rfc822SkipComment() + { + if ($this->_curr(true) != '(') { + throw new Horde_Mail_Exception('Error when parsing a comment.'); + } + + $comment = ''; + $level = 1; + + while (($chr = $this->_curr(true)) !== false) { + switch ($chr) { + case '(': + ++$level; + continue 2; + + case ')': + if (--$level == 0) { + $this->_comments[] = $comment; + return; + } + break; + + case '\\': + if (($chr = $this->_curr(true)) === false) { + break 2; + } + break; + } + + $comment .= $chr; + } + + throw new Horde_Mail_Exception('Error when parsing a comment.'); + } + + /** + * Check if data is an atom. + * + * @param string $chr The character to check. + * @param string $validate If in non-validate mode, use these characters + * as the non-atom delimiters. + * + * @return boolean True if a valid atom. + */ + protected function _rfc822IsAtext($chr, $validate = null) + { + if (!$this->_params['validate'] && !is_null($validate)) { + return strcspn($chr, $validate); + } + + $ord = ord($chr); + + /* UTF-8 characters check. */ + if ($ord > 127) { + return ($this->_params['validate'] === 'eai'); + } + + /* Check for DISALLOWED characters under both RFCs 5322 and 6532. */ + + /* Unprintable characters && [SPACE] */ + if ($ord <= 32) { + return false; + } + + /* "(),:;<>@[\] [DEL] */ + switch ($ord) { + case 34: + case 40: + case 41: + case 44: + case 58: + case 59: + case 60: + case 62: + case 64: + case 91: + case 92: + case 93: + case 127: + return false; + } + + return true; + } + + /* Helper methods. */ + + /** + * Return current character. + * + * @param boolean $advance If true, advance the cursor. + * + * @return string The current character (false if EOF reached). + */ + protected function _curr($advance = false) + { + return ($this->_ptr >= $this->_datalen) + ? false + : $this->_data[$advance ? $this->_ptr++ : $this->_ptr]; + } + + /* Other public methods. */ + + /** + * Returns an approximate count of how many addresses are in the string. + * This is APPROXIMATE as it only splits based on a comma which has no + * preceding backslash. + * + * @param string $data Addresses to count. + * + * @return integer Approximate count. + */ + public function approximateCount($data) + { + return count(preg_split('/(?@. This can be sufficient for most people. + * + * Optional stricter mode can be utilized which restricts mailbox + * characters allowed to: alphanumeric, full stop, hyphen, and underscore. + * + * @param string $data Address to check. + * @param boolean $strict Strict check? + * + * @return mixed False if it fails, an indexed array username/domain if + * it matches. + */ + public function isValidInetAddress($data, $strict = false) + { + $regex = $strict + ? '/^([.0-9a-z_+-]+)@(([0-9a-z-]+\.)+[0-9a-z]{2,})$/i' + : '/^([*+!.&#$|\'\\%\/0-9a-z^_`{}=?~:-]+)@(([0-9a-z-]+\.)+[0-9a-z]{2,})$/i'; + + return preg_match($regex, trim($data), $matches) + ? array($matches[1], $matches[2]) + : false; + } + +} diff --git a/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mail/Horde/Mail/Rfc822/Address.php b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mail/Horde/Mail/Rfc822/Address.php new file mode 100644 index 00000000..585f460e --- /dev/null +++ b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mail/Horde/Mail/Rfc822/Address.php @@ -0,0 +1,242 @@ + + * @category Horde + * @copyright 2012-2017 Horde LLC + * @license http://www.horde.org/licenses/bsd New BSD License + * @package Mail + * + * @property-read string $bare_address The bare mailbox@host address. + * @property-read string $bare_address_idn The bare mailbox@host address (IDN + * encoded). (@since 2.1.0) + * @property-read boolean $eai Returns true if the local (mailbox) address + * part requires EAI (UTF-8) support. + * (@since 2.5.0) + * @property-read string $encoded The full MIME/IDN encoded address (UTF-8). + * @property string $host Returns the host part (UTF-8). + * @property-read string $host_idn Returns the IDN encoded host part. + * @property-read string $label The shorthand label for this address. + * @property string $personal The personal part (UTF-8). + * @property-read string $personal_encoded The MIME encoded personal part + * (UTF-8). + * @property-read boolean $valid Returns true if there is enough information + * in object to create a valid address. + */ +class Horde_Mail_Rfc822_Address extends Horde_Mail_Rfc822_Object +{ + /** + * Comments associated with the personal phrase. + * + * @var array + */ + public $comment = array(); + + /** + * Local-part of the address (UTF-8). + * + * @var string + */ + public $mailbox = null; + + /** + * Hostname of the address. + * + * @var string + */ + protected $_host = null; + + /** + * Personal part of the address. + * + * @var string + */ + protected $_personal = null; + + /** + * Constructor. + * + * @param string $address If set, address is parsed and used as the + * object address. Address is not validated; + * first e-mail address parsed is used. + */ + public function __construct($address = null) + { + if (!is_null($address)) { + $rfc822 = new Horde_Mail_Rfc822(); + $addr = $rfc822->parseAddressList($address); + if (count($addr)) { + foreach ($addr[0] as $key => $val) { + $this->$key = $val; + } + } + } + } + + /** + */ + public function __set($name, $value) + { + switch ($name) { + case 'host': + try { + $value = Horde_Idna::decode($value); + } catch (Horde_Idna_Exception $e) {} + $this->_host = Horde_String::lower($value); + break; + + case 'personal': + $this->_personal = strlen($value) + ? Horde_Mime::decode($value) + : null; + break; + } + } + + /** + * @throws Horde_Idna_Exception + */ + public function __get($name) + { + switch ($name) { + case 'bare_address': + return is_null($this->host) + ? $this->mailbox + : $this->mailbox . '@' . $this->host; + + case 'bare_address_idn': + $personal = $this->_personal; + $this->_personal = null; + $res = $this->encoded; + $this->_personal = $personal; + return $res; + + case 'eai': + return is_null($this->mailbox) + ? false + : Horde_Mime::is8bit($this->mailbox); + + case 'encoded': + return $this->writeAddress(true); + + case 'host': + return $this->_host; + + case 'host_idn': + return Horde_Idna::encode($this->_host); + + case 'label': + return is_null($this->personal) + ? $this->bare_address + : $this->_personal; + + case 'personal': + return (strcasecmp($this->_personal, $this->bare_address) === 0) + ? null + : $this->_personal; + + case 'personal_encoded': + return Horde_Mime::encode($this->personal); + + case 'valid': + return (bool)strlen($this->mailbox); + } + } + + /** + */ + protected function _writeAddress($opts) + { + $rfc822 = new Horde_Mail_Rfc822(); + + $address = $rfc822->encode($this->mailbox, 'address'); + $host = empty($opts['idn']) ? $this->host : $this->host_idn; + if (strlen($host)) { + $address .= '@' . $host; + } + $personal = $this->personal; + if (strlen($personal)) { + if (!empty($opts['encode'])) { + $personal = Horde_Mime::encode($this->personal, $opts['encode']); + } + if (empty($opts['noquote'])) { + $personal = $rfc822->encode($personal, 'personal'); + } + } + if (!empty($opts['comment']) && !empty($this->comment)) { + foreach ($this->comment as $val) { + $personal .= ' (' . $rfc822->encode($val, 'comment') . ')'; + } + } + + return (strlen($personal) && ($personal != $address)) + ? ltrim($personal) . ' <' . $address . '>' + : $address; + } + + /** + */ + public function match($ob) + { + if (!($ob instanceof Horde_Mail_Rfc822_Address)) { + $ob = new Horde_Mail_Rfc822_Address($ob); + } + + return ($this->bare_address == $ob->bare_address); + } + + /** + * Do a case-insensitive match on the address. Per RFC 822/2822/5322, + * although the host portion of an address is case-insensitive, the + * mailbox portion is platform dependent. + * + * @param mixed $ob Address data. + * + * @return boolean True if the data reflects the same case-insensitive + * address. + */ + public function matchInsensitive($ob) + { + if (!($ob instanceof Horde_Mail_Rfc822_Address)) { + $ob = new Horde_Mail_Rfc822_Address($ob); + } + + return (Horde_String::lower($this->bare_address) == Horde_String::lower($ob->bare_address)); + } + + /** + * Do a case-insensitive match on the address for a given domain. + * Matches as many parts of the subdomain in the address as is given in + * the input. + * + * @param string $domain Domain to match. + * + * @return boolean True if the address matches the given domain. + */ + public function matchDomain($domain) + { + $host = $this->host; + if (is_null($host)) { + return false; + } + + $match_domain = explode('.', $domain); + $match_host = array_slice(explode('.', $host), count($match_domain) * -1); + + return (strcasecmp($domain, implode('.', $match_host)) === 0); + } + +} diff --git a/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mail/Horde/Mail/Rfc822/Group.php b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mail/Horde/Mail/Rfc822/Group.php new file mode 100644 index 00000000..37ffc3ab --- /dev/null +++ b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mail/Horde/Mail/Rfc822/Group.php @@ -0,0 +1,145 @@ + + * @category Horde + * @copyright 2012-2017 Horde LLC + * @license http://www.horde.org/licenses/bsd New BSD License + * @package Mail + * + * @property string $groupname Groupname (UTF-8). + * @property-read string $groupname_encoded MIME encoded groupname (UTF-8). + * @property-read string $label The shorthand label for this group. + * @property-read boolean $valid Returns true if there is enough information + * in object to create a valid address. + */ +class Horde_Mail_Rfc822_Group + extends Horde_Mail_Rfc822_Object + implements Countable +{ + /** + * List of group e-mail address objects. + * + * @var Horde_Mail_Rfc822_GroupList + */ + public $addresses; + + /** + * Group name (MIME decoded). + * + * @var string + */ + protected $_groupname = 'Group'; + + /** + * Constructor. + * + * @param string $groupname If set, used as the group name. + * @param mixed $addresses If a GroupList object, used as the address + * list. Any other non-null value is parsed and + * used as the address list (addresses not + * verified; sub-groups are ignored). + */ + public function __construct($groupname = null, $addresses = null) + { + if (!is_null($groupname)) { + $this->groupname = $groupname; + } + + if (is_null($addresses)) { + $this->addresses = new Horde_Mail_Rfc822_GroupList(); + } elseif ($addresses instanceof Horde_Mail_Rfc822_GroupList) { + $this->addresses = clone $addresses; + } else { + $rfc822 = new Horde_Mail_Rfc822(); + $this->addresses = $rfc822->parseAddressList($addresses, array( + 'group' => true + )); + } + } + + /** + */ + public function __set($name, $value) + { + switch ($name) { + case 'groupname': + $this->_groupname = Horde_Mime::decode($value); + break; + } + } + + /** + */ + public function __get($name) + { + switch ($name) { + case 'groupname': + case 'label': + return $this->_groupname; + + case 'groupname_encoded': + return Horde_Mime::encode($this->_groupname); + + case 'valid': + return (bool)strlen($this->_groupname); + } + } + + /** + */ + protected function _writeAddress($opts) + { + $addr = $this->addresses->writeAddress($opts); + $groupname = $this->groupname; + if (!empty($opts['encode'])) { + $groupname = Horde_Mime::encode($groupname, $opts['encode']); + } + if (empty($opts['noquote'])) { + $rfc822 = new Horde_Mail_Rfc822(); + $groupname = $rfc822->encode($groupname, 'personal'); + } + if (!empty($opts['comment']) && !empty($this->comment)) { + $rfc822 = new Horde_Mail_Rfc822(); + foreach ($this->comment as $val) { + $personal .= ' (' . $rfc822->encode($val, 'comment') . ')'; + } + } + + return ltrim($groupname) . ':' . + (strlen($addr) ? (' ' . $addr) : '') . ';'; + } + + /** + */ + public function match($ob) + { + return $this->addresses->match($ob); + } + + /* Countable methods. */ + + /** + * Address count. + * + * @return integer The number of addresses. + */ + public function count() + { + return count($this->addresses); + } + +} diff --git a/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mail/Horde/Mail/Rfc822/GroupList.php b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mail/Horde/Mail/Rfc822/GroupList.php new file mode 100644 index 00000000..f56834ae --- /dev/null +++ b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mail/Horde/Mail/Rfc822/GroupList.php @@ -0,0 +1,55 @@ + + * @category Horde + * @copyright 2012-2017 Horde LLC + * @license http://www.horde.org/licenses/bsd New BSD License + * @package Mail + */ +class Horde_Mail_Rfc822_GroupList extends Horde_Mail_Rfc822_List +{ + /** + * Add objects to the container. + * + * @param mixed $obs A RFC 822 object (or list of objects) to store in + * this object. + */ + public function add($obs) + { + if ($obs instanceof Horde_Mail_Rfc822_Object) { + $obs = array($obs); + } + + foreach ($obs as $val) { + /* Only allow addresses. */ + if ($val instanceof Horde_Mail_Rfc822_Address) { + parent::add($val); + } + } + } + + /** + * Group count. + * + * @return integer The number of groups in the list. + */ + public function groupCount() + { + return 0; + } + +} diff --git a/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mail/Horde/Mail/Rfc822/Identification.php b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mail/Horde/Mail/Rfc822/Identification.php new file mode 100644 index 00000000..5250205d --- /dev/null +++ b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mail/Horde/Mail/Rfc822/Identification.php @@ -0,0 +1,118 @@ + + * @category Horde + * @copyright 2012-2017 Horde LLC + * @license http://www.horde.org/licenses/bsd New BSD License + * @package Mail + * @since 2.2.0 + */ +class Horde_Mail_Rfc822_Identification extends Horde_Mail_Rfc822 +{ + /** + * List of message IDs parsed. + * + * @var array + */ + public $ids = array(); + + /** + * Constructor. + * + * @param string $value Identification field value to parse. + */ + public function __construct($value = null) + { + $this->parse($value); + } + + /** + * Parse an identification header. + * + * @param string $value Identification field value to parse. + */ + public function parse($value) + { + if (!strlen($value)) { + return; + } + + $this->_data = $value; + $this->_datalen = strlen($value); + $this->_params['validate'] = true; + $this->_ptr = 0; + + $this->_rfc822SkipLwsp(); + + while ($this->_curr() !== false) { + try { + $this->ids[] = $this->_parseMessageId(); + } catch (Horde_Mail_Exception $e) { + break; + } + + // Some mailers incorrectly insert commas between reference items + if ($this->_curr() == ',') { + $this->_rfc822SkipLwsp(true); + } + } + } + + /** + * Message IDs are defined in RFC 5322 [3.6.4]. In short, they can only + * contain one '@' character. However, Outlook can produce invalid + * Message-IDs containing multiple '@' characters, which will fail the + * strict RFC checks. + * + * Since we don't care about the structure/details of the Message-ID, + * just do a basic parse that considers all characters inside of angled + * brackets to be valid. + * + * @return string A full Message-ID (enclosed in angled brackets). + * + * @throws Horde_Mail_Exception + */ + private function _parseMessageId() + { + $bracket = ($this->_curr(true) === '<'); + $str = '<'; + + while (($chr = $this->_curr(true)) !== false) { + if ($bracket) { + $str .= $chr; + if ($chr == '>') { + $this->_rfc822SkipLwsp(); + return $str; + } + } else { + if (!strcspn($chr, " \n\r\t,")) { + $this->_rfc822SkipLwsp(); + return $str; + } + $str .= $chr; + } + } + + if (!$bracket) { + return $str; + } + + throw new Horde_Mail_Exception('Invalid Message-ID.'); + } + +} diff --git a/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mail/Horde/Mail/Rfc822/List.php b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mail/Horde/Mail/Rfc822/List.php new file mode 100644 index 00000000..87aa2a5f --- /dev/null +++ b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mail/Horde/Mail/Rfc822/List.php @@ -0,0 +1,518 @@ + + * @category Horde + * @copyright 2012-2017 Horde LLC + * @license http://www.horde.org/licenses/bsd New BSD License + * @package Mail + * + * @property-read array $addresses The list of all addresses (address + * w/personal parts). + * @property-read array $bare_addresses The list of all addresses (mail@host). + * @property-read array $bare_addresses_idn The list of all addresses + * (mail@host; IDN encoded). + * (@since 2.1.0) + * @property-read array $base_addresses The list of ONLY base addresses + * (Address objects). + * @property-read array $raw_addresses The list of all addresses (Address + * objects). + */ +class Horde_Mail_Rfc822_List + extends Horde_Mail_Rfc822_Object + implements ArrayAccess, Countable, SeekableIterator, Serializable +{ + /** Filter masks. */ + const HIDE_GROUPS = 1; + const BASE_ELEMENTS = 2; + + /** + * List data. + * + * @var array + */ + protected $_data = array(); + + /** + * Current Iterator filter. + * + * @var array + */ + protected $_filter = array(); + + /** + * Current Iterator pointer. + * + * @var array + */ + protected $_ptr; + + /** + * Constructor. + * + * @param mixed $obs Address data to store in this object. + */ + public function __construct($obs = null) + { + if (!is_null($obs)) { + $this->add($obs); + } + } + + /** + */ + public function __get($name) + { + switch ($name) { + case 'addresses': + case 'bare_addresses': + case 'bare_addresses_idn': + case 'base_addresses': + case 'raw_addresses': + $old = $this->_filter; + $mask = ($name == 'base_addresses') + ? self::BASE_ELEMENTS + : self::HIDE_GROUPS; + $this->setIteratorFilter($mask, empty($old['filter']) ? null : $old['filter']); + + $out = array(); + foreach ($this as $val) { + switch ($name) { + case 'addresses': + $out[] = strval($val); + break; + + case 'bare_addresses': + $out[] = $val->bare_address; + break; + + case 'bare_addresses_idn': + $out[] = $val->bare_address_idn; + break; + + case 'base_addresses': + case 'raw_addresses': + $out[] = clone $val; + break; + } + } + + $this->_filter = $old; + return $out; + } + } + + /** + * Add objects to the container. + * + * @param mixed $obs Address data to store in this object. + */ + public function add($obs) + { + foreach ($this->_normalize($obs) as $val) { + $this->_data[] = $val; + } + } + + /** + * Remove addresses from the container. This method ignores Group objects. + * + * @param mixed $obs Addresses to remove. + */ + public function remove($obs) + { + $old = $this->_filter; + $this->setIteratorFilter(self::HIDE_GROUPS | self::BASE_ELEMENTS); + + foreach ($this->_normalize($obs) as $val) { + $remove = array(); + + foreach ($this as $key => $val2) { + if ($val2->match($val)) { + $remove[] = $key; + } + } + + foreach (array_reverse($remove) as $key) { + unset($this[$key]); + } + } + + $this->_filter = $old; + } + + /** + * Removes duplicate addresses from list. This method ignores Group + * objects. + */ + public function unique() + { + $exist = $remove = array(); + + $old = $this->_filter; + $this->setIteratorFilter(self::HIDE_GROUPS | self::BASE_ELEMENTS); + + // For duplicates, we use the first address that contains personal + // information. + foreach ($this as $key => $val) { + $bare = $val->bare_address; + if (isset($exist[$bare])) { + if (($exist[$bare] == -1) || is_null($val->personal)) { + $remove[] = $key; + } else { + $remove[] = $exist[$bare]; + $exist[$bare] = -1; + } + } else { + $exist[$bare] = is_null($val->personal) + ? $key + : -1; + } + } + + foreach (array_reverse($remove) as $key) { + unset($this[$key]); + } + + $this->_filter = $old; + } + + /** + * Group count. + * + * @return integer The number of groups in the list. + */ + public function groupCount() + { + $ret = 0; + + foreach ($this->_data as $val) { + if ($val instanceof Horde_Mail_Rfc822_Group) { + ++$ret; + } + } + + return $ret; + } + + /** + * Set the Iterator filter. + * + * @param integer $mask Filter masks. + * @param mixed $filter An e-mail, or as list of e-mails, to filter by. + */ + public function setIteratorFilter($mask = 0, $filter = null) + { + $this->_filter = array(); + + if ($mask) { + $this->_filter['mask'] = $mask; + } + + if (!is_null($filter)) { + $rfc822 = new Horde_Mail_Rfc822(); + $this->_filter['filter'] = $rfc822->parseAddressList($filter); + } + } + + /** + */ + protected function _writeAddress($opts) + { + $out = array(); + + foreach ($this->_data as $val) { + $out[] = $val->writeAddress($opts); + } + + return implode(', ', $out); + } + + /** + */ + public function match($ob) + { + if (!($ob instanceof Horde_Mail_Rfc822_List)) { + $ob = new Horde_Mail_Rfc822_List($ob); + } + + $a = $this->bare_addresses; + sort($a); + $b = $ob->bare_addresses; + sort($b); + + return ($a == $b); + } + + /** + * Does this list contain the given e-mail address? + * + * @param mixed $address An e-mail address. + * + * @return boolean True if the e-mail address is contained in the list. + */ + public function contains($address) + { + $ob = new Horde_Mail_Rfc822_Address($address); + + foreach ($this->raw_addresses as $val) { + if ($val->match($ob)) { + return true; + } + } + + return false; + } + + /** + * Convenience method to return the first element in a list. + * + * Useful since it allows chaining; older PHP versions did not allow array + * access dereferencing from the results of a function call. + * + * @since 2.5.0 + * + * @return Horde_Mail_Rfc822_Object Rfc822 object, or null if no object. + */ + public function first() + { + return $this[0]; + } + + /** + * Normalize objects to add to list. + * + * @param mixed $obs Address data to store in this object. + * + * @return array Entries to add. + */ + protected function _normalize($obs) + { + $add = array(); + + if (!($obs instanceof Horde_Mail_Rfc822_List) && + !is_array($obs)) { + $obs = array($obs); + } + + foreach ($obs as $val) { + if (is_string($val)) { + $rfc822 = new Horde_Mail_Rfc822(); + $val = $rfc822->parseAddressList($val); + } + + if ($val instanceof Horde_Mail_Rfc822_List) { + $val->setIteratorFilter(self::BASE_ELEMENTS); + foreach ($val as $val2) { + $add[] = $val2; + } + } elseif ($val instanceof Horde_Mail_Rfc822_Object) { + $add[] = $val; + } + } + + return $add; + } + + /* ArrayAccess methods. */ + + /** + */ + public function offsetExists($offset) + { + return !is_null($this[$offset]); + } + + /** + */ + public function offsetGet($offset) + { + try { + $this->seek($offset); + return $this->current(); + } catch (OutOfBoundsException $e) { + return null; + } + } + + /** + */ + public function offsetSet($offset, $value) + { + if ($ob = $this[$offset]) { + if (is_null($this->_ptr['subidx'])) { + $tmp = $this->_normalize($value); + if (isset($tmp[0])) { + $this->_data[$this->_ptr['idx']] = $tmp[0]; + } + } else { + $ob[$offset] = $value; + } + $this->_ptr = null; + } + } + + /** + */ + public function offsetUnset($offset) + { + if ($ob = $this[$offset]) { + if (is_null($this->_ptr['subidx'])) { + unset($this->_data[$this->_ptr['idx']]); + $this->_data = array_values($this->_data); + } else { + unset($ob->addresses[$this->_ptr['subidx']]); + } + $this->_ptr = null; + } + } + + /* Countable methods. */ + + /** + * Address count. + * + * @return integer The number of addresses. + */ + public function count() + { + return count($this->addresses); + } + + /* Iterator methods. */ + + public function current() + { + if (!$this->valid()) { + return null; + } + + $ob = $this->_data[$this->_ptr['idx']]; + + return is_null($this->_ptr['subidx']) + ? $ob + : $ob->addresses[$this->_ptr['subidx']]; + } + + public function key() + { + return $this->_ptr['key']; + } + + public function next() + { + if (is_null($this->_ptr['subidx'])) { + $curr = $this->current(); + if (($curr instanceof Horde_Mail_Rfc822_Group) && count($curr)) { + $this->_ptr['subidx'] = 0; + } else { + ++$this->_ptr['idx']; + } + $curr = $this->current(); + } elseif (!($curr = $this->_data[$this->_ptr['idx']]->addresses[++$this->_ptr['subidx']])) { + $this->_ptr['subidx'] = null; + ++$this->_ptr['idx']; + $curr = $this->current(); + } + + if (!is_null($curr)) { + if (!empty($this->_filter) && $this->_iteratorFilter($curr)) { + $this->next(); + } else { + ++$this->_ptr['key']; + } + } + } + + public function rewind() + { + $this->_ptr = array( + 'idx' => 0, + 'key' => 0, + 'subidx' => null + ); + + if ($this->valid() && + !empty($this->_filter) && + $this->_iteratorFilter($this->current())) { + $this->next(); + $this->_ptr['key'] = 0; + } + } + + public function valid() + { + return (!empty($this->_ptr) && isset($this->_data[$this->_ptr['idx']])); + } + + public function seek($position) + { + if (!$this->valid() || + ($position < $this->_ptr['key'])) { + $this->rewind(); + } + + for ($i = $this->_ptr['key']; ; ++$i) { + if ($i == $position) { + return; + } + + $this->next(); + if (!$this->valid()) { + throw new OutOfBoundsException('Position not found.'); + } + } + } + + protected function _iteratorFilter($ob) + { + if (!empty($this->_filter['mask'])) { + if (($this->_filter['mask'] & self::HIDE_GROUPS) && + ($ob instanceof Horde_Mail_Rfc822_Group)) { + return true; + } + + if (($this->_filter['mask'] & self::BASE_ELEMENTS) && + !is_null($this->_ptr['subidx'])) { + return true; + } + } + + if (!empty($this->_filter['filter']) && + ($ob instanceof Horde_Mail_Rfc822_Address)) { + foreach ($this->_filter['filter'] as $val) { + if ($ob->match($val)) { + return true; + } + } + } + + return false; + } + + /* Serializable methods. */ + + public function serialize() + { + return serialize($this->_data); + } + + public function unserialize($data) + { + $this->_data = unserialize($data); + } + +} diff --git a/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mail/Horde/Mail/Rfc822/Object.php b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mail/Horde/Mail/Rfc822/Object.php new file mode 100644 index 00000000..5565d5e1 --- /dev/null +++ b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mail/Horde/Mail/Rfc822/Object.php @@ -0,0 +1,90 @@ + + * @category Horde + * @copyright 2012-2017 Horde LLC + * @license http://www.horde.org/licenses/bsd New BSD License + * @package Mail + */ +abstract class Horde_Mail_Rfc822_Object +{ + /** + * String representation of object. + * + * @return string Returns the full e-mail address. + */ + public function __toString() + { + return $this->writeAddress(); + } + + /** + * Write an address given information in this part. + * + * @param mixed $opts If boolean true, is equivalent to passing true for + * both 'encode' and 'idn'. If an array, these + * keys are supported: + * - comment: (boolean) If true, include comment(s) in output? + * @since 2.6.0 + * DEFAULT: false + * - encode: (mixed) MIME encode the personal/groupname parts? + * If boolean true, encodes in 'UTF-8'. + * If a string, encodes using this charset. + * DEFAULT: false + * - idn: (boolean) If true, encodes IDN domain names (RFC 3490). + * DEFAULT: false + * - noquote: (boolean) If true, don't quote personal part. [@since + * 2.4.0] + * DEFAULT: false + * + * @return string The correctly escaped/quoted address. + */ + public function writeAddress($opts = array()) + { + if ($opts === true) { + $opts = array( + 'encode' => 'UTF-8', + 'idn' => true + ); + } elseif (!empty($opts['encode']) && ($opts['encode'] === true)) { + $opts['encode'] = 'UTF-8'; + } + + return $this->_writeAddress($opts); + } + + /** + * Class-specific implementation of writeAddress(). + * + * @see writeAddress() + * + * @param array $opts See writeAddress(). + * + * @return string The correctly escaped/quoted address. + */ + abstract protected function _writeAddress($opts); + + /** + * Compare this object against other data. + * + * @param mixed $ob Address data. + * + * @return boolean True if the data reflects the same canonical address. + */ + abstract public function match($ob); + +} diff --git a/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mail/Horde/Mail/Translation.php b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mail/Horde/Mail/Translation.php new file mode 100644 index 00000000..6d4ad635 --- /dev/null +++ b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mail/Horde/Mail/Translation.php @@ -0,0 +1,39 @@ + + * @category Horde + * @copyright 2014-2017 Horde LLC + * @license http://www.horde.org/licenses/bsd New BSD License + * @package Mail + * @since 2.5.0 + */ +class Horde_Mail_Translation extends Horde_Translation_Autodetect +{ + /** + * The translation domain + * + * @var string + */ + protected static $_domain = 'Horde_Mail'; + + /** + * The absolute PEAR path to the translations for the default gettext handler. + * + * @var string + */ + protected static $_pearDirectory = '/daten/dev/lam/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mail/data'; +} diff --git a/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mail/Horde/Mail/Transport.php b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mail/Horde/Mail/Transport.php new file mode 100644 index 00000000..3481229d --- /dev/null +++ b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mail/Horde/Mail/Transport.php @@ -0,0 +1,263 @@ + + * @author Richard Heyes + * @author Michael Slusarz + * @category Horde + * @copyright 1997-2017 Horde LLC (http://www.horde.org/) + * @copyright 2002-2007 Richard Heyes + * @license http://www.horde.org/licenses/bsd New BSD License + * @package Mail + * + * @property-read boolean $eai Does the transport driver support EAI (RFC + * 6532) headers? (@since 2.5.0) + */ +abstract class Horde_Mail_Transport +{ + /** + * Line terminator used for separating header lines. + * + * @var string + */ + public $sep = PHP_EOL; + + /** + * Configuration parameters. + * + * @var array + */ + protected $_params = array(); + + /** + */ + public function __get($name) + { + switch ($name) { + case 'eai': + return false; + } + } + + /** + * Send a message. + * + * @param mixed $recipients Either a comma-seperated list of recipients + * (RFC822 compliant), or an array of + * recipients, each RFC822 valid. This may + * contain recipients not specified in the + * headers, for Bcc:, resending messages, etc. + * @param array $headers The headers to send with the mail, in an + * associative array, where the array key is the + * header name (ie, 'Subject'), and the array + * value is the header value (ie, 'test'). The + * header produced from those values would be + * 'Subject: test'. + * If the '_raw' key exists, the value of this + * key will be used as the exact text for + * sending the message. + * @param mixed $body The full text of the message body, including + * any Mime parts, etc. Either a string or a + * stream resource. + * + * @throws Horde_Mail_Exception + */ + abstract public function send($recipients, array $headers, $body); + + /** + * Take an array of mail headers and return a string containing text + * usable in sending a message. + * + * @param array $headers The array of headers to prepare, in an + * associative array, where the array key is the + * header name (ie, 'Subject'), and the array value + * is the header value (ie, 'test'). The header + * produced from those values would be 'Subject: + * test'. + * If the '_raw' key exists, the value of this key + * will be used as the exact text for sending the + * message. + * + * @return mixed Returns false if it encounters a bad address; otherwise + * returns an array containing two elements: Any From: + * address found in the headers, and the plain text version + * of the headers. + * @throws Horde_Mail_Exception + */ + public function prepareHeaders(array $headers) + { + $from = null; + $lines = array(); + $raw = isset($headers['_raw']) + ? $headers['_raw'] + : null; + + foreach ($headers as $key => $value) { + if (strcasecmp($key, 'From') === 0) { + $parser = new Horde_Mail_Rfc822(); + $addresses = $parser->parseAddressList($value, array( + 'validate' => $this->eai ? 'eai' : true + )); + $from = $addresses[0]->bare_address; + + // Reject envelope From: addresses with spaces. + if (strstr($from, ' ')) { + return false; + } + + $lines[] = $key . ': ' . $this->_normalizeEOL($value); + } elseif (!$raw && (strcasecmp($key, 'Received') === 0)) { + $received = array(); + if (!is_array($value)) { + $value = array($value); + } + + foreach ($value as $line) { + $received[] = $key . ': ' . $this->_normalizeEOL($line); + } + + // Put Received: headers at the top. Spam detectors often + // flag messages with Received: headers after the Subject: + // as spam. + $lines = array_merge($received, $lines); + } elseif (!$raw) { + // If $value is an array (i.e., a list of addresses), convert + // it to a comma-delimited string of its elements (addresses). + if (is_array($value)) { + $value = implode(', ', $value); + } + $lines[] = $key . ': ' . $this->_normalizeEOL($value); + } + } + + return array($from, $raw ? $raw : implode($this->sep, $lines)); + } + + /** + * Take a set of recipients and parse them, returning an array of bare + * addresses (forward paths) that can be passed to sendmail or an SMTP + * server with the 'RCPT TO:' command. + * + * @param mixed $recipients Either a comma-separated list of recipients + * (RFC822 compliant), or an array of + * recipients, each RFC822 valid. + * + * @return array Forward paths (bare addresses, IDN encoded). + * @throws Horde_Mail_Exception + */ + public function parseRecipients($recipients) + { + // Parse recipients, leaving out all personal info. This is + // for smtp recipients, etc. All relevant personal information + // should already be in the headers. + $rfc822 = new Horde_Mail_Rfc822(); + return $rfc822->parseAddressList($recipients, array( + 'validate' => $this->eai ? 'eai' : true + ))->bare_addresses_idn; + } + + /** + * Sanitize an array of mail headers by removing any additional header + * strings present in a legitimate header's value. The goal of this + * filter is to prevent mail injection attacks. + * + * Raw headers are sent as-is. + * + * @param array $headers The associative array of headers to sanitize. + * + * @return array The sanitized headers. + */ + protected function _sanitizeHeaders($headers) + { + foreach (array_diff(array_keys($headers), array('_raw')) as $key) { + $headers[$key] = preg_replace('=((||0x0A/%0A|0x0D/%0D|\\n|\\r)\S).*=i', null, $headers[$key]); + } + + return $headers; + } + + /** + * Normalizes EOLs in string data. + * + * @param string $data Data. + * + * @return string Normalized data. + */ + protected function _normalizeEOL($data) + { + return strtr($data, array( + "\r\n" => $this->sep, + "\r" => $this->sep, + "\n" => $this->sep + )); + } + + /** + * Get the from address. + * + * @param string $from From address. + * @param array $headers Headers array. + * + * @return string Address object. + * @throws Horde_Mail_Exception + */ + protected function _getFrom($from, $headers) + { + /* Since few MTAs are going to allow this header to be forged unless + * it's in the MAIL FROM: exchange, we'll use Return-Path instead of + * From: if it's set. */ + foreach (array_keys($headers) as $hdr) { + if (strcasecmp($hdr, 'Return-Path') === 0) { + $from = $headers[$hdr]; + break; + } + } + + if (!strlen($from)) { + throw new Horde_Mail_Exception('No from address provided.'); + } + + $from = new Horde_Mail_Rfc822_Address($from); + + return $from->bare_address_idn; + } + +} diff --git a/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mail/Horde/Mail/Transport/Lmtphorde.php b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mail/Horde/Mail/Transport/Lmtphorde.php new file mode 100644 index 00000000..471fae2c --- /dev/null +++ b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mail/Horde/Mail/Transport/Lmtphorde.php @@ -0,0 +1,64 @@ + + * @category Horde + * @copyright 2014-2017 Horde LLC + * @license http://www.horde.org/licenses/bsd New BSD License + * @package Mail + */ +class Horde_Mail_Transport_Lmtphorde extends Horde_Mail_Transport_Smtphorde +{ + /** + */ + public function getSMTPObject() + { + if (!$this->_smtp) { + $this->_smtp = new Horde_Smtp_Lmtp($this->_params); + try { + $this->_smtp->login(); + } catch (Horde_Smtp_Exception $e) { + throw new Horde_Mail_Exception($e); + } + } + + return $this->_smtp; + } + +} diff --git a/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mail/Horde/Mail/Transport/Mail.php b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mail/Horde/Mail/Transport/Mail.php new file mode 100644 index 00000000..a9b3067f --- /dev/null +++ b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mail/Horde/Mail/Transport/Mail.php @@ -0,0 +1,115 @@ + + * @author Michael Slusarz + * @category Horde + * @copyright 2010-2017 Horde LLC + * @license http://www.horde.org/licenses/bsd New BSD License + * @package Mail + */ +class Horde_Mail_Transport_Mail extends Horde_Mail_Transport +{ + /** + * @param array $params Additional parameters: + * - args: (string) Extra arguments for the mail() function. + */ + public function __construct(array $params = array()) + { + $this->_params = array_merge($this->_params, $params); + } + + /** + */ + public function send($recipients, array $headers, $body) + { + $headers = $this->_sanitizeHeaders($headers); + $recipients = implode(',', $this->parseRecipients($recipients)); + $subject = ''; + + foreach (array_keys($headers) as $hdr) { + if (strcasecmp($hdr, 'Subject') === 0) { + // Get the Subject out of the headers array so that we can + // pass it as a separate argument to mail(). + $subject = $headers[$hdr]; + unset($headers[$hdr]); + } elseif (strcasecmp($hdr, 'To') === 0) { + // Remove the To: header. The mail() function will add its + // own To: header based on the contents of $recipients. + unset($headers[$hdr]); + } + } + + // Flatten the headers out. + list(, $text_headers) = $this->prepareHeaders($headers); + + // mail() requires a string for $body. If resource, need to convert + // to a string. + if (is_resource($body)) { + $body_str = ''; + + stream_filter_register('horde_eol', 'Horde_Stream_Filter_Eol'); + stream_filter_append($body, 'horde_eol', STREAM_FILTER_READ, array('eol' => $this->sep)); + + rewind($body); + while (!feof($body)) { + $body_str .= fread($body, 8192); + } + $body = $body_str; + } else { + // Convert EOL characters in body. + $body = $this->_normalizeEOL($body); + } + + // We only use mail()'s optional fifth parameter if the additional + // parameters have been provided and we're not running in safe mode. + if (empty($this->_params) || ini_get('safe_mode')) { + $result = mail($recipients, $subject, $body, $text_headers); + } else { + $result = mail($recipients, $subject, $body, $text_headers, isset($this->_params['args']) ? $this->_params['args'] : ''); + } + + // If the mail() function returned failure, we need to create an + // Exception and return it instead of the boolean result. + if ($result === false) { + throw new Horde_Mail_Exception('mail() returned failure.'); + } + } + +} diff --git a/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mail/Horde/Mail/Transport/Mock.php b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mail/Horde/Mail/Transport/Mock.php new file mode 100644 index 00000000..e791e534 --- /dev/null +++ b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mail/Horde/Mail/Transport/Mock.php @@ -0,0 +1,126 @@ + + * @author Michael Slusarz + * @category Horde + * @copyright 2010-2017 Horde LLC + * @license http://www.horde.org/licenses/bsd New BSD License + * @package Mail + */ +class Horde_Mail_Transport_Mock extends Horde_Mail_Transport +{ + /** + * Array of messages that have been sent with the mock. + * + * @var array + */ + public $sentMessages = array(); + + /** + * Callback before sending mail. + * + * @var callback + */ + protected $_preSendCallback; + + /** + * Callback after sending mai. + * + * @var callback + */ + protected $_postSendCallback; + + /** + * @param array Optional parameters: + * - postSendCallback: (callback) Called after an email would have been + * sent. + * - preSendCallback: (callback) Called before an email would be sent. + */ + public function __construct(array $params = array()) + { + if (isset($params['preSendCallback']) && + is_callable($params['preSendCallback'])) { + $this->_preSendCallback = $params['preSendCallback']; + } + + if (isset($params['postSendCallback']) && + is_callable($params['postSendCallback'])) { + $this->_postSendCallback = $params['postSendCallback']; + } + } + + /** + */ + public function send($recipients, array $headers, $body) + { + if ($this->_preSendCallback) { + call_user_func_array($this->_preSendCallback, array($this, $recipients, $headers, $body)); + } + + $headers = $this->_sanitizeHeaders($headers); + list($from, $text_headers) = $this->prepareHeaders($headers); + + if (is_resource($body)) { + stream_filter_register('horde_eol', 'Horde_Stream_Filter_Eol'); + stream_filter_append($body, 'horde_eol', STREAM_FILTER_READ, array('eol' => $this->sep)); + + rewind($body); + $body_txt = stream_get_contents($body); + } else { + $body_txt = $this->_normalizeEOL($body); + } + + $from = $this->_getFrom($from, $headers); + $recipients = $this->parseRecipients($recipients); + + $this->sentMessages[] = array( + 'body' => $body_txt, + 'from' => $from, + 'headers' => $headers, + 'header_text' => $text_headers, + 'recipients' => $recipients + ); + + if ($this->_postSendCallback) { + call_user_func_array($this->_postSendCallback, array($this, $recipients, $headers, $body_txt)); + } + } + +} diff --git a/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mail/Horde/Mail/Transport/Null.php b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mail/Horde/Mail/Transport/Null.php new file mode 100644 index 00000000..8c5264f9 --- /dev/null +++ b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mail/Horde/Mail/Transport/Null.php @@ -0,0 +1,58 @@ + + * @author Michael Slusarz + * @category Horde + * @copyright 2010-2017 Horde LLC + * @copyright 2010 Phil Kernick + * @license http://www.horde.org/licenses/bsd New BSD License + * @package Mail + */ +class Horde_Mail_Transport_Null extends Horde_Mail_Transport +{ + /** + */ + public function send($recipients, array $headers, $body) + { + } + +} diff --git a/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mail/Horde/Mail/Transport/Sendmail.php b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mail/Horde/Mail/Transport/Sendmail.php new file mode 100644 index 00000000..4f36e58d --- /dev/null +++ b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mail/Horde/Mail/Transport/Sendmail.php @@ -0,0 +1,195 @@ + + * @author Michael Slusarz + * @category Horde + * @copyright 2010-2017 Horde LLC + * @license http://www.horde.org/licenses/bsd New BSD License + * @package Mail + */ +class Horde_Mail_Transport_Sendmail extends Horde_Mail_Transport +{ + /** + * Any extra command-line parameters to pass to the sendmail or + * sendmail wrapper binary. + * + * @var string + */ + protected $_sendmailArgs = '-i'; + + /** + * The location of the sendmail or sendmail wrapper binary on the + * filesystem. + * + * @var string + */ + protected $_sendmailPath = '/usr/sbin/sendmail'; + + /** + * Constructor. + * + * @param array $params Additional parameters: + * - sendmail_args: (string) Any extra parameters to pass to the sendmail + * or sendmail wrapper binary. + * DEFAULT: -i + * - sendmail_path: (string) The location of the sendmail binary on the + * filesystem. + * DEFAULT: /usr/sbin/sendmail + */ + public function __construct(array $params = array()) + { + if (isset($params['sendmail_args'])) { + $this->_sendmailArgs = $params['sendmail_args']; + } + + if (isset($params['sendmail_path'])) { + $this->_sendmailPath = $params['sendmail_path']; + } + } + + /** + */ + public function send($recipients, array $headers, $body) + { + $recipients = implode(' ', array_map('escapeshellarg', $this->parseRecipients($recipients))); + + $headers = $this->_sanitizeHeaders($headers); + list($from, $text_headers) = $this->prepareHeaders($headers); + $from = $this->_getFrom($from, $headers); + + $mail = @popen($this->_sendmailPath . (empty($this->_sendmailArgs) ? '' : ' ' . $this->_sendmailArgs) . ' -f ' . escapeshellarg($from) . ' -- ' . $recipients, 'w'); + if (!$mail) { + throw new Horde_Mail_Exception('Failed to open sendmail [' . $this->_sendmailPath . '] for execution.'); + } + + // Write the headers following by two newlines: one to end the headers + // section and a second to separate the headers block from the body. + fputs($mail, $text_headers . $this->sep . $this->sep); + + if (is_resource($body)) { + stream_filter_register('horde_eol', 'Horde_Stream_Filter_Eol'); + stream_filter_append($body, 'horde_eol', STREAM_FILTER_READ, array('eol' => $this->sep)); + + rewind($body); + while (!feof($body)) { + fputs($mail, fread($body, 8192)); + } + } else { + fputs($mail, $this->_normalizeEOL($body)); + } + $result = pclose($mail); + + if (!$result) { + return; + } + + switch ($result) { + case 64: // EX_USAGE + $msg = 'command line usage error'; + break; + + case 65: // EX_DATAERR + $msg = 'data format error'; + break; + + case 66: // EX_NOINPUT + $msg = 'cannot open input'; + break; + + case 67: // EX_NOUSER + $msg = 'addressee unknown'; + break; + + case 68: // EX_NOHOST + $msg = 'host name unknown'; + break; + + case 69: // EX_UNAVAILABLE + $msg = 'service unavailable'; + break; + + case 70: // EX_SOFTWARE + $msg = 'internal software error'; + break; + + case 71: // EX_OSERR + $msg = 'system error'; + break; + + case 72: // EX_OSFILE + $msg = 'critical system file missing'; + break; + + case 73: // EX_CANTCREAT + $msg = 'cannot create output file'; + break; + + case 74: // EX_IOERR + $msg = 'input/output error'; + + case 75: // EX_TEMPFAIL + $msg = 'temporary failure'; + break; + + case 76: // EX_PROTOCOL + $msg = 'remote error in protocol'; + break; + + case 77: // EX_NOPERM + $msg = 'permission denied'; + break; + + case 78: // EX_CONFIG + $msg = 'configuration error'; + break; + + case 79: // EX_NOTFOUND + $msg = 'entry not found'; + break; + + default: + $msg = 'unknown error'; + break; + } + + throw new Horde_Mail_Exception('sendmail: ' . $msg . ' (' . $result . ')', $result); + } + +} diff --git a/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mail/Horde/Mail/Transport/Smtp.php b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mail/Horde/Mail/Transport/Smtp.php new file mode 100644 index 00000000..e6d49d71 --- /dev/null +++ b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mail/Horde/Mail/Transport/Smtp.php @@ -0,0 +1,350 @@ + + * @author Jon Parise + * @author Michael Slusarz + * @category Horde + * @copyright 2010-2016 Horde LLC + * @deprecated Use Horde_Mail_Transport_Hordesmtp instead + * @license http://www.horde.org/licenses/bsd New BSD License + * @package Mail + */ +class Horde_Mail_Transport_Smtp extends Horde_Mail_Transport +{ + /* Error: Failed to create a Net_SMTP object */ + const ERROR_CREATE = 10000; + + /* Error: Failed to connect to SMTP server */ + const ERROR_CONNECT = 10001; + + /* Error: SMTP authentication failure */ + const ERROR_AUTH = 10002; + + /* Error: No From: address has been provided */ + const ERROR_FROM = 10003; + + /* Error: Failed to set sender */ + const ERROR_SENDER = 10004; + + /* Error: Failed to add recipient */ + const ERROR_RECIPIENT = 10005; + + /* Error: Failed to send data */ + const ERROR_DATA = 10006; + + /** + * The SMTP greeting. + * + * @var string + */ + public $greeting = null; + + /** + * The SMTP queued response. + * + * @var string + */ + public $queuedAs = null; + + /** + * SMTP connection object. + * + * @var Net_SMTP + */ + protected $_smtp = null; + + /** + * The list of service extension parameters to pass to the Net_SMTP + * mailFrom() command. + * + * @var array + */ + protected $_extparams = array(); + + /** + * Constructor. + * + * @param array $params Additional parameters: + * - auth: (mixed) SMTP authentication. + * This value may be set to true, false or the name of a + * specific authentication method. If the value is set to true, + * the Net_SMTP package will attempt to use the best + * authentication method advertised by the remote SMTP server. + * DEFAULT: false. + * - debug: (boolean) Activate SMTP debug mode? + * DEFAULT: false + * - host: (string) The server to connect to. + * DEFAULT: localhost + * - localhost: (string) Hostname or domain that will be sent to the + * remote SMTP server in the HELO / EHLO message. + * DEFAULT: localhost + * - password: (string) The password to use for SMTP auth. + * DEFAULT: NONE + * - persist: (boolean) Should the SMTP connection persist? + * DEFAULT: false + * - pipelining: (boolean) Use SMTP command pipelining. + * Use SMTP command pipelining (specified in RFC 2920) if + * the SMTP server supports it. This speeds up delivery + * over high-latency connections. + * DEFAULT: false (use default value from Net_SMTP) + * - port: (integer) The port to connect to. + * DEFAULT: 25 + * - timeout: (integer) The SMTP connection timeout. + * DEFAULT: NONE + * - username: (string) The username to use for SMTP auth. + * DEFAULT: NONE + */ + public function __construct(array $params = array()) + { + $this->_params = array_merge(array( + 'auth' => false, + 'debug' => false, + 'host' => 'localhost', + 'localhost' => 'localhost', + 'password' => '', + 'persist' => false, + 'pipelining' => false, + 'port' => 25, + 'timeout' => null, + 'username' => '' + ), $params); + + /* Destructor implementation to ensure that we disconnect from any + * potentially-alive persistent SMTP connections. */ + register_shutdown_function(array($this, 'disconnect')); + + /* SMTP requires CRLF line endings. */ + $this->sep = "\r\n"; + } + + /** + */ + public function send($recipients, array $headers, $body) + { + /* If we don't already have an SMTP object, create one. */ + $this->getSMTPObject(); + + $headers = $this->_sanitizeHeaders($headers); + + /* Make sure the message has a trailing newline. */ + if (is_resource($body)) { + fseek($body, -1, SEEK_END); + switch (fgetc($body)) { + case "\r": + if (fgetc($body) != "\n") { + fputs($body, "\n"); + } + break; + + default: + fputs($body, "\r\n"); + break; + } + rewind($body); + } elseif (substr($body, -2, 0) != "\r\n") { + $body .= "\r\n"; + } + + try { + list($from, $textHeaders) = $this->prepareHeaders($headers); + } catch (Horde_Mail_Exception $e) { + $this->_smtp->rset(); + throw $e; + } + + try { + $from = $this->_getFrom($from, $headers); + } catch (Horde_Mail_Exception $e) { + $this->_smtp->rset(); + throw new Horde_Mail_Exception('No From: address has been provided', self::ERROR_FROM); + } + + $params = ''; + foreach ($this->_extparams as $key => $val) { + $params .= ' ' . $key . (is_null($val) ? '' : '=' . $val); + } + + $res = $this->_smtp->mailFrom($from, ltrim($params)); + if ($res instanceof PEAR_Error) { + $this->_error(sprintf("Failed to set sender: %s", $from), $res, self::ERROR_SENDER); + } + + try { + $recipients = $this->parseRecipients($recipients); + } catch (Horde_Mail_Exception $e) { + $this->_smtp->rset(); + throw $e; + } + + foreach ($recipients as $recipient) { + $res = $this->_smtp->rcptTo($recipient); + if ($res instanceof PEAR_Error) { + $this->_error("Failed to add recipient: $recipient", $res, self::ERROR_RECIPIENT); + } + } + + /* Send the message's headers and the body as SMTP data. Net_SMTP does + * the necessary EOL conversions. */ + $res = $this->_smtp->data($body, $textHeaders); + list(,$args) = $this->_smtp->getResponse(); + + if (preg_match("/Ok: queued as (.*)/", $args, $queued)) { + $this->queuedAs = $queued[1]; + } + + /* We need the greeting; from it we can extract the authorative name + * of the mail server we've really connected to. Ideal if we're + * connecting to a round-robin of relay servers and need to track + * which exact one took the email */ + $this->greeting = $this->_smtp->getGreeting(); + + if ($res instanceof PEAR_Error) { + $this->_error('Failed to send data', $res, self::ERROR_DATA); + } + + /* If persistent connections are disabled, destroy our SMTP object. */ + if (!$this->_params['persist']) { + $this->disconnect(); + } + } + + /** + * Connect to the SMTP server by instantiating a Net_SMTP object. + * + * @return Net_SMTP The SMTP object. + * @throws Horde_Mail_Exception + */ + public function getSMTPObject() + { + if ($this->_smtp) { + return $this->_smtp; + } + + $this->_smtp = new Net_SMTP( + $this->_params['host'], + $this->_params['port'], + $this->_params['localhost'] + ); + + /* Set pipelining. */ + if ($this->_params['pipelining']) { + $this->_smtp->pipelining = true; + } + + /* If we still don't have an SMTP object at this point, fail. */ + if (!($this->_smtp instanceof Net_SMTP)) { + throw new Horde_Mail_Exception('Failed to create a Net_SMTP object', self::ERROR_CREATE); + } + + /* Configure the SMTP connection. */ + if ($this->_params['debug']) { + $this->_smtp->setDebug(true); + } + + /* Attempt to connect to the configured SMTP server. */ + $res = $this->_smtp->connect($this->_params['timeout']); + if ($res instanceof PEAR_Error) { + $this->_error('Failed to connect to ' . $this->_params['host'] . ':' . $this->_params['port'], $res, self::ERROR_CONNECT); + } + + /* Attempt to authenticate if authentication has been enabled. */ + if ($this->_params['auth']) { + $method = is_string($this->_params['auth']) + ? $this->_params['auth'] + : ''; + + $res = $this->_smtp->auth($this->_params['username'], $this->_params['password'], $method); + if ($res instanceof PEAR_Error) { + $this->_error("$method authentication failure", $res, self::ERROR_AUTH); + } + } + + return $this->_smtp; + } + + /** + * Add parameter associated with a SMTP service extension. + * + * @param string $keyword Extension keyword. + * @param string $value Any value the keyword needs. + */ + public function addServiceExtensionParameter($keyword, $value = null) + { + $this->_extparams[$keyword] = $value; + } + + /** + * Disconnect and destroy the current SMTP connection. + * + * @return boolean True if the SMTP connection no longer exists. + */ + public function disconnect() + { + /* If we have an SMTP object, disconnect and destroy it. */ + if (is_object($this->_smtp) && $this->_smtp->disconnect()) { + $this->_smtp = null; + } + + /* We are disconnected if we no longer have an SMTP object. */ + return ($this->_smtp === null); + } + + /** + * Build a standardized string describing the current SMTP error. + * + * @param string $text Custom string describing the error context. + * @param PEAR_Error $error PEAR_Error object. + * @param integer $e_code Error code. + * + * @throws Horde_Mail_Exception + */ + protected function _error($text, $error, $e_code) + { + /* Split the SMTP response into a code and a response string. */ + list($code, $response) = $this->_smtp->getResponse(); + + /* Abort current SMTP transaction. */ + $this->_smtp->rset(); + + /* Build our standardized error string. */ + throw new Horde_Mail_Exception($text . ' [SMTP: ' . $error->getMessage() . " (code: $code, response: $response)]", $e_code); + } + +} diff --git a/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mail/Horde/Mail/Transport/Smtphorde.php b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mail/Horde/Mail/Transport/Smtphorde.php new file mode 100644 index 00000000..ee9037ca --- /dev/null +++ b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mail/Horde/Mail/Transport/Smtphorde.php @@ -0,0 +1,169 @@ + + * @category Horde + * @copyright 2013-2017 Horde LLC + * @license http://www.horde.org/licenses/bsd New BSD License + * @package Mail + */ +class Horde_Mail_Transport_Smtphorde extends Horde_Mail_Transport +{ + /** + * @deprecated + */ + public $send8bit = false; + + /** + * SMTP object. + * + * @var Horde_Smtp + */ + protected $_smtp = null; + + /** + * Constructor. + * + * @param array $params Additional parameters: + * - chunk_size: (integer) If CHUNKING is supported on the server, the + * chunk size (in octets) to send. 0 will disable chunking. + * @since Horde_Smtp 1.7.0 + * - context: (array) Any context parameters passed to + * stream_create_context(). @since Horde_Smtp 1.9.0 + * - debug: (string) If set, will output debug information to the stream + * provided. The value can be any PHP supported wrapper that + * can be opened via fopen(). + * DEFAULT: No debug output + * - host: (string) The SMTP server. + * DEFAULT: localhost + * - localhost: (string) The hostname of the localhost. (since Horde_Smtp + 1.9.0) + * DEFAULT: Auto-determined. + * - password: (string) The SMTP password. + * DEFAULT: NONE + * - port: (string) The SMTP port. + * DEFAULT: 587 + * - secure: (string) Use SSL or TLS to connect. + * DEFAULT: true (use 'tls' option, if available) + * - false (No encryption) + * - 'ssl' (Auto-detect SSL version) + * - 'sslv2' (Force SSL version 2) + * - 'sslv3' (Force SSL version 3) + * - 'tls' (TLS; started via protocol-level negotation over + * unencrypted channel; RECOMMENDED way of initiating secure + * connection) + * - 'tlsv1' (TLS direct version 1.x connection to server) [@since + * Horde_Smtp .3.0] + * - true (Use TLS, if available) [@since Horde_Smtp 1.2.0] + * DEFAULT: No encryption + * - timeout: (integer) Connection timeout, in seconds. + * DEFAULT: 30 seconds + * - username: (string) The SMTP username. + * DEFAULT: NONE + * - xoauth2_token: (string) If set, will authenticate via the XOAUTH2 + * mechanism (if available) with this token. Either a + * string or a Horde_Smtp_Password object (since + * Horde_Smtp 1.1.0). + */ + public function __construct(array $params = array()) + { + $this->_params = $params; + + /* SMTP requires CRLF line endings. */ + $this->sep = "\r\n"; + } + + /** + */ + public function __get($name) + { + switch ($name) { + case 'eai': + $this->getSMTPObject(); + return $this->_smtp->data_intl; + } + + return parent::__get($name); + } + + /** + */ + public function send($recipients, array $headers, $body) + { + /* If we don't already have an SMTP object, create one. */ + $this->getSMTPObject(); + + $headers = $this->_sanitizeHeaders($headers); + list($from, $textHeaders) = $this->prepareHeaders($headers); + $from = $this->_getFrom($from, $headers); + + $combine = Horde_Stream_Wrapper_Combine::getStream(array( + rtrim($textHeaders, $this->sep), + $this->sep . $this->sep, + $body + )); + + try { + $this->_smtp->send($from, $recipients, $combine); + } catch (Horde_Smtp_Exception $e) { + throw new Horde_Mail_Exception($e); + } + } + + /** + * Connect to the SMTP server by instantiating a Horde_Smtp object. + * + * @return Horde_Smtp The SMTP object. + * @throws Horde_Mail_Exception + */ + public function getSMTPObject() + { + if (!$this->_smtp) { + $this->_smtp = new Horde_Smtp($this->_params); + try { + $this->_smtp->login(); + } catch (Horde_Smtp_Exception $e) { + throw new Horde_Mail_Exception($e); + } + } + + return $this->_smtp; + } + +} diff --git a/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mail/Horde/Mail/Transport/Smtpmx.php b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mail/Horde/Mail/Transport/Smtpmx.php new file mode 100644 index 00000000..69126835 --- /dev/null +++ b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mail/Horde/Mail/Transport/Smtpmx.php @@ -0,0 +1,362 @@ + + * @author Michael Slusarz + * @category Horde + * @copyright 2010-2016 Horde LLC + * @copyright 2010 Gerd Schaufelberger + * @deprecated Use Horde_Mail_Transport_Hordesmtp instead + * @license http://www.horde.org/licenses/bsd New BSD License + * @package Mail + */ +class Horde_Mail_Transport_Smtpmx extends Horde_Mail_Transport +{ + /** + * SMTP connection object. + * + * @var Net_SMTP + */ + protected $_smtp = null; + + /** + * Net_DNS2_Resolver object. + * + * @var Net_DNS2_Resolver + */ + protected $_resolver; + + /** + * Internal error codes. + * Translate internal error identifier to human readable messages. + * + * @var array + */ + protected $_errorCode = array( + 'not_connected' => array( + 'code' => 1, + 'msg' => 'Could not connect to any mail server ({HOST}) at port {PORT} to send mail to {RCPT}.' + ), + 'failed_vrfy_rcpt' => array( + 'code' => 2, + 'msg' => 'Recipient "{RCPT}" could not be veryfied.' + ), + 'failed_set_from' => array( + 'code' => 3, + 'msg' => 'Failed to set sender: {FROM}.' + ), + 'failed_set_rcpt' => array( + 'code' => 4, + 'msg' => 'Failed to set recipient: {RCPT}.' + ), + 'failed_send_data' => array( + 'code' => 5, + 'msg' => 'Failed to send mail to: {RCPT}.' + ), + 'no_from' => array( + 'code' => 5, + 'msg' => 'No from address has be provided.' + ), + 'send_data' => array( + 'code' => 7, + 'msg' => 'Failed to create Net_SMTP object.' + ), + 'no_mx' => array( + 'code' => 8, + 'msg' => 'No MX-record for {RCPT} found.' + ), + 'no_resolver' => array( + 'code' => 9, + 'msg' => 'Could not start resolver! Install PEAR:Net_DNS2 or switch off "netdns"' + ), + 'failed_rset' => array( + 'code' => 10, + 'msg' => 'RSET command failed, SMTP-connection corrupt.' + ) + ); + + /** + * @param array $params Additional options: + * - debug: (boolean) Activate SMTP debug mode? + * DEFAULT: false + * - mailname: (string) The name of the local mail system (a valid + * hostname which matches the reverse lookup) + * DEFAULT: Auto-determined + * - netdns: (boolean) Use PEAR:Net_DNS2 (true) or the PHP builtin + * getmxrr(). + * DEFAULT: true + * - port: (integer) Port. + * DEFAULT: Auto-determined + * - test: (boolean) Activate test mode? + * DEFAULT: false + * - timeout: (integer) The SMTP connection timeout (in seconds). + * DEFAULT: 10 + * - verp: (boolean) Whether to use VERP. + * If not a boolean, the string value will be used as the VERP + * separators. + * DEFAULT: false + * - vrfy: (boolean) Whether to use VRFY. + * DEFAULT: false + */ + public function __construct(array $params = array()) + { + /* Try to find a valid mailname. */ + if (!isset($params['mailname']) && function_exists('posix_uname')) { + $uname = posix_uname(); + $params['mailname'] = $uname['nodename']; + } + + if (!isset($params['port'])) { + $params['port'] = getservbyname('smtp', 'tcp'); + } + + $this->_params = array_merge(array( + 'debug' => false, + 'mailname' => 'localhost', + 'netdns' => true, + 'port' => 25, + 'test' => false, + 'timeout' => 10, + 'verp' => false, + 'vrfy' => false + ), $params); + + /* SMTP requires CRLF line endings. */ + $this->sep = "\r\n"; + } + + /** + * Destructor implementation to ensure that we disconnect from any + * potentially-alive persistent SMTP connections. + */ + public function __destruct() + { + if (is_object($this->_smtp)) { + $this->_smtp->disconnect(); + $this->_smtp = null; + } + } + + /** + */ + public function send($recipients, array $headers, $body) + { + $headers = $this->_sanitizeHeaders($headers); + + // Prepare headers + list($from, $textHeaders) = $this->prepareHeaders($headers); + + try { + $from = $this->_getFrom($from, $headers); + } catch (Horde_Mail_Exception $e) { + $this->_error('no_from'); + } + + // Prepare recipients + foreach ($this->parseRecipients($recipients) as $rcpt) { + list(,$host) = explode('@', $rcpt); + + $mx = $this->_getMx($host); + if (!$mx) { + $this->_error('no_mx', array('rcpt' => $rcpt)); + } + + $connected = false; + foreach (array_keys($mx) as $mserver) { + $this->_smtp = new Net_SMTP($mserver, $this->_params['port'], $this->_params['mailname']); + + // configure the SMTP connection. + if ($this->_params['debug']) { + $this->_smtp->setDebug(true); + } + + // attempt to connect to the configured SMTP server. + $res = $this->_smtp->connect($this->_params['timeout']); + if ($res instanceof PEAR_Error) { + $this->_smtp = null; + continue; + } + + // connection established + if ($res) { + $connected = true; + break; + } + } + + if (!$connected) { + $this->_error('not_connected', array( + 'host' => implode(', ', array_keys($mx)), + 'port' => $this->_params['port'], + 'rcpt' => $rcpt + )); + } + + // Verify recipient + if ($this->_params['vrfy']) { + $res = $this->_smtp->vrfy($rcpt); + if ($res instanceof PEAR_Error) { + $this->_error('failed_vrfy_rcpt', array('rcpt' => $rcpt)); + } + } + + // mail from: + $args['verp'] = $this->_params['verp']; + $res = $this->_smtp->mailFrom($from, $args); + if ($res instanceof PEAR_Error) { + $this->_error('failed_set_from', array('from' => $from)); + } + + // rcpt to: + $res = $this->_smtp->rcptTo($rcpt); + if ($res instanceof PEAR_Error) { + $this->_error('failed_set_rcpt', array('rcpt' => $rcpt)); + } + + // Don't send anything in test mode + if ($this->_params['test']) { + $res = $this->_smtp->rset(); + if ($res instanceof PEAR_Error) { + $this->_error('failed_rset'); + } + + $this->_smtp->disconnect(); + $this->_smtp = null; + return; + } + + // Send data. Net_SMTP does necessary EOL conversions. + $res = $this->_smtp->data($body, $textHeaders); + if ($res instanceof PEAR_Error) { + $this->_error('failed_send_data', array('rcpt' => $rcpt)); + } + + $this->_smtp->disconnect(); + $this->_smtp = null; + } + } + + /** + * Recieve MX records for a host. + * + * @param string $host Mail host. + * + * @return mixed Sorted MX list or false on error. + */ + protected function _getMx($host) + { + $mx = array(); + + if ($this->params['netdns']) { + $this->_loadNetDns(); + + try { + $response = $this->_resolver->query($host, 'MX'); + if (!$response) { + return false; + } + } catch (Exception $e) { + throw new Horde_Mail_Exception($e); + } + + foreach ($response->answer as $rr) { + if ($rr->type == 'MX') { + $mx[$rr->exchange] = $rr->preference; + } + } + } else { + $mxHost = $mxWeight = array(); + + if (!getmxrr($host, $mxHost, $mxWeight)) { + return false; + } + + for ($i = 0; $i < count($mxHost); ++$i) { + $mx[$mxHost[$i]] = $mxWeight[$i]; + } + } + + asort($mx); + + return $mx; + } + + /** + * Initialize Net_DNS2_Resolver. + */ + protected function _loadNetDns() + { + if (!$this->_resolver) { + if (!class_exists('Net_DNS2_Resolver')) { + $this->_error('no_resolver'); + } + $this->_resolver = new Net_DNS2_Resolver(); + } + } + + /** + * Format error message. + * + * @param string $id Maps error ids to codes and message. + * @param array $info Optional information in associative array. + * + * @throws Horde_Mail_Exception + */ + protected function _error($id, $info = array()) + { + $msg = $this->_errorCode[$id]['msg']; + + // include info to messages + if (!empty($info)) { + $replace = $search = array(); + + foreach ($info as $key => $value) { + $search[] = '{' . Horde_String::upper($key) . '}'; + $replace[] = $value; + } + + $msg = str_replace($search, $replace, $msg); + } + + throw new Horde_Mail_Exception($msg, $this->_errorCode[$id]['code']); + } + +} diff --git a/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mail/data/locale/Horde_Mail.pot b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mail/data/locale/Horde_Mail.pot new file mode 100644 index 00000000..76eabf58 --- /dev/null +++ b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mail/data/locale/Horde_Mail.pot @@ -0,0 +1,27 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR Horde LLC (http://www.horde.org/) +# This file is distributed under the same license as the Horde_Mail package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Horde_Mail\n" +"Report-Msgid-Bugs-To: dev@lists.horde.org\n" +"POT-Creation-Date: 2014-11-12 14:05+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/Mail/Mbox/Parse.php:65 +msgid "Could not parse mailbox data." +msgstr "" + +#: lib/Horde/Mail/Mbox/Parse.php:98 +#, php-format +msgid "Imported mailbox contains more than enforced limit of %u messages." +msgstr "" diff --git a/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mail/data/locale/tr/LC_MESSAGES/Horde_Mail.mo b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mail/data/locale/tr/LC_MESSAGES/Horde_Mail.mo new file mode 100644 index 0000000000000000000000000000000000000000..9c35ad389c3307dfbdfe827be5863aeb53341b93 GIT binary patch literal 708 zcmZvZ&2G~`5Xa5e#YfH{4H8How8jpo1c#t1Neht@5vqW=!8AKbmaccB-F4LD!W(eo zhQyI;@(R?v2G7Dck=hF*{XF*Ue?E5n_x8>25!(&s4)ct;#SEC*J~MY2WID`O=G(O> z`py16^X_^S4cRZ*bNJHgdK`+Pt}V3$V*@PEd4d9!KDFl{F<=t)i-mQ8j(pv5Iqc(LnF9Zg)$*oCc(Xm zhyCHv)kU%-jk~-OGC_=23mz%Zd3dtWyrULO=JiTL`~CP>G_Q0Hjh~VeM`mKBGP4|- zrz*rB#cML;Fj$wv$dcq`W=S*28u0)<*RS*R{x}}#(xDc|))hVnv)Fz5cB2LR*Y-mL z_u7y>YH{-Znmn6}qn=tT150vBGk_~sZU6iX)t0@+0%f&LqH1&TYj=7Ua2GcqcX|A0 jIWH(l9Kkul6xSMIZCz<}3BKAIuB6d{+ErLtmqh;nP~qMJ literal 0 HcmV?d00001 diff --git a/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mail/data/locale/tr/LC_MESSAGES/Horde_Mail.po b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mail/data/locale/tr/LC_MESSAGES/Horde_Mail.po new file mode 100644 index 00000000..bedb877f --- /dev/null +++ b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mail/data/locale/tr/LC_MESSAGES/Horde_Mail.po @@ -0,0 +1,29 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR Horde LLC (http://www.horde.org/) +# This file is distributed under the same license as the Horde_Mail package. +# FIRST AUTHOR , YEAR. +# +msgid "" +msgstr "" +"Project-Id-Version: Horde_Mail\n" +"Report-Msgid-Bugs-To: dev@lists.horde.org\n" +"POT-Creation-Date: 2017-06-09 16:08+0300\n" +"PO-Revision-Date: 2017-06-09 16:20+0300\n" +"Language-Team: İTÜ BİDB \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Generator: Poedit 1.8.12\n" +"Last-Translator: \n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" +"Language: tr\n" + +#: lib/Horde/Mail/Mbox/Parse.php:65 +msgid "Could not parse mailbox data." +msgstr "Dizin verileri ayrıştırılamadı." + +#: lib/Horde/Mail/Mbox/Parse.php:98 +#, php-format +msgid "Imported mailbox contains more than enforced limit of %u messages." +msgstr "" +"İçeri aktarılan dizin %u iletiden daha fazla zorunlu sınırlar içeriyor." diff --git a/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mime/Horde/Mime.php b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mime/Horde/Mime.php new file mode 100644 index 00000000..c772c9b9 --- /dev/null +++ b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mime/Horde/Mime.php @@ -0,0 +1,397 @@ + + * @author Michael Slusarz + * @category Horde + * @copyright 1999-2017 Horde LLC + * @license http://www.horde.org/licenses/lgpl21 LGPL 2.1 + * @package Mime + */ +class Horde_Mime +{ + /** + * The RFC defined EOL string. + * + * @var string + */ + const EOL = "\r\n"; + + /** + * Use windows-1252 charset when decoding ISO-8859-1 data? + * HTML 5 requires this behavior, so it is the default. + * + * @var boolean + */ + public static $decodeWindows1252 = true; + + /** + * Determines if a string contains 8-bit (non US-ASCII) characters. + * + * @param string $string The string to check. + * @param string $charset The charset of the string. Defaults to + * US-ASCII. (@deprecated) + * + * @return boolean True if string contains non 7-bit characters. + */ + public static function is8bit($string, $charset = null) + { + $string = strval($string); + for ($i = 0, $len = strlen($string); $i < $len; ++$i) { + if (ord($string[$i]) > 127) { + return true; + } + } + + return false; + } + + /** + * MIME encodes a string (RFC 2047). + * + * @param string $text The text to encode (UTF-8). + * @param string $charset The character set to encode to. + * + * @return string The MIME encoded string (US-ASCII). + */ + public static function encode($text, $charset = 'UTF-8') + { + $charset = Horde_String::lower($charset); + $text = Horde_String::convertCharset($text, 'UTF-8', $charset); + + $encoded = $is_encoded = false; + $lwsp = $word = null; + $out = ''; + + /* 0 = word unencoded + * 1 = word encoded + * 2 = spaces */ + $parts = array(); + + /* Tokenize string. */ + for ($i = 0, $len = strlen($text); $i < $len; ++$i) { + switch ($text[$i]) { + case "\t": + case "\r": + case "\n": + if (!is_null($word)) { + $parts[] = array(intval($encoded), $word, $i - $word); + $word = null; + } elseif (!is_null($lwsp)) { + $parts[] = array(2, $lwsp, $i - $lwsp); + $lwsp = null; + } + + $parts[] = array(0, $i, 1); + break; + + case ' ': + if (!is_null($word)) { + $parts[] = array(intval($encoded), $word, $i - $word); + $word = null; + } + if (is_null($lwsp)) { + $lwsp = $i; + } + break; + + default: + if (is_null($word)) { + $encoded = false; + $word = $i; + if (!is_null($lwsp)) { + $parts[] = array(2, $lwsp, $i - $lwsp); + $lwsp = null; + } + + /* Check for MIME encoding delimiter. Encode it if + * found. */ + if (($text[$i] === '=') && + (($i + 1) < $len) && + ($text[$i +1] === '?')) { + ++$i; + $encoded = $is_encoded = true; + } + } + + /* Check for 8-bit characters or control characters. */ + if (!$encoded) { + $c = ord($text[$i]); + if ($encoded = (($c & 0x80) || ($c < 32))) { + $is_encoded = true; + } + } + break; + } + } + + if (!$is_encoded) { + return $text; + } + + if (is_null($lwsp)) { + $parts[] = array(intval($encoded), $word, $len); + } else { + $parts[] = array(2, $lwsp, $len); + } + + /* Combine parts into MIME encoded string. */ + for ($i = 0, $cnt = count($parts); $i < $cnt; ++$i) { + $val = $parts[$i]; + + switch ($val[0]) { + case 0: + case 2: + $out .= substr($text, $val[1], $val[2]); + break; + + case 1: + $j = $i; + for ($k = $i + 1; $k < $cnt; ++$k) { + switch ($parts[$k][0]) { + case 0: + break 2; + + case 1: + $i = $k; + break; + } + } + + $encode = ''; + for (; $j <= $i; ++$j) { + $encode .= substr($text, $parts[$j][1], $parts[$j][2]); + } + + $delim = '=?' . $charset . '?b?'; + $e_parts = explode( + self::EOL, + rtrim( + chunk_split( + base64_encode($encode), + /* strlen($delim) + 2 = space taken by MIME + * delimiter */ + intval((75 - strlen($delim) + 2) / 4) * 4 + ) + ) + ); + + $tmp = array(); + foreach ($e_parts as $val) { + $tmp[] = $delim . $val . '?='; + } + + $out .= implode(' ', $tmp); + break; + } + } + + return rtrim($out); + } + + /** + * Decodes a MIME encoded (RFC 2047) string. + * + * @param string $string The MIME encoded text. + * + * @return string The decoded text. + */ + public static function decode($string) + { + $old_pos = 0; + $out = ''; + + while (($pos = strpos($string, '=?', $old_pos)) !== false) { + /* Save any preceding text, if it is not LWSP between two + * encoded words. */ + $pre = substr($string, $old_pos, $pos - $old_pos); + if (!$old_pos || + (strspn($pre, " \t\n\r") != strlen($pre))) { + $out .= $pre; + } + + /* Search for first delimiting question mark (charset). */ + if (($d1 = strpos($string, '?', $pos + 2)) === false) { + break; + } + + $orig_charset = substr($string, $pos + 2, $d1 - $pos - 2); + if (self::$decodeWindows1252 && + (Horde_String::lower($orig_charset) == 'iso-8859-1')) { + $orig_charset = 'windows-1252'; + } + + /* Search for second delimiting question mark (encoding). */ + if (($d2 = strpos($string, '?', $d1 + 1)) === false) { + break; + } + + $encoding = substr($string, $d1 + 1, $d2 - $d1 - 1); + + /* Search for end of encoded data. */ + if (($end = strpos($string, '?=', $d2 + 1)) === false) { + break; + } + + $encoded_text = substr($string, $d2 + 1, $end - $d2 - 1); + + switch ($encoding) { + case 'Q': + case 'q': + $out .= Horde_String::convertCharset( + quoted_printable_decode( + str_replace('_', ' ', $encoded_text) + ), + $orig_charset, + 'UTF-8' + ); + break; + + case 'B': + case 'b': + $out .= Horde_String::convertCharset( + base64_decode($encoded_text), + $orig_charset, + 'UTF-8' + ); + break; + + default: + // Ignore unknown encoding. + break; + } + + $old_pos = $end + 2; + } + + return $out . substr($string, $old_pos); + } + + /* Deprecated methods. */ + + /** + * @deprecated Use Horde_Mime_Headers_MessageId::create() instead. + */ + public static function generateMessageId() + { + return Horde_Mime_Headers_MessageId::create()->value; + } + + /** + * @deprecated Use Horde_Mime_Uudecode instead. + */ + public static function uudecode($input) + { + $uudecode = new Horde_Mime_Uudecode($input); + return iterator_to_array($uudecode); + } + + /** + * @deprecated + */ + public static $brokenRFC2231 = false; + + /** + * @deprecated + */ + const MIME_PARAM_QUOTED = '/[\x01-\x20\x22\x28\x29\x2c\x2f\x3a-\x40\x5b-\x5d]/'; + + /** + * @deprecated Use Horde_Mime_Headers_ContentParam#encode() instead. + */ + public static function encodeParam($name, $val, array $opts = array()) + { + $cp = new Horde_Mime_Headers_ContentParam( + 'UNUSED', + array($name => $val) + ); + + return $cp->encode(array_merge(array( + 'broken_rfc2231' => self::$brokenRFC2231 + ), $opts)); + } + + /** + * @deprecated Use Horde_Mime_Headers_ELement_ContentParam instead. + */ + public static function decodeParam($type, $data) + { + $cp = new Horde_Mime_Headers_ContentParam( + 'UNUSED', + $data + ); + + if (strlen($cp->value)) { + $val = $cp->value; + } else { + $val = (Horde_String::lower($type) == 'content-type') + ? 'text/plain' + : 'attachment'; + } + + return array( + 'params' => $cp->params, + 'val' => $val + ); + } + + /** + * @deprecated Use Horde_Mime_Id instead. + */ + public static function mimeIdArithmetic($id, $action, $options = array()) + { + $id_ob = new Horde_Mime_Id($id); + + switch ($action) { + case 'down': + $action = $id_ob::ID_DOWN; + break; + + case 'next': + $action = $id_ob::ID_NEXT; + break; + + case 'prev': + $action = $id_ob::ID_PREV; + break; + + case 'up': + $action = $id_ob::ID_UP; + break; + } + + return $id_ob->idArithmetic($action, $options); + } + + /** + * @deprecated Use Horde_Mime_Id instead. + */ + public static function isChild($base, $id) + { + $id_ob = new Horde_Mime_Id($base); + return $id_ob->isChild($id); + } + + /** + * @deprecated Use Horde_Mime_QuotedPrintable instead. + */ + public static function quotedPrintableEncode($text, $eol = self::EOL, + $wrap = 76) + { + return Horde_Mime_QuotedPrintable::encode($text, $eol, $wrap); + } + +} diff --git a/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mime/Horde/Mime/ContentParam/Decode.php b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mime/Horde/Mime/ContentParam/Decode.php new file mode 100644 index 00000000..73843e6b --- /dev/null +++ b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mime/Horde/Mime/ContentParam/Decode.php @@ -0,0 +1,142 @@ + + * + * @category Horde + * @copyright 2002-2015 Timo Sirainen + * @copyright 2014-2017 Horde LLC + * @license http://www.horde.org/licenses/lgpl21 LGPL 2.1 + * @package Mime + */ + +/** + * Decode MIME content parameter data (RFC 2045; 2183; 2231). + * + * @author Timo Sirainen + * @author Michael Slusarz + * @category Horde + * @copyright 2002-2015 Timo Sirainen + * @copyright 2014-2017 Horde LLC + * @license http://www.horde.org/licenses/lgpl21 LGPL 2.1 + * @package Mime + * @since 2.5.0 + */ +class Horde_Mime_ContentParam_Decode extends Horde_Mail_Rfc822 +{ + /** + * Decode content parameter data. + * + * @param string $data Parameter data. + * + * @return array List of parameter key/value combinations. + */ + public function decode($data) + { + $out = array(); + + $this->_data = $data; + $this->_datalen = strlen($data); + $this->_ptr = 0; + + while ($this->_curr() !== false) { + $this->_rfc822SkipLwsp(); + + $this->_rfc822ParseMimeToken($param); + + if (is_null($param) || ($this->_curr() != '=')) { + break; + } + + ++$this->_ptr; + $this->_rfc822SkipLwsp(); + + $value = ''; + + if ($this->_curr() == '"') { + try { + $this->_rfc822ParseQuotedString($value); + } catch (Horde_Mail_Exception $e) { + break; + } + } else { + $this->_rfc822ParseMimeToken($value); + if (is_null($value)) { + break; + } + } + + $out[$param] = $value; + + $this->_rfc822SkipLwsp(); + if ($this->_curr() != ';') { + break; + } + + ++$this->_ptr; + } + + return $out; + } + + /** + * Determine if character is a non-escaped element in MIME parameter data + * (See RFC 2045 [Appendix A]). + * + * @param string $c Character to test. + * + * @return boolean True if non-escaped character. + */ + public static function isAtextNonTspecial($c) + { + switch ($ord = ord($c)) { + case 34: + case 40: + case 41: + case 44: + case 47: + case 58: + case 59: + case 60: + case 61: + case 62: + case 63: + case 64: + case 91: + case 92: + case 93: + /* "(),/:;<=>?@[\] */ + return false; + + default: + /* CTLs, SPACE, DEL, non-ASCII */ + return (($ord > 32) && ($ord < 127)); + } + } + + /** + */ + protected function _rfc822ParseMimeToken(&$str) + { + for ($i = $this->_ptr, $size = strlen($this->_data); $i < $size; ++$i) { + if (!self::isAtextNonTspecial($this->_data[$i])) { + break; + } + } + + if ($i === $this->_ptr) { + $str = null; + } else { + $str = substr($this->_data, $this->_ptr, $i - $this->_ptr); + $this->_ptr += ($i - $this->_ptr); + $this->_rfc822SkipLwsp(); + } + } + +} diff --git a/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mime/Horde/Mime/Exception.php b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mime/Horde/Mime/Exception.php new file mode 100644 index 00000000..9f687e0d --- /dev/null +++ b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mime/Horde/Mime/Exception.php @@ -0,0 +1,25 @@ + + * @category Horde + * @copyright 2009-2017 Horde LLC + * @license http://www.horde.org/licenses/lgpl21 LGPL 2.1 + * @package Mime + */ +class Horde_Mime_Exception extends Horde_Exception_Wrapped +{ +} diff --git a/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mime/Horde/Mime/Filter/Encoding.php b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mime/Horde/Mime/Filter/Encoding.php new file mode 100644 index 00000000..2828dd2e --- /dev/null +++ b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mime/Horde/Mime/Filter/Encoding.php @@ -0,0 +1,90 @@ + + * @category Horde + * @copyright 2014-2017 Horde LLC + * @license http://www.horde.org/licenses/lgpl21 LGPL 2.1 + * @package Mime + * @since 2.6.0 + */ +class Horde_Mime_Filter_Encoding extends php_user_filter +{ + /** + * Number of consecutive non-CR/LF characters. + * + * @var integer + */ + protected $_crlf = 0; + + /** + * @see stream_filter_register() + */ + public function onCreate() + { + $this->params->body = false; + + return true; + } + + /** + * @see stream_filter_register() + */ + public function filter($in, $out, &$consumed, $closing) + { + while ($bucket = stream_bucket_make_writeable($in)) { + if ($this->params->body !== 'binary') { + $len = $bucket->datalen; + $str = $bucket->data; + + for ($i = 0; $i < $len; ++$i) { + $chr = ord($str[$i]); + + switch ($chr) { + case 0: + /* Only binary data can have NULLs. */ + $this->params->body = 'binary'; + break 2; + + case 10: // LF + case 13: // CR + $this->_crlf = 0; + break; + + default: + /* RFC 2045 [2.8]: 8bit data must be less than 998 + * characters in length. Otherwise, we are looking at + * binary. */ + if (++$this->_crlf > 998) { + $this->params->body = 'binary'; + break 2; + } elseif ($chr > 127) { + $this->params->body = '8bit'; + } + break; + } + } + } + + $consumed += $bucket->datalen; + stream_bucket_append($out, $bucket); + } + + return PSFS_PASS_ON; + } + +} diff --git a/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mime/Horde/Mime/Headers.php b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mime/Horde/Mime/Headers.php new file mode 100644 index 00000000..04a7f8cc --- /dev/null +++ b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mime/Horde/Mime/Headers.php @@ -0,0 +1,535 @@ + + * @category Horde + * @copyright 2002-2017 Horde LLC + * @license http://www.horde.org/licenses/lgpl21 LGPL 2.1 + * @package Mime + */ +class Horde_Mime_Headers +implements ArrayAccess, IteratorAggregate, Serializable +{ + /* Serialized version. */ + const VERSION = 3; + + /** + * The default charset to use when parsing text parts with no charset + * information. + * + * @todo Make this a non-static property or pass as parameter to static + * methods in Horde 6. + * @var string + */ + public static $defaultCharset = 'us-ascii'; + + /** + * Cached handler information for Header Element objects. + * + * @var array + */ + protected static $_handlers = array(); + + /** + * The internal headers array. + * + * @var Horde_Support_CaseInsensitiveArray + */ + protected $_headers; + + /** + * Constructor. + */ + public function __construct() + { + $this->_headers = new Horde_Support_CaseInsensitiveArray(); + } + + /** + */ + public function __clone() + { + $copy = new Horde_Support_CaseInsensitiveArray(); + foreach ($this->_headers as $key => $val) { + $copy[$key] = clone $val; + } + $this->_headers = $copy; + } + + /** + * Returns the headers in array format. + * + * @param array $opts Optional parameters: + *
+     *   - broken_rfc2231: (boolean) Attempt to work around non-RFC
+     *                     2231-compliant MUAs by generating both a RFC
+     *                     2047-like parameter name and also the correct RFC
+     *                     2231 parameter
+     *                     DEFAULT: false
+     *   - canonical: (boolean) Use canonical (RFC 822/2045) CRLF EOLs?
+     *                DEFAULT: Uses "\n"
+     *   - charset: (string) Encodes the headers using this charset. If empty,
+     *              encodes using UTF-8.
+     *              DEFAULT: No encoding.
+     *   - defserver: (string) The default domain to append to mailboxes.
+     *                DEFAULT: No default name.
+     *   - lang: (string) The language to use when encoding.
+     *           DEFAULT: None specified
+     *   - nowrap: (integer) Don't wrap the headers.
+     *             DEFAULT: Headers are wrapped.
+     * 
+ * + * @return array The headers in array format. Keys are header names, but + * case sensitivity cannot be guaranteed. Values are + * header values. + */ + public function toArray(array $opts = array()) + { + $charset = array_key_exists('charset', $opts) + ? (empty($opts['charset']) ? 'UTF-8' : $opts['charset']) + : null; + $eol = empty($opts['canonical']) + ? $this->_eol + : "\r\n"; + $ret = array(); + + foreach ($this->_headers as $ob) { + $sopts = array( + 'charset' => $charset + ); + + if (($ob instanceof Horde_Mime_Headers_Addresses) || + ($ob instanceof Horde_Mime_Headers_AddressesMulti)) { + if (!empty($opts['defserver'])) { + $sopts['defserver'] = $opts['defserver']; + } + } elseif ($ob instanceof Horde_Mime_Headers_ContentParam) { + $sopts['broken_rfc2231'] = !empty($opts['broken_rfc2231']); + if (!empty($opts['lang'])) { + $sopts['lang'] = $opts['lang']; + } + } + + $tmp = array(); + + foreach ($ob->sendEncode(array_filter($sopts)) as $val) { + if (empty($opts['nowrap'])) { + /* Remove any existing linebreaks and wrap the line. */ + $htext = $ob->name . ': '; + $val = ltrim( + substr( + wordwrap( + $htext . strtr(trim($val), array("\r" => '', "\n" => '')), + 76, + $eol . ' ' + ), + strlen($htext) + ) + ); + } + + $tmp[] = $val; + } + + $ret[$ob->name] = (count($tmp) == 1) + ? reset($tmp) + : $tmp; + } + + return $ret; + } + + /** + * Returns all headers concatenated into a single string. + * + * @param array $opts See toArray(). + * + * @return string The headers in string format. + */ + public function toString(array $opts = array()) + { + $eol = empty($opts['canonical']) + ? $this->_eol + : "\r\n"; + $text = ''; + + foreach ($this->toArray($opts) as $key => $val) { + foreach ((is_array($val) ? $val : array($val)) as $entry) { + $text .= $key . ': ' . $entry . $eol; + } + } + + return $text . $eol; + } + + /** + * Add/append/replace a header. + * + * @param string $header The header name. + * @param string $value The header value (UTF-8). + * @param array $opts DEPRECATED + */ + public function addHeader($header, $value, array $opts = array()) + { + /* Existing header? Add to that object. */ + $header = trim($header); + if ($hdr = $this[$header]) { + $hdr->setValue($value); + return; + } + + $classname = $this->_getHeaderClassName($header); + + try { + $ob = new $classname($header, $value); + } catch (InvalidArgumentException $e) { + /* Ignore an invalid header. */ + return; + } catch (Horde_Mime_Exception $e) { + return; + } + + switch ($classname) { + case 'Horde_Mime_Headers_ContentParam_ContentDisposition': + case 'Horde_Mime_Headers_ContentParam_ContentType': + /* BC */ + if (!empty($opts['params'])) { + foreach ($opts['params'] as $key => $val) { + $ob[$key] = $val; + } + } + break; + } + + $this->_headers[$ob->name] = $ob; + } + + /** + * Add a Horde_Mime_Headers_Element object to the current header list. + * + * @since 2.5.0 + * + * @param Horde_Mime_Headers_Element $ob Header object to add. + * @param boolean $check Check that the header and object + * type match? + * + * @throws InvalidArgumentException + */ + public function addHeaderOb(Horde_Mime_Headers_Element $ob, $check = false) + { + if ($check) { + $cname = $this->_getHeaderClassName($ob->name); + if (!($ob instanceof $cname)) { + throw new InvalidArgumentException(sprintf( + 'Object is not correct class: %s', + $cname + )); + } + } + + /* Existing header? Add to that object. */ + if ($hdr = $this[$ob->name]) { + $hdr->setValue($ob); + } else { + $this->_headers[$ob->name] = $ob; + } + } + + /** + * Return the header class to use for a header name. + * + * @param string $header The header name. + * + * @return string The Horde_Mime_Headers_* class to use. + */ + protected function _getHeaderClassName($header) + { + if (empty(self::$_handlers)) { + $search = array( + 'Horde_Mime_Headers_Element_Single', + 'Horde_Mime_Headers_AddressesMulti', + 'Horde_Mime_Headers_Addresses', + 'Horde_Mime_Headers_ContentDescription', + 'Horde_Mime_Headers_ContentId', + 'Horde_Mime_Headers_ContentLanguage', + 'Horde_Mime_Headers_ContentParam_ContentDisposition', + 'Horde_Mime_Headers_ContentParam_ContentType', + 'Horde_Mime_Headers_ContentTransferEncoding', + 'Horde_Mime_Headers_Date', + 'Horde_Mime_Headers_Identification', + 'Horde_Mime_Headers_MessageId', + 'Horde_Mime_Headers_Mime', + 'Horde_Mime_Headers_MimeVersion', + 'Horde_Mime_Headers_Received', + 'Horde_Mime_Headers_Subject', + 'Horde_Mime_Headers_UserAgent' + ); + + foreach ($search as $val) { + foreach ($val::getHandles() as $hdr) { + self::$_handlers[$hdr] = $val; + } + } + } + + $header = Horde_String::lower($header); + + return isset(self::$_handlers[$header]) + ? self::$_handlers[$header] + : 'Horde_Mime_Headers_Element_Multiple'; + } + + /** + * Get a header from the header array. + * + * @param string $header The header name. + * + * @return Horde_Mime_Headers_Element Element object, or null if not + * found. + */ + public function getHeader($header) + { + return $this[$header]; + } + + /** + * Remove a header from the header array. + * + * @param string $header The header name. + */ + public function removeHeader($header) + { + unset($this[$header]); + } + + /* Static methods. */ + + /** + * Builds a Horde_Mime_Headers object from header text. + * + * @param mixed $text A text string (or, as of 2.3.0, a Horde_Stream + * object or stream resource) containing the headers. + * + * @return Horde_Mime_Headers A new Horde_Mime_Headers object. + */ + public static function parseHeaders($text) + { + $curr = null; + $headers = new Horde_Mime_Headers(); + $hdr_list = array(); + + if ($text instanceof Horde_Stream) { + $stream = $text; + $stream->rewind(); + } else { + $stream = new Horde_Stream_Temp(); + $stream->add($text, true); + } + + while (!$stream->eof()) { + if (!($val = rtrim($stream->getToChar("\n", false), "\r"))) { + break; + } + + if ($curr && (($val[0] == ' ') || ($val[0] == "\t"))) { + $curr->text .= ' ' . ltrim($val); + } else { + $pos = strpos($val, ':'); + + $curr = new stdClass; + $curr->header = substr($val, 0, $pos); + $curr->text = ltrim(substr($val, $pos + 1)); + + $hdr_list[] = $curr; + } + } + + foreach ($hdr_list as $val) { + /* When parsing, only keep the FIRST header seen for single value + * text-only headers, since newer headers generally are appended + * to the top of the message. */ + if (!($ob = $headers[$val->header]) || + !($ob instanceof Horde_Mime_Headers_Element_Single) || + ($ob instanceof Horde_Mime_Headers_Addresses)) { + $headers->addHeader($val->header, rtrim($val->text)); + } + } + + if (!($text instanceof Horde_Stream)) { + $stream->close(); + } + + return $headers; + } + + /* Serializable methods. */ + + /** + * Serialization. + * + * @return string Serialized data. + */ + public function serialize() + { + $data = array( + // Serialized data ID. + self::VERSION, + $this->_headers->getArrayCopy(), + // TODO: BC + $this->_eol + ); + + return serialize($data); + } + + /** + * Unserialization. + * + * @param string $data Serialized data. + * + * @throws Exception + */ + public function unserialize($data) + { + $data = @unserialize($data); + if (!is_array($data) || + !isset($data[0]) || + ($data[0] != self::VERSION)) { + throw new Horde_Mime_Exception('Cache version change'); + } + + $this->_headers = new Horde_Support_CaseInsensitiveArray($data[1]); + // TODO: BC + $this->_eol = $data[2]; + } + + /* ArrayAccess methods. */ + + /** + * Does header exist? + * + * @since 2.5.0 + * + * @param string $header Header name. + * + * @return boolean True if header exists. + */ + public function offsetExists($offset) + { + return isset($this->_headers[trim($offset)]); + } + + /** + * Return header element object. + * + * @since 2.5.0 + * + * @param string $header Header name. + * + * @return Horde_Mime_Headers_Element Element object, or null if not + * found. + */ + public function offsetGet($offset) + { + return $this->_headers[trim($offset)]; + } + + /** + * Store a header element object. + * + * @since 2.5.0 + * + * @param string $offset Not used. + * @param Horde_Mime_Headers_Element $elt Header element. + */ + public function offsetSet($offset, $value) + { + $this->addHeaderOb($value); + } + + /** + * Remove a header element object. + * + * @since 2.5.0 + * + * @param string $offset Header name. + */ + public function offsetUnset($offset) + { + unset($this->_headers[trim($offset)]); + } + + /* IteratorAggregate function */ + + /** + * @since 2.5.0 + */ + public function getIterator() + { + return new ArrayIterator($this->_headers); + } + + /* Deprecated functions */ + + /** + * Handle deprecated methods. + */ + public function __call($name, $arguments) + { + $d = new Horde_Mime_Headers_Deprecated($this); + return call_user_func_array(array($d, $name), $arguments); + } + + /** + * Handle deprecated static methods. + */ + public static function __callStatic($name, $arguments) + { + $d = new Horde_Mime_Headers_Deprecated(); + return call_user_func_array(array($d, $name), $arguments); + } + + /** + * @deprecated + */ + protected $_eol = "\n"; + + /** + * @deprecated + */ + public function setEOL($eol) + { + $this->_eol = $eol; + } + + /** + * @deprecated + */ + public function getEOL() + { + return $this->_eol; + } + + /* Constants for getValue(). @deprecated */ + const VALUE_STRING = 1; + const VALUE_BASE = 2; + const VALUE_PARAMS = 3; + +} diff --git a/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mime/Horde/Mime/Headers/Addresses.php b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mime/Horde/Mime/Headers/Addresses.php new file mode 100644 index 00000000..cdf04a18 --- /dev/null +++ b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mime/Horde/Mime/Headers/Addresses.php @@ -0,0 +1,176 @@ + + * @category Horde + * @copyright 2014-2017 Horde LLC + * @license http://www.horde.org/licenses/lgpl21 LGPL 2.1 + * @package Mime + * @since 2.5.0 + */ +class Horde_Mime_Headers_Addresses +extends Horde_Mime_Headers_Element_Single +implements Horde_Mime_Headers_Element_Address +{ + /** + * By default, if more than 1 address header is found, the addresses are + * appended together into a single field. Set this value to false to + * ignore all but the *last* header. + * + * @var boolean + */ + public $append_addr = true; + + /** + */ + public function __clone() + { + $this->_values = clone $this->_values; + } + + /** + */ + public function __get($name) + { + switch ($name) { + case 'full_value': + case 'value': + case 'value_single': + return strval($this->_values); + } + + return parent::__get($name); + } + + /** + */ + public function getAddressList($first = false) + { + return $first + ? $this->_values + : array($this->_values); + } + + /** + * + * @throws Horde_Mime_Exception + */ + protected function _setValue($value) + { + /* @todo Implement with traits */ + $rfc822 = new Horde_Mail_Rfc822(); + + try { + $addr_list = $rfc822->parseAddressList($value); + } catch (Horde_Mail_Exception $e) { + throw new Horde_Mime_Exception($e); + } + + foreach ($addr_list as $ob) { + if ($ob instanceof Horde_Mail_Rfc822_Group) { + $ob->groupname = $this->_sanityCheck($ob->groupname); + } else { + $ob->personal = $this->_sanityCheck($ob->personal); + } + } + + switch (Horde_String::lower($this->name)) { + case 'bcc': + case 'cc': + case 'from': + case 'to': + /* Catch malformed undisclosed-recipients entries. */ + if ((count($addr_list) == 1) && + preg_match("/^\s*undisclosed-recipients:?\s*$/i", $addr_list[0]->bare_address)) { + $addr_list = new Horde_Mail_Rfc822_List( + 'undisclosed-recipients:;' + ); + } + break; + } + + if ($this->append_addr && $this->_values) { + $this->_values->add($addr_list); + } else { + $this->_values = $addr_list; + } + } + + /** + */ + public static function getHandles() + { + return array( + // Mail: RFC 3798 + 'disposition-notification-to', + // Mail: RFC 5322 (Address) + 'from', + 'to', + 'cc', + 'bcc', + 'reply-to', + 'sender' + ); + } + + /** + * @param array $opts See doSendEncode(). + */ + protected function _sendEncode($opts) + { + return self::doSendEncode($this->getAddressList(), $opts); + } + + /** + * Do send encoding for addresses. + * + * Needed as a static function because it is used by both single and + * multiple address headers. + * + * @todo Implement with traits. + * + * @param array $alist An array of Horde_Mail_Rfc822_List objects. + * @param array $opts Additional options: + * - charset: (string) Encodes the headers using this charset. + * DEFAULT: UTF-8 + * - defserver: (string) The default domain to append to mailboxes. + * DEFAULT: No default name. + * - idn: (boolean) Encode IDN domain names (RFC 3490) if true. + * DEFAULT: true + */ + public static function doSendEncode($alist, array $opts = array()) + { + $out = array(); + $opts = array_merge(array('idn' => true), $opts); + foreach ($alist as $ob) { + if (!empty($opts['defserver'])) { + foreach ($ob->raw_addresses as $ob2) { + if (is_null($ob2->host)) { + $ob2->host = $opts['defserver']; + } + } + } + + $out[] = $ob->writeAddress(array( + 'encode' => empty($opts['charset']) ? null : $opts['charset'], + 'idn' => $opts['idn'] + )); + } + + return $out; + } + +} diff --git a/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mime/Horde/Mime/Headers/AddressesMulti.php b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mime/Horde/Mime/Headers/AddressesMulti.php new file mode 100644 index 00000000..78ea2bce --- /dev/null +++ b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mime/Horde/Mime/Headers/AddressesMulti.php @@ -0,0 +1,107 @@ + + * @category Horde + * @copyright 2014-2017 Horde LLC + * @license http://www.horde.org/licenses/lgpl21 LGPL 2.1 + * @package Mime + * @since 2.5.0 + */ +class Horde_Mime_Headers_AddressesMulti +extends Horde_Mime_Headers_Element_Multiple +implements Horde_Mime_Headers_Element_Address +{ + /** + */ + public function __clone() + { + $copy = array(); + foreach ($this->_values as $val) { + $copy[] = clone $val; + } + $this->_values = $copy; + } + + /** + */ + public function __get($name) + { + switch ($name) { + case 'full_value': + case 'value': + return array_map('strval', $this->_values); + + case 'value_single': + return strval(reset($this->_values)); + } + + return parent::__get($name); + } + + /** + */ + public function getAddressList($first = false) + { + return $first + ? reset($this->_values) + : $this->_values; + } + + /** + */ + protected function _setValue($value) + { + /* @todo Implement with traits */ + $rfc822 = new Horde_Mail_Rfc822(); + $addr_list = $rfc822->parseAddressList($value); + + foreach ($addr_list as $ob) { + if ($ob instanceof Horde_Mail_Rfc822_Group) { + $ob->groupname = $this->_sanityCheck($ob->groupname); + } else { + $ob->personal = $this->_sanityCheck($ob->personal); } + } + + $this->_values[] = $addr_list; + } + + /** + */ + public static function getHandles() + { + return array( + // Mail: RFC 5322 (Address that can appear in multiple headers) + 'resent-to', + 'resent-cc', + 'resent-bcc', + 'resent-from' + ); + } + + /** + * @param array $opts See Horde_Mime_Headers_Addresses#doSendEncode(). + */ + protected function _sendEncode($opts) + { + return Horde_Mime_Headers_Addresses::doSendEncode( + $this->getAddressList(), + $opts + ); + } + +} diff --git a/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mime/Horde/Mime/Headers/ContentDescription.php b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mime/Horde/Mime/Headers/ContentDescription.php new file mode 100644 index 00000000..67ee1b01 --- /dev/null +++ b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mime/Horde/Mime/Headers/ContentDescription.php @@ -0,0 +1,52 @@ + + * @category Horde + * @copyright 2015-2017 Horde LLC + * @license http://www.horde.org/licenses/lgpl21 LGPL 2.1 + * @package Mime + * @since 2.7.0 + */ +class Horde_Mime_Headers_ContentDescription +extends Horde_Mime_Headers_Element_Single +implements Horde_Mime_Headers_Extension_Mime +{ + /** + */ + public function __construct($name, $value) + { + parent::__construct('Content-Description', $value); + } + + /** + */ + protected function _sendEncode($opts) + { + return array(Horde_Mime::encode($this->value, $opts['charset'])); + } + + /** + */ + public static function getHandles() + { + return array( + // MIME: RFC 2045 + 'content-description' + ); + } + +} diff --git a/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mime/Horde/Mime/Headers/ContentId.php b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mime/Horde/Mime/Headers/ContentId.php new file mode 100644 index 00000000..7260be04 --- /dev/null +++ b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mime/Horde/Mime/Headers/ContentId.php @@ -0,0 +1,71 @@ + + * @category Horde + * @copyright 2015-2017 Horde LLC + * @license http://www.horde.org/licenses/lgpl21 LGPL 2.1 + * @package Mime + * @since 2.8.0 + */ +class Horde_Mime_Headers_ContentId +extends Horde_Mime_Headers_Element_Single +implements Horde_Mime_Headers_Extension_Mime +{ + /** + * Creates a Content-ID header conforming to RFC 2045 [7]. + * + * @return Horde_Mime_Headers_ContentId Content-ID header object. + */ + public static function create() + { + return new self( + null, + strval(new Horde_Support_Randomid()) . '@' . gethostname() + ); + } + + /** + */ + public function __construct($name, $value) + { + parent::__construct('Content-ID', $value); + } + + /** + */ + protected function _setValue($value) + { + parent::_setValue($value); + + $val = $this->value; + $cid = '<' . ltrim(rtrim($val, '>'), '<') . '>'; + + if ($cid !== $val) { + parent::_setValue($cid); + } + } + + /** + */ + public static function getHandles() + { + return array( + 'content-id' + ); + } + +} diff --git a/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mime/Horde/Mime/Headers/ContentLanguage.php b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mime/Horde/Mime/Headers/ContentLanguage.php new file mode 100644 index 00000000..3d94b8d2 --- /dev/null +++ b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mime/Horde/Mime/Headers/ContentLanguage.php @@ -0,0 +1,84 @@ + + * @category Horde + * @copyright 2015-2017 Horde LLC + * @license http://www.horde.org/licenses/lgpl21 LGPL 2.1 + * @package Mime + * @since 2.8.0 + * + * @property-read array $langs The list of languages. + */ +class Horde_Mime_Headers_ContentLanguage +extends Horde_Mime_Headers_Element_Single +implements Horde_Mime_Headers_Extension_Mime +{ + /** + */ + public function __construct($name, $value) + { + parent::__construct('Content-Language', $value); + } + + /** + */ + public function __get($name) + { + switch ($name) { + case 'full_value': + case 'value': + case 'value_single': + return implode(',', $this->_values); + + case 'langs': + return $this->_values; + } + + return parent::__get($name); + } + + /** + * @param mixed $value Either a single language or an array of languages. + */ + protected function _setValue($value) + { + if ($value instanceof Horde_Mime_Headers_Element) { + $value = $value->value; + } + + if (!is_array($value)) { + $value = array_map('trim', explode(',', $value)); + } + + $this->_values = array(); + foreach ($value as $val) { + $this->_values[] = Horde_String::lower( + $this->_sanityCheck(Horde_Mime::decode($val)) + ); + } + } + + /** + */ + public static function getHandles() + { + return array( + 'content-language' + ); + } + +} diff --git a/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mime/Horde/Mime/Headers/ContentParam.php b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mime/Horde/Mime/Headers/ContentParam.php new file mode 100644 index 00000000..f8036fce --- /dev/null +++ b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mime/Horde/Mime/Headers/ContentParam.php @@ -0,0 +1,429 @@ + + * @category Horde + * @copyright 2014-2017 Horde LLC + * @license http://www.horde.org/licenses/lgpl21 LGPL 2.1 + * @package Mime + * @since 2.5.0 + * + * @property-read array $params Content parameters. + */ +class Horde_Mime_Headers_ContentParam +extends Horde_Mime_Headers_Element_Single +implements ArrayAccess, Horde_Mime_Headers_Extension_Mime, Serializable +{ + /** + * Content parameters. + * + * @var Horde_Support_CaseInsensitiveArray + */ + protected $_params; + + /** + */ + public function __clone() + { + $this->_params = new Horde_Support_CaseInsensitiveArray( + $this->_params->getArrayCopy() + ); + } + + /** + */ + public function __get($name) + { + switch ($name) { + case 'full_value': + $tmp = $this->value; + foreach ($this->_escapeParams($this->params) as $key => $val) { + $tmp .= '; ' . $key . '=' . $val; + } + return $tmp; + + case 'params': + return $this->_params->getArrayCopy(); + } + + return parent::__get($name); + } + + /** + * @param mixed $data Either an array (interpreted as a list of + * parameters), a string (interpreted as a RFC + * encoded parameter list), an object with two + * properties: value and params, or a + * Horde_Mime_Headers_ContentParam object. + */ + protected function _setValue($data) + { + if (!$this->_params) { + $this->_params = new Horde_Support_CaseInsensitiveArray(); + } + + if ($data instanceof Horde_Mime_Headers_ContentParam) { + if (empty($this->_values)) { + $this->setContentParamValue($data->value); + } + foreach ($data->params as $key => $val) { + $this[$key] = $val; + } + } elseif (is_object($data)) { + if (!empty($data->value)) { + $this->setContentParamValue($data->value); + } + if (!empty($data->params)) { + $this->decode($data->params); + } + } else { + $this->decode($data); + } + } + + /** + * @param array $opts See encode(). + */ + protected function _sendEncode($opts) + { + $out = $this->value; + + foreach ($this->encode($opts) as $key => $val) { + $out .= '; ' . $key . '=' . $val; + } + + return array($out); + } + + /** + */ + public static function getHandles() + { + return array(); + } + + /** + * Encodes a MIME content parameter string pursuant to RFC 2183 & 2231 + * (Content-Type and Content-Disposition headers). + * + * @param array $opts Options: + * - broken_rfc2231: (boolean) Attempt to work around non-RFC + * 2231-compliant MUAs by generating both a RFC + * 2047-like parameter name and also the correct RFC + * 2231 parameter + * DEFAULT: false + * - charset: (string) The charset to encode to. + * DEFAULT: UTF-8 + * - lang: (string) The language to use when encoding. + * DEFAULT: None specified + * + * @return array The encoded parameter string (US-ASCII). + */ + public function encode(array $opts = array()) + { + $opts = array_merge(array( + 'charset' => 'UTF-8', + ), $opts); + + $out = array(); + + foreach ($this->params as $key => $val) { + $out = array_merge($out, $this->_encode($key, $val, $opts)); + } + + return $out; + } + + /** + * @see encode() + */ + protected function _encode($name, $val, $opts) + { + $curr = 0; + $encode = $wrap = false; + $out = array(); + + // 2 = '=', ';' + $pre_len = strlen($name) + 2; + + /* Several possibilities: + * - String is ASCII. Output as ASCII (duh). + * - Language information has been provided. We MUST encode output + * to include this information. + * - String is non-ASCII, but can losslessly translate to ASCII. + * Output as ASCII (most efficient). + * - String is in non-ASCII, but doesn't losslessly translate to + * ASCII. MUST encode output (duh). */ + if (empty($opts['lang']) && !Horde_Mime::is8bit($val, 'UTF-8')) { + $string = $val; + } else { + $cval = Horde_String::convertCharset($val, 'UTF-8', $opts['charset']); + $string = Horde_String::lower($opts['charset']) . '\'' . (empty($opts['lang']) ? '' : Horde_String::lower($opts['lang'])) . '\'' . rawurlencode($cval); + $encode = true; + /* Account for trailing '*'. */ + ++$pre_len; + } + + if (($pre_len + strlen($string)) > 75) { + /* Account for continuation '*'. */ + ++$pre_len; + $wrap = true; + + while ($string) { + $chunk = 75 - $pre_len - strlen($curr); + $pos = min($chunk, strlen($string) - 1); + + /* Don't split in the middle of an encoded char. */ + if (($chunk == $pos) && ($pos > 2)) { + for ($i = 0; $i <= 2; ++$i) { + if ($string[$pos - $i] == '%') { + $pos -= $i + 1; + break; + } + } + } + + $lines[] = substr($string, 0, $pos + 1); + $string = substr($string, $pos + 1); + ++$curr; + } + } else { + $lines = array($string); + } + + foreach ($lines as $i => $line) { + $out[$name . (($wrap) ? ('*' . $i) : '') . (($encode) ? '*' : '')] = $line; + } + + if (!empty($opts['broken_rfc2231']) && !isset($out[$name])) { + $out = array_merge(array( + $name => Horde_Mime::encode($val, $opts['charset']) + ), $out); + } + + /* Escape characters in params (See RFC 2045 [Appendix A]). + * Must be quoted-string if one of these exists. */ + return $this->_escapeParams($out); + } + + /** + * Escape the parameter array. + * + * @param array $params Parameter array. + * + * @return array Escaped parameter array. + */ + protected function _escapeParams($params) + { + foreach ($params as $k => $v) { + foreach (str_split($v) as $c) { + if (!Horde_Mime_ContentParam_Decode::isAtextNonTspecial($c)) { + $params[$k] = '"' . addcslashes($v, '\\"') . '"'; + break; + } + } + } + + return $params; + } + + /** + * Set the content-parameter base value. + * + * @since 2.8.0 + * + * @param string $data Value. + */ + public function setContentParamValue($data) + { + $data = $this->_sanityCheck(trim($data)); + if (($pos = strpos($data, ';')) !== false) { + $data = substr($data, 0, $pos); + } + + $this->_values = array($data); + } + + /** + * Decodes a MIME content parameter string pursuant to RFC 2183 & 2231 + * (Content-Type and Content-Disposition headers). + * + * Stores value/parameter data in the current object. + * + * @param mixed $data Parameter data. Either an array or a string. + */ + public function decode($data) + { + $add = $convert = array(); + + if (is_array($data)) { + $params = $data; + } else { + $parts = explode(';', $data, 2); + if (isset($parts[0]) && (strpos($parts[0], '=') === false)) { + $this->setContentParamValue($parts[0]); + $param = isset($parts[1]) ? $parts[1] : null; + } else { + $param = $data; + } + + if (empty($param)) { + $params = array(); + } else { + $decode = new Horde_Mime_ContentParam_Decode(); + $params = $decode->decode($param); + } + } + + $to_add = array(); + + foreach ($params as $name => $val) { + /* Asterisk at end indicates encoded value. */ + if (substr($name, -1) == '*') { + $name = substr($name, 0, -1); + $encoded = true; + } else { + $encoded = false; + } + + /* This asterisk indicates continuation parameter. */ + if ((($pos = strrpos($name, '*')) !== false) && + is_numeric($order = substr($name, $pos + 1))) { + $name = substr($name, 0, $pos); + $to_add[Horde_String::lower($name)][$order] = $val; + } else { + $to_add[$name] = array($val); + } + + if ($encoded) { + $convert[$name] = true; + } + } + + foreach ($to_add as $key => $val) { + ksort($val); + $add[$key] = implode('', $val); + } + + foreach (array_keys($convert) as $name) { + $val = $add[$name]; + $quote = strpos($val, "'"); + + if ($quote === false) { + $add[$name] = urldecode($val); + } else { + $orig_charset = substr($val, 0, $quote); + if (Horde_String::lower($orig_charset) == 'iso-8859-1') { + $orig_charset = 'windows-1252'; + } + + /* Ignore language. */ + $quote = strpos($val, "'", $quote + 1); + substr($val, $quote + 1); + $add[$name] = Horde_String::convertCharset( + urldecode(substr($val, $quote + 1)), + $orig_charset, + 'UTF-8' + ); + } + } + + /* MIME parameters are supposed to be encoded via RFC 2231, but many + * mailers do RFC 2045 encoding instead. However, if we see at least + * one RFC 2231 encoding, then assume the sending mailer knew what + * it was doing and didn't send any parameters RFC 2045 encoded. */ + if (empty($convert)) { + foreach ($add as $key => $val) { + $add[$key] = Horde_Mime::decode($val); + } + } + + if (count($add)) { + foreach ($add as $key => $val) { + /* When parsing a content-param string, lowercase all + * parameter names to normalize. Only maintain case of + * parameters explicitly added by calling code. */ + $this[Horde_String::lower($key)] = $val; + } + } elseif (is_string($data)) { + $this->setContentParamValue($parts[0]); + } + } + + /* ArrayAccess methods */ + + /** + */ + public function offsetExists($offset) + { + return isset($this->_params[$offset]); + } + + /** + */ + public function offsetGet($offset) + { + return $this->_params[$offset]; + } + + /** + */ + public function offsetSet($offset, $value) + { + $this->_params[$offset] = $this->_sanityCheck($value); + } + + /** + */ + public function offsetUnset($offset) + { + unset($this->_params[$offset]); + } + + /* Serializable methods */ + + /** + */ + public function serialize() + { + $vars = array_filter(get_object_vars($this)); + if (isset($vars['_params'])) { + $vars['_params'] = $vars['_params']->getArrayCopy(); + } + return serialize($vars); + } + + /** + */ + public function unserialize($data) + { + $data = unserialize($data); + + foreach ($data as $key => $val) { + switch ($key) { + case '_params': + $this->_params = new Horde_Support_CaseInsensitiveArray($val); + break; + + default: + $this->$key = $val; + break; + } + } + } + +} diff --git a/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mime/Horde/Mime/Headers/ContentParam/ContentDisposition.php b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mime/Horde/Mime/Headers/ContentParam/ContentDisposition.php new file mode 100644 index 00000000..d1cda073 --- /dev/null +++ b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mime/Horde/Mime/Headers/ContentParam/ContentDisposition.php @@ -0,0 +1,103 @@ + + * @category Horde + * @copyright 2015-2017 Horde LLC + * @license http://www.horde.org/licenses/lgpl21 LGPL 2.1 + * @package Mime + * @since 2.8.0 + */ +class Horde_Mime_Headers_ContentParam_ContentDisposition +extends Horde_Mime_Headers_ContentParam +{ + /** + */ + public function __construct($name, $value) + { + parent::__construct('Content-Disposition', $value); + } + + /** + */ + public function __get($name) + { + $val = parent::__get($name); + + switch ($name) { + case 'full_value': + $val = parent::__get($name); + if (substr(ltrim($val), 0, 1) === ';') { + $val = 'attachment' . $val; + } + break; + } + + return $val; + } + + /** + */ + public function setContentParamValue($data) + { + parent::setContentParamValue($data); + + if (strlen($val = $this->value)) { + if (strcasecmp($val, 'attachment') === 0) { + $val2 = 'attachment'; + } elseif (strcasecmp($val, 'inline') === 0) { + $val2 = 'inline'; + } else { + $val2 = ''; + } + + if ($val !== $val2) { + parent::setContentParamValue($val2); + } + } + } + + /** + */ + public function isDefault() + { + return !($this->full_value); + } + + /** + */ + public static function getHandles() + { + return array( + 'content-disposition' + ); + } + + /* ArrayAccess methods */ + + /** + */ + public function offsetSet($offset, $value) + { + if (strcasecmp($offset, 'size') === 0) { + // RFC 2183 [2.7] - size parameter + $value = intval($this->_sanityCheck($value)); + } + + parent::offsetSet($offset, $value); + } + +} diff --git a/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mime/Horde/Mime/Headers/ContentParam/ContentType.php b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mime/Horde/Mime/Headers/ContentParam/ContentType.php new file mode 100644 index 00000000..36b1c54a --- /dev/null +++ b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mime/Horde/Mime/Headers/ContentParam/ContentType.php @@ -0,0 +1,198 @@ + + * @category Horde + * @copyright 2015-2017 Horde LLC + * @license http://www.horde.org/licenses/lgpl21 LGPL 2.1 + * @package Mime + * @since 2.8.0 + * + * @property-read string $ptype The primary type. + * @property-read string $stype The sub type. + * @property-read string $type_charset The MIME type with the charset + * parameter added (if this is a text/* + * part). + */ +class Horde_Mime_Headers_ContentParam_ContentType +extends Horde_Mime_Headers_ContentParam +{ + const DEFAULT_CONTENT_TYPE = 'application/octet-stream'; + + /** + * Creates a default Content-Type header, conforming to the MIME + * specification as detailed in RFC 2045. + * + * @return Horde_Mime_Headers_ContentParam_ContentType Content-Type + * header object. + */ + public static function create() + { + $ob = new stdClass; + $ob->value = self::DEFAULT_CONTENT_TYPE; + + return new self(null, $ob); + } + + /** + */ + public function __construct($name, $value) + { + parent::__construct('Content-Type', $value); + } + + /** + */ + public function __get($name) + { + switch ($name) { + case 'params': + $params = new Horde_Support_CaseInsensitiveArray( + parent::__get($name) + ); + foreach ($params as $key => $val) { + if (!isset($this[$key])) { + unset($params[$key]); + } + } + return $params->getArrayCopy(); + + case 'ptype': + $val = $this->value; + return substr($val, 0, strpos($val, '/')); + + case 'stype': + $val = $this->value; + return substr($val, strpos($val, '/') + 1); + + case 'type_charset': + $val = $this->value; + foreach ($this->_escapeParams(array_filter(array('charset' => $this['charset']))) as $k2 => $v2) { + $val .= '; ' . $k2 . '=' . $v2; + } + return $val; + } + + return parent::__get($name); + } + + /** + */ + public function setContentParamValue($data) + { + /* Set the value first, since it will handle any sanity checking. */ + parent::setContentParamValue(Horde_String::lower($data)); + + $val = $this->value; + + if (strpos($val, '/') === false) { + parent::setContentParamValue(self::DEFAULT_CONTENT_TYPE); + } else { + switch ($this->ptype) { + case 'multipart': + if (!isset($this['boundary'])) { + $this['boundary'] = '=_' . new Horde_Support_Randomid(); + } + break; + + case 'application': + case 'audio': + case 'image': + case 'message': + case 'model': + case 'text': + case 'video': + // No-op + break; + + default: + if (substr($val, 0, 2) !== 'x-') { + /* Append 'x-' for any unknown primary MIME type. */ + parent::setContentParamValue('x-' . $val); + } + break; + } + } + } + + /** + */ + public function isDefault() + { + return ($this->full_value === 'text/plain'); + } + + /** + */ + public static function getHandles() + { + return array( + 'content-type' + ); + } + + /* ArrayAccess methods. */ + + /** + */ + public function offsetExists($offset) + { + if (!parent::offsetExists($offset)) { + return false; + } + + if (strcasecmp($offset, 'boundary') === 0) { + return ($this->ptype === 'multipart'); + } elseif (strcasecmp($offset, 'charset') === 0) { + return (($this->ptype === 'text') && + (parent::offsetGet($offset) !== 'us-ascii')); + } + + return true; + } + + /** + */ + public function offsetGet($offset) + { + return isset($this[$offset]) + ? parent::offsetGet($offset) + : null; + } + + /** + */ + public function offsetSet($offset, $value) + { + /* Store character set as lower case value. */ + if (strcasecmp($offset, 'charset') === 0) { + $value = Horde_String::lower($value); + } + + parent::offsetSet($offset, $value); + } + + /** + */ + public function offsetUnset($offset) + { + if (($this->ptype !== 'multipart') || + (strcasecmp($offset, 'boundary') !== 0)) { + parent::offsetUnset($offset); + } + } + +} diff --git a/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mime/Horde/Mime/Headers/ContentTransferEncoding.php b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mime/Horde/Mime/Headers/ContentTransferEncoding.php new file mode 100644 index 00000000..6d41c99f --- /dev/null +++ b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mime/Horde/Mime/Headers/ContentTransferEncoding.php @@ -0,0 +1,95 @@ + + * @category Horde + * @copyright 2015-2017 Horde LLC + * @license http://www.horde.org/licenses/lgpl21 LGPL 2.1 + * @package Mime + * @since 2.8.0 + */ +class Horde_Mime_Headers_ContentTransferEncoding +extends Horde_Mime_Headers_Element_Single +implements Horde_Mime_Headers_Extension_Mime +{ + /** Default encoding (RFC 2045 [6.1]). */ + const DEFAULT_ENCODING = '7bit'; + + /** Unknown encoding specifier. */ + const UNKNOWN_ENCODING = 'x-unknown'; + + /** + */ + public function __construct($name, $value) + { + if (!strlen($value)) { + $value = self::DEFAULT_ENCODING; + } + + parent::__construct('Content-Transfer-Encoding', $value); + } + + /** + */ + protected function _setValue($value) + { + parent::_setValue(trim($value)); + + $val = $this->value; + $encoding = Horde_String::lower($val); + + switch ($encoding) { + case '7bit': + case '8bit': + case 'base64': + case 'binary': + case 'quoted-printable': + // Valid encodings + break; + + default: + /* RFC 2045 [6.3] - Valid non-standardized encodings must begin + * with 'x-'. */ + if (substr($encoding, 0, 2) !== 'x-') { + $encoding = self::UNKNOWN_ENCODING; + } + break; + } + + if ($encoding !== $val) { + parent::_setValue($encoding); + } + } + + /** + */ + public function isDefault() + { + return ($this->value === self::DEFAULT_ENCODING); + } + + /** + */ + public static function getHandles() + { + return array( + // MIME: RFC 2045 + 'content-transfer-encoding' + ); + } + +} diff --git a/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mime/Horde/Mime/Headers/Date.php b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mime/Horde/Mime/Headers/Date.php new file mode 100644 index 00000000..8ffb0231 --- /dev/null +++ b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mime/Horde/Mime/Headers/Date.php @@ -0,0 +1,75 @@ + + * @category Horde + * @copyright 2014-2017 Horde LLC + * @license http://www.horde.org/licenses/lgpl21 LGPL 2.1 + * @package Mime + * @since 2.5.0 + */ +class Horde_Mime_Headers_Date +extends Horde_Mime_Headers_Element_Single +{ + /** + * Generate a 'Date' header for the current time. + * + * @return Horde_Mime_Headers_Date Date header object. + */ + public static function create() + { + return new self(null, date('r')); + } + + /** + */ + public function __construct($name, $value) + { + parent::__construct('Date', $value); + } + + /** + */ + public static function getHandles() + { + return array( + // Mail: RFC 5322 + 'date' + ); + } + + /** + * Perform sanity checking on a header value. + * + * @param string $data The header data. + * + * @return string The cleaned header data. + */ + protected function _sanityCheck($data) + { + $date = parent::_sanityCheck($data); + if (substr(rtrim($date), -5) === ' 0000') { + $date = substr(trim($date), 0, strlen(trim($date)) - 5) . ' +0000'; + } + + /* Check for malformed day-of-week parts */ + if (!preg_match("/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun),/", $date)) { + $date = trim(preg_replace("/^(\S*,)/", '', $date)); + } + + return $date; + } +} diff --git a/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mime/Horde/Mime/Headers/Deprecated.php b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mime/Horde/Mime/Headers/Deprecated.php new file mode 100644 index 00000000..94c0dd4b --- /dev/null +++ b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mime/Horde/Mime/Headers/Deprecated.php @@ -0,0 +1,263 @@ + + * @deprecated + * @category Horde + * @copyright 2014-2016 Horde LLC + * @internal + * @license http://www.horde.org/licenses/lgpl21 LGPL 2.1 + * @package Mime + * @since 2.5.0 + */ +class Horde_Mime_Headers_Deprecated +{ + /** + * Base headers object. + * + * @var Horde_Mime_Headers + */ + private $_headers; + + /** + */ + public function __construct(Horde_Mime_Headers $headers) + { + $this->_headers = $headers; + } + + /** + */ + public function addMessageIdHeader() + { + $this->_headers->addHeaderOb(Horde_Mime_Headers_MessageId::create()); + } + + /** + */ + public function addUserAgentHeader() + { + $this->_headers->addHeaderOb(Horde_Mime_Headers_UserAgent::create()); + } + + /** + */ + public function getUserAgent() + { + return strval(Horde_Mime_Headers_UserAgent::create()); + } + + /** + */ + public function setUserAgent($agent) + { + $this->_headers->addHeaderOb( + new Horde_Mime_Headers_UserAgent(null, $agent) + ); + } + + /** + */ + public function addReceivedHeader(array $opts = array()) + { + $old_error = error_reporting(0); + if (isset($_SERVER['HTTP_X_FORWARDED_FOR'])) { + /* This indicates the user is connecting through a proxy. */ + $remote_path = explode(',', $_SERVER['HTTP_X_FORWARDED_FOR']); + $remote_addr = $remote_path[0]; + if (!empty($opts['dns'])) { + $remote = $remote_addr; + try { + if ($response = $opts['dns']->query($remote_addr, 'PTR')) { + foreach ($response->answer as $val) { + if (isset($val->ptrdname)) { + $remote = $val->ptrdname; + break; + } + } + } + } catch (Net_DNS2_Exception $e) {} + } else { + $remote = gethostbyaddr($remote_addr); + } + } else { + $remote_addr = $_SERVER['REMOTE_ADDR']; + if (empty($_SERVER['REMOTE_HOST'])) { + if (!empty($opts['dns'])) { + $remote = $remote_addr; + try { + if ($response = $opts['dns']->query($remote_addr, 'PTR')) { + foreach ($response->answer as $val) { + if (isset($val->ptrdname)) { + $remote = $val->ptrdname; + break; + } + } + } + } catch (Net_DNS2_Exception $e) {} + } else { + $remote = gethostbyaddr($remote_addr); + } + } else { + $remote = $_SERVER['REMOTE_HOST']; + } + } + error_reporting($old_error); + + if (!empty($_SERVER['REMOTE_IDENT'])) { + $remote_ident = $_SERVER['REMOTE_IDENT'] . '@' . $remote . ' '; + } elseif ($remote != $_SERVER['REMOTE_ADDR']) { + $remote_ident = $remote . ' '; + } else { + $remote_ident = ''; + } + + if (!empty($opts['server'])) { + $server_name = $opts['server']; + } elseif (!empty($_SERVER['SERVER_NAME'])) { + $server_name = $_SERVER['SERVER_NAME']; + } elseif (!empty($_SERVER['HTTP_HOST'])) { + $server_name = $_SERVER['HTTP_HOST']; + } else { + $server_name = 'unknown'; + } + + $is_ssl = isset($_SERVER['HTTPS']) && + $_SERVER['HTTPS'] != 'off'; + + if ($remote == $remote_addr) { + $remote = '[' . $remote . ']'; + } + + $this->_headers->addHeaderOb(new Horde_Mime_Headers_Element_Multiple( + 'Received', + 'from ' . $remote . ' (' . $remote_ident . + '[' . $remote_addr . ']) ' . + 'by ' . $server_name . ' (Horde Framework) with HTTP' . + ($is_ssl ? 'S' : '') . '; ' . date('r') + )); + } + + /** + */ + public function getOb($field) + { + return ($h = $this->_headers[$field]) + ? $h->getAddressList(true) + : null; + } + + /** + */ + public function getValue($header, $type = Horde_Mime_Headers::VALUE_STRING) + { + if (!($ob = $this->_headers[$header])) { + return null; + } + + switch ($type) { + case Horde_Mime_Headers::VALUE_BASE: + $tmp = $ob->value; + break; + + case Horde_Mime_Headers::VALUE_PARAMS: + return array_change_key_case($ob->params, CASE_LOWER); + + case Horde_Mime_Headers::VALUE_STRING: + $tmp = $ob->full_value; + break; + } + + return (is_array($tmp) && (count($tmp) === 1)) + ? reset($tmp) + : $tmp; + } + + /** + */ + public function listHeaders() + { + $lhdrs = new Horde_ListHeaders(); + return $lhdrs->headers(); + } + + /** + */ + public function listHeadersExist() + { + $lhdrs = new Horde_ListHeaders(); + return $lhdrs->listHeadersExist($this->_headers); + } + + /** + */ + public function replaceHeader($header, $value, array $opts = array()) + { + $this->_headers->removeHeader($header); + $this->_headers->addHeader($header, $value, $opts); + } + + /** + */ + public function getString($header) + { + return (($hdr = $this->_headers[$header]) === null) + ? null + : $this->_headers[$header]->name; + } + + /** + */ + public function addressFields() + { + return array( + 'from', 'to', 'cc', 'bcc', 'reply-to', 'resent-to', 'resent-cc', + 'resent-bcc', 'resent-from', 'sender' + ); + } + + /** + */ + public function singleFields($list = true) + { + $fields = array( + 'to', 'from', 'cc', 'bcc', 'date', 'sender', 'reply-to', + 'message-id', 'in-reply-to', 'references', 'subject', + 'content-md5', 'mime-version', 'content-type', + 'content-transfer-encoding', 'content-id', 'content-description', + 'content-base', 'content-disposition', 'content-duration', + 'content-location', 'content-features', 'content-language', + 'content-alternative', 'importance', 'x-priority' + ); + + $list_fields = array( + 'list-help', 'list-unsubscribe', 'list-subscribe', 'list-owner', + 'list-post', 'list-archive', 'list-id' + ); + + return $list + ? array_merge($fields, $list_fields) + : $fields; + } + + /** + */ + public function mimeParamFields() + { + return array('content-type', 'content-disposition'); + } + +} diff --git a/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mime/Horde/Mime/Headers/Element.php b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mime/Horde/Mime/Headers/Element.php new file mode 100644 index 00000000..734af13f --- /dev/null +++ b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mime/Horde/Mime/Headers/Element.php @@ -0,0 +1,181 @@ + + * @category Horde + * @copyright 2014-2017 Horde LLC + * @license http://www.horde.org/licenses/lgpl21 LGPL 2.1 + * @package Mime + * @since 2.5.0 + * + * @property-read string $name Header name. + * @property-read string $value_single The first header value. + */ +abstract class Horde_Mime_Headers_Element +implements IteratorAggregate +{ + /** + * Header name (UTF-8, although limited to US-ASCII subset by RFCs). + * + * @var string + */ + protected $_name; + + /** + * Header values. + * + * @var array + */ + protected $_values = array(); + + /** + * Constructor. + * + * @param string $name Header name. + * @param mixed $value Header value(s). + */ + public function __construct($name, $value) + { + $this->_name = trim($name); + if (strpos($this->_name, ' ') !== false) { + throw new InvalidArgumentException('Invalid header name'); + } + $this->setValue($value); + } + + /** + */ + public function __get($name) + { + switch ($name) { + case 'name': + return $this->_name; + + case 'value_single': + return reset($this->_values); + } + } + + /** + * Set the value of the header. + * + * @param mixed $value Header value(s). + */ + final public function setValue($value) + { + $this->_setValue($value); + } + + /** + * TODO + */ + abstract protected function _setValue($value); + + /** + * Returns the encoded string value(s) needed when sending the header text + * to a RFC compliant mail submission server. + * + * @param array $opts Additional options: + * - charset: (string) Charset to encode to. + * DEFAULT: UTF-8 + * + * @return array An array of string values. + */ + final public function sendEncode(array $opts = array()) + { + return $this->_sendEncode(array_merge(array( + 'charset' => 'UTF-8' + ), $opts)); + } + + /** + * TODO + */ + protected function _sendEncode($opts) + { + return $this->_values; + } + + /** + * Perform sanity checking on a header value. + * + * @param string $data The header data. + * + * @return string The cleaned header data. + */ + protected function _sanityCheck($data) + { + $charset_test = array( + 'windows-1252', + Horde_Mime_Headers::$defaultCharset + ); + + if (!Horde_String::validUtf8($data)) { + /* Appears to be a PHP error with the internal String structure + * which prevents accurate manipulation of the string. Copying + * the data to a new variable fixes things. */ + $data = substr($data, 0); + + /* Assumption: broken charset in headers is generally either + * UTF-8 or ISO-8859-1/Windows-1252. Test these charsets + * first before using default charset. This may be a + * Western-centric approach, but it's better than nothing. */ + foreach ($charset_test as $charset) { + $tmp = Horde_String::convertCharset($data, $charset, 'UTF-8'); + if (Horde_String::validUtf8($tmp)) { + return $tmp; + } + } + } + + /* Ensure no null characters exist in header data. */ + return str_replace("\0", '', $data); + } + + /** + * If true, indicates the contents of the header is the default value. + * + * @since 2.8.0 + * + * @return boolean True if this header is the default value. + */ + public function isDefault() + { + return false; + } + + /* Static methods */ + + /** + * Return list of explicit header names handled by this driver. + * + * @return array Header list. + */ + public static function getHandles() + { + return array(); + } + + /* IteratorAggregate method */ + + /** + */ + public function getIterator() + { + return new ArrayIterator($this->_values); + } + +} diff --git a/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mime/Horde/Mime/Headers/Element/Address.php b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mime/Horde/Mime/Headers/Element/Address.php new file mode 100644 index 00000000..4ac237ad --- /dev/null +++ b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mime/Horde/Mime/Headers/Element/Address.php @@ -0,0 +1,38 @@ + + * @category Horde + * @copyright 2014-2017 Horde LLC + * @license http://www.horde.org/licenses/lgpl21 LGPL 2.1 + * @package Mime + * @since 2.5.0 + */ +interface Horde_Mime_Headers_Element_Address +{ + /** + * Return the address list representation(s) for this header. + * + * @param boolean $first If true, return only the first element rather + * than the entire list. + * + * @return mixed A Horde_Mail_Rfc822_List object (if $first is true) or + * an array of those objects. + */ + public function getAddressList($first = false); + +} diff --git a/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mime/Horde/Mime/Headers/Element/Multiple.php b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mime/Horde/Mime/Headers/Element/Multiple.php new file mode 100644 index 00000000..c349eebf --- /dev/null +++ b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mime/Horde/Mime/Headers/Element/Multiple.php @@ -0,0 +1,57 @@ + + * @category Horde + * @copyright 2014-2017 Horde LLC + * @license http://www.horde.org/licenses/lgpl21 LGPL 2.1 + * @package Mime + * @since 2.5.0 + * + * @property-read array $full_value List of full header values (strings). + * @property-read array $value List of header values (strings). + */ +class Horde_Mime_Headers_Element_Multiple +extends Horde_Mime_Headers_Element +{ + /** + */ + public function __get($name) + { + switch ($name) { + case 'full_value': + case 'value': + return $this->_values; + } + + return parent::__get($name); + } + + /** + */ + protected function _setValue($value) + { + if ($value instanceof Horde_Mime_Headers_Element) { + $value = $value->value; + } + + foreach ((is_array($value) ? $value : array($value)) as $val) { + $this->_values[] = $this->_sanityCheck(Horde_Mime::decode($val)); + } + } + +} diff --git a/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mime/Horde/Mime/Headers/Element/Single.php b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mime/Horde/Mime/Headers/Element/Single.php new file mode 100644 index 00000000..408ba1fa --- /dev/null +++ b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mime/Horde/Mime/Headers/Element/Single.php @@ -0,0 +1,91 @@ + + * @category Horde + * @copyright 2014-2017 Horde LLC + * @license http://www.horde.org/licenses/lgpl21 LGPL 2.1 + * @package Mime + * @since 2.5.0 + * + * @property-read string $full_value Full header value. + * @property-read string $value Header value. + */ +class Horde_Mime_Headers_Element_Single +extends Horde_Mime_Headers_Element +{ + /** + */ + public function __get($name) + { + switch ($name) { + case 'full_value': + case 'value': + return reset($this->_values); + } + + return parent::__get($name); + } + + /** + */ + public function __toString() + { + return $this->value; + } + + /** + */ + protected function _setValue($value) + { + if ($value instanceof Horde_Mime_Headers_Element) { + $value = $value->value; + } elseif (is_array($value)) { + $value = reset($value); + } + + $this->_values = array( + $this->_sanityCheck(Horde_Mime::decode($value)) + ); + } + + /** + */ + public static function getHandles() + { + return array( + // Mail: RFC 3798 + 'disposition-notification-options', + 'original-recipient', + // Lists: RFC 2369 + 'list-help', + 'list-unsubscribe', + 'list-subscribe', + 'list-owner', + 'list-post', + 'list-archive', + // Lists: RFC 2919 + 'list-id', + // Importance: See, e.g., RFC 4356 [2.1.3.3.1] + 'importance', + // OTHER: X-Priority + // See: http://kb.mozillazine.org/Emulate_Microsoft_email_clients + 'x-priority' + ); + } + +} diff --git a/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mime/Horde/Mime/Headers/Extension/Mime.php b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mime/Horde/Mime/Headers/Extension/Mime.php new file mode 100644 index 00000000..8920eb36 --- /dev/null +++ b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mime/Horde/Mime/Headers/Extension/Mime.php @@ -0,0 +1,27 @@ + + * @category Horde + * @copyright 2015-2017 Horde LLC + * @license http://www.horde.org/licenses/lgpl21 LGPL 2.1 + * @package Mime + * @since 2.8.0 + */ +interface Horde_Mime_Headers_Extension_Mime +{ +} diff --git a/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mime/Horde/Mime/Headers/Identification.php b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mime/Horde/Mime/Headers/Identification.php new file mode 100644 index 00000000..5ae1e115 --- /dev/null +++ b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mime/Horde/Mime/Headers/Identification.php @@ -0,0 +1,48 @@ + + * @category Horde + * @copyright 2014-2017 Horde LLC + * @license http://www.horde.org/licenses/lgpl21 LGPL 2.1 + * @package Mime + * @since 2.5.0 + */ +class Horde_Mime_Headers_Identification +extends Horde_Mime_Headers_Element_Single +{ + /** + * Get the identification object for the header value. + * + * @return Horde_Mail_Rfc822_Identification Identification object. + */ + public function getIdentificationOb() + { + return new Horde_Mail_Rfc822_Identification($this->value); + } + + /** + */ + public static function getHandles() + { + return array( + // Mail: RFC 5322 + 'in-reply-to', + 'references' + ); + } + +} diff --git a/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mime/Horde/Mime/Headers/MessageId.php b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mime/Horde/Mime/Headers/MessageId.php new file mode 100644 index 00000000..2328a7ae --- /dev/null +++ b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mime/Horde/Mime/Headers/MessageId.php @@ -0,0 +1,60 @@ + + * @category Horde + * @copyright 2014-2017 Horde LLC + * @license http://www.horde.org/licenses/lgpl21 LGPL 2.1 + * @package Mime + * @since 2.5.0 + */ +class Horde_Mime_Headers_MessageId +extends Horde_Mime_Headers_Identification +{ + /** + * Creates a Message-ID header conforming to RFC 2822 [3.6.4] and the + * standards outlined in 'draft-ietf-usefor-message-id-01.txt'. + * + * @param string $prefix A unique prefix to use. + * + * @return Horde_Mime_Headers_MessageId Message-ID header object. + */ + public static function create($prefix = 'Horde') + { + return new self( + null, + '<' . strval(new Horde_Support_Guid(array('prefix' => $prefix))) . '>' + ); + } + + /** + */ + public function __construct($name, $value) + { + parent::__construct('Message-ID', $value); + } + + /** + */ + public static function getHandles() + { + return array( + // Mail: RFC 5322 + 'message-id' + ); + } + +} diff --git a/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mime/Horde/Mime/Headers/Mime.php b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mime/Horde/Mime/Headers/Mime.php new file mode 100644 index 00000000..d4fa75cc --- /dev/null +++ b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mime/Horde/Mime/Headers/Mime.php @@ -0,0 +1,49 @@ + + * @category Horde + * @copyright 2015-2017 Horde LLC + * @license http://www.horde.org/licenses/lgpl21 LGPL 2.1 + * @package Mime + * @since 2.8.0 + */ +class Horde_Mime_Headers_Mime +extends Horde_Mime_Headers_Element_Single +implements Horde_Mime_Headers_Extension_Mime +{ + /** + */ + public static function getHandles() + { + return array( + // MIME: RFC 1864 + 'content-md5', + // MIME: RFC 2110 + 'content-base', + // MIME: RFC 2424 + 'content-duration', + // MIME: RFC 2557 + 'content-location', + // MIME: RFC 2912 [3] + 'content-features', + // MIME: RFC 3297 + 'content-alternative' + ); + } + +} diff --git a/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mime/Horde/Mime/Headers/MimeVersion.php b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mime/Horde/Mime/Headers/MimeVersion.php new file mode 100644 index 00000000..0ea9d585 --- /dev/null +++ b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mime/Horde/Mime/Headers/MimeVersion.php @@ -0,0 +1,56 @@ + + * @category Horde + * @copyright 2014-2017 Horde LLC + * @license http://www.horde.org/licenses/lgpl21 LGPL 2.1 + * @package Mime + * @since 2.5.0 + */ +class Horde_Mime_Headers_MimeVersion +extends Horde_Mime_Headers_Element_Single +implements Horde_Mime_Headers_Extension_Mime +{ + /** + * Creates a MIME-Version header, conforming to the MIME specification as + * detailed in RFC 2045. + * + * @return Horde_Mime_Headers_MimeVersion MIME-Version header object. + */ + public static function create() + { + return new self(null, '1.0'); + } + + /** + */ + public function __construct($name, $value) + { + parent::__construct('MIME-Version', $value); + } + + /** + */ + public static function getHandles() + { + return array( + // MIME: RFC 2045 + 'mime-version' + ); + } + +} diff --git a/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mime/Horde/Mime/Headers/Received.php b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mime/Horde/Mime/Headers/Received.php new file mode 100644 index 00000000..abd4e78c --- /dev/null +++ b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mime/Horde/Mime/Headers/Received.php @@ -0,0 +1,44 @@ + + * @category Horde + * @copyright 2014-2017 Horde LLC + * @license http://www.horde.org/licenses/lgpl21 LGPL 2.1 + * @package Mime + * @since 2.5.0 + */ +class Horde_Mime_Headers_Received +extends Horde_Mime_Headers_Element_Multiple +{ + /** + */ + public function __construct($name, $value) + { + parent::__construct('Received', $value); + } + + /** + */ + public static function getHandles() + { + return array( + // Mail: RFC 5322 + 'received' + ); + } + +} diff --git a/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mime/Horde/Mime/Headers/Subject.php b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mime/Horde/Mime/Headers/Subject.php new file mode 100644 index 00000000..e5144be9 --- /dev/null +++ b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mime/Horde/Mime/Headers/Subject.php @@ -0,0 +1,51 @@ + + * @category Horde + * @copyright 2014-2017 Horde LLC + * @license http://www.horde.org/licenses/lgpl21 LGPL 2.1 + * @package Mime + * @since 2.5.0 + */ +class Horde_Mime_Headers_Subject +extends Horde_Mime_Headers_Element_Single +{ + /** + */ + public function __construct($name, $value) + { + parent::__construct('Subject', $value); + } + + /** + */ + protected function _sendEncode($opts) + { + return array(Horde_Mime::encode($this->value, $opts['charset'])); + } + + /** + */ + public static function getHandles() + { + return array( + // Mail: RFC 5322 + 'subject' + ); + } + +} diff --git a/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mime/Horde/Mime/Headers/UserAgent.php b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mime/Horde/Mime/Headers/UserAgent.php new file mode 100644 index 00000000..98a6cf9f --- /dev/null +++ b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mime/Horde/Mime/Headers/UserAgent.php @@ -0,0 +1,57 @@ + + * @category Horde + * @copyright 2014-2017 Horde LLC + * @license http://www.horde.org/licenses/lgpl21 LGPL 2.1 + * @package Mime + * @since 2.5.0 + */ +class Horde_Mime_Headers_UserAgent +extends Horde_Mime_Headers_Element_Single +{ + /** + * Creates a default system User-Agent header. + * + * @return Horde_Mime_Headers_Single_UserAgent User-Agent header object. + */ + public static function create($prefix = 'Horde') + { + return new self( + null, + 'Horde Application Framework 5' + ); + } + + /** + */ + public function __construct($name, $value) + { + parent::__construct('User-Agent', $value); + } + + /** + */ + public static function getHandles() + { + return array( + // Mail: RFC 5322 + 'user-agent' + ); + } + +} diff --git a/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mime/Horde/Mime/Id.php b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mime/Horde/Mime/Id.php new file mode 100644 index 00000000..f6c0443e --- /dev/null +++ b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mime/Horde/Mime/Id.php @@ -0,0 +1,152 @@ + + * @category Horde + * @copyright 2014-2017 Horde LLC + * @license http://www.horde.org/licenses/lgpl21 LGPL 2.1 + * @package Mime + * @since 2.5.0 + */ +class Horde_Mime_Id +{ + /* Constants for idArithmetic() method. */ + const ID_DOWN = 1; + const ID_NEXT = 2; + const ID_PREV = 3; + const ID_UP = 4; + + /** + * MIME ID. + * + * @var string + */ + public $id; + + /** + * Constructor. + * + * @param string $id MIME ID. + */ + public function __construct($id) + { + $this->id = $id; + } + + /** + */ + public function __toString() + { + return $this->id; + } + + /** + * Performs MIME ID "arithmetic". + * + * @param string $action One of: + * - ID_DOWN: ID of child. Note: ID_DOWN will first traverse to "$id.0" + * if given an ID *NOT* of the form "$id.0". If given an ID of + * the form "$id.0", ID_DOWN will traverse to "$id.1". This + * behavior can be avoided if 'no_rfc822' option is set. + * - ID_NEXT: ID of next sibling. + * - ID_PREV: ID of previous sibling. + * - ID_UP: ID of parent. Note: ID_UP will first traverse to "$id.0" if + * given an ID *NOT* of the form "$id.0". If given an ID of the + * form "$id.0", ID_UP will traverse to "$id". This behavior can + * be avoided if 'no_rfc822' option is set. + * @param array $options Additional options: + * - count: (integer) How many levels to traverse. + * DEFAULT: 1 + * - no_rfc822: (boolean) Don't traverse RFC 822 sub-levels. + * DEFAULT: false + * + * @return mixed The resulting ID string, or null if that ID can not + * exist. + */ + public function idArithmetic($action, array $options = array()) + { + return $this->_idArithmetic($this->id, $action, array_merge(array( + 'count' => 1 + ), $options)); + } + + /** + * @see idArithmetic() + */ + protected function _idArithmetic($id, $action, $options) + { + $pos = strrpos($id, '.'); + $end = ($pos === false) ? $id : substr($id, $pos + 1); + + switch ($action) { + case self::ID_DOWN: + if ($end == '0') { + $id = ($pos === false) ? 1 : substr_replace($id, '1', $pos + 1); + } else { + $id .= empty($options['no_rfc822']) ? '.0' : '.1'; + } + break; + + case self::ID_NEXT: + ++$end; + $id = ($pos === false) ? $end : substr_replace($id, $end, $pos + 1); + break; + + case self::ID_PREV: + if (($end == '0') || + (empty($options['no_rfc822']) && ($end == '1'))) { + $id = null; + } elseif ($pos === false) { + $id = --$end; + } else { + $id = substr_replace($id, --$end, $pos + 1); + } + break; + + case self::ID_UP: + if ($pos === false) { + $id = ($end == '0') ? null : '0'; + } elseif (!empty($options['no_rfc822']) || ($end == '0')) { + $id = substr($id, 0, $pos); + } else { + $id = substr_replace($id, '0', $pos + 1); + } + break; + } + + return (!is_null($id) && --$options['count']) + ? $this->_idArithmetic($id, $action, $options) + : $id; + } + + /** + * Determines if a given MIME ID lives underneath a base ID. + * + * @param string $id The MIME ID to query. + * + * @return boolean Whether $id lives under the base ID ($this->id). + */ + public function isChild($id) + { + $base = (substr($this->id, -2) == '.0') + ? substr($this->id, 0, -1) + : rtrim($this->id, '.') . '.'; + + return ((($base == 0) && ($id != 0)) || + (strpos(strval($id), strval($base)) === 0)); + } + +} diff --git a/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mime/Horde/Mime/Magic.php b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mime/Horde/Mime/Magic.php new file mode 100644 index 00000000..a1563a8a --- /dev/null +++ b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mime/Horde/Mime/Magic.php @@ -0,0 +1,235 @@ + + * @author Michael Slusarz + * @category Horde + * @copyright 1999-2017 Horde LLC + * @license http://www.horde.org/licenses/lgpl21 LGPL 2.1 + * @package Mime + */ +class Horde_Mime_Magic +{ + /** + * The MIME extension map. + * + * @var array + */ + protected static $_map = null; + + /** + * Returns a copy of the MIME extension map. + * + * @return array The MIME extension map. + */ + protected static function _getMimeExtensionMap() + { + if (is_null(self::$_map)) { + require __DIR__ . '/mime.mapping.php'; + self::$_map = $mime_extension_map; + } + + return self::$_map; + } + + /** + * Attempt to convert a file extension to a MIME type, based + * on the global Horde and application specific config files. + * + * If we cannot map the file extension to a specific type, then + * we fall back to a custom MIME handler 'x-extension/$ext', which + * can be used as a normal MIME type internally throughout Horde. + * + * @param string $ext The file extension to be mapped to a MIME type. + * + * @return string The MIME type of the file extension. + */ + public static function extToMime($ext) + { + if (empty($ext)) { + return 'application/octet-stream'; + } + + $ext = Horde_String::lower($ext); + $map = self::_getMimeExtensionMap(); + $pos = 0; + + while (!isset($map[$ext])) { + if (($pos = strpos($ext, '.')) === false) { + break; + } + $ext = substr($ext, $pos + 1); + } + + return isset($map[$ext]) + ? $map[$ext] + : 'x-extension/' . $ext; + } + + /** + * Attempt to convert a filename to a MIME type, based on the global Horde + * and application specific config files. + * + * @param string $filename The filename to be mapped to a MIME type. + * @param boolean $unknown How should unknown extensions be handled? If + * true, will return 'x-extension/*' types. If + * false, will return 'application/octet-stream'. + * + * @return string The MIME type of the filename. + */ + public static function filenameToMime($filename, $unknown = true) + { + $pos = strlen($filename) + 1; + $type = ''; + + $map = self::_getMimeExtensionMap(); + for ($i = 0; $i <= $map['__MAXPERIOD__']; ++$i) { + $npos = strrpos(substr($filename, 0, $pos - 1), '.'); + if ($npos === false) { + break; + } + $pos = $npos + 1; + } + + $type = ($pos === false) ? '' : self::extToMime(substr($filename, $pos)); + + return (empty($type) || (!$unknown && (strpos($type, 'x-extension') !== false))) + ? 'application/octet-stream' + : $type; + } + + /** + * Attempt to convert a MIME type to a file extension, based + * on the global Horde and application specific config files. + * + * If we cannot map the type to a file extension, we return false. + * + * @param string $type The MIME type to be mapped to a file extension. + * + * @return string The file extension of the MIME type. + */ + public static function mimeToExt($type) + { + if (empty($type)) { + return false; + } + + if (($key = array_search($type, self::_getMimeExtensionMap())) === false) { + list($major, $minor) = explode('/', $type); + if ($major == 'x-extension') { + return $minor; + } + if (strpos($minor, 'x-') === 0) { + return substr($minor, 2); + } + return false; + } + + return $key; + } + + /** + * Attempt to determine the MIME type of an unknown file. + * + * @param string $path The path to the file to analyze. + * @param string $magic_db Path to the mime magic database. + * @param array $opts Additional options: + * - nostrip: (boolean) Don't strip parameter information from MIME + * type string. + * DEFAULT: false + * + * @return mixed The MIME type of the file. Returns false if the file + * type can not be determined. + */ + public static function analyzeFile($path, $magic_db = null, + $opts = array()) + { + if (Horde_Util::extensionExists('fileinfo')) { + $res = empty($magic_db) + ? finfo_open(FILEINFO_MIME) + : finfo_open(FILEINFO_MIME, $magic_db); + + if ($res) { + $type = trim(finfo_file($res, $path)); + finfo_close($res); + + /* Remove any additional information. */ + if (empty($opts['nostrip'])) { + foreach (array(';', ',', '\\0') as $separator) { + if (($pos = strpos($type, $separator)) !== false) { + $type = rtrim(substr($type, 0, $pos)); + } + } + + if (preg_match('|^[a-z0-9]+/[.-a-z0-9]+$|i', $type)) { + return $type; + } + } else { + return $type; + } + } + } + + return false; + } + + /** + * Attempt to determine the MIME type of an unknown byte stream. + * + * @param string $data The file data to analyze. + * @param string $magic_db Path to the mime magic database. + * @param array $opts Additional options: + * - nostrip: (boolean) Don't strip parameter information from MIME + * type string. + * DEFAULT: false + * + * @return mixed The MIME type of the file. Returns false if the file + * type can not be determined. + */ + public static function analyzeData($data, $magic_db = null, + $opts = array()) + { + /* If the PHP Mimetype extension is available, use that. */ + if (Horde_Util::extensionExists('fileinfo')) { + $res = empty($magic_db) + ? @finfo_open(FILEINFO_MIME) + : @finfo_open(FILEINFO_MIME, $magic_db); + + if (!$res) { + return false; + } + + $type = trim(finfo_buffer($res, $data)); + finfo_close($res); + + /* Remove any additional information. */ + if (empty($opts['nostrip'])) { + if (($pos = strpos($type, ';')) !== false) { + $type = rtrim(substr($type, 0, $pos)); + } + + if (($pos = strpos($type, ',')) !== false) { + $type = rtrim(substr($type, 0, $pos)); + } + } + + return $type; + } + + return false; + } + +} diff --git a/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mime/Horde/Mime/Mail.php b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mime/Horde/Mime/Mail.php new file mode 100644 index 00000000..53f73064 --- /dev/null +++ b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mime/Horde/Mime/Mail.php @@ -0,0 +1,524 @@ + + * @category Horde + * @copyright 2007-2017 Horde LLC + * @license http://www.horde.org/licenses/lgpl21 LGPL 2.1 + * @package Mime + */ +class Horde_Mime_Mail +{ + /** + * The message headers. + * + * @var Horde_Mime_Headers + */ + protected $_headers; + + /** + * The base MIME part. + * + * @var Horde_Mime_Part + */ + protected $_base; + + /** + * The main body part. + * + * @var Horde_Mime_Part + */ + protected $_body; + + /** + * The main HTML body part. + * + * @var Horde_Mime_Part + */ + protected $_htmlBody; + + /** + * The message recipients. + * + * @var Horde_Mail_Rfc822_List + */ + protected $_recipients; + + /** + * Bcc recipients. + * + * @var string + */ + protected $_bcc; + + /** + * All MIME parts except the main body part. + * + * @var array + */ + protected $_parts = array(); + + /** + * The Mail driver name. + * + * @link http://pear.php.net/Mail + * @var string + */ + protected $_mailer_driver = 'smtp'; + + /** + * The charset to use for the message. + * + * @var string + */ + protected $_charset = 'UTF-8'; + + /** + * The Mail driver parameters. + * + * @link http://pear.php.net/Mail + * @var array + */ + protected $_mailer_params = array(); + + /** + * Constructor. + * + * @param array $params A hash with basic message information. 'charset' + * is the character set of the message. 'body' is + * the message body. All other parameters are + * assumed to be message headers. + * + * @throws Horde_Mime_Exception + */ + public function __construct($params = array()) + { + /* Set SERVER_NAME. */ + if (!isset($_SERVER['SERVER_NAME'])) { + $_SERVER['SERVER_NAME'] = php_uname('n'); + } + + $this->_headers = new Horde_Mime_Headers(); + + if (isset($params['charset'])) { + $this->_charset = $params['charset']; + unset($params['charset']); + } + + if (isset($params['body'])) { + $this->setBody($params['body'], $this->_charset); + unset($params['body']); + } + + $this->addHeaders($params); + + $this->clearRecipients(); + } + + /** + * Adds several message headers at once. + * + * @param array $header Hash with header names as keys and header + * contents as values. + * + * @throws Horde_Mime_Exception + */ + public function addHeaders($headers = array()) + { + foreach ($headers as $header => $value) { + $this->addHeader($header, $value); + } + } + + /** + * Adds a message header. + * + * @param string $header The header name. + * @param string $value The header value. + * @param boolean $overwrite If true, an existing header of the same name + * is being overwritten; if false, multiple + * headers are added; if null, the correct + * behaviour is automatically chosen depending + * on the header name. + * + * @throws Horde_Mime_Exception + */ + public function addHeader($header, $value, $overwrite = null) + { + $lc_header = Horde_String::lower($header); + + if (is_null($overwrite) && + in_array($lc_header, $this->_headers->singleFields(true))) { + $overwrite = true; + } + + if ($overwrite) { + $this->_headers->removeHeader($header); + } + + if ($lc_header === 'bcc') { + $this->_bcc = $value; + } else { + $this->_headers->addHeader($header, $value); + } + } + + /** + * Add a Horde_Mime_Headers_Element object to the current header list. + * + * @since 2.5.0 + * + * @param Horde_Mime_Headers_Element $ob Header object to add. + * + * @throws InvalidArgumentException + */ + public function addHeaderOb(Horde_Mime_Headers_Element $ob) + { + $this->_headers->addHeaderOb($ob, true); + } + + /** + * Removes a message header. + * + * @param string $header The header name. + */ + public function removeHeader($header) + { + if (Horde_String::lower($header) === 'bcc') { + unset($this->_bcc); + } else { + $this->_headers->removeHeader($header); + } + } + + /** + * Sets the message body text. + * + * @param string $body The message content. + * @param string $charset The character set of the message. + * @param boolean|integer $wrap If true, wrap the message at column 76; + * If an integer wrap the message at that + * column. Don't use wrapping if sending + * flowed messages. + */ + public function setBody($body, $charset = null, $wrap = false) + { + if (!$charset) { + $charset = $this->_charset; + } + $body = Horde_String::convertCharset($body, 'UTF-8', $charset); + if ($wrap) { + $body = Horde_String::wrap($body, $wrap === true ? 76 : $wrap); + } + $this->_body = new Horde_Mime_Part(); + $this->_body->setType('text/plain'); + $this->_body->setCharset($charset); + $this->_body->setContents($body); + $this->_base = null; + } + + /** + * Sets the HTML message body text. + * + * @param string $body The message content. + * @param string $charset The character set of the message. + * @param boolean $alternative If true, a multipart/alternative message is + * created and the text/plain part is + * generated automatically. If false, a + * text/html message is generated. + */ + public function setHtmlBody($body, $charset = null, $alternative = true) + { + if (!$charset) { + $charset = $this->_charset; + } + $this->_htmlBody = new Horde_Mime_Part(); + $this->_htmlBody->setType('text/html'); + $this->_htmlBody->setCharset($charset); + $this->_htmlBody->setContents($body); + if ($alternative) { + $this->setBody(Horde_Text_Filter::filter($body, 'Html2text', array('charset' => $charset, 'wrap' => false)), $charset); + } + $this->_base = null; + } + + /** + * Adds a message part. + * + * @param string $mime_type The content type of the part. + * @param string $content The content of the part. + * @param string $charset The character set of the part. + * @param string $disposition The content disposition of the part. + * + * @return integer The part number. + */ + public function addPart($mime_type, $content, $charset = 'us-ascii', + $disposition = null) + { + $part = new Horde_Mime_Part(); + $part->setType($mime_type); + $part->setCharset($charset); + $part->setDisposition($disposition); + $part->setContents($content); + return $this->addMimePart($part); + } + + /** + * Adds a MIME message part. + * + * @param Horde_Mime_Part $part A Horde_Mime_Part object. + * + * @return integer The part number. + */ + public function addMimePart($part) + { + $this->_parts[] = $part; + return count($this->_parts) - 1; + } + + /** + * Sets the base MIME part. + * + * If the base part is set, any text bodies will be ignored when building + * the message. + * + * @param Horde_Mime_Part $part A Horde_Mime_Part object. + */ + public function setBasePart($part) + { + $this->_base = $part; + } + + /** + * Adds an attachment. + * + * @param string $file The path to the file. + * @param string $name The file name to use for the attachment. + * @param string $type The content type of the file. + * @param string $charset The character set of the part (only relevant for + * text parts. + * + * @return integer The part number. + */ + public function addAttachment($file, $name = null, $type = null, + $charset = 'us-ascii') + { + if (empty($name)) { + $name = basename($file); + } + + if (empty($type)) { + $type = Horde_Mime_Magic::filenameToMime($file, false); + } + + $num = $this->addPart($type, file_get_contents($file), $charset, 'attachment'); + $this->_parts[$num]->setName($name); + return $num; + } + + /** + * Removes a message part. + * + * @param integer $part The part number. + */ + public function removePart($part) + { + if (isset($this->_parts[$part])) { + unset($this->_parts[$part]); + } + } + + /** + * Removes all (additional) message parts but leaves the body parts + * untouched. + */ + public function clearParts() + { + $this->_parts = array(); + } + + /** + * Adds message recipients. + * + * Recipients specified by To:, Cc:, or Bcc: headers are added + * automatically. + * + * @param string|array List of recipients, either as a comma separated + * list or as an array of email addresses. + * + * @throws Horde_Mime_Exception + */ + public function addRecipients($recipients) + { + $this->_recipients->add($recipients); + } + + /** + * Removes message recipients. + * + * @param string|array List of recipients, either as a comma separated + * list or as an array of email addresses. + * + * @throws Horde_Mime_Exception + */ + public function removeRecipients($recipients) + { + $this->_recipients->remove($recipients); + } + + /** + * Removes all message recipients. + */ + public function clearRecipients() + { + $this->_recipients = new Horde_Mail_Rfc822_List(); + } + + /** + * Sends this message. + * + * @param Mail $mailer A Mail object. + * @param boolean $resend If true, the message id and date are re-used; + * If false, they will be updated. + * @param boolean $flowed Send message in flowed text format. + * + * @throws Horde_Mime_Exception + */ + public function send($mailer, $resend = false, $flowed = true) + { + /* Add mandatory headers if missing. */ + if (!$resend || !isset($this->_headers['Message-ID'])) { + $this->_headers->addHeaderOb( + Horde_Mime_Headers_MessageId::create() + ); + } + if (!isset($this->_headers['User-Agent'])) { + $this->_headers->addHeaderOb( + Horde_Mime_Headers_UserAgent::create() + ); + } + if (!$resend || !isset($this->_headers['Date'])) { + $this->_headers->addHeaderOb(Horde_Mime_Headers_Date::create()); + } + + if (isset($this->_base)) { + $basepart = $this->_base; + } else { + /* Send in flowed format. */ + if ($flowed && !empty($this->_body)) { + $flowed = new Horde_Text_Flowed($this->_body->getContents(), $this->_body->getCharset()); + $flowed->setDelSp(true); + $this->_body->setContentTypeParameter('format', 'flowed'); + $this->_body->setContentTypeParameter('DelSp', 'Yes'); + $this->_body->setContents($flowed->toFlowed()); + } + + /* Build mime message. */ + $body = new Horde_Mime_Part(); + if (!empty($this->_body) && !empty($this->_htmlBody)) { + $body->setType('multipart/alternative'); + $this->_body->setDescription(Horde_Mime_Translation::t("Plaintext Version of Message")); + $body[] = $this->_body; + $this->_htmlBody->setDescription(Horde_Mime_Translation::t("HTML Version of Message")); + $body[] = $this->_htmlBody; + } elseif (!empty($this->_htmlBody)) { + $body = $this->_htmlBody; + } elseif (!empty($this->_body)) { + $body = $this->_body; + } + if (count($this->_parts)) { + $basepart = new Horde_Mime_Part(); + $basepart->setType('multipart/mixed'); + $basepart->isBasePart(true); + if ($body) { + $basepart[] = $body; + } + foreach ($this->_parts as $mime_part) { + $basepart[] = $mime_part; + } + } else { + $basepart = $body; + $basepart->isBasePart(true); + } + } + $basepart->setHeaderCharset($this->_charset); + + /* Build recipients. */ + $recipients = clone $this->_recipients; + foreach (array('to', 'cc') as $header) { + if ($h = $this->_headers[$header]) { + $recipients->add($h->getAddressList()); + } + } + if ($this->_bcc) { + $recipients->add($this->_bcc); + } + + /* Trick Horde_Mime_Part into re-generating the message headers. */ + $this->_headers->removeHeader('MIME-Version'); + + /* Send message. */ + $recipients->unique(); + $basepart->send($recipients->writeAddress(), $this->_headers, $mailer); + + /* Remember the basepart */ + $this->_base = $basepart; + } + + /** + * Get the raw email data sent by this object. + * + * @param boolean $stream If true, return a stream resource, otherwise + * a string is returned. + * + * @return stream|string The raw email data. + * @since 2.4.0 + */ + public function getRaw($stream = true) + { + if ($stream) { + $hdr = new Horde_Stream(); + $hdr->add($this->_headers->toString(), true); + return Horde_Stream_Wrapper_Combine::getStream( + array($hdr->stream, + $this->getBasePart()->toString( + array('stream' => true, 'encode' => Horde_Mime_Part::ENCODE_7BIT | Horde_Mime_Part::ENCODE_8BIT | Horde_Mime_Part::ENCODE_BINARY)) + ) + ); + } + + return $this->_headers->toString() . $this->getBasePart()->toString(); + } + + /** + * Return the base MIME part. + * + * @return Horde_Mime_Part + */ + public function getBasePart() + { + if (empty($this->_base)) { + throw new Horde_Mail_Exception('No base part set.'); + } + + return $this->_base; + } + +} diff --git a/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mime/Horde/Mime/Mdn.php b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mime/Horde/Mime/Mdn.php new file mode 100644 index 00000000..fe097506 --- /dev/null +++ b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mime/Horde/Mime/Mdn.php @@ -0,0 +1,276 @@ + + * @category Horde + * @copyright 2004-2017 Horde LLC + * @license http://www.horde.org/licenses/lgpl21 LGPL 2.1 + * @package Mime + */ +class Horde_Mime_Mdn +{ + /* RFC 3798 header for requesting a MDN. */ + const MDN_HEADER = 'Disposition-Notification-To'; + + /** + * The Horde_Mime_Headers object. + * + * @var Horde_Mime_Headers + */ + protected $_headers; + + /** + * The text of the original message. + * + * @var string + */ + protected $_msgtext = false; + + /** + * Constructor. + * + * @param Horde_Mime_Headers $mime_headers A headers object. + */ + public function __construct(Horde_Mime_Headers $headers) + { + $this->_headers = $headers; + } + + /** + * Returns the address(es) to return the MDN to. + * + * @return string The address(es) to send the MDN to. Returns null if no + * MDN is requested. + */ + public function getMdnReturnAddr() + { + /* RFC 3798 [2.1] requires the Disposition-Notification-To header + * for an MDN to be created. */ + return ($hdr = $this->_headers[self::MDN_HEADER]) + ? strval($hdr) + : null; + } + + /** + * Is user input required to send the MDN? + * Explicit confirmation is needed in some cases to prevent mail loops + * and the use of MDNs for mail bombing. + * + * @return boolean Is explicit user input required to send the MDN? + */ + public function userConfirmationNeeded() + { + $return_path = $this->_headers['Return-Path']; + + /* RFC 3798 [2.1]: Explicit confirmation is needed if there is no + * Return-Path in the header. Also, "if the message contains more + * than one Return-Path header, the implementation may [] treat the + * situation as a failure of the comparison." */ + if (!$return_path || (count($return_path->value) > 1)) { + return true; + } + + /* RFC 3798 [2.1]: Explicit confirmation is needed if there is more + * than one distinct address in the Disposition-Notification-To + * header. */ + $addr_ob = ($hdr = $this->_headers[self::MDN_HEADER]) + ? $hdr->getAddressList(true) + : array(); + + switch (count($addr_ob)) { + case 0: + return false; + + case 1: + // No-op + break; + + default: + return true; + } + + /* RFC 3798 [2.1] states that "MDNs SHOULD NOT be sent automatically + * if the address in the Disposition-Notification-To header differs + * from the address in the Return-Path header." This comparison is + * case-sensitive for the mailbox part and case-insensitive for the + * host part. */ + $ret_ob = new Horde_Mail_Rfc822_Address($return_path->value); + return (!$ret_ob->valid || !$addr_ob->match($ret_ob)); + } + + /** + * When generating the MDN, should we return the enitre text of the + * original message? The default is no - we only return the headers of + * the original message. If the text is passed in via this method, we + * will return the entire message. + * + * @param string $text The text of the original message. + */ + public function originalMessageText($text) + { + $this->_msgtext = $text; + } + + /** + * Generate the MDN according to the specifications listed in RFC + * 3798 [3]. + * + * @param boolean $action Was this MDN type a result of a manual + * action on part of the user? + * @param boolean $sending Was this MDN sent as a result of a manual + * action on part of the user? + * @param string $type The type of action performed by the user. + * Per RFC 3798 [3.2.6.2] the following types are + * valid: + * - deleted + * - displayed + * @param string $name The name of the local server. + * @param Horde_Mail_Transport $mailer Mail transport object. + * @param array $opts Additional options: + * - charset: (string) Default charset. + * DEFAULT: NONE + * - from_addr: (string) From address. + * DEFAULT: NONE + * @param array $mod The list of modifications. Per RFC 3798 + * [3.2.6.3] the following modifications are + * valid: + * - error + * @param array $err If $mod is 'error', the additional + * information to provide. Key is the type of + * modification, value is the text. + */ + public function generate($action, $sending, $type, $name, $mailer, + array $opts = array(), array $mod = array(), + array $err = array()) + { + $opts = array_merge(array( + 'charset' => null, + 'from_addr' => null + ), $opts); + + if (!($hdr = $this->_headers[self::MDN_HEADER])) { + throw new RuntimeException( + 'Need at least one address to send MDN to.' + ); + } + + $to = $hdr->getAddressList(true); + $ua = Horde_Mime_Headers_UserAgent::create(); + + if ($orig_recip = $this->_headers['Original-Recipient']) { + $orig_recip = $orig_recip->value_single; + } + + /* Set up the mail headers. */ + $msg_headers = new Horde_Mime_Headers(); + $msg_headers->addHeaderOb(Horde_Mime_Headers_MessageId::create()); + $msg_headers->addHeaderOb($ua); + /* RFC 3834 [5.2] */ + $msg_headers->addHeader('Auto-Submitted', 'auto-replied'); + $msg_headers->addHeaderOb(Horde_Mime_Headers_Date::create()); + if ($opts['from_addr']) { + $msg_headers->addHeader('From', $opts['from_addr']); + } + $msg_headers->addHeader('To', $to); + $msg_headers->addHeader('Subject', Horde_Mime_Translation::t("Disposition Notification")); + + /* MDNs are a subtype of 'multipart/report'. */ + $msg = new Horde_Mime_Part(); + $msg->setType('multipart/report'); + $msg->setContentTypeParameter('report-type', 'disposition-notification'); + + /* The first part is a human readable message. */ + $part_one = new Horde_Mime_Part(); + $part_one->setType('text/plain'); + $part_one->setCharset($opts['charset']); + if ($type == 'displayed') { + $contents = sprintf( + Horde_Mime_Translation::t("The message sent on %s to %s with subject \"%s\" has been displayed.\n\nThis is no guarantee that the message has been read or understood."), + $this->_headers['Date'], + $this->_headers['To'], + $this->_headers['Subject'] + ); + $flowed = new Horde_Text_Flowed($contents, $opts['charset']); + $flowed->setDelSp(true); + $part_one->setContentTypeParameter('format', 'flowed'); + $part_one->setContentTypeParameter('DelSp', 'Yes'); + $part_one->setContents($flowed->toFlowed()); + } + // TODO: Messages for other notification types. + $msg[] = $part_one; + + /* The second part is a machine-parseable description. */ + $part_two = new Horde_Mime_Part(); + $part_two->setType('message/disposition-notification'); + + $part_two_h = new Horde_Mime_Headers(); + $part_two_h->addHeader('Reporting-UA', $name . '; ' . $ua); + if (!empty($orig_recip)) { + $part_two_h->addHeader('Original-Recipient', 'rfc822;' . $orig_recip); + } + if ($opts['from_addr']) { + $part_two_h->addHeader('Final-Recipient', 'rfc822;' . $opts['from_addr']); + } + + if ($msg_id = $this->_headers['Message-ID']) { + $part_two_h->addHeader('Original-Message-ID', strval($msg_id)); + } + + /* Create the Disposition field now (RFC 3798 [3.2.6]). */ + $dispo = (($action) ? 'manual-action' : 'automatic-action') . + '/' . + (($sending) ? 'MDN-sent-manually' : 'MDN-sent-automatically') . + '; ' . + $type; + if (!empty($mod)) { + $dispo .= '/' . implode(', ', $mod); + } + $part_two_h->addHeader('Disposition', $dispo); + + if (in_array('error', $mod) && isset($err['error'])) { + $part_two_h->addHeader('Error', $err['error']); + } + + $part_two->setContents(trim($part_two_h->toString()) . "\n"); + $msg[] = $part_two; + + /* The third part is the text of the original message. RFC 3798 [3] + * allows us to return only a portion of the entire message - this + * is left up to the user. */ + $part_three = new Horde_Mime_Part(); + $part_three->setType('message/rfc822'); + $part_three_text = array(trim($this->_headers->toString()) . "\n"); + if (!empty($this->_msgtext)) { + $part_three_text[] = "\n" . $this->_msgtext; + } + $part_three->setContents($part_three_text); + $msg[] = $part_three; + + return $msg->send($to, $msg_headers, $mailer); + } + + /** + * Add a MDN (read receipt) request header. + * + * @param mixed $to The address(es) the receipt should be mailed to. + */ + public function addMdnRequestHeaders($to) + { + /* This is the RFC 3798 way of requesting a receipt. */ + $this->_headers->addHeader(self::MDN_HEADER, $to); + } + +} diff --git a/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mime/Horde/Mime/Part.php b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mime/Horde/Mime/Part.php new file mode 100644 index 00000000..3a015d69 --- /dev/null +++ b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mime/Horde/Mime/Part.php @@ -0,0 +1,2528 @@ + + * @author Michael Slusarz + * @category Horde + * @copyright 1999-2017 Horde LLC + * @license http://www.horde.org/licenses/lgpl21 LGPL 2.1 + * @package Mime + */ +class Horde_Mime_Part +implements ArrayAccess, Countable, RecursiveIterator, Serializable +{ + /* Serialized version. */ + const VERSION = 2; + + /* The character(s) used internally for EOLs. */ + const EOL = "\n"; + + /* The character string designated by RFC 2045 to designate EOLs in MIME + * messages. */ + const RFC_EOL = "\r\n"; + + /* The default encoding. */ + const DEFAULT_ENCODING = 'binary'; + + /* Constants indicating the valid transfer encoding allowed. */ + const ENCODE_7BIT = 1; + const ENCODE_8BIT = 2; + const ENCODE_BINARY = 4; + + /* MIME nesting limit. */ + const NESTING_LIMIT = 100; + + /* Status mask value: Need to reindex the current part. */ + const STATUS_REINDEX = 1; + /* Status mask value: This is the base MIME part. */ + const STATUS_BASEPART = 2; + + /** + * The default charset to use when parsing text parts with no charset + * information. + * + * @todo Make this a non-static property or pass as parameter to static + * methods in Horde 6. + * + * @var string + */ + public static $defaultCharset = 'us-ascii'; + + /** + * The memory limit for use with the PHP temp stream. + * + * @var integer + */ + public static $memoryLimit = 2097152; + + /** + * Parent object. Value only accurate when iterating. + * + * @since 2.8.0 + * + * @var Horde_Mime_Part + */ + public $parent = null; + + /** + * Default value for this Part's size. + * + * @var integer + */ + protected $_bytes; + + /** + * The body of the part. Always stored in binary format. + * + * @var resource + */ + protected $_contents; + + /** + * The sequence to use as EOL for this part. + * + * The default is currently to output the EOL sequence internally as + * just "\n" instead of the canonical "\r\n" required in RFC 822 & 2045. + * To be RFC complaint, the full EOL combination should be used + * when sending a message. + * + * @var string + */ + protected $_eol = self::EOL; + + /** + * The MIME headers for this part. + * + * @var Horde_Mime_Headers + */ + protected $_headers; + + /** + * The charset to output the headers in. + * + * @var string + */ + protected $_hdrCharset = null; + + /** + * Metadata. + * + * @var array + */ + protected $_metadata = array(); + + /** + * The MIME ID of this part. + * + * @var string + */ + protected $_mimeid = null; + + /** + * The subparts of this part. + * + * @var array + */ + protected $_parts = array(); + + /** + * Status mask for this part. + * + * @var integer + */ + protected $_status = 0; + + /** + * Temporary array. + * + * @var array + */ + protected $_temp = array(); + + /** + * The desired transfer encoding of this part. + * + * @var string + */ + protected $_transferEncoding = self::DEFAULT_ENCODING; + + /** + * Flag to detect if a message failed to send at least once. + * + * @var boolean + */ + protected $_failed = false; + + /** + * Constructor. + */ + public function __construct() + { + $this->_headers = new Horde_Mime_Headers(); + + /* Mandatory MIME headers. */ + $this->_headers->addHeaderOb( + new Horde_Mime_Headers_ContentParam_ContentDisposition(null, '') + ); + + $ct = Horde_Mime_Headers_ContentParam_ContentType::create(); + $ct['charset'] = self::$defaultCharset; + $this->_headers->addHeaderOb($ct); + } + + /** + * Function to run on clone. + */ + public function __clone() + { + foreach ($this->_parts as $k => $v) { + $this->_parts[$k] = clone $v; + } + + $this->_headers = clone $this->_headers; + + if (!empty($this->_contents)) { + $this->_contents = $this->_writeStream($this->_contents); + } + } + + /** + * Set the content-disposition of this part. + * + * @param string $disposition The content-disposition to set ('inline', + * 'attachment', or an empty value). + */ + public function setDisposition($disposition = null) + { + $this->_headers['content-disposition']->setContentParamValue( + strval($disposition) + ); + } + + /** + * Get the content-disposition of this part. + * + * @return string The part's content-disposition. An empty string means + * no desired disposition has been set for this part. + */ + public function getDisposition() + { + return $this->_headers['content-disposition']->value; + } + + /** + * Add a disposition parameter to this part. + * + * @param string $label The disposition parameter label. + * @param string $data The disposition parameter data. If null, removes + * the parameter (@since 2.8.0). + */ + public function setDispositionParameter($label, $data) + { + $cd = $this->_headers['content-disposition']; + + if (is_null($data)) { + unset($cd[$label]); + } elseif (strlen($data)) { + $cd[$label] = $data; + + if (strcasecmp($label, 'size') === 0) { + // RFC 2183 [2.7] - size parameter + $this->_bytes = $cd[$label]; + } elseif ((strcasecmp($label, 'filename') === 0) && + !strlen($cd->value)) { + /* Set part to attachment if not already explicitly set to + * 'inline'. */ + $cd->setContentParamValue('attachment'); + } + } + } + + /** + * Get a disposition parameter from this part. + * + * @param string $label The disposition parameter label. + * + * @return string The data requested. + * Returns null if $label is not set. + */ + public function getDispositionParameter($label) + { + $cd = $this->_headers['content-disposition']; + return $cd[$label]; + } + + /** + * Get all parameters from the Content-Disposition header. + * + * @return array An array of all the parameters + * Returns the empty array if no parameters set. + */ + public function getAllDispositionParameters() + { + return $this->_headers['content-disposition']->params; + } + + /** + * Set the name of this part. + * + * @param string $name The name to set. + */ + public function setName($name) + { + $this->setDispositionParameter('filename', $name); + $this->setContentTypeParameter('name', $name); + } + + /** + * Get the name of this part. + * + * @param boolean $default If the name parameter doesn't exist, should we + * use the default name from the description + * parameter? + * + * @return string The name of the part. + */ + public function getName($default = false) + { + if (!($name = $this->getDispositionParameter('filename')) && + !($name = $this->getContentTypeParameter('name')) && + $default) { + $name = preg_replace('|\W|', '_', $this->getDescription(false)); + } + + return $name; + } + + /** + * Set the body contents of this part. + * + * @param mixed $contents The part body. Either a string or a stream + * resource, or an array containing both. + * @param array $options Additional options: + * - encoding: (string) The encoding of $contents. + * DEFAULT: Current transfer encoding value. + * - usestream: (boolean) If $contents is a stream, should we directly + * use that stream? + * DEFAULT: $contents copied to a new stream. + */ + public function setContents($contents, $options = array()) + { + if (is_resource($contents) && ($contents === $this->_contents)) { + return; + } + + if (empty($options['encoding'])) { + $options['encoding'] = $this->_transferEncoding; + } + + $fp = (empty($options['usestream']) || !is_resource($contents)) + ? $this->_writeStream($contents) + : $contents; + + /* Properly close the existing stream. */ + $this->clearContents(); + + $this->setTransferEncoding($options['encoding']); + $this->_contents = $this->_transferDecode($fp, $options['encoding']); + } + + /** + * Add to the body contents of this part. + * + * @param mixed $contents The part body. Either a string or a stream + * resource, or an array containing both. + * - encoding: (string) The encoding of $contents. + * DEFAULT: Current transfer encoding value. + * - usestream: (boolean) If $contents is a stream, should we directly + * use that stream? + * DEFAULT: $contents copied to a new stream. + */ + public function appendContents($contents, $options = array()) + { + if (empty($this->_contents)) { + $this->setContents($contents, $options); + } else { + $fp = (empty($options['usestream']) || !is_resource($contents)) + ? $this->_writeStream($contents) + : $contents; + + $this->_writeStream((empty($options['encoding']) || ($options['encoding'] == $this->_transferEncoding)) ? $fp : $this->_transferDecode($fp, $options['encoding']), array('fp' => $this->_contents)); + unset($this->_temp['sendTransferEncoding']); + } + } + + /** + * Clears the body contents of this part. + */ + public function clearContents() + { + if (!empty($this->_contents)) { + fclose($this->_contents); + $this->_contents = null; + unset($this->_temp['sendTransferEncoding']); + } + } + + /** + * Return the body of the part. + * + * @param array $options Additional options: + * - canonical: (boolean) Returns the contents in strict RFC 822 & + * 2045 output - namely, all newlines end with the + * canonical sequence. + * DEFAULT: No + * - stream: (boolean) Return the body as a stream resource. + * DEFAULT: No + * + * @return mixed The body text (string) of the part, null if there is no + * contents, and a stream resource if 'stream' is true. + */ + public function getContents($options = array()) + { + return empty($options['canonical']) + ? (empty($options['stream']) ? $this->_readStream($this->_contents) : $this->_contents) + : $this->replaceEOL($this->_contents, self::RFC_EOL, !empty($options['stream'])); + } + + /** + * Decodes the contents of the part to binary encoding. + * + * @param resource $fp A stream containing the data to decode. + * @param string $encoding The original file encoding. + * + * @return resource A new file resource with the decoded data. + */ + protected function _transferDecode($fp, $encoding) + { + /* If the contents are empty, return now. */ + fseek($fp, 0, SEEK_END); + if (ftell($fp)) { + switch ($encoding) { + case 'base64': + try { + return $this->_writeStream($fp, array( + 'error' => true, + 'filter' => array( + 'convert.base64-decode' => array() + ) + )); + } catch (ErrorException $e) {} + + rewind($fp); + return $this->_writeStream(base64_decode(stream_get_contents($fp))); + + case 'quoted-printable': + try { + return $this->_writeStream($fp, array( + 'error' => true, + 'filter' => array( + 'convert.quoted-printable-decode' => array() + ) + )); + } catch (ErrorException $e) {} + + // Workaround for Horde Bug #8747 + rewind($fp); + return $this->_writeStream(quoted_printable_decode(stream_get_contents($fp))); + + case 'uuencode': + case 'x-uuencode': + case 'x-uue': + /* Support for uuencoded encoding - although not required by + * RFCs, some mailers may still encode this way. */ + $res = Horde_Mime::uudecode($this->_readStream($fp)); + return $this->_writeStream($res[0]['data']); + } + } + + return $fp; + } + + /** + * Encodes the contents of the part as necessary for transport. + * + * @param resource $fp A stream containing the data to encode. + * @param string $encoding The encoding to use. + * + * @return resource A new file resource with the encoded data. + */ + protected function _transferEncode($fp, $encoding) + { + $this->_temp['transferEncodeClose'] = true; + + switch ($encoding) { + case 'base64': + /* Base64 Encoding: See RFC 2045, section 6.8 */ + return $this->_writeStream($fp, array( + 'filter' => array( + 'convert.base64-encode' => array( + 'line-break-chars' => $this->getEOL(), + 'line-length' => 76 + ) + ) + )); + + case 'quoted-printable': + // PHP Bug 65776 - Must normalize the EOL characters. + stream_filter_register('horde_eol', 'Horde_Stream_Filter_Eol'); + $stream = new Horde_Stream_Existing(array( + 'stream' => $fp + )); + $stream->stream = $this->_writeStream($stream->stream, array( + 'filter' => array( + 'horde_eol' => array('eol' => $stream->getEOL() + ) + ))); + + /* Quoted-Printable Encoding: See RFC 2045, section 6.7 */ + return $this->_writeStream($fp, array( + 'filter' => array( + 'convert.quoted-printable-encode' => array_filter(array( + 'line-break-chars' => $stream->getEOL(), + 'line-length' => 76 + )) + ) + )); + + default: + $this->_temp['transferEncodeClose'] = false; + return $fp; + } + } + + /** + * Set the MIME type of this part. + * + * @param string $type The MIME type to set (ex.: text/plain). + */ + public function setType($type) + { + /* RFC 2045: Any entity with unrecognized encoding must be treated + * as if it has a Content-Type of "application/octet-stream" + * regardless of what the Content-Type field actually says. */ + if (!is_null($this->_transferEncoding)) { + $this->_headers['content-type']->setContentParamValue($type); + } + } + + /** + * Get the full MIME Content-Type of this part. + * + * @param boolean $charset Append character set information to the end + * of the content type if this is a text/* part? + *` + * @return string The MIME type of this part. + */ + public function getType($charset = false) + { + $ct = $this->_headers['content-type']; + + return $charset + ? $ct->type_charset + : $ct->value; + } + + /** + * If the subtype of a MIME part is unrecognized by an application, the + * default type should be used instead (See RFC 2046). This method + * returns the default subtype for a particular primary MIME type. + * + * @return string The default MIME type of this part (ex.: text/plain). + */ + public function getDefaultType() + { + switch ($this->getPrimaryType()) { + case 'text': + /* RFC 2046 (4.1.4): text parts default to text/plain. */ + return 'text/plain'; + + case 'multipart': + /* RFC 2046 (5.1.3): multipart parts default to multipart/mixed. */ + return 'multipart/mixed'; + + default: + /* RFC 2046 (4.2, 4.3, 4.4, 4.5.3, 5.2.4): all others default to + application/octet-stream. */ + return 'application/octet-stream'; + } + } + + /** + * Get the primary type of this part. + * + * @return string The primary MIME type of this part. + */ + public function getPrimaryType() + { + return $this->_headers['content-type']->ptype; + } + + /** + * Get the subtype of this part. + * + * @return string The MIME subtype of this part. + */ + public function getSubType() + { + return $this->_headers['content-type']->stype; + } + + /** + * Set the character set of this part. + * + * @param string $charset The character set of this part. + */ + public function setCharset($charset) + { + $this->setContentTypeParameter('charset', $charset); + } + + /** + * Get the character set to use for this part. + * + * @return string The character set of this part (lowercase). Returns + * null if there is no character set. + */ + public function getCharset() + { + return $this->getContentTypeParameter('charset') + ?: (($this->getPrimaryType() === 'text') ? 'us-ascii' : null); + } + + /** + * Set the character set to use when outputting MIME headers. + * + * @param string $charset The character set. + */ + public function setHeaderCharset($charset) + { + $this->_hdrCharset = $charset; + } + + /** + * Get the character set to use when outputting MIME headers. + * + * @return string The character set. If no preferred character set has + * been set, returns null. + */ + public function getHeaderCharset() + { + return is_null($this->_hdrCharset) + ? $this->getCharset() + : $this->_hdrCharset; + } + + /** + * Set the language(s) of this part. + * + * @param mixed $lang A language string, or an array of language + * strings. + */ + public function setLanguage($lang) + { + $this->_headers->addHeaderOb( + new Horde_Mime_Headers_ContentLanguage('', $lang) + ); + } + + /** + * Get the language(s) of this part. + * + * @param array The list of languages. + */ + public function getLanguage() + { + return $this->_headers['content-language']->langs; + } + + /** + * Set the content duration of the data contained in this part (see RFC + * 3803). + * + * @param integer $duration The duration of the data, in seconds. If + * null, clears the duration information. + */ + public function setDuration($duration) + { + if (is_null($duration)) { + unset($this->_headers['content-duration']); + } else { + if (!($hdr = $this->_headers['content-duration'])) { + $hdr = new Horde_Mime_Headers_Element_Single( + 'Content-Duration', + '' + ); + $this->_headers->addHeaderOb($hdr); + } + $hdr->setValue($duration); + } + } + + /** + * Get the content duration of the data contained in this part (see RFC + * 3803). + * + * @return integer The duration of the data, in seconds. Returns null if + * there is no duration information. + */ + public function getDuration() + { + return ($hdr = $this->_headers['content-duration']) + ? intval($hdr->value) + : null; + } + + /** + * Set the description of this part. + * + * @param string $description The description of this part. If null, + * deletes the description (@since 2.8.0). + */ + public function setDescription($description) + { + if (is_null($description)) { + unset($this->_headers['content-description']); + } else { + if (!($hdr = $this->_headers['content-description'])) { + $hdr = new Horde_Mime_Headers_ContentDescription(null, ''); + $this->_headers->addHeaderOb($hdr); + } + $hdr->setValue($description); + } + } + + /** + * Get the description of this part. + * + * @param boolean $default If the description parameter doesn't exist, + * should we use the name of the part? + * + * @return string The description of this part. + */ + public function getDescription($default = false) + { + if (($ob = $this->_headers['content-description']) && + strlen($ob->value)) { + return $ob->value; + } + + return $default + ? $this->getName() + : ''; + } + + /** + * Set the transfer encoding to use for this part. + * + * Only needed in the following circumstances: + * 1.) Indicate what the transfer encoding is if the data has not yet been + * set in the object (can only be set if there presently are not + * any contents). + * 2.) Force the encoding to a certain type on a toString() call (if + * 'send' is true). + * + * @param string $encoding The transfer encoding to use. + * @param array $options Additional options: + * - send: (boolean) If true, use $encoding as the sending encoding. + * DEFAULT: $encoding is used to change the base encoding. + */ + public function setTransferEncoding($encoding, $options = array()) + { + if (empty($encoding) || + (empty($options['send']) && !empty($this->_contents))) { + return; + } + + switch ($encoding = Horde_String::lower($encoding)) { + case '7bit': + case '8bit': + case 'base64': + case 'binary': + case 'quoted-printable': + // Non-RFC types, but old mailers may still use + case 'uuencode': + case 'x-uuencode': + case 'x-uue': + if (empty($options['send'])) { + $this->_transferEncoding = $encoding; + } else { + $this->_temp['sendEncoding'] = $encoding; + } + break; + + default: + if (empty($options['send'])) { + /* RFC 2045: Any entity with unrecognized encoding must be + * treated as if it has a Content-Type of + * "application/octet-stream" regardless of what the + * Content-Type field actually says. */ + $this->setType('application/octet-stream'); + $this->_transferEncoding = null; + } + break; + } + } + + /** + * Get a list of all MIME subparts. + * + * @return array An array of the Horde_Mime_Part subparts. + */ + public function getParts() + { + return $this->_parts; + } + + /** + * Add/remove a content type parameter to this part. + * + * @param string $label The content-type parameter label. + * @param string $data The content-type parameter data. If null, removes + * the parameter (@since 2.8.0). + */ + public function setContentTypeParameter($label, $data) + { + $ct = $this->_headers['content-type']; + + if (is_null($data)) { + unset($ct[$label]); + } elseif (strlen($data)) { + $ct[$label] = $data; + } + } + + /** + * Get a content type parameter from this part. + * + * @param string $label The content type parameter label. + * + * @return string The data requested. + * Returns null if $label is not set. + */ + public function getContentTypeParameter($label) + { + $ct = $this->_headers['content-type']; + return $ct[$label]; + } + + /** + * Get all parameters from the Content-Type header. + * + * @return array An array of all the parameters + * Returns the empty array if no parameters set. + */ + public function getAllContentTypeParameters() + { + return $this->_headers['content-type']->params; + } + + /** + * Sets a new string to use for EOLs. + * + * @param string $eol The string to use for EOLs. + */ + public function setEOL($eol) + { + $this->_eol = $eol; + } + + /** + * Get the string to use for EOLs. + * + * @return string The string to use for EOLs. + */ + public function getEOL() + { + return $this->_eol; + } + + /** + * Returns a Horde_Mime_Header object containing all MIME headers needed + * for the part. + * + * @param array $options Additional options: + * - encode: (integer) A mask of allowable encodings. + * DEFAULT: Auto-determined + * - headers: (Horde_Mime_Headers) The object to add the MIME headers + * to. + * DEFAULT: Add headers to a new object + * + * @return Horde_Mime_Headers A Horde_Mime_Headers object. + */ + public function addMimeHeaders($options = array()) + { + if (empty($options['headers'])) { + $headers = new Horde_Mime_Headers(); + } else { + $headers = $options['headers']; + $headers->removeHeader('Content-Disposition'); + $headers->removeHeader('Content-Transfer-Encoding'); + } + + /* Add the mandatory Content-Type header. */ + $ct = $this->_headers['content-type']; + $headers->addHeaderOb($ct); + + /* Add the language(s), if set. (RFC 3282 [2]) */ + if ($hdr = $this->_headers['content-language']) { + $headers->addHeaderOb($hdr); + } + + /* Get the description, if any. */ + if ($hdr = $this->_headers['content-description']) { + $headers->addHeaderOb($hdr); + } + + /* Set the duration, if it exists. (RFC 3803) */ + if ($hdr = $this->_headers['content-duration']) { + $headers->addHeaderOb($hdr); + } + + /* Per RFC 2046[4], this MUST appear in the base message headers. */ + if ($this->_status & self::STATUS_BASEPART) { + $headers->addHeaderOb(Horde_Mime_Headers_MimeVersion::create()); + } + + /* message/* parts require no additional header information. */ + if ($ct->ptype === 'message') { + return $headers; + } + + /* RFC 2183 [2] indicates that default is no requested disposition - + * the receiving MUA is responsible for display choice. */ + $cd = $this->_headers['content-disposition']; + if (!$cd->isDefault()) { + $headers->addHeaderOb($cd); + } + + /* Add transfer encoding information. RFC 2045 [6.1] indicates that + * default is 7bit. No need to send the header in this case. */ + $cte = new Horde_Mime_Headers_ContentTransferEncoding( + null, + $this->_getTransferEncoding( + empty($options['encode']) ? null : $options['encode'] + ) + ); + if (!$cte->isDefault()) { + $headers->addHeaderOb($cte); + } + + /* Add content ID information. */ + if ($hdr = $this->_headers['content-id']) { + $headers->addHeaderOb($hdr); + } + + return $headers; + } + + /** + * Return the entire part in MIME format. + * + * @param array $options Additional options: + * - canonical: (boolean) Returns the encoded part in strict RFC 822 & + * 2045 output - namely, all newlines end with the + * canonical sequence. + * DEFAULT: false + * - defserver: (string) The default server to use when creating the + * header string. + * DEFAULT: none + * - encode: (integer) A mask of allowable encodings. + * DEFAULT: self::ENCODE_7BIT + * - headers: (mixed) Include the MIME headers? If true, create a new + * headers object. If a Horde_Mime_Headers object, add MIME + * headers to this object. If a string, use the string + * verbatim. + * DEFAULT: true + * - id: (string) Return only this MIME ID part. + * DEFAULT: Returns the base part. + * - stream: (boolean) Return a stream resource. + * DEFAULT: false + * + * @return mixed The MIME string (returned as a resource if $stream is + * true). + */ + public function toString($options = array()) + { + $eol = $this->getEOL(); + $isbase = true; + $oldbaseptr = null; + $parts = $parts_close = array(); + + if (isset($options['id'])) { + $id = $options['id']; + if (!($part = $this[$id])) { + return $part; + } + unset($options['id']); + $contents = $part->toString($options); + + $prev_id = Horde_Mime::mimeIdArithmetic($id, 'up', array('norfc822' => true)); + $prev_part = ($prev_id == $this->getMimeId()) + ? $this + : $this[$prev_id]; + if (!$prev_part) { + return $contents; + } + + $boundary = trim($this->getContentTypeParameter('boundary'), '"'); + $parts = array( + $eol . '--' . $boundary . $eol, + $contents + ); + + if (!isset($this[Horde_Mime::mimeIdArithmetic($id, 'next')])) { + $parts[] = $eol . '--' . $boundary . '--' . $eol; + } + } else { + if ($isbase = empty($options['_notbase'])) { + $headers = !empty($options['headers']) + ? $options['headers'] + : false; + + if (empty($options['encode'])) { + $options['encode'] = null; + } + if (empty($options['defserver'])) { + $options['defserver'] = null; + } + $options['headers'] = true; + $options['_notbase'] = true; + } else { + $headers = true; + $oldbaseptr = &$options['_baseptr']; + } + + $this->_temp['toString'] = ''; + $options['_baseptr'] = &$this->_temp['toString']; + + /* Any information about a message is embedded in the message + * contents themself. Simply output the contents of the part + * directly and return. */ + $ptype = $this->getPrimaryType(); + if ($ptype == 'message') { + $parts[] = $this->_contents; + } else { + if (!empty($this->_contents)) { + $encoding = $this->_getTransferEncoding($options['encode']); + switch ($encoding) { + case '8bit': + if (empty($options['_baseptr'])) { + $options['_baseptr'] = '8bit'; + } + break; + + case 'binary': + $options['_baseptr'] = 'binary'; + break; + } + + $parts[] = $this->_transferEncode($this->_contents, $encoding); + + /* If not using $this->_contents, we can close the stream + * when finished. */ + if ($this->_temp['transferEncodeClose']) { + $parts_close[] = end($parts); + } + } + + /* Deal with multipart messages. */ + if ($ptype == 'multipart') { + if (empty($this->_contents)) { + $parts[] = 'This message is in MIME format.' . $eol; + } + + $boundary = trim($this->getContentTypeParameter('boundary'), '"'); + + /* If base part is multipart/digest, children should not + * have content-type (automatically treated as + * message/rfc822; RFC 2046 [5.1.5]). */ + if ($this->getSubType() === 'digest') { + $options['is_digest'] = true; + } + + foreach ($this as $part) { + $parts[] = $eol . '--' . $boundary . $eol; + $tmp = $part->toString($options); + if ($part->getEOL() != $eol) { + $tmp = $this->replaceEOL($tmp, $eol, !empty($options['stream'])); + } + if (!empty($options['stream'])) { + $parts_close[] = $tmp; + } + $parts[] = $tmp; + } + $parts[] = $eol . '--' . $boundary . '--' . $eol; + } + } + + if (is_string($headers)) { + array_unshift($parts, $headers); + } elseif ($headers) { + $hdr_ob = $this->addMimeHeaders(array( + 'encode' => $options['encode'], + 'headers' => ($headers === true) ? null : $headers + )); + if (!$isbase && !empty($options['is_digest'])) { + unset($hdr_ob['content-type']); + } + if (!empty($this->_temp['toString'])) { + $hdr_ob->addHeader( + 'Content-Transfer-Encoding', + $this->_temp['toString'] + ); + } + array_unshift($parts, $hdr_ob->toString(array( + 'canonical' => ($eol == self::RFC_EOL), + 'charset' => $this->getHeaderCharset(), + 'defserver' => $options['defserver'] + ))); + } + } + + $newfp = $this->_writeStream($parts); + + array_map('fclose', $parts_close); + + if (!is_null($oldbaseptr)) { + switch ($this->_temp['toString']) { + case '8bit': + if (empty($oldbaseptr)) { + $oldbaseptr = '8bit'; + } + break; + + case 'binary': + $oldbaseptr = 'binary'; + break; + } + } + + if ($isbase && !empty($options['canonical'])) { + return $this->replaceEOL($newfp, self::RFC_EOL, !empty($options['stream'])); + } + + return empty($options['stream']) + ? $this->_readStream($newfp) + : $newfp; + } + + /** + * Get the transfer encoding for the part based on the user requested + * transfer encoding and the current contents of the part. + * + * @param integer $encode A mask of allowable encodings. + * + * @return string The transfer-encoding of this part. + */ + protected function _getTransferEncoding($encode = self::ENCODE_7BIT) + { + if (!empty($this->_temp['sendEncoding'])) { + return $this->_temp['sendEncoding']; + } elseif (!empty($this->_temp['sendTransferEncoding'][$encode])) { + return $this->_temp['sendTransferEncoding'][$encode]; + } + + if (empty($this->_contents)) { + $encoding = '7bit'; + } else { + switch ($this->getPrimaryType()) { + case 'message': + case 'multipart': + /* RFC 2046 [5.2.1] - message/rfc822 messages only allow 7bit, + * 8bit, and binary encodings. If the current encoding is + * either base64 or q-p, switch it to 8bit instead. + * RFC 2046 [5.2.2, 5.2.3, 5.2.4] - All other messages + * only allow 7bit encodings. + * + * TODO: What if message contains 8bit characters and we are + * in strict 7bit mode? Not sure there is anything we can do + * in that situation, especially for message/rfc822 parts. + * + * These encoding will be figured out later (via toString()). + * They are limited to 7bit, 8bit, and binary. Default to + * '7bit' per RFCs. */ + $default_8bit = 'base64'; + $encoding = '7bit'; + break; + + case 'text': + $default_8bit = 'quoted-printable'; + $encoding = '7bit'; + break; + + default: + $default_8bit = 'base64'; + /* If transfer encoding has changed from the default, use that + * value. */ + $encoding = ($this->_transferEncoding == self::DEFAULT_ENCODING) + ? 'base64' + : $this->_transferEncoding; + break; + } + + switch ($encoding) { + case 'base64': + case 'binary': + break; + + default: + $encoding = $this->_scanStream($this->_contents); + break; + } + + switch ($encoding) { + case 'base64': + case 'binary': + /* If the text is longer than 998 characters between + * linebreaks, use quoted-printable encoding to ensure the + * text will not be chopped (i.e. by sendmail if being + * sent as mail text). */ + $encoding = $default_8bit; + break; + + case '8bit': + $encoding = (($encode & self::ENCODE_8BIT) || ($encode & self::ENCODE_BINARY)) + ? '8bit' + : $default_8bit; + break; + } + } + + $this->_temp['sendTransferEncoding'][$encode] = $encoding; + + return $encoding; + } + + /** + * Replace newlines in this part's contents with those specified by either + * the given newline sequence or the part's current EOL setting. + * + * @param mixed $text The text to replace. Either a string or a + * stream resource. If a stream, and returning + * a string, will close the stream when done. + * @param string $eol The EOL sequence to use. If not present, uses + * the part's current EOL setting. + * @param boolean $stream If true, returns a stream resource. + * + * @return string The text with the newlines replaced by the desired + * newline sequence (returned as a stream resource if + * $stream is true). + */ + public function replaceEOL($text, $eol = null, $stream = false) + { + if (is_null($eol)) { + $eol = $this->getEOL(); + } + + stream_filter_register('horde_eol', 'Horde_Stream_Filter_Eol'); + $fp = $this->_writeStream($text, array( + 'filter' => array( + 'horde_eol' => array('eol' => $eol) + ) + )); + + return $stream ? $fp : $this->_readStream($fp, true); + } + + /** + * Determine the size of this MIME part and its child members. + * + * @todo Remove $approx parameter. + * + * @param boolean $approx If true, determines an approximate size for + * parts consisting of base64 encoded data. + * + * @return integer Size of the part, in bytes. + */ + public function getBytes($approx = false) + { + if ($this->getPrimaryType() == 'multipart') { + if (isset($this->_bytes)) { + return $this->_bytes; + } + + $bytes = 0; + foreach ($this as $part) { + $bytes += $part->getBytes($approx); + } + return $bytes; + } + + if ($this->_contents) { + fseek($this->_contents, 0, SEEK_END); + $bytes = ftell($this->_contents); + } else { + $bytes = $this->_bytes; + + /* Base64 transfer encoding is approx. 33% larger than original + * data size (RFC 2045 [6.8]). */ + if ($approx && ($this->_transferEncoding == 'base64')) { + $bytes *= 0.75; + } + } + + return intval($bytes); + } + + /** + * Explicitly set the size (in bytes) of this part. This value will only + * be returned (via getBytes()) if there are no contents currently set. + * + * This function is useful for setting the size of the part when the + * contents of the part are not fully loaded (i.e. creating a + * Horde_Mime_Part object from IMAP header information without loading the + * data of the part). + * + * @param integer $bytes The size of this part in bytes. + */ + public function setBytes($bytes) + { + /* Consider 'size' disposition parameter to be the canonical size. + * Only set bytes if that value doesn't exist. */ + if (!$this->getDispositionParameter('size')) { + $this->setDispositionParameter('size', $bytes); + } + } + + /** + * Output the size of this MIME part in KB. + * + * @todo Remove $approx parameter. + * + * @param boolean $approx If true, determines an approximate size for + * parts consisting of base64 encoded data. + * + * @return string Size of the part in KB. + */ + public function getSize($approx = false) + { + if (!($bytes = $this->getBytes($approx))) { + return 0; + } + + $localeinfo = Horde_Nls::getLocaleInfo(); + + // TODO: Workaround broken number_format() prior to PHP 5.4.0. + return str_replace( + array('X', 'Y'), + array($localeinfo['decimal_point'], $localeinfo['thousands_sep']), + number_format(ceil($bytes / 1024), 0, 'X', 'Y') + ); + } + + /** + * Sets the Content-ID header for this part. + * + * @param string $cid Use this CID (if not already set). Else, generate + * a random CID. + * + * @return string The Content-ID for this part. + */ + public function setContentId($cid = null) + { + if (!is_null($id = $this->getContentId())) { + return $id; + } + + $this->_headers->addHeaderOb( + is_null($cid) + ? Horde_Mime_Headers_ContentId::create() + : new Horde_Mime_Headers_ContentId(null, $cid) + ); + + return $this->getContentId(); + } + + /** + * Returns the Content-ID for this part. + * + * @return string The Content-ID for this part (null if not set). + */ + public function getContentId() + { + return ($hdr = $this->_headers['content-id']) + ? trim($hdr->value, '<>') + : null; + } + + /** + * Alter the MIME ID of this part. + * + * @param string $mimeid The MIME ID. + */ + public function setMimeId($mimeid) + { + $this->_mimeid = $mimeid; + } + + /** + * Returns the MIME ID of this part. + * + * @return string The MIME ID. + */ + public function getMimeId() + { + return $this->_mimeid; + } + + /** + * Build the MIME IDs for this part and all subparts. + * + * @param string $id The ID of this part. + * @param boolean $rfc822 Is this a message/rfc822 part? + */ + public function buildMimeIds($id = null, $rfc822 = false) + { + $this->_status &= ~self::STATUS_REINDEX; + + if (is_null($id)) { + $rfc822 = true; + $id = ''; + } + + if ($rfc822) { + if (empty($this->_parts) && + ($this->getPrimaryType() != 'multipart')) { + $this->setMimeId($id . '1'); + } else { + if (empty($id) && ($this->getType() == 'message/rfc822')) { + $this->setMimeId('1.0'); + } else { + $this->setMimeId($id . '0'); + } + $i = 1; + foreach ($this as $val) { + $val->buildMimeIds($id . ($i++)); + } + } + } else { + $this->setMimeId($id); + $id = $id + ? ((substr($id, -2) === '.0') ? substr($id, 0, -1) : ($id . '.')) + : ''; + + if (count($this)) { + if ($this->getType() == 'message/rfc822') { + $this->rewind(); + $this->current()->buildMimeIds($id, true); + } else { + $i = 1; + foreach ($this as $val) { + $val->buildMimeIds($id . ($i++)); + } + } + } + } + } + + /** + * Is this the base MIME part? + * + * @param boolean $base True if this is the base MIME part. + */ + public function isBasePart($base) + { + if (empty($base)) { + $this->_status &= ~self::STATUS_BASEPART; + } else { + $this->_status |= self::STATUS_BASEPART; + } + } + + /** + * Determines if this MIME part is an attachment for display purposes. + * + * @since Horde_Mime 2.10.0 + * + * @return boolean True if this part should be considered an attachment. + */ + public function isAttachment() + { + $type = $this->getType(); + + switch ($type) { + case 'application/ms-tnef': + case 'application/pgp-keys': + case 'application/vnd.ms-tnef': + return false; + } + + if ($this->parent) { + switch ($this->parent->getType()) { + case 'multipart/encrypted': + switch ($type) { + case 'application/octet-stream': + return false; + } + break; + + case 'multipart/signed': + switch ($type) { + case 'application/pgp-signature': + case 'application/pkcs7-signature': + case 'application/x-pkcs7-signature': + return false; + } + break; + } + } + + switch ($this->getDisposition()) { + case 'attachment': + return true; + } + + switch ($this->getPrimaryType()) { + case 'application': + if (strlen($this->getName())) { + return true; + } + break; + + case 'audio': + case 'video': + return true; + + case 'multipart': + return false; + } + + return false; + } + + /** + * Set a piece of metadata on this object. + * + * @param string $key The metadata key. + * @param mixed $data The metadata. If null, clears the key. + */ + public function setMetadata($key, $data = null) + { + if (is_null($data)) { + unset($this->_metadata[$key]); + } else { + $this->_metadata[$key] = $data; + } + } + + /** + * Retrieves metadata from this object. + * + * @param string $key The metadata key. + * + * @return mixed The metadata, or null if it doesn't exist. + */ + public function getMetadata($key) + { + return isset($this->_metadata[$key]) + ? $this->_metadata[$key] + : null; + } + + /** + * Sends this message. + * + * @param string $email The address list to send to. + * @param Horde_Mime_Headers $headers The Horde_Mime_Headers object + * holding this message's headers. + * @param Horde_Mail_Transport $mailer A Horde_Mail_Transport object. + * @param array $opts Additional options: + *
+     *   - broken_rfc2231: (boolean) Attempt to work around non-RFC
+     *                     2231-compliant MUAs by generating both a RFC
+     *                     2047-like parameter name and also the correct RFC
+     *                     2231 parameter (@since 2.5.0).
+     *                     DEFAULT: false
+     *   - encode: (integer) The encoding to use. A mask of self::ENCODE_*
+     *             values.
+     *             DEFAULT: Auto-determined based on transport driver.
+     * 
+ * + * @throws Horde_Mime_Exception + * @throws InvalidArgumentException + */ + public function send($email, $headers, Horde_Mail_Transport $mailer, + array $opts = array()) + { + $old_status = $this->_status; + $this->isBasePart(true); + + /* Does the SMTP backend support 8BITMIME (RFC 1652)? */ + $canonical = true; + $encode = self::ENCODE_7BIT; + + if (isset($opts['encode'])) { + /* Always allow 7bit encoding. */ + $encode |= $opts['encode']; + } elseif ($mailer instanceof Horde_Mail_Transport_Smtp) { + try { + $smtp_ext = $mailer->getSMTPObject()->getServiceExtensions(); + if (isset($smtp_ext['8BITMIME'])) { + $encode |= self::ENCODE_8BIT; + } + } catch (Horde_Mail_Exception $e) {} + $canonical = false; + } elseif ($mailer instanceof Horde_Mail_Transport_Smtphorde) { + try { + if ($mailer->getSMTPObject()->data_8bit) { + $encode |= self::ENCODE_8BIT; + } + } catch (Horde_Mail_Exception $e) {} + $canonical = false; + } + + $msg = $this->toString(array( + 'canonical' => $canonical, + 'encode' => $encode, + 'headers' => false, + 'stream' => true + )); + + /* Add MIME Headers if they don't already exist. */ + if (!isset($headers['MIME-Version'])) { + $headers = $this->addMimeHeaders(array( + 'encode' => $encode, + 'headers' => $headers + )); + } + + if (!empty($this->_temp['toString'])) { + $headers->addHeader( + 'Content-Transfer-Encoding', + $this->_temp['toString'] + ); + switch ($this->_temp['toString']) { + case '8bit': + if ($mailer instanceof Horde_Mail_Transport_Smtp) { + $mailer->addServiceExtensionParameter('BODY', '8BITMIME'); + } + break; + } + } + + $this->_status = $old_status; + $rfc822 = new Horde_Mail_Rfc822(); + try { + $mailer->send($rfc822->parseAddressList($email)->writeAddress(array( + 'encode' => $this->getHeaderCharset() ?: true, + 'idn' => true + )), $headers->toArray(array( + 'broken_rfc2231' => !empty($opts['broken_rfc2231']), + 'canonical' => $canonical, + 'charset' => $this->getHeaderCharset() + )), $msg); + } catch (InvalidArgumentException $e) { + // Try to rebuild the part in case it was due to + // an invalid line length in a rfc822/message attachment. + if ($this->_failed) { + throw $e; + } + $this->_failed = true; + $this->_sanityCheckRfc822Attachments(); + try { + $this->send($email, $headers, $mailer, $opts); + } catch (Horde_Mail_Exception $e) { + throw new Horde_Mime_Exception($e); + } + } catch (Horde_Mail_Exception $e) { + throw new Horde_Mime_Exception($e); + } + } + + /** + * Finds the main "body" text part (if any) in a message. + * "Body" data is the first text part under this part. + * + * @param string $subtype Specifically search for this subtype. + * + * @return mixed The MIME ID of the main body part, or null if a body + * part is not found. + */ + public function findBody($subtype = null) + { + $this->buildMimeIds(); + + foreach ($this->partIterator() as $val) { + $id = $val->getMimeId(); + + if (($val->getPrimaryType() == 'text') && + ((intval($id) === 1) || !$this->getMimeId()) && + (is_null($subtype) || ($val->getSubType() == $subtype)) && + ($val->getDisposition() !== 'attachment')) { + return $id; + } + } + + return null; + } + + /** + * Returns the recursive iterator needed to iterate through this part. + * + * @since 2.8.0 + * + * @param boolean $current Include the current part as the base? + * + * @return Iterator Recursive iterator. + */ + public function partIterator($current = true) + { + $this->_reindex(true); + return new Horde_Mime_Part_Iterator($this, $current); + } + + /** + * Returns a subpart by index. + * + * @return Horde_Mime_Part Part, or null if not found. + */ + public function getPartByIndex($index) + { + if (!isset($this->_parts[$index])) { + return null; + } + + $part = $this->_parts[$index]; + $part->parent = $this; + + return $part; + } + + /** + * Reindexes the MIME IDs, if necessary. + * + * @param boolean $force Reindex if the current part doesn't have an ID. + */ + protected function _reindex($force = false) + { + $id = $this->getMimeId(); + + if (($this->_status & self::STATUS_REINDEX) || + ($force && is_null($id))) { + $this->buildMimeIds( + is_null($id) + ? (($this->getPrimaryType() === 'multipart') ? '0' : '1') + : $id + ); + } + } + + /** + * Write data to a stream. + * + * @param array $data The data to write. Either a stream resource or + * a string. + * @param array $options Additional options: + * - error: (boolean) Catch errors when writing to the stream. Throw an + * ErrorException if an error is found. + * DEFAULT: false + * - filter: (array) Filter(s) to apply to the string. Keys are the + * filter names, values are filter params. + * - fp: (resource) Use this stream instead of creating a new one. + * + * @return resource The stream resource. + * @throws ErrorException + */ + protected function _writeStream($data, $options = array()) + { + if (empty($options['fp'])) { + $fp = fopen('php://temp/maxmemory:' . self::$memoryLimit, 'r+'); + } else { + $fp = $options['fp']; + fseek($fp, 0, SEEK_END); + } + + if (!is_array($data)) { + $data = array($data); + } + + $append_filter = array(); + if (!empty($options['filter'])) { + foreach ($options['filter'] as $key => $val) { + $append_filter[] = stream_filter_append($fp, $key, STREAM_FILTER_WRITE, $val); + } + } + + if (!empty($options['error'])) { + set_error_handler(function($errno, $errstr) { + throw new ErrorException($errstr, $errno); + }); + $error = null; + } + + try { + foreach ($data as $d) { + if (is_resource($d)) { + rewind($d); + while (!feof($d)) { + fwrite($fp, fread($d, 8192)); + } + } elseif (is_string($d)) { + $len = strlen($d); + $i = 0; + while ($i < $len) { + fwrite($fp, substr($d, $i, 8192)); + $i += 8192; + } + } + } + } catch (ErrorException $e) { + $error = $e; + } + + foreach ($append_filter as $val) { + stream_filter_remove($val); + } + + if (!empty($options['error'])) { + restore_error_handler(); + if ($error) { + throw $error; + } + } + + return $fp; + } + + /** + * Read data from a stream. + * + * @param resource $fp An active stream. + * @param boolean $close Close the stream when done reading? + * + * @return string The data from the stream. + */ + protected function _readStream($fp, $close = false) + { + $out = ''; + + if (!is_resource($fp)) { + return $out; + } + + rewind($fp); + while (!feof($fp)) { + $out .= fread($fp, 8192); + } + + if ($close) { + fclose($fp); + } + + return $out; + } + + /** + * Scans a stream for content type. + * + * @param resource $fp A stream resource. + * + * @return mixed Either 'binary', '8bit', or false. + */ + protected function _scanStream($fp) + { + rewind($fp); + + stream_filter_register( + 'horde_mime_scan_stream', + 'Horde_Mime_Filter_Encoding' + ); + $filter_params = new stdClass; + $filter = stream_filter_append( + $fp, + 'horde_mime_scan_stream', + STREAM_FILTER_READ, + $filter_params + ); + + while (!feof($fp)) { + fread($fp, 8192); + } + + stream_filter_remove($filter); + + return $filter_params->body; + } + + /* Static methods. */ + + /** + * Attempts to build a Horde_Mime_Part object from message text. + * + * @param string $text The text of the MIME message. + * @param array $opts Additional options: + * - forcemime: (boolean) If true, the message data is assumed to be + * MIME data. If not, a MIME-Version header must exist (RFC + * 2045 [4]) to be parsed as a MIME message. + * DEFAULT: false + * - level: (integer) Current nesting level of the MIME data. + * DEFAULT: 0 + * - no_body: (boolean) If true, don't set body contents of parts (since + * 2.2.0). + * DEFAULT: false + * + * @return Horde_Mime_Part A MIME Part object. + * @throws Horde_Mime_Exception + */ + public static function parseMessage($text, array $opts = array()) + { + /* Mini-hack to get a blank Horde_Mime part so we can call + * replaceEOL(). Convert to EOL, since that is the expected EOL for + * use internally within a Horde_Mime_Part object. */ + $part = new Horde_Mime_Part(); + $rawtext = $part->replaceEOL($text, self::EOL); + + /* Find the header. */ + $hdr_pos = self::_findHeader($rawtext, self::EOL); + + unset($opts['ctype']); + $ob = self::_getStructure(substr($rawtext, 0, $hdr_pos), substr($rawtext, $hdr_pos + 2), $opts); + $ob->buildMimeIds(); + return $ob; + } + + /** + * Creates a MIME object from the text of one part of a MIME message. + * + * @param string $header The header text. + * @param string $body The body text. + * @param array $opts Additional options: + *
+     *   - ctype: (string) The default content-type.
+     *   - forcemime: (boolean) If true, the message data is assumed to be
+     *                MIME data. If not, a MIME-Version header must exist to
+     *                be parsed as a MIME message.
+     *   - level: (integer) Current nesting level.
+     *   - no_body: (boolean) If true, don't set body contents of parts.
+     * 
+ * + * @return Horde_Mime_Part The MIME part object. + */ + protected static function _getStructure($header, $body, + array $opts = array()) + { + $opts = array_merge(array( + 'ctype' => 'text/plain', + 'forcemime' => false, + 'level' => 0, + 'no_body' => false + ), $opts); + + /* Parse headers text into a Horde_Mime_Headers object. */ + $hdrs = Horde_Mime_Headers::parseHeaders($header); + + $ob = new Horde_Mime_Part(); + + /* This is not a MIME message. */ + if (!$opts['forcemime'] && !isset($hdrs['MIME-Version'])) { + $ob->setType('text/plain'); + + if ($len = strlen($body)) { + if ($opts['no_body']) { + $ob->setBytes($len); + } else { + $ob->setContents($body); + } + } + + return $ob; + } + + /* Content type. */ + if ($tmp = $hdrs['Content-Type']) { + $ob->setType($tmp->value); + foreach ($tmp->params as $key => $val) { + $ob->setContentTypeParameter($key, $val); + } + } else { + $ob->setType($opts['ctype']); + } + + /* Content transfer encoding. */ + if ($tmp = $hdrs['Content-Transfer-Encoding']) { + $ob->setTransferEncoding(strval($tmp)); + } + + /* Content-Description. */ + if ($tmp = $hdrs['Content-Description']) { + $ob->setDescription(strval($tmp)); + } + + /* Content-Disposition. */ + if ($tmp = $hdrs['Content-Disposition']) { + $ob->setDisposition($tmp->value); + foreach ($tmp->params as $key => $val) { + $ob->setDispositionParameter($key, $val); + } + } + + /* Content-Duration */ + if ($tmp = $hdrs['Content-Duration']) { + $ob->setDuration(strval($tmp)); + } + + /* Content-ID. */ + if ($tmp = $hdrs['Content-Id']) { + $ob->setContentId(strval($tmp)); + } + + if (($len = strlen($body)) && ($ob->getPrimaryType() != 'multipart')) { + if ($opts['no_body']) { + $ob->setBytes($len); + } else { + $ob->setContents($body); + } + } + + if (++$opts['level'] >= self::NESTING_LIMIT) { + return $ob; + } + + /* Process subparts. */ + switch ($ob->getPrimaryType()) { + case 'message': + if ($ob->getSubType() == 'rfc822') { + $ob[] = self::parseMessage($body, array( + 'forcemime' => true, + 'no_body' => $opts['no_body'] + )); + } + break; + + case 'multipart': + $boundary = $ob->getContentTypeParameter('boundary'); + if (!is_null($boundary)) { + foreach (self::_findBoundary($body, 0, $boundary) as $val) { + if (!isset($val['length'])) { + break; + } + $subpart = substr($body, $val['start'], $val['length']); + $hdr_pos = self::_findHeader($subpart, self::EOL); + $ob[] = self::_getStructure( + substr($subpart, 0, $hdr_pos), + substr($subpart, $hdr_pos + 2), + array( + 'ctype' => ($ob->getSubType() == 'digest') ? 'message/rfc822' : 'text/plain', + 'forcemime' => true, + 'level' => $opts['level'], + 'no_body' => $opts['no_body'] + ) + ); + } + } + break; + } + + return $ob; + } + + /** + * Attempts to obtain the raw text of a MIME part. + * + * @param mixed $text The full text of the MIME message. The text is + * assumed to be MIME data (no MIME-Version checking + * is performed). It can be either a stream or a + * string. + * @param string $type Either 'header' or 'body'. + * @param string $id The MIME ID. + * + * @return string The raw text. + * @throws Horde_Mime_Exception + */ + public static function getRawPartText($text, $type, $id) + { + /* Mini-hack to get a blank Horde_Mime part so we can call + * replaceEOL(). From an API perspective, getRawPartText() should be + * static since it is not working on MIME part data. */ + $part = new Horde_Mime_Part(); + $rawtext = $part->replaceEOL($text, self::RFC_EOL); + + /* We need to carry around the trailing "\n" because this is needed + * to correctly find the boundary string. */ + $hdr_pos = self::_findHeader($rawtext, self::RFC_EOL); + $curr_pos = $hdr_pos + 3; + + if ($id == 0) { + switch ($type) { + case 'body': + return substr($rawtext, $curr_pos + 1); + + case 'header': + return trim(substr($rawtext, 0, $hdr_pos)); + } + } + + $hdr_ob = Horde_Mime_Headers::parseHeaders(trim(substr($rawtext, 0, $hdr_pos))); + + /* If this is a message/rfc822, pass the body into the next loop. + * Don't decrement the ID here. */ + if (($ct = $hdr_ob['Content-Type']) && ($ct == 'message/rfc822')) { + return self::getRawPartText( + substr($rawtext, $curr_pos + 1), + $type, + $id + ); + } + + $base_pos = strpos($id, '.'); + $orig_id = $id; + + if ($base_pos !== false) { + $id = substr($id, $base_pos + 1); + $base_pos = substr($orig_id, 0, $base_pos); + } else { + $base_pos = $id; + $id = 0; + } + + if ($ct && !isset($ct->params['boundary'])) { + if ($orig_id == '1') { + return substr($rawtext, $curr_pos + 1); + } + + throw new Horde_Mime_Exception('Could not find MIME part.'); + } + + $b_find = self::_findBoundary( + $rawtext, + $curr_pos, + $ct->params['boundary'], + $base_pos + ); + + if (!isset($b_find[$base_pos])) { + throw new Horde_Mime_Exception('Could not find MIME part.'); + } + + return self::getRawPartText( + substr( + $rawtext, + $b_find[$base_pos]['start'], + $b_find[$base_pos]['length'] - 1 + ), + $type, + $id + ); + } + + /** + * Find the location of the end of the header text. + * + * @param string $text The text to search. + * @param string $eol The EOL string. + * + * @return integer Header position. + */ + protected static function _findHeader($text, $eol) + { + $hdr_pos = strpos($text, $eol . $eol); + return ($hdr_pos === false) + ? strlen($text) + : $hdr_pos; + } + + /** + * Find the location of the next boundary string. + * + * @param string $text The text to search. + * @param integer $pos The current position in $text. + * @param string $boundary The boundary string. + * @param integer $end If set, return after matching this many + * boundaries. + * + * @return array Keys are the boundary number, values are an array with + * two elements: 'start' and 'length'. + */ + protected static function _findBoundary($text, $pos, $boundary, + $end = null) + { + $i = 0; + $out = array(); + + $search = "--" . $boundary; + $search_len = strlen($search); + + while (($pos = strpos($text, $search, $pos)) !== false) { + /* Boundary needs to appear at beginning of string or right after + * a LF. */ + if (($pos != 0) && ($text[$pos - 1] != "\n")) { + continue; + } + + if (isset($out[$i])) { + $out[$i]['length'] = $pos - $out[$i]['start'] - 1; + } + + if (!is_null($end) && ($end == $i)) { + break; + } + + $pos += $search_len; + if (isset($text[$pos])) { + switch ($text[$pos]) { + case "\r": + $pos += 2; + $out[++$i] = array('start' => $pos); + break; + + case "\n": + $out[++$i] = array('start' => ++$pos); + break; + + case '-': + return $out; + } + } + } + + return $out; + } + + /** + * Re-enocdes message/rfc822 parts in case there was e.g., some broken + * line length in the headers of the message in the part. Since we shouldn't + * alter the original message in any way, we simply reset cause the part to + * be encoded as base64 and sent as a application/octet part. + */ + protected function _sanityCheckRfc822Attachments() + { + if ($this->getType() == 'message/rfc822') { + $this->_reEncodeMessageAttachment($this); + return; + } + foreach ($this->getParts() as $part) { + if ($part->getType() == 'message/rfc822') { + $this->_reEncodeMessageAttachment($part); + } + } + return; + } + + /** + * Rebuilds $part and forces it to be a base64 encoded + * application/octet-stream part. + * + * @param Horde_Mime_Part $part The MIME part. + */ + protected function _reEncodeMessageAttachment(Horde_Mime_Part $part) + { + $new_part = Horde_Mime_Part::parseMessage($part->getContents()); + $part->setContents($new_part->getContents(array('stream' => true)), array('encoding' => self::ENCODE_BINARY)); + $part->setTransferEncoding('base64', array('send' => true)); + } + + /* ArrayAccess methods. */ + + /** + */ + public function offsetExists($offset) + { + return ($this[$offset] !== null); + } + + /** + */ + public function offsetGet($offset) + { + $this->_reindex(); + + if (strcmp($offset, $this->getMimeId()) === 0) { + $this->parent = null; + return $this; + } + + foreach ($this->_parts as $val) { + if (strcmp($offset, $val->getMimeId()) === 0) { + $val->parent = $this; + return $val; + } + + if ($found = $val[$offset]) { + return $found; + } + } + + return null; + } + + /** + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->_parts[] = $value; + $this->_status |= self::STATUS_REINDEX; + } elseif ($part = $this[$offset]) { + if ($part->parent === $this) { + if (($k = array_search($part, $this->_parts, true)) !== false) { + $value->setMimeId($part->getMimeId()); + $this->_parts[$k] = $value; + } + } else { + $this->parent[$offset] = $value; + } + } + } + + /** + */ + public function offsetUnset($offset) + { + if ($part = $this[$offset]) { + if ($part->parent === $this) { + if (($k = array_search($part, $this->_parts, true)) !== false) { + unset($this->_parts[$k]); + $this->_parts = array_values($this->_parts); + } + } else { + unset($part->parent[$offset]); + } + $this->_status |= self::STATUS_REINDEX; + } + } + + /* Countable methods. */ + + /** + * Returns the number of child message parts (doesn't include + * grandchildren or more remote ancestors). + * + * @return integer Number of message parts. + */ + public function count() + { + return count($this->_parts); + } + + /* RecursiveIterator methods. */ + + /** + * @since 2.8.0 + */ + public function current() + { + return (($key = $this->key()) === null) + ? null + : $this->getPartByIndex($key); + } + + /** + * @since 2.8.0 + */ + public function key() + { + return (isset($this->_temp['iterate']) && isset($this->_parts[$this->_temp['iterate']])) + ? $this->_temp['iterate'] + : null; + } + + /** + * @since 2.8.0 + */ + public function next() + { + ++$this->_temp['iterate']; + } + + /** + * @since 2.8.0 + */ + public function rewind() + { + $this->_reindex(); + reset($this->_parts); + $this->_temp['iterate'] = key($this->_parts); + } + + /** + * @since 2.8.0 + */ + public function valid() + { + return ($this->key() !== null); + } + + /** + * @since 2.8.0 + */ + public function hasChildren() + { + return (($curr = $this->current()) && count($curr)); + } + + /** + * @since 2.8.0 + */ + public function getChildren() + { + return $this->current(); + } + + /* Serializable methods. */ + + /** + * Serialization. + * + * @return string Serialized data. + */ + public function serialize() + { + $data = array( + // Serialized data ID. + self::VERSION, + $this->_bytes, + $this->_eol, + $this->_hdrCharset, + $this->_headers, + $this->_metadata, + $this->_mimeid, + $this->_parts, + $this->_status, + $this->_transferEncoding + ); + + if (!empty($this->_contents)) { + $data[] = $this->_readStream($this->_contents); + } + + return serialize($data); + } + + /** + * Unserialization. + * + * @param string $data Serialized data. + * + * @throws Exception + */ + public function unserialize($data) + { + $data = @unserialize($data); + if (!is_array($data) || + !isset($data[0]) || + ($data[0] != self::VERSION)) { + switch ($data[0]) { + case 1: + $convert = new Horde_Mime_Part_Upgrade_V1($data); + $data = $convert->data; + break; + + default: + $data = null; + break; + } + + if (is_null($data)) { + throw new Exception('Cache version change'); + } + } + + $key = 0; + $this->_bytes = $data[++$key]; + $this->_eol = $data[++$key]; + $this->_hdrCharset = $data[++$key]; + $this->_headers = $data[++$key]; + $this->_metadata = $data[++$key]; + $this->_mimeid = $data[++$key]; + $this->_parts = $data[++$key]; + $this->_status = $data[++$key]; + $this->_transferEncoding = $data[++$key]; + + if (isset($data[++$key])) { + $this->setContents($data[$key]); + } + } + + /* Deprecated elements. */ + + /** + * @deprecated + */ + const UNKNOWN = 'x-unknown'; + + /** + * @deprecated + */ + public static $encodingTypes = array( + '7bit', '8bit', 'base64', 'binary', 'quoted-printable', + // Non-RFC types, but old mailers may still use + 'uuencode', 'x-uuencode', 'x-uue' + ); + + /** + * @deprecated + */ + public static $mimeTypes = array( + 'text', 'multipart', 'message', 'application', 'audio', 'image', + 'video', 'model' + ); + + /** + * @deprecated Use setContentTypeParameter with a null $data value. + */ + public function clearContentTypeParameter($label) + { + $this->setContentTypeParam($label, null); + } + + /** + * @deprecated Use iterator instead. + */ + public function contentTypeMap($sort = true) + { + $map = array(); + + foreach ($this->partIterator() as $val) { + $map[$val->getMimeId()] = $val->getType(); + } + + return $map; + } + + /** + * @deprecated Use array access instead. + */ + public function addPart($mime_part) + { + $this[] = $mime_part; + } + + /** + * @deprecated Use array access instead. + */ + public function getPart($id) + { + return $this[$id]; + } + + /** + * @deprecated Use array access instead. + */ + public function alterPart($id, $mime_part) + { + $this[$id] = $mime_part; + } + + /** + * @deprecated Use array access instead. + */ + public function removePart($id) + { + unset($this[$id]); + } + +} diff --git a/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mime/Horde/Mime/Part/Iterator.php b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mime/Horde/Mime/Part/Iterator.php new file mode 100644 index 00000000..5904a54e --- /dev/null +++ b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mime/Horde/Mime/Part/Iterator.php @@ -0,0 +1,137 @@ + + * @category Horde + * @copyright 2015-2017 Horde LLC + * @license http://www.horde.org/licenses/lgpl21 LGPL 2.1 + * @package Mime + * @since 2.9.0 + */ +class Horde_Mime_Part_Iterator +implements Countable, Iterator +{ + /** + * Include the base when iterating? + * + * @var boolean + */ + protected $_includeBase; + + /** + * Base part. + * + * @var Horde_Mime_Part + */ + protected $_part; + + /** + * State data. + * + * @var object + */ + protected $_state; + + /** + * Constructor. + */ + public function __construct(Horde_Mime_Part $part, $base = false) + { + $this->_includeBase = (bool)$base; + $this->_part = $part; + } + + /* Countable methods. */ + + /** + * Returns the number of message parts. + * + * @return integer Number of message parts. + */ + public function count() + { + return count(iterator_to_array($this)); + } + + /* RecursiveIterator methods. */ + + /** + */ + public function current() + { + return $this->valid() + ? $this->_state->current + : null; + } + + /** + */ + public function key() + { + return ($curr = $this->current()) + ? $curr->getMimeId() + : null; + } + + /** + */ + public function next() + { + if (!isset($this->_state)) { + return; + } + + $out = $this->_state->current->getPartByIndex($this->_state->index++); + + if ($out) { + $this->_state->recurse[] = array( + $this->_state->current, + $this->_state->index + ); + $this->_state->current = $out; + $this->_state->index = 0; + } elseif ($tmp = array_pop($this->_state->recurse)) { + $this->_state->current = $tmp[0]; + $this->_state->index = $tmp[1]; + $this->next(); + } else { + unset($this->_state); + } + } + + /** + */ + public function rewind() + { + $this->_state = new stdClass; + $this->_state->current = $this->_part; + $this->_state->index = 0; + $this->_state->recurse = array(); + + if (!$this->_includeBase) { + $this->next(); + } + } + + /** + */ + public function valid() + { + return !empty($this->_state); + } + +} diff --git a/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mime/Horde/Mime/Part/Upgrade/V1.php b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mime/Horde/Mime/Part/Upgrade/V1.php new file mode 100644 index 00000000..f1e660bb --- /dev/null +++ b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mime/Horde/Mime/Part/Upgrade/V1.php @@ -0,0 +1,118 @@ + + * @category Horde + * @copyright 2015-2017 Horde LLC + * @license http://www.horde.org/licenses/lgpl21 LGPL 2.1 + * @package Mime + * @since 2.8.0 + */ +class Horde_Mime_Part_Upgrade_V1 +{ + /** + * Converted data. + * + * @var array + */ + public $data = null; + + /** + * Constructor. + * + * @param array $data V1 data. + */ + public function __construct($data) + { + // Version number + array_shift($data); + + $d = array(); + + $type = array_shift($data); + $subtype = array_shift($data); + + $ct = Horde_Mime_Headers_ContentParam_ContentType::create(); + $d[4] = new Horde_Mime_Headers(); + $d[4]->addHeaderOb($ct); + $ct->setContentParamValue($type . '/' . $subtype); + + $d[9] = array_shift($data); + + if ($lang = array_shift($data)) { + $d[4]->addHeaderOb( + new Horde_Mime_Headers_ContentLanguage('', $lang) + ); + } + + if ($cd = array_shift($data)) { + $hdr = new Horde_Mime_Headers_ContentDescription(null, ''); + $d[4]->addHeaderOb($hdr); + $hdr->setValue($cd); + } + + $cd = new Horde_Mime_Headers_ContentParam_ContentDisposition(null, ''); + $d[4]->addHeaderOb($cd); + $cd->setContentParamValue(array_shift($data)); + + foreach (array_shift($data) as $key => $val) { + $cd[$key] = $val; + } + + foreach (array_shift($data) as $key => $val) { + $ct[$key] = $val; + } + + $d[7] = array_shift($data); + $d[6] = array_shift($data); + $d[2] = array_shift($data); + $d[5] = array_shift($data); + + if ($boundary = array_shift($data)) { + $ct['boundary'] = $boundary; + } + + $d[1] = array_shift($data); + + if ($cid = array_shift($data)) { + $hdr = new Horde_Mime_Headers_ContentId(null, $cid); + $d[4]->addHeaderOb($hdr); + } + + if ($cd = array_shift($data)) { + $hdr = new Horde_Mime_Headers_Element_Single('Content-Duration', ''); + $d[4]->addHeaderOb($hdr); + $hdr->setValue($cd); + } + + $d[8] = 0; + if (array_shift($data)) { + $d[8] |= STATUS_REINDEX; + } + if (array_shift($data)) { + $d[8] |= STATUS_BASEPART; + } + + $d[3] = array_shift($data); + + if (count($data)) { + $d[10] = reset($data); + } + + $this->data = $d; + } + +} diff --git a/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mime/Horde/Mime/QuotedPrintable.php b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mime/Horde/Mime/QuotedPrintable.php new file mode 100644 index 00000000..04d078ce --- /dev/null +++ b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mime/Horde/Mime/QuotedPrintable.php @@ -0,0 +1,67 @@ + + * @category Horde + * @copyright 2014-2017 Horde LLC + * @license http://www.horde.org/licenses/lgpl21 LGPL 2.1 + * @package Mime + * @since 2.5.0 + */ +class Horde_Mime_QuotedPrintable +{ + /** + * Decodes quoted-printable data. + * + * @param string $data The Q-P data to decode. + * + * @return string The decoded text. + */ + public static function decode($data) + { + return quoted_printable_decode($data); + } + + /** + * Encodes text via quoted-printable encoding. + * + * @param string $text The text to encode (UTF-8). + * @param string $eol The EOL sequence to use. + * @param integer $wrap Wrap a line at this many characters. + * + * @return string The quoted-printable encoded string. + */ + public static function encode($text, $eol = "\n", $wrap = 76) + { + $fp = fopen('php://temp', 'r+'); + stream_filter_append( + $fp, + 'convert.quoted-printable-encode', + STREAM_FILTER_WRITE, + array( + 'line-break-chars' => $eol, + 'line-length' => $wrap + ) + ); + fwrite($fp, $text); + rewind($fp); + $out = stream_get_contents($fp); + fclose($fp); + + return $out; + } + +} diff --git a/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mime/Horde/Mime/Related.php b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mime/Horde/Mime/Related.php new file mode 100644 index 00000000..e7632dd4 --- /dev/null +++ b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mime/Horde/Mime/Related.php @@ -0,0 +1,161 @@ + + * @category Horde + * @copyright 2012-2017 Horde LLC + * @license http://www.horde.org/licenses/lgpl21 LGPL 2.1 + * @package Mime + */ +class Horde_Mime_Related implements IteratorAggregate +{ + /** + * Content IDs. + * + * @var array + */ + protected $_cids = array(); + + /** + * Start ID. + * + * @var string + */ + protected $_start; + + /** + * Constructor. + * + * @param Horde_Mime_Part $mime_part A MIME part object. Must be of + * type multipart/related. + */ + public function __construct(Horde_Mime_Part $mime_part) + { + if ($mime_part->getType() != 'multipart/related') { + throw new InvalidArgumentException('MIME part must be of type multipart/related'); + } + + $id = null; + $ids = array(); + $related_id = $mime_part->getMimeId(); + + /* Build a list of parts -> CIDs. */ + foreach ($mime_part->partIterator() as $val) { + $part_id = $val->getMimeId(); + $ids[] = $part_id; + + if ((strcmp($related_id, $part_id) !== 0) && + ($cid = $val->getContentId())) { + $this->_cids[$part_id] = $cid; + } + } + + /* Look at the 'start' parameter to determine which part to start + * with. If no 'start' parameter, use the first part (RFC 2387 + * [3.1]). */ + if ($start = $mime_part->getContentTypeParameter('start')) { + $id = $this->cidSearch(trim($start, '<> ')); + } + + if (empty($id)) { + reset($ids); + $id = next($ids); + } + + $this->_start = $id; + } + + /** + * Return the start ID. + * + * @return string The start ID. + */ + public function startId() + { + return $this->_start; + } + + /** + * Search for a CID in the related part. + * + * @param string $cid The CID to search for. + * + * @return string The MIME ID or false if not found. + */ + public function cidSearch($cid) + { + return array_search($cid, $this->_cids); + } + + /** + * Scan for CID strings in HTML data and replace with data returned from + * a callback method. + * + * @param mixed $text The HTML text (can be Horde_Domhtml object). + * @param callback $callback Callback method. Receives three arguments: + * MIME ID, the attribute name containing the + * content ID, and the node object. Expects + * return value of URL to display the data. + * @param string $charset HTML data charset. + * + * @return Horde_Domhtml A Horde_Domhtml object. + */ + public function cidReplace($text, $callback, $charset = 'UTF-8') + { + $dom = ($text instanceof Horde_Domhtml) + ? $text + : new Horde_Domhtml($text, $charset); + + foreach ($dom as $node) { + if ($node instanceof DOMElement) { + switch (Horde_String::lower($node->tagName)) { + case 'body': + case 'td': + $this->_cidReplace($node, 'background', $callback); + break; + + case 'img': + $this->_cidReplace($node, 'src', $callback); + break; + } + } + } + + return $dom; + } + + /** + */ + protected function _cidReplace($node, $attribute, $callback) + { + if ($node->hasAttribute($attribute)) { + $val = $node->getAttribute($attribute); + if ((strpos($val, 'cid:') === 0) && + ($id = $this->cidSearch(substr($val, 4)))) { + $node->setAttribute($attribute, call_user_func($callback, $id, $attribute, $node)); + } + } + } + + /* IteratorAggregate method. */ + + public function getIterator() + { + return new ArrayIterator($this->_cids); + } + +} diff --git a/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mime/Horde/Mime/Translation.php b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mime/Horde/Mime/Translation.php new file mode 100644 index 00000000..fa2e6703 --- /dev/null +++ b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mime/Horde/Mime/Translation.php @@ -0,0 +1,38 @@ + + * @category Horde + * @copyright 2010-2017 Horde LLC + * @license http://www.horde.org/licenses/lgpl21 LGPL 2.1 + * @package Mime + */ +class Horde_Mime_Translation extends Horde_Translation_Autodetect +{ + /** + * The translation domain + * + * @var string + */ + protected static $_domain = 'Horde_Mime'; + + /** + * The absolute PEAR path to the translations for the default gettext handler. + * + * @var string + */ + protected static $_pearDirectory = '/daten/dev/lam/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mime/data'; +} diff --git a/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mime/Horde/Mime/Uudecode.php b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mime/Horde/Mime/Uudecode.php new file mode 100644 index 00000000..01f85c1d --- /dev/null +++ b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mime/Horde/Mime/Uudecode.php @@ -0,0 +1,129 @@ +, Arpad Ray + * @license http://www.horde.org/licenses/lgpl21 LGPL 2.1 + * @package Mime + */ + +/** + * Class used to uudecode data. + * + * Needed because PHP's built-in uudecode() method is broken. + * + * @author Chuck Hagenbuch + * @author Aidan Lister + * @author Michael Slusarz + * @author Michael Wallner + * @category Horde + * @copyright 2009-2017 Horde LLC + * @copyright 2004-2007 Aidan Lister , Arpad Ray + * @license http://www.horde.org/licenses/lgpl21 LGPL 2.1 + * @package Mime + * @since 2.5.0 + */ +class Horde_Mime_Uudecode implements Countable, IteratorAggregate +{ + const UUENCODE_REGEX = "/begin ([0-7]{3}) (.+)\r?\n(.+)\r?\nend/Us"; + + /** + * Uudecode data. + * + * A list of arrays, with each array corresponding to a file in the input + * and containing the following keys: + * - data: (string) Unencoded data. + * - name: (string) Filename. + * - perms: (string) Octal permissions. + * + * @var array + */ + protected $_data = array(); + + /** + * Scans $input for uuencoded data and converts it to unencoded data. + * + * @param string $input The input data + */ + public function __construct($input) + { + /* Find all uuencoded sections. */ + if (preg_match_all(self::UUENCODE_REGEX, $input, $matches, PREG_SET_ORDER)) { + foreach ($matches as $v) { + $this->_data[] = array( + 'data' => $this->_uudecode($v[3]), + 'name' => $v[2], + 'perm' => $v[1] + ); + } + } + } + + /** + * PHP 5's built-in convert_uudecode() is broken. Need this wrapper. + * + * @param string $input UUencoded input. + * + * @return string Decoded string. + */ + protected function _uudecode($input) + { + $decoded = ''; + + foreach (explode("\n", $input) as $line) { + $c = count($bytes = unpack('c*', substr(trim($line,"\r\n\t"), 1))); + + while ($c % 4) { + $bytes[++$c] = 0; + } + + foreach (array_chunk($bytes, 4) as $b) { + $b0 = ($b[0] == 0x60) ? 0 : $b[0] - 0x20; + $b1 = ($b[1] == 0x60) ? 0 : $b[1] - 0x20; + $b2 = ($b[2] == 0x60) ? 0 : $b[2] - 0x20; + $b3 = ($b[3] == 0x60) ? 0 : $b[3] - 0x20; + + $b0 <<= 2; + $b0 |= ($b1 >> 4) & 0x03; + $b1 <<= 4; + $b1 |= ($b2 >> 2) & 0x0F; + $b2 <<= 6; + $b2 |= $b3 & 0x3F; + + $decoded .= pack('c*', $b0, $b1, $b2); + } + } + + return rtrim($decoded, "\0"); + } + + /* Countable method. */ + + public function count() + { + return count($this->_data); + } + + /* IteratorAggregate method. */ + + public function getIterator() + { + return new ArrayIterator($this->_data); + } + +} diff --git a/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mime/Horde/Mime/mime.mapping.php b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mime/Horde/Mime/mime.mapping.php new file mode 100644 index 00000000..0d3ec85a --- /dev/null +++ b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mime/Horde/Mime/mime.mapping.php @@ -0,0 +1,1445 @@ +' where is the unknown file extension. + * + * Generated: 12/04/14 00:15:12 by slusarz on bigworm.curecanti.org + * + * @category Horde + * @package Mime + */ +$mime_extension_map = array( + '__MAXPERIOD__' => '1', + '3dml' => 'text/vnd.in3d.3dml', + '3ds' => 'image/x-3ds', + '3g2' => 'video/3gpp2', + '3ga' => 'video/3gpp', + '3gp' => 'video/3gpp', + '3gp2' => 'video/3gpp2', + '3gpp' => 'video/3gpp', + '3gpp2' => 'video/3gpp2', + '7z' => 'application/x-7z-compressed', + 'C' => 'text/x-c++src', + 'Z' => 'application/x-compress', + 'a' => 'application/x-archive', + 'aab' => 'application/x-authorware-bin', + 'aac' => 'audio/x-aac', + 'aam' => 'application/x-authorware-map', + 'aas' => 'application/x-authorware-seg', + 'abw' => 'application/x-abiword', + 'abw.crashed' => 'application/x-abiword', + 'abw.gz' => 'application/x-abiword', + 'ac' => 'application/pkix-attr-cert', + 'ac3' => 'audio/ac3', + 'acc' => 'application/vnd.americandynamics.acc', + 'ace' => 'application/x-ace-compressed', + 'acu' => 'application/vnd.acucobol', + 'acutc' => 'application/vnd.acucorp', + 'adb' => 'text/x-adasrc', + 'adp' => 'audio/adpcm', + 'ads' => 'text/x-adasrc', + 'aep' => 'application/vnd.audiograph', + 'afm' => 'application/x-font-type1', + 'afp' => 'application/vnd.ibm.modcap', + 'ag' => 'image/x-applix-graphics', + 'ahead' => 'application/vnd.ahead.space', + 'ai' => 'application/postscript', + 'aif' => 'audio/x-aiff', + 'aifc' => 'audio/x-aiff', + 'aiff' => 'audio/x-aiff', + 'aiffc' => 'audio/x-aifc', + 'air' => 'application/vnd.adobe.air-application-installer-package+zip', + 'ait' => 'application/vnd.dvb.ait', + 'al' => 'application/x-perl', + 'alz' => 'application/x-alz', + 'ami' => 'application/vnd.amiga.ami', + 'amr' => 'audio/AMR', + 'amz' => 'audio/x-amzxml', + 'ani' => 'application/x-navi-animation', + 'anx' => 'application/annodex', + 'ape' => 'audio/x-ape', + 'apk' => 'application/vnd.android.package-archive', + 'appcache' => 'text/cache-manifest', + 'application' => 'application/x-ms-application', + 'apr' => 'application/vnd.lotus-approach', + 'ar' => 'application/x-archive', + 'arc' => 'application/x-freearc', + 'arj' => 'application/x-arj', + 'arw' => 'image/x-sony-arw', + 'as' => 'application/x-applix-spreadsheet', + 'asc' => 'application/pgp-signature', + 'asf' => 'video/x-ms-asf', + 'asm' => 'text/x-asm', + 'aso' => 'application/vnd.accpac.simply.aso', + 'asp' => 'application/x-asp', + 'ass' => 'text/x-ssa', + 'asx' => 'video/x-ms-asf', + 'atc' => 'application/vnd.acucorp', + 'atom' => 'application/atom+xml', + 'atomcat' => 'application/atomcat+xml', + 'atomsvc' => 'application/atomsvc+xml', + 'atx' => 'application/vnd.antix.game-component', + 'au' => 'audio/basic', + 'avf' => 'video/x-msvideo', + 'avi' => 'video/x-msvideo', + 'aw' => 'application/applixware', + 'awb' => 'audio/AMR-WB', + 'awk' => 'application/x-awk', + 'axa' => 'audio/annodex', + 'axv' => 'video/annodex', + 'azf' => 'application/vnd.airzip.filesecure.azf', + 'azs' => 'application/vnd.airzip.filesecure.azs', + 'azw' => 'application/vnd.amazon.ebook', + 'bak' => 'application/x-trash', + 'bat' => 'application/x-msdownload', + 'bcpio' => 'application/x-bcpio', + 'bdf' => 'application/x-font-bdf', + 'bdm' => 'application/vnd.syncml.dm+wbxml', + 'bdmv' => 'video/mp2t', + 'bed' => 'application/vnd.realvnc.bed', + 'bh2' => 'application/vnd.fujitsu.oasysprs', + 'bib' => 'text/x-bibtex', + 'bin' => 'application/octet-stream', + 'blb' => 'application/x-blorb', + 'blend' => 'application/x-blender', + 'blender' => 'application/x-blender', + 'blorb' => 'application/x-blorb', + 'bmi' => 'application/vnd.bmi', + 'bmp' => 'image/bmp', + 'book' => 'application/vnd.framemaker', + 'box' => 'application/vnd.previewsystems.box', + 'boz' => 'application/x-bzip2', + 'bpk' => 'application/octet-stream', + 'btif' => 'image/prs.btif', + 'bz' => 'application/x-bzip', + 'bz2' => 'application/x-bzip2', + 'c' => 'text/x-c', + 'c++' => 'text/x-c++src', + 'c11amc' => 'application/vnd.cluetrust.cartomobile-config', + 'c11amz' => 'application/vnd.cluetrust.cartomobile-config-pkg', + 'c4d' => 'application/vnd.clonk.c4group', + 'c4f' => 'application/vnd.clonk.c4group', + 'c4g' => 'application/vnd.clonk.c4group', + 'c4p' => 'application/vnd.clonk.c4group', + 'c4u' => 'application/vnd.clonk.c4group', + 'cab' => 'application/vnd.ms-cab-compressed', + 'caf' => 'audio/x-caf', + 'cap' => 'application/vnd.tcpdump.pcap', + 'car' => 'application/vnd.curl.car', + 'cat' => 'application/vnd.ms-pki.seccat', + 'cb7' => 'application/x-cbr', + 'cba' => 'application/x-cbr', + 'cbl' => 'text/x-cobol', + 'cbr' => 'application/x-cbr', + 'cbt' => 'application/x-cbr', + 'cbz' => 'application/x-cbr', + 'cc' => 'text/x-c', + 'ccmx' => 'application/x-ccmx', + 'cct' => 'application/x-director', + 'ccxml' => 'application/ccxml+xml', + 'cdbcmsg' => 'application/vnd.contact.cmsg', + 'cdf' => 'application/x-netcdf', + 'cdkey' => 'application/vnd.mediastation.cdkey', + 'cdmia' => 'application/cdmi-capability', + 'cdmic' => 'application/cdmi-container', + 'cdmid' => 'application/cdmi-domain', + 'cdmio' => 'application/cdmi-object', + 'cdmiq' => 'application/cdmi-queue', + 'cdr' => 'application/vnd.corel-draw', + 'cdx' => 'chemical/x-cdx', + 'cdxml' => 'application/vnd.chemdraw+xml', + 'cdy' => 'application/vnd.cinderella', + 'cer' => 'application/pkix-cert', + 'cert' => 'application/x-x509-ca-cert', + 'cfs' => 'application/x-cfs-compressed', + 'cgm' => 'image/cgm', + 'chat' => 'application/x-chat', + 'chm' => 'application/vnd.ms-htmlhelp', + 'chrt' => 'application/vnd.kde.kchart', + 'cif' => 'chemical/x-cif', + 'cii' => 'application/vnd.anser-web-certificate-issue-initiation', + 'cil' => 'application/vnd.ms-artgalry', + 'cla' => 'application/vnd.claymore', + 'class' => 'application/java-vm', + 'clkk' => 'application/vnd.crick.clicker.keyboard', + 'clkp' => 'application/vnd.crick.clicker.palette', + 'clkt' => 'application/vnd.crick.clicker.template', + 'clkw' => 'application/vnd.crick.clicker.wordbank', + 'clkx' => 'application/vnd.crick.clicker', + 'clp' => 'application/x-msclip', + 'clpi' => 'video/mp2t', + 'cls' => 'text/x-tex', + 'cmake' => 'text/x-cmake', + 'cmc' => 'application/vnd.cosmocaller', + 'cmdf' => 'chemical/x-cmdf', + 'cml' => 'chemical/x-cml', + 'cmp' => 'application/vnd.yellowriver-custom-menu', + 'cmx' => 'image/x-cmx', + 'cob' => 'text/x-cobol', + 'cod' => 'application/vnd.rim.cod', + 'com' => 'application/x-msdownload', + 'conf' => 'text/plain', + 'cpi' => 'video/mp2t', + 'cpio' => 'application/x-cpio', + 'cpio.gz' => 'application/x-cpio-compressed', + 'cpp' => 'text/x-c', + 'cpt' => 'application/mac-compactpro', + 'cr2' => 'image/x-canon-cr2', + 'crd' => 'application/x-mscardfile', + 'crl' => 'application/pkix-crl', + 'crt' => 'application/x-x509-ca-cert', + 'crw' => 'image/x-canon-crw', + 'cryptonote' => 'application/vnd.rig.cryptonote', + 'cs' => 'text/x-csharp', + 'csh' => 'application/x-csh', + 'csml' => 'chemical/x-csml', + 'csp' => 'application/vnd.commonspace', + 'css' => 'text/css', + 'cst' => 'application/x-director', + 'csv' => 'text/csv', + 'cu' => 'application/cu-seeme', + 'cue' => 'application/x-cue', + 'cur' => 'image/x-win-bitmap', + 'curl' => 'text/vnd.curl', + 'cww' => 'application/prs.cww', + 'cxt' => 'application/x-director', + 'cxx' => 'text/x-c', + 'd' => 'text/x-dsrc', + 'dae' => 'model/vnd.collada+xml', + 'daf' => 'application/vnd.mobius.daf', + 'dar' => 'application/x-dar', + 'dart' => 'application/vnd.dart', + 'dataless' => 'application/vnd.fdsn.seed', + 'davmount' => 'application/davmount+xml', + 'dbf' => 'application/x-dbf', + 'dbk' => 'application/docbook+xml', + 'dc' => 'application/x-dc-rom', + 'dcl' => 'text/x-dcl', + 'dcm' => 'application/dicom', + 'dcr' => 'application/x-director', + 'dcurl' => 'text/vnd.curl.dcurl', + 'dd2' => 'application/vnd.oma.dd2+xml', + 'ddd' => 'application/vnd.fujixerox.ddd', + 'dds' => 'image/x-dds', + 'deb' => 'application/x-debian-package', + 'def' => 'text/plain', + 'deploy' => 'application/octet-stream', + 'der' => 'application/x-x509-ca-cert', + 'desktop' => 'application/x-desktop', + 'dfac' => 'application/vnd.dreamfactory', + 'dgc' => 'application/x-dgc-compressed', + 'di' => 'text/x-dsrc', + 'dia' => 'application/x-dia-diagram', + 'dic' => 'text/x-c', + 'diff' => 'text/diff', + 'dir' => 'application/x-director', + 'dis' => 'application/vnd.mobius.dis', + 'dist' => 'application/octet-stream', + 'distz' => 'application/octet-stream', + 'divx' => 'video/x-msvideo', + 'djv' => 'image/vnd.djvu', + 'djvu' => 'image/vnd.djvu', + 'dll' => 'application/x-msdownload', + 'dmg' => 'application/x-apple-diskimage', + 'dmp' => 'application/vnd.tcpdump.pcap', + 'dms' => 'application/octet-stream', + 'dna' => 'application/vnd.dna', + 'dng' => 'image/x-adobe-dng', + 'doc' => 'application/msword', + 'docbook' => 'application/x-docbook+xml', + 'docm' => 'application/vnd.ms-word.document.macroenabled.12', + 'docx' => 'application/vnd.openxmlformats-officedocument.wordprocessingml.document', + 'dot' => 'application/msword', + 'dotm' => 'application/vnd.ms-word.template.macroenabled.12', + 'dotx' => 'application/vnd.openxmlformats-officedocument.wordprocessingml.template', + 'dp' => 'application/vnd.osgi.dp', + 'dpg' => 'application/vnd.dpgraph', + 'dra' => 'audio/vnd.dra', + 'dsc' => 'text/prs.lines.tag', + 'dsl' => 'text/x-dsl', + 'dssc' => 'application/dssc+der', + 'dtb' => 'application/x-dtbook+xml', + 'dtd' => 'application/xml-dtd', + 'dts' => 'audio/vnd.dts', + 'dtshd' => 'audio/vnd.dts.hd', + 'dtx' => 'text/x-tex', + 'dump' => 'application/octet-stream', + 'dv' => 'video/dv', + 'dvb' => 'video/vnd.dvb.file', + 'dvi' => 'application/x-dvi', + 'dvi.bz2' => 'application/x-bzdvi', + 'dvi.gz' => 'application/x-gzdvi', + 'dwf' => 'model/vnd.dwf', + 'dwg' => 'image/vnd.dwg', + 'dxf' => 'image/vnd.dxf', + 'dxp' => 'application/vnd.spotfire.dxp', + 'dxr' => 'application/x-director', + 'e' => 'text/x-eiffel', + 'ecelp4800' => 'audio/vnd.nuera.ecelp4800', + 'ecelp7470' => 'audio/vnd.nuera.ecelp7470', + 'ecelp9600' => 'audio/vnd.nuera.ecelp9600', + 'ecma' => 'application/ecmascript', + 'edm' => 'application/vnd.novadigm.edm', + 'edx' => 'application/vnd.novadigm.edx', + 'efif' => 'application/vnd.picsel', + 'egon' => 'application/x-egon', + 'ei6' => 'application/vnd.pg.osasli', + 'eif' => 'text/x-eiffel', + 'el' => 'text/x-emacs-lisp', + 'elc' => 'application/octet-stream', + 'emf' => 'application/x-msmetafile', + 'eml' => 'message/rfc822', + 'emma' => 'application/emma+xml', + 'emp' => 'application/vnd.emusic-emusic_package', + 'emz' => 'application/x-msmetafile', + 'ent' => 'application/xml-external-parsed-entity', + 'eol' => 'audio/vnd.digital-winds', + 'eot' => 'application/vnd.ms-fontobject', + 'eps' => 'application/postscript', + 'eps.bz2' => 'image/x-bzeps', + 'eps.gz' => 'image/x-gzeps', + 'epsf' => 'image/x-eps', + 'epsf.bz2' => 'image/x-bzeps', + 'epsf.gz' => 'image/x-gzeps', + 'epsi' => 'image/x-eps', + 'epsi.bz2' => 'image/x-bzeps', + 'epsi.gz' => 'image/x-gzeps', + 'epub' => 'application/epub+zip', + 'erl' => 'text/x-erlang', + 'es' => 'application/ecmascript', + 'es3' => 'application/vnd.eszigno3+xml', + 'esa' => 'application/vnd.osgi.subsystem', + 'esf' => 'application/vnd.epson.esf', + 'et3' => 'application/vnd.eszigno3+xml', + 'etheme' => 'application/x-e-theme', + 'etx' => 'text/x-setext', + 'eva' => 'application/x-eva', + 'evy' => 'application/x-envoy', + 'exe' => 'application/x-msdownload', + 'exi' => 'application/exi', + 'exr' => 'image/x-exr', + 'ext' => 'application/vnd.novadigm.ext', + 'ez' => 'application/andrew-inset', + 'ez2' => 'application/vnd.ezpix-album', + 'ez3' => 'application/vnd.ezpix-package', + 'f' => 'text/x-fortran', + 'f4a' => 'audio/mp4', + 'f4b' => 'audio/x-m4b', + 'f4v' => 'video/x-f4v', + 'f77' => 'text/x-fortran', + 'f90' => 'text/x-fortran', + 'f95' => 'text/x-fortran', + 'fb2' => 'application/x-fictionbook+xml', + 'fb2.zip' => 'application/x-zip-compressed-fb2', + 'fbs' => 'image/vnd.fastbidsheet', + 'fcdt' => 'application/vnd.adobe.formscentral.fcdt', + 'fcs' => 'application/vnd.isac.fcs', + 'fdf' => 'application/vnd.fdf', + 'fe_launch' => 'application/vnd.denovo.fcselayout-link', + 'fg5' => 'application/vnd.fujitsu.oasysgp', + 'fgd' => 'application/x-director', + 'fh' => 'image/x-freehand', + 'fh4' => 'image/x-freehand', + 'fh5' => 'image/x-freehand', + 'fh7' => 'image/x-freehand', + 'fhc' => 'image/x-freehand', + 'fig' => 'application/x-xfig', + 'fits' => 'image/fits', + 'fl' => 'application/x-fluid', + 'flac' => 'audio/x-flac', + 'flc' => 'video/x-flic', + 'fli' => 'video/x-fli', + 'flo' => 'application/vnd.micrografx.flo', + 'flv' => 'video/x-flv', + 'flw' => 'application/vnd.kde.kivio', + 'flx' => 'text/vnd.fmi.flexstor', + 'fly' => 'text/vnd.fly', + 'fm' => 'application/vnd.framemaker', + 'fnc' => 'application/vnd.frogans.fnc', + 'fo' => 'text/x-xslfo', + 'fodg' => 'application/vnd.oasis.opendocument.graphics-flat-xml', + 'fodp' => 'application/vnd.oasis.opendocument.presentation-flat-xml', + 'fods' => 'application/vnd.oasis.opendocument.spreadsheet-flat-xml', + 'fodt' => 'application/vnd.oasis.opendocument.text-flat-xml', + 'for' => 'text/x-fortran', + 'fpx' => 'image/vnd.fpx', + 'frame' => 'application/vnd.framemaker', + 'fsc' => 'application/vnd.fsc.weblaunch', + 'fst' => 'image/vnd.fst', + 'ftc' => 'application/vnd.fluxtime.clip', + 'fti' => 'application/vnd.anser-web-funds-transfer-initiation', + 'fvt' => 'video/vnd.fvt', + 'fxm' => 'video/x-javafx', + 'fxp' => 'application/vnd.adobe.fxp', + 'fxpl' => 'application/vnd.adobe.fxp', + 'fzs' => 'application/vnd.fuzzysheet', + 'g2w' => 'application/vnd.geoplan', + 'g3' => 'image/g3fax', + 'g3w' => 'application/vnd.geospace', + 'gac' => 'application/vnd.groove-account', + 'gam' => 'application/x-tads', + 'gb' => 'application/x-gameboy-rom', + 'gba' => 'application/x-gba-rom', + 'gbr' => 'application/rpki-ghostbusters', + 'gca' => 'application/x-gca-compressed', + 'gcrd' => 'text/vcard', + 'gdl' => 'model/vnd.gdl', + 'ged' => 'application/x-gedcom', + 'gedcom' => 'application/x-gedcom', + 'gem' => 'application/x-tar', + 'gen' => 'application/x-genesis-rom', + 'geo' => 'application/vnd.dynageo', + 'gex' => 'application/vnd.geometry-explorer', + 'gf' => 'application/x-tex-gf', + 'gg' => 'application/x-sms-rom', + 'ggb' => 'application/vnd.geogebra.file', + 'ggt' => 'application/vnd.geogebra.tool', + 'ghf' => 'application/vnd.groove-help', + 'gif' => 'image/gif', + 'gim' => 'application/vnd.groove-identity-message', + 'glade' => 'application/x-glade', + 'gml' => 'application/gml+xml', + 'gmo' => 'application/x-gettext-translation', + 'gmx' => 'application/vnd.gmx', + 'gnc' => 'application/x-gnucash', + 'gnd' => 'application/gnunet-directory', + 'gnucash' => 'application/x-gnucash', + 'gnumeric' => 'application/x-gnumeric', + 'gnuplot' => 'application/x-gnuplot', + 'go' => 'text/x-go', + 'gp' => 'application/x-gnuplot', + 'gpg' => 'application/pgp-encrypted', + 'gph' => 'application/vnd.flographit', + 'gplt' => 'application/x-gnuplot', + 'gpx' => 'application/gpx+xml', + 'gqf' => 'application/vnd.grafeq', + 'gqs' => 'application/vnd.grafeq', + 'gra' => 'application/x-graphite', + 'gram' => 'application/srgs', + 'gramps' => 'application/x-gramps-xml', + 'gre' => 'application/vnd.geometry-explorer', + 'grv' => 'application/vnd.groove-injector', + 'grxml' => 'application/srgs+xml', + 'gsf' => 'application/x-font-ghostscript', + 'gsm' => 'audio/x-gsm', + 'gtar' => 'application/x-gtar', + 'gtm' => 'application/vnd.groove-tool-message', + 'gtw' => 'model/vnd.gtw', + 'gv' => 'text/vnd.graphviz', + 'gvp' => 'text/x-google-video-pointer', + 'gxf' => 'application/gxf', + 'gxt' => 'application/vnd.geonext', + 'gz' => 'application/x-gzip', + 'h' => 'text/x-c', + 'h++' => 'text/x-c++hdr', + 'h261' => 'video/h261', + 'h263' => 'video/h263', + 'h264' => 'video/h264', + 'h4' => 'application/x-hdf', + 'h5' => 'application/x-hdf', + 'hal' => 'application/vnd.hal+xml', + 'hbci' => 'application/vnd.hbci', + 'hdf' => 'application/x-hdf', + 'hdf4' => 'application/x-hdf', + 'hdf5' => 'application/x-hdf', + 'hh' => 'text/x-c', + 'hlp' => 'application/winhlp', + 'hp' => 'text/x-c++hdr', + 'hpgl' => 'application/vnd.hp-hpgl', + 'hpid' => 'application/vnd.hp-hpid', + 'hpp' => 'text/x-c++hdr', + 'hps' => 'application/vnd.hp-hps', + 'hqx' => 'application/mac-binhex40', + 'hs' => 'text/x-haskell', + 'htke' => 'application/vnd.kenameaapp', + 'htm' => 'text/html', + 'html' => 'text/html', + 'hvd' => 'application/vnd.yamaha.hv-dic', + 'hvp' => 'application/vnd.yamaha.hv-voice', + 'hvs' => 'application/vnd.yamaha.hv-script', + 'hwp' => 'application/x-hwp', + 'hwt' => 'application/x-hwt', + 'hxx' => 'text/x-c++hdr', + 'i2g' => 'application/vnd.intergeo', + 'ica' => 'application/x-ica', + 'icb' => 'image/x-tga', + 'icc' => 'application/vnd.iccprofile', + 'ice' => 'x-conference/x-cooltalk', + 'icm' => 'application/vnd.iccprofile', + 'icns' => 'image/x-icns', + 'ico' => 'image/x-icon', + 'ics' => 'text/calendar', + 'idl' => 'text/x-idl', + 'ief' => 'image/ief', + 'ifb' => 'text/calendar', + 'iff' => 'image/x-ilbm', + 'ifm' => 'application/vnd.shana.informed.formdata', + 'iges' => 'model/iges', + 'igl' => 'application/vnd.igloader', + 'igm' => 'application/vnd.insors.igm', + 'igs' => 'model/iges', + 'igx' => 'application/vnd.micrografx.igx', + 'iif' => 'application/vnd.shana.informed.interchange', + 'ilbm' => 'image/x-ilbm', + 'ime' => 'text/x-iMelody', + 'img' => 'application/x-raw-disk-image', + 'img.xz' => 'application/x-raw-disk-image-xz-compressed', + 'imp' => 'application/vnd.accpac.simply.imp', + 'ims' => 'application/vnd.ms-ims', + 'imy' => 'text/x-iMelody', + 'in' => 'text/plain', + 'ink' => 'application/inkml+xml', + 'inkml' => 'application/inkml+xml', + 'ins' => 'text/x-tex', + 'install' => 'application/x-install-instructions', + 'iota' => 'application/vnd.astraea-software.iota', + 'ipfix' => 'application/ipfix', + 'ipk' => 'application/vnd.shana.informed.package', + 'iptables' => 'text/x-iptables', + 'irm' => 'application/vnd.ibm.rights-management', + 'irp' => 'application/vnd.irepository.package+xml', + 'iso' => 'application/x-iso9660-image', + 'iso9660' => 'application/x-cd-image', + 'it' => 'audio/x-it', + 'it87' => 'application/x-it87', + 'itp' => 'application/vnd.shana.informed.formtemplate', + 'ivp' => 'application/vnd.immervision-ivp', + 'ivu' => 'application/vnd.immervision-ivu', + 'jad' => 'text/vnd.sun.j2me.app-descriptor', + 'jam' => 'application/vnd.jam', + 'jar' => 'application/java-archive', + 'java' => 'text/x-java-source', + 'jceks' => 'application/x-java-jce-keystore', + 'jisp' => 'application/vnd.jisp', + 'jks' => 'application/x-java-keystore', + 'jlt' => 'application/vnd.hp-jlyt', + 'jng' => 'image/x-jng', + 'jnlp' => 'application/x-java-jnlp-file', + 'joda' => 'application/vnd.joost.joda-archive', + 'jp2' => 'image/jp2', + 'jpg' => 'image/jpeg', + 'jpeg' => 'image/jpeg', + 'jpf' => 'image/jp2', + 'jpe' => 'image/jpeg', + 'jpgm' => 'video/jpm', + 'jpgv' => 'video/jpeg', + 'jpm' => 'video/jpm', + 'jpr' => 'application/x-jbuilder-project', + 'jpx' => 'application/x-jbuilder-project', + 'js' => 'application/javascript', + 'jsm' => 'application/javascript', + 'json' => 'application/json', + 'jsonml' => 'application/jsonml+json', + 'k25' => 'image/x-kodak-k25', + 'kar' => 'audio/midi', + 'karbon' => 'application/vnd.kde.karbon', + 'kdc' => 'image/x-kodak-kdc', + 'kdelnk' => 'application/x-desktop', + 'kexi' => 'application/x-kexiproject-sqlite2', + 'kexic' => 'application/x-kexi-connectiondata', + 'kexis' => 'application/x-kexiproject-shortcut', + 'key' => 'application/x-iwork-keynote-sffkey', + 'kfo' => 'application/vnd.kde.kformula', + 'kia' => 'application/vnd.kidspiration', + 'kil' => 'application/x-killustrator', + 'kino' => 'application/smil', + 'kml' => 'application/vnd.google-earth.kml+xml', + 'kmz' => 'application/vnd.google-earth.kmz', + 'kne' => 'application/vnd.kinar', + 'knp' => 'application/vnd.kinar', + 'kon' => 'application/vnd.kde.kontour', + 'kpm' => 'application/x-kpovmodeler', + 'kpr' => 'application/vnd.kde.kpresenter', + 'kpt' => 'application/vnd.kde.kpresenter', + 'kpxx' => 'application/vnd.ds-keypoint', + 'kra' => 'application/x-krita', + 'ks' => 'application/x-java-keystore', + 'ksp' => 'application/vnd.kde.kspread', + 'ktr' => 'application/vnd.kahootz', + 'ktx' => 'image/ktx', + 'ktz' => 'application/vnd.kahootz', + 'kud' => 'application/x-kugar', + 'kwd' => 'application/vnd.kde.kword', + 'kwt' => 'application/vnd.kde.kword', + 'la' => 'application/x-shared-library-la', + 'lasxml' => 'application/vnd.las.las+xml', + 'latex' => 'application/x-latex', + 'lbd' => 'application/vnd.llamagraphics.life-balance.desktop', + 'lbe' => 'application/vnd.llamagraphics.life-balance.exchange+xml', + 'lbm' => 'image/x-ilbm', + 'ldif' => 'text/x-ldif', + 'les' => 'application/vnd.hhe.lesson-player', + 'lha' => 'application/x-lzh-compressed', + 'lhs' => 'text/x-literate-haskell', + 'lhz' => 'application/x-lhz', + 'link66' => 'application/vnd.route66.link66+xml', + 'list' => 'text/plain', + 'list3820' => 'application/vnd.ibm.modcap', + 'listafp' => 'application/vnd.ibm.modcap', + 'lnk' => 'application/x-ms-shortcut', + 'log' => 'text/plain', + 'lostxml' => 'application/lost+xml', + 'lrf' => 'application/octet-stream', + 'lrm' => 'application/vnd.ms-lrm', + 'lrz' => 'application/x-lrzip', + 'ltf' => 'application/vnd.frogans.ltf', + 'ltx' => 'text/x-tex', + 'lua' => 'text/x-lua', + 'lvp' => 'audio/vnd.lucent.voice', + 'lwo' => 'image/x-lwo', + 'lwob' => 'image/x-lwo', + 'lwp' => 'application/vnd.lotus-wordpro', + 'lws' => 'image/x-lws', + 'ly' => 'text/x-lilypond', + 'lyx' => 'application/x-lyx', + 'lz' => 'application/x-lzip', + 'lz4' => 'application/x-lz4', + 'lzh' => 'application/x-lzh-compressed', + 'lzma' => 'application/x-lzma', + 'lzo' => 'application/x-lzop', + 'm' => 'text/x-objcsrc', + 'm13' => 'application/x-msmediaview', + 'm14' => 'application/x-msmediaview', + 'm15' => 'audio/x-mod', + 'm1u' => 'video/vnd.mpegurl', + 'm1v' => 'video/mpeg', + 'm21' => 'application/mp21', + 'm2a' => 'audio/mpeg', + 'm2t' => 'video/mp2t', + 'm2ts' => 'video/mp2t', + 'm2v' => 'video/mpeg', + 'm3a' => 'audio/mpeg', + 'm3u' => 'audio/x-mpegurl', + 'm3u8' => 'application/vnd.apple.mpegurl', + 'm4' => 'application/x-m4', + 'm4a' => 'audio/mp4', + 'm4b' => 'audio/x-m4b', + 'm4u' => 'video/vnd.mpegurl', + 'm4v' => 'video/x-m4v', + 'ma' => 'application/mathematica', + 'mab' => 'application/x-markaby', + 'mads' => 'application/mads+xml', + 'mag' => 'application/vnd.ecowin.chart', + 'mak' => 'text/x-makefile', + 'maker' => 'application/vnd.framemaker', + 'man' => 'text/troff', + 'manifest' => 'text/cache-manifest', + 'mar' => 'application/octet-stream', + 'markdown' => 'text/x-markdown', + 'mathml' => 'application/mathml+xml', + 'mb' => 'application/mathematica', + 'mbk' => 'application/vnd.mobius.mbk', + 'mbox' => 'application/mbox', + 'mc1' => 'application/vnd.medcalcdata', + 'mcd' => 'application/vnd.mcd', + 'mcurl' => 'text/vnd.curl.mcurl', + 'md' => 'text/x-markdown', + 'mdb' => 'application/x-msaccess', + 'mdi' => 'image/vnd.ms-modi', + 'me' => 'text/troff', + 'med' => 'audio/x-mod', + 'mesh' => 'model/mesh', + 'meta4' => 'application/metalink4+xml', + 'metalink' => 'application/metalink+xml', + 'mets' => 'application/mets+xml', + 'mfm' => 'application/vnd.mfmp', + 'mft' => 'application/rpki-manifest', + 'mgp' => 'application/vnd.osgeo.mapguide.package', + 'mgz' => 'application/vnd.proteus.magazine', + 'mht' => 'application/x-mimearchive', + 'mhtml' => 'application/x-mimearchive', + 'mid' => 'audio/midi', + 'midi' => 'audio/midi', + 'mie' => 'application/x-mie', + 'mif' => 'application/vnd.mif', + 'mime' => 'message/rfc822', + 'minipsf' => 'audio/x-minipsf', + 'mj2' => 'video/mj2', + 'mjp2' => 'video/mj2', + 'mk' => 'text/x-makefile', + 'mk3d' => 'video/x-matroska', + 'mka' => 'audio/x-matroska', + 'mkd' => 'text/x-markdown', + 'mks' => 'video/x-matroska', + 'mkv' => 'video/x-matroska', + 'ml' => 'text/x-ocaml', + 'mli' => 'text/x-ocaml', + 'mlp' => 'application/vnd.dolby.mlp', + 'mm' => 'text/x-troff-mm', + 'mmd' => 'application/vnd.chipnuts.karaoke-mmd', + 'mmf' => 'application/vnd.smaf', + 'mml' => 'application/mathml+xml', + 'mmr' => 'image/vnd.fujixerox.edmics-mmr', + 'mng' => 'video/x-mng', + 'mny' => 'application/x-msmoney', + 'mo' => 'application/x-gettext-translation', + 'mo3' => 'audio/x-mo3', + 'mobi' => 'application/x-mobipocket-ebook', + 'moc' => 'text/x-moc', + 'mod' => 'audio/x-mod', + 'mods' => 'application/mods+xml', + 'mof' => 'text/x-mof', + 'moov' => 'video/quicktime', + 'mov' => 'video/quicktime', + 'movie' => 'video/x-sgi-movie', + 'mp+' => 'audio/x-musepack', + 'mp2' => 'audio/mpeg', + 'mp21' => 'application/mp21', + 'mp2a' => 'audio/mpeg', + 'mp3' => 'audio/mpeg', + 'mp4' => 'video/mp4', + 'mp4a' => 'audio/mp4', + 'mp4s' => 'application/mp4', + 'mp4v' => 'video/mp4', + 'mpc' => 'application/vnd.mophun.certificate', + 'mpe' => 'video/mpeg', + 'mpeg' => 'video/mpeg', + 'mpg' => 'video/mpeg', + 'mpg4' => 'video/mp4', + 'mpga' => 'audio/mpeg', + 'mpkg' => 'application/vnd.apple.installer+xml', + 'mpl' => 'video/mp2t', + 'mpls' => 'video/mp2t', + 'mpm' => 'application/vnd.blueice.multipass', + 'mpn' => 'application/vnd.mophun.application', + 'mpp' => 'application/vnd.ms-project', + 'mpt' => 'application/vnd.ms-project', + 'mpy' => 'application/vnd.ibm.minipay', + 'mqy' => 'application/vnd.mobius.mqy', + 'mrc' => 'application/marc', + 'mrcx' => 'application/marcxml+xml', + 'mrl' => 'text/x-mrml', + 'mrml' => 'text/x-mrml', + 'mrw' => 'image/x-minolta-mrw', + 'ms' => 'text/troff', + 'mscml' => 'application/mediaservercontrol+xml', + 'mseed' => 'application/vnd.fdsn.mseed', + 'mseq' => 'application/vnd.mseq', + 'msf' => 'application/vnd.epson.msf', + 'msh' => 'model/mesh', + 'msi' => 'application/x-msdownload', + 'msl' => 'application/vnd.mobius.msl', + 'msod' => 'image/x-msod', + 'msty' => 'application/vnd.muvee.style', + 'msx' => 'application/x-msx-rom', + 'mtm' => 'audio/x-mod', + 'mts' => 'model/vnd.mts', + 'mup' => 'text/x-mup', + 'mus' => 'application/vnd.musician', + 'musicxml' => 'application/vnd.recordare.musicxml+xml', + 'mvb' => 'application/x-msmediaview', + 'mwf' => 'application/vnd.mfer', + 'mxf' => 'application/mxf', + 'mxl' => 'application/vnd.recordare.musicxml', + 'mxml' => 'application/xv+xml', + 'mxs' => 'application/vnd.triscape.mxs', + 'mxu' => 'video/vnd.mpegurl', + 'n-gage' => 'application/vnd.nokia.n-gage.symbian.install', + 'n3' => 'text/n3', + 'n64' => 'application/x-n64-rom', + 'nb' => 'application/mathematica', + 'nbp' => 'application/vnd.wolfram.player', + 'nc' => 'application/x-netcdf', + 'ncx' => 'application/x-dtbncx+xml', + 'nds' => 'application/x-nintendo-ds-rom', + 'nef' => 'image/x-nikon-nef', + 'nes' => 'application/x-nes-rom', + 'nfo' => 'text/x-nfo', + 'ngdat' => 'application/vnd.nokia.n-gage.data', + 'nitf' => 'application/vnd.nitf', + 'nlu' => 'application/vnd.neurolanguage.nlu', + 'nml' => 'application/vnd.enliven', + 'nnd' => 'application/vnd.noblenet-directory', + 'nns' => 'application/vnd.noblenet-sealer', + 'nnw' => 'application/vnd.noblenet-web', + 'not' => 'text/x-mup', + 'npx' => 'image/vnd.net-fpx', + 'nsc' => 'application/x-conference', + 'nsf' => 'application/vnd.lotus-notes', + 'nsv' => 'video/x-nsv', + 'ntf' => 'application/vnd.nitf', + 'nzb' => 'application/x-nzb', + 'o' => 'application/x-object', + 'oa2' => 'application/vnd.fujitsu.oasys2', + 'oa3' => 'application/vnd.fujitsu.oasys3', + 'oas' => 'application/vnd.fujitsu.oasys', + 'obd' => 'application/x-msbinder', + 'obj' => 'application/x-tgif', + 'ocl' => 'text/x-ocl', + 'oda' => 'application/oda', + 'odb' => 'application/vnd.oasis.opendocument.database', + 'odc' => 'application/vnd.oasis.opendocument.chart', + 'odf' => 'application/vnd.oasis.opendocument.formula', + 'odft' => 'application/vnd.oasis.opendocument.formula-template', + 'odg' => 'application/vnd.oasis.opendocument.graphics', + 'odi' => 'application/vnd.oasis.opendocument.image', + 'odm' => 'application/vnd.oasis.opendocument.text-master', + 'odp' => 'application/vnd.oasis.opendocument.presentation', + 'ods' => 'application/vnd.oasis.opendocument.spreadsheet', + 'odt' => 'application/vnd.oasis.opendocument.text', + 'oga' => 'audio/ogg', + 'ogg' => 'audio/ogg', + 'ogm' => 'video/x-ogm+ogg', + 'ogv' => 'video/ogg', + 'ogx' => 'application/ogg', + 'old' => 'application/x-trash', + 'oleo' => 'application/x-oleo', + 'omdoc' => 'application/omdoc+xml', + 'onepkg' => 'application/onenote', + 'onetmp' => 'application/onenote', + 'onetoc' => 'application/onenote', + 'onetoc2' => 'application/onenote', + 'ooc' => 'text/x-ooc', + 'oot' => 'application/vnd.oasis.opendocument.text', + 'opf' => 'application/oebps-package+xml', + 'opml' => 'text/x-opml', + 'oprc' => 'application/vnd.palm', + 'opus' => 'audio/ogg', + 'ora' => 'image/openraster', + 'orf' => 'image/x-olympus-orf', + 'org' => 'application/vnd.lotus-organizer', + 'osf' => 'application/vnd.yamaha.openscoreformat', + 'osfpvg' => 'application/vnd.yamaha.openscoreformat.osfpvg+xml', + 'otc' => 'application/vnd.oasis.opendocument.chart-template', + 'otf' => 'application/x-font-otf', + 'otg' => 'application/vnd.oasis.opendocument.graphics-template', + 'oth' => 'application/vnd.oasis.opendocument.text-web', + 'oti' => 'application/vnd.oasis.opendocument.image-template', + 'otp' => 'application/vnd.oasis.opendocument.presentation-template', + 'ots' => 'application/vnd.oasis.opendocument.spreadsheet-template', + 'ott' => 'application/vnd.oasis.opendocument.text-template', + 'owl' => 'application/rdf+xml', + 'oxps' => 'application/oxps', + 'oxt' => 'application/vnd.openofficeorg.extension', + 'p' => 'text/x-pascal', + 'p10' => 'application/pkcs10', + 'p12' => 'application/x-pkcs12', + 'p7b' => 'application/x-pkcs7-certificates', + 'p7c' => 'application/pkcs7-mime', + 'p7m' => 'application/pkcs7-mime', + 'p7r' => 'application/x-pkcs7-certreqresp', + 'p7s' => 'application/pkcs7-signature', + 'p8' => 'application/pkcs8', + 'pack' => 'application/x-java-pack200', + 'pak' => 'application/x-pak', + 'par2' => 'application/x-par2', + 'pas' => 'text/x-pascal', + 'patch' => 'text/diff', + 'paw' => 'application/vnd.pawaafile', + 'pbd' => 'application/vnd.powerbuilder6', + 'pbm' => 'image/x-portable-bitmap', + 'pcap' => 'application/vnd.tcpdump.pcap', + 'pcd' => 'image/x-photo-cd', + 'pce' => 'application/x-pc-engine-rom', + 'pcf' => 'application/x-font-pcf', + 'pcf.gz' => 'application/x-font-pcf', + 'pcf.z' => 'application/x-font-pcf', + 'pcl' => 'application/vnd.hp-pcl', + 'pclxl' => 'application/vnd.hp-pclxl', + 'pct' => 'image/x-pict', + 'pcurl' => 'application/vnd.curl.pcurl', + 'pcx' => 'image/x-pcx', + 'pdb' => 'application/vnd.palm', + 'pdc' => 'application/x-aportisdoc', + 'pdf' => 'application/pdf', + 'pdf.bz2' => 'application/x-bzpdf', + 'pdf.gz' => 'application/x-gzpdf', + 'pdf.xz' => 'application/x-xzpdf', + 'pef' => 'image/x-pentax-pef', + 'pem' => 'application/x-x509-ca-cert', + 'perl' => 'application/x-perl', + 'pfa' => 'application/x-font-type1', + 'pfb' => 'application/x-font-type1', + 'pfm' => 'application/x-font-type1', + 'pfr' => 'application/font-tdpfr', + 'pfx' => 'application/x-pkcs12', + 'pgm' => 'image/x-portable-graymap', + 'pgn' => 'application/x-chess-pgn', + 'pgp' => 'application/pgp-encrypted', + 'php' => 'application/x-httpd-php', + 'php3' => 'application/x-httpd-php3', + 'php4' => 'application/x-php', + 'php5' => 'application/x-php', + 'phps' => 'application/x-php', + 'pic' => 'image/x-pict', + 'pict' => 'image/x-pict', + 'pict1' => 'image/x-pict', + 'pict2' => 'image/x-pict', + 'pk' => 'application/x-tex-pk', + 'pkg' => 'application/octet-stream', + 'pki' => 'application/pkixcmp', + 'pkipath' => 'application/pkix-pkipath', + 'pkr' => 'application/pgp-keys', + 'pl' => 'application/x-perl', + 'pla' => 'audio/x-iriver-pla', + 'plb' => 'application/vnd.3gpp.pic-bw-large', + 'plc' => 'application/vnd.mobius.plc', + 'plf' => 'application/vnd.pocketlearn', + 'pln' => 'application/x-planperfect', + 'pls' => 'application/pls+xml', + 'pm' => 'application/x-perl', + 'pml' => 'application/vnd.ctc-posml', + 'png' => 'image/png', + 'pnm' => 'image/x-portable-anymap', + 'pntg' => 'image/x-macpaint', + 'po' => 'text/plain', + 'pod' => 'application/x-perl', + 'por' => 'application/x-spss-por', + 'portpkg' => 'application/vnd.macports.portpkg', + 'pot' => 'application/vnd.ms-powerpoint', + 'potm' => 'application/vnd.ms-powerpoint.template.macroenabled.12', + 'potx' => 'application/vnd.openxmlformats-officedocument.presentationml.template', + 'ppam' => 'application/vnd.ms-powerpoint.addin.macroenabled.12', + 'ppd' => 'application/vnd.cups-ppd', + 'ppm' => 'image/x-portable-pixmap', + 'pps' => 'application/vnd.ms-powerpoint', + 'ppsm' => 'application/vnd.ms-powerpoint.slideshow.macroenabled.12', + 'ppsx' => 'application/vnd.openxmlformats-officedocument.presentationml.slideshow', + 'ppt' => 'application/vnd.ms-powerpoint', + 'pptm' => 'application/vnd.ms-powerpoint.presentation.macroenabled.12', + 'pptx' => 'application/vnd.openxmlformats-officedocument.presentationml.presentation', + 'ppz' => 'application/vnd.ms-powerpoint', + 'pqa' => 'application/vnd.palm', + 'prc' => 'application/x-mobipocket-ebook', + 'pre' => 'application/vnd.lotus-freelance', + 'prf' => 'application/pics-rules', + 'ps' => 'application/postscript', + 'ps.bz2' => 'application/x-bzpostscript', + 'ps.gz' => 'application/x-gzpostscript', + 'psb' => 'application/vnd.3gpp.pic-bw-small', + 'psd' => 'image/vnd.adobe.photoshop', + 'psf' => 'application/x-font-linux-psf', + 'psf.gz' => 'application/x-gz-font-linux-psf', + 'psflib' => 'audio/x-psflib', + 'psid' => 'audio/prs.sid', + 'pskcxml' => 'application/pskc+xml', + 'psw' => 'application/x-pocket-word', + 'ptid' => 'application/vnd.pvi.ptid1', + 'pub' => 'application/x-mspublisher', + 'pvb' => 'application/vnd.3gpp.pic-bw-var', + 'pw' => 'application/x-pw', + 'pwn' => 'application/vnd.3m.post-it-notes', + 'py' => 'text/x-python', + 'pya' => 'audio/vnd.ms-playready.media.pya', + 'pyc' => 'application/x-python-bytecode', + 'pyo' => 'application/x-python-bytecode', + 'pyv' => 'video/vnd.ms-playready.media.pyv', + 'pyx' => 'text/x-python', + 'qam' => 'application/vnd.epson.quickanime', + 'qbo' => 'application/vnd.intu.qbo', + 'qfx' => 'application/vnd.intu.qfx', + 'qif' => 'application/x-qw', + 'qml' => 'text/x-qml', + 'qps' => 'application/vnd.publishare-delta-tree', + 'qt' => 'video/quicktime', + 'qti' => 'application/x-qtiplot', + 'qti.gz' => 'application/x-qtiplot', + 'qtif' => 'image/x-quicktime', + 'qtl' => 'application/x-quicktime-media-link', + 'qtvr' => 'video/quicktime', + 'qwd' => 'application/vnd.quark.quarkxpress', + 'qwt' => 'application/vnd.quark.quarkxpress', + 'qxb' => 'application/vnd.quark.quarkxpress', + 'qxd' => 'application/vnd.quark.quarkxpress', + 'qxl' => 'application/vnd.quark.quarkxpress', + 'qxt' => 'application/vnd.quark.quarkxpress', + 'ra' => 'audio/x-pn-realaudio', + 'raf' => 'image/x-fuji-raf', + 'ram' => 'audio/x-pn-realaudio', + 'rar' => 'application/x-rar-compressed', + 'ras' => 'image/x-cmu-raster', + 'raw' => 'image/x-panasonic-raw', + 'raw-disk-image' => 'application/x-raw-disk-image', + 'raw-disk-image.xz' => 'application/x-raw-disk-image-xz-compressed', + 'rax' => 'audio/vnd.rn-realaudio', + 'rb' => 'application/x-ruby', + 'rcprofile' => 'application/vnd.ipunplugged.rcprofile', + 'rdf' => 'application/rdf+xml', + 'rdfs' => 'application/rdf+xml', + 'rdz' => 'application/vnd.data-vision.rdz', + 'reg' => 'text/x-ms-regedit', + 'rej' => 'text/x-reject', + 'rep' => 'application/vnd.businessobjects', + 'res' => 'application/x-dtbresource+xml', + 'rgb' => 'image/x-rgb', + 'rif' => 'application/reginfo+xml', + 'rip' => 'audio/vnd.rip', + 'ris' => 'application/x-research-info-systems', + 'rl' => 'application/resource-lists+xml', + 'rlc' => 'image/vnd.fujixerox.edmics-rlc', + 'rld' => 'application/resource-lists-diff+xml', + 'rle' => 'image/rle', + 'rm' => 'application/vnd.rn-realmedia', + 'rmi' => 'audio/midi', + 'rmj' => 'application/vnd.rn-realmedia', + 'rmm' => 'application/vnd.rn-realmedia', + 'rmp' => 'audio/x-pn-realaudio-plugin', + 'rms' => 'application/vnd.jcp.javame.midlet-rms', + 'rmvb' => 'application/vnd.rn-realmedia-vbr', + 'rmx' => 'application/vnd.rn-realmedia', + 'rnc' => 'application/relax-ng-compact-syntax', + 'rng' => 'application/xml', + 'roa' => 'application/rpki-roa', + 'roff' => 'text/troff', + 'rp' => 'image/vnd.rn-realpix', + 'rp9' => 'application/vnd.cloanto.rp9', + 'rpm' => 'application/x-rpm', + 'rpss' => 'application/vnd.nokia.radio-presets', + 'rpst' => 'application/vnd.nokia.radio-preset', + 'rq' => 'application/sparql-query', + 'rs' => 'application/rls-services+xml', + 'rsd' => 'application/rsd+xml', + 'rss' => 'application/rss+xml', + 'rt' => 'text/vnd.rn-realtext', + 'rtf' => 'application/rtf', + 'rtx' => 'text/richtext', + 'rv' => 'video/vnd.rn-realvideo', + 'rvx' => 'video/vnd.rn-realvideo', + 'rw2' => 'image/x-panasonic-raw2', + 's' => 'text/x-asm', + 's3m' => 'audio/s3m', + 'saf' => 'application/vnd.yamaha.smaf-audio', + 'sam' => 'application/x-amipro', + 'sami' => 'application/x-sami', + 'sav' => 'application/x-spss-sav', + 'sbml' => 'application/sbml+xml', + 'sc' => 'application/vnd.ibm.secure-container', + 'scala' => 'text/x-scala', + 'scd' => 'application/x-msschedule', + 'scm' => 'application/vnd.lotus-screencam', + 'scq' => 'application/scvp-cv-request', + 'scs' => 'application/scvp-cv-response', + 'scurl' => 'text/vnd.curl.scurl', + 'sda' => 'application/vnd.stardivision.draw', + 'sdc' => 'application/vnd.stardivision.calc', + 'sdd' => 'application/vnd.stardivision.impress', + 'sdkd' => 'application/vnd.solent.sdkm+xml', + 'sdkm' => 'application/vnd.solent.sdkm+xml', + 'sdp' => 'application/sdp', + 'sds' => 'application/vnd.stardivision.chart', + 'sdw' => 'application/vnd.stardivision.writer', + 'see' => 'application/vnd.seemail', + 'seed' => 'application/vnd.fdsn.seed', + 'sema' => 'application/vnd.sema', + 'semd' => 'application/vnd.semd', + 'semf' => 'application/vnd.semf', + 'ser' => 'application/java-serialized-object', + 'setpay' => 'application/set-payment-initiation', + 'setreg' => 'application/set-registration-initiation', + 'sfc' => 'application/vnd.nintendo.snes.rom', + 'sfd-hdstx' => 'application/vnd.hydrostatix.sof-data', + 'sfs' => 'application/vnd.spotfire.sfs', + 'sfv' => 'text/x-sfv', + 'sgf' => 'application/x-go-sgf', + 'sgi' => 'image/sgi', + 'sgl' => 'application/vnd.stardivision.writer-global', + 'sgm' => 'text/sgml', + 'sgml' => 'text/sgml', + 'sh' => 'application/x-sh', + 'shape' => 'application/x-dia-shape', + 'shar' => 'application/x-shar', + 'shf' => 'application/shf+xml', + 'shn' => 'application/x-shorten', + 'shtml' => 'text/html', + 'siag' => 'application/x-siag', + 'sid' => 'image/x-mrsid-image', + 'sig' => 'application/pgp-signature', + 'sik' => 'application/x-trash', + 'sil' => 'audio/silk', + 'silo' => 'model/mesh', + 'sis' => 'application/vnd.symbian.install', + 'sisx' => 'application/vnd.symbian.install', + 'sit' => 'application/x-stuffit', + 'sitx' => 'application/x-stuffitx', + 'siv' => 'application/sieve', + 'sk' => 'image/x-skencil', + 'sk1' => 'image/x-skencil', + 'skd' => 'application/vnd.koan', + 'skm' => 'application/vnd.koan', + 'skp' => 'application/vnd.koan', + 'skr' => 'application/pgp-keys', + 'skt' => 'application/vnd.koan', + 'sldm' => 'application/vnd.ms-powerpoint.slide.macroenabled.12', + 'sldx' => 'application/vnd.openxmlformats-officedocument.presentationml.slide', + 'slk' => 'text/spreadsheet', + 'slt' => 'application/vnd.epson.salt', + 'sm' => 'application/vnd.stepmania.stepchart', + 'smaf' => 'application/x-smaf', + 'smc' => 'application/vnd.nintendo.snes.rom', + 'smd' => 'application/vnd.stardivision.mail', + 'smf' => 'application/vnd.stardivision.math', + 'smi' => 'application/smil+xml', + 'smil' => 'application/smil+xml', + 'sml' => 'application/smil', + 'sms' => 'application/x-sms-rom', + 'smv' => 'video/x-smv', + 'smzip' => 'application/vnd.stepmania.package', + 'snd' => 'audio/basic', + 'snf' => 'application/x-font-snf', + 'so' => 'application/octet-stream', + 'spc' => 'application/x-pkcs7-certificates', + 'spd' => 'application/x-font-speedo', + 'spec' => 'text/x-rpm-spec', + 'spf' => 'application/vnd.yamaha.smaf-phrase', + 'spl' => 'application/x-futuresplash', + 'spm' => 'application/x-source-rpm', + 'spot' => 'text/vnd.in3d.spot', + 'spp' => 'application/scvp-vp-response', + 'spq' => 'application/scvp-vp-request', + 'spx' => 'audio/ogg', + 'sql' => 'application/x-sql', + 'sr2' => 'image/x-sony-sr2', + 'src' => 'application/x-wais-source', + 'src.rpm' => 'application/x-source-rpm', + 'srf' => 'image/x-sony-srf', + 'srt' => 'application/x-subrip', + 'sru' => 'application/sru+xml', + 'srx' => 'application/sparql-results+xml', + 'ss' => 'text/x-scheme', + 'ssa' => 'text/x-ssa', + 'ssdl' => 'application/ssdl+xml', + 'sse' => 'application/vnd.kodak-descriptor', + 'ssf' => 'application/vnd.epson.ssf', + 'ssml' => 'application/ssml+xml', + 'st' => 'application/vnd.sailingtracker.track', + 'stc' => 'application/vnd.sun.xml.calc.template', + 'std' => 'application/vnd.sun.xml.draw.template', + 'stf' => 'application/vnd.wt.stf', + 'sti' => 'application/vnd.sun.xml.impress.template', + 'stk' => 'application/hyperstudio', + 'stl' => 'application/vnd.ms-pki.stl', + 'stm' => 'audio/x-stm', + 'str' => 'application/vnd.pg.format', + 'stw' => 'application/vnd.sun.xml.writer.template', + 'sty' => 'text/x-tex', + 'sub' => 'text/vnd.dvb.subtitle', + 'sun' => 'image/x-sun-raster', + 'sus' => 'application/vnd.sus-calendar', + 'susp' => 'application/vnd.sus-calendar', + 'sv' => 'text/x-svsrc', + 'sv4cpio' => 'application/x-sv4cpio', + 'sv4crc' => 'application/x-sv4crc', + 'svc' => 'application/vnd.dvb.service', + 'svd' => 'application/vnd.svd', + 'svg' => 'image/svg+xml', + 'svgz' => 'image/svg+xml', + 'svh' => 'text/x-svhdr', + 'swa' => 'application/x-director', + 'swf' => 'application/x-shockwave-flash', + 'swi' => 'application/vnd.aristanetworks.swi', + 'swm' => 'application/x-ms-wim', + 'sxc' => 'application/vnd.sun.xml.calc', + 'sxd' => 'application/vnd.sun.xml.draw', + 'sxg' => 'application/vnd.sun.xml.writer.global', + 'sxi' => 'application/vnd.sun.xml.impress', + 'sxm' => 'application/vnd.sun.xml.math', + 'sxw' => 'application/vnd.sun.xml.writer', + 'sylk' => 'text/spreadsheet', + 't' => 'text/troff', + 't2t' => 'text/x-txt2tags', + 't3' => 'application/x-t3vm-image', + 'taglet' => 'application/vnd.mynfc', + 'tao' => 'application/vnd.tao.intent-module-archive', + 'tar' => 'application/x-tar', + 'tar.bz' => 'application/x-bzip-compressed-tar', + 'tar.bz2' => 'application/x-bzip-compressed-tar', + 'tar.gz' => 'application/x-compressed-tar', + 'tar.lrz' => 'application/x-lrzip-compressed-tar', + 'tar.lzma' => 'application/x-lzma-compressed-tar', + 'tar.lzo' => 'application/x-tzo', + 'tar.xz' => 'application/x-xz-compressed-tar', + 'tar.z' => 'application/x-tarz', + 'taz' => 'application/x-tarz', + 'tb2' => 'application/x-bzip-compressed-tar', + 'tbz' => 'application/x-bzip-compressed-tar', + 'tbz2' => 'application/x-bzip-compressed-tar', + 'tcap' => 'application/vnd.3gpp2.tcap', + 'tcl' => 'application/x-tcl', + 'teacher' => 'application/vnd.smart.teacher', + 'tei' => 'application/tei+xml', + 'teicorpus' => 'application/tei+xml', + 'tex' => 'application/x-tex', + 'texi' => 'application/x-texinfo', + 'texinfo' => 'application/x-texinfo', + 'text' => 'text/plain', + 'tfi' => 'application/thraud+xml', + 'tfm' => 'application/x-tex-tfm', + 'tga' => 'image/x-tga', + 'tgz' => 'application/x-gtar', + 'theme' => 'application/x-theme', + 'themepack' => 'application/x-windows-themepack', + 'thmx' => 'application/vnd.ms-officetheme', + 'tif' => 'image/tiff', + 'tiff' => 'image/tiff', + 'tk' => 'text/x-tcl', + 'tlrz' => 'application/x-lrzip-compressed-tar', + 'tlz' => 'application/x-lzma-compressed-tar', + 'tmo' => 'application/vnd.tmobile-livetv', + 'tnef' => 'application/vnd.ms-tnef', + 'tnf' => 'application/vnd.ms-tnef', + 'toc' => 'application/x-cdrdao-toc', + 'torrent' => 'application/x-bittorrent', + 'tpic' => 'image/x-tga', + 'tpl' => 'application/vnd.groove-tool-template', + 'tpt' => 'application/vnd.trid.tpt', + 'tr' => 'text/troff', + 'tra' => 'application/vnd.trueapp', + 'trig' => 'application/x-trig', + 'trm' => 'application/x-msterminal', + 'ts' => 'text/vnd.trolltech.linguist', + 'tsd' => 'application/timestamped-data', + 'tsv' => 'text/tab-separated-values', + 'tta' => 'audio/x-tta', + 'ttc' => 'application/x-font-ttf', + 'ttf' => 'application/x-font-ttf', + 'ttl' => 'text/turtle', + 'ttx' => 'application/x-font-ttx', + 'twd' => 'application/vnd.simtech-mindmapper', + 'twds' => 'application/vnd.simtech-mindmapper', + 'txd' => 'application/vnd.genomatix.tuxedo', + 'txf' => 'application/vnd.mobius.txf', + 'txt' => 'text/plain', + 'txz' => 'application/x-xz-compressed-tar', + 'tzo' => 'application/x-tzo', + 'u32' => 'application/x-authorware-bin', + 'udeb' => 'application/x-debian-package', + 'ufd' => 'application/vnd.ufdl', + 'ufdl' => 'application/vnd.ufdl', + 'ufraw' => 'application/x-ufraw', + 'ui' => 'application/x-designer', + 'uil' => 'text/x-uil', + 'ult' => 'audio/x-mod', + 'ulx' => 'application/x-glulx', + 'umj' => 'application/vnd.umajin', + 'uni' => 'audio/x-mod', + 'unityweb' => 'application/vnd.unity', + 'uoml' => 'application/vnd.uoml+xml', + 'uri' => 'text/uri-list', + 'uris' => 'text/uri-list', + 'url' => 'application/x-mswinurl', + 'urls' => 'text/uri-list', + 'ustar' => 'application/x-ustar', + 'utz' => 'application/vnd.uiq.theme', + 'uu' => 'text/x-uuencode', + 'uue' => 'text/x-uuencode', + 'uva' => 'audio/vnd.dece.audio', + 'uvd' => 'application/vnd.dece.data', + 'uvf' => 'application/vnd.dece.data', + 'uvg' => 'image/vnd.dece.graphic', + 'uvh' => 'video/vnd.dece.hd', + 'uvi' => 'image/vnd.dece.graphic', + 'uvm' => 'video/vnd.dece.mobile', + 'uvp' => 'video/vnd.dece.pd', + 'uvs' => 'video/vnd.dece.sd', + 'uvt' => 'application/vnd.dece.ttml+xml', + 'uvu' => 'video/vnd.uvvu.mp4', + 'uvv' => 'video/vnd.dece.video', + 'uvva' => 'audio/vnd.dece.audio', + 'uvvd' => 'application/vnd.dece.data', + 'uvvf' => 'application/vnd.dece.data', + 'uvvg' => 'image/vnd.dece.graphic', + 'uvvh' => 'video/vnd.dece.hd', + 'uvvi' => 'image/vnd.dece.graphic', + 'uvvm' => 'video/vnd.dece.mobile', + 'uvvp' => 'video/vnd.dece.pd', + 'uvvs' => 'video/vnd.dece.sd', + 'uvvt' => 'application/vnd.dece.ttml+xml', + 'uvvu' => 'video/vnd.uvvu.mp4', + 'uvvv' => 'video/vnd.dece.video', + 'uvvx' => 'application/vnd.dece.unspecified', + 'uvvz' => 'application/vnd.dece.zip', + 'uvx' => 'application/vnd.dece.unspecified', + 'uvz' => 'application/vnd.dece.zip', + 'v' => 'text/x-verilog', + 'vala' => 'text/x-vala', + 'vapi' => 'text/x-vala', + 'vcard' => 'text/vcard', + 'vcd' => 'application/x-cdlink', + 'vcf' => 'text/x-vcard', + 'vcg' => 'application/vnd.groove-vcard', + 'vcs' => 'text/calendar', + 'vct' => 'text/vcard', + 'vcx' => 'application/vnd.vcx', + 'vda' => 'image/x-tga', + 'vfb' => 'text/calendar', + 'vhd' => 'text/x-vhdl', + 'vhdl' => 'text/x-vhdl', + 'vis' => 'application/vnd.visionary', + 'viv' => 'video/vnd.vivo', + 'vivo' => 'video/vivo', + 'vlc' => 'audio/x-mpegurl', + 'vob' => 'video/x-ms-vob', + 'voc' => 'audio/x-voc', + 'vor' => 'application/vnd.stardivision.writer', + 'vox' => 'application/x-authorware-bin', + 'vrm' => 'model/vrml', + 'vrml' => 'model/vrml', + 'vsd' => 'application/vnd.visio', + 'vsf' => 'application/vnd.vsf', + 'vss' => 'application/vnd.visio', + 'vst' => 'application/vnd.visio', + 'vsw' => 'application/vnd.visio', + 'vtt' => 'text/vtt', + 'vtu' => 'model/vnd.vtu', + 'vxml' => 'application/voicexml+xml', + 'w3d' => 'application/x-director', + 'wad' => 'application/x-doom', + 'wav' => 'audio/x-wav', + 'wax' => 'audio/x-ms-wax', + 'wb1' => 'application/x-quattropro', + 'wb2' => 'application/x-quattropro', + 'wb3' => 'application/x-quattropro', + 'wbmp' => 'image/vnd.wap.wbmp', + 'wbs' => 'application/vnd.criticaltools.wbs+xml', + 'wbxml' => 'application/vnd.wap.wbxml', + 'wcm' => 'application/vnd.ms-works', + 'wdb' => 'application/vnd.ms-works', + 'wdp' => 'image/vnd.ms-photo', + 'weba' => 'audio/webm', + 'webm' => 'video/webm', + 'webp' => 'image/webp', + 'wg' => 'application/vnd.pmi.widget', + 'wgt' => 'application/widget', + 'wim' => 'application/x-ms-wim', + 'wk1' => 'application/vnd.lotus-1-2-3', + 'wk3' => 'application/vnd.lotus-1-2-3', + 'wk4' => 'application/vnd.lotus-1-2-3', + 'wks' => 'application/vnd.ms-works', + 'wm' => 'video/x-ms-wm', + 'wma' => 'audio/x-ms-wma', + 'wmd' => 'application/x-ms-wmd', + 'wmf' => 'application/x-msmetafile', + 'wml' => 'text/vnd.wap.wml', + 'wmlc' => 'application/vnd.wap.wmlc', + 'wmls' => 'text/vnd.wap.wmlscript', + 'wmlsc' => 'application/vnd.wap.wmlscriptc', + 'wmv' => 'video/x-ms-wmv', + 'wmx' => 'video/x-ms-wmx', + 'wmz' => 'application/x-ms-wmz', + 'woff' => 'application/font-woff', + 'wp' => 'application/vnd.wordperfect', + 'wp4' => 'application/vnd.wordperfect', + 'wp5' => 'application/vnd.wordperfect', + 'wp6' => 'application/vnd.wordperfect', + 'wpd' => 'application/vnd.wordperfect', + 'wpg' => 'application/x-wpg', + 'wpl' => 'application/vnd.ms-wpl', + 'wpp' => 'application/vnd.wordperfect', + 'wps' => 'application/vnd.ms-works', + 'wqd' => 'application/vnd.wqd', + 'wri' => 'application/x-mswrite', + 'wrl' => 'model/vrml', + 'wsdl' => 'application/wsdl+xml', + 'wsgi' => 'text/x-python', + 'wspolicy' => 'application/wspolicy+xml', + 'wtb' => 'application/vnd.webturbo', + 'wv' => 'audio/x-wavpack', + 'wvc' => 'audio/x-wavpack-correction', + 'wvp' => 'audio/x-wavpack', + 'wvx' => 'video/x-ms-wvx', + 'wwf' => 'application/x-wwf', + 'x32' => 'application/x-authorware-bin', + 'x3d' => 'model/x3d+xml', + 'x3db' => 'model/x3d+binary', + 'x3dbz' => 'model/x3d+binary', + 'x3dv' => 'model/x3d+vrml', + 'x3dvz' => 'model/x3d+vrml', + 'x3dz' => 'model/x3d+xml', + 'x3f' => 'image/x-sigma-x3f', + 'xac' => 'application/x-gnucash', + 'xaml' => 'application/xaml+xml', + 'xap' => 'application/x-silverlight-app', + 'xar' => 'application/vnd.xara', + 'xbap' => 'application/x-ms-xbap', + 'xbd' => 'application/vnd.fujixerox.docuworks.binder', + 'xbel' => 'application/x-xbel', + 'xbl' => 'application/xml', + 'xbm' => 'image/x-xbitmap', + 'xcf' => 'image/x-xcf', + 'xcf.bz2' => 'image/x-compressed-xcf', + 'xcf.gz' => 'image/x-compressed-xcf', + 'xdf' => 'application/xcap-diff+xml', + 'xdm' => 'application/vnd.syncml.dm+xml', + 'xdp' => 'application/vnd.adobe.xdp+xml', + 'xdssc' => 'application/dssc+xml', + 'xdw' => 'application/vnd.fujixerox.docuworks', + 'xenc' => 'application/xenc+xml', + 'xer' => 'application/patch-ops-error+xml', + 'xfdf' => 'application/vnd.adobe.xfdf', + 'xfdl' => 'application/vnd.xfdl', + 'xht' => 'application/xhtml+xml', + 'xhtml' => 'application/xhtml+xml', + 'xhvml' => 'application/xv+xml', + 'xi' => 'audio/x-xi', + 'xif' => 'image/vnd.xiff', + 'xla' => 'application/vnd.ms-excel', + 'xlam' => 'application/vnd.ms-excel.addin.macroenabled.12', + 'xlc' => 'application/vnd.ms-excel', + 'xld' => 'application/vnd.ms-excel', + 'xlf' => 'application/x-xliff+xml', + 'xliff' => 'application/x-xliff', + 'xll' => 'application/vnd.ms-excel', + 'xlm' => 'application/vnd.ms-excel', + 'xlr' => 'application/vnd.ms-works', + 'xls' => 'application/vnd.ms-excel', + 'xlsb' => 'application/vnd.ms-excel.sheet.binary.macroenabled.12', + 'xlsm' => 'application/vnd.ms-excel.sheet.macroenabled.12', + 'xlsx' => 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet', + 'xlt' => 'application/vnd.ms-excel', + 'xltm' => 'application/vnd.ms-excel.template.macroenabled.12', + 'xltx' => 'application/vnd.openxmlformats-officedocument.spreadsheetml.template', + 'xlw' => 'application/vnd.ms-excel', + 'xm' => 'audio/xm', + 'xmf' => 'audio/x-xmf', + 'xmi' => 'text/x-xmi', + 'xml' => 'application/xml', + 'xo' => 'application/vnd.olpc-sugar', + 'xop' => 'application/xop+xml', + 'xpi' => 'application/x-xpinstall', + 'xpl' => 'application/xproc+xml', + 'xpm' => 'image/x-xpixmap', + 'xpr' => 'application/vnd.is-xpr', + 'xps' => 'application/vnd.ms-xpsdocument', + 'xpw' => 'application/vnd.intercon.formnet', + 'xpx' => 'application/vnd.intercon.formnet', + 'xsd' => 'application/xml', + 'xsl' => 'application/xml', + 'xslfo' => 'text/x-xslfo', + 'xslt' => 'application/xslt+xml', + 'xsm' => 'application/vnd.syncml+xml', + 'xspf' => 'application/xspf+xml', + 'xul' => 'application/vnd.mozilla.xul+xml', + 'xvm' => 'application/xv+xml', + 'xvml' => 'application/xv+xml', + 'xwd' => 'image/x-xwindowdump', + 'xyz' => 'chemical/x-xyz', + 'xz' => 'application/x-xz', + 'yaml' => 'application/x-yaml', + 'yang' => 'application/yang', + 'yin' => 'application/yin+xml', + 'yml' => 'application/x-yaml', + 'z' => 'application/x-compress', + 'z1' => 'application/x-zmachine', + 'z2' => 'application/x-zmachine', + 'z3' => 'application/x-zmachine', + 'z4' => 'application/x-zmachine', + 'z5' => 'application/x-zmachine', + 'z6' => 'application/x-zmachine', + 'z7' => 'application/x-zmachine', + 'z8' => 'application/x-zmachine', + 'zabw' => 'application/x-abiword', + 'zaz' => 'application/vnd.zzazz.deck+xml', + 'zip' => 'application/zip', + 'zir' => 'application/vnd.zul', + 'zirz' => 'application/vnd.zul', + 'zmm' => 'application/vnd.handheld-entertainment+xml', + 'zoo' => 'application/x-zoo', + 'zsav' => 'application/x-spss-sav', + '123' => 'application/vnd.lotus-1-2-3', + '602' => 'application/x-t602', + '669' => 'audio/x-mod' +); \ No newline at end of file diff --git a/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mime/data/locale/Horde_Mime.pot b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mime/data/locale/Horde_Mime.pot new file mode 100644 index 00000000..bfd8c292 --- /dev/null +++ b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mime/data/locale/Horde_Mime.pot @@ -0,0 +1,38 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR Horde LLC (http://www.horde.org/) +# This file is distributed under the same license as the Horde_Mime package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Horde_Mime\n" +"Report-Msgid-Bugs-To: dev@lists.horde.org\n" +"POT-Creation-Date: 2015-01-08 11:22+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/Mime/Mdn.php:188 +msgid "Disposition Notification" +msgstr "" + +#: lib/Horde/Mime/Mail.php:439 +msgid "HTML Version of Message" +msgstr "" + +#: lib/Horde/Mime/Mail.php:437 +msgid "Plaintext Version of Message" +msgstr "" + +#: lib/Horde/Mime/Mdn.php:201 +#, php-format +msgid "" +"The message sent on %s to %s with subject \"%s\" has been displayed.\n" +"\n" +"This is no guarantee that the message has been read or understood." +msgstr "" diff --git a/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mime/data/locale/ar/LC_MESSAGES/Horde_Mime.mo b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mime/data/locale/ar/LC_MESSAGES/Horde_Mime.mo new file mode 100644 index 0000000000000000000000000000000000000000..e615918c10625bd110810b27193d11b555da584f GIT binary patch literal 379 zcmaKnF;BxV5QU3i%E-*%fekJ=VIUYGQA$xOHKM8lD>BL98l`q*Un=@T_?&;q1_wmu!h;_i6FsIBRbIuGZm@zM}`5ipJS_c1tHNm`r7YxyQr^L*M2473N z!DNM<4+Ld2wt@TJM5w$H4Q}sR8!4vi!J7JDlI2qclYpA|1UzU$C32Zb80J#QOyyT+ zGMAE#u)?h!qW<+QbR?*PcCppugA(JO{D$w>x@~vDpu@m1O|sC=^x7a)s5eU3tZ;wY zmGg4C|6rENWa1s6BL98l`q*Un=@T_?&;q1_wmu!h;_i6FsIBRbIuGZm@zM}`5ipJS_c1tHNm`r7YxyQr^L*M2473N z!DNM<4+Ld2wt@TJM5w$H4Q}sR8!4vi!J7JDlI2qclYpA|1UzU$C32Zb80J#QOyyT+ zGMAE#u)?h!qW<+QbR?*PcCppugA(JO{D$w>x@~vDpu@m1O|sC=^x7a)s5eU3tZ;wY zmGg4C|6rENWa1s6BL98l`q*Un=@T_?&;q1_wmu!h;_i6FsIBRbIuGZm@zM}`5ipJS_c1tHNm`r7YxyQr^L*M2473N z!DNM<4+Ld2wt@TJM5w$H4Q}sR8!4vi!J7JDlI2qclYpA|1UzU$C32Zb80J#QOyyT+ zGMAE#u)?h!qW<+QbR?*PcCppugA(JO{D$w>x@~vDpu@m1O|sC=^x7a)s5eU3tZ;wY zmGg4C|6rENWa1s61gh5XTLKuM;4kA`-m3u=OG zs_MoY6b*OZTJnuMb|E(2tNA2oZzkub_HFpHG4}3|bd-Zaz9t{gCKKDv7xZRiW|Ztv z?R=D@P?|!n&&wclmx+QFFDeWZ+EY$#J6|T_-CS;XT23lARisRG(@rY+dn(dS)_wLk z?WQRb5Y&lmY$(+IV=3@ctI`jaFp_|ZW$gS_t zJ?IB?1NsHI+N&2Ja1QjqdC>U}!CPPvoCQPhJ=B2ak$=6I_x}mbA^#1!eY2PH`um{s zm%zJV2;KpAK(r`afv{z=U==PyZVtC*a!h_*&ucDP6DCteSfM0oC@T&`#9UI?62{UM z9d*Tk=gB5dvplNBIh$`K*Lm1d#^%vZzhfdTI@4Xd()=}ATD|6xrL~yuacyu+KsJ?* z`F>sWxVOzSr7f+SM8xz}KQXke0uuAV%M`EnB@T}`z4>c zXPNk=p!{^nFZ(_U={6q-chrCDwis^P)=Zj|S)~KA(zmLI{t-*lLy~Y@6vxEg7L!Sz zC7iZ7>jgxVD)OJ{>b3g%*#%2Q-&LIbw69r8H`=t6u)mhhqFej=qq7riMz(@ez{34j)R^n|}AxtT8&y)L?uRvr`9ufNAAk hiZ_RyZ%&P7%uPBvKG&>u@=0`IogDLXZZkgT{Q;O!?tuUR literal 0 HcmV?d00001 diff --git a/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mime/data/locale/cs/LC_MESSAGES/Horde_Mime.po b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mime/data/locale/cs/LC_MESSAGES/Horde_Mime.po new file mode 100644 index 00000000..8bf14762 --- /dev/null +++ b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mime/data/locale/cs/LC_MESSAGES/Horde_Mime.po @@ -0,0 +1,72 @@ +# Czech translations for Horde_Mime module. +# Copyright 2010-2017 Horde LLC (http://www.horde.org/) +# This file is distributed under the same license as the Horde_Mime module. +# Automatically generated, 2010. +# +msgid "" +msgstr "" +"Project-Id-Version: Horde_Mime\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/Mime/Mdn.php:202 +msgid "Disposition Notification" +msgstr "Dispoziční upozornění" + +#: lib/Horde/Mime/Mail.php:460 +msgid "HTML Version of Message" +msgstr "" + +#: lib/Horde/Mime/Mail.php:404 +#, fuzzy, php-format +msgid "Invalid character in e-mail address: %s." +msgstr "Neplatná adresa příjemce." + +#: lib/Horde/Mime/Headers.php:519 +msgid "List-Archive" +msgstr "Seznam-Archiv" + +#: lib/Horde/Mime/Headers.php:514 +msgid "List-Help" +msgstr "Seznam-Nápověda" + +#: lib/Horde/Mime/Headers.php:521 +msgid "List-Id" +msgstr "Seznam-Id" + +#: lib/Horde/Mime/Headers.php:517 +msgid "List-Owner" +msgstr "Seznam-Vlastník" + +#: lib/Horde/Mime/Headers.php:518 +msgid "List-Post" +msgstr "Seznam-Odeslání" + +#: lib/Horde/Mime/Headers.php:516 +msgid "List-Subscribe" +msgstr "Seznam-Přihlášení" + +#: lib/Horde/Mime/Headers.php:515 +msgid "List-Unsubscribe" +msgstr "Seznam-Odhlášení" + +#: lib/Horde/Mime/Mail.php:458 +msgid "Plaintext Version of Message" +msgstr "" + +#: lib/Horde/Mime/Mdn.php:213 +#, fuzzy, php-format +msgid "" +"The message sent on %s to %s with subject \"%s\" has been displayed.\n" +"\n" +"This is no guarantee that the message has been read or understood." +msgstr "" +"Zpráva zaslaná v %s k %s s předmětem \"%s\" byla zobrazena.\n" +"Toto nezaručuje, že zpráva byla přečtena nebo že jí adresát(ka) rozuměl(a)." diff --git a/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mime/data/locale/da/LC_MESSAGES/Horde_Mime.mo b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mime/data/locale/da/LC_MESSAGES/Horde_Mime.mo new file mode 100644 index 0000000000000000000000000000000000000000..6e434b7e03a9eac9fb7601113c5ae201e1ef28a5 GIT binary patch literal 1257 zcmb`F+invv5QdjCEC&Gs6(lYOBqR`W*i8{CTZ%XZrKo|Zq`j@2>?G@UV+Y&mLE@S> z;1!T~jy?hRh)bS=3w~#p76~q~GW*%ic*ZmSzh6H7DZ)4hy8-(Ey9E0N3xkeC(KYZU zI0t56@LdJZfE(Z`P=PV{zTW=;UcmYzcoF;rhWMYskKleF?Df$ox`OrBV^MS!`~jW^ ze}W-Td_0OygL7brPc`p>A^t-!#BYJu!F6yKoPY=)orHxE&W3^Q*+BT{Y&{S654mua zS*}o57$?H#rE(MFlvhU68{^eb4P;nE?Otbv*4eu7j~P;jos%PuR+RJNnH>~ryI!=p zoK)M(dBwLonr$`h8t1FoyJ_DItm@aN*0ej==$2Ax&%6F#33~<8xJpirwI|%?wj*!C zcSrex5NMMJo^IWCx2TYg`plYgR94D8&Kq&uE0iPrw4u>dT8U&#zK|ZD!{`S`Ez6vY zrK!%*0B=m*h`QE>hJ}5-So#jsJu=KQ%#4il`sF8bbf+E8E-ABijUZg=Gtz*Bm)_Wxu4*kL%hipYl z4@{0LX0*^(KJJ!ND@*ap*s;qJ9DvS@Gaf3DTac*>bFS+q85xw1IWD^B)}*85*7A!9j|zc*G< oHE*Hof8~5WOO1A;<+;cE>&8s1stg!&PCV9JOO-9${Qr^XFM=UjdH?_b literal 0 HcmV?d00001 diff --git a/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mime/data/locale/da/LC_MESSAGES/Horde_Mime.po b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mime/data/locale/da/LC_MESSAGES/Horde_Mime.po new file mode 100644 index 00000000..e8859eaf --- /dev/null +++ b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mime/data/locale/da/LC_MESSAGES/Horde_Mime.po @@ -0,0 +1,69 @@ +# Danish translations for Horde_Mime package. +# Copyright (C) 2014 Horde LLC (http://www.horde.org/) +# This file is distributed under the same license as the Horde_Mime package. +# Erling Preben Hansen , 2013-2014. +# +msgid "" +msgstr "" +"Project-Id-Version: Horde_Mime\n" +"Report-Msgid-Bugs-To: dev@lists.horde.org\n" +"POT-Creation-Date: 2013-10-29 10:13+0100\n" +"PO-Revision-Date: 2014-03-20 21:18+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/Mime/Mdn.php:188 +msgid "Disposition Notification" +msgstr "Dispositions melding" + +#: lib/Horde/Mime/Mail.php:421 +msgid "HTML Version of Message" +msgstr "HTML-udgave af besked" + +#: lib/Horde/Mime/Headers.php:542 +msgid "List-Archive" +msgstr "Liste-Arkivet" + +#: lib/Horde/Mime/Headers.php:537 +msgid "List-Help" +msgstr "Liste-Hjælp" + +#: lib/Horde/Mime/Headers.php:544 +msgid "List-Id" +msgstr "Liste-Id" + +#: lib/Horde/Mime/Headers.php:540 +msgid "List-Owner" +msgstr "Liste-Ejer" + +#: lib/Horde/Mime/Headers.php:541 +msgid "List-Post" +msgstr "Liste-Post" + +#: lib/Horde/Mime/Headers.php:539 +msgid "List-Subscribe" +msgstr "Liste-Abonnér" + +#: lib/Horde/Mime/Headers.php:538 +msgid "List-Unsubscribe" +msgstr "Liste-Afabonnér" + +#: lib/Horde/Mime/Mail.php:419 +msgid "Plaintext Version of Message" +msgstr "Rentekst-udgave af besked" + +#: lib/Horde/Mime/Mdn.php:200 +#, php-format +msgid "" +"The message sent on %s to %s with subject \"%s\" has been displayed.\n" +"\n" +"This is no guarantee that the message has been read or understood." +msgstr "" +"Beskeden sendt den. %s til %s med emnet \"%s\" er set.\n" +"\n" +"This is no guarantee that the message has been read or understood." diff --git a/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mime/data/locale/de/LC_MESSAGES/Horde_Mime.mo b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mime/data/locale/de/LC_MESSAGES/Horde_Mime.mo new file mode 100644 index 0000000000000000000000000000000000000000..6e115022172de927446ef764309e9898954882cd GIT binary patch literal 971 zcmZuv-D(su7#+1L%%uqa;KgTYL1|~5*&;4e7PQ@#7P@sQqnAo{=G&R*OtK`I*7^XV z58$;RUik>#_8s)j7w{!K+14(iVNSkDa`JsA$@zJ0;bVYy8Mp%sfU7_a`1T&S348!< z0G|QR`v$xNegH=og5U*k9sl1i2ElE_Ux>F5uUra(uZV;QN`UEE!*Ev94;FkkkanuA zbW$tY*G^7kF8mdO}0CR+Jo!Y9W>5H|~FnS;f?x63Mc1guTm_oc8^Z zbQRfl{EBl&i_3PADq(5Ntf+vBS{!rH3B#MEp3$PlnOq4TubY0r}ET} zHf1<^nnjza;BO=v2*)XPV~jyf{kmtx*i#qm{S| z-kz{7%5W%K3#Uy=Pg_ zwl2Lp@qPu-c?yrZzRx_PIw;i)}CtsW_TUE}C^hX*l+0eeoD}bgm4W0rj~eN)v!M-kh9?u4XKl$YuEI7Ax0!g%ag^V@B%%r_UFV_ipO`YcN G1it}>!6rKZ literal 0 HcmV?d00001 diff --git a/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mime/data/locale/de/LC_MESSAGES/Horde_Mime.po b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mime/data/locale/de/LC_MESSAGES/Horde_Mime.po new file mode 100644 index 00000000..67961958 --- /dev/null +++ b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mime/data/locale/de/LC_MESSAGES/Horde_Mime.po @@ -0,0 +1,42 @@ +# German translations for Horde_Mime module. +# Copyright 2010-2017 Horde LLC (http://www.horde.org/) +# This file is distributed under the same license as the Horde_Mime module. +# Automatically generated, 2010. +# +msgid "" +msgstr "" +"Project-Id-Version: Horde_Mime\n" +"Report-Msgid-Bugs-To: dev@lists.horde.org\n" +"POT-Creation-Date: 2015-01-08 11:22+0100\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/Mime/Mdn.php:188 +msgid "Disposition Notification" +msgstr "Empfangsbestätigung" + +#: lib/Horde/Mime/Mail.php:439 +msgid "HTML Version of Message" +msgstr "HTML-Version der Nachricht" + +#: lib/Horde/Mime/Mail.php:437 +msgid "Plaintext Version of Message" +msgstr "Textversion der Nachricht" + +#: lib/Horde/Mime/Mdn.php:201 +#, php-format +msgid "" +"The message sent on %s to %s with subject \"%s\" has been displayed.\n" +"\n" +"This is no guarantee that the message has been read or understood." +msgstr "" +"Die Nachricht mit dem Betreff \"%3$s\", die am %1$s an %2$s geschickt wurde, " +"ist angezeigt worden.\n" +"\n" +"Das heißt nicht, dass die Nachricht auch gelesen oder verstanden wurde." diff --git a/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mime/data/locale/el/LC_MESSAGES/Horde_Mime.mo b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mime/data/locale/el/LC_MESSAGES/Horde_Mime.mo new file mode 100644 index 0000000000000000000000000000000000000000..ed99475a77817d5b7745ac0c1a2b01e9773c2c25 GIT binary patch literal 1276 zcmaJ=&x;gC6mFx*p}l!Aha6sn1x32kJ;Av2x?=pXabZRmnS|Uz?R4!-Nl(>KRkKm> z;E!F6pa&s>hmez?!s@b{4D0AF3;6@8FP?J9DSwDx^$a_RA;r9YRj2AjfpZhsIQhcDn~ z;Ge*sg?|VCFZ|&HK>%pA5DGpW@4fR{a9yoW#y&VNOivkMg_3khS+OKq%pZb_%|@Mm z;M({bwL}eW3~TdXUM{mjC-0{#@>2|nqxfz`UgCAXVo>`tzElHEe|GuUq&1xr)C$%I2FuKB* zg`esKcf#Y68l~T4Njk#SnXyq5O__pOr8D|gS|!nKU37a~V{@t)@6NQWh}-&fSZ5N0 zX!EGaSvMn*PRoykHs%`_CcUO{5}s2SoCMkR9#s1m_7z4f\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" +"Language: el\n" +"X-Generator: Poedit 1.7.1\n" + +#: lib/Horde/Mime/Mdn.php:202 +msgid "Disposition Notification" +msgstr "Ειδοποίηση Διάθεσης" + +#: lib/Horde/Mime/Mail.php:460 +msgid "HTML Version of Message" +msgstr "Έκδοση HTML του μηνύματος" + +#: lib/Horde/Mime/Mail.php:404 +#, php-format +msgid "Invalid character in e-mail address: %s." +msgstr "Μη έγκυρος χαρακτήρας στο e-mail: %s." + +#: lib/Horde/Mime/Headers.php:519 +msgid "List-Archive" +msgstr "" + +#: lib/Horde/Mime/Headers.php:514 +#, fuzzy +msgid "List-Help" +msgstr "Λίστα θεμάτων Βοήθειας" + +#: lib/Horde/Mime/Headers.php:521 +msgid "List-Id" +msgstr "" + +#: lib/Horde/Mime/Headers.php:517 +msgid "List-Owner" +msgstr "" + +#: lib/Horde/Mime/Headers.php:518 +msgid "List-Post" +msgstr "" + +#: lib/Horde/Mime/Headers.php:516 +#, fuzzy +msgid "List-Subscribe" +msgstr "Υποδείκτης" + +#: lib/Horde/Mime/Headers.php:515 +msgid "List-Unsubscribe" +msgstr "" + +#: lib/Horde/Mime/Mail.php:458 +msgid "Plaintext Version of Message" +msgstr "Έκδοση απλού κειμένου του μηνύματος" + +#: lib/Horde/Mime/Mdn.php:213 +#, php-format +msgid "" +"The message sent on %s to %s with subject \"%s\" has been displayed.\n" +"\n" +"This is no guarantee that the message has been read or understood." +msgstr "" +"Το μήνυμα που στάλθηκε στις %s στον %s με θέμα %s εμφανίσθηκε.\n" +"Αυτό δεν αποτελεί επιβεβαίωση ότι διαβάσθηκε και έγινε κατανοητό." diff --git a/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mime/data/locale/es/LC_MESSAGES/Horde_Mime.mo b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mime/data/locale/es/LC_MESSAGES/Horde_Mime.mo new file mode 100644 index 0000000000000000000000000000000000000000..963f32c46908f5975306b12ff5db0b7b06b9ba9f GIT binary patch literal 1309 zcmcJO&2AGh5XYBqSUv&}}c#Gd9+L(d*P^Yek=fC23uB&!oBB z9Bmf37}V;;tmc!KicP)jXzS|LO4YNek-gEWRb_V-okB?E_?7!tz;4b|*1^fLa)kR_ zw&b**UrLt~9Bpvw=+b3-iE?47$E+wrW`)?|EDpnNE-m4wH1#WC1cEWSTsTZ)@4H70 zi;T3PN@Xa3(>jZTj?q3yw3tPsswA|aO~z|&Su%yoJkZ8PZQGYwbieA`sH+pocyqQu z#cZ5=+gO`^*m=^8<`BY{IeH)*C)8>*Z$*teQFDS?&7^hvdZX27z%W|oP3d3Y54(w| z*~F2gHBs9w2|P&`S=mB3Z4zn=RdGR`nC@+fLeSk(c+OUeU&U-^ZqTDjD4L7uej!w< z>F!3_8?I*8Wn2wPZxk*Gg<|zN>ar*klFdo=S1!M75@H*+7uyfV#c9Tka89Gr3YXg& zAWQ$kH}NJ?O;MT)W7$owcITtXv7Jw1olW!*x5}jICp6iUF67L_S+VhdntC@HuHZA* zxXU==3Zql0#J|IcOw;%avD%a)6&hUlE=LC5LfA^djc;@G^v-*9=CGrO4J}^_dQtK3 Zo^rf8Sqb+A?|cC?Je32(DuXf(egb)cZ5;pr literal 0 HcmV?d00001 diff --git a/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mime/data/locale/es/LC_MESSAGES/Horde_Mime.po b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mime/data/locale/es/LC_MESSAGES/Horde_Mime.po new file mode 100644 index 00000000..d21e8653 --- /dev/null +++ b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mime/data/locale/es/LC_MESSAGES/Horde_Mime.po @@ -0,0 +1,70 @@ +# Spanish translations for Horde_Mime package. +# Copyright (C) 2013 Horde LLC (http://www.horde.org/) +# This file is distributed under the same license as the Horde_Mime package. +# Automatically generated, 2013. +# +msgid "" +msgstr "" +"Project-Id-Version: Horde_Mime \n" +"Report-Msgid-Bugs-To: dev@lists.horde.org\n" +"POT-Creation-Date: 2013-07-16 21:24+0200\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/Mime/Mdn.php:188 +msgid "Disposition Notification" +msgstr "Notificación de consulta" + +#: lib/Horde/Mime/Mail.php:421 +msgid "HTML Version of Message" +msgstr "Versión HTML del mensaje" + +#: lib/Horde/Mime/Headers.php:540 +msgid "List-Archive" +msgstr "List-Archive" + +#: lib/Horde/Mime/Headers.php:535 +msgid "List-Help" +msgstr "List-Help" + +#: lib/Horde/Mime/Headers.php:542 +msgid "List-Id" +msgstr "List-Id" + +#: lib/Horde/Mime/Headers.php:538 +msgid "List-Owner" +msgstr "List-Owner" + +#: lib/Horde/Mime/Headers.php:539 +msgid "List-Post" +msgstr "List-Post" + +#: lib/Horde/Mime/Headers.php:537 +msgid "List-Subscribe" +msgstr "List-Subscribe" + +#: lib/Horde/Mime/Headers.php:536 +msgid "List-Unsubscribe" +msgstr "List-Unsubscribe" + +#: lib/Horde/Mime/Mail.php:419 +msgid "Plaintext Version of Message" +msgstr "Versión de texto del mensaje" + +#: lib/Horde/Mime/Mdn.php:200 +#, php-format +msgid "" +"The message sent on %s to %s with subject \"%s\" has been displayed.\n" +"\n" +"This is no guarantee that the message has been read or understood." +msgstr "" +"Se ha mostrado el mensaje enviado el %s a %s con el asunto \"%s\".\n" +"\n" +"Ésto no garantiza que el mensaje haya sido leído o comprendido." diff --git a/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mime/data/locale/et/LC_MESSAGES/Horde_Mime.mo b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mime/data/locale/et/LC_MESSAGES/Horde_Mime.mo new file mode 100644 index 0000000000000000000000000000000000000000..a5f121999fb5817a91b52afe0f3ccbf4d5f0dcb4 GIT binary patch literal 1312 zcmcJOyKWRQ6o$5n+-~}jn01AH3ETrJlVa@Spdp!P+?SDSc?0qRvjv{6ePZ1{&UlFl1 zcL{L{Y=I}io8Vb+03HEffQP`>-~sRrn1Ju6;~&6d=zj!{gP*{t^96hkeg`$;$?jU` z+a4iiFn(yS5Od%x75zhlDRhm&Jmi@81ru^7?6_hn}+Xl6+hB9`)c6GC7 zeW+V^%Yh#{HJE;N&-h;hJuQ_9{5bq6v;K&wsIw%`CJ+*z^Av2XAE_`REVRMHKxgLs z85&7X17<@RjzG&T&KgP5A1P0GjHSH91|h~2MlztG8E`#k!0ic2&X29Ufa3(yq@{mM)jMPy4n_8BZ>29GGv6;?#z9dD2_!r&pm6 zuOq!C1Gj0u*=nZoxk$}cd;Ze-=6th>iRm4lsCZNVoY#@Kkv=x%wG7s^=}H-Ff%S({ z>n+L|mjRh9=}3d!=bZLg7Hv|k1@l{W-PP{(oej1c&E%@ZX&ESNjge}+r3*M$Wfm*1 zcn(YV`Zv;rop~{nb$01>Gqjm9d7BmnDkME!I;qne))lal8CPAuG`~o7bLp(1(@WGk zx0w9hzPFUykW`s?BAvoTicUF@*lkJ0_FK0J&%*dYk(8Bb)qk{YolM|O=xvr8rNDrq z0zUIlXCwiK{>(#jFu`z)Hbd++5VvL P6KKsokaT4wq#EJ}Gazk& literal 0 HcmV?d00001 diff --git a/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mime/data/locale/et/LC_MESSAGES/Horde_Mime.po b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mime/data/locale/et/LC_MESSAGES/Horde_Mime.po new file mode 100644 index 00000000..0aea058d --- /dev/null +++ b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mime/data/locale/et/LC_MESSAGES/Horde_Mime.po @@ -0,0 +1,73 @@ +# Estonian translations for Horde_Mime module. +# Copyright 2010-2017 Horde LLC (http://www.horde.org/) +# This file is distributed under the same license as the Horde_Mime module. +# Automatically generated, 2010. +# +msgid "" +msgstr "" +"Project-Id-Version: Horde_Mime\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/Mime/Mdn.php:202 +msgid "Disposition Notification" +msgstr "Disposition Notification" + +#: lib/Horde/Mime/Mail.php:460 +msgid "HTML Version of Message" +msgstr "Kirja HTML variant" + +#: lib/Horde/Mime/Mail.php:404 +#, php-format +msgid "Invalid character in e-mail address: %s." +msgstr "Lubamatu märk e-posti aadressis: %s." + +#: lib/Horde/Mime/Headers.php:519 +msgid "List-Archive" +msgstr "List-Archive" + +#: lib/Horde/Mime/Headers.php:514 +msgid "List-Help" +msgstr "List-Help" + +#: lib/Horde/Mime/Headers.php:521 +msgid "List-Id" +msgstr "List-Id" + +#: lib/Horde/Mime/Headers.php:517 +msgid "List-Owner" +msgstr "List-Owner" + +#: lib/Horde/Mime/Headers.php:518 +msgid "List-Post" +msgstr "List-Post" + +#: lib/Horde/Mime/Headers.php:516 +msgid "List-Subscribe" +msgstr "List-Subscribe" + +#: lib/Horde/Mime/Headers.php:515 +msgid "List-Unsubscribe" +msgstr "List-Unsubscribe" + +#: lib/Horde/Mime/Mail.php:458 +msgid "Plaintext Version of Message" +msgstr "Kirja tekstikuju" + +#: lib/Horde/Mime/Mdn.php:213 +#, php-format +msgid "" +"The message sent on %s to %s with subject \"%s\" has been displayed.\n" +"\n" +"This is no guarantee that the message has been read or understood." +msgstr "" +"Kiri mis saadeti %s aadressile %s teemaga \"%s\" on avatud.\n" +"\n" +"See ei garanteeri et kiri läbi loeti või sellest aru saadi." diff --git a/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mime/data/locale/eu/LC_MESSAGES/Horde_Mime.mo b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mime/data/locale/eu/LC_MESSAGES/Horde_Mime.mo new file mode 100644 index 0000000000000000000000000000000000000000..301bfea55fb7174b82482393c0ede11b65a711e2 GIT binary patch literal 1329 zcmb_b&5jdC5FP>vFhmh>01ikLNQfY4Gxj31%(938yV%hhoQ)SDaX@WP?M&lwx9Oi< za5(b@oVe#1a_2P=&%)OpXZH|}X}S9ADp!A1T~+h-?6Hpt*3XcOkoS-?kS~z9=tz=W z0A2>32j;-&yA3=Ed<8rXRKOJYW@ `~~_4;A!ATVC4TB_yPDC_z&dw9~!=+$CBh6 z?5BZ|{~9pz-v&nh`@qP*xwQWQjQlTwk^eRD67Vlze9$K#=#!ryamBlF!Ms>Uv7cI= zBY%vERFV^r7&opT2f`5%)O$)XZxCMa~v4wo710R@I& zxN2DzWGn?;pa9;OqLmD+i9tlK5X-9M)HSx?SA8|*bem_!deL{KD#XK3Ix#dk6}|j~tg?74J?GTP+8vRtiq2hXujDJ)jjWSpa1`6Tr(y#R{Z>TQ z7VSIH@AlmrSsQ*^5*-=hQLdKW*qnMJl&Duq>w~0w3R+7w+5@gai`{+P(I`a8V#sou z(?)O;SyPv-RTD!y8f~&3V}bNQvCpF^g0TJ1{hZQ%ufK6vl6EUg9~snFBd2#WJTCV2 z7CNEy8jUMy9sBj2;igzU^ozOgvK1S8Yzn2zoK{E5r-M3JS&L0$r!FTwTc~cmvqsHv z{Z~zw*QtGdEqx&dh70AzzYojlp>%Hor%5-~LC8{BC6hkS(SJ literal 0 HcmV?d00001 diff --git a/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mime/data/locale/eu/LC_MESSAGES/Horde_Mime.po b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mime/data/locale/eu/LC_MESSAGES/Horde_Mime.po new file mode 100644 index 00000000..aa654671 --- /dev/null +++ b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mime/data/locale/eu/LC_MESSAGES/Horde_Mime.po @@ -0,0 +1,71 @@ +# Basque translations for Horde_Mime module. +# Copyright 2010-2017 Horde LLC (http://www.horde.org/) +# This file is distributed under the same license as the Horde_Mime module. +# Automatically generated, 2010. +# +msgid "" +msgstr "" +"Project-Id-Version: Horde_Mime\n" +"Report-Msgid-Bugs-To: dev@lists.horde.org\n" +"POT-Creation-Date: 2012-08-29 13:30+0200\n" +"PO-Revision-Date: 2013-01-16 13:49+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/Mime/Mdn.php:188 +msgid "Disposition Notification" +msgstr "Hartu-agiria" + +#: lib/Horde/Mime/Mail.php:419 +msgid "HTML Version of Message" +msgstr "Mezuaren HTML bertsioa" + +#: lib/Horde/Mime/Headers.php:540 +msgid "List-Archive" +msgstr "List-Archive" + +#: lib/Horde/Mime/Headers.php:535 +msgid "List-Help" +msgstr "List-Help" + +#: lib/Horde/Mime/Headers.php:542 +msgid "List-Id" +msgstr "List-Id" + +#: lib/Horde/Mime/Headers.php:538 +msgid "List-Owner" +msgstr "List-Owner" + +#: lib/Horde/Mime/Headers.php:539 +msgid "List-Post" +msgstr "List-Post" + +#: lib/Horde/Mime/Headers.php:537 +msgid "List-Subscribe" +msgstr "List-Subscribe" + +#: lib/Horde/Mime/Headers.php:536 +msgid "List-Unsubscribe" +msgstr "List-Unsubscribe" + +#: lib/Horde/Mime/Mail.php:417 +msgid "Plaintext Version of Message" +msgstr "Mezuaren testu soileko bertsioa" + +#: lib/Horde/Mime/Mdn.php:200 +#, php-format +msgid "" +"The message sent on %s to %s with subject \"%s\" has been displayed.\n" +"\n" +"This is no guarantee that the message has been read or understood." +msgstr "" +"Data: %s, Nori zuzendua: %s eta Gaia: \"%s\" duen mezua bistaratuta izan " +"da.\n" +"\n" +"Horrek ez du esan nahi hartzaileak mezua irakurri edo ulertu egin duenik." diff --git a/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mime/data/locale/fa/LC_MESSAGES/Horde_Mime.mo b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mime/data/locale/fa/LC_MESSAGES/Horde_Mime.mo new file mode 100644 index 0000000000000000000000000000000000000000..ce338baf89d43832accbf0a73e52a419b803fe2b GIT binary patch literal 829 zcmaKpL2DC16vtPsRTmYjhze5n;7ulO;=!;|Ft(Kjk~Y-Tt88|sn~}{S%_S7*5oC0m|8fg3*;CV0yUI1sn60`_SVg2&BWnBh$z$@Tq(DeHT zUIGt?{5jm8JYiYW@TWmsVNF8V8U!rsBxL3=F_B^LZ)Q1dvN{(i)d4%N}+bG7zjWJhhU@KSoXPCp1u`9Fj*= zNVM^s1ujDRxXN18UZ!m>6sgLHh2(xGlBCW(C#2nbF@}-3rYX&F5!tn+I++!8Fe#by z74@8gn|F!%-FDo(SGaT2Ex0ZU$ujLS)9Sx<6(6sy3qO&uuek7>Qb+L??hpJpUUMRf zhoVhrSNtUE_z@*_>bE?H<%`Kb(^bpW`J)HsbFMwh6GanrSZiZcMW3l#?bv6@T_?Z}Oxc!xt9R3N-E(wLzu(`}eJg#QZtA}NV7wh9 z9}l+EtueQcBb(`qbVKis`uK<=XU%T9zP~r-eKpq}Y>#^Si~f{up~oxT`^$fqZa8Dx FzX5mH5840# literal 0 HcmV?d00001 diff --git a/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mime/data/locale/fa/LC_MESSAGES/Horde_Mime.po b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mime/data/locale/fa/LC_MESSAGES/Horde_Mime.po new file mode 100644 index 00000000..cccd73cd --- /dev/null +++ b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mime/data/locale/fa/LC_MESSAGES/Horde_Mime.po @@ -0,0 +1,71 @@ +# Persian translations for Horde_Mime module. +# Copyright 2010-2017 Horde LLC (http://www.horde.org/) +# This file is distributed under the same license as the Horde_Mime module. +# Automatically generated, 2010. +# +msgid "" +msgstr "" +"Project-Id-Version: Horde_Mime\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/Mime/Mdn.php:202 +msgid "Disposition Notification" +msgstr "حالت تذکر" + +#: lib/Horde/Mime/Mail.php:460 +msgid "HTML Version of Message" +msgstr "" + +#: lib/Horde/Mime/Mail.php:404 +#, fuzzy, php-format +msgid "Invalid character in e-mail address: %s." +msgstr "آدرس مقصد نامعتبر" + +#: lib/Horde/Mime/Headers.php:519 +msgid "List-Archive" +msgstr "فهرست آرشیو" + +#: lib/Horde/Mime/Headers.php:514 +msgid "List-Help" +msgstr "فهرست راهنما" + +#: lib/Horde/Mime/Headers.php:521 +msgid "List-Id" +msgstr "فهرست Id" + +#: lib/Horde/Mime/Headers.php:517 +msgid "List-Owner" +msgstr "فهرست مالک" + +#: lib/Horde/Mime/Headers.php:518 +msgid "List-Post" +msgstr "فهرست پستی" + +#: lib/Horde/Mime/Headers.php:516 +msgid "List-Subscribe" +msgstr "فهرست عضویّت" + +#: lib/Horde/Mime/Headers.php:515 +msgid "List-Unsubscribe" +msgstr "فهرست عدم عضویّت" + +#: lib/Horde/Mime/Mail.php:458 +msgid "Plaintext Version of Message" +msgstr "" + +#: lib/Horde/Mime/Mdn.php:213 +#, fuzzy, php-format +msgid "" +"The message sent on %s to %s with subject \"%s\" has been displayed.\n" +"\n" +"This is no guarantee that the message has been read or understood." +msgstr "" +"پیغام فرستاده شده روی %s به %s با موضوع \"%s\" نمایش داده شده است.\n" +"تضمینی برای خوانده شدن و یا درک آن وجود ندارد" diff --git a/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mime/data/locale/fi/LC_MESSAGES/Horde_Mime.mo b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mime/data/locale/fi/LC_MESSAGES/Horde_Mime.mo new file mode 100644 index 0000000000000000000000000000000000000000..ea195e89ae6351f14ba7210cdd04657f9b77cf95 GIT binary patch literal 1296 zcmZvbQI8un5XZMrC~N`IRuw!{Xj-Wf2)t}^MTEUxRcL$Mp@fT$ZC@*2*2&Ig*ABKf zB~_m*@d5e`BECqzLLU*&ddknq{J_Rp<494Kko&E**0pyq9hu|wP`2P)j32wk&F@Ja?impL^ z{btKQ!S^Bm1qOfd#VC3QybcC`pMW90=$L`Q@Au$!umD3s&q274-o^|g_zDB+?ST8} za<>on4?b~~ZLE-27;lB;A-jcf?Ad7g(RiNnL82qE#OjEsvgQW!vr8IN$DmYEIn5@=15Hsz~BEFWC`(+R&_#Rw9@pUrLYV z-22&4t7JjOQlkqLz#CH}(b$?0L>v~Pt4c-(#un=7h-(!etA(*%jNFV1@m(`>A~zWo zYI(mx!CX=X)5O?WJU+_B14IZ_77wLY8THd%U!()k|Au-y*-rX-+D}s$iet6p@Bsg^ z+Y#y4)cYz+2icuFt?5wWQF7$vD(Q{QXow0(I#7&^?^evZx!-u1O!;0slo~adDUmB# zXSB~+vn%N?_XhgEmp!-6Xv*>EaP;Ur`(Bd94-87F5qq^j9^nbUMA2FA(xjBuDZlqP z-xq^(yKu*;vf`1Rn1b~zqrnOLcw9ABR$|}S+GV5{ThZ802TbM&C7%tCoDYt~Ai#rA5BJG8-*PD|BhT`CXbRcO~G-bqSraQ0LphoCdw z@qBLZT-*Ldck9i1)gCD~Ypr0H#QA1jZ`P!kytH#9EeZeH&H4+1Z+uv83xJJ5zcEz} R)D3KzRy7V<8?KN, 2010-2012. +# +msgid "" +msgstr "" +"Project-Id-Version: Horde_Mime\n" +"Report-Msgid-Bugs-To: dev@lists.horde.org\n" +"POT-Creation-Date: 2012-08-29 13:30+0200\n" +"PO-Revision-Date: 2012-03-07 15:08:44+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/Mime/Mdn.php:188 +msgid "Disposition Notification" +msgstr "Perillemenoilmoitus" + +#: lib/Horde/Mime/Mail.php:419 +msgid "HTML Version of Message" +msgstr "Viestin HTML-versio" + +#: lib/Horde/Mime/Headers.php:540 +msgid "List-Archive" +msgstr "Lista-Arkisto" + +#: lib/Horde/Mime/Headers.php:535 +msgid "List-Help" +msgstr "Lista-Ohje" + +#: lib/Horde/Mime/Headers.php:542 +msgid "List-Id" +msgstr "Lista-Id" + +#: lib/Horde/Mime/Headers.php:538 +msgid "List-Owner" +msgstr "Lista-Omistaja" + +#: lib/Horde/Mime/Headers.php:539 +msgid "List-Post" +msgstr "Lista-Viesti" + +#: lib/Horde/Mime/Headers.php:537 +msgid "List-Subscribe" +msgstr "Lista-Tilaus" + +#: lib/Horde/Mime/Headers.php:536 +msgid "List-Unsubscribe" +msgstr "Lista-Tilauksen-lopettaminen" + +#: lib/Horde/Mime/Mail.php:417 +msgid "Plaintext Version of Message" +msgstr "Viestin tekstiversio." + +#: lib/Horde/Mime/Mdn.php:200 +#, php-format +msgid "" +"The message sent on %s to %s with subject \"%s\" has been displayed.\n" +"\n" +"This is no guarantee that the message has been read or understood." +msgstr "" +"Viesti lähetetty %s vastaanottajalle %s otsikkona \"%s\" on näytetty " +"hänelle.\n" +"Tämä ei tarkoita sitä, että viestiä olisi luettu tai ymmärretty." diff --git a/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mime/data/locale/fr/LC_MESSAGES/Horde_Mime.mo b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mime/data/locale/fr/LC_MESSAGES/Horde_Mime.mo new file mode 100644 index 0000000000000000000000000000000000000000..94cc0c72ddc14218490302aaf1a2823db234677a GIT binary patch literal 1425 zcmaKs&u`;I6vt=T<(K)55U>cOr$8`>5V)Q| zdl~Ixv}e%%KnqvlldROCo%pBd>Z@( z3_8DopMZaX@1uS6K%@KT#YX4CB_VF${bleu@Le#hpMp<;hu~%KQ!x1Z75F^(J@^v% zGx!SlJNP+x@j)RVQ~L;r$3lk-(*h;}vUNOwcmyrv11{CEg?PgCQ0VrQn;ECPGMe5o zUQJaZ!$2I2hXZ<#tqX6=l!ok_%vkjGTox*&B$rkuo-HX&9G6lRB-7NwtV1e{NDMbnjx!|-FMdMsK!mSNu6#|49lh36` zx8D71sb!gxu~g|4nexV@Eitkth{XLgK1pAf4vbCt-cXes-R7CGJ|4PErSV%;=HjvG zQp)o;3na|7@?hFBHj75L#_=u`!g0iV(sP$K+nshC?$@c^>2BV*-rj7tVHn@$xe6!s zzjgzO6B#2YS4eMcmwJ^qCH7BbQ7kB990p|4XdpGB&o~~lEW4ySTl!z#4g16Wb%32# zJK8nKmWIM&23Nx=y@tFhy=S;RMu zEm2B(RuA3I<~B8tJJ&S5L7i8(Bhf?D$Q>1GZl!W4+tZ4z%Qvk~3qtJH)w=q|GU~Oi zV5SuMR9uyH(PDUZz*h0{sHx(U0&Y|!gq&y5Q?L!PrxX3O^^Y-XU}n|o*h>Y$^OpO1 zZWOJK)@yqcqcxYIV9!tQt&W{szdFCiX^bJoOcPsqIv45SEDU0ZEmp@=aQFnUJ9;_i zgc4JhjL+ddds=?CJlb%}qvekz2`xR6zg 1);\n" + +#: lib/Horde/Mime/Mdn.php:202 +msgid "Disposition Notification" +msgstr "Avis de livraison" + +#: lib/Horde/Mime/Mail.php:460 +msgid "HTML Version of Message" +msgstr "Version HTML du message" + +#: lib/Horde/Mime/Mail.php:404 +#, php-format +msgid "Invalid character in e-mail address: %s." +msgstr "Caractère invalide dans l'adresse de messagerie : %s." + +#: lib/Horde/Mime/Headers.php:519 +msgid "List-Archive" +msgstr "Archives de la liste" + +#: lib/Horde/Mime/Headers.php:514 +msgid "List-Help" +msgstr "Aide de la liste" + +#: lib/Horde/Mime/Headers.php:521 +msgid "List-Id" +msgstr "Id. de la liste" + +#: lib/Horde/Mime/Headers.php:517 +msgid "List-Owner" +msgstr "Propriétaire de la liste" + +#: lib/Horde/Mime/Headers.php:518 +msgid "List-Post" +msgstr "Envoi à la liste" + +#: lib/Horde/Mime/Headers.php:516 +msgid "List-Subscribe" +msgstr "Abonnement à la liste" + +#: lib/Horde/Mime/Headers.php:515 +msgid "List-Unsubscribe" +msgstr "Désabonnement de la liste" + +#: lib/Horde/Mime/Mail.php:458 +msgid "Plaintext Version of Message" +msgstr "Version texte brut du message" + +#: lib/Horde/Mime/Mdn.php:213 +#, php-format +msgid "" +"The message sent on %s to %s with subject \"%s\" has been displayed.\n" +"\n" +"This is no guarantee that the message has been read or understood." +msgstr "" +"Le message envoyé le %s à %s avec comme sujet « %s » a été affiché.\n" +"Il n'y a aucune garantie que ce message ait été lu ou compris." diff --git a/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mime/data/locale/gl/LC_MESSAGES/Horde_Mime.mo b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mime/data/locale/gl/LC_MESSAGES/Horde_Mime.mo new file mode 100644 index 0000000000000000000000000000000000000000..e615918c10625bd110810b27193d11b555da584f GIT binary patch literal 379 zcmaKnF;BxV5QU3i%E-*%fekJ=VIUYGQA$xOHKM8lD>BL98l`q*Un=@T_?&;q1_wmu!h;_i6FsIBRbIuGZm@zM}`5ipJS_c1tHNm`r7YxyQr^L*M2473N z!DNM<4+Ld2wt@TJM5w$H4Q}sR8!4vi!J7JDlI2qclYpA|1UzU$C32Zb80J#QOyyT+ zGMAE#u)?h!qW<+QbR?*PcCppugA(JO{D$w>x@~vDpu@m1O|sC=^x7a)s5eU3tZ;wY zmGg4C|6rENWa1s6UuURBbN|FxuL;QRG7H<{Y zgWw?_Nyy=zlh6IVj{#|iI3SLQUE+-Bl@XdAuW0W*zgjr^hE;%B4NvI2vWByJ>uP*1 zRD;nHTk8T8UaA^yJL#dcoYlC#*2)JzT=mwWbuwB!lrVNE0*!z>5sneLk)V0# literal 0 HcmV?d00001 diff --git a/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mime/data/locale/he/LC_MESSAGES/Horde_Mime.po b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mime/data/locale/he/LC_MESSAGES/Horde_Mime.po new file mode 100644 index 00000000..bd361533 --- /dev/null +++ b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mime/data/locale/he/LC_MESSAGES/Horde_Mime.po @@ -0,0 +1,71 @@ +# Hebrew translations for Horde_Mime module. +# Copyright 2010-2017 Horde LLC (http://www.horde.org/) +# This file is distributed under the same license as the Horde_Mime module. +# Automatically generated, 2010. +# +msgid "" +msgstr "" +"Project-Id-Version: Horde_Mime\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/Mime/Mdn.php:202 +msgid "Disposition Notification" +msgstr "" + +#: lib/Horde/Mime/Mail.php:460 +msgid "HTML Version of Message" +msgstr "" + +#: lib/Horde/Mime/Mail.php:404 +#, php-format +msgid "Invalid character in e-mail address: %s." +msgstr "" + +#: lib/Horde/Mime/Headers.php:519 +msgid "List-Archive" +msgstr "" + +#: lib/Horde/Mime/Headers.php:514 +#, fuzzy +msgid "List-Help" +msgstr "עזרה" + +#: lib/Horde/Mime/Headers.php:521 +msgid "List-Id" +msgstr "" + +#: lib/Horde/Mime/Headers.php:517 +msgid "List-Owner" +msgstr "" + +#: lib/Horde/Mime/Headers.php:518 +msgid "List-Post" +msgstr "" + +#: lib/Horde/Mime/Headers.php:516 +msgid "List-Subscribe" +msgstr "" + +#: lib/Horde/Mime/Headers.php:515 +msgid "List-Unsubscribe" +msgstr "" + +#: lib/Horde/Mime/Mail.php:458 +msgid "Plaintext Version of Message" +msgstr "" + +#: lib/Horde/Mime/Mdn.php:213 +#, php-format +msgid "" +"The message sent on %s to %s with subject \"%s\" has been displayed.\n" +"\n" +"This is no guarantee that the message has been read or understood." +msgstr "" diff --git a/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mime/data/locale/hr/LC_MESSAGES/Horde_Mime.mo b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mime/data/locale/hr/LC_MESSAGES/Horde_Mime.mo new file mode 100644 index 0000000000000000000000000000000000000000..ae80fefaedab7caf1e2343fa2c0eccb0e6099ebc GIT binary patch literal 1435 zcmZvc&u<$=6vqczpe#RHehCB|9u=utRcm(BfWjs&ElH~w#fg==kvO5T_r*K*dd8ZW zb!pTahzg+|k+{N<12;}ca7iUjNF2D*e}E%L4*ibTsU=|Kna{l0_h#O_dCz~oc=Bt3 z_8j_~=%1s%fc_VHXvt$jyauM=tKdiAd9VjQ3w{MY4SoYY1%3xc;P>m%#_%E8ySY zX)t=C_WN~k0QnM#V`e@A;+Zg@VOhXLoInrfgckM>d&8yK-NJoBdom20%1w+@UKve0 z#;XI>mq8F)-S#%^vvuK%IiNN>CkHHAdMZnmQ@@Z__B~rtnm8UyRg%ne3$=`vTtjRt z=i{rkU#Kb9!WNg4de+Ko?%vXD>uJY0U(aq-J=eFYH@CW}-J^w0DV6s8ssBIEx&_m? z_L3ZHPjGz6kvCzyrF=oyXvlp}XP4YrDx{+xv!)y&DCKR=8&T9Plq3AKp+SWU;xHy( zNRMH$`y*4!GACoH(m5jKjmaCLV@)_DZsqYjd>L&SoAW1aHRfoKC&v1??FK53Kdc5W z?wX8po?a;tFxM!8YQxw;)Yfd^+l)jg(yniuShTgWsi*#`*S4wYeM*FfvobZ18Dp!44Kb9La`O3!Cy&d+A!d`}{ zMmz=_cUg`zQt7JxkH5z{85K5ax7ybh_fH#1v|$iT4F_&daFg(e?;z|-ugy})v2Wh& zUXNE7dcn~Hw(&LHH@VV-j8=QfN1d{=vW%}AJ4UAI$xL+3OKVh5o9FdXnlzg!ojXTi zn!MFaQ~H1sf;!~O&E?}y>&=xgomnL7X+n4I)F#kLF2E**&GLn{NbL6HR1Mi7tH?^! zOlj`_tfoj>RhPBVs$qk!eer^7K={sOVUUh zGCg&4Pb<8^2sJnVfPaBfVo%h{;cP_Z@Ysy&V!?S6t48t=DxpjaX{MnZAKg=wOA4Rs W{U_F7&4-;-iQ|i@Ji5y;5)T2h5|EVu literal 0 HcmV?d00001 diff --git a/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mime/data/locale/hr/LC_MESSAGES/Horde_Mime.po b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mime/data/locale/hr/LC_MESSAGES/Horde_Mime.po new file mode 100644 index 00000000..8685b18f --- /dev/null +++ b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mime/data/locale/hr/LC_MESSAGES/Horde_Mime.po @@ -0,0 +1,78 @@ +# Croatian translations for Horde_Mime module. +# Copyright 2010-2017 Horde LLC (http://www.horde.org/) +# This file is distributed under the same license as the Horde_Mime module. +# Valentin Vidic , 2011. +# +msgid "" +msgstr "" +"Project-Id-Version: Horde_Mime\n" +"Report-Msgid-Bugs-To: dev@lists.horde.org\n" +"POT-Creation-Date: 2011-11-04 15:10+0100\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/Mime/Mdn.php:191 +msgid "Disposition Notification" +msgstr "Obavijest o raspoloživosti" + +#: lib/Horde/Mime/Mail.php:457 +msgid "HTML Version of Message" +msgstr "HTML verzija poruke" + +#: lib/Horde/Mime/Mail.php:401 +#, php-format +msgid "Invalid character in e-mail address: %s." +msgstr "Neispravan znak u e-mail adresi: %s." + +#: lib/Horde/Mime/Headers.php:534 +msgid "List-Archive" +msgstr "Lista-Arhiva" + +#: lib/Horde/Mime/Headers.php:529 +msgid "List-Help" +msgstr "Lista-Pomoć" + +#: lib/Horde/Mime/Headers.php:536 +msgid "List-Id" +msgstr "ID liste" + +# vlasnik? +#: lib/Horde/Mime/Headers.php:532 +msgid "List-Owner" +msgstr "Vlasnik liste" + +# Lista - Šalji +#: lib/Horde/Mime/Headers.php:533 +msgid "List-Post" +msgstr "Pošiljanje na listu" + +# Lista - Pretplati ili Prijavi se +#: lib/Horde/Mime/Headers.php:531 +msgid "List-Subscribe" +msgstr "Pretplati se na listu" + +#: lib/Horde/Mime/Headers.php:530 +msgid "List-Unsubscribe" +msgstr "Odjavi sa liste" + +#: lib/Horde/Mime/Mail.php:455 +msgid "Plaintext Version of Message" +msgstr "Poruka kao obični tekst" + +#: lib/Horde/Mime/Mdn.php:203 +#, php-format +msgid "" +"The message sent on %s to %s with subject \"%s\" has been displayed.\n" +"\n" +"This is no guarantee that the message has been read or understood." +msgstr "" +"Poruka poslana %s za %s s temom \"%s\" je prikazana.\n" +"\n" +"To ne jamči da je poruka pročitana ili shvaćena." diff --git a/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mime/data/locale/hu/LC_MESSAGES/Horde_Mime.mo b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mime/data/locale/hu/LC_MESSAGES/Horde_Mime.mo new file mode 100644 index 0000000000000000000000000000000000000000..d6e5cc68716ad43ffeaa0b9632b3ca8067695967 GIT binary patch literal 1411 zcmZvbL2nyH6vr26DJ%$RB?J;kyhf^MMAq0L73qechBhUEm|DR_+^Vs6ygTuD#>~vR zwbd*A20d`}1<8jTP^BIamukeF4}katdI&8D0&b2A1_sT{s!NKe*RpQ=WQ_5vj&DZTi_*dAN&CP9whJq_#yZc_zZjoB7F2R zB#cm77%H*ND#Iue-{g8CsGF z<@f{le+kiUaRP5zZ%Xm(uPWvp#e_otQNJ54oQ;3ELn6Vr2}m;ey=G8oZ@3X z)W#)En~N;@qReg5)+uFtbVH(JwpIk+nl^ddy3B1LF(a*H{h(q_G}mDH~#o7bs+ zJ#B1#RNt)E;g}rrkqA5RFTYQd#uhai=_l7Jzaxe%X=7DZGN(;Sdnz+%!ioTC_)!kNiy1{OFGSR60Fjj?IrBBZf2U zPe3tCtB%w*rmmllAUD1x^St2`%~kmOH+?aVVLXd32b!r>_D%d{qp>D zxjOOdt73URwi9lC|Ap+tKOOO$TY9ec<)Sul2jrN$aOf2qp7^PvzW+^T{;8WAyZ&@A z;m#@EuP%b~Q\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/Mime/Mdn.php:188 +msgid "Disposition Notification" +msgstr "Kézbesítési értesítés" + +#: lib/Horde/Mime/Mail.php:421 +msgid "HTML Version of Message" +msgstr "A levél HTML változata" + +#: lib/Horde/Mime/Headers.php:547 +msgid "List-Archive" +msgstr "Lista archívum" + +#: lib/Horde/Mime/Headers.php:542 +msgid "List-Help" +msgstr "Lista súgó" + +#: lib/Horde/Mime/Headers.php:549 +msgid "List-Id" +msgstr "Lista azonosító" + +#: lib/Horde/Mime/Headers.php:545 +msgid "List-Owner" +msgstr "Lista tulajdonos" + +#: lib/Horde/Mime/Headers.php:546 +msgid "List-Post" +msgstr "Lista levélírás" + +#: lib/Horde/Mime/Headers.php:544 +msgid "List-Subscribe" +msgstr "Lista feliratkozás (subscribe)" + +#: lib/Horde/Mime/Headers.php:543 +msgid "List-Unsubscribe" +msgstr "Lista leiratkozás (unsubscribe)" + +#: lib/Horde/Mime/Mail.php:419 +msgid "Plaintext Version of Message" +msgstr "A levél egyszerű szöveges változata" + +#: lib/Horde/Mime/Mdn.php:200 +#, php-format +msgid "" +"The message sent on %s to %s with subject \"%s\" has been displayed.\n" +"\n" +"This is no guarantee that the message has been read or understood." +msgstr "" +"A levél, melyet %s napján küldött %s címzettnek \"%s\" tárgyban, a címzett " +"számítógépén megjelent.\n" +"Ez nem jelent garanciát arra, hogy a levelet el is olvasták és meg is " +"értették." diff --git a/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mime/data/locale/id/LC_MESSAGES/Horde_Mime.mo b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mime/data/locale/id/LC_MESSAGES/Horde_Mime.mo new file mode 100644 index 0000000000000000000000000000000000000000..3bc23ceb79229e71e73a4d6af15e615752715a4e GIT binary patch literal 379 zcmaKnF;BxV5QU3i%E-*%fejp-Fc6H82%!>@8c~&q6`A;OjS{=EFBSbE{5^gPmxT^U zJl!V`_jK?1`}pWl#9JWA0#VB^aI`RRNwEI0SAF%bh1#+jLHCSK@F1GtZ;wY zHFY!Je=ti$QhA5qC}FpustBKWvFVj{H>_K$5CLz?=c=yvzNyJO1U`42*VY-yiZ_eN F><7|cYxw{G literal 0 HcmV?d00001 diff --git a/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mime/data/locale/id/LC_MESSAGES/Horde_Mime.po b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mime/data/locale/id/LC_MESSAGES/Horde_Mime.po new file mode 100644 index 00000000..ea6805d9 --- /dev/null +++ b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mime/data/locale/id/LC_MESSAGES/Horde_Mime.po @@ -0,0 +1,71 @@ +# Indonesian translations for Horde_Mime module. +# Copyright 2010-2017 Horde LLC (http://www.horde.org/) +# This file is distributed under the same license as the Horde_Mime module. +# Automatically generated, 2010. +# +msgid "" +msgstr "" +"Project-Id-Version: Horde_Mime\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/Mime/Mdn.php:202 +msgid "Disposition Notification" +msgstr "" + +#: lib/Horde/Mime/Mail.php:460 +msgid "HTML Version of Message" +msgstr "" + +#: lib/Horde/Mime/Mail.php:404 +#, fuzzy, php-format +msgid "Invalid character in e-mail address: %s." +msgstr "Pengganti alamat email" + +#: lib/Horde/Mime/Headers.php:519 +msgid "List-Archive" +msgstr "" + +#: lib/Horde/Mime/Headers.php:514 +#, fuzzy +msgid "List-Help" +msgstr "Daftar Topik Bantuan" + +#: lib/Horde/Mime/Headers.php:521 +msgid "List-Id" +msgstr "" + +#: lib/Horde/Mime/Headers.php:517 +msgid "List-Owner" +msgstr "" + +#: lib/Horde/Mime/Headers.php:518 +msgid "List-Post" +msgstr "" + +#: lib/Horde/Mime/Headers.php:516 +#, fuzzy +msgid "List-Subscribe" +msgstr "Angka/huruf/simbol yang ditulis dibawah garis baris teks" + +#: lib/Horde/Mime/Headers.php:515 +msgid "List-Unsubscribe" +msgstr "" + +#: lib/Horde/Mime/Mail.php:458 +msgid "Plaintext Version of Message" +msgstr "" + +#: lib/Horde/Mime/Mdn.php:213 +#, php-format +msgid "" +"The message sent on %s to %s with subject \"%s\" has been displayed.\n" +"\n" +"This is no guarantee that the message has been read or understood." +msgstr "" diff --git a/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mime/data/locale/is/LC_MESSAGES/Horde_Mime.mo b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mime/data/locale/is/LC_MESSAGES/Horde_Mime.mo new file mode 100644 index 0000000000000000000000000000000000000000..e615918c10625bd110810b27193d11b555da584f GIT binary patch literal 379 zcmaKnF;BxV5QU3i%E-*%fekJ=VIUYGQA$xOHKM8lD>BL98l`q*Un=@T_?&;q1_wmu!h;_i6FsIBRbIuGZm@zM}`5ipJS_c1tHNm`r7YxyQr^L*M2473N z!DNM<4+Ld2wt@TJM5w$H4Q}sR8!4vi!J7JDlI2qclYpA|1UzU$C32Zb80J#QOyyT+ zGMAE#u)?h!qW<+QbR?*PcCppugA(JO{D$w>x@~vDpu@m1O|sC=^x7a)s5eU3tZ;wY zmGg4C|6rENWa1s6Va=RDd~ zv>(yFK>H6ZKJ8ONTmd`am*72c2^@l-fltA6;0y3$@Mkaqe{IHp123TeJNP;H7a0Bg z1O5cQ0yWz4X(2A7|Nj{wz5>tA3DE)DBRF#3~V^k=|J-~sq4_zau}Ux0D{m*Cgn zpWre0F9_>1$t%Z;1=7W91uKw*?AL_rylcCR?8aAtTjej%H*HW3l2jP8@4Mt359VK}-fe`qj zr(olEUxg82qaQd6w6N$GXe2!inGNMgftH7yw~}NqQl9V{OT`2Sgfpfvk^!HS-QO&A zEOWAsCMHLwg0*=|^qq}P((OEL($}Re>vI0Sr%Fy9@z}bM_I#o8^!B9i>A-d==jnGE z3G=N{G;LW|B>e}2bORn@Inp~aaF>?bopu`Eo7C=fmv4R3UT(Kxm_FjEik14H-Ht>> z1~`=0GFaE8^+~WL_Rpl&hg2|%0XKQFBMnYpa5`XFc1d+s%sbKbwtJf=2kf-k$%aL? z3_Ki;5o)Z`x5%q9tCdzfhqc|o-E`%|E=ID)F5NVl&6O#-v@%p7>FbG;I=yRM2`QOz z)%9!3t5pB4Eg8DDMx7h0iI_>28XX@Y2mF?H8M)PsdJAR62C5n$TSkoyRa&-WSnKP` zi1!kUB^rjb$+BI%EW|QT;HL%wZ~w+PFH(X(Ts7$ZA-icYDtQ- literal 0 HcmV?d00001 diff --git a/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mime/data/locale/it/LC_MESSAGES/Horde_Mime.po b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mime/data/locale/it/LC_MESSAGES/Horde_Mime.po new file mode 100644 index 00000000..038a7178 --- /dev/null +++ b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mime/data/locale/it/LC_MESSAGES/Horde_Mime.po @@ -0,0 +1,73 @@ +# Italian translations for Horde_Mime module. +# Copyright 2010-2017 Horde LLC (http://www.horde.org/) +# This file is distributed under the same license as the Horde_Mime module. +# Automatically generated, 2010. +# +msgid "" +msgstr "" +"Project-Id-Version: Horde_Mime\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/Mime/Mdn.php:202 +msgid "Disposition Notification" +msgstr "Notifica Disposizione" + +#: lib/Horde/Mime/Mail.php:460 +msgid "HTML Version of Message" +msgstr "HTML Versione del Messaggio" + +#: lib/Horde/Mime/Mail.php:404 +#, php-format +msgid "Invalid character in e-mail address: %s." +msgstr "Carattere non valido nell'indirizzo email : %s" + +#: lib/Horde/Mime/Headers.php:519 +msgid "List-Archive" +msgstr "Elenco-Archivio" + +#: lib/Horde/Mime/Headers.php:514 +msgid "List-Help" +msgstr "elenco-Aiuto" + +#: lib/Horde/Mime/Headers.php:521 +msgid "List-Id" +msgstr "Elenco-Id" + +#: lib/Horde/Mime/Headers.php:517 +msgid "List-Owner" +msgstr "Elenco-Proprietario" + +#: lib/Horde/Mime/Headers.php:518 +msgid "List-Post" +msgstr "Elenco-Post" + +#: lib/Horde/Mime/Headers.php:516 +msgid "List-Subscribe" +msgstr "Elenco-Sottoscrivi" + +#: lib/Horde/Mime/Headers.php:515 +msgid "List-Unsubscribe" +msgstr "Elenco-Revoca sottoscrizione" + +#: lib/Horde/Mime/Mail.php:458 +msgid "Plaintext Version of Message" +msgstr "Messaggio come testo semplice" + +#: lib/Horde/Mime/Mdn.php:213 +#, php-format +msgid "" +"The message sent on %s to %s with subject \"%s\" has been displayed.\n" +"\n" +"This is no guarantee that the message has been read or understood." +msgstr "" +"In messaggio inviato su %s a %s con oggetto \"%s\" è stato mostrato.\n" +"\n" +"Non c'è garanzia che il messaggio sia stato letto o compreso." diff --git a/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mime/data/locale/ja/LC_MESSAGES/Horde_Mime.mo b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mime/data/locale/ja/LC_MESSAGES/Horde_Mime.mo new file mode 100644 index 0000000000000000000000000000000000000000..6e08bfbcf25dc55029b744f756801cf1786761b5 GIT binary patch literal 1355 zcmb`F?{5@E7{^z|U#l^|8;#LqBx!tMX4x&6l&v)=1zYXOr5uKLWbSr)JN0ho+?gwq z@S?k?O-Ug!np#6c8X^c$K@$>EX`?UvHw;q4!hS5n0o_hoag$wjc;?J6z3U;J(nF%+G$j%mQ+FunUD{q7E_|e?7|tV zlqSeWJXQ9OoFXNz6svP*LMTn&No%o~=`Y53qg9y4qk_lJBs?wDvQ)azPPD74mWpbB z*U3aZG?W`mB$|J!|0`i7=A>C9CyFPUpq>Fmw6yaXp<{wT)4Zn1z5%t5#7vPY=Lv~$ zvIaZLBhPg!u}}nGB1yf?Qif!l=$L6tJJBC*O*xB*Oi4S5&;TuES3+9Y&5qW!Lf zWK5K_5%Lt7x*+dNP?i}cL;tH3^!82p;UuunW8L_ z%BCP6h-N!w#HdRQHR&S|Bf?-mqBmS^^ioVD3u!=*LC69zAf%m3&&~+Ysy|DRn_F(qX z*2=Zw>295$H`y)IxnepUldqZ1y2)3Im-s)w-hbujWnD6zA5DJMbZ(o@oXKyR{1?-i zM@`QCrE42&-~73LX+W9TZ1dLg=I8Us&&UA=3vMU!7J z*{>#BGTDlm&E1~1VCUIvYkBqldFVfMzrSgntm}%&7VyhtxykYCGn4(aad)nJ{oCzW aJqH+nyWG98ZnEnpyVy&xZ1S&=!1){6-OU>S literal 0 HcmV?d00001 diff --git a/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mime/data/locale/ja/LC_MESSAGES/Horde_Mime.po b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mime/data/locale/ja/LC_MESSAGES/Horde_Mime.po new file mode 100644 index 00000000..2842135b --- /dev/null +++ b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mime/data/locale/ja/LC_MESSAGES/Horde_Mime.po @@ -0,0 +1,69 @@ +# Japanese translation for Horde. +# Copyright 2004-2017 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_Mime\n" +"Report-Msgid-Bugs-To: dev@lists.horde.org\n" +"POT-Creation-Date: 2012-08-29 13:30+0200\n" +"PO-Revision-Date: 2012-10-14 11:30+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/Mime/Mdn.php:188 +msgid "Disposition Notification" +msgstr "開封通知" + +#: lib/Horde/Mime/Mail.php:419 +msgid "HTML Version of Message" +msgstr "HTML 版のメッセージ" + +#: lib/Horde/Mime/Headers.php:540 +msgid "List-Archive" +msgstr "List-Archive" + +#: lib/Horde/Mime/Headers.php:535 +msgid "List-Help" +msgstr "List-Help" + +#: lib/Horde/Mime/Headers.php:542 +msgid "List-Id" +msgstr "List-Id" + +#: lib/Horde/Mime/Headers.php:538 +msgid "List-Owner" +msgstr "List-Owner" + +#: lib/Horde/Mime/Headers.php:539 +msgid "List-Post" +msgstr "List-Post" + +#: lib/Horde/Mime/Headers.php:537 +msgid "List-Subscribe" +msgstr "List-Subscribe" + +#: lib/Horde/Mime/Headers.php:536 +msgid "List-Unsubscribe" +msgstr "List-Unsubscribe" + +#: lib/Horde/Mime/Mail.php:417 +msgid "Plaintext Version of Message" +msgstr "メッセージのプレインテキスト版" + +#: lib/Horde/Mime/Mdn.php:200 +#, php-format +msgid "" +"The message sent on %s to %s with subject \"%s\" has been displayed.\n" +"\n" +"This is no guarantee that the message has been read or understood." +msgstr "" +"日付:%s、宛先:%s、件名:\"%s\" のメッセージが表示されました。\n" +"しかし、相手に読まれたか、あるいは了解されたかは保証できません。" diff --git a/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mime/data/locale/km/LC_MESSAGES/Horde_Mime.mo b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mime/data/locale/km/LC_MESSAGES/Horde_Mime.mo new file mode 100644 index 0000000000000000000000000000000000000000..e615918c10625bd110810b27193d11b555da584f GIT binary patch literal 379 zcmaKnF;BxV5QU3i%E-*%fekJ=VIUYGQA$xOHKM8lD>BL98l`q*Un=@T_?&;q1_wmu!h;_i6FsIBRbIuGZm@zM}`5ipJS_c1tHNm`r7YxyQr^L*M2473N z!DNM<4+Ld2wt@TJM5w$H4Q}sR8!4vi!J7JDlI2qclYpA|1UzU$C32Zb80J#QOyyT+ zGMAE#u)?h!qW<+QbR?*PcCppugA(JO{D$w>x@~vDpu@m1O|sC=^x7a)s5eU3tZ;wY zmGg4C|6rENWa1s60 z+7*jpy8mE0i)BYnU)ek^B@?|prfSM)Hom8-Q?g5@td cCM(l#yfE`v4icI z5~(+S9S}zZ7bKP=7Y;24PFyw@4*Ua1@DFh0*h9abS$1K;8qdc+p8fp3_WS+mBVP)X zqo^;TevJAQ>Yu2g#P5RZg6y7G^D4aZS-x z&PNyQXsk+EcQ$1{uUnn8=Czwz+Pc{{&eyGXi=i7?HQZZuUAz5(e$GmJ`Jw;6lMTj_ zX7wq_N$m*-UvcD3_}^51OxS25N1l$YxMMVCM?)z!rH~-!g-n}`#$c=*;nRk)0s+FA zBtK@4-@)$tOReOTjHN=SP|6#VHbvi>;3Vp#(Vl!Q+B7zm@AuS9Hn!y4SReIVrqbx` zB6HEev?!J3`5c0|<~W!(jm;YUYlG+_JcR3rHrUG+t;R_b#ji)JYZND~_{~%C={SaA zv?WUwZt7olZ&Y@1>&%(juFJTQ0fKTldt+O4L*=S)wEVW1xhdp0TUG<-b3JY5{#>KW z8Y*Nm8c3eCs0$4X){6CiEPI{arGs#jX56@Fpq+-l#T*9@clH`oR(id9IZpca^}*$6 z?Z7UaYg^jrk{+2<>8wR-L**O&ys(@{myMm_Vd;6*b?wvZR5#lv^hy%9+X)>%PN5mU z(oPb3i(-N~`sdoKVX88V&n7Y5x>eg@B0dSj1cs|8*BheCYPmBtG`F}3_KR6)vX;vo zh3CCLU1dfYGGoHxs>~&RzdK@wW0)&jXVl)DjdZZ@C5hFDg zCA&kzbIv#)@}ber#-RbnrP4~{*2ES(Exe-LA82~uVfPcfM7)Vfp)*V(Ci%~4, 2011. +# +msgid "" +msgstr "" +"Project-Id-Version: Horde_Mime\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 00:44+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/Mime/Mdn.php:191 +msgid "Disposition Notification" +msgstr "Laiško pristatymo pranešimai" + +#: lib/Horde/Mime/Mail.php:446 +msgid "HTML Version of Message" +msgstr "Laiško HTML versija" + +#: lib/Horde/Mime/Mail.php:390 +#, php-format +msgid "Invalid character in e-mail address: %s." +msgstr "Neleistinas simbolis el. pašto adrese: %s." + +#: lib/Horde/Mime/Headers.php:534 +msgid "List-Archive" +msgstr "Konferencijos archyvas" + +#: lib/Horde/Mime/Headers.php:529 +msgid "List-Help" +msgstr "Konferencijos pagalba" + +#: lib/Horde/Mime/Headers.php:536 +msgid "List-Id" +msgstr "Konferencijos ID" + +#: lib/Horde/Mime/Headers.php:532 +msgid "List-Owner" +msgstr "Konferencijos savininkas" + +#: lib/Horde/Mime/Headers.php:533 +msgid "List-Post" +msgstr "Rašyti į konferenciją" + +#: lib/Horde/Mime/Headers.php:531 +msgid "List-Subscribe" +msgstr "Prisijungti prie konferencijos" + +#: lib/Horde/Mime/Headers.php:530 +msgid "List-Unsubscribe" +msgstr "Atsijungti nuo konferencijos" + +#: lib/Horde/Mime/Mail.php:444 +msgid "Plaintext Version of Message" +msgstr "Tekstinė laiško versija" + +#: lib/Horde/Mime/Mdn.php:202 +#, php-format +msgid "" +"The message sent on %s to %s with subject \"%s\" has been displayed.\n" +"\n" +"This is no guarantee that the message has been read or understood." +msgstr "" +"Laiškas išsiųstas %s adresatui %s tema \"%s\" buvo parodytas.\n" +"\n" +"Tačiau tai negarantuoja kad laiškas buvo perskaitytas arba suprastas." diff --git a/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mime/data/locale/lv/LC_MESSAGES/Horde_Mime.mo b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mime/data/locale/lv/LC_MESSAGES/Horde_Mime.mo new file mode 100644 index 0000000000000000000000000000000000000000..bf0eec3fad1a887d9f8ce1c94caef091ad1bae8b GIT binary patch literal 1556 zcmZvbO>7%Q6vqcB6kI@1i4XB1y+(2=Dr|Sz zZb=SE5r_-NP>E|e;xjiSE}JVC?r`J8i8Dz2$Lq$CV6?Np`FJz$Yu;~{FFa;wFQLDK z{uTPG=zpU77Cyz;n_vXK0p0N@&)_TIFQC`+ zJNPyDH~1I&mrpbHF6PAr#$E@%1>Xaw;AQaF`T8HAxAmX-{L-_Gy@vS`_!hVVz76hx zbx?y}fR90_nb`=iOa6z3WrnNRGw9wQ-=0VJI$+YwH}8*c&-vemw3)WjNv-Ivc5+V+ zxSz1CUT2$jg|U7|?@>os%ZGxsRl!r4&|t(3A2?x1DiXnj%anMM7>LDGw+*%}tqa!7 zU?dAsO}0duRik!N@!lgPOf~Fk>#EUC-nRoI`}0!|ls#MMrd%o~K6n3TS#Kn0Qdvn> zC`T~7Zpmr?eJrH}Wy8rWM&(MXF=AgmC9 zp$K|{PhyhMiu#X*Ph?_Bi(04M*<5%WHNx7uM)(v|9%QiHr|m-oTB_CAzR1I6#R6Pn?t%$B(B|i+W zw4#V^Qb-V|D=iFeQiMtK{ngsTpsPh9U9hlzo4Z1Cwb)wMxpL+prtP)fZhLL9v7>V{ z5bJpRFh8c;?ZJN5K1{hSr>7@e;ZgC-I++=%%A@^!V%ctaY+arTOS76Pd`<0hb{Cl~ zf8x2bWaXrQqu z%4x<=Pm~m6%XUtuuAF+qsPKk)dC9tX>tl-zCt+uPc(#|bHFtgsg>iQ5ylaINYFr+f z)06TDsm5KLo_LD#OQmqyAs~F>t5In?GXpEtbqEi*y#WO literal 0 HcmV?d00001 diff --git a/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mime/data/locale/lv/LC_MESSAGES/Horde_Mime.po b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mime/data/locale/lv/LC_MESSAGES/Horde_Mime.po new file mode 100644 index 00000000..9a161642 --- /dev/null +++ b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mime/data/locale/lv/LC_MESSAGES/Horde_Mime.po @@ -0,0 +1,78 @@ +# Latvian translations for Horde_Mime package. +# Copyright 2011-2017 Horde LLC (http://www.horde.org/) +# This file is distributed under the same license as the Horde_Mime package. +# Automatically generated, 2011. +# +msgid "" +msgstr "" +"Project-Id-Version: Horde_Mime\n" +"Report-Msgid-Bugs-To: dev@lists.horde.org\n" +"POT-Creation-Date: 2011-05-18 12:23+0200\n" +"PO-Revision-Date: 2011-10-16 15:21+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/Mime/Mdn.php:191 +msgid "Disposition Notification" +msgstr "Izlasīšanas apstiprinājums" + +#: lib/Horde/Mime/Mail.php:446 +msgid "HTML Version of Message" +msgstr "Vēstules HTML versija" + +#: lib/Horde/Mime/Mail.php:390 +#, php-format +msgid "Invalid character in e-mail address: %s." +msgstr "Neatļauts simbols e-pasta adresē: %s." + +#: lib/Horde/Mime/Headers.php:534 +msgid "List-Archive" +msgstr "Vēstkopas arhīvs" + +#: lib/Horde/Mime/Headers.php:529 +msgid "List-Help" +msgstr "Vēstkopas palīdzība" + +#: lib/Horde/Mime/Headers.php:536 +msgid "List-Id" +msgstr "Vēstkopas ID" + +#: lib/Horde/Mime/Headers.php:532 +msgid "List-Owner" +msgstr "Vēstkopas īpašnieks" + +#: lib/Horde/Mime/Headers.php:533 +msgid "List-Post" +msgstr "Sūtījums vēstkopai" + +#: lib/Horde/Mime/Headers.php:531 +msgid "List-Subscribe" +msgstr "Parakstīties uz vēstkopu" + +#: lib/Horde/Mime/Headers.php:530 +msgid "List-Unsubscribe" +msgstr "Atrakstīties no vēstkopas" + +#: lib/Horde/Mime/Mail.php:444 +msgid "Plaintext Version of Message" +msgstr "Vēstules vienkāršā teksta versija" + +#: lib/Horde/Mime/Mdn.php:202 +#, php-format +msgid "" +"The message sent on %s to %s with subject \"%s\" has been displayed.\n" +"\n" +"This is no guarantee that the message has been read or understood." +msgstr "" +"%s lietotājam %s nosūtītā vēstule ar tematu \"%s\" ir atvērta.\n" +"\n" +"Tas gan nenozīmē, ka vēstule ir izlasīta vai saprasta." diff --git a/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mime/data/locale/mk/LC_MESSAGES/Horde_Mime.mo b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mime/data/locale/mk/LC_MESSAGES/Horde_Mime.mo new file mode 100644 index 0000000000000000000000000000000000000000..e615918c10625bd110810b27193d11b555da584f GIT binary patch literal 379 zcmaKnF;BxV5QU3i%E-*%fekJ=VIUYGQA$xOHKM8lD>BL98l`q*Un=@T_?&;q1_wmu!h;_i6FsIBRbIuGZm@zM}`5ipJS_c1tHNm`r7YxyQr^L*M2473N z!DNM<4+Ld2wt@TJM5w$H4Q}sR8!4vi!J7JDlI2qclYpA|1UzU$C32Zb80J#QOyyT+ zGMAE#u)?h!qW<+QbR?*PcCppugA(JO{D$w>x@~vDpu@m1O|sC=^x7a)s5eU3tZ;wY zmGg4C|6rENWa1s6{B?$wSOC_KmqEZ8)3arQ^*VL6`N48VZ2jSV+coxn@ zf&q!s{p36Ae;@W|XYV~g+eHqMGh`pRLcC?j0rH5*ogi4@*+D)qM&FvR{jrg-jkdxG zt;oH0Vj&9dlOQvC1%;#2l0Jj6c*V$_HYL2IqK0q|jW&*^wh|@1Z7WN2%}5FBYbmU= z-KCdywW-4FA*VwF+pcuP9WataaYVgekSJ!!AeaUX0kP0(up>;WkfaG)DDt9`3?ui XiX06{e9{kt6r`^tx+eH<3d7(FP~eOT literal 0 HcmV?d00001 diff --git a/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mime/data/locale/nb/LC_MESSAGES/Horde_Mime.po b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mime/data/locale/nb/LC_MESSAGES/Horde_Mime.po new file mode 100644 index 00000000..4bc2d013 --- /dev/null +++ b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mime/data/locale/nb/LC_MESSAGES/Horde_Mime.po @@ -0,0 +1,72 @@ +# Norwegian Bokmal translations for Horde_Mime module. +# Copyright 2010-2017 Horde LLC (http://www.horde.org/) +# This file is distributed under the same license as the Horde_Mime module. +# Automatically generated, 2010. +# +msgid "" +msgstr "" +"Project-Id-Version: Horde_Mime\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/Mime/Mdn.php:202 +msgid "Disposition Notification" +msgstr "Melding om ordning" + +#: lib/Horde/Mime/Mail.php:460 +msgid "HTML Version of Message" +msgstr "" + +#: lib/Horde/Mime/Mail.php:404 +#, fuzzy, php-format +msgid "Invalid character in e-mail address: %s." +msgstr "Ugyldig mottaker adresse." + +#: lib/Horde/Mime/Headers.php:519 +msgid "List-Archive" +msgstr "" + +#: lib/Horde/Mime/Headers.php:514 +#, fuzzy +msgid "List-Help" +msgstr "Emner i Hjelp" + +#: lib/Horde/Mime/Headers.php:521 +msgid "List-Id" +msgstr "" + +#: lib/Horde/Mime/Headers.php:517 +msgid "List-Owner" +msgstr "" + +#: lib/Horde/Mime/Headers.php:518 +msgid "List-Post" +msgstr "" + +#: lib/Horde/Mime/Headers.php:516 +#, fuzzy +msgid "List-Subscribe" +msgstr "Undertekst" + +#: lib/Horde/Mime/Headers.php:515 +msgid "List-Unsubscribe" +msgstr "" + +#: lib/Horde/Mime/Mail.php:458 +msgid "Plaintext Version of Message" +msgstr "" + +#: lib/Horde/Mime/Mdn.php:213 +#, php-format +msgid "" +"The message sent on %s to %s with subject \"%s\" has been displayed.\n" +"\n" +"This is no guarantee that the message has been read or understood." +msgstr "" diff --git a/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mime/data/locale/nl/LC_MESSAGES/Horde_Mime.mo b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mime/data/locale/nl/LC_MESSAGES/Horde_Mime.mo new file mode 100644 index 0000000000000000000000000000000000000000..e5acf5df8b78f086296edbf0f83abb9d2d5384fc GIT binary patch literal 1326 zcmZvb-)`JQ6vhoLv^5kcLV^n~e0=d`gz-M+=a|niuVMa; zDTCgMqR+tV;HO{?itjOa1$+!%0yP+ePgd*C!4F`+06zj>f)f7^@CEo6_$THMZ%5H5 zu>ZZ##lLznimt-m043fQcp1C}O1%5vd*CBb;!eO1K@WZb{tEsE{thC1^e(0hi6sNe z?LfLVju=wE^n_B{T+)|}cjU3B{la=3v^DgT4SJ@hN{nbQ9v;#oc3!^N84cNcRdRHw zeMs)OX{DDdW5D&ITRtc{9-SF>-RsEu(7ioqCVuMlWVP#|@vjy}wbCZ=FX2rI#}(7O zOHQ6mAk?$rDOh=)=}-{@o$xf!jSYW;D&=XyY^XqIwR*}$FOJ8R_Jp6YR5r>fBx4Gd z3V57Hf3?-ID#$u&Oo0Ok))u{J@kr`cfCk_f6@O zvCXOA;RQ(2W# zZegpzd6b-tSyPz|1bO8Hz!la!-L`e`8j00G`?$bs0M{RU7#bm%&&3$ z+U(G@QqFVOeK@|CY@ho{!83NrzM0xWn=+^Ei4O6oZk(!1ieM zJXvd+XDe&aw4#;|2YaiveO;CsyE1dGrH%E%Y;8l_0k;tN)CYP)_5p`= zB~(C>4cUcA+lQusW=Nq@m~*(P+C%-&?>iBCDgS`7RXUoL Xu+?j6T8EmS!3Y2B373u+*c|-_6)|yj literal 0 HcmV?d00001 diff --git a/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mime/data/locale/nl/LC_MESSAGES/Horde_Mime.po b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mime/data/locale/nl/LC_MESSAGES/Horde_Mime.po new file mode 100644 index 00000000..8de28270 --- /dev/null +++ b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mime/data/locale/nl/LC_MESSAGES/Horde_Mime.po @@ -0,0 +1,71 @@ +# Dutch translations for Horde_Mime module. +# Copyright 2010-2017 Horde LLC (http://www.horde.org/) +# This file is distributed under the same license as the Horde_Mime module. +# +# Arjen de Korte , 2012. +msgid "" +msgstr "" +"Project-Id-Version: Horde_Mime\n" +"Report-Msgid-Bugs-To: dev@lists.horde.org\n" +"POT-Creation-Date: 2012-08-29 13:30+0200\n" +"PO-Revision-Date: 2012-11-03 12:15+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/Mime/Mdn.php:188 +msgid "Disposition Notification" +msgstr "Ontvangstbevestiging" + +#: lib/Horde/Mime/Mail.php:419 +msgid "HTML Version of Message" +msgstr "HTML versie van bericht" + +#: lib/Horde/Mime/Headers.php:540 +msgid "List-Archive" +msgstr "Lijst-Archief" + +#: lib/Horde/Mime/Headers.php:535 +msgid "List-Help" +msgstr "Lijst-Hulp" + +#: lib/Horde/Mime/Headers.php:542 +msgid "List-Id" +msgstr "Lijst-ID" + +#: lib/Horde/Mime/Headers.php:538 +msgid "List-Owner" +msgstr "Lijst-Eigenaar" + +#: lib/Horde/Mime/Headers.php:539 +msgid "List-Post" +msgstr "Lijst-Adres" + +#: lib/Horde/Mime/Headers.php:537 +msgid "List-Subscribe" +msgstr "Lijst-Aanmelding" + +#: lib/Horde/Mime/Headers.php:536 +msgid "List-Unsubscribe" +msgstr "Lijst-Afmelding" + +#: lib/Horde/Mime/Mail.php:417 +msgid "Plaintext Version of Message" +msgstr "Platte tekst versie van bericht" + +#: lib/Horde/Mime/Mdn.php:200 +#, php-format +msgid "" +"The message sent on %s to %s with subject \"%s\" has been displayed.\n" +"\n" +"This is no guarantee that the message has been read or understood." +msgstr "" +"Het bericht dat u op %s stuurde aan %s met als onderwerp \"%s\" is " +"weergegeven.\n" +"\n" +"Er is geen garantie dat het bericht is gelezen of begrepen." diff --git a/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mime/data/locale/nn/LC_MESSAGES/Horde_Mime.mo b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mime/data/locale/nn/LC_MESSAGES/Horde_Mime.mo new file mode 100644 index 0000000000000000000000000000000000000000..427504f5af3ef20f8b1cb764c3ec842b318c7541 GIT binary patch literal 422 zcmaKnQA@)x6on`H)JLCvh~R^wceeGxno&^ahJzKysJ=>UuURBbN|FxuL;QRG7H<{Y zgWw?_Nyy=zlh6IVj{#|iI3SLQUE+-Bl@XdAuW0W*zgjr^hE;%B4NvI2vWByJ>uP*1 zRD;nHTk8T8UaA^yJL#dcoYlC#*2)JzT=mwWbuwB!lrVNE0*!z>5sneLk)V0# literal 0 HcmV?d00001 diff --git a/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mime/data/locale/nn/LC_MESSAGES/Horde_Mime.po b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mime/data/locale/nn/LC_MESSAGES/Horde_Mime.po new file mode 100644 index 00000000..9551f616 --- /dev/null +++ b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mime/data/locale/nn/LC_MESSAGES/Horde_Mime.po @@ -0,0 +1,71 @@ +# Norwegian Nynorsk translations for Horde_Mime module. +# Copyright 2010-2017 Horde LLC (http://www.horde.org/) +# This file is distributed under the same license as the Horde_Mime module. +# Automatically generated, 2010. +# +msgid "" +msgstr "" +"Project-Id-Version: Horde_Mime\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/Mime/Mdn.php:202 +msgid "Disposition Notification" +msgstr "" + +#: lib/Horde/Mime/Mail.php:460 +msgid "HTML Version of Message" +msgstr "" + +#: lib/Horde/Mime/Mail.php:404 +#, php-format +msgid "Invalid character in e-mail address: %s." +msgstr "" + +#: lib/Horde/Mime/Headers.php:519 +msgid "List-Archive" +msgstr "" + +#: lib/Horde/Mime/Headers.php:514 +#, fuzzy +msgid "List-Help" +msgstr "Vis emne frå Hjelp" + +#: lib/Horde/Mime/Headers.php:521 +msgid "List-Id" +msgstr "" + +#: lib/Horde/Mime/Headers.php:517 +msgid "List-Owner" +msgstr "" + +#: lib/Horde/Mime/Headers.php:518 +msgid "List-Post" +msgstr "" + +#: lib/Horde/Mime/Headers.php:516 +msgid "List-Subscribe" +msgstr "" + +#: lib/Horde/Mime/Headers.php:515 +msgid "List-Unsubscribe" +msgstr "" + +#: lib/Horde/Mime/Mail.php:458 +msgid "Plaintext Version of Message" +msgstr "" + +#: lib/Horde/Mime/Mdn.php:213 +#, php-format +msgid "" +"The message sent on %s to %s with subject \"%s\" has been displayed.\n" +"\n" +"This is no guarantee that the message has been read or understood." +msgstr "" diff --git a/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mime/data/locale/pl/LC_MESSAGES/Horde_Mime.mo b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mime/data/locale/pl/LC_MESSAGES/Horde_Mime.mo new file mode 100644 index 0000000000000000000000000000000000000000..03308bc72ddc8d40a826c7e61139d309749ad51d GIT binary patch literal 480 zcmaJ+%TB{E5G;aIj+{C8097k+aZ)5g+VCo^sMLt63S5y%meeS#1tZ@w{>A?sv?rZ^12kpn$FxwJ4zSc^dY4K4cy`gddDq9Bw#+H z?sN(Bqu~6Q1&pDP&R{9rs(*D8ZY)hTm!{-a>4@CaRxNOT#>;X=3Xq_2P3}#&ENWf= zO@S{WBK%PPahHsf;r4@mhj{}fElAw3s?e&1cY9iuT*w~D=3E=F@nbro;a2CIyn?1f znW$+H81H%>4k}itTs;*cYEX~j9W5}eR4$@!Sa#MF5`eSo13s7pSiH* X(yZ?@vR-fUPQ%*R<6}?I?s<)G7BGe> literal 0 HcmV?d00001 diff --git a/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mime/data/locale/pl/LC_MESSAGES/Horde_Mime.po b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mime/data/locale/pl/LC_MESSAGES/Horde_Mime.po new file mode 100644 index 00000000..2b3d1f06 --- /dev/null +++ b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mime/data/locale/pl/LC_MESSAGES/Horde_Mime.po @@ -0,0 +1,76 @@ +# Polish translations for Horde_Mime module. +# Copyright 2010-2017 Horde LLC (http://www.horde.org/) +# This file is distributed under the same license as the Horde_Mime module. +# Automatically generated, 2010. +# +msgid "" +msgstr "" +"Project-Id-Version: Horde_Mime\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/Mime/Mdn.php:202 +#, fuzzy +msgid "Disposition Notification" +msgstr "Rozmieszczenie" + +#: lib/Horde/Mime/Mail.php:460 +msgid "HTML Version of Message" +msgstr "" + +#: lib/Horde/Mime/Mail.php:404 +#, fuzzy, php-format +msgid "Invalid character in e-mail address: %s." +msgstr "Nieprawidłowy adres docelowy." + +#: lib/Horde/Mime/Headers.php:519 +msgid "List-Archive" +msgstr "" + +#: lib/Horde/Mime/Headers.php:514 +#, fuzzy +msgid "List-Help" +msgstr "Wyświetl tematy pomocy" + +#: lib/Horde/Mime/Headers.php:521 +msgid "List-Id" +msgstr "" + +#: lib/Horde/Mime/Headers.php:517 +msgid "List-Owner" +msgstr "" + +#: lib/Horde/Mime/Headers.php:518 +msgid "List-Post" +msgstr "" + +#: lib/Horde/Mime/Headers.php:516 +#, fuzzy +msgid "List-Subscribe" +msgstr "Podkreślenie" + +#: lib/Horde/Mime/Headers.php:515 +msgid "List-Unsubscribe" +msgstr "" + +#: lib/Horde/Mime/Mail.php:458 +msgid "Plaintext Version of Message" +msgstr "" + +#: lib/Horde/Mime/Mdn.php:213 +#, fuzzy, php-format +msgid "" +"The message sent on %s to %s with subject \"%s\" has been displayed.\n" +"\n" +"This is no guarantee that the message has been read or understood." +msgstr "" +"Wiadomość wysłana %s do %s z tematem \"%s\" została wyświetlona.\n" +"Nie ma gwarancji, że wiadomość została przeczytana albo zrozumiana." diff --git a/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mime/data/locale/pt/LC_MESSAGES/Horde_Mime.mo b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mime/data/locale/pt/LC_MESSAGES/Horde_Mime.mo new file mode 100644 index 0000000000000000000000000000000000000000..4eb07779c493538624944516dff29e9b53aa15c9 GIT binary patch literal 853 zcmaKq&2G~`5XTL)e3%abvXtRgUk+EXz(w%CS+DN&G&OX~|Mf z$DHL65n)UI)7_vq*j;WgYy|#}l9o$UI4#hsliKWTN^-wL!iR0&`!mh?hxvPjzepCN zuKa3L*hY>Kzb?g0tprZWgn7L#Nf>d5fGr<&m0U^0pmSl&{1Z3Jl*RNdTZs)_1B+AO G9{dJ%edXBz literal 0 HcmV?d00001 diff --git a/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mime/data/locale/pt/LC_MESSAGES/Horde_Mime.po b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mime/data/locale/pt/LC_MESSAGES/Horde_Mime.po new file mode 100644 index 00000000..2ccb4680 --- /dev/null +++ b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mime/data/locale/pt/LC_MESSAGES/Horde_Mime.po @@ -0,0 +1,72 @@ +# Portuguese translations for Horde_Mime module. +# Copyright 2010-2017 Horde LLC (http://www.horde.org/) +# This file is distributed under the same license as the Horde_Mime module. +# Automatically generated, 2010. +# +msgid "" +msgstr "" +"Project-Id-Version: Horde_Mime\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/Mime/Mdn.php:202 +msgid "Disposition Notification" +msgstr "Notificação de Disposição" + +#: lib/Horde/Mime/Mail.php:460 +msgid "HTML Version of Message" +msgstr "" + +#: lib/Horde/Mime/Mail.php:404 +#, fuzzy, php-format +msgid "Invalid character in e-mail address: %s." +msgstr "Endereço de destino inválido." + +#: lib/Horde/Mime/Headers.php:519 +msgid "List-Archive" +msgstr "Listagem-Arquivo" + +#: lib/Horde/Mime/Headers.php:514 +msgid "List-Help" +msgstr "Listagem-Ajuda" + +#: lib/Horde/Mime/Headers.php:521 +msgid "List-Id" +msgstr "ID da Lista" + +#: lib/Horde/Mime/Headers.php:517 +msgid "List-Owner" +msgstr "Listagem-Dono" + +#: lib/Horde/Mime/Headers.php:518 +msgid "List-Post" +msgstr "Listagem-Submissões" + +#: lib/Horde/Mime/Headers.php:516 +msgid "List-Subscribe" +msgstr "Listagem-Subscritas" + +#: lib/Horde/Mime/Headers.php:515 +msgid "List-Unsubscribe" +msgstr "Listagem-Não subscritas" + +#: lib/Horde/Mime/Mail.php:458 +msgid "Plaintext Version of Message" +msgstr "" + +#: lib/Horde/Mime/Mdn.php:213 +#, fuzzy, php-format +msgid "" +"The message sent on %s to %s with subject \"%s\" has been displayed.\n" +"\n" +"This is no guarantee that the message has been read or understood." +msgstr "" +"A mensagem enviada em %s para %s com assunto \"%s\" foi mostrada.\n" +"Não há garantia de que a mensagem tenha sido realmente lida ou compreendida." diff --git a/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mime/data/locale/pt_BR/LC_MESSAGES/Horde_Mime.mo b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mime/data/locale/pt_BR/LC_MESSAGES/Horde_Mime.mo new file mode 100644 index 0000000000000000000000000000000000000000..dd64651d5d129f80e084a437bfe51848fc6fe6f4 GIT binary patch literal 1256 zcmb`F-A)rh6vtNuKUU+{4PIz+AR*D{)-4hxOE4lI0n>lhpj0ar`f(PI< zI0Ysk`)-3bz+LbfsK5~1AMGE5x3N9}?}Dcw$NvJJfM?(U_U>{JJi_|hl`79qkmLUX zIsW8C75@&%@uxuEp8+}kGmzsig419FJOVX{@WE9W4?fES+rxqI!OhW}>*t&(CAbdb z_&g^0v#MO*IOUbm^xk;2r#gZc!A9C_&_`(<|6}&3DV-C!3>wP$XxVnUYA{-C$f93u zZ)O#@4z#q@v}K&HW*^G7>sZwuo!ZgvVxv_ErM*1#|4Nv4CH1Q0>(lhuNjHJl{c%%V|O6522}leQs_-(Qxwt+b#V@0Hp6c~vZsBP>7sqgnw&g(a1C0IRsE*$YisARF z@@ojZNQz6jLU>~nS}wimA$~^`#S!HakAXB<*bo}G&t;TK(Mw3x7xZ7%o%takyg8IE`dSeN@d4_8cu%dXYL^VV(3#JL!6~F!tl3_N0y0bjM^$=Ls#el@D7* zX+;sO8{2aU>Hcu(mgW|znl3%o^qT5V7Q^6NlV@MgJ{$CtMuHu#1AYnKABr^-5UFO7 z_A15wXO*5O`y&s@9;Il5p;l>4uneJA1(4JOCEy7M$g~g5F*~M5hJMw+jbS2CsjQj!?QW%mNUWJ=_~Yh-*d_zi0MT*UwY literal 0 HcmV?d00001 diff --git a/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mime/data/locale/pt_BR/LC_MESSAGES/Horde_Mime.po b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mime/data/locale/pt_BR/LC_MESSAGES/Horde_Mime.po new file mode 100644 index 00000000..9fe54c61 --- /dev/null +++ b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mime/data/locale/pt_BR/LC_MESSAGES/Horde_Mime.po @@ -0,0 +1,69 @@ +# Portuguese translations for Horde_Mime module. +# Copyright 2010-2017 Horde LLC (http://www.horde.org/) +# This file is distributed under the same license as the Horde_Mime module. +# Automatically generated, 2010. +# +msgid "" +msgstr "" +"Project-Id-Version: Horde_Mime\n" +"Report-Msgid-Bugs-To: dev@lists.horde.org\n" +"POT-Creation-Date: 2014-06-04 11:28+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/Mime/Mdn.php:188 +msgid "Disposition Notification" +msgstr "Notificação de Disposição" + +#: lib/Horde/Mime/Mail.php:421 +msgid "HTML Version of Message" +msgstr "Versão HTML da Mensagem" + +#: lib/Horde/Mime/Headers.php:547 +msgid "List-Archive" +msgstr "List-Archive" + +#: lib/Horde/Mime/Headers.php:542 +msgid "List-Help" +msgstr "List-Help" + +#: lib/Horde/Mime/Headers.php:549 +msgid "List-Id" +msgstr "List-Id" + +#: lib/Horde/Mime/Headers.php:545 +msgid "List-Owner" +msgstr "List-Owner" + +#: lib/Horde/Mime/Headers.php:546 +msgid "List-Post" +msgstr "List-Post" + +#: lib/Horde/Mime/Headers.php:544 +msgid "List-Subscribe" +msgstr "List-Subscribe" + +#: lib/Horde/Mime/Headers.php:543 +msgid "List-Unsubscribe" +msgstr "List-Unsubscribe" + +#: lib/Horde/Mime/Mail.php:419 +msgid "Plaintext Version of Message" +msgstr "Versão da Mensagem em Texto Puro" + +#: lib/Horde/Mime/Mdn.php:200 +#, php-format +msgid "" +"The message sent on %s to %s with subject \"%s\" has been displayed.\n" +"\n" +"This is no guarantee that the message has been read or understood." +msgstr "" +"A mensagem enviada em %s para %s com o assunto \"%s\" foi exibida.\n" +"\n" +"Isto não garante que a mensagem foi lida ou entendida." diff --git a/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mime/data/locale/ro/LC_MESSAGES/Horde_Mime.mo b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mime/data/locale/ro/LC_MESSAGES/Horde_Mime.mo new file mode 100644 index 0000000000000000000000000000000000000000..7350a190fab9c339ff926a3074ad710fb7a696a1 GIT binary patch literal 468 zcmaKo!Ab)$5QY^!?a{M`IcTwHYIb|Drmk9R#f272UA#)%9k-EfvLtD-(AV(d!}%=E zTCfMfAwQW(KIWg~Yj5{si(;F!PdXs&kWNT-bV#3cc}{!H{KnXtH_SXsa`uGQDWe74 z8=K?vNX;;qU}dalBUh-L-OLNeQX?S8#dWEicdcoSwu~);@k7e`7Nw^a>{fad5b=<+ zdbNRvB04+f5$6Q52`*G^^)EM+&a>1??Mms570{b|Go${QEXySnsL_&59t@=}=CVMR zqMQj(VMqU&Zj_7$n+Jw19`ud&sL5ej(WoBZ{b^N7rMr+#rFH1z-eW&WHe5Z)D_So^YK3OEQjqMXBOMaf~vIb70dqXFyU Pg8r-7Br+s2>IPfi)Ix)f literal 0 HcmV?d00001 diff --git a/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mime/data/locale/ro/LC_MESSAGES/Horde_Mime.po b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mime/data/locale/ro/LC_MESSAGES/Horde_Mime.po new file mode 100644 index 00000000..d6adbbc2 --- /dev/null +++ b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mime/data/locale/ro/LC_MESSAGES/Horde_Mime.po @@ -0,0 +1,72 @@ +# Romanian translations for Horde_Mime module. +# Copyright 2010-2017 Horde LLC (http://www.horde.org/) +# This file is distributed under the same license as the Horde_Mime module. +# Automatically generated, 2010. +# +msgid "" +msgstr "" +"Project-Id-Version: Horde_Mime\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/Mime/Mdn.php:202 +msgid "Disposition Notification" +msgstr "" + +#: lib/Horde/Mime/Mail.php:460 +msgid "HTML Version of Message" +msgstr "" + +#: lib/Horde/Mime/Mail.php:404 +#, php-format +msgid "Invalid character in e-mail address: %s." +msgstr "" + +#: lib/Horde/Mime/Headers.php:519 +msgid "List-Archive" +msgstr "" + +#: lib/Horde/Mime/Headers.php:514 +#, fuzzy +msgid "List-Help" +msgstr "Lista subiectelor din Help" + +#: lib/Horde/Mime/Headers.php:521 +msgid "List-Id" +msgstr "" + +#: lib/Horde/Mime/Headers.php:517 +msgid "List-Owner" +msgstr "" + +#: lib/Horde/Mime/Headers.php:518 +msgid "List-Post" +msgstr "" + +#: lib/Horde/Mime/Headers.php:516 +msgid "List-Subscribe" +msgstr "" + +#: lib/Horde/Mime/Headers.php:515 +msgid "List-Unsubscribe" +msgstr "" + +#: lib/Horde/Mime/Mail.php:458 +msgid "Plaintext Version of Message" +msgstr "" + +#: lib/Horde/Mime/Mdn.php:213 +#, php-format +msgid "" +"The message sent on %s to %s with subject \"%s\" has been displayed.\n" +"\n" +"This is no guarantee that the message has been read or understood." +msgstr "" diff --git a/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mime/data/locale/ru/LC_MESSAGES/Horde_Mime.mo b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mime/data/locale/ru/LC_MESSAGES/Horde_Mime.mo new file mode 100644 index 0000000000000000000000000000000000000000..9a919d8a982f115f55a1563de86f96ee3c924cb7 GIT binary patch literal 496 zcmaKn&rSj{5XLcj+M{O=W1>W&#da|f7uJ6WkpvlsI6jNB z5anRvq+dFd{=S*%*Y3_oiDHYiM>-&FlTJuQ)JdQ8ctLl;{KmkVHynA^P1zG#r;Lu^ z-q;kM`)Y#05U0j^)_0jo+3hTIEHM$JIKR%7^R7BB(5kUnFnCB<%cAtug561v5rkZD zR-77e5ryZ+Jmj1}HpICqM*Yk6r1LDXQoCGwVt_11bVtEU0iFxI*pI?q2O^Wpj?I`<@>P^a0MI)r}{Du df1aB0S&^=2 && n%" +"10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n" + +#: lib/Horde/Mime/Mdn.php:202 +#, fuzzy +msgid "Disposition Notification" +msgstr "Настройки оповещения" + +#: lib/Horde/Mime/Mail.php:460 +#, fuzzy +msgid "HTML Version of Message" +msgstr "Следующее сообшение" + +#: lib/Horde/Mime/Mail.php:404 +#, fuzzy, php-format +msgid "Invalid character in e-mail address: %s." +msgstr "Рабочий адрес" + +# fuzzy +#: lib/Horde/Mime/Headers.php:519 +#, fuzzy +msgid "List-Archive" +msgstr "Искать" + +#: lib/Horde/Mime/Headers.php:514 +#, fuzzy +msgid "List-Help" +msgstr "Список разделов подсказки" + +#: lib/Horde/Mime/Headers.php:521 +#, fuzzy +msgid "List-Id" +msgstr "Список разделов подсказки" + +#: lib/Horde/Mime/Headers.php:517 +#, fuzzy +msgid "List-Owner" +msgstr "Список разделов подсказки" + +#: lib/Horde/Mime/Headers.php:518 +#, fuzzy +msgid "List-Post" +msgstr "Список разделов подсказки" + +# fuzzy +#: lib/Horde/Mime/Headers.php:516 +#, fuzzy +msgid "List-Subscribe" +msgstr "Искать" + +# fuzzy +#: lib/Horde/Mime/Headers.php:515 +#, fuzzy +msgid "List-Unsubscribe" +msgstr "Искать" + +#: lib/Horde/Mime/Mail.php:458 +#, fuzzy +msgid "Plaintext Version of Message" +msgstr "В теле сообщения" + +#: lib/Horde/Mime/Mdn.php:213 +#, php-format +msgid "" +"The message sent on %s to %s with subject \"%s\" has been displayed.\n" +"\n" +"This is no guarantee that the message has been read or understood." +msgstr "" diff --git a/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mime/data/locale/sk/LC_MESSAGES/Horde_Mime.mo b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mime/data/locale/sk/LC_MESSAGES/Horde_Mime.mo new file mode 100644 index 0000000000000000000000000000000000000000..f3c8f1faa135780fb6c42a96836ff4580a09fa71 GIT binary patch literal 1307 zcmb`F(QXq*6o$7g&~{r@rChYCs_GO8N>$eEIv~OZQz!u?C=OO)dRL*b_ryENdS*K_ zYly`)>WwdX0IO2(cm-~pyanPBc!vJ7>yk?CWk){y%^aWk&&-+g=8ID=0*p^#-@u;1 z&ca^9{Gj)O;4APu@JlcSee4eSG58q#5R_mD{LAAZKzTi3gEQPT0zffpCsDMqGeT5+R!HB$6Yz*aED86T-3EAnMFTW zBOCQ~N*PaX7buu*_>Nz!B;t27mibE$4NViSEKd~N>%#|Vse zcq07+oW!j}F+vkcuBX?oHgQ`5FVe@QY$2RBDLv3r-lN?r(}g`aq?`MG-LlK|Z7v2< zwCusHa7!qZW5iLP#W*FItg3$<_wSgL!tQ4G-pS>YRvg~dsH8&n!xGoOi`%S5!t6(S2>kHYHWoOWRplqh{KH3 z>VXkcTx5<;-e!IZ&1#=%ay%CYG+oS1bs#R&@he_lPEfrMqDQmEOIK$S1rIcpdYJ37 HmJ0p?wz+dF literal 0 HcmV?d00001 diff --git a/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mime/data/locale/sk/LC_MESSAGES/Horde_Mime.po b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mime/data/locale/sk/LC_MESSAGES/Horde_Mime.po new file mode 100644 index 00000000..81d90854 --- /dev/null +++ b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mime/data/locale/sk/LC_MESSAGES/Horde_Mime.po @@ -0,0 +1,70 @@ +# Slovak translations for Horde_Mime module. +# Copyright 2010-2017 Horde LLC (http://www.horde.org/) +# This file is distributed under the same license as the Horde_Mime module. +# Martin Matuška , 2011 +# Jozef Sudolský , 2013 +# +msgid "" +msgstr "" +"Project-Id-Version: Horde_Mime\n" +"Report-Msgid-Bugs-To: dev@lists.horde.org\n" +"POT-Creation-Date: 2012-08-29 13:30+0200\n" +"PO-Revision-Date: 2013-02-01 17:54+0200\n" +"Last-Translator: Jozef Sudolsky \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/Mime/Mdn.php:188 +msgid "Disposition Notification" +msgstr "Potvrdenie o doručení" + +#: lib/Horde/Mime/Mail.php:419 +msgid "HTML Version of Message" +msgstr "HTML verzia správy" + +#: lib/Horde/Mime/Headers.php:540 +msgid "List-Archive" +msgstr "List-Archive" + +#: lib/Horde/Mime/Headers.php:535 +msgid "List-Help" +msgstr "List-Help" + +#: lib/Horde/Mime/Headers.php:542 +msgid "List-Id" +msgstr "List-Id" + +#: lib/Horde/Mime/Headers.php:538 +msgid "List-Owner" +msgstr "List-Owner" + +#: lib/Horde/Mime/Headers.php:539 +msgid "List-Post" +msgstr "List-Post" + +#: lib/Horde/Mime/Headers.php:537 +msgid "List-Subscribe" +msgstr "List-Subscribe" + +#: lib/Horde/Mime/Headers.php:536 +msgid "List-Unsubscribe" +msgstr "List-Unsubscribe" + +#: lib/Horde/Mime/Mail.php:417 +msgid "Plaintext Version of Message" +msgstr "Verzia správy v čistom texte" + +#: lib/Horde/Mime/Mdn.php:200 +#, php-format +msgid "" +"The message sent on %s to %s with subject \"%s\" has been displayed.\n" +"\n" +"This is no guarantee that the message has been read or understood." +msgstr "" +"Správa odoslaná dňa %s pre %s s predmetom \"%s\" bola zobrazená.\n" +"\n" +"Neexistuje však záruka, že správa bola prečítaná alebo pochopená." diff --git a/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mime/data/locale/sl/LC_MESSAGES/Horde_Mime.mo b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mime/data/locale/sl/LC_MESSAGES/Horde_Mime.mo new file mode 100644 index 0000000000000000000000000000000000000000..74b94af467cd4d2ac4389116d10280817d268ee6 GIT binary patch literal 1169 zcmaJ=zi$&U6h5F(IPqITFd+0mssut8E@>sIQ~^o>QK=yj1V)e(zh0c)*^%v}v~=#q z$PNR40vjXz4Qy--Y_Ku%nG4B)gms@kfA;fx&rk2Zo}GIWVZ^{iAO}tWAAvA_02hFt zz;Pfx5Jktp=fU&f%iwVL+GKwTd=mN=_%yf)-UmMizXiSlm!S6#MbRnn`w4#lpMm~7 z;VYj2#dC0RdD>6hsOG(=`tmgyQ9n{ z9aAUC<2yNO;wt@MS}`_@+pSKrh6tfx$vxq@PPMd}CgEG8v|6v-yq?z56o$!T9;*=Q zzjhk}MepEIE*IX|I<1bpDd4{+@_dIfM!gY6#v4N8^%*A}7Db&@by@$DU30y8fA+v? zC5_h%s-+QOXNXiizw|dySEW~|*B92YZ#?ZhNS0@IA(KtE$$i~3Qt7Nt%U$K;c0RHq zPaYUsxH{?KAL$xPD^xBUSM@?QO&g6W-KLaaQpy@+btV^SZ}0EX5{_y(TD-OrN3HId zomaUbLlTW8#`%D?qM`Zx&Z~%?@U9jGty(mvplBl7rZAsgtEpa>c&qa4r#qp%T5Xx} zbf+CW@=RJa5VO;kEEW18ct$?>S8{>YlbS=%?utJ%Y2k7+HbvRD1E#LZX=u5N0-|Rh lDOhI4o3Y9TNkOFr-0%Pu-h$uK){w{*S+P4R!i!BM`VH3iMvMRe literal 0 HcmV?d00001 diff --git a/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mime/data/locale/sl/LC_MESSAGES/Horde_Mime.po b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mime/data/locale/sl/LC_MESSAGES/Horde_Mime.po new file mode 100644 index 00000000..9b288a43 --- /dev/null +++ b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mime/data/locale/sl/LC_MESSAGES/Horde_Mime.po @@ -0,0 +1,74 @@ +# Slovenian translations for Horde_Mime module. +# Copyright 2010-2017 Horde LLC (http://www.horde.org/) +# This file is distributed under the same license as the Horde_Mime module. +# Automatically generated, 2010. +# +msgid "" +msgstr "" +"Project-Id-Version: Horde_Mime\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/Mime/Mdn.php:202 +msgid "Disposition Notification" +msgstr "Obvestilo o dostavljeni pošti" + +#: lib/Horde/Mime/Mail.php:460 +msgid "HTML Version of Message" +msgstr "" + +#: lib/Horde/Mime/Mail.php:404 +#, fuzzy, php-format +msgid "Invalid character in e-mail address: %s." +msgstr "Neveljaven naslov naslovnika." + +#: lib/Horde/Mime/Headers.php:519 +msgid "List-Archive" +msgstr " Seznam Arhiva " + +#: lib/Horde/Mime/Headers.php:514 +msgid "List-Help" +msgstr "Seznam Pomoči " + +#: lib/Horde/Mime/Headers.php:521 +msgid "List-Id" +msgstr "Seznam Identitet " + +#: lib/Horde/Mime/Headers.php:517 +msgid "List-Owner" +msgstr "Seznam Lastnikov " + +#: lib/Horde/Mime/Headers.php:518 +msgid "List-Post" +msgstr "Seznam Pošte " + +#: lib/Horde/Mime/Headers.php:516 +msgid "List-Subscribe" +msgstr "Seznam Prijav " + +#: lib/Horde/Mime/Headers.php:515 +msgid "List-Unsubscribe" +msgstr "Seznam Odjav " + +#: lib/Horde/Mime/Mail.php:458 +msgid "Plaintext Version of Message" +msgstr "" + +#: lib/Horde/Mime/Mdn.php:213 +#, php-format +msgid "" +"The message sent on %s to %s with subject \"%s\" has been displayed.\n" +"\n" +"This is no guarantee that the message has been read or understood." +msgstr "" +"Sporočilo poslano dne %s za %s z naslovom \"%s\" je bil prebran.\n" +"\n" +"Ni zagotovila da je bilo dejansko prebrano ali razumljeno." diff --git a/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mime/data/locale/sv/LC_MESSAGES/Horde_Mime.mo b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mime/data/locale/sv/LC_MESSAGES/Horde_Mime.mo new file mode 100644 index 0000000000000000000000000000000000000000..427504f5af3ef20f8b1cb764c3ec842b318c7541 GIT binary patch literal 422 zcmaKnQA@)x6on`H)JLCvh~R^wceeGxno&^ahJzKysJ=>UuURBbN|FxuL;QRG7H<{Y zgWw?_Nyy=zlh6IVj{#|iI3SLQUE+-Bl@XdAuW0W*zgjr^hE;%B4NvI2vWByJ>uP*1 zRD;nHTk8T8UaA^yJL#dcoYlC#*2)JzT=mwWbuwB!lrVNE0*!z>5sneLk)V0# literal 0 HcmV?d00001 diff --git a/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mime/data/locale/sv/LC_MESSAGES/Horde_Mime.po b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mime/data/locale/sv/LC_MESSAGES/Horde_Mime.po new file mode 100644 index 00000000..7254ab44 --- /dev/null +++ b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mime/data/locale/sv/LC_MESSAGES/Horde_Mime.po @@ -0,0 +1,72 @@ +# Swedish translations for Horde_Mime module. +# Copyright 2010-2017 Horde LLC (http://www.horde.org/) +# This file is distributed under the same license as the Horde_Mime module. +# Automatically generated, 2010. +# +msgid "" +msgstr "" +"Project-Id-Version: Horde_Mime\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/Mime/Mdn.php:202 +msgid "Disposition Notification" +msgstr "" + +#: lib/Horde/Mime/Mail.php:460 +msgid "HTML Version of Message" +msgstr "" + +#: lib/Horde/Mime/Mail.php:404 +#, fuzzy, php-format +msgid "Invalid character in e-mail address: %s." +msgstr "Felaktig destinationsadress." + +#: lib/Horde/Mime/Headers.php:519 +msgid "List-Archive" +msgstr "" + +#: lib/Horde/Mime/Headers.php:514 +#, fuzzy +msgid "List-Help" +msgstr "Visa hjälpämnen" + +#: lib/Horde/Mime/Headers.php:521 +msgid "List-Id" +msgstr "" + +#: lib/Horde/Mime/Headers.php:517 +msgid "List-Owner" +msgstr "" + +#: lib/Horde/Mime/Headers.php:518 +msgid "List-Post" +msgstr "" + +#: lib/Horde/Mime/Headers.php:516 +#, fuzzy +msgid "List-Subscribe" +msgstr "Nedsänkt" + +#: lib/Horde/Mime/Headers.php:515 +msgid "List-Unsubscribe" +msgstr "" + +#: lib/Horde/Mime/Mail.php:458 +msgid "Plaintext Version of Message" +msgstr "" + +#: lib/Horde/Mime/Mdn.php:213 +#, php-format +msgid "" +"The message sent on %s to %s with subject \"%s\" has been displayed.\n" +"\n" +"This is no guarantee that the message has been read or understood." +msgstr "" diff --git a/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mime/data/locale/tr/LC_MESSAGES/Horde_Mime.mo b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mime/data/locale/tr/LC_MESSAGES/Horde_Mime.mo new file mode 100644 index 0000000000000000000000000000000000000000..0852c132db8a720d47911a799018579d366ff18e GIT binary patch literal 1462 zcmZ{j&yO256vqczeht65lu8J_R$8f5HPcBdwcA-1wcFix7j4+6o1*rFoY zucN<*{w4a`=zpSzmOU3m?}9b(6!;N%4s3(3fnR~IfZu>Gf!~2K_`_oVNAL}-e*xbD ze+7e{Kfp)e-{2GUFP^W?&!4RH`(XJ05%?zf7!3D60fWtl;QQdu;A!wT@C^9Z zV*m6DQS>?1t02_OZ3LoM!+?hE2%^ym^x#iuFQbRMVba{Upf9u+!>}pcz&Pop(e$zL z@<4W2SVY^c#x8v#tP3aRfEvO%))mo?9x^34b$ZOQju)1sCXp0ODq@^lh~>26(r8yY zpIo<{o*as5u`Se~n(gq4dk?g*)wF4xuV(vY+jXpLFaElt-SI|KF{!=y%>S2Vt)8Hw zvXY$8o?!TjBX7d^K>8lxqWhxb>FkO-OFibOErceH5GXbhJdNX4PddV<4RuR62xWqN zk9iEs+mC;>f^jmIO3e`|ZwybPrZquHvcr=__;T7dmWxjtvJmlYF)-FA4cC=C*(kd% zX_=h37+zBdm`i&>G&QyxH}_h}4QL3@k!&(Aa;j&wED7Hw%4&K2%7v_+We`kmi=hlJ zwUoP(WS5idD%CFM_3T1+339s(FVccjPBCw6PS;Cs3f$jeN{y&1@EB0TA*kVfS0pXL zikxPLt?9S4F+1Gcpbs3Z6a^O;``4r|Q^CvB+YjT$PGf87aV^c_8wTOiP&pdF_V8>M z5ooE`=E>uPU%%73nXE45f@ufBCR@5=xYXU8R@>6YO;uW^lAFdB$SpmXFWq{5jjHMT zIZbEQsdj$t*m9_|@!jNB^ zyvHn`JuQyciz*05`>ZFc+6b##)1N{@NmazR$y^w=@yfo=bn^cvw5JL- zVp=i#FZY7ysAl*|OD9nw@CPHD`bRm!GcT0B(WNR$hWLb2#6|m{S96JySq9GZQ3vI0 kT+&cn9EuS_1>HyE*;56-XQ0MM-FaOhU1?\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" +"Language: tr\n" +"X-Generator: Poedit 1.8.12\n" + +#: lib/Horde/Mime/Mdn.php:202 +msgid "Disposition Notification" +msgstr "Düzen Bildirimi" + +#: lib/Horde/Mime/Mail.php:460 +msgid "HTML Version of Message" +msgstr "İletinin HTML Sürümü" + +#: lib/Horde/Mime/Mail.php:404 +#, php-format +msgid "Invalid character in e-mail address: %s." +msgstr "Elektronik Posta adresinde geçersiz karakter: %s." + +#: lib/Horde/Mime/Headers.php:519 +msgid "List-Archive" +msgstr "Listele-Arşiv" + +#: lib/Horde/Mime/Headers.php:514 +msgid "List-Help" +msgstr "Listele-Yardım" + +#: lib/Horde/Mime/Headers.php:521 +msgid "List-Id" +msgstr "Listele-Id" + +#: lib/Horde/Mime/Headers.php:517 +msgid "List-Owner" +msgstr "Listele-Sahip" + +#: lib/Horde/Mime/Headers.php:518 +msgid "List-Post" +msgstr "Listele-Gönderilmiş Öğeler" + +#: lib/Horde/Mime/Headers.php:516 +msgid "List-Subscribe" +msgstr "Listele-Sürdürümcüler" + +#: lib/Horde/Mime/Headers.php:515 +msgid "List-Unsubscribe" +msgstr "Listele-Sürdürümcü Olmayanlar" + +#: lib/Horde/Mime/Mail.php:458 +msgid "Plaintext Version of Message" +msgstr "İletinin Düz Metin Sürümü" + +#: lib/Horde/Mime/Mdn.php:213 +#, php-format +msgid "" +"The message sent on %s to %s with subject \"%s\" has been displayed.\n" +"\n" +"This is no guarantee that the message has been read or understood." +msgstr "" +"%s de %s e gönderilen \"%s\" konulu ileti görüntülendi.\n" +"\n" +"İletinin okunduğu ve/veya anlaşıldığının garantisi yoktur." diff --git a/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mime/data/locale/uk/LC_MESSAGES/Horde_Mime.mo b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mime/data/locale/uk/LC_MESSAGES/Horde_Mime.mo new file mode 100644 index 0000000000000000000000000000000000000000..daff0647660f20380464b3918c3dcd7f2d91c0ef GIT binary patch literal 1531 zcmcJO%WoS+9LE*k%oC&3o@6!;l<6#N!^9J~R#;E$8@A@~gT2jH{d z9gySv4t@mw0saiR_ORp3V;>$V?-jU&{pTRZ`4!|icR`MG59B!aC+B~H9OvkxWt?Lm z=Q#`h0Iq@vQ`iE|lRRPI*nz3@2!!MCcml%xKuSeSj>F?Ip3X_#S6UjWQhHk%xhC5Y zZ=9uOeTCi?ndTd{Ms=Ze)Dg~dx*jDmrgk^VqP7tk$&`fGi)2Dk9A{7qX+~F^6{(GP zCTn-)x+phGBI%c_<+$X<%c;o9WkYFGuHG56bUTx+iPfc4KR9S4kxY&F!2DZg&90zc znI&nF8babTnvCN4vNTu)4zn67kLwW6|)+ql^D&LRRohj%VABBZJx_#Xe}$PdEmt1tUi--n{N zD%K^x)KqWI^XLDjw-Vt+nkY&qkx^MlX9h;~;J+Ou$p&=<9s^-wcO^e#g=NH*zfJw?&R0)O>ocNwnMvb_wz5w9^{*L zOg!0<-OI1%pB~;7ABkso>@eTVw{QdP+jbYrt9IM5-$9SPji51}c-*zWP`+h%5u!LG zyF+%{-h}%hyC6IC?13HUpTNiN|Mw-?8%XX}ktxcy+sNZTs^GrdLW(2EJ{oaY;VGDK zyHNHP&iImxLp}K1xbA`@LLEa?JI=o-zPpNB^kvU(=UbBfU1X^2Vh Z^N-O}bd)2rJ0v?QpCiA<55nga=P$8c9h3k7 literal 0 HcmV?d00001 diff --git a/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mime/data/locale/uk/LC_MESSAGES/Horde_Mime.po b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mime/data/locale/uk/LC_MESSAGES/Horde_Mime.po new file mode 100644 index 00000000..7ec4130f --- /dev/null +++ b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mime/data/locale/uk/LC_MESSAGES/Horde_Mime.po @@ -0,0 +1,73 @@ +# Ukrainian translations for Horde_Mime module. +# Copyright 2010-2017 Horde LLC (http://www.horde.org/) +# This file is distributed under the same license as the Horde_Mime module. +# Automatically generated, 2010. +# +msgid "" +msgstr "" +"Project-Id-Version: Horde_Mime\n" +"Report-Msgid-Bugs-To: dev@lists.horde.org\n" +"POT-Creation-Date: 2010-10-13 01:27+0200\n" +"PO-Revision-Date: 2013-04-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/Mime/Mdn.php:202 +msgid "Disposition Notification" +msgstr "Повідомлення про розміщення" + +#: lib/Horde/Mime/Mail.php:460 +msgid "HTML Version of Message" +msgstr "HTML-версія листа" + +#: lib/Horde/Mime/Mail.php:404 +#, php-format +msgid "Invalid character in e-mail address: %s." +msgstr "Недозволений символ в адресі е-пошти: %s." + +#: lib/Horde/Mime/Headers.php:519 +msgid "List-Archive" +msgstr "List-Archive" + +#: lib/Horde/Mime/Headers.php:514 +msgid "List-Help" +msgstr "List-Help" + +#: lib/Horde/Mime/Headers.php:521 +msgid "List-Id" +msgstr "List-Id" + +#: lib/Horde/Mime/Headers.php:517 +msgid "List-Owner" +msgstr "List-Owner" + +#: lib/Horde/Mime/Headers.php:518 +msgid "List-Post" +msgstr "List-Post" + +#: lib/Horde/Mime/Headers.php:516 +msgid "List-Subscribe" +msgstr "List-Subscribe" + +#: lib/Horde/Mime/Headers.php:515 +msgid "List-Unsubscribe" +msgstr "List-Unsubscribe" + +#: lib/Horde/Mime/Mail.php:458 +msgid "Plaintext Version of Message" +msgstr "Текстова версія листа" + +#: lib/Horde/Mime/Mdn.php:213 +#, php-format +msgid "" +"The message sent on %s to %s with subject \"%s\" has been displayed.\n" +"\n" +"This is no guarantee that the message has been read or understood." +msgstr "" +"Показано лист, відісланий в %s до %s з темою \"%s\".\n" +"Немає гарантії, що лист прочитали та зрозуміли." diff --git a/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mime/data/locale/zh_CN/LC_MESSAGES/Horde_Mime.mo b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mime/data/locale/zh_CN/LC_MESSAGES/Horde_Mime.mo new file mode 100644 index 0000000000000000000000000000000000000000..f3eddc38d8384ac74c1c714fde259f0ec0503d54 GIT binary patch literal 1027 zcmaKq&rcIU6vtP^UmJggiyl0TB*YlAwM7z1jm8QXnouBE^ro41hutylOtUiuxwW7K zObn7BRsu2nFya9)9I&DO_)k1wciZ0dKk!Yu&=?aZ``ypHw{PBi^Rhphn_g?MbkIdm z3UnIu1*Fz5&;`(M&?%69NYhRN&jXJGF9FrrE55%Scn0j-z;nPDa1!_k7y-E;mFM!2 zI@^6lfG5D;2RsXW==&|764(s>JdgqBfRIW%209E<3tZY!km^hI)CAgJs%Mp7>!KpV z1(lRD)W;u61SkyG`W-VdFc^H{wkudNB+=4wn)sEV&a#k*wrt$e+Zi)EKe|%p1y>dM{>h zdy5!xg41C{Lmlj&?qbnccjJPgKv3`GFf9fZ#xl^VBv0ivm@8#BQPReaAoA8w{GQR# zh*O;m6UXRgNp4bRg;7U>N?of>tXIBn*K!M$ckeZKqu?#Cx>Ike%j=q3+;m@j^o^+L zZ@lT8w>VwRJ>QR-nRSa3zERy=sTCSu=DnS%zg?fVy~4N3+OGOb+?m;0E?+6VRYtiu zS1y)nD}{1#cQ3ctD)w?qm4#=u@y&8+=VxwQFBe~yzb{p{^4{DIxXQb`?&obNR^2Lj VQ}dNqlhqHa-o~2yDSvQA`vbpCTP6Si literal 0 HcmV?d00001 diff --git a/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mime/data/locale/zh_CN/LC_MESSAGES/Horde_Mime.po b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mime/data/locale/zh_CN/LC_MESSAGES/Horde_Mime.po new file mode 100644 index 00000000..df9f1f69 --- /dev/null +++ b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mime/data/locale/zh_CN/LC_MESSAGES/Horde_Mime.po @@ -0,0 +1,71 @@ +# Chinese translations for Horde_Mime module. +# Copyright 2010-2017 Horde LLC (http://www.horde.org/) +# This file is distributed under the same license as the Horde_Mime module. +# Automatically generated, 2010. +# +msgid "" +msgstr "" +"Project-Id-Version: Horde_Mime\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/Mime/Mdn.php:202 +msgid "Disposition Notification" +msgstr "部署通知" + +#: lib/Horde/Mime/Mail.php:460 +msgid "HTML Version of Message" +msgstr "" + +#: lib/Horde/Mime/Mail.php:404 +#, fuzzy, php-format +msgid "Invalid character in e-mail address: %s." +msgstr "无效的目的地址。" + +#: lib/Horde/Mime/Headers.php:519 +msgid "List-Archive" +msgstr "存档列表" + +#: lib/Horde/Mime/Headers.php:514 +msgid "List-Help" +msgstr "帮助列表" + +#: lib/Horde/Mime/Headers.php:521 +msgid "List-Id" +msgstr "Id列表" + +#: lib/Horde/Mime/Headers.php:517 +msgid "List-Owner" +msgstr "所有者列表" + +#: lib/Horde/Mime/Headers.php:518 +msgid "List-Post" +msgstr "发布列表" + +#: lib/Horde/Mime/Headers.php:516 +msgid "List-Subscribe" +msgstr "订阅列表" + +#: lib/Horde/Mime/Headers.php:515 +msgid "List-Unsubscribe" +msgstr "取消订阅列表" + +#: lib/Horde/Mime/Mail.php:458 +msgid "Plaintext Version of Message" +msgstr "" + +#: lib/Horde/Mime/Mdn.php:213 +#, php-format +msgid "" +"The message sent on %s to %s with subject \"%s\" has been displayed.\n" +"\n" +"This is no guarantee that the message has been read or understood." +msgstr "" +"已显示 %s 发送给 %s 且主题为“%s”的邮件。\n" +"不保证收件人已阅读或理解此封邮件。" diff --git a/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mime/data/locale/zh_TW/LC_MESSAGES/Horde_Mime.mo b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Mime/data/locale/zh_TW/LC_MESSAGES/Horde_Mime.mo new file mode 100644 index 0000000000000000000000000000000000000000..89378f36304c968d1557e7daa599b654ee46d38b GIT binary patch literal 1373 zcmaKq%WoS+9LEmt z#CC8AkVqtMLmJuyXwyb%=_6^#qd9Ry9QXs^va?=G{0SWRj@N2rK#b-$pPAopW`2*E z-wz*}H_)DfybP&Ao`w7g(Jk?SVY~KmJ?vnSp zWFstR>4hgcJW|LgO@~oVs9$_w_X3=5}v25GJwiM|R zabt)HY4&@$0vn^zVt_iM(QMF;c=C)(y=Xejg^Xq&l(Hh{v25qmX;<7=3_BKcCH++X zS7ez2CB-O8BB(0~0`Cz-ay_15vOsXrCp0I?ksfh`6f8lql)A)52^?#j+VNN{Q(%Ii zyPV`pND$5_kp)X)IJo`(QIA?S;T|cuHYz1Kx8ugJ$F&o4&^9~eOOXNY+4SQyE7I60 zI?6q1rbV9F<~yalFf%+wY&!O~gMx{8L2r$7FCQB|nK6&SgMJS4xFudM@=+J8k*dGvJVU9<0C zpN?dNdgci?$8F~3Q=~7;WXw>Lw_D{2wfJqYvK0Np;L@(zooQ7z{GCmswYa0!XQPF` zH=~xy`oj@5yB1tH+pI1J^Y!L8RkeOj)hcl#T>UCsYc%hD-`uF0!L_+yxgM-l{-M4( zsXo8jtqa%BtNIV&!o}vwZnq`)dIFBZa;;mfZd4JSzrEe94p%2zjho#%HPZ+->m5t; z&Ro#=4B + * @author Michael Slusarz + * @category Horde + * @license http://www.horde.org/licenses/lgpl21 LGPL + * @package Secret + */ +class Horde_Secret +{ + /** Generic, default keyname. */ + const DEFAULT_KEY = 'generic'; + + /** + * Configuration parameters. + * + * @var array + */ + protected $_params = array( + 'cookie_domain' => '', + 'cookie_path' => '', + 'cookie_ssl' => false, + 'session_name' => 'horde_secret' + ); + + /** + * Cipher cache. + * + * @var array + */ + protected $_cipherCache = array(); + + /** + * Key cache. + * + * @var array + */ + protected $_keyCache = array(); + + /** + * Constructor. + * + * @param array $params Configuration parameters: + * - cookie_domain: (string) The cookie domain. + * - cookie_path: (string) The cookie path. + * - cookie_ssl: (boolean) Only transmit cookie securely? + * - session_name: (string) The cookie session name. + */ + public function __construct($params = array()) + { + $this->_params = array_merge($this->_params, $params); + } + + /** + * Take a small piece of data and encrypt it with a key. + * + * @param string $key The key to use for encryption. + * @param string $message The plaintext message. + * + * @return string The ciphertext message. + * @throws Horde_Secret_Exception + */ + public function write($key, $message) + { + $message = strval($message); + return (strlen($key) && strlen($message)) + ? $this->_getCipherOb($key)->encrypt($message) + : ''; + } + + /** + * Decrypt a message encrypted with write(). + * + * @param string $key The key to use for decryption. + * @param string $message The ciphertext message. + * + * @return string The plaintext message. + * @throws Horde_Secret_Exception + */ + public function read($key, $ciphertext) + { + $ciphertext = strval($ciphertext); + return (strlen($key) && strlen($ciphertext)) + ? $this->_getCipherOb($key)->decrypt($ciphertext) + : ''; + } + + /** + * Returns the cached crypt object. + * + * @param string $key The key to use for [de|en]cryption. Only the first + * 56 bytes of this string is used. + * + * @return Horde_Crypt_Blowfish The crypt object. + * @throws Horde_Secret_Exception + */ + protected function _getCipherOb($key) + { + if (!is_string($key)) { + throw new Horde_Secret_Exception('Key must be a string', Horde_Secret_Exception::KEY_NOT_STRING); + } + + if (!strlen($key)) { + throw new Horde_Secret_Exception('Key must be non-zero.', Horde_Secret_Exception::KEY_ZERO_LENGTH); + } + + $key = substr($key, 0, 56); + + $idx = hash('md5', $key); + if (!isset($this->_cipherCache[$idx])) { + $this->_cipherCache[$idx] = new Horde_Crypt_Blowfish($key); + } + + return $this->_cipherCache[$idx]; + } + + /** + * Generate a secret key (for encryption), either using a random + * string and storing it in a cookie if the user has cookies + * enabled, or munging some known values if they don't. + * + * @param string $keyname The name of the key to set. + * + * @return string The secret key that has been generated. + */ + public function setKey($keyname = self::DEFAULT_KEY) + { + $set = true; + + if (isset($_COOKIE[$this->_params['session_name']])) { + if (isset($_COOKIE[$keyname . '_key'])) { + $key = $_COOKIE[$keyname . '_key']; + $set = false; + } else { + $key = $_COOKIE[$keyname . '_key'] = strval(new Horde_Support_Randomid()); + } + } else { + $key = session_id(); + } + + if ($set) { + $this->_setCookie($keyname, $key); + } + + return $key; + } + + /** + * Return a secret key, either from a cookie, or if the cookie + * isn't there, assume we are using a munged version of a known + * base value. + * + * @param string $keyname The name of the key to get. + * + * @return string The secret key. + */ + public function getKey($keyname = self::DEFAULT_KEY) + { + if (!isset($this->_keyCache[$keyname])) { + if (isset($_COOKIE[$keyname . '_key'])) { + $key = $_COOKIE[$keyname . '_key']; + } else { + $key = session_id(); + $this->_setCookie($keyname, $key); + } + + $this->_keyCache[$keyname] = $key; + } + + return $this->_keyCache[$keyname]; + } + + /** + * Clears a secret key entry from the current cookie. + * + * @param string $keyname The name of the key to clear. + * + * @return boolean True if key existed, false if not. + */ + public function clearKey($keyname = self::DEFAULT_KEY) + { + if (isset($_COOKIE[$this->_params['session_name']]) && + isset($_COOKIE[$keyname . '_key'])) { + $this->_setCookie($keyname, false); + return true; + } + + return false; + } + + /** + * Sets the cookie with the given keyname/key. + * + * @param string $keyname The name of the key to set. + * @param string $key The key to use for encryption. + */ + protected function _setCookie($keyname, $key) + { + @setcookie( + $keyname . '_key', + $key, + 0, + $this->_params['cookie_path'], + $this->_params['cookie_domain'], + $this->_params['cookie_ssl'], + true + ); + + if ($key === false) { + unset($_COOKIE[$keyname . '_key'], $this->_keyCache[$keyname]); + } else { + $_COOKIE[$keyname . '_key'] = $this->_keyCache[$keyname] = $key; + } + } + +} diff --git a/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Secret/Horde/Secret/Exception.php b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Secret/Horde/Secret/Exception.php new file mode 100644 index 00000000..b695f506 --- /dev/null +++ b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Secret/Horde/Secret/Exception.php @@ -0,0 +1,21 @@ + + * @category Horde + * @license http://www.horde.org/licenses/lgpl21 LGPL 2.1 + * @package Secret + */ +class Horde_Secret_Exception extends Horde_Exception_Wrapped +{ + // Error codes. + const NO_BLOWFISH_LIB = 0; // 0 for BC + const KEY_NOT_STRING = 2; + const KEY_ZERO_LENGTH = 3; +} diff --git a/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Socket_Client/Horde/Socket/Client.php b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Socket_Client/Horde/Socket/Client.php new file mode 100644 index 00000000..b8b4af00 --- /dev/null +++ b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Socket_Client/Horde/Socket/Client.php @@ -0,0 +1,326 @@ + + * @author Jan Schneider + * @category Horde + * @copyright 2013-2017 Horde LLC + * @license http://www.horde.org/licenses/lgpl21 LGPL 2.1 + * @package Socket_Client + * + * @property-read boolean $connected Is there an active connection? + * @property-read boolean $secure Is the active connection secure? + */ +class Client +{ + /** + * Is there an active connection? + * + * @var boolean + */ + protected $_connected = false; + + /** + * Configuration parameters. + * + * @var array + */ + protected $_params; + + /** + * Is the connection secure? + * + * @var boolean + */ + protected $_secure = false; + + /** + * The actual socket. + * + * @var resource + */ + protected $_stream; + + /** + * Constructor. + * + * @param string $host Hostname of remote server (can contain + * protocol prefx). + * @param integer $port Port number of remote server. + * @param integer $timeout Connection timeout (in seconds). + * @param mixed $secure Security layer requested. One of: + * - false: (No encryption) [DEFAULT] + * - 'ssl': (Auto-detect SSL version) + * - 'sslv2': (Force SSL version 3) + * - 'sslv3': (Force SSL version 2) + * - 'tls': (TLS; started via protocol-level negotation over unencrypted + * channel) + * - 'tlsv1': (TLS version 1.x connection) + * - true: (TLS if available/necessary) + * @param array $context Any context parameters passed to + * stream_create_context(). + * @param array $params Additional options. + * + * @throws Horde\Socket\Client\Exception + */ + public function __construct( + $host, $port = null, $timeout = 30, $secure = false, + $context = array(), array $params = array() + ) + { + if ($secure && !extension_loaded('openssl')) { + if ($secure !== true) { + throw new \InvalidArgumentException('Secure connections require the PHP openssl extension.'); + } + $secure = false; + } + + $this->_params = $params; + + $this->_connect($host, $port, $timeout, $secure, $context); + } + + /** + */ + public function __get($name) + { + switch ($name) { + case 'connected': + return $this->_connected; + + case 'secure': + return $this->_secure; + } + } + + /** + * This object can not be cloned. + */ + public function __clone() + { + throw new \LogicException('Object cannot be cloned.'); + } + + /** + * This object can not be serialized. + */ + public function __sleep() + { + throw new \LogicException('Object can not be serialized.'); + } + + /** + * Start a TLS connection. + * + * @return boolean Whether TLS was successfully started. + */ + public function startTls() + { + if ($this->connected && !$this->secure) { + if (defined('STREAM_CRYPTO_METHOD_TLSv1_0_CLIENT')) { + $mode = STREAM_CRYPTO_METHOD_TLSv1_0_CLIENT + | STREAM_CRYPTO_METHOD_TLSv1_1_CLIENT + | STREAM_CRYPTO_METHOD_TLSv1_2_CLIENT; + } else { + $mode = STREAM_CRYPTO_METHOD_TLS_CLIENT; + } + if (@stream_socket_enable_crypto($this->_stream, true, $mode) === true) { + $this->_secure = true; + return true; + } + } + + return false; + } + + /** + * Close the connection. + */ + public function close() + { + if ($this->connected) { + @fclose($this->_stream); + $this->_connected = $this->_secure = false; + $this->_stream = null; + } + } + + /** + * Returns information about the connection. + * + * Currently returns four entries in the result array: + * - timed_out (bool): The socket timed out waiting for data + * - blocked (bool): The socket was blocked + * - eof (bool): Indicates EOF event + * - unread_bytes (int): Number of bytes left in the socket buffer + * + * @throws Horde\Socket\Client\Exception + * @return array Information about existing socket resource. + */ + public function getStatus() + { + $this->_checkStream(); + return stream_get_meta_data($this->_stream); + } + + /** + * Returns a line of data. + * + * @param int $size Reading ends when $size - 1 bytes have been read, + * or a newline or an EOF (whichever comes first). + * + * @throws Horde\Socket\Client\Exception + * @return string $size bytes of data from the socket + */ + public function gets($size) + { + $this->_checkStream(); + $data = @fgets($this->_stream, $size); + if ($data === false) { + throw new Client\Exception('Error reading data from socket'); + } + return $data; + } + + /** + * Returns a specified amount of data. + * + * @param integer $size The number of bytes to read from the socket. + * + * @throws Horde\Socket\Client\Exception + * @return string $size bytes of data from the socket. + */ + public function read($size) + { + $this->_checkStream(); + $data = @fread($this->_stream, $size); + if ($data === false) { + throw new Client\Exception('Error reading data from socket'); + } + return $data; + } + + /** + * Writes data to the stream. + * + * @param string $data Data to write. + * + * @throws Horde\Socket\Client\Exception + */ + public function write($data) + { + $this->_checkStream(); + if (!@fwrite($this->_stream, $data)) { + $meta_data = $this->getStatus(); + if (!empty($meta_data['timed_out'])) { + throw new Client\Exception('Timed out writing data to socket'); + } + throw new Client\Exception('Error writing data to socket'); + } + } + + /* Internal methods. */ + + /** + * Connect to the remote server. + * + * @see __construct() + * + * @throws Horde\Socket\Client\Exception + */ + protected function _connect( + $host, $port, $timeout, $secure, $context, $retries = 0 + ) + { + $conn = ''; + if (!strpos($host, '://')) { + switch (strval($secure)) { + case 'ssl': + case 'sslv2': + case 'sslv3': + $conn = $secure . '://'; + $this->_secure = true; + break; + + case 'tlsv1': + $conn = 'tls://'; + $this->_secure = true; + break; + + case 'tls': + default: + $conn = 'tcp://'; + break; + } + } + $conn .= $host; + if ($port) { + $conn .= ':' . $port; + } + + $this->_stream = @stream_socket_client( + $conn, + $error_number, + $error_string, + $timeout, + STREAM_CLIENT_CONNECT, + stream_context_create($context) + ); + + if ($this->_stream === false) { + /* From stream_socket_client() page: a function return of false, + * with an error code of 0, indicates a "problem initializing the + * socket". These kind of issues are seen on the same server + * (and even the same user account) as sucessful connections, so + * these are likely transient issues. Retry up to 3 times in these + * instances. */ + if (!$error_number && ($retries < 3)) { + return $this->_connect($host, $port, $timeout, $secure, $context, ++$retries); + } + + $e = new Client\Exception( + 'Error connecting to server.' + ); + $e->details = sprintf("[%u] %s", $error_number, $error_string); + throw $e; + } + + stream_set_timeout($this->_stream, $timeout); + + if (function_exists('stream_set_read_buffer')) { + stream_set_read_buffer($this->_stream, 0); + } + stream_set_write_buffer($this->_stream, 0); + + $this->_connected = true; + } + + /** + * Throws an exception is the stream is not a resource. + * + * @throws Horde\Socket\Client\Exception + */ + protected function _checkStream() + { + if (!is_resource($this->_stream)) { + throw new Client\Exception('Not connected'); + } + } + +} diff --git a/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Socket_Client/Horde/Socket/Client/Exception.php b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Socket_Client/Horde/Socket/Client/Exception.php new file mode 100644 index 00000000..3ab9c6f1 --- /dev/null +++ b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Socket_Client/Horde/Socket/Client/Exception.php @@ -0,0 +1,28 @@ + + * @category Horde + * @copyright 2013-2017 Horde LLC + * @license http://www.horde.org/licenses/lgpl21 LGPL 2.1 + * @package Socket_Client + */ +class Exception extends \Horde_Exception_Wrapped +{ +} diff --git a/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Stream/Horde/Stream.php b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Stream/Horde/Stream.php new file mode 100644 index 00000000..2332fad0 --- /dev/null +++ b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Stream/Horde/Stream.php @@ -0,0 +1,624 @@ + + * @category Horde + * @copyright 2012-2016 Horde LLC + * @license http://www.horde.org/licenses/lgpl21 LGPL 2.1 + * @package Stream + * + * @property boolean $utf8_char Parse character as UTF-8 data instead of + * single byte (@since 1.4.0). + */ +class Horde_Stream implements Serializable +{ + /** + * Stream resource. + * + * @var resource + */ + public $stream; + + /** + * Configuration parameters. + * + * @var array + */ + protected $_params; + + /** + * Parse character as UTF-8 data instead of single byte. + * + * @var boolean + */ + protected $_utf8_char = false; + + /** + * Constructor. + * + * @param array $opts Configuration options. + */ + public function __construct(array $opts = array()) + { + $this->_params = $opts; + $this->_init(); + } + + /** + * Initialization method. + */ + protected function _init() + { + // Sane default: read-write, 0-length stream. + if (!$this->stream) { + $this->stream = @fopen('php://temp', 'r+'); + } + } + + /** + */ + public function __get($name) + { + switch ($name) { + case 'utf8_char': + return $this->_utf8_char; + } + } + + /** + */ + public function __set($name, $value) + { + switch ($name) { + case 'utf8_char': + $this->_utf8_char = (bool)$value; + break; + } + } + + /** + */ + public function __clone() + { + $data = strval($this); + $this->stream = null; + $this->_init(); + $this->add($data); + } + + /** + * String representation of object. + * + * @since 1.1.0 + * + * @return string The full stream converted to a string. + */ + public function __toString() + { + $this->rewind(); + return $this->substring(); + } + + /** + * Adds data to the stream. + * + * @param mixed $data Data to add to the stream. Can be a resource, + * Horde_Stream object, or a string(-ish) value. + * @param boolean $reset Reset stream pointer to initial position after + * adding? + */ + public function add($data, $reset = false) + { + if ($reset) { + $pos = $this->pos(); + } + + if (is_resource($data)) { + $dpos = ftell($data); + while (!feof($data)) { + $this->add(fread($data, 8192)); + } + fseek($data, $dpos); + } elseif ($data instanceof Horde_Stream) { + $dpos = $data->pos(); + while (!$data->eof()) { + $this->add($data->substring(0, 65536)); + } + $data->seek($dpos, false); + } else { + fwrite($this->stream, $data); + } + + if ($reset) { + $this->seek($pos, false); + } + } + + /** + * Returns the length of the data. Does not change the stream position. + * + * @param boolean $utf8 If true, determines the UTF-8 length of the + * stream (as of 1.4.0). If false, determines the + * byte length of the stream. + * + * @return integer Stream size. + * + * @throws Horde_Stream_Exception + */ + public function length($utf8 = false) + { + $pos = $this->pos(); + + if ($utf8 && $this->_utf8_char) { + $this->rewind(); + $len = 0; + while ($this->getChar() !== false) { + ++$len; + } + } elseif (!$this->end()) { + throw new Horde_Stream_Exception('ERROR'); + } else { + $len = $this->pos(); + } + + if (!$this->seek($pos, false)) { + throw new Horde_Stream_Exception('ERROR'); + } + + return $len; + } + + /** + * Get a string up to a certain character (or EOF). + * + * @param string $end The character to stop reading at. As of 1.4.0, + * $char can be a multi-character UTF-8 string. + * @param boolean $all If true, strips all repetitions of $end from + * the end. If false, stops at the first instance + * of $end. (@since 1.5.0) + * + * @return string The string up to $end (stream is positioned after the + * end character(s), all of which are stripped from the + * return data). + */ + public function getToChar($end, $all = true) + { + if (($len = strlen($end)) === 1) { + $out = ''; + do { + if (($tmp = stream_get_line($this->stream, 8192, $end)) === false) { + return $out; + } + + $out .= $tmp; + if ((strlen($tmp) < 8192) || ($this->peek(-1) == $end)) { + break; + } + } while (true); + } else { + $res = $this->search($end); + + if (is_null($res)) { + return $this->substring(); + } + + $out = substr($this->getString(null, $res + $len - 1), 0, $len * -1); + } + + /* Remove all further characters also. */ + if ($all) { + while ($this->peek($len) == $end) { + $this->seek($len); + } + } + + return $out; + } + + /** + * Return the current character(s) without moving the pointer. + * + * @param integer $length The peek length (since 1.4.0). + * + * @return string The current character. + */ + public function peek($length = 1) + { + $out = ''; + + for ($i = 0; $i < $length; ++$i) { + if (($c = $this->getChar()) === false) { + break; + } + $out .= $c; + } + + $this->seek(strlen($out) * -1); + + return $out; + } + + /** + * Search for character(s) and return its position. + * + * @param string $char The character to search for. As of 1.4.0, + * $char can be a multi-character UTF-8 string. + * @param boolean $reverse Do a reverse search? + * @param boolean $reset Reset the pointer to the original position? + * + * @return mixed The start position of the search string (integer), or + * null if character not found. + */ + public function search($char, $reverse = false, $reset = true) + { + $found_pos = null; + + if ($len = strlen($char)) { + $pos = $this->pos(); + $single_char = ($len === 1); + + do { + if ($reverse) { + for ($i = $pos - 1; $i >= 0; --$i) { + $this->seek($i, false); + $c = $this->peek(); + if ($c == ($single_char ? $char : substr($char, 0, strlen($c)))) { + $found_pos = $i; + break; + } + } + } else { + /* Optimization for the common use case of searching for + * a single character in byte data. Reduces calling + * getChar() a bunch of times. */ + $fgetc = ($single_char && !$this->_utf8_char); + + while (($c = ($fgetc ? fgetc($this->stream) : $this->getChar())) !== false) { + if ($c == ($single_char ? $char : substr($char, 0, strlen($c)))) { + $found_pos = $this->pos() - ($single_char ? 1 : strlen($c)); + break; + } + } + } + + if ($single_char || + is_null($found_pos) || + ($this->getString($found_pos, $found_pos + $len - 1) == $char)) { + break; + } + + $this->seek($found_pos + ($reverse ? 0 : 1), false); + $found_pos = null; + } while (true); + + $this->seek( + ($reset || is_null($found_pos)) ? $pos : $found_pos, + false + ); + } + + return $found_pos; + } + + /** + * Returns the stream (or a portion of it) as a string. Position values + * are the byte position in the stream. + * + * @param integer $start The starting position. If positive, start from + * this position. If negative, starts this length + * back from the current position. If null, starts + * from the current position. + * @param integer $end The ending position relative to the beginning of + * the stream (if positive). If negative, end this + * length back from the end of the stream. If null, + * reads to the end of the stream. + * + * @return string A string. + */ + public function getString($start = null, $end = null) + { + if (!is_null($start) && ($start >= 0)) { + $this->seek($start, false); + $start = 0; + } + + if (is_null($end)) { + $len = null; + } else { + $end = ($end >= 0) + ? $end - $this->pos() + 1 + : $this->length() - $this->pos() + $end; + $len = max($end, 0); + } + + return $this->substring($start, $len); + } + + /** + * Return part of the stream as a string. + * + * @since 1.4.0 + * + * @param integer $start Start, as an offset from the current postion. + * @param integer $length Length of string to return. If null, returns + * rest of the stream. If negative, this many + * characters will be omitted from the end of the + * stream. + * @param boolean $char If true, $start/$length is the length in + * characters. If false, $start/$length is the + * length in bytes. + * + * @return string The substring. + */ + public function substring($start = 0, $length = null, $char = false) + { + if ($start !== 0) { + $this->seek($start, true, $char); + } + + $out = ''; + $to_end = is_null($length); + + /* If length is greater than remaining stream, use more efficient + * algorithm below. Also, if doing a negative length, deal with that + * below also. */ + if ($char && + $this->_utf8_char && + !$to_end && + ($length >= 0) && + ($length < ($this->length() - $this->pos()))) { + while ($length-- && (($char = $this->getChar()) !== false)) { + $out .= $char; + } + return $out; + } + + if (!$to_end && ($length < 0)) { + $pos = $this->pos(); + $this->end(); + $this->seek($length, true, $char); + $length = $this->pos() - $pos; + $this->seek($pos, false); + if ($length < 0) { + return ''; + } + } + + while (!feof($this->stream) && ($to_end || $length)) { + $read = fread($this->stream, $to_end ? 16384 : $length); + $out .= $read; + if (!$to_end) { + $length -= strlen($read); + } + } + + return $out; + } + + /** + * Auto-determine the EOL string. + * + * @since 1.3.0 + * + * @return string The EOL string, or null if no EOL found. + */ + public function getEOL() + { + $pos = $this->pos(); + + $this->rewind(); + $pos2 = $this->search("\n", false, false); + if ($pos2) { + $this->seek(-1); + $eol = ($this->getChar() == "\r") + ? "\r\n" + : "\n"; + } else { + $eol = is_null($pos2) + ? null + : "\n"; + } + + $this->seek($pos, false); + + return $eol; + } + + /** + * Return a character from the string. + * + * @since 1.4.0 + * + * @return string Character (single byte, or UTF-8 character if + * $utf8_char is true). + */ + public function getChar() + { + $char = fgetc($this->stream); + if (!$this->_utf8_char) { + return $char; + } + + $c = ord($char); + if ($c < 0x80) { + return $char; + } + + if ($c < 0xe0) { + $n = 1; + } elseif ($c < 0xf0) { + $n = 2; + } elseif ($c < 0xf8) { + $n = 3; + } else { + throw new Horde_Stream_Exception('ERROR'); + } + + for ($i = 0; $i < $n; ++$i) { + if (($c = fgetc($this->stream)) === false) { + throw new Horde_Stream_Exception('ERROR'); + } + $char .= $c; + } + + return $char; + } + + /** + * Return the current stream pointer position. + * + * @since 1.4.0 + * + * @return mixed The current position (integer), or false. + */ + public function pos() + { + return ftell($this->stream); + } + + /** + * Rewind the internal stream to the beginning. + * + * @since 1.4.0 + * + * @return boolean True if successful. + */ + public function rewind() + { + return rewind($this->stream); + } + + /** + * Move internal pointer. + * + * @since 1.4.0 + * + * @param integer $offset The offset. + * @param boolean $curr If true, offset is from current position. If + * false, offset is from beginning of stream. + * @param boolean $char If true, $offset is the length in characters. + * If false, $offset is the length in bytes. + * + * @return boolean True if successful. + */ + public function seek($offset = 0, $curr = true, $char = false) + { + if (!$offset) { + return (bool)$curr ?: $this->rewind(); + } + + if ($offset < 0) { + if (!$curr) { + return true; + } elseif (abs($offset) > $this->pos()) { + return $this->rewind(); + } + } + + if ($char && $this->_utf8_char) { + if ($offset > 0) { + if (!$curr) { + $this->rewind(); + } + + do { + $this->getChar(); + } while (--$offset); + } else { + $pos = $this->pos(); + $offset = abs($offset); + + while ($pos-- && $offset) { + fseek($this->stream, -1, SEEK_CUR); + if ((ord($this->peek()) & 0xC0) != 0x80) { + --$offset; + } + } + } + + return true; + } + + return (fseek($this->stream, $offset, $curr ? SEEK_CUR : SEEK_SET) === 0); + } + + /** + * Move internal pointer to the end of the stream. + * + * @since 1.4.0 + * + * @param integer $offset Move this offset from the end. + * + * @return boolean True if successful. + */ + public function end($offset = 0) + { + return (fseek($this->stream, $offset, SEEK_END) === 0); + } + + /** + * Has the end of the stream been reached? + * + * @since 1.4.0 + * + * @return boolean True if the end of the stream has been reached. + */ + public function eof() + { + return feof($this->stream); + } + + /** + * Close the stream. + * + * @since 1.4.0 + */ + public function close() + { + if ($this->stream) { + fclose($this->stream); + } + } + + /* Serializable methods. */ + + /** + */ + public function serialize() + { + $this->_params['_pos'] = $this->pos(); + + return json_encode(array( + strval($this), + $this->_params + )); + } + + /** + */ + public function unserialize($data) + { + $this->_init(); + + $data = json_decode($data, true); + $this->add($data[0]); + $this->seek($data[1]['_pos'], false); + unset($data[1]['_pos']); + $this->_params = $data[1]; + } + +} diff --git a/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Stream/Horde/Stream/Exception.php b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Stream/Horde/Stream/Exception.php new file mode 100644 index 00000000..09396efd --- /dev/null +++ b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Stream/Horde/Stream/Exception.php @@ -0,0 +1,25 @@ + + * @category Horde + * @copyright 2012-2016 Horde LLC + * @license http://www.horde.org/licenses/lgpl21 LGPL 2.1 + * @package Stream + */ +class Horde_Stream_Exception extends Horde_Exception_Wrapped +{ +} diff --git a/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Stream/Horde/Stream/Existing.php b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Stream/Horde/Stream/Existing.php new file mode 100644 index 00000000..c2377fdd --- /dev/null +++ b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Stream/Horde/Stream/Existing.php @@ -0,0 +1,48 @@ + + * @category Horde + * @copyright 2012-2016 Horde LLC + * @license http://www.horde.org/licenses/lgpl21 LGPL 2.1 + * @package Stream + */ +class Horde_Stream_Existing extends Horde_Stream +{ + /** + * Constructor. + * + * @param array $opts Additional configuration options: + * - stream: (resource) [REQUIRED] The stream resource. + * + * @throws InvalidArgumentException + */ + public function __construct(array $opts = array()) + { + if (!isset($opts['stream']) || !is_resource($opts['stream'])) { + throw new InvalidArgumentException('Need a stream resource.'); + } + + $this->stream = $opts['stream']; + unset($opts['stream']); + + parent::__construct($opts); + } + +} diff --git a/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Stream/Horde/Stream/String.php b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Stream/Horde/Stream/String.php new file mode 100644 index 00000000..3f180f34 --- /dev/null +++ b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Stream/Horde/Stream/String.php @@ -0,0 +1,49 @@ + + * @category Horde + * @copyright 2014-2016 Horde LLC + * @license http://www.horde.org/licenses/lgpl21 LGPL 2.1 + * @package Stream + * @since 1.6.0 + */ +class Horde_Stream_String extends Horde_Stream +{ + /** + * Constructor. + * + * @param array $opts Additional configuration options: + *
+     *   - string: (string) [REQUIRED] The PHP string.
+     * 
+ * + * @throws InvalidArgumentException + */ + public function __construct(array $opts = array()) + { + if (!isset($opts['string']) || !is_string($opts['string'])) { + throw new InvalidArgumentException('Need a PHP string.'); + } + + $this->stream = Horde_Stream_Wrapper_String::getStream($opts['string']); + unset($opts['string']); + + parent::__construct($opts); + } + +} diff --git a/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Stream/Horde/Stream/Temp.php b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Stream/Horde/Stream/Temp.php new file mode 100644 index 00000000..d14bc691 --- /dev/null +++ b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Stream/Horde/Stream/Temp.php @@ -0,0 +1,56 @@ + + * @category Horde + * @copyright 2012-2016 Horde LLC + * @license http://www.horde.org/licenses/lgpl21 LGPL 2.1 + * @package Stream + */ +class Horde_Stream_Temp extends Horde_Stream +{ + /** + * Constructor. + * + * @param array $opts Additional configuration options: + *
+     *   - max_memory: (integer) The maximum amount of memory to allocate to
+     *                 the PHP temporary stream.
+     * 
+ * + * @throws Horde_Stream_Exception + */ + public function __construct(array $opts = array()) + { + parent::__construct($opts); + } + + /** + * @throws Horde_Stream_Exception + */ + protected function _init() + { + $cmd = 'php://temp'; + if (isset($this->_params['max_memory'])) { + $cmd .= '/maxmemory:' . intval($this->_params['max_memory']); + } + + if (($this->stream = @fopen($cmd, 'r+')) === false) { + throw new Horde_Stream_Exception('Failed to open temporary memory stream.'); + } + } + +} diff --git a/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Stream/Horde/Stream/TempString.php b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Stream/Horde/Stream/TempString.php new file mode 100644 index 00000000..3d3bfe77 --- /dev/null +++ b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Stream/Horde/Stream/TempString.php @@ -0,0 +1,279 @@ + + * @category Horde + * @copyright 2014-2016 Horde LLC + * @license http://www.horde.org/licenses/lgpl21 LGPL 2.1 + * @package Stream + * @since 1.6.0 + * + * @property-read boolean $use_stream If true, the object is using a PHP temp + * stream internally. + */ +class Horde_Stream_TempString extends Horde_Stream_Temp +{ + /** + * String stream object. + * + * @var Horde_Stream_String + */ + protected $_string; + + /** + */ + public function __construct(array $opts = array()) + { + parent::__construct($opts); + + $temp = ''; + $this->_string = new Horde_Stream_String(array( + 'string' => $temp + )); + } + + /** + */ + protected function _init() + { + if (!isset($this->_params['max_memory'])) { + $this->_params['max_memory'] = 2097152; + } + + if (!$this->_string) { + parent::_init(); + } + } + + /** + */ + public function __get($name) + { + switch ($name) { + case 'stream': + if ($this->_string) { + return $this->_string->stream; + } + break; + + case 'use_stream': + return !(bool)$this->_string; + } + + return parent::__get($name); + } + + /** + */ + public function __set($name, $value) + { + switch ($name) { + case 'utf8_char': + if ($this->_string) { + $this->_string->utf8_char = $value; + } + break; + } + + parent::__set($name, $value); + } + + /** + */ + public function __clone() + { + if ($this->_string) { + $this->_string = clone $this->_string; + } else { + parent::__clone(); + } + } + + /** + */ + public function __toString() + { + return $this->_string + ? strval($this->_string) + : parent::__toString(); + } + + /** + */ + public function add($data, $reset = false) + { + if ($this->_string && is_string($data)) { + if ((strlen($data) + $this->_string->length()) < $this->_params['max_memory']) { + $this->_string->add($data, $reset); + return; + } + + parent::_init(); + parent::add(strval($this->_string)); + $this->seek($this->_string->pos(), false); + unset($this->_string); + } + + parent::add($data, $reset); + } + + /** + */ + public function length($utf8 = false) + { + return $this->_string + ? $this->_string->length($utf8) + : parent::length($utf8); + } + + /** + */ + public function getToChar($end, $all = true) + { + return $this->_string + ? $this->_string->getToChar($end, $all) + : parent::getToChar($end, $all); + } + + + /** + */ + public function peek($length = 1) + { + return $this->_string + ? $this->_string->peek($length) + : parent::peek($length); + } + + /** + */ + public function search($char, $reverse = false, $reset = true) + { + return $this->_string + ? $this->_string->search($char, $reverse, $reset) + : parent::search($char, $reverse, $reset); + } + + /** + */ + public function getString($start = null, $end = null) + { + return $this->_string + ? $this->_string->getString($start, $end) + : parent::getString($start, $end); + } + + /** + */ + public function substring($start = 0, $length = null, $char = false) + { + return $this->_string + ? $this->_string->substring($start, $length, $char) + : parent::substring($start, $length, $char); + } + + /** + */ + public function getChar() + { + return $this->_string + ? $this->_string->getChar() + : parent::getChar(); + } + + /** + */ + public function pos() + { + return $this->_string + ? $this->_string->pos() + : parent::pos(); + } + + /** + */ + public function rewind() + { + return $this->_string + ? $this->_string->rewind() + : parent::rewind(); + } + + /** + */ + public function seek($offset = 0, $curr = true, $char = false) + { + return $this->_string + ? $this->_string->seek($offset, $curr, $char) + : parent::seek($offset, $curr, $char); + } + + /** + */ + public function end($offset = 0) + { + return $this->_string + ? $this->_string->end($offset) + : parent::end($offset); + } + + /** + */ + public function eof() + { + return $this->_string + ? $this->_string->eof() + : parent::eof(); + } + + /* Serializable methods. */ + + /** + */ + public function serialize() + { + if ($this->_string) { + $data = array( + $this->_string, + $this->_params + ); + } else { + $data = parent::serialize(); + } + + return serialize($data); + } + + /** + */ + public function unserialize($data) + { + $data = unserialize($data); + if ($data[0] instanceof Horde_Stream_String) { + $this->_string = $data[0]; + $this->_params = $data[1]; + } else { + parent::unserialize($data); + } + } + +} diff --git a/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Stream_Filter/Horde/Stream/Filter/Bin2hex.php b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Stream_Filter/Horde/Stream/Filter/Bin2hex.php new file mode 100644 index 00000000..8b4f660e --- /dev/null +++ b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Stream_Filter/Horde/Stream/Filter/Bin2hex.php @@ -0,0 +1,36 @@ + + * @category Horde + * @license http://www.horde.org/licenses/lgpl21 LGPL 2.1 + * @package Stream_Filter + */ +class Horde_Stream_Filter_Bin2hex extends php_user_filter +{ + /** + * @see stream_filter_register() + */ + public function filter($in, $out, &$consumed, $closing) + { + while ($bucket = stream_bucket_make_writeable($in)) { + $bucket->data = bin2hex($bucket->data); + $consumed += $bucket->datalen; + stream_bucket_append($out, $bucket); + } + + return PSFS_PASS_ON; + } + +} diff --git a/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Stream_Filter/Horde/Stream/Filter/Crc32.php b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Stream_Filter/Horde/Stream/Filter/Crc32.php new file mode 100644 index 00000000..ced4dd21 --- /dev/null +++ b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Stream_Filter/Horde/Stream/Filter/Crc32.php @@ -0,0 +1,123 @@ + + * $params = new stdClass; + * stream_filter_register('horde_crc32', 'Horde_Stream_Filter_Crc32'); + * stream_filter_[app|pre]pend($stream, 'horde_crc32', + * [ STREAM_FILTER_[READ|WRITE|ALL] ], + * [ $params ]); + * while (fread($stream, 8192)) {} + * // CRC32 data in $params->crc32 + * + * + * 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. + * + * @author Michael Slusarz + * @category Horde + * @license http://www.horde.org/licenses/lgpl21 LGPL 2.1 + * @package Stream_Filter + */ +class Horde_Stream_Filter_Crc32 extends php_user_filter +{ + /** + * @see stream_filter_register() + */ + public function onCreate() + { + $this->params->crc32 = 0; + + return true; + } + + /** + * @see stream_filter_register() + */ + public function filter($in, $out, &$consumed, $closing) + { + while ($bucket = stream_bucket_make_writeable($in)) { + $consumed += $bucket->datalen; + $this->params->crc32 = $this->_crc32Combine($this->params->crc32, crc32($bucket->data), $bucket->datalen); + stream_bucket_append($out, $bucket); + } + + return PSFS_PASS_ON; + } + + /** + */ + protected function _crc32Combine($crc1, $crc2, $len2) + { + $odd = array(0xedb88320); + $row = 1; + + for ($n = 1; $n < 32; ++$n) { + $odd[$n] = $row; + $row <<= 1; + } + + $this->_gf2MatrixSquare($even, $odd); + $this->_gf2MatrixSquare($odd, $even); + + do { + /* Apply zeros operator for this bit of len2. */ + $this->_gf2MatrixSquare($even, $odd); + + if ($len2 & 1) { + $crc1 = $this->_gf2MatrixTimes($even, $crc1); + } + + $len2>>=1; + + /* If no more bits set, then done. */ + if ($len2 == 0) { + break; + } + + /* Another iteration of the loop with odd and even swapped. */ + $this->_gf2MatrixSquare($odd, $even); + if ($len2 & 1) { + $crc1 = $this->_gf2MatrixTimes($odd, $crc1); + } + + $len2>>= 1; + } while ($len2 != 0); + + $crc1 ^= $crc2; + + return $crc1; + } + + /** + */ + protected function _gf2MatrixSquare(&$square, &$mat) + { + for ($n = 0; $n < 32; ++$n) { + $square[$n] = $this->_gf2MatrixTimes($mat, $mat[$n]); + } + } + + /** + */ + protected function _gf2MatrixTimes($mat, $vec) + { + $i = $sum = 0; + + while ($vec) { + if ($vec & 1) { + $sum ^= $mat[$i]; + } + + $vec = ($vec >> 1) & 0x7FFFFFFF; + ++$i; + } + + return $sum; + } + +} diff --git a/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Stream_Filter/Horde/Stream/Filter/Eol.php b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Stream_Filter/Horde/Stream/Filter/Eol.php new file mode 100644 index 00000000..1495a61c --- /dev/null +++ b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Stream_Filter/Horde/Stream/Filter/Eol.php @@ -0,0 +1,101 @@ + ("\r\n") + * + * @author Michael Slusarz + * @category Horde + * @copyright 2009-2016 Horde LLC + * @license http://www.horde.org/licenses/lgpl21 LGPL 2.1 + * @package Stream_Filter + */ +class Horde_Stream_Filter_Eol extends php_user_filter +{ + /** + * Replacement data + * + * @var mixed + */ + protected $_replace; + + /** + * Search array. + * + * @var mixed + */ + protected $_search; + + /** + * First character of a multi-character EOL. + * + * @var string + */ + protected $_split = null; + + /** + * @see stream_filter_register() + */ + public function onCreate() + { + $eol = isset($this->params['eol']) + ? $this->params['eol'] + : "\r\n"; + + if (!strlen($eol)) { + $this->_search = array("\r", "\n"); + $this->_replace = ''; + } elseif (in_array($eol, array("\r", "\n"))) { + $this->_search = array("\r\n", ($eol == "\r") ? "\n" : "\r"); + $this->_replace = $eol; + } else { + $this->_search = array("\r\n", "\r", "\n"); + $this->_replace = array("\n", "\n", $eol); + if (strlen($eol) > 1) { + $this->_split = $eol[0]; + } + } + + return true; + } + + /** + * @see stream_filter_register() + */ + public function filter($in, $out, &$consumed, $closing) + { + while ($bucket = stream_bucket_make_writeable($in)) { + if (!is_null($this->_split) && + ($bucket->data[$bucket->datalen - 1] == $this->_split)) { + $bucket->data = substr($bucket->data, 0, -1); + } + + $bucket->data = str_replace($this->_search, $this->_replace, $bucket->data); + $consumed += $bucket->datalen; + stream_bucket_append($out, $bucket); + } + + return PSFS_PASS_ON; + } + +} diff --git a/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Stream_Filter/Horde/Stream/Filter/Htmlspecialchars.php b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Stream_Filter/Horde/Stream/Filter/Htmlspecialchars.php new file mode 100644 index 00000000..789ef441 --- /dev/null +++ b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Stream_Filter/Horde/Stream/Filter/Htmlspecialchars.php @@ -0,0 +1,40 @@ + + * @category Horde + * @license http://www.horde.org/licenses/lgpl21 LGPL 2.1 + * @package Stream_Filter + */ +class Horde_Stream_Filter_Htmlspecialchars extends php_user_filter +{ + /** + * @see stream_filter_register() + */ + public function filter($in, $out, &$consumed, $closing) + { + while ($bucket = stream_bucket_make_writeable($in)) { + $bucket->data = htmlspecialchars($bucket->data); + $consumed += $bucket->datalen; + stream_bucket_append($out, $bucket); + } + + return PSFS_PASS_ON; + } +} diff --git a/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Stream_Filter/Horde/Stream/Filter/Null.php b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Stream_Filter/Horde/Stream/Filter/Null.php new file mode 100644 index 00000000..fa77199c --- /dev/null +++ b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Stream_Filter/Horde/Stream/Filter/Null.php @@ -0,0 +1,67 @@ + + * @category Horde + * @license http://www.horde.org/licenses/lgpl21 LGPL 2.1 + * @package Stream_Filter + */ +class Horde_Stream_Filter_Null extends php_user_filter +{ + /** + * Search array. + * + * @var mixed + */ + protected $_search = "\0"; + + /** + * Replacement data + * + * @var mixed + */ + protected $_replace; + + /** + * @see stream_filter_register() + */ + public function onCreate() + { + $this->_replace = isset($this->params->replace) + ? $this->params->replace + : ''; + + return true; + } + + /** + * @see stream_filter_register() + */ + public function filter($in, $out, &$consumed, $closing) + { + while ($bucket = stream_bucket_make_writeable($in)) { + $bucket->data = str_replace($this->_search, $this->_replace, $bucket->data); + $consumed += $bucket->datalen; + stream_bucket_append($out, $bucket); + } + + return PSFS_PASS_ON; + } + +} diff --git a/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Stream_Wrapper/Horde/Stream/Wrapper/Combine.php b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Stream_Wrapper/Horde/Stream/Wrapper/Combine.php new file mode 100644 index 00000000..167f3686 --- /dev/null +++ b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Stream_Wrapper/Horde/Stream/Wrapper/Combine.php @@ -0,0 +1,315 @@ + + * @category Horde + * @copyright 2009-2017 Horde LLC + * @license http://www.horde.org/licenses/bsd BSD + * @package Stream_Wrapper + */ +class Horde_Stream_Wrapper_Combine +{ + /**/ + const WRAPPER_NAME = 'horde-stream-wrapper-combine'; + + /** + * Context. + * + * @var resource + */ + public $context; + + /** + * Array that holds the various streams. + * + * @var array + */ + protected $_data = array(); + + /** + * The combined length of the stream. + * + * @var integer + */ + protected $_length = 0; + + /** + * The current position in the string. + * + * @var integer + */ + protected $_position = 0; + + /** + * The current position in the data array. + * + * @var integer + */ + protected $_datapos = 0; + + /** + * Have we reached EOF? + * + * @var boolean + */ + protected $_ateof = false; + + /** + * Unique ID tracker for the streams. + * + * @var integer + */ + private static $_id = 0; + + /** + * Create a stream from multiple data sources. + * + * @since 2.1.0 + * + * @param array $data An array of strings and/or streams to combine into + * a single stream. + * + * @return resource A PHP stream. + */ + public static function getStream($data) + { + if (!self::$_id) { + stream_wrapper_register(self::WRAPPER_NAME, __CLASS__); + } + + return fopen( + self::WRAPPER_NAME . '://' . ++self::$_id, + 'wb', + false, + stream_context_create(array( + self::WRAPPER_NAME => array( + 'data' => $data + ) + )) + ); + } + /** + * @see streamWrapper::stream_open() + * + * @param string $path + * @param string $mode + * @param integer $options + * @param string &$opened_path + * + * @throws Exception + */ + public function stream_open($path, $mode, $options, &$opened_path) + { + $opts = stream_context_get_options($this->context); + + if (isset($opts[self::WRAPPER_NAME]['data'])) { + $data = $opts[self::WRAPPER_NAME]['data']; + } elseif (isset($opts['horde-combine']['data'])) { + // @deprecated + $data = $opts['horde-combine']['data']->getData(); + } else { + throw new Exception('Use ' . __CLASS__ . '::getStream() to initialize the stream.'); + } + + foreach ($data as $val) { + if (is_string($val)) { + $fp = fopen('php://temp', 'r+'); + fwrite($fp, $val); + } else { + $fp = $val; + } + + fseek($fp, 0, SEEK_END); + $length = ftell($fp); + rewind($fp); + + $this->_data[] = array( + 'fp' => $fp, + 'l' => $length, + 'p' => 0 + ); + + $this->_length += $length; + } + + return true; + } + + /** + * @see streamWrapper::stream_read() + * + * @param integer $count + * + * @return mixed + */ + public function stream_read($count) + { + if ($this->stream_eof()) { + return false; + } + + $out = ''; + $tmp = &$this->_data[$this->_datapos]; + + while ($count) { + if (!is_resource($tmp['fp'])) { + return false; + } + + $curr_read = min($count, $tmp['l'] - $tmp['p']); + $out .= fread($tmp['fp'], $curr_read); + $count -= $curr_read; + $this->_position += $curr_read; + + if ($this->_position == $this->_length) { + if ($count) { + $this->_ateof = true; + break; + } else { + $tmp['p'] += $curr_read; + } + } elseif ($count) { + if (!isset($this->_data[++$this->_datapos])) { + return false; + } + $tmp = &$this->_data[$this->_datapos]; + rewind($tmp['fp']); + $tmp['p'] = 0; + } else { + $tmp['p'] += $curr_read; + } + } + + return $out; + } + + /** + * @see streamWrapper::stream_write() + * + * @param string $data + * + * @return integer + */ + public function stream_write($data) + { + $tmp = &$this->_data[$this->_datapos]; + + $oldlen = $tmp['l']; + $res = fwrite($tmp['fp'], $data); + if ($res === false) { + return false; + } + + $tmp['p'] = ftell($tmp['fp']); + if ($tmp['p'] > $oldlen) { + $tmp['l'] = $tmp['p']; + $this->_length += ($tmp['l'] - $oldlen); + } + + return $res; + } + + /** + * @see streamWrapper::stream_tell() + * + * @return integer + */ + public function stream_tell() + { + return $this->_position; + } + + /** + * @see streamWrapper::stream_eof() + * + * @return boolean + */ + public function stream_eof() + { + return $this->_ateof; + } + + /** + * @see streamWrapper::stream_stat() + * + * @return array + */ + public function stream_stat() + { + return array( + 'dev' => 0, + 'ino' => 0, + 'mode' => 0, + 'nlink' => 0, + 'uid' => 0, + 'gid' => 0, + 'rdev' => 0, + 'size' => $this->_length, + 'atime' => 0, + 'mtime' => 0, + 'ctime' => 0, + 'blksize' => 0, + 'blocks' => 0 + ); + } + + /** + * @see streamWrapper::stream_seek() + * + * @param integer $offset + * @param integer $whence SEEK_SET, SEEK_CUR, or SEEK_END + * + * @return boolean + */ + public function stream_seek($offset, $whence) + { + $oldpos = $this->_position; + $this->_ateof = false; + + switch ($whence) { + case SEEK_SET: + $offset = $offset; + break; + + case SEEK_CUR: + $offset = $this->_position + $offset; + break; + + case SEEK_END: + $offset = $this->_length + $offset; + break; + + default: + return false; + } + + $count = $this->_position = min($this->_length, $offset); + + foreach ($this->_data as $key => $val) { + if ($count < $val['l']) { + $this->_datapos = $key; + $val['p'] = $count; + fseek($val['fp'], $count, SEEK_SET); + break; + } + $count -= $val['l']; + } + + return ($oldpos != $this->_position); + } + +} diff --git a/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Stream_Wrapper/Horde/Stream/Wrapper/CombineStream.php b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Stream_Wrapper/Horde/Stream/Wrapper/CombineStream.php new file mode 100644 index 00000000..04fe5662 --- /dev/null +++ b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Stream_Wrapper/Horde/Stream/Wrapper/CombineStream.php @@ -0,0 +1,33 @@ + + * @category Horde + * @deprecated Use Horde_Stream_Wrapper_Combine::getStream() + * @copyright 2009-2016 Horde LLC + * @license http://www.horde.org/licenses/bsd BSD + * @package Stream_Wrapper + */ +interface Horde_Stream_Wrapper_CombineStream +{ + /** + * Return a reference to the data. + * + * @return array + */ + public function getData(); +} + diff --git a/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Stream_Wrapper/Horde/Stream/Wrapper/String.php b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Stream_Wrapper/Horde/Stream/Wrapper/String.php new file mode 100644 index 00000000..0c981155 --- /dev/null +++ b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Stream_Wrapper/Horde/Stream/Wrapper/String.php @@ -0,0 +1,211 @@ + + * @author Michael Slusarz + * @category Horde + * @copyright 2007-2017 Horde LLC + * @license http://www.horde.org/licenses/bsd BSD + * @package Stream_Wrapper + */ +class Horde_Stream_Wrapper_String +{ + /**/ + const WRAPPER_NAME = 'horde-stream-wrapper-string'; + + /** + * The current context. + * + * @var resource + */ + public $context; + + /** + * String position. + * + * @var integer + */ + protected $_pos; + + /** + * The string. + * + * @var string + */ + protected $_string; + + /** + * Unique ID tracker for the streams. + * + * @var integer + */ + private static $_id = 0; + + /** + * Create a stream from a PHP string. + * + * @since 2.1.0 + * + * @param string &$string A PHP string variable. + * + * @return resource A PHP stream pointing to the variable. + */ + public static function getStream(&$string) + { + if (!self::$_id) { + stream_wrapper_register(self::WRAPPER_NAME, __CLASS__); + } + + /* Needed to keep reference. */ + $ob = new stdClass; + $ob->string = &$string; + + return fopen( + self::WRAPPER_NAME . '://' . ++self::$_id, + 'wb', + false, + stream_context_create(array( + self::WRAPPER_NAME => array( + 'string' => $ob + ) + )) + ); + } + + /** + * @see streamWrapper::stream_open() + */ + public function stream_open($path, $mode, $options, &$opened_path) + { + $opts = stream_context_get_options($this->context); + + if (isset($opts[self::WRAPPER_NAME]['string'])) { + $this->_string =& $opts[self::WRAPPER_NAME]['string']->string; + } elseif (isset($opts['horde-string']['string'])) { + // @deprecated + $this->_string =& $opts['horde-string']['string']->getString(); + } else { + throw new Exception('Use ' . __CLASS__ . '::getStream() to initialize the stream.'); + } + + if (is_null($this->_string)) { + return false; + } + + $this->_pos = 0; + + return true; + } + + /** + * @see streamWrapper::stream_close() + */ + public function stream_close() + { + $this->_string = ''; + $this->_pos = 0; + } + + /** + * @see streamWrapper::stream_read() + */ + public function stream_read($count) + { + $curr = $this->_pos; + $this->_pos += $count; + return substr($this->_string, $curr, $count); + } + + /** + * @see streamWrapper::stream_write() + */ + public function stream_write($data) + { + $len = strlen($data); + + $this->_string = substr_replace($this->_string, $data, $this->_pos, $len); + $this->_pos += $len; + + return $len; + } + + /** + * @see streamWrapper::stream_tell() + */ + public function stream_tell() + { + return $this->_pos; + } + + /** + * @see streamWrapper::stream_eof() + */ + public function stream_eof() + { + return ($this->_pos > strlen($this->_string)); + } + + /** + * @see streamWrapper::stream_stat() + */ + public function stream_stat() + { + return array( + 'dev' => 0, + 'ino' => 0, + 'mode' => 0, + 'nlink' => 0, + 'uid' => 0, + 'gid' => 0, + 'rdev' => 0, + 'size' => strlen($this->_string), + 'atime' => 0, + 'mtime' => 0, + 'ctime' => 0, + 'blksize' => 0, + 'blocks' => 0 + ); + } + + /** + * @see streamWrapper::stream_seek() + */ + public function stream_seek($offset, $whence) + { + switch ($whence) { + case SEEK_SET: + $pos = $offset; + break; + + case SEEK_CUR: + $pos = $this->_pos + $offset; + break; + + case SEEK_END: + $pos = strlen($this->_string) + $offset; + break; + } + + if (($pos < 0) || ($pos > strlen($this->_string))) { + return false; + } + + $this->_pos = $pos; + + return true; + } + +} diff --git a/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Stream_Wrapper/Horde/Stream/Wrapper/StringStream.php b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Stream_Wrapper/Horde/Stream/Wrapper/StringStream.php new file mode 100644 index 00000000..64775637 --- /dev/null +++ b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Stream_Wrapper/Horde/Stream/Wrapper/StringStream.php @@ -0,0 +1,32 @@ + + * @category Horde + * @copyright 2007-2016 Horde LLC + * @deprecated Use Horde_Stream_Wrapper_String::getStream() + * @license http://www.horde.org/licenses/bsd BSD + * @package Stream_Wrapper + */ +interface Horde_Stream_Wrapper_StringStream +{ + /** + * Return a reference to the wrapped string. + * + * @return string + */ + public function &getString(); +} diff --git a/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Support/Horde/Support/Array.php b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Support/Horde/Support/Array.php new file mode 100644 index 00000000..590eb622 --- /dev/null +++ b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Support/Horde/Support/Array.php @@ -0,0 +1,201 @@ +update($vars); + } + } + + /** + */ + public function get($key, $default = null) + { + return isset($this->_array[$key]) ? $this->_array[$key] : $default; + } + + /** + * Gets the value at $offset. If no value exists at that offset, or the + * value $offset is NULL, then $default is set as the value of $offset. + * + * @param string $offset Offset to retrieve and set if unset + * @param string $default Default value if $offset does not exist + * + * @return mixed Value at $offset or $default + */ + public function getOrSet($offset, $default = null) + { + $value = $this->offsetGet($offset); + if (is_null($value)) { + $this->offsetSet($offset, $value = $default); + } + return $value; + } + + /** + * Gets the value at $offset and deletes it from the array. If no value + * exists at $offset, or the value at $offset is null, then $default + * will be returned. + * + * @param string $offset Offset to pop + * @param string $default Default value + * + * @return mixed Value at $offset or $default + */ + public function pop($offset, $default = null) + { + $value = $this->offsetGet($offset); + $this->offsetUnset($offset); + return isset($value) ? $value : $default; + } + + /** + * Update the array with the key/value pairs from $array + * + * @param array $array Key/value pairs to set/change in the array. + */ + public function update($array) + { + if (!is_array($array) && !$array instanceof Traversable) { + throw new InvalidArgumentException('expected array or traversable, got ' . gettype($array)); + } + + foreach ($array as $key => $val) { + $this->offsetSet($key, $val); + } + } + + /** + * Get the keys in the array + * + * @return array + */ + public function getKeys() + { + return array_keys($this->_array); + } + + /** + * Get the values in the array + * + * @return array + */ + public function getValues() + { + return array_values($this->_array); + } + + /** + * Clear out the array + */ + public function clear() + { + $this->_array = array(); + } + + /** + */ + public function __get($key) + { + return $this->get($key); + } + + /** + */ + public function __set($key, $value) + { + $this->_array[$key] = $value; + } + + /** + * Checks the existance of $key in this array + */ + public function __isset($key) + { + return array_key_exists($key, $this->_array); + } + + /** + * Removes $key from this array + */ + public function __unset($key) + { + unset($this->_array[$key]); + } + + /** + * Count the number of elements + * + * @return integer + */ + public function count() + { + return count($this->_array); + } + + /** + */ + public function getIterator() + { + return new ArrayIterator($this->_array); + } + + /** + * Gets the value of $offset in this array + * + * @see __get() + */ + public function offsetGet($offset) + { + return $this->__get($offset); + } + + /** + * Sets the value of $offset to $value + * + * @see __set() + */ + public function offsetSet($offset, $value) + { + return $this->__set($offset, $value); + } + + /** + * Checks the existence of $offset in this array + * + * @see __isset() + */ + public function offsetExists($offset) + { + return $this->__isset($offset); + } + + /** + * Removes $offset from this array + * + * @see __unset() + */ + public function offsetUnset($offset) + { + return $this->__unset($offset); + } + +} diff --git a/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Support/Horde/Support/Backtrace.php b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Support/Horde/Support/Backtrace.php new file mode 100644 index 00000000..bd04a795 --- /dev/null +++ b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Support/Horde/Support/Backtrace.php @@ -0,0 +1,175 @@ +createFromThrowable($backtrace); + } elseif ($backtrace instanceof Exception) { + $this->createFromException($backtrace); + } elseif ($backtrace) { + $this->createFromDebugBacktrace($backtrace); + } else { + $this->createFromDebugBacktrace(debug_backtrace(), 1); + } + } + + /** + * Wraps the result of debug_backtrace(). + * + * By specifying a non-zero $nestingLevel, levels of the backtrace can be + * ignored. For instance, when Horde_Support_Backtrace creates a backtrace + * for you, it ignores the Horde_Backtrace constructor in the wrapped + * trace. + * + * @param array $backtrace The debug_backtrace() result. + * @param integer $nestingLevel The number of levels of the backtrace to + * ignore. + */ + public function createFromDebugBacktrace($backtrace, $nestingLevel = 0) + { + while ($nestingLevel > 0) { + array_shift($backtrace); + --$nestingLevel; + } + + $this->backtrace = $backtrace; + } + + /** + * Wraps an error object's backtrace. + * + * @since Horde_Support 2.2.0 + * + * @param Throwable $e The error to wrap. + */ + public function createFromThrowable(Throwable $e) + { + $this->_createFromThrowable($e); + } + + /** + * Wraps an error object's backtrace. + * + * @todo Merge with createFromThrowable with PHP 7. + * + * @param Throwable $e The error to wrap. + */ + protected function _createFromThrowable($e) + { + $this->backtrace = $e->getTrace(); + if ($previous = $e->getPrevious()) { + $backtrace = new self($previous); + $this->backtrace = array_merge($backtrace->backtrace, + $this->backtrace); + } + } + + /** + * Wraps an Exception object's backtrace. + * + * @todo Remove with PHP 7. + * + * @param Exception $e The exception to wrap. + */ + public function createFromException(Exception $e) + { + $this->_createFromThrowable($e); + } + + /** + * Returns the nesting level (number of calls deep) of the current context. + * + * @return integer Nesting level. + */ + public function getNestingLevel() + { + return count($this->backtrace); + } + + /** + * Returns the context at a specific nesting level. + * + * @param integer $nestingLevel 0 == current level, 1 == caller, and so on + * + * @return array The requested context. + */ + public function getContext($nestingLevel) + { + if (!isset($this->backtrace[$nestingLevel])) { + throw new Horde_Exception('Unknown nesting level'); + } + return $this->backtrace[$nestingLevel]; + } + + /** + * Returns details about the routine where the exception occurred. + * + * @return array $caller + */ + public function getCurrentContext() + { + return $this->getContext(0); + } + + /** + * Returns details about the caller of the routine where the exception + * occurred. + * + * @return array $caller + */ + public function getCallingContext() + { + return $this->getContext(1); + } + + /** + * Returns a simple, human-readable list of the complete backtrace. + * + * @return string The backtrace map. + */ + public function __toString() + { + $count = count($this->backtrace); + $pad = strlen($count); + $map = ''; + for ($i = $count - 1; $i >= 0; $i--) { + $map .= str_pad($count - $i, $pad, ' ', STR_PAD_LEFT) . '. '; + if (isset($this->backtrace[$i]['class'])) { + $map .= $this->backtrace[$i]['class'] + . $this->backtrace[$i]['type']; + } + $map .= $this->backtrace[$i]['function'] . '()'; + if (isset($this->backtrace[$i]['file'])) { + $map .= ' ' . $this->backtrace[$i]['file'] + . ':' . $this->backtrace[$i]['line']; + } + $map .= "\n"; + } + return $map; + } +} diff --git a/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Support/Horde/Support/CaseInsensitiveArray.php b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Support/Horde/Support/CaseInsensitiveArray.php new file mode 100644 index 00000000..cd2ada57 --- /dev/null +++ b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Support/Horde/Support/CaseInsensitiveArray.php @@ -0,0 +1,84 @@ + + * @category Horde + * @copyright 2013-2017 Horde LLC + * @license http://www.horde.org/licenses/bsd BSD + * @package Support + */ +class Horde_Support_CaseInsensitiveArray extends ArrayIterator +{ + /** + */ + public function offsetGet($offset) + { + return (is_null($offset = $this->_getRealOffset($offset))) + ? null + : parent::offsetGet($offset); + } + + /** + */ + public function offsetSet($offset, $value) + { + if (is_null($roffset = $this->_getRealOffset($offset))) { + parent::offsetSet($offset, $value); + } else { + parent::offsetSet($roffset, $value); + } + } + + /** + */ + public function offsetExists($offset) + { + return !is_null($offset = $this->_getRealOffset($offset)); + } + + /** + */ + public function offsetUnset($offset) + { + if (!is_null($offset = $this->_getRealOffset($offset))) { + parent::offsetUnset($offset); + } + } + + /** + * Determines the actual array offset given the input offset. + * + * @param string $offset Input offset. + * + * @return string Real offset or null. + */ + protected function _getRealOffset($offset) + { + /* Optimize: check for base $offset in array first. */ + if (parent::offsetExists($offset)) { + return $offset; + } + + foreach (array_keys($this->getArrayCopy()) as $key) { + if (strcasecmp($key, $offset) === 0) { + return $key; + } + } + + return null; + } + +} diff --git a/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Support/Horde/Support/CombineStream.php b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Support/Horde/Support/CombineStream.php new file mode 100644 index 00000000..30e1cb7a --- /dev/null +++ b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Support/Horde/Support/CombineStream.php @@ -0,0 +1,87 @@ + + * @license http://www.horde.org/licenses/bsd BSD + * @category Horde + * @package Support + */ + +/** + * Provides access to the Combine stream wrapper. + * + * @author Michael Slusarz + * @license http://www.horde.org/licenses/bsd BSD + * @category Horde + * @deprecated Use Horde_Stream_Wrapper_Combine::getStream() + * @package Support + */ +class Horde_Support_CombineStream implements Horde_Stream_Wrapper_CombineStream +{ + /** + * Data. + * + * @var array + */ + protected $_data; + + /** + * Constructor + * + * @param array $data An array of strings and/or streams to combine into + * a single stream. + */ + public function __construct($data) + { + $this->installWrapper(); + $this->_data = $data; + } + + /** + * Return a stream handle to this stream. + * + * @return resource + */ + public function fopen() + { + $context = stream_context_create(array('horde-combine' => array('data' => $this))); + return fopen('horde-combine://' . spl_object_hash($this), 'rb', false, $context); + } + + /** + * Return an SplFileObject representing this stream + * + * @return SplFileObject + */ + public function getFileObject() + { + $context = stream_context_create(array('horde-combine' => array('data' => $this))); + return new SplFileObject('horde-combine://' . spl_object_hash($this), 'rb', false, $context); + } + + /** + * Install the horde-combine stream wrapper if it isn't already + * registered. + * + * @throws Exception + */ + public function installWrapper() + { + if (!in_array('horde-combine', stream_get_wrappers()) && + !stream_wrapper_register('horde-combine', 'Horde_Stream_Wrapper_Combine')) { + throw new Exception('Unable to register horde-combine stream wrapper.'); + } + } + + /** + * Return a reference to the data. + * + * @return array + */ + public function getData() + { + return $this->_data; + } + +} diff --git a/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Support/Horde/Support/ConsistentHash.php b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Support/Horde/Support/ConsistentHash.php new file mode 100644 index 00000000..98f570bb --- /dev/null +++ b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Support/Horde/Support/ConsistentHash.php @@ -0,0 +1,244 @@ +_numberOfReplicas = $numberOfReplicas; + $this->addNodes($nodes, $weight); + } + + /** + * Get the primary node for $key. + * + * @param string $key The key to look up. + * + * @param string The primary node for $key. + */ + public function get($key) + { + $nodes = $this->getNodes($key, 1); + if (!$nodes) { + throw new Exception('No nodes found'); + } + return $nodes[0]; + } + + /** + * Get an ordered list of nodes for $key. + * + * @param string $key The key to look up. + * @param integer $count The number of nodes to look up. + * + * @return array An ordered array of nodes. + */ + public function getNodes($key, $count = 5) + { + // Degenerate cases + if ($this->_nodeCount < $count) { + throw new Exception('Not enough nodes (have ' . $this->_nodeCount . ', ' . $count . ' requested)'); + } + if ($this->_nodeCount == 0) { + return array(); + } + + // Simple case + if ($this->_nodeCount == 1) { + return array($this->_nodes[0]['n']); + } + + $hash = $this->hash(serialize($key)); + + // Find the first point on the circle greater than $hash by binary search. + $low = 0; + $high = $this->_pointCount - 1; + $index = null; + while (true) { + $mid = (int)(($low + $high) / 2); + if ($mid == $this->_pointCount) { + $index = 0; + break; + } + + $midval = $this->_pointMap[$mid]; + $midval1 = ($mid == 0) ? 0 : $this->_pointMap[$mid - 1]; + if ($midval1 < $hash && $hash <= $midval) { + $index = $mid; + break; + } + + if ($midval > $hash) { + $high = $mid - 1; + } else { + $low = $mid + 1; + } + + if ($low > $high) { + $index = 0; + break; + } + } + + $nodes = array(); + while (count($nodes) < $count) { + $nodeIndex = $this->_pointMap[$index++ % $this->_pointCount]; + $nodes[$nodeIndex] = $this->_nodes[$this->_circle[$nodeIndex]]['n']; + } + return array_values($nodes); + } + + /** + * Add $node with weight $weight + * + * @param mixed $node + */ + public function add($node, $weight = 1) + { + // Delegate to addNodes so that the circle is only regenerated once when + // adding multiple nodes. + $this->addNodes(array($node), $weight); + } + + /** + * Add multiple nodes to the hash with the same weight. + * + * @param array $nodes An array of nodes. + * @param integer $weight The weight to add the nodes with. + */ + public function addNodes($nodes, $weight = 1) + { + foreach ($nodes as $node) { + $this->_nodes[] = array('n' => $node, 'w' => $weight); + $this->_nodeCount++; + + $nodeIndex = $this->_nodeCount - 1; + $nodeString = serialize($node); + + $numberOfReplicas = (int)($weight * $this->_numberOfReplicas); + for ($i = 0; $i < $numberOfReplicas; $i++) { + $this->_circle[$this->hash($nodeString . $i)] = $nodeIndex; + } + } + + $this->_updateCircle(); + } + + /** + * Remove $node from the hash. + * + * @param mixed $node + */ + public function remove($node) + { + $nodeIndex = null; + $nodeString = serialize($node); + + // Search for the node in the node list + foreach (array_keys($this->_nodes) as $i) { + if ($this->_nodes[$i]['n'] === $node) { + $nodeIndex = $i; + break; + } + } + + if (is_null($nodeIndex)) { + throw new InvalidArgumentException('Node was not in the hash'); + } + + // Remove all points from the circle + $numberOfReplicas = (int)($this->_nodes[$nodeIndex]['w'] * $this->_numberOfReplicas); + for ($i = 0; $i < $numberOfReplicas; $i++) { + unset($this->_circle[$this->hash($nodeString . $i)]); + } + $this->_updateCircle(); + + // Unset the node from the node list + unset($this->_nodes[$nodeIndex]); + $this->_nodeCount--; + } + + /** + * Expose the hash function for testing, probing, and extension. + * + * @param string $key + * + * @return string Hash value + */ + public function hash($key) + { + return 'h' . substr(hash('md5', $key), 0, 8); + } + + /** + * Maintain the circle and arrays of points. + */ + protected function _updateCircle() + { + // Sort the circle + ksort($this->_circle); + + // Now that the hashes are sorted, generate numeric indices into the + // circle. + $this->_pointMap = array_keys($this->_circle); + $this->_pointCount = count($this->_pointMap); + } + +} diff --git a/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Support/Horde/Support/Guid.php b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Support/Horde/Support/Guid.php new file mode 100644 index 00000000..c105daf3 --- /dev/null +++ b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Support/Horde/Support/Guid.php @@ -0,0 +1,73 @@ + + * $uid = (string)new Horde_Support_Guid([$opts = array()]); + * + * + * Copyright 2009-2017 Horde LLC (http://www.horde.org/) + * + * @category Horde + * @package Support + * @license http://www.horde.org/licenses/bsd + */ +class Horde_Support_Guid +{ + /** + * Generated GUID. + * + * @var string + */ + private $_guid; + + /** + * New GUID. + * + * @param array $opts Additional options: + *
+     * 'prefix' - (string) A prefix to add between the date string and the
+     *            random string.
+     *            DEFAULT: NONE
+     * 'server' - (string) The server name.
+     *            DEFAULT: $_SERVER['SERVER_NAME'] (or 'localhost')
+     * 
+ */ + public function __construct(array $opts = array()) + { + $this->generate($opts); + } + + /** + * Generates a GUID. + * + * @param array $opts Additional options: + *
+     * 'prefix' - (string) A prefix to add between the date string and the
+     *            random string.
+     *            DEFAULT: NONE
+     * 'server' - (string) The server name.
+     *            DEFAULT: $_SERVER['SERVER_NAME'] (or 'localhost')
+     * 
+ */ + public function generate(array $opts = array()) + { + $this->_guid = date('YmdHis') + . '.' + . (isset($opts['prefix']) ? $opts['prefix'] . '.' : '') + . strval(new Horde_Support_Randomid()) + . '@' + . (isset($opts['server']) ? $opts['server'] : (isset($_SERVER['SERVER_NAME']) ? $_SERVER['SERVER_NAME'] : 'localhost')); + } + + /** + * Cooerce to string. + * + * @return string + */ + public function __toString() + { + return $this->_guid; + } + +} diff --git a/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Support/Horde/Support/Inflector.php b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Support/Horde/Support/Inflector.php new file mode 100644 index 00000000..babdb5e4 --- /dev/null +++ b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Support/Horde/Support/Inflector.php @@ -0,0 +1,437 @@ + 'moves', + '/sex$/i' => 'sexes', + '/child$/i' => 'children', + '/man$/i' => 'men', + '/foot$/i' => 'feet', + '/person$/i' => 'people', + '/(quiz)$/i' => '$1zes', + '/^(ox)$/i' => '$1en', + '/(m|l)ouse$/i' => '$1ice', + '/(matr|vert|ind)ix|ex$/i' => '$1ices', + '/(x|ch|ss|sh)$/i' => '$1es', + '/([^aeiouy]|qu)ies$/i' => '$1y', + '/([^aeiouy]|qu)y$/i' => '$1ies', + '/(?:([^f])fe|([lr])f)$/i' => '$1$2ves', + '/sis$/i' => 'ses', + '/([ti])um$/i' => '$1a', + '/(buffal|tomat)o$/i' => '$1oes', + '/(bu)s$/i' => '$1ses', + '/(alias|status)$/i' => '$1es', + '/(octop|vir)us$/i' => '$1i', + '/(ax|test)is$/i' => '$1es', + '/s$/i' => 's', + '/$/' => 's', + ); + + /** + * Rules for singularizing English nouns. + * + * @var array + */ + protected $_singularizationRules = array( + '/cookies$/i' => 'cookie', + '/moves$/i' => 'move', + '/sexes$/i' => 'sex', + '/children$/i' => 'child', + '/men$/i' => 'man', + '/feet$/i' => 'foot', + '/people$/i' => 'person', + '/databases$/i'=> 'database', + '/(quiz)zes$/i' => '\1', + '/(matr)ices$/i' => '\1ix', + '/(vert|ind)ices$/i' => '\1ex', + '/^(ox)en/i' => '\1', + '/(alias|status)es$/i' => '\1', + '/([octop|vir])i$/i' => '\1us', + '/(cris|ax|test)es$/i' => '\1is', + '/(shoe)s$/i' => '\1', + '/(o)es$/i' => '\1', + '/(bus)es$/i' => '\1', + '/([m|l])ice$/i' => '\1ouse', + '/(x|ch|ss|sh)es$/i' => '\1', + '/(m)ovies$/i' => '\1ovie', + '/(s)eries$/i' => '\1eries', + '/([^aeiouy]|qu)ies$/i' => '\1y', + '/([lr])ves$/i' => '\1f', + '/(tive)s$/i' => '\1', + '/(hive)s$/i' => '\1', + '/([^f])ves$/i' => '\1fe', + '/(^analy)ses$/i' => '\1sis', + '/((a)naly|(b)a|(d)iagno|(p)arenthe|(p)rogno|(s)ynop|(t)he)ses$/i' => '\1\2sis', + '/([ti])a$/i' => '\1um', + '/(n)ews$/i' => '\1ews', + '/(.*)s$/i' => '\1', + ); + + /** + * An array of words with the same singular and plural spellings. + * + * @var array + */ + protected $_uncountables = array( + 'aircraft', + 'cannon', + 'deer', + 'equipment', + 'fish', + 'information', + 'money', + 'moose', + 'rice', + 'series', + 'sheep', + 'species', + 'swine', + ); + + /** + * Constructor. + * + * Stores a map of the uncountable words for quicker checks. + */ + public function __construct() + { + $this->_uncountables_keys = array_flip($this->_uncountables); + } + + /** + * Adds an uncountable word. + * + * @param string $word The uncountable word. + */ + public function uncountable($word) + { + $this->_uncountables[] = $word; + $this->_uncountables_keys[$word] = true; + } + + /** + * Singular English word to pluralize. + * + * @param string $word Word to pluralize. + * + * @return string Plural form of $word. + */ + public function pluralize($word) + { + if ($plural = $this->getCache($word, 'pluralize')) { + return $plural; + } + + if (isset($this->_uncountables_keys[$word])) { + return $word; + } + + foreach ($this->_pluralizationRules as $regexp => $replacement) { + $plural = preg_replace($regexp, $replacement, $word, -1, $matches); + if ($matches > 0) { + return $this->setCache($word, 'pluralize', $plural); + } + } + + return $this->setCache($word, 'pluralize', $word); + } + + /** + * Plural English word to singularize. + * + * @param string $word Word to singularize. + * + * @return string Singular form of $word. + */ + public function singularize($word) + { + if ($singular = $this->getCache($word, 'singularize')) { + return $singular; + } + + if (isset($this->_uncountables_keys[$word])) { + return $word; + } + + foreach ($this->_singularizationRules as $regexp => $replacement) { + $singular = preg_replace($regexp, $replacement, $word, -1, $matches); + if ($matches > 0) { + return $this->setCache($word, 'singularize', $singular); + } + } + + return $this->setCache($word, 'singularize', $word); + } + + /** + * Camel-cases a word. + * + * @todo Do we want locale-specific or locale-independent camel casing? + * + * @param string $word The word to camel-case. + * @param string $firstLetter Whether to upper or lower case the first. + * letter of each slash-separated section. + * + * @return string Camelized $word + */ + public function camelize($word, $firstLetter = 'upper') + { + if ($camelized = $this->getCache($word, 'camelize' . $firstLetter)) { + return $camelized; + } + + $camelized = $word; + if (Horde_String::lower($camelized) != $camelized && + strpos($camelized, '_') !== false) { + $camelized = str_replace('_', '/', $camelized); + } + if (strpos($camelized, '/') !== false) { + $camelized = str_replace('/', '/ ', $camelized); + } + if (strpos($camelized, '_') !== false) { + $camelized = strtr($camelized, '_', ' '); + } + + $camelized = str_replace(' ', '', Horde_String::ucwords($camelized)); + + if ($firstLetter == 'lower') { + $parts = array(); + foreach (explode('/', $camelized) as $part) { + $part[0] = Horde_String::lower($part[0]); + $parts[] = $part; + } + $camelized = implode('/', $parts); + } + + return $this->setCache($word, 'camelize' . $firstLetter, $camelized); + } + + /** + * Capitalizes all the words and replaces some characters in the string to + * create a nicer looking title. + * + * Titleize is meant for creating pretty output. + * + * See: + * - http://daringfireball.net/2008/05/title_case + * - http://daringfireball.net/2008/08/title_case_update + * + * Examples: + * 1. titleize("man from the boondocks") => "Man From The Boondocks" + * 2. titleize("x-men: the last stand") => "X Men: The Last Stand" + */ + public function titleize($word) + { + throw new Exception('not implemented yet'); + } + + /** + * The reverse of camelize(). + * + * Makes an underscored form from the expression in the string. + * + * Examples: + * 1. underscore("ActiveRecord") => "active_record" + * 2. underscore("ActiveRecord_Errors") => "active_record_errors" + * + * @todo Do we want locale-specific or locale-independent lowercasing? + */ + public function underscore($camelCasedWord) + { + $word = $camelCasedWord; + if ($result = $this->getCache($word, 'underscore')) { + return $result; + } + $result = Horde_String::lower(preg_replace('/([a-z])([A-Z])/', "\${1}_\${2}", $word)); + return $this->setCache($word, 'underscore', $result); + } + + /** + * Replaces underscores with dashes in the string. + * + * Example: + * 1. dasherize("puni_puni") => "puni-puni" + */ + public function dasherize($underscoredWord) + { + if ($result = $this->getCache($underscoredWord, 'dasherize')) { + return $result; + } + + $result = str_replace('_', '-', $this->underscore($underscoredWord)); + return $this->setCache($underscoredWord, 'dasherize', $result); + } + + /** + * Capitalizes the first word and turns underscores into spaces and strips + * _id. + * + * Like titleize(), this is meant for creating pretty output. + * + * Examples: + * 1. humanize("employee_salary") => "Employee salary" + * 2. humanize("author_id") => "Author" + */ + public function humanize($lowerCaseAndUnderscoredWord) + { + $word = $lowerCaseAndUnderscoredWord; + if ($result = $this->getCache($word, 'humanize')) { + return $result; + } + + $result = ucfirst(str_replace('_', ' ', $this->underscore($word))); + if (substr($result, -3, 3) == ' id') { + $result = str_replace(' id', '', $result); + } + return $this->setCache($word, 'humanize', $result); + } + + /** + * Removes the module part from the expression in the string. + * + * Examples: + * 1. demodulize("Fax_Job") => "Job" + * 1. demodulize("User") => "User" + */ + public function demodulize($classNameInModule) + { + $result = explode('_', $classNameInModule); + return array_pop($result); + } + + /** + * Creates the name of a table like Rails does for models to table names. + * + * This method uses the pluralize() method on the last word in the string. + * + * Examples: + * 1. tableize("RawScaledScorer") => "raw_scaled_scorers" + * 2. tableize("egg_and_ham") => "egg_and_hams" + * 3. tableize("fancyCategory") => "fancy_categories" + */ + public function tableize($className) + { + if ($result = $this->getCache($className, 'tableize')) { + return $result; + } + + $result = $this->pluralize($this->underscore($className)); + $result = str_replace('/', '_', $result); + return $this->setCache($className, 'tableize', $result); + } + + /** + * Creates a class name from a table name like Rails does for table names + * to models. + * + * Examples: + * 1. classify("egg_and_hams") => "EggAndHam" + * 2. classify("post") => "Post" + */ + public function classify($tableName) + { + if ($result = $this->getCache($tableName, 'classify')) { + return $result; + } + $result = $this->camelize($this->singularize($tableName)); + + // classes use underscores instead of slashes for namespaces + $result = str_replace('/', '_', $result); + return $this->setCache($tableName, 'classify', $result); + } + + /** + * Creates a foreign key name from a class name. + * + * $separateClassNameAndIdWithUnderscore sets whether the method should put + * '_' between the name and 'id'. + * + * Examples: + * 1. foreignKey("Message") => "message_id" + * 2. foreignKey("Message", false) => "messageid" + * 3. foreignKey("Fax_Job") => "fax_job_id" + */ + public function foreignKey($className, $separateClassNameAndIdWithUnderscore = true) + { + throw new Exception('not implemented yet'); + } + + /** + * Turns a number into an ordinal string used to denote the position in an + * ordered sequence such as 1st, 2nd, 3rd, 4th. + * + * Examples: + * 1. ordinalize(1) => "1st" + * 2. ordinalize(2) => "2nd" + * 3. ordinalize(1002) => "1002nd" + * 4. ordinalize(1003) => "1003rd" + */ + public function ordinalize($number) + { + throw new Exception('not implemented yet'); + } + + /** + * Clears the inflection cache. + */ + public function clearCache() + { + $this->_cache = array(); + } + + /** + * Retuns a cached inflection. + * + * @return string | false + */ + public function getCache($word, $rule) + { + return isset($this->_cache[$word . '|' . $rule]) ? + $this->_cache[$word . '|' . $rule] : false; + } + + /** + * Caches an inflection. + * + * @param string $word The word being inflected. + * @param string $rule The inflection rule. + * @param string $value The inflected value of $word. + * + * @return string The inflected value + */ + public function setCache($word, $rule, $value) + { + $this->_cache[$word . '|' . $rule] = $value; + return $value; + } +} diff --git a/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Support/Horde/Support/Memory.php b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Support/Horde/Support/Memory.php new file mode 100644 index 00000000..1389858c --- /dev/null +++ b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Support/Horde/Support/Memory.php @@ -0,0 +1,84 @@ + + * $t = new Horde_Support_Memory; + * $t->push(); + * $used = $t->pop(); + * + * + * Do not expect too much of this memory tracker. Profiling memory is not + * trivial as your placement of the measurements may obscure important + * information. As a trivial example: Assuming that your script used 20 MB of + * memory befory you call push() the information you get when calling pop() + * might only tell you that there was less than 20 MB of memory consumed in + * between the two calls. Take the changes to internal memory handling of PHP in + * between the different versions into account + * (http://de3.php.net/manual/en/features.gc.performance-considerations.php) and + * you should get an idea about why you might be cautious about the values you + * get from this memory tracker. + * + * Copyright 2011-2017 Horde LLC (http://www.horde.org/) + * + * @category Horde + * @package Support + * @license http://www.horde.org/licenses/bsd + */ +class Horde_Support_Memory +{ + /** + * Holds the starting memory consumption. + * + * @var array + */ + protected $_start = array(); + + /** + * Current index for stacked trackers. + * + * @var integer + */ + protected $_idx = 0; + + /** + * Push a new tracker on the stack. + */ + public function push() + { + $start = $this->_start[$this->_idx++] = array( + memory_get_usage(), + memory_get_peak_usage(), + memory_get_usage(true), + memory_get_peak_usage(true) + ); + return $start; + } + + /** + * Pop the latest tracker and return the difference with the current + * memory situation. + * + * @return array The change in memory allocated via emalloc() in between the + * push() and the pop() call. The array holds four values: the + * first one indicates the change in current usage of memory + * while the second value indicates any changes in the peak + * amount of memory used. The third and fourth value show + * current and peak usage as well but indicate the real memory + * usage and not just the part allocated via emalloc(), + */ + public function pop() + { + if (! ($this->_idx > 0)) { + throw new Exception('No timers have been started'); + } + $start = $this->_start[--$this->_idx]; + return array( + memory_get_usage() - $start[0], + memory_get_peak_usage() - $start[1], + memory_get_usage(true) - $start[2], + memory_get_peak_usage(true) - $start[3] + ); + } + +} diff --git a/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Support/Horde/Support/Numerizer.php b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Support/Horde/Support/Numerizer.php new file mode 100644 index 00000000..94e23f85 --- /dev/null +++ b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Support/Horde/Support/Numerizer.php @@ -0,0 +1,46 @@ + + * @license http://www.horde.org/licenses/bsd BSD + * @category Horde + * @package Support + */ + +/** + * @author Chuck Hagenbuch + * @license http://www.horde.org/licenses/bsd BSD + * @category Horde + * @package Support + */ +class Horde_Support_Numerizer +{ + public static function numerize($string, $args = array()) + { + return self::factory($args)->numerize($string); + } + + public static function factory($args = array()) + { + $locale = isset($args['locale']) ? $args['locale'] : null; + if ($locale && Horde_String::lower($locale) != 'base') { + $locale = str_replace(' ', '_', Horde_String::ucwords(str_replace('_', ' ', Horde_String::lower($locale)))); + $class = 'Horde_Support_Numerizer_Locale_' . $locale; + if (class_exists($class)) { + return new $class($args); + } + + list($language,) = explode('_', $locale); + if ($language != $locale) { + $class = 'Horde_Support_Numerizer_Locale_' . $language; + if (class_exists($class)) { + return new $class($args); + } + } + } + + return new Horde_Support_Numerizer_Locale_Base($args); + } + +} diff --git a/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Support/Horde/Support/Numerizer/Locale/Base.php b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Support/Horde/Support/Numerizer/Locale/Base.php new file mode 100644 index 00000000..ab46f429 --- /dev/null +++ b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Support/Horde/Support/Numerizer/Locale/Base.php @@ -0,0 +1,166 @@ + + * @license http://www.horde.org/licenses/bsd BSD + * @category Horde + * @package Support + */ + +/** + * @author Chuck Hagenbuch + * @license http://www.horde.org/licenses/bsd BSD + * @category Horde + * @package Support + */ +class Horde_Support_Numerizer_Locale_Base +{ + public $DIRECT_NUMS = array( + 'eleven' => '11', + 'twelve' => '12', + 'thirteen' => '13', + 'fourteen' => '14', + 'fifteen' => '15', + 'sixteen' => '16', + 'seventeen' => '17', + 'eighteen' => '18', + 'nineteen' => '19', + 'ninteen' => '19', // Common mis-spelling + 'zero' => '0', + 'one' => '1', + 'two' => '2', + 'three' => '3', + 'four(\W|$)' => '4$1', // The weird regex is so that it matches four but not fourty + 'five' => '5', + 'six(\W|$)' => '6$1', + 'seven(\W|$)' => '7$1', + 'eight(\W|$)' => '8$1', + 'nine(\W|$)' => '9$1', + 'ten' => '10', + '\ba[\b^$]' => '1', // doesn't make sense for an 'a' at the end to be a 1 + ); + + public $TEN_PREFIXES = array( + 'twenty' => 20, + 'thirty' => 30, + 'forty' => 40, + 'fourty' => 40, // Common mis-spelling + 'fifty' => 50, + 'sixty' => 60, + 'seventy' => 70, + 'eighty' => 80, + 'ninety' => 90, + 'ninty' => 90, // Common mis-spelling + ); + + public $BIG_PREFIXES = array( + 'hundred' => 100, + 'thousand' => 1000, + 'million' => 1000000, + 'billion' => 1000000000, + 'trillion' => 1000000000000, + ); + + public function numerize($string) + { + // preprocess + $string = $this->_splitHyphenatedWords($string); + $string = $this->_hideAHalf($string); + + $string = $this->_directReplacements($string); + $string = $this->_replaceTenPrefixes($string); + $string = $this->_replaceBigPrefixes($string); + $string = $this->_fractionalAddition($string); + + return $string; + } + + /** + * will mutilate hyphenated-words but shouldn't matter for date extraction + */ + protected function _splitHyphenatedWords($string) + { + return preg_replace('/ +|([^\d])-([^d])/', '$1 $2', $string); + } + + /** + * take the 'a' out so it doesn't turn into a 1, save the half for the end + */ + protected function _hideAHalf($string) + { + return str_replace('a half', 'haAlf', $string); + } + + /** + * easy/direct replacements + */ + protected function _directReplacements($string) + { + foreach ($this->DIRECT_NUMS as $dn => $dn_replacement) { + $string = preg_replace("/$dn/i", $dn_replacement, $string); + } + return $string; + } + + /** + * ten, twenty, etc. + */ + protected function _replaceTenPrefixes($string) + { + foreach ($this->TEN_PREFIXES as $tp => $tp_replacement) { + $string = preg_replace_callback( + "/(?:$tp)( *\d(?=[^\d]|\$))*/i", + function ($m) use ($tp_replacement) { + return $tp_replacement + (isset($m[1]) ? (int)$m[1] : 0); + }, + $string + ); + } + return $string; + } + + /** + * hundreds, thousands, millions, etc. + */ + protected function _replaceBigPrefixes($string) + { + foreach ($this->BIG_PREFIXES as $bp => $bp_replacement) { + $string = preg_replace_callback( + '/(\d*) *' . $bp . '/i', + function ($m) use ($bp_replacement) { + return $bp_replacement * (int)$m[1]; + }, + $string + ); + $string = $this->_andition($string); + } + return $string; + } + + protected function _andition($string) + { + while (true) { + if (preg_match('/(\d+)( | and )(\d+)(?=[^\w]|$)/i', $string, $sc, PREG_OFFSET_CAPTURE)) { + if (preg_match('/and/', $sc[2][0]) || (strlen($sc[1][0]) > strlen($sc[3][0]))) { + $string = substr($string, 0, $sc[1][1]) . ((int)$sc[1][0] + (int)$sc[3][0]) . substr($string, $sc[3][1] + strlen($sc[3][0])); + continue; + } + } + break; + } + return $string; + } + + protected function _fractionalAddition($string) + { + return preg_replace_callback( + '/(\d+)(?: | and |-)*haAlf/i', + function ($m) { + return (string)((float)$m[1] + 0.5); + }, + $string + ); + } + +} diff --git a/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Support/Horde/Support/Numerizer/Locale/De.php b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Support/Horde/Support/Numerizer/Locale/De.php new file mode 100644 index 00000000..2b953c8a --- /dev/null +++ b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Support/Horde/Support/Numerizer/Locale/De.php @@ -0,0 +1,132 @@ + + * @author Jan Schneider + * @license http://www.horde.org/licenses/bsd BSD + * @category Horde + * @package Support + */ + +/** + * @author Chuck Hagenbuch + * @author Jan Schneider + * @license http://www.horde.org/licenses/bsd BSD + * @category Horde + * @package Support + */ +class Horde_Support_Numerizer_Locale_De extends Horde_Support_Numerizer_Locale_Base +{ + public $DIRECT_NUMS = array( + 'dreizehn' => 13, + 'vierzehn' => 14, + 'fünfzehn' => 15, + 'sechzehn' => 16, + 'siebzehn' => 17, + 'achtzehn' => 18, + 'neunzehn' => 19, + 'ein[se]?' => 1, + 'zwei' => 2, + 'zwo' => 2, + 'drei' => 3, + 'vier' => 4, + 'fünf' => 5, + 'sechs' => 6, + 'sieben' => 7, + 'acht' => 8, + 'neun' => 9, + 'zehn' => 10, + 'elf' => 11, + 'zwölf' => 12, + ); + + public $TEN_PREFIXES = array( + 'zwanzig' => 20, + 'dreißig' => 30, + 'vierzig' => 40, + 'fünfzig' => 50, + 'sechzig' => 60, + 'siebzig' => 70, + 'achtzig' => 80, + 'neunzig' => 90, + ); + + public $BIG_PREFIXES = array( + 'hundert' => 100, + 'tausend' => 1000, + 'million *' => 1000000, + 'milliarde *' => 1000000000, + 'billion *' => 1000000000000, + ); + + /** + * Rules: + * + * - there are irregular word for 11 and 12 like in English + * - numbers below one million are written together (1 M = "eine Million", 100 = "einhundert") + * - "a" is declinable (see above, "one" = "eins", "a" = "ein/eine") + * - numbers below 100 are flipped compared to english, and have an "and = "und" (21 = "twenty-one" = "einundzwanzig") + */ + public function numerize($string) + { + $string = $this->_replaceTenPrefixes($string); + $string = $this->_directReplacements($string); + $string = $this->_replaceBigPrefixes($string); + $string = $this->_fractionalAddition($string); + + return $string; + } + + /** + * ten, twenty, etc. + */ + protected function _replaceTenPrefixes($string) + { + foreach ($this->TEN_PREFIXES as $tp => $tp_replacement) { + $string = preg_replace_callback( + "/(?:$tp)( *\d(?=[^\d]|\$))*/i", + function ($m) use ($tp_replacement) { + return $tp_replacement + (isset($m[1]) ? (int)$m[1] : 0); + }, + $string + ); + } + return $string; + } + + /** + * hundreds, thousands, millions, etc. + */ + protected function _replaceBigPrefixes($string) + { + foreach ($this->BIG_PREFIXES as $bp => $bp_replacement) { + $string = preg_replace_callback( + '/(\d*) *' . $bp . '(\d?)/i', + function ($m) use ($bp_replacement) { + $factor = (int)$m[1]; + if (!$factor) { + $factor = 1; + } + return ($bp_replacement * $factor) + . ($bp_replacement == 100 ? ($m[2] ? 'und' : '') : 'und') + . $m[2]; + }, + $string + ); + $string = $this->_andition($string); + } + return $string; + } + + protected function _andition($string) + { + while (preg_match('/(\d+)((?: *und *)+)(\d*)(?=\w|$)/i', $string, $sc, PREG_OFFSET_CAPTURE)) { + $string = substr($string, 0, $sc[1][1]) + . ((int)$sc[1][0] + (int)$sc[3][0]) + . substr($string, $sc[3][1] + strlen($sc[3][0])); + } + return $string; + } + +} diff --git a/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Support/Horde/Support/Numerizer/Locale/Pt.php b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Support/Horde/Support/Numerizer/Locale/Pt.php new file mode 100644 index 00000000..cf590c8f --- /dev/null +++ b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Support/Horde/Support/Numerizer/Locale/Pt.php @@ -0,0 +1,152 @@ + '13', + 'catorze' => '14', + 'quatorze' => '14', + 'quinze' => '15', + 'dezasseis' => '16', + 'dezassete' => '17', + 'dezoito' => '18', + 'dezanove' => '19', + 'um(\W|$)' => '1$1', + 'uma(\W|$)' => '1$1', + 'dois' => '2', + 'duas' => '2', + 'tres' => '3', + 'quatro' => '4', + 'cinco' => '5', + 'seis' => '6', + 'sete' => '7', + 'oito' => '8', + 'nove' => '9', + 'dez' => '10', + 'onze' => '11', + 'doze' => '12', + ); + + public $TEN_PREFIXES = array( + 'vinte' => '20', + 'trinta' => '30', + 'quarenta' => '40', + 'cinquenta' => '50', + 'sessenta' => '60', + 'setenta' => '70', + 'oitenta' => '80', + 'noventa' => '90', + ); + + public $BIG_PREFIXES = array( + 'cem' => '100', + 'mil' => '1000', + 'milhao *' => '1000000', + 'milhar de *' => '1000000000', + 'biliao *' => '1000000000000', + ); + + public function numerize($string) + { + // preprocess + $string = $this->_splitHyphenateWords($string); + $string = $this->_replaceTenPrefixes($string); + $string = $this->_directReplacements($string); + $string = $this->_replaceBigPrefixes($string); +// $string = $this->_fractionalAddition($string); + + return $string; + } + + + /** + * will mutilate hyphenated-words but shouldn't matter for date extraction + */ + protected function _splitHyphenateWords($string) + { + return preg_replace('/ +|([^\d]) e? ([^d])/', '$1 $2', $string); + } + + /** + * easy/direct replacements + */ + protected function _directReplacements($string) + { + foreach ($this->DIRECT_NUMS as $dn => $dn_replacement) { + $string = preg_replace("/$dn/i", $dn_replacement, $string); + } + return $string; + } + + /** + * ten, twenty, etc. + */ + protected function _replaceTenPrefixes($string) + { + foreach ($this->TEN_PREFIXES as $tp => $tp_replacement) { + $string = preg_replace_callback( + "/(?:$tp)( *\d(?=[^\d]|\$))*/i", + function ($m) use ($tp_replacement) { + return $tp_replacement + (isset($m[1]) ? (int)$m[1] : 0); + }, + $string + ); + } + return $string; + } + + /** + * hundreds, thousands, millions, etc. + */ + protected function _replaceBigPrefixes($string) + { + foreach ($this->BIG_PREFIXES as $bp => $bp_replacement) { + $string = preg_replace_callback( + '/(\d*) *' . $bp . '(\d?)/i', + function ($m) use ($bp_replacement) { + $factor = (int)$m[1]; + if (!$factor) { + $factor = 1; + } + return ($bp_replacement * $factor) + . ($bp_replacement == 100 ? ($m[2] ? 'e' : '') : 'e') + . $m[2]; + }, + $string); + $string = $this->_andition($string); + } + return $string; + } + + protected function _andition($string) + { + while (preg_match('/(\d+)((?: *e *)+)(\d*)(?=\w|$)/i', $string, $sc, PREG_OFFSET_CAPTURE)) { + $string = substr($string, 0, $sc[1][1]) . ((int)$sc[1][0] + (int)$sc[3][0]) . substr($string, $sc[3][1] + strlen($sc[3][0])); + } + return $string; + } + + protected function _fractionalAddition($string) + { + return preg_replace_callback( + '/(\d+)(?: | e |-)*/i', + function ($m) { + return (string)((float)$m[1] + 0.5); + }, + $string + ); + } + +} diff --git a/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Support/Horde/Support/ObjectStub.php b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Support/Horde/Support/ObjectStub.php new file mode 100644 index 00000000..d46bba65 --- /dev/null +++ b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Support/Horde/Support/ObjectStub.php @@ -0,0 +1,69 @@ + + * @category Horde + * @license http://www.horde.org/licenses/bsd BSD + * @package Support + */ + +/** + * @author Michael Slusarz + * @category Horde + * @license http://www.horde.org/licenses/bsd BSD + * @package Support + */ +class Horde_Support_ObjectStub +{ + /** + * Original data object. + * + * @var array + */ + protected $_data; + + /** + * Constructor + * + * @param object $data The original data object. + */ + public function __construct($data) + { + $this->_data = $data; + } + + /** + */ + public function __get($name) + { + return isset($this->_data->$name) + ? $this->_data->$name + : null; + } + + /** + */ + public function __set($name, $value) + { + $this->_data->$name = $value; + } + + /** + */ + public function __isset($name) + { + return isset($this->_data->$name); + } + + /** + */ + public function __unset($name) + { + unset($this->_data->$name); + } + +} diff --git a/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Support/Horde/Support/Randomid.php b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Support/Horde/Support/Randomid.php new file mode 100644 index 00000000..8be7e1af --- /dev/null +++ b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Support/Horde/Support/Randomid.php @@ -0,0 +1,77 @@ + + * $id = (string)new Horde_Support_Randomid(); + * + * + * Copyright 2010-2017 Horde LLC (http://www.horde.org/) + * + * @author Michael Slusarz + * @category Horde + * @license http://www.horde.org/licenses/bsd BSD + * @package Support + */ +class Horde_Support_Randomid +{ + /** + * Generated ID. + * + * @var string + */ + private $_id; + + /** + * New random ID. + */ + public function __construct() + { + $this->_id = $this->generate(); + } + + /** + * Generate a random ID. + */ + public function generate() + { + $elts = array( + uniqid(), + mt_rand(), + getmypid(), + spl_object_hash($this) + ); + if (function_exists('zend_thread_id')) { + $elts[] = zend_thread_id(); + } + if (function_exists('sys_getloadavg') && + ($loadavg = sys_getloadavg())) { + $elts = array_merge($elts, $loadavg); + } + if (function_exists('memory_get_usage')) { + $elts[] = memory_get_usage(); + $elts[] = memory_get_peak_usage(); + } + + shuffle($elts); + + /* Base64 can have /, +, and = characters. Restrict to URL-safe + * characters. */ + return substr(str_replace( + array('/', '+', '='), + array('-', '_', ''), + base64_encode(hash('sha1', serialize($elts), true)) + ), 0, 23); + } + + /** + * Cooerce to string. + * + * @return string The random ID. + */ + public function __toString() + { + return $this->_id; + } +} diff --git a/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Support/Horde/Support/Stack.php b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Support/Horde/Support/Stack.php new file mode 100644 index 00000000..d4d8c859 --- /dev/null +++ b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Support/Horde/Support/Stack.php @@ -0,0 +1,41 @@ +_stack = $stack; + } + + public function push($value) + { + $this->_stack[] = $value; + } + + public function pop() + { + return array_pop($this->_stack); + } + + public function peek($offset = 1) + { + if (isset($this->_stack[count($this->_stack) - $offset])) { + return $this->_stack[count($this->_stack) - $offset]; + } else { + return null; + } + } +} diff --git a/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Support/Horde/Support/StringStream.php b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Support/Horde/Support/StringStream.php new file mode 100644 index 00000000..1811bc0c --- /dev/null +++ b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Support/Horde/Support/StringStream.php @@ -0,0 +1,100 @@ + + * @category Horde + * @license http://www.horde.org/licenses/bsd BSD + * @package Support + */ + +/** + * @author Chuck Hagenbuch + * @category Horde + * @deprecated Use Horde_Stream_Wrapper_String::getStream() + * @license http://www.horde.org/licenses/bsd BSD + * @package Support + */ +class Horde_Support_StringStream implements Horde_Stream_Wrapper_StringStream +{ + /* Wrapper name. */ + const WNAME = 'horde-string'; + + /** + * String data. + * + * @var string + */ + protected $_string; + + /** + * Constructor + * + * @param string &$string Reference to the string to wrap as a stream + */ + public function __construct(&$string) + { + $this->installWrapper(); + $this->_string =& $string; + } + + /** + * Return a stream handle to this string stream. + * + * @return resource + */ + public function fopen() + { + return fopen( + self::WNAME . '://' . spl_object_hash($this), + 'rb', + false, + stream_context_create(array( + self::WNAME => array( + 'string' => $this + ) + )) + ); + } + + /** + * Return an SplFileObject representing this string stream + * + * @return SplFileObject + */ + public function getFileObject() + { + return new SplFileObject( + self::WNAME . '://' . spl_object_hash($this), + 'rb', + false, + stream_context_create(array( + self::WNAME => array( + 'string' => $this + ) + )) + ); + } + + /** + * Install the stream wrapper if it isn't already registered. + */ + public function installWrapper() + { + if (!in_array(self::WNAME, stream_get_wrappers()) && + !stream_wrapper_register(self::WNAME, 'Horde_Stream_Wrapper_String')) { + throw new Exception('Unable to register stream wrapper.'); + } + } + + /** + * Return a reference to the wrapped string. + * + * @return string + */ + public function &getString() + { + return $this->_string; + } + +} diff --git a/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Support/Horde/Support/Stub.php b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Support/Horde/Support/Stub.php new file mode 100644 index 00000000..84d86551 --- /dev/null +++ b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Support/Horde/Support/Stub.php @@ -0,0 +1,140 @@ + + * $t = new Horde_Support_Timer; + * $t->push(); + * $elapsed = $t->pop(); + * + * + * Copyright 1999-2017 Horde LLC (http://www.horde.org/) + * + * @category Horde + * @package Support + * @license http://www.horde.org/licenses/bsd + */ +class Horde_Support_Timer +{ + /** + * Holds the starting timestamp. + * + * @var array + */ + protected $_start = array(); + + /** + * Current index for stacked timers. + * + * @var integer + */ + protected $_idx = 0; + + /** + * Push a new timer start on the stack. + */ + public function push() + { + $start = $this->_start[$this->_idx++] = microtime(true); + return $start; + } + + /** + * Pop the latest timer start and return the difference with the current + * time. + * + * @return float The amount of time passed. + */ + public function pop() + { + $etime = microtime(true); + + if (! ($this->_idx > 0)) { + throw new Exception('No timers have been started'); + } + + return $etime - $this->_start[--$this->_idx]; + } + +} diff --git a/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Support/Horde/Support/Uuid.php b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Support/Horde/Support/Uuid.php new file mode 100644 index 00000000..3a32ec51 --- /dev/null +++ b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Support/Horde/Support/Uuid.php @@ -0,0 +1,85 @@ + + * $uuid = (string)new Horde_Support_Uuid; + * + * + * Copyright 2008-2017 Horde LLC (http://www.horde.org/) + * + * @category Horde + * @package Support + * @license http://www.horde.org/licenses/bsd + */ +class Horde_Support_Uuid +{ + /** + * Generated UUID + * @var string + */ + private $_uuid; + + /** + * New UUID. + */ + public function __construct() + { + $this->generate(); + } + + /** + * Generate a 36-character RFC 4122 UUID, without the urn:uuid: prefix. + * + * @see http://www.ietf.org/rfc/rfc4122.txt + * @see http://labs.omniti.com/alexandria/trunk/OmniTI/Util/UUID.php + */ + public function generate() + { + $this->_uuid = null; + if (extension_loaded('uuid')) { + if (function_exists('uuid_export')) { + // UUID extension from http://www.ossp.org/pkg/lib/uuid/ + if (uuid_create($ctx) == UUID_RC_OK && + uuid_make($ctx, UUID_MAKE_V4) == UUID_RC_OK && + uuid_export($ctx, UUID_FMT_STR, $str) == UUID_RC_OK) { + $this->_uuid = $str; + uuid_destroy($ctx); + } + } else { + // UUID extension from http://pecl.php.net/package/uuid + $this->_uuid = uuid_create(); + } + } + if (!$this->_uuid) { + list($time_mid, $time_low) = explode(' ', microtime()); + $time_low = (int)$time_low; + $time_mid = (int)substr($time_mid, 2) & 0xffff; + $time_high = mt_rand(0, 0x0fff) | 0x4000; + + $clock = mt_rand(0, 0x3fff) | 0x8000; + + $node_low = function_exists('zend_thread_id') + ? zend_thread_id() + : getmypid(); + $node_high = isset($_SERVER['SERVER_ADDR']) + ? ip2long($_SERVER['SERVER_ADDR']) + : crc32(php_uname()); + $node = bin2hex(pack('nN', $node_low, $node_high)); + + $this->_uuid = sprintf('%08x-%04x-%04x-%04x-%s', + $time_low, $time_mid, $time_high, $clock, $node); + } + } + + /** + * Cooerce to string. + * + * @return string UUID. + */ + public function __toString() + { + return $this->_uuid; + } + +} diff --git a/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Text_Flowed/Horde/Text/Flowed.php b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Text_Flowed/Horde/Text/Flowed.php new file mode 100644 index 00000000..b5a6cfe7 --- /dev/null +++ b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Text_Flowed/Horde/Text/Flowed.php @@ -0,0 +1,376 @@ + + * @category Horde + * @license http://www.horde.org/licenses/lgpl21 LGPL 2.1 + * @package Text_Flowed + */ +class Horde_Text_Flowed +{ + /** + * The maximum length that a line is allowed to be (unless faced with + * with a word that is unreasonably long). This class will re-wrap a + * line if it exceeds this length. + * + * @var integer + */ + protected $_maxlength = 78; + + /** + * When this class wraps a line, the newly created lines will be split + * at this length. + * + * @var integer + */ + protected $_optlength = 72; + + /** + * The text to be formatted. + * + * @var string + */ + protected $_text; + + /** + * The cached output of the formatting. + * + * @var array + */ + protected $_output = array(); + + /** + * The format of the data in $_output. + * + * @var string + */ + protected $_formattype = null; + + /** + * The character set of the text. + * + * @var string + */ + protected $_charset; + + /** + * Convert text using DelSp? + * + * @var boolean + */ + protected $_delsp = false; + + /** + * Constructor. + * + * @param string $text The text to process. + * @param string $charset The character set of $text. + */ + public function __construct($text, $charset = 'UTF-8') + { + $this->_text = $text; + $this->_charset = $charset; + } + + /** + * Set the maximum length of a line of text. + * + * @param integer $max A new value for $_maxlength. + */ + public function setMaxLength($max) + { + $this->_maxlength = $max; + } + + /** + * Set the optimal length of a line of text. + * + * @param integer $max A new value for $_optlength. + */ + public function setOptLength($opt) + { + $this->_optlength = $opt; + } + + /** + * Set whether to format text using DelSp. + * + * @param boolean $delsp Use DelSp? + */ + public function setDelSp($delsp) + { + $this->_delsp = (bool)$delsp; + } + + /** + * Reformats the input string, where the string is 'format=flowed' plain + * text as described in RFC 2646. + * + * @param boolean $quote Add level of quoting to each line? + * + * @return string The text converted to RFC 2646 'fixed' format. + */ + public function toFixed($quote = false) + { + $txt = ''; + + $this->_reformat(false, $quote); + $lines = count($this->_output) - 1; + foreach ($this->_output as $no => $line) { + $txt .= $line['text'] . (($lines == $no) ? '' : "\n"); + } + + return $txt; + } + + /** + * Reformats the input string, and returns the output in an array format + * with quote level information. + * + * @param boolean $quote Add level of quoting to each line? + * + * @return array An array of arrays with the following elements: + *
+     * 'level' - The quote level of the current line.
+     * 'text'  - The text for the current line.
+     * 
+ */ + public function toFixedArray($quote = false) + { + $this->_reformat(false, $quote); + return $this->_output; + } + + /** + * Reformats the input string, where the string is 'format=fixed' plain + * text as described in RFC 2646. + * + * @param boolean $quote Add level of quoting to each line? + * @param array $opts Additional options: + *
+     * 'nowrap' - (boolean) If true, does not wrap unquoted lines.
+     *            DEFAULT: false
+     * 
+ * + * @return string The text converted to RFC 2646 'flowed' format. + */ + public function toFlowed($quote = false, array $opts = array()) + { + $txt = ''; + + $this->_reformat(true, $quote, empty($opts['nowrap'])); + foreach ($this->_output as $line) { + $txt .= $line['text'] . "\n"; + } + + return $txt; + } + + /** + * Reformats the input string, where the string is 'format=flowed' plain + * text as described in RFC 2646. + * + * @param boolean $toflowed Convert to flowed? + * @param boolean $quote Add level of quoting to each line? + * @param boolean $wrap Wrap unquoted lines? + */ + protected function _reformat($toflowed, $quote, $wrap = true) + { + $format_type = implode('|', array($toflowed, $quote)); + if ($format_type == $this->_formattype) { + return; + } + + $this->_output = array(); + $this->_formattype = $format_type; + + /* Set variables used in regexps. */ + $delsp = ($toflowed && $this->_delsp) ? 1 : 0; + $opt = $this->_optlength - 1 - $delsp; + + /* Process message line by line. */ + $text = preg_split("/\r?\n/", $this->_text); + $text_count = count($text) - 1; + $skip = 0; + + foreach ($text as $no => $line) { + if ($skip) { + --$skip; + continue; + } + + /* Per RFC 2646 [4.3], the 'Usenet Signature Convention' line + * (DASH DASH SP) is not considered flowed. Watch for this when + * dealing with potentially flowed lines. */ + + /* The next three steps come from RFC 2646 [4.2]. */ + /* STEP 1: Determine quote level for line. */ + if (($num_quotes = $this->_numquotes($line))) { + $line = substr($line, $num_quotes); + } + + /* Only combine lines if we are converting to flowed or if the + * current line is quoted. */ + if (!$toflowed || $num_quotes) { + /* STEP 2: Remove space stuffing from line. */ + $line = $this->_unstuff($line); + + /* STEP 3: Should we interpret this line as flowed? + * While line is flowed (not empty and there is a space + * at the end of the line), and there is a next line, and the + * next line has the same quote depth, add to the current + * line. A line is not flowed if it is a signature line. */ + if ($line != '-- ') { + while (!empty($line) && + (substr($line, -1) == ' ') && + ($text_count != $no) && + ($this->_numquotes($text[$no + 1]) == $num_quotes)) { + /* If DelSp is yes and this is flowed input, we need to + * remove the trailing space. */ + if (!$toflowed && $this->_delsp) { + $line = substr($line, 0, -1); + } + $line .= $this->_unstuff(substr($text[++$no], $num_quotes)); + ++$skip; + } + } + } + + /* Ensure line is fixed, since we already joined all flowed + * lines. Remove all trailing ' ' from the line. */ + if ($line != '-- ') { + $line = rtrim($line); + } + + /* Increment quote depth if we're quoting. */ + if ($quote) { + $num_quotes++; + } + + /* The quote prefix for the line. */ + $quotestr = str_repeat('>', $num_quotes); + + if (empty($line)) { + /* Line is empty. */ + $this->_output[] = array('text' => $quotestr, 'level' => $num_quotes); + } elseif ((!$wrap && !$num_quotes) || + empty($this->_maxlength) || + ((Horde_String::length($line, $this->_charset) + $num_quotes) <= $this->_maxlength)) { + /* Line does not require rewrapping. */ + $this->_output[] = array('text' => $quotestr . $this->_stuff($line, $num_quotes, $toflowed), 'level' => $num_quotes); + } else { + $min = $num_quotes + 1; + + /* Rewrap this paragraph. */ + while ($line) { + /* Stuff and re-quote the line. */ + $line = $quotestr . $this->_stuff($line, $num_quotes, $toflowed); + $line_length = Horde_String::length($line, $this->_charset); + if ($line_length <= $this->_optlength) { + /* Remaining section of line is short enough. */ + $this->_output[] = array('text' => $line, 'level' => $num_quotes); + break; + } else { + $regex = array(); + if ($min <= $opt) { + $regex[] = '^(.{' . $min . ',' . $opt . '}) (.*)'; + } + if ($min <= $this->_maxlength) { + $regex[] = '^(.{' . $min . ',' . $this->_maxlength . '}) (.*)'; + } + $regex[] = '^(.{' . $min . ',})? (.*)'; + + if ($m = Horde_String::regexMatch($line, $regex, $this->_charset)) { + /* We need to wrap text at a certain number of + * *characters*, not a certain number of *bytes*; + * thus the need for a multibyte capable regex. + * If a multibyte regex isn't available, we are + * stuck with preg_match() (the function will + * still work - are just left with shorter rows + * than expected if multibyte characters exist in + * the row). + * + * 1. Try to find a string as long as _optlength. + * 2. Try to find a string as long as _maxlength. + * 3. Take the first word. */ + if (empty($m[1])) { + $m[1] = $m[2]; + $m[2] = ''; + } + $this->_output[] = array('text' => $m[1] . ' ' . (($delsp) ? ' ' : ''), 'level' => $num_quotes); + $line = $m[2]; + } elseif ($line_length > 998) { + /* One excessively long word left on line. Be + * absolutely sure it does not exceed 998 + * characters in length or else we must + * truncate. */ + $this->_output[] = array('text' => Horde_String::substr($line, 0, 998, $this->_charset), 'level' => $num_quotes); + $line = Horde_String::substr($line, 998, null, $this->_charset); + } else { + $this->_output[] = array('text' => $line, 'level' => $num_quotes); + break; + } + } + } + } + } + } + + /** + * Returns the number of leading '>' characters in the text input. + * '>' characters are defined by RFC 2646 to indicate a quoted line. + * + * @param string $text The text to analyze. + * + * @return integer The number of leading quote characters. + */ + protected function _numquotes($text) + { + return strspn($text, '>'); + } + + /** + * Space-stuffs if it starts with ' ' or '>' or 'From ', or if + * quote depth is non-zero (for aesthetic reasons so that there is a + * space after the '>'). + * + * @param string $text The text to stuff. + * @param string $num_quotes The quote-level of this line. + * @param boolean $toflowed Are we converting to flowed text? + * + * @return string The stuffed text. + */ + protected function _stuff($text, $num_quotes, $toflowed) + { + return ($toflowed && ($num_quotes || preg_match("/^(?: |>|From |From$)/", $text))) + ? ' ' . $text + : $text; + } + + /** + * Unstuffs a space stuffed line. + * + * @param string $text The text to unstuff. + * + * @return string The unstuffed text. + */ + protected function _unstuff($text) + { + return (!empty($text) && ($text[0] == ' ')) + ? substr($text, 1) + : $text; + } + +} diff --git a/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Translation/Horde/Translation.php b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Translation/Horde/Translation.php new file mode 100644 index 00000000..568700d4 --- /dev/null +++ b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Translation/Horde/Translation.php @@ -0,0 +1,132 @@ + + * @category Horde + * @copyright 2010-2017 Horde LLC + * @license http://www.horde.org/licenses/lgpl21 LGPL 2.1 + * @package Translation + */ +abstract class Horde_Translation +{ + /** + * The translation domain, e.g. the library name, for the default gettext + * handler. + * + * @var string + */ + protected static $_domain; + + /** + * The relative path to the translations for the default gettext handler. + * + * @var string + */ + protected static $_directory; + + /** + * The handlers providing the actual translations. + * + * @var array + */ + protected static $_handlers = array(); + + /** + * Loads a translation handler class pointing to the library's translations + * and assigns it to $_handler. + * + * @param string $handlerClass The name of a class implementing the + * Horde_Translation_Handler interface. + */ + public static function loadHandler($handlerClass) + { + if (!static::$_domain || !static::$_directory) { + throw new Horde_Translation_Exception('The domain and directory properties must be set by the class that extends Horde_Translation.'); + } + static::setHandler(static::$_domain, new $handlerClass(static::$_domain, static::$_directory)); + } + + /** + * Assigns a translation handler object to $_handlers. + * + * Type hinting isn't used on purpose. You should extend a custom + * translation handler passed here from the Horde_Translation interface, + * but technically it's sufficient if you provide the API of that + * interface. + * + * @param string $domain The translation domain. + * @param Horde_Translation_Handler $handler An object implementing the + * Horde_Translation_Handler + * interface. + */ + public static function setHandler($domain, $handler) + { + static::$_handlers[$domain] = $handler; + } + + /** + * Returns the translation of a message. + * + * @var string $message The string to translate. + * + * @return string The string translation, or the original string if no + * translation exists. + */ + public static function t($message) + { + if (!isset(static::$_handlers[static::$_domain])) { + static::loadHandler('Horde_Translation_Handler_Gettext'); + } + return static::$_handlers[static::$_domain]->t($message); + } + + /** + * Returns the plural translation of a message. + * + * @param string $singular The singular version to translate. + * @param string $plural The plural version to translate. + * @param integer $number The number that determines singular vs. plural. + * + * @return string The string translation, or the original string if no + * translation exists. + */ + public static function ngettext($singular, $plural, $number) + { + if (!isset(static::$_handlers[static::$_domain])) { + static::loadHandler('Horde_Translation_Handler_Gettext'); + } + return static::$_handlers[static::$_domain]->ngettext($singular, $plural, $number); + } + + /** + * Allows a gettext string to be defined and recognized as a string by + * the horde translation utilities, but no translation is actually + * performed (raw gettext = r()). + * + * @since 2.1.0 + * + * @param string $message The raw string to mark for translation. + * + * @return string The raw string. + */ + public static function r($message) + { + return $message; + } + +} diff --git a/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Translation/Horde/Translation/Autodetect.php b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Translation/Horde/Translation/Autodetect.php new file mode 100644 index 00000000..d07af903 --- /dev/null +++ b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Translation/Horde/Translation/Autodetect.php @@ -0,0 +1,103 @@ + + * @category Horde + * @copyright 2010-2017 Horde LLC + * @license http://www.horde.org/licenses/lgpl21 LGPL 2.1 + * @package Translation + * @since 2.2.0 + */ +abstract class Horde_Translation_Autodetect extends Horde_Translation +{ + /** + * The absolute PEAR path to the translations for the default gettext handler. + * + * This value is automatically set by PEAR Replace Tasks. + * + * @var string + */ + protected static $_pearDirectory; + + /** + * Auto detects the locale directory location. + * + * @param string $handlerClass The name of a class implementing the + * Horde_Translation_Handler interface. + */ + public static function loadHandler($handlerClass) + { + if (!static::$_domain) { + throw new Horde_Translation_Exception('The domain property must be set by the class that extends Horde_Translation_Autodetect.'); + } + + $directory = static::_searchLocaleDirectory(); + if (!$directory) { + throw new Horde_Translation_Exception(sprintf('Could not found find any locale directory for %s domain.', static::$_domain)); + } + + static::$_directory = $directory; + parent::loadHandler($handlerClass); + } + + /** + * Search for the locale directory for different installations methods (eg: PEAR, Composer). + * + * @var boolean|string The directory if found, or false when no valid directory is found + */ + protected static function _searchLocaleDirectory() + { + if (static::$_pearDirectory !== '@data_dir@') { + $directory = static::$_pearDirectory . '/' . static::$_domain . '/locale'; + if (file_exists($directory)) { + return $directory; + } + } + + $directories = static::_getSearchDirectories(); + foreach ($directories as $directory) { + if (file_exists($directory)) { + return $directory; + } + } + + return false; + } + + /** + * Get potential locations for the locale directory. + * + * @var array List of directories + */ + protected static function _getSearchDirectories() + { + $className = get_called_class(); + $class = new ReflectionClass($className); + $basedir = dirname($class->getFilename()); + $depth = substr_count($className, '\\') + ?: substr_count($className, '_'); + + return array( + /* Composer */ + $basedir . str_repeat('/..', $depth) . '/data/locale', + /* Source */ + $basedir . str_repeat('/..', $depth + 1) . '/locale' + ); + } + +} diff --git a/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Translation/Horde/Translation/Exception.php b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Translation/Horde/Translation/Exception.php new file mode 100644 index 00000000..7cc34912 --- /dev/null +++ b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Translation/Horde/Translation/Exception.php @@ -0,0 +1,15 @@ + + * @package Translation + */ +class Horde_Translation_Exception extends Exception +{ +} diff --git a/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Translation/Horde/Translation/Handler.php b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Translation/Horde/Translation/Handler.php new file mode 100644 index 00000000..e3342d9a --- /dev/null +++ b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Translation/Horde/Translation/Handler.php @@ -0,0 +1,41 @@ + + * @package Translation + */ +interface Horde_Translation_Handler +{ + /** + * Returns the translation of a message. + * + * @var string $message The string to translate. + * + * @return string The string translation, or the original string if no + * translation exists. + */ + public function t($message); + + /** + * Returns the plural translation of a message. + * + * @param string $singular The singular version to translate. + * @param string $plural The plural version to translate. + * @param integer $number The number that determines singular vs. plural. + * + * @return string The string translation, or the original string if no + * translation exists. + */ + public function ngettext($singular, $plural, $number); +} diff --git a/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Translation/Horde/Translation/Handler/Gettext.php b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Translation/Horde/Translation/Handler/Gettext.php new file mode 100644 index 00000000..b1b79cde --- /dev/null +++ b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Translation/Horde/Translation/Handler/Gettext.php @@ -0,0 +1,82 @@ + + * @package Translation + */ +class Horde_Translation_Handler_Gettext implements Horde_Translation_Handler +{ + /** + * The translation domain, e.g. package name. + * + * @var string + */ + protected $_domain; + + /** + * Whether the gettext extension is installed. + * + * @var boolean + */ + protected $_gettext; + + /** + * Constructor. + * + * @param string $domain The translation domain, e.g. package name. + * @param string $path The path to the gettext catalog. + */ + public function __construct($domain, $path) + { + if (!is_dir($path)) { + throw new InvalidArgumentException("$path is not a directory"); + } + $this->_gettext = function_exists('_'); + if (!$this->_gettext) { + return; + } + $this->_domain = $domain; + bindtextdomain($this->_domain, $path); + } + + /** + * Returns the translation of a message. + * + * @param string $message The string to translate. + * + * @return string The string translation, or the original string if no + * translation exists. + */ + public function t($message) + { + return $this->_gettext ? dgettext($this->_domain, $message) : $message; + } + + /** + * Returns the plural translation of a message. + * + * @param string $singular The singular version to translate. + * @param string $plural The plural version to translate. + * @param integer $number The number that determines singular vs. plural. + * + * @return string The string translation, or the original string if no + * translation exists. + */ + public function ngettext($singular, $plural, $number) + { + return $this->_gettext + ? dngettext($this->_domain, $singular, $plural, $number) + : ($number > 1 ? $plural : $singular); + } +} diff --git a/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Util/Horde/Array.php b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Util/Horde/Array.php new file mode 100644 index 00000000..9f2738a5 --- /dev/null +++ b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Util/Horde/Array.php @@ -0,0 +1,147 @@ + + * @author Marko Djukic + * @author Jan Schneider + * @category Horde + * @license http://www.horde.org/licenses/lgpl21 LGPL 2.1 + * @package Util + */ +class Horde_Array +{ + /** + * Sorts an array on a specified key. If the key does not exist, + * defaults to the first key of the array. + * + * @param array &$array The array to be sorted, passed by reference. + * @param string $key The key by which to sort. If not specified then + * the first key is used. + * @param integer $dir Sort direction: + * 0 = ascending (default) + * 1 = descending + * @param boolean $assoc Keep key value association? + */ + public static function arraySort(array &$array, $key = null, $dir = 0, + $assoc = true) + { + /* Return if the array is empty. */ + if (empty($array)) { + return; + } + + /* If no key to sort by is specified, use the first key of the + * first element. */ + if (is_null($key)) { + $keys = array_keys(reset($array)); + $key = array_shift($keys); + } + + /* Call the appropriate sort function. */ + $helper = new Horde_Array_Sort_Helper(); + $helper->key = $key; + $function = $dir ? 'reverseCompare' : 'compare'; + if ($assoc) { + uasort($array, array($helper, $function)); + } else { + usort($array, array($helper, $function)); + } + } + + /** + * Given an HTML type array field "example[key1][key2][key3]" breaks up + * the keys so that they could be used to reference a regular PHP array. + * + * @param string $field The field name to be examined. + * @param string &$base Will be set to the base element. + * @param array &$keys Will be set to the list of keys. + * + * @return boolean True on sucess, false on error. + */ + public static function getArrayParts($field, &$base, &$keys) + { + if (!preg_match('|([^\[]*)((\[[^\[\]]*\])+)|', $field, $matches)) { + return false; + } + + $base = $matches[1]; + $keys = explode('][', $matches[2]); + $keys[0] = substr($keys[0], 1); + $keys[count($keys) - 1] = substr($keys[count($keys) - 1], 0, strlen($keys[count($keys) - 1]) - 1); + return true; + } + + /** + * Using an array of keys iterate through the array following the + * keys to find the final key value. If a value is passed then set + * that value. + * + * @param array &$array The array to be used. + * @param array &$keys The key path to follow as an array. + * @param array $value If set the target element will have this value set + * to it. + * + * @return mixed The final value of the key path. + */ + public static function getElement(&$array, array &$keys, $value = null) + { + if (count($keys)) { + $key = array_shift($keys); + return isset($array[$key]) + ? self::getElement($array[$key], $keys, $value) + : false; + } + + if (!is_null($value)) { + $array = $value; + } + + return $array; + } + + /** + * Returns a rectangle of a two-dimensional array. + * + * @param array $array The array to extract the rectangle from. + * @param integer $row The start row of the rectangle. + * @param integer $col The start column of the rectangle. + * @param integer $height The height of the rectangle. + * @param integer $width The width of the rectangle. + * + * @return array The extracted rectangle. + */ + public static function getRectangle(array $array, $row, $col, $height, + $width) + { + $rec = array(); + for ($y = $row; $y < $row + $height; $y++) { + $rec[] = array_slice($array[$y], $col, $width); + } + return $rec; + } + + /** + * Given an array, returns an associative array with each element key + * derived from its value. + * For example: + * array(0 => 'foo', 1 => 'bar') + * would become: + * array('foo' => 'foo', 'bar' => 'bar') + * + * @param array $array An array of values. + * + * @return array An array with keys the same as values. + */ + public static function valuesToKeys(array $array) + { + return $array + ? array_combine($array, $array) + : array(); + } +} diff --git a/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Util/Horde/Array/Sort/Helper.php b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Util/Horde/Array/Sort/Helper.php new file mode 100644 index 00000000..33819c29 --- /dev/null +++ b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Util/Horde/Array/Sort/Helper.php @@ -0,0 +1,77 @@ + + * @author Jan Schneider + * @author Michael Slusarz + * @category Horde + * @license http://www.horde.org/licenses/lgpl21 LGPL 2.1 + * @package Util + */ +class Horde_Array_Sort_Helper +{ + /** + * The array key to sort by. + * + * @var string + */ + public $key; + + /** + * Compare two associative arrays by the array key defined in self::$key. + * + * @param array $a + * @param array $b + */ + public function compare($a, $b) + { + return strcoll(Horde_String::lower($a[$this->key], true, 'UTF-8'), Horde_String::lower($b[$this->key], true, 'UTF-8')); + } + + /** + * Compare, in reverse order, two associative arrays by the array key + * defined in self::$key. + * + * @param scalar $a TODO + * @param scalar $b TODO + * + * @return TODO + */ + public function reverseCompare($a, $b) + { + return strcoll(Horde_String::lower($b[$this->key], true, 'UTF-8'), Horde_String::lower($a[$this->key], true, 'UTF-8')); + } + + /** + * Compare array keys case insensitively for uksort. + * + * @param scalar $a TODO + * @param scalar $b TODO + * + * @return TODO + */ + public function compareKeys($a, $b) + { + return strcoll(Horde_String::lower($a, true, 'UTF-8'), Horde_String::lower($b, true, 'UTF-8')); + } + + /** + * Compare, in reverse order, array keys case insensitively for uksort. + * + * @param scalar $a TODO + * @param scalar $b TODO + * + * @return TODO + */ + public function reverseCompareKeys($a, $b) + { + return strcoll(Horde_String::lower($b, true, 'UTF-8'), Horde_String::lower($a, true, 'UTF-8')); + } + +} diff --git a/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Util/Horde/Domhtml.php b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Util/Horde/Domhtml.php new file mode 100644 index 00000000..9d4bb2fe --- /dev/null +++ b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Util/Horde/Domhtml.php @@ -0,0 +1,336 @@ + + * @category Horde + * @copyright 2010-2017 Horde LLC + * @package Util + * @license http://www.horde.org/licenses/lgpl21 LGPL 2.1 + */ +class Horde_Domhtml implements Iterator +{ + /** + * DOM object. + * + * @var DOMDocument + */ + public $dom; + + /** + * Iterator status. + * + * @var array + */ + protected $_iterator = null; + + /** + * Original charset of data. + * + * @var string + */ + protected $_origCharset; + + /** + * Encoding tag added to beginning of output. + * + * @var string + */ + protected $_xmlencoding = ''; + + /** + * Constructor. + * + * @param string $text The text of the HTML document. + * @param string $charset The charset of the HTML document. + * + * @throws Exception + */ + public function __construct($text, $charset = null) + { + if (!extension_loaded('dom')) { + throw new Exception('DOM extension is not available.'); + } + + // Bug #9616: Make sure we have valid HTML input. + if (!strlen($text)) { + $text = ''; + } + + $old_error = libxml_use_internal_errors(true); + $this->dom = new DOMDocument(); + + if (is_null($charset)) { + /* If no charset given, charset is whatever libxml tells us the + * encoding should be defaulting to 'iso-8859-1'. */ + $this->_loadHTML($text); + $this->_origCharset = $this->dom->encoding + ? $this->dom->encoding + : 'iso-8859-1'; + } else { + /* Convert/try with UTF-8 first. */ + $this->_origCharset = Horde_String::lower($charset); + $this->_xmlencoding = ''; + $this->_loadHTML( + $this->_xmlencoding . Horde_String::convertCharset($text, $charset, 'UTF-8') + ); + + if ($this->dom->encoding && + (Horde_String::lower($this->dom->encoding) != 'utf-8')) { + /* Convert charset to what the HTML document says it SHOULD + * be. */ + $this->_loadHTML( + Horde_String::convertCharset($text, $charset, $this->dom->encoding) + ); + $this->_xmlencoding = ''; + } + } + + if ($old_error) { + libxml_use_internal_errors(false); + } + + /* Sanity checking: make sure we have the documentElement object. */ + if (!$this->dom->documentElement) { + $this->dom->appendChild($this->dom->createElement('html')); + } + + /* Remove old charset information. */ + $xpath = new DOMXPath($this->dom); + $domlist = $xpath->query('/html/head/meta[@http-equiv="content-type"]'); + for ($i = $domlist->length; $i > 0; --$i) { + $meta = $domlist->item($i - 1); + $meta->parentNode->removeChild($meta); + } + } + + /** + * Returns the HEAD element, or creates one if it doesn't exist. + * + * @return DOMElement HEAD element. + */ + public function getHead() + { + $head = $this->dom->getElementsByTagName('head'); + if ($head->length) { + return $head->item(0); + } + + $headelt = $this->dom->createElement('head'); + $this->dom->documentElement->insertBefore($headelt, $this->dom->documentElement->firstChild); + + return $headelt; + } + + /** + * Returns the BODY element, or creates one if it doesn't exist. + * + * @since 2.2.0 + * + * @return DOMElement BODY element. + */ + public function getBody() + { + $body = $this->dom->getElementsByTagName('body'); + if ($body->length) { + return $body->item(0); + } + + $bodyelt = $this->dom->createElement('body'); + $this->dom->documentElement->appendChild($bodyelt); + + return $bodyelt; + } + + /** + * Returns the full HTML text in the original charset. + * + * @param array $opts Additional options: (since 2.1.0) + * - charset: (string) Return using this charset. If set but empty, will + * return as currently stored in the DOM object. + * - metacharset: (boolean) If true, will add a META tag containing the + * charset information. + * + * @return string HTML text. + */ + public function returnHtml(array $opts = array()) + { + $curr_charset = $this->getCharset(); + if (strcasecmp($curr_charset, 'US-ASCII') === 0) { + $curr_charset = 'UTF-8'; + } + $charset = array_key_exists('charset', $opts) + ? (empty($opts['charset']) ? $curr_charset : $opts['charset']) + : $this->_origCharset; + + if (empty($opts['metacharset'])) { + $text = $this->dom->saveHTML(); + } else { + /* Add placeholder for META tag. Can't add charset yet because DOM + * extension will alter output if it exists. */ + $meta = $this->dom->createElement('meta'); + $meta->setAttribute('http-equiv', 'content-type'); + $meta->setAttribute('horde_dom_html_charset', ''); + + $head = $this->getHead(); + $head->insertBefore($meta, $head->firstChild); + + $text = str_replace( + 'horde_dom_html_charset=""', + 'content="text/html; charset=' . $charset . '"', + $this->dom->saveHTML() + ); + + $head->removeChild($meta); + } + + if (strcasecmp($curr_charset, $charset) !== 0) { + $text = Horde_String::convertCharset($text, $curr_charset, $charset); + } + + if (!$this->_xmlencoding || + (($pos = strpos($text, $this->_xmlencoding)) === false)) { + return $text; + } + + return substr_replace($text, '', $pos, strlen($this->_xmlencoding)); + } + + /** + * Returns the body text in the original charset. + * + * @return string HTML text. + */ + public function returnBody() + { + $body = $this->getBody(); + $text = ''; + + if ($body->hasChildNodes()) { + foreach ($body->childNodes as $child) { + $text .= $this->dom->saveXML($child); + } + } + + return Horde_String::convertCharset($text, 'UTF-8', $this->_origCharset); + } + + /** + * Get the charset of the DOM data. + * + * @since 2.1.0 + * + * @return string Charset of DOM data. + */ + public function getCharset() + { + return $this->dom->encoding + ? $this->dom->encoding + : ($this->_xmlencoding ? 'UTF-8' : $this->_origCharset); + } + + /** + * Loads the HTML data. + * + * @param string $html HTML data. + */ + protected function _loadHTML($html) + { + if (version_compare(PHP_VERSION, '5.4', '>=')) { + $mask = defined('LIBXML_PARSEHUGE') + ? LIBXML_PARSEHUGE + : 0; + $mask |= defined('LIBXML_COMPACT') + ? LIBXML_COMPACT + : 0; + $this->dom->loadHTML($html, $mask); + } else { + $this->dom->loadHTML($html); + } + } + + /* Iterator methods. */ + + /** + */ + public function current() + { + if ($this->_iterator instanceof DOMDocument) { + return $this->_iterator; + } + + $curr = end($this->_iterator); + return $curr['list']->item($curr['i']); + } + + /** + */ + public function key() + { + return 0; + } + + /** + */ + public function next() + { + /* Iterate in the reverse direction through the node list. This allows + * alteration of the original list without breaking things (foreach() + * w/removeChild() may exit iteration after removal is complete. */ + + if ($this->_iterator instanceof DOMDocument) { + $this->_iterator = array(); + $curr = array(); + $node = $this->dom; + } elseif (empty($this->_iterator)) { + $this->_iterator = null; + return; + } else { + $curr = &$this->_iterator[count($this->_iterator) - 1]; + $node = $curr['list']->item($curr['i']); + } + + if (empty($curr['child']) && + ($node instanceof DOMNode) && + $node->hasChildNodes()) { + $curr['child'] = true; + $this->_iterator[] = array( + 'child' => false, + 'i' => $node->childNodes->length - 1, + 'list' => $node->childNodes + ); + } elseif (--$curr['i'] < 0) { + array_pop($this->_iterator); + $this->next(); + } else { + $curr['child'] = false; + } + } + + /** + */ + public function rewind() + { + $this->_iterator = $this->dom; + } + + /** + */ + public function valid() + { + return !is_null($this->_iterator); + } + +} diff --git a/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Util/Horde/String.php b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Util/Horde/String.php new file mode 100644 index 00000000..c6672a70 --- /dev/null +++ b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Util/Horde/String.php @@ -0,0 +1,917 @@ + + * @category Horde + * @license http://www.horde.org/licenses/lgpl21 LGPL 2.1 + * @package Util + */ +class Horde_String +{ + /** + * lower() cache. + * + * @var array + */ + protected static $_lowers = array(); + + /** + * upper() cache. + * + * @var array + */ + protected static $_uppers = array(); + + /** + * Converts a string from one charset to another. + * + * Uses the iconv or the mbstring extensions. + * The original string is returned if conversion failed or none + * of the extensions were available. + * + * @param mixed $input The data to be converted. If $input is an an + * array, the array's values get converted + * recursively. + * @param string $from The string's current charset. + * @param string $to The charset to convert the string to. + * @param boolean $force Force conversion? + * + * @return mixed The converted input data. + */ + public static function convertCharset($input, $from, $to, $force = false) + { + /* Don't bother converting numbers. */ + if (is_numeric($input)) { + return $input; + } + + /* If the from and to character sets are identical, return now. */ + if (!$force && $from == $to) { + return $input; + } + $from = self::lower($from); + $to = self::lower($to); + if (!$force && $from == $to) { + return $input; + } + + if (is_array($input)) { + $tmp = array(); + foreach ($input as $key => $val) { + $tmp[self::_convertCharset($key, $from, $to)] = self::convertCharset($val, $from, $to, $force); + } + return $tmp; + } + + if (is_object($input)) { + // PEAR_Error/Exception objects are almost guaranteed to contain + // recursion, which will cause a segfault in PHP. We should never + // reach this line, but add a check. + if (($input instanceof Exception) || + ($input instanceof PEAR_Error)) { + return ''; + } + + $input = clone $input; + $vars = get_object_vars($input); + foreach ($vars as $key => $val) { + $input->$key = self::convertCharset($val, $from, $to, $force); + } + return $input; + } + + if (!is_string($input)) { + return $input; + } + + return self::_convertCharset($input, $from, $to); + } + + /** + * Internal function used to do charset conversion. + * + * @param string $input See self::convertCharset(). + * @param string $from See self::convertCharset(). + * @param string $to See self::convertCharset(). + * + * @return string The converted string. + */ + protected static function _convertCharset($input, $from, $to) + { + /* Use utf8_[en|de]code() if possible and if the string isn't too + * large (less than 16 MB = 16 * 1024 * 1024 = 16777216 bytes) - these + * functions use more memory. */ + if (Horde_Util::extensionExists('xml') && + ((strlen($input) < 16777216) || + !Horde_Util::extensionExists('iconv') || + !Horde_Util::extensionExists('mbstring'))) { + if (($to == 'utf-8') && + in_array($from, array('iso-8859-1', 'us-ascii', 'utf-8'))) { + return utf8_encode($input); + } + + if (($from == 'utf-8') && + in_array($to, array('iso-8859-1', 'us-ascii', 'utf-8'))) { + return utf8_decode($input); + } + } + + /* Try UTF7-IMAP conversions. */ + if (($from == 'utf7-imap') || ($to == 'utf7-imap')) { + try { + if ($from == 'utf7-imap') { + return self::convertCharset(Horde_Imap_Client_Utf7imap::Utf7ImapToUtf8($input), 'UTF-8', $to); + } else { + if ($from == 'utf-8') { + $conv = $input; + } else { + $conv = self::convertCharset($input, $from, 'UTF-8'); + } + return Horde_Imap_Client_Utf7imap::Utf8ToUtf7Imap($conv); + } + } catch (Horde_Imap_Client_Exception $e) { + return $input; + } + } + + /* Try iconv with transliteration. */ + if (Horde_Util::extensionExists('iconv')) { + unset($php_errormsg); + ini_set('track_errors', 1); + $out = @iconv($from, $to . '//TRANSLIT', $input); + $errmsg = isset($php_errormsg); + ini_restore('track_errors'); + if (!$errmsg && $out !== false) { + return $out; + } + } + + /* Try mbstring. */ + if (Horde_Util::extensionExists('mbstring')) { + $out = @mb_convert_encoding($input, $to, self::_mbstringCharset($from)); + if (!empty($out)) { + return $out; + } + } + + return $input; + } + + /** + * Makes a string lowercase. + * + * @param string $string The string to be converted. + * @param boolean $locale If true the string will be converted based on + * a given charset, locale independent else. + * @param string $charset If $locale is true, the charset to use when + * converting. + * + * @return string The string with lowercase characters. + */ + public static function lower($string, $locale = false, $charset = null) + { + if ($locale) { + if (Horde_Util::extensionExists('mbstring')) { + if (is_null($charset)) { + throw new InvalidArgumentException('$charset argument must not be null'); + } + $ret = @mb_strtolower($string, self::_mbstringCharset($charset)); + if (!empty($ret)) { + return $ret; + } + } + return strtolower($string); + } + + if (!isset(self::$_lowers[$string])) { + $language = setlocale(LC_CTYPE, 0); + setlocale(LC_CTYPE, 'C'); + self::$_lowers[$string] = strtolower($string); + setlocale(LC_CTYPE, $language); + } + + return self::$_lowers[$string]; + } + + /** + * Makes a string uppercase. + * + * @param string $string The string to be converted. + * @param boolean $locale If true the string will be converted based on a + * given charset, locale independent else. + * @param string $charset If $locale is true, the charset to use when + * converting. If not provided the current charset. + * + * @return string The string with uppercase characters. + */ + public static function upper($string, $locale = false, $charset = null) + { + if ($locale) { + if (Horde_Util::extensionExists('mbstring')) { + if (is_null($charset)) { + throw new InvalidArgumentException('$charset argument must not be null'); + } + $ret = @mb_strtoupper($string, self::_mbstringCharset($charset)); + if (!empty($ret)) { + return $ret; + } + } + return strtoupper($string); + } + + if (!isset(self::$_uppers[$string])) { + $language = setlocale(LC_CTYPE, 0); + setlocale(LC_CTYPE, 'C'); + self::$_uppers[$string] = strtoupper($string); + setlocale(LC_CTYPE, $language); + } + + return self::$_uppers[$string]; + } + + /** + * Returns a string with the first letter capitalized if it is + * alphabetic. + * + * @param string $string The string to be capitalized. + * @param boolean $locale If true the string will be converted based on a + * given charset, locale independent else. + * @param string $charset The charset to use, defaults to current charset. + * + * @return string The capitalized string. + */ + public static function ucfirst($string, $locale = false, $charset = null) + { + if ($locale) { + if (is_null($charset)) { + throw new InvalidArgumentException('$charset argument must not be null'); + } + $first = self::substr($string, 0, 1, $charset); + if (self::isAlpha($first, $charset)) { + $string = self::upper($first, true, $charset) . self::substr($string, 1, null, $charset); + } + } else { + $string = self::upper(substr($string, 0, 1), false) . substr($string, 1); + } + + return $string; + } + + /** + * Returns a string with the first letter of each word capitalized if it is + * alphabetic. + * + * Sentences are splitted into words at whitestrings. + * + * @param string $string The string to be capitalized. + * @param boolean $locale If true the string will be converted based on a + * given charset, locale independent else. + * @param string $charset The charset to use, defaults to current charset. + * + * @return string The capitalized string. + */ + public static function ucwords($string, $locale = false, $charset = null) + { + $words = preg_split('/(\s+)/', $string, -1, PREG_SPLIT_DELIM_CAPTURE); + for ($i = 0, $c = count($words); $i < $c; $i += 2) { + $words[$i] = self::ucfirst($words[$i], $locale, $charset); + } + return implode('', $words); + } + + /** + * Returns part of a string. + * + * @param string $string The string to be converted. + * @param integer $start The part's start position, zero based. + * @param integer $length The part's length. + * @param string $charset The charset to use when calculating the part's + * position and length, defaults to current + * charset. + * + * @return string The string's part. + */ + public static function substr($string, $start, $length = null, + $charset = 'UTF-8') + { + if (is_null($length)) { + $length = self::length($string, $charset) - $start; + } + + if ($length === 0) { + return ''; + } + + $error = false; + + /* Try mbstring. */ + if (Horde_Util::extensionExists('mbstring')) { + $ret = @mb_substr($string, $start, $length, self::_mbstringCharset($charset)); + + /* mb_substr() returns empty string on failure. */ + if (strlen($ret)) { + return $ret; + } + $error = true; + } + + /* Try iconv. */ + if (Horde_Util::extensionExists('iconv')) { + $ret = @iconv_substr($string, $start, $length, $charset); + + /* iconv_substr() returns false on failure. */ + if ($ret !== false) { + return $ret; + } + $error = true; + } + + /* Try intl. */ + if (Horde_Util::extensionExists('intl')) { + $ret = self::convertCharset( + @grapheme_substr( + self::convertCharset($string, $charset, 'UTF-8'), + $start, + $length + ), + 'UTF-8', + $charset + ); + + /* grapheme_substr() returns false on failure. */ + if ($ret !== false) { + return $ret; + } + $error = true; + } + + return $error + ? '' + : substr($string, $start, $length); + } + + /** + * Returns the character (not byte) length of a string. + * + * @param string $string The string to return the length of. + * @param string $charset The charset to use when calculating the string's + * length. + * + * @return integer The string's length. + */ + public static function length($string, $charset = 'UTF-8') + { + $charset = self::lower($charset); + + if ($charset == 'utf-8' || $charset == 'utf8') { + return strlen(utf8_decode($string)); + } + + if (Horde_Util::extensionExists('mbstring')) { + $ret = @mb_strlen($string, self::_mbstringCharset($charset)); + if (!empty($ret)) { + return $ret; + } + } + if (Horde_Util::extensionExists('intl')) { + return grapheme_strlen( + self::convertCharset($string, $charset, 'UTF-8') + ); + } + + return strlen($string); + } + + /** + * Returns the numeric position of the first occurrence of $needle + * in the $haystack string. + * + * @param string $haystack The string to search through. + * @param string $needle The string to search for. + * @param integer $offset Character in $haystack to start searching at. + * @param string $charset Charset of $needle. + * + * @return integer The position of first occurrence. + */ + public static function pos( + $haystack, $needle, $offset = 0, $charset = 'UTF-8' + ) + { + return self::_pos($haystack, $needle, $offset, $charset, 'strpos'); + } + + /** + * Returns the numeric position of the first case-insensitive occurrence + * of $needle in the $haystack string. + * + * @since 2.5.0 + * + * @param string $haystack The string to search through. + * @param string $needle The string to search for. + * @param integer $offset Character in $haystack to start searching at. + * @param string $charset Charset of $needle. + * + * @return integer The position of first case-insensitive occurrence. + */ + public static function ipos( + $haystack, $needle, $offset = 0, $charset = 'UTF-8' + ) + { + return self::_pos($haystack, $needle, $offset, $charset, 'stripos'); + } + + /** + * Returns the numeric position of the last occurrence of $needle + * in the $haystack string. + * + * @param string $haystack The string to search through. + * @param string $needle The string to search for. + * @param integer $offset Character in $haystack to start searching at. + * @param string $charset Charset of $needle. + * + * @return integer The position of last occurrence. + */ + public static function rpos( + $haystack, $needle, $offset = 0, $charset = 'UTF-8' + ) + { + return self::_pos($haystack, $needle, $offset, $charset, 'strrpos'); + } + + /** + * Returns the numeric position of the last case-insensitive occurrence of + * $needle in the $haystack string. + * + * @since 2.5.0 + * + * @param string $haystack The string to search through. + * @param string $needle The string to search for. + * @param integer $offset Character in $haystack to start searching at. + * @param string $charset Charset of $needle. + * + * @return integer The position of last case-insensitive occurrence. + */ + public static function ripos( + $haystack, $needle, $offset = 0, $charset = 'UTF-8' + ) + { + return self::_pos($haystack, $needle, $offset, $charset, 'strripos'); + } + + /** + * Perform string position searches. + * + * @param string $haystack The string to search through. + * @param string $needle The string to search for. + * @param integer $offset Character in $haystack to start searching at. + * @param string $charset Charset of $needle. + * @param string $func Function to use. + * + * @return integer The position of occurrence. + * + */ + protected static function _pos( + $haystack, $needle, $offset, $charset, $func + ) + { + if (Horde_Util::extensionExists('mbstring')) { + unset($php_errormsg); + $track_errors = ini_set('track_errors', 1); + $ret = @call_user_func('mb_' . $func, $haystack, $needle, $offset, self::_mbstringCharset($charset)); + ini_set('track_errors', $track_errors); + if (!isset($php_errormsg)) { + return $ret; + } + } + + if (Horde_Util::extensionExists('intl')) { + unset($php_errormsg); + $track_errors = ini_set('track_errors', 1); + $ret = self::convertCharset( + @call_user_func( + 'grapheme_' . $func, + self::convertCharset($haystack, $charset, 'UTF-8'), + self::convertCharset($needle, $charset, 'UTF-8'), + $offset + ), + 'UTF-8', + $charset + ); + ini_set('track_errors', $track_errors); + if (!isset($php_errormsg)) { + return $ret; + } + } + + return $func($haystack, $needle, $offset); + } + + /** + * Returns a string padded to a certain length with another string. + * This method behaves exactly like str_pad() but is multibyte safe. + * + * @param string $input The string to be padded. + * @param integer $length The length of the resulting string. + * @param string $pad The string to pad the input string with. Must + * be in the same charset like the input string. + * @param const $type The padding type. One of STR_PAD_LEFT, + * STR_PAD_RIGHT, or STR_PAD_BOTH. + * @param string $charset The charset of the input and the padding + * strings. + * + * @return string The padded string. + */ + public static function pad($input, $length, $pad = ' ', + $type = STR_PAD_RIGHT, $charset = 'UTF-8') + { + $mb_length = self::length($input, $charset); + $sb_length = strlen($input); + $pad_length = self::length($pad, $charset); + + /* Return if we already have the length. */ + if ($mb_length >= $length) { + return $input; + } + + /* Shortcut for single byte strings. */ + if ($mb_length == $sb_length && $pad_length == strlen($pad)) { + return str_pad($input, $length, $pad, $type); + } + + switch ($type) { + case STR_PAD_LEFT: + $left = $length - $mb_length; + $output = self::substr(str_repeat($pad, ceil($left / $pad_length)), 0, $left, $charset) . $input; + break; + + case STR_PAD_BOTH: + $left = floor(($length - $mb_length) / 2); + $right = ceil(($length - $mb_length) / 2); + $output = self::substr(str_repeat($pad, ceil($left / $pad_length)), 0, $left, $charset) . + $input . + self::substr(str_repeat($pad, ceil($right / $pad_length)), 0, $right, $charset); + break; + + case STR_PAD_RIGHT: + $right = $length - $mb_length; + $output = $input . self::substr(str_repeat($pad, ceil($right / $pad_length)), 0, $right, $charset); + break; + } + + return $output; + } + + /** + * Wraps the text of a message. + * + * @param string $string String containing the text to wrap. + * @param integer $width Wrap the string at this number of + * characters. + * @param string $break Character(s) to use when breaking lines. + * @param boolean $cut Whether to cut inside words if a line + * can't be wrapped. + * @param boolean $line_folding Whether to apply line folding rules per + * RFC 822 or similar. The correct break + * characters including leading whitespace + * have to be specified too. + * + * @return string String containing the wrapped text. + */ + public static function wordwrap($string, $width = 75, $break = "\n", + $cut = false, $line_folding = false) + { + $breakRegex = '(?:' . preg_quote($break) . ')'; + $rpos = self::rpos($break, "\n"); + if ($rpos === false) { + $rpos = 0; + } else { + $rpos++; + } + $wrapped = ''; + $hasWrapped = false; + + while (self::length($string, 'UTF-8') > $width) { + $line = self::substr($string, 0, $width + ($hasWrapped ? $rpos : 0), 'UTF-8'); + $string = self::substr($string, self::length($line, 'UTF-8'), null, 'UTF-8'); + + // Make sure we didn't cut a word, unless we want hard breaks + // anyway. + if (!$cut && preg_match('/^(.+?)((\s|\r?\n).*)/us', $string, $match)) { + $line .= $match[1]; + $string = $match[2]; + } + + // Wrap at existing line breaks. + $regex = '/^(' . ($hasWrapped ? $breakRegex : '') . '.*?)(\r?\n)(.*)$/us'; + if (preg_match($regex, $line, $match)) { + $wrapped .= $match[1] . $match[2]; + $string = $match[3] . $string; + $hasWrapped = false; + continue; + } + + // Wrap at the last colon or semicolon followed by a whitespace if + // doing line folding. + if ($line_folding && + preg_match('/^(.*?)(;|:)(\s+.*)$/us', $line, $match)) { + $wrapped .= $match[1] . $match[2]; + $string = $break . $match[3] . $string; + $hasWrapped = true; + continue; + } + + // Wrap at the last whitespace of $line. + $sub = $line_folding + ? '(' . ($hasWrapped ? $breakRegex : '') . '.+[^\s])' + : '(' . ($hasWrapped ? $breakRegex : '') . '.*)'; + + if (preg_match('/^' . $sub . '(\s+)(.*)$/u', $line, $match)) { + $wrapped .= $match[1]; + $string = $break . ($line_folding ? $match[2] : '') + . $match[3] . $string; + $hasWrapped = true; + continue; + } + + // Hard wrap if necessary. + if ($cut) { + $wrapped .= $line; + $string = $break . $string; + $hasWrapped = true; + continue; + } + + $wrapped .= $line; + $hasWrapped = false; + } + + return $wrapped . $string; + } + + /** + * Wraps the text of a message. + * + * @param string $text String containing the text to wrap. + * @param integer $length Wrap $text at this number of characters. + * @param string $break_char Character(s) to use when breaking lines. + * @param boolean $quote Ignore lines that are wrapped with the '>' + * character (RFC 2646)? If true, we don't + * remove any padding whitespace at the end of + * the string. + * + * @return string String containing the wrapped text. + */ + public static function wrap($text, $length = 80, $break_char = "\n", + $quote = false) + { + $paragraphs = array(); + + foreach (preg_split('/\r?\n/', $text) as $input) { + if ($quote && (strpos($input, '>') === 0)) { + $line = $input; + } else { + /* We need to handle the Usenet-style signature line + * separately; since the space after the two dashes is + * REQUIRED, we don't want to trim the line. */ + if ($input != '-- ') { + $input = rtrim($input); + } + $line = self::wordwrap($input, $length, $break_char); + } + + $paragraphs[] = $line; + } + + return implode($break_char, $paragraphs); + } + + /** + * Return a truncated string, suitable for notifications. + * + * @param string $text The original string. + * @param integer $length The maximum length. + * + * @return string The truncated string, if longer than $length. + */ + public static function truncate($text, $length = 100) + { + return (self::length($text) > $length) + ? rtrim(self::substr($text, 0, $length - 3)) . '...' + : $text; + } + + /** + * Return an abbreviated string, with characters in the middle of the + * excessively long string replaced by '...'. + * + * @param string $text The original string. + * @param integer $length The length at which to abbreviate. + * + * @return string The abbreviated string, if longer than $length. + */ + public static function abbreviate($text, $length = 20) + { + return (self::length($text) > $length) + ? rtrim(self::substr($text, 0, round(($length - 3) / 2))) . '...' . ltrim(self::substr($text, (($length - 3) / 2) * -1)) + : $text; + } + + /** + * Returns the common leading part of two strings. + * + * @param string $str1 A string. + * @param string $str2 Another string. + * + * @return string The start of $str1 and $str2 that is identical in both. + */ + public static function common($str1, $str2) + { + for ($result = '', $i = 0; + isset($str1[$i]) && isset($str2[$i]) && $str1[$i] == $str2[$i]; + $i++) { + $result .= $str1[$i]; + } + return $result; + } + + /** + * Returns true if the every character in the parameter is an alphabetic + * character. + * + * @param string $string The string to test. + * @param string $charset The charset to use when testing the string. + * + * @return boolean True if the parameter was alphabetic only. + */ + public static function isAlpha($string, $charset) + { + if (!Horde_Util::extensionExists('mbstring')) { + return ctype_alpha($string); + } + + $charset = self::_mbstringCharset($charset); + $old_charset = mb_regex_encoding(); + + if ($charset != $old_charset) { + @mb_regex_encoding($charset); + } + $alpha = !@mb_ereg_match('[^[:alpha:]]', $string); + if ($charset != $old_charset) { + @mb_regex_encoding($old_charset); + } + + return $alpha; + } + + /** + * Returns true if ever character in the parameter is a lowercase letter in + * the current locale. + * + * @param string $string The string to test. + * @param string $charset The charset to use when testing the string. + * + * @return boolean True if the parameter was lowercase. + */ + public static function isLower($string, $charset) + { + return ((self::lower($string, true, $charset) === $string) && + self::isAlpha($string, $charset)); + } + + /** + * Returns true if every character in the parameter is an uppercase letter + * in the current locale. + * + * @param string $string The string to test. + * @param string $charset The charset to use when testing the string. + * + * @return boolean True if the parameter was uppercase. + */ + public static function isUpper($string, $charset) + { + return ((self::upper($string, true, $charset) === $string) && + self::isAlpha($string, $charset)); + } + + /** + * Performs a multibyte safe regex match search on the text provided. + * + * @param string $text The text to search. + * @param array $regex The regular expressions to use, without perl + * regex delimiters (e.g. '/' or '|'). + * @param string $charset The character set of the text. + * + * @return array The matches array from the first regex that matches. + */ + public static function regexMatch($text, $regex, $charset = null) + { + if (!empty($charset)) { + $regex = self::convertCharset($regex, $charset, 'utf-8'); + $text = self::convertCharset($text, $charset, 'utf-8'); + } + + $matches = array(); + foreach ($regex as $val) { + if (preg_match('/' . $val . '/u', $text, $matches)) { + break; + } + } + + if (!empty($charset)) { + $matches = self::convertCharset($matches, 'utf-8', $charset); + } + + return $matches; + } + + /** + * Check to see if a string is valid UTF-8. + * + * @param string $text The text to check. + * + * @return boolean True if valid UTF-8. + */ + public static function validUtf8($text) + { + $text = strval($text); + + // First check for illegal surrogate pair sequences. See RFC 3629. + if (preg_match('/\xE0[\x80-\x9F][\x80-\xBF]|\xED[\xA0-\xBF][\x80-\xBF]/S', $text)) { + return false; + } + + for ($i = 0, $len = strlen($text); $i < $len; ++$i) { + $c = ord($text[$i]); + if ($c > 128) { + if ($c > 247) { + // STD 63 (RFC 3629) eliminates 5 & 6-byte characters. + return false; + } elseif ($c > 239) { + $j = 3; + } elseif ($c > 223) { + $j = 2; + } elseif ($c > 191) { + $j = 1; + } else { + return false; + } + + if (($i + $j) > $len) { + return false; + } + + do { + $c = ord($text[++$i]); + if (($c < 128) || ($c > 191)) { + return false; + } + } while (--$j); + } + } + + return true; + } + + /** + * Workaround charsets that don't work with mbstring functions. + * + * @param string $charset The original charset. + * + * @return string The charset to use with mbstring functions. + */ + protected static function _mbstringCharset($charset) + { + /* mbstring functions do not handle the 'ks_c_5601-1987' & + * 'ks_c_5601-1989' charsets. However, these charsets are used, for + * example, by various versions of Outlook to send Korean characters. + * Use UHC (CP949) encoding instead. See, e.g., + * http://lists.w3.org/Archives/Public/ietf-charsets/2001AprJun/0030.html */ + return in_array(self::lower($charset), array('ks_c_5601-1987', 'ks_c_5601-1989')) + ? 'UHC' + : $charset; + } + + /** + * Strip UTF-8 byte order mark (BOM) from string data. + * + * @param string $str Input string (UTF-8). + * + * @return string Stripped string (UTF-8). + */ + public static function trimUtf8Bom($str) + { + return (substr($str, 0, 3) == pack('CCC', 239, 187, 191)) + ? substr($str, 3) + : $str; + } + +} diff --git a/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Util/Horde/String/Transliterate.php b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Util/Horde/String/Transliterate.php new file mode 100644 index 00000000..bd2135a7 --- /dev/null +++ b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Util/Horde/String/Transliterate.php @@ -0,0 +1,195 @@ + + * @author Jan Schneider + * @category Horde + * @copyright 2014-2017 Horde LLC + * @license http://www.horde.org/licenses/lgpl21 LGPL 2.1 + * @package Util + * @since 2.4.0 + */ +class Horde_String_Transliterate +{ + /** + * Transliterate mapping cache. + * + * @var array + */ + protected static $_map; + + /** + * Transliterator instance. + * + * @var Transliterator + */ + protected static $_transliterator; + + /** + * Transliterates an UTF-8 string to ASCII, replacing non-English + * characters to their English equivalents. + * + * Note: there is no guarantee that the output string will be ASCII-only, + * since any non-ASCII character not in the transliteration list will + * be ignored. + * + * @param string $str Input string (UTF-8). + * + * @return string Transliterated string (UTF-8). + */ + public static function toAscii($str) + { + $methods = array( + '_intlToAscii', + '_iconvToAscii', + '_fallbackToAscii' + ); + + foreach ($methods as $val) { + if (($out = call_user_func(array(__CLASS__, $val), $str)) !== false) { + return $out; + } + } + + return $str; + } + + /** + * Transliterate using the Transliterator package. + * + * @param string $str Input string (UTF-8). + * + * @return mixed Transliterated string (UTF-8), or false on error. + */ + protected static function _intlToAscii($str) + { + if (class_exists('Transliterator')) { + if (!isset(self::$_transliterator)) { + self::$_transliterator = Transliterator::create( + 'Any-Latin; Latin-ASCII' + ); + } + + if (!is_null(self::$_transliterator)) { + /* Returns false on error. */ + return self::$_transliterator->transliterate($str); + } + } + + return false; + } + + /** + * Transliterate using the iconv extension. + * + * @param string $str Input string (UTF-8). + * + * @return mixed Transliterated string (UTF-8), or false on error. + */ + protected static function _iconvToAscii($str) + { + return extension_loaded('iconv') + /* Returns false on error. */ + ? iconv('UTF-8', 'ASCII//TRANSLIT', $str) + : false; + } + + /** + * Transliterate using a built-in ASCII mapping. + * + * @param string $str Input string (UTF-8). + * + * @return string Transliterated string (UTF-8). + */ + protected static function _fallbackToAscii($str) + { + if (!isset(self::$_map)) { + self::$_map = array( + 'À' => 'A', + 'Á' => 'A', + 'Â' => 'A', + 'Ã' => 'A', + 'Ä' => 'A', + 'Å' => 'A', + 'Æ' => 'AE', + 'à' => 'a', + 'á' => 'a', + 'â' => 'a', + 'ã' => 'a', + 'ä' => 'a', + 'å' => 'a', + 'æ' => 'ae', + 'Þ' => 'TH', + 'þ' => 'th', + 'Ç' => 'C', + 'ç' => 'c', + 'Ð' => 'D', + 'ð' => 'd', + 'È' => 'E', + 'É' => 'E', + 'Ê' => 'E', + 'Ë' => 'E', + 'è' => 'e', + 'é' => 'e', + 'ê' => 'e', + 'ë' => 'e', + 'ƒ' => 'f', + 'Ì' => 'I', + 'Í' => 'I', + 'Î' => 'I', + 'Ï' => 'I', + 'ì' => 'i', + 'í' => 'i', + 'î' => 'i', + 'ï' => 'i', + 'Ñ' => 'N', + 'ñ' => 'n', + 'Ò' => 'O', + 'Ó' => 'O', + 'Ô' => 'O', + 'Õ' => 'O', + 'Ö' => 'O', + 'Ø' => 'O', + 'ò' => 'o', + 'ó' => 'o', + 'ô' => 'o', + 'õ' => 'o', + 'ö' => 'o', + 'ø' => 'o', + 'Š' => 'S', + 'ẞ' => 'SS', + 'ß' => 'ss', + 'š' => 's', + 'ś' => 's', + 'Ù' => 'U', + 'Ú' => 'U', + 'Û' => 'U', + 'Ü' => 'U', + 'ù' => 'u', + 'ú' => 'u', + 'û' => 'u', + 'Ý' => 'Y', + 'ý' => 'y', + 'ÿ' => 'y', + 'Ž' => 'Z', + 'ž' => 'z' + ); + } + + /* This should never return false. */ + return strtr(strval($str), self::$_map); + } +} diff --git a/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Util/Horde/Util.php b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Util/Horde/Util.php new file mode 100644 index 00000000..92c8f1e4 --- /dev/null +++ b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Util/Horde/Util.php @@ -0,0 +1,577 @@ + + * @author Jon Parise + * @category Horde + * @license http://www.horde.org/licenses/lgpl21 LGPL 2.1 + * @package Util + */ +class Horde_Util +{ + /** + * A list of random patterns to use for overwriting purposes. + * See http://www.cs.auckland.ac.nz/~pgut001/pubs/secure_del.html. + * We save the random overwrites for efficiency reasons. + * + * @var array + */ + public static $patterns = array( + "\x55", "\xaa", "\x92\x49\x24", "\x49\x24\x92", "\x24\x92\x49", + "\x00", "\x11", "\x22", "\x33", "\x44", "\x55", "\x66", "\x77", + "\x88", "\x99", "\xaa", "\xbb", "\xcc", "\xdd", "\xee", "\xff", + "\x92\x49\x24", "\x49\x24\x92", "\x24\x92\x49", "\x6d\xb6\xdb", + "\xb6\xdb\x6d", "\xdb\x6d\xb6" + ); + + /** + * Are magic quotes in use? + * + * @var boolean + */ + protected static $_magicquotes = null; + + /** + * Data used to determine shutdown deletion. + * + * @var array + */ + protected static $_shutdowndata = array( + 'paths' => array(), + 'secure' => array() + ); + + /** + * Has the shutdown method been registered? + * + * @var boolean + */ + protected static $_shutdownreg = false; + + /** + * Cache for extensionExists(). + * + * @var array + */ + protected static $_cache = array(); + + /** + * Checks to see if a value has been set by the script and not by GET, + * POST, or cookie input. The value being checked MUST be in the global + * scope. + * + * @param string $varname The variable name to check. + * @param mixed $default Default value if the variable isn't present + * or was specified by the user. Defaults to null. + * + * @return mixed $default if the var is in user input or not present, + * the variable value otherwise. + */ + public static function nonInputVar($varname, $default = null) + { + return (isset($_GET[$varname]) || isset($_POST[$varname]) || isset($_COOKIE[$varname])) + ? $default + : (isset($GLOBALS[$varname]) ? $GLOBALS[$varname] : $default); + } + + /** + * Returns a hidden form input containing the session name and id. + * + * @param boolean $append_session 0 = only if needed, 1 = always. + * + * @return string The hidden form input, if needed/requested. + */ + public static function formInput($append_session = 0) + { + return (($append_session == 1) || !isset($_COOKIE[session_name()])) + ? '\n" + : ''; + } + + /** + * Prints a hidden form input containing the session name and id. + * + * @param boolean $append_session 0 = only if needed, 1 = always. + */ + public static function pformInput($append_session = 0) + { + echo self::formInput($append_session); + } + + /** + * If magic_quotes_gpc is in use, run stripslashes() on $var. + * + * @param mixed $var The string, or an array of strings, to un-quote. + * + * @return mixed $var, minus any magic quotes. + */ + public static function dispelMagicQuotes($var) + { + if (is_null(self::$_magicquotes)) { + self::$_magicquotes = function_exists('get_magic_quotes_gpc') && @get_magic_quotes_gpc(); + } + + if (self::$_magicquotes) { + $var = is_array($var) + ? array_map(array(__CLASS__, 'dispelMagicQuotes'), $var) + : stripslashes($var); + } + + return $var; + } + + /** + * Gets a form variable from GET or POST data, stripped of magic quotes if + * necessary. If the variable is somehow set in both the GET data and the + * POST data, the value from the POST data will be returned and the GET + * value will be ignored. + * + * @param string $var The name of the form variable to look for. + * @param string $default The value to return if the variable is not + * there. + * + * @return string The cleaned form variable, or $default. + */ + public static function getFormData($var, $default = null) + { + return (($val = self::getPost($var)) !== null) + ? $val + : self::getGet($var, $default); + } + + /** + * Gets a form variable from GET data, stripped of magic quotes if + * necessary. This function will NOT return a POST variable. + * + * @param string $var The name of the form variable to look for. + * @param string $default The value to return if the variable is not + * there. + * + * @return string The cleaned form variable, or $default. + */ + public static function getGet($var, $default = null) + { + return (isset($_GET[$var])) + ? self::dispelMagicQuotes($_GET[$var]) + : $default; + } + + /** + * Gets a form variable from POST data, stripped of magic quotes if + * necessary. This function will NOT return a GET variable. + * + * @param string $var The name of the form variable to look for. + * @param string $default The value to return if the variable is not + * there. + * + * @return string The cleaned form variable, or $default. + */ + public static function getPost($var, $default = null) + { + return (isset($_POST[$var])) + ? self::dispelMagicQuotes($_POST[$var]) + : $default; + } + + /** + * Creates a temporary filename for the lifetime of the script, and + * (optionally) registers it to be deleted at request shutdown. + * + * @param string $prefix Prefix to make the temporary name more + * recognizable. + * @param boolean $delete Delete the file at the end of the request? + * @param string $dir Directory to create the temporary file in. + * @param boolean $secure If deleting the file, should we securely delete + * the file by overwriting it with random data? + * + * @return string Returns the full path-name to the temporary file. + * Returns false if a temp file could not be created. + */ + public static function getTempFile($prefix = '', $delete = true, $dir = '', + $secure = false) + { + $tempDir = (empty($dir) || !is_dir($dir)) + ? sys_get_temp_dir() + : $dir; + + $tempFile = tempnam($tempDir, $prefix); + + // If the file was created, then register it for deletion and return. + if (empty($tempFile)) { + return false; + } + + if ($delete) { + self::deleteAtShutdown($tempFile, true, $secure); + } + + return $tempFile; + } + + /** + * Creates a temporary filename with a specific extension for the lifetime + * of the script, and (optionally) registers it to be deleted at request + * shutdown. + * + * @param string $extension The file extension to use. + * @param string $prefix Prefix to make the temporary name more + * recognizable. + * @param boolean $delete Delete the file at the end of the request? + * @param string $dir Directory to create the temporary file in. + * @param boolean $secure If deleting file, should we securely delete + * the file by overwriting it with random data? + * + * @return string Returns the full path-name to the temporary file. + * Returns false if a temporary file could not be created. + */ + public static function getTempFileWithExtension($extension = '.tmp', + $prefix = '', + $delete = true, $dir = '', + $secure = false) + { + $tempDir = (empty($dir) || !is_dir($dir)) + ? sys_get_temp_dir() + : $dir; + + if (empty($tempDir)) { + return false; + } + + $windows = substr(PHP_OS, 0, 3) == 'WIN'; + $tries = 1; + do { + // Get a known, unique temporary file name. + $sysFileName = tempnam($tempDir, $prefix); + if ($sysFileName === false) { + return false; + } + + // tack on the extension + $tmpFileName = $sysFileName . $extension; + if ($sysFileName == $tmpFileName) { + return $sysFileName; + } + + // Move or point the created temporary file to the full filename + // with extension. These calls fail if the new name already + // exists. + $fileCreated = ($windows ? @rename($sysFileName, $tmpFileName) : @link($sysFileName, $tmpFileName)); + if ($fileCreated) { + if (!$windows) { + unlink($sysFileName); + } + + if ($delete) { + self::deleteAtShutdown($tmpFileName, true, $secure); + } + + return $tmpFileName; + } + + unlink($sysFileName); + } while (++$tries <= 5); + + return false; + } + + /** + * Creates a temporary directory in the system's temporary directory. + * + * @param boolean $delete Delete the temporary directory at the end of + * the request? + * @param string $temp_dir Use this temporary directory as the directory + * where the temporary directory will be created. + * + * @return string The pathname to the new temporary directory. + * Returns false if directory not created. + */ + public static function createTempDir($delete = true, $temp_dir = null) + { + if (is_null($temp_dir)) { + $temp_dir = sys_get_temp_dir(); + } + + if (empty($temp_dir)) { + return false; + } + + /* Get the first 8 characters of a random string to use as a temporary + directory name. */ + do { + $new_dir = $temp_dir . '/' . substr(base_convert(uniqid(mt_rand()), 16, 36), 0, 8); + } while (file_exists($new_dir)); + + $old_umask = umask(0000); + if (!mkdir($new_dir, 0700)) { + $new_dir = false; + } elseif ($delete) { + self::deleteAtShutdown($new_dir); + } + umask($old_umask); + + return $new_dir; + } + + /** + * Returns the canonical path of the string. Like PHP's built-in + * realpath() except the directory need not exist on the local server. + * + * Algorithim loosely based on code from the Perl File::Spec::Unix module + * (version 1.5). + * + * @param string $path A file path. + * + * @return string The canonicalized file path. + */ + public static function realPath($path) + { + /* Standardize on UNIX directory separators. */ + if (!strncasecmp(PHP_OS, 'WIN', 3)) { + $path = str_replace('\\', '/', $path); + } + + /* xx////xx -> xx/xx + * xx/././xx -> xx/xx */ + $path = preg_replace(array("|/+|", "@(/\.)+(/|\Z(?!\n))@"), array('/', '/'), $path); + + /* ./xx -> xx */ + if ($path != './') { + $path = preg_replace("|^(\./)+|", '', $path); + } + + /* /../../xx -> xx */ + $path = preg_replace("|^/(\.\./?)+|", '/', $path); + + /* xx/ -> xx */ + if ($path != '/') { + $path = preg_replace("|/\Z(?!\n)|", '', $path); + } + + /* /xx/.. -> / */ + while (strpos($path, '/..') !== false) { + $path = preg_replace("|/[^/]+/\.\.|", '', $path); + } + + return empty($path) ? '/' : $path; + } + + /** + * Removes given elements at request shutdown. + * + * If called with a filename will delete that file at request shutdown; if + * called with a directory will remove that directory and all files in that + * directory at request shutdown. + * + * If called with no arguments, return all elements to be deleted (this + * should only be done by Horde_Util::_deleteAtShutdown()). + * + * The first time it is called, it initializes the array and registers + * Horde_Util::_deleteAtShutdown() as a shutdown function - no need to do + * so manually. + * + * The second parameter allows the unregistering of previously registered + * elements. + * + * @param string $filename The filename to be deleted at the end of the + * request. + * @param boolean $register If true, then register the element for + * deletion, otherwise, unregister it. + * @param boolean $secure If deleting file, should we securely delete + * the file? + */ + public static function deleteAtShutdown($filename, $register = true, + $secure = false) + { + /* Initialization of variables and shutdown functions. */ + if (!self::$_shutdownreg) { + register_shutdown_function(array(__CLASS__, 'shutdown')); + self::$_shutdownreg = true; + } + + $ptr = &self::$_shutdowndata; + if ($register) { + $ptr['paths'][$filename] = true; + if ($secure) { + $ptr['secure'][$filename] = true; + } + } else { + unset($ptr['paths'][$filename], $ptr['secure'][$filename]); + } + } + + /** + * Deletes registered files at request shutdown. + * + * This function should never be called manually; it is registered as a + * shutdown function by Horde_Util::deleteAtShutdown() and called + * automatically at the end of the request. + * + * Contains code from gpg_functions.php. + * Copyright 2002-2003 Braverock Ventures + */ + public static function shutdown() + { + $ptr = &self::$_shutdowndata; + + foreach (array_keys($ptr['paths']) as $val) { + if (@is_file($val)) { + self::_secureDelete($val); + continue; + } + + try { + $it = new RecursiveIteratorIterator( + new RecursiveDirectoryIterator($val), + RecursiveIteratorIterator::CHILD_FIRST + ); + } catch (UnexpectedValueException $e) { + continue; + } + + while ($it->valid()) { + if (!$it->isDot()) { + if ($it->isDir()) { + @rmdir($it->key()); + } elseif ($it->isFile()) { + self::_secureDelete($it->key()); + } else { + @unlink($it->key()); + } + } + $it->next(); + } + + @rmdir($val); + } + } + + /** + * Securely delete the file by overwriting the data with a random + * string. + * + * @param string $file Filename. + */ + protected static function _secureDelete($file) + { + if (isset($ptr['secure'][$file])) { + $filesize = filesize($file); + $fp = fopen($file, 'r+'); + foreach (self::$patterns as $pattern) { + $pattern = substr(str_repeat($pattern, floor($filesize / strlen($pattern)) + 1), 0, $filesize); + fwrite($fp, $pattern); + fseek($fp, 0); + } + fclose($fp); + } + + @unlink($file); + } + + /** + * Caches the result of extension_loaded() calls. + * + * @param string $ext The extension name. + * + * @return boolean Is the extension loaded? + */ + public static function extensionExists($ext) + { + if (!isset(self::$_cache[$ext])) { + self::$_cache[$ext] = extension_loaded($ext); + } + + return self::$_cache[$ext]; + } + + /** + * Tries to load a PHP extension, behaving correctly for all operating + * systems. + * + * @param string $ext The extension to load. + * + * @return boolean True if the extension is now loaded, false if not. + * True can mean that the extension was already loaded, + * OR was loaded dynamically. + */ + public static function loadExtension($ext) + { + /* If $ext is already loaded, our work is done. */ + if (self::extensionExists($ext)) { + return true; + } + + /* See if we can call dl() at all, by the current ini settings. + * dl() has been removed in some PHP 5.3 SAPIs. */ + if ((ini_get('enable_dl') != 1) || + (ini_get('safe_mode') == 1) || + !function_exists('dl')) { + return false; + } + + if (!strncasecmp(PHP_OS, 'WIN', 3)) { + $suffix = 'dll'; + } else { + switch (PHP_OS) { + case 'HP-UX': + $suffix = 'sl'; + break; + + case 'AIX': + $suffix = 'a'; + break; + + case 'OSX': + $suffix = 'bundle'; + break; + + default: + $suffix = 'so'; + } + } + + return dl($ext . '.' . $suffix) || dl('php_' . $ext . '.' . $suffix); + } + + /** + * Utility function to obtain PATH_INFO information. + * + * @return string The PATH_INFO string. + */ + public static function getPathInfo() + { + if (isset($_SERVER['PATH_INFO']) && + (strpos($_SERVER['SERVER_SOFTWARE'], 'lighttpd') === false)) { + return $_SERVER['PATH_INFO']; + } elseif (isset($_SERVER['REQUEST_URI']) && + isset($_SERVER['SCRIPT_NAME'])) { + $search = Horde_String::common($_SERVER['SCRIPT_NAME'], $_SERVER['REQUEST_URI']); + if (substr($search, -1) == '/') { + $search = substr($search, 0, -1); + } + $search = array($search); + if (!empty($_SERVER['QUERY_STRING'])) { + // We can't use QUERY_STRING directly because URL rewriting + // might add more parameters to the query string than those + // from the request URI. + $url = parse_url($_SERVER['REQUEST_URI']); + if (!empty($url['query'])) { + $search[] = '?' . $url['query']; + } + } + $path = str_replace($search, '', $_SERVER['REQUEST_URI']); + if ($path == '/') { + $path = ''; + } + return $path; + } + + return ''; + } + +} diff --git a/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Util/Horde/Variables.php b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Util/Horde/Variables.php new file mode 100644 index 00000000..8a0a881a --- /dev/null +++ b/lam/lib/3rdParty/composer/pear-pear.horde.org/Horde_Util/Horde/Variables.php @@ -0,0 +1,403 @@ + + * @author Chuck Hagenbuch + * @author Michael Slusarz + * @category Horde + * @copyright 2009-2017 Horde LLC + * @license http://www.horde.org/licenses/lgpl21 LGPL 2.1 + * @package Util + */ +class Horde_Variables implements ArrayAccess, Countable, IteratorAggregate +{ + /** + * The list of expected variables. + * + * @var array + */ + protected $_expected = array(); + + /** + * Has the input been sanitized? + * + * @var boolean + */ + protected $_sanitized = false; + + /** + * Array of form variables. + * + * @var array + */ + protected $_vars; + + /** + * Returns a Horde_Variables object populated with the form input. + * + * @param string $sanitize Sanitize the input variables? + * + * @return Horde_Variables Variables object. + */ + public static function getDefaultVariables($sanitize = false) + { + return new self(null, $sanitize); + } + + /** + * Constructor. + * + * @param array $vars The list of form variables (if null, defaults + * to PHP's $_REQUEST value). If '_formvars' + * exists, it must be a JSON encoded array that + * contains the list of allowed form variables. + * @param string $sanitize Sanitize the input variables? + */ + public function __construct($vars = array(), $sanitize = false) + { + if (is_null($vars)) { + $request_copy = $_REQUEST; + $vars = Horde_Util::dispelMagicQuotes($request_copy); + } + + if (isset($vars['_formvars'])) { + $this->_expected = @json_decode($vars['_formvars'], true); + unset($vars['_formvars']); + } + + $this->_vars = $vars; + + if ($sanitize) { + $this->sanitize(); + } + } + + /** + * Sanitize the form input. + */ + public function sanitize() + { + if (!$this->_sanitized) { + foreach (array_keys($this->_vars) as $key) { + $this->$key = $this->filter($key); + } + $this->_sanitized = true; + } + } + + /** + * Alias of isset(). + * + * @see __isset() + */ + public function exists($varname) + { + return $this->__isset($varname); + } + + /** + * isset() implementation. + * + * @param string $varname The form variable name. + * + * @return boolean Does $varname form variable exist? + */ + public function __isset($varname) + { + return count($this->_expected) + ? $this->_getExists($this->_expected, $varname, $value) + : $this->_getExists($this->_vars, $varname, $value); + } + + /** + * Implements isset() for ArrayAccess interface. + * + * @see __isset() + */ + public function offsetExists($field) + { + return $this->__isset($field); + } + + /** + * Returns the value of a given form variable. + * + * @param string $varname The form variable name. + * @param string $default The default form variable value. + * + * @return mixed The form variable, or $default if it doesn't exist. + */ + public function get($varname, $default = null) + { + return $this->_getExists($this->_vars, $varname, $value) + ? $value + : $default; + } + + /** + * Returns the value of a given form variable. + * + * @param string $varname The form variable name. + * + * @return mixed The form variable, or null if it doesn't exist. + */ + public function __get($varname) + { + $this->_getExists($this->_vars, $varname, $value); + return $value; + } + + /** + * Implements getter for ArrayAccess interface. + * + * @see __get() + */ + public function offsetGet($field) + { + return $this->__get($field); + } + + /** + * Given a variable name, returns the value and sets a variable indicating + * whether the value exists in the form data. + * + * @param string $varname The form variable name. + * @param boolean &$exists Reference to variable that will indicate + * whether $varname existed in form data. + * + * @return mixed The form variable, or null if it doesn't exist. + */ + public function getExists($varname, &$exists) + { + $exists = $this->_getExists($this->_vars, $varname, $value); + return $value; + } + + /** + * Sets the value of a given form variable. + * + * @see __set() + */ + public function set($varname, $value) + { + $this->$varname = $value; + } + + /** + * Sets the value of a given form variable. + * + * @param string $varname The form variable name. + * @param mixed $value The value to set. + */ + public function __set($varname, $value) + { + $keys = array(); + + if (Horde_Array::getArrayParts($varname, $base, $keys)) { + array_unshift($keys, $base); + $place = &$this->_vars; + $i = count($keys); + + while ($i--) { + $key = array_shift($keys); + if (!isset($place[$key])) { + $place[$key] = array(); + } + $place = &$place[$key]; + } + + $place = $value; + } else { + $this->_vars[$varname] = $value; + } + } + + /** + * Implements setter for ArrayAccess interface. + * + * @see __set() + */ + public function offsetSet($field, $value) + { + $this->__set($field, $value); + } + + /** + * Deletes a given form variable. + * + * @see __unset() + */ + public function remove($varname) + { + unset($this->$varname); + } + + /** + * Deletes a given form variable. + * + * @param string $varname The form variable name. + */ + public function __unset($varname) + { + Horde_Array::getArrayParts($varname, $base, $keys); + + if (is_null($base)) { + unset($this->_vars[$varname]); + } else { + $ptr = &$this->_vars[$base]; + $end = count($keys) - 1; + foreach ($keys as $key => $val) { + if (!isset($ptr[$val])) { + break; + } + if ($end == $key) { + array_splice($ptr, array_search($val, array_keys($ptr)), 1); + } else { + $ptr = &$ptr[$val]; + } + } + } + } + + /** + * Implements unset() for ArrayAccess interface. + * + * @see __unset() + */ + public function offsetUnset($field) + { + $this->__unset($field); + } + + /** + * Merges a list of variables into the current form variable list. + * + * @param array $vars Form variables. + */ + public function merge($vars) + { + foreach ($vars as $varname => $value) { + $this->$varname = $value; + } + } + + /** + * Set $varname to $value ONLY if it's not already present. + * + * @param string $varname The form variable name. + * @param mixed $value The value to set. + * + * @return boolean True if the value was altered. + */ + public function add($varname, $value) + { + if ($this->exists($varname)) { + return false; + } + + $this->_vars[$varname] = $value; + return true; + } + + /** + * Filters a form value so that it can be used in HTML output. + * + * @param string $varname The form variable name. + * + * @return mixed The filtered variable, or null if it doesn't exist. + */ + public function filter($varname) + { + $val = $this->$varname; + + if (is_null($val) || $this->_sanitized) { + return $val; + } + + return is_array($val) + ? filter_var_array($val, FILTER_SANITIZE_STRING) + : filter_var($val, FILTER_SANITIZE_STRING); + } + + /* Protected methods. */ + + /** + * Fetch the requested variable ($varname) into $value, and return + * whether or not the variable was set in $array. + * + * @param array $array The array to search in (usually either + * $this->_vars or $this->_expected). + * @param string $varname The name of the variable to look for. + * @param mixed &$value $varname's value gets assigned to this variable. + * + * @return boolean Whether or not the variable was set (or, if we've + * checked $this->_expected, should have been set). + */ + protected function _getExists($array, $varname, &$value) + { + if (Horde_Array::getArrayParts($varname, $base, $keys)) { + if (!isset($array[$base])) { + $value = null; + return false; + } + + $searchspace = &$array[$base]; + $i = count($keys); + + while ($i--) { + $key = array_shift($keys); + if (!isset($searchspace[$key])) { + $value = null; + return false; + } + $searchspace = &$searchspace[$key]; + } + $value = $searchspace; + + return true; + } + + $value = isset($array[$varname]) + ? $array[$varname] + : null; + + return !is_null($value); + } + + /* Countable methods. */ + + /** + */ + public function count() + { + return count($this->_vars); + } + + /* IteratorAggregate method. */ + + public function getIterator() + { + return new ArrayIterator($this->_vars); + } + +} diff --git a/lam/lib/3rdParty/composer/ramsey/uuid/CHANGELOG.md b/lam/lib/3rdParty/composer/ramsey/uuid/CHANGELOG.md index 3965fff2..f2f1548e 100644 --- a/lam/lib/3rdParty/composer/ramsey/uuid/CHANGELOG.md +++ b/lam/lib/3rdParty/composer/ramsey/uuid/CHANGELOG.md @@ -1,376 +1,643 @@ # ramsey/uuid Changelog -## 3.8.0 +All notable changes to this project will be documented in this file. -_Released: 2018-07-19_ +The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) +and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html). - * Add support for determining MAC address on FreeBSD systems ([#212](https://github.com/ramsey/uuid/pull/212)) - * Add a polyfill for PHP ctype functions to support systems where the ctype functions are not part of the PHP build ([#223](https://github.com/ramsey/uuid/pull/223)) - * Improve validation to disallow UUIDs with a trailing newline character ([#225](https://github.com/ramsey/uuid/pull/225)) - * Add annotations for thrown exceptions for improved IDE hinting ([#232](https://github.com/ramsey/uuid/pull/232)) - * Improve documentation, testing, and project metadata (i.e. `.gitattributes`, etc.) -## 3.7.3 +## [Unreleased] -_Released: 2018-01-19_ +### Added - * In rare cases, when using `glob()` to find `/sys/class/net/*/address` files on Linux, `glob()` encountered errors, returning `false` instead of an empty array, causing `array_map()` to emit warnings since its second parameter was not an array; this release gracefully handles cases where `glob()` returns `false` [#203](https://github.com/ramsey/uuid/issues/203) - * Fixed an off-by-one error in `DefaultTimeGenerator` and switching to `random_int()` from `mt_rand()` for better random numbers [#206](https://github.com/ramsey/uuid/pull/206) +### Changed -## 3.7.2 +### Deprecated -_Released: 2018-01-13_ +### Removed - * On Linux, first check sysfs to determine node identifier; this provides a reliable way to identify the node on Docker images, etc. [#185](https://github.com/ramsey/uuid/pull/185) +### Fixed -## 3.7.1 +### Security -_Released: 2017-09-22_ - * Use `random_bytes()` when generating random nodes - * Set the multicast bit for random nodes, according to RFC 4122, §4.5, [#170](https://github.com/ramsey/uuid/pull/170), [#171](https://github.com/ramsey/uuid/pull/171), [#182](https://github.com/ramsey/uuid/pull/182) +## [3.9.2] - 2019-12-17 -## 3.7.0 +### Fixed -_Released: 2017-08-04_ +* Check whether files returned by `/sys/class/net/*/address` are readable + before attempting to read them. This avoids a PHP warning that was being + emitted on hosts that do not grant permission to read these files. - * Add UUID version constants [#173](https://github.com/ramsey/uuid/issues/173), [#177](https://github.com/ramsey/uuid/pull/177) + +## [3.9.1] - 2019-12-01 + +### Fixed + +* Fix `RandomNodeProvider` behavior on 32-bit systems. The `RandomNodeProvider` + was converting a 6-byte string to a decimal number, which is a 48-bit, + unsigned integer. This caused problems on 32-bit systems and has now been + resolved. + + +## [3.9.0] - 2019-11-30 + +### Added + +* Add function API as convenience. The functions are available in the + `Ramsey\Uuid` namespace. + * `v1(int|string|null $node = null, int|null $clockSeq = null): string` + * `v3(string|UuidInterface $ns, string $name): string` + * `v4(): string` + * `v5(string|UuidInterface $ns, string $name): string` + +### Changed + +* Use paragonie/random-lib instead of ircmaxell/random-lib. This is a + non-breaking change. +* Use a high-strength generator by default, when using `RandomLibAdapter`. This + is a non-breaking change. + +### Deprecated + +These will be removed in ramsey/uuid version 4.0.0: + +* `MtRandGenerator`, `OpenSslGenerator`, and `SodiumRandomGenerator` are + deprecated in favor of using the default `RandomBytesGenerator`. + +### Fixed + +* Set `ext-json` as a required dependency in `composer.json`. +* Use `PHP_OS` instead of `php_uname()` when determining the system OS, for + cases when `php_uname()` is disabled for security reasons. + + +## [3.8.0] - 2018-07-19 + +### Added + +* Support discovery of MAC addresses on FreeBSD systems +* Use a polyfill to provide PHP ctype functions when running on systems where the + ctype functions are not part of the PHP build +* Disallow a trailing newline character when validating UUIDs +* Annotate thrown exceptions for improved IDE hinting + + +## [3.7.3] - 2018-01-19 + +### Fixed + +* Gracefully handle cases where `glob()` returns false when searching + `/sys/class/net/*/address` files on Linux +* Fix off-by-one error in `DefaultTimeGenerator` + +### Security + +* Switch to `random_int()` from `mt_rand()` for better random numbers + + +## [3.7.2] - 2018-01-13 + +### Fixed + +* Check sysfs on Linux to determine the node identifier; this provides a + reliable way to identify the node on Docker images, etc. + + +## [3.7.1] - 2017-09-22 + +### Fixed + +* Set the multicast bit for random nodes, according to RFC 4122, §4.5 + +### Security + +* Use `random_bytes()` when generating random nodes + + +## [3.7.0] - 2017-08-04 + +### Added + +* Add the following UUID version constants: * `Uuid::UUID_TYPE_TIME` * `Uuid::UUID_TYPE_IDENTIFIER` * `Uuid::UUID_TYPE_HASH_MD5` * `Uuid::UUID_TYPE_RANDOM` * `Uuid::UUID_TYPE_HASH_SHA1` -## 3.6.1 -_Released: 2017-03-26_ +## [3.6.1] - 2017-03-26 - * Optimize UUID string decoding [#164](https://github.com/ramsey/uuid/pull/164) +### Fixed -## 3.6.0 +* Optimize UUID string decoding by using `str_pad()` instead of `sprintf()` -_Released: 2017-03-18_ - * Add `InvalidUuidStringException`, thrown when attempting to decode an invalid string UUID; this does not introduce any BC issues, since the new exception inherits from the previously used `InvalidArgumentException` [#162](https://github.com/ramsey/uuid/pull/162) - * Improve memory usage when generating large quantities of UUIDs (use `str_pad()` and `dechex()` instead of `sprintf()`) [#160](https://github.com/ramsey/uuid/pull/160) - * Minor test and documentation updates +## [3.6.0] - 2017-03-18 -## 3.5.2 +### Added -_Released: 2016-11-22_ +* Add `InvalidUuidStringException`, which is thrown when attempting to decode an + invalid string UUID; this does not introduce any BC issues, since the new + exception inherits from the previously used `InvalidArgumentException` - * Improved test coverage. +### Fixed -## 3.5.1 +* Improve memory usage when generating large quantities of UUIDs (use `str_pad()` + and `dechex()` instead of `sprintf()`) -_Released: 2016-10-02_ - * Fixed issue where same UUIDs were not treated as equal with mixed case ([#131](https://github.com/ramsey/uuid/issues/131), [#137](https://github.com/ramsey/uuid/pull/137)). - * Test cleanup. +## [3.5.2] - 2016-11-22 -## 3.5.0 +### Fixed -_Released: 2016-08-02_ +* Improve test coverage - * Add `OrderedTimeCodec` to store UUID in an optimized way for InnoDB ([#117](https://github.com/ramsey/uuid/issues/117), [#118](https://github.com/ramsey/uuid/pull/118)). - * Fixed `RandomNodeProvider` to prevent invalid node generation ([#129](https://github.com/ramsey/uuid/pull/129)). - * Cache failed attempt to retrieve system node to avoid multiple system calls ([#107](https://github.com/ramsey/uuid/issues/107), [#121](https://github.com/ramsey/uuid/pull/121)). - * Various test improvements. -## 3.4.1 +## [3.5.1] - 2016-10-02 -_Released: 2016-04-23_ +### Fixed - * Fixed test that violated a PHP CodeSniffer rule, breaking the build. +* Fix issue where the same UUIDs were not being treated as equal when using + mixed cases -## 3.4.0 -_Released: 2016-04-23_ +## [3.5.0] - 2016-08-02 - * Add `TimestampFirstCombCodec` and `TimestampLastCombCodec` codecs. - * Improve logic of `CombGenerator` for COMB sequential UUIDs. - * Significantly improved test coverage. +### Added -## 3.3.0 +* Add `OrderedTimeCodec` to store UUID in an optimized way for InnoDB -_Released: 2016-03-22_ +### Fixed - * Drop the use of OpenSSL as a fallback and use [paragonie/random_compat][] to support RandomBytesGenerator in versions of PHP earlier than 7.0. This addresses and fixes the [collision issue][]. - * Improved test coverage. - * Update code to conduct to version 1.4 of the Contributor Covenant. +* Fix invalid node generation in `RandomNodeProvider` +* Avoid multiple unnecessary system calls by caching failed attempt to retrieve + system node -## 3.2.0 -_Released: 2016-02-17_ +## [3.4.1] - 2016-04-23 - * Add random generator option for use for the PECL libsodium extension. - * Updates to test infrastructure. +### Fixed -## 3.1.0 +* Fix test that violated a PHP CodeSniffer rule, breaking the build -_Released: 2015-12-17_ - * Uuid objects now may be properly serialized/unserialized. - * Update build environments for testing on Travis CI. +## [3.4.0] - 2016-04-23 -## 3.0.1 +### Added -_Released: 2015-10-21_ +* Add `TimestampFirstCombCodec` and `TimestampLastCombCodec` codecs to provide + the ability to generate [COMB sequential UUIDs] with the timestamp encoded as + either the first 48 bits or the last 48 bits +* Improve logic of `CombGenerator` for COMB sequential UUIDs - * Add project [Contributor Code of Conduct](https://github.com/ramsey/uuid/blob/master/CONDUCT.md) - * Modify Travis CI builds to run tests on multiple CPU architectures - * Clean up code, tests, and documentation -## 3.0.0 +## [3.3.0] - 2016-03-22 -_Released: 2015-09-28_ +### Security -The 3.0.0 release represents a significant step for the ramsey/uuid library. While the simple and familiar API used in previous versions remains intact, this release provides greater flexibility to integrators, including the ability to inject your own number generators, UUID codecs, node and time providers, and more. +* Drop the use of OpenSSL as a fallback and use [paragonie/random_compat] to + support `RandomBytesGenerator` in versions of PHP earlier than 7.0; + this addresses and fixes the [collision issue] - * BREAK: The root namespace for this package has changed from "Rhumsaa" to "Ramsey." In most cases, simply making this change in your applications is the only upgrade path you will need. Everything else should work as expected. - * BREAK: The UUID [Doctrine field type](http://doctrine-dbal.readthedocs.org/en/latest/reference/types.html) has been moved to [ramsey/uuid-doctrine](https://github.com/ramsey/uuid-doctrine). - * BREAK: The `uuid` console application has been moved to [ramsey/uuid-console](https://github.com/ramsey/uuid-console). - * BREAK: The `Uuid::VERSION` package version constant has been removed. - * See also the release notes for [3.0.0-alpha1][300-alpha1], [3.0.0-alpha2][300-alpha2], [3.0.0-alpha3][300-alpha3], and [3.0.0-beta1][300-beta1]. -[300-alpha1]: https://github.com/ramsey/uuid/blob/master/CHANGELOG.md#300-alpha1 -[300-alpha2]: https://github.com/ramsey/uuid/blob/master/CHANGELOG.md#300-alpha2 -[300-alpha3]: https://github.com/ramsey/uuid/blob/master/CHANGELOG.md#300-alpha3 -[300-beta1]: https://github.com/ramsey/uuid/blob/master/CHANGELOG.md#300-beta1 +## [3.2.0] - 2016-02-17 -## 3.0.0-beta1 +### Added -_Released: 2015-08-31_ +* Add `SodiumRandomGenerator` to allow use of the [PECL libsodium extension] as + a random bytes generator when creating UUIDs - * Improve GUID support to ensure that: - * On little endian (LE) architectures, the byte order of the first three fields is LE. - * On big endian (BE) architectures, it is the same as a GUID. - * String representation is always the same. - * Fix exception message for `DegradedNumberConverter::fromHex()`. - * Add Scrutinizer configuration to run code-quality builds through Scrutinizer. - * Auto-fix Scrutinizer issues. - * Fix support URLs in composer.json to point to the correct GitHub repository. -## 3.0.0-alpha3 +## [3.1.0] - 2015-12-17 -_Released: 2015-07-28_ +### Added - * Time generator improvements: - * Enabled use of custom TimeGenerator implementations. - * BREAK: Removed now unnecessary `timeConverter` and `timeProvider` properties, setters, and getters in both `FeatureSet` and `UuidFactory` as those are now exclusively used by the default `TimeGenerator`. - * Added a `setTimeGenerator` method on `UuidFactory` to override the default time generator. - * Add option to enable `PeclUuidTimeGenerator` via `FeatureSet`. +* Implement the PHP `Serializable` interface to provide the ability to + serialize/unserialize UUID objects -## 3.0.0-alpha2 -_Released: 2015-07-28_ +## [3.0.1] - 2015-10-21 - * BREAK: Removed `PeclUuidFactory` in favor of using pecl-uuid with generators. - * NEW: Refactored time-based (version 1) UUIDs into a `TimeGeneratorInterface` to allow for other sources to generate version 1 UUIDs in this library. - * NEW: Added `PeclUuidTimeGenerator` and `PeclUuidRandomGenerator` for creating version 1 or version 4 UUIDs using the pecl-uuid extension. - * NEW: Add `RandomBytesGenerator` for use with PHP 7. ramsey/uuid will default to use this generator when running on PHP 7. - * `RandomLibAdapter` now defaults to a medium-strength generator with [ircmaxell/random-lib](https://github.com/ircmaxell/RandomLib). This is configurable, so other generator strengths may be used. - * Migrated to the Travis CI container-based infrastructure for builds. - * Documentation updates and corrections. +### Added -## 3.0.0-alpha1 +* Adopt the [Contributor Code of Conduct] for this project -_Released: 2015-07-16_ - * BREAK: The root namespace for this package has changed from "Rhumsaa" to "Ramsey." In most cases, simply making this change in your applications is the only upgrade path you will need. Everything else should work as expected. - * BREAK: The UUID [Doctrine field type](http://doctrine-dbal.readthedocs.org/en/latest/reference/types.html) has been moved to [ramsey/uuid-doctrine](https://github.com/ramsey/uuid-doctrine). - * BREAK: The `uuid` console application has been moved to [ramsey/uuid-console](https://github.com/ramsey/uuid-console). - * BREAK: The `Uuid::VERSION` package version constant has been removed. - * NEW: The `Uuid` class is no longer marked as `final`. Everything is now based around interfaces and factories, allowing you to use this package as a base to implement other kinds of UUIDs with different dependencies. - * NEW: Through setting dependencies on `UuidFactory` and/or extending `FeatureSet`, you may override any package defaults, injecting your own dependencies. - * NEW: For random number generation, in addition to `OpenSslGenerator` (used if `openssl_random_pseudo_bytes()` is present) and the fallback `MtRandGenerator`, you may use the bundled `CombGenerator` for sequential UUIDs or the `RandomLibAdapter` if using [ircmaxell/random-lib](https://github.com/ircmaxell/RandomLib). - * NEW: In addition to the default UUID generation, this library also supports GUID generation by configuring a `FeatureSet` to use GUIDs. - * NEW: While the interface to create UUIDs hasn't changed, if using this package on a 32-bit system, you will now receive an object of type `DegradedUuid` (which extends `Uuid`, which implements `UuidInterface`). - * NEW: All UUIDs are now [JsonSerializable](http://php.net/JsonSerializable). +## [3.0.0] - 2015-09-28 -## 2.9.0 +The 3.0.0 release represents a significant step for the ramsey/uuid library. +While the simple and familiar API used in previous versions remains intact, this +release provides greater flexibility to integrators, including the ability to +inject your own number generators, UUID codecs, node and time providers, and +more. -_Released: 2016-03-22_ +*Please note: The changelog for 3.0.0 includes all notes from the alpha and beta +versions leading up to this release.* - * Drop support for OpenSSL in favor of [paragonie/random_compat][]. This addresses and fixes the [collision issue][]. +### Added -## 2.8.4 +* Add a number of generators that may be used to override the library defaults + for generating random bytes (version 4) or time-based (version 1) UUIDs + * `CombGenerator` to allow generation of sequential UUIDs + * `OpenSslGenerator` to generate random bytes on systems where + `openssql_random_pseudo_bytes()` is present + * `MtRandGenerator` to provide a fallback in the event other random generators + are not present + * `RandomLibAdapter` to allow use of [ircmaxell/random-lib] + * `RandomBytesGenerator` for use with PHP 7; ramsey/uuid will default to use + this generator when running on PHP 7 + * Refactor time-based (version 1) UUIDs into a `TimeGeneratorInterface` to + allow for other sources to generate version 1 UUIDs in this library + * `PeclUuidTimeGenerator` and `PeclUuidRandomGenerator` for creating version + 1 or version 4 UUIDs using the pecl-uuid extension +* Add a `setTimeGenerator` method on `UuidFactory` to override the default time + generator +* Add option to enable `PeclUuidTimeGenerator` via `FeatureSet` +* Support GUID generation by configuring a `FeatureSet` to use GUIDs +* Allow UUIDs to be serialized as JSON through `JsonSerializable` -_Released: 2015-12-17_ +### Changed - * Add support for symfony/console v3. - * Update build matrix to run Travis CI tests on PHP 7 & with lowest package versions. +* Change root namespace from "Rhumsaa" to "Ramsey;" in most cases, simply + making this change in your applications is the only upgrade path you will + need—everything else should work as expected +* No longer consider `Uuid` class as `final`; everything is now based around + interfaces and factories, allowing you to use this package as a base to + implement other kinds of UUIDs with different dependencies +* Return an object of type `DegradedUuid` on 32-bit systems to indicate that + certain features are not available +* Default `RandomLibAdapter` to a medium-strength generator with + [ircmaxell/random-lib]; this is configurable, so other generator strengths may + be used -## 2.8.3 +### Removed -_Released: 2015-08-31_ +* Remove `PeclUuidFactory` in favor of using pecl-uuid with generators +* Remove `timeConverter` and `timeProvider` properties, setters, and getters in + both `FeatureSet` and `UuidFactory` as those are now exclusively used by the + default `TimeGenerator` +* Move UUID [Doctrine field type] to [ramsey/uuid-doctrine] +* Move `uuid` console application to [ramsey/uuid-console] +* Remove `Uuid::VERSION` package version constant - * Fix exception message in `Uuid::calculateUuidTime()`. - * Update composer.json to reflect new repository and package name. +### Fixed -## 2.8.2 +* Improve GUID support to ensure that: + * On little endian (LE) architectures, the byte order of the first three + fields is LE + * On big endian (BE) architectures, it is the same as a GUID + * String representation is always the same +* Fix exception message for `DegradedNumberConverter::fromHex()` -_Released: 2015-07-23_ - * Ensure the release tag makes it into the rhumsaa/uuid package. - * Minor documentation changes. +## [3.0.0-beta1] - 2015-08-31 -## 2.8.1 +### Fixed -_Released: 2015-06-16_ +* Improve GUID support to ensure that: + * On little endian (LE) architectures, the byte order of the first three + fields is LE + * On big endian (BE) architectures, it is the same as a GUID + * String representation is always the same +* Fix exception message for `DegradedNumberConverter::fromHex()` - * Use `passthru()` and output buffering in `getIfconfig()`. - * Cache the system node in a static variable so that we process it only once per runtime. - * Set ramsey/uuid as a replacement for rhumsaa/uuid in composer.json. - * Documentation updates and corrections. -## 2.8.0 +## [3.0.0-alpha3] - 2015-07-28 -_Released: 2014-11-09_ +### Added - * Added static `fromInteger()` method to create UUIDs from string integer or `\Moontoast\Math\BigNumber`. - * Friendlier Doctrine conversion to Uuid or string. - * Documentation fixes. +* Enable use of custom `TimeGenerator` implementations +* Add a `setTimeGenerator` method on `UuidFactory` to override the default time + generator +* Add option to enable `PeclUuidTimeGenerator` via `FeatureSet` -## 2.7.4 +### Removed -_Released: 2014-10-29_ +* Remove `timeConverter` and `timeProvider` properties, setters, and getters in + both `FeatureSet` and `UuidFactory` as those are now exclusively used by the + default `TimeGenerator` - * Changed loop in `generateBytes()` from `foreach` to `for`; see #33 - * Use `toString()` in README examples to avoid confusion - * Exclude build/development tools from releases using .gitattributes - * Set timezone properly for tests -## 2.7.3 +## [3.0.0-alpha2] - 2015-07-28 -_Released: 2014-08-27_ +### Added - * Fixed upper range for `mt_rand` used in version 4 UUIDs +* Refactor time-based (version 1) UUIDs into a `TimeGeneratorInterface` to allow + for other sources to generate version 1 UUIDs in this library +* Add `PeclUuidTimeGenerator` and `PeclUuidRandomGenerator` for creating version + 1 or version 4 UUIDs using the pecl-uuid extension +* Add `RandomBytesGenerator` for use with PHP 7. ramsey/uuid will default to use + this generator when running on PHP 7 -## 2.7.2 +### Changed -_Released: 2014-07-28_ +* Default `RandomLibAdapter` to a medium-strength generator with + [ircmaxell/random-lib]; this is configurable, so other generator strengths may + be used - * Upgraded to PSR-4 autoloading - * Testing upgrades: - * Testing against PHP 5.6 - * Testing with PHPUnit 4 - * Using Coveralls.io to generate code coverage reports - * Documentation fixes +### Removed -## 2.7.1 +* Remove `PeclUuidFactory` in favor of using pecl-uuid with generators -_Released: 2014-02-19_ - * Moved moontoast/math and symfony/console to require-dev; fixes #20 - * Now supporting symfony/console for 2.3 (LTS version); fixes #21 - * Updated tests to run even when dev packages are not installed (skips tests if requirements are not met) +## [3.0.0-alpha1] - 2015-07-16 -## 2.7.0 +### Added -_Released: 2014-01-31_ +* Allow dependency injection through `UuidFactory` and/or extending `FeatureSet` + to override any package defaults +* Add a number of generators that may be used to override the library defaults: + * `CombGenerator` to allow generation of sequential UUIDs + * `OpenSslGenerator` to generate random bytes on systems where + `openssql_random_pseudo_bytes()` is present + * `MtRandGenerator` to provide a fallback in the event other random generators + are not present + * `RandomLibAdapter` to allow use of [ircmaxell/random-lib] +* Support GUID generation by configuring a `FeatureSet` to use GUIDs +* Allow UUIDs to be serialized as JSON through `JsonSerializable` - * Moved UUID validation regex pattern into constant for external use (`Uuid::VALID_PATTERN`) +### Changed -## 2.6.1 +* Change root namespace from "Rhumsaa" to "Ramsey;" in most cases, simply + making this change in your applications is the only upgrade path you will + need—everything else should work as expected +* No longer consider `Uuid` class as `final`; everything is now based around + interfaces and factories, allowing you to use this package as a base to + implement other kinds of UUIDs with different dependencies +* Return an object of type `DegradedUuid` on 32-bit systems to indicate that + certain features are not available -_Released: 2014-01-27_ +### Removed - * Fixed bug where `uuid` console application could not find the Composer autoloader when installed in another project +* Move UUID [Doctrine field type] to [ramsey/uuid-doctrine] +* Move `uuid` console application to [ramsey/uuid-console] +* Remove `Uuid::VERSION` package version constant -## 2.6.0 -_Released: 2014-01-17_ +## [2.9.0] - 2016-03-22 - * Introduced `uuid` console application for generating and decoding UUIDs from CLI (run `./bin/uuid` for details) - * Added `Uuid::getInteger()` to retrieve a Moontoast\Math\BigNumber representation of the 128-bit integer representing the UUID - * Added `Uuid::getHex()` to retrieve the hexadecimal representation of the UUID - * Now using netstat on Linux to capture the node for a version 1 UUID - * Now requiring Moontoast\Math as part of the regular package requirements, not just the dev requirements +### Security -## 2.5.0 +* Drop the use of OpenSSL as a fallback and use [paragonie/random_compat] to + support `RandomBytesGenerator` in versions of PHP earlier than 7.0; + this addresses and fixes the [collision issue] -_Released: 2013-10-30_ - * Using `openssl_random_pseudo_bytes()`, if available, to generate random bytes, by merging in PR #15 from @dfreudenberger - * Fixed test for Rhumsaa\Uuid\Doctrine\UuidType, by merging in PR #17 from @dfreudenberger - * Documentation fixes +## [2.8.4] - 2015-12-17 -## 2.4.0 +### Added -_Released: 2013-07-29_ +* Add support for symfony/console v3 in the `uuid` CLI application - * `Uuid::getVersion()` now returns null if the UUID isn't an RFC 4122 variant - * `Uuid::fromString()` now supports a 128-bit integer formatted as a hexadecimal string (UUID without dashes) - * Tests have been greatly enhanced, borrowing from the Python UUID library -## 2.3.0 +## [2.8.3] - 2015-08-31 -_Released: 2013-07-16_ +### Fixed - * Added `Uuid::fromBytes()` by merging in PR #14 from @asm89 +* Fix exception message in `Uuid::calculateUuidTime()` -## 2.2.0 -_Released: 2013-07-04_ +## [2.8.2] - 2015-07-23 - * Added `Doctrine\UuidType::requiresSQLCommentHint()` method by merging in PR #13 from @zerrvox - * Removed `"minimum-stability": "dev"` from composer.json +### Fixed -## 2.1.2 +* Ensure the release tag makes it into the rhumsaa/uuid package -_Released: 2013-07-03_ - * @ericthelin found cases where the system node was coming back with uppercase hexadecimal digits; this ensures that case in the node is converted to lowercase +## [2.8.1] - 2015-06-16 -## 2.1.1 +### Fixed -_Released: 2013-04-29_ +* Use `passthru()` and output buffering in `getIfconfig()` +* Cache the system node in a static variable so that we process it only once per + runtime - * Fixed NIL bug in `Uuid::isValid()` method, reported by @ocubom in PR #11 -## 2.1.0 +## [2.8.0] - 2014-11-09 -_Released: 2013-04-15_ +### Added - * Added static `Uuid::isValid()` method for checking whether a string is a valid UUID +* Add static `fromInteger()` method to create UUIDs from string integer or + `Moontoast\Math\BigNumber` -## 2.0.0 +### Fixed -_Released: 2013-02-11_ +* Improve Doctrine conversion to Uuid or string for the ramsey/uuid [Doctrine + field type] - * Break: `Uuid` class is now marked as "final" - * Break: `Uuid::getLeastSignificantBits()` no longer returns an integer on 64-bit platforms; it requires `moontoast/math` - * Break: `Uuid::getMostSignificantBits()` no longer returns an integer on 64-bit platforms; it requires `moontoast/math` - * Break: Moved `UnsupportedOperationException` to the `Exception` subnamespace - * Added support for 32-bit platforms - * Added generated API documentation to the repository -## 1.1.2 +## [2.7.4] - 2014-10-29 -_Released: 2012-11-29_ +### Fixed - * Relaxed Doctrine type conversion rules +* Change loop in `generateBytes()` from `foreach` to `for` -## 1.1.1 -_Released: 2012-08-27_ +## [2.7.3] - 2014-08-27 - * Removed `final` keyword from `Uuid` class +### Fixed -## 1.1.0 +* Fix upper range for `mt_rand` used in version 4 UUIDs -_Released: 2012-08-06_ - * Added `Doctrine\UuidType` as a field mapping type for the Doctrine Database Abstraction Layer (DBAL) - * Improved tests and code coverage +## [2.7.2] - 2014-07-28 -## 1.0.0 +### Changed -_Released: 2012-07-19_ +* Upgrade to PSR-4 autoloading - * Initial release +## [2.7.1] - 2014-02-19 +### Fixed + +* Move moontoast/math and symfony/console to require-dev +* Support symfony/console 2.3 (LTS version) + + +## [2.7.0] - 2014-01-31 + +### Added + +* Add `Uuid::VALID_PATTERN` constant containing a UUID validation regex pattern + + +## [2.6.1] - 2014-01-27 + +### Fixed + +* Fix bug where `uuid` console application could not find the Composer + autoloader when installed in another project + + +## [2.6.0] - 2014-01-17 + +### Added + +* Introduce `uuid` console application for generating and decoding UUIDs from + CLI (run `./bin/uuid` for details) +* Add `Uuid::getInteger()` to retrieve a `Moontoast\Math\BigNumber` + representation of the 128-bit integer representing the UUID +* Add `Uuid::getHex()` to retrieve the hexadecimal representation of the UUID +* Use `netstat` on Linux to capture the node for a version 1 UUID +* Require moontoast/math as part of the regular package requirements + + +## [2.5.0] - 2013-10-30 + +### Added + +* Use `openssl_random_pseudo_bytes()`, if available, to generate random bytes + + +## [2.4.0] - 2013-07-29 + +### Added + +* Return `null` from `Uuid::getVersion()` if the UUID isn't an RFC 4122 variant +* Support string UUIDs without dashes passed to `Uuid::fromString()` + + +## [2.3.0] - 2013-07-16 + +### Added + +* Support creation of UUIDs from bytes with `Uuid::fromBytes()` + + +## [2.2.0] - 2013-07-04 + +### Added + +* Add `Doctrine\UuidType::requiresSQLCommentHint()` method + + +## [2.1.2] - 2013-07-03 + +### Fixed + +* Fix cases where the system node was coming back with uppercase hexadecimal + digits; this ensures that case in the node is converted to lowercase + + +## [2.1.1] - 2013-04-29 + +### Fixed + +* Fix bug in `Uuid::isValid()` where the NIL UUID was not reported as valid + + +## [2.1.0] - 2013-04-15 + +### Added + +* Allow checking the validity of a UUID through the `Uuid::isValid()` method + + +## [2.0.0] - 2013-02-11 + +### Added + +* Support UUID generation on 32-bit platforms + +### Changed + +* Mark `Uuid` class `final` +* Require moontoast/math on 64-bit platforms for + `Uuid::getLeastSignificantBits()` and `Uuid::getMostSignificantBits()`; the + integers returned by these methods are *unsigned* 64-bit integers and + unsupported even on 64-bit builds of PHP +* Move `UnsupportedOperationException` to the `Exception` subnamespace + + +## [1.1.2] - 2012-11-29 + +### Fixed + +* Relax [Doctrine field type] conversion rules for UUIDs + + +## [1.1.1] - 2012-08-27 + +### Fixed + +* Remove `final` keyword from `Uuid` class + + +## [1.1.0] - 2012-08-06 + +### Added + +* Support ramsey/uuid UUIDs as a Doctrine Database Abstraction Layer (DBAL) + field mapping type + + +## [1.0.0] - 2012-07-19 + +### Added + +* Support generation of version 1, 3, 4, and 5 UUIDs + + +[comb sequential uuids]: http://www.informit.com/articles/article.aspx?p=25862&seqNum=7 [paragonie/random_compat]: https://github.com/paragonie/random_compat [collision issue]: https://github.com/ramsey/uuid/issues/80 +[contributor code of conduct]: https://github.com/ramsey/uuid/blob/master/.github/CODE_OF_CONDUCT.md +[pecl libsodium extension]: http://pecl.php.net/package/libsodium +[ircmaxell/random-lib]: https://github.com/ircmaxell/RandomLib +[doctrine field type]: http://doctrine-dbal.readthedocs.org/en/latest/reference/types.html +[ramsey/uuid-doctrine]: https://github.com/ramsey/uuid-doctrine +[ramsey/uuid-console]: https://github.com/ramsey/uuid-console + +[unreleased]: https://github.com/ramsey/uuid/compare/3.9.2...HEAD +[3.9.2]: https://github.com/ramsey/uuid/compare/3.9.1...3.9.2 +[3.9.1]: https://github.com/ramsey/uuid/compare/3.9.0...3.9.1 +[3.9.0]: https://github.com/ramsey/uuid/compare/3.8.0...3.9.0 +[3.8.0]: https://github.com/ramsey/uuid/compare/3.7.3...3.8.0 +[3.7.3]: https://github.com/ramsey/uuid/compare/3.7.2...3.7.3 +[3.7.2]: https://github.com/ramsey/uuid/compare/3.7.1...3.7.2 +[3.7.1]: https://github.com/ramsey/uuid/compare/3.7.0...3.7.1 +[3.7.0]: https://github.com/ramsey/uuid/compare/3.6.1...3.7.0 +[3.6.1]: https://github.com/ramsey/uuid/compare/3.6.0...3.6.1 +[3.6.0]: https://github.com/ramsey/uuid/compare/3.5.2...3.6.0 +[3.5.2]: https://github.com/ramsey/uuid/compare/3.5.1...3.5.2 +[3.5.1]: https://github.com/ramsey/uuid/compare/3.5.0...3.5.1 +[3.5.0]: https://github.com/ramsey/uuid/compare/3.4.1...3.5.0 +[3.4.1]: https://github.com/ramsey/uuid/compare/3.4.0...3.4.1 +[3.4.0]: https://github.com/ramsey/uuid/compare/3.3.0...3.4.0 +[3.3.0]: https://github.com/ramsey/uuid/compare/3.2.0...3.3.0 +[3.2.0]: https://github.com/ramsey/uuid/compare/3.1.0...3.2.0 +[3.1.0]: https://github.com/ramsey/uuid/compare/3.0.1...3.1.0 +[3.0.1]: https://github.com/ramsey/uuid/compare/3.0.0...3.0.1 +[3.0.0]: https://github.com/ramsey/uuid/compare/3.0.0-beta1...3.0.0 +[3.0.0-beta1]: https://github.com/ramsey/uuid/compare/3.0.0-alpha3...3.0.0-beta1 +[3.0.0-alpha3]: https://github.com/ramsey/uuid/compare/3.0.0-alpha2...3.0.0-alpha3 +[3.0.0-alpha2]: https://github.com/ramsey/uuid/compare/3.0.0-alpha1...3.0.0-alpha2 +[3.0.0-alpha1]: https://github.com/ramsey/uuid/compare/2.9.0...3.0.0-alpha1 +[2.9.0]: https://github.com/ramsey/uuid/compare/2.8.4...2.9.0 +[2.8.4]: https://github.com/ramsey/uuid/compare/2.8.3...2.8.4 +[2.8.3]: https://github.com/ramsey/uuid/compare/2.8.2...2.8.3 +[2.8.2]: https://github.com/ramsey/uuid/compare/2.8.1...2.8.2 +[2.8.1]: https://github.com/ramsey/uuid/compare/2.8.0...2.8.1 +[2.8.0]: https://github.com/ramsey/uuid/compare/2.7.4...2.8.0 +[2.7.4]: https://github.com/ramsey/uuid/compare/2.7.3...2.7.4 +[2.7.3]: https://github.com/ramsey/uuid/compare/2.7.2...2.7.3 +[2.7.2]: https://github.com/ramsey/uuid/compare/2.7.1...2.7.2 +[2.7.1]: https://github.com/ramsey/uuid/compare/2.7.0...2.7.1 +[2.7.0]: https://github.com/ramsey/uuid/compare/2.6.1...2.7.0 +[2.6.1]: https://github.com/ramsey/uuid/compare/2.6.0...2.6.1 +[2.6.0]: https://github.com/ramsey/uuid/compare/2.5.0...2.6.0 +[2.5.0]: https://github.com/ramsey/uuid/compare/2.4.0...2.5.0 +[2.4.0]: https://github.com/ramsey/uuid/compare/2.3.0...2.4.0 +[2.3.0]: https://github.com/ramsey/uuid/compare/2.2.0...2.3.0 +[2.2.0]: https://github.com/ramsey/uuid/compare/2.1.2...2.2.0 +[2.1.2]: https://github.com/ramsey/uuid/compare/2.1.1...2.1.2 +[2.1.1]: https://github.com/ramsey/uuid/compare/2.1.0...2.1.1 +[2.1.0]: https://github.com/ramsey/uuid/compare/2.0.0...2.1.0 +[2.0.0]: https://github.com/ramsey/uuid/compare/1.1.2...2.0.0 +[1.1.2]: https://github.com/ramsey/uuid/compare/1.1.1...1.1.2 +[1.1.1]: https://github.com/ramsey/uuid/compare/1.1.0...1.1.1 +[1.1.0]: https://github.com/ramsey/uuid/compare/1.0.0...1.1.0 +[1.0.0]: https://github.com/ramsey/uuid/commits/1.0.0 diff --git a/lam/lib/3rdParty/composer/ramsey/uuid/CODE_OF_CONDUCT.md b/lam/lib/3rdParty/composer/ramsey/uuid/CODE_OF_CONDUCT.md deleted file mode 100644 index 9c207259..00000000 --- a/lam/lib/3rdParty/composer/ramsey/uuid/CODE_OF_CONDUCT.md +++ /dev/null @@ -1,74 +0,0 @@ -# Contributor Code of Conduct - -## Our Pledge - -In the interest of fostering an open and welcoming environment, we as -contributors and maintainers pledge to making participation in our project and -our community a harassment-free experience for everyone, regardless of age, body -size, disability, ethnicity, gender identity and expression, level of experience, -nationality, personal appearance, race, religion, or sexual identity and -orientation. - -## Our Standards - -Examples of behavior that contributes to creating a positive environment -include: - -* Using welcoming and inclusive language -* Being respectful of differing viewpoints and experiences -* Gracefully accepting constructive criticism -* Focusing on what is best for the community -* Showing empathy towards other community members - -Examples of unacceptable behavior by participants include: - -* The use of sexualized language or imagery and unwelcome sexual attention or -advances -* Trolling, insulting/derogatory comments, and personal or political attacks -* Public or private harassment -* Publishing others' private information, such as a physical or electronic - address, without explicit permission -* Other conduct which could reasonably be considered inappropriate in a - professional setting - -## Our Responsibilities - -Project maintainers are responsible for clarifying the standards of acceptable -behavior and are expected to take appropriate and fair corrective action in -response to any instances of unacceptable behavior. - -Project maintainers have the right and responsibility to remove, edit, or -reject comments, commits, code, wiki edits, issues, and other contributions -that are not aligned to this Code of Conduct, or to ban temporarily or -permanently any contributor for other behaviors that they deem inappropriate, -threatening, offensive, or harmful. - -## Scope - -This Code of Conduct applies both within project spaces and in public spaces -when an individual is representing the project or its community. Examples of -representing a project or community include using an official project e-mail -address, posting via an official social media account, or acting as an appointed -representative at an online or offline event. Representation of a project may be -further defined and clarified by project maintainers. - -## Enforcement - -Instances of abusive, harassing, or otherwise unacceptable behavior may be -reported by contacting the project maintainer at . All -complaints will be reviewed and investigated and will result in a response that -is deemed necessary and appropriate to the circumstances. The project team is -obligated to maintain confidentiality with regard to the reporter of an incident. -Further details of specific enforcement policies may be posted separately. - -Project maintainers who do not follow or enforce the Code of Conduct in good -faith may face temporary or permanent repercussions as determined by other -members of the project's leadership. - -## Attribution - -This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, -available at [http://contributor-covenant.org/version/1/4][version] - -[homepage]: http://contributor-covenant.org -[version]: http://contributor-covenant.org/version/1/4/ diff --git a/lam/lib/3rdParty/composer/ramsey/uuid/CONTRIBUTING.md b/lam/lib/3rdParty/composer/ramsey/uuid/CONTRIBUTING.md deleted file mode 100644 index 4cde9b84..00000000 --- a/lam/lib/3rdParty/composer/ramsey/uuid/CONTRIBUTING.md +++ /dev/null @@ -1,75 +0,0 @@ -# Contributing - -Contributions are welcome. We accept pull requests on [GitHub](https://github.com/ramsey/uuid). - -This project adheres to a [Contributor Code of Conduct](https://github.com/ramsey/uuid/blob/master/CODE_OF_CONDUCT.md). By participating in this project and its community, you are expected to uphold this code. - -## Team members - -* [Ben Ramsey](https://github.com/ramsey) - original author and maintainer -* [Marijn Huizendveld](https://github.com/marijn) - contributor, author of UUID type definition for Doctrine DBAL -* [Thibaud Fabre](https://github.com/aztech-dev) - contributor, lead developer for version 3.0.0 re-architecture - -## Communication Channels - -You can find help and discussion in the following places: - -* GitHub Issues: -* Wiki: - -## Reporting Bugs - -Bugs are tracked in our project's [issue tracker](https://github.com/ramsey/uuid/issues). - -When submitting a bug report, please include enough information for us to reproduce the bug. A good bug report includes the following sections: - -* Expected outcome -* Actual outcome -* Steps to reproduce, including sample code -* Any other information that will help us debug and reproduce the issue, including stack traces, system/environment information, and screenshots - -**Please do not include passwords or any personally identifiable information in your bug report and sample code.** - -## Fixing Bugs - -We welcome pull requests to fix bugs! - -If you see a bug report that you'd like to fix, please feel free to do so. Following the directions and guidelines described in the "Adding New Features" section below, you may create bugfix branches and send us pull requests. - -## Adding New Features - -If you have an idea for a new feature, it's a good idea to check out our [issues](https://github.com/ramsey/uuid/issues) or active [pull requests](https://github.com/ramsey/uuid/pulls) first to see if the feature is already being worked on. If not, feel free to submit an issue first, asking whether the feature is beneficial to the project. This will save you from doing a lot of development work only to have your feature rejected. We don't enjoy rejecting your hard work, but some features just don't fit with the goals of the project. - -When you do begin working on your feature, here are some guidelines to consider: - -* Your pull request description should clearly detail the changes you have made. We will use this description to add to our CHANGELOG. If there is no description or it does not adequately describe your feature, we will ask you to update the description. -* We following the **[PSR-2 coding standard](http://www.php-fig.org/psr/psr-2/)**. Please ensure your code does, too. -* Please **write tests** for any new features you add. -* Please **ensure that tests pass** before submitting your pull request. We have Travis CI automatically running tests for pull requests. However, running the tests locally will help save time. -* **Use topic/feature branches.** Please do not ask us to pull from your master branch. -* **Submit one feature per pull request.** If you have multiple features you wish to submit, please break them up into separate pull requests. -* **Send coherent history**. Make sure each individual commit in your pull request is meaningful. If you had to make multiple intermediate commits while developing, please squash them before submitting. - -## Running Tests - -The following tests must pass before we will accept a pull request. If any of these do not pass, it will result in a complete build failure. Before you can run these, be sure to `composer install`. - -``` -composer test -``` - -### Locally Test With Emulated MIPS Architecture - -The following commands use [Vagrant](https://www.vagrantup.com/) to start an Ubuntu VM, install necessary dependencies, and then run the `tools/run-tests.sh` script that will download a Docker image emulating the MIPS architecture. This is especially helpful for testing UUID generation in a big-endian environment. - -``` -vagrant init ubuntu/trusty64 -vagrant up -vagrant ssh -sudo apt-get install docker.io qemu-user-static php5-cli php5-curl -cd /vagrant -curl -sS https://getcomposer.org/installer | php -php composer.phar install --no-interaction --prefer-dist -mkdir -p build/logs -ARCH=mips PHP_VERSION=5.6.14 TRAVIS_BUILD_DIR=/vagrant ./tools/run-tests.sh -``` diff --git a/lam/lib/3rdParty/composer/ramsey/uuid/LICENSE b/lam/lib/3rdParty/composer/ramsey/uuid/LICENSE index 753a4c9c..f6f7e804 100644 --- a/lam/lib/3rdParty/composer/ramsey/uuid/LICENSE +++ b/lam/lib/3rdParty/composer/ramsey/uuid/LICENSE @@ -1,4 +1,6 @@ -Copyright (c) 2012-2018 Ben Ramsey +MIT License + +Copyright (c) 2012-2019 Ben Ramsey Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal @@ -7,13 +9,13 @@ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/lam/lib/3rdParty/composer/ramsey/uuid/README.md b/lam/lib/3rdParty/composer/ramsey/uuid/README.md index b6557abb..95d4c21c 100644 --- a/lam/lib/3rdParty/composer/ramsey/uuid/README.md +++ b/lam/lib/3rdParty/composer/ramsey/uuid/README.md @@ -1,31 +1,47 @@ # ramsey/uuid -_NOTICE: Formerly known as `rhumsaa/uuid`, The package and namespace names have changed to `ramsey/uuid` and `Ramsey\Uuid`, respectively._ +*NOTICE: Formerly known as `rhumsaa/uuid`, The package and namespace names have +changed to `ramsey/uuid` and `Ramsey\Uuid`, respectively.* [![Source Code][badge-source]][source] [![Latest Version][badge-release]][release] [![Software License][badge-license]][license] +[![PHP Version][badge-php]][php] [![Build Status][badge-build]][build] [![Coverage Status][badge-coverage]][coverage] [![Total Downloads][badge-downloads]][downloads] -ramsey/uuid is a PHP 5.4+ library for generating and working with [RFC 4122][rfc4122] version 1, 3, 4, and 5 universally unique identifiers (UUID). +ramsey/uuid is a PHP 5.4+ library for generating and working with +[RFC 4122][rfc4122] version 1, 3, 4, and 5 universally unique identifiers +(UUID). -This project adheres to a [Contributor Code of Conduct][conduct]. By participating in this project and its community, you are expected to uphold this code. - - -## About +This project adheres to a [Contributor Code of Conduct][conduct]. By +participating in this project and its community, you are expected to uphold this +code. From [Wikipedia](http://en.wikipedia.org/wiki/Universally_unique_identifier): -> The intent of UUIDs is to enable distributed systems to uniquely identify information without significant central coordination. In this context the word unique should be taken to mean "practically unique" rather than "guaranteed unique". Since the identifiers have a finite size, it is possible for two differing items to share the same identifier. The identifier size and generation process need to be selected so as to make this sufficiently improbable in practice. Anyone can create a UUID and use it to identify something with reasonable confidence that the same identifier will never be unintentionally created by anyone to identify something else. Information labeled with UUIDs can therefore be later combined into a single database without needing to resolve identifier (ID) conflicts. +> The intent of UUIDs is to enable distributed systems to uniquely identify +> information without significant central coordination. In this context the word +> unique should be taken to mean "practically unique" rather than "guaranteed +> unique". Since the identifiers have a finite size, it is possible for two +> differing items to share the same identifier. The identifier size and +> generation process need to be selected so as to make this sufficiently +> improbable in practice. Anyone can create a UUID and use it to identify +> something with reasonable confidence that the same identifier will never be +> unintentionally created by anyone to identify something else. Information +> labeled with UUIDs can therefore be later combined into a single database +> without needing to resolve identifier (ID) conflicts. -Much inspiration for this library came from the [Java][javauuid] and [Python][pyuuid] UUID libraries. +Much inspiration for this library came from the [Java][javauuid] and +[Python][pyuuid] UUID libraries. ## Installation -The preferred method of installation is via [Packagist][] and [Composer][]. Run the following command to install the package and add it as a requirement to your project's `composer.json`: +The preferred method of installation is via [Composer][]. Run the following +command to install the package and add it as a requirement to your project's +`composer.json`: ```bash composer require ramsey/uuid @@ -34,23 +50,36 @@ composer require ramsey/uuid ## Upgrading from 2.x to 3.x -While we have made significant internal changes to the library, we have made every effort to ensure a seamless upgrade path from the 2.x series of this library to 3.x. +While we have made significant internal changes to the library, we have made +every effort to ensure a seamless upgrade path from the 2.x series of this +library to 3.x. -One major breaking change is the transition from the `Rhumsaa` root namespace to `Ramsey`. In most cases, all you will need is to change the namespace to `Ramsey` in your code, and everything will "just work." +One major breaking change is the transition from the `Rhumsaa` root namespace to +`Ramsey`. In most cases, all you will need is to change the namespace to +`Ramsey` in your code, and everything will "just work." Here are full details on the breaking changes to the public API of this library: -1. All namespace references of `Rhumsaa` have changed to `Ramsey`. Simply change the namespace to `Ramsey` in your code and everything should work. -2. The console application has moved to [ramsey/uuid-console](https://packagist.org/packages/ramsey/uuid-console). If using the console functionality, use Composer to require `ramsey/uuid-console`. -3. The Doctrine field type mapping has moved to [ramsey/uuid-doctrine](https://packagist.org/packages/ramsey/uuid-doctrine). If using the Doctrine functionality, use Composer to require `ramsey/uuid-doctrine`. +1. All namespace references of `Rhumsaa` have changed to `Ramsey`. Simply change + the namespace to `Ramsey` in your code and everything should work. +2. The console application has moved to + [ramsey/uuid-console](https://packagist.org/packages/ramsey/uuid-console). + If using the console functionality, use Composer to require + `ramsey/uuid-console`. +3. The Doctrine field type mapping has moved to + [ramsey/uuid-doctrine](https://packagist.org/packages/ramsey/uuid-doctrine). + If using the Doctrine functionality, use Composer to require + `ramsey/uuid-doctrine`. ## What to do if you see a "rhumsaa/uuid is abandoned" message -When installing your project's dependencies using Composer, you might see the following message: +When installing your project's dependencies using Composer, you might see the +following message: ``` -Package rhumsaa/uuid is abandoned, you should avoid using it. Use ramsey/uuid instead. +Package rhumsaa/uuid is abandoned, you should avoid using it. Use +ramsey/uuid instead. ``` Don't panic. Simply execute the following commands with Composer: @@ -60,32 +89,28 @@ composer remove rhumsaa/uuid composer require ramsey/uuid=^2.9 ``` -After doing so, you will have the latest ramsey/uuid package in the 2.x series, and there will be no need to modify any code; the namespace in the 2.x series is still `Rhumsaa`. +After doing so, you will have the latest ramsey/uuid package in the 2.x series, +and there will be no need to modify any code; the namespace in the 2.x series is +still `Rhumsaa`. ## Requirements -Some methods in this library have requirements due to integer size restrictions on 32-bit and 64-bit builds of PHP. A 64-bit build of PHP and the [Moontoast\Math][] library are recommended. However, this library is designed to work on 32-bit builds of PHP without Moontoast\Math, with some degraded functionality. Please check the API documentation for more information. +Some methods in this library have requirements due to integer size restrictions +on 32-bit and 64-bit builds of PHP. A 64-bit build of PHP and the +[Moontoast\Math][] library are recommended. However, this library is designed to +work on 32-bit builds of PHP without Moontoast\Math, with some degraded +functionality. Please check the API documentation for more information. -If a particular requirement is not present, then an `UnsatisfiedDependencyException` is thrown, allowing one to catch a bad call in an environment where the call is not supported and gracefully degrade. - - -## API documentation - -The [latest class API documentation][apidocs] is available online. - -This project uses [ApiGen](http://apigen.org/) to generate this documentation. To generate the documentation on your own, install dev dependencies and run the following command from the root of the project: - -``` -composer build-docs -``` - -This will generate documentation in the `build/apidocs/` folder. +If a particular requirement is not present, then an +`UnsatisfiedDependencyException` is thrown, allowing one to catch a bad call in +an environment where the call is not supported and gracefully degrade. ## Examples -See the [cookbook on the wiki][wiki-cookbook] for more examples and approaches to specific use-cases. +See the [cookbook on the wiki][wiki-cookbook] for more examples and approaches +to specific use-cases. ```php str_pad($components[0], 8, '0', STR_PAD_LEFT), 'time_mid' => str_pad($components[1], 4, '0', STR_PAD_LEFT), 'time_hi_and_version' => str_pad($components[2], 4, '0', STR_PAD_LEFT), 'clock_seq_hi_and_reserved' => str_pad(substr($components[3], 0, 2), 2, '0', STR_PAD_LEFT), 'clock_seq_low' => str_pad(substr($components[3], 2), 2, '0', STR_PAD_LEFT), 'node' => str_pad($components[4], 12, '0', STR_PAD_LEFT) - ); + ]; } } diff --git a/lam/lib/3rdParty/composer/ramsey/uuid/src/Codec/TimestampFirstCombCodec.php b/lam/lib/3rdParty/composer/ramsey/uuid/src/Codec/TimestampFirstCombCodec.php index 2c4ded89..270a1e75 100644 --- a/lam/lib/3rdParty/composer/ramsey/uuid/src/Codec/TimestampFirstCombCodec.php +++ b/lam/lib/3rdParty/composer/ramsey/uuid/src/Codec/TimestampFirstCombCodec.php @@ -13,6 +13,7 @@ */ namespace Ramsey\Uuid\Codec; +use Ramsey\Uuid\Exception\InvalidUuidStringException; use Ramsey\Uuid\UuidInterface; /** @@ -60,7 +61,7 @@ class TimestampFirstCombCodec extends StringCodec * @param string $encodedUuid * * @return UuidInterface - * @throws \Ramsey\Uuid\Exception\InvalidUuidStringException + * @throws InvalidUuidStringException */ public function decode($encodedUuid) { @@ -77,7 +78,7 @@ class TimestampFirstCombCodec extends StringCodec * @param string $bytes * * @return UuidInterface - * @throws \Ramsey\Uuid\Exception\InvalidUuidStringException + * @throws InvalidUuidStringException */ public function decodeBytes($bytes) { diff --git a/lam/lib/3rdParty/composer/ramsey/uuid/src/Codec/TimestampLastCombCodec.php b/lam/lib/3rdParty/composer/ramsey/uuid/src/Codec/TimestampLastCombCodec.php index 0cdd009a..240f613e 100644 --- a/lam/lib/3rdParty/composer/ramsey/uuid/src/Codec/TimestampLastCombCodec.php +++ b/lam/lib/3rdParty/composer/ramsey/uuid/src/Codec/TimestampLastCombCodec.php @@ -19,5 +19,4 @@ namespace Ramsey\Uuid\Codec; */ class TimestampLastCombCodec extends StringCodec { - } diff --git a/lam/lib/3rdParty/composer/ramsey/uuid/src/Converter/NumberConverterInterface.php b/lam/lib/3rdParty/composer/ramsey/uuid/src/Converter/NumberConverterInterface.php index 9505e8c6..b978e2e7 100644 --- a/lam/lib/3rdParty/composer/ramsey/uuid/src/Converter/NumberConverterInterface.php +++ b/lam/lib/3rdParty/composer/ramsey/uuid/src/Converter/NumberConverterInterface.php @@ -14,6 +14,8 @@ namespace Ramsey\Uuid\Converter; +use Ramsey\Uuid\Exception\UnsatisfiedDependencyException; + /** * NumberConverterInterface converts UUIDs from hexadecimal characters into * representations of integers and vice versa @@ -28,7 +30,7 @@ interface NumberConverterInterface * * @param string $hex The hexadecimal string representation to convert * @return mixed - * @throws \Ramsey\Uuid\Exception\UnsatisfiedDependencyException if `Moontoast\Math\BigNumber` is not present + * @throws UnsatisfiedDependencyException if `Moontoast\Math\BigNumber` is not present */ public function fromHex($hex); @@ -40,7 +42,7 @@ interface NumberConverterInterface * a true integer, a string integer, or a object representation that * this converter can understand * @return string Hexadecimal string - * @throws \Ramsey\Uuid\Exception\UnsatisfiedDependencyException if `Moontoast\Math\BigNumber` is not present + * @throws UnsatisfiedDependencyException if `Moontoast\Math\BigNumber` is not present */ public function toHex($integer); } diff --git a/lam/lib/3rdParty/composer/ramsey/uuid/src/Converter/Time/BigNumberTimeConverter.php b/lam/lib/3rdParty/composer/ramsey/uuid/src/Converter/Time/BigNumberTimeConverter.php index d47c8019..112f7227 100644 --- a/lam/lib/3rdParty/composer/ramsey/uuid/src/Converter/Time/BigNumberTimeConverter.php +++ b/lam/lib/3rdParty/composer/ramsey/uuid/src/Converter/Time/BigNumberTimeConverter.php @@ -43,16 +43,17 @@ class BigNumberTimeConverter implements TimeConverterInterface $usec = new BigNumber($microSeconds); $usec->multiply('10'); - $uuidTime->add($sec) + $uuidTime + ->add($sec) ->add($usec) ->add('122192928000000000'); $uuidTimeHex = sprintf('%016s', $uuidTime->convertToBase(16)); - return array( + return [ 'low' => substr($uuidTimeHex, 8), 'mid' => substr($uuidTimeHex, 4, 4), 'hi' => substr($uuidTimeHex, 0, 4), - ); + ]; } } diff --git a/lam/lib/3rdParty/composer/ramsey/uuid/src/Converter/Time/PhpTimeConverter.php b/lam/lib/3rdParty/composer/ramsey/uuid/src/Converter/Time/PhpTimeConverter.php index 6a9da74b..57c882db 100644 --- a/lam/lib/3rdParty/composer/ramsey/uuid/src/Converter/Time/PhpTimeConverter.php +++ b/lam/lib/3rdParty/composer/ramsey/uuid/src/Converter/Time/PhpTimeConverter.php @@ -38,10 +38,10 @@ class PhpTimeConverter implements TimeConverterInterface // UUID epoch 1582-10-15 00:00:00 and the Unix epoch 1970-01-01 00:00:00. $uuidTime = ($seconds * 10000000) + ($microSeconds * 10) + 0x01b21dd213814000; - return array( + return [ 'low' => sprintf('%08x', $uuidTime & 0xffffffff), 'mid' => sprintf('%04x', ($uuidTime >> 32) & 0xffff), 'hi' => sprintf('%04x', ($uuidTime >> 48) & 0x0fff), - ); + ]; } } diff --git a/lam/lib/3rdParty/composer/ramsey/uuid/src/Converter/TimeConverterInterface.php b/lam/lib/3rdParty/composer/ramsey/uuid/src/Converter/TimeConverterInterface.php index 382008ac..c851792f 100644 --- a/lam/lib/3rdParty/composer/ramsey/uuid/src/Converter/TimeConverterInterface.php +++ b/lam/lib/3rdParty/composer/ramsey/uuid/src/Converter/TimeConverterInterface.php @@ -14,6 +14,8 @@ namespace Ramsey\Uuid\Converter; +use Ramsey\Uuid\Exception\UnsatisfiedDependencyException; + /** * TimeConverterInterface provides facilities for converting parts of time into * representations that may be used in UUIDs @@ -27,7 +29,7 @@ interface TimeConverterInterface * @param string $seconds * @param string $microSeconds * @return string[] An array guaranteed to contain `low`, `mid`, and `high` keys - * @throws \Ramsey\Uuid\Exception\UnsatisfiedDependencyException if called on a 32-bit system and + * @throws UnsatisfiedDependencyException if called on a 32-bit system and * `Moontoast\Math\BigNumber` is not present * @link http://tools.ietf.org/html/rfc4122#section-4.2.2 */ diff --git a/lam/lib/3rdParty/composer/ramsey/uuid/src/DegradedUuid.php b/lam/lib/3rdParty/composer/ramsey/uuid/src/DegradedUuid.php index bcf0be80..26697615 100644 --- a/lam/lib/3rdParty/composer/ramsey/uuid/src/DegradedUuid.php +++ b/lam/lib/3rdParty/composer/ramsey/uuid/src/DegradedUuid.php @@ -14,6 +14,8 @@ namespace Ramsey\Uuid; +use DateTime; +use Moontoast\Math\BigNumber; use Ramsey\Uuid\Exception\UnsatisfiedDependencyException; use Ramsey\Uuid\Exception\UnsupportedOperationException; @@ -35,13 +37,13 @@ class DegradedUuid extends Uuid $time = $this->converter->fromHex($this->getTimestampHex()); - $ts = new \Moontoast\Math\BigNumber($time, 20); + $ts = new BigNumber($time, 20); $ts->subtract('122192928000000000'); $ts->divide('10000000.0'); $ts->round(); $unixTime = $ts->getValue(); - return new \DateTime("@{$unixTime}"); + return new DateTime("@{$unixTime}"); } /** diff --git a/lam/lib/3rdParty/composer/ramsey/uuid/src/Exception/InvalidUuidStringException.php b/lam/lib/3rdParty/composer/ramsey/uuid/src/Exception/InvalidUuidStringException.php index 0e480649..7df0e8cc 100644 --- a/lam/lib/3rdParty/composer/ramsey/uuid/src/Exception/InvalidUuidStringException.php +++ b/lam/lib/3rdParty/composer/ramsey/uuid/src/Exception/InvalidUuidStringException.php @@ -14,9 +14,11 @@ namespace Ramsey\Uuid\Exception; +use InvalidArgumentException; + /** * Thrown to indicate that the parsed UUID string is invalid. */ -class InvalidUuidStringException extends \InvalidArgumentException +class InvalidUuidStringException extends InvalidArgumentException { } diff --git a/lam/lib/3rdParty/composer/ramsey/uuid/src/Exception/UnsatisfiedDependencyException.php b/lam/lib/3rdParty/composer/ramsey/uuid/src/Exception/UnsatisfiedDependencyException.php index 8b5d5d08..89c73965 100644 --- a/lam/lib/3rdParty/composer/ramsey/uuid/src/Exception/UnsatisfiedDependencyException.php +++ b/lam/lib/3rdParty/composer/ramsey/uuid/src/Exception/UnsatisfiedDependencyException.php @@ -14,10 +14,12 @@ namespace Ramsey\Uuid\Exception; +use RuntimeException; + /** * Thrown to indicate that the requested operation has dependencies that have not * been satisfied. */ -class UnsatisfiedDependencyException extends \RuntimeException +class UnsatisfiedDependencyException extends RuntimeException { } diff --git a/lam/lib/3rdParty/composer/ramsey/uuid/src/Exception/UnsupportedOperationException.php b/lam/lib/3rdParty/composer/ramsey/uuid/src/Exception/UnsupportedOperationException.php index b371b682..43409470 100644 --- a/lam/lib/3rdParty/composer/ramsey/uuid/src/Exception/UnsupportedOperationException.php +++ b/lam/lib/3rdParty/composer/ramsey/uuid/src/Exception/UnsupportedOperationException.php @@ -14,9 +14,11 @@ namespace Ramsey\Uuid\Exception; +use RuntimeException; + /** * Thrown to indicate that the requested operation is not supported. */ -class UnsupportedOperationException extends \RuntimeException +class UnsupportedOperationException extends RuntimeException { } diff --git a/lam/lib/3rdParty/composer/ramsey/uuid/src/FeatureSet.php b/lam/lib/3rdParty/composer/ramsey/uuid/src/FeatureSet.php index 56a774ea..2027b9e0 100644 --- a/lam/lib/3rdParty/composer/ramsey/uuid/src/FeatureSet.php +++ b/lam/lib/3rdParty/composer/ramsey/uuid/src/FeatureSet.php @@ -289,7 +289,9 @@ class FeatureSet { if ($this->is64BitSystem()) { return new PhpTimeConverter(); - } elseif ($this->hasBigNumber()) { + } + + if ($this->hasBigNumber()) { return new BigNumberTimeConverter(); } diff --git a/lam/lib/3rdParty/composer/ramsey/uuid/src/Generator/CombGenerator.php b/lam/lib/3rdParty/composer/ramsey/uuid/src/Generator/CombGenerator.php index 7a948231..1d4a5f60 100644 --- a/lam/lib/3rdParty/composer/ramsey/uuid/src/Generator/CombGenerator.php +++ b/lam/lib/3rdParty/composer/ramsey/uuid/src/Generator/CombGenerator.php @@ -14,7 +14,10 @@ namespace Ramsey\Uuid\Generator; +use Exception; +use InvalidArgumentException; use Ramsey\Uuid\Converter\NumberConverterInterface; +use Ramsey\Uuid\Exception\UnsatisfiedDependencyException; /** * CombGenerator provides functionality to generate COMB (combined GUID/timestamp) @@ -53,14 +56,14 @@ class CombGenerator implements RandomGeneratorInterface * * @param integer $length The number of bytes of random binary data to generate * @return string A binary string - * @throws \Ramsey\Uuid\Exception\UnsatisfiedDependencyException if `Moontoast\Math\BigNumber` is not present - * @throws \InvalidArgumentException if length is not a positive integer - * @throws \Exception + * @throws UnsatisfiedDependencyException if `Moontoast\Math\BigNumber` is not present + * @throws InvalidArgumentException if length is not a positive integer + * @throws Exception */ public function generate($length) { if ($length < self::TIMESTAMP_BYTES || $length < 0) { - throw new \InvalidArgumentException('Length must be a positive integer.'); + throw new InvalidArgumentException('Length must be a positive integer.'); } $hash = ''; diff --git a/lam/lib/3rdParty/composer/ramsey/uuid/src/Generator/DefaultTimeGenerator.php b/lam/lib/3rdParty/composer/ramsey/uuid/src/Generator/DefaultTimeGenerator.php index c9969b3a..5c5ccb29 100644 --- a/lam/lib/3rdParty/composer/ramsey/uuid/src/Generator/DefaultTimeGenerator.php +++ b/lam/lib/3rdParty/composer/ramsey/uuid/src/Generator/DefaultTimeGenerator.php @@ -14,8 +14,11 @@ namespace Ramsey\Uuid\Generator; +use Exception; +use InvalidArgumentException; use Ramsey\Uuid\BinaryUtils; use Ramsey\Uuid\Converter\TimeConverterInterface; +use Ramsey\Uuid\Exception\UnsatisfiedDependencyException; use Ramsey\Uuid\Provider\NodeProviderInterface; use Ramsey\Uuid\Provider\TimeProviderInterface; @@ -72,10 +75,10 @@ class DefaultTimeGenerator implements TimeGeneratorInterface * could arise when the clock is set backwards in time or if the node ID * changes. * @return string A binary string - * @throws \Ramsey\Uuid\Exception\UnsatisfiedDependencyException if called on a 32-bit system and + * @throws UnsatisfiedDependencyException if called on a 32-bit system and * `Moontoast\Math\BigNumber` is not present - * @throws \InvalidArgumentException - * @throws \Exception if it was not possible to gather sufficient entropy + * @throws InvalidArgumentException + * @throws Exception if it was not possible to gather sufficient entropy */ public function generate($node = null, $clockSeq = null) { @@ -96,14 +99,14 @@ class DefaultTimeGenerator implements TimeGeneratorInterface $hex = vsprintf( '%08s%04s%04s%02s%02s%012s', - array( + [ $uuidTime['low'], $uuidTime['mid'], sprintf('%04x', $timeHi), sprintf('%02x', $clockSeqHi), sprintf('%02x', $clockSeq & 0xff), $node, - ) + ] ); return hex2bin($hex); @@ -115,8 +118,8 @@ class DefaultTimeGenerator implements TimeGeneratorInterface * * @param string|int $node A node value that may be used to override the node provider * @return string Hexadecimal representation of the node ID - * @throws \InvalidArgumentException - * @throws \Exception + * @throws InvalidArgumentException + * @throws Exception */ protected function getValidNode($node) { @@ -130,7 +133,7 @@ class DefaultTimeGenerator implements TimeGeneratorInterface } if (!ctype_xdigit($node) || strlen($node) > 12) { - throw new \InvalidArgumentException('Invalid node value'); + throw new InvalidArgumentException('Invalid node value'); } return strtolower(sprintf('%012s', $node)); diff --git a/lam/lib/3rdParty/composer/ramsey/uuid/src/Generator/MtRandGenerator.php b/lam/lib/3rdParty/composer/ramsey/uuid/src/Generator/MtRandGenerator.php index f58b7835..8d4b5f9b 100644 --- a/lam/lib/3rdParty/composer/ramsey/uuid/src/Generator/MtRandGenerator.php +++ b/lam/lib/3rdParty/composer/ramsey/uuid/src/Generator/MtRandGenerator.php @@ -18,6 +18,10 @@ namespace Ramsey\Uuid\Generator; * MtRandRandomGenerator provides functionality to generate strings of random * binary data using the `mt_rand()` PHP function * + * @deprecated The mt_rand() function is not a reliable source of randomness. + * The default RandomBytesGenerator, which uses the random_bytes() function, + * is recommended as the safest and most reliable source of randomness. + * This generator will be removed in ramsey/uuid 4.0.0. * @link http://php.net/mt_rand */ class MtRandGenerator implements RandomGeneratorInterface diff --git a/lam/lib/3rdParty/composer/ramsey/uuid/src/Generator/OpenSslGenerator.php b/lam/lib/3rdParty/composer/ramsey/uuid/src/Generator/OpenSslGenerator.php index e8ec6a4d..47abf9bb 100644 --- a/lam/lib/3rdParty/composer/ramsey/uuid/src/Generator/OpenSslGenerator.php +++ b/lam/lib/3rdParty/composer/ramsey/uuid/src/Generator/OpenSslGenerator.php @@ -21,6 +21,11 @@ namespace Ramsey\Uuid\Generator; * The use of this generator requires PHP to be compiled using the * `--with-openssl` option. * + * @deprecated The openssl_random_pseudo_bytes() function is not a reliable + * source of randomness. The default RandomBytesGenerator, which uses the + * random_bytes() function, is recommended as the safest and most reliable + * source of randomness. + * This generator will be removed in ramsey/uuid 4.0.0. * @link http://php.net/openssl_random_pseudo_bytes */ class OpenSslGenerator implements RandomGeneratorInterface diff --git a/lam/lib/3rdParty/composer/ramsey/uuid/src/Generator/RandomBytesGenerator.php b/lam/lib/3rdParty/composer/ramsey/uuid/src/Generator/RandomBytesGenerator.php index aaa285df..cc3d3798 100644 --- a/lam/lib/3rdParty/composer/ramsey/uuid/src/Generator/RandomBytesGenerator.php +++ b/lam/lib/3rdParty/composer/ramsey/uuid/src/Generator/RandomBytesGenerator.php @@ -14,6 +14,8 @@ namespace Ramsey\Uuid\Generator; +use Exception; + /** * RandomBytesGenerator provides functionality to generate strings of random * binary data using `random_bytes()` function in PHP 7+ or paragonie/random_compat @@ -28,7 +30,7 @@ class RandomBytesGenerator implements RandomGeneratorInterface * * @param integer $length The number of bytes of random binary data to generate * @return string A binary string - * @throws \Exception if it was not possible to gather sufficient entropy + * @throws Exception if it was not possible to gather sufficient entropy */ public function generate($length) { diff --git a/lam/lib/3rdParty/composer/ramsey/uuid/src/Generator/RandomGeneratorInterface.php b/lam/lib/3rdParty/composer/ramsey/uuid/src/Generator/RandomGeneratorInterface.php index 3a1bcae7..b791d60d 100644 --- a/lam/lib/3rdParty/composer/ramsey/uuid/src/Generator/RandomGeneratorInterface.php +++ b/lam/lib/3rdParty/composer/ramsey/uuid/src/Generator/RandomGeneratorInterface.php @@ -14,6 +14,10 @@ namespace Ramsey\Uuid\Generator; +use Exception; +use InvalidArgumentException; +use Ramsey\Uuid\Exception\UnsatisfiedDependencyException; + /** * RandomGeneratorInterface provides functionality to generate strings of random * binary data @@ -25,9 +29,9 @@ interface RandomGeneratorInterface * * @param integer $length The number of bytes of random binary data to generate * @return string A binary string - * @throws \Ramsey\Uuid\Exception\UnsatisfiedDependencyException if `Moontoast\Math\BigNumber` is not present - * @throws \InvalidArgumentException - * @throws \Exception if it was not possible to gather sufficient entropy + * @throws UnsatisfiedDependencyException if `Moontoast\Math\BigNumber` is not present + * @throws InvalidArgumentException + * @throws Exception if it was not possible to gather sufficient entropy */ public function generate($length); } diff --git a/lam/lib/3rdParty/composer/ramsey/uuid/src/Generator/RandomLibAdapter.php b/lam/lib/3rdParty/composer/ramsey/uuid/src/Generator/RandomLibAdapter.php index 25b54a83..5aa0e886 100644 --- a/lam/lib/3rdParty/composer/ramsey/uuid/src/Generator/RandomLibAdapter.php +++ b/lam/lib/3rdParty/composer/ramsey/uuid/src/Generator/RandomLibAdapter.php @@ -19,9 +19,9 @@ use RandomLib\Factory; /** * RandomLibAdapter provides functionality to generate strings of random - * binary data using the ircmaxell/random-lib library + * binary data using the paragonie/random-lib library * - * @link https://packagist.org/packages/ircmaxell/random-lib + * @link https://packagist.org/packages/paragonie/random-lib */ class RandomLibAdapter implements RandomGeneratorInterface { @@ -33,10 +33,10 @@ class RandomLibAdapter implements RandomGeneratorInterface /** * Constructs a `RandomLibAdapter` using a `RandomLib\Generator` * - * By default, if no `Generator` is passed in, this creates a medium-strength + * By default, if no `Generator` is passed in, this creates a high-strength * generator to use when generating random binary data. * - * @param Generator $generator An ircmaxell/random-lib `Generator` + * @param Generator $generator An paragonie/random-lib `Generator` */ public function __construct(Generator $generator = null) { @@ -45,7 +45,7 @@ class RandomLibAdapter implements RandomGeneratorInterface if ($this->generator === null) { $factory = new Factory(); - $this->generator = $factory->getMediumStrengthGenerator(); + $this->generator = $factory->getHighStrengthGenerator(); } } diff --git a/lam/lib/3rdParty/composer/ramsey/uuid/src/Generator/SodiumRandomGenerator.php b/lam/lib/3rdParty/composer/ramsey/uuid/src/Generator/SodiumRandomGenerator.php index 6b08f540..f4ccf859 100644 --- a/lam/lib/3rdParty/composer/ramsey/uuid/src/Generator/SodiumRandomGenerator.php +++ b/lam/lib/3rdParty/composer/ramsey/uuid/src/Generator/SodiumRandomGenerator.php @@ -18,6 +18,11 @@ namespace Ramsey\Uuid\Generator; * SodiumRandomGenerator provides functionality to generate strings of random * binary data using the PECL libsodium extension * + * @deprecated As of PHP 7.2.0, the libsodium extension is bundled with PHP, and + * the random_bytes() PHP function is now the recommended method for + * generating random byes. The default RandomBytesGenerator uses the + * random_bytes() function. + * This generator will be removed in ramsey/uuid 4.0.0. * @link http://pecl.php.net/package/libsodium * @link https://paragonie.com/book/pecl-libsodium */ diff --git a/lam/lib/3rdParty/composer/ramsey/uuid/src/Generator/TimeGeneratorInterface.php b/lam/lib/3rdParty/composer/ramsey/uuid/src/Generator/TimeGeneratorInterface.php index cb182ea0..27c74590 100644 --- a/lam/lib/3rdParty/composer/ramsey/uuid/src/Generator/TimeGeneratorInterface.php +++ b/lam/lib/3rdParty/composer/ramsey/uuid/src/Generator/TimeGeneratorInterface.php @@ -14,6 +14,10 @@ namespace Ramsey\Uuid\Generator; +use Exception; +use InvalidArgumentException; +use Ramsey\Uuid\Exception\UnsatisfiedDependencyException; + /** * TimeGeneratorInterface provides functionality to generate strings of binary * data for version 1 UUIDs based on a host ID, sequence number, and the current @@ -30,10 +34,10 @@ interface TimeGeneratorInterface * could arise when the clock is set backwards in time or if the node ID * changes. * @return string A binary string - * @throws \Ramsey\Uuid\Exception\UnsatisfiedDependencyException if called on a 32-bit system and + * @throws UnsatisfiedDependencyException if called on a 32-bit system and * `Moontoast\Math\BigNumber` is not present - * @throws \InvalidArgumentException - * @throws \Exception if it was not possible to gather sufficient entropy + * @throws InvalidArgumentException + * @throws Exception if it was not possible to gather sufficient entropy */ public function generate($node = null, $clockSeq = null); } diff --git a/lam/lib/3rdParty/composer/ramsey/uuid/src/Provider/Node/FallbackNodeProvider.php b/lam/lib/3rdParty/composer/ramsey/uuid/src/Provider/Node/FallbackNodeProvider.php index 289fddea..83488ab9 100644 --- a/lam/lib/3rdParty/composer/ramsey/uuid/src/Provider/Node/FallbackNodeProvider.php +++ b/lam/lib/3rdParty/composer/ramsey/uuid/src/Provider/Node/FallbackNodeProvider.php @@ -14,6 +14,7 @@ namespace Ramsey\Uuid\Provider\Node; +use Exception; use Ramsey\Uuid\Provider\NodeProviderInterface; /** @@ -43,7 +44,7 @@ class FallbackNodeProvider implements NodeProviderInterface * and returning the first non-empty value found * * @return string System node ID as a hexadecimal string - * @throws \Exception + * @throws Exception */ public function getNode() { diff --git a/lam/lib/3rdParty/composer/ramsey/uuid/src/Provider/Node/RandomNodeProvider.php b/lam/lib/3rdParty/composer/ramsey/uuid/src/Provider/Node/RandomNodeProvider.php index 76c570d7..79ec63cb 100644 --- a/lam/lib/3rdParty/composer/ramsey/uuid/src/Provider/Node/RandomNodeProvider.php +++ b/lam/lib/3rdParty/composer/ramsey/uuid/src/Provider/Node/RandomNodeProvider.php @@ -14,6 +14,7 @@ namespace Ramsey\Uuid\Provider\Node; +use Exception; use Ramsey\Uuid\Provider\NodeProviderInterface; /** @@ -28,15 +29,29 @@ class RandomNodeProvider implements NodeProviderInterface * Returns the system node ID * * @return string System node ID as a hexadecimal string - * @throws \Exception if it was not possible to gather sufficient entropy + * @throws Exception if it was not possible to gather sufficient entropy */ public function getNode() { - $node = hexdec(bin2hex(random_bytes(6))); + $nodeBytes = random_bytes(6); + + // Split the node bytes for math on 32-bit systems. + $nodeMsb = substr($nodeBytes, 0, 3); + $nodeLsb = substr($nodeBytes, 3); // Set the multicast bit; see RFC 4122, section 4.5. - $node = $node | 0x010000000000; + $nodeMsb = hex2bin( + str_pad( + dechex(hexdec(bin2hex($nodeMsb)) | 0x010000), + 6, + '0', + STR_PAD_LEFT + ) + ); - return str_pad(dechex($node), 12, '0', STR_PAD_LEFT); + // Recombine the node bytes. + $node = $nodeMsb . $nodeLsb; + + return str_pad(bin2hex($node), 12, '0', STR_PAD_LEFT); } } diff --git a/lam/lib/3rdParty/composer/ramsey/uuid/src/Provider/Node/SystemNodeProvider.php b/lam/lib/3rdParty/composer/ramsey/uuid/src/Provider/Node/SystemNodeProvider.php index ae6a09ea..57015133 100644 --- a/lam/lib/3rdParty/composer/ramsey/uuid/src/Provider/Node/SystemNodeProvider.php +++ b/lam/lib/3rdParty/composer/ramsey/uuid/src/Provider/Node/SystemNodeProvider.php @@ -36,7 +36,7 @@ class SystemNodeProvider implements NodeProviderInterface } $pattern = '/[^:]([0-9A-Fa-f]{2}([:-])[0-9A-Fa-f]{2}(\2[0-9A-Fa-f]{2}){4})[^:]/'; - $matches = array(); + $matches = []; // first try a linux specific way $node = $this->getSysfs(); @@ -67,7 +67,7 @@ class SystemNodeProvider implements NodeProviderInterface } ob_start(); - switch (strtoupper(substr(php_uname('a'), 0, 3))) { + switch (strtoupper(substr(constant('PHP_OS'), 0, 3))) { case 'WIN': passthru('ipconfig /all 2>&1'); break; @@ -95,15 +95,18 @@ class SystemNodeProvider implements NodeProviderInterface { $mac = false; - if (strtoupper(php_uname('s')) === 'LINUX') { + if (strtoupper(constant('PHP_OS')) === 'LINUX') { $addressPaths = glob('/sys/class/net/*/address', GLOB_NOSORT); if (empty($addressPaths)) { return false; } + $macs = []; array_walk($addressPaths, function ($addressPath) use (&$macs) { - $macs[] = file_get_contents($addressPath); + if (is_readable($addressPath)) { + $macs[] = file_get_contents($addressPath); + } }); $macs = array_map('trim', $macs); diff --git a/lam/lib/3rdParty/composer/ramsey/uuid/src/Provider/NodeProviderInterface.php b/lam/lib/3rdParty/composer/ramsey/uuid/src/Provider/NodeProviderInterface.php index 14f747be..b6f721fe 100644 --- a/lam/lib/3rdParty/composer/ramsey/uuid/src/Provider/NodeProviderInterface.php +++ b/lam/lib/3rdParty/composer/ramsey/uuid/src/Provider/NodeProviderInterface.php @@ -14,6 +14,8 @@ namespace Ramsey\Uuid\Provider; +use Exception; + /** * NodeProviderInterface provides functionality to get the node ID (or host ID * in the form of the system's MAC address) from a specific type of node provider @@ -24,7 +26,7 @@ interface NodeProviderInterface * Returns the system node ID * * @return string System node ID as a hexadecimal string - * @throws \Exception if it was not possible to gather sufficient entropy + * @throws Exception if it was not possible to gather sufficient entropy */ public function getNode(); } diff --git a/lam/lib/3rdParty/composer/ramsey/uuid/src/Provider/Time/FixedTimeProvider.php b/lam/lib/3rdParty/composer/ramsey/uuid/src/Provider/Time/FixedTimeProvider.php index a62d39c6..79a9d04e 100644 --- a/lam/lib/3rdParty/composer/ramsey/uuid/src/Provider/Time/FixedTimeProvider.php +++ b/lam/lib/3rdParty/composer/ramsey/uuid/src/Provider/Time/FixedTimeProvider.php @@ -14,6 +14,7 @@ namespace Ramsey\Uuid\Provider\Time; +use InvalidArgumentException; use Ramsey\Uuid\Provider\TimeProviderInterface; /** @@ -33,12 +34,12 @@ class FixedTimeProvider implements TimeProviderInterface * Constructs a `FixedTimeProvider` using the provided `$timestamp` * * @param int[] Array containing `sec` and `usec` components of a timestamp - * @throws \InvalidArgumentException if the `$timestamp` does not contain `sec` or `usec` components + * @throws InvalidArgumentException if the `$timestamp` does not contain `sec` or `usec` components */ public function __construct(array $timestamp) { if (!array_key_exists('sec', $timestamp) || !array_key_exists('usec', $timestamp)) { - throw new \InvalidArgumentException('Array must contain sec and usec keys.'); + throw new InvalidArgumentException('Array must contain sec and usec keys.'); } $this->fixedTime = $timestamp; diff --git a/lam/lib/3rdParty/composer/ramsey/uuid/src/Uuid.php b/lam/lib/3rdParty/composer/ramsey/uuid/src/Uuid.php index 45f9fa44..38fbd5ed 100644 --- a/lam/lib/3rdParty/composer/ramsey/uuid/src/Uuid.php +++ b/lam/lib/3rdParty/composer/ramsey/uuid/src/Uuid.php @@ -14,8 +14,13 @@ namespace Ramsey\Uuid; +use DateTime; +use Exception; +use InvalidArgumentException; use Ramsey\Uuid\Converter\NumberConverterInterface; use Ramsey\Uuid\Codec\CodecInterface; +use Ramsey\Uuid\Exception\InvalidUuidStringException; +use Ramsey\Uuid\Exception\UnsatisfiedDependencyException; use Ramsey\Uuid\Exception\UnsupportedOperationException; /** @@ -140,14 +145,14 @@ class Uuid implements UuidInterface * @var array * @see UuidInterface::getFieldsHex() */ - protected $fields = array( + protected $fields = [ 'time_low' => '00000000', 'time_mid' => '0000', 'time_hi_and_version' => '0000', 'clock_seq_hi_and_reserved' => '00', 'clock_seq_low' => '00', 'node' => '000000000000', - ); + ]; /** * The number converter to use for converting hex values to/from integers. @@ -229,7 +234,7 @@ class Uuid implements UuidInterface * * @param string $serialized * @link http://php.net/manual/en/class.serializable.php - * @throws \Ramsey\Uuid\Exception\InvalidUuidStringException + * @throws InvalidUuidStringException */ public function unserialize($serialized) { @@ -241,28 +246,32 @@ class Uuid implements UuidInterface public function compareTo(UuidInterface $other) { - $comparison = 0; - if ($this->getMostSignificantBitsHex() < $other->getMostSignificantBitsHex()) { - $comparison = -1; - } elseif ($this->getMostSignificantBitsHex() > $other->getMostSignificantBitsHex()) { - $comparison = 1; - } elseif ($this->getLeastSignificantBitsHex() < $other->getLeastSignificantBitsHex()) { - $comparison = -1; - } elseif ($this->getLeastSignificantBitsHex() > $other->getLeastSignificantBitsHex()) { - $comparison = 1; + return -1; } - return $comparison; + if ($this->getMostSignificantBitsHex() > $other->getMostSignificantBitsHex()) { + return 1; + } + + if ($this->getLeastSignificantBitsHex() < $other->getLeastSignificantBitsHex()) { + return -1; + } + + if ($this->getLeastSignificantBitsHex() > $other->getLeastSignificantBitsHex()) { + return 1; + } + + return 0; } public function equals($other) { - if (!($other instanceof UuidInterface)) { + if (!$other instanceof UuidInterface) { return false; } - return ($this->compareTo($other) == 0); + return $this->compareTo($other) == 0; } public function getBytes() @@ -319,8 +328,7 @@ class Uuid implements UuidInterface */ public function getClockSequence() { - return (($this->getClockSeqHiAndReserved() & 0x3f) << 8) - | $this->getClockSeqLow(); + return ($this->getClockSeqHiAndReserved() & 0x3f) << 8 | $this->getClockSeqLow(); } public function getClockSequenceHex() @@ -345,7 +353,7 @@ class Uuid implements UuidInterface $unixTime = ($this->getTimestamp() - 0x01b21dd213814000) / 1e7; $unixTime = number_format($unixTime, 0, '', ''); - return new \DateTime("@{$unixTime}"); + return new DateTime("@{$unixTime}"); } /** @@ -368,14 +376,14 @@ class Uuid implements UuidInterface */ public function getFields() { - return array( + return [ 'time_low' => $this->getTimeLow(), 'time_mid' => $this->getTimeMid(), 'time_hi_and_version' => $this->getTimeHiAndVersion(), 'clock_seq_hi_and_reserved' => $this->getClockSeqHiAndReserved(), 'clock_seq_low' => $this->getClockSeqLow(), 'node' => $this->getNode(), - ); + ]; } public function getFieldsHex() @@ -400,7 +408,7 @@ class Uuid implements UuidInterface * Returns the least significant 64 bits of this UUID's 128 bit value. * * @return mixed Converted representation of the unsigned 64-bit integer value - * @throws \Ramsey\Uuid\Exception\UnsatisfiedDependencyException if `Moontoast\Math\BigNumber` is not present + * @throws UnsatisfiedDependencyException if `Moontoast\Math\BigNumber` is not present */ public function getLeastSignificantBits() { @@ -421,7 +429,7 @@ class Uuid implements UuidInterface * Returns the most significant 64 bits of this UUID's 128 bit value. * * @return mixed Converted representation of the unsigned 64-bit integer value - * @throws \Ramsey\Uuid\Exception\UnsatisfiedDependencyException if `Moontoast\Math\BigNumber` is not present + * @throws UnsatisfiedDependencyException if `Moontoast\Math\BigNumber` is not present */ public function getMostSignificantBits() { @@ -568,17 +576,20 @@ class Uuid implements UuidInterface public function getVariant() { $clockSeq = $this->getClockSeqHiAndReserved(); + if (0 === ($clockSeq & 0x80)) { - $variant = self::RESERVED_NCS; - } elseif (0 === ($clockSeq & 0x40)) { - $variant = self::RFC_4122; - } elseif (0 === ($clockSeq & 0x20)) { - $variant = self::RESERVED_MICROSOFT; - } else { - $variant = self::RESERVED_FUTURE; + return self::RESERVED_NCS; } - return $variant; + if (0 === ($clockSeq & 0x40)) { + return self::RFC_4122; + } + + if (0 === ($clockSeq & 0x20)) { + return self::RESERVED_MICROSOFT; + } + + return self::RESERVED_FUTURE; } public function getVersion() @@ -624,8 +635,8 @@ class Uuid implements UuidInterface * * @param string $bytes * @return UuidInterface - * @throws \Ramsey\Uuid\Exception\InvalidUuidStringException - * @throws \InvalidArgumentException + * @throws InvalidUuidStringException + * @throws InvalidArgumentException */ public static function fromBytes($bytes) { @@ -637,7 +648,7 @@ class Uuid implements UuidInterface * * @param string $name A string that specifies a UUID * @return UuidInterface - * @throws \Ramsey\Uuid\Exception\InvalidUuidStringException + * @throws InvalidUuidStringException */ public static function fromString($name) { @@ -649,8 +660,8 @@ class Uuid implements UuidInterface * * @param string $integer String representation of 128-bit integer * @return UuidInterface - * @throws \Ramsey\Uuid\Exception\UnsatisfiedDependencyException if `Moontoast\Math\BigNumber` is not present - * @throws \Ramsey\Uuid\Exception\InvalidUuidStringException + * @throws UnsatisfiedDependencyException if `Moontoast\Math\BigNumber` is not present + * @throws InvalidUuidStringException */ public static function fromInteger($integer) { @@ -665,7 +676,7 @@ class Uuid implements UuidInterface */ public static function isValid($uuid) { - $uuid = str_replace(array('urn:', 'uuid:', '{', '}'), '', $uuid); + $uuid = str_replace(['urn:', 'uuid:', '{', '}'], '', $uuid); if ($uuid == self::NIL) { return true; @@ -687,10 +698,10 @@ class Uuid implements UuidInterface * could arise when the clock is set backwards in time or if the node ID * changes. * @return UuidInterface - * @throws \Ramsey\Uuid\Exception\UnsatisfiedDependencyException if called on a 32-bit system and + * @throws UnsatisfiedDependencyException if called on a 32-bit system and * `Moontoast\Math\BigNumber` is not present - * @throws \InvalidArgumentException - * @throws \Exception if it was not possible to gather sufficient entropy + * @throws InvalidArgumentException + * @throws Exception if it was not possible to gather sufficient entropy */ public static function uuid1($node = null, $clockSeq = null) { @@ -701,10 +712,10 @@ class Uuid implements UuidInterface * Generate a version 3 UUID based on the MD5 hash of a namespace identifier * (which is a UUID) and a name (which is a string). * - * @param string $ns The UUID namespace in which to create the named UUID + * @param string|UuidInterface $ns The UUID namespace in which to create the named UUID * @param string $name The name to create a UUID for * @return UuidInterface - * @throws \Ramsey\Uuid\Exception\InvalidUuidStringException + * @throws InvalidUuidStringException */ public static function uuid3($ns, $name) { @@ -715,9 +726,9 @@ class Uuid implements UuidInterface * Generate a version 4 (random) UUID. * * @return UuidInterface - * @throws \Ramsey\Uuid\Exception\UnsatisfiedDependencyException if `Moontoast\Math\BigNumber` is not present - * @throws \InvalidArgumentException - * @throws \Exception + * @throws UnsatisfiedDependencyException if `Moontoast\Math\BigNumber` is not present + * @throws InvalidArgumentException + * @throws Exception */ public static function uuid4() { @@ -728,10 +739,10 @@ class Uuid implements UuidInterface * Generate a version 5 UUID based on the SHA-1 hash of a namespace * identifier (which is a UUID) and a name (which is a string). * - * @param string $ns The UUID namespace in which to create the named UUID + * @param string|UuidInterface $ns The UUID namespace in which to create the named UUID * @param string $name The name to create a UUID for * @return UuidInterface - * @throws \Ramsey\Uuid\Exception\InvalidUuidStringException + * @throws InvalidUuidStringException */ public static function uuid5($ns, $name) { diff --git a/lam/lib/3rdParty/composer/ramsey/uuid/src/UuidFactory.php b/lam/lib/3rdParty/composer/ramsey/uuid/src/UuidFactory.php index 99644d4b..5a57b09b 100644 --- a/lam/lib/3rdParty/composer/ramsey/uuid/src/UuidFactory.php +++ b/lam/lib/3rdParty/composer/ramsey/uuid/src/UuidFactory.php @@ -15,6 +15,7 @@ namespace Ramsey\Uuid; use Ramsey\Uuid\Converter\NumberConverterInterface; +use Ramsey\Uuid\Exception\InvalidUuidStringException; use Ramsey\Uuid\Provider\NodeProviderInterface; use Ramsey\Uuid\Generator\RandomGeneratorInterface; use Ramsey\Uuid\Generator\TimeGeneratorInterface; @@ -274,7 +275,7 @@ class UuidFactory implements UuidFactoryInterface * @param string $hashFunction The hash function to use when hashing together * the namespace and name * @return UuidInterface - * @throws \Ramsey\Uuid\Exception\InvalidUuidStringException + * @throws InvalidUuidStringException */ protected function uuidFromNsAndName($ns, $name, $version, $hashFunction) { @@ -300,14 +301,14 @@ class UuidFactory implements UuidFactoryInterface $timeHi = BinaryUtils::applyVersion(substr($hash, 12, 4), $version); $clockSeqHi = BinaryUtils::applyVariant(hexdec(substr($hash, 16, 2))); - $fields = array( + $fields = [ 'time_low' => substr($hash, 0, 8), 'time_mid' => substr($hash, 8, 4), 'time_hi_and_version' => str_pad(dechex($timeHi), 4, '0', STR_PAD_LEFT), 'clock_seq_hi_and_reserved' => str_pad(dechex($clockSeqHi), 2, '0', STR_PAD_LEFT), 'clock_seq_low' => substr($hash, 18, 2), 'node' => substr($hash, 20, 12), - ); + ]; return $this->uuid($fields); } diff --git a/lam/lib/3rdParty/composer/ramsey/uuid/src/UuidFactoryInterface.php b/lam/lib/3rdParty/composer/ramsey/uuid/src/UuidFactoryInterface.php index a228f5bc..1c1651d6 100644 --- a/lam/lib/3rdParty/composer/ramsey/uuid/src/UuidFactoryInterface.php +++ b/lam/lib/3rdParty/composer/ramsey/uuid/src/UuidFactoryInterface.php @@ -14,6 +14,11 @@ namespace Ramsey\Uuid; +use Exception; +use InvalidArgumentException; +use Ramsey\Uuid\Exception\InvalidUuidStringException; +use Ramsey\Uuid\Exception\UnsatisfiedDependencyException; + /** * UuidFactoryInterface defines common functionality all `UuidFactory` instances * must implement @@ -29,10 +34,10 @@ interface UuidFactoryInterface * could arise when the clock is set backwards in time or if the node ID * changes. * @return UuidInterface - * @throws \Ramsey\Uuid\Exception\UnsatisfiedDependencyException if called on a 32-bit system and + * @throws UnsatisfiedDependencyException if called on a 32-bit system and * `Moontoast\Math\BigNumber` is not present - * @throws \InvalidArgumentException - * @throws \Exception if it was not possible to gather sufficient entropy + * @throws InvalidArgumentException + * @throws Exception if it was not possible to gather sufficient entropy */ public function uuid1($node = null, $clockSeq = null); @@ -40,10 +45,10 @@ interface UuidFactoryInterface * Generate a version 3 UUID based on the MD5 hash of a namespace identifier * (which is a UUID) and a name (which is a string). * - * @param string $ns The UUID namespace in which to create the named UUID + * @param string|UuidInterface $ns The UUID namespace in which to create the named UUID * @param string $name The name to create a UUID for * @return UuidInterface - * @throws \Ramsey\Uuid\Exception\InvalidUuidStringException + * @throws InvalidUuidStringException */ public function uuid3($ns, $name); @@ -51,9 +56,9 @@ interface UuidFactoryInterface * Generate a version 4 (random) UUID. * * @return UuidInterface - * @throws \Ramsey\Uuid\Exception\UnsatisfiedDependencyException if `Moontoast\Math\BigNumber` is not present - * @throws \InvalidArgumentException - * @throws \Exception + * @throws UnsatisfiedDependencyException if `Moontoast\Math\BigNumber` is not present + * @throws InvalidArgumentException + * @throws Exception */ public function uuid4(); @@ -61,10 +66,10 @@ interface UuidFactoryInterface * Generate a version 5 UUID based on the SHA-1 hash of a namespace * identifier (which is a UUID) and a name (which is a string). * - * @param string $ns The UUID namespace in which to create the named UUID + * @param string|UuidInterface $ns The UUID namespace in which to create the named UUID * @param string $name The name to create a UUID for * @return UuidInterface - * @throws \Ramsey\Uuid\Exception\InvalidUuidStringException + * @throws InvalidUuidStringException */ public function uuid5($ns, $name); @@ -73,8 +78,8 @@ interface UuidFactoryInterface * * @param string $bytes A 16-byte string representation of a UUID * @return UuidInterface - * @throws \Ramsey\Uuid\Exception\InvalidUuidStringException - * @throws \InvalidArgumentException if string has not 16 characters + * @throws InvalidUuidStringException + * @throws InvalidArgumentException if string has not 16 characters */ public function fromBytes($bytes); @@ -83,7 +88,7 @@ interface UuidFactoryInterface * * @param string $uuid A string representation of a UUID * @return UuidInterface - * @throws \Ramsey\Uuid\Exception\InvalidUuidStringException + * @throws InvalidUuidStringException */ public function fromString($uuid); @@ -96,8 +101,8 @@ interface UuidFactoryInterface * @param mixed $integer The integer to use when creating a `Uuid` from an * integer; may be of any type understood by the configured number converter * @return UuidInterface - * @throws \Ramsey\Uuid\Exception\UnsatisfiedDependencyException if `Moontoast\Math\BigNumber` is not present - * @throws \Ramsey\Uuid\Exception\InvalidUuidStringException + * @throws UnsatisfiedDependencyException if `Moontoast\Math\BigNumber` is not present + * @throws InvalidUuidStringException */ public function fromInteger($integer); } diff --git a/lam/lib/3rdParty/composer/ramsey/uuid/src/UuidInterface.php b/lam/lib/3rdParty/composer/ramsey/uuid/src/UuidInterface.php index ea3a46fb..42a3ad7f 100644 --- a/lam/lib/3rdParty/composer/ramsey/uuid/src/UuidInterface.php +++ b/lam/lib/3rdParty/composer/ramsey/uuid/src/UuidInterface.php @@ -14,14 +14,18 @@ namespace Ramsey\Uuid; +use DateTime; +use JsonSerializable; use Ramsey\Uuid\Converter\NumberConverterInterface; +use Ramsey\Uuid\Exception\UnsatisfiedDependencyException; use Ramsey\Uuid\Exception\UnsupportedOperationException; +use Serializable; /** * UuidInterface defines common functionality for all universally unique * identifiers (UUIDs) */ -interface UuidInterface extends \JsonSerializable, \Serializable +interface UuidInterface extends JsonSerializable, Serializable { /** * Compares this UUID to the specified UUID. @@ -121,9 +125,9 @@ interface UuidInterface extends \JsonSerializable, \Serializable * has version type 1. If this UUID is not a time-based UUID then * this method throws `UnsupportedOperationException`. * - * @return \DateTime A PHP DateTime representation of the date + * @return DateTime A PHP DateTime representation of the date * @throws UnsupportedOperationException If this UUID is not a version 1 UUID - * @throws \Ramsey\Uuid\Exception\UnsatisfiedDependencyException if called in a 32-bit system and + * @throws UnsatisfiedDependencyException if called in a 32-bit system and * `Moontoast\Math\BigNumber` is not present */ public function getDateTime(); @@ -133,7 +137,7 @@ interface UuidInterface extends \JsonSerializable, \Serializable * representation. * * @return mixed Converted representation of the unsigned 128-bit integer value - * @throws \Ramsey\Uuid\Exception\UnsatisfiedDependencyException if `Moontoast\Math\BigNumber` is not present + * @throws UnsatisfiedDependencyException if `Moontoast\Math\BigNumber` is not present */ public function getInteger(); diff --git a/lam/lib/3rdParty/composer/ramsey/uuid/src/functions.php b/lam/lib/3rdParty/composer/ramsey/uuid/src/functions.php new file mode 100644 index 00000000..b5db3418 --- /dev/null +++ b/lam/lib/3rdParty/composer/ramsey/uuid/src/functions.php @@ -0,0 +1,78 @@ + + * @license http://opensource.org/licenses/MIT MIT + */ + +namespace Ramsey\Uuid; + +use Exception; +use InvalidArgumentException; +use Ramsey\Uuid\Exception\InvalidUuidStringException; +use Ramsey\Uuid\Exception\UnsatisfiedDependencyException; + +/** + * Generate a version 1 UUID from a host ID, sequence number, and the current time. + * + * @param int|string|null $node A 48-bit number representing the hardware address + * This number may be represented as an integer or a hexadecimal string. + * @param int|null $clockSeq A 14-bit number used to help avoid duplicates that + * could arise when the clock is set backwards in time or if the node ID + * changes. + * @return string + * @throws UnsatisfiedDependencyException if called on a 32-bit system and + * `Moontoast\Math\BigNumber` is not present + * @throws InvalidArgumentException + * @throws Exception if it was not possible to gather sufficient entropy + */ +function v1($node = null, $clockSeq = null) +{ + return Uuid::uuid1($node, $clockSeq)->toString(); +} + +/** + * Generate a version 3 UUID based on the MD5 hash of a namespace identifier + * (which is a UUID) and a name (which is a string). + * + * @param string|UuidInterface $ns The UUID namespace in which to create the named UUID + * @param string $name The name to create a UUID for + * @return string + * @throws InvalidUuidStringException + */ +function v3($ns, $name) +{ + return Uuid::uuid3($ns, $name)->toString(); +} + +/** + * Generate a version 4 (random) UUID. + * + * @return string + * @throws UnsatisfiedDependencyException if `Moontoast\Math\BigNumber` is not present + * @throws InvalidArgumentException + * @throws Exception + */ +function v4() +{ + return Uuid::uuid4()->toString(); +} + +/** + * Generate a version 5 UUID based on the SHA-1 hash of a namespace + * identifier (which is a UUID) and a name (which is a string). + * + * @param string|UuidInterface $ns The UUID namespace in which to create the named UUID + * @param string $name The name to create a UUID for + * @return string + * @throws InvalidUuidStringException + */ +function v5($ns, $name) +{ + return Uuid::uuid5($ns, $name)->toString(); +} diff --git a/lam/lib/3rdParty/composer/symfony/mime/LICENSE b/lam/lib/3rdParty/composer/symfony/mime/LICENSE index 9a9a61b1..d53be683 100644 --- a/lam/lib/3rdParty/composer/symfony/mime/LICENSE +++ b/lam/lib/3rdParty/composer/symfony/mime/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2010-2019 Fabien Potencier +Copyright (c) 2010-2020 Fabien Potencier Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/lam/lib/3rdParty/composer/symfony/mime/Part/Multipart/FormDataPart.php b/lam/lib/3rdParty/composer/symfony/mime/Part/Multipart/FormDataPart.php index 88aa1a31..68386203 100644 --- a/lam/lib/3rdParty/composer/symfony/mime/Part/Multipart/FormDataPart.php +++ b/lam/lib/3rdParty/composer/symfony/mime/Part/Multipart/FormDataPart.php @@ -56,11 +56,20 @@ final class FormDataPart extends AbstractMultipartPart private function prepareFields(array $fields): array { $values = []; - array_walk_recursive($fields, function ($item, $key) use (&$values) { - if (!\is_array($item)) { - $values[] = $this->preparePart($key, $item); + + $prepare = function ($item, $key, $root = null) use (&$values, &$prepare) { + $fieldName = $root ? sprintf('%s[%s]', $root, $key) : $key; + + if (\is_array($item)) { + array_walk($item, $prepare, $fieldName); + + return; } - }); + + $values[] = $this->preparePart($fieldName, $item); + }; + + array_walk($fields, $prepare); return $values; } From aa0228c34c7370e355ddf46078035a6b0d872ed6 Mon Sep 17 00:00:00 2001 From: Roland Gruber Date: Sat, 15 Feb 2020 14:11:40 +0100 Subject: [PATCH 2/7] use Horde imap library --- lam/lib/modules/imapAccess.inc | 243 ++++++++++++++++++--------------- 1 file changed, 136 insertions(+), 107 deletions(-) diff --git a/lam/lib/modules/imapAccess.inc b/lam/lib/modules/imapAccess.inc index f2e1dc71..3df496b8 100644 --- a/lam/lib/modules/imapAccess.inc +++ b/lam/lib/modules/imapAccess.inc @@ -3,7 +3,7 @@ This code is part of LDAP Account Manager (http://www.ldap-account-manager.org/) Copyright (C) 2010 - 2011 Pavel Pozdniak - 2010 - 2019 Roland Gruber + 2010 - 2020 Roland Gruber This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -163,6 +163,7 @@ class imapAccess extends baseModule { $this->messages['managemailbox'][7] = array('ERROR', _('Cannot update quota.')); $this->messages['managemailbox'][8] = array('ERROR', _('Wrong quota format. Quota must be numeric.')); $this->messages['managemailbox'][9] = array('ERROR', _('Account %s:') . ' imapAccess_quota', _('Wrong quota format. Quota must be numeric.')); + $this->messages['managemailbox'][10] = array('ERROR', _('Cannot read quota.')); $this->messages['createMailbox'][0] = array('ERROR', _('Account %s:') . ' imapAccess_createMailbox', _('This value can only be "true" or "false".')); } @@ -235,12 +236,13 @@ class imapAccess extends baseModule { $return->addLabel(new htmlOutputText(_('Email address'))); $return->addField(new htmlOutputText($this->email)); - $imap_server_address = $this->getServerAddress(); $imap_admin_user = $this->getAdminUser(); $imap_admin_password = $this->getAdminPassword(); - $mbox = @imap_open("{" . $imap_server_address . "}", $imap_admin_user, $imap_admin_password, OP_HALFOPEN, 1); - if (!$mbox) { - return $this->display_html_password(); + try { + $client = $this->connect($imap_admin_user, $imap_admin_password); + } + catch (LAMException $e) { + return $this->display_html_password(new htmlStatusMessage('ERROR', $e->getTitle(), $e->getMessage())); } $return->addLabel(new htmlOutputText(_('Mailbox'))); @@ -250,9 +252,9 @@ class imapAccess extends baseModule { $return->addField($mailboxGroup); $return->addVerticalSpacer('2rem'); - $list = imap_list($mbox, "{" . $imap_server_address . "}", $prefix . $this->getSep() . $this->user); + $list = $client->listMailboxes($prefix . $this->getSep() . $this->user, Horde_Imap_Client::MBOX_ALL); if (is_array($list) && sizeof($list) == 1) { - $this->renderQuotasForMailbox($return, $mbox, $prefix . $this->getSep() . $this->user); + $this->renderQuotasForMailbox($return, $client, $prefix . $this->getSep() . $this->user); $return->addVerticalSpacer('2rem'); $return->add(new htmlButton('deleteMailbox', _('Delete mailbox')), 12, 12, 12, 'text-center'); } @@ -269,21 +271,20 @@ class imapAccess extends baseModule { $return->add($createButton, 12, 12, 12, 'text-center'); } } - imap_close($mbox); + $client->logout(); return $return; } /** * Returns the HTML meta data for the password page. * + * @param htmlStatusMessage|null $message status message * @return array HTML meta data */ - function display_html_password() { + function display_html_password($message = null) { $return = new htmlResponsiveRow(); - if($this->moduleSettings['ImapAccess_ImapAdminPasswordSelect'][0] == "lam_user_pass"){ - $message = $this->messages['managemailbox'][6]; - $messageElement = new htmlStatusMessage($message[0], $message[1]); - $return->add($messageElement, 12); + if ($message !== null) { + $return->add($message, 12); $return->addVerticalSpacer('1rem'); } $passwordInput = new htmlResponsiveInputField(_("Password of IMAP admin user"), 'ImapAdminPassword', '', 'ImapAdminPassword_Sess'); @@ -299,23 +300,36 @@ class imapAccess extends baseModule { /** * Display the mailbox quota. * - * @param htmlTable $container structure that contained information to be displayed - * @param stream $mbox stream to open IMAP session + * @param htmlResponsiveRow $container structure that contained information to be displayed + * @param Horde_Imap_Client_Socket $client IMAP client * @param String $username user name to connect to IMAP server * @return htmlResponsiveRow table with added information about user quotas or controls to add quota */ - function renderQuotasForMailbox($container, $mbox, $username) { + function renderQuotasForMailbox($container, $client, $username) { if (($this->profileQuotaLimit != null) && ($this->profileQuotaLimit != '')) { - @imap_set_quota($mbox, $username, $this->profileQuotaLimit); + $client->setQuota($username, array('storage' => $this->profileQuotaLimit)); $this->profileQuotaLimit = null; } - $quota_values = @imap_get_quota($mbox, $username); - imap_errors(); - if (is_array($quota_values) && (sizeof($quota_values) > 0)) { - if (isset($quota_values['STORAGE']) && is_array($quota_values['STORAGE'])) { - $quotaLimit = $quota_values['STORAGE']['limit']; - $container->addLabel(new htmlOutputText(_("Current usage (kB)"))); - $container->addField(new htmlOutputText($quota_values['STORAGE']['usage']), true); + try { + $quotaRoot = $client->getQuotaRoot($username); + $quota_values = array(); + if (!empty($quotaRoot)) { + $quota_values = $client->getQuota($username); + } + if (!empty($quota_values)) { + if (isset($quota_values['storage']) && is_array($quota_values['storage'])) { + $quotaLimit = $quota_values['storage']['limit']; + $container->addLabel(new htmlOutputText(_("Current usage (kB)"))); + $container->addField(new htmlOutputText($quota_values['storage']['usage']), true); + $quotaLimitInput = new htmlResponsiveInputField(_("Quota limit (kB)"), 'ImapUserQuotaLimit', $quotaLimit, 'ImapUserQuotaLimit'); + $container->add($quotaLimitInput, 12); + $container->addVerticalSpacer('2rem'); + $container->add(new htmlButton('updateQuota', _('Update quota')), 12, 12, 12, 'text-center'); + $container->addVerticalSpacer('1rem'); + } + } + else { + $quotaLimit = ""; $quotaLimitInput = new htmlResponsiveInputField(_("Quota limit (kB)"), 'ImapUserQuotaLimit', $quotaLimit, 'ImapUserQuotaLimit'); $container->add($quotaLimitInput, 12); $container->addVerticalSpacer('2rem'); @@ -323,13 +337,8 @@ class imapAccess extends baseModule { $container->addVerticalSpacer('1rem'); } } - else { - $quotaLimit = ""; - $quotaLimitInput = new htmlResponsiveInputField(_("Quota limit (kB)"), 'ImapUserQuotaLimit', $quotaLimit, 'ImapUserQuotaLimit'); - $container->add($quotaLimitInput, 12); - $container->addVerticalSpacer('2rem'); - $container->add(new htmlButton('updateQuota', _('Update quota')), 12, 12, 12, 'text-center'); - $container->addVerticalSpacer('1rem'); + catch (Exception $e) { + $container->add(new htmlStatusMessage('ERROR', $this->messages['managemailbox'][10][1], $e->getMessage()), 12); } return $container; } @@ -347,19 +356,14 @@ class imapAccess extends baseModule { } $prefix = $this->getMailboxPrefix(); - $imap_server_address = $this->getServerAddress(); - $imap_admin_user = $this->getAdminUser(); - + $user = $this->getAdminUser(); if (isset($_POST['ImapAdminPassword']) && isset($_POST['enterPasswordButton'])) { $errors = $this->doLogin(); } + $password = $this->getAdminPassword(); - $imap_admin_password = $this->getAdminPassword(); - $imapConnection = 0;//default state is false - if ($imap_admin_password) { - $imapConnection = @imap_open("{" . $imap_server_address . "}", $imap_admin_user, $imap_admin_password, OP_HALFOPEN, 1); - } - if ($imapConnection) { + try { + $client = $this->connect($user, $password); $this->extractUserAndEmail(); $email_domain = substr(strstr($this->email, '@'), 1); @@ -368,27 +372,32 @@ class imapAccess extends baseModule { $errors[] = $this->messages['managemailbox'][4]; } else { - if (!imap_setacl($imapConnection, $prefix . $this->getSep() . $this->user, $imap_admin_user, "c")) { - $errors[] = $this->messages['managemailbox'][0]; + $root = $prefix . $this->getSep() . $this->user; + try { + $client->setACL($root, $user, array('rights' => 'c', 'action' => 'add')); + $client->deleteMailbox($root); } - - $delete_mailbox_arg = "{" . $imap_server_address . "}" . $prefix . $this->getSep() . $this->user; - if (!@imap_deletemailbox($imapConnection, $delete_mailbox_arg)) { - $errors[] = $this->messages['managemailbox'][1]; + catch (Exception $e) { + $message = $this->messages['managemailbox'][1]; + $message[] = $e->getMessage(); + $errors[] = $message; } } } if (isset($_POST['createMailbox'])) { - $createMessages = $this->createMailbox($imapConnection, $this->user, $email_domain); + $createMessages = $this->createMailbox($client, $this->user, $email_domain); $errors = array_merge($errors, $createMessages); } if (isset($_POST['updateQuota'])) { $quota = $_POST['ImapUserQuotaLimit']; - $quotaMessages = $this->setQuota($imapConnection, $this->user, $email_domain, $quota); + $quotaMessages = $this->setQuota($client, $this->user, $email_domain, $quota); $errors = array_merge($errors, $quotaMessages); } - imap_close($imapConnection); + $client->logout(); + } + catch (LAMException $e) { + return array(array('ERROR', $e->getTitle(), $e->getMessage())); } // Return error-messages return $errors; @@ -397,44 +406,40 @@ class imapAccess extends baseModule { /** * Creates the mailbox for a user. * - * @param handle $imapConnection IMAP connection + * @param Horde_Imap_Client_Socket $client IMAP client * @param string $userName user name * @param string $email_domain email domain * @return array error messages */ - private function createMailbox($imapConnection, $userName, $email_domain) { + private function createMailbox($client, $userName, $email_domain) { $errors = array(); - $imap_server_address = $this->getServerAddress(); $prefix = $this->getMailboxPrefix(); if ($this->isWrongDomain($email_domain)) { $errors[] = $this->messages['managemailbox'][4]; } else { - $create_mailbox_arg = "{" . $imap_server_address . "}" . $prefix . $this->getSep() . $userName; - logNewMessage(LOG_DEBUG, 'Creating mailbox: ' . $create_mailbox_arg); - if (imap_createmailbox($imapConnection, imap_utf7_encode($create_mailbox_arg))) { + $root = $prefix . $this->getSep() . $userName; + logNewMessage(LOG_DEBUG, 'Creating mailbox: ' . $root); + try { + $client->createMailbox($root); logNewMessage(LOG_DEBUG, 'Mailbox created'); - $list = imap_list($imapConnection, "{" . $imap_server_address . "}", $prefix . $this->getSep() . $userName); - if (!is_array($list) || (sizeof($list) != 1)) { + $list = $client->listMailboxes($root, Horde_Imap_Client::MBOX_ALL); + if (empty($list)) { $errors[] = $this->messages['managemailbox'][3]; + return $errors; } // create initial folders foreach ($this->getInitialFolders() as $folder) { - $folderCommand = $create_mailbox_arg . $this->getSep() . $folder; - logNewMessage(LOG_DEBUG, 'Creating folder: ' . $folderCommand); - $created = imap_createmailbox($imapConnection, imap_utf7_encode($folderCommand)); - if (!$created) { - $error = $this->messages['managemailbox'][2]; - $error[] = htmlspecialchars($folder); - $errors[] = $error; - } - else { - logNewMessage(LOG_DEBUG, 'Folder created'); - } + $fullFolderName = $root . $this->getSep() . $folder; + logNewMessage(LOG_DEBUG, 'Creating folder: ' . $fullFolderName); + $client->createMailbox($fullFolderName); + logNewMessage(LOG_DEBUG, 'Folder created: ' . $fullFolderName); } } - else { - $errors[] = $this->messages['managemailbox'][2]; + catch (Exception $e) { + $message = $this->messages['managemailbox'][2]; + $message[] = $e->getMessage(); + $errors[] = $message; } } return $errors; @@ -443,33 +448,38 @@ class imapAccess extends baseModule { /** * Sets the mailbox quota for a user. * - * @param handle $imapConnection IMAP connection + * @param Horde_Imap_Client_Socket $client IMAP client * @param string $userName user name * @param string $email_domain email domain * @param string $quota mailbox quota * @return array error messages */ - private function setQuota($imapConnection, $userName, $email_domain, $quota) { + private function setQuota($client, $userName, $email_domain, $quota) { $prefix = $this->getMailboxPrefix(); $errors = array(); + $root = $prefix . $this->getSep() . $userName; if ($this->isWrongDomain($email_domain)) { $errors[] = $this->messages['managemailbox'][4]; } else { if ($quota == '') { -/* deactivated because -1 is not accepted, no possibility to remove quota - * if (!imap_set_quota($mbox, $prefix . $this->getSep() . $email_username, -1)) { + try { + $client->setQuota($root, array('storage' => '-1')); + } + catch (Exception $e) { $message = $this->messages['managemailbox'][7]; - $message[] = imap_last_error(); + $message[] = $e->getMessage(); $errors[] = $message; - }*/ + } } - elseif (get_preg($quota, 'digit')){ - $root = $prefix . $this->getSep() . $userName; + elseif (get_preg($quota, 'digit')) { logNewMessage(LOG_DEBUG, 'Setting quota ' . $quota . ' for ' . $root); - if (!imap_set_quota($imapConnection, $root, $quota)) { + try { + $client->setQuota($root, array('storage' => $quota)); + } + catch (Exception $e) { $message = $this->messages['managemailbox'][7]; - $message[] = imap_last_error(); + $message[] = $e->getMessage(); $errors[] = $message; } } @@ -606,18 +616,18 @@ class imapAccess extends baseModule { */ private function getAdminPassword() { //perform admin password - $imap_admin_password = null; //default value is null, it can be changed during the work + $password = null; //default value is null, it can be changed during the work if (isset($_SESSION['imapAdmPass'])) { - $imap_admin_password = lamDecrypt($_SESSION['imapAdmPass']); + $password = lamDecrypt($_SESSION['imapAdmPass']); } elseif (isset($this->moduleSettings['ImapAccess_ImapAdminPasswordSelect'][0]) && ($this->moduleSettings['ImapAccess_ImapAdminPasswordSelect'][0] == "lam_user_pass")) { - $imap_admin_password = $_SESSION['ldap']->getPassword(); + $password = $_SESSION['ldap']->getPassword(); } elseif (!empty($this->moduleSettings['ImapAccess_ImapAdminPasswordSelect'][0]) && ($this->moduleSettings['ImapAccess_ImapAdminPasswordSelect'][0] == "config") && !empty($this->moduleSettings['ImapAccess_ImapAdminPassword'][0])) { - $imap_admin_password = deobfuscateText($this->moduleSettings['ImapAccess_ImapAdminPassword'][0]); + $password = deobfuscateText($this->moduleSettings['ImapAccess_ImapAdminPassword'][0]); } - return $imap_admin_password; + return $password; } /** @@ -627,18 +637,17 @@ class imapAccess extends baseModule { */ function doLogin() { $errors = array(); - $imap_server_address = $this->getServerAddress(); - $imap_admin_user = $this->getAdminUser(); + $user = $this->getAdminUser(); if (isset($_POST['ImapAdminPassword']) && $_POST['ImapAdminPassword'] != "") { - $imap_admin_password = $_POST['ImapAdminPassword']; - $mbox = @imap_open("{" . $imap_server_address . "}", $imap_admin_user, $imap_admin_password, OP_HALFOPEN, 1); - if ($mbox) { + $password = $_POST['ImapAdminPassword']; + try { + $client = $this->connect($user, $password); $_SESSION['imapAdmPass'] = lamEncrypt($_POST['ImapAdminPassword']); - @imap_close($mbox); + $client->logout(); } - else { + catch (LAMException $e) { $error = $this->messages['managemailbox'][5]; - $error[] = imap_last_error(); + $error[] = $e->getMessage(); $errors[] = $error; } } @@ -646,32 +655,52 @@ class imapAccess extends baseModule { } /** - * This function returns the IMAP server address including encryption options. + * Connects to the IMAP server. * - * @return String server address + * @param string $user user name + * @param string $password password + * @return Horde_Imap_Client_Socket IMAP client */ - function getServerAddress() { - $imap_encryption_protocol = $this->moduleSettings['ImapAccess_ImapServerEncriptionProtocol'][0]; + private function connect($user, $password) { + include_once __DIR__ . '/../3rdParty/composer/autoload.php'; + $encryptionType = $this->moduleSettings['ImapAccess_ImapServerEncriptionProtocol'][0]; if (strrpos($this->moduleSettings['ImapAccess_ImapServerAddress'][0], ":")) { - $imap_port_number = substr(strstr($this->moduleSettings['ImapAccess_ImapServerAddress'][0], ':'), 1); - $imap_server_name = array_shift(explode(':', $this->moduleSettings['ImapAccess_ImapServerAddress'][0], 2)); + $port = substr(strstr($this->moduleSettings['ImapAccess_ImapServerAddress'][0], ':'), 1); + $serverName = array_shift(explode(':', $this->moduleSettings['ImapAccess_ImapServerAddress'][0], 2)); } else { - $imap_server_name = $this->moduleSettings['ImapAccess_ImapServerAddress'][0]; - if (strcmp($imap_encryption_protocol, "TLS") == 0) { - $imap_port_number = 143; + $serverName = $this->moduleSettings['ImapAccess_ImapServerAddress'][0]; + if ($encryptionType === "TLS") { + $port = 143; } else { - $imap_port_number = 993; + $port = 993; } } + $context = array( + 'ssl' => array( + 'cafile' => __DIR__ . '/../../serverCerts.pem' + ) + ); if (isset($this->moduleSettings['ImapAccess_ImapValidateServerCert'][0]) && ($this->moduleSettings['ImapAccess_ImapValidateServerCert'][0] == 'novalidate-cert')) { - $validate_opt = "novalidate-cert"; + $context['ssl']['verify_peer'] = false; + $context['ssl']['verify_peer_name'] = false; } - else { - $validate_opt = "validate-cert"; + try { + $client = new Horde_Imap_Client_Socket(array( + 'username' => $user, + 'password' => $password, + 'hostspec' => $serverName, + 'port' => $port, + 'secure' => strtolower($encryptionType), + 'context' => $context + )); + $client->login(); + return $client; + } + catch (Exception $e) { + throw new LAMException(_('Unable to connect to IMAP server.'), $e->getMessage(), $e); } - return $imap_server_name . ":" . $imap_port_number . "/" . $imap_encryption_protocol . "/" . $validate_opt; } /** From 362014ddf64ad9639a0475fe97ea8a4b4f099377 Mon Sep 17 00:00:00 2001 From: Roland Gruber Date: Sat, 15 Feb 2020 21:23:40 +0100 Subject: [PATCH 3/7] use Horde imap library --- lam/lib/modules/imapAccess.inc | 36 ++++++++++++++++------------------ 1 file changed, 17 insertions(+), 19 deletions(-) diff --git a/lam/lib/modules/imapAccess.inc b/lam/lib/modules/imapAccess.inc index 3df496b8..4728f785 100644 --- a/lam/lib/modules/imapAccess.inc +++ b/lam/lib/modules/imapAccess.inc @@ -228,18 +228,18 @@ class imapAccess extends baseModule { $prefix = $this->getMailboxPrefix(); $email_domain = substr(strstr($this->email, '@'), 1); - $imap_admin_password = $this->getAdminPassword(); // check for password for fall back mechanism - if (!isset($_SESSION['imapAdmPass']) && !isset($imap_admin_password)) { + $password = $this->getAdminPassword(); // check for password for fall back mechanism + if (!isset($_SESSION['imapAdmPass']) && !isset($password)) { return $this->display_html_password(); } $return->addLabel(new htmlOutputText(_('Email address'))); $return->addField(new htmlOutputText($this->email)); - $imap_admin_user = $this->getAdminUser(); - $imap_admin_password = $this->getAdminPassword(); + $user = $this->getAdminUser(); + $password = $this->getAdminPassword(); try { - $client = $this->connect($imap_admin_user, $imap_admin_password); + $client = $this->connect($user, $password); } catch (LAMException $e) { return $this->display_html_password(new htmlStatusMessage('ERROR', $e->getTitle(), $e->getMessage())); @@ -885,28 +885,26 @@ class imapAccess extends baseModule { $limit = $data['limit']; $email_domain = $data['email']; ob_start(); - $imap_server_address = $this->getServerAddress(); - $imap_admin_user = $this->getAdminUser(); - $imap_admin_password = $this->getAdminPassword(); - $imapConnection = 0;//default state is false - if ($imap_admin_password) { - $imapConnection = @imap_open("{" . $imap_server_address . "}", $imap_admin_user, $imap_admin_password, OP_HALFOPEN, 1); + $imapUser = $this->getAdminUser(); + $imapPassword = $this->getAdminPassword(); + try { + $client = $this->connect($imapUser, $imapPassword); $prefix = $this->getMailboxPrefix(); - $list = imap_list($imapConnection, "{" . $imap_server_address . "}", $prefix . $this->getSep() . $uid); + $list = $client->listMailboxes($prefix . $this->getSep() . $uid); if (empty($list)) { - $createErrors = $this->createMailbox($imapConnection, $uid, $email_domain); + $createErrors = $this->createMailbox($client, $uid, $email_domain); $errors = array_merge($errors, $createErrors); if (empty($createErrors)) { - $quotaErrors = $this->setQuota($imapConnection, $uid, $email_domain, $limit); + $quotaErrors = $this->setQuota($client, $uid, $email_domain, $limit); $errors = array_merge($errors, $quotaErrors); } } + $client->logout(); } - if ($imapConnection) { - imap_close($imapConnection); - } - else { - $errors[] = $this->messages['managemailbox'][5]; + catch (Exception $e) { + $message = $this->messages['managemailbox'][5]; + $message[] = $e->getMessage(); + $errors[] = $message; } ob_end_clean(); $temp['counter']++; From bd3777f76427b447807ebce30cdeaf885b829859 Mon Sep 17 00:00:00 2001 From: Roland Gruber Date: Sat, 15 Feb 2020 21:25:06 +0100 Subject: [PATCH 4/7] use Horde imap library --- lam/HISTORY | 1 + 1 file changed, 1 insertion(+) diff --git a/lam/HISTORY b/lam/HISTORY index ba417a6b..4a3bc5f9 100644 --- a/lam/HISTORY +++ b/lam/HISTORY @@ -1,6 +1,7 @@ March 2020 7.1 - PHP 7 required - Webauthn/FIDO2 support for 2-factor-authentication (requires PHP 7.2) + - IMAP: changed library to support latest TLS versions - Personal: support display name (hidden by default in server profile) - Windows users: support allowed workstations - LAM Pro: From c0e1e026d8663ae8e18e5c16eb4dc0359fe45bf3 Mon Sep 17 00:00:00 2001 From: Roland Gruber Date: Sat, 15 Feb 2020 21:32:04 +0100 Subject: [PATCH 5/7] use Horde imap library --- lam/lib/modules/imapAccess.inc | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/lam/lib/modules/imapAccess.inc b/lam/lib/modules/imapAccess.inc index 4728f785..e421dde8 100644 --- a/lam/lib/modules/imapAccess.inc +++ b/lam/lib/modules/imapAccess.inc @@ -211,11 +211,9 @@ class imapAccess extends baseModule { } /** - * Returns the HTML meta data for the main account page. - * - * @return array HTML meta data + * @inheritDoc */ - function display_html_attributes() { + public function display_html_attributes() { $return = new htmlResponsiveRow(); if (!checkIfWriteAccessIsAllowed($this->get_scope())) { return $return; @@ -248,7 +246,7 @@ class imapAccess extends baseModule { $return->addLabel(new htmlOutputText(_('Mailbox'))); $mailboxGroup = new htmlGroup(); $mailboxGroup->addElement(new htmlOutputText($prefix . $this->getSep() . $this->user)); - $mailboxGroup->addElement(new htmlHelpLink('MailAddress'), true); + $mailboxGroup->addElement(new htmlHelpLink('MailAddress')); $return->addField($mailboxGroup); $return->addVerticalSpacer('2rem'); @@ -279,7 +277,7 @@ class imapAccess extends baseModule { * Returns the HTML meta data for the password page. * * @param htmlStatusMessage|null $message status message - * @return array HTML meta data + * @return htmlResponsiveRow HTML meta data */ function display_html_password($message = null) { $return = new htmlResponsiveRow(); @@ -925,5 +923,3 @@ class imapAccess extends baseModule { } } - -?> From 59e9635e9049b7a4212f3f9d285fdacbb61d694c Mon Sep 17 00:00:00 2001 From: Roland Gruber Date: Sat, 15 Feb 2020 21:38:07 +0100 Subject: [PATCH 6/7] refactoring --- lam/lib/modules/imapAccess.inc | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/lam/lib/modules/imapAccess.inc b/lam/lib/modules/imapAccess.inc index e421dde8..f9bc9633 100644 --- a/lam/lib/modules/imapAccess.inc +++ b/lam/lib/modules/imapAccess.inc @@ -226,18 +226,18 @@ class imapAccess extends baseModule { $prefix = $this->getMailboxPrefix(); $email_domain = substr(strstr($this->email, '@'), 1); - $password = $this->getAdminPassword(); // check for password for fall back mechanism - if (!isset($_SESSION['imapAdmPass']) && !isset($password)) { + $adminPassword = $this->getAdminPassword(); // check for password for fall back mechanism + if (!isset($_SESSION['imapAdmPass']) && !isset($adminPassword)) { return $this->display_html_password(); } $return->addLabel(new htmlOutputText(_('Email address'))); $return->addField(new htmlOutputText($this->email)); - $user = $this->getAdminUser(); - $password = $this->getAdminPassword(); + $adminUser = $this->getAdminUser(); + $adminPassword = $this->getAdminPassword(); try { - $client = $this->connect($user, $password); + $client = $this->connect($adminUser, $adminPassword); } catch (LAMException $e) { return $this->display_html_password(new htmlStatusMessage('ERROR', $e->getTitle(), $e->getMessage())); @@ -635,11 +635,11 @@ class imapAccess extends baseModule { */ function doLogin() { $errors = array(); - $user = $this->getAdminUser(); + $adminUser = $this->getAdminUser(); if (isset($_POST['ImapAdminPassword']) && $_POST['ImapAdminPassword'] != "") { - $password = $_POST['ImapAdminPassword']; + $adminPassword = $_POST['ImapAdminPassword']; try { - $client = $this->connect($user, $password); + $client = $this->connect($adminUser, $adminPassword); $_SESSION['imapAdmPass'] = lamEncrypt($_POST['ImapAdminPassword']); $client->logout(); } From 0f8fb1e146f11b305c16e7f0270467fe73182233 Mon Sep 17 00:00:00 2001 From: Roland Gruber Date: Sat, 15 Feb 2020 21:43:08 +0100 Subject: [PATCH 7/7] refactoring --- lam/lib/modules/imapAccess.inc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lam/lib/modules/imapAccess.inc b/lam/lib/modules/imapAccess.inc index f9bc9633..811b8633 100644 --- a/lam/lib/modules/imapAccess.inc +++ b/lam/lib/modules/imapAccess.inc @@ -354,14 +354,14 @@ class imapAccess extends baseModule { } $prefix = $this->getMailboxPrefix(); - $user = $this->getAdminUser(); + $adminUser = $this->getAdminUser(); if (isset($_POST['ImapAdminPassword']) && isset($_POST['enterPasswordButton'])) { $errors = $this->doLogin(); } - $password = $this->getAdminPassword(); + $adminPassword = $this->getAdminPassword(); try { - $client = $this->connect($user, $password); + $client = $this->connect($adminUser, $adminPassword); $this->extractUserAndEmail(); $email_domain = substr(strstr($this->email, '@'), 1); @@ -372,7 +372,7 @@ class imapAccess extends baseModule { else { $root = $prefix . $this->getSep() . $this->user; try { - $client->setACL($root, $user, array('rights' => 'c', 'action' => 'add')); + $client->setACL($root, $adminUser, array('rights' => 'c', 'action' => 'add')); $client->deleteMailbox($root); } catch (Exception $e) {