Subversion Repositories Applications.papyrus

Rev

Rev 335 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 335 Rev 408
Line 1... Line 1...
1
<?php
1
<?php
2
// $Id: Nouveaute.php,v 1.1 2005-04-14 16:35:36 jpm Exp $
2
// $Id: Nouveaute.php,v 1.2 2005-07-08 15:16:54 alexandre_tb Exp $
Line 3... Line 3...
3
 
3
 
4
 
4
 
5
/**
5
/**
Line 13... Line 13...
13
* @package Text_Wiki
13
* @package Text_Wiki
14
*
14
*
15
*/
15
*/
16
class Text_Wiki_Parse_Nouveaute extends Text_Wiki_Parse {
16
class Text_Wiki_Parse_Nouveaute extends Text_Wiki_Parse {
Line 17... Line 17...
17
    
17
    
Line 18... Line 18...
18
    var $regex = '/\{\{Nouveaute nombre="([1-9][0-9]*)"(?: type="(mineure|majeure)"|)(?: site="((?i:[,-]|\w|\s)+)"|)\}\}/';
18
    var $regex = '/\{\{Nouveaute nombre="([1-9][0-9]*)"(?: categorie="(.+?)"|)(?: type="(mineure|majeure)"|)(?: site="((?i:[,-]|\w|\s)+)"|)\}\}/';
19
    
19
    
20
    /**
20
    /**
21
    * 
21
    * 
Line 34... Line 34...
34
    */
34
    */
35
    function process(&$matches)
35
    function process(&$matches)
36
    {
36
    {
37
        $options = array(
37
        $options = array(
38
            'nombre' => $matches[1],
38
            'nombre' => $matches[1],
-
 
39
            'categorie' => $matches[2],
39
            'type' => $matches[2],
40
            'type' => $matches[3],
40
            'site' => $matches[3]
41
            'site' => $matches[4]
41
        );
42
        );
Line 42... Line 43...
42
        
43
        
43
        return $this->wiki->addToken($this->rule, $options);
44
        return $this->wiki->addToken($this->rule, $options);