phpgroupware-cvs
[Top][All Lists]
Advanced

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

[Phpgroupware-cvs] CVS: preferences preferences.php,1.13.2.8.2.4,1.13.2


From: Ralf Becker <address@hidden>
Subject: [Phpgroupware-cvs] CVS: preferences preferences.php,1.13.2.8.2.4,1.13.2.8.2.5
Date: Mon, 31 Mar 2003 13:17:11 -0500

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

Modified Files:
      Tag: Version-0_9_16-branch
        preferences.php 
Log Message:
update preferences: helptexts

Index: preferences.php
===================================================================
RCS file: /cvsroot/phpgroupware/preferences/preferences.php,v
retrieving revision 1.13.2.8.2.4
retrieving revision 1.13.2.8.2.5
diff -C2 -r1.13.2.8.2.4 -r1.13.2.8.2.5
*** preferences.php     31 Mar 2003 00:37:26 -0000      1.13.2.8.2.4
--- preferences.php     31 Mar 2003 18:17:09 -0000      1.13.2.8.2.5
***************
*** 12,19 ****
        /* $Id$ */
  
-       $user    = (@isset($_POST['user'])   ? $_POST['user']   : '');
-       $forced  = (@isset($_POST['forced']) ? $_POST['forced'] : '');
-       $default = (@isset($_POST['default'])? $_POST['default']: '');
- 
        $GLOBALS['phpgw_info']['flags'] = array(
                'noheader'                => True,
--- 12,15 ----
***************
*** 29,43 ****
                $GLOBALS['phpgw']->redirect_link('/preferences/index.php');
        }
! 
!       $show_help = get_var('show_help',array('POST','GET'));
!       if (!isset($_POST['show_help']) && !isset($_GET['show_help']))
!       {
!               $show_help = 
intval($GLOBALS['phpgw_info']['user']['preferences']['common']['show_help']);
!       }
!       if ($toggle_help = get_var('toggle_help','POST'))
!       {
!               $show_help = intval(!$show_help);
!       }
!       $has_help = 0;
  
        $t = 
CreateObject('phpgwapi.Template',$GLOBALS['phpgw']->common->get_tpl_dir('preferences'));
--- 25,32 ----
                $GLOBALS['phpgw']->redirect_link('/preferences/index.php');
        }
!       
!       $user    = get_var('user',Array('POST'));
!       $forced  = get_var('forced',Array('POST'));
!       $default = get_var('default',Array('POST'));
  
        $t = 
CreateObject('phpgwapi.Template',$GLOBALS['phpgw']->common->get_tpl_dir('preferences'));
***************
*** 48,51 ****
--- 37,41 ----
        $t->set_block('preferences','row','rowhandle');
        $t->set_block('preferences','help_row','help_rowhandle');
+       $t->set_var(array('rowhandle' => '','help_rowhandle' => '','messages' 
=> ''));
        
        if ($_GET['appname'] != 'preverences')
***************
*** 293,297 ****
  
                $t->set_var('list_header',$header);
!               $t->parse('lists','list',True);
  
                $t->set_var('rows','');
--- 283,287 ----
  
                $t->set_var('list_header',$header);
!               $t->parse('lists','list',$list_shown);
  
                $t->set_var('rows','');
***************
*** 299,327 ****
        }
  
        if (is_admin())
        {
                /* This is where we will keep track of our postion. */
                /* Developers won't have to pass around a variable then */
-               $session_data = 
$GLOBALS['phpgw']->session->appsession('session_data','preferences');
  
!               if (! is_array($session_data))
!               {
!                       $session_data = array(
!                               'type' => 'user'
!                       );
!                       
$GLOBALS['phpgw']->session->appsession('session_data','preferences',$session_data);
!               }
  
!               if (!isset($GLOBALS['HTTP_GET_VARS']['type']))
                {
!                       $GLOBALS['type'] = $session_data['type'];
!               }
!               else
!               {
!                       $GLOBALS['type'] = $GLOBALS['HTTP_GET_VARS']['type'];
!                       $session_data = array(
!                               'type' => $GLOBALS['type']
!                       );
!                       
$GLOBALS['phpgw']->session->appsession('session_data','preferences',$session_data);
                }
        }
--- 289,304 ----
        }
  
