phpgroupware-cvs
[Top][All Lists]
Advanced

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

[Phpgroupware-cvs] CVS: infolog/inc class.bolink.inc.php, NONE, 1.20.2.1


From: Ralf Becker <address@hidden>
Subject: [Phpgroupware-cvs] CVS: infolog/inc class.bolink.inc.php, NONE, 1.20.2.1 class.solink.inc.php, NONE, 1.12.2.1 class.uilink.inc.php, NONE, 1.6.2.1 class.boinfolog.inc.php, 1.14.2.3.2.6, 1.14.2.3.2.7 class.sbox2.inc.php, 1.1.2.4, 1.1.2.4.2.1 class.soinfolog.inc.php, 1.10.2.1.2.3, 1.10.2.1.2.4 class.uiinfolog.inc.php, 1.30.2.12.2.3, 1.30.2.12.2.4 class.vfs.inc.php, 1.3.2.1, 1.3.2.1.2.1 hook_admin.inc.php, 1.4.4.1, 1.4.4.2 hook_home.inc.php, 1.3.2.2, 1.3.2.2.2.1 hook_settings.inc.php, 1.1.2.2, 1.1.2.3 class.html.inc.php, 1.9, NONE hook_addressbook_view.inc.php, 1.4, NONE hook_projects_view.inc.php, 1.1.2.1, NONE
Date: Mon, 11 Aug 2003 18:32:57 -0400

Update of /cvsroot/phpgroupware/infolog/inc
In directory subversions:/tmp/cvs-serv28071/inc

Modified Files:
      Tag: Version-0_9_16-branch
        class.boinfolog.inc.php class.sbox2.inc.php 
        class.soinfolog.inc.php class.uiinfolog.inc.php 
        class.vfs.inc.php hook_admin.inc.php hook_home.inc.php 
        hook_settings.inc.php 
Added Files:
      Tag: Version-0_9_16-branch
        class.bolink.inc.php class.solink.inc.php class.uilink.inc.php 
Removed Files:
      Tag: Version-0_9_16-branch
        class.html.inc.php hook_addressbook_view.inc.php 
        hook_projects_view.inc.php 
Log Message:
merged the HEAD version of InfoLog into the .16 branch
jengos InfoLog version is now in a branch called "jengo"


***** Error reading new file: [Errno 2] No such file or directory: 
'class.bolink.inc.php'
***** Error reading new file: [Errno 2] No such file or directory: 
'class.solink.inc.php'
***** Error reading new file: [Errno 2] No such file or directory: 
'class.uilink.inc.php'
Index: class.boinfolog.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/infolog/inc/class.boinfolog.inc.php,v
retrieving revision 1.14.2.3.2.6
retrieving revision 1.14.2.3.2.7
diff -C2 -r1.14.2.3.2.6 -r1.14.2.3.2.7
*** class.boinfolog.inc.php     30 Apr 2003 03:30:35 -0000      1.14.2.3.2.6
--- class.boinfolog.inc.php     11 Aug 2003 22:32:55 -0000      1.14.2.3.2.7
***************
*** 23,38 ****
                        'delete'         => True,
                        'check_access'   => True,
-                       'readProj'       => True,
-                       'readAddr'       => True,
                        'anzSubs'        => True,
!                       'readIdArray'    => True,
!                       'accountInfo'    => True,       // in class boinfolog 
(this class)
!                       'addr2name'      => True,
!                       'attach_file'    => True,
!                       'delete_attached'=> True,
!                       'info_attached'  => True,
!                       'list_attached'  => True,
!                       'read_attached'  => True,
!                       'attached_local' => True
                );
                var $enums;
--- 23,32 ----
                        'delete'         => True,
                        'check_access'   => True,
                        'anzSubs'        => True,
!                       'search'         => True,
!                       'get_rows'       => True,
!                       'link_title'     => True,
!                       'link_query'     => True,
!                       'link_id2from'   => True
                );
                var $enums;
***************
*** 40,90 ****
                var $vfs;
                var $vfs_basedir='/infolog';
!               var $valid_pathes   = array();
!               var $send_file_ips  = array();
!               var $xmlrpc_methods = array();
! 
!               function list_methods($_type='xmlrpc')
!               {
!                       /*
!                       **  This handles introspection or discovery by the 
logged in client,
!                       **  in which case the input might be an array.  The 
server always calls
!                       **  this function to fill the server dispatch map using 
a string.
!                       */
! 
!                       if (is_array($_type))
!                       {
!                               $_type = $_type['type'] ? $_type['type'] : 
$_type[0];
!                       }
! 
!                       switch($_type)
!                       {
!                               case 'xmlrpc':
!                                       $xml_functions = array(
!                                               'read' => array(
!                                                       'function'  => 'read',
!                                                       'signature' => 
array(array(xmlrpcStruct,xmlrpcStruct)),
!                                                       'docstring' => 
lang('Return the values of an item.')
!                                               ),
!                                               'list_id_numbers' => array(
!                                                       'function'  => 
'readIdArray',
!                                                       'signature' => 
array(array(xmlrpcStruct,xmlrpcStruct)),
!                                                       'docstring' => 
lang('Returns a list of info_id numbers.')
!                                               ),
!                                               'list_methods' => array(
!                                                       'function'  => 
'list_methods',
!                                                       'signature' => 
array(array(xmlrpcStruct,xmlrpcString)),
!                                                       'docstring' => 
lang('Read this list of methods.')
!                                               )
!                                       );
!                                       return $xml_functions;
!                                       break;
!                               case 'soap':
!                                       return $this->soap_functions;
!                                       break;
!                               default:
!                                       return array();
!                                       break;
!                       }
!               }
  
                function boinfolog( $info_id = 0)
--- 34,39 ----
                var $vfs;
                var $vfs_basedir='/infolog';
!               var $valid_pathes = array();
!               var $send_file_ips = array();
  
                function boinfolog( $info_id = 0)
***************
*** 94,102 ****
                                        'urgent' => 'urgent','high' => 
'high','normal' => 'normal',
                                        'low' => 'low' ),
!                               'status'   => array(
                                        'offer' => 'offer','ongoing' => 
'ongoing','call' => 'call',
                                        'will-call' => 'will-call','done' => 
'done',
                                        'billed' => 'billed' ),
!                               'confirm'   => array(
                                        'not' => 'not','accept' => 
'accept','finish' => 'finish',
                                        'both' => 'both' ),
--- 43,51 ----
                                        'urgent' => 'urgent','high' => 
'high','normal' => 'normal',
                                        'low' => 'low' ),
! /*                            'status'   => array(
                                        'offer' => 'offer','ongoing' => 
'ongoing','call' => 'call',
                                        'will-call' => 'will-call','done' => 
'done',
                                        'billed' => 'billed' ),
! */                            'confirm'   => array(
                                        'not' => 'not','accept' => 
'accept','finish' => 'finish',
                                        'both' => 'both' ),
***************
*** 104,108 ****
                                        'task' => 'task','phone' => 
'phone','note' => 'note'
                                /*      ,'confirm' => 'confirm','reject' => 
'reject','email' => 'email',
!                                       'fax' => 'fax' no implemented so far */ 
)
                        );
                        $this->status = array(
--- 53,57 ----
                                        'task' => 'task','phone' => 
'phone','note' => 'note'
                                /*      ,'confirm' => 'confirm','reject' => 
'reject','email' => 'email',
!                                       'fax' => 'fax' not implemented so far 
*/ )
                        );
                        $this->status = array(
***************
*** 110,115 ****
                                        'task' => 'ongoing', 'phone' => 'call', 
'note' => 'done'),
                                'task' => array(
!                                       'offer' => 'offer','ongoing' => 
'ongoing',
!                                       'done' => 'done', 'billed' => 'billed' 
),
                                'phone' => array(
                                        'call' => 'call','will-call' => 
'will-call',
--- 59,66 ----
                                        'task' => 'ongoing', 'phone' => 'call', 
'note' => 'done'),
                                'task' => array(
!                                       'offer' => 'offer','ongoing' => 
'ongoing','done' => 'done',
!                                       '0%' => '0%', '10%' => '10%', '20%' => 
'20%', '30%' => '30%', '40%' => '40%',
!                                       '50%' => '50%', '60%' => '60%', '70%' 
=> '70%', '80%' => '80%', '90%' => '90%',
!                                       'billed' => 'billed' ),
                                'phone' => array(
                                        'call' => 'call','will-call' => 
'will-call',
***************
*** 121,124 ****
--- 72,76 ----
                        $this->so = CreateObject('infolog.soinfolog');
                        $this->vfs = CreateObject('infolog.vfs');
+                       $this->link = CreateObject('infolog.bolink');
  
                        $this->config = CreateObject('phpgwapi.config');
***************
*** 132,245 ****
  
                        $this->read( $info_id);
- 
-                       $this->xmlrpc_methods[] = array(
-                               'name'        => 'readIdArray',
-                               'description' => 'Will return a list of info_id 
numbers'
-                       );
- 
-                       $this->xmlrpc_methods[] = array(
-                               'name'        => 'read',
-                               'description' => 'Returns the values of the id 
number passed'
-                       );
- 
-                       $this->xmlrpc_methods[] = array(
-                               'name'        => 'delete',
-                               'description' => 'Delete a record'
-                       );
-                       $this->xmlrpc_methods[] = array(
-                               'name'        => 'write',
-                               'description' => 'Create or update a record'
-                       );
-                       $this->xmlrpc_methods[] = array(
-                               'name'        => 'check_access',
-                               'description' => 'Check access rights for a 
record'
-                       );
-                       $this->xmlrpc_methods[] = array(
-                               'name'        => 'read_categories',
-                               'description' => 'Return a list of categories'
-                       );
-               }
- 
-               function read_categories()
-               {
-                       $cats   = createobject('phpgwapi.categories');
-                       $cats->app_name = 'infolog';
-                       $return = 
$cats->return_sorted_array(0,False,'','','',True);
- 
-                       return $return;
-               }
- 
-               function accountInfo($id,$account_data=0)
-               {
-                       if (!$id) return '&nbsp;';
- 
-                       if (!is_array($account_data))
-                       {
-                               if (!isset($this->account_data[$id]))           
// do some cacheing
-                               {
-                                       
$GLOBALS['phpgw']->accounts->accounts($id);
-                                       
$GLOBALS['phpgw']->accounts->read_repository();
-                                       $this->account_data[$id] = 
$GLOBALS['phpgw']->accounts->data;
-                               }
-                               $account_data = $this->account_data[$id];
-                       }
-                       if 
($GLOBALS['phpgw_info']['user']['preferences']['infolog']['longNames'])
-                       {
-                               return $account_data['firstname'].' 
'.$account_data['lastname'];
-                       }
-                       return $account_data['account_lid'];
-               }
- 
-               function addr2name( $addr )
-               {
-                       $name = $addr['n_family'];
-                       if ($addr['n_given'])
-                       {
-                               $name .= ', '.$addr['n_given'];
-                       }
-                       else
-                       {
-                               if ($addr['n_prefix'])
-                               {
-                                       $name .= ', '.$addr['n_prefix'];
-                               }
-                       }
-                       if ($addr['org_name'])
-                       {
-                               $name = $addr['org_name'].': '.$name;
-                       }
-                       return $GLOBALS['phpgw']->strip_html($name);
-               }
- 
-               function readProj($proj_id)
-               {
-                       if ($proj_id)
-                       {
-                               if (!is_object($this->projects))
-                               {
-                                       $this->projects = 
createobject('projects.boprojects');
-                               }
-                               if (is_object($this->projects) && ($proj  = 
$this->projects->read_single_project( $proj_id)))
-                               {
-                                       return $proj;
-                               }
-                       }
-                       return False;
-               }
- 
-               function readAddr($addr_id)
-               {
-                       if ($addr_id)
-                       {
-                               if (!is_object($this->contacts))
-                               {
-                                       $this->contacts = 
createobject('phpgwapi.contacts');
-                               }
-                               if (list( $addr ) = 
$this->contacts->read_single_entry( $addr_id ))
-                               {
-                                       return $addr;
-                               }
-                       }
-                       return False;
                }
  
