equal
deleted
inserted
replaced
152 |
152 |
153 // Timezone offset |
153 // Timezone offset |
154 global $timezone; |
154 global $timezone; |
155 $timezone = 0; |
155 $timezone = 0; |
156 |
156 |
|
157 // Divert to CLI loader if running from CLI |
|
158 if ( isset($argc) && isset($argv) ) |
|
159 { |
|
160 if ( is_int($argc) && is_array($argv) && !isset($_SERVER['REQUEST_URI']) ) |
|
161 { |
|
162 require(ENANO_ROOT . '/includes/common_cli.php'); |
|
163 return; |
|
164 } |
|
165 } |
|
166 |
157 // Because Enano sends out complete URLs in several occasions, we need to know what hostname the user is requesting the page from. |
167 // Because Enano sends out complete URLs in several occasions, we need to know what hostname the user is requesting the page from. |
158 // In future versions we may include a fallback "safety" host to use, but that's too much to worry about now |
168 // In future versions we may include a fallback "safety" host to use, but that's too much to worry about now |
159 if ( !isset($_SERVER['HTTP_HOST']) ) |
169 if ( !isset($_SERVER['HTTP_HOST']) ) |
160 grinding_halt('Cannot get hostname', '<p>Your web browser did not provide the HTTP Host: field. This site requires a modern browser that supports the HTTP 1.1 standard.</p>'); |
170 grinding_halt('Cannot get hostname', '<p>Your web browser did not provide the HTTP Host: field. This site requires a modern browser that supports the HTTP 1.1 standard.</p>'); |
161 |
171 |