6.0.0-alpha14
6/29/25

[#626] MIME type icons broken if graphics not a subdir of IMP root.
Summary MIME type icons broken if graphics not a subdir of IMP root.
Queue IMP
Queue Version 4.0-ALPHA
Type Bug
State Resolved
Priority 1. Low
Owners
Requester kyrian (at) ore (dot) org
Created 09/23/2004 (7584 days ago)
Due
Updated 09/24/2004 (7583 days ago)
Assigned
Resolved 09/24/2004 (7583 days ago)
Github Issue Link
Github Pull Request
Milestone
Patch No

History
09/24/2004 02:57:06 AM Chuck Hagenbuch Comment #2
State ⇒ Resolved
Reply to this comment
I've fixed this in CVS (it'll be in the beta and final release, as 
well as available now from HEAD) by simply using 
$registry->getParam('graphics') instead of introducing a new function.
(and yes, it was hell to get it working through an existing CMS that wasn't
Horde_Template based)
Yes, well, if you'd like to contribute any patches that work well with 
Horde while making that easier, you'd be most welcome to.
09/23/2004 05:55:48 PM kyrian (at) ore (dot) org Comment #1
State ⇒ Unconfirmed
Priority ⇒ 1. Low
Type ⇒ Bug
Summary ⇒ MIME type icons broken if graphics not a subdir of IMP root.
Queue ⇒ IMP
Reply to this comment
Hiya,



IMP 4.0 ALPHA, running through a CMS system (and yes, it was hell to 
get it working through an existing CMS that wasn't Horde_Template 
based), whereby the "graphics" directory isn't a standard subdirectory 
of the IMP application root, which broke the MIME type icons.



This can easily be fixed by replacing the call to applicationWebPath 
in lib/Horde/MIME/Viewer.php, at about line 423 to a new function 
called applicationGraphicsPath, and making that new function access 
the graphics path instead of the webroot path, and appending 
'/graphics' onto it, ie:



     function applicationGraphicsPath($path, $app = null)

     {

         if (!isset($app)) {

             $app = $this->_currentApp;

         }



         if (!$this->applications[$app]['graphics']) {

             return str_replace('%application%', 
$this->applications[$app]['webroot'].'/graphics', $path);

         } else {

             return str_replace('%application%', 
$this->applications[$app]['graphics'], $path);

         }

     }



I've done this for $client running Horde stuff, and it works for me.



Yours,



Kev, oRe Net.

Saved Queries