--- 84,87 ----
***************
*** 249,254 ****
                function check_access( $info_id,$required_rights )
                {
- #echo 'info_id: ' . $info_id . ' required_rights: ' . $required_rights;
- 
                        return $this->so->check_access( 
$info_id,$required_rights );
                }
--- 91,94 ----
***************
*** 257,497 ****
                {
                        $this->so->init();
!               }      
  
!               function read($info_id)
                {
!                       if (is_array($info_id))
                        {
!                               $info_id = (int)$info_id['info_id'];
!                       }
! 
!                       if (! $this->so->read($info_id))
!                       {
!                               return array();
!                       }
                                
!                       if ($this->so->data['info_subject'] ==
!                                (substr($this->so->data['info_des'],0,60).' 
...'))
!                       {
!                               $this->so->data['info_subject'] = '';
                        }
!                       if ($this->so->data['info_addr_id'] && 
$this->so->data['info_from'] ==
!                                $this->addr2name( $this->readAddr( 
$this->so->data['info_addr_id'] )))
                        {
!                               $this->so->data['info_from'] = '';
                        }
!                       return $this->so->data;
!               }
! 
!               function delete($info_id)
!               {
!                       $this->delete_attached($info_id);
! 
!                       return $this->so->delete($info_id);
                }
  
!               function write($values)
                {
!                       if ($values['responsible'] && $values['status'] == 
'offer')
!                       {
!                               $values['status'] = 'ongoing';   // have to 
match if not finished
!                       }
!                       if (!$values['info_id'] && !$values['owner'])
!                       {
!                               $values['owner'] = $this->so->user;
!                       }
!                       $values['datecreated'] = time(); // is now 
MODIFICATION-date
  
!                       if (!$values['subject'])
!                       {
!                               $values['subject'] = 
substr($values['des'],0,60).' ...';
!                       }
!                       if ($values['addr_id'] && !$values['from'])
                        {
!                               $values['from'] = $this->addr2name( 
$this->readAddr( $values['addr_id'] ));
                        }
  
!                       return $this->so->write($values);
                }
  
!               function anzSubs( $info_id )
!               {
!                       return $this->so->anzSubs( $info_id );
!               }
! 
!       
! 
!               function readIdArray($p)
                {
!                       return 
$this->so->readIdArray($p['order'],$p['sort'],$p['filter'],$p['cat_id'],$p['query'],
!                               
$p['action'],$p['addr_id'],$p['proj_id'],$p['info_id'],$p['ordermethod'],$p['start'],$p['total']);
! //print_r($r);
! 
! //            function 
readIdArray($order,$sort,$filter,$cat_id,$query,$action,$addr_id,
! //                                                                    
$proj_id,$info_id,$ordermethod,&$start,&$total)
! //            {
! //                    return 
$this->so->readIdArray($order,$sort,$filter,$cat_id,$query,
! //                                                                            
                        $action,$addr_id,$proj_id,$info_id,
! //                                                                            
                        $ordermethod,$start,$total);
!               }
  
! 
!               function vfs_path($info_id,$file='')
!               {
!                       return $this->vfs_basedir . '/' . $info_id . ($file ? 
'/' . $file : '');
                }
  
!               /*
!               **      Put a file to the corrosponding place in the VFS and 
set the attributes
!               **      ACL check is done by the VFS
!               */
!               function 
attach_file($info_id,$filepos,$name,$size,$type,$comment='',$full_fname='',$ip='')
                {
!                       //echo "<p>attach_file: info_id='$info_id', 
filepos='$filepos', name='$name', size='$size', type='$type', 
comment='$comment', full_fname='$full_fname', ip='$ip'</p>\n";
! 
!                       // create the root for attached files in infolog, if it 
does not exists
!                       if 
(!($this->vfs->file_exists($this->vfs_basedir,array(RELATIVE_ROOT))))
                        {
!                               $this->vfs->override_acl = 1;
!                               
$this->vfs->mkdir($this->vfs_basedir,array(RELATIVE_ROOT));
!                               $this->vfs->override_acl = 0;
!                       }
! 
!                       $dir=$this->vfs_path($info_id);
!                       if 
(!($this->vfs->file_exists($dir,array(RELATIVE_ROOT))))
!                       {
!                               $this->vfs->override_acl = 1;
!                               $this->vfs->mkdir($dir,array(RELATIVE_ROOT));
!                               $this->vfs->override_acl = 0;
                        }
!                       $fname = $this->vfs_path($info_id,$name);
!                       $tfname = '';
!                       if ($full_fname)
                        {
!                               $full_fname = 
str_replace('\\\\','/',$full_fname);      // vfs uses only '/'
!                               @reset($this->link_pathes);
!                               while ((list($valid,$trans) = 
@each($this->link_pathes)) && !$tfname)
!                               {  // check case-insensitive for WIN etc.
!                                       $check = $valid[0] == '\\' || 
strstr(':',$valid) ? 'eregi' : 'ereg';
!                                       $valid2 = str_replace('\\','/',$valid);
!                                       //echo "<p>attach_file: 
ereg('".$this->send_file_ips[$valid]."', 
'$ip')=".ereg($this->send_file_ips[$valid],$ip)."</p>\n";
!                                       if 
($check('^('.$valid2.')(.*)$',$full_fname,$parts) &&
!                                           
ereg($this->send_file_ips[$valid],$ip) &&     // right IP
!                                           
$this->vfs->file_exists($trans.$parts[2],array(RELATIVE_NONE|VFS_REAL)))
!                                       {
!                                               $tfname = $trans.$parts[2];
!                                       }
!                                       //echo "<p>attach_file: 
full_fname='$full_fname', valid2='$valid2', trans='$trans', check=$check, 
tfname='$tfname', parts=(x,'${parts[1]}','${parts[2]}')</p>\n";
                                }
!                               if ($tfname && 
!$this->vfs->securitycheck($tfname))
                                {
!                                       return lang('Invalid filename').': 
'.$tfname;
                                }
                        }
!                       $this->vfs->override_acl = 1;
!                       if ($tfname)    // file is local
!                       {
!                               
$this->vfs->symlink($tfname,$fname,array(RELATIVE_NONE|VFS_REAL,RELATIVE_ROOT));
!                       }
!                       else
                        {
!                               
$this->vfs->cp($filepos,$fname,array(RELATIVE_NONE|VFS_REAL,RELATIVE_ROOT));
                        }
!                       $this->vfs->set_attributes ($fname, array 
(RELATIVE_ROOT),
!                               array ('mime_type' => $type,
!                                                'comment' => stripslashes 
($comment),
!                                                'app' => 'infolog'));
!                       $this->vfs->override_acl = 0;
!               }
  
!               function delete_attached($info_id,$fname = '')
!               {
!                       $file = $this->vfs_path($info_id,$fname);
! 
!                       if ($this->vfs->file_exists($file,array(RELATIVE_ROOT)))
!                       {
!                               $this->vfs->override_acl = 1;
!                               $this->vfs->delete($file,array(RELATIVE_ROOT));
!                               $this->vfs->override_acl = 0;
!                       }
!               }
! 
!               function info_attached($info_id,$filename)
!               {
!                       $this->vfs->override_acl = 1;
!                       $attachments = 
$this->vfs->ls($this->vfs_path($info_id,$filename),array(REALTIVE_NONE));
!                       $this->vfs->override_acl = 0;
! 
!                       if (!count($attachments) || !$attachments[0]['name'])
!                       {
!                               return False;
!                       }
!                       return $attachments[0];
                }
  
!               function list_attached($info_id)
                {
!                       $this->vfs->override_acl = 1;
!                       $attachments = 
$this->vfs->ls($this->vfs_path($info_id),array(REALTIVE_NONE));
!                       $this->vfs->override_acl = 0;
! 
!                       if (!count($attachments) || !$attachments[0]['name'])
!                       {
!                               return False;
!                       }
!                       while (list($keys,$fileinfo) = each($attachments))
!                       {
!                               $attached[$fileinfo['name']] = 
$fileinfo['comment'];
!                       }
!                       return $attached;
                }
  
!               function is_win_path($path)
                {
!                       return $path[0] == '\\' || strstr($path,':');
                }
  
!               function read_attached($info_id,$filename)
                {
!                       if (!$info_id || !$filename || 
!$this->check_access($info_id,PHPGW_ACL_READ))
                        {
!                               return False;
                        }
!                       $this->vfs->override_acl = 1;
!                       return 
$this->vfs->read($this->vfs_path($info_id,$filename),array(RELATIVE_ROOT));
                }
  
!               /*
!                * Checks if filename should be local availible and if so 
returns 'file:/path' for HTTP-redirect
!                * else return False
!                */
!               function attached_local($info_id,$filename,$ip,$win_user)
                {
!                       //echo "<p>attached_local(info_id='$info_id', 
filename='$filename', ip='$ip', win_user='$win_user', 
count(send_file_ips)=".count($this->send_file_ips).")</p>\n";
! 
!                       if (!$info_id || !$filename || 
!$this->check_access($info_id,PHPGW_ACL_READ) ||
!                           !count($this->send_file_ips))
                        {
!                               return False;
                        }
!                       $link = $this->vfs->readlink 
($this->vfs_path($info_id,$filename), array (RELATIVE_ROOT));
! 
!                       if ($link)
!                       {
!                               reset($this->link_pathes); $fname = '';
!                               while ((list($valid,$trans) = 
each($this->link_pathes)) && !$fname)
!                               {
!                                       if (!$this->is_win_path($valid) == 
!$win_user && // valid for this OS
!                                           
eregi('^'.$trans.'(.*)$',$link,$parts)  &&    // right path
!                                           
ereg($this->send_file_ips[$valid],$ip))      // right IP
!                                       {
!                                               $fname = $valid . $parts[1];
!                                               $fname = !$win_user ? 
str_replace('\\','/',$fname) : str_replace('/','\\',$fname);
!                                               return 'file:'.($win_user ? 
'//' : '' ).$fname;
!                                       }
!                                       // echo "<p>attached_local: link=$link, 
valid=$valid, trans='$trans', fname='$fname', 
parts=(x,'${parts[1]}','${parts[2]}')</p>\n";
!                               }
!                       }
!                       return False;
                }
        }
