It is generally recommended to explicitly declare the visibility for methods.
Adding explicit visibility (private, protected, or public) is generally
recommend to communicate to other developers how, and from where this method
is intended to be used.
Loading history...
18
global $INFO;
19
20
if($INFO['ismanager']) {
21
return AUTH_READ; // let in check later
22
} else {
23
return AUTH_ADMIN;
24
}
25
}
26
27
public function checkPermissions() {
28
parent::checkPermissions();
29
30
global $INFO;
31
if(!$INFO['ismanager']) {
32
throw new ActionException('denied');
33
}
34
}
35
36
public function preProcess() {
37
global $INPUT;
38
global $INFO;
39
40
// retrieve admin plugin name from $_REQUEST['page']
Adding explicit visibility (
private
,protected
, orpublic
) is generally recommend to communicate to other developers how, and from where this method is intended to be used.