Ver código fonte

added notify link to mail

Piotr Labudda 10 anos atrás
pai
commit
8617c2fa23
1 arquivos alterados com 7 adições e 2 exclusões
  1. 7 2
      SE/se-lib/Route/Notify.php

+ 7 - 2
SE/se-lib/Route/Notify.php

@@ -210,8 +210,13 @@ function refreshPreview() {
 		$subject = "Powiadomienia - {$_SERVER['SERVER_NAME']} - " . date("Y-m-d") . " - {$usrLogin}";
 		ob_start();
 		$this->viewUserReminders($usrReminders, $usrLogin);
-		echo '<br><br>' . "\n";
-		echo "Wiadomość została wygenerowana autoamtycznie." . "\n\n";
+		echo "\n\n<br><br>\nWiadomość została wygenerowana autoamtycznie." . "\n\n";
+		{
+			$baseUrl = "https://{$_SERVER['SERVER_NAME']}/SE";
+			if ('biuro.biall-net.pl' == $_SERVER['SERVER_NAME']) $baseUrl = "https://{$_SERVER['SERVER_NAME']}/SE/version-git";
+			$notifyLink = "{$baseUrl}/index.php?_route=Notify";
+			echo "<br><br>\nPowiadomienia można ustawić na: <a href=\"{$notifyLink}\">{$notifyLink}</a>." . "\n\n";
+		}
 		$message = ob_get_clean();
 
 		if (!mail($to, $subject, $message, $headers)) throw new Exception("Nie udało się wysłać powiadomienia");