phpgroupware-cvs
[Top][All Lists]
Advanced

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

[Phpgroupware-cvs] ged index.php inc/hook_home.inc.php inc/class.g...


From: Pascal Vilarem
Subject: [Phpgroupware-cvs] ged index.php inc/hook_home.inc.php inc/class.g...
Date: Sat, 17 Jun 2006 18:06:33 +0000

CVSROOT:        /sources/phpgroupware
Module name:    ged
Changes by:     Pascal Vilarem <maat>   06/06/17 18:06:33

Modified files:
        .              : index.php 
        inc            : hook_home.inc.php class.ged_ui.inc.php 
                         hook_settings.inc.php class.ged_dm.inc.php 
                         hook_admin.inc.php 

Log message:
        Cleaning commit : s/ *-> */->/g

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/ged/index.php?cvsroot=phpgroupware&r1=1.2&r2=1.3
http://cvs.savannah.gnu.org/viewcvs/ged/inc/hook_home.inc.php?cvsroot=phpgroupware&r1=1.1.1.1&r2=1.2
http://cvs.savannah.gnu.org/viewcvs/ged/inc/class.ged_ui.inc.php?cvsroot=phpgroupware&r1=1.1.1.1&r2=1.2
http://cvs.savannah.gnu.org/viewcvs/ged/inc/hook_settings.inc.php?cvsroot=phpgroupware&r1=1.1.1.1&r2=1.2
http://cvs.savannah.gnu.org/viewcvs/ged/inc/class.ged_dm.inc.php?cvsroot=phpgroupware&r1=1.1.1.1&r2=1.2
http://cvs.savannah.gnu.org/viewcvs/ged/inc/hook_admin.inc.php?cvsroot=phpgroupware&r1=1.1.1.1&r2=1.2

Patches:
Index: index.php
===================================================================
RCS file: /sources/phpgroupware/ged/index.php,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -b -r1.2 -r1.3
--- index.php   17 Jun 2006 17:46:19 -0000      1.2
+++ index.php   17 Jun 2006 18:06:33 -0000      1.3
@@ -20,9 +20,5 @@
 
        include('../header.inc.php');
 
-       Header('Location: ' . 
$GLOBALS['phpgw']->link('/index.php','menuaction=ged.ged_ui.browse'));
-
-       $GLOBALS['phpgw']->common->phpgw_footer();
-       $GLOBALS['phpgw']->common->phpgw_exit();
-
+       $GLOBALS['phpgw']->redirect_link('/index.php', 
array('menuaction'=>'ged.ged_ui.browse'));
 ?>

Index: inc/hook_home.inc.php
===================================================================
RCS file: /sources/phpgroupware/ged/inc/hook_home.inc.php,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -b -r1.1.1.1 -r1.2
--- inc/hook_home.inc.php       30 Mar 2006 12:29:13 -0000      1.1.1.1
+++ inc/hook_home.inc.php       17 Jun 2006 18:06:33 -0000      1.2
@@ -75,7 +75,7 @@
                                        
                                        $link_data['menuaction']= 
'ged.ged_ui.browse';
                                        $link_data['focused_id']= 
$doc['element_id'];
-                                       $link=$GLOBALS['phpgw'] -> 
link('/index.php', $link_data);
+                                       
$link=$GLOBALS['phpgw']->link('/index.php', $link_data);
                        
                                        if ( $doc['reference'] != "" )
                                                $GLOBALS['extra_data'] .=  
"<li><a href=\"".$link."\" >".$doc['name']." 
(".$doc['reference'].")</a>"."</li>\n";
@@ -97,7 +97,7 @@
                                        
                                        $link_data['menuaction']= 
'ged.ged_ui.browse';
                                        $link_data['focused_id']= 
$doc['element_id'];
-                                       $link=$GLOBALS['phpgw'] -> 
link('/index.php', $link_data);
+                                       
$link=$GLOBALS['phpgw']->link('/index.php', $link_data);
                                        
                                        if ( $doc['expiration_date'] > time() )
                                                
$expiration=date("d/m/y",$doc['expiration_date']);

Index: inc/class.ged_ui.inc.php
===================================================================
RCS file: /sources/phpgroupware/ged/inc/class.ged_ui.inc.php,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -b -r1.1.1.1 -r1.2
--- inc/class.ged_ui.inc.php    30 Mar 2006 12:29:19 -0000      1.1.1.1
+++ inc/class.ged_ui.inc.php    17 Jun 2006 18:06:33 -0000      1.2
@@ -1,15 +1,15 @@
 <?php
