2014-07-16 16:36:30 +04:00
|
|
|
<?php
|
|
|
|
/**
|
2016-02-07 22:16:35 +03:00
|
|
|
* @author Christoph Wurst <christoph@winzerhof-wurst.at>
|
|
|
|
* @author Thomas Müller <thomas.mueller@tmit.eu>
|
2014-07-16 16:36:30 +04:00
|
|
|
*
|
2016-02-07 22:16:35 +03:00
|
|
|
* ownCloud - 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/>
|
2014-07-16 16:36:30 +04:00
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
|
|
|
namespace OCA\Mail\AppInfo;
|
|
|
|
|
|
|
|
use \OCP\AppFramework\App;
|
|
|
|
|
|
|
|
class Application extends App {
|
|
|
|
|
|
|
|
public function __construct (array $urlParams=array()) {
|
|
|
|
parent::__construct('mail', $urlParams);
|
|
|
|
|
|
|
|
$container = $this->getContainer();
|
2016-02-05 15:35:08 +03:00
|
|
|
$transport = $container->getServer()->getConfig()->getSystemValue('app.mail.transport', 'smtp');
|
|
|
|
$testSmtp = $transport === 'smtp';
|
|
|
|
|
|
|
|
$user = $container->query("UserId");
|
|
|
|
$container->registerParameter("appName", "mail");
|
|
|
|
$container->registerParameter("userFolder", $container->getServer()->getUserFolder($user));
|
|
|
|
$container->registerParameter("testSmtp", $testSmtp);
|
|
|
|
$container->registerParameter("referrer", isset($_SERVER['HTTP_REFERER']) ? : null);
|
|
|
|
$container->registerParameter("hostname", \OCP\Util::getServerHostName());
|
2014-07-16 16:36:30 +04:00
|
|
|
}
|
2015-05-07 20:19:49 +03:00
|
|
|
|
2014-07-16 16:36:30 +04:00
|
|
|
}
|