static method getContentWithPermissionsList [line 1359]
static TRUE getContentWithPermissionsList(
)
|
|
Get a list of content with permissions
Tags:
static method getDisplayUriFromHash [line 2164]
static string getDisplayUriFromHash(
string
&$pParamHash, array
1)
|
|
Not-so-pure virtual function that returns fully qualified URI to a piece of content
Tags:
Parameters:
static method getDisplayUrlFromHash [line 2173]
static method getTitleFromHash [line 1936]
static method isCacheableClass [line 124]
constructor __construct [line 102]
method addHit [line 1872]
Increment the content item hit flag by 1
Tags:
method checkContentPermission [line 1271]
bool checkContentPermission(
integer
$pParamHash, integer
1, string
2, string
3)
|
|
Check is a user has permission to access the object
Tags:
Parameters:
method convertQueryHash [line 1045]
Results convertQueryHash(
&$pQueryHash, [
$pCountQuery = FALSE])
|
|
Convert a built up pQueryHash into a single query string and set of bind variables.
A pQueryHash is an array with required keys select and from, and optional keys join, where and order. Each key other than order should be an array with an 'sql' key which points to an array with statements. Statements should not include the keywords to start them excluding join statements nor should they include trailing delimeters such as commas as the conversion adds these where required. All where statments are automatically ANDed together. Each key other than order can optionally have a 'vars' key which points to an array with bind variables. The order key can either be an array or a single value. convertSortmode is automatically called on each order statement and built into the ORDER BY clause with delimeters where required.
Tags:
Parameters:
method exportHash [line 783]
method exportList [line 761]
method expunge [line 439]
method expungeComments [line 420]
Delete comment entries relating to the content object
Tags:
method expungeContentPermissions [line 1392]
TRUE expungeContentPermissions(
)
|
|
Expunge Content Permissions
Tags:
method expungeVersion [line 734]
TRUE expungeVersion(
[pVersion
$pVersion = NULL], [pComment
$pComment = ''])
|
|
Removes a specific version of a page
Tags:
Parameters:
method generateDescription [line 1966]
array generateDescription(
)
|
|
Attempt to create a brief description of this object, most useful for <meta name="description" />
Tags:
method generateKeywords [line 1986]
array generateKeywords(
)
|
|
Attempt to create a collection of relevant words about this object, most useful for <meta name="keywords" />
Tags:
method getAliases [line 1998]
Get array of aliases for this content object
Tags:
method getCacheKey [line 134]
method getContentDescription [line 2073]
string getContentDescription(
)
|
|
Return content type description for this content object.
Tags:
method getContentId [line 2060]
Access a content item content_id
Tags:
method getContentListPermissionsSql [line 1243]
TRUE getContentListPermissionsSql(
array
$pPermName,
&$pSelectSql,
&$pJoinSql,
&$pWhereSql,
&$pBindVars, array
$pSelectSql, array
$pJoinSql, array
$pWhereSql, array
$pBindVars)
|
|
getContentListPermissionsSql
Tags:
Parameters:
method getContentPermissionsList [line 1325]
void getContentPermissionsList(
)
|
|
Load all permissions assigned to a given object.
This function is mainly used to fetch a list of custom permissions of a given content item.
Tags:
method getContentPermissionsSql [line 1214]
TRUE getContentPermissionsSql(
array
$pPermName,
&$pSelectSql,
&$pJoinSql,
&$pWhereSql,
&$pBindVars, array
$pSelectSql, array
$pJoinSql, array
$pWhereSql, array
$pBindVars)
|
|
getContentPermissionsSql
Tags:
Parameters:
method getContentType [line 2011]
Access a content item type GUID
Tags:
method getContentTypeDescription [line 2043]
TRUE getContentTypeDescription(
[array
$pContentType = NULL])
|
|
getContentTypeDescription
Tags:
Parameters:
method getContentTypeName [line 2030]
string getContentTypeName(
[boolean
$pPlural = FALSE])
|
|
Get the display name of the content type
Tags:
Parameters:
method getDisplayLink [line 2112]
method getDisplayUri [line 2152]
string getDisplayUri(
string
0, array
1)
|
|
Not-so-pure virtual function that returns fully qualified URI to a piece of content
Tags:
Parameters:
method getHistory [line 585]
array getHistory(
[array
$pVersion = NULL], [array
$pUserId = NULL], [int
$pOffset = 0], [array
$max_records = -1])
|
|
Get complete set of historical data in order to display a given wiki page version
Tags:
Parameters:
method getHistoryCount [line 562]
Get count of the number of historic records for the page
Tags:
method getHits [line 1916]
Get Hits and Last Hit
Tags:
method getLibertySql [line 933]
void getLibertySql(
$pJoinColumn,
&$pQueryHash, [
$pJoins = NULL], [
$pServiceFunction = NULL], [
$pObject = NULL], [
$pParamHash = NULL])
|
|
Default liberty sql for joining a content object table to liberty.
We are proposing a new way of building queries here where we build up everything in a hash with implicit AND over all where clauses and then do an array_merge and concatenation in a single function at the end. See convertQueryHash for details.
This is an example current, and would be invoked in getList $queryHash = array('summary', 'users', 'hits', 'avatar', 'primary'), array('select' => array('sql' => $selectSql), 'join' => array('sql' => $joinSql), 'where' => array('sql' => $whereSql, 'var' => $bindVars )); $this->getLibertySql( 'bp.`content_id`', $queryHash);
Parameters:
method getPreference [line 1777]
void getPreference(
string
$pPrefName, [string
$pPrefDefault = NULL], [int
$pContentId = NULL])
|
|
Returns the content preferences value for the passed in key.
Parameters:
method getRenderFile [line 2100]
method getServicesSql [line 1155]
void getServicesSql(
$pServiceFunction,
&$pSelectSql,
&$pJoinSql,
&$pWhereSql,
&$pBindVars, [
$pObject = NULL], [
&$pParamHash = NULL])
|
|
Set up SQL strings for services used by the object
TODO: set this function deprecated and eventually nuke it
Parameters:
method getServicesSql2 [line 986]
TRUE getServicesSql2(
array
$pServiceFunction,
&$pQueryHash, [array
$pObject = NULL], [array
$pParamHash = NULL], array
$pQueryHash)
|
|
getServicesSql2
Tags:
Parameters:
method getTitle [line 1953]
Create the generic title for a content item
This will normally be overwriten by extended classes to provide an appropriate title string
Tags:
Overridden in child classes as:
- FisheyeImage::getTitle()
method getUserPermissions [line 1638]
Array getUserPermissions(
)
|
|
Get specific permissions for the specified user for this content
Tags:
method getViewTemplate [line 2085]
void getViewTemplate(
string
$pAction)
|
|
returns a path to the template type requested this is intended for package override. while not a requirement please use a naming convention of center_<action>_<content_type_guid>.tpl for new tpls
Overridden in child classes as:
- BitBlog::getViewTemplate()
- BitBlogPost::getViewTemplate()
- BitPage::getViewTemplate()
- Returns the center template for the view selected
Parameters:
method hasAdminPermission [line 1460]
bool hasAdminPermission(
[
$pVerifyAccessControl = TRUE])
|
|
Determine if current user has the ability to administer this type of content
Tags:
Parameters:
method hasCreatePermission [line 1556]
bool hasCreatePermission(
[
$pVerifyAccessControl = TRUE])
|
|
Determine if current user has the ability to craete this type of content
Tags:
Parameters:
method hasEditPermission [line 1520]
bool hasEditPermission(
[
$pVerifyAccessControl = TRUE], [
$pCheckGlobalPerm = TRUE])
|
|
Deprecated, use hasUpdatePermission
Tags:
Parameters:
method hasExpungePermission [line 1486]
bool hasExpungePermission(
[
$pVerifyAccessControl = TRUE])
|
|
Determine if current user has the ability to delete/expunge this type of content
Tags:
Parameters:
method hasPostCommentsPermission [line 1608]
bool hasPostCommentsPermission(
[
$pVerifyAccessControl = TRUE])
|
|
Determine if current user has the ability to post comments to this type of content
Tags:
Parameters:
method hasService [line 887]
void hasService(
$pServiceGuid)
|
|
check if a service is active for this content type
requires package LCConfig provisional method until LCConfig package is integrated into the core
Parameters:
method hasUpdatePermission [line 1511]
bool hasUpdatePermission(
[
$pVerifyAccessControl = TRUE])
|
|
Determine if current user has the ability to edit this type of content
Tags:
Parameters:
method hasUserPermission [line 1425]
bool hasUserPermission(
string
$pPermName, [string
$pVerifyAccessControl = TRUE], string
2)
|
|
Function that determines if this content specified permission for the current gBitUser.
Assigned content perms override the indvidual global perms, so the result is the union of the global permission set + overridden individual content perms
Tags:
Parameters:
method hasUserPermissions [line 1195]
Number hasUserPermissions(
)
|
|
Check to see if the loaded content has individually assigned permissions
Tags:
method hasViewPermission [line 1582]
bool hasViewPermission(
[
$pVerifyAccessControl = TRUE])
|
|
Determine if current user has the ability to view this type of content Note that this will always return TRUE if you haven't set the mViewContentPerm in your class
Tags:
Parameters:
method invokeServices [line 866]
void invokeServices(
$pServiceFunction, [
&$pFunctionParam = NULL])
|
|
Set up access to services used by the object
Parameters:
method isAdminable [line 827]
void isAdminable(
[
$pContentId = NULL])
|
|
Check permissions to establish if user has permission to admin the object
That would include permission to delete an object or change it's permissions Should be provided by the decendent package
Parameters:
method isCacheableObject [line 130]
void isCacheableObject(
)
|
|
Tags:
Overridden in child classes as:
- BitUser::isCacheableObject()
- Determines if a user object is cacheable. Out of paranoia, admin's are never cached.
method isContentType [line 849]
void isContentType(
$pContentGuid)
|
|
Check if content matches content type GUID - must also be a valid content object, it will not work for generic content class
Parameters:
method isEditable [line 818]
void isEditable(
[
$pContentId = NULL])
|
|
Check permissions to establish if user has permission to edit the object
Should be provided by the decendent package
Overridden in child classes as:
- FisheyeBase::isEditable()
Parameters:
method isExcludedPermission [line 1756]
TRUE isExcludedPermission(
array
$pTeamId, array
$pPermName)
|
|
Check to see if this permission is already in the global permissions table.
Tags:
Parameters:
method isOwner [line 836]
TRUE isOwner(
[$pParamHash
$pParamHash = NULL])
|
|
Check user_id to establish if the object that has been loaded was created by the current user
Tags:
Parameters:
method isServiceRequired [line 910]
void isServiceRequired(
$pServiceGuid)
|
|
check if a service is required for this content type
requires package LCConfig provisional method until LCConfig package is integrated into the core
Parameters:
method isValid [line 802]
method isViewable [line 810]
void isViewable(
[
$pContentId = NULL])
|
|
Check permissions to establish if user has permission to view the object
Should be provided by the decendent package
Parameters:
method load [line 146]
method loadPreferences [line 1808]
array loadPreferences(
[numeric
$pContentId = NULL])
|
|
loadPreferences of the currently loaded object or pass in to get preferences of a specific content_id
Tags:
Parameters:
method registerContentType [line 1861]
void registerContentType(
string
$pContentGuid, array
$pTypeParams)
|
|
Register the content type for reference
Parameters:
method removeLastVersion [line 667]
void removeLastVersion(
[string
$pComment = ''])
|
|
Removes last version of the page (from pages) if theres some version in the liberty_content_history then the last version becomes the actual version
Tags:
Parameters:
method removePermission [line 1731]
bool removePermission(
integer
$pTeamId, string
$pPermName, [
$pContentId = NULL])
|
|
Remove a permission to access the content
Tags:
Parameters:
method rollbackVersion [line 694]
TRUE rollbackVersion(
pVersion
$pVersion, [pComment
$pComment = ''])
|
|
Roll back to a specific version of a page
Tags:
Overridden in child classes as:
- BitPage::rollbackVersion()
- Roll back to a specific version of a page
Parameters:
method setHits [line 1897]
bool setHits(
$pHits, [
$pLastHit = 0])
|
|
Set Hits and Last Hit
Tags:
Parameters:
method setPreference [line 1824]
void setPreference(
string
$pPrefName, string
$pPrefValue)
|
|
Set a hash value in the mPrefs hash. This does *NOT* store the value in the database. It does no checking for existing or duplicate values. the main point of this function is to limit direct accessing of the mPrefs hash. I will probably make mPrefs private one day.
Parameters:
method store [line 347]
method storeAliases [line 513]
TRUE storeAliases(
$pParamHash)
|
|
storeAliases will store aliases to a given content item
Tags:
Parameters:
method storeHistory [line 534]
storeHistory will store the previous data into the history table for reference
Tags:
method storePermission [line 1701]
bool storePermission(
integer
$pTeamId, string
$pPermName, [integer
$pIsRevoked = FALSE], [
$pContentId = NULL])
|
|
Store a permission for the object that has been loaded in the permission database
Any old copy of the permission is deleted prior to loading the new copy
Tags:
Parameters:
method storePreference [line 1835]
void storePreference(
string
$pPrefName, [string
$pPrefValue = NULL])
|
|
Saves a preference to the liberty_content_prefs database table with the given pref name and value. If the value is NULL, the existing value will be delete and the value will not be saved. However, a zero will be stored. This will update the mPrefs hash.
Parameters:
method verify [line 181]
TRUE verify(
&$pParamHash, array
$pParamHash, array
$pParamHash[content_id], array
$pParamHash[user_id], array
$pParamHash[modifier_user_id], array
$pParamHash[created], array
$pParamHash[last_modified], array
$pParamHash[content_type_guid], array
$pParamHash[format_guid], array
$pParamHash[last_hit], array
$pParamHash[event_time], array
$pParamHash[hits], array
$pParamHash[lang_code], array
$pParamHash[title], array
$pParamHash[ip], array
$pParamHash[edit])
|
|
Verify the core class data required to update the liberty_content table entries
Verify will build an array [content_store] with all of the required values and populate it with the relevent data to create/update the liberty_content table record
Tags:
Overridden in child classes as:
- BitNewsletter::verify()
- LibertyMime::verify()
- Verify content that is about to be stored
- BitArticle::verify()
- Make sure the data is safe to store
- BitBlog::verify()
- BitNewsletterEdition::verify()
- BitUser::verify()
- verify store hash
- BitBoardTopic::verify()
- BitBoardPost::verify()
- This function verifies the data for a post
Parameters:
method verifyAccessControl [line 857]
void verifyAccessControl(
)
|
|
Check permissions to establish if user has permission to access the object
method verifyAdminPermission [line 1472]
TRUE verifyAdminPermission(
[$pVerifyAccessControl
$pVerifyAccessControl = TRUE])
|
|
This code was duplicated _EVERYWHERE_ so here is an easy template to cut that down.
It will verify if a given user has a given $permission and if not, it will display the error template and die()
Tags:
Parameters:
method verifyCreatePermission [line 1567]
bool verifyCreatePermission(
[
$pVerifyAccessControl = TRUE])
|
|
Determine if current user has the ability to create this type of content Note this will always return FALSEif the content isValid
Tags:
Parameters:
method verifyEditPermission [line 1546]
void verifyEditPermission(
[
$pVerifyAccessControl = TRUE], [
$pCheckGlobalPerm = TRUE])
|
|
Deprecated, use verifyUpdatePermission
Parameters:
method verifyExpungePermission [line 1497]
TRUE verifyExpungePermission(
[$pVerifyAccessControl
$pVerifyAccessControl = TRUE])
|
|
It will verify if a given user has a given $permission and if not, it will display the error template and die()
Tags:
Parameters:
method verifyPostCommentsPermission [line 1619]
TRUE verifyPostCommentsPermission(
[$pVerifyAccessControl
$pVerifyAccessControl = TRUE])
|
|
It will verify if a given user has a given $permission and if not, it will display the error template and die()
Tags:
Parameters:
method verifyUpdatePermission [line 1533]
TRUE verifyUpdatePermission(
[$pVerifyAccessControl
$pVerifyAccessControl = TRUE])
|
|
This code was duplicated _EVERYWHERE_ so here is an easy template to cut that down.
It will verify if a given user has a given $permission and if not, it will display the error template and die()
Tags:
Parameters:
method verifyUserPermission [line 1407]
void verifyUserPermission(
string
$pPermName, [string
$pFatalMessage = NULL])
|
|
Function that determines if this content specified permission for the current gBitUser, and will throw a fatal error if not.
Parameters:
method verifyViewPermission [line 1594]
TRUE verifyViewPermission(
[$pVerifyAccessControl
$pVerifyAccessControl = TRUE])
|
|
This code was duplicated _EVERYWHERE_ so here is an easy template to cut that down.
It will verify if a given user has a given $permission and if not, it will display the error template and die()
Tags:
Parameters: