prepare release
authorPierre Habouzit (MadCoder <pierre.habouzit@m4x.org>
Thu, 7 Apr 2005 09:23:06 +0000 (09:23 +0000)
committerFlorent Bruneau <florent.bruneau@polytechnique.org>
Thu, 26 Jun 2008 21:28:23 +0000 (23:28 +0200)
git-archimport-id: opensource@polytechnique.org--2005/platal--mainline--0.9--patch-527

ChangeLog
include/wiki.inc.php

index 7cafa7f..e515c29 100644 (file)
--- 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
index f8d8b6f..3e8bf50 100644 (file)
@@ -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;