From: Pierre Habouzit (MadCoder Date: Thu, 7 Apr 2005 09:23:06 +0000 (+0000) Subject: prepare release X-Git-Tag: xorg/old~233 X-Git-Url: http://git.polytechnique.org/?a=commitdiff_plain;h=17034478a0c6a9a29f977ce502286bd5dc33efc3;p=platal.git prepare release git-archimport-id: opensource@polytechnique.org--2005/platal--mainline--0.9--patch-527 --- diff --git a/ChangeLog b/ChangeLog index 7cafa7f..e515c29 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,5 @@ ================================================================================ -VERSION 0.9.5 24 Jan 2004 +VERSION 0.9.5 07 Apr 2004 New : @@ -7,10 +7,10 @@ New : - Improve login/exit wrt cookie. -MC * Docs : - - use of secure SMTP on a pocket PC -Car + - use of secure SMTP on a pocket PC. -Car * Fiche : - - A public fiche is now available for visiters. -Car + - A public fiche is now available for visitors. -Car * Money : - lighter code and support for a PayPal account. -Car @@ -18,7 +18,7 @@ New : * Profile : - One can choose precisely which fields appear on his public fiche. -Car - Accents and special chars in name and first name -Car - - Spouse name extended to usage name -Car + - Spouse name extended to usage name. -Car * Register : - Already subscribed members now have a warning. -MC diff --git a/include/wiki.inc.php b/include/wiki.inc.php index f8d8b6f..3e8bf50 100644 --- a/include/wiki.inc.php +++ b/include/wiki.inc.php @@ -116,13 +116,6 @@ class XOrgWikiAST class XOrgWikiParser { - // {{{ properties - - var $max_title_level = 3; - var $enable_img = true; - var $enable_hr = true; - - // }}} // {{{ constructor function XOrgWikiParser() @@ -151,25 +144,13 @@ class XOrgWikiParser function _analyse(&$line) { $types = Array(); - $modes = Array( '>'=>'blockquote', '.'=>'pre', '-'=>'ul', '#'=>'ol'); - - for ($i = 1; $i <= $this->max_title_level; $i++) { - $modes[str_pad('!', $i, '!')] = "h$i"; - } + $modes = Array( '>'=>'blockquote', '.'=>'pre', '-'=>'ul', '#'=>'ol', '!!' => 'h2', '!' => 'h1'); - /* non - nesting blocks */ - $hre = $this->max_title_level ? str_pad('!', $this->max_title_level * 2 - 1, '!?') : ''; - - if (preg_match("/^($hre|[.>])/", $line, $m)) { + if (preg_match("/^(!!?|[.>])/", $line, $m)) { $types[] = $modes[$m[1]]; return Array($types, substr($line, strlen($m[1]))); } - /* hr */ - if ($this->enable_hr && $line == '----') { - return Array(Array('hr'), ''); - } - /* nesting blocks */ $pos = 0; while ($line{$pos} == '-' || $line{$pos} == '#') { @@ -252,7 +233,7 @@ class XOrgWikiParser case '\\': if ($i + 1 < $len) { - if (strpos('*/_{}[()', $d = $line{$i+1}) !== false) { + if (strpos('*/_{}[', $d = $line{$i+1}) !== false) { $cur .= $d; $i += 2; break; @@ -289,19 +270,10 @@ class XOrgWikiParser $i ++; break; - case '(': - if (!$this->enable_img) { - break; - } case '[': - $re = ( $c=='[' ? ',^\[([^|]*)\|([^]]*)\],' : ',^\(([^|]*)\|([^)]*)\),' ); - if (preg_match($re, substr($line, $i), $m)) { + if (preg_match(',^\[([^|]*)\|([^]]*)\],', substr($line, $i), $m)) { $lexm[] = $cur; - if ($c == '[') { - $lexm[] = new XOrgWikiAST('a', Array($m[1]), Array('href'=>$m[2])); - } else { - $lexm[] = new XOrgWikiAST('img', Array($m[1]), Array('src'=>$m[2])); - } + $lexm[] = new XOrgWikiAST('a', Array($m[1]), Array('href'=>$m[2])); $cur = ''; $i += strlen($m[0]); break;