Ignore:
Timestamp:
Feb 17, 2018 10:59:13 AM (6 years ago)
Author:
anonymous
Message:

Simplify HTTPS detection

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/lib/Utilities.inc.php

    r613 r623  
    14261426function absoluteMe()
    14271427{
    1428     $protocol = ('on' == getenv('HTTPS')) ? 'https://' : 'http://';
    1429     return $protocol . getenv('HTTP_HOST') . getenv('REQUEST_URI');
     1428    return sprintf('%s://%s%s', (getenv('HTTPS') ? 'https' : 'http'), getenv('HTTP_HOST'), getenv('REQUEST_URI'));
    14301429}
    14311430
Note: See TracChangeset for help on using the changeset viewer.