Browse Source

Notice PHP en moins. ([1] pas tout le temps trouvé.)

svn/root/tags/plugins/textwheel/1.6.0
marcimat@rezo.net 4 years ago
parent
commit
4b9e6cb57b
  1. 7
      inc/ressource.php

7
inc/ressource.php

@ -47,8 +47,11 @@ function tw_traiter_ressources($r) {
$html = PtoBR(propre("<span class='ressource spip_in'>&lt;[->" . $url . "]&gt;</span>"));
} # <fichier.rtf>
else {
preg_match(',\.([^.]+)$,', $url, $regs);
if (file_exists($f = _DIR_IMG . $regs[1] . '/' . $url)) {
if (
preg_match(',\.([^.]+)$,', $url, $regs)
and file_exists($f = _DIR_IMG . $regs[1] . '/' . $url)
) {
$html = PtoBR(propre("<span class='ressource spip_in'>&lt;[" . $url . "->" . $f . "]&gt;</span>"));
} else {
$html = PtoBR(propre("<span class='ressource'>&lt;" . $url . "&gt;</span>"));

Loading…
Cancel
Save