/[drupal]/contributions/modules/absolute_urls/absolute_urls.module
ViewVC logotype

Contents of /contributions/modules/absolute_urls/absolute_urls.module

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.1 - (show annotations) (download) (as text)
Thu Feb 26 10:55:28 2009 UTC (9 months ago) by noelbush
Branch: MAIN
CVS Tags: HEAD
File MIME type: text/x-php
initial checkin
1 <?php
2
3 /*
4 * Make 'base_path' absolute right away so that all uses of base_path() will return the absolute value.
5 */
6 function absolute_urls_init() {
7 $GLOBALS['base_path'] = 'http' .
8 ($_SERVER['HTTPS'] ? 's' : '') .
9 '://'
10 . $_SERVER['SERVER_NAME'] .
11 ($_SERVER['SERVER_PORT'] != 80 ? ':' . $_SERVER['SERVER_PORT'] : '') .
12 $GLOBALS['base_path'];
13 }

  ViewVC Help
Powered by ViewVC 1.1.2