Skip to content
Snippets Groups Projects
Commit 76ec7ece authored by Peter Rotich's avatar Peter Rotich
Browse files

Fix global variables conflict

parent 8f995295
No related branches found
No related tags found
No related merge requests found
<?php
if(!defined('SETUPINC')) die('Kwaheri!');
$info=($_POST && $errors)?Format::htmlchars($_POST):array('prefix'=>'ost_','dbhost'=>'localhost');
//XXX: Remove b4 release.
if($_SESSION['installer']['info'] && !$_POST)
$info=$_SESSION['installer']['info'];
?>
<div id="main" class="step2">
<h1>osTicket Basic Installation</h1>
......
<?php
if(!defined('SETUPINC')) die('Kwaheri!');
$msg = $_SESSION['upgrader']['msg'];
$msg = $_SESSION['_upgrader']['msg'];
?>
<div id="main">
<h1>Attachments Migration</h1>
......
......@@ -29,11 +29,11 @@ $wizard['menu']=array('Installation Guide'=>'http://osticket.com/wiki/Installati
if($_POST && $_POST['s']) {
$errors = array();
$_SESSION['installer']['s']=$_POST['s'];
$_SESSION['_installer']['s']=$_POST['s'];
switch(strtolower($_POST['s'])) {
case 'prereq':
if($installer->check_prereq())
$_SESSION['installer']['s']='config';
$_SESSION['_installer']['s']='config';
else
$errors['prereq']='Minimum requirements not met!';
break;
......@@ -43,7 +43,7 @@ if($_POST && $_POST['s']) {
elseif(!$installer->config_writable())
$errors['err']='Write access required to continue';
else
$_SESSION['installer']['s']='install';
$_SESSION['_installer']['s']='install';
break;
case 'install':
if($installer->install($_POST)) {
......@@ -51,7 +51,7 @@ if($_POST && $_POST['s']) {
'email' =>$_POST['admin_email'],
'URL'=>URL);
//TODO: Go to subscribe step.
$_SESSION['installer']['s']='done';
$_SESSION['_installer']['s']='done';
} elseif(!($errors=$installer->getErrors()) || !$errors['err']) {
$errors['err']='Error installing osTicket - correct the errors below and try again.';
}
......@@ -69,16 +69,16 @@ if($_POST && $_POST['s']) {
$errors['notify'] = 'Check one or more';
if(!$errors)
$_SESSION['installer']['s'] = 'done';
$_SESSION['_installer']['s'] = 'done';
break;
}
}elseif($_GET['s'] && $_GET['s']=='ns' && $_SESSION['installer']['s']=='subscribe') {
$_SESSION['installer']['s']='done';
}elseif($_GET['s'] && $_GET['s']=='ns' && $_SESSION['_installer']['s']=='subscribe') {
$_SESSION['_installer']['s']='done';
}
switch(strtolower($_SESSION['installer']['s'])) {
switch(strtolower($_SESSION['_installer']['s'])) {
case 'config':
case 'install':
if(!$installer->config_exists()) {
......
......@@ -15,13 +15,21 @@
**********************************************************************/
#inits
error_reporting(E_ALL ^ E_NOTICE); //turn on errors
error_reporting(E_ALL ^ E_NOTICE); //turn on errors??
ini_set('magic_quotes_gpc', 0);
ini_set('session.use_trans_sid', 0);
ini_set('session.cache_limiter', 'nocache');
ini_set('display_errors',1); //We want the user to see errors during install process.
ini_set('display_startup_errors',1);
#Disable Globals if enabled
if(ini_get('register_globals')) {
ini_set('register_globals',0);
foreach($_REQUEST as $key=>$val)
if(isset($$key))
unset($$key);
}
#start session
session_start();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment