phpgroupware-cvs
[Top][All Lists]
Advanced

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

[Phpgroupware-cvs] CVS: addressbook/inc class.boXport.inc.php,1.8,1.9 cl


From: Miles Lott <address@hidden>
Subject: [Phpgroupware-cvs] CVS: addressbook/inc class.boXport.inc.php,1.8,1.9 class.uiXport.inc.php,1.15,1.16 class.uiaddressbook.inc.php,1.47,1.48 class.uivcard.inc.php,1.7,1.8
Date: Sat, 24 Aug 2002 14:04:30 -0400

Update of /cvsroot/phpgroupware/addressbook/inc
In directory subversions:/tmp/cvs-serv32199/inc

Modified Files:
        class.boXport.inc.php class.uiXport.inc.php 
        class.uiaddressbook.inc.php class.uivcard.inc.php 
Log Message:
Starting update to new template class - header redirects still an issue



Index: class.boXport.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/addressbook/inc/class.boXport.inc.php,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -r1.8 -r1.9
*** class.boXport.inc.php       17 Jan 2002 03:52:55 -0000      1.8
--- class.boXport.inc.php       24 Aug 2002 18:04:27 -0000      1.9
***************
*** 42,54 ****
                                $this->use_session = True;
                        }
-                       global 
$start,$limit,$query,$sort,$order,$filter,$cat_id;
  
!                       if($start || $start == 0)  { $this->start = $start; }
!                       if($limit)  { $this->limit  = $limit;  }
!                       if($query)  { $this->query  = $query;  }
!                       if($sort)   { $this->sort   = $sort;   }
!                       if($order)  { $this->order  = $order;  }
!                       if($filter) { $this->filter = $filter; }
!                       $this->cat_id = $cat_id;
                }
  
--- 42,64 ----
                                $this->use_session = True;
                        }
  
!                       $start  = intval(get_var('start',   
array('POST','GET')));
!                       $query  = get_var('query',   array('POST','GET'));
!                       $limit  = get_var('limit',   array('POST','GET'));
!                       $sort   = get_var('sort',    array('POST','GET'));
!                       $order  = get_var('order',   array('POST','GET'));
!                       $filter = get_var('filter',  array('POST','GET'));
!                       $cat_id = get_var('fcat_id', array('POST'));
! 
!                       $this->start  = (!empty($start) || ($start == '0')) ? 
$start : $this->start;
!                       $this->limit  = (!empty($limit) || ($limit == '0')) ? 
$limit : $this->limit;
!                       $this->query  = (empty($query) && !empty($this->query)) 
|| !empty($query) ? $query : $this->query;
!                       $this->cquery = (empty($cquery) && 
!empty($this->cquery)) || !empty($cquery) ? $cquery : $this->cquery;
!                       $this->sort   = (!empty($sort)) ? $sort : $this->sort;
!                       $this->order  = (!empty($order)) ? $order : 
$this->order;
!                       $this->filter = (!empty($filter) || ($filter == '0')) ? 
$filter : $this->filter;
! 
!                       $this->cat_id = (isset($cat_id) && !empty($cat_id)) ? 
$cat_id : $this->cat_id;
!                       $this->cat_id = ($cat_id == '0' || $cat_id == 0 || 
$cat_id == '') ? $cat_id : $this->cat_id;
                }
  

