From aa58127b2dee09aab071fac532a597dc63c32f7e Mon Sep 17 00:00:00 2001 From: William Mortada Date: Thu, 12 Oct 2017 17:05:33 +0100 Subject: [PATCH] Move the install type variable from SESSION to POST and remove the session --- install/index.php | 36 +++++++++++++----------------------- install/template.html | 2 ++ 2 files changed, 15 insertions(+), 23 deletions(-) diff --git a/install/index.php b/install/index.php index 3bc070caf0..6209ef0209 100644 --- a/install/index.php +++ b/install/index.php @@ -54,35 +54,25 @@ else { define('CIVICRM_WINDOWS', 0); } -// set installation type - drupal -if (!session_id()) { - if (defined('PANTHEON_ENVIRONMENT')) { - ini_set('session.save_handler', 'files'); - } - session_start(); -} - -// unset civicrm session if any -if (array_key_exists('CiviCRM', $_SESSION)) { - unset($_SESSION['CiviCRM']); -} - -if (isset($_GET['civicrm_install_type'])) { - $_SESSION['civicrm_install_type'] = $_GET['civicrm_install_type']; -} -else { - if (!isset($_SESSION['civicrm_install_type'])) { - $_SESSION['civicrm_install_type'] = "drupal"; - } -} - global $installType; global $crmPath; global $pkgPath; global $installDirPath; global $installURLPath; -$installType = strtolower($_SESSION['civicrm_install_type']); +// Set the install type +// this is sent as a query string when the page is first loaded +// and subsequently posted to the page as a hidden field +if (isset($_POST['civicrm_install_type'])) { + $installType = $_POST['civicrm_install_type']; +} +elseif (isset($_GET['civicrm_install_type'])) { + $installType = strtolower($_GET['civicrm_install_type']); +} +else { + // default value if not set + $installType = "drupal"; +} if ($installType == 'drupal' || $installType == 'backdrop') { $crmPath = dirname(dirname($_SERVER['SCRIPT_FILENAME'])); diff --git a/install/template.html b/install/template.html index 493da9c9fc..e95165536b 100644 --- a/install/template.html +++ b/install/template.html @@ -22,6 +22,8 @@ if ($text_direction == 'rtl') {
+ +

see below for details.'); ?>

-- 2.25.1