diff options
| author | 2019-10-31 18:15:47 +0100 | |
|---|---|---|
| committer | 2019-10-31 18:15:47 +0100 | |
| commit | 3aa66f317b496ccd9a2df914bbc747c52081a7ad (patch) | |
| tree | 6a3f3f74899801abdca00546e213dfdc141c53cf /lib/Minz/Request.php | |
| parent | 82611c9622ed23b0e9fcf5f9f651ddffa1fd7706 (diff) | |
| parent | fcae48f313d399050cb15f37a8a73ae52fc67796 (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.php | 13 |
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) */ |