-/**************************************************************************
-* phpGroupWare - ged
-* http://www.phpgroupware.org
-* Written by Pascal Vilarem <address@hidden>
-*
-* --------------------------------------------------------------------------
-*  This program is free software; you can redistribute it and/or modify it
-*  under the terms of the GNU General Public License as published by the
-*  Free Software Foundation; either version 2 of the License, or (at your
-*  option) any later version
-***************************************************************************/
+       
/**************************************************************************
+       * phpGroupWare - ged
+       * http://www.phpgroupware.org
+       * Written by Pascal Vilarem <address@hidden>
+       *
+       * 
--------------------------------------------------------------------------
+       *  This program is free software; you can redistribute it and/or modify 
it
+       *  under the terms of the GNU General Public License as published by the
+       *  Free Software Foundation; either version 2 of the License, or (at 
your
+       *  option) any later version
+       
***************************************************************************/
 
 class ged_ui
 {
@@ -30,8 +30,8 @@
        function ged_ui()
        {
                
-               $this -> theme= $GLOBALS['phpgw_info']['theme'];
-               $this -> t= $GLOBALS['phpgw'] -> template;
+               $this->theme= $GLOBALS['phpgw_info']['theme'];
+               $this->t= $GLOBALS['phpgw']->template;
                
                
                // Gestion des groupes et des droits
@@ -43,40 +43,40 @@
                //_debug_array($this->users);
                
                
-               $this -> ged_dm= CreateObject('ged.ged_dm', True);
-               $this -> categories= CreateObject('phpgwapi.categories');
-               $this -> browser= CreateObject('phpgwapi.browser');
-               $this -> icons["txt"]= "txt";
-               $this -> icons["doc"]= "word";
-               $this -> icons["rtf"]= "document";
-               $this -> icons["xls"]= "excel";
-               $this -> icons["ppt"]= "powerpoint";
-               $this -> icons["exe"]= "binary";
-               $this -> icons["html"]= "html";
-               $this -> icons["htm"]= "html";
-               $this -> icons["gif"]= "image";
-               $this -> icons["jpg"]= "image";
-               $this -> icons["bmp"]= "image";
-               $this -> icons["png"]= "image";
-               $this -> icons["log"]= "log";
-               $this -> icons["midi"]= "midi";
-               $this -> icons["pdf"]= "pdf";
-               $this -> icons["wav"]= "sound";
-               $this -> icons["mp3"]= "sound";
-               $this -> icons["c"]= "source_c";
-               $this -> icons["cpp"]= "source_cpp";
-               $this -> icons["h"]= "source_h";
-               $this -> icons["java"]= "source_java";
-               $this -> icons["py"]= "source_py";
-               $this -> icons["tar"]= "tar";
-               $this -> icons["gz"]= "gz";
-               $this -> icons["zip"]= "gz";
-               $this -> icons["mpg"]= "video";
-               $this -> icons["avi"]= "video";
-               $this -> icons["tex"]= "tex";
-               $this -> icons["php"]= "php";
-               $this -> icons["wmv"]= "wmv_movie";
-               $this -> icons["default"]= "default";
+               $this->ged_dm= CreateObject('ged.ged_dm', True);
+               $this->categories= CreateObject('phpgwapi.categories');
+               $this->browser= CreateObject('phpgwapi.browser');
+               $this->icons["txt"]= "txt";
+               $this->icons["doc"]= "word";
+               $this->icons["rtf"]= "document";
+               $this->icons["xls"]= "excel";
+               $this->icons["ppt"]= "powerpoint";
+               $this->icons["exe"]= "binary";
+               $this->icons["html"]= "html";
+               $this->icons["htm"]= "html";
+               $this->icons["gif"]= "image";
+               $this->icons["jpg"]= "image";
+               $this->icons["bmp"]= "image";
+               $this->icons["png"]= "image";
+               $this->icons["log"]= "log";
+               $this->icons["midi"]= "midi";
+               $this->icons["pdf"]= "pdf";
+               $this->icons["wav"]= "sound";
+               $this->icons["mp3"]= "sound";
+               $this->icons["c"]= "source_c";
+               $this->icons["cpp"]= "source_cpp";
+               $this->icons["h"]= "source_h";
+               $this->icons["java"]= "source_java";
+               $this->icons["py"]= "source_py";
+               $this->icons["tar"]= "tar";
+               $this->icons["gz"]= "gz";
+               $this->icons["zip"]= "gz";
+               $this->icons["mpg"]= "video";
+               $this->icons["avi"]= "video";
+               $this->icons["tex"]= "tex";
+               $this->icons["php"]= "php";
+               $this->icons["wmv"]= "wmv_movie";
+               $this->icons["default"]= "default";
 
        }
        
@@ -179,7 +179,7 @@
 
        function save_sessiondata()
        {
-               //$this -> ged_dm -> save_sessiondata($data);
+               //$this->ged_dm->save_sessiondata($data);
        }
 
        /* a voir plus tard pour la gestion des langues */
@@ -187,111 +187,111 @@
        {
                global $tr_color;
 
-               $this -> t -> set_var('tr_color', $tr_color);
-               $this -> t -> set_var('font', $this -> bo -> set_font());
-               //$this -> t -> set_var('font_size', $this -> bo -> 
set_font_size());
-               $this -> t -> set_var('name', 
$GLOBALS['phpgw_info']['user']['fullname']);
+               $this->t->set_var('tr_color', $tr_color);
+               $this->t->set_var('font', $this->bo->set_font());
+               //$this->t->set_var('font_size', $this->bo->set_font_size());
+               $this->t->set_var('name', 
$GLOBALS['phpgw_info']['user']['fullname']);
        }
 
        function set_template_defaults()
        {
 
-               $this -> t -> set_var('parent_id_label', 'parent_id');
-               $this -> t -> set_var('parent_id_field', 'parent_id');
-               $this -> t -> set_var('element_id_field', 'element_id');
-               $this -> t -> set_var('file_field', 'file');
-               $this -> t -> set_var('referenceq_field', 'referenceq');
-               $this -> t -> set_var('description_field', 'description');
-               
-               $this -> t -> set_var('lang_file', lang('file'));
-               $this -> t -> set_var('lang_folder', lang('folder'));
-               
-               $this -> t -> set_var('description_label', 'description');
-               $this -> t -> set_var('referenceq_label', 'Reference');
-
-               $this -> t -> set_var('lang_subfolders', lang('Sub folders'));
-               $this -> t -> set_var('lang_owner', lang('Owner'));
-               $this -> t -> set_var('lang_description', lang('Description'));
-               $this -> t -> set_var('lang_reference', lang('Reference'));
-               $this -> t -> set_var('lang_name', lang('Name'));
-               $this -> t -> set_var('lang_documents', lang('Documents'));
-               $this -> t -> set_var('lang_Information', lang('Informations'));
-               
-
-               $this -> t -> set_var('lang_download', lang('Download'));
-               $this -> t -> set_var('lang_view', lang('View'));
-
-               $this -> t -> set_var('lang_creation_date', lang('Created on'));
-               $this -> t -> set_var('lang_keywords', lang('Keywords'));
-               $this -> t -> set_var('lang_last_maj', lang('Last updated on'));
-               $this -> t -> set_var('lang_current_version', lang('Current 
version'));
-
-               $this -> t -> set_var('lang_version', lang('Version'));
-               $this -> t -> set_var('lang_version_creation_date', 
lang('creation date'));
-               $this -> t -> set_var('lang_version_description', 
lang('description'));
-               $this -> t -> set_var('lang_version_creator', lang('Uploaded 
by'));
-
-               $this -> t -> set_var('lang_add_file', lang('Add file'));
-               $this -> t -> set_var('lang_add_folder', lang('Add folder'));
-               $this -> t -> set_var('lang_update_file', lang('Update file'));
-               $this -> t -> set_var('lang_update_folder', lang('Update 
folder'));
-               $this -> t -> set_var('lang_confirm_deletion', lang('Confirm 
deletion'));
-
-               $this -> t -> set_var('lang_informations', 'Informations');
-               $this -> t -> set_var('lang_versions', 'Versions');
-               $this -> t -> set_var('lang_file_size', 'File size');
-               $this -> t -> set_var('lang_creator', 'Creator');
-               $this -> t -> set_var('lang_current_version_expiration_date', 
'Expiration date');
-               $this -> t -> set_var('lang_current_version_description', 
'Description');
-               $this -> t -> set_var('lang_current_version_date', 'Valid 
since');
-               $this -> t -> set_var('lang_period', lang('Validity'));
-               $this -> t -> set_var('period_field', 'validity_period');
-
-
-               $this -> t -> set_var('lang_creator', lang('creator'));
-               
-               $this -> t -> set_var('lang_update_acl', lang('Update AC'));
-               $this -> t -> set_var('lang_reset_acl', lang('Reset AC'));
-               $this -> t -> set_var('lang_go_back', lang('Go back'));
+               $this->t->set_var('parent_id_label', 'parent_id');
+               $this->t->set_var('parent_id_field', 'parent_id');
+               $this->t->set_var('element_id_field', 'element_id');
+               $this->t->set_var('file_field', 'file');
+               $this->t->set_var('referenceq_field', 'referenceq');
+               $this->t->set_var('description_field', 'description');
+               
+               $this->t->set_var('lang_file', lang('file'));
+               $this->t->set_var('lang_folder', lang('folder'));
+               
+               $this->t->set_var('description_label', 'description');
+               $this->t->set_var('referenceq_label', 'Reference');
+
+               $this->t->set_var('lang_subfolders', lang('Sub folders'));
+               $this->t->set_var('lang_owner', lang('Owner'));
+               $this->t->set_var('lang_description', lang('Description'));
+               $this->t->set_var('lang_reference', lang('Reference'));
+               $this->t->set_var('lang_name', lang('Name'));
+               $this->t->set_var('lang_documents', lang('Documents'));
+               $this->t->set_var('lang_Information', lang('Informations'));
+               
+
+               $this->t->set_var('lang_download', lang('Download'));
+               $this->t->set_var('lang_view', lang('View'));
+
+               $this->t->set_var('lang_creation_date', lang('Created on'));
+               $this->t->set_var('lang_keywords', lang('Keywords'));
+               $this->t->set_var('lang_last_maj', lang('Last updated on'));
+               $this->t->set_var('lang_current_version', lang('Current 
version'));
+
+               $this->t->set_var('lang_version', lang('Version'));
+               $this->t->set_var('lang_version_creation_date', lang('creation 
date'));
+               $this->t->set_var('lang_version_description', 
lang('description'));
+               $this->t->set_var('lang_version_creator', lang('Uploaded by'));
+
+               $this->t->set_var('lang_add_file', lang('Add file'));
+               $this->t->set_var('lang_add_folder', lang('Add folder'));
+               $this->t->set_var('lang_update_file', lang('Update file'));
+               $this->t->set_var('lang_update_folder', lang('Update folder'));
+               $this->t->set_var('lang_confirm_deletion', lang('Confirm 
deletion'));
+
+               $this->t->set_var('lang_informations', 'Informations');
+               $this->t->set_var('lang_versions', 'Versions');
+               $this->t->set_var('lang_file_size', 'File size');
+               $this->t->set_var('lang_creator', 'Creator');
+               $this->t->set_var('lang_current_version_expiration_date', 
'Expiration date');
+               $this->t->set_var('lang_current_version_description', 
'Description');
+               $this->t->set_var('lang_current_version_date', 'Valid since');
+               $this->t->set_var('lang_period', lang('Validity'));
+               $this->t->set_var('period_field', 'validity_period');
+
+
+               $this->t->set_var('lang_creator', lang('creator'));
+               
+               $this->t->set_var('lang_update_acl', lang('Update AC'));
+               $this->t->set_var('lang_reset_acl', lang('Reset AC'));
+               $this->t->set_var('lang_go_back', lang('Go back'));
 
                
//$this->t->set_var('th_bg',$GLOBALS['phpgw_info']['theme']['th_bg']);
                
//$this->t->set_var('row_on',$GLOBALS['phpgw_info']['theme']['row_on']);
                
//$this->t->set_var('row_off',$GLOBALS['phpgw_info']['theme']['row_off']);
                
//$this->t->set_var('table_bg',$GLOBALS['phpgw_info']['theme']['table_bg']);
 
-               $this -> t -> set_var('action_field', 'default');
+               $this->t->set_var('action_field', 'default');
 
-               $this -> t -> set_var('input_default_class', 'text_default');
-               $this -> t -> set_var('input_active_class', 'text_focused');
-               $this -> t -> set_var('textarea_default_class', 
'textarea_default');
-               $this -> t -> set_var('textarea_active_class', 
'textarea_focused');
-               $this -> t -> set_var('select_default_class', 
'select-one_default');
-               $this -> t -> set_var('select_active_class', 
'select-one_focused');
-
-               $this -> t -> set_var('reference_color', 'red');
-
-               $this -> t -> set_var('img_download', $GLOBALS['phpgw'] -> 
common -> image('ged', 'backup'));
-               $this -> t -> set_var('img_view', $GLOBALS['phpgw'] -> common 
-> image('ged', 'eye'));
-               $this -> t -> set_var('img_edit_version', $GLOBALS['phpgw'] -> 
common -> image('ged', 'admin_log'));
+               $this->t->set_var('input_default_class', 'text_default');
+               $this->t->set_var('input_active_class', 'text_focused');
+               $this->t->set_var('textarea_default_class', 'textarea_default');
+               $this->t->set_var('textarea_active_class', 'textarea_focused');
+               $this->t->set_var('select_default_class', 'select-one_default');
+               $this->t->set_var('select_active_class', 'select-one_focused');
+
+               $this->t->set_var('reference_color', 'red');
+
+               $this->t->set_var('img_download', 
$GLOBALS['phpgw']->common->image('ged', 'backup'));
+               $this->t->set_var('img_view', 
$GLOBALS['phpgw']->common->image('ged', 'eye'));
+               $this->t->set_var('img_edit_version', 
$GLOBALS['phpgw']->common->image('ged', 'admin_log'));
 
-               $this -> t -> set_var('lang_up', lang('Up'));
+               $this->t->set_var('lang_up', lang('Up'));
                
                $link_data['menuaction']= 'ged.ged_ui.browse';
                $link_data['focused_id']= 0;
-               $top_url=$GLOBALS['phpgw'] -> link('/index.php', $link_data);
-               $this -> t -> set_var('top_link', "<a 
href=\"".$top_url."\">".lang('Top')."</a>");
+               $top_url=$GLOBALS['phpgw']->link('/index.php', $link_data);
+               $this->t->set_var('top_link', "<a 
href=\"".$top_url."\">".lang('Top')."</a>");
 
        }
 
        function display_app_header()
        {
-               $GLOBALS['phpgw'] -> common -> phpgw_header();
+               $GLOBALS['phpgw']->common->phpgw_header(true);
                echo parse_navbar();
 
-               //$this -> t -> set_file(array('header' => 'header.tpl'));
-               //$this -> t -> set_block('header', 'ged_header');
-               //$this -> set_app_langs();
-               //$this -> t -> fp('app_header', 'ged_header');
+               //$this->t->set_file(array('header' => 'header.tpl'));
+               //$this->t->set_block('header', 'ged_header');
+               //$this->set_app_langs();
+               //$this->t->fp('app_header', 'ged_header');
 
        }
 
@@ -305,9 +305,9 @@
        {
                $version_id = get_var('version_id',array('GET','POST'));
 
-               $version= $this -> ged_dm -> get_version_info($version_id);
+               $version= $this->ged_dm->get_version_info($version_id);
     
-               if ($this -> browser -> is_ie())
+               if ($this->browser->is_ie())
                {
                        ini_set('zlib.output_compression', 'Off');
                        header('Pragma: private');
@@ -338,9 +338,9 @@
        {
                $version_id = get_var('version_id',array('GET','POST'));
 
-               $version= $this -> ged_dm -> get_version_info($version_id);
+               $version= $this->ged_dm->get_version_info($version_id);
 
-               if ($this -> browser -> is_ie())
+               if ($this->browser->is_ie())
                {
                        ini_set('zlib.output_compression', 'Off');
                        header('Pragma: private');
@@ -371,7 +371,7 @@
        {
 
                if ($path == "")
-                       $path= $this -> ged_dm -> get_path($focused_id);
+                       $path= $this->ged_dm->get_path($focused_id);
 
                if ($parent_id == "" || $parent_id == 0)
                {
@@ -383,101 +383,101 @@
                        $element_info['type']= 'folder';
                }
 
-               $elements= $this -> ged_dm -> list_elements($parent_id);
+               $elements= $this->ged_dm->list_elements($parent_id);
                $itemcount= count($elements);
 
                if ($expand == false || $itemcount == 0)
                {
 
-                       $this -> t -> set_file(array('zetree'.$parent_id => 
'tree_item.tpl'));
+                       $this->t->set_file(array('zetree'.$parent_id => 
'tree_item.tpl'));
 
-                       $this -> t -> set_var('imgback', $GLOBALS['phpgw'] -> 
common -> image('ged', 'down'));
+                       $this->t->set_var('imgback', 
$GLOBALS['phpgw']->common->image('ged', 'down'));
 
                        if ($element_info['type'] == 'folder')
                        {
                                if ($element_info['element_id'] == $focused_id)
-                                       $this -> t -> set_var('imgtype', 
$GLOBALS['phpgw'] -> common -> image('ged', 'folder_opened'));
+                                       $this->t->set_var('imgtype', 
$GLOBALS['phpgw']->common->image('ged', 'folder_opened'));
                                else
-                                       $this -> t -> set_var('imgtype', 
$GLOBALS['phpgw'] -> common -> image('ged', 'folder_closed'));
+                                       $this->t->set_var('imgtype', 
$GLOBALS['phpgw']->common->image('ged', 'folder_closed'));
                        }
                        elseif ($element_info['type'] == 'file')
                        {
-                               $last_version= $this -> ged_dm -> 
get_last_version($element_info['element_id']);
+                               $last_version= 
$this->ged_dm->get_last_version($element_info['element_id']);
 
                                $extension= $last_version['file_extension'];
-                               if ( $this -> icons[$extension] == '')
+                               if ( $this->icons[$extension] == '')
                                        $extension = 'default';
                                
-                               $this -> t -> set_var('imgtype', 
$GLOBALS['phpgw'] -> common -> image('ged', $this -> icons[$extension]));
+                               $this->t->set_var('imgtype', 
$GLOBALS['phpgw']->common->image('ged', $this->icons[$extension]));
                        }
 
                        $link_data['menuaction']= 'ged.ged_ui.browse';
                        $link_data['focused_id']= $element_info['element_id'];
-                       $this -> t -> set_var('link', $GLOBALS['phpgw'] -> 
link('/index.php', $link_data));
+                       $this->t->set_var('link', 
$GLOBALS['phpgw']->link('/index.php', $link_data));
 
-                       $this -> t -> set_var('imgdot', $GLOBALS['phpgw'] -> 
common -> image('ged', 'right_in'));
+                       $this->t->set_var('imgdot', 
$GLOBALS['phpgw']->common->image('ged', 'right_in'));
 
                        if ($element_info['element_id'] == $focused_id)
-                               $this -> t -> set_var('label', 
"<b>".$this->truncate($element_info['name'])."</b>");
+                               $this->t->set_var('label', 
"<b>".$this->truncate($element_info['name'])."</b>");
                        else
-                               $this -> t -> set_var('label', 
$this->truncate($element_info['name']));
+                               $this->t->set_var('label', 
$this->truncate($element_info['name']));
                        
-                       $this -> t -> set_var('title', $element_info['name']);
+                       $this->t->set_var('title', $element_info['name']);
 
                }
                else
                {
                        //on a forcément affaire à un folder avec au moins un 
element
-                       $this -> t -> set_file(array('zetree'.$parent_id => 
'tree.tpl'));
+                       $this->t->set_file(array('zetree'.$parent_id => 
'tree.tpl'));
 
-                       $this -> t -> set_block('zetree'.$parent_id, 
'items_list', 'items_list_handle'.$parent_id);
+                       $this->t->set_block('zetree'.$parent_id, 'items_list', 
'items_list_handle'.$parent_id);
 
                        for ($i= 0; $i < $itemcount; $i ++)
                        {
                                $current_element= $elements[$i];
 
-                               if ($this -> ged_dm -> 
is_on_path($current_element, $path))
-                                       $this -> t -> set_var('itemcontent', 
$this -> draw_tree($focused_id, $current_element['element_id'], "", 
$current_element, true));
+                               if ($this->ged_dm->is_on_path($current_element, 
$path))
+                                       $this->t->set_var('itemcontent', 
$this->draw_tree($focused_id, $current_element['element_id'], "", 
$current_element, true));
                                else
-                                       $this -> t -> set_var('itemcontent', 
$this -> draw_tree($focused_id, $current_element['element_id'], "", 
$current_element, false));
+                                       $this->t->set_var('itemcontent', 
$this->draw_tree($focused_id, $current_element['element_id'], "", 
$current_element, false));
 
                                if ($i +1 == $itemcount)
                                {
-                                       $this -> t -> set_var('itemimgright', 
$GLOBALS['phpgw'] -> common -> image('ged', 'right_last'));
-                                       $this -> t -> set_var('itemimgback', 
$GLOBALS['phpgw'] -> common -> image('ged', ''));
+                                       $this->t->set_var('itemimgright', 
$GLOBALS['phpgw']->common->image('ged', 'right_last'));
+                                       $this->t->set_var('itemimgback', 
$GLOBALS['phpgw']->common->image('ged', ''));
                                }
                                else
                                {
-                                       $this -> t -> set_var('itemimgright', 
$GLOBALS['phpgw'] -> common -> image('ged', 'right'));
-                                       $this -> t -> set_var('itemimgback', 
$GLOBALS['phpgw'] -> common -> image('ged', 'down'));
+                                       $this->t->set_var('itemimgright', 
$GLOBALS['phpgw']->common->image('ged', 'right'));
+                                       $this->t->set_var('itemimgback', 
$GLOBALS['phpgw']->common->image('ged', 'down'));
                                }
 
-                               $this -> t -> 
fp('items_list_handle'.$parent_id, 'items_list', True);
+                               $this->t->fp('items_list_handle'.$parent_id, 
'items_list', True);
                        }
 
                        if ($parent_id == 0)
-                               $this -> t -> set_var('imgdot', 
$GLOBALS['phpgw'] -> common -> image('ged', 'to_down'));
+                               $this->t->set_var('imgdot', 
$GLOBALS['phpgw']->common->image('ged', 'to_down'));
                        else
-                               $this -> t -> set_var('imgdot', 
$GLOBALS['phpgw'] -> common -> image('ged', 'right_in_to_down'));
+                               $this->t->set_var('imgdot', 
$GLOBALS['phpgw']->common->image('ged', 'right_in_to_down'));
 
-                       $this -> t -> set_var('imgback', $GLOBALS['phpgw'] -> 
common -> image('ged', 'down'));
+                       $this->t->set_var('imgback', 
$GLOBALS['phpgw']->common->image('ged', 'down'));
 
                        $link_data['menuaction']= 'ged.ged_ui.browse';
                        $link_data['focused_id']= $element_info['element_id'];
-                       $this -> t -> set_var('link', $GLOBALS['phpgw'] -> 
link('/index.php', $link_data));
+                       $this->t->set_var('link', 
$GLOBALS['phpgw']->link('/index.php', $link_data));
 
-                       $this -> t -> set_var('imgtype', $GLOBALS['phpgw'] -> 
common -> image('ged', 'folder_opened'));
+                       $this->t->set_var('imgtype', 
$GLOBALS['phpgw']->common->image('ged', 'folder_opened'));
 
                        if ($element_info['element_id'] == $focused_id)
-                               $this -> t -> set_var('label', 
"<b>".$this->truncate($element_info['name'])."</b>");
+                               $this->t->set_var('label', 
"<b>".$this->truncate($element_info['name'])."</b>");
                        else
-                               $this -> t -> set_var('label', 
$this->truncate($element_info['name']));
+                               $this->t->set_var('label', 
$this->truncate($element_info['name']));
                                
-                       $this -> t -> set_var('title', $element_info['name']);
+                       $this->t->set_var('title', $element_info['name']);
 
                }
 
-               $out= $this -> t -> parse('zetree'.$parent_id, 
'zetree'.$parent_id);
+               $out= $this->t->parse('zetree'.$parent_id, 'zetree'.$parent_id);
 
                return $out;
 
@@ -485,68 +485,68 @@
 
        function draw_file_panel($element_id)
        {
-               $this -> t -> set_file(array('file_tpl' => 'file.tpl'));
+               $this->t->set_file(array('file_tpl' => 'file.tpl'));
 
-               $element_info= $this -> ged_dm -> get_element_info($element_id);
+               $element_info= $this->ged_dm->get_element_info($element_id);
 
-               $current_version= $this -> ged_dm -> 
get_current_version($element_id);
+               $current_version= 
$this->ged_dm->get_current_version($element_id);
 
-               $list_versions= $this -> ged_dm -> list_versions($element_id);
+               $list_versions= $this->ged_dm->list_versions($element_id);
     
-               $this -> t -> set_block('file_tpl', 'versions_list', 
'versions_list_handle');
+               $this->t->set_block('file_tpl', 'versions_list', 
'versions_list_handle');
 
                $versions_numcol= 2;
 
                if ($list_versions != "")
                foreach ($list_versions as $version_info)
                {
-                       $this -> t -> set_var('version', 
$version_info['major'].".".$version_info['minor']);
-                       $this -> t -> set_var('version_creation_date', 
$GLOBALS['phpgw'] -> common -> show_date($version_info['creation_date']));
-                       $this -> t -> set_var('version_description', 
$version_info['description']);
-                       $this -> t -> set_var('version_creator', 
$GLOBALS['phpgw'] -> common -> grab_owner_name($version_info['creator_id']));
-                       $this -> t -> set_var('version_status_value', 
$version_info['status']);
+                       $this->t->set_var('version', 
$version_info['major'].".".$version_info['minor']);
+                       $this->t->set_var('version_creation_date', 
$GLOBALS['phpgw']->common->show_date($version_info['creation_date']));
+                       $this->t->set_var('version_description', 
$version_info['description']);
+                       $this->t->set_var('version_creator', 
$GLOBALS['phpgw']->common->grab_owner_name($version_info['creator_id']));
+                       $this->t->set_var('version_status_value', 
$version_info['status']);
                        
-                       $this -> t -> 
set_var('ged_version_class',$version_info['status']);
+                       
$this->t->set_var('ged_version_class',$version_info['status']);
 
                        $mime_type= $version_info['mime_type'];
                                                
                        $extension= $version_info['file_extension'];
 
-                       if ( $this -> icons[$extension] == '')
+                       if ( $this->icons[$extension] == '')
                                        $extension = 'default';
 
-                       $this -> t -> set_var('version_img_mimetype', 
$GLOBALS['phpgw'] -> common -> image('ged', $this -> icons[$extension]));
+                       $this->t->set_var('version_img_mimetype', 
$GLOBALS['phpgw']->common->image('ged', $this->icons[$extension]));
 
                        $link_data['menuaction']= 'ged.ged_ui.download';
                        $link_data['version_id']= $version_info['version_id'];
-                       $this -> t -> set_var('download_file_link', 
$GLOBALS['phpgw'] -> link('/index.php', $link_data));
-                       $this -> t -> set_var('download_file_target', '');
+                       $this->t->set_var('download_file_link', 
$GLOBALS['phpgw']->link('/index.php', $link_data));
+                       $this->t->set_var('download_file_target', '');
 
                        $link_data['menuaction']= 'ged.ged_ui.view';
                        $link_data['version_id']= $version_info['version_id'];
-                       $this -> t -> set_var('view_file_link', 
$GLOBALS['phpgw'] -> link('/index.php', $link_data));
+                       $this->t->set_var('view_file_link', 
$GLOBALS['phpgw']->link('/index.php', $link_data));
 
                        $link_data['menuaction']= 'ged.ged_ui.edit_version';
                        $link_data['element_id']= $version_info['element_id'];
                        $link_data['version_id']= $version_info['version_id'];
-                       $this -> t -> set_var('edit_version_link', 
$GLOBALS['phpgw'] -> link('/index.php', $link_data));
+                       $this->t->set_var('edit_version_link', 
$GLOBALS['phpgw']->link('/index.php', $link_data));
 
-                       if ($this -> browser -> is_ie())
+                       if ($this->browser->is_ie())
                        {
-                               $this -> t -> set_var('view_file_target', 
'_blank');
+                               $this->t->set_var('view_file_target', '_blank');
                        }
                        else
                        {
-                               $this -> t -> set_var('view_file_target', '');
+                               $this->t->set_var('view_file_target', '');
                        }
 
-                       $this -> t -> fp('versions_list_handle', 
'versions_list', True);
+                       $this->t->fp('versions_list_handle', 'versions_list', 
True);
 
                        $versions_numcol ++;
                }
                
                $extension= $current_version['file_extension'];
-               if ( $this -> icons[$extension] == '')
+               if ( $this->icons[$extension] == '')
                        $extension = 'default';
 
                if ( $element_info['validity_period'] > 0)
@@ -564,11 +564,11 @@
                }
                        
                        
-               $file_array_vars= Array('versions_numcol' => $versions_numcol, 
'owner' => $GLOBALS['phpgw'] -> common -> 
grab_owner_name($element_info['owner_id']), 'description' => 
$element_info['description'], 'reference' => $element_info['reference'], 'name' 
=> $element_info['name'], 'creation_date' => $GLOBALS['phpgw'] -> common -> 
show_date($element_info['creation_date']), 'current_version_date' => 
$GLOBALS['phpgw'] -> common -> show_date($current_version['creation_date']), 
'current_version' => $current_version['major'].".".$current_version['minor'], 
'current_version_description' => $current_version['description'], 
'current_version_creator' => $GLOBALS['phpgw'] -> common -> 
grab_owner_name($current_version['creator_id']), 'current_version_file_size' => 
$current_version['size'], 'current_version_img_mime_type' => $GLOBALS['phpgw'] 
-> common -> image('ged', $this -> icons[$extension]), 
'current_version_expiration_date' => $expiration_date, 
'current_version_mime_type' => $current_version['mime_type']);
+               $file_array_vars= Array('versions_numcol' => $versions_numcol, 
'owner' => 
$GLOBALS['phpgw']->common->grab_owner_name($element_info['owner_id']), 
'description' => $element_info['description'], 'reference' => 
$element_info['reference'], 'name' => $element_info['name'], 'creation_date' => 
$GLOBALS['phpgw']->common->show_date($element_info['creation_date']), 
'current_version_date' => 
$GLOBALS['phpgw']->common->show_date($current_version['creation_date']), 
'current_version' => $current_version['major'].".".$current_version['minor'], 
'current_version_description' => $current_version['description'], 
'current_version_creator' => 
$GLOBALS['phpgw']->common->grab_owner_name($current_version['creator_id']), 
'current_version_file_size' => $current_version['size'], 
'current_version_img_mime_type' => $GLOBALS['phpgw']->common->image('ged', 
$this->icons[$extension]), 'current_version_expiration_date' => 
$expiration_date, 'current_version_mime_type' => $current_version['mime_type']);
 
-               $this -> t -> set_var($file_array_vars);
+               $this->t->set_var($file_array_vars);
 
-               $out= $this -> t -> parse('file_tpl', 'file_tpl');
+               $out= $this->t->parse('file_tpl', 'file_tpl');
 
                return $out;
 
@@ -576,7 +576,7 @@
 
        function draw_folder_panel($element_id)
        {
-               $this -> t -> set_file(array('folder_tpl' => 'folder.tpl'));
+               $this->t->set_file(array('folder_tpl' => 'folder.tpl'));
 
                if ($element_id == 0)
                {
@@ -585,19 +585,19 @@
                        $element_info['description']= lang('Root folder');
                }
                else
-                       $element_info= $this -> ged_dm -> 
get_element_info($element_id);
+                       $element_info= 
$this->ged_dm->get_element_info($element_id);
 
-               $this -> t -> set_var('owner', $GLOBALS['phpgw'] -> common -> 
grab_owner_name($element_info['owner_id']));
-               $this -> t -> set_var('description', 
$this->truncate($element_info['description'],30));
-               $this -> t -> set_var('reference', $element_info['reference']);
-               $this -> t -> set_var('name', 
$this->truncate($element_info['name']));
-               $this -> t -> set_var('creation_date', $GLOBALS['phpgw'] -> 
common -> show_date($element_info['creation_date']));
+               $this->t->set_var('owner', 
$GLOBALS['phpgw']->common->grab_owner_name($element_info['owner_id']));
+               $this->t->set_var('description', 
$this->truncate($element_info['description'],30));
+               $this->t->set_var('reference', $element_info['reference']);
+               $this->t->set_var('name', 
$this->truncate($element_info['name']));
+               $this->t->set_var('creation_date', 
$GLOBALS['phpgw']->common->show_date($element_info['creation_date']));
 
-               $sub_folders= $this -> ged_dm -> list_elements($element_id, 
'folder');
+               $sub_folders= $this->ged_dm->list_elements($element_id, 
'folder');
 
                if ($sub_folders)
                {
-                       $this -> t -> set_block('folder_tpl', 
'subfolders_list', 'subfolders_list_handle');
+                       $this->t->set_block('folder_tpl', 'subfolders_list', 
'subfolders_list_handle');
                        foreach ($sub_folders as $subfolder)
                        {
                                if ( $tr_class == 'row_off' )
@@ -605,26 +605,26 @@
                                else
                                        $tr_class='row_off';
                                
-                               $this -> t -> set_var('tr_class', $tr_class);
+                               $this->t->set_var('tr_class', $tr_class);
                                
-                               $this -> t -> set_var('folder_name', 
$this->truncate($subfolder['name']));
-                               $this -> t -> set_var('folder_reference', 
$subfolder['reference']);
-                               $this -> t -> set_var('folder_description', 
$subfolder['description']);
-                               $this -> t -> set_var('folder_owner', 
$GLOBALS['phpgw'] -> common -> grab_owner_name($subfolder['owner_id']));
+                               $this->t->set_var('folder_name', 
$this->truncate($subfolder['name']));
+                               $this->t->set_var('folder_reference', 
$subfolder['reference']);
+                               $this->t->set_var('folder_description', 
$subfolder['description']);
+                               $this->t->set_var('folder_owner', 
$GLOBALS['phpgw']->common->grab_owner_name($subfolder['owner_id']));
 
                                $link_data['menuaction']= 'ged.ged_ui.browse';
                                $link_data['focused_id']= 
$subfolder['element_id'];
-                               $this -> t -> set_var('folder_link', 
$GLOBALS['phpgw'] -> link('/index.php', $link_data));
+                               $this->t->set_var('folder_link', 
$GLOBALS['phpgw']->link('/index.php', $link_data));
 
-                               $this -> t -> fp('subfolders_list_handle', 
'subfolders_list', True);
+                               $this->t->fp('subfolders_list_handle', 
'subfolders_list', True);
                        }
                }
 
-               $files= $this -> ged_dm -> list_elements($element_id, 'file');
+               $files= $this->ged_dm->list_elements($element_id, 'file');
 
                if ($files)
                {
-                       $this -> t -> set_block('folder_tpl', 'files_list', 
'files_list_handle');
+                       $this->t->set_block('folder_tpl', 'files_list', 
'files_list_handle');
                        foreach ($files as $file)
                        {
                                if ( $tr_class == 'row_off' )
@@ -632,22 +632,22 @@
                                else
                                        $tr_class='row_off';
                                
-                               $this -> t -> set_var('tr_class', $tr_class);
+                               $this->t->set_var('tr_class', $tr_class);
 
-                               $this -> t -> set_var('file_name', 
$this->truncate($file['name']));
-                               $this -> t -> set_var('file_reference', 
$file['reference']);
-                               $this -> t -> set_var('file_description', 
$file['description']);
-                               $this -> t -> set_var('file_owner', 
$GLOBALS['phpgw'] -> common -> grab_owner_name($file['owner_id']));
+                               $this->t->set_var('file_name', 
$this->truncate($file['name']));
+                               $this->t->set_var('file_reference', 
$file['reference']);
+                               $this->t->set_var('file_description', 
$file['description']);
+                               $this->t->set_var('file_owner', 
$GLOBALS['phpgw']->common->grab_owner_name($file['owner_id']));
 
                                $link_data['menuaction']= 'ged.ged_ui.browse';
                                $link_data['focused_id']= $file['element_id'];
-                               $this -> t -> set_var('file_link', 
$GLOBALS['phpgw'] -> link('/index.php', $link_data));
+                               $this->t->set_var('file_link', 
$GLOBALS['phpgw']->link('/index.php', $link_data));
 
-                               $this -> t -> fp('files_list_handle', 
'files_list', True);
+                               $this->t->fp('files_list_handle', 'files_list', 
True);
                        }
                }
 
-               $out= $this -> t -> parse('folder_tpl', 'folder_tpl');
+               $out= $this->t->parse('folder_tpl', 'folder_tpl');
 
                return $out;
        }
@@ -664,22 +664,22 @@
                if ($focused_id == "" || ! $this->ged_dm->can_read($focused_id))
                        $focused_id= 0;
 
-               $this -> set_template_defaults();
+               $this->set_template_defaults();
 
-               $this -> display_app_header();
+               $this->display_app_header();
 
-               $this -> t -> set_file(array('browse_file_tpl' => 
'browse.tpl'));
+               $this->t->set_file(array('browse_file_tpl' => 'browse.tpl'));
 
-               $this -> t -> set_var('tree', $this -> draw_tree($focused_id));
+               $this->t->set_var('tree', $this->draw_tree($focused_id));
 
-               $focused_element= $this -> ged_dm -> 
get_element_info($focused_id);
+               $focused_element= $this->ged_dm->get_element_info($focused_id);
                
                // MEMO Link to go up
                $link_data['menuaction']= 'ged.ged_ui.browse';
                $link_data['focused_id']= $focused_element['parent_id'];
                
-               $up_url=$GLOBALS['phpgw'] -> link('/index.php', $link_data);
-               $this -> t -> set_var('up_link', "<a 
href=\"".$up_url."\">".lang('Up')."</a>" );
+               $up_url=$GLOBALS['phpgw']->link('/index.php', $link_data);
+               $this->t->set_var('up_link', "<a 
href=\"".$up_url."\">".lang('Up')."</a>" );
 
 
                if ($focused_id == 0)
@@ -690,11 +690,11 @@
                switch ($focused_element['type'])
                {
                        case 'file' :
-                               $this -> t -> set_var('main_content', $this -> 
draw_file_panel($focused_id));
-                               $this -> t -> set_var('add_folder', '');
-                               $this -> t -> set_var('lang_add_folder', '');
-                               $this -> t -> set_var('add_file', '');
-                               $this -> t -> set_var('lang_add_file', '');
+                               $this->t->set_var('main_content', 
$this->draw_file_panel($focused_id));
+                               $this->t->set_var('add_folder', '');
+                               $this->t->set_var('lang_add_folder', '');
+                               $this->t->set_var('add_file', '');
+                               $this->t->set_var('lang_add_file', '');
                                
                                // TODO if acl write DONE
                                if ( $this->ged_dm->can_write($focused_id) )
@@ -702,8 +702,8 @@
                                        $link_data=null;
                                        $link_data['menuaction']= 
'ged.ged_ui.update_file';
                                        $link_data['element_id']= $focused_id;
-                                       $update_file_url=$GLOBALS['phpgw'] -> 
link('/index.php', $link_data);
-                                       $this -> t -> set_var('update_file', 
"<a href=\"".$update_file_url."\">".lang('Update file')."</a>");
+                                       
$update_file_url=$GLOBALS['phpgw']->link('/index.php', $link_data);
+                                       $this->t->set_var('update_file', "<a 
href=\"".$update_file_url."\">".lang('Update file')."</a>");
                                }
                                
                                if ( $this->ged_dm->can_change_acl($focused_id) 
)
@@ -711,8 +711,8 @@
                                        $link_data=null;
                                        $link_data['menuaction']= 
'ged.ged_ui.change_acl';
                                        $link_data['element_id']= $focused_id;
-                                       $update_file_url=$GLOBALS['phpgw'] -> 
link('/index.php', $link_data);
-                                       $this -> t -> set_var('change_acl', "<a 
href=\"".$update_file_url."\">".lang('Change ACL')."</a>");
+                                       
$update_file_url=$GLOBALS['phpgw']->link('/index.php', $link_data);
+                                       $this->t->set_var('change_acl', "<a 
href=\"".$update_file_url."\">".lang('Change ACL')."</a>");
                                }
                                
                                // TODO : droit specifique d'approbation ?
@@ -721,8 +721,8 @@
                                        $link_data=null;
                                        $link_data['menuaction']= 
'ged.ged_ui.approve_file';
                                        $link_data['element_id']= $focused_id;
-                                       $approve_file_url=$GLOBALS['phpgw'] -> 
link('/index.php', $link_data);
-                                       $this -> t -> set_var('approve_file', 
"<a href=\"".$approve_file_url."\">".lang('Approve file')."</a>");
+                                       
$approve_file_url=$GLOBALS['phpgw']->link('/index.php', $link_data);
+                                       $this->t->set_var('approve_file', "<a 
href=\"".$approve_file_url."\">".lang('Approve file')."</a>");
                                }
 
                                // TODO : droit specifique de delete ?
@@ -731,16 +731,16 @@
                                        $link_data=null;
                                        $link_data['menuaction']= 
'ged.ged_ui.delete_file';
                                        $link_data['element_id']= $focused_id;
-                                       $delete_file_url=$GLOBALS['phpgw'] -> 
link('/index.php', $link_data);
-                                       $this -> t -> set_var('delete_file', 
"<a href=\"".$delete_file_url."\">".lang('Delete file')."</a>");
+                                       
$delete_file_url=$GLOBALS['phpgw']->link('/index.php', $link_data);
+                                       $this->t->set_var('delete_file', "<a 
href=\"".$delete_file_url."\">".lang('Delete file')."</a>");
                                }
                                
                                break;
                        case 'folder' :
-                               $this -> t -> set_var('main_content', $this -> 
draw_folder_panel($focused_id));
+                               $this->t->set_var('main_content', 
$this->draw_folder_panel($focused_id));
 
-                               $this -> t -> set_var('lang_update_file', '');
-                               $this -> t -> set_var('update_file', '');
+                               $this->t->set_var('lang_update_file', '');
+                               $this->t->set_var('update_file', '');
 
                                        // TODO if acl write DONE
                                if ( $this->ged_dm->can_write($focused_id) )
@@ -748,20 +748,20 @@
                                        $link_data=null;
                                        $link_data['menuaction']= 
'ged.ged_ui.add_file';
                                        $link_data['parent_id']= $focused_id;
-                                       $add_file_link=$GLOBALS['phpgw'] -> 
link('/index.php', $link_data);
-                                       $this -> t -> set_var('add_file', "<a 
href=\"".$add_file_link."\">".lang('Add file')."</a>");
+                                       
$add_file_link=$GLOBALS['phpgw']->link('/index.php', $link_data);
+                                       $this->t->set_var('add_file', "<a 
href=\"".$add_file_link."\">".lang('Add file')."</a>");
                                        
                                        $link_data=null;
                                        $link_data['menuaction']= 
'ged.ged_ui.add_folder';
                                        $link_data['parent_id']= $focused_id;
-                                       $add_folder_link=$GLOBALS['phpgw'] -> 
link('/index.php', $link_data);
-                                       $this -> t -> set_var('add_folder', "<a 
href=\"".$add_folder_link."\">".lang('Add folder')."</a>" );
+                                       
$add_folder_link=$GLOBALS['phpgw']->link('/index.php', $link_data);
+                                       $this->t->set_var('add_folder', "<a 
href=\"".$add_folder_link."\">".lang('Add folder')."</a>" );
                                        
                                        $link_data=null;
                                        $link_data['menuaction']= 
'ged.ged_ui.update_folder';
                                        $link_data['element_id']= $focused_id;
-                                       $add_folder_link=$GLOBALS['phpgw'] -> 
link('/index.php', $link_data);
-                                       $this -> t -> set_var('update_folder', 
"<a href=\"".$add_folder_link."\">".lang('Update folder')."</a>" );
+                                       
$add_folder_link=$GLOBALS['phpgw']->link('/index.php', $link_data);
+                                       $this->t->set_var('update_folder', "<a 
href=\"".$add_folder_link."\">".lang('Update folder')."</a>" );
 
                                }
                                        
@@ -771,8 +771,8 @@
                                        $link_data=null;
                                        $link_data['menuaction']= 
'ged.ged_ui.change_acl';
                                        $link_data['element_id']= $focused_id;
-                                       $update_file_url=$GLOBALS['phpgw'] -> 
link('/index.php', $link_data);
-                                       $this -> t -> set_var('approve_file', 
"<a href=\"".$update_file_url."\">".lang('Change ACL')."</a>");
+                                       
$update_file_url=$GLOBALS['phpgw']->link('/index.php', $link_data);
+                                       $this->t->set_var('approve_file', "<a 
href=\"".$update_file_url."\">".lang('Change ACL')."</a>");
                                }
                                
                                // TODO : droit specifique de delete ?
@@ -781,18 +781,18 @@
                                        $link_data=null;
                                        $link_data['menuaction']= 
'ged.ged_ui.delete_folder';
                                        $link_data['element_id']= $focused_id;
-                                       $delete_folder_url=$GLOBALS['phpgw'] -> 
link('/index.php', $link_data);
-                                       $this -> t -> set_var('delete_folder', 
"<a href=\"".$delete_folder_url."\">".lang('Delete folder')."</a>");
+                                       
$delete_folder_url=$GLOBALS['phpgw']->link('/index.php', $link_data);
+                                       $this->t->set_var('delete_folder', "<a 
href=\"".$delete_folder_url."\">".lang('Delete folder')."</a>");
                                }
                                        
                                break;
                        case "url" :
-                               $this -> t -> set_var('main_content', $this -> 
draw_url_panel($focused_id));
-                               $this -> t -> set_var('add_folder', '');
+                               $this->t->set_var('main_content', 
$this->draw_url_panel($focused_id));
+                               $this->t->set_var('add_folder', '');
                                break;
                }
 
-               $this -> t -> pfp('out', 'browse_file_tpl');
+               $this->t->pfp('out', 'browse_file_tpl');
 
        }
 
@@ -806,7 +806,7 @@
 
                if ( ! $this->ged_dm->can_write($parent_id) )
                {
-                               header('Location: '.$GLOBALS['phpgw'] -> 
link('/index.php', $link_data));
+                               header('Location: 
'.$GLOBALS['phpgw']->link('/index.php', $link_data));
                }
                
                $add_file = get_var('add_file',array('GET','POST'));
@@ -815,7 +815,7 @@
                $description = get_var('description', array('GET', 'POST'));
                $validity_period = get_var('validity_period', array('GET', 
'POST'));
 
-               $this -> set_template_defaults();
+               $this->set_template_defaults();
 
                if ($parent_id == "")
                        $parent_id= 0;
@@ -833,37 +833,37 @@
                        $new_file['description']= $description;
                        $new_file['validity_period']= $validity_period;
 
-                       $this -> ged_dm -> add_file($new_file);
+                       $this->ged_dm->add_file($new_file);
                        $file_added= 'done';
 
                        if ($file_added == 'done')
                        {
-                               header('Location: '.$GLOBALS['phpgw'] -> 
link('/index.php', $link_data));
+                               header('Location: 
'.$GLOBALS['phpgw']->link('/index.php', $link_data));
                        }
 
                }
 
-               $this -> t -> set_file(array('add_file_tpl' => 'add_file.tpl'));
+               $this->t->set_file(array('add_file_tpl' => 'add_file.tpl'));
 
-               $this -> set_template_defaults();
+               $this->set_template_defaults();
 
-               $parent_element= $this -> ged_dm -> 
get_element_info($parent_id);
+               $parent_element= $this->ged_dm->get_element_info($parent_id);
 
                // TODO precalcul de la reference
                // TODO attention : forcer si répertoire chrono
                // TODO reprendre ce qui a été fait pour le wizard
                if ($reference != "")
-                       $this -> t -> set_var('new_reference', $reference);
+                       $this->t->set_var('new_reference', $reference);
                else
-                       $this -> t -> set_var('new_reference', 
$parent_element['reference']."/");
+                       $this->t->set_var('new_reference', 
$parent_element['reference']."/");
 
-               $this -> t -> set_var('parent_id_value', $parent_id);
-               $this -> t -> set_var('name_value', $name);
-               $this -> t -> set_var('description_value', $description);
+               $this->t->set_var('parent_id_value', $parent_id);
+               $this->t->set_var('name_value', $name);
+               $this->t->set_var('description_value', $description);
 
-               $this -> t -> set_var('action_add', $GLOBALS['phpgw'] -> 
link('/index.php', 'menuaction=ged.ged_ui.add_file'));
+               $this->t->set_var('action_add', 
$GLOBALS['phpgw']->link('/index.php', 'menuaction=ged.ged_ui.add_file'));
                
-               $select_periods = $this -> ged_dm -> select_periods ();
+               $select_periods = $this->ged_dm->select_periods ();
 
                $select_period_html = '<select name="validity_period">\n';
                foreach ($select_periods as $select_period)
@@ -879,12 +879,12 @@
                }
                $select_period_html.= "</select>\n";
 
-               $this -> t -> set_var('select_period', $select_period_html);
+               $this->t->set_var('select_period', $select_period_html);
 
 
-               $this -> display_app_header();
+               $this->display_app_header();
 
-               $this -> t -> pfp('out', 'add_file_tpl');
+               $this->t->pfp('out', 'add_file_tpl');
 
        }
 
@@ -908,7 +908,7 @@
 
                if ( ! $this->ged_dm->can_write($element_id) )
                {
-                               header('Location: '.$GLOBALS['phpgw'] -> 
link('/index.php', $link_data));
+                               header('Location: 
'.$GLOBALS['phpgw']->link('/index.php', $link_data));
                }
 
                
@@ -923,26 +923,26 @@
     $version_id = get_var('version_id', array('GET', 'POST'));
                $validity_period = get_var('validity_period', array('GET', 
'POST'));
 
-               $this -> set_template_defaults();
+               $this->set_template_defaults();
 
-    $this -> t -> set_var('action_update', $GLOBALS['phpgw'] -> 
link('/index.php', 'menuaction=ged.ged_ui.update_file'));
+    $this->t->set_var('action_update', $GLOBALS['phpgw']->link('/index.php', 
'menuaction=ged.ged_ui.update_file'));
 
-               $this -> t -> set_var('reset_file_field', 'reset_file');
-               $this -> t -> set_var('reset_file_action', lang('Undo'));
-               $this -> t -> set_var('update_file_field', 'update_file');
-               $this -> t -> set_var('update_file_action', lang('Update'));
-               $this -> t -> set_var('update_version_field', 'update_version');
-               
-               $this -> t -> set_var('reset_version_field', 'reset_version');
-               $this -> t -> set_var('reset_version_action', lang('Undo'));
-
-               $this -> t -> set_var('element_id_field', 'element_id');
-               $this -> t -> set_var('file_name_field', 'file_name');
-               $this -> t -> set_var('file_description_field', 
'file_description');
-               $this -> t -> set_var('version_description_field', 
'version_description');
-               $this -> t -> set_var('version_file_field', 'version_file');
-               $this -> t -> set_var('version_type_field', 'version_type');
-               $this -> t -> set_var('version_status_field', 'version_status');
+               $this->t->set_var('reset_file_field', 'reset_file');
+               $this->t->set_var('reset_file_action', lang('Undo'));
+               $this->t->set_var('update_file_field', 'update_file');
+               $this->t->set_var('update_file_action', lang('Update'));
+               $this->t->set_var('update_version_field', 'update_version');
+               
+               $this->t->set_var('reset_version_field', 'reset_version');
+               $this->t->set_var('reset_version_action', lang('Undo'));
+
+               $this->t->set_var('element_id_field', 'element_id');
+               $this->t->set_var('file_name_field', 'file_name');
+               $this->t->set_var('file_description_field', 'file_description');
+               $this->t->set_var('version_description_field', 
'version_description');
+               $this->t->set_var('version_file_field', 'version_file');
+               $this->t->set_var('version_type_field', 'version_type');
+               $this->t->set_var('version_status_field', 'version_status');
 
 
                if ($update_file == lang('Update'))
@@ -955,7 +955,7 @@
                        $new_file['validity_period']= $validity_period;
 
 
-                       $this -> ged_dm -> update_file($new_file);
+                       $this->ged_dm->update_file($new_file);
                        $file_updated= 'done';
 
                        if ($file_updated == 'done')
@@ -963,7 +963,7 @@
                                $link_data['menuaction']= 'ged.ged_ui.browse';
                                $link_data['focused_id']= $element_id;
 
-                               header('Location: '.$GLOBALS['phpgw'] -> 
link('/index.php', $link_data));
+                               header('Location: 
'.$GLOBALS['phpgw']->link('/index.php', $link_data));
                        }
 
                }
@@ -979,14 +979,14 @@
       $new_version['status']= $version_status;
       $new_version['description']= $version_description;
       
-      $version_added= $this -> ged_dm -> add_version($new_version);
+      $version_added= $this->ged_dm->add_version($new_version);
       
       if ($version_added == 'OK')
       {
         $link_data['menuaction']= 'ged.ged_ui.browse';
         $link_data['focused_id']= $element_id;
 
-        header('Location: '.$GLOBALS['phpgw'] -> link('/index.php', 
$link_data));
+        header('Location: '.$GLOBALS['phpgw']->link('/index.php', $link_data));
       }
       else
         print ( $version_added);
@@ -1006,14 +1006,14 @@
       $amended_version['description']= $version_description;
       $amended_version['version_id']= $version_id;
 
-      $version_updated=$this -> ged_dm -> update_version($amended_version);
+      $version_updated=$this->ged_dm->update_version($amended_version);
 
                        if ($version_updated == 'OK')
                        {
                                $link_data['menuaction']= 'ged.ged_ui.browse';
                                $link_data['focused_id']= $element_id;
 
-                               header('Location: '.$GLOBALS['phpgw'] -> 
link('/index.php', $link_data));
+                               header('Location: 
'.$GLOBALS['phpgw']->link('/index.php', $link_data));
                        }
       else
         print ( $version_updated);
@@ -1022,12 +1022,12 @@
                }
                else
                {
-                       $focused_element= $this -> ged_dm -> 
get_element_info($element_id);
+                       $focused_element= 
$this->ged_dm->get_element_info($element_id);
                        $file_name= $focused_element['name'];
                        $file_description= $focused_element['description'];
                        $validity_period= $focused_element['validity_period'];
       
-      $last_version=$this -> ged_dm -> get_last_version($element_id);
+      $last_version=$this->ged_dm->get_last_version($element_id);
       
       $version_status=$last_version['status'];
 
@@ -1037,7 +1037,7 @@
         $version_description=$last_version['description'];
         $version_id=$last_version['version_id'];
         
-        $current_version= $this->ged_dm -> get_current_version($element_id);
+        $current_version= $this->ged_dm->get_current_version($element_id);
 
         $version_major=$current_version['major']-$last_version['major']; 
         $version_minor=$current_version['minor']-$last_version['minor'];
@@ -1048,28 +1048,28 @@
         elseif ( $version_minor != 0 )
           $version_type='minor';
         
-        $this -> t -> set_var('update_version_action', lang('Update'));
+        $this->t->set_var('update_version_action', lang('Update'));
       }
       else
       {
-        $this -> t -> set_var('update_version_action', lang('New'));
+        $this->t->set_var('update_version_action', lang('New'));
         $version_type='minor';
         $version_status='working';
       }
 
                }
 
-               $this -> t -> set_file(array('update_file_tpl' => 
'update_file.tpl'));
+               $this->t->set_file(array('update_file_tpl' => 
'update_file.tpl'));
 
-               $this -> t -> set_var('element_id_value', $element_id);
+               $this->t->set_var('element_id_value', $element_id);
     
     /* file */
-               $this -> t -> set_var('file_description_value', 
$file_description);
-               $this -> t -> set_var('file_name_value', $file_name);
+               $this->t->set_var('file_description_value', $file_description);
+               $this->t->set_var('file_name_value', $file_name);
                
                
                
-               $select_periods = $this -> ged_dm -> select_periods ();
+               $select_periods = $this->ged_dm->select_periods ();
 
                $select_period_html = '<select name="validity_period">\n';
                foreach ($select_periods as $select_period)
@@ -1085,52 +1085,52 @@
                }
                $select_period_html.= "</select>\n";
 
-               $this -> t -> set_var('select_period', $select_period_html);
+               $this->t->set_var('select_period', $select_period_html);
 
 
                /*version*/
-    $this -> t -> set_var('version_id_field', 'version_id');
-               $this -> t -> set_var('version_id_value', $version_id);
-    $this -> t -> set_var('version_description_value', $version_description);
+    $this->t->set_var('version_id_field', 'version_id');
+               $this->t->set_var('version_id_value', $version_id);
+    $this->t->set_var('version_description_value', $version_description);
     
     /* type et status */
-    $this -> t -> set_block('update_file_tpl', 'version_type_block', 
'version_type_block_handle');
+    $this->t->set_block('update_file_tpl', 'version_type_block', 
'version_type_block_handle');
     $temp_types=Array('major', 'minor');
     foreach (  $temp_types as $temp_type )
     {
-      $this -> t -> set_var('version_type_label', lang($temp_type));
-      $this -> t -> set_var('version_type_value',$temp_type);
+      $this->t->set_var('version_type_label', lang($temp_type));
+      $this->t->set_var('version_type_value',$temp_type);
       
       if ( $version_type == $temp_type )
-        $this -> t -> set_var('version_type_checked', 'checked');
+        $this->t->set_var('version_type_checked', 'checked');
       else
-        $this -> t -> set_var('version_type_checked', '');
+        $this->t->set_var('version_type_checked', '');
       
-      $this -> t -> fp('version_type_block_handle', 'version_type_block', 
True);
+      $this->t->fp('version_type_block_handle', 'version_type_block', True);
            
     }
     
-    $this -> t -> set_block('update_file_tpl', 'version_status_block', 
'version_status_block_handle');
+    $this->t->set_block('update_file_tpl', 'version_status_block', 
'version_status_block_handle');
     $temp_statuses=Array('working', 'current');
     foreach ( $temp_statuses as $temp_status  )
     {
-      $this -> t -> set_var('version_status_label', lang($temp_status));
-      $this -> t -> set_var('version_status_value',$temp_status);
+      $this->t->set_var('version_status_label', lang($temp_status));
+      $this->t->set_var('version_status_value',$temp_status);
       
       if ( $version_status == $temp_status )
-        $this -> t -> set_var('version_status_checked', 'checked');
+        $this->t->set_var('version_status_checked', 'checked');
       else
-        $this -> t -> set_var('version_status_checked', '');
+        $this->t->set_var('version_status_checked', '');
       
       
-      $this -> t -> fp('version_status_block_handle', 'version_status_block', 
True);
+      $this->t->fp('version_status_block_handle', 'version_status_block', 
True);
            
     }
         
 
-               $this -> display_app_header();
+               $this->display_app_header();
 
-               $this -> t -> pfp('out', 'update_file_tpl');
+               $this->t->pfp('out', 'update_file_tpl');
 
        }
        
@@ -1145,7 +1145,7 @@
                {
                        $link_data['menuaction']= 'ged.ged_ui.browse';
                        $link_data['focused_id']= $element_id;
-                       header('Location: '.$GLOBALS['phpgw'] -> 
link('/index.php', $link_data));
+                       header('Location: 
'.$GLOBALS['phpgw']->link('/index.php', $link_data));
                }
 
                // Confirmation faite
@@ -1156,24 +1156,24 @@
                        $link_data['menuaction']= 'ged.ged_ui.browse';
                        $link_data['focused_id']= $parent_id;
        
-                       header('Location: '.$GLOBALS['phpgw'] -> 
link('/index.php', $link_data));
+                       header('Location: 
'.$GLOBALS['phpgw']->link('/index.php', $link_data));
                }
 
                //Affichage du formulaire de confirmation
-               $element_info= $this -> ged_dm -> get_element_info($element_id);
+               $element_info= $this->ged_dm->get_element_info($element_id);
                
-               $this -> set_template_defaults();
-               $this -> display_app_header();
+               $this->set_template_defaults();
+               $this->display_app_header();
 
-               $this -> t -> set_file(array('delete_element_tpl' => 
'delete_element.tpl'));
+               $this->t->set_file(array('delete_element_tpl' => 
'delete_element.tpl'));
 
-               $this -> t -> set_var('element_name', $element_info['name']);
-               $this -> t -> set_var('element_type', 
lang($element_info['type']));
-               $this -> t -> set_var('element_id_value', $element_id);
-               $this -> t -> set_var('confirm_delete_field', 'delete_file');
-               $this -> t -> set_var('confirm_delete_value', lang('Confirm 
deletion'));
+               $this->t->set_var('element_name', $element_info['name']);
+               $this->t->set_var('element_type', lang($element_info['type']));
+               $this->t->set_var('element_id_value', $element_id);
+               $this->t->set_var('confirm_delete_field', 'delete_file');
+               $this->t->set_var('confirm_delete_value', lang('Confirm 
deletion'));
 
-               $this -> t -> pfp('out', 'delete_element_tpl');
+               $this->t->pfp('out', 'delete_element_tpl');
        
        }
 
@@ -1186,7 +1186,7 @@
 
                if ( ! $this->ged_dm->can_write($parent_id) )
                {
-                               header('Location: '.$GLOBALS['phpgw'] -> 
link('/index.php', $link_data));
+                               header('Location: 
'.$GLOBALS['phpgw']->link('/index.php', $link_data));
                }
 
                $add_folder = get_var('add_folder', array('GET', 'POST'));
@@ -1194,7 +1194,7 @@
                $description = get_var('description', array('GET', 'POST'));
                $referenceq = get_var('referenceq', array('GET', 'POST'));
 
-               $this -> set_template_defaults();
+               $this->set_template_defaults();
 
                if ($parent_id == "")
                        $parent_id= 0;
@@ -1207,40 +1207,40 @@
                        $new_folder['referenceq']= $referenceq;
                        $new_folder['description']= $description;
 
-                       $this -> ged_dm -> add_folder($new_folder);
+                       $this->ged_dm->add_folder($new_folder);
 
                        $folder_added= 'done';
 
                        if ($folder_added == 'done')
                        {
-                               header('Location: '.$GLOBALS['phpgw'] -> 
link('/index.php', $link_data));
+                               header('Location: 
'.$GLOBALS['phpgw']->link('/index.php', $link_data));
                        }
 
                }
 
-               $this -> t -> set_file(array('add_folder_tpl' => 
'add_folder.tpl'));
+               $this->t->set_file(array('add_folder_tpl' => 'add_folder.tpl'));
 
-               $this -> set_template_defaults();
+               $this->set_template_defaults();
 
-               $parent_element= $this -> ged_dm -> 
get_element_info($parent_id);
+               $parent_element= $this->ged_dm->get_element_info($parent_id);
 
                // TODO precalcul de la reference
                // TODO attention : forcer si répertoire chrono
                if ($reference != "")
-                       $this -> t -> set_var('new_reference', $reference);
+                       $this->t->set_var('new_reference', $reference);
                else
-                       $this -> t -> set_var('new_reference', 
$parent_element['reference']."/");
+                       $this->t->set_var('new_reference', 
$parent_element['reference']."/");
 
-               $this -> t -> set_var('parent_id_value', $parent_id);
-               $this -> t -> set_var('name_value', $name);
-               $this -> t -> set_var('description_value', $description);
-               $this -> t -> set_var('lang_add_folder', lang('Add folder'));
+               $this->t->set_var('parent_id_value', $parent_id);
+               $this->t->set_var('name_value', $name);
+               $this->t->set_var('description_value', $description);
+               $this->t->set_var('lang_add_folder', lang('Add folder'));
 
-               $this -> t -> set_var('action_add', $GLOBALS['phpgw'] -> 
link('/index.php', 'menuaction=ged.ged_ui.add_folder'));
+               $this->t->set_var('action_add', 
$GLOBALS['phpgw']->link('/index.php', 'menuaction=ged.ged_ui.add_folder'));
 
-               $this -> display_app_header();
+               $this->display_app_header();
 
-               $this -> t -> pfp('out', 'add_folder_tpl');
+               $this->t->pfp('out', 'add_folder_tpl');
 
        }
 
@@ -1254,7 +1254,7 @@
 
                if ( ! $this->ged_dm->can_write($element_id) )
                {
-                               header('Location: '.$GLOBALS['phpgw'] -> 
link('/index.php', $link_data));
+                               header('Location: 
'.$GLOBALS['phpgw']->link('/index.php', $link_data));
                }
 
                
@@ -1264,20 +1264,20 @@
                $folder_description = get_var('folder_description', 
array('GET', 'POST'));
                $folder_reference = get_var('folder_reference', array('GET', 
'POST'));
 
-               $this -> set_template_defaults();
+               $this->set_template_defaults();
 
-    $this -> t -> set_var('action_update', $GLOBALS['phpgw'] -> 
link('/index.php', 'menuaction=ged.ged_ui.update_folder'));
+    $this->t->set_var('action_update', $GLOBALS['phpgw']->link('/index.php', 
'menuaction=ged.ged_ui.update_folder'));
 
-               $this -> t -> set_var('reset_folder_field', 'reset_folder');
-               $this -> t -> set_var('reset_folder_action', lang('Undo'));
-               $this -> t -> set_var('update_folder_field', 'update_folder');
-               $this -> t -> set_var('update_folder_action', lang('Update'));
+               $this->t->set_var('reset_folder_field', 'reset_folder');
+               $this->t->set_var('reset_folder_action', lang('Undo'));
+               $this->t->set_var('update_folder_field', 'update_folder');
+               $this->t->set_var('update_folder_action', lang('Update'));
 
 
-               $this -> t -> set_var('element_id_field', 'element_id');
-               $this -> t -> set_var('folder_name_field', 'folder_name');
-               $this -> t -> set_var('folder_reference_field', 
'folder_reference');
-               $this -> t -> set_var('folder_description_field', 
'folder_description');
+               $this->t->set_var('element_id_field', 'element_id');
+               $this->t->set_var('folder_name_field', 'folder_name');
+               $this->t->set_var('folder_reference_field', 'folder_reference');
+               $this->t->set_var('folder_description_field', 
'folder_description');
 
                if ($update_folder == lang('Update'))
                {
@@ -1288,7 +1288,7 @@
                        $new_folder['description']= $folder_description;
                        $new_folder['reference']= $folder_reference;
 
-                       $this -> ged_dm -> update_file($new_folder);
+                       $this->ged_dm->update_file($new_folder);
                        $folder_updated= 'done';
 
                        if ($folder_updated == 'done')
@@ -1296,31 +1296,31 @@
                                $link_data['menuaction']= 'ged.ged_ui.browse';
                                $link_data['focused_id']= $element_id;
 
-                               header('Location: '.$GLOBALS['phpgw'] -> 
link('/index.php', $link_data));
+                               header('Location: 
'.$GLOBALS['phpgw']->link('/index.php', $link_data));
                        }
 
                }
                else
                {
-                       $focused_element= $this -> ged_dm -> 
get_element_info($element_id);
+                       $focused_element= 
$this->ged_dm->get_element_info($element_id);
                        $folder_name= $focused_element['name'];
                        $folder_description= $focused_element['description'];
                        $folder_reference= $focused_element['reference'];
       
                }
 
-               $this -> t -> set_file(array('update_folder_tpl' => 
'update_folder.tpl'));
+               $this->t->set_file(array('update_folder_tpl' => 
'update_folder.tpl'));
 
-               $this -> t -> set_var('element_id_value', $element_id);
+               $this->t->set_var('element_id_value', $element_id);
     
     /* folder */
-               $this -> t -> set_var('folder_description_value', 
$folder_description);
-               $this -> t -> set_var('folder_reference_value', 
$folder_reference);
-               $this -> t -> set_var('folder_name_value', $folder_name);       
 
+               $this->t->set_var('folder_description_value', 
$folder_description);
+               $this->t->set_var('folder_reference_value', $folder_reference);
+               $this->t->set_var('folder_name_value', $folder_name);        
 
-               $this -> display_app_header();
+               $this->display_app_header();
 
-               $this -> t -> pfp('out', 'update_folder_tpl');
+               $this->t->pfp('out', 'update_folder_tpl');
 
        }
        
@@ -1336,7 +1336,7 @@
                {
                        $link_data['menuaction']= 'ged.ged_ui.browse';
                        $link_data['focused_id']= $element_id;
-                       header('Location: '.$GLOBALS['phpgw'] -> 
link('/index.php', $link_data));
+                       header('Location: 
'.$GLOBALS['phpgw']->link('/index.php', $link_data));
                }
 
                // Confirmation faite
@@ -1347,25 +1347,25 @@
                        $link_data['menuaction']= 'ged.ged_ui.browse';
                        $link_data['focused_id']= $parent_id;
        
-                       header('Location: '.$GLOBALS['phpgw'] -> 
link('/index.php', $link_data));
+                       header('Location: 
'.$GLOBALS['phpgw']->link('/index.php', $link_data));
                }
 
                //Affichage du formulaire de confirmation
-               $element_info= $this -> ged_dm -> get_element_info($element_id);
+               $element_info= $this->ged_dm->get_element_info($element_id);
                
-               $this -> set_template_defaults();
-               $this -> display_app_header();
+               $this->set_template_defaults();
+               $this->display_app_header();
                
 
-               $this -> t -> set_file(array('delete_element_tpl' => 
'delete_element.tpl'));
+               $this->t->set_file(array('delete_element_tpl' => 
'delete_element.tpl'));
 
-               $this -> t -> set_var('element_name', $element_info['name']);
-               $this -> t -> set_var('element_type', 
lang($element_info['type']));
-               $this -> t -> set_var('element_id_value', $element_id);
-               $this -> t -> set_var('confirm_delete_field', 'delete_folder');
-               $this -> t -> set_var('confirm_delete_value', lang('Confirm 
deletion'));
+               $this->t->set_var('element_name', $element_info['name']);
+               $this->t->set_var('element_type', lang($element_info['type']));
+               $this->t->set_var('element_id_value', $element_id);
+               $this->t->set_var('confirm_delete_field', 'delete_folder');
+               $this->t->set_var('confirm_delete_value', lang('Confirm 
deletion'));
 
-               $this -> t -> pfp('out', 'delete_element_tpl');
+               $this->t->pfp('out', 'delete_element_tpl');
 
        }
        
@@ -1375,11 +1375,11 @@
                $update_acl = get_var('update_acl', array('POST'));
                
                
-               $this -> set_template_defaults();
+               $this->set_template_defaults();
 
-               $this -> display_app_header();
+               $this->display_app_header();
                
-               $this -> t -> set_file(array('change_acl_tpl' => 
'change_acl.tpl'));
+               $this->t->set_file(array('change_acl_tpl' => 'change_acl.tpl'));
                
                //Update if necessary toussa
                if ( $update_acl == lang ( "Update AC" ))
@@ -1457,7 +1457,7 @@
                        
                $acl=$this->ged_dm->get_element_acl ( $element_id );
                
-               $this -> t -> set_block('change_acl_tpl', 'acl_list', 
'acl_list_handle');
+               $this->t->set_block('change_acl_tpl', 'acl_list', 
'acl_list_handle');
                
                $element_info=$this->ged_dm->get_element_info($element_id);
                
@@ -1466,67 +1466,67 @@
                elseif ($element_info['type'] == 'file' )
                        $element_name=lang("file")." ".$element_info['name'];
                
-               $this -> t -> set_var ( 'element_name', $element_name);
+               $this->t->set_var ( 'element_name', $element_name);
                
                if ( ! empty ($acl))
                        foreach ( $acl as $ac )
                        {
-                               $this -> t -> set_var ( 'account_id', 
$ac['account_id']);
-                               $this -> t -> set_var ( 'acl_id', 
$ac['acl_id']);
-                               $this -> t -> set_var ( 'account', 
$GLOBALS['phpgw'] -> common -> grab_owner_name($ac['account_id']));
+                               $this->t->set_var ( 'account_id', 
$ac['account_id']);
+                               $this->t->set_var ( 'acl_id', $ac['acl_id']);
+                               $this->t->set_var ( 'account', 
$GLOBALS['phpgw']->common->grab_owner_name($ac['account_id']));
                                
                                if ( $ac['read'] == 1)
                                        $readflag="checked";
                                else
                                        $readflag="";
                                
-                               $this -> t -> set_var ( 'readflag', $readflag);
+                               $this->t->set_var ( 'readflag', $readflag);
 
                        if ( $ac['write'] == 1)
                                        $writeflag="checked";
                                else
                                        $writeflag="";
 
-                       $this -> t -> set_var ( 'writeflag', $writeflag);
+                       $this->t->set_var ( 'writeflag', $writeflag);
 
                                if ( $ac['changeacl'] == 1)
                                        $changeaclflag="checked";
                                else
                                        $changeaclflag="";
                                        
-                               $this -> t -> set_var ( 'changeaclflag', 
$changeaclflag);
+                               $this->t->set_var ( 'changeaclflag', 
$changeaclflag);
                        
                        
-                               $this -> t -> fp('acl_list_handle', 'acl_list', 
True);
+                               $this->t->fp('acl_list_handle', 'acl_list', 
True);
                        }
                        
                $candidates=$this->ged_dm->get_element_acl_candidates ( 
$element_id );
                
-               $this -> t -> set_block('change_acl_tpl', 'accounts_list', 
'accounts_list_handle');
+               $this->t->set_block('change_acl_tpl', 'accounts_list', 
'accounts_list_handle');
                
                if ( ! empty ($candidates))
                {
-                       $this -> t -> set_var ( 'account_id', "");
-                       $this -> t -> set_var ( 'account', lang ( "select"));
-                       $this -> t -> fp('accounts_list_handle', 
'accounts_list', True);
+                       $this->t->set_var ( 'account_id', "");
+                       $this->t->set_var ( 'account', lang ( "select"));
+                       $this->t->fp('accounts_list_handle', 'accounts_list', 
True);
                        
                        foreach ( $candidates as $candidate )
                        {
-                               $this -> t -> set_var ( 'account_id', 
$candidate['account_id']);
-                               $this -> t -> set_var ( 'account', 
$GLOBALS['phpgw'] -> common -> grab_owner_name($candidate['account_id']));
+                               $this->t->set_var ( 'account_id', 
$candidate['account_id']);
+                               $this->t->set_var ( 'account', 
$GLOBALS['phpgw']->common->grab_owner_name($candidate['account_id']));
 
-                               $this -> t -> fp('accounts_list_handle', 
'accounts_list', True);
+                               $this->t->fp('accounts_list_handle', 
'accounts_list', True);
                        }
                }
 
                $link_data['menuaction']= 'ged.ged_ui.browse';
                $link_data['focused_id']= $element_id;
 
-               $url_go_back=$GLOBALS['phpgw'] -> link('/index.php', 
$link_data);
+               $url_go_back=$GLOBALS['phpgw']->link('/index.php', $link_data);
                $js_go_back ="document.location='".$url_go_back."'";
-               $this -> t -> set_var ( 'js_action_go_back', $js_go_back );
+               $this->t->set_var ( 'js_action_go_back', $js_go_back );
                
-               $this -> t -> pfp('out', 'change_acl_tpl');
+               $this->t->pfp('out', 'change_acl_tpl');
        
        }
        
@@ -1539,7 +1539,7 @@
                $link_data['menuaction']= 'ged.ged_ui.browse';
                $link_data['focused_id']= $element_id;
        
-               header('Location: '.$GLOBALS['phpgw'] -> link('/index.php', 
$link_data));
+               header('Location: '.$GLOBALS['phpgw']->link('/index.php', 
$link_data));
        }
        
 }

Index: inc/hook_settings.inc.php
===================================================================
RCS file: /sources/phpgroupware/ged/inc/hook_settings.inc.php,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -b -r1.1.1.1 -r1.2
--- inc/hook_settings.inc.php   30 Mar 2006 12:29:19 -0000      1.1.1.1
+++ inc/hook_settings.inc.php   17 Jun 2006 18:06:33 -0000      1.2
@@ -1,10 +1,12 @@
 <?php
-       
/**************************************************************************\
+       
/***************************************************************************\
        * phpGroupWare - Ged Preferences                                      *
        * http://www.phpgroupware.org                                           
   *
-       * Based on Webcalendar by Craig Knudsen <address@hidden>               *
-       *          http://www.radix.net/~cknudsen                               
   *
-       * Modified by Mark Peters <address@hidden>                       *
+       *                                                                       
   *
+       * Inspired from MyDMS http://dms.markuswestphal.de/about.html           
   *
+       *                                                                       
   *
+       *                                                                       
   *
+       * Created by Pascal Vilarem <address@hidden>                       *
        * Modified by Ralf Becker <address@hidden>                 *
        * --------------------------------------------                          
   *
        *  This program is free software; you can redistribute it and/or modify 
it *

Index: inc/class.ged_dm.inc.php
===================================================================
RCS file: /sources/phpgroupware/ged/inc/class.ged_dm.inc.php,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -b -r1.1.1.1 -r1.2
--- inc/class.ged_dm.inc.php    30 Mar 2006 12:29:16 -0000      1.1.1.1
+++ inc/class.ged_dm.inc.php    17 Jun 2006 18:06:33 -0000      1.2
@@ -1,16 +1,15 @@
 <?php
-/**************************************************************************
-* phpGroupWare - ged
-* http://www.phpgroupware.org
-* Written by Pascal Vilarem <address@hidden>
-*
-* -----------------------------------------------------------------
-*  This program is free software; you can redistribute it and/or modify it
-*  under the terms of the GNU General Public License as published by the
-*  Free Software Foundation; either version 2 of the License, or (at your
-*  option) any later version
-***************************************************************************/
-
+       
/**************************************************************************
+       * phpGroupWare - ged
+       * http://www.phpgroupware.org
+       * Written by Pascal Vilarem <address@hidden>
+       *
+       * 
--------------------------------------------------------------------------
+       *  This program is free software; you can redistribute it and/or modify 
it
+       *  under the terms of the GNU General Public License as published by the
+       *  Free Software Foundation; either version 2 of the License, or (at 
your
+       *  option) any later version
+       
***************************************************************************/
 
 class ged_dm
 {
@@ -40,38 +39,38 @@
                        $sqlaclbase="( ";
                        foreach ( $GLOBALS['phpgw']->accounts->memberships as 
$membership )
                        {
-                               $sqlaclbase.=$or.$this -> 
tables['acl'].".account_id=".$membership['account_id']." ";
+                               
$sqlaclbase.=$or.$this->tables['acl'].".account_id=".$membership['account_id']."
 ";
                                $or="OR ";
                        }
-                       $sqlaclbase.=$or.$this -> 
tables['acl'].".account_id=".$GLOBALS['phpgw_info']['user']['account_id']." ";
-                       $this->sqlaclread=$sqlaclbase.") AND ( ".$this -> 
tables['acl'].".aclread = 1 )";
-                       $this->sqlaclwrite=$sqlaclbase.") AND ( ".$this -> 
tables['acl'].".aclwrite = 1 )";
-                       $this->sqlaclchangeacl=$sqlaclbase.") AND ( ".$this -> 
tables['acl'].".aclchangeacl = 1 )";
+                       
$sqlaclbase.=$or.$this->tables['acl'].".account_id=".$GLOBALS['phpgw_info']['user']['account_id']."
 ";
+                       $this->sqlaclread=$sqlaclbase.") AND ( 
".$this->tables['acl'].".aclread = 1 )";
+                       $this->sqlaclwrite=$sqlaclbase.") AND ( 
".$this->tables['acl'].".aclwrite = 1 )";
+                       $this->sqlaclchangeacl=$sqlaclbase.") AND ( 
".$this->tables['acl'].".aclchangeacl = 1 )";
                        
                }
                
-               //$this -> ged_config= $GLOBALS['ged_config'];
+               //$this->ged_config= $GLOBALS['ged_config'];
                $config = CreateObject('phpgwapi.config','ged');
                $config->read_repository();
-               $this -> ged_config = $config->config_data;
-               //_debug_array($this -> ged_config);
+               $this->ged_config = $config->config_data;
+               //_debug_array($this->ged_config);
                unset($config);
                
                // TODO a gérer via le (futur) hook d'admin
-               $this ->datadir = 
$GLOBALS['phpgw_info']['server']['files_dir']."/ged-data";
+               $this->datadir = 
$GLOBALS['phpgw_info']['server']['files_dir']."/ged-data";
                
-               if ( ! is_dir ( $this ->datadir ))
-                       mkdir ( $this ->datadir);
+               if ( ! is_dir ( $this->datadir ))
+                       mkdir ( $this->datadir);
 
-               $this -> db= $GLOBALS['phpgw'] -> db;
-               $this -> owner= 
intval($GLOBALS['phpgw_info']['user']['account_id']);
+               $this->db= $GLOBALS['phpgw']->db;
+               $this->owner= 
intval($GLOBALS['phpgw_info']['user']['account_id']);
 
-               $this -> db2= new db();
-               $this -> db2 -> Host= $this -> db -> Host;
-               $this -> db2 -> Type= $this -> db -> Type;
-               $this -> db2 -> Database= $this -> db -> Database;
-               $this -> db2 -> User= $this -> db -> User;
-               $this -> db2 -> Password= $this -> db -> Password;
+               $this->db2= new db();
+               $this->db2->Host= $this->db->Host;
+               $this->db2->Type= $this->db->Type;
+               $this->db2->Database= $this->db->Database;
+               $this->db2->User= $this->db->User;
+               $this->db2->Password= $this->db->Password;
        }
 
        function get_file_extention($filename)
@@ -89,17 +88,17 @@
                $basename= basename($new_file['file_name']);
                $candidate_name= $basename;
 
-               $extension= $this -> get_file_extention($basename);
+               $extension= $this->get_file_extention($basename);
 
                $i= 0;
 
-               while (file_exists($this -> datadir."/".$candidate_name))
+               while (file_exists($this->datadir."/".$candidate_name))
                {
                        $i ++;
                        $candidate_name= "v".$i."_".$basename;
                }
 
-               $new_name= $this -> datadir."/".$candidate_name;
+               $new_name= $this->datadir."/".$candidate_name;
 
                if (move_uploaded_file($new_file['file_tmp_name'], $new_name))
                {
@@ -121,28 +120,28 @@
                        $sql_model= "INSERT INTO %s ( type, parent_id, name, 
reference, description, owner_id, creator_id, creation_date, doc_type, 
validity_period  ) VALUES ";
                        $sql_model.= " ( '%s', %d, '%s', '%s', '%s', %d, %d, 
%d, '%s', %d ) ";
 
-                       $sql= sprintf($sql_model, $this -> tables['elements'], 
'file', $new_file['parent_id'], $new_file['name'], $new_file['reference'], 
$new_file['description'], $GLOBALS['phpgw_info']['user']['account_id'], 
$GLOBALS['phpgw_info']['user']['account_id'], time(), $new_file['doc_type'], 
$new_file['validity_period']);
+                       $sql= sprintf($sql_model, $this->tables['elements'], 
'file', $new_file['parent_id'], $new_file['name'], $new_file['reference'], 
$new_file['description'], $GLOBALS['phpgw_info']['user']['account_id'], 
$GLOBALS['phpgw_info']['user']['account_id'], time(), $new_file['doc_type'], 
$new_file['validity_period']);
 
                        // TODO gestion des slashes !
                        //print ($sql);
 
-                       $this -> db -> query($sql, __LINE__, __FILE__);
+                       $this->db->query($sql, __LINE__, __FILE__);
                        //récupérer l'id
-                       $new_element_id= $this -> db -> 
get_last_insert_id($this -> tables['elements'], 'element_id');
+                       $new_element_id= 
$this->db->get_last_insert_id($this->tables['elements'], 'element_id');
 
-                       $this -> db -> unlock();
+                       $this->db->unlock();
 
                        // TODO gestion des slashes
 
                        $sql_model1= "INSERT INTO %s ( size, file_name, 
stored_name, file_extension, creator_id, creation_date, status, element_id, 
description, major, minor ) VALUES ";
                        $sql_model1.= " (  %d, '%s', '%s', '%s', %d, %d, '%s', 
%d, '%s', %d, %d ) ";
 
-                       $sql1= sprintf($sql_model1, $this -> 
tables['versions'], $new_file['file_size'], $new_file['file_name'], 
$candidate_name, $extension, $GLOBALS['phpgw_info']['user']['account_id'], 
time(), 'current', $new_element_id, lang("First version"), 1, 0);
+                       $sql1= sprintf($sql_model1, $this->tables['versions'], 
$new_file['file_size'], $new_file['file_name'], $candidate_name, $extension, 
$GLOBALS['phpgw_info']['user']['account_id'], time(), 'current', 
$new_element_id, lang("First version"), 1, 0);
 
                        //print ("<br/>".$sql1);
 
-                       $this -> db -> query($sql1, __LINE__, __FILE__);
-                       $this -> db -> unlock();
+                       $this->db->query($sql1, __LINE__, __FILE__);
+                       $this->db->unlock();
                        
                        $this->set_default_acl($new_element_id);
                        
@@ -159,13 +158,13 @@
                $sql_model= "UPDATE %s set name='%s', description='%s', 
reference='%s', validity_period=%s WHERE ";
                $sql_model.= " element_id=%d";
 
-               $sql= sprintf($sql_model, $this -> tables['elements'], 
$new_file['name'], $new_file['description'], $new_file['reference'], 
$new_file['validity_period'], $new_file['element_id']);
+               $sql= sprintf($sql_model, $this->tables['elements'], 
$new_file['name'], $new_file['description'], $new_file['reference'], 
$new_file['validity_period'], $new_file['element_id']);
 
                // TODO gestion des slashes !
                //print ($sql);
                
-               $this -> db -> query($sql, __LINE__, __FILE__);
-               $this -> db -> unlock();
+               $this->db->query($sql, __LINE__, __FILE__);
+               $this->db->unlock();
 
        }
        
@@ -191,9 +190,9 @@
                                }
                                
                                // Effacement des versions
-                               $this-> db -> debug = true;
-                               $sqlv="DELETE FROM `".$this -> 
tables['versions']."` WHERE `element_id`=".$element_id;
-                               $this -> db -> query($sqlv, __LINE__, __FILE__);
+                               $this->db->debug = true;
+                               $sqlv="DELETE FROM 
`".$this->tables['versions']."` WHERE `element_id`=".$element_id;
+                               $this->db->query($sqlv, __LINE__, __FILE__);
                                break;
                        
                        case 'folder':
@@ -215,9 +214,9 @@
                $this->rm_all_acl ( $element_id );
 
                // Effacement de l'element
-               $sqle="DELETE FROM `".$this -> tables['elements']."` WHERE 
`element_id`=".$element_id;
-               $this -> db -> query($sqle, __LINE__, __FILE__);
-               $this-> db -> debug = false;
+               $sqle="DELETE FROM `".$this->tables['elements']."` WHERE 
`element_id`=".$element_id;
+               $this->db->query($sqle, __LINE__, __FILE__);
+               $this->db->debug = false;
                
                return ($element_info['parent_id']);
        
@@ -228,7 +227,7 @@
 
                // MEMO gestion des numeros de versions
 
-               $cur_version= $this -> 
get_current_version($new_version['element_id']);
+               $cur_version= 
$this->get_current_version($new_version['element_id']);
                $major= $cur_version['major'];
                $minor= $cur_version['minor'];
 
@@ -246,17 +245,17 @@
                $basename= basename($new_version['file_name']);
                $candidate_name= $basename;
 
-               $extension= $this -> get_file_extention($basename);
+               $extension= $this->get_file_extention($basename);
 
                $i= 0;
 
-               while (file_exists($this -> datadir."/".$candidate_name))
+               while (file_exists($this->datadir."/".$candidate_name))
                {
                        $i ++;
                        $candidate_name= "v".$i."_".$basename;
                }
 
-               $new_name= $this -> datadir."/".$candidate_name;
+               $new_name= $this->datadir."/".$candidate_name;
 
                if (move_uploaded_file($new_version['file_tmp_name'], 
$new_name))
                {
@@ -275,22 +274,22 @@
                        $sql_model1= "INSERT INTO %s ( size, file_name, 
stored_name, file_extension, creator_id, creation_date, status, element_id, 
description, major, minor ) VALUES ";
                        $sql_model1.= " (  %d, '%s', '%s', '%s', %d, %d, '%s', 
%d, '%s', %d, %d ) ";
 
-                       $sql1= sprintf($sql_model1, $this -> 
tables['versions'], $new_version['file_size'], $new_version['file_name'], 
$candidate_name, $extension, $GLOBALS['phpgw_info']['user']['account_id'], 
time(), $new_version['status'], $new_version['element_id'], 
$new_version['description'], $major, $minor);
+                       $sql1= sprintf($sql_model1, $this->tables['versions'], 
$new_version['file_size'], $new_version['file_name'], $candidate_name, 
$extension, $GLOBALS['phpgw_info']['user']['account_id'], time(), 
$new_version['status'], $new_version['element_id'], 
$new_version['description'], $major, $minor);
 
                        //print ("<br/>".$sql1);
 
-                       $this -> db -> query($sql1, __LINE__, __FILE__);
-                       $this -> db -> unlock();
+                       $this->db->query($sql1, __LINE__, __FILE__);
+                       $this->db->unlock();
 
                }
     
     if ($new_version['status'] == "current")
     {
       $sql_model2= "UPDATE %s set status='obsolete' WHERE version_id=%d";
-      $sql2= sprintf($sql_model2, $this -> tables['versions'], 
$cur_version['version_id']);
+      $sql2= sprintf($sql_model2, $this->tables['versions'], 
$cur_version['version_id']);
 
-      $this -> db -> query($sql2, __LINE__, __FILE__);
-      $this -> db -> unlock();
+      $this->db->query($sql2, __LINE__, __FILE__);
+      $this->db->unlock();
 
     }
     
@@ -304,8 +303,8 @@
 
                // MEMO gestion des numeros de versions
 
-               $cur_version= $this -> 
get_current_version($amended_version['element_id']);
-               $me_version= $this -> 
get_version_info($amended_version['version_id']);
+               $cur_version= 
$this->get_current_version($amended_version['element_id']);
+               $me_version= 
$this->get_version_info($amended_version['version_id']);
 
                $major= $cur_version['major'];
                $minor= $cur_version['minor'];
@@ -324,7 +323,7 @@
                if ($amended_version['file_name'] != "")
                {
 
-                       $old_name= $this -> 
datadir."/".$me_version['stored_name'];
+                       $old_name= 
$this->datadir."/".$me_version['stored_name'];
 
                        if (!unlink($old_name))
                                return ("cannot erase old file");
@@ -332,17 +331,17 @@
                        $basename= basename($amended_version['file_name']);
                        $candidate_name= $basename;
 
-                       $extension= $this -> get_file_extention($basename);
+                       $extension= $this->get_file_extention($basename);
 
                        $i= 0;
 
-                       while (file_exists($this -> 
datadir."/".$candidate_name))
+                       while (file_exists($this->datadir."/".$candidate_name))
                        {
                                $i ++;
                                $candidate_name= "v".$i."_".$basename;
                        }
 
-                       $new_name= $this -> datadir."/".$candidate_name;
+                       $new_name= $this->datadir."/".$candidate_name;
 
                        if 
(move_uploaded_file($amended_version['file_tmp_name'], $new_name))
                        {
@@ -362,7 +361,7 @@
                        $sql_model1.= "status='%s', description='%s', major=%d, 
minor=%d ";
                        $sql_model1.= "WHERE version_id=%d";
 
-                       $sql1= sprintf($sql_model1, $this -> 
tables['versions'], $amended_version['file_size'], 
$amended_version['file_name'], $candidate_name, $extension, 
$amended_version['status'], $amended_version['description'], $major, $minor, 
$amended_version['version_id']);
+                       $sql1= sprintf($sql_model1, $this->tables['versions'], 
$amended_version['file_size'], $amended_version['file_name'], $candidate_name, 
$extension, $amended_version['status'], $amended_version['description'], 
$major, $minor, $amended_version['version_id']);
                }
                else
                {
@@ -370,19 +369,19 @@
                        $sql_model1.= "status='%s', description='%s', major=%d, 
minor=%d ";
                        $sql_model1.= "WHERE version_id=%d";
 
-                       $sql1= sprintf($sql_model1, $this -> 
tables['versions'], $amended_version['status'], 
$amended_version['description'], $major, $minor, 
$amended_version['version_id']);
+                       $sql1= sprintf($sql_model1, $this->tables['versions'], 
$amended_version['status'], $amended_version['description'], $major, $minor, 
$amended_version['version_id']);
                }
 
-               $this -> db -> query($sql1, __LINE__, __FILE__);
-               $this -> db -> unlock();
+               $this->db->query($sql1, __LINE__, __FILE__);
+               $this->db->unlock();
 
                if ($amended_version['status'] == "current")
                {
                        $sql_model2= "UPDATE %s set status='obsolete' WHERE 
version_id=%d";
-                       $sql2= sprintf($sql_model2, $this -> 
tables['versions'], $cur_version['version_id']);
+                       $sql2= sprintf($sql_model2, $this->tables['versions'], 
$cur_version['version_id']);
 
-                       $this -> db -> query($sql2, __LINE__, __FILE__);
-                       $this -> db -> unlock();
+                       $this->db->query($sql2, __LINE__, __FILE__);
+                       $this->db->unlock();
 
                }
 
@@ -395,15 +394,15 @@
                $sql_model= "INSERT INTO %s ( type, parent_id, name, reference, 
description, owner_id, creator_id, creation_date ) VALUES ";
                $sql_model.= " ( '%s', %d, '%s', '%s', '%s', %d, %d, %d) ";
 
-               $sql= sprintf($sql_model, $this -> tables['elements'], 
'folder', $new_folder['parent_id'], $new_folder['name'], 
$new_folder['steria_ref'], $new_folder['description'], 
$GLOBALS['phpgw_info']['user']['account_id'], 
$GLOBALS['phpgw_info']['user']['account_id'], time());
+               $sql= sprintf($sql_model, $this->tables['elements'], 'folder', 
$new_folder['parent_id'], $new_folder['name'], $new_folder['steria_ref'], 
$new_folder['description'], $GLOBALS['phpgw_info']['user']['account_id'], 
$GLOBALS['phpgw_info']['user']['account_id'], time());
 
                //print ($sql);
 
-               $this -> db -> query($sql, __LINE__, __FILE__);
+               $this->db->query($sql, __LINE__, __FILE__);
                
-               $new_element_id= $this -> db -> get_last_insert_id($this -> 
tables['elements'], 'element_id');
+               $new_element_id= 
$this->db->get_last_insert_id($this->tables['elements'], 'element_id');
 
-               $this -> db -> unlock();
+               $this->db->unlock();
                
                //TODO positionnement des droits.
                $this->set_default_acl($new_element_id);
@@ -416,68 +415,68 @@
 
        function get_element_info($element_id)
        {
-               if ( ! $this-> can_read($element_id))
+               if ( ! $this->can_read($element_id))
                        $element_id=0;
                        
-               $sql= "SELECT * FROM ".$this -> tables['elements']." ";
+               $sql= "SELECT * FROM ".$this->tables['elements']." ";
                $sql.= "WHERE element_id=".$element_id."";
 
-               $this -> db -> query($sql, __LINE__, __FILE__);
+               $this->db->query($sql, __LINE__, __FILE__);
 
-               if ($this -> db -> next_record())
+               if ($this->db->next_record())
                {
-                       $out['element_id']= $this -> db -> f('element_id');
-                       $out['name']= $this -> db -> f('name');
-                       $out['parent_id']= $this -> db -> f('parent_id');
-                       $out['owner_id']= $this -> db -> f('owner_idR');
-                       $out['reference']= $this -> db -> f('reference');
-                       $out['type']= $this -> db -> f('type');
-                       $out['creator_id']= $this -> db -> f('creator_id');
-                       $out['owner_id']= $this -> db -> f('owner_id');
-                       $out['creation_date']= $this -> db -> 
f('creation_date');
-                       $out['lock_status']= $this -> db -> f('lock_status');
-                       $out['lock_user_id']= $this -> db -> f('lock_user_id');
-                       $out['description']= $this -> db -> f('description');
-                       $out['validity_period']= $this -> db -> 
f('validity_period');
+                       $out['element_id']= $this->db->f('element_id');
+                       $out['name']= $this->db->f('name');
+                       $out['parent_id']= $this->db->f('parent_id');
+                       $out['owner_id']= $this->db->f('owner_idR');
+                       $out['reference']= $this->db->f('reference');
+                       $out['type']= $this->db->f('type');
+                       $out['creator_id']= $this->db->f('creator_id');
+                       $out['owner_id']= $this->db->f('owner_id');
+                       $out['creation_date']= $this->db->f('creation_date');
+                       $out['lock_status']= $this->db->f('lock_status');
+                       $out['lock_user_id']= $this->db->f('lock_user_id');
+                       $out['description']= $this->db->f('description');
+                       $out['validity_period']= 
$this->db->f('validity_period');
                        // TODO : ADD 'validity_period' DONE
                }
                else
                        $out= "";
 
-               $this -> db -> unlock();
+               $this->db->unlock();
 
                return $out;
        }
 
        function get_version_info($version_id)
        {
-               $sql= "SELECT * FROM ".$this -> tables['versions']." ";
+               $sql= "SELECT * FROM ".$this->tables['versions']." ";
                $sql.= "WHERE version_id=".$version_id." ";
 
-               $this -> db -> query($sql, __LINE__, __FILE__);
+               $this->db->query($sql, __LINE__, __FILE__);
 
-               if ($this -> db -> next_record());
+               if ($this->db->next_record());
                {
 
-                       $version['url']= $this -> db -> f('url');
-                       $version['size']= $this -> db -> f('size');
-                       $version['status']= $this -> db -> f('status');
-                       $version['creator_id']= $this -> db -> f('creator_id');
-                       $version['creation_date']= $this -> db -> 
f('creation_date');
-                       $version['minor']= $this -> db -> f('minor');
-                       $version['version_id']= $this -> db -> f('version_id');
-                       $version['element_id']= $this -> db -> f('element_id');
-                       $version['description']= $this -> db -> 
f('description');
-                       $version['file_extension']= $this -> db -> 
f('file_extension');
-                       $version['file_name']= $this -> db -> f('file_name');
-                       $version['stored_name']= $this -> db -> 
f('stored_name');
-                       $version['major']= $this -> db -> f('major');
-                       $version['mime_type']= $this -> 
get_mime_type($version['file_extension']);
-                       $version['file_full_path']= $this -> 
datadir.'/'.$version['stored_name'];
+                       $version['url']= $this->db->f('url');
+                       $version['size']= $this->db->f('size');
+                       $version['status']= $this->db->f('status');
+                       $version['creator_id']= $this->db->f('creator_id');
+                       $version['creation_date']= 
$this->db->f('creation_date');
+                       $version['minor']= $this->db->f('minor');
+                       $version['version_id']= $this->db->f('version_id');
+                       $version['element_id']= $this->db->f('element_id');
+                       $version['description']= $this->db->f('description');
+                       $version['file_extension']= 
$this->db->f('file_extension');
+                       $version['file_name']= $this->db->f('file_name');
+                       $version['stored_name']= $this->db->f('stored_name');
+                       $version['major']= $this->db->f('major');
+                       $version['mime_type']= 
$this->get_mime_type($version['file_extension']);
+                       $version['file_full_path']= 
$this->datadir.'/'.$version['stored_name'];
 
                }
 
-               $this -> db -> unlock();
+               $this->db->unlock();
 
                return $version;
 
@@ -486,36 +485,36 @@
        function get_last_version($element_id)
        {
 
-               $sql= "SELECT * FROM ".$this -> tables['versions']." ";
+               $sql= "SELECT * FROM ".$this->tables['versions']." ";
                $sql.= "WHERE element_id=".$element_id." ";
                $sql.= "ORDER BY version_id DESC LIMIT 1";
 
                //print ( $sql );
 
-               $this -> db -> query($sql, __LINE__, __FILE__);
+               $this->db->query($sql, __LINE__, __FILE__);
 
-               if ($this -> db -> next_record());
+               if ($this->db->next_record());
                {
 
-                       $version['url']= $this -> db -> f('url');
-                       $version['size']= $this -> db -> f('size');
-                       $version['status']= $this -> db -> f('status');
-                       $version['creator_id']= $this -> db -> f('creator_id');
-                       $version['creation_date']= $this -> db -> 
f('creation_date');
-                       $version['minor']= $this -> db -> f('minor');
-                       $version['version_id']= $this -> db -> f('version_id');
-                       $version['element_id']= $this -> db -> f('element_id');
-                       $version['description']= $this -> db -> 
f('description');
-                       $version['file_extension']= $this -> db -> 
f('file_extension');
-                       $version['file_name']= $this -> db -> f('file_name');
-                       $version['stored_name']= $this -> db -> 
f('stored_name');
-                       $version['major']= $this -> db -> f('major');
-                       $version['mime_type']= $this -> 
get_mime_type($version['file_extension']);
-                       $version['file_full_path']= $this -> 
datadir.'/'.$version['stored_name'];
-                       $version['validation_date'] = $this -> db -> 
f('validation_date');
+                       $version['url']= $this->db->f('url');
+                       $version['size']= $this->db->f('size');
+                       $version['status']= $this->db->f('status');
+                       $version['creator_id']= $this->db->f('creator_id');
+                       $version['creation_date']= 
$this->db->f('creation_date');
+                       $version['minor']= $this->db->f('minor');
+                       $version['version_id']= $this->db->f('version_id');
+                       $version['element_id']= $this->db->f('element_id');
+                       $version['description']= $this->db->f('description');
+                       $version['file_extension']= 
$this->db->f('file_extension');
+                       $version['file_name']= $this->db->f('file_name');
+                       $version['stored_name']= $this->db->f('stored_name');
+                       $version['major']= $this->db->f('major');
+                       $version['mime_type']= 
$this->get_mime_type($version['file_extension']);
+                       $version['file_full_path']= 
$this->datadir.'/'.$version['stored_name'];
+                       $version['validation_date'] = 
$this->db->f('validation_date');
                }
 
-               $this -> db -> unlock();
+               $this->db->unlock();
 
                return $version;
 
@@ -523,44 +522,44 @@
 
        function get_current_version($element_id)
        {
-               //$this -> db -> Debug = true;
+               //$this->db->Debug = true;
                
-               $sql= "SELECT * FROM ".$this -> tables['versions']." ";
+               $sql= "SELECT * FROM ".$this->tables['versions']." ";
                $sql.= "WHERE element_id=".$element_id." ";
                $sql.= "AND status='current' ";
                $sql.= "ORDER BY version_id DESC LIMIT 1";
 
                //print ("<pre>");
-               //print_r($this -> db -> metadata( $this ->tables['versions'] 
));
+               //print_r($this->db->metadata( $this->tables['versions'] ));
                //print ("</pre>");
                
                
-               $this -> db -> query($sql, __LINE__, __FILE__);
+               $this->db->query($sql, __LINE__, __FILE__);
 
-               if ($this -> db -> next_record());
+               if ($this->db->next_record());
                {
                        
-                       $version['validation_date'] = $this -> db -> 
f('validation_date');
-                       $version['url']= $this -> db -> f('url');
-                       $version['size']= $this -> db -> f('size');
-                       $version['status']= $this -> db -> f('status');
-                       $version['creator_id']= $this -> db -> f('creator_id');
-                       $version['creation_date']= $this -> db -> 
f('creation_date');
-                       $version['minor']= $this -> db -> f('minor');
-                       $version['version_id']= $this -> db -> f('version_id');
-                       $version['element_id']= $this -> db -> f('element_id');
-                       $version['description']= $this -> db -> 
f('description');
-                       $version['file_extension']= $this -> db -> 
f('file_extension');
-                       $version['file_name']= $this -> db -> f('file_name');
-                       $version['stored_name']= $this -> db -> 
f('stored_name');
-                       $version['major']= $this -> db -> f('major');
-                       $version['mime_type']= $this -> 
get_mime_type($version['file_extension']);
-                       $version['file_full_path']= $this -> 
datadir.'/'.$version['stored_name'];
+                       $version['validation_date'] = 
$this->db->f('validation_date');
+                       $version['url']= $this->db->f('url');
+                       $version['size']= $this->db->f('size');
+                       $version['status']= $this->db->f('status');
+                       $version['creator_id']= $this->db->f('creator_id');
+                       $version['creation_date']= 
$this->db->f('creation_date');
+                       $version['minor']= $this->db->f('minor');
+                       $version['version_id']= $this->db->f('version_id');
+                       $version['element_id']= $this->db->f('element_id');
+                       $version['description']= $this->db->f('description');
+                       $version['file_extension']= 
$this->db->f('file_extension');
+                       $version['file_name']= $this->db->f('file_name');
+                       $version['stored_name']= $this->db->f('stored_name');
+                       $version['major']= $this->db->f('major');
+                       $version['mime_type']= 
$this->get_mime_type($version['file_extension']);
+                       $version['file_full_path']= 
$this->datadir.'/'.$version['stored_name'];
                }
 
-               $this -> db -> unlock();
+               $this->db->unlock();
                
-               //$this -> db -> Debug = false;
+               //$this->db->Debug = false;
                
                return $version;
 
@@ -568,17 +567,17 @@
 
        function get_parent_id($item_id)
        {
-               $sql= "SELECT parent_id FROM ".$this -> tables['elements']." ";
+               $sql= "SELECT parent_id FROM ".$this->tables['elements']." ";
                $sql.= "WHERE element_id=".$item_id."";
 
-               $this -> db -> query($sql, __LINE__, __FILE__);
+               $this->db->query($sql, __LINE__, __FILE__);
 
-               if ($this -> db -> next_record())
-                       $out= $this -> db -> f('parent_id');
+               if ($this->db->next_record())
+                       $out= $this->db->f('parent_id');
                else
                        $out= 0;
 
-               $this -> db -> unlock();
+               $this->db->unlock();
 
                return $out;
        }
@@ -590,7 +589,7 @@
 
                while ($current_id != 0)
                {
-                       $current_id= $this -> get_parent_id($current_id);
+                       $current_id= $this->get_parent_id($current_id);
                        $path[]= $current_id;
 
                }
@@ -616,17 +615,17 @@
                }
                else
                {
-                       $sql0="SELECT ".$this -> tables['elements'].".* ";
-                       $sql0.="FROM ".$this -> tables['elements'].", ".$this 
-> tables['acl']." ";
-                       $sql0.="WHERE ".$this -> 
tables['elements'].".element_id=".$this -> tables['acl'].".element_id ";
-                       $sql0.="AND ".$this -> 
tables['elements'].".element_id=".$element_id." ";
+                       $sql0="SELECT ".$this->tables['elements'].".* ";
+                       $sql0.="FROM ".$this->tables['elements'].", 
".$this->tables['acl']." ";
+                       $sql0.="WHERE 
".$this->tables['elements'].".element_id=".$this->tables['acl'].".element_id ";
+                       $sql0.="AND 
".$this->tables['elements'].".element_id=".$element_id." ";
                        $sql0.="AND (".$this->sqlaclread.") ";
                        
-                       $this -> db -> query($sql0, __LINE__, __FILE__);
+                       $this->db->query($sql0, __LINE__, __FILE__);
                        
-                       $result=($this -> db -> next_record() ||  $element_id== 
0);
+                       $result=($this->db->next_record() ||  $element_id== 0);
                        
-                       $this -> db -> unlock();
+                       $this->db->unlock();
                }
                        
                        return ($result );      
@@ -640,17 +639,17 @@
                }
                else
                {
-                       $sql0="SELECT ".$this -> tables['elements'].".* ";
-                       $sql0.="FROM ".$this -> tables['elements'].", ".$this 
-> tables['acl']." ";
-                       $sql0.="WHERE ".$this -> 
tables['elements'].".element_id=".$this -> tables['acl'].".element_id ";
-                       $sql0.="AND ".$this -> 
tables['elements'].".element_id=".$element_id." ";
+                       $sql0="SELECT ".$this->tables['elements'].".* ";
+                       $sql0.="FROM ".$this->tables['elements'].", 
".$this->tables['acl']." ";
+                       $sql0.="WHERE 
".$this->tables['elements'].".element_id=".$this->tables['acl'].".element_id ";
+                       $sql0.="AND 
".$this->tables['elements'].".element_id=".$element_id." ";
                        $sql0.="AND (".$this->sqlaclwrite.") ";
                        
-                       $this -> db -> query($sql0, __LINE__, __FILE__);
+                       $this->db->query($sql0, __LINE__, __FILE__);
                        
-                       $result=($this -> db -> next_record());
+                       $result=($this->db->next_record());
                        
-                       $this -> db -> unlock();
+                       $this->db->unlock();
                }
                
                return ($result );      
@@ -664,17 +663,17 @@
                }
                else
                {
-                       $sql0="SELECT ".$this -> tables['elements'].".* ";
-                       $sql0.="FROM ".$this -> tables['elements'].", ".$this 
-> tables['acl']." ";
-                       $sql0.="WHERE ".$this -> 
tables['elements'].".element_id=".$this -> tables['acl'].".element_id ";
-                       $sql0.="AND ".$this -> 
tables['elements'].".element_id=".$element_id." ";
+                       $sql0="SELECT ".$this->tables['elements'].".* ";
+                       $sql0.="FROM ".$this->tables['elements'].", 
".$this->tables['acl']." ";
+                       $sql0.="WHERE 
".$this->tables['elements'].".element_id=".$this->tables['acl'].".element_id ";
+                       $sql0.="AND 
".$this->tables['elements'].".element_id=".$element_id." ";
                        $sql0.="AND (".$this->sqlaclchangeacl.") ";
                        
-                       $this -> db -> query($sql0, __LINE__, __FILE__);
+                       $this->db->query($sql0, __LINE__, __FILE__);
                        
-                       $result=($this -> db -> next_record());
+                       $result=($this->db->next_record());
                        
-                       $this -> db -> unlock();
+                       $this->db->unlock();
                }
                
                return ($result );      