--- 97,240 ----
                {
                        $this->so->init();
!               }
  
!               function link_id2from(&$info,$not_app='',$not_id='')
                {
!                       //echo 
"<p>boinfolog::link_id2from(subject='$info[info_subject]', 
link_id='$info[info_link_id], from='$info[info_from]')";
!                       if ($info['info_link_id'] > 0 &&
!                                ($link = 
$this->link->get_link($info['info_link_id'])) !== False)
                        {
!                               $nr = $link['link_app1'] == 'infolog' && 
$link['link_id1'] == $info['info_id'] ? '2' : '1';
!                               $title = 
$this->link->title($link['link_app'.$nr],$link['link_id'.$nr]);
                                
!                               if (htmlentities($title) == $info['info_from'])
!                               {
!                                       $info['info_from'] = $title;    // 
correct old entries
!                               }
!                               if ($link['link_app'.$nr] == $not_app && 
$link['link_id'.$nr] == $not_id)
!                               {
!                                       if ($title == $info['info_from'])
!                                       {
!                                               $info['info_from'] = '';
!                                       }
!                                       return False;
!                               }
!                               $info['info_link_view'] = 
$this->link->view($link['link_app'.$nr],$link['link_id'.$nr]);
!                               $info['info_link_title'] = $title;
!                               
!                               //echo " title='$title'</p>\n";
!                               return $title;
                        }
!                       else
                        {
!                               $info['info_link_title'] = $info['info_from'];
                        }
!                       return False;
                }
  
!               function read($info_id)
                {
!                       $err = $this->so->read($info_id) === False;
!                       $data = &$this->so->data;
  
!                       if ($data['info_subject'] == 
(substr($data['info_des'],0,60).' ...'))
                        {
!                               $data['info_subject'] = '';
                        }
+                       $this->link_id2from($data);
  
!                       return $err ? False : $data;
                }
  
!               function delete($info_id)
                {
!                       $this->link->unlink(0,'infolog',$info_id);
  
!                       $this->so->delete($info_id);
                }
  
!               function write($values,$check_defaults=True)
                {
!                       while (list($key,$val) = each($values))
                        {
!                               if (substr($key,0,5) != 'info_')
!                               {
!                                       $values['info_'.$key] = $val;
!                                       unset($values[$key]);
!                               }
                        }
!                       if ($check_defaults)
                        {
!                               if (!$values['info_enddate'] && 
!                                       ($values['info_status'] == 'done' || 
$values['info_status'] == 'billed'))
!                               {
!                                       $values['info_enddate'] = time();       
// set enddate to today if status == done
                                }
!                               if ($values['info_responsible'] && 
$values['info_status'] == 'offer')
                                {
!                                       $values['info_status'] = 'ongoing';   
// have to match if not finished
!                               }
!                               if (!$values['info_id'] && 
!$values['info_owner'])
!                               {
!                                       $values['info_owner'] = $this->so->user;
!                               }
!                               if (!$values['info_subject'])
!                               {
!                                       $values['info_subject'] = 
substr($values['info_des'],0,60).' ...';
                                }
                        }
!                       if ($values['info_link_id'] && 
isset($values['info_from']) && empty($values['info_from']))
                        {
!                               $values['info_from'] = 
$this->link_id2from($values);
                        }
!                       $values['info_datemodified'] = time();
!                       $values['info_modifier'] = $this->so->user;
  
!                       return $this->so->write($values);
                }
  
!               function anzSubs( $info_id )
                {
!                       return $this->so->anzSubs( $info_id );
                }
  
!               function 
search($order,$sort,$filter,$cat_id,$query,$action,$action_id,
!                                                        
$ordermethod,&$start,&$total)
                {
!                       return 
$this->so->search($order,$sort,$filter,$cat_id,$query,
!                                                                               
         $action,$action_id,$ordermethod,$start,$total);
                }
  
!               /*!
!               @function link_title
!               @syntax link_title(  $id  )
!               @author ralfbecker
!               @abstract get title for an infolog entry identified by $id
!               */
!               function link_title( $info )
                {
!                       if (!is_array($info))
                        {
!                               $info = $this->read( $info );
                        }
!                       return $info['info_subject'];
                }
  
!               /*!
!               @function link_query
!               @syntax link_query(  $pattern  )
!               @author ralfbecker
!               @abstract query infolog for entries matching $pattern
!               */
!               function link_query( $pattern )
                {
!                       $start = $total = 0;
!                       $ids = 
$this->search('','','','',$pattern,'','','',&$start,&$total);
!                       $content = array();
!                       while (is_array($ids) && list( $id,$info ) = each( $ids 
))
                        {
!                               $content[$id] = $this->link_title($id);
                        }
!                       return $content;
                }
        }

Index: class.sbox2.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/infolog/inc/class.sbox2.inc.php,v
retrieving revision 1.1.2.4
retrieving revision 1.1.2.4.2.1
diff -C2 -r1.1.2.4 -r1.1.2.4.2.1
*** class.sbox2.inc.php 1 Sep 2002 18:06:25 -0000       1.1.2.4
--- class.sbox2.inc.php 11 Aug 2003 22:32:55 -0000      1.1.2.4.2.1
***************
*** 7,11 ****
    * -------------------------------------------------------------------------*
    * This library is part of the phpGroupWare API                             *
!   * http://www.phpgroupware.org/api                                          
* 
    * ------------------------------------------------------------------------ *
    * This library is free software; you can redistribute it and/or modify it  *
--- 7,11 ----
    * -------------------------------------------------------------------------*
    * This library is part of the phpGroupWare API                             *
!   * http://www.phpgroupware.org/api                                          *
    * ------------------------------------------------------------------------ *
    * This library is free software; you can redistribute it and/or modify it  *
***************
*** 24,28 ****
    /* $Id$ */
  
!       include(PHPGW_API_INC . '/class.sbox.inc.php');
  
        class sbox2 extends sbox
--- 24,32 ----
    /* $Id$ */
  
!       if(!isset($GLOBALS['phpgw_info']['flags']['included_classes']['sbox']))
!       {
!               include(PHPGW_API_INC . '/class.sbox.inc.php');
!               $GLOBALS['phpgw_info']['flags']['included_classes']['sbox'] = 
True;
!       }
  
        class sbox2 extends sbox
