Skip to content
Extraits de code Groupes Projets
Valider 4645882c rédigé par cerdic's avatar cerdic
Parcourir les fichiers

complement a [13854]

parent 7bfb5e1f
Branches
Étiquettes
Aucune requête de fusion associée trouvée
......@@ -49,7 +49,21 @@ function get_spip_doc($fichier) {
// http://doc.spip.org/@contenu_document
function contenu_document($arg)
{
return spip_file_get_contents(get_spip_doc($arg));
if (is_numeric($arg)) {
$r = sql_fetsel("fichier,distant", "spip_documents", "id_document=".sql_quote($arg));
if (!$r) return '';
$f = $r['fichier'];
$f = ($r['distant'] =='oui') ? _DIR_RACINE . copie_locale($f) : get_spip_doc($f);
}
else {
if (!@file_exists($f=$arg)){
if (!$f = copie_locale($f))
return '';
$f = _DIR_RACINE . $f;
}
}
return spip_file_get_contents($f);
}
// http://doc.spip.org/@generer_url_document_dist
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Veuillez vous inscrire ou vous pour commenter