phpgroupware-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Phpgroupware-cvs] CVS: preferences changepassword.php,1.32,1.33 index.p


From: Mark A Peters <address@hidden>
Subject: [Phpgroupware-cvs] CVS: preferences changepassword.php,1.32,1.33 index.php,1.24,1.25 preferences.php,1.14,1.15
Date: Mon, 29 Apr 2002 18:25:12 -0400

Update of /cvsroot/phpgroupware/preferences
In directory subversions:/tmp/cvs-serv403

Modified Files:
        changepassword.php index.php preferences.php 
Log Message:
Converting to get_var() for all HTTP_*_VARS.

Index: changepassword.php
===================================================================
RCS file: /cvsroot/phpgroupware/preferences/changepassword.php,v
retrieving revision 1.32
retrieving revision 1.33
diff -C2 -r1.32 -r1.33
*** changepassword.php  31 Aug 2001 16:32:05 -0000      1.32
--- changepassword.php  29 Apr 2002 22:25:02 -0000      1.33
***************
*** 21,26 ****
        include('../header.inc.php');
  
!       $n_passwd   = $GLOBALS['HTTP_POST_VARS']['n_passwd'];
!       $n_passwd_2 = $GLOBALS['HTTP_POST_VARS']['n_passwd_2'];
  
        if (! $GLOBALS['phpgw']->acl->check('changepassword', 1))
--- 21,26 ----
        include('../header.inc.php');
  
!       $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))
***************
*** 39,43 ****
        
$GLOBALS['phpgw']->template->set_var('form_action',$GLOBALS['phpgw']->link('/preferences/changepassword.php'));
  
!       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 '
--- 39,43 ----
        
$GLOBALS['phpgw']->template->set_var('form_action',$GLOBALS['phpgw']->link('/preferences/changepassword.php'));
  
!       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 '
***************
*** 45,61 ****
        }
  