@@ -700,57 +699,57 @@
 
                if ( $this->admin )
                {
-                       $sql= "SELECT * FROM ".$this -> tables['elements']." ";
+                       $sql= "SELECT * FROM ".$this->tables['elements']." ";
                        $sql.= "WHERE parent_id=".$parent_id." ";
                        $sql.= "AND element_id != parent_id ";
                        if ($type != "" )
                                $sql.= "AND type='".$type."'";
                        $sql.= "ORDER by type desc, element_id asc";
                        
-                       $this -> db -> query($sql, __LINE__, __FILE__);
+                       $this->db->query($sql, __LINE__, __FILE__);
                        
 
                }
-               elseif ( $this -> can_read($parent_id) )
+               elseif ( $this->can_read($parent_id) )
                {
-                       $sql= "SELECT DISTINCTROW ".$this -> 
tables['elements'].".* ";
-                       $sql.= "FROM ".$this -> tables['elements'].", ".$this 
-> tables['acl']." ";
-                       $sql.= "WHERE ".$this -> 
tables['elements'].".parent_id=".$parent_id." ";
-                       $sql.= "AND ".$this -> tables['elements'].".element_id 
!= ".$this -> tables['elements'].".parent_id ";
+                       $sql= "SELECT DISTINCTROW 
".$this->tables['elements'].".* ";
+                       $sql.= "FROM ".$this->tables['elements'].", 
".$this->tables['acl']." ";
+                       $sql.= "WHERE 
".$this->tables['elements'].".parent_id=".$parent_id." ";
+                       $sql.= "AND ".$this->tables['elements'].".element_id != 
".$this->tables['elements'].".parent_id ";
                        if ($type != "" )
-                               $sql.= "AND ".$this -> 
tables['elements'].".type='".$type."' ";
-                       $sql.="AND ".$this -> 
tables['elements'].".element_id=".$this -> tables['acl'].".element_id ";
+                               $sql.= "AND 
".$this->tables['elements'].".type='".$type."' ";
+                       $sql.="AND 
".$this->tables['elements'].".element_id=".$this->tables['acl'].".element_id ";
                        $sql.="AND (".$this->sqlaclread.") ";
                        
                        $sql.= "ORDER by type desc, element_id asc";
                        
-                       $this -> db -> query($sql, __LINE__, __FILE__);
+                       $this->db->query($sql, __LINE__, __FILE__);
                }
                //print ( $sql );
 
                
 
                $i= 0;
