Skip to content

Commit

Permalink
fixed comments
Browse files Browse the repository at this point in the history
  • Loading branch information
jdalsem committed Nov 30, 2017
1 parent 7fdc81d commit 5f8d11e
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
10 changes: 5 additions & 5 deletions engine/classes/ElggEntity.php
Original file line number Diff line number Diff line change
Expand Up @@ -926,7 +926,7 @@ public function getOwnedAccessCollections($options = []) {
* @since 3.0
*/
public function getOwnedAccessCollection($subtype) {
if (!is_string($subtype)) {
if (!is_string($subtype) || $subtype === '') {
return false;
}

Expand Down Expand Up @@ -1341,11 +1341,11 @@ protected function create() {
$container_guid = (int) $container_guid;

if ($access_id == ACCESS_DEFAULT) {
throw new \InvalidParameterException('ACCESS_DEFAULT is not a valid access level. See its documentation in elgglib.php');
throw new \InvalidParameterException('ACCESS_DEFAULT is not a valid access level. See its documentation in constants.php');
}

if ($access_id == ACCESS_FRIENDS) {
throw new \InvalidParameterException('ACCESS_FRIENDS is not a valid access level. See its documentation in elgglib.php');
throw new \InvalidParameterException('ACCESS_FRIENDS is not a valid access level. See its documentation in constants.php');
}

$user_guid = elgg_get_logged_in_user_guid();
Expand Down Expand Up @@ -1477,11 +1477,11 @@ protected function update() {
$time = $this->getCurrentTime()->getTimestamp();

if ($access_id == ACCESS_DEFAULT) {
throw new \InvalidParameterException('ACCESS_DEFAULT is not a valid access level. See its documentation in elgglib.php');
throw new \InvalidParameterException('ACCESS_DEFAULT is not a valid access level. See its documentation in constants.php');
}

if ($access_id == ACCESS_FRIENDS) {
throw new \InvalidParameterException('ACCESS_FRIENDS is not a valid access level. See its documentation in elgglib.php');
throw new \InvalidParameterException('ACCESS_FRIENDS is not a valid access level. See its documentation in constants.php');
}

// Update primary table
Expand Down
4 changes: 4 additions & 0 deletions engine/lib/access.php
Original file line number Diff line number Diff line change
Expand Up @@ -499,6 +499,10 @@ function access_friends_acl_remove_friend(\Elgg\Event $event) {
* @param \Elgg\Hook $hook hook
*
* @return string|void
*
* @since 3.0.0
*
* @internal
*/
function access_friends_acl_get_name(\Elgg\Hook $hook) {
$access_collection = $hook->getParam('access_collection');
Expand Down

0 comments on commit 5f8d11e

Please sign in to comment.