From 60c1387a16ea4944674b0c9da2273158d1fbf0b4 Mon Sep 17 00:00:00 2001 From: cash Date: Sun, 22 Aug 2010 23:15:43 +0000 Subject: Merged r6757:6810 from 1.7 branch into trunk git-svn-id: http://code.elgg.org/elgg/trunk@6850 36083f99-b078-4883-b0ff-0f9b5a30f544 --- engine/lib/access.php | 24 +++++++++++++++--------- 1 file changed, 15 insertions(+), 9 deletions(-) (limited to 'engine/lib/access.php') diff --git a/engine/lib/access.php b/engine/lib/access.php index b8d8820e1..39f7925c6 100644 --- a/engine/lib/access.php +++ b/engine/lib/access.php @@ -188,7 +188,7 @@ function get_default_access(ElggUser $user = null) { * Override the default behaviour and allow results to show hidden entities as well. * THIS IS A HACK. * - * TODO: Replace this with query object! + * @todo Replace this with query object! */ $ENTITY_SHOW_HIDDEN_OVERRIDE = false; @@ -216,13 +216,13 @@ function access_get_show_hidden_status() { * Returns an SQL fragment that is true (or optionally false) if the given user has * added an annotation with the given name to the given entity. * - * TODO: This is fairly generic so perhaps it could be moved to annotations.php + * @todo This is fairly generic so perhaps it could be moved to annotations.php * * @param string $annotation_name name of the annotation - * @param string $entity_guid SQL string that evaluates to the GUID of the entity the annotation should be attached to - * @param string $owner_guid SQL string that evaluates to the GUID of the owner of the annotation * - * @param boolean $exists If set to true, will return true if the annotation exists, otherwise returns false - * @return string An SQL fragment suitable for inserting into a WHERE clause + * @param string $entity_guid SQL string that evaluates to the GUID of the entity the annotation should be attached to + * @param string $owner_guid SQL string that evaluates to the GUID of the owner of the annotation * + * @param boolean $exists If set to true, will return true if the annotation exists, otherwise returns false + * @return string An SQL fragment suitable for inserting into a WHERE clause */ function get_annotation_sql($annotation_name, $entity_guid, $owner_guid, $exists) { global $CONFIG; @@ -246,7 +246,7 @@ END; /** * Add access restriction sql code to a given query. * Note that if this code is executed in privileged mode it will return blank. - * @TODO: DELETE once Query classes are fully integrated + * @todo DELETE once Query classes are fully integrated * * @param string $table_prefix Optional table. prefix for the access code. * @param int $owner @@ -734,7 +734,7 @@ function get_entities_from_access_id($collection_id, $entity_type = "", $entity_ * @param int $collection_id * @param array $options @see elgg_get_entities() * @return array - * @since 1.7 + * @since 1.7.0 */ function elgg_get_entities_from_access_id(array $options=array()) { // restrict the resultset to access collection provided @@ -785,7 +785,8 @@ function list_entities_from_access_id($collection_id, $entity_type = "", $entity * * @param $entity_accessid (int) The entity's access id * @return string e.g. Public, Private etc - **/ + * @since 1.7.0 + */ function get_readable_access_level($entity_accessid){ $access = (int) $entity_accessid; //get the access level for object in readable string @@ -804,6 +805,7 @@ function get_readable_access_level($entity_accessid){ * Set if entity access system should be ignored. * * @return bool Previous ignore_access setting. + * @since 1.7.0 */ function elgg_set_ignore_access($ignore = true) { $elgg_access = elgg_get_access_object(); @@ -814,6 +816,7 @@ function elgg_set_ignore_access($ignore = true) { * Get current ignore access setting. * * @return bool + * @since 1.7.0 */ function elgg_get_ignore_access() { return elgg_get_access_object()->get_ignore_access(); @@ -823,6 +826,7 @@ function elgg_get_ignore_access() { * Decides if the access system is being ignored. * * @return bool + * @since 1.7.0 */ function elgg_check_access_overrides($user_guid = null) { if (!$user_guid || $user_guid <= 0) { @@ -838,6 +842,7 @@ function elgg_check_access_overrides($user_guid = null) { * Returns the ElggAccess object. * * @return ElggAccess + * @since 1.7.0 */ function elgg_get_access_object() { static $elgg_access; @@ -865,6 +870,7 @@ function access_init() { * Override permissions system * * @return true|null + * @since 1.7.0 */ function elgg_override_permissions_hook($hook, $type, $returnval, $params) { $user_guid = get_loggedin_userid(); -- cgit v1.2.3