Merge pull request #20 from johnkeeping/strict-mode-fixes
Make Handler::before() hierarchy consistent
This commit is contained in:
commit
713d98563d
|
@ -2,8 +2,8 @@
|
||||||
class Dlg extends Protected_Handler {
|
class Dlg extends Protected_Handler {
|
||||||
private $param;
|
private $param;
|
||||||
|
|
||||||
function before() {
|
function before($method) {
|
||||||
if (parent::before()) {
|
if (parent::before($method)) {
|
||||||
header("Content-Type: text/xml; charset=utf-8");
|
header("Content-Type: text/xml; charset=utf-8");
|
||||||
$this->param = db_escape_string($_REQUEST["param"]);
|
$this->param = db_escape_string($_REQUEST["param"]);
|
||||||
print "<dlg>";
|
print "<dlg>";
|
||||||
|
|
|
@ -12,7 +12,7 @@ class Handler {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
function before() {
|
function before($method) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -7,8 +7,8 @@ class Pref_Instances extends Protected_Handler {
|
||||||
return array_search($method, $csrf_ignored) !== false;
|
return array_search($method, $csrf_ignored) !== false;
|
||||||
}
|
}
|
||||||
|
|
||||||
function before() {
|
function before($method) {
|
||||||
if (parent::before()) {
|
if (parent::before($method)) {
|
||||||
if ($_SESSION["access_level"] < 10) {
|
if ($_SESSION["access_level"] < 10) {
|
||||||
print __("Your access level is insufficient to open this tab.");
|
print __("Your access level is insufficient to open this tab.");
|
||||||
return false;
|
return false;
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
<?php
|
<?php
|
||||||
class Pref_Users extends Protected_Handler {
|
class Pref_Users extends Protected_Handler {
|
||||||
function before() {
|
function before($method) {
|
||||||
if (parent::before()) {
|
if (parent::before($method)) {
|
||||||
if ($_SESSION["access_level"] < 10) {
|
if ($_SESSION["access_level"] < 10) {
|
||||||
print __("Your access level is insufficient to open this tab.");
|
print __("Your access level is insufficient to open this tab.");
|
||||||
return false;
|
return false;
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
<?php
|
<?php
|
||||||
class Protected_Handler extends Handler {
|
class Protected_Handler extends Handler {
|
||||||
|
|
||||||
function before() {
|
function before($method) {
|
||||||
return parent::before() && $_SESSION['uid'];
|
return parent::before($method) && $_SESSION['uid'];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
|
Loading…
Reference in New Issue