Subversion Repositories Applications.papyrus

Rev

Rev 841 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 841 Rev 842
Line 1... Line 1...
1
<?php
1
<?php
2
// $Id: Lien.php,v 1.1 2006-05-10 16:02:49 ddelon Exp $
2
// $Id: Lien.php,v 1.2 2006-05-10 19:21:47 ddelon 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_Lien extends Text_Wiki_Parse {
16
class Text_Wiki_Parse_Lien extends Text_Wiki_Parse {
Line 17... Line 17...
17
    
17
    
Line 18... Line 18...
18
    var $regex = '/\{\{Lien ((?:menu)|(?:site))="((?:\w+)|(?:\d+))" *\}\}/';
18
    var $regex = '/\{\{Lien ((?:menu)|(?:site))="((?:\w+)|(?:\d+))" (?:(?:titre)="(.*)")* *\}\}/';
19
    
19
    
20
    /**
20
    /**
21
    * 
21
    * 
Line 32... Line 32...
32
    * the source text, plus any text priot to the match.
32
    * the source text, plus any text priot to the match.
33
    *
33
    *
34
    */
34
    */
35
    function process(&$matches)
35
    function process(&$matches)
36
    {
36
    {
-
 
37
    	if (!isset($matches[3])) $matches[3]=''; 
37
        $options = array(
38
        $options = array(
38
            'niveau' => $matches[1],
39
            'niveau' => $matches[1],
39
            'identifiant' => $matches[2]
40
            'identifiant' => $matches[2],
-
 
41
            'titre' => $matches[3]
40
        );
42
        );
Line 41... Line 43...
41
        
43
        
42
        return $this->wiki->addToken($this->rule, $options);
44
        return $this->wiki->addToken($this->rule, $options);