function __construct($id = null)
{
- parent::__construct('newsletter/nl.tpl', 'nl.css', 'nl/show');
+ parent::__construct('newsletter/nl.tpl', 'nl.css', 'nl/show', 'newsletter', 'newsletter_ins');
if (isset($id)) {
if ($id == 'last') {
$res = XDB::query("SELECT MAX(id) FROM newsletter WHERE bits!='new'");
VALUES ({?}, 0)", $user);
}
- protected function subscriptionTable()
- {
- return 'newsletter_ins';
- }
-
protected function subscriptionWhere()
{
return '1';
public function toText()
{
$title = '*'.$this->title().'*';
- $body = enriched_to_text($this->_body,false,true);
- $app = enriched_to_text($this->_append,false,false,4);
+ $body = MiniWiki::WikiToText($this->_body,true);
+ $app = MiniWiki::WikiToText($this->_append,false,4);
return trim("$title\n\n$body\n\n$app")."\n";
}
public function toHtml()
{
- $title = "<h2 class='xorg_nl'><a id='art{$this->_aid}'></a>".htmlentities($this->title()).'</h2>';
- $body = enriched_to_text($this->_body,true);
- $app = enriched_to_text($this->_append,true);
+ $title = "<h2 class='xorg_nl'><a id='art{$this->_aid}'></a>".pl_entities($this->title()).'</h2>';
+ $body = MiniWiki::WikiToHTML($this->_body);
+ $app = MiniWiki::WikiToHTML($this->_append);
$art = "$title\n";
$art .= "<div class='art'>\n$body\n";
public function check()
{
- $text = enriched_to_text($this->_body);
+ $text = MiniWiki::WikiToText($this->_body);
$arr = explode("\n",wordwrap($text,68));
$c = 0;
foreach ($arr as $line) {
// }}}
-// vim:set et sw=4 sts=4 sws=4:
+// vim:set et sw=4 sts=4 sws=4 enc=utf-8:
?>