thomascube
2009-10-31 7e76b00fec07bf5cb799065aedfeb1266f76481b
index.php
@@ -2,7 +2,7 @@
/*
 +-------------------------------------------------------------------------+
 | RoundCube Webmail IMAP Client                                           |
 | Version 0.3-20090814                                                    |
 | Version 0.3.1-20091031                                                  |
 |                                                                         |
 | Copyright (C) 2005-2009, RoundCube Dev. - Switzerland                   |
 |                                                                         |
@@ -61,6 +61,15 @@
// error steps
if ($RCMAIL->action=='error' && !empty($_GET['_code'])) {
  raise_error(array('code' => hexdec($_GET['_code'])), FALSE, TRUE);
}
// check if https is required (for login) and redirect if necessary
if (empty($_SESSION['user_id']) && ($force_https = $RCMAIL->config->get('force_https', false))) {
  $https_port = is_bool($force_https) ? 443 : $force_https;
  if (!rcube_https_check($https_port)) {
    header('Location: https://' . $_SERVER['HTTP_HOST'] . ($https_port != 443 ? ':' . $https_port : '') . $_SERVER['REQUEST_URI']);
    exit;
  }
}
// trigger startup plugin hook
@@ -159,7 +168,7 @@
    $OUTPUT->redirect(array(), 2000);
  
  if (!empty($_REQUEST['_framed']))
    $OUTPUT->command('redirect', $OUTPUT->app->url());
    $OUTPUT->command('redirect', '?');
  // check if installer is still active
  if ($RCMAIL->config->get('enable_installer') && is_readable('./installer/index.php')) {