phpgroupware-cvs
[Top][All Lists]
Advanced

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

[Phpgroupware-cvs] CVS: property/inc class.bodocument.inc.php,1.1,1.2 cl


From: Sigurd Nes <address@hidden>
Subject: [Phpgroupware-cvs] CVS: property/inc class.bodocument.inc.php,1.1,1.2 class.historylog.inc.php,1.3,1.4 class.sodocument.inc.php,1.1,1.2 class.soXport.inc.php,1.18,1.19 class.uidocument.inc.php,1.1,1.2
Date: Tue, 29 Apr 2003 08:20:09 -0400

Update of /cvsroot/phpgroupware/property/inc
In directory subversions:/tmp/cvs-serv30591/inc

Modified Files:
        class.bodocument.inc.php class.historylog.inc.php 
        class.sodocument.inc.php class.soXport.inc.php 
        class.uidocument.inc.php 
Log Message:
no message

Index: class.bodocument.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/inc/class.bodocument.inc.php,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -r1.1 -r1.2
*** class.bodocument.inc.php    28 Apr 2003 10:26:44 -0000      1.1
--- class.bodocument.inc.php    29 Apr 2003 12:20:06 -0000      1.2
***************
*** 33,36 ****
--- 33,39 ----
                        $this->historylog       = 
CreateObject($this->currentapp.'.historylog','document');
                        $this->contacts         = 
CreateObject('phpgwapi.contacts');
+                       $this->vfs                                      = 
CreateObject('phpgwapi.vfs');
+                       $this->rootdir                          = 
$this->vfs->basedir;
+                       $this->fakebase                         = 
$this->vfs->fakebase;
  
                        $start  = get_var('start',array('POST','GET'));
***************
*** 370,373 ****
--- 373,462 ----
                        return $record_history;
                }
+ 
+ 
+               function create_home_dir()
+               {
+                       if(!$this->vfs->file_exists(array(
+                                       'string' => $this->fakebase. SEP . 
'document',
+                                       'relatives' => Array(RELATIVE_NONE)
+                               )))
+                       {
+                               $this->vfs->override_acl = 1;
+ 
+                               if(!$this->vfs->mkdir (array(
+                                    'string' => $this->fakebase. SEP . 
'document',
+                                    'relatives' => array(
+                                         RELATIVE_NONE
+                                    )
+                               )))
+                               {
+                                       
$receipt['error'][]=array('msg'=>lang('failed to create directory') . ' :'. 
$this->fakebase. SEP . 'document');
+                               }
+                               else
+                               {
+                                       
$receipt['message'][]=array('msg'=>lang('directory created') . ' :'. 
$this->fakebase. SEP . 'document');
+                               }
+                               $this->vfs->override_acl = 0;
+                       }
+ //_debug_array($receipt);
+ 
+               }
+ 
+ 
+               function create_document_dir($property_id='',$equipment_id='')
+               {
+                       if(!$this->vfs->file_exists(array(
+                                       'string' => $this->fakebase. SEP . 
'document' .  SEP . $property_id,
+                                       'relatives' => Array(RELATIVE_NONE)
+                               )))
+                       {
+                               $this->vfs->override_acl = 1;
+                               if(!$this->vfs->mkdir (array(
+                                    'string' => $this->fakebase. SEP . 
'document' .  SEP . $property_id,
+                                    'relatives' => array(
+                                         RELATIVE_NONE
+                                    )
+                               )))
+                               {
+                                       
$receipt['error'][]=array('msg'=>lang('failed to create directory') . ' :'. 
$this->fakebase. SEP . 'document' .  SEP . $property_id);
+                               }
+                               else
+                               {
+                                       
$receipt['message'][]=array('msg'=>lang('directory created') . ' :'. 
$this->fakebase. SEP . 'document' .  SEP . $property_id);
+                               }
+                               $this->vfs->override_acl = 0;
+                       }
+ 
+                       if($equipment_id)
+                       {
+                               if(!$this->vfs->file_exists(array(
+                                               'string' => $this->fakebase. 
SEP . 'document' .  SEP . $property_id .  SEP . $equipment_id,
+                                               'relatives' => 
Array(RELATIVE_NONE)
+                                       )))
+                               {
+                                       $this->vfs->override_acl = 1;
+ 
+                                       if(!$this->vfs->mkdir (array(
+                                            'string' => $this->fakebase. SEP . 
'document' .  SEP . $property_id .  SEP . $equipment_id,
+                                            'relatives' => array(
+                                                 RELATIVE_NONE
+                                            )
+                                       )))
+                                       {
+                                               
$receipt['error'][]=array('msg'=>lang('failed to create directory') . ' :'. 
$this->fakebase. SEP . 'document'  .  SEP . $property_id .  SEP . 
$equipment_id);
+                                       }
+                                       else
+                                       {
+                                               
$receipt['message'][]=array('msg'=>lang('directory created') . ' :'. 
$this->fakebase. SEP . 'document' .  SEP . $property_id .  SEP . $equipment_id);
+                                       }
+                                       $this->vfs->override_acl = 0;
+                               }
+ 
+                       }
+ 
+ //_debug_array($receipt);
+                       return $receipt;
+               }
+ 
  
                function save($values)

