瀏覽代碼

Bugfixes (#5949)

* Added missing parameter to send_email()

* Preserving the call-center queue_record_template value when saving

* Removed unused declarations using the commented-out $last_offered_call

* Fix for redirecting to previous page after login, if set

* Removed duplicate bugfix in /resources/login.php
mhoogveld 4 年之前
父節點
當前提交
73f796220f
共有 1 個文件被更改,包括 6 次插入1 次删除
  1. 6 1
      resources/login.php

+ 6 - 1
resources/login.php

@@ -152,7 +152,7 @@
 								$email_body = str_replace('${domain}', $domain_name, $email_body);
 								$email_body = str_replace('${domain}', $domain_name, $email_body);
 
 
 							//send reset link
 							//send reset link
-								if (send_email($email, $email_subject, $email_body)) {
+								if (send_email($email, $email_subject, $email_body, $eml_error)) {
 									//email sent
 									//email sent
 										message::add($text['message-reset_link_sent'], 'positive', 2500);
 										message::add($text['message-reset_link_sent'], 'positive', 2500);
 								}
 								}
@@ -242,6 +242,11 @@
 //set variable if not set
 //set variable if not set
 	if (!isset($_SESSION['login']['domain_name_visible']['boolean'])) { $_SESSION['login']['domain_name_visible']['boolean'] = null; }
 	if (!isset($_SESSION['login']['domain_name_visible']['boolean'])) { $_SESSION['login']['domain_name_visible']['boolean'] = null; }
 
 
+//set the requested destination after login
+	if (!empty($_REQUEST['path'])) {
+		$_SESSION['login']['destination']['url'] = $_REQUEST['path'];
+	}
+
 //set a default login destination
 //set a default login destination
 	if (strlen($_SESSION['login']['destination']['url']) == 0) {
 	if (strlen($_SESSION['login']['destination']['url']) == 0) {
 		$_SESSION['login']['destination']['url'] = PROJECT_PATH."/core/user_settings/user_dashboard.php";
 		$_SESSION['login']['destination']['url'] = PROJECT_PATH."/core/user_settings/user_dashboard.php";