Trailing slash bug
Brought to you by:
spajot
If you access the SPGM index.php script as the default page rather than referencing it directly, the out paths will incorrectly add the folder that the script is in into the path again.
eg:
http://www.site.com/gallery/index.php >
http://www.site.com/gallery/index.php?spgmGal=MyGallery
But
http://www.site.com/gallery/ >
http://www.site.com/gallery/gallery/?spgmGal=MyGallery
Which is wrong.
Version 1.4.7
Logged In: YES
user_id=1210683
Originator: YES
Doesn't seem to affect every type of server, so I added a few lines of code to ensure that the issue resolves automatically regardless of the server install:
On definition setup:
define("ROOT_URL", 'http://'.$_SERVER['HTTP_HOST'].dirname($_SERVER['PHP_SELF']), false);
Then in the extract URL parameters section:
$spgm_cfg['global']['documentSelf'] = ROOT_URL.basename($PHP_SELF);
Works a treat now.