***************
*** 51,55 ****
                {
                        // echo 
"<p>getId('$name','$lang_name','$prompt',$id_name,'$content') =";
!                       $ret['doSearchFkt'] = 
  '<script language="JavaScript">'."\n".
  " function doSearch(field,ask) {\n".
--- 55,59 ----
                {
                        // echo 
"<p>getId('$name','$lang_name','$prompt',$id_name,'$content') =";
!                       $ret['doSearchFkt'] =
  '<script language="JavaScript">'."\n".
  " function doSearch(field,ask) {\n".
***************
*** 64,68 ****
  '</script>';
  
!                       $ret[$name.'_title'] = is_array($content) && 
count($content) ? $lang_name : 
  '<script language="JavaScript">'."\n".
  " document.writeln('<input type=\"hidden\" name=\"query_$name\" 
value=\"\">');\n".
--- 68,72 ----
  '</script>';
  
!                       $ret[$name.'_title'] = is_array($content) && 
count($content) ? $lang_name :
  '<script language="JavaScript">'."\n".
  " document.writeln('<input type=\"hidden\" name=\"query_$name\" 
value=\"\">');\n".
***************
*** 74,80 ****
  
                        if (is_array($content))
!                       {       // result from search
                                if (!count($content))
!                               {       // search was unsuccsessful
                                        $ret[$name] = lang('no entries found, 
try again ...');
                                }
--- 78,86 ----
  
                        if (is_array($content))
!                       {
!                               // result from search
                                if (!count($content))
!                               {
!                                       // search was unsuccsessful
                                        $ret[$name] = lang('no entries found, 
try again ...');
                                }
***************
*** 112,116 ****
                        $ret[$name.'_nojs'] =
  "<noscript>\n".
! " <input name=\"query_$name\" value=\"\" size=10> &nbsp;      <input 
type=\"submit\" value=\"?\">\n".
  "</noscript>";
  
--- 118,122 ----
                        $ret[$name.'_nojs'] =
  "<noscript>\n".
! " <input name=\"query_$name\" value=\"\" size=10> &nbsp;<input 
type=\"submit\" value=\"?\">\n".
  "</noscript>";
  
***************
*** 119,122 ****
--- 125,205 ----
                }
  
+               function event2name( $event )
+               {
+                       if (!is_object($this->bocal))
+                       {
+                               $this->bocal = 
createobject('calendar.bocalendar');
+                       }
+                       if (!is_array($event) && (int) $event > 0)
+                       {
+                               $event = $this->bocal->read_entry($event);
+                       }
+                       if (!is_array($event))
+                       {
+                               return 'not an event !!!';
+                       }
+                       $name = 
$GLOBALS['phpgw']->common->show_date($this->bocal->maketime($event['start']) - 
$this->bocal->datetime->tz_offset);
+                       $name .= ' -- ' . 
$GLOBALS['phpgw']->common->show_date($this->bocal->maketime($event['end']) - 
$this->bocal->datetime->tz_offset);
+                       $name .= ': ' . $event['title'];
+ 
+                       return $GLOBALS['phpgw']->strip_html($name);
+               }
+ 
+               /*
+                * Function             Allows you to show and select an event 
from the calendar (works with and without javascript !!!)
+                * Parameters   $name           string with basename of all 
variables (not to conflict with the name other template or submitted vars !!!)
+                *                                      $id_name                
id of the address for edit or 0 if none selected so far
+                *                                      $query_name have to be 
called $query_XXX, the search pattern after the submit, has to be passed back 
to the function
+                *                                      $multipe        present 
a multiple selectable box instead of one selector-button
+                * On Submit    $id_XXX         contains the selected event (if 
!= 0)
+                *                                      $query_XXX      search 
pattern if the search button is pressed by the user, or '' if regular submit
+                * Returns              array with vars to set for the 
template, set with: $template->set_var( getEvent( ... )); (see getId( ))
+                *
+                * Note                 As query's for an event are submitted, 
you have to check $query_XXX if it is a search or a regular submit 
(!$query_string)
+                */
+               function getEvent( 
$name,$id_name,$query_name,$title='',$multiple=False)
+               {
+                       // echo 
"<p>getEvent('$name',$id_name,'$query_name','$title')</p>";
+ 
+                       // fallback if calendar is not installed or not enabled 
for user
+                       if (!file_exists(PHPGW_SERVER_ROOT.'/calendar') || 
!$GLOBALS['phpgw_info']['user']['apps']['calendar']['enabled'])
+                       {
+                               return array(
+                                       $name => "<input type=\"hidden\" 
name=\"id_$name\" value=\"$id_name\">\n",
+                                       $name.'_no_js' => '',
+                                       $name.'_title' => ''
+                               );
+                       }
+                       if ($id_name || $query_name)
+                       {
+                               if (!is_object($this->bocal))
+                               {
+                                       $this->bocal = 
createobject('calendar.bocalendar');
+                               }
+                               if ($query_name)
+                               {
+                                       $event_ids = 
$this->bocal->search_keywords($query_name);
+                                       $content = array( );
+                                       while ($event_ids && list( $key,$id ) = 
each( $event_ids ))
+                                       {
+                                               $content[$id] = 
$this->event2name( $id );
+                                       }
+                               }
+                               else
+                               {
+                                       $event = $this->bocal->read_entry( 
$id_name );
+                                       if ($event && is_array($event))
+                                       {
+                                               $content = $this->event2name( 
$event );
+                                       }
+                               }
+                       }
+                       if (!$title)
+                       {
+                               $title = lang('Calendar');
+                       }
+                       return $this->getId($name,$title,lang('Pattern for 
Search in Calendar'),$id_name,$content,lang('use Button to search for 
Calendarevent'),$multiple);
+               }
+ 
                function addr2name( $addr )
                {
***************
*** 152,156 ****
                 * Note                 As query's for an address are 
submitted, you have to check $query_XXX if it is a search or a regular submit 
(!$query_string)
                 */
-                
                function getAddress( 
$name,$id_name,$query_name,$title='',$multiple=False)
                {
--- 235,238 ----
***************
*** 269,272 ****
--- 351,364 ----
                {
                        // echo 
"<p>getProject('$name',$id_name,'$query_name','$title')</p>";
+ 
+                       // fallback if projects is not installed or not enabled 
for user
+                       if (!file_exists(PHPGW_SERVER_ROOT.'/projects') || 
!$GLOBALS['phpgw_info']['user']['apps']['projects']['enabled'])
+                       {
+                               return array(
+                                       $name => "<input type=\"hidden\" 
name=\"id_$name\" value=\"$id_name\">\n",
+                                       $name.'_no_js' => '',
+                                       $name.'_title' => ''
+                               );
+                       }
                        if ($id_name || $query_name)
                        {
***************
*** 305,335 ****
                 * Function:            Allows to show and select one item from 
an array
                 *      Parameters:             $name           string with 
name of the submitted var which holds the key of the selected item form array
!                *                                              $key            
key of already selected item from $arr
                 *                                              $arr            
array with items to select, eg. $arr = array ( 'y' => 'yes','n' => 'no','m' => 
'maybe');
!                *                                              $no_lang        
if !$no_lang send items through lang() 
!                * On submit            $XXX            is the key of the 
selected item (XXX is the content of $name) 
!                * Returns:                     string to set for a template or 
to echo into html page 
                 */
!               function getArrayItem($name, $key, $arr=0,$no_lang=0)
!               {       // should be in class common.sbox
                        if (!is_array($arr))
                        {
                                $arr = array('no','yes');
                        }
!                               
!                       $out = "<select name=\"$name\">\n";
  
                        while (list($k,$text) = each($arr))
                        {
                                $out .= '<option value="'.$k.'"';
!                               if($k == $key) $out .= " SELECTED";
!                               $out .= ">" . ($no_lang ? $text : lang($text)) 
. "</option>\n";
                        }
                        $out .= "</select>\n";
!                       
                        return $out;
                }
  
!               function accountInfo($id,$account_data=0,$longname=0)
                {
                        if (!$id)
--- 397,490 ----
                 * Function:            Allows to show and select one item from 
an array
                 *      Parameters:             $name           string with 
name of the submitted var which holds the key of the selected item form array
!                *                                              $key            
key(s) of already selected item(s) from $arr, eg. '1' or '1,2' or array with 
keys
                 *                                              $arr            
array with items to select, eg. $arr = array ( 'y' => 'yes','n' => 'no','m' => 
'maybe');
!                *                                              $no_lang        
if !$no_lang send items through lang()
!                *                                              $options        
additional options (e.g. 'multiple')
!                * On submit            $XXX            is the key of the 
selected item (XXX is the content of $name)
!                * Returns:                     string to set for a template or 
to echo into html page
                 */
!               function getArrayItem($name, $key, 
$arr=0,$no_lang=0,$options='',$multiple=0)
!               {
!                       // should be in class common.sbox
                        if (!is_array($arr))
                        {
                                $arr = array('no','yes');
                        }
!                       if (0+$multiple > 0)
!                       {
!                               $options .= ' MULTIPLE SIZE='.(0+$multiple);
!                               if (substr($name,-2) != '[]')
!                               {
!                                       $name .= '[]';
!                               }
!                       }
!                       $out = "<select name=\"$name\" $options>\n";
  
+                       if (is_array($key))
+                       {
+                               $key = implode(',',$key);
+                       }
                        while (list($k,$text) = each($arr))
                        {
                                $out .= '<option value="'.$k.'"';
!                               if($k == $key || strstr(",$key,",",$k,"))
!                               {
!                                       $out .= " SELECTED";
!                               }
!                               $out .= ">" . ($no_lang || $text == '' ? $text 
: lang($text)) . "</option>\n";
                        }
                        $out .= "</select>\n";
! 
                        return $out;
                }
  
!               function getPercentage($name, $selected=0,$options='')
!               {
!                       // reimplemented using getArrayItem
!                       for ($i=0; $i <= 100; $i+=10)
!                       {
!                               $arr[$i] = "$i%";
!                       }
!                       return 
$this->getArrayItem($name,$selected,$arr,1,$options);
!               }
! 
!               function getPriority($name, $selected=2,$options='')
!               {
!                       // reimplemented using getArrayItem
!                       $arr = array('','low','normal','high');
! 
!                       return 
$this->getArrayItem($name,$selected,$arr,0,$options);
!               }
! 
!               function getAccessList($name,$selected='private',$options='')
!               {
!                       // reimplemented using getArrayItem
!                       $arr = array(
!                               'private' => 'Private',
!                               'public' => 'Global public',
!                               'group' => 'Group public'
!                       );
! 
!                       if (strstr($selected,','))
!                       {
!                               $selected = "group";
!                       }
! 
!                       return 
$this->getArrayItem($name,$selected,$arr,0,$options);
!               }
! 
!               function getCountry($name='country',$selected='  ',$options='')
!               {
!                       // reimplemented using getArrayItem
!                       return 
$this->getArrayItem($name,$selected,$this->country_array,0,$options);
!               }
! 
!               function form_select($name='country',$selected='  ',$options='')
!               {
!                       // reimplemented using getArrayItem (stupid name!!!)
!                       return getCountry($name,$selected,$options);
!               }
! 
!               function 
accountInfo($id,$account_data=0,$longnames=0,$show_type=0)
                {
                        if (!$id)
***************
*** 345,354 ****
                                $account_data = $accounts->data;
                        }
!                       if ($longnames)
                        {
!                               return $account_data['firstname'].' 
'.$account_data['lastname'];
                        }
! 
!                       return $account_data['account_lid'];
                }
  
--- 500,512 ----
                                $account_data = $accounts->data;
                        }
!                       $info = $show_type ? 
'('.$account_data['account_type'].') ' : '';
! 
!                       switch ($longnames)
                        {
!                               case 2: $info .= 
'&lt;'.$account_data['account_lid'].'&gt; '; // fall-through
!                               case 1: $info .= 
$account_data['account_firstname'].' '.$account_data['account_lastname']; break;
!                               default: $info .= $account_data['account_lid']; 
break;
                        }
!                       return $info;
                }
  
***************
*** 357,381 ****
                 *      Parameters:             $name           string with 
name of the submitted var, which holds the account_id or 0 after submit
                 *                                              $id             
account_id of already selected account
!                *                                              
$id2text($id,$acct_data)        fkt that translates account_id $id in text to 
show
                 */
!                
!               function getAccount($name,$id,$longnames=0)
                {
                        $accounts = createobject('phpgwapi.accounts');
                        $accounts->db = $GLOBALS['phpgw']->db;
!                       $accs = $accounts->get_list('accounts'); 
  
!                       $aarr = Array(lang('not assigned'));
                        while ($a = current($accs))
                        {
!                               $aarr[$a['account_id']] = 
$this->accountInfo($a['account_id'],$a,$longnames);
                                next($accs);
                        }
!                       return $this->getArrayItem($name,$id,$aarr,1);
                }
  
!               function getDate($n_year,$n_month,$n_day,$date)
                {
!                       if (!$date)
                        {
                                $day = $month = $year = 0;
--- 515,545 ----
                 *      Parameters:             $name           string with 
name of the submitted var, which holds the account_id or 0 after submit
                 *                                              $id             
account_id of already selected account
!                *                                              $longnames 
0=account_lid 1=firstname lastname
                 */
!               function 
getAccount($name,$id,$longnames=0,$type='accounts',$multiple=0,$options='')
                {
                        $accounts = createobject('phpgwapi.accounts');
                        $accounts->db = $GLOBALS['phpgw']->db;
!                       $accs = $accounts->get_list($type);
  
!                       if ($multiple < 0)
!                       {
!                               $aarr[] = lang('not assigned');
!                       }
                        while ($a = current($accs))
                        {
!                               $aarr[$a['account_id']] = 
$this->accountInfo($a['account_id'],$a,$longnames,$type=='both');
                                next($accs);
                        }
!                       return 
$this->getArrayItem($name,$id,$aarr,1,$options,$multiple);
                }
  
!               function getDate($n_year,$n_month,$n_day,$date,$options='')
                {
!                       if (is_array($date))
!                       {
!                               list($year,$month,$day) = $date;
!                       }
!                       elseif (!$date)
                        {
                                $day = $month = $year = 0;
***************
*** 387,395 ****
                                $year = date('Y',$date);
                        }
!                       return 
$GLOBALS['phpgw']->common->dateformatorder($this->getYears($n_year,$year),
                                $this->getMonthText($n_month,$month),
!                               $this->getDays($n_day,$day));
                }
-       }
  
! ?>
--- 551,597 ----
                                $year = date('Y',$date);
                        }
!                       return $GLOBALS['phpgw']->common->dateformatorder(
!                               $this->getYears($n_year,$year),
                                $this->getMonthText($n_month,$month),
!                               $this->getDays($n_day,$day)
!                       );
                }
  
!               function 
getCategory($name,$cat_id='',$notall=False,$jscript=True,$multiple=0,$options='')
!               {
!                       if (!is_object($this->cat))
!                       {
!                               $this->cat = 
CreateObject('phpgwapi.categories');
!                       }
!                       if ($jscript)
!                       {
!                               $options .= ' onChange="this.form.submit();"';
!                       }
!                       if (0+$multiple > 0)
!                       {
!                               $options .= ' MULTIPLE SIZE='.(0+$multiple);
!                               if (substr($name,-2) != '[]')
!                               {
!                                       $name .= '[]';
!                               }
!                       }
!                       /* Setup all and none first */
!                       $cats_link  = "\n<SELECT NAME=\"$name\" $options>\n";
! 
!                       if (!$notall)
!                       {
!                               $cats_link .= '<option value=""';
!                               if ($cat_id=='all')
!                               {
!                                       $cats_link .= ' selected';
!                               }
!                               $cats_link .= '>'.lang("all")."</option>\n";
!                       }
! 
!                       /* Get global and app-specific category listings */
!                       $cats_link .= 
$this->cat->formatted_list('select','all',$cat_id,True);
!                       $cats_link .= '</select>'."\n";
! 
!                       return $cats_link;
!               }
!       }

Index: class.soinfolog.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/infolog/inc/class.soinfolog.inc.php,v
retrieving revision 1.10.2.1.2.3
retrieving revision 1.10.2.1.2.4
diff -C2 -r1.10.2.1.2.3 -r1.10.2.1.2.4
*** class.soinfolog.inc.php     2 Apr 2003 01:45:14 -0000       1.10.2.1.2.3
--- class.soinfolog.inc.php     11 Aug 2003 22:32:55 -0000      1.10.2.1.2.4
***************
*** 14,17 ****
--- 14,25 ----
        /* $Id$ */
  
+       /*!
+       @class soinfolog
+       @abstract storage object / db-layer for InfoLog
+       @author Ralf Becker
+       @copyright GPL - GNU General Public License
+       @note all values passed to this class are run either through intval or 
addslashes to prevent query-inserting
+               and for pgSql 7.3 compatibility
+       */
        class soinfolog                                 // DB-Layer
        {
***************
*** 21,27 ****
                var $filters = array( );
                var $user;
!               var $maybe_slashes = array (
!                       
'info_des'=>1,'info_subject'=>1,'info_from'=>1,'info_addr'=>1
!               );
                function soinfolog( $info_id = 0)
                {
--- 29,37 ----
                var $filters = array( );
                var $user;
! 
!               /*!
!               @function soinfolog
!               @abstract constructor
!               */
                function soinfolog( $info_id = 0)
                {
***************
*** 30,37 ****
                        $this->user   = 
$GLOBALS['phpgw_info']['user']['account_id'];
  
                        $this->read( $info_id );
                }
-                               
  
                function check_access( $info_id,$required_rights )
                {
--- 40,56 ----
                        $this->user   = 
$GLOBALS['phpgw_info']['user']['account_id'];
  
+                       $this->links = CreateObject('infolog.solink');
+ 
                        $this->read( $info_id );
                }
  
+               /*!
+               @function check_access
+               @abstract checks if user has the $required_rights to access 
$info_id (private access is handled too)
+               @syntax check_access( $info_id,$required_rights )
+               @param $info_id Id of InfoLog entry
+               @param $required_rights PHPGW_ACL_xyz anded together
+               @returns True if access is granted else False
+               */
                function check_access( $info_id,$required_rights )
                {
***************
*** 57,62 ****
                                                         
!!($this->grants[$owner] & $required_rights) &&
                                                         ($info['info_access'] 
== 'public' ||
!                                                        
!!($this->grants[$owner] & PHPGW_ACL_PRIVATE) || 
$this->data['info_responsible'] == $user);  
!                       // echo '<p>user: ' . $user . '<br>responsible: ' . 
$this->data['info_responsible']; 
                                                        
                        // echo "check_access(info_id=$info_id (owner=$owner, 
user=$user),required_rights=$required_rights): 
access".($access_ok?"Ok":"Denied");
--- 76,80 ----
                                                         
!!($this->grants[$owner] & $required_rights) &&
                                                         ($info['info_access'] 
== 'public' ||
!                                                        
!!($this->grants[$owner] & PHPGW_ACL_PRIVATE));   
                                                        
                        // echo "check_access(info_id=$info_id (owner=$owner, 
user=$user),required_rights=$required_rights): 
access".($access_ok?"Ok":"Denied");
***************
*** 65,83 ****
                }
  
!               // sql to be AND into a query to ensure ACL is respected (incl. 
_PRIVATE)
!               // filter: none|all    - list all entrys user have rights to see
!               //         private|own - list only his personal entrys
!               //                                                      (incl. 
those he is responsible for !!!)            
                function aclFilter($filter = 'none')
                {
!                       eregi('.*(own|privat|all|none).*',$filter,$vars);
                        $filter = $vars[1];
  
- 
                        if (isset($this->acl_filter[$filter]))
                        {
                                return $this->acl_filter[$filter];  // used 
cached filter if found
                        }
- 
                        if (is_array($this->grants))
                        {
--- 83,102 ----
                }
  
!               /*!
!               @function aclFilter
!               @abstract generate sql to be AND'ed into a query to ensure ACL 
is respected (incl. _PRIVATE)
!               @param $filter: none|all - list all entrys user have rights to 
see<br>
!                       private|own - list only his personal entrys (incl. 
those he is responsible for !!!) 
!               @returns the necesary sql
!               */           
                function aclFilter($filter = 'none')
                {
!                       ereg('.*(own|privat|all|none).*',$filter,$vars);
                        $filter = $vars[1];
  
                        if (isset($this->acl_filter[$filter]))
                        {
                                return $this->acl_filter[$filter];  // used 
cached filter if found
                        }
                        if (is_array($this->grants))
                        {
***************
*** 96,101 ****
                                if (count($private_user_list))
                                {               
!                                       $has_private_access = 'info_owner IN ('.
!                                                                               
                 implode(',',$private_user_list).')';
                                }            
                        }
--- 115,119 ----
                                if (count($private_user_list))
                                {               
!                                       $has_private_access = 'info_owner IN 
('.implode(',',$private_user_list).')';
                                }            
                        }
***************
*** 103,107 ****
  
                        // private: own entries plus the one user is 
responsible for 
!                       if ($filter == 'private' || $filter == 'own' || $filter 
== 'none')
                        {
                                $filtermethod .= " OR 
(info_responsible=$this->user OR info_status = 'offer')".
--- 121,125 ----
  
                        // private: own entries plus the one user is 
responsible for 
!                       if ($filter == 'private' || $filter == 'own')
                        {
                                $filtermethod .= " OR 
(info_responsible=$this->user OR info_status = 'offer')".
***************
*** 124,127 ****
--- 142,152 ----
                }      
        
+               /*!
+               @function statusFilter
+               @abstract generate sql to filter based on the status of the 
log-entry
+               @syntax statusFilter($filter = '')
+               @param $filter done = done or billed, open = not ()done or 
billed), offer = offer
+               @returns the necesary sql
+               */
                function statusFilter($filter = '')
                {
***************
*** 138,141 ****
--- 163,175 ----
                }
  
+               /*!
+               @function dateFilter
+               @abstract generate sql to filter based on the start- and 
enddate of the log-entry
+               @syntax dateFilter($filter = '')
+               @param $filter upcoming = startdate is in the future<br>
+                       today startdate < tomorrow<br>
+                       overdue enddate < tomorrow
+               @returns the necesary sql
+               */
                function dateFilter($filter = '')
                {
***************
*** 148,168 ****
                        switch ($filter)
                        {
!                               case 'upcoming':        return " AND 
info_startdate >= '$tomorrow'";
!                               case 'today':           return " AND 
info_startdate < '$tomorrow'";
!                               case 'overdue': return " AND (info_enddate != 0 
AND info_enddate < '$tomorrow')";
                        }
                        return '';
                }
  
                function init()
                {
!                       $this->data = array( 'info_owner' => $this->user,
!                                                                               
'info_pri'    => 'normal' );
                }      
!                               
                function read($info_id)         // did _not_ ensure ACL
                {
                        if ($info_id <= 0 || $info_id != $this->data['info_id'] 
&& 
!                                                                               
(!$this->db->query("select * FROM phpgw_infolog where info_id='$info_id'") ||   
!$this->db->next_record())) 
                        {
                                $this->init( );
--- 182,242 ----
                        switch ($filter)
                        {
!                               case 'upcoming':
!                                       return " AND info_startdate >= 
'$tomorrow'";
!                               case 'today':
!                                       return " AND info_startdate < 
'$tomorrow'";
!                               case 'overdue':
!                                       return " AND (info_enddate != 0 AND 
info_enddate < '$tomorrow')";
                        }
                        return '';
                }
  
+               /*!
+               @function init
+               @abstract initialise the internal $this->data to be empty
+               @discussion only non-empty values got initialised
+               */
                function init()
                {
!                       $this->data = array( 
!                               'info_owner' => $this->user,
!                               'info_pri'   => 'normal' 
!                       );
                }      
!               
!               /*!
!               @function db2data
!               @abstract copy data after a query into $data
!               @syntax db2data(&$data)
!               @param $data array to copy the data
!               @description copy only non-numeric keys
!               */
!               function db2data(&$data)
!               {
!                       $data = array();
!                       foreach ($this->db->Record as $key => $val)
!                       {
!                               if (!is_numeric($key))
!                               {
!                                       $data[$key] = $val;
!                               }
!                       }
!               }
! 
!               /*!
!               @function read
!               @abstract read InfoLog entry $info_id
!               @syntax read( $info_id )
!               @param $info_id id of log-entry
!               @description some cacheing is done to prevent multiple reads of 
the same entry
!               @returns the entry as array
!               */
                function read($info_id)         // did _not_ ensure ACL
                {
+                       $info_id = intval($info_id);
+ 
                        if ($info_id <= 0 || $info_id != $this->data['info_id'] 
&& 
!                               (!$this->db->query("select * FROM phpgw_infolog 
where info_id=$info_id",__LINE__,__FILE__) ||
!                                !$this->db->next_record())) 
                        {
                                $this->init( );
***************
*** 171,209 ****
                        if ($info_id != $this->data['info_id'])      // data 
yet read in
                        {
!                               $this->data = $this->db->Record;
!                               reset($this->maybe_slashes);
!                               while (list($key) = each($this->maybe_slashes))
!                               {
!                                       $this->data[$key] = 
stripslashes($this->data[$key]);
!                               }
                        }
!                       return $this->data;         
                }
                
                function delete($info_id)  // did _not_ ensure ACL
                {
!                       $this->db->query("delete FROM phpgw_infolog where 
info_id='$info_id' or info_id_parent='"
!                               . "$info_id' AND ((info_access='public' and 
info_owner != '$this->user')"
!                               . " or (info_owner='$this->user'))" 
,__LINE__,__FILE__);
  
                        if ($this->data['info_id'] == $info_id)
                        {
!                               $this->init( );
                        }
- 
-                       return ($this->db->affected_rows() ? True : False);
                }
  
                function change_delete_owner($owner,$new_owner=0)  // 
new_owner=0 means delete
                {
!                       if (!$new_owner)
                        {
!                               $sql = "delete FROM phpgw_infolog where 
info_owner='$owner'";
!                               $sql2 = "update phpgw_infolog set 
info_responsible='0' where info_responsible='$owner'";
                        }
                        else
                        {
!                               $sql = "update phpgw_infolog set 
info_owner='$new_owner' where info_owner='$owner'";
!                               $sql2 = "update phpgw_infolog set 
info_responsible='$new_owner' where info_responsible='$owner'";
                        }
                        $this->db->query($sql,__LINE__,__FILE__);
--- 245,296 ----
                        if ($info_id != $this->data['info_id'])      // data 
yet read in
                        {
!                               $this->db2data($this->data);
                        }
!                       return $this->data;
                }
                
+               /*!
+               @function delete
+               @abstract delete InfoLog entry $info_id AND the links to it
+               @syntax delete( $info_id )
+               @param $info_id id of log-entry
+               */
                function delete($info_id)  // did _not_ ensure ACL
                {
!                       if (($info_id = intval($info_id)) <= 0)
!                       {
!                               return;
!                       }
!                       $this->db->query("delete FROM phpgw_infolog where 
info_id=$info_id or info_id_parent=$info_id" .
!                               " AND ((info_access='public' and info_owner != 
$this->user) OR (info_owner=$this->user))",
!                               __LINE__,__FILE__);
!                               
!                       $this->links->unlink(0,'infolog',$info_id);
  
                        if ($this->data['info_id'] == $info_id)
                        {
!                               $this->init( );            
                        }
                }
  
+               /*!
+               @function change_delete_owner
+               @abstract changes or deletes entries with a spezified owner 
(for hook_delete_account)
+               @syntax change_delete_owner( $owner,$new_owner=0 )
+               @param $owner old owner
+               @param $new_owner new owner or 0 if entries should be deleted
+               */
                function change_delete_owner($owner,$new_owner=0)  // 
new_owner=0 means delete
                {
!                       $owner = intval($owner);
!                       if (!($new_owner = intval($new_owner)))
                        {
!                               $sql = "delete FROM phpgw_infolog where 
info_owner=$owner";
!                               $sql2 = "update phpgw_infolog set 
info_responsible=0 where info_responsible=$owner";
                        }
                        else
                        {
!                               $sql = "update phpgw_infolog set 
info_owner=$new_owner where info_owner=$owner";
!                               $sql2 = "update phpgw_infolog set 
info_responsible=$new_owner where info_responsible=$owner";
                        }
                        $this->db->query($sql,__LINE__,__FILE__);
***************
*** 211,241 ****
                }
  
                function write($values)  // did _not_ ensure ACL
                {
                        while (list($key,$val) = each($values))
                        {
                                if ($key != 'info_id')
                                {
!                                       $key = 'info_'.$key;
! 
                                        $this->data[$key] = $val;   // update 
internal data
  
!                                       if ($this->maybe_slashes[$key])
                                        {
!                                               $val = addslashes($val);
                                        }
!                                       $cols .= ($cols ? ',' : '').$key;
!                                       $vals .= ($vals ? ',' : '')."'$val'";
!                                       $query .= ($query ? ',' : 
'')."$key='$val'";
                                }
                        }
! 
!                       if ($values['info_id'])
                        {
!                               $query = "UPDATE phpgw_infolog SET $query where 
info_id='".$values['info_id']."'";
!                               $this->db->query($query,__LINE__,__FILE__);     
    
!                               $this->data['info_id'] = $values['info_id'];
! 
!                               return (int)$values['info_id'];
                        }
                        else
--- 298,342 ----
                }
  
+               /*!
+               @function write
+               @abstract writes the given $values to InfoLog, a new entry gets 
created if info_id is not set or 0
+               @syntax write( $values )
+               @param $values array with the data of the log-entry
+               @returns nothing direct, but the info_id gets
+               */
                function write($values)  // did _not_ ensure ACL
                {
+                       
include(PHPGW_SERVER_ROOT.'/infolog/setup/tables_current.inc.php');
+                       $db_cols = $phpgw_baseline['phpgw_infolog']['fd'];
+                       unset($phpgw_baseline);
+ 
                        while (list($key,$val) = each($values))
                        {
                                if ($key != 'info_id')
                                {
!                                       if (!isset($db_cols[$key]))
!                                       {
!                                               continue;       // not in 
infolog-table
!                                       }
                                        $this->data[$key] = $val;   // update 
internal data
  
!                                       switch($db_cols[$key]['type'])  // 
protection against query-insertion
                                        {
!                                               case 'int': case 'auto':
!                                                       $val = intval($val);
!                                                       break;
!                                               default:
!                                                       $val = 
"'".$this->db->db_addslashes($val)."'";
!                                                       break;
                                        }
!                                       $cols .= (strlen($cols) ? ',' : 
'').$key;
!                                       $vals .= (strlen($vals) ? ',' : 
'').$val;
!                                       $query .= (strlen($query) ? ',' : 
'')."$key=$val";
                                }
                        }
!                       if (($this->data['info_id'] = 
intval($values['info_id'])) > 0)
                        {
!                               $query = "UPDATE phpgw_infolog SET $query where 
info_id='".$this->data['info_id']."'";
!                               $this->db->query($query,__LINE__,__FILE__);
                        }
                        else
***************
*** 244,255 ****
                                $this->db->query($query,__LINE__,__FILE__);
                                
$this->data['info_id']=$this->db->get_last_insert_id('phpgw_infolog','info_id');
-                               return 
(int)$this->db->get_last_insert_id('phpgw_infolog','info_id');
                        }
                }
  
                function anzSubs( $info_id )
                {
!                       $this->db->query('select count(*) FROM phpgw_infolog 
where '.
!                                                                 
"info_id_parent=$info_id",__LINE__,__FILE__);
  
                        $this->db->next_record();
--- 345,369 ----
                                $this->db->query($query,__LINE__,__FILE__);
                                
$this->data['info_id']=$this->db->get_last_insert_id('phpgw_infolog','info_id');
                        }
+                       // echo "<p>soinfolog.write values= "; 
_debug_array($values);
+                       // echo "<p>soinfolog.write this->data= "; 
_debug_array($this->data);
+ 
+                       return $this->data['info_id'];
                }
  
+               /*!
+               @function anzSubs
+               @abstract count the sub-entries of $info_id
+               @syntax anzSubs( $info_id )
+               @param $info_id id of log-entry
+               @returns the number of sub-entries
+               */
                function anzSubs( $info_id )
                {
!                       if (($info_id = intval($info_id)) <= 0)
!                       {
!                               return 0;
!                       }
!                       $this->db->query("select count(*) FROM phpgw_infolog 
where info_id_parent=$info_id",__LINE__,__FILE__);
  
                        $this->db->next_record();
***************
*** 258,271 ****
                }
  
!               function 
readIdArray($order,$sort,$filter,$cat_id,$query,$action,$addr_id,
!                                                                       
$proj_id,$info_id,$ordermethod,&$start,&$total)
!               {
                        if ($order)
                        {
!                         $ordermethod = 'order by ' . $order . ' ' . $sort;
                        }
                        else
                        {
!                         $ordermethod = 'order by info_datecreated desc';   // 
newest first
                        }
                        $filtermethod = $this->aclFilter($filter);
--- 372,416 ----
                }
  
!               /*!
!               @function search
!               @abstract searches InfoLog for a certain pattern in $query
!               @syntax search( 
$order,$sort,$filter,$cat_id,$query,$action,$action_id,$ordermethod,&$start,&$total
 )
!               @param $order comma-separated list of columns to order the 
result (no 'ORDER BY'), eg. 'info_subject DESC'
!               @param $sort comma-separated list of columns to to sort by 
(incl. 'SORT BY') or ''
!               @param $filter string with combination of acl-, date- and 
status-filters, eg. 'own-open-today' or ''
!               @param $cat_id category to use or 0
!               @param $query pattern to search, search is done in info_from, 
info_subject and info_des
!               @param $action / $action_id if only entries linked to a 
specified app/entry show be used
!               @param &$start, &$total nextmatch-parameters will be used and 
set if query returns less entries
!               @returns array with id's as key of the matching log-entries
!               */
!               function 
search($order,$sort,$filter,$cat_id,$query,$action,$action_id,$ordermethod,&$start,&$total)
!               {
!                       //echo 
"<p>soinfolog.search(action='$action/$action_id')</p>\n";
!                       $action2app = array(
!                               'addr'        => 'addressbook',
!                               'proj'        => 'projects',
!                               'event'       => 'calendar'
!                       );
!                       if (isset($action2app[$action]))
!                       {
!                               $action = $action2app[$action];
!                       }
!                       if ($action != '')
!                       {
!                               $links = 
$this->links->get_links($action=='sp'?'infolog':$action,$action_id,'infolog');
!                       
!                               if (count($links))
!                               {
!                                       $link_extra = ($action == 'sp' ? 'OR' : 
'AND').' info_id IN ('.implode(',',$links).')';
!                               }
!                       }
                        if ($order)
                        {
!                         $ordermethod = 'ORDER BY ' . 
$this->db->db_addslashes($order) . ' ' . $this->db->db_addslashes($sort);
                        }
                        else
                        {
!                         $ordermethod = 'ORDER BY info_datemodified DESC';   
// newest first
                        }
                        $filtermethod = $this->aclFilter($filter);
***************
*** 274,294 ****
                        // echo "<p>filtermethod='$filtermethod'</p>";
  
!                       if ($cat_id)
                        {
!                         $filtermethod .= " AND info_cat='$cat_id' "; 
!                       }
!                       switch ($action)
!                       {
!                               case 'addr':    $filtermethod .= " AND 
info_addr_id=$addr_id ";
!                                                                       break;
!                               case 'proj':    $filtermethod .= " AND 
info_proj_id=$proj_id ";
!                                                                       break;
                        }
                        if ($query)                       // we search in 
_from, _subject and _des for $query
                        {
                                $sql_query = "AND (info_from like '%$query%' OR 
info_subject ".
!                                                                "like 
'%$query%' OR info_des like '%$query%') ";
                        }
!                       $pid = 'AND info_id_parent='.($action == 'sp' ? 
$info_id : 0);  
  
                        if 
(!$phpgw_info['user']['preferences']['infolog']['listNoSubs'] &&
--- 419,433 ----
                        // echo "<p>filtermethod='$filtermethod'</p>";
  
!                       if (intval($cat_id))
                        {
!                         $filtermethod .= ' AND info_cat='.intval($cat_id).' ';
                        }
                        if ($query)                       // we search in 
_from, _subject and _des for $query
                        {
+                               $query = $this->db->db_addslashes($query);
                                $sql_query = "AND (info_from like '%$query%' OR 
info_subject ".
!                                                                "LIKE 
'%$query%' OR info_des LIKE '%$query%') ";
                        }
!                       $pid = 'AND info_id_parent='.($action == 'sp' ? 
$action_id : 0);
  
                        if 
(!$phpgw_info['user']['preferences']['infolog']['listNoSubs'] &&
***************
*** 297,318 ****
                                $pid = '';
                        }
!                       $this->db->query("SELECT COUNT(*) FROM phpgw_infolog 
WHERE $filtermethod $pid $sql_query",__LINE__,__FILE__);
  
!                       $this->db->next_record();
!                       $total = $this->db->f(0);
  
!                       if (!$start || $start > $total)
!                       {
!                               $start = 0;
                        }
!                       $this->db->limit_query("SELECT info_id,info_id_parent 
FROM phpgw_infolog WHERE $filtermethod $pid $sql_query 
$ordermethod",$start,__LINE__,__FILE__);
! 
!                       $ids = array( );
!                       while ($this->db->next_record())
                        {
!                               $ids[] = array(
!                                       'id'     => $this->db->f('info_id'),
!                                       'parent' => 
$this->db->f('info_id_parent')
!                               );
                        }
                        return $ids;
--- 436,462 ----
                                $pid = '';
                        }
!                       $ids = array( );
!                       if ($action == '' || $action == 'sp' || count($links))
!                       {
!                               $this->db->query($sql="SELECT COUNT(*) FROM 
phpgw_infolog i WHERE ($filtermethod $pid $sql_query) 
$link_extra",__LINE__,__FILE__);
!                               
!                               $this->db->next_record();
!                               $total = $this->db->f(0);
  
!                               if (!$start || $start > $total)
!                               {
!                                       $start = 0;
!                               }
!                               $this->db->limit_query($sql="SELECT * FROM 
phpgw_infolog WHERE ($filtermethod $pid $sql_query) $link_extra 
$ordermethod",$start,__LINE__,__FILE__);
  
!                               while ($this->db->next_record())
!                               {
!                                       $this->db2data(&$info);
!                                       $ids[$info['info_id']] = $info;
!                               }
                        }
!                       else
                        {
!                               $start = $total = 0;
                        }
                        return $ids;

Index: class.uiinfolog.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/infolog/inc/class.uiinfolog.inc.php,v
retrieving revision 1.30.2.12.2.3
retrieving revision 1.30.2.12.2.4
diff -C2 -r1.30.2.12.2.3 -r1.30.2.12.2.4
*** class.uiinfolog.inc.php     1 Apr 2003 01:52:56 -0000       1.30.2.12.2.3
--- class.uiinfolog.inc.php     11 Aug 2003 22:32:55 -0000      1.30.2.12.2.4
***************
*** 14,32 ****
        /* $Id$ */
  
-       define(INFOLOG_ACL_EDIT_ASSIGNED,PHPGW_ACL_CUSTOM_1);
-       define(INFOLOG_ACL_DELETE_ASSIGNED,PHPGW_ACL_CUSTOM_2);
- 
        class uiinfolog         // UI - User Interface - HTML 
        {
                var $public_functions = array
                (
!                       'get_list'    => True,
[...1744 lines suppressed...]
+                               echo "<p>uiinfolog::hook_view("; 
print_r($args); echo "): app='$app', $view_id='$args[$view_id]', 
view='$view'</p>\n";
+                       }
+                       if (!isset($app) || !isset($args[$view_id]))
+                       {
+                               return False;
+                       }
+                       $save_app = 
$GLOBALS['phpgw_info']['flags']['currentapp']; 
+                       $GLOBALS['phpgw_info']['flags']['currentapp'] = 
'infolog'; 
+ 
+                       $GLOBALS['phpgw']->translation->add_app('infolog');
+ 
+                       $GLOBALS['phpgw_info']['etemplate']['hooked'] = True;
+                       $this->index(0,$app,$args[$view_id],array(
+                               'menuaction' => $view,
+                               $view_id     => $args[$view_id]
+                       ),True);
+                       $GLOBALS['phpgw_info']['flags']['currentapp'] = 
$save_app;
+                       unset($GLOBALS['phpgw_info']['etemplate']['hooked']);
+               } 
        }

Index: class.vfs.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/infolog/inc/class.vfs.inc.php,v
retrieving revision 1.3.2.1
retrieving revision 1.3.2.1.2.1
diff -C2 -r1.3.2.1 -r1.3.2.1.2.1
*** class.vfs.inc.php   8 Apr 2002 14:23:15 -0000       1.3.2.1
--- class.vfs.inc.php   11 Aug 2003 22:32:55 -0000      1.3.2.1.2.1
***************
*** 100,103 ****
--- 100,116 ----
                {
                        $this->basedir = 
$GLOBALS['phpgw_info']['server']['files_dir'];
+ 
+                       // test if the files-dir is inside the document-root, 
and refuse working if so
+                       //
+                       if ($this->in_docroot($this->basedir))
+                       {
+                               $GLOBALS['phpgw']->common->phpgw_header();
+                               if 
($GLOBALS['phpgw_info']['flags']['noheader']) 
+                               {
+                                       echo parse_navbar();
+                               }
+                               echo '<p align="center"><font 
color="red"><b>'.lang('Path to user and group files HAS TO BE OUTSIDE of the 
webservers document-root!!!')."</b></font></p>\n";
+                               $GLOBALS['phpgw']->common->phpgw_exit();
+                       }
                        $this->fakebase = "/home";
                        $this->working_id = 
$GLOBALS['phpgw_info']['user']['account_id'];
***************
*** 146,149 ****
--- 159,187 ----
  
                /*!
+               @function in_docroot
+               @abstract test if $path lies within the webservers document-root
+               */
+               function in_docroot($path)
+               {
+                       $docroots = 
array(PHPGW_SERVER_ROOT,$GLOBALS['HTTP_SERVER_VARS']['DOCUMENT_ROOT']);
+ 
+                       foreach ($docroots as $docroot)
+                       {
+                               $len = strlen($docroot);
+ 
+                               if ($docroot == substr($path,0,$len))
+                               {
+                                       $rest = substr($path,$len);
+ 
+                                       if (!strlen($rest) || $rest[0] == 
DIRECTORY_SEPARATOR)
+                                       {
+                                               return True;
+                                       }
+                               }
+                       }
+                       return False;
+               }
+ 
+               /*!
                @function set_relative
                @abstract Set path relativity
***************
*** 1301,1304 ****
--- 1339,1346 ----
                        }
  
+                       if ($this->debug)
+                       {
+                               echo 
"<p>vfs::$cmd('$from','$to',$relatives[0],$relatives[1])</p>\n";
+                       }
                        $account_id = 
$GLOBALS['phpgw_info']['user']['account_id'];
  
***************
*** 1335,1338 ****
--- 1377,1385 ----
                        if ($this->file_type ($f->fake_full_path, array 
($f->mask)) != 'Directory')
                        {
+                               if ($this->debug)
+                               {
+                                       echo 
"<p>$cmd('$f->read_full_path','$t->real_full_path')</p>\n";
+                               }
+ 
                                if (!$cmd ($f->real_full_path, 
$t->real_full_path))
                                {
***************
*** 1391,1394 ****
--- 1438,1445 ----
                        else    /* It's a directory */
                        {
+                               if ($this->debug)
+                               {
+                                       echo 
"<p>mkdir('$t->real_full_path')</p>\n";
+                               }
                                /* First, make the initial directory */
                                $this->mkdir ($to, array ($relatives[1]));
***************
*** 1449,1453 ****
  
                /*!
!               @function readlink
                @abstract read linkdata (target path) for symlink created by 
symlink
                @param $path vfs file/directory
--- 1500,1505 ----
  
                /*!
!               @function readlink  
!               @syntax readlink( $file,$relatives )
                @abstract read linkdata (target path) for symlink created by 
symlink
                @param $path vfs file/directory
***************
*** 1458,1462 ****
                function readlink($file,$relatives = '')
                {
!                       $pp = $this->path_parts ($file, array (RELATIVE_ROOT));
  
                        return @readlink($pp->real_full_path);
--- 1510,1518 ----
                function readlink($file,$relatives = '')
                {
!                       if (!is_array($relatives))
!                       {
!                               $relatives = array (RELATIVE_ROOT);
!                       }
!                       $pp = $this->path_parts ($file,$relatives);
  
                        return @readlink($pp->real_full_path);
***************
*** 1464,1467 ****
--- 1520,1541 ----
  
                /*!
+               @function fileinfo
+               @syntax readlink( $file_id )
+               @abstract read infos (row in the db) about a file
+               @param $file_id identifying the file
+               @result array with row from db or False
+               */
+               function fileinfo($file_id)
+               {
+                       $GLOBALS['phpgw']->db->query ($sql="SELECT * FROM 
phpgw_vfs WHERE file_id=$file_id", __LINE__, __FILE__);
+ 
+                       if (!$GLOBALS['phpgw']->db->next_record())
+                       {
+                               return False;
+                       }
+                       return array($file_id => $GLOBALS['phpgw']->db->Record);
+               }
+ 
+               /*!
                @function mv
                @abstract move file/directory
***************
*** 1998,2001 ****
--- 2072,2079 ----
                        $p = $this->path_parts ($file, array ($relatives[0]));
  
+                       if ($this->debug)
+                       {
+                               echo "<p>vfs::file_type('$file',$relatives[0]) 
p = "; _debug_array($p);
+                       }
                        if (!$this->acl_check ($p->fake_full_path, array 
($p->mask), PHPGW_ACL_READ, True))
                        {
***************
*** 2032,2036 ****
                @param $string file/directory to check existance of
                @param $relatives Relativity array
!               @result Boolean True/False
                */
                function file_exists ($string, $relatives = '')
--- 2110,2114 ----
                @param $string file/directory to check existance of
                @param $relatives Relativity array
!               @result file_id or False
                */
                function file_exists ($string, $relatives = '')
***************
*** 2051,2055 ****
  
                        $query = $GLOBALS['phpgw']->db->query ("SELECT name 
FROM phpgw_vfs WHERE directory='$p->fake_leading_dirs_clean' AND 
name='$p->fake_name_clean'" . $this->extra_sql (VFS_SQL_SELECT), __LINE__, 
__FILE__);
! 
                        if ($GLOBALS['phpgw']->db->next_record ())
                        {
--- 2129,2133 ----
  
                        $query = $GLOBALS['phpgw']->db->query ("SELECT name 
FROM phpgw_vfs WHERE directory='$p->fake_leading_dirs_clean' AND 
name='$p->fake_name_clean'" . $this->extra_sql (VFS_SQL_SELECT), __LINE__, 
__FILE__);
!                       
                        if ($GLOBALS['phpgw']->db->next_record ())
                        {

Index: hook_admin.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/infolog/inc/hook_admin.inc.php,v
retrieving revision 1.4.4.1
retrieving revision 1.4.4.2
diff -C2 -r1.4.4.1 -r1.4.4.2
*** hook_admin.inc.php  28 Mar 2003 02:13:30 -0000      1.4.4.1
--- hook_admin.inc.php  11 Aug 2003 22:32:55 -0000      1.4.4.2
***************
*** 14,24 ****
                $file = Array
                (
!                       'Site configuration' => 
$GLOBALS['phpgw']->link('/index.php',array('menuaction' => 
'infolog.uiinfolog.admin' )),
!                       'Global Categories'  => 
$GLOBALS['phpgw']->link('/index.php','menuaction=admin.uicategories.index&appname='
 . $appname . '&global_cats=True'),
!                       'CSV-Import' => 
$GLOBALS['phpgw']->link('/infolog/csv_import.php')
                );
  
  //Do not modify below this line
!               display_section($appname,lang($appname),$file); // please not 
2. appname is for .14 compatibilty
        }
  ?>
--- 14,31 ----
                $file = Array
                (
!                       'Site configuration'    => 
$GLOBALS['phpgw']->link('/index.php',array('menuaction' => 
'infolog.uiinfolog.admin' )),
!                       'Global Categories'             => 
$GLOBALS['phpgw']->link('/index.php','menuaction=admin.uicategories.index&appname='
 . $appname . '&global_cats=True'),
!                       'CSV-Import'                    => 
$GLOBALS['phpgw']->link('/infolog/csv_import.php')
                );
  
  //Do not modify below this line
!               if 
($GLOBALS['phpgw']->common->public_functions['display_mainscreen'])
!               {
!                       
$GLOBALS['phpgw']->common->display_mainscreen($appname,$file);
!               }
!               else
!               {
!                       display_section($appname,lang($appname),$file); // for 
.14/6
!               }
        }
  ?>

Index: hook_home.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/infolog/inc/hook_home.inc.php,v
retrieving revision 1.3.2.2
retrieving revision 1.3.2.2.2.1
diff -C2 -r1.3.2.2 -r1.3.2.2.2.1
*** hook_home.inc.php   21 Oct 2002 20:26:54 -0000      1.3.2.2
--- hook_home.inc.php   11 Aug 2003 22:32:55 -0000      1.3.2.2.2.1
***************
*** 1,59 ****
! <?php
!       
/**************************************************************************\
!       * phpGroupWare - Info Log 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$ */
! 
!       if 
($GLOBALS['phpgw_info']['user']['preferences']['infolog']['homeShowEvents'])
!       {
!               $save_app = $GLOBALS['phpgw_info']['flags']['currentapp'];
!               $GLOBALS['phpgw_info']['flags']['currentapp'] = 'infolog';
! 
!               $GLOBALS['phpgw']->translation->add_app('infolog');
! 
!               $portalbox = CreateObject('phpgwapi.listbox',
!                       Array(
!                               'title' => '<font 
color="#FFFFFF">'.lang('Infolog').'</font>',
!                               'primary'       => 
$GLOBALS['phpgw_info']['theme']['navbar_bg'],
!                               'secondary'     => 
$GLOBALS['phpgw_info']['theme']['navbar_bg'],
!                               'tertiary'      => 
$GLOBALS['phpgw_info']['theme']['navbar_bg'],
!                               'width' => '100%',
!                               'outerborderwidth'      => '0',
!                               'header_background_image'       => 
$GLOBALS['phpgw']->common->image('phpgwapi/templates/default','bg_filler')
!                       )
!               );
! 
!               $app_id = $GLOBALS['phpgw']->applications->name2id('infolog');
!               $GLOBALS['portal_order'][] = $app_id;
!               $var = Array(
!                       'up'    => Array('url'  => '/set_box.php', 'app'        
=> $app_id),
!                       'down'  => Array('url'  => '/set_box.php', 'app'        
=> $app_id),
!                       'close' => Array('url'  => '/set_box.php', 'app'        
=> $app_id),
!                       'question'      => Array('url'  => '/set_box.php', 
'app'        => $app_id),
!                       'edit'  => Array('url'  => '/set_box.php', 'app'        
=> $app_id)
!               );
! 
!               while(list($key,$value) = each($var))
!               {
!                       $portalbox->set_controls($key,$value);
!               }
! 
!               $portalbox->data = Array();
! 
!               $GLOBALS['HTTP_POST_VARS']['filter'] = $GLOBALS['filter'] = 
'own-open-today';
!               $infolog = CreateObject('infolog.uiinfolog');
! 
!               echo "\n".'<!-- BEGIN infolog info -->'."\n".
!                    $portalbox->draw($infolog->get_list(2))."\n".
!                         '<!-- END infolog info -->'."\n";
! 
!               unset($infolog);
!               $GLOBALS['phpgw_info']['flags']['currentapp'] = $save_app;
!       }
--- 1,66 ----
! <?php
!       
/**************************************************************************\
!       * phpGroupWare - Info Log 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$ */
! 
!       if 
($GLOBALS['phpgw_info']['user']['preferences']['infolog']['homeShowEvents'])
!       {
!               $save_app = $GLOBALS['phpgw_info']['flags']['currentapp'];
!               $GLOBALS['phpgw_info']['flags']['currentapp'] = 'infolog';
! 
!               $GLOBALS['phpgw']->translation->add_app('infolog');
! 
!               $app_id = $GLOBALS['phpgw']->applications->name2id('infolog');
!               $GLOBALS['portal_order'][] = $app_id;
! 
!               $infolog = CreateObject('infolog.uiinfolog');
!               $html = $infolog->index(array('nm' => array('filter' => 
'own-open-today')),'','',0,False,True);
!               $title = lang('InfoLog').' - 
'.lang($infolog->filters['own-open-today']);
!               $stable = $infolog->tmpl->stable;
!               unset($infolog);
! 
!               if ($stable)    // .14/6
!               {
!                       $portalbox = CreateObject('phpgwapi.listbox',array(
!                               'title'     => $title,
!                               'primary'   => 
$GLOBALS['phpgw_info']['theme']['navbar_bg'],
!                               'secondary' => 
$GLOBALS['phpgw_info']['theme']['navbar_bg'],
!                               'tertiary'  => 
$GLOBALS['phpgw_info']['theme']['navbar_bg'],
!                               'width'     => '100%',
!                               'outerborderwidth' => '0',
!                               'header_background_image' => 
$GLOBALS['phpgw']->common->image('phpgwapi/templates/default','bg_filler')
!                       ));
!                       foreach(array(
!                               'up'       => Array('url' => '/set_box.php', 
'app' => $app_id),
!                               'down'     => Array('url' => '/set_box.php', 
'app' => $app_id),
!                               'close'    => Array('url' => '/set_box.php', 
'app' => $app_id),
!                               'question' => Array('url' => '/set_box.php', 
'app' => $app_id),
!                               'edit'     => Array('url' => '/set_box.php', 
'app' => $app_id)
!                       ) as $key => $value)
!                       {
!                               $portalbox->set_controls($key,$value);
!                       }
!                       $portalbox->data = $data;
! 
!                       echo "\n<!-- BEGIN InfoLog info 
-->\n".$portalbox->draw($html)."\n<!-- END InfoLog info -->\n";
!                       unset($portalbox);
!               }
!               else    // HEAD / XSLT
!               {
!                       $GLOBALS['phpgw']->portalbox->set_params(array(
!                               'app_id' => $app_id,
!                               'title'  => $title
!                       ));
!                       $GLOBALS['phpgw']->portalbox->draw($html);
!               }
!               unset($html);
!               $GLOBALS['phpgw_info']['flags']['currentapp'] = $save_app;
!       }
! ?>

Index: hook_settings.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/infolog/inc/hook_settings.inc.php,v
retrieving revision 1.1.2.2
retrieving revision 1.1.2.3
diff -C2 -r1.1.2.2 -r1.1.2.3
*** hook_settings.inc.php       31 Mar 2003 18:49:41 -0000      1.1.2.2
--- hook_settings.inc.php       11 Aug 2003 22:32:55 -0000      1.1.2.3
***************
*** 16,26 ****
        
        $ui = CreateObject('infolog.uiinfolog');        // need some labels from
!       create_select_box('Default Filter for 
InfoLog','defaultFilter',$ui->filters,
!               'This is the filter InfoLog uses when you enter the 
application. Filters limit the entries to show in the actual view. There are 
filters to show only finished, still open or futures entries of yourself or all 
users.');
        unset($ui);
!       
        create_check_box('List no Subs/Childs','listNoSubs',
                'Should InfoLog show Subtasks, -calls or -notes in the normal 
view or not. You can always view the Subs via there parent.');
! 
        create_check_box('Show full usernames','longNames',
                'Should InfoLog use full names (surname and familyname) or just 
the loginnames.');
--- 16,40 ----
        
        $ui = CreateObject('infolog.uiinfolog');        // need some labels from
!       foreach($ui->filters as $key => $label)
!       {
!               $filters[$key] = lang($label);
!       }
        unset($ui);
!       create_select_box('Default Filter for InfoLog','defaultFilter',$filters,
!               'This is the filter InfoLog uses when you enter the 
application. Filters limit the entries to show in the actual view. There are 
filters to show only finished, still open or futures entries of yourself or all 
users.');
!       unset($filters);
! 
        create_check_box('List no Subs/Childs','listNoSubs',
                'Should InfoLog show Subtasks, -calls or -notes in the normal 
view or not. You can always view the Subs via there parent.');
! /*
        create_check_box('Show full usernames','longNames',
                'Should InfoLog use full names (surname and familyname) or just 
the loginnames.');
+ */
+       $show_links = array(
+               'all'    => lang('all links and attachments'),
+               'links'  => lang('only the links'),
+               'attach' => lang('only the attachments'),
+               'none'   => lang('no links or attachments')
+       );
+       create_select_box('Show in the InfoLog list','show_links',$show_links,
+               'Should InfoLog show the links to other applications and/or the 
file-attachments in the InfoLog list (normal view when u enter InfoLog).');

--- class.html.inc.php DELETED ---

--- hook_addressbook_view.inc.php DELETED ---

--- hook_projects_view.inc.php DELETED ---





reply via email to

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