Fix compatibility errors with PHP 5.6
This commit is contained in:
David Callizaya
2017-08-22 14:37:54 -04:00
parent c4a70d35d9
commit 480488ad49
9 changed files with 31 additions and 71 deletions

View File

@@ -27,17 +27,16 @@ class App
{
function ForceLogin()
{
global $HTTP_SESSION_VARS;
global $G_MAIN_MENU;
global $G_SUB_MENU;
if( $HTTP_SESSION_VARS['LOGGED_IN'] == false)
if( $_SESSION['LOGGED_IN'] == false)
{
header( "location: /sys/" . SYS_LANG . "/" . SYS_SKIN . "/login/login.html" );
die();
}
else
{
$cmptype = $HTTP_SESSION_VARS['USER_TYPE'];
$cmptype = $_SESSION['USER_TYPE'];
switch( $cmptype )
{
case 'BUYER':
@@ -70,9 +69,8 @@ class App
function GetPartnerStatus()
{
global $HTTP_SESSION_VARS;
$slipid = $HTTP_SESSION_VARS['CURRENT_SLIP'];
$partnerid = $HTTP_SESSION_VARS['CURRENT_PARTNER'];
$slipid = $_SESSION['CURRENT_SLIP'];
$partnerid = $_SESSION['CURRENT_PARTNER'];
$mdbc = new DBConnection();
@@ -90,9 +88,8 @@ class App
function SetPartnerStatus( $intStatus = 0 )
{
global $HTTP_SESSION_VARS;
$slipid = $HTTP_SESSION_VARS['CURRENT_SLIP'];
$partnerid = $HTTP_SESSION_VARS['CURRENT_PARTNER'];
$slipid = $_SESSION['CURRENT_SLIP'];
$partnerid = $_SESSION['CURRENT_PARTNER'];
$mdbc = new DBConnection();

View File

@@ -169,7 +169,6 @@ function saveXml(){
global $tree;
global $header;
global $filename;
global $HTTP_POST_VARS;
global $curDir;
global $onlyName;
@@ -181,7 +180,7 @@ function saveXml(){
$aux = explode ( '/', $filename);
$onlyName = $aux[count($aux)-1];
$curDir = $HTTP_POST_VARS['curDir'];
$curDir = $_POST['curDir'];
fputs ($fp,"<dynaForm name=\"$onlyName\" basedir=\"$curDir\">$tree->value\n");

View File

@@ -24,8 +24,7 @@
*/
global $G_TMP_MENU;
global $HTTP_SESSION_VARS;
$appid = $HTTP_SESSION_VARS['CURRENT_APPLICATION'];
$appid = $_SESSION['CURRENT_APPLICATION'];
$G_TMP_MENU->AddIdRawOption( "OP1", "rbac/appList.html" );
$G_TMP_MENU->AddIdRawOption( "OP2", "rbac/appDel.html" );

View File

@@ -24,7 +24,6 @@
*/
global $G_TMP_MENU;
global $HTTP_SESSION_VARS;
$G_TMP_MENU->AddIdRawOption( "OP1", "rbac/roleList.html" );
$G_TMP_MENU->AddIdRawOption( "OP2", "rbac/permList.html" );

View File

@@ -19,7 +19,7 @@ this program. If not, see
*
*/
<?php
$frm = $HTTP_POST_VARS;
$frm = $_POST;
$dbc = new dbconnection();
$ses = new DBSession( $dbc );

View File

@@ -1,27 +1,4 @@
<?php
/**
* testAuthenticationUser.php
*
* ProcessMaker Open Source Edition
* Copyright (C) 2004 - 2008 Colosa Inc.23
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
*
*/
$strPass = $_POST['form'][PASS];
@@ -35,7 +12,7 @@
$tpl->assign( "STYLE_CSS" , STYLE_CSS );
$tpl->assign( "title" , $G_TABLE->title );
$curAuthSource = $HTTP_SESSION_VARS['CURRENT_AUTH_SOURCE'];
$curAuthSource = $_SESSION['CURRENT_AUTH_SOURCE'];
$dbc = new DBConnection(DB_HOST, DB_RBAC_USER, DB_RBAC_PASS, DB_RBAC_NAME );
//Class user
@@ -61,4 +38,4 @@
$tpl->gotoBlock( "_ROOT" );
$tpl->printToScreen();
?>
?>