diff options
| author | thomasb <thomasb@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2008-09-21 12:50:15 +0000 |
|---|---|---|
| committer | thomasb <thomasb@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2008-09-21 12:50:15 +0000 |
| commit | e201e1711d9e904e4119694808136bc3973dd71a (patch) | |
| tree | 73dd2da4140efc14d90f8ba46fdaa99da2aa9a82 /roundcubemail/installer/index.php | |
| parent | cb3ad1ce49b485360ddfd36ef59be44b762c748a (diff) | |
Apply changes of installer script to trunk
git-svn-id: https://svn.roundcube.net/trunk@1877 208e9e7b-5314-0410-a742-e7e81cd9613c
Diffstat (limited to 'roundcubemail/installer/index.php')
| -rw-r--r-- | roundcubemail/installer/index.php | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/roundcubemail/installer/index.php b/roundcubemail/installer/index.php index ff31667f9..d14e6ff37 100644 --- a/roundcubemail/installer/index.php +++ b/roundcubemail/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."); + } } ?> |
