phpgroupware-cvs
[Top][All Lists]
Advanced

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

[Phpgroupware-cvs] headlines preferences.php, 1.19.2.1.2.1, 1.19.2.1.2.2


From: Dave Hall <address@hidden>
Subject: [Phpgroupware-cvs] headlines preferences.php, 1.19.2.1.2.1, 1.19.2.1.2.2
Date: Mon, 17 Nov 2003 18:08:23 +0000

Update of /cvsroot/phpgroupware/headlines
In directory subversions:/tmp/cvs-serv27561

Modified Files:
      Tag: Version-0_9_16-branch
        preferences.php 
Log Message:
tidy up

Index: preferences.php
===================================================================
RCS file: /cvsroot/phpgroupware/headlines/preferences.php,v
retrieving revision 1.19.2.1.2.1
retrieving revision 1.19.2.1.2.2
diff -C2 -d -r1.19.2.1.2.1 -r1.19.2.1.2.2
*** preferences.php     10 Oct 2003 01:13:44 -0000      1.19.2.1.2.1
--- preferences.php     17 Nov 2003 18:08:20 -0000      1.19.2.1.2.2
***************
*** 20,24 ****
        include('../header.inc.php');
  
!       if (! $submit)
        {
                $GLOBALS['phpgw']->common->phpgw_header();
--- 20,24 ----
        include('../header.inc.php');
  
!       if (! @$_POST['submit'])
        {
                $GLOBALS['phpgw']->common->phpgw_header();
***************
*** 27,31 ****
                $GLOBALS['phpgw']->template->set_file(array('form' => 
'preferences.tpl'));
             
!               
$GLOBALS['phpgw']->template->set_var('form_action',$phpgw->link('/headlines/preferences.php'));
                
$GLOBALS['phpgw']->template->set_var('th_bg',$GLOBALS['phpgw_info']['theme']['th_bg']);
                $GLOBALS['phpgw']->template->set_var('lang_header',lang('select 
headline news sites'));
--- 27,31 ----
                $GLOBALS['phpgw']->template->set_file(array('form' => 
'preferences.tpl'));
             
!               
$GLOBALS['phpgw']->template->set_var('form_action',$GLOBALS['phpgw']->link('/headlines/preferences.php'));
                
$GLOBALS['phpgw']->template->set_var('th_bg',$GLOBALS['phpgw_info']['theme']['th_bg']);
                $GLOBALS['phpgw']->template->set_var('lang_header',lang('select 
headline news sites'));
***************
*** 52,74 ****
  
                $GLOBALS['phpgw']->template->pparse('out','form');
!   } else {
! 
!               $i = 0;
!               while 
(is_array($GLOBALS['phpgw_info']['user']['preferences']['headlines']) && 
$preference = each($GLOBALS['phpgw_info']['user']['preferences']['headlines']))
!               {
!                       
$GLOBALS['phpgw']->preferences->delete('headlines',$preference[0]);
!               }
        
!               if (count($_POST['headlines']))
                {
                        while ($value = each($_POST['headlines']))
                        {
!                               
$GLOBALS['phpgw']->preferences->add('headlines',$value[1],'True');
                        }
                }
  
!               $GLOBALS['phpgw']->preferences->save_repository(True);
  
!               Header('Location: ' . 
$GLOBALS['phpgw']->link('/preferences/index.php'));
        }
        $GLOBALS['phpgw']->common->phpgw_footer();
--- 52,77 ----
  
                $GLOBALS['phpgw']->template->pparse('out','form');
!       }
!       else
!       {
!               //save the user's layout setting
!               $layout = 
$GLOBALS['phpgw_info']['user']['preferences']['headlines']['headlines_layout'];
!               
!               //kill the old prefs
!               $GLOBALS['phpgw']->preferences->delete('headlines', '');
        
!               if (@count($_POST['headlines']))
                {
                        while ($value = each($_POST['headlines']))
                        {
!                               
$GLOBALS['phpgw']->preferences->add('headlines',$value[1],'True', 'user');
                        }
                }
  
!               $GLOBALS['phpgw']->preferences->add('headlines', 
'headlines_layout', $layout, 'user');
  
!               $GLOBALS['phpgw']->preferences->save_repository(True, 'user');
! 
!               Header('Location: ' . 
$GLOBALS['phpgw']->link('/preferences/index.php') . '#headlines');
        }
        $GLOBALS['phpgw']->common->phpgw_footer();





reply via email to

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