mirror of
https://github.com/Mibew/mibew.git
synced 2024-11-16 00:54:12 +03:00
Replace "$mibew_mailbox" variable with a constant
This commit is contained in:
parent
b6ee459833
commit
4ff92e7f5c
@ -39,8 +39,6 @@ class MailController extends AbstractController
|
||||
*/
|
||||
public function indexAction(Request $request)
|
||||
{
|
||||
global $mibew_mailbox;
|
||||
|
||||
$page = array(
|
||||
'errors' => array(),
|
||||
);
|
||||
@ -102,7 +100,7 @@ class MailController extends AbstractController
|
||||
true
|
||||
);
|
||||
|
||||
mibew_mail($email, $mibew_mailbox, $subject, $body);
|
||||
mibew_mail($email, MIBEW_MAILBOX, $subject, $body);
|
||||
|
||||
$page = array_merge_recursive($page, setup_logo($group));
|
||||
|
||||
|
@ -55,3 +55,8 @@ define('VISITOR_COOKIE_NAME', 'MIBEW_VisitorID');
|
||||
*/
|
||||
define('USERID_COOKIE_NAME', 'MIBEW_UserID');
|
||||
define('USERNAME_COOKIE_NAME', 'MIBEW_Data');
|
||||
|
||||
/**
|
||||
* Mailbox of the current installation
|
||||
*/
|
||||
define('MIBEW_MAILBOX', $mibew_mailbox);
|
||||
|
@ -17,9 +17,7 @@
|
||||
|
||||
function mibew_mail($to_addr, $reply_to, $subject, $body)
|
||||
{
|
||||
global $mibew_mailbox;
|
||||
|
||||
$headers = "From: $mibew_mailbox\r\n"
|
||||
$headers = "From: " . MIBEW_MAILBOX . "\r\n"
|
||||
. "Reply-To: " . $reply_to . "\r\n"
|
||||
. "Content-Type: text/plain; charset=utf-8\r\n"
|
||||
. 'X-Mailer: PHP/' . phpversion();
|
||||
@ -29,7 +27,7 @@ function mibew_mail($to_addr, $reply_to, $subject, $body)
|
||||
$body = preg_replace("/\n/", "\r\n", $body);
|
||||
|
||||
$old_from = ini_get('sendmail_from');
|
||||
@ini_set('sendmail_from', $mibew_mailbox);
|
||||
@ini_set('sendmail_from', MIBEW_MAILBOX);
|
||||
@mail(
|
||||
$to_addr,
|
||||
$real_subject,
|
||||
|
Loading…
Reference in New Issue
Block a user