Changeset 1328
- Timestamp:
- 06/30/09 16:07:45 (7 months ago)
- Files:
-
- trunk/lib/constants.php (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/lib/constants.php
r1252 r1328 2 2 3 3 /** 4 * This file and the lib/constants.php file perform most part of Akelos 4 * This file and the lib/constants.php file perform most part of Akelos 5 5 * environment guessing. 6 * 6 * 7 7 * You can retrieve a list of current settings by running Ak::get_constants(); 8 8 * 9 * If you're running a high load site you might want to fine tune this options 10 * according to your environment. If you set the options implicitly you might 11 * gain in performance but loose in flexibility when moving to a different 9 * If you're running a high load site you might want to fine tune this options 10 * according to your environment. If you set the options implicitly you might 11 * gain in performance but loose in flexibility when moving to a different 12 12 * environment. 13 * 14 * If you need to customize the framework default settings or specify 13 * 14 * If you need to customize the framework default settings or specify 15 15 * internationalization options, edit the files at config/environments/* 16 16 */ … … 27 27 // If you need to customize the framework default settings or specify internationalization options, 28 28 // edit the files config/testing.php, config/development.php, config/production.php 29 if(AK_ENVIRONMENT != 'setup'){ 29 if(AK_ENVIRONMENT != 'setup'){ 30 30 require_once(AK_CONFIG_DIR.DS.'environments'.DS.AK_ENVIRONMENT.'.php'); 31 31 } … … 153 153 /** 154 154 * This function sets a constant and returns it's value. If constant has been already defined it 155 * will reutrn its original value. 156 * 155 * will reutrn its original value. 156 * 157 157 * Returns null in case the constant does not exist 158 158 * … … 218 218 ($_SERVER['SERVER_ADDR'] == '::1' ? '127.0.0.1' : $_SERVER['SERVER_ADDR']) : 219 219 $_SERVER['SERVER_NAME']); 220 defined('AK_REMOTE_IP') ? null : define('AK_REMOTE_IP',( isset($_SERVER['HTTP_X_FORWARDED_FOR'])) ? $_SERVER['HTTP_X_FORWARDED_FOR'] : $_SERVER['REMOTE_ADDR']);220 defined('AK_REMOTE_IP') ? null : define('AK_REMOTE_IP',(!empty($_SERVER['HTTP_X_FORWARDED_FOR'])) ? $_SERVER['HTTP_X_FORWARDED_FOR'] : (!empty($_SERVER['REMOTE_ADDR']) ? $_SERVER['REMOTE_ADDR'] : (!empty($_ENV['HTTP_X_FORWARDED_FOR']) ? $_ENV['HTTP_X_FORWARDED_FOR'] : (empty($_ENV['REMOTE_ADDR']) ? false : $_ENV['REMOTE_ADDR'])))); 221 221 222 222 defined('AK_SERVER_STANDARD_PORT') ? null : define('AK_SERVER_STANDARD_PORT', AK_PROTOCOL == 'https://' ? '443' : '80');
