mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-02-04 12:30:04 +01:00
Cleanup includes; move auth() call to top after main include (functions.inc.php);
This commit is contained in:
parent
18a45d4bc5
commit
04342d35ed
@ -25,6 +25,14 @@
|
|||||||
);
|
);
|
||||||
include ('./inc/functions.inc.php');
|
include ('./inc/functions.inc.php');
|
||||||
|
|
||||||
|
// Check header and authentication
|
||||||
|
if (!$phpgw_setup->auth('Config'))
|
||||||
|
{
|
||||||
|
Header('Location: index.php');
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
// Does not return unless user is authorized
|
||||||
|
|
||||||
$ConfigDomain = $HTTP_COOKIE_VARS['ConfigDomain'] ? $HTTP_COOKIE_VARS['ConfigDomain'] : $HTTP_POST_VARS['ConfigDomain'];
|
$ConfigDomain = $HTTP_COOKIE_VARS['ConfigDomain'] ? $HTTP_COOKIE_VARS['ConfigDomain'] : $HTTP_POST_VARS['ConfigDomain'];
|
||||||
|
|
||||||
$tpl_root = $phpgw_setup->setup_tpl_dir('setup');
|
$tpl_root = $phpgw_setup->setup_tpl_dir('setup');
|
||||||
@ -51,21 +59,6 @@
|
|||||||
$setup_tpl->set_block('T_setup_main','submit','submit');
|
$setup_tpl->set_block('T_setup_main','submit','submit');
|
||||||
$setup_tpl->set_block('T_setup_main','footer','footer');
|
$setup_tpl->set_block('T_setup_main','footer','footer');
|
||||||
|
|
||||||
// Check header and authentication
|
|
||||||
$GLOBALS['phpgw_info']['setup']['stage']['header'] = $phpgw_setup->check_header();
|
|
||||||
if ($GLOBALS['phpgw_info']['setup']['stage']['header'] != '10')
|
|
||||||
{
|
|
||||||
Header("Location: manageheader.php");
|
|
||||||
exit;
|
|
||||||
}
|
|
||||||
elseif (!$phpgw_setup->auth('Config'))
|
|
||||||
{
|
|
||||||
$phpgw_setup->show_header(lang('Please login'),True);
|
|
||||||
$phpgw_setup->login_form();
|
|
||||||
$phpgw_setup->show_footer();
|
|
||||||
exit;
|
|
||||||
}
|
|
||||||
|
|
||||||
$bgcolor = array('#DDDDDD','#EEEEEE');
|
$bgcolor = array('#DDDDDD','#EEEEEE');
|
||||||
|
|
||||||
function parsedep($depends,$main=True)
|
function parsedep($depends,$main=True)
|
||||||
|
@ -20,6 +20,14 @@
|
|||||||
include('./inc/functions.inc.php');
|
include('./inc/functions.inc.php');
|
||||||
include('./inc/xml_functions.inc.php');
|
include('./inc/xml_functions.inc.php');
|
||||||
|
|
||||||
|
// Check header and authentication
|
||||||
|
if (!$phpgw_setup->auth('Config'))
|
||||||
|
{
|
||||||
|
Header('Location: index.php');
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
// Does not return unless user is authorized
|
||||||
|
|
||||||
$tpl_root = $phpgw_setup->setup_tpl_dir('setup');
|
$tpl_root = $phpgw_setup->setup_tpl_dir('setup');
|
||||||
$setup_tpl = CreateObject('phpgwapi.Template',$tpl_root);
|
$setup_tpl = CreateObject('phpgwapi.Template',$tpl_root);
|
||||||
$setup_tpl->set_file(array(
|
$setup_tpl->set_file(array(
|
||||||
|
@ -18,7 +18,16 @@
|
|||||||
'noapi' => True
|
'noapi' => True
|
||||||
);
|
);
|
||||||
include('./inc/functions.inc.php');
|
include('./inc/functions.inc.php');
|
||||||
include('../header.inc.php');
|
|
||||||
|
/*
|
||||||
|
Authorize the user to use setup app and load the database
|
||||||
|
Does not return unless user is authorized
|
||||||
|
*/
|
||||||
|
if (!$phpgw_setup->auth('Config'))
|
||||||
|
{
|
||||||
|
Header('Location: index.php');
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
|
||||||
$tpl_root = $phpgw_setup->setup_tpl_dir('setup');
|
$tpl_root = $phpgw_setup->setup_tpl_dir('setup');
|
||||||
$setup_tpl = CreateObject('phpgwapi.Template',$tpl_root);
|
$setup_tpl = CreateObject('phpgwapi.Template',$tpl_root);
|
||||||
@ -33,15 +42,6 @@
|
|||||||
/* Following to ensure windows file paths are saved correctly */
|
/* Following to ensure windows file paths are saved correctly */
|
||||||
set_magic_quotes_runtime(0);
|
set_magic_quotes_runtime(0);
|
||||||
|
|
||||||
/*
|
|
||||||
Authorize the user to use setup app and load the database
|
|
||||||
Does not return unless user is authorized
|
|
||||||
*/
|
|
||||||
if (!$phpgw_setup->auth('Config'))
|
|
||||||
{
|
|
||||||
Header('Location: index.php');
|
|
||||||
exit;
|
|
||||||
}
|
|
||||||
$phpgw_setup->loaddb();
|
$phpgw_setup->loaddb();
|
||||||
|
|
||||||
/* Guessing default values. */
|
/* Guessing default values. */
|
||||||
|
@ -20,7 +20,6 @@
|
|||||||
'noapi' => True
|
'noapi' => True
|
||||||
);
|
);
|
||||||
include('./inc/functions.inc.php');
|
include('./inc/functions.inc.php');
|
||||||
include('../header.inc.php');
|
|
||||||
// Authorize the user to use setup app and load the database
|
// Authorize the user to use setup app and load the database
|
||||||
// Does not return unless user is authorized
|
// Does not return unless user is authorized
|
||||||
if (!$phpgw_setup->auth('Config'))
|
if (!$phpgw_setup->auth('Config'))
|
||||||
|
@ -17,8 +17,6 @@
|
|||||||
'currentapp' => 'home',
|
'currentapp' => 'home',
|
||||||
'noapi' => True
|
'noapi' => True
|
||||||
);
|
);
|
||||||
|
|
||||||
include('../header.inc.php');
|
|
||||||
include('./inc/functions.inc.php');
|
include('./inc/functions.inc.php');
|
||||||
|
|
||||||
// Authorize the user to use setup app and load the database
|
// Authorize the user to use setup app and load the database
|
||||||
|
@ -17,8 +17,6 @@
|
|||||||
'currentapp' => 'home',
|
'currentapp' => 'home',
|
||||||
'noapi' => True
|
'noapi' => True
|
||||||
);
|
);
|
||||||
|
|
||||||
include('../header.inc.php');
|
|
||||||
include('./inc/functions.inc.php');
|
include('./inc/functions.inc.php');
|
||||||
|
|
||||||
// Authorize the user to use setup app and load the database
|
// Authorize the user to use setup app and load the database
|
||||||
@ -28,6 +26,7 @@
|
|||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
// Does not return unless user is authorized
|
// Does not return unless user is authorized
|
||||||
|
|
||||||
class phpgw
|
class phpgw
|
||||||
{
|
{
|
||||||
var $common;
|
var $common;
|
||||||
|
@ -17,8 +17,6 @@
|
|||||||
'currentapp' => 'home',
|
'currentapp' => 'home',
|
||||||
'noapi' => True
|
'noapi' => True
|
||||||
);
|
);
|
||||||
|
|
||||||
include('../header.inc.php');
|
|
||||||
include('./inc/functions.inc.php');
|
include('./inc/functions.inc.php');
|
||||||
|
|
||||||
// Authorize the user to use setup app and load the database
|
// Authorize the user to use setup app and load the database
|
||||||
@ -28,6 +26,7 @@
|
|||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
// Does not return unless user is authorized
|
// Does not return unless user is authorized
|
||||||
|
|
||||||
class phpgw
|
class phpgw
|
||||||
{
|
{
|
||||||
var $common;
|
var $common;
|
||||||
|
@ -17,8 +17,6 @@
|
|||||||
'currentapp' => 'home',
|
'currentapp' => 'home',
|
||||||
'noapi' => True
|
'noapi' => True
|
||||||
);
|
);
|
||||||
|
|
||||||
include('../header.inc.php');
|
|
||||||
include('./inc/functions.inc.php');
|
include('./inc/functions.inc.php');
|
||||||
|
|
||||||
/* Authorize the user to use setup app and load the database */
|
/* Authorize the user to use setup app and load the database */
|
||||||
@ -28,6 +26,7 @@
|
|||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
/* Does not return unless user is authorized */
|
/* Does not return unless user is authorized */
|
||||||
|
|
||||||
class phpgw
|
class phpgw
|
||||||
{
|
{
|
||||||
var $common;
|
var $common;
|
||||||
|
@ -20,6 +20,14 @@
|
|||||||
);
|
);
|
||||||
include ('./inc/functions.inc.php');
|
include ('./inc/functions.inc.php');
|
||||||
|
|
||||||
|
// Check header and authentication
|
||||||
|
if (!$phpgw_setup->auth('Config'))
|
||||||
|
{
|
||||||
|
Header('Location: index.php');
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
// Does not return unless user is authorized
|
||||||
|
|
||||||
$tpl_root = $GLOBALS['phpgw_setup']->setup_tpl_dir('setup');
|
$tpl_root = $GLOBALS['phpgw_setup']->setup_tpl_dir('setup');
|
||||||
$GLOBALS['setup_tpl'] = CreateObject('phpgwapi.Template',$tpl_root);
|
$GLOBALS['setup_tpl'] = CreateObject('phpgwapi.Template',$tpl_root);
|
||||||
$GLOBALS['setup_tpl']->set_file(array(
|
$GLOBALS['setup_tpl']->set_file(array(
|
||||||
@ -44,21 +52,6 @@
|
|||||||
$GLOBALS['setup_tpl']->set_block('T_setup_main','submit','submit');
|
$GLOBALS['setup_tpl']->set_block('T_setup_main','submit','submit');
|
||||||
$GLOBALS['setup_tpl']->set_block('T_setup_main','footer','footer');
|
$GLOBALS['setup_tpl']->set_block('T_setup_main','footer','footer');
|
||||||
|
|
||||||
// Check header and authentication
|
|
||||||
$GLOBALS['phpgw_info']['setup']['stage']['header'] = $GLOBALS['phpgw_setup']->check_header();
|
|
||||||
if ($GLOBALS['phpgw_info']['setup']['stage']['header'] != '10')
|
|
||||||
{
|
|
||||||
Header("Location: manageheader.php");
|
|
||||||
exit;
|
|
||||||
}
|
|
||||||
elseif (!$GLOBALS['phpgw_setup']->auth('Config'))
|
|
||||||
{
|
|
||||||
$GLOBALS['phpgw_setup']->show_header(lang('Please login'),True);
|
|
||||||
$GLOBALS['phpgw_setup']->login_form();
|
|
||||||
$GLOBALS['phpgw_setup']->show_footer();
|
|
||||||
exit;
|
|
||||||
}
|
|
||||||
|
|
||||||
$bgcolor = array('DDDDDD','EEEEEE');
|
$bgcolor = array('DDDDDD','EEEEEE');
|
||||||
|
|
||||||
function parsedep($depends,$main=True)
|
function parsedep($depends,$main=True)
|
||||||
|
@ -20,7 +20,6 @@
|
|||||||
'noapi' => True
|
'noapi' => True
|
||||||
);
|
);
|
||||||
include('./inc/functions.inc.php');
|
include('./inc/functions.inc.php');
|
||||||
include('../header.inc.php');
|
|
||||||
|
|
||||||
// Authorize the user to use setup app and load the database
|
// Authorize the user to use setup app and load the database
|
||||||
// Does not return unless user is authorized
|
// Does not return unless user is authorized
|
||||||
|
@ -19,6 +19,14 @@
|
|||||||
);
|
);
|
||||||
include ('./inc/functions.inc.php');
|
include ('./inc/functions.inc.php');
|
||||||
|
|
||||||
|
// Check header and authentication
|
||||||
|
if (!$phpgw_setup->auth('Config'))
|
||||||
|
{
|
||||||
|
Header('Location: index.php');
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
// Does not return unless user is authorized
|
||||||
|
|
||||||
$tpl_root = $phpgw_setup->setup_tpl_dir('setup');
|
$tpl_root = $phpgw_setup->setup_tpl_dir('setup');
|
||||||
$setup_tpl = CreateObject('phpgwapi.Template',$tpl_root);
|
$setup_tpl = CreateObject('phpgwapi.Template',$tpl_root);
|
||||||
|
|
||||||
@ -61,21 +69,6 @@
|
|||||||
$setup_tpl->set_block('sqlarr','sqlfooter','sqlfooter');
|
$setup_tpl->set_block('sqlarr','sqlfooter','sqlfooter');
|
||||||
}
|
}
|
||||||
|
|
||||||
// Check header and authentication
|
|
||||||
$GLOBALS['phpgw_info']['setup']['stage']['header'] = $phpgw_setup->check_header();
|
|
||||||
if ($GLOBALS['phpgw_info']['setup']['stage']['header'] != '10')
|
|
||||||
{
|
|
||||||
Header("Location: manageheader.php");
|
|
||||||
exit;
|
|
||||||
}
|
|
||||||
elseif (!$phpgw_setup->auth('Config'))
|
|
||||||
{
|
|
||||||
$phpgw_setup->show_header(lang('Please login'),True);
|
|
||||||
$phpgw_setup->login_form();
|
|
||||||
$phpgw_setup->show_footer();
|
|
||||||
exit;
|
|
||||||
}
|
|
||||||
|
|
||||||
$phpgw_setup->loaddb();
|
$phpgw_setup->loaddb();
|
||||||
|
|
||||||
function parse_vars($table,$term)
|
function parse_vars($table,$term)
|
||||||
|
Loading…
Reference in New Issue
Block a user