Class: spunq
Source Location: /frontend/classes/fspunq.class.php
Class spunq
Method Summary
| void |
spunq() |
spunq::spunq() |
| void |
debug() |
spunq::debug() |
| void |
logit() |
spunq::logit() |
Methods
void spunq(
object
$frontend
)
|
|
spunq::spunq()
// purpose: constructor
Parameters:
void __construct(
object
$frontend
)
|
|
spunq::__construct()
// purpose: constructor php 5
Parameters:
boolean advSearch(
int
$class
)
|
|
spunq::advSearch()
// purpose: full search through members of a class
Parameters:
API Tags:
| Return: | FALSE or search-result as an array |
spunq::appRights()
// purpose: full search through class, member, member_perf to construct the app_rights-array
API Tags:
| Return: | rights for group as an array or FALSE |
void changeObjectPerm(
int
$object_id, int
$class_id
)
|
|
spunq::changeobjectPerm()
// purpose: change publish permission for object
Parameters:
|
int |
$class_id: |
// class id as stored in database |
|
int |
$object_id: |
// object id as stored in database |
API Tags:
| Return: | TRUE or pear-db error-object |
spunq::checkClass()
// purpose: check if the called class is existing and write it to get-array
boolean checkContentPermissions(
)
|
|
spunq::checkContentPermissions()
// purpose: check permissions for called links and user/c_groups
API Tags:
| Return: | TRUE or FALSE as permissions on contentlevel |
spunq::checkObject()
// purpose: check if the called object is existing and write to get array
spunq::checkPermission()
// purpose: check permissions on content level as defined
API Tags:
| Return: | modified getarray using permissions |
spunq::checkStruct()
// purpose: check if the called structure is existing and write to get-array
void createBookmark(
int
$class, int
$parent, int
$oid, string
$method
)
|
|
spunq::createBookmark()
// purpose: creates a bookmark entry
Parameters:
|
int |
$class: |
// class id |
|
int |
$parent: |
// parent id in structure hierarchies |
|
int |
$oid: |
// object id |
|
string |
$method: |
// method for moving up or down |
string createPreviewLink(
$preview
0
)
|
|
spunq::createPreviewLink
// purpose: creates a link to view content in frontend
Parameters:
void debug(
array
$data, [string
$title = NULL], [
$pre = 0]
)
|
|
spunq::debug()
// purpose: print data as debug statement using print_R()
Parameters:
|
array |
$data: |
// data for debugging |
|
string |
$title: |
// title for debug-writer |
|
|
$pre: |
|
void delAllRelations(
$relations, int
$class_ref1, int
$class_ref2, int
$object_ref1, int
$object_ref2
)
|
|
spunq::delAllRelations()
// purpose: deletes an object from table object
Parameters:
|
int |
$class_ref1: |
// class reference for class 1 |
|
int |
$class_ref2: |
// class reference for class 2 |
|
int |
$object_ref1: |
// object id for object 1 |
|
int |
$object_ref2: |
// object id for object 2 |
|
|
$relations: |
|
API Tags:
| Return: | pear db result object |
void deleteBookmark(
int
$oid
)
|
|
spunq::deleteBookmark()
// purpose: creates a bookmark entry
Parameters:
API Tags:
| Return: | pear-db error object or TRUE |
boolean deleteContentPermissions(
)
|
|
spunq::deleteContentPermissions()
// purpose: delete permissions for this object
API Tags:
| Return: | TRUE, object // true or pear-db error-object |
void delObject(
int
$oid
)
|
|
spunq::delObject()
// purpose: deletes an object from table object
Parameters:
|
int |
$oid: |
// object id as stored in database |
API Tags:
| Return: | pear-db result object |
void delObjectData(
array
$GET
)
|
|
spunq::delObjectData()
// purpose: deletes an object from data-class, object, struct and _relation
Parameters:
|
array |
$GET: |
// given GET array |
API Tags:
| Return: | TRUE or pear-db error object |
void delRelation(
int
$class_ref1, int
$class_ref2, int
$object_ref1, int
$object_ref2
)
|
|
spunq::delRelation()
// purpose: deletes an object from table object
Parameters:
|
int |
$class_ref1: |
// class reference for class 1 |
|
int |
$class_ref2: |
// class reference for class 2 |
|
int |
$object_ref1: |
// object id for object 1 |
|
int |
$object_ref2: |
// object id for object 2 |
API Tags:
| Return: | pear db result object |
spunq::delStruct()
// purpose: deletes an object from table struct
API Tags:
spunq::fastSearch()
// purpose: full search through objecttitle
API Tags:
| Return: | FALSE or search-result as an array |
boolean findOneRelation(
int
$class_ref1, int
$class_ref2, int
$object_ref1, int
$object_ref2
)
|
|
spunq::findOneRelation()
// purpose: finds a single relation return TRUE or FALSE
Parameters:
|
int |
$class_ref1: |
// class reference for class 1 |
|
int |
$class_ref2: |
// class reference for class 2 |
|
int |
$object_ref1: |
// object id for object 1 |
|
int |
$object_ref2: |
// object id for object 2 |
API Tags:
| Return: | TRUE on existing relation FALSE if relation does not exist |
void findRelation(
$class,
$object, int
$class_ref, int
$object_ref
)
|
|
spunq::findRelation()
// purpose: searches for all m:n relations of an object
Parameters:
|
int |
$class_ref: |
// class refernce 1 |
|
int |
$object_ref: |
// object reference 1 |
|
|
$class: |
|
|
|
$object: |
|
API Tags:
| Return: | all referenced objects for given parameters |
array getBreadCrums(
int
$class_id, int
$parent
)
|
|
spunq::getBreadCrums()
// purpose: return class name for id
Parameters:
|
int |
$class_id: |
// class id as stored in database |
|
int |
$parent: |
// parent for strcuture hierarchie |
API Tags:
| Return: | breadcrums as an array |
void getClassData(
int
$class_id
)
|
|
spunq::getClassName()
// purpose: return class name for id
Parameters:
|
int |
$class_id: |
// id of given class as stored in database |
API Tags:
| Return: | return data as pear-object |
int getClassIdForPermissions(
)
|
|
spunq::getClassIdForPermissions()
// purpose: check if the called class is existing
API Tags:
| Return: | // classid for root object |
void getClassMap(
int
$class_id, int
$id, int
$parent, int
$depth, string
$method
)
|
|
spunq::getClassMap()
// purpose: return hole tree-structure for class .. calls itself recursivly
Parameters:
|
int |
$class_id: |
|
|
int |
$id: |
|
|
int |
$parent: |
|
|
int |
$depth: |
|
|
string |
$method: |
|
void getclassStructure(
int
$class_id, int
$parent
)
|
|
spunq::getClassStructure()
// purpose: return class structure
Parameters:
|
int |
$class_id: |
// id of given class as stored in database |
|
int |
$parent: |
// given parent in structure hierarchie |
API Tags:
| Return: | return data as pear-object |
array getEditControls(
array
$rights, int
$objectid
)
|
|
spunq::getEditControls()
// purpose: returns all controls to edit an object
Parameters:
|
int |
$objectid: |
// object to edit |
|
array |
$rights: |
// system permissions for interface construction |
API Tags:
| Return: | members of class as array |
array getGroupPermissions(
int
$oid, int
$class, array
$groups
)
|
|
spunq::getContentPermissions()
// purpose: check if the called class is existing
Parameters:
|
int |
$oid: |
// object id as stored in database |
|
int |
$class: |
// class id as stored in database |
|
array |
$groups: |
// groups on content level |
API Tags:
| Return: | // group permissions |
spunq::getLastObjectId()
// purpose: returns the last objectid inserted in table object
API Tags:
void getObject(
int
$object_id
)
|
|
spunq::getObject()
// purpose: returns data for a single object via objectid, classid
Parameters:
API Tags:
array getObjectData(
int
$id, int
$version
)
|
|
spunq::getObjectData()
// purpose: returns all (object, class) data for a single object via objectid
Parameters:
|
int |
$id: |
// object data as stored in database |
|
int |
$version: |
// version of object |
API Tags:
| Return: | object data as array |
void getObjectDataVersion(
int
$id, int
$version
)
|
|
spunq::getObjectDataVersion()
// purpose: returns all (object, class) data for a single object via objectid
Parameters:
|
int |
$id: |
// object id as stored in database |
|
int |
$version: |
// version of object |
API Tags:
| Return: | object data for version != 0 |
array getParentObjectsForPermissions(
)
|
|
spunq::getParentObjectsForPermission()
// purpose: check which object provides the permissions in the hierarchies
API Tags:
| Return: | the objects which provides the node for permissions in the hierarchie |
void getRelatedObjects(
int
$class_ref1, int
$class_ref2,
$object_ref, int
$object_ref1
)
|
|
spunq::getRelatedObjects()
// purpose: searches for m:n relations for an object in other classes
Parameters:
|
int |
$class_ref1: |
// class reference for class 1 |
|
int |
$class_ref2: |
// class reference for class 2 |
|
int |
$object_ref1: |
// object id for object 1 |
|
|
$object_ref: |
|
API Tags:
| Return: | all objects for given parameters in a defined class (class_ref2) |
void getStructure(
int
$parent, int
$class
)
|
|
spunq::getStructure()
// purpose: returns data for a single structure via parent
Parameters:
API Tags:
void getStructureObjects(
int
$class_id,
$folder, int
$parent
)
|
|
spunq::getStructureObjects()
// purpose: return objects for structure
Parameters:
|
int |
$class_id: |
// id of given class as stored in database |
|
int |
$parent: |
// given parent in structure hierarchie |
|
|
$folder: |
|
API Tags:
| Return: | return data as pear-object |
void getUserPermissions(
$users
)
|
|
spunq::getContentPermissions()
// purpose: check if the called class is existing function is deprecated
Parameters:
array handleMacros(
$data
$item
)
|
|
spunq::handleMacros
// purpose: reads macros from configs and sets html-tags for further use in fckeditor
Parameters:
spunq::insertObject()
// purpose: insertes a new object in table object
API Tags:
| Return: | // pear-db result object |
(object) insertObjectData(
(int)
$class_id, (array)
$POST
)
|
|
spunq::insertObjectData()
purpose: saves a new object in object und class-table
Parameters:
|
(int) |
$class_id: |
|
|
(array) |
$POST: |
|
void insertPureObject(
int
$class_ref, int
$object_ref, string
$name, int
$user, int
$group, int
$perm, int
$sort
)
|
|
spunq::insertPureObject()
// purpose: inserts an object in table object by given parameters
Parameters:
|
int |
$class_ref: |
// class reference |
|
int |
$object_ref: |
// object reference |
|
string |
$name: |
// object name |
|
int |
$user: |
// userid |
|
int |
$group: |
// groupid |
|
int |
$perm: |
// permissions for object |
|
int |
$sort: |
// sort value for object |
API Tags:
| Return: | pear-db result object |
void insertRelation(
int
$class_ref1, int
$class_ref2, int
$object_ref1, int
$object_ref2, [int
$member_ref = 0], [int
$sort = 0]
)
|
|
spunq::insertRelation()
// purpose: deletes an object from table object
Parameters:
|
int |
$class_ref1: |
// class reference for class 1 |
|
int |
$class_ref2: |
// class reference for class 2 |
|
int |
$object_ref1: |
// object id for object 1 |
|
int |
$object_ref2: |
// object id for object 2 |
|
int |
$member_ref: |
// member reference |
|
int |
$sort: |
// sort value for relations |
API Tags:
| Return: | pear db result object |
spunq::listBackups()
// purpose: read Backups from filesystem
API Tags:
| Return: | all existing backup files |
void logit(
string
$action, int
$classid, int
$oid
)
|
|
spunq::logit()
// purpose: starts logging using logit.class.php
Parameters:
|
int |
$classid: |
// class id |
|
int |
$oid: |
// object id |
|
string |
$action: |
// action |
boolean memberRights(
[
$classid = 0]
)
|
|
spunq::memberRights()
// purpose: get member permissions for a given class
Parameters:
API Tags:
| Return: | rights for group as an array or FALSE |
void moveObject(
$method, int
$object_id, int
$class_id, [
$parent = 0]
)
|
|
spunq::moveObjectUp
// purpose: move object in its structure up
Parameters:
|
int |
$class_id: |
// class id as stored in database |
|
int |
$object_id: |
// object id as stored in database |
|
|
$method: |
|
|
|
$parent: |
|
API Tags:
| Return: | TRUE or pear-db error-object |
void moveRelation(
array
$get
)
|
|
spunq::moveRelation()
// purpose: change sort-order for relations
Parameters:
spunq::moveStructur()
// purpose: moves structure in the class-struct hierarchies
API Tags:
| Return: | TRUE or pear-db error object |
void moveStructure(
$method, int
$object_id, int
$class_id, [
$parent = 0]
)
|
|
spunq::moveStructureDown
// purpose: move object in its structure down
Parameters:
|
int |
$class_id: |
// class id as stored in database |
|
int |
$object_id: |
// object id as stored in database |
|
|
$method: |
|
|
|
$parent: |
|
API Tags:
| Return: | TRUE or pear-db error-object |
boolean saveContentPermissions(
)
|
|
spunq::saveObjectPermissions()
// purpose: check permissions for called links and user/c_groups
API Tags:
| Return: | TRUE, object // true or pear-db error-object |
int saveObject(
array
$rights
)
|
|
spunq::saveObject()
// purpose: decides if object is updated or newly inserted and calls necessary method
Parameters:
|
array |
$rights: |
// general rights array for object save action |
API Tags:
| Return: | structid to display interface after save-action |
int saveObjectVersion(
array
$rights
)
|
|
spunq::saveObjectVersion()
// purpose: decides if object is updated or newly inserted and calls necessary method
Parameters:
|
array |
$rights: |
// general rights array for object save action |
API Tags:
| Return: | structid to display interface after save-action |
spunq::saveStruct()
// purpose: inserts a new structure object (just core data)
API Tags:
spunq::showinfo()
// purpose: show systeminfo about php-modules
spunq::updateObject()
// purpose: updates an object in table object
API Tags:
| Return: | pear-db result object |
(object) updateObjectData(
$class,
$ref,
$post, (int)
$class_id, (array)
$POST
)
|
|
spunq::updateObjectData()
purpose: updates a new object in object und class-table
Parameters:
|
(int) |
$class_id: |
|
|
(array) |
$POST: |
|
|
|
$class: |
|
|
|
$ref: |
|
|
|
$post: |
|
void updatePureObject(
$id, int
$class_ref, int
$object_ref, string
$name, int
$user, int
$group, int
$perm, int
$sort
)
|
|
spunq::updatePureObject()
// purpose: updates an object in table object by given parameters
Parameters:
|
int |
$class_ref: |
// class reference |
|
int |
$object_ref: |
// object reference |
|
string |
$name: |
// object name |
|
int |
$user: |
// userid |
|
int |
$group: |
// groupid |
|
int |
$perm: |
// permissions for object |
|
int |
$sort: |
// sort value for object |
|
|
$id: |
|
API Tags:
| Return: | pear-db result object |
array writeFile(
string
$content, string
$path, string
$filename
)
|
|
spunq::writeFile()
// purpose: writes a file into the filesystem by filename, path and content
Parameters:
|
string |
$content: |
|
|
string |
$path: |
|
|
string |
$filename: |
|
API Tags:
| Return: | all existing backup files |
|
|