diff options
| author | 2022-01-29 14:19:16 +0100 | |
|---|---|---|
| committer | 2022-01-29 14:19:16 +0100 | |
| commit | 8808fb4545d467f62fc82886d9f86bc63c8cf962 (patch) | |
| tree | 98677be799a08841b03c956f97ce966353ea3a2c /app/Models/Context.php | |
| parent | 2e805f8c0b3d2c84755219f64aa5ae82eed3c73f (diff) | |
Fix keep state after favourites tags (#4178)
* Fix keep state after favourites tags
#fix https://github.com/FreshRSS/FreshRSS/issues/4124 regression
* Optimisation
Diffstat (limited to 'app/Models/Context.php')
| -rw-r--r-- | app/Models/Context.php | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/app/Models/Context.php b/app/Models/Context.php index 62dc53774..ce24c8e4c 100644 --- a/app/Models/Context.php +++ b/app/Models/Context.php @@ -195,16 +195,23 @@ class FreshRSS_Context { } /** - * Return true if the current request targets a feed (and not a category or all articles), false otherwise. + * @return bool true if the current request targets a feed (and not a category or all articles), false otherwise. */ - public static function isFeed() { + public static function isFeed(): bool { return self::$current_get['feed'] != false; } /** - * Return true if $get parameter correspond to the $current_get attribute. + * @return bool true if the current request targets a tag (though not all tags), false otherwise. */ - public static function isCurrentGet($get) { + public static function isTag(): bool { + return self::$current_get['tag'] != false; + } + + /** + * @return bool true if $get parameter correspond to the $current_get attribute. + */ + public static function isCurrentGet($get): bool { $type = $get[0]; $id = substr($get, 2); |
