From a5e29e8fc07d911853dc09f3d5eba7ed0191c932 Mon Sep 17 00:00:00 2001
From: Cerdic <cedric@yterium.com>
Date: Sat, 6 May 2006 22:11:08 +0000
Subject: [PATCH] corrige #232 a minima en attendant le rangement pour la 2.0

---
 ecrire/inc/distant.php | 2 ++
 ecrire/inc/logos.php   | 4 ++++
 2 files changed, 6 insertions(+)

diff --git a/ecrire/inc/distant.php b/ecrire/inc/distant.php
index 4c45732016..972be3fc69 100644
--- a/ecrire/inc/distant.php
+++ b/ecrire/inc/distant.php
@@ -204,6 +204,8 @@ function fichier_copie_locale($source) {
 	// Si c'est une image de IMG/ pas de souci
 	if (preg_match(',^'._DIR_IMG.',', $source))
 		return $source;
+	else if (preg_match(',^'._DIR_IMG_PACK.',', $source))
+		return $source;
 
 	// Si l'extension n'est pas precisee, aller la chercher dans la table
 	// des documents -- si la source n'est pas dans la table des documents,
diff --git a/ecrire/inc/logos.php b/ecrire/inc/logos.php
index 755fc5381d..898e52b93d 100644
--- a/ecrire/inc/logos.php
+++ b/ecrire/inc/logos.php
@@ -16,6 +16,8 @@ function cherche_image_nommee($nom, $formats = array ('gif', 'jpg', 'png')) {
 
 	if (ereg("^" . _DIR_IMG, $nom)) {
 		$nom = substr($nom,strlen(_DIR_IMG));
+	} else 	if (ereg("^" . _DIR_IMG_ICONES_DIST, $nom)) {
+		$nom = substr($nom,strlen(_DIR_IMG_ICONES_DIST));
 	}
 	$pos = strrpos($nom, "/");
 	if ($pos > 0) {
@@ -29,6 +31,8 @@ function cherche_image_nommee($nom, $formats = array ('gif', 'jpg', 'png')) {
 	while (list(, $format) = each($formats)) {
 		if (@file_exists(_DIR_IMG . "$chemin$nom.$format")){ 
 			return array((_DIR_IMG . $chemin), $nom, $format);
+		} else if (@file_exists(_DIR_IMG_ICONES_DIST . "$chemin$nom.$format")){ 
+			return array((_DIR_IMG_ICONES_DIST . $chemin), $nom, $format);
 		}
 	}
 }
-- 
GitLab