public static function sendMail($path) { if (!\OCP\User::isLoggedIn()) { return; } $email = \OCP\Config::getUserValue(\OCP\User::getUser(), 'settings', 'email', ''); \OCP\Util::writeLog('files_antivirus', 'Email: ' . $email, \OCP\Util::DEBUG); if (!empty($email)) { $defaults = new \OCP\Defaults(); $tmpl = new \OCP\Template('files_antivirus', 'notification'); $tmpl->assign('file', $path); $tmpl->assign('host', \OCP\Util::getServerHost()); $tmpl->assign('user', \OCP\User::getDisplayName()); $msg = $tmpl->fetchPage(); $from = \OCP\Util::getDefaultEmailAddress('security-noreply'); \OCP\Util::sendMail($email, \OCP\User::getUser(), \OCP\Util::getL10N('files_antivirus')->t('Malware detected'), $msg, $from, $defaults->getName(), true); } }
<div id="firstrunwizard"> <?php $defaults = new OCP\Defaults(); ?> <a id="closeWizard" class="close"> <img class="svg" src="<?php print_unescaped(OCP\Util::imagePath('core', 'actions/delete.svg')); ?> "> </a> <h1><?php p($l->t('Welcome to ownCloud')); ?> </h1> <?php if (OC_Util::getEditionString() === '') { ?> <p><?php p($l->t('Your personal web services. All your files, contacts, calendar and more, in one place.')); ?> </p> <?php } else { ?> <p><?php p($defaults->getSlogan()); ?> </p>
<?php /** * ownCloud - First Run Wizard * * @author Frank Karlitschek * @copyright 2012 Frank Karlitschek frank@owncloud.org * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE * License as published by the Free Software Foundation; either * version 3 of the License, or any later version. * * This library 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 along with this library. If not, see <http://www.gnu.org/licenses/>. * */ // Check if we are a user OCP\User::checkLoggedIn(); $defaults = new \OCP\Defaults(); //links to clients $clients = array('desktop' => OCP\Config::getSystemValue('customclient_desktop', $defaults->getSyncClientUrl()), 'android' => OCP\Config::getSystemValue('customclient_android', $defaults->getAndroidClientUrl()), 'ios' => OCP\Config::getSystemValue('customclient_ios', $defaults->getiOSClientUrl())); $tmpl = new OCP\Template('firstrunwizard', 'wizard', ''); $tmpl->assign('logo', OCP\Util::linkTo('core', 'img/logo-inverted.svg')); $tmpl->assign('clients', $clients); $tmpl->printPage();
/** * Get the sender data * @param string $setting Either `email` or `name` * @return string */ protected function getSenderData($setting) { if (empty($this->senderAddress)) { $this->senderAddress = \OCP\Util::getDefaultEmailAddress('no-reply'); } if (empty($this->senderName)) { $defaults = new \OCP\Defaults(); $this->senderName = $defaults->getName(); } if ($setting === 'email') { return $this->senderAddress; } return $this->senderName; }
<?php /** * ownCloud - First Run Wizard * * @author Frank Karlitschek * @copyright 2012 Frank Karlitschek frank@owncloud.org * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE * License as published by the Free Software Foundation; either * version 3 of the License, or any later version. * * This library 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 along with this library. If not, see <http://www.gnu.org/licenses/>. * */ // Check if we are a user OCP\User::checkLoggedIn(); $defaults = new \OCP\Defaults(); //links to clients $clients = array('desktop' => OC_Config::getValue('customclient_desktop', $defaults->getSyncClientUrl()), 'android' => OC_Config::getValue('customclient_android', 'https://play.google.com/store/apps/details?id=com.owncloud.android'), 'ios' => OC_Config::getValue('customclient_ios', 'https://itunes.apple.com/us/app/owncloud/id543672169?mt=8')); $tmpl = new OCP\Template('firstrunwizard', 'wizard', ''); $tmpl->assign('logo', OCP\Util::linkTo('core', 'img/logo-inverted.svg')); $tmpl->assign('clients', $clients); $tmpl->printPage();
<div id="notification-container"> <div id="notification" style="display: none;"></div> </div> <?php $defaults = new OCP\Defaults(); // initialize themable default strings and urls ?> <input type="hidden" name="dir" value="<?php p($_['dir']); ?> " id="dir"> <input type="hidden" name="downloadURL" value="<?php p($_['downloadURL']); ?> " id="downloadURL"> <input type="hidden" name="filename" value="<?php p($_['filename']); ?> " id="filename"> <input type="hidden" name="mimetype" value="<?php p($_['mimetype']); ?> " id="mimetype"> <header><div id="header"> <a href="<?php print_unescaped(link_to('', 'index.php')); ?> " title="" id="owncloud"><img class="svg" src="<?php