Updated check for base_url.

pull/55/merge
Mike Cao 12 years ago
parent d41795cbdc
commit 3a4a30e879

@ -101,10 +101,10 @@ class Engine {
} }
// Default configuration settings // Default configuration settings
$this->set('flight.views.path', './views');
$this->set('flight.log_errors', false);
$this->set('flight.handle_errors', true);
$this->set('flight.base_url', null); $this->set('flight.base_url', null);
$this->set('flight.handle_errors', true);
$this->set('flight.log_errors', false);
$this->set('flight.views.path', './views');
$initialized = true; $initialized = true;
} }
@ -386,10 +386,9 @@ class Engine {
* @param int $code HTTP status code * @param int $code HTTP status code
*/ */
public function _redirect($url, $code = 303) { public function _redirect($url, $code = 303) {
if ($this->get('flight.base_url') !== null) { $base = $this->get('flight.base_url');
$base = $this->get('flight.base_url');
} if ($base === null) {
else {
$base = $this->request()->base; $base = $this->request()->base;
} }

Loading…
Cancel
Save