Index: class.historylog.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/inc/class.historylog.inc.php,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -r1.3 -r1.4
*** class.historylog.inc.php    20 Apr 2003 22:24:30 -0000      1.3
--- class.historylog.inc.php    29 Apr 2003 12:20:06 -0000      1.4
***************
*** 59,62 ****
--- 59,65 ----
                                        $this->table='fm_drawing_history';
                                        break;
+                               case 'document':
+                                       $this->table='fm_document_history';
+                                       break;
                        }
  

Index: class.sodocument.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/inc/class.sodocument.inc.php,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -r1.1 -r1.2
*** class.sodocument.inc.php    28 Apr 2003 10:26:44 -0000      1.1
--- class.sodocument.inc.php    29 Apr 2003 12:20:06 -0000      1.2
***************
*** 341,347 ****
                        $receipt['document_id'] = 
$this->db->get_last_insert_id('fm_document','id');
  
!                       
$this->historylog->add('SO',$receipt['document_id'],$document['status']);
!                       
$this->historylog->add('TO',$receipt['document_id'],$document['cat_id']);
!                       
$this->historylog->add('CO',$receipt['document_id'],$document['coordinator']);
  
                        $receipt['message'][] = array('msg'=>lang('document %1 
has been saved',"'".$document['document_name']."'"));
--- 341,347 ----
                        $receipt['document_id'] = 
$this->db->get_last_insert_id('fm_document','id');
  
! //                    
$this->historylog->add('SO',$receipt['document_id'],$document['status']);
! //                    
$this->historylog->add('TO',$receipt['document_id'],$document['cat_id']);
! //                    
$this->historylog->add('CO',$receipt['document_id'],$document['coordinator']);
  
                        $receipt['message'][] = array('msg'=>lang('document %1 
has been saved',"'".$document['document_name']."'"));
***************
*** 351,355 ****
                function edit($document)
                {
!                       $this->db->query("SELECT status,category,coordinator 
FROM fm_document where id='" .$document['document_id']."'",__LINE__,__FILE__);
                        $this->db->next_record();
  
--- 351,355 ----
                function edit($document)
                {
! /*                    $this->db->query("SELECT status,category,coordinator 
FROM fm_document where id='" .$document['document_id']."'",__LINE__,__FILE__);
                        $this->db->next_record();
  
***************
*** 369,373 ****
                                
$this->historylog->add('C',$document['document_id'],$document['coordinator']);
                        }
! 
                        if($document['document_name_orig'] && 
!$document['document_name'] )
                        {
--- 369,373 ----
                                
$this->historylog->add('C',$document['document_id'],$document['coordinator']);
                        }
! */
                        if($document['document_name_orig'] && 
!$document['document_name'] )
                        {
***************
*** 414,423 ****
                function delete($document_id )
                {
!                       $this->db->query("SELECT document_name FROM fm_document 
where id='$document_id'",__LINE__,__FILE__);
                        $this->db->next_record();
!                       $document_name = $this->db->f('document_name');
  
! //echo $this->fakebase. SEP . 'document'. SEP . $document_name;
!                       if($this->vfs->file_exists(array(
                                        'string' => $this->fakebase. SEP . 
'document'. SEP . $document_name,
                                        'relatives' => Array(RELATIVE_NONE)
--- 414,439 ----
                function delete($document_id )
                {
!                       $this->db->query("SELECT 
document_name,location_code,equipment_id FROM fm_document where 
id='$document_id'",__LINE__,__FILE__);
                        $this->db->next_record();
!                       $document_name  = $this->db->f('document_name');
!                       $location_code  = $this->db->f('location_code');
!                       $equipment_id   = $this->db->f('equipment_id');
! 
!                       $location               = split("-", $location_code);
!                       $property_id    = $location[0];
! 
  
!                       if(!$equipment_id)
!                       {
!                               $file = $this->fakebase. SEP . 'document' . SEP 
. $property_id . SEP . $document_name;
!                       }
!                       else
!                       {
!                               $file = $this->fakebase. SEP . 'document' . SEP 
. $property_id . SEP . $equipment_id . SEP . $document_name;
!                       }
! 
! 
! echo $file;
! /*                    if($this->vfs->file_exists(array(
                                        'string' => $this->fakebase. SEP . 
'document'. SEP . $document_name,
                                        'relatives' => Array(RELATIVE_NONE)
***************
*** 441,447 ****
                                $this->vfs->override_acl = 0;
                        }
! 
!                       $this->db->query("DELETE FROM fm_document WHERE 
id='$document_id'",__LINE__,__FILE__);
!                       $this->db->query("DELETE FROM fm_document_history  
WHERE  history_record_id='$document_id'",__LINE__,__FILE__);
                }
        }
--- 457,463 ----
                                $this->vfs->override_acl = 0;
                        }
! */
! //                    $this->db->query("DELETE FROM fm_document WHERE 
id='$document_id'",__LINE__,__FILE__);
! //                    $this->db->query("DELETE FROM fm_document_history  
WHERE  history_record_id='$document_id'",__LINE__,__FILE__);
                }
        }

Index: class.soXport.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/inc/class.soXport.inc.php,v
retrieving revision 1.18
retrieving revision 1.19
diff -C2 -r1.18 -r1.19
*** class.soXport.inc.php       23 Apr 2003 15:07:17 -0000      1.18
--- class.soXport.inc.php       29 Apr 2003 12:20:06 -0000      1.19
***************
*** 742,749 ****
          function select_dimc($pmwrkord_code)
          {
!               $sql= "select formaal_id from fm_apartment,fm_wo_wrkorders 
where fm_apartment.property_id=fm_wo_wrkorders.property_id and 
fm_apartment.apartment_id=fm_wo_wrkorders.apartment_id and 
fm_wo_wrkorders.id='$pmwrkord_code'";
                        $this->db->query($sql,__LINE__,__FILE__);
                        $this->db->next_record();
!                       $dimc = $this->db->f('formaal_id');
                        return $dimc;
                }
--- 742,757 ----
          function select_dimc($pmwrkord_code)
          {
!               $sql= "select location_code from fm_wo_wrkorders where 
fm_wo_wrkorders.id='$pmwrkord_code'";
                        $this->db->query($sql,__LINE__,__FILE__);
                        $this->db->next_record();
!                       $location_code = $this->db->f('location_code');
!                       $location               = split("-", $location_code);
!                       $property_id    = $location[0];
!                       $apartment_id   = $location[3],
! 
!                       $sql= "select cat_id from fm_apartment where 
fm_apartment.property_id='$property_id' and 
fm_apartment.apartment_id='$apartment_id'";
!                       $this->db->query($sql,__LINE__,__FILE__);
!                       $this->db->next_record();
!                       $dimc = $this->db->f('cat_id');
                        return $dimc;
                }

Index: class.uidocument.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/inc/class.uidocument.inc.php,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -r1.1 -r1.2
*** class.uidocument.inc.php    28 Apr 2003 10:26:44 -0000      1.1
--- class.uidocument.inc.php    29 Apr 2003 12:20:06 -0000      1.2
***************
*** 100,112 ****
                                        'floor'                                 
        => $document['floor'],
                                        'address'                               
        => $document['address'],
-                                       'link_view_file'                        
=> 
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uidocument.view_file&document_id='
 . $document['document_id']),
                                        'link_view'                             
        => 
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uidocument.list_doc&location_code='
 . $document['location_code'] . '&equipment_id=' . $document['equipment_id']),
!                                       'link_edit'                             
        => 
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uidocument.edit&document_id='
 . $document['document_id']),
!                                       'link_delete'                           
=> 
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uidocument.delete&document_id='
 . $document['document_id']),
!                                       'lang_view_file_statustext'     => 
lang('view the document'),
!                                       'lang_view_statustext'          => 
lang('view information about the document'),
!                                       'lang_edit_statustext'          => 
lang('edit information about the document'),
!                                       'lang_delete_statustext'        => 
lang('delete this document'),
!                                       'text_view'                             
        => lang('view'),
                                        'text_edit'                             
        => lang('edit'),
                                        'text_delete'                           
=> lang('delete')
--- 100,106 ----
                                        'floor'                                 
        => $document['floor'],
                                        'address'                               
        => $document['address'],
                                        'link_view'                             
        => 
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uidocument.list_doc&location_code='
 . $document['location_code'] . '&equipment_id=' . $document['equipment_id']),
!                                       'lang_view_statustext'          => 
lang('view documents for this location/equipment'),
!                                       'text_view'                             
        => lang('documents'),
                                        'text_edit'                             
        => lang('edit'),
                                        'text_delete'                           
=> lang('delete')
***************
*** 294,299 ****
                                        'category'                              
        => $document['category'],
                                        'link_view_file'                        
=> 
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uidocument.view_file&document_id='
 . $document['document_id']),
!                                       'link_view'                             
        => 
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uidocument.list_doc&location_code='
 . $document['location_code'] . '&equipment_id=' . $document['equipment_id']),
!                                       'link_edit'                             
        => 
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uidocument.edit&document_id='
 . $document['document_id']),
                                        'link_delete'                           
=> 
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uidocument.delete&document_id='
 . $document['document_id']),
                                        'lang_view_file_statustext'     => 
lang('view the document'),
--- 288,293 ----
                                        'category'                              
        => $document['category'],
                                        'link_view_file'                        
=> 
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uidocument.view_file&document_id='
 . $document['document_id']),
!                                       'link_view'                             
        => 
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uidocument.view&document_id='
 . $document['document_id'] . '&from=list_doc'),
!                                       'link_edit'                             
        => 
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uidocument.edit&document_id='
 . $document['document_id'] . '&from=list_doc'),
                                        'link_delete'                           
=> 
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uidocument.delete&document_id='
 . $document['document_id']),
                                        'lang_view_file_statustext'     => 
