6.0.0-git
2017-09-22

[#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 2004-09-23 (4747 days ago)
Due
Updated 2004-09-24 (4746 days ago)
Assigned
Resolved 2004-09-24 (4746 days ago)
Milestone
Patch No

History
2004-09-24 02:57:06 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.
2004-09-23 17:55:48 kyrian (at) ore (dot) org Comment #1
Type ⇒ Bug
State ⇒ Unconfirmed
Priority ⇒ 1. Low
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