summaryrefslogtreecommitdiff
path: root/classes
diff options
context:
space:
mode:
authorJohn Keeping <[email protected]>2012-07-05 19:43:44 +0100
committerJohn Keeping <[email protected]>2012-07-05 19:43:44 +0100
commit17f9d2003ac3f47db316630decd07143992ed16f (patch)
tree36d843026f8bfbd62f1134e357b40073d02be22a /classes
parent68916212b2541344f487354a5ec1e7895aa1370a (diff)
Make Handler::before() hierarchy consistent
In API, the before() method (inherited from Handler) takes a $method argument, although this is not declared for the before method() in handler. PHP in strict mode treats this as an error. Since call sites already pass the $method argument, change Handler::before() and the before() method in all other subclasses to take this argument.
Diffstat (limited to 'classes')
-rw-r--r--classes/dlg.php4
-rw-r--r--classes/handler.php2
-rw-r--r--classes/pref_instances.php4
-rw-r--r--classes/pref_users.php4
-rw-r--r--classes/protected_handler.php4
5 files changed, 9 insertions, 9 deletions
diff --git a/classes/dlg.php b/classes/dlg.php
index 0a5412fb5..4d5068ba6 100644
--- a/classes/dlg.php
+++ b/classes/dlg.php
@@ -2,8 +2,8 @@
class Dlg extends Protected_Handler {
private $param;
- function before() {
- if (parent::before()) {
+ function before($method) {
+ if (parent::before($method)) {
header("Content-Type: text/xml; charset=utf-8");
$this->param = db_escape_string($_REQUEST["param"]);
print "<dlg>";
diff --git a/classes/handler.php b/classes/handler.php
index 404b8306b..9d6c99e0d 100644
--- a/classes/handler.php
+++ b/classes/handler.php
@@ -12,7 +12,7 @@ class Handler {
return true;
}
- function before() {
+ function before($method) {
return true;
}
diff --git a/classes/pref_instances.php b/classes/pref_instances.php
index aae5bbafb..fec95780a 100644
--- a/classes/pref_instances.php
+++ b/classes/pref_instances.php
@@ -7,8 +7,8 @@ class Pref_Instances extends Protected_Handler {
return array_search($method, $csrf_ignored) !== false;
}
- function before() {
- if (parent::before()) {
+ function before($method) {
+ if (parent::before($method)) {
if ($_SESSION["access_level"] < 10) {
print __("Your access level is insufficient to open this tab.");
return false;
diff --git a/classes/pref_users.php b/classes/pref_users.php
index 94ee270d3..8f8f819f3 100644
--- a/classes/pref_users.php
+++ b/classes/pref_users.php
@@ -1,7 +1,7 @@
<?php
class Pref_Users extends Protected_Handler {
- function before() {
- if (parent::before()) {
+ function before($method) {
+ if (parent::before($method)) {
if ($_SESSION["access_level"] < 10) {
print __("Your access level is insufficient to open this tab.");
return false;
diff --git a/classes/protected_handler.php b/classes/protected_handler.php
index e8a6d40a7..5d8d690c3 100644
--- a/classes/protected_handler.php
+++ b/classes/protected_handler.php
@@ -1,8 +1,8 @@
<?php
class Protected_Handler extends Handler {
- function before() {
- return parent::before() && $_SESSION['uid'];
+ function before($method) {
+ return parent::before($method) && $_SESSION['uid'];
}
}
?>