blob: 68607962b92966c7927d0aa92a301d9dcd2881cf (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
|
<?php
/**
* Class used to determine if access is being ignored.
*
* @package Elgg.Core
* @subpackage Access
* @access private
* @see elgg_get_ignore_access()
*
* @todo I don't remember why this was required beyond scope concerns.
*/
class ElggAccess {
/**
* Bypass Elgg's access control if true.
* @var bool
*/
private $ignore_access;
/**
* Get current ignore access setting.
*
* @return bool
* @deprecated 1.8 Use ElggAccess::getIgnoreAccess()
*/
public function get_ignore_access() {
elgg_deprecated_notice('ElggAccess::get_ignore_access() is deprecated by ElggAccess::getIgnoreAccess()', 1.8);
return $this->getIgnoreAccess();
}
/**
* Get current ignore access setting.
*
* @return bool
*/
public function getIgnoreAccess() {
return $this->ignore_access;
}
/**
* Set ignore access.
*
* @param bool $ignore Ignore access
*
* @return bool Previous setting
*
* @deprecated 1.8 Use ElggAccess:setIgnoreAccess()
*/
public function set_ignore_access($ignore = true) {
elgg_deprecated_notice('ElggAccess::set_ignore_access() is deprecated by ElggAccess::setIgnoreAccess()', 1.8);
return $this->setIgnoreAccess($ignore);
}
/**
* Set ignore access.
*
* @param bool $ignore Ignore access
*
* @return bool Previous setting
*/
public function setIgnoreAccess($ignore = true) {
$prev = $this->ignore_access;
$this->ignore_access = $ignore;
return $prev;
}
}
|