You've already forked OpenShorte.old
Moved all configurations away from $GLOBALS to independent variables
This commit is contained in:
14
index.php
14
index.php
@@ -1,19 +1,19 @@
|
||||
<?php
|
||||
session_start ( );
|
||||
$GLOBALS [ 'request_uri' ] = explode ( "/", $_GET [ 'URI' ] );
|
||||
$request_uri = explode ( "/", $_GET [ 'URI' ] );
|
||||
if ( ! file_exists ( 'config.json' ) ) {
|
||||
if ( $GLOBALS[ 'request_uri' ] [ 0 ] !== "install" ) {
|
||||
if ( $request_uri [ 0 ] !== "install" ) {
|
||||
header ( "Location: " . substr ( $_SERVER [ 'SCRIPT_NAME' ], 0, -10 ) . "/install" );
|
||||
}
|
||||
}
|
||||
if ( $GLOBALS [ 'request_uri' ] [ 0 ] == "install" ) {
|
||||
if ( $request_uri [ 0 ] == "install" ) {
|
||||
include ( 'lib/php/install.php' );
|
||||
exit;
|
||||
}
|
||||
require_once ( 'functions.php' );
|
||||
$GLOBALS [ 'config' ] = load_config ( );
|
||||
if ( isset ( $GLOBALS [ 'request_uri' ] [ 0 ] ) && $GLOBALS [ 'request_uri' ] [ 0 ] != "" ) {
|
||||
switch ( $GLOBALS [ 'request_uri' ] [ 0 ] ) {
|
||||
$config = load_config ( );
|
||||
if ( isset ( $request_uri [ 0 ] ) && $request_uri [ 0 ] != "" ) {
|
||||
switch ( $request_uri [ 0 ] ) {
|
||||
case "go":
|
||||
include ( 'lib/php/go.php' );
|
||||
break;
|
||||
@@ -33,5 +33,5 @@
|
||||
}
|
||||
}
|
||||
else {
|
||||
header ( "Location: " . $GLOBALS [ 'config' ] [ 'installation_path' ] . "/login" );
|
||||
header ( "Location: " . $config [ 'installation_path' ] . "/login" );
|
||||
}
|
||||
|
Reference in New Issue
Block a user