lang('view the document'),
***************
*** 335,339 ****
                                'lang_add'                              => 
lang('add'),
                                'lang_add_statustext'   => lang('add a 
document'),
!                               'add_action'                    => 
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uidocument.edit')
                        );
  
--- 329,333 ----
                                'lang_add'                              => 
lang('add'),
                                'lang_add_statustext'   => lang('add a 
document'),
!                               'add_action'                    => 
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uidocument.edit&location_code='
 . $location_code . '&equipment_id=' . $equipment_id . '&from=list_doc')
                        );
  
***************
*** 350,357 ****
                        );
  
-                       if($this->cat_id=='equipment')
-                       {
-                               $equipment_type_list    =       
$this->bocommon->select_category_equipment_list('filter',$this->equipment_type);
-                       }
  
  //_debug_array($link_data);
--- 344,347 ----
***************
*** 403,407 ****
                                'table_header_document'                 => 
$table_header,
                                'values_document'                               
=> $content,
!                               'table_add'                                     
        => $table_add
                        );
  
--- 393,400 ----
                                'table_header_document'                 => 
$table_header,
                                'values_document'                               
=> $content,
!                               'table_add'                                     
        => $table_add,
!                               'done_action'                                   
=> 
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uidocument.index'),
!                               'lang_done'                                     
        => lang('done'),
!                               'lang_done_statustext'                  => 
lang('Back to the list')
                        );
  
***************
*** 414,446 ****
                }
  
- 
-               function create_home_dir()
-               {
-                       if(!$this->vfs->file_exists(array(
-                                       'string' => $this->fakebase. SEP . 
'document',
-                                       'relatives' => Array(RELATIVE_NONE)
-                               )))
-                       {
-                               $this->vfs->override_acl = 1;
- 
-                               if(!$this->vfs->mkdir (array(
-                                    'string' => $this->fakebase. SEP . 
'document',
-                                    'relatives' => array(
-                                         RELATIVE_NONE
-                                    )
-                               )))
-                               {
-                                       
$receipt['error'][]=array('msg'=>lang('failed to create directory') . ' :'. 
$this->fakebase. SEP . 'document');
-                               }
-                               else
-                               {
-                                       
$receipt['message'][]=array('msg'=>lang('directory created') . ' :'. 
$this->fakebase. SEP . 'document');
-                               }
-                               $this->vfs->override_acl = 0;
- 
-                       }
-               }
- 
- 
                function view_file($file_array='')
                {
--- 407,410 ----
***************
*** 450,455 ****
                        $values = $this->bo->read_single($document_id);
  
!                       $file = $this->fakebase. SEP . 'document'. SEP . 
$values['document_name'];
  
                        if($this->vfs->file_exists(array(
                                'string' => $file,
--- 414,427 ----
                        $values = $this->bo->read_single($document_id);
  
!                       if(!$values['equipment_id'])
!                       {
!                               $file = $this->fakebase. SEP . 'document' . SEP 
. $values['property_id'] . SEP . $values['document_name'];
!                       }
!                       else
!                       {
!                               $file = $this->fakebase. SEP . 'document' . SEP 
. $values['property_id'] . SEP . $values['equipment_id'] . SEP . 
$values['document_name'];
!                       }
  
+ //echo 'file: ' . $file . '<br>';
                        if($this->vfs->file_exists(array(
                                'string' => $file,
***************
*** 484,493 ****
                function edit()
                {
                        $document_id            = 
get_var('document_id',array('POST','GET'));
                        $values                         = 
get_var('values',array('POST'));
  
                        $GLOBALS['phpgw']->xslttpl->add_file(array('document'));
  
!                       $this->create_home_dir();
  
                        if($values)
--- 456,470 ----
                function edit()
                {
+                       $from                           = 
get_var('from',array('POST','GET'));
                        $document_id            = 
get_var('document_id',array('POST','GET'));
                        $values                         = 
get_var('values',array('POST'));
  
+                       if(!$from)
+                       {
+                               $from='index';
+                       }
                        $GLOBALS['phpgw']->xslttpl->add_file(array('document'));
  
!                       $this->bo->create_home_dir();
  
                        if($values)
***************
*** 516,520 ****
                        if ($values['save'])
                        {
- 
                                
$values['document_name']=$_FILES['document_file']['name'];
  
--- 493,496 ----
***************
*** 527,535 ****
                                if(!$values['status'])
                                {
!                                       
$receipt['error'][]=array('msg'=>lang('Please select a status !'));
                                }
  
                                if(!$values['document_name_orig'] && 
$this->vfs->file_exists(array(
!                                               'string' => $this->fakebase. 
SEP . 'document'. SEP . $values['document_name'],
                                                'relatives' => 
Array(RELATIVE_NONE)
                                        )))
--- 503,524 ----
                                if(!$values['status'])
                                {
! //                                    
$receipt['error'][]=array('msg'=>lang('Please select a status !'));
!                               }
!                               if(!$values['property_id'])
!                               {
!                                       
$receipt['error'][]=array('msg'=>lang('Please select a location !'));
!                               }
! 
!                               if(!$values['equipment_id'])
!                               {
!                                       $to_file = $this->fakebase. SEP . 
'document' . SEP . $values['property_id'] . SEP . $values['document_name'];
!                               }
!                               else
!                               {
!                                       $to_file = $this->fakebase. SEP . 
'document' . SEP . $values['property_id'] . SEP . $values['equipment_id'] . SEP 
. $values['document_name'];
                                }
  
                                if(!$values['document_name_orig'] && 
$this->vfs->file_exists(array(
!                                               'string' => $to_file,
                                                'relatives' => 
Array(RELATIVE_NONE)
                                        )))
***************
*** 538,549 ****
                                }
  
                                $values['document_id'] = $document_id;
  
                                if(!$receipt['error'])
                                {
- 
                                        $this->vfs->cp (array (
                                                'from'  => 
$_FILES['document_file']['tmp_name'],
!                                               'to'    => $this->fakebase. SEP 
. 'document' . SEP . $values['document_name'],
                                                'relatives'     => array 
(RELATIVE_NONE|VFS_REAL, RELATIVE_ALL)));
  
--- 527,539 ----
                                }
  
+                               
$this->bo->create_document_dir($values['property_id'], $values['equipment_id']);
+ 
                                $values['document_id'] = $document_id;
  
                                if(!$receipt['error'])
                                {
                                        $this->vfs->cp (array (
                                                'from'  => 
$_FILES['document_file']['tmp_name'],
!                                               'to'    => $to_file,
                                                'relatives'     => array 
(RELATIVE_NONE|VFS_REAL, RELATIVE_ALL)));
  
***************
*** 559,563 ****
                                $values = $this->bo->read_single($document_id);
                                $function_msg = lang('Edit document');
!                               $record_history = 
$this->bo->read_record_history($document_id);
                        }
                        else
--- 549,553 ----
                                $values = $this->bo->read_single($document_id);
                                $function_msg = lang('Edit document');
! //                            $record_history = 
$this->bo->read_record_history($document_id);
                        }
                        else
***************
*** 639,647 ****
                                'location_type'                                 
=> 'form',
                                'form_action'                                   
=> $GLOBALS['phpgw']->link('/index.php',$link_data),
-                               'done_action'                                   
=> 
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uidocument.index'),
                                'lang_year'                                     
        => lang('Year'),
                                'lang_category'                                 
=> lang('category'),
                                'lang_save'                                     
        => lang('save'),
                                'lang_done'                                     
        => lang('done'),
  
                                'lang_update_file'                              
=> lang('Update file'),
--- 629,640 ----
                                'location_type'                                 
=> 'form',
                                'form_action'                                   
=> $GLOBALS['phpgw']->link('/index.php',$link_data),
                                'lang_year'                                     
        => lang('Year'),
                                'lang_category'                                 
=> lang('category'),
                                'lang_save'                                     
        => lang('save'),
+                               'lang_save_statustext'                  => 
lang('Save the document'),
+ 
+                               'done_action'                                   
=> 
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uidocument.'
 .$from . '&location_code=' . $values['location_code'] . '&equipment_id=' . 
$values['equipment_id']),
                                'lang_done'                                     
        => lang('done'),
+                               'lang_done_statustext'                  => 
lang('Back to the list'),
  
                                'lang_update_file'                              
=> lang('Update file'),
***************
*** 671,676 ****
                                'lang_descr'                                    
=> lang('Description'),
                                'value_descr'                                   
=> $values['descr'],
-                               'lang_done_statustext'                  => 
lang('Back to the list'),
-                               'lang_save_statustext'                  => 
lang('Save the document'),
                                'lang_no_cat'                                   
=> lang('Select category'),
                                'lang_cat_statustext'                   => 
lang('Select the category the document belongs to. To do not use a category 
select NO CATEGORY'),
--- 664,667 ----
***************
*** 742,751 ****
                function view()
                {
                        $document_id            = 
get_var('document_id',array('POST','GET'));
                        $values                         = 
get_var('values',array('POST'));
  
!                       $GLOBALS['phpgw']->xslttpl->add_file(array('document'));
  
!                       $this->create_home_dir();
  
                        if($values)
--- 733,747 ----
                function view()
                {
+ 
+                       $from                           = 
get_var('from',array('POST','GET'));
                        $document_id            = 
get_var('document_id',array('POST','GET'));
                        $values                         = 
get_var('values',array('POST'));
  
!                       if(!$from)
!                       {
!                               $from='index';
!                       }
  
!                       $GLOBALS['phpgw']->xslttpl->add_file(array('document'));
  
                        if($values)
***************
*** 774,778 ****
                        $values = $this->bo->read_single($document_id);
                        $function_msg = lang('view document');
!                       $record_history = 
$this->bo->read_record_history($document_id);
  
                        $table_header_history[] = array
--- 770,774 ----
                        $values = $this->bo->read_single($document_id);
                        $function_msg = lang('view document');
! //                    $record_history = 
$this->bo->read_record_history($document_id);
  
                        $table_header_history[] = array
***************
*** 850,854 ****
                                'location_type'                                 
=> 'form',
                                'form_action'                                   
=> $GLOBALS['phpgw']->link('/index.php',$link_data),
!                               'done_action'                                   
=> 
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uidocument.index'),
                                'lang_year'                                     
        => lang('Year'),
                                'lang_category'                                 
=> lang('category'),
--- 846,850 ----
                                'location_type'                                 
=> 'form',
                                'form_action'                                   
=> $GLOBALS['phpgw']->link('/index.php',$link_data),
!                               'done_action'                                   
=> 
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uidocument.'
 .$from . '&location_code=' . $values['location_code'] . '&equipment_id=' . 
$values['equipment_id']),
                                'lang_year'                                     
        => lang('Year'),
                                'lang_category'                                 
=> lang('category'),





reply via email to

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