From: dj3c1t Date: Sun, 20 Oct 2013 11:57:45 +0000 (+0200) Subject: nom falcultatif des fichiers (nom = extention par defaut) X-Git-Tag: sourceml.0.16.3 X-Git-Url: http://git.dj3c1t.com/?p=mw_sourceml;a=commitdiff_plain;h=e5d00ef01189f81a8e80883f98ee0b44e3e6a9b5 nom falcultatif des fichiers (nom = extention par defaut) --- diff --git a/app/out/default/views/sources/source/documents.php b/app/out/default/views/sources/source/documents.php index df8d6a8..540057a 100644 --- a/app/out/default/views/sources/source/documents.php +++ b/app/out/default/views/sources/source/documents.php @@ -37,12 +37,14 @@
1) $ext = $ext[count($ext) - 1]; - else $ext = $document["url"]; - if(strlen($ext) > 16) $ext = "(...) ".substr($ext, -16); + if(!($nom = $document["nom"])){ + $nom = explode(".", $document["url"]); + if(count($nom) > 1) $nom = $nom[count($nom) - 1]; + else $nom = $document["url"]; + if(strlen($nom) > 16) $nom = "(...) ".substr($nom, -16); + } ?> - " title="esc_attr($document["nom"]); ?>"> + " title="esc_attr($document["nom"]); ?>">