Browse Source

Link in Email funktioniert nun wieder korrekt

master
root 2 years ago
parent
commit
93fd6877da
1 changed files with 4 additions and 1 deletions
  1. 4
    1
      includes/Comment.class.php

+ 4
- 1
includes/Comment.class.php View File

@@ -378,13 +378,16 @@ class Comment extends ContextSource {
378 378
 
379 379
 		Hooks::run( 'Comment::add', array( $comment, $commentId, $comment->page->id ) );
380 380
 		/* ## START Kommentar auch per Email versenden ## 11/2014 Bernhard Linz */
381
-			$znilpageTitle = "";
381
+            //$title = Title::makeTitle( NS_USER, $this->username );
382
+			$znilpageTitle = Title::newFromID( $comment->page->id );
382 383
 			$comment_mailto = "root@linz.email";
383 384
 			$comment_mailsubject = "Neuer Kommentar von: " . $kok_username . " - IP: " . $_SERVER['REMOTE_ADDR'] . " - DNS: " . gethostbyaddr($_SERVER['REMOTE_ADDR']) ;
384 385
 			$comment_mailfrom = "MIME-Version: 1.0\r\n";
385 386
 			$comment_mailfrom .= "Content-type: text/html; charset=utf-8\r\n";
386 387
 			$comment_mailfrom .= "From: znil.net Kommentare <root@linz.email>\r\n";
388
+//			$comment_url = $znilpageTitle;
387 389
 			$comment_url = "<a href=\"http://znil.net/index.php?title={$znilpageTitle}#comment-{$commentId}\">http://znil.net/index.php?title={$znilpageTitle}#comment-{$commentId}</a>";
390
+//			$comment_url = "<a href=\"" . $title->getFullURL() . "\">" . $title->getFullURL() . "</a>";
388 391
 			$comment_mailtext = $commentDate . "<br><br>" . $comment_url . "<br><br><hr>" . "IP: " . $_SERVER['REMOTE_ADDR'] . "<br>" . "DNS: " . gethostbyaddr($_SERVER['REMOTE_ADDR']) ."<br><br>" . $kok_username . "<br><br>" . $text;
389 392
 			$comment_mailtext = nl2br($comment_mailtext);
390 393
 			mail($comment_mailto, $comment_mailsubject, $comment_mailtext, $comment_mailfrom);

Loading…
Cancel
Save