!       if ($GLOBALS['HTTP_POST_VARS']['submit'])
        {
!               if ($n_passwd != $n_passwd_2)
                {
                        $errors[] = lang('The two passwords are not the same');
                }
  
!               if (! $n_passwd)
                {
                        $errors[] = lang('You must enter a password');
                }
  
!               if (is_array($errors))
                {
                        $GLOBALS['phpgw']->common->phpgw_header();
--- 45,61 ----
        }
  
!       if(get_var('submit',Array('POST')))
        {
!               if($n_passwd != $n_passwd_2)
                {
                        $errors[] = lang('The two passwords are not the same');
                }
  
!               if(! $n_passwd)
                {
                        $errors[] = lang('You must enter a password');
                }
  
!               if(is_array($errors))
                {
                        $GLOBALS['phpgw']->common->phpgw_header();
***************
*** 68,72 ****
                $o_passwd = $GLOBALS['phpgw_info']['user']['passwd'];
                $passwd_changed = 
$GLOBALS['phpgw']->auth->change_password($o_passwd, $n_passwd);
!               if (! $passwd_changed)
                {
                        // This need to be changed to show a different message 
based on the result
--- 68,72 ----
                $o_passwd = $GLOBALS['phpgw_info']['user']['passwd'];
                $passwd_changed = 
$GLOBALS['phpgw']->auth->change_password($o_passwd, $n_passwd);
!               if(!$passwd_changed)
                {
                        // This need to be changed to show a different message 
based on the result

Index: index.php
===================================================================
RCS file: /cvsroot/phpgroupware/preferences/index.php,v
retrieving revision 1.24
retrieving revision 1.25
diff -C2 -r1.24 -r1.25
*** index.php   16 Mar 2002 01:33:19 -0000      1.24
--- index.php   29 Apr 2002 22:25:02 -0000      1.25
***************
*** 42,46 ****
                }
  
!               if (! $GLOBALS['HTTP_GET_VARS']['type'])
                {
                        $type = $session_data['type'];
--- 42,47 ----
                }
  
!               $type = get_var('type',Array('GET'));
!               if(!$type)
                {
                        $type = $session_data['type'];
***************
*** 48,52 ****
                else
                {
-                       $type = $GLOBALS['HTTP_GET_VARS']['type'];
                        $session_data = array('type' => $type);
                        
$GLOBALS['phpgw']->session->appsession('session_data','preferences',$session_data);
--- 49,52 ----

Index: preferences.php
===================================================================
RCS file: /cvsroot/phpgroupware/preferences/preferences.php,v
retrieving revision 1.14
retrieving revision 1.15
diff -C2 -r1.14 -r1.15
*** preferences.php     15 Apr 2002 03:29:13 -0000      1.14
--- preferences.php     29 Apr 2002 22:25:02 -0000      1.15
***************
*** 12,19 ****
        /* $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,
--- 12,15 ----
***************
*** 25,29 ****
        include('../header.inc.php');
  
!       if ($GLOBALS['HTTP_POST_VARS']['cancel'])
        {
                Header('Location: ' . 
$GLOBALS['phpgw']->link('/preferences/index.php'));
--- 21,30 ----
        include('../header.inc.php');
  
!       $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'));
***************
*** 45,49 ****
        function check_app()
        {
!               if ($GLOBALS['HTTP_GET_VARS']['appname'] == 'preferences')
                {
                        return 'common';
--- 46,50 ----
        function check_app()
        {
!               if ($GLOBALS['appname'] == 'preferences')
                {
                        return 'common';
***************
*** 51,55 ****
                else
                {
!                       return $GLOBALS['HTTP_GET_VARS']['appname'];
                }
        }
--- 52,56 ----
                else
                {
!                       return $GLOBALS['appname'];
                }
        }
***************
*** 208,212 ****
                }
  
!               if (!isset($GLOBALS['HTTP_GET_VARS']['type']))
                {
                        $GLOBALS['type'] = $session_data['type'];
--- 209,214 ----
                }
  
!               $type = get_vars('type',Array('GET'));
!               if (!isset($type))
                {
                        $GLOBALS['type'] = $session_data['type'];
***************
*** 214,218 ****
                else
                {
!                       $GLOBALS['type'] = $GLOBALS['HTTP_GET_VARS']['type'];
                        $session_data = array(
                                'type' => $GLOBALS['type']
--- 216,220 ----
                else
                {
!                       $GLOBALS['type'] = $type;
                        $session_data = array(
                                'type' => $GLOBALS['type']
***************
*** 223,235 ****
                $tabs[] = array(
                        'label' => lang('Your preferences'),
!                       'link'  => 
$GLOBALS['phpgw']->link('/preferences/preferences.php','appname=' . 
$GLOBALS['HTTP_GET_VARS']['appname'] . '&type=user')
                );
                $tabs[] = array(
                        'label' => lang('Default preferences'),
!                       'link'  => 
$GLOBALS['phpgw']->link('/preferences/preferences.php','appname=' . 
$GLOBALS['HTTP_GET_VARS']['appname'] . '&type=default')
                );
                $tabs[] = array(
                        'label' => lang('Forced preferences'),
!                       'link'  => 
$GLOBALS['phpgw']->link('/preferences/preferences.php','appname=' . 
$GLOBALS['HTTP_GET_VARS']['appname'] . '&type=forced')
                );
  
--- 225,237 ----
                $tabs[] = array(
                        'label' => lang('Your preferences'),
!                       '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['appname'] . '&type=default')
                );
                $tabs[] = array(
                        'label' => lang('Forced preferences'),
!                       'link'  => 
$GLOBALS['phpgw']->link('/preferences/preferences.php','appname=' . 
$GLOBALS['appname'] . '&type=forced')
                );
  
***************
*** 254,258 ****
        }
  
!       if ($GLOBALS['HTTP_POST_VARS']['submit'])
        {
                /* Don't use a switch here, we need to check some permissions 
durring the ifs */
--- 256,260 ----
        }
  
!       if (get_var('submit',Array('POST')))
        {
                /* Don't use a switch here, we need to check some permissions 
durring the ifs */
***************
*** 279,283 ****
        echo parse_navbar();
  
!       if ($GLOBALS['HTTP_GET_VARS']['appname'] == 'preferences')
        {
                $t->set_var('lang_title',lang('Preferences'));
--- 281,285 ----
        echo parse_navbar();
  
!       if ($GLOBALS['appname'] == 'preferences')
        {
                $t->set_var('lang_title',lang('Preferences'));
***************
*** 285,292 ****
        else
        {
!               $t->set_var('lang_title',lang('%1 - 
Preferences',$GLOBALS['phpgw_info']['navbar'][$GLOBALS['HTTP_GET_VARS']['appname']]['title']));
        }
  
!       
$t->set_var('action_url',$GLOBALS['phpgw']->link('/preferences/preferences.php','appname='
 . $GLOBALS['HTTP_GET_VARS']['appname']));
        $t->set_var('th_bg',  $GLOBALS['phpgw_info']['theme']['th_bg']);
        $t->set_var('th_text',$GLOBALS['phpgw_info']['theme']['th_text']);
--- 287,294 ----
        else
        {
!               $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['appname']));
        $t->set_var('th_bg',  $GLOBALS['phpgw_info']['theme']['th_bg']);
        $t->set_var('th_text',$GLOBALS['phpgw_info']['theme']['th_text']);
***************
*** 294,298 ****
        $t->set_var('row_off',$GLOBALS['phpgw_info']['theme']['row_off']);
  
!       if ($GLOBALS['HTTP_GET_VARS']['appname'] == 'preferences')
        {
                if (! 
$GLOBALS['phpgw']->hooks->single('settings','preferences',True))
--- 296,300 ----
        $t->set_var('row_off',$GLOBALS['phpgw_info']['theme']['row_off']);
  
!       if ($GLOBALS['appname'] == 'preferences')
        {
                if (! 
$GLOBALS['phpgw']->hooks->single('settings','preferences',True))
***************
*** 303,307 ****
        else
        {
!               if (! 
$GLOBALS['phpgw']->hooks->single('settings',$GLOBALS['HTTP_GET_VARS']['appname']))
                {
                        $error = True;
--- 305,309 ----
        else
        {
!               if (! 
$GLOBALS['phpgw']->hooks->single('settings',$GLOBALS['appname']))
                {
                        $error = True;
***************
*** 312,317 ****
        {
                $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'));
        }
        $t->pfp('out','header');
--- 314,319 ----
        {
                $t->set_var('messages',lang('Error: There was a problem finding 
the preference file for %1 in %2',
!                       
$GLOBALS['phpgw_info']['navbar'][$GLOBALS['appname']]['title'],PHPGW_SERVER_ROOT
 . SEP
!                       . $GLOBALS['appname'] . SEP . 'inc' . SEP . 
'hook_settings.inc.php'));
        }
        $t->pfp('out','header');




reply via email to

[Prev in Thread] Current Thread [Next in Thread]