-               while ($this -> db -> next_record())
+               while ($this->db->next_record())
                {
 
-                       $elements[$i]['element_id']= $this -> db -> 
f('element_id');
-                       $elements[$i]['name']= $this -> db -> f('name');
-                       $elements[$i]['parent_id']= $this -> db -> 
f('parent_id');
-                       $elements[$i]['reference']= $this -> db -> 
f('reference');
-                       $elements[$i]['type']= $this -> db -> f('type');
-                       $elements[$i]['creator_id']= $this -> db -> 
f('creator_id');
-                       $elements[$i]['owner_id']= $this -> db -> f('owner_id');
-                       $elements[$i]['creation_date']= $this -> db -> 
f('creation_date');
-                       $elements[$i]['lock_status']= $this -> db -> 
f('lock_status');
-                       $elements[$i]['lock_user_id']= $this -> db -> 
f('lock_user_id');
-                       $elements[$i]['description']= $this -> db -> 
f('description');
-                       $elements[$i]['validity_period']= $this -> db -> 
f('validity_period');
+                       $elements[$i]['element_id']= $this->db->f('element_id');
+                       $elements[$i]['name']= $this->db->f('name');
+                       $elements[$i]['parent_id']= $this->db->f('parent_id');
+                       $elements[$i]['reference']= $this->db->f('reference');
+                       $elements[$i]['type']= $this->db->f('type');
+                       $elements[$i]['creator_id']= $this->db->f('creator_id');
+                       $elements[$i]['owner_id']= $this->db->f('owner_id');
+                       $elements[$i]['creation_date']= 
$this->db->f('creation_date');
+                       $elements[$i]['lock_status']= 
$this->db->f('lock_status');
+                       $elements[$i]['lock_user_id']= 
$this->db->f('lock_user_id');
+                       $elements[$i]['description']= 
$this->db->f('description');
+                       $elements[$i]['validity_period']= 
$this->db->f('validity_period');
 
                        $i ++;
                }
 
