diff -r 99818fb06412 wacko/formatters/classes/paragrafica.php --- a/wacko/formatters/classes/paragrafica.php Tue Jul 24 18:03:48 2012 +0200 +++ b/wacko/formatters/classes/paragrafica.php Sun Aug 05 14:10:10 2012 +0200 @@ -261,7 +261,7 @@ "|". "<\!--action:begin-->include\s+[^=]+=([^\xA1 ]+)(\s+notoc=\"?[^0]\"?)?.*?<\!--action:end-->". // {{include xxxx="TAG" notoc="1"}} - "!si", array( &$this, 'add_toc_entry' ), $what ); + "!i", array( &$this, 'add_toc_entry' ), $what ); return $what; } @@ -269,9 +269,12 @@ // for further TOC creation routines function add_toc_entry($matches) { + if (!isset($matches[6])) $matches[6] = ''; + if (!isset($matches[8])) $matches[8] = ''; + if ((isset($matches[7])) && $matches[7] != '') { - if (isset($matches[8]) && $matches[8] == '') + if ($matches[8] == '') { $this->toc[] = array($this->wacko->unwrap_link(trim($matches[7],'"')), '(include)', 99999); } @@ -279,7 +282,7 @@ else { // id, text, depth - if ((isset($matches[6])) && $matches[6] != '') + if ($matches[6] != '') { $this->toc[] = array($matches[6], '(p)', 77777); }