Add use statements for Emailer class

This commit is contained in:
Hypolite Petovan 2017-11-22 18:37:10 -05:00
parent b5822d8dfe
commit ef57c704db
3 changed files with 6 additions and 6 deletions

View file

@ -1,5 +1,7 @@
<?php <?php
use Friendica\Util\Emailer;
require_once('include/security.php'); require_once('include/security.php');
function dav_install() function dav_install()
@ -285,7 +287,6 @@ function dav_cron(&$a, &$b)
'textVersion' => $text_text, 'textVersion' => $text_text,
'additionalMailHeader' => "", 'additionalMailHeader' => "",
); );
require_once('include/Emailer.php');
Emailer::send($params); Emailer::send($params);
} }
break; break;

View file

@ -9,7 +9,7 @@
* Author: Rabuzarus <https://friendica.kommune4.de/profile/rabuzarus> (Port to Friendica) * Author: Rabuzarus <https://friendica.kommune4.de/profile/rabuzarus> (Port to Friendica)
*/ */
require_once('include/Emailer.php'); use Friendica\Util\Emailer;
function notifyall_install() { function notifyall_install() {
logger("installed notifyall"); logger("installed notifyall");
@ -42,7 +42,7 @@ function notifyall_post(&$a) {
$sender_name = sprintf(t('%s Administrator'), $sitename); $sender_name = sprintf(t('%s Administrator'), $sitename);
else else
$sender_name = sprintf(t('%1$s, %2$s Administrator'), $a->config['admin_name'], $sitename); $sender_name = sprintf(t('%1$s, %2$s Administrator'), $a->config['admin_name'], $sitename);
if (! x($a->config['sender_email'])) if (! x($a->config['sender_email']))
$sender_email = 'noreply@' . $a->get_hostname(); $sender_email = 'noreply@' . $a->get_hostname();
else else
@ -54,7 +54,7 @@ function notifyall_post(&$a) {
$textversion = strip_tags(html_entity_decode(bbcode(stripslashes(str_replace(array("\\r", "\\n"),array( "", "\n"), $text))),ENT_QUOTES,'UTF-8')); $textversion = strip_tags(html_entity_decode(bbcode(stripslashes(str_replace(array("\\r", "\\n"),array( "", "\n"), $text))),ENT_QUOTES,'UTF-8'));
$htmlversion = bbcode(stripslashes(str_replace(array("\\r","\\n"), array("","<br />\n"),$text))); $htmlversion = bbcode(stripslashes(str_replace(array("\\r","\\n"), array("","<br />\n"),$text)));
// if this is a test, send it only to the admin(s) // if this is a test, send it only to the admin(s)
// admin_email might be a comma separated list, but we need "a@b','c@d','e@f // admin_email might be a comma separated list, but we need "a@b','c@d','e@f
if ( intval($_REQUEST['test'])) { if ( intval($_REQUEST['test'])) {

View file

@ -8,8 +8,7 @@
use Friendica\App; use Friendica\App;
use Friendica\Core\PConfig; use Friendica\Core\PConfig;
use Friendica\Util\Emailer;
require_once 'include/Emailer.php';
/* because the fraking openpgp-php is in composer, require libs in composer /* because the fraking openpgp-php is in composer, require libs in composer
* and then don't use autoloader to load classes... */ * and then don't use autoloader to load classes... */