Subversion Repositories Applications.papyrus

Compare Revisions

Ignore whitespace Rev 841 → Rev 842

/trunk/api/text/wiki_papyrus/Parse/Lien.php
1,5 → 1,5
<?php
// $Id: Lien.php,v 1.1 2006-05-10 16:02:49 ddelon Exp $
// $Id: Lien.php,v 1.2 2006-05-10 19:21:47 ddelon Exp $
 
 
/**
15,7 → 15,7
*/
class Text_Wiki_Parse_Lien extends Text_Wiki_Parse {
var $regex = '/\{\{Lien ((?:menu)|(?:site))="((?:\w+)|(?:\d+))" *\}\}/';
var $regex = '/\{\{Lien ((?:menu)|(?:site))="((?:\w+)|(?:\d+))" (?:(?:titre)="(.*)")* *\}\}/';
/**
*
34,9 → 34,11
*/
function process(&$matches)
{
if (!isset($matches[3])) $matches[3]='';
$options = array(
'niveau' => $matches[1],
'identifiant' => $matches[2]
'identifiant' => $matches[2],
'titre' => $matches[3]
);
return $this->wiki->addToken($this->rule, $options);
/trunk/api/text/wiki_papyrus/Render/Xhtml/Lien.php
22,6 → 22,7
$sortie = '';
$niveau = $options['niveau'];
$identifiant = $options['identifiant'];
$titre = $options['titre'];
$bdd =& $GLOBALS['_GEN_commun']['pear_db'];
$id_langue = $GLOBALS['_GEN_commun']['i18n']; //identifiant de la langue choisie
35,7 → 36,7
$une_url =& new Pap_URL('http://'.$_SERVER['HTTP_HOST'].$_SERVER['PHP_SELF']);
$titre='';
$nom='';
if ($niveau=="site") {
70,12 → 71,13
$aso_site=$resultat_traduction->fetchRow(DB_FETCHMODE_ASSOC);
}
if (!empty($aso_site['gs_nom'])) {
$titre = $aso_site['gs_nom'];
} else {
$titre = $aso_site['gs_titre'];
}
if ($titre=='') {
if (!empty($aso_site['gs_nom'])) {
$titre = $aso_site['gs_nom'];
} else {
$titre = $aso_site['gs_titre'];
}
}
}
113,14 → 115,14
$aso_menu=$resultat_traduction->fetchRow(DB_FETCHMODE_ASSOC);
}
if (!empty($aso_menu['gm_nom'])) {
$titre = $aso_menu['gm_nom'];
}
elseif (!empty($menu_valeur['gm_titre'])) {
$titre = $aso_menu['gm_titre'];
}
if ($titre=='') {
if (!empty($aso_menu['gm_nom'])) {
$titre = $aso_menu['gm_nom'];
}
elseif (!empty($menu_valeur['gm_titre'])) {
$titre = $aso_menu['gm_titre'];
}
}
}