Index: CommentModeration.jplug.php
===================================================================
--- CommentModeration.jplug.php	(revision 1779)
+++ CommentModeration.jplug.php	(working copy)
@@ -89,16 +89,16 @@
 	 */
 	function hook_adminMail($mail, $blogentry) {
 		$trashURL = '/admin/comments.php?action=trash&id=';
-		$matches = array();
-
-		if (($pos = strrpos($mail['text'], $trashURL)) !== FALSE)
+		$matches  = array();
+        $text     = $mail->getText();
+        
+		if (($pos = strrpos($text, $trashURL)) !== FALSE)
 		{
-			$rest = substr($mail['text'], $pos);
-
-			if (preg_match('/([0-9]+)/', $rest, $matches))
-				$mail['text'] .= "\n\nKommentar genehmigen\n" .
+			if (preg_match('/([0-9]+)/', $text, $matches, null, $pos))
+				$text .= "\n\nKommentar genehmigen\n" .
 					JLOG_PATH . '/admin/plugin.php?jplug=CommentModeration&allow=' .
 					$matches[0];
+			$mail->setText($text);
 		}
 
 		return $mail;

