aboutsummaryrefslogtreecommitdiff
path: root/lib/Minz/Request.php
diff options
context:
space:
mode:
authorGravatar Alexandre Alapetite <alexandre@alapetite.fr> 2019-10-31 18:15:47 +0100
committerGravatar GitHub <noreply@github.com> 2019-10-31 18:15:47 +0100
commit3aa66f317b496ccd9a2df914bbc747c52081a7ad (patch)
tree6a3f3f74899801abdca00546e213dfdc141c53cf /lib/Minz/Request.php
parent82611c9622ed23b0e9fcf5f9f651ddffa1fd7706 (diff)
parentfcae48f313d399050cb15f37a8a73ae52fc67796 (diff)
Merge pull request #2599 from FreshRSS/dev1.15.0
FreshRSS 1.15
Diffstat (limited to 'lib/Minz/Request.php')
-rw-r--r--lib/Minz/Request.php13
1 files changed, 13 insertions, 0 deletions
diff --git a/lib/Minz/Request.php b/lib/Minz/Request.php
index 912c354ac..9235f873a 100644
--- a/lib/Minz/Request.php
+++ b/lib/Minz/Request.php
@@ -52,6 +52,12 @@ class Minz_Request {
}
return null;
}
+ public static function paramBoolean($key) {
+ if (null === $value = self::paramTernary($key)) {
+ return false;
+ }
+ return $value;
+ }
public static function defaultControllerName() {
return self::$default_controller_name;
}
@@ -98,6 +104,13 @@ class Minz_Request {
self::initJSON();
}
+ public static function is($controller_name, $action_name) {
+ return (
+ self::$controller_name === $controller_name &&
+ self::$action_name === $action_name
+ );
+ }
+
/**
* Return true if the request is over HTTPS, false otherwise (HTTP)
*/