-               $this -> db -> unlock();
+               $this->db->unlock();
 
                return $elements;
 
@@ -759,7 +758,7 @@
        function list_versions($element_id)
        {
        
-               if ( $this->admin || $this-> can_write($element_id))
+               if ( $this->admin || $this->can_write($element_id))
                {
                        $sql1= "SELECT ALL ";
                        $sql1.= "version_id, element_id, description, 
creation_date, ";
@@ -767,39 +766,39 @@
                        $sql1.= "creator_id, validation_date, file_extension, ";
                        $sql1.= "file_name, stored_name ";
        
-                       $sql1.= "FROM ".$this -> tables['versions']." ";
+                       $sql1.= "FROM ".$this->tables['versions']." ";
                        $sql1.= "WHERE element_id=".$element_id." ";
                        $sql1.= "ORDER BY version_id ";
 
                        //print ($sql1);
 
-                       $this -> db2 -> query($sql1, __LINE__, __FILE__);
+                       $this->db2->query($sql1, __LINE__, __FILE__);
                        
                        $ii= 0;
 
-                       while ($this -> db2 -> next_record())
+                       while ($this->db2->next_record())
                        {
        
-                               $versions[$ii]['version_id']= $this -> db2 -> 
f('version_id');
-                               $versions[$ii]['element_id']= $this -> db2 -> 
f('element_id');
-                               $versions[$ii]['description']= $this -> db2 -> 
f('description');
-                               $versions[$ii]['status']= $this -> db2 -> 
f('status');
-                               $versions[$ii]['major']= $this -> db2 -> 
f('major');
-                               $versions[$ii]['minor']= $this -> db2 -> 
f('minor');
-                               $versions[$ii]['creator_id']= $this -> db2 -> 
f('creator_id');
-                               $versions[$ii]['creation_date']= $this -> db2 
-> f('creation_date');
-                               $versions[$ii]['size']= $this -> db2 -> 
f('size');
-                               $versions[$ii]['file_extension']= $this -> db2 
-> f('file_extension');
-                               $versions[$ii]['file_name']= $this -> db2 -> 
f('file_name');
-                               $versions[$ii]['stored_name']= $this -> db2 -> 
f('stored_name');
-                               $versions[$ii]['mime_type']= $this -> 
get_mime_type($versions[$ii]['file_extension']);
-                               $versions[$ii]['file_full_path']= $this -> 
datadir.'/'.$versions[$ii]['stored_name'];
-                               $versions[$ii]['validation_date'] = $this -> 
db2 -> f('validation_date');
+                               $versions[$ii]['version_id']= 
$this->db2->f('version_id');
+                               $versions[$ii]['element_id']= 
$this->db2->f('element_id');
+                               $versions[$ii]['description']= 
$this->db2->f('description');
+                               $versions[$ii]['status']= 
$this->db2->f('status');
+                               $versions[$ii]['major']= $this->db2->f('major');
+                               $versions[$ii]['minor']= $this->db2->f('minor');
+                               $versions[$ii]['creator_id']= 
$this->db2->f('creator_id');
+                               $versions[$ii]['creation_date']= 
$this->db2->f('creation_date');
+                               $versions[$ii]['size']= $this->db2->f('size');
+                               $versions[$ii]['file_extension']= 
$this->db2->f('file_extension');
+                               $versions[$ii]['file_name']= 
$this->db2->f('file_name');
+                               $versions[$ii]['stored_name']= 
$this->db2->f('stored_name');
+                               $versions[$ii]['mime_type']= 
$this->get_mime_type($versions[$ii]['file_extension']);
+                               $versions[$ii]['file_full_path']= 
$this->datadir.'/'.$versions[$ii]['stored_name'];
+                               $versions[$ii]['validation_date'] = 
$this->db2->f('validation_date');
        
                                $ii ++;
                        }
        
-                       $this -> db2 -> unlock();
+                       $this->db2->unlock();
                        }
                else
                {
@@ -814,12 +813,12 @@
 
                $sql_model= "SELECT mime_type FROM %s WHERE file_extension='%s' 
";
 
-               $sql= sprintf($sql_model, $this -> tables['mimetypes'], 
$file_extension);
+               $sql= sprintf($sql_model, $this->tables['mimetypes'], 
$file_extension);
 
-               $this -> db -> query($sql, __LINE__, __FILE__);
+               $this->db->query($sql, __LINE__, __FILE__);
 
-               if ($this -> db -> next_record())
-                       $out= $this -> db -> f('mime_type');
+               if ($this->db->next_record())
+                       $out= $this->db->f('mime_type');
                else
                        $out= "default";
 
@@ -831,11 +830,11 @@
        {
                $sql="select reference from ged_elements where reference like 
'".$BaseRef."%'";
                
-               $this -> db -> query($sql, __LINE__, __FILE__);
+               $this->db->query($sql, __LINE__, __FILE__);
                
-               while ($this -> db -> next_record())
+               while ($this->db->next_record())
                {
-                       $list[]=$this -> db -> f('reference');
+                       $list[]=$this->db->f('reference');
                }
                
                $i=1;
@@ -851,23 +850,23 @@
        {
                //TODO : limiter en fonction des droits
                $sql="select * from ged_elements where doc_type = 
'".$product_type."'";
-               $this -> db -> query($sql, __LINE__, __FILE__);
+               $this->db->query($sql, __LINE__, __FILE__);
 
                $ii= 0;
 
-               while ($this -> db -> next_record())
+               while ($this->db->next_record())
                {
 
-                       $elements[$ii]['element_id']= $this -> db -> 
f('element_id');
-                       $elements[$ii]['name']= $this -> db -> f('name');
-                       $elements[$ii]['reference']= $this -> db -> 
f('reference');
-                       $elements[$ii]['description']= $this -> db -> 
f('description');
-                       $elements[$ii]['validity_period']= $this -> db -> 
f('validity_period');
+                       $elements[$ii]['element_id']= 
$this->db->f('element_id');
+                       $elements[$ii]['name']= $this->db->f('name');
+                       $elements[$ii]['reference']= $this->db->f('reference');
+                       $elements[$ii]['description']= 
$this->db->f('description');
+                       $elements[$ii]['validity_period']= 
$this->db->f('validity_period');
                        // TODO : ADD 'validity_period' DONE
                        $ii ++;
                }
 
-               $this -> db -> unlock();
+               $this->db->unlock();
 
                return $elements;
        
@@ -891,26 +890,26 @@
                
                //TODO : limiter en fonction des droits
                $sql="select * from ged_acl where element_id = ".$element_id;
-               $this -> db -> query($sql, __LINE__, __FILE__);
+               $this->db->query($sql, __LINE__, __FILE__);
 
-               while ($this -> db -> next_record())
+               while ($this->db->next_record())
                {
-                       $account_id=$this -> db -> f('account_id');
+                       $account_id=$this->db->f('account_id');
                        
                        //print ( "acct: $account_id " );
                        
-                       $acl[$account_id]['acl_id']= $this -> db -> f('acl_id');
-                       $acl[$account_id]['element_id']= $this -> db -> 
f('element_id');
+                       $acl[$account_id]['acl_id']= $this->db->f('acl_id');
+                       $acl[$account_id]['element_id']= 
$this->db->f('element_id');
                        $acl[$account_id]['account_id']= $account_id;
-                       $acl[$account_id]['read']= $this -> db -> f('aclread');
-                       $acl[$account_id]['write']= $this -> db -> 
f('aclwrite');
-                       $acl[$account_id]['changeacl']= $this -> db -> 
f('aclchangeacl');
+                       $acl[$account_id]['read']= $this->db->f('aclread');
+                       $acl[$account_id]['write']= $this->db->f('aclwrite');
+                       $acl[$account_id]['changeacl']= 
$this->db->f('aclchangeacl');
 
                }
                
                //print ( "<br/>\n" );
                
-               $this -> db -> unlock();
+               $this->db->unlock();
                
                return ($acl);
        }
@@ -920,19 +919,19 @@
                //TODO : limiter en fonction des droits ?
                $sql="SELECT ged_acl.* FROM  ged_acl WHERE 
ged_acl.acl_id=".$acl_id;
                
-               $this -> db -> query($sql, __LINE__, __FILE__);
+               $this->db->query($sql, __LINE__, __FILE__);
 
-               if ($this -> db -> next_record())
+               if ($this->db->next_record())
                {
-                       $acl_info['acl_id']= $this -> db -> f('acl_id');
-                       $acl_info['element_id']= $this -> db -> f('element_id');
-                       $acl_info['account_id']= $this -> db -> f('account_id');
-                       $acl_info['read']= $this -> db -> f('aclread');
-                       $acl_info['write']= $this -> db -> f('aclwrite');
-                       $acl_info['changeacl']= $this -> db -> 
f('aclchangeacl');
+                       $acl_info['acl_id']= $this->db->f('acl_id');
+                       $acl_info['element_id']= $this->db->f('element_id');
+                       $acl_info['account_id']= $this->db->f('account_id');
+                       $acl_info['read']= $this->db->f('aclread');
+                       $acl_info['write']= $this->db->f('aclwrite');
+                       $acl_info['changeacl']= $this->db->f('aclchangeacl');
                }
 
-               $this -> db -> unlock();
+               $this->db->unlock();
 
                return $acl_info;
        } 
@@ -942,19 +941,19 @@
        {
                //TODO : limiter en fonction des droits
                $sql="SELECT phpgw_accounts.* FROM  phpgw_accounts LEFT JOIN 
ged_acl ON ( ged_acl.account_id = phpgw_accounts.account_id and 
ged_acl.element_id = ".$element_id.") WHERE ged_acl.element_id is null;";
-               $this -> db -> query($sql, __LINE__, __FILE__);
+               $this->db->query($sql, __LINE__, __FILE__);
 
                $ii= 0;
 
-               while ($this -> db -> next_record())
+               while ($this->db->next_record())
                {
 
-                       $acl[$ii]['account_id']= $this -> db -> f('account_id');
-                       $acl[$ii]['account_type']= $this -> db -> 
f('account_type');
+                       $acl[$ii]['account_id']= $this->db->f('account_id');
+                       $acl[$ii]['account_type']= $this->db->f('account_type');
                        $ii ++;
                }
 
-               $this -> db -> unlock();
+               $this->db->unlock();
 
                return $acl;
        }
@@ -1051,9 +1050,9 @@
                        //print ( $sql );
                        //print ( "<br/>");
                        
-                       $this -> db -> query($sql, __LINE__, __FILE__);
+                       $this->db->query($sql, __LINE__, __FILE__);
 
-                       $this -> db -> unlock();
+                       $this->db->unlock();
                }
                
                if ( $check_read_on_path && $aclread != 'null'  )
@@ -1129,7 +1128,7 @@
                                
                if ( $recursive )
                {
-                       $children_elements=$this -> list_elements($element_id);
+                       $children_elements=$this->list_elements($element_id);
                        
                        if ( is_array($children_elements))
                                foreach ( $children_elements as $child_element )
@@ -1142,11 +1141,11 @@
                                        
                                        if ( ! 
empty($child_element_acl_for_account) )
                                        {
-                                               $this -> 
set_acl($child_element_acl_for_account['acl_id'], $aclread, $aclwrite, 
$aclchangeacl, true, false);
+                                               
$this->set_acl($child_element_acl_for_account['acl_id'], $aclread, $aclwrite, 
$aclchangeacl, true, false);
                                        }
                                        else
                                        {
-                                               $this -> 
new_acl($child_element['element_id'], $account_id, $aclread, $aclwrite, 
$aclchangeacl, true, false);
+                                               
$this->new_acl($child_element['element_id'], $account_id, $aclread, $aclwrite, 
$aclchangeacl, true, false);
                                        }
                        }
                }
