mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-07 08:34:29 +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');
|
||||
|
||||
// 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'];
|
||||
|
||||
$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','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');
|
||||
|
||||
function parsedep($depends,$main=True)
|
||||
|
@ -20,6 +20,14 @@
|
||||
include('./inc/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');
|
||||
$setup_tpl = CreateObject('phpgwapi.Template',$tpl_root);
|
||||
$setup_tpl->set_file(array(
|
||||
|
@ -18,7 +18,16 @@
|
||||
'noapi' => True
|
||||
);
|
||||
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');
|
||||
$setup_tpl = CreateObject('phpgwapi.Template',$tpl_root);
|
||||
@ -33,15 +42,6 @@
|
||||
/* Following to ensure windows file paths are saved correctly */
|
||||
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();
|
||||
|
||||
/* Guessing default values. */
|
||||
|
@ -20,7 +20,6 @@
|
||||
'noapi' => True
|
||||
);
|
||||
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'))
|
||||
|
@ -17,8 +17,6 @@
|
||||
'currentapp' => 'home',
|
||||
'noapi' => True
|
||||
);
|
||||
|
||||
include('../header.inc.php');
|
||||
include('./inc/functions.inc.php');
|
||||
|
||||
// Authorize the user to use setup app and load the database
|
||||
|
@ -17,8 +17,6 @@
|
||||
'currentapp' => 'home',
|
||||
'noapi' => True
|
||||
);
|
||||
|
||||
include('../header.inc.php');
|
||||
include('./inc/functions.inc.php');
|
||||
|
||||
// Authorize the user to use setup app and load the database
|
||||
@ -28,6 +26,7 @@
|
||||
exit;
|
||||
}
|
||||
// Does not return unless user is authorized
|
||||
|
||||
class phpgw
|
||||
{
|
||||
var $common;
|
||||
|
@ -17,8 +17,6 @@
|
||||
'currentapp' => 'home',
|
||||
'noapi' => True
|
||||
);
|
||||
|
||||
include('../header.inc.php');
|
||||
include('./inc/functions.inc.php');
|
||||
|
||||
// Authorize the user to use setup app and load the database
|
||||
@ -28,6 +26,7 @@
|
||||
exit;
|
||||
}
|
||||
// Does not return unless user is authorized
|
||||
|
||||
class phpgw
|
||||
{
|
||||
var $common;
|
||||
|
@ -17,8 +17,6 @@
|
||||
'currentapp' => 'home',
|
||||
'noapi' => True
|
||||
);
|
||||
|
||||
include('../header.inc.php');
|
||||
include('./inc/functions.inc.php');
|
||||
|
||||
/* Authorize the user to use setup app and load the database */
|
||||
@ -28,6 +26,7 @@
|
||||
exit;
|
||||
}
|
||||
/* Does not return unless user is authorized */
|
||||
|
||||
class phpgw
|
||||
{
|
||||
var $common;
|
||||
|
@ -20,6 +20,14 @@
|
||||
);
|
||||
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');
|
||||
$GLOBALS['setup_tpl'] = CreateObject('phpgwapi.Template',$tpl_root);
|
||||
$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','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');
|
||||
|
||||
function parsedep($depends,$main=True)
|
||||
|
@ -20,7 +20,6 @@
|
||||
'noapi' => True
|
||||
);
|
||||
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
|
||||
|
@ -19,6 +19,14 @@
|
||||
);
|
||||
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');
|
||||
$setup_tpl = CreateObject('phpgwapi.Template',$tpl_root);
|
||||
|
||||
@ -61,21 +69,6 @@
|
||||
$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();
|
||||
|
||||
function parse_vars($table,$term)
|
||||
|
Loading…
Reference in New Issue
Block a user