X-Git-Url: http://git.polytechnique.org/?a=blobdiff_plain;f=include%2Fnewsletter.inc.php;h=fc94a031a13c262f85bc2144525a800d947cb384;hb=dfcccfc0f277d90e5ef4af1e6b33ef3e1e76d6e2;hp=07aac94d71263ef535829677b5cf6d4893fea838;hpb=08fa70684fd1332178cddb6b318151335fb4506c;p=platal.git diff --git a/include/newsletter.inc.php b/include/newsletter.inc.php index 07aac94..fc94a03 100644 --- a/include/newsletter.inc.php +++ b/include/newsletter.inc.php @@ -1,6 +1,6 @@ title().'*'; $body = MiniWiki::WikiToText($this->_body, true); $app = MiniWiki::WikiToText($this->_append,false,4); - return trim("$title\n\n$body\n\n$app")."\n"; + $text = trim("$title\n\n$body\n\n$app")."\n"; + if (!is_null($hash) && !is_null($login)) { + $text = str_replace('%HASH%', "$hash/$login", $text); + } else { + $text = str_replace('%HASH%', '', $text); + } + return $text; } // }}} // {{{ function toHtml() - public function toHtml() + public function toHtml($hash = null, $login = null) { $title = "