@@ -1157,8 +1156,8 @@
                {
                        $sql="UPDATE ged_acl set `aclread`=".$aclread.", 
`aclwrite`=".$aclwrite.", `aclchangeacl`=".$aclchangeacl." WHERE 
acl_id=".$acl_id;
                        
-                       $this -> db -> query($sql, __LINE__, __FILE__);
-                       $this -> db -> unlock();
+                       $this->db->query($sql, __LINE__, __FILE__);
+                       $this->db->unlock();
                }
                        
                //Control remontant
@@ -1174,16 +1173,16 @@
        {
                $sql="DELETE FROM ged_acl WHERE acl_id=".$acl_id;
                
-               $this -> db -> query($sql, __LINE__, __FILE__);
-               $this -> db -> unlock();
+               $this->db->query($sql, __LINE__, __FILE__);
+               $this->db->unlock();
        }
        
        function rm_all_acl ( $element_id )
        {
                $sql="DELETE FROM ged_acl WHERE element_id=".$element_id;
                
-               $this -> db -> query($sql, __LINE__, __FILE__);
-               $this -> db -> unlock();
+               $this->db->query($sql, __LINE__, __FILE__);
+               $this->db->unlock();
        }
 
 
@@ -1191,13 +1190,13 @@
        {
                $sql = "SELECT distinct * from ged_periods ORDER BY period";
 
-               $this -> db -> query($sql);
+               $this->db->query($sql);
 
                $i = 0;
-               while ($this -> db -> next_record())
+               while ($this->db->next_record())
                {
-                       $periods[$i]['period'] = $this -> db -> f('period');
-                       $periods[$i]['description'] = $this -> db -> 
f('description');
+                       $periods[$i]['period'] = $this->db->f('period');
+                       $periods[$i]['description'] = 
$this->db->f('description');
                        $i ++;
                }
                return $periods;
@@ -1205,12 +1204,12 @@
        
        function approve_file ( $element_id )
        {
-                       $current_version=$this -> 
get_current_version($element_id);
+                       
$current_version=$this->get_current_version($element_id);
                        
                        $sql="UPDATE ged_versions set 
`validation_date`=".time()." WHERE version_id=".$current_version['version_id'];
                        
-                       $this -> db -> query($sql, __LINE__, __FILE__);
-                       $this -> db -> unlock();
+                       $this->db->query($sql, __LINE__, __FILE__);
+                       $this->db->unlock();
 
        
        }
@@ -1223,12 +1222,12 @@
                
                $sql0="select max(li) as llt from phpgw_access_log where 
account_id=".$account_id." and sessionid != \"".$session_id."\"";
                
-               $this -> db -> query($sql0);
+               $this->db->query($sql0);
                
-               if ( $this -> db -> next_record() )
-                       $then= 0 + $this -> db -> f('llt');
+               if ( $this->db->next_record() )
+                       $then= 0 + $this->db->f('llt');
                
-               $this -> db -> unlock();
+               $this->db->unlock();
                
                // List new suff
                
@@ -1236,24 +1235,24 @@
                $sql.="WHERE ged_versions.status='current' AND ( 
ged_versions.validation_date >= $then ";
                $sql.="OR ( ( ged_elements.validity_period > 0 OR 
ged_elements.validity_period IS NOT NULL) AND ged_versions.creation_date >=  
$then ))";
                