+       $session_data = 
$GLOBALS['phpgw']->session->appsession('session_data','preferences');
+ 
        if (is_admin())
        {
                /* This is where we will keep track of our postion. */
                /* Developers won't have to pass around a variable then */
  
!               $GLOBALS['type'] = 
get_var('type',Array('GET','POST'),$session_data['type']);
  
!               if (empty($GLOBALS['type']))
                {
!                       $GLOBALS['type'] = 'user';
                }
        }
***************
*** 330,333 ****
--- 307,320 ----
                $GLOBALS['type'] = 'user';
        }
+       $prefix = get_var('prefix',array('GET'),$session_data['prefix']);
+       
+       $show_help = "$session_data[show_help]" != '' ? 
$session_data['show_help'] : 
+               
intval($GLOBALS['phpgw_info']['user']['preferences']['common']['show_help']);
+ 
+       if ($toggle_help = get_var('toggle_help','POST'))
+       {
+               $show_help = intval(!$show_help);
+       }
+       $has_help = 0;
  
        /* Only load if there working on the default preferences */
***************
*** 366,369 ****
--- 353,361 ----
                }
        }
+       
$GLOBALS['phpgw']->session->appsession('session_data','preferences',array(
+               'type'      => $GLOBALS['type'],        // save our state in 
the app-session
+               'show_help' => $show_help,
+               'prefix'    => $prefix
+       ));
  
        $GLOBALS['phpgw']->common->phpgw_header();
***************
*** 379,384 ****
        }
  
!       
$t->set_var('action_url',$GLOBALS['phpgw']->link('/preferences/preferences.php','appname='
 . $_GET['appname'].
!               ($_GET['prefix'] ? '&prefix='.$_GET['prefix'] : '')));
        $t->set_var('th_bg',  $GLOBALS['phpgw_info']['theme']['th_bg']);
        $t->set_var('th_text',$GLOBALS['phpgw_info']['theme']['th_text']);
--- 371,375 ----
        }
  
!       
$t->set_var('action_url',$GLOBALS['phpgw']->link('/preferences/preferences.php','appname='
 . $_GET['appname']));
        $t->set_var('th_bg',  $GLOBALS['phpgw_info']['theme']['th_bg']);
        $t->set_var('th_text',$GLOBALS['phpgw_info']['theme']['th_text']);
***************
*** 426,429 ****
--- 417,421 ----
        {
                $t->set_block('preferences','form','formhandle');       // skip 
the form
+               $t->set_var('formhandle','');
                
                $t->set_var('messages',lang('Error: There was a problem finding 
the preference file for %1 in %2',
***************
*** 434,450 ****
        if (is_admin())
        {
-               $help = $has_help ? '&show_help='.intval($show_help) : '';
- 
                $tabs[] = array(
                        'label' => lang('Your preferences'),
!                       'link'  => 
$GLOBALS['phpgw']->link('/preferences/preferences.php','appname=' . 
$_GET['appname'] . "&type=user$help")
                );
                $tabs[] = array(
                        'label' => lang('Default preferences'),
!                       'link'  => 
$GLOBALS['phpgw']->link('/preferences/preferences.php','appname=' . 
$_GET['appname'] . "&type=default$help")
                );
                $tabs[] = array(
                        'label' => lang('Forced preferences'),
!                       'link'  => 
$GLOBALS['phpgw']->link('/preferences/preferences.php','appname=' . 
$_GET['appname'] . "&type=forced$help")
                );
  
--- 426,440 ----
        if (is_admin())
        {
                $tabs[] = array(
                        'label' => lang('Your preferences'),
!                       'link'  => 
$GLOBALS['phpgw']->link('/preferences/preferences.php','appname=' . 
$_GET['appname'] . "&type=user")
                );
                $tabs[] = array(
                        'label' => lang('Default preferences'),
!                       'link'  => 
$GLOBALS['phpgw']->link('/preferences/preferences.php','appname=' . 
$_GET['appname'] . "&type=default")
                );
                $tabs[] = array(
                        'label' => lang('Forced preferences'),
!                       'link'  => 
$GLOBALS['phpgw']->link('/preferences/preferences.php','appname=' . 
$_GET['appname'] . "&type=forced")
                );
  
***************
*** 467,471 ****
                show_list();
        }
!       $t->pfp('out','preferences');
        
        $GLOBALS['phpgw']->common->phpgw_footer();
--- 457,461 ----
                show_list();
        }
!       $t->pfp('phpgw_body','preferences');
        
        $GLOBALS['phpgw']->common->phpgw_footer();





reply via email to

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