dev.obliquid.com: obliquid
[ class tree: obliquid ] [ index: obliquid ] [ all elements ]

Class: doc

Source Location: Program_Root/classes/obliquid/doc.php

Class Overview


Doc class, helper functions for the doc module


Variables

Methods


Inherited Variables

Inherited Methods


Class Details

[line 31]
Doc class, helper functions for the doc module





[ Top ]


Class Variables

$_check =

[line 37]

Private - holds cat1.type.op so can check if permissions needs to be reloaded




Type:   mixed


[ Top ]

$_groups =

[line 40]

Private - holds the groups this user is a member of...




Type:   mixed


[ Top ]

$_permissions =

[line 34]

Private - holds the permissions between calls to avoid query each time




Type:   mixed


[ Top ]

$_prevcat1 =

[line 43]

Private - holds the cache information from the previous call to canDo




Type:   mixed


[ Top ]

$_prevchk =

[line 47]




Type:   mixed


[ Top ]

$_prevgrps =

[line 46]




Type:   mixed


[ Top ]

$_prevprs =

[line 45]




Type:   mixed


[ Top ]

$_prevtype =

[line 44]




Type:   mixed


[ Top ]



Class Methods


method canDo [line 256]

void canDo( mixed $info, [mixed $person = 0])





[ Top ]

method canView [line 57]

char canView( integer $cat1, integer $type, integer $item, boolean $approved, [integer $who_ins = 0])

Checks to see if the current user has access to a particular document.



Tags:

return:  "V" View All, "A" Approved, "N" Not allowed


Parameters:

integer   $cat1   category1 Id
integer   $type   document type Id
integer   $item   document Id
boolean   $approved   flag telling if the document is approved or not
integer   $who_ins   Id of the person who inserted the document

[ Top ]

method custField [line 428]

array &custField( )

Returns custom fields for the doc



Tags:

return:  index array with each item being an array with the following keys 0 = fieldname, 1 = label, 2 = intype, 3 = sql, attrib (html attributes)


[ Top ]

method dochas [line 95]

boolean dochas( integer $cat1, integer $type, $op $op, [integer $item = 0])

Checks to see if the current user has access to a particular document.



Tags:

return:  true=has permission, false=permission denied NOTE: $permissions will have the permission table for cat1/type/op unset $permissions prior to calling this routine if any of these change. If they have not changed, then the SQL call will be avoided the next time.


Parameters:

integer   $cat1   category1 Id
integer   $type   document type Id
integer   $item  
$op   $op   operation type

[ Top ]

method docsecinfo [line 178]

void docsecinfo( [$id_doc_op $id_doc_op = 0])

Returns an index array with two tables suitable for db_form->getSelect.

The first table contains the cat1's that the current user has some permission to The second table contains the type's that the current user has some permission to. NOTE: While the user may have permission to some operations on some documents in these, we do not check deep enough to verify access to every item in there.






Parameters:

$id_doc_op   $id_doc_op   --optional parameter to restrict to some operation

[ Top ]

method msgCanDo [line 464]

void msgCanDo( mixed $info, [mixed $person = 0])





[ Top ]


Documentation generated on Tue, 29 Mar 2005 09:03:50 -0800 by phpDocumentor 1.2.0rc2