X-Git-Url: http://git.dj3c1t.com/?a=blobdiff_plain;f=app%2Fout%2Fdefault%2Fviews%2Fsources%2Fsource%2Fdocuments.php;h=239642315b9bf10258d9fdb25ea4fdffae3a9bc7;hb=8fd286a6a89f98742e6d8916622778df974a5bfd;hp=df8d6a82e8c18c7208c885a36ee97518a290f2cb;hpb=39104f779d37b7e4dc361e25326f5b40f011797c;p=mw_sourceml
diff --git a/app/out/default/views/sources/source/documents.php b/app/out/default/views/sources/source/documents.php
index df8d6a8..2396423 100644
--- a/app/out/default/views/sources/source/documents.php
+++ b/app/out/default/views/sources/source/documents.php
@@ -3,51 +3,25 @@
$documents = $source["reference"] ? $source["reference"]["documents"] : $source["documents"];
if($documents) :
$mw_out = $this->helper("mw_helper_out");
+
?>
- $document) :
- $ext = "";
- $audio_type = "";
- if(($k = strrpos($document["url"], ".")) !== false) $ext = strtolower(substr($document["url"], $k + 1));
- switch($ext){
- case "ogg":
- $audio_type = "audio/ogg";
- break;
- case "mp3":
- $audio_type = "audio/mp3";
- break;
- }
-
- ?>
-
+ $document) : ?>
- ">
-
-
-
-
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"]); ?>">
-
-
+
-
-
+