-               $this -> db -> query($sql);
+               $this->db->query($sql);
 
                $i = 0;
-               while ($this -> db -> next_record())
+               while ($this->db->next_record())
                {
-                       $element_id=$this -> db -> f('element_id');
+                       $element_id=$this->db->f('element_id');
                        
-                       if ( $this -> can_read($element_id) )
+                       if ( $this->can_read($element_id) )
                        {
                                $docs[$i]['element_id']=$element_id;
-                               $docs[$i]['name']= $this -> db -> f('name');
-                               $docs[$i]['reference']= $this -> db -> 
f('reference');
-                               $docs[$i]['description']= $this -> db -> 
f('description');
+                               $docs[$i]['name']= $this->db->f('name');
+                               $docs[$i]['reference']= 
$this->db->f('reference');
+                               $docs[$i]['description']= 
$this->db->f('description');
                                $i ++;
                        }
                }
                        
-               $this -> db -> unlock();
+               $this->db->unlock();
 
                return ($docs);
        }
@@ -1270,27 +1269,27 @@
                $sql.="WHERE ged_versions.status='current' AND ( 
ged_elements.validity_period+ged_versions.validation_date < $then ";
                $sql.="OR ( ( ged_elements.validity_period > 0 OR 
ged_elements.validity_period IS NOT NULL) AND ged_versions.validation_date IS 
NULL ))";
                
