mirror of
				https://github.com/Mibew/mibew.git
				synced 2025-11-03 20:05:14 +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)
 | 
					    public function indexAction(Request $request)
 | 
				
			||||||
    {
 | 
					    {
 | 
				
			||||||
        global $mibew_mailbox;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
        $page = array(
 | 
					        $page = array(
 | 
				
			||||||
            'errors' => array(),
 | 
					            'errors' => array(),
 | 
				
			||||||
        );
 | 
					        );
 | 
				
			||||||
@ -102,7 +100,7 @@ class MailController extends AbstractController
 | 
				
			|||||||
            true
 | 
					            true
 | 
				
			||||||
        );
 | 
					        );
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        mibew_mail($email, $mibew_mailbox, $subject, $body);
 | 
					        mibew_mail($email, MIBEW_MAILBOX, $subject, $body);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        $page = array_merge_recursive($page, setup_logo($group));
 | 
					        $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('USERID_COOKIE_NAME', 'MIBEW_UserID');
 | 
				
			||||||
define('USERNAME_COOKIE_NAME', 'MIBEW_Data');
 | 
					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)
 | 
					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"
 | 
					        . "Reply-To: " . $reply_to . "\r\n"
 | 
				
			||||||
        . "Content-Type: text/plain; charset=utf-8\r\n"
 | 
					        . "Content-Type: text/plain; charset=utf-8\r\n"
 | 
				
			||||||
        . 'X-Mailer: PHP/' . phpversion();
 | 
					        . 'X-Mailer: PHP/' . phpversion();
 | 
				
			||||||
@ -29,7 +27,7 @@ function mibew_mail($to_addr, $reply_to, $subject, $body)
 | 
				
			|||||||
    $body = preg_replace("/\n/", "\r\n", $body);
 | 
					    $body = preg_replace("/\n/", "\r\n", $body);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    $old_from = ini_get('sendmail_from');
 | 
					    $old_from = ini_get('sendmail_from');
 | 
				
			||||||
    @ini_set('sendmail_from', $mibew_mailbox);
 | 
					    @ini_set('sendmail_from', MIBEW_MAILBOX);
 | 
				
			||||||
    @mail(
 | 
					    @mail(
 | 
				
			||||||
        $to_addr,
 | 
					        $to_addr,
 | 
				
			||||||
        $real_subject,
 | 
					        $real_subject,
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
		Reference in New Issue
	
	Block a user