soinfolog Class Reference

List of all members.

Detailed Description

storage object / db-layer for InfoLog

all values passed to this class are run either through intval or addslashes to prevent query-insertion and for pgSql 7.3 compatibility

Inpackage: infolog

Author:
Ralf Becker <RalfBecker@outdoor-training.de> (c) by Ralf Becker <RalfBecker@outdoor-training.de> http://opensource.org/licenses/gpl-license.php GPL - GNU General Public License


Public Member Functions

string aclFilter ($filter=False)
 generate sql to be AND'ed into a query to ensure ACL is respected (incl.
 change_delete_owner ($owner, $new_owner=0)
 changes or deletes entries with a spezified owner (for hook_delete_account)
boolean check_access (array-I-int $info, int $required_rights, $implicit_edit=false)
 checks if user has the $required_rights to access $info_id (private access is handled too)
string dateFilter ($filter= '')
 generate sql to filter based on the start- and enddate of the log-entry
 delete (int $info_id, bool $delete_children=True, int $new_parent)</p >\n"
 delete InfoLog entry $info_id AND the links to it
array get_status (array $ids)
 Read the status of the given infolog-ids.
 init ()
 initialise the internal $this->data to be empty
array I boolean read ($info_id)
 read InfoLog entry $info_id
 soinfolog ($info_id=0)
 constructor
string statusFilter ($filter= '')
 generate sql to filter based on the status of the log-entry

Public Attributes

 $data = array( )
 $db
 $extra_table = 'egw_infolog_extra'
 $grants
 $info_table = 'egw_infolog'
 $user


Constructor & Destructor Documentation

soinfolog::soinfolog info_id = 0  ) 
 

constructor


Member Function Documentation

string soinfolog::aclFilter filter = False  ) 
 

generate sql to be AND'ed into a query to ensure ACL is respected (incl.

_PRIVATE)

Parameters:
$filter,: none|all - list all entrys user have rights to see
private|own - list only his personal entrys (incl. those he is responsible for !!!), my = entries the user is responsible for
Returns:
the necesary sql

soinfolog::change_delete_owner owner,
new_owner = 0
 

changes or deletes entries with a spezified owner (for hook_delete_account)

Parameters:
$owner old owner
$new_owner new owner or 0 if entries should be deleted

boolean soinfolog::check_access array-I-int $  info,
int $  required_rights,
implicit_edit = false
 

checks if user has the $required_rights to access $info_id (private access is handled too)

Parameters:
$info data or info_id of InfoLog entry
$required_rights EGW_ACL_xyz anded together
$implicit_edit=false responsible has only implicit read and add rigths, unless this is set to true
Returns:
True if access is granted else False

string soinfolog::dateFilter filter = ''  ) 
 

generate sql to filter based on the start- and enddate of the log-entry

Parameters:
$filter upcoming = startdate is in the future
today startdate < tomorrow
overdue enddate < tomorrow
limitYYYY/MM/DD not older or open
Returns:
the necesary sql

soinfolog::delete int $  info_id,
bool $  delete_children = True,
int $  new_parent
 

delete InfoLog entry $info_id AND the links to it

Parameters:
$info_id id of log-entry
$delete_children delete the children, if not set there parent-id to $new_parent
$new_parent new parent-id to set for subs

array soinfolog::get_status array $  ids  ) 
 

Read the status of the given infolog-ids.

Parameters:
$ids array with id's
Returns:
with id => status pairs

soinfolog::init  ) 
 

initialise the internal $this->data to be empty

only non-empty values got initialised

array I boolean soinfolog::read info_id  ) 
 

read InfoLog entry $info_id

some cacheing is done to prevent multiple reads of the same entry

Parameters:
$info_id id of log-entry
Returns:
the entry as array or False on error (eg. entry not found)

string soinfolog::statusFilter filter = ''  ) 
 

generate sql to filter based on the status of the log-entry

Parameters:
$filter done = done or billed, open = not ()done or billed), offer = offer
Returns:
the necesary sql


Member Data Documentation

soinfolog::$data = array( )
 

soinfolog::$db
 

soinfolog::$extra_table = 'egw_infolog_extra'
 

soinfolog::$grants
 

soinfolog::$info_table = 'egw_infolog'
 

soinfolog::$user
 


The documentation for this class was generated from the following file:
Generated on Tue Apr 4 15:46:18 2006 for EgwIcal by  doxygen 1.4.6