Subversion Repositories Applications.papyrus

Compare Revisions

Regard whitespace Rev 2151 → Rev 2152

/trunk/papyrus/bibliotheque/fonctions/pap_meta.fonct.php
89,6 → 89,7
}
}
 
 
/**
* Stocke une <meta> du type <meta property="truc" content="chose">
* @param string $id
95,14 → 96,14
* @param string $property
* @param string $content
*/
function GEN_stockerMetaProperty($id, $property, $content)
function GEN_stockerMetaProperty($id, $content)
{
if (empty($GLOBALS['_GEN_commun']['meta_property'][$id])) {
$GLOBALS['_GEN_commun']['meta_property'][$id] = array($property, $content);
$GLOBALS['_GEN_commun']['meta_property'][$id] = $content;
} else {
die('ERREUR Papyrus : cette balise meta à déjà été enregistrée par GEN_stockerMetaProperty(). <br />'.
die('ERREUR Papyrus : cette balise meta à déjà été enregistrée par GEN_stockerMetaProperty(). <br />'.
'Identifiant : '. $id .'<br />'.
'Ligne n° : '. __LINE__ .'<br />'.
'Ligne n° : '. __LINE__ .'<br />'.
'Fichier : '. __FILE__);
}
}
113,14 → 114,14
* @param string $property
* @param string $content
*/
function GEN_modifierMetaProperty($id, $property, $content)
function GEN_modifierMetaProperty($id, $content)
{
if ($property != '' && $content != '') {
$GLOBALS['_GEN_commun']['meta_property'][$id] = array($property, $content);
if ($content != '') {
$GLOBALS['_GEN_commun']['meta_property'][$id] = $content;
} else {
die('ERREUR Papyrus : cette balise ne peut avoir une propriété ou un contenu vide. <br />'.
die('ERREUR Papyrus : cette balise ne peut avoir un contenu vide. <br />'.
'Contenu : '. $content .'<br />'.
'Ligne n° : '. __LINE__ .'<br />'.
'Ligne n° : '. __LINE__ .'<br />'.
'Fichier : '. __FILE__);
}
}
255,8 → 256,8
}
} else if ($type == 'property' && isset($GLOBALS['_GEN_commun']['meta_property'])) {
while (list($cle, $valeur) = each($GLOBALS['_GEN_commun']['meta_property'])) {
if (! empty($valeur['contenu'])) {
$sortie .= str_repeat(' ', 8).'<meta property="'.$valeur[0].'" content="'.$valeur[1].'" />'."\n";
if (! empty($valeur)) {
$sortie .= '<meta property="'.$cle.'" content="'.$valeur.'" />'."\n";
}
}
if (empty($sortie)) {