From cdd566049d99d92236023fc759879272d8a26dc5 Mon Sep 17 00:00:00 2001 From: Michael M Slusarz Date: Tue, 15 Dec 2009 00:50:22 -0700 Subject: [PATCH] Prefer application icons to horde's icon if match level is the same. --- framework/Mime/lib/Horde/Mime/Viewer.php | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/framework/Mime/lib/Horde/Mime/Viewer.php b/framework/Mime/lib/Horde/Mime/Viewer.php index 2bc3fb807..beb7406dd 100644 --- a/framework/Mime/lib/Horde/Mime/Viewer.php +++ b/framework/Mime/lib/Horde/Mime/Viewer.php @@ -83,7 +83,7 @@ class Horde_Mime_Viewer } elseif (($ob['match'] !== 0) && ($app != 'horde')) { $obHorde = self::_getIcon($mime_type, 'horde'); if (!is_null($ob['match']) && - ($obHorde['match'] <= $ob['match'])) { + ($obHorde['match'] < $ob['match'])) { return $obHorde['url']; } } @@ -230,9 +230,11 @@ class Horde_Mime_Viewer * * @return mixed Null if not found, or an array with the following keys: *
-     * 'exact' - (integer) How exact the match is.
-     *           0 => 'exact', 1 => 'primary', 2 => 'driver',
-     *           3 => 'default', or null.
+     * 'exact' - (integer) How exact the match is. Null if no match.
+     *           0 - 'exact'
+     *           1 - 'primary'
+     *           2 - 'driver',
+     *           3 - 'default'
      * 'url' - (string) URL to an icon, or null if none could be found.
      * 
*/ @@ -279,4 +281,5 @@ class Horde_Mime_Viewer return $ret; } + } -- 2.11.0