summaryrefslogtreecommitdiff
path: root/roundcubemail/installer/index.php
diff options
context:
space:
mode:
authorrobin <robin@208e9e7b-5314-0410-a742-e7e81cd9613c>2008-06-12 07:32:04 +0000
committerrobin <robin@208e9e7b-5314-0410-a742-e7e81cd9613c>2008-06-12 07:32:04 +0000
commitd1eece59447039a8c3cc10a66c2e56f69c34209d (patch)
treef89abfd11f83a72a0d59473416ec93ac2f383fe9 /roundcubemail/installer/index.php
parentde0d60983a3a09d81192b29d51baa7f9c4a093b5 (diff)
Enable direct download of (main|db).inc.php from the installer.
git-svn-id: https://svn.roundcube.net/trunk@1511 208e9e7b-5314-0410-a742-e7e81cd9613c
Diffstat (limited to 'roundcubemail/installer/index.php')
-rw-r--r--roundcubemail/installer/index.php15
1 files changed, 12 insertions, 3 deletions
diff --git a/roundcubemail/installer/index.php b/roundcubemail/installer/index.php
index 4bd37f3ca..4d0e6c448 100644
--- a/roundcubemail/installer/index.php
+++ b/roundcubemail/installer/index.php
@@ -25,6 +25,18 @@ function __autoload($classname)
);
include_once $filename. '.php';
}
+
+$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;
+}
+
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
@@ -52,9 +64,6 @@ function __autoload($classname)
<?php
- $RCI = rcube_install::get_instance();
- $RCI->load_config();
-
// exit if installation is complete
if ($RCI->configured && !$RCI->getprop('enable_installer') && !$_SESSION['allowinstaller']) {
// header("HTTP/1.0 404 Not Found");