From 7670cdfa7e736b76e6b7249f640ebd78445d89c4 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Michal=20=C4=8Ciha=C5=99?=
Date: Sun, 27 Nov 2005 19:19:46 +0000
Subject: [PATCH] Many new features to setup script.
---
ChangeLog | 4 +
Documentation.html | 8 +-
scripts/setup.php | 1182 +++++++++++++++++++++++++++++++++++++++-----
3 files changed, 1061 insertions(+), 133 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index a65afb25e..cdb9bd2f6 100755
--- a/ChangeLog
+++ b/ChangeLog
@@ -5,6 +5,10 @@ phpMyAdmin - Changelog
$Id$
$Source$
+2005-11-27 Michal Čihař
+ * Documentation.html, scripts/setup.php: Many new features to setup
+ script.
+
2005-11-24 Sebastian Mendel
* libraries/grab_globals.lib.php: allow scripts to bypass importing vars
* libraries/common.lib.php, libraries/export/sql.php,
diff --git a/Documentation.html b/Documentation.html
index 6120a4535..79c8b0f6c 100755
--- a/Documentation.html
+++ b/Documentation.html
@@ -207,8 +207,12 @@
previous configuration you have to create config directory in
phpMyAdmins top level directory and make it writable to web server. For
loading previous configuration, place it there (and make sure it has write
- permissions for webserver). Then you can open setup.php in
- your browser and perform setup.
+ permissions for webserver).
+
+
+ Then you can open setup.php in your browser and perform
+ setup. After saving your configuration move generated configuration to top
+ level directory and delete created config directory.
Please note that it doesn not allow to configure everything, so for some
diff --git a/scripts/setup.php b/scripts/setup.php
index 3db474843..aeb39d9c0 100644
--- a/scripts/setup.php
+++ b/scripts/setup.php
@@ -2,11 +2,22 @@
/* $Id$ */
// vim: expandtab sw=4 ts=4 sts=4:
-// phpMyAdmin simple setup script by Michal Čihař
+// phpMyAdmin setup script by Michal Čihař
-$script_info = 'phpMyAdmin simple setup script by Michal Čihař ';
+// Grab phpMyAdmin version and PMA_dl function
+$cfg['GD2Available'] = 'auto';
+require('../libraries/defines.lib.php');
+unset($cfg);
+
+// Script information
+$script_info = 'phpMyAdmin ' . PMA_VERSION . ' setup script by Michal Čihař ';
$script_version = '$Id$';
+// Grab configuration defaults
+require('../config.default.php');
+$default_cfg = $cfg;
+unset($cfg);
+
function remove_slashes($val) {
if (get_magic_quotes_gpc()) {
return stripslashes($val);
@@ -31,9 +42,18 @@ if (!isset($cfg['Servers']) || !is_array($cfg['Servers'])) {
$cfg['Servers'] = array();
}
+$now = gmdate('D, d M Y H:i:s') . ' GMT';
+
// whether to show html header?
if ($action != 'download') {
+header('Expires: ' . $now); // rfc2616 - Section 14.21
+header('Last-Modified: ' . $now);
+header('Cache-Control: no-store, no-cache, must-revalidate, pre-check=0, post-check=0, max-age=0'); // HTTP/1.1
+header('Pragma: no-cache'); // HTTP/1.0
+// Define the charset to be used
+header('Content-Type: text/html; charset=utf-8');
+
// this needs to be echoed otherwise php with short tags complains
echo '' . "\n";
?>
@@ -43,7 +63,7 @@ echo '' . "\n";
- phpMyAdmin setup
+ phpMyAdmin setup