Changeset 527 for trunk/lib/App.inc.php
- Timestamp:
- Jun 18, 2015 7:03:20 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/lib/App.inc.php
r526 r527 73 73 'site_name' => null, 74 74 'site_email' => '', // Set to no-reply@HTTP_HOST if not set here. 75 'site_url' => '', // URL automatically determined by _SERVER['HTTP_HOST'] if not set here. 75 'site_url' => '', // URL to the root of the site (created during App->start()). 76 'page_url' => '', // URL to the current page (created during App->start()). 76 77 'images_path' => '', // Location for codebase-generated interface widgets (ex: "/admin/i"). 77 78 'site_version' => '', // Version of this application (set automatically during start() if site_version_file is used). … … 424 425 */ 425 426 426 // S cript URI will be something like http://host.name.tld (no ending slash)427 // Site URL will become something like http://host.name.tld (no ending slash) 427 428 // and is used whenever a URL need be used to the current site. 428 // Not available on cliscripts obviously.429 // Not available on CLI scripts obviously. 429 430 if (isset($_SERVER['HTTP_HOST']) && '' != $_SERVER['HTTP_HOST'] && '' == $this->getParam('site_url')) { 430 431 $this->setParam(array('site_url' => sprintf('%s://%s', ('on' == getenv('HTTPS') ? 'https' : 'http'), getenv('HTTP_HOST')))); 432 } 433 434 // Page URL will become a permalink to the current page. 435 // Also not available on CLI scripts obviously. 436 if (isset($_SERVER['HTTP_HOST']) && '' != $_SERVER['HTTP_HOST']) { 437 $this->setParam(array('page_url' => sprintf('%s://%s%s', ('on' == getenv('HTTPS') ? 'https' : 'http'), getenv('HTTP_HOST'), getenv('REQUEST_URI')))); 431 438 } 432 439
Note: See TracChangeset
for help on using the changeset viewer.