mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-07 16:44:07 +01:00
Converting to get_var() for all HTTP_*_VARS.
This commit is contained in:
parent
f900167903
commit
e3bf408609
@ -20,8 +20,8 @@
|
||||
|
||||
include('../header.inc.php');
|
||||
|
||||
$n_passwd = $GLOBALS['HTTP_POST_VARS']['n_passwd'];
|
||||
$n_passwd_2 = $GLOBALS['HTTP_POST_VARS']['n_passwd_2'];
|
||||
$n_passwd = get_var('n_passwd',Array('POST'));
|
||||
$n_passwd_2 = get_var('n_passwd_2',Array('POST'));
|
||||
|
||||
if (! $GLOBALS['phpgw']->acl->check('changepassword', 1))
|
||||
{
|
||||
@ -38,25 +38,25 @@
|
||||
$GLOBALS['phpgw']->template->set_var('lang_change',lang('Change'));
|
||||
$GLOBALS['phpgw']->template->set_var('form_action',$GLOBALS['phpgw']->link('/preferences/changepassword.php'));
|
||||
|
||||
if ($GLOBALS['phpgw_info']['server']['auth_type'] != 'ldap')
|
||||
if($GLOBALS['phpgw_info']['server']['auth_type'] != 'ldap')
|
||||
{
|
||||
$GLOBALS['phpgw']->template->set_var('sql_message',lang('note: This feature does *not* change your email password. This will '
|
||||
. 'need to be done manually.'));
|
||||
}
|
||||
|
||||
if ($GLOBALS['HTTP_POST_VARS']['submit'])
|
||||
if(get_var('submit',Array('POST')))
|
||||
{
|
||||
if ($n_passwd != $n_passwd_2)
|
||||
if($n_passwd != $n_passwd_2)
|
||||
{
|
||||
$errors[] = lang('The two passwords are not the same');
|
||||
}
|
||||
|
||||
if (! $n_passwd)
|
||||
if(! $n_passwd)
|
||||
{
|
||||
$errors[] = lang('You must enter a password');
|
||||
}
|
||||
|
||||
if (is_array($errors))
|
||||
if(is_array($errors))
|
||||
{
|
||||
$GLOBALS['phpgw']->common->phpgw_header();
|
||||
echo parse_navbar();
|
||||
@ -67,7 +67,7 @@
|
||||
|
||||
$o_passwd = $GLOBALS['phpgw_info']['user']['passwd'];
|
||||
$passwd_changed = $GLOBALS['phpgw']->auth->change_password($o_passwd, $n_passwd);
|
||||
if (! $passwd_changed)
|
||||
if(!$passwd_changed)
|
||||
{
|
||||
// This need to be changed to show a different message based on the result
|
||||
Header('Location: ' . $GLOBALS['phpgw']->link('/preferences/index.php','cd=38'));
|
||||
|
@ -27,10 +27,10 @@
|
||||
|
||||
$this->read_sessiondata($cats_app);
|
||||
|
||||
$start = $GLOBALS['HTTP_POST_VARS']['start'] ? $GLOBALS['HTTP_POST_VARS']['start'] : $GLOBALS['HTTP_GET_VARS']['start'];
|
||||
$query = $GLOBALS['HTTP_POST_VARS']['query'] ? $GLOBALS['HTTP_POST_VARS']['query'] : $GLOBALS['HTTP_GET_VARS']['query'];
|
||||
$sort = $GLOBALS['HTTP_POST_VARS']['sort'] ? $GLOBALS['HTTP_POST_VARS']['sort'] : $GLOBALS['HTTP_GET_VARS']['sort'];
|
||||
$order = $GLOBALS['HTTP_POST_VARS']['order'] ? $GLOBALS['HTTP_POST_VARS']['order'] : $GLOBALS['HTTP_GET_VARS']['order'];
|
||||
$start = get_var('start',Array('GET','POST'));
|
||||
$query = get_var('query',Array('GET','POST'));
|
||||
$sort = get_var('sort',Array('GET','POST'));
|
||||
$order = get_var('order',Array('GET','POST'));
|
||||
|
||||
if(!empty($start) || $start == '0' || $start == 0)
|
||||
{
|
||||
|
@ -25,7 +25,7 @@
|
||||
|
||||
function index()
|
||||
{
|
||||
$acl_app = $GLOBALS['HTTP_GET_VARS']['acl_app'];
|
||||
$acl_app = get_vars('acl_app',Array('GET'));
|
||||
$owner = $GLOBALS['owner'];
|
||||
|
||||
if (! $acl_app)
|
||||
@ -85,9 +85,9 @@
|
||||
$this->acl = CreateObject('phpgwapi.acl',intval($owner));
|
||||
$this->acl->read_repository();
|
||||
|
||||
if ($GLOBALS['HTTP_POST_VARS']['submit'])
|
||||
if(get_var('submit',Array('POST')))
|
||||
{
|
||||
$processed = $GLOBALS['HTTP_POST_VARS']['processed'];
|
||||
$processed = get_var('processed',Array('POST'));
|
||||
$to_remove = unserialize(urldecode($processed));
|
||||
|
||||
for($i=0;$i<count($to_remove);$i++)
|
||||
@ -96,7 +96,7 @@
|
||||
}
|
||||
|
||||
/* Group records */
|
||||
$group_variable = $GLOBALS['HTTP_POST_VARS']['g_'.$GLOBALS['phpgw_info']['flags']['currentapp']];
|
||||
$group_variable = get_var('g_'.$GLOBALS['phpgw_info']['flags']['currentapp'],Array('POST'));
|
||||
|
||||
if (!$group_variable)
|
||||
{
|
||||
@ -122,9 +122,9 @@
|
||||
}
|
||||
|
||||
/* User records */
|
||||
$user_variable = $GLOBALS['HTTP_POST_VARS']['u_'.$GLOBALS['phpgw_info']['flags']['currentapp']];
|
||||
$user_variable = get_var('u_'.$GLOBALS['phpgw_info']['flags']['currentapp'],Array('POST'));
|
||||
|
||||
if (!$user_variable)
|
||||
if(!$user_variable)
|
||||
{
|
||||
$user_variable = array();
|
||||
}
|
||||
|
@ -276,13 +276,13 @@
|
||||
$GLOBALS['phpgw']->common->phpgw_header();
|
||||
echo parse_navbar();
|
||||
|
||||
$new_parent = $GLOBALS['HTTP_POST_VARS']['new_parent'];
|
||||
$submit = $GLOBALS['HTTP_POST_VARS']['submit'];
|
||||
$cat_parent = $GLOBALS['HTTP_POST_VARS']['cat_parent'] ? $GLOBALS['HTTP_POST_VARS']['cat_parent'] : $GLOBALS['HTTP_GET_VARS']['cat_parent'];
|
||||
$cat_name = $GLOBALS['HTTP_POST_VARS']['cat_name'];
|
||||
$cat_description = $GLOBALS['HTTP_POST_VARS']['cat_description'];
|
||||
$cat_data = $GLOBALS['HTTP_POST_VARS']['cat_data'];
|
||||
$cat_access = $GLOBALS['HTTP_POST_VARS']['cat_access'];
|
||||
$new_parent = get_var('new_parent',Array('POST'));
|
||||
$submit = get_var('submit',Array('POST'));
|
||||
$cat_parent = get_var('cat_parent',Array('GET','POST'));
|
||||
$cat_name = get_var('cat_name',Array('POST'));
|
||||
$cat_description = get_var('cat_description',Array('POST'));
|
||||
$cat_data = get_var('cat_data',Array('POST'));
|
||||
$cat_access = get_var('cat_access',Array('POST'));
|
||||
|
||||
$this->t->set_file(array('form' => 'category_form.tpl'));
|
||||
$this->t->set_block('form','data_row','row');
|
||||
@ -389,13 +389,13 @@
|
||||
$GLOBALS['phpgw']->common->phpgw_header();
|
||||
echo parse_navbar();
|
||||
|
||||
$new_parent = $GLOBALS['HTTP_POST_VARS']['new_parent'];
|
||||
$submit = $GLOBALS['HTTP_POST_VARS']['submit'];
|
||||
$cat_parent = $GLOBALS['HTTP_POST_VARS']['cat_parent'];
|
||||
$cat_name = $GLOBALS['HTTP_POST_VARS']['cat_name'];
|
||||
$cat_description = $GLOBALS['HTTP_POST_VARS']['cat_description'];
|
||||
$cat_data = $GLOBALS['HTTP_POST_VARS']['cat_data'];
|
||||
$cat_access = $GLOBALS['HTTP_POST_VARS']['cat_access'];
|
||||
$new_parent = get_var('new_parent',Array('POST'));
|
||||
$submit = get_var('submit',Array('POST'));
|
||||
$cat_parent = get_var('cat_parent',Array('POST'));
|
||||
$cat_name = get_var('cat_name',Array('POST'));
|
||||
$cat_description = get_var('cat_description',Array('POST'));
|
||||
$cat_data = get_var('cat_data',Array('POST'));
|
||||
$cat_access = get_var('cat_access',Array('POST'));
|
||||
|
||||
$this->t->set_file(array('form' => 'category_form.tpl'));
|
||||
$this->t->set_block('form','data_row','row');
|
||||
@ -517,9 +517,9 @@
|
||||
|
||||
$this->bo->cats->app_name = $cats_app;
|
||||
|
||||
if ($GLOBALS['HTTP_POST_VARS']['confirm'])
|
||||
if(get_var('confirm',Array('POST')))
|
||||
{
|
||||
if ($GLOBALS['HTTP_POST_VARS']['subs'])
|
||||
if(get_var('subs',Array('POST')))
|
||||
{
|
||||
$this->bo->delete($cat_id,True);
|
||||
}
|
||||
|
@ -19,6 +19,7 @@
|
||||
'force_select' => 'Force Selectbox'
|
||||
);
|
||||
|
||||
$out = '';
|
||||
while (list ($key, $value) = each ($country))
|
||||
{
|
||||
if ($config['countrylist'] == $key)
|
||||
|
@ -41,13 +41,13 @@
|
||||
$GLOBALS['phpgw']->session->appsession('session_data','preferences',$session_data);
|
||||
}
|
||||
|
||||
if (! $GLOBALS['HTTP_GET_VARS']['type'])
|
||||
$type = get_var('type',Array('GET'));
|
||||
if(!$type)
|
||||
{
|
||||
$type = $session_data['type'];
|
||||
}
|
||||
else
|
||||
{
|
||||
$type = $GLOBALS['HTTP_GET_VARS']['type'];
|
||||
$session_data = array('type' => $type);
|
||||
$GLOBALS['phpgw']->session->appsession('session_data','preferences',$session_data);
|
||||
}
|
||||
|
@ -11,10 +11,6 @@
|
||||
|
||||
/* $Id$ */
|
||||
|
||||
$user = (@isset($GLOBALS['HTTP_POST_VARS']['user'])?$GLOBALS['HTTP_POST_VARS']['user']:'');
|
||||
$global = (@isset($GLOBALS['HTTP_POST_VARS']['global'])?$GLOBALS['HTTP_POST_VARS']['global']:'');
|
||||
$default = (@isset($GLOBALS['HTTP_POST_VARS']['default'])?$GLOBALS['HTTP_POST_VARS']['default']:'');
|
||||
|
||||
$GLOBALS['phpgw_info']['flags'] = array(
|
||||
'noheader' => True,
|
||||
'noappheader' => True,
|
||||
@ -24,7 +20,12 @@
|
||||
);
|
||||
include('../header.inc.php');
|
||||
|
||||
if ($GLOBALS['HTTP_POST_VARS']['cancel'])
|
||||
$user = get_var('user',Array('POST'));
|
||||
$global = get_var('global',Array('POST'));
|
||||
$default = get_var('default',Array('POST'));
|
||||
$GLOBALS['appname'] = get_var('appname',Array('GET'));
|
||||
|
||||
if(get_var('cancel',Array('POST')))
|
||||
{
|
||||
Header('Location: ' . $GLOBALS['phpgw']->link('/preferences/index.php'));
|
||||
}
|
||||
@ -44,13 +45,13 @@
|
||||
/* Some places we will need to change this if there in common */
|
||||
function check_app()
|
||||
{
|
||||
if ($GLOBALS['HTTP_GET_VARS']['appname'] == 'preferences')
|
||||
if ($GLOBALS['appname'] == 'preferences')
|
||||
{
|
||||
return 'common';
|
||||
}
|
||||
else
|
||||
{
|
||||
return $GLOBALS['HTTP_GET_VARS']['appname'];
|
||||
return $GLOBALS['appname'];
|
||||
}
|
||||
}
|
||||
|
||||
@ -207,13 +208,14 @@
|
||||
$GLOBALS['phpgw']->session->appsession('session_data','preferences',$session_data);
|
||||
}
|
||||
|
||||
if (!isset($GLOBALS['HTTP_GET_VARS']['type']))
|
||||
$type = get_vars('type',Array('GET'));
|
||||
if (!isset($type))
|
||||
{
|
||||
$GLOBALS['type'] = $session_data['type'];
|
||||
}
|
||||
else
|
||||
{
|
||||
$GLOBALS['type'] = $GLOBALS['HTTP_GET_VARS']['type'];
|
||||
$GLOBALS['type'] = $type;
|
||||
$session_data = array(
|
||||
'type' => $GLOBALS['type']
|
||||
);
|
||||
@ -222,15 +224,15 @@
|
||||
|
||||
$tabs[] = array(
|
||||
'label' => lang('Your preferences'),
|
||||
'link' => $GLOBALS['phpgw']->link('/preferences/preferences.php','appname=' . $GLOBALS['HTTP_GET_VARS']['appname'] . '&type=user')
|
||||
'link' => $GLOBALS['phpgw']->link('/preferences/preferences.php','appname=' . $GLOBALS['appname'] . '&type=user')
|
||||
);
|
||||
$tabs[] = array(
|
||||
'label' => lang('Default preferences'),
|
||||
'link' => $GLOBALS['phpgw']->link('/preferences/preferences.php','appname=' . $GLOBALS['HTTP_GET_VARS']['appname'] . '&type=default')
|
||||
'link' => $GLOBALS['phpgw']->link('/preferences/preferences.php','appname=' . $GLOBALS['appname'] . '&type=default')
|
||||
);
|
||||
$tabs[] = array(
|
||||
'label' => lang('Forced preferences'),
|
||||
'link' => $GLOBALS['phpgw']->link('/preferences/preferences.php','appname=' . $GLOBALS['HTTP_GET_VARS']['appname'] . '&type=forced')
|
||||
'link' => $GLOBALS['phpgw']->link('/preferences/preferences.php','appname=' . $GLOBALS['appname'] . '&type=forced')
|
||||
);
|
||||
|
||||
switch($GLOBALS['type'])
|
||||
@ -253,7 +255,7 @@
|
||||
$GLOBALS['dp']->read_repository();
|
||||
}
|
||||
|
||||
if ($GLOBALS['HTTP_POST_VARS']['submit'])
|
||||
if (get_var('submit',Array('POST')))
|
||||
{
|
||||
/* Don't use a switch here, we need to check some permissions durring the ifs */
|
||||
if ($GLOBALS['type'] == 'user')
|
||||
@ -278,22 +280,22 @@
|
||||
$GLOBALS['phpgw']->common->phpgw_header();
|
||||
echo parse_navbar();
|
||||
|
||||
if ($GLOBALS['HTTP_GET_VARS']['appname'] == 'preferences')
|
||||
if ($GLOBALS['appname'] == 'preferences')
|
||||
{
|
||||
$t->set_var('lang_title',lang('Preferences'));
|
||||
}
|
||||
else
|
||||
{
|
||||
$t->set_var('lang_title',lang('%1 - Preferences',$GLOBALS['phpgw_info']['navbar'][$GLOBALS['HTTP_GET_VARS']['appname']]['title']));
|
||||
$t->set_var('lang_title',lang('%1 - Preferences',$GLOBALS['phpgw_info']['navbar'][$GLOBALS['appname']]['title']));
|
||||
}
|
||||
|
||||
$t->set_var('action_url',$GLOBALS['phpgw']->link('/preferences/preferences.php','appname=' . $GLOBALS['HTTP_GET_VARS']['appname']));
|
||||
$t->set_var('action_url',$GLOBALS['phpgw']->link('/preferences/preferences.php','appname=' . $GLOBALS['appname']));
|
||||
$t->set_var('th_bg', $GLOBALS['phpgw_info']['theme']['th_bg']);
|
||||
$t->set_var('th_text',$GLOBALS['phpgw_info']['theme']['th_text']);
|
||||
$t->set_var('row_on', $GLOBALS['phpgw_info']['theme']['row_on']);
|
||||
$t->set_var('row_off',$GLOBALS['phpgw_info']['theme']['row_off']);
|
||||
|
||||
if ($GLOBALS['HTTP_GET_VARS']['appname'] == 'preferences')
|
||||
if ($GLOBALS['appname'] == 'preferences')
|
||||
{
|
||||
if (! $GLOBALS['phpgw']->hooks->single('settings','preferences',True))
|
||||
{
|
||||
@ -302,7 +304,7 @@
|
||||
}
|
||||
else
|
||||
{
|
||||
if (! $GLOBALS['phpgw']->hooks->single('settings',$GLOBALS['HTTP_GET_VARS']['appname']))
|
||||
if (! $GLOBALS['phpgw']->hooks->single('settings',$GLOBALS['appname']))
|
||||
{
|
||||
$error = True;
|
||||
}
|
||||
@ -311,8 +313,8 @@
|
||||
if ($error)
|
||||
{
|
||||
$t->set_var('messages',lang('Error: There was a problem finding the preference file for %1 in %2',
|
||||
$GLOBALS['phpgw_info']['navbar'][$GLOBALS['HTTP_GET_VARS']['appname']]['title'],PHPGW_SERVER_ROOT . SEP
|
||||
. $GLOBALS['HTTP_GET_VARS']['appname'] . SEP . 'inc' . SEP . 'hook_settings.inc.php'));
|
||||
$GLOBALS['phpgw_info']['navbar'][$GLOBALS['appname']]['title'],PHPGW_SERVER_ROOT . SEP
|
||||
. $GLOBALS['appname'] . SEP . 'inc' . SEP . 'hook_settings.inc.php'));
|
||||
}
|
||||
$t->pfp('out','header');
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user