Changeset 1750 for trunk/include/functions_url.inc.php
- Timestamp:
- Jan 24, 2007, 6:07:08 AM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/functions_url.inc.php
r1722 r1750 39 39 } 40 40 else 41 { 41 {// TODO - add HERE the possibility to call PWG functions from external scripts 42 42 $root_url = PHPWG_ROOT_PATH; 43 43 } … … 53 53 54 54 /** 55 * returns the url of the current host (e.g. http://www.toto.com ) 56 * TODO: if required by someone, treat https case 57 */ 58 function get_host_url() 59 { 60 $url = "http://"; 61 $url .= $_SERVER['HTTP_HOST']; 62 if ($_SERVER['SERVER_PORT']!=80) 63 { 64 $url .= ':'.$_SERVER['SERVER_PORT']; 65 } 55 * returns the absolute url to the root of PWG 56 * @param boolean with_scheme if false - does not add http://toto.com 57 */ 58 function get_absolute_root_url($with_scheme=true) 59 { 60 // TODO - add HERE the possibility to call PWG functions from external scripts 61 $url = ''; 62 if ($with_scheme) 63 { 64 $url .= 'http://'.$_SERVER['HTTP_HOST']; 65 if ($_SERVER['SERVER_PORT']!=80) 66 { 67 $url .= ':'.$_SERVER['SERVER_PORT']; 68 } 69 } 70 $url .= cookie_path(); 66 71 return $url; 67 72 } … … 420 425 } 421 426 $page['save_root_path']['count'] = 1; 422 $page['root_path'] = get_ host_url().cookie_path();427 $page['root_path'] = get_absolute_root_url(); 423 428 } 424 429 else
Note: See TracChangeset
for help on using the changeset viewer.