Index: class.uiXport.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/addressbook/inc/class.uiXport.inc.php,v
retrieving revision 1.15
retrieving revision 1.16
diff -C2 -r1.15 -r1.16
*** class.uiXport.inc.php       23 Jun 2002 18:52:50 -0000      1.15
--- class.uiXport.inc.php       24 Aug 2002 18:04:27 -0000      1.16
***************
*** 15,19 ****
        class uiXport
        {
!               var $template;
                var $public_functions = array(
                        'import' => True,
--- 15,19 ----
        class uiXport
        {
!               var $output = '';
                var $public_functions = array(
                        'import' => True,
***************
*** 33,37 ****
                function uiXport()
                {
-                       $this->template = $GLOBALS['phpgw']->template;
                        $this->cat      = CreateObject('phpgwapi.categories');
                        $this->bo       = 
CreateObject('addressbook.boXport',True);
--- 33,36 ----
***************
*** 47,50 ****
--- 46,58 ----
                }
  
+               function totpl()
+               {
+                       if(@isset($this->output) && !empty($this->output))
+                       {
+                               
$GLOBALS['phpgw']->template->set_var('phpgw_body', $this->output,True);
+                               unset($this->output);
+                       }
+               }
+ 
                /* Return a select form element with the categories option 
dialog in it */
                function 
cat_option($cat_id='',$notall=False,$java=True,$multiple=False)
***************
*** 109,115 ****
                                $GLOBALS['phpgw']->common->phpgw_header();
  
!                               set_time_limit(0)
  
!                               $this->template->set_file(array('import' => 
'import.tpl'));
  
                                $dir_handle = opendir(PHPGW_APP_INC . SEP . 
'import');
--- 117,123 ----
                                $GLOBALS['phpgw']->common->phpgw_header();
  
!                               set_time_limit(0);
  
!                               
$GLOBALS['phpgw']->template->set_file(array('import' => 'import.tpl'));
  
                                $dir_handle = opendir(PHPGW_APP_INC . SEP . 
'import');
***************
*** 131,163 ****
                                }
  
!                               
$this->template->set_var('lang_cancel',lang('Cancel'));
!                               
$this->template->set_var('lang_cat',lang('Select Category'));
!                               
$this->template->set_var('cancel_url',$GLOBALS['phpgw']->link('/index.php','menuaction=addressbook.uiaddressbook.index'));
!                               
$this->template->set_var('conversion',lang('Select the type of conversion'));
!                               
$this->template->set_var('export_path',lang('Enter the path to the export file 
here'));
!                               
$this->template->set_var('navbar_bg',$GLOBALS['phpgw_info']['theme']['navbar_bg']);
!                               
$this->template->set_var('navbar_text',$GLOBALS['phpgw_info']['theme']['navbar_text']);
!                               
$this->template->set_var('mark_private',lang('Mark records as private'));
!                               $this->template->set_var('help_import',lang('In 
Netscape, open the Addressbook and select <b>Export</b> from the <b>File</b> 
menu.<br>The file exported will be in LDIF format.<P>Or, in Outlook, select 
your Contacts folder, select <b>Import and Export...</b> from'));
!                               
$this->template->set_var('help_import2',lang('the <b>File</b> menu and export 
your contacts into a comma separated text (CSV) file. <P>Or, in Palm Desktop 
4.0 or greater, visit your addressbook and select <b>Export</b> from the 
<b>File</b> menu. The file exported will be in VCard format.<P>'));
!                               $this->template->set_var('none',lang('none'));
!                               
$this->template->set_var('debug_browser',lang('Debug output in browser'));
!                               
$this->template->set_var('import_text',lang('Import from LDIF, CSV, or VCard'));
!                               
$this->template->set_var('action_url',$GLOBALS['phpgw']->link('/index.php','menuaction=addressbook.uiXport.import'));
!                               
$this->template->set_var('cat_link',$this->cat_option($this->cat_id,True,False));
!                               $this->template->set_var('tsvfilename','');
!                               $this->template->set_var('conv',$conv);
!                               $this->template->set_var('debug',lang('Debug 
output in browser'));
!                               
$this->template->set_var('filetype',lang('LDIF'));
!                               
$this->template->set_var('download',lang('Submit'));
!                               $this->template->set_var('start',$this->start);
!                               $this->template->set_var('sort',$this->sort);
!                               $this->template->set_var('order',$this->order);
!                               
$this->template->set_var('filter',$this->filter);
!                               $this->template->set_var('query',$this->query);
!                               
$this->template->set_var('cat_id',$this->cat_id);
!                               $this->template->pparse('out','import');
                        }
-                       $GLOBALS['phpgw']->common->phpgw_footer();
                }
  
--- 139,172 ----
                                }
  
!                               
$GLOBALS['phpgw']->template->set_var('lang_cancel',lang('Cancel'));
!                               
$GLOBALS['phpgw']->template->set_var('lang_cat',lang('Select Category'));
!                               
$GLOBALS['phpgw']->template->set_var('cancel_url',$GLOBALS['phpgw']->link('/index.php','menuaction=addressbook.uiaddressbook.index'));
!                               
$GLOBALS['phpgw']->template->set_var('conversion',lang('Select the type of 
conversion'));
!                               
$GLOBALS['phpgw']->template->set_var('export_path',lang('Enter the path to the 
export file here'));
!                               
$GLOBALS['phpgw']->template->set_var('navbar_bg',$GLOBALS['phpgw_info']['theme']['navbar_bg']);
!                               
$GLOBALS['phpgw']->template->set_var('navbar_text',$GLOBALS['phpgw_info']['theme']['navbar_text']);
!                               
$GLOBALS['phpgw']->template->set_var('mark_private',lang('Mark records as 
private'));
!                               
$GLOBALS['phpgw']->template->set_var('help_import',lang('In Netscape, open the 
Addressbook and select <b>Export</b> from the <b>File</b> menu.<br>The file 
exported will be in LDIF format.<P>Or, in Outlook, select your Contacts folder, 
select <b>Import and Export...</b> from'));
!                               
$GLOBALS['phpgw']->template->set_var('help_import2',lang('the <b>File</b> menu 
and export your contacts into a comma separated text (CSV) file. <P>Or, in Palm 
Desktop 4.0 or greater, visit your addressbook and select <b>Export</b> from 
the <b>File</b> menu. The file exported will be in VCard format.<P>'));
!                               
$GLOBALS['phpgw']->template->set_var('none',lang('none'));
!                               
$GLOBALS['phpgw']->template->set_var('debug_browser',lang('Debug output in 
browser'));
!                               
$GLOBALS['phpgw']->template->set_var('import_text',lang('Import from LDIF, CSV, 
or VCard'));
!                               
$GLOBALS['phpgw']->template->set_var('action_url',$GLOBALS['phpgw']->link('/index.php','menuaction=addressbook.uiXport.import'));
!                               
$GLOBALS['phpgw']->template->set_var('cat_link',$this->cat_option($this->cat_id,True,False));
!                               
$GLOBALS['phpgw']->template->set_var('tsvfilename','');
!                               
$GLOBALS['phpgw']->template->set_var('conv',$conv);
!                               
$GLOBALS['phpgw']->template->set_var('debug',lang('Debug output in browser'));
!                               
$GLOBALS['phpgw']->template->set_var('filetype',lang('LDIF'));
!                               
$GLOBALS['phpgw']->template->set_var('download',lang('Submit'));
!                               
$GLOBALS['phpgw']->template->set_var('start',$this->start);
!                               
$GLOBALS['phpgw']->template->set_var('sort',$this->sort);
!                               
$GLOBALS['phpgw']->template->set_var('order',$this->order);
!                               
$GLOBALS['phpgw']->template->set_var('filter',$this->filter);
!                               
$GLOBALS['phpgw']->template->set_var('query',$this->query);
!                               
$GLOBALS['phpgw']->template->set_var('cat_id',$this->cat_id);
! 
!                               $this->output = 
$GLOBALS['phpgw']->template->fp('out','import');
!                               $this->totpl();
                        }
                }
  
***************
*** 202,208 ****
                                $GLOBALS['phpgw']->common->phpgw_header();
  
!                               set_time_limit(0)
  
!                               $this->template->set_file(array('export' => 
'export.tpl'));
  
                                $dir_handle = opendir(PHPGW_APP_INC. SEP . 
'export');
--- 211,217 ----
                                $GLOBALS['phpgw']->common->phpgw_header();
  
!                               set_time_limit(0);
  
!                               
$GLOBALS['phpgw']->template->set_file(array('export' => 'export.tpl'));
  
                                $dir_handle = opendir(PHPGW_APP_INC. SEP . 
'export');
***************
*** 224,251 ****
                                }
  
!                               
$this->template->set_var('lang_cancel',lang('Cancel'));
!                               
$this->template->set_var('lang_cat',lang('Select Category'));
!                               
$this->template->set_var('cat_link',$this->cat_option($this->cat_id,False,False));
!                               
$this->template->set_var('cancel_url',$GLOBALS['phpgw']->link('/addressbook/index.php'));
!                               
$this->template->set_var('navbar_bg',$GLOBALS['phpgw_info']['theme']['navbar_bg']);
!                               
$this->template->set_var('navbar_text',$GLOBALS['phpgw_info']['theme']['navbar_text']);
!                               
$this->template->set_var('export_text',lang('Export from Addressbook'));
!                               
$this->template->set_var('action_url',$GLOBALS['phpgw']->link('/index.php','menuaction=addressbook.uiXport.export'));
!                               
$this->template->set_var('filename',lang('Export file name'));
!                               
$this->template->set_var('conversion',lang('Select the type of conversion'));
!                               $this->template->set_var('conv',$conv);
!                               $this->template->set_var('debug',lang(''));
!                               
$this->template->set_var('download',lang('Submit'));
!                               
$this->template->set_var('download_export',lang('Download export file (Uncheck 
to debug output in browser)'));
!                               $this->template->set_var('none',lang('none'));
!                               $this->template->set_var('start',$this->start);
!                               $this->template->set_var('sort',$this->sort);
!                               $this->template->set_var('order',$this->order);
!                               
$this->template->set_var('filter',$this->filter);
!                               $this->template->set_var('query',$this->query);
!                               
$this->template->set_var('cat_id',$this->cat_id);
!                               $this->template->pparse('out','export');
  
!                               $GLOBALS['phpgw']->common->phpgw_footer();
                        }
                }
--- 233,260 ----
                                }
  
!                               
$GLOBALS['phpgw']->template->set_var('lang_cancel',lang('Cancel'));
!                               
$GLOBALS['phpgw']->template->set_var('lang_cat',lang('Select Category'));
!                               
$GLOBALS['phpgw']->template->set_var('cat_link',$this->cat_option($this->cat_id,False,False));
!                               
$GLOBALS['phpgw']->template->set_var('cancel_url',$GLOBALS['phpgw']->link('/addressbook/index.php'));
!                               
$GLOBALS['phpgw']->template->set_var('navbar_bg',$GLOBALS['phpgw_info']['theme']['navbar_bg']);
!                               
$GLOBALS['phpgw']->template->set_var('navbar_text',$GLOBALS['phpgw_info']['theme']['navbar_text']);
!                               
$GLOBALS['phpgw']->template->set_var('export_text',lang('Export from 
Addressbook'));
!                               
$GLOBALS['phpgw']->template->set_var('action_url',$GLOBALS['phpgw']->link('/index.php','menuaction=addressbook.uiXport.export'));
!                               
$GLOBALS['phpgw']->template->set_var('filename',lang('Export file name'));
!                               
$GLOBALS['phpgw']->template->set_var('conversion',lang('Select the type of 
conversion'));
!                               
$GLOBALS['phpgw']->template->set_var('conv',$conv);
!                               
$GLOBALS['phpgw']->template->set_var('debug',lang(''));
!                               
$GLOBALS['phpgw']->template->set_var('download',lang('Submit'));
!                               
$GLOBALS['phpgw']->template->set_var('download_export',lang('Download export 
file (Uncheck to debug output in browser)'));
!                               
$GLOBALS['phpgw']->template->set_var('none',lang('none'));
!                               
$GLOBALS['phpgw']->template->set_var('start',$this->start);
!                               
$GLOBALS['phpgw']->template->set_var('sort',$this->sort);
!                               
$GLOBALS['phpgw']->template->set_var('order',$this->order);
!                               
$GLOBALS['phpgw']->template->set_var('filter',$this->filter);
!                               
$GLOBALS['phpgw']->template->set_var('query',$this->query);
!                               
$GLOBALS['phpgw']->template->set_var('cat_id',$this->cat_id);
  
!                               $this->output = 
$GLOBALS['phpgw']->template->fp('out','export');
!                               $this->totpl();
                        }
                }

Index: class.uiaddressbook.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/addressbook/inc/class.uiaddressbook.inc.php,v
retrieving revision 1.47
retrieving revision 1.48
diff -C2 -r1.47 -r1.48
*** class.uiaddressbook.inc.php 24 May 2002 10:38:01 -0000      1.47
--- class.uiaddressbook.inc.php 24 Aug 2002 18:04:27 -0000      1.48
***************
*** 16,20 ****
        class uiaddressbook
        {
!               var $template;
                var $contacts;
                var $bo;
--- 16,20 ----
        class uiaddressbook
        {
!               var $output = '';
                var $contacts;
[...1210 lines suppressed...]
!                       
$GLOBALS['phpgw']->template->set_var('cats_link',$cats_link);
                        if($customfields)
                        {
!                               
$GLOBALS['phpgw']->template->set_var('lang_custom',lang('Custom Fields').':');
!                               
$GLOBALS['phpgw']->template->set_var('custom',$custom);
                        }
                        else
                        {
!                               
$GLOBALS['phpgw']->template->set_var('lang_custom','');
!                               
$GLOBALS['phpgw']->template->set_var('custom','');
                        }
!                       $GLOBALS['phpgw']->template->set_var('th_bg',   
$GLOBALS['phpgw_info']['theme']['th_bg']);
!                       $GLOBALS['phpgw']->template->set_var('th_text', 
$GLOBALS['phpgw_info']['theme']['th_text']);
!                       $GLOBALS['phpgw']->template->set_var('row_on',  
$GLOBALS['phpgw_info']['theme']['row_on']);
!                       $GLOBALS['phpgw']->template->set_var('row_off', 
$GLOBALS['phpgw_info']['theme']['row_off']);
!                       
$GLOBALS['phpgw']->template->set_var('row_text',$GLOBALS['phpgw_info']['theme']['row_text']);
  
!                       $this->output .= 
$GLOBALS['phpgw']->template->fp('out','form');
                } /* end form function */
        }

Index: class.uivcard.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/addressbook/inc/class.uivcard.inc.php,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -r1.7 -r1.8
*** class.uivcard.inc.php       24 May 2002 10:38:01 -0000      1.7
--- class.uivcard.inc.php       24 Aug 2002 18:04:27 -0000      1.8
***************
*** 71,75 ****
                function out()
                {
!                       global $ab_id,$nolname,$nofname;
  
                        if($nolname || $nofname)
--- 71,77 ----
                function out()
                {
!                       $ab_id   = get_var('ab_id',array('GET','POST'));
!                       $nolname = get_var('nolname',array('GET','POST'));
!                       $nofname = get_var('nofname',array('GET','POST'));
  
                        if($nolname || $nofname)
***************
*** 85,89 ****
  
                        // First, make sure they have permission to this entry
!                       $check = $this->bo->read_entry(array('id' => $ab_id, 
'fields' => array('owner' => 'owner')));
                        $perms = 
$this->contacts->check_perms($this->contacts->grants[$check[0]['owner']],PHPGW_ACL_READ);
  
--- 87,96 ----
  
                        // First, make sure they have permission to this entry
!                       $check = $this->bo->read_entry(array(
!                               'id' => $ab_id,
!                               'fields' => array(
!                                       'owner' => 'owner'
!                               )
!                       ));
                        $perms = 
$this->contacts->check_perms($this->contacts->grants[$check[0]['owner']],PHPGW_ACL_READ);
  





reply via email to

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