diff options
author | thomascube <thomas@roundcube.net> | 2008-09-21 12:50:15 +0000 |
---|---|---|
committer | thomascube <thomas@roundcube.net> | 2008-09-21 12:50:15 +0000 |
commit | 7d7f67dde1ef87826bde757bce36bb448aae14e0 (patch) | |
tree | 5e137c53d8a0aeea80aa121539a664b08b60c1ed /installer/index.php | |
parent | 2fd6c217a3d61f5204c8b474f27e5cd060a2fc87 (diff) |
Apply changes of installer script to trunk
Diffstat (limited to 'installer/index.php')
-rw-r--r-- | installer/index.php | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/installer/index.php b/installer/index.php index ff31667f9..d14e6ff37 100644 --- a/installer/index.php +++ b/installer/index.php @@ -31,12 +31,18 @@ function __autoload($classname) $RCI = rcube_install::get_instance(); $RCI->load_config(); -if (isset($_GET['_getfile']) && in_array($_GET['_getfile'], array('main', 'db'))) -{ - header('Content-type: text/plain'); - header('Content-Disposition: attachment; filename="'.$_GET['_getfile'].'.inc.php"'); - echo $RCI->create_config($_GET['_getfile']); - exit; +if (isset($_GET['_getfile']) && in_array($_GET['_getfile'], array('main', 'db'))) { + $filename = $_GET['_getfile'] . '.inc.php'; + if (!empty($_SESSION[$filename])) { + header('Content-type: text/plain'); + header('Content-Disposition: attachment; filename="'.$filename.'"'); + echo $_SESSION[$filename]; + exit; + } + else { + header('HTTP/1.0 404 Not found'); + die("The requested configuration was not found. Please run the installer from the beginning."); + } } ?> |