Menu

#25 HTTPS - including patch

open
nobody
None
5
2011-11-25
2011-11-25
Anonymous
No

Pgrfilemanager does't work if the filemanager is only accessed with https

This fix it

diff php/files.php php/files.php.old
29c29,32
< PGRFileManagerConfig::$pgrThumbPath = 'http://' . $_SERVER['SERVER_NAME'] . substr(dirname($_SERVER['PHP_SELF']), 0, strlen(dirname($_SERVER['PHP_SELF'])) - 3) . 'PGRThumb';
---
>
> $proto = (isset($_SERVER['HTTPS']) && ($_SERVER['HTTPS'] == 'on'))?'https':'http';
>
> PGRFileManagerConfig::$pgrThumbPath = $proto.'://' . $_SERVER['SERVER_NAME'] . substr(dirname($_SERVER['PHP_SELF']), 0, strlen(dirname($_SERVER['PHP_SELF'])) - 3) . 'PGRThumb';

Best regards

Discussion


Log in to post a comment.

MongoDB Logo MongoDB