diff options
author | Joas Schilling <coding@schilljs.com> | 2016-10-17 13:21:44 +0300 |
---|---|---|
committer | Joas Schilling <coding@schilljs.com> | 2016-10-17 13:22:12 +0300 |
commit | 4531545c6102a06fee7ea9a31f65375a866c257c (patch) | |
tree | 607948d33f01d70960fe591900da6200d5119578 /lib | |
parent | 4d6f7675470ccc2657cca7f17578c0e207fcd0ec (diff) |
Use PSR-4 loading for normal files
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Account.php (renamed from lib/account.php) | 0 | ||||
-rw-r--r-- | lib/AppInfo/Application.php | 52 | ||||
-rw-r--r-- | lib/Attachment.php (renamed from lib/attachment.php) | 0 | ||||
-rw-r--r-- | lib/Cache/Cache.php (renamed from lib/cache/cache.php) | 0 | ||||
-rw-r--r-- | lib/Command/CreateAccount.php (renamed from lib/command/createaccount.php) | 0 | ||||
-rw-r--r-- | lib/Controller/AccountsController.php (renamed from lib/controller/accountscontroller.php) | 4 | ||||
-rw-r--r-- | lib/Controller/AliasesController.php (renamed from lib/controller/aliasescontroller.php) | 0 | ||||
-rw-r--r-- | lib/Controller/AutoCompleteController.php (renamed from lib/controller/autocompletecontroller.php) | 0 | ||||
-rw-r--r-- | lib/Controller/FoldersController.php (renamed from lib/controller/folderscontroller.php) | 0 | ||||
-rwxr-xr-x | lib/Controller/MessagesController.php (renamed from lib/controller/messagescontroller.php) | 0 | ||||
-rw-r--r-- | lib/Controller/PageController.php (renamed from lib/controller/pagecontroller.php) | 2 | ||||
-rw-r--r-- | lib/Controller/ProxyController.php (renamed from lib/controller/proxycontroller.php) | 0 | ||||
-rw-r--r-- | lib/Db/Alias.php (renamed from lib/db/alias.php) | 0 | ||||
-rw-r--r-- | lib/Db/AliasMapper.php (renamed from lib/db/aliasmapper.php) | 0 | ||||
-rw-r--r-- | lib/Db/CollectedAddress.php (renamed from lib/db/collectedaddress.php) | 0 | ||||
-rw-r--r-- | lib/Db/CollectedAddressMapper.php (renamed from lib/db/collectedaddressmapper.php) | 0 | ||||
-rw-r--r-- | lib/Db/MailAccount.php (renamed from lib/db/mailaccount.php) | 0 | ||||
-rw-r--r-- | lib/Db/MailAccountMapper.php (renamed from lib/db/mailaccountmapper.php) | 0 | ||||
-rw-r--r-- | lib/HordeTranslationHandler.php (renamed from lib/hordetranslationhandler.php) | 0 | ||||
-rw-r--r-- | lib/Http/AttachmentDownloadResponse.php (renamed from lib/http/attachmentdownloadresponse.php) | 0 | ||||
-rw-r--r-- | lib/Http/HtmlResponse.php (renamed from lib/http/htmlresponse.php) | 0 | ||||
-rw-r--r-- | lib/Http/ProxyDownloadResponse.php (renamed from lib/http/proxydownloadresponse.php) | 0 | ||||
-rw-r--r-- | lib/Mailbox.php (renamed from lib/mailbox.php) | 0 | ||||
-rw-r--r-- | lib/Model/ConvertAddresses.php (renamed from lib/model/convertaddresses.php) | 0 | ||||
-rw-r--r-- | lib/Model/IMAPMessage.php (renamed from lib/model/imapmessage.php) | 0 | ||||
-rw-r--r-- | lib/Model/IMessage.php (renamed from lib/model/imessage.php) | 2 | ||||
-rw-r--r-- | lib/Model/Message.php (renamed from lib/model/message.php) | 0 | ||||
-rw-r--r-- | lib/Model/ReplyMessage.php (renamed from lib/model/replymessage.php) | 0 | ||||
-rw-r--r-- | lib/SearchMailbox.php (renamed from lib/searchmailbox.php) | 0 | ||||
-rw-r--r-- | lib/Service/AccountService.php (renamed from lib/service/accountservice.php) | 0 | ||||
-rw-r--r-- | lib/Service/AliasesService.php (renamed from lib/service/aliasesservice.php) | 0 | ||||
-rw-r--r-- | lib/Service/AutoCompletion/AddressCollector.php (renamed from lib/service/autocompletion/addresscollector.php) | 0 | ||||
-rw-r--r-- | lib/Service/AutoCompletion/AutoCompleteService.php (renamed from lib/service/autocompletion/autocompleteservice.php) | 0 | ||||
-rw-r--r-- | lib/Service/AutoConfig/AutoConfig.php (renamed from lib/service/autoconfig/autoconfig.php) | 0 | ||||
-rw-r--r-- | lib/Service/AutoConfig/ConnectivityTester.php (renamed from lib/service/autoconfig/connectivitytester.php) | 0 | ||||
-rw-r--r-- | lib/Service/AutoConfig/ImapConnectivityTester.php (renamed from lib/service/autoconfig/imapconnectivitytester.php) | 0 | ||||
-rw-r--r-- | lib/Service/AutoConfig/ImapConnector.php (renamed from lib/service/autoconfig/imapconnector.php) | 0 | ||||
-rw-r--r-- | lib/Service/AutoConfig/ImapServerDetector.php (renamed from lib/service/autoconfig/imapserverdetector.php) | 0 | ||||
-rw-r--r-- | lib/Service/AutoConfig/IspDb.php (renamed from lib/service/autoconfig/ispdb.php) | 0 | ||||
-rw-r--r-- | lib/Service/AutoConfig/MxRecord.php (renamed from lib/service/autoconfig/mxrecord.php) | 0 | ||||
-rw-r--r-- | lib/Service/AutoConfig/SmtpConnectivityTester.php (renamed from lib/service/autoconfig/smtpconnectivitytester.php) | 0 | ||||
-rw-r--r-- | lib/Service/AutoConfig/SmtpServerDetector.php (renamed from lib/service/autoconfig/smtpserverdetector.php) | 0 | ||||
-rw-r--r-- | lib/Service/ContactsIntegration.php (renamed from lib/service/contactsintegration.php) | 0 | ||||
-rwxr-xr-x | lib/Service/Html.php (renamed from lib/service/html.php) | 0 | ||||
-rw-r--r-- | lib/Service/HtmlPurify/CidURIScheme.php (renamed from lib/service/htmlpurify/cidurischeme.php) | 0 | ||||
-rwxr-xr-x | lib/Service/HtmlPurify/TransformCSSBackground.php (renamed from lib/service/htmlpurify/transformcssbackground.php) | 0 | ||||
-rwxr-xr-x | lib/Service/HtmlPurify/TransformHTMLLinks.php (renamed from lib/service/htmlpurify/transformhtmllinks.php) | 0 | ||||
-rwxr-xr-x | lib/Service/HtmlPurify/TransformImageSrc.php (renamed from lib/service/htmlpurify/transformimagesrc.php) | 0 | ||||
-rw-r--r-- | lib/Service/HtmlPurify/TransformNoReferrer.php (renamed from lib/service/htmlpurify/transformnoreferrer.php) | 0 | ||||
-rw-r--r-- | lib/Service/HtmlPurify/TransformURLScheme.php (renamed from lib/service/htmlpurify/transformurlscheme.php) | 0 | ||||
-rw-r--r-- | lib/Service/IAccount.php (renamed from lib/service/iaccount.php) | 0 | ||||
-rw-r--r-- | lib/Service/IMailBox.php (renamed from lib/service/imailbox.php) | 0 | ||||
-rw-r--r-- | lib/Service/Logger.php (renamed from lib/service/logger.php) | 0 | ||||
-rw-r--r-- | lib/Service/UnifiedAccount.php (renamed from lib/service/unifiedaccount.php) | 2 | ||||
-rw-r--r-- | lib/Service/UnifiedMailbox.php (renamed from lib/service/unifiedmailbox.php) | 0 |
55 files changed, 57 insertions, 5 deletions
diff --git a/lib/account.php b/lib/Account.php index b9d248835..b9d248835 100644 --- a/lib/account.php +++ b/lib/Account.php diff --git a/lib/AppInfo/Application.php b/lib/AppInfo/Application.php new file mode 100644 index 000000000..e2d68e175 --- /dev/null +++ b/lib/AppInfo/Application.php @@ -0,0 +1,52 @@ +<?php + +/** + * @author Christoph Wurst <christoph@winzerhof-wurst.at> + * @author Thomas Müller <thomas.mueller@tmit.eu> + * + * Mail + * + * This code is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License, version 3, + * as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License, version 3, + * along with this program. If not, see <http://www.gnu.org/licenses/> + * + */ + +namespace OCA\Mail\AppInfo; + +use OCP\AppFramework\App; +use OCP\Util; + +class Application extends App { + + public function __construct(array $urlParams = []) { + parent::__construct('mail', $urlParams); + + $container = $this->getContainer(); + + $transport = $container->getServer()->getConfig()->getSystemValue('app.mail.transport', 'smtp'); + $testSmtp = $transport === 'smtp'; + + $container->registerService('OCP\ISession', function ($c) { + return $c->getServer()->getSession(); + }); + + $container->registerParameter("appName", "mail"); + $container->registerService("userFolder", function ($c) use ($container) { + $user = $container->query("UserId"); + return $container->getServer()->getUserFolder($user); + }); + $container->registerParameter("testSmtp", $testSmtp); + $container->registerParameter("referrer", isset($_SERVER['HTTP_REFERER']) ? $_SERVER['HTTP_REFERER'] : null); + $container->registerParameter("hostname", Util::getServerHostName()); + } + +} diff --git a/lib/attachment.php b/lib/Attachment.php index d630cc432..d630cc432 100644 --- a/lib/attachment.php +++ b/lib/Attachment.php diff --git a/lib/cache/cache.php b/lib/Cache/Cache.php index 63c7cf2da..63c7cf2da 100644 --- a/lib/cache/cache.php +++ b/lib/Cache/Cache.php diff --git a/lib/command/createaccount.php b/lib/Command/CreateAccount.php index ed599c7cc..ed599c7cc 100644 --- a/lib/command/createaccount.php +++ b/lib/Command/CreateAccount.php diff --git a/lib/controller/accountscontroller.php b/lib/Controller/AccountsController.php index 902f3f565..00ee31787 100644 --- a/lib/controller/accountscontroller.php +++ b/lib/Controller/AccountsController.php @@ -244,13 +244,13 @@ class AccountsController extends Controller { $this->logger->error('Creating account failed: ' . $ex->getMessage()); return new JSONResponse( array('message' => $this->l10n->t('Creating account failed: ') . $ex->getMessage()), - HTTP::STATUS_BAD_REQUEST); + Http::STATUS_BAD_REQUEST); } $this->logger->info('Auto detect failed'); return new JSONResponse( array('message' => $this->l10n->t('Auto detect failed. Please use manual mode.')), - HTTP::STATUS_BAD_REQUEST); + Http::STATUS_BAD_REQUEST); } /** diff --git a/lib/controller/aliasescontroller.php b/lib/Controller/AliasesController.php index 7ce23850e..7ce23850e 100644 --- a/lib/controller/aliasescontroller.php +++ b/lib/Controller/AliasesController.php diff --git a/lib/controller/autocompletecontroller.php b/lib/Controller/AutoCompleteController.php index 0a4d6c921..0a4d6c921 100644 --- a/lib/controller/autocompletecontroller.php +++ b/lib/Controller/AutoCompleteController.php diff --git a/lib/controller/folderscontroller.php b/lib/Controller/FoldersController.php index a014247df..a014247df 100644 --- a/lib/controller/folderscontroller.php +++ b/lib/Controller/FoldersController.php diff --git a/lib/controller/messagescontroller.php b/lib/Controller/MessagesController.php index 72951665f..72951665f 100755 --- a/lib/controller/messagescontroller.php +++ b/lib/Controller/MessagesController.php diff --git a/lib/controller/pagecontroller.php b/lib/Controller/PageController.php index 188b190db..432061c4c 100644 --- a/lib/controller/pagecontroller.php +++ b/lib/Controller/PageController.php @@ -116,7 +116,7 @@ class PageController extends Controller { * @NoCSRFRequired * * @param string $uri - * @return TemplateResponse renders the compose page + * @return RedirectResponse */ public function compose($uri) { $parts = parse_url($uri); diff --git a/lib/controller/proxycontroller.php b/lib/Controller/ProxyController.php index b47ccfad1..b47ccfad1 100644 --- a/lib/controller/proxycontroller.php +++ b/lib/Controller/ProxyController.php diff --git a/lib/db/alias.php b/lib/Db/Alias.php index fd67631c5..fd67631c5 100644 --- a/lib/db/alias.php +++ b/lib/Db/Alias.php diff --git a/lib/db/aliasmapper.php b/lib/Db/AliasMapper.php index f4a427ae1..f4a427ae1 100644 --- a/lib/db/aliasmapper.php +++ b/lib/Db/AliasMapper.php diff --git a/lib/db/collectedaddress.php b/lib/Db/CollectedAddress.php index 2c2598417..2c2598417 100644 --- a/lib/db/collectedaddress.php +++ b/lib/Db/CollectedAddress.php diff --git a/lib/db/collectedaddressmapper.php b/lib/Db/CollectedAddressMapper.php index 8d387eebf..8d387eebf 100644 --- a/lib/db/collectedaddressmapper.php +++ b/lib/Db/CollectedAddressMapper.php diff --git a/lib/db/mailaccount.php b/lib/Db/MailAccount.php index 29334760f..29334760f 100644 --- a/lib/db/mailaccount.php +++ b/lib/Db/MailAccount.php diff --git a/lib/db/mailaccountmapper.php b/lib/Db/MailAccountMapper.php index f654fab0d..f654fab0d 100644 --- a/lib/db/mailaccountmapper.php +++ b/lib/Db/MailAccountMapper.php diff --git a/lib/hordetranslationhandler.php b/lib/HordeTranslationHandler.php index 77530c22d..77530c22d 100644 --- a/lib/hordetranslationhandler.php +++ b/lib/HordeTranslationHandler.php diff --git a/lib/http/attachmentdownloadresponse.php b/lib/Http/AttachmentDownloadResponse.php index d2e047d9f..d2e047d9f 100644 --- a/lib/http/attachmentdownloadresponse.php +++ b/lib/Http/AttachmentDownloadResponse.php diff --git a/lib/http/htmlresponse.php b/lib/Http/HtmlResponse.php index fc00f9127..fc00f9127 100644 --- a/lib/http/htmlresponse.php +++ b/lib/Http/HtmlResponse.php diff --git a/lib/http/proxydownloadresponse.php b/lib/Http/ProxyDownloadResponse.php index 06a247cbe..06a247cbe 100644 --- a/lib/http/proxydownloadresponse.php +++ b/lib/Http/ProxyDownloadResponse.php diff --git a/lib/mailbox.php b/lib/Mailbox.php index cf8036083..cf8036083 100644 --- a/lib/mailbox.php +++ b/lib/Mailbox.php diff --git a/lib/model/convertaddresses.php b/lib/Model/ConvertAddresses.php index f723826c4..f723826c4 100644 --- a/lib/model/convertaddresses.php +++ b/lib/Model/ConvertAddresses.php diff --git a/lib/model/imapmessage.php b/lib/Model/IMAPMessage.php index 2ab852d4c..2ab852d4c 100644 --- a/lib/model/imapmessage.php +++ b/lib/Model/IMAPMessage.php diff --git a/lib/model/imessage.php b/lib/Model/IMessage.php index 93b5c6543..d1b96e237 100644 --- a/lib/model/imessage.php +++ b/lib/Model/IMessage.php @@ -123,7 +123,7 @@ interface IMessage { public function setContent($content); /** - * @return Horde_Mime_Part[] + * @return \Horde_Mime_Part[] */ public function getAttachments(); diff --git a/lib/model/message.php b/lib/Model/Message.php index f40ff5842..f40ff5842 100644 --- a/lib/model/message.php +++ b/lib/Model/Message.php diff --git a/lib/model/replymessage.php b/lib/Model/ReplyMessage.php index 39d2cf63a..39d2cf63a 100644 --- a/lib/model/replymessage.php +++ b/lib/Model/ReplyMessage.php diff --git a/lib/searchmailbox.php b/lib/SearchMailbox.php index 1f78a837b..1f78a837b 100644 --- a/lib/searchmailbox.php +++ b/lib/SearchMailbox.php diff --git a/lib/service/accountservice.php b/lib/Service/AccountService.php index 808c493d3..808c493d3 100644 --- a/lib/service/accountservice.php +++ b/lib/Service/AccountService.php diff --git a/lib/service/aliasesservice.php b/lib/Service/AliasesService.php index 4b182eba7..4b182eba7 100644 --- a/lib/service/aliasesservice.php +++ b/lib/Service/AliasesService.php diff --git a/lib/service/autocompletion/addresscollector.php b/lib/Service/AutoCompletion/AddressCollector.php index 7d4d65ff3..7d4d65ff3 100644 --- a/lib/service/autocompletion/addresscollector.php +++ b/lib/Service/AutoCompletion/AddressCollector.php diff --git a/lib/service/autocompletion/autocompleteservice.php b/lib/Service/AutoCompletion/AutoCompleteService.php index 2e430c356..2e430c356 100644 --- a/lib/service/autocompletion/autocompleteservice.php +++ b/lib/Service/AutoCompletion/AutoCompleteService.php diff --git a/lib/service/autoconfig/autoconfig.php b/lib/Service/AutoConfig/AutoConfig.php index cd08c54a7..cd08c54a7 100644 --- a/lib/service/autoconfig/autoconfig.php +++ b/lib/Service/AutoConfig/AutoConfig.php diff --git a/lib/service/autoconfig/connectivitytester.php b/lib/Service/AutoConfig/ConnectivityTester.php index fe41bdf98..fe41bdf98 100644 --- a/lib/service/autoconfig/connectivitytester.php +++ b/lib/Service/AutoConfig/ConnectivityTester.php diff --git a/lib/service/autoconfig/imapconnectivitytester.php b/lib/Service/AutoConfig/ImapConnectivityTester.php index de3c48c0f..de3c48c0f 100644 --- a/lib/service/autoconfig/imapconnectivitytester.php +++ b/lib/Service/AutoConfig/ImapConnectivityTester.php diff --git a/lib/service/autoconfig/imapconnector.php b/lib/Service/AutoConfig/ImapConnector.php index c587a3333..c587a3333 100644 --- a/lib/service/autoconfig/imapconnector.php +++ b/lib/Service/AutoConfig/ImapConnector.php diff --git a/lib/service/autoconfig/imapserverdetector.php b/lib/Service/AutoConfig/ImapServerDetector.php index 63158bfc6..63158bfc6 100644 --- a/lib/service/autoconfig/imapserverdetector.php +++ b/lib/Service/AutoConfig/ImapServerDetector.php diff --git a/lib/service/autoconfig/ispdb.php b/lib/Service/AutoConfig/IspDb.php index 8dfef126c..8dfef126c 100644 --- a/lib/service/autoconfig/ispdb.php +++ b/lib/Service/AutoConfig/IspDb.php diff --git a/lib/service/autoconfig/mxrecord.php b/lib/Service/AutoConfig/MxRecord.php index 03bdccbfa..03bdccbfa 100644 --- a/lib/service/autoconfig/mxrecord.php +++ b/lib/Service/AutoConfig/MxRecord.php diff --git a/lib/service/autoconfig/smtpconnectivitytester.php b/lib/Service/AutoConfig/SmtpConnectivityTester.php index 9c268f3b3..9c268f3b3 100644 --- a/lib/service/autoconfig/smtpconnectivitytester.php +++ b/lib/Service/AutoConfig/SmtpConnectivityTester.php diff --git a/lib/service/autoconfig/smtpserverdetector.php b/lib/Service/AutoConfig/SmtpServerDetector.php index 74ae40945..74ae40945 100644 --- a/lib/service/autoconfig/smtpserverdetector.php +++ b/lib/Service/AutoConfig/SmtpServerDetector.php diff --git a/lib/service/contactsintegration.php b/lib/Service/ContactsIntegration.php index 61c0f3601..61c0f3601 100644 --- a/lib/service/contactsintegration.php +++ b/lib/Service/ContactsIntegration.php diff --git a/lib/service/html.php b/lib/Service/Html.php index bf4b66adc..bf4b66adc 100755 --- a/lib/service/html.php +++ b/lib/Service/Html.php diff --git a/lib/service/htmlpurify/cidurischeme.php b/lib/Service/HtmlPurify/CidURIScheme.php index c2f13532a..c2f13532a 100644 --- a/lib/service/htmlpurify/cidurischeme.php +++ b/lib/Service/HtmlPurify/CidURIScheme.php diff --git a/lib/service/htmlpurify/transformcssbackground.php b/lib/Service/HtmlPurify/TransformCSSBackground.php index a57ab235d..a57ab235d 100755 --- a/lib/service/htmlpurify/transformcssbackground.php +++ b/lib/Service/HtmlPurify/TransformCSSBackground.php diff --git a/lib/service/htmlpurify/transformhtmllinks.php b/lib/Service/HtmlPurify/TransformHTMLLinks.php index 352511f0f..352511f0f 100755 --- a/lib/service/htmlpurify/transformhtmllinks.php +++ b/lib/Service/HtmlPurify/TransformHTMLLinks.php diff --git a/lib/service/htmlpurify/transformimagesrc.php b/lib/Service/HtmlPurify/TransformImageSrc.php index a471ea793..a471ea793 100755 --- a/lib/service/htmlpurify/transformimagesrc.php +++ b/lib/Service/HtmlPurify/TransformImageSrc.php diff --git a/lib/service/htmlpurify/transformnoreferrer.php b/lib/Service/HtmlPurify/TransformNoReferrer.php index 6cdfa5bb8..6cdfa5bb8 100644 --- a/lib/service/htmlpurify/transformnoreferrer.php +++ b/lib/Service/HtmlPurify/TransformNoReferrer.php diff --git a/lib/service/htmlpurify/transformurlscheme.php b/lib/Service/HtmlPurify/TransformURLScheme.php index 83974b132..83974b132 100644 --- a/lib/service/htmlpurify/transformurlscheme.php +++ b/lib/Service/HtmlPurify/TransformURLScheme.php diff --git a/lib/service/iaccount.php b/lib/Service/IAccount.php index 2515f4663..2515f4663 100644 --- a/lib/service/iaccount.php +++ b/lib/Service/IAccount.php diff --git a/lib/service/imailbox.php b/lib/Service/IMailBox.php index 76b9fb96c..76b9fb96c 100644 --- a/lib/service/imailbox.php +++ b/lib/Service/IMailBox.php diff --git a/lib/service/logger.php b/lib/Service/Logger.php index 5cc1412cf..5cc1412cf 100644 --- a/lib/service/logger.php +++ b/lib/Service/Logger.php diff --git a/lib/service/unifiedaccount.php b/lib/Service/UnifiedAccount.php index 17b505ee2..fd1c51a1e 100644 --- a/lib/service/unifiedaccount.php +++ b/lib/Service/UnifiedAccount.php @@ -38,7 +38,7 @@ class UnifiedAccount implements IAccount { /** @var IL10N */ private $l10n; - /** @var Horde_Mail_Rfc822_List */ + /** @var \Horde_Mail_Rfc822_List */ private $email; /** diff --git a/lib/service/unifiedmailbox.php b/lib/Service/UnifiedMailbox.php index 34c68f204..34c68f204 100644 --- a/lib/service/unifiedmailbox.php +++ b/lib/Service/UnifiedMailbox.php |