-               $this -> db -> query($sql);
+               $this->db->query($sql);
 
                $i = 0;
-               while ($this -> db -> next_record())
+               while ($this->db->next_record())
                {
-                       $element_id=$this -> db -> f('element_id');
+                       $element_id=$this->db->f('element_id');
                        
-                       if ( $this -> can_read($element_id) )
+                       if ( $this->can_read($element_id) )
                        {
                                $docs[$i]['element_id']=$element_id;
-                               $docs[$i]['name']= $this -> db -> f('name');
-                               $docs[$i]['reference']= $this -> db -> 
f('reference');
-                               $docs[$i]['description']= $this -> db -> 
f('description');
-                               $docs[$i]['validity_period']= $this -> db -> 
f('validity_period');
-                               $docs[$i]['validation_date']= $this -> db -> 
f('validation_date');
+                               $docs[$i]['name']= $this->db->f('name');
+                               $docs[$i]['reference']= 
$this->db->f('reference');
+                               $docs[$i]['description']= 
$this->db->f('description');
+                               $docs[$i]['validity_period']= 
$this->db->f('validity_period');
+                               $docs[$i]['validation_date']= 
$this->db->f('validation_date');
                                $docs[$i]['expiration_date']= 
$docs[$i]['validity_period']+$docs[$i]['validation_date'];
                                $i ++;
                        }
                }
                        
-               $this -> db -> unlock();
+               $this->db->unlock();
 
                return ($docs);
        

Index: inc/hook_admin.inc.php
===================================================================
RCS file: /sources/phpgroupware/ged/inc/hook_admin.inc.php,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -b -r1.1.1.1 -r1.2
--- inc/hook_admin.inc.php      30 Mar 2006 12:29:19 -0000      1.1.1.1
+++ inc/hook_admin.inc.php      17 Jun 2006 18:06:33 -0000      1.2
@@ -1,14 +1,15 @@
 <?php
-  /**************************************************************************\
-  * phpGroupWare - projects administration                                   *
-  * http://www.phpgroupware.org                                              *
-  * --------------------------------------------                             *
-  *  This program is free software; you can redistribute it and/or modify it *
-  *  under the terms of the GNU General Public License as published by the   *
-  *  Free Software Foundation; either version 2 of the License, or (at your  *
-  *  option) any later version.                                              *
-  \**************************************************************************/
-  /* $Id: hook_admin.inc.php,v 1.1.1.1 2006/03/30 12:29:19 skwashd Exp $ */
+       
/**************************************************************************
+       * phpGroupWare - ged
+       * http://www.phpgroupware.org
+       * Written by Pascal Vilarem <address@hidden>
+       *
+       * 
--------------------------------------------------------------------------
+       *  This program is free software; you can redistribute it and/or modify 
it
+       *  under the terms of the GNU General Public License as published by the
+       *  Free Software Foundation; either version 2 of the License, or (at 
your
+       *  option) any later version
+       
***************************************************************************/
 
   {
 // Only Modify the $file and $title variables.....




reply via email to

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