icon disappear for WAMP setup

hiwilson

Joined: 2009-06-23
Posts: 10
Posted: Wed, 2009-07-15 16:26

When upgrading to beta 2, I observe some icons (e.g. quick menu icons) disappear. I find the problem is probably due to my WAMP setup in my local computer. I made the following changes and they appears again.

at line 135 of /modules/gallery/libraries/Gallery_View.php, change from:

$relative = substr(realpath(dirname($css_file) . "/$match[1]"), $docroot_length);

to:

if (strtoupper(substr(PHP_OS, 0, 3)) === 'WIN') {
$relative = substr(dirname($css_file) . "/$match[1]", $docroot_length);
} else {
$relative = substr(realpath(dirname($css_file) . "/$match[1]"), $docroot_length);
}

The main purpose is to avoid to use realpath() function in Windows environment. Since realpath() is not used, the "../" is still keep inside the path. This change is not so beautiful and I am not sure if there is any compatibility problem. However, I just use WAMP for testing purpose, it may be good enough to just make it work. If your situation is similar to me, it may be helpful.

 
ashokjp

Joined: 2009-05-27
Posts: 14
Posted: Wed, 2009-07-15 17:22

Thanks even i had the same problem. i am on windows wamp setup. its fixed now. can this be fixed permanently in your code bharat ?

 
hiwilson

Joined: 2009-06-23
Posts: 10
Posted: Thu, 2009-07-16 01:37

I find nivekiam have already solve it at http://gallery.menalto.com/node/88980#comment-313504. I think it is better than mine. Regret not to read the forum before solving by myself.

 
nivekiam
nivekiam's picture

Joined: 2002-12-10
Posts: 16504
Posted: Thu, 2009-07-16 04:40

And I just updated the code again to move my change out of the loop so it's more efficient. Thanks bharat for the guidance.
____________________________________________
Like Gallery? Like the support? Donate now!!! See G2 live here

 
bharat
bharat's picture

Joined: 2002-05-21
Posts: 7994
Posted: Fri, 2009-07-17 18:35

This change has been pulled into the main repo, so you can just upgrade to the latest code now. Thanks, nivekiam!
---
Problems? Check gallery3/var/logs
bugs/feature req's | upgrade to the latest code | use git | help! vote!

 
nivekiam
nivekiam's picture

Joined: 2002-12-10
Posts: 16504
Posted: Fri, 2009-07-17 18:40

Thanks for the help and guidance bharat :)
____________________________________________
Like Gallery? Like the support? Donate now!!! See G2 live here