Ticket #204: CommentModeration-patch-for-jlog1.1.3.diff
| File CommentModeration-patch-for-jlog1.1.3.diff, 944 bytes (added by driehle, 3 years ago) |
|---|
-
CommentModeration.jplug.php
89 89 */ 90 90 function hook_adminMail($mail, $blogentry) { 91 91 $trashURL = '/admin/comments.php?action=trash&id='; 92 $matches = array(); 93 94 if (($pos = strrpos($mail['text'], $trashURL)) !== FALSE) 92 $matches = array(); 93 $text = $mail->getText(); 94 95 if (($pos = strrpos($text, $trashURL)) !== FALSE) 95 96 { 96 $rest = substr($mail['text'], $pos); 97 98 if (preg_match('/([0-9]+)/', $rest, $matches)) 99 $mail['text'] .= "\n\nKommentar genehmigen\n" . 97 if (preg_match('/([0-9]+)/', $text, $matches, null, $pos)) 98 $text .= "\n\nKommentar genehmigen\n" . 100 99 JLOG_PATH . '/admin/plugin.php?jplug=CommentModeration&allow=' . 101 100 $matches[0]; 101 $mail->setText($text); 102 102 } 103 103 104 104 return $mail;
