aboutsummaryrefslogtreecommitdiff
path: root/app/Models/Context.php
diff options
context:
space:
mode:
Diffstat (limited to 'app/Models/Context.php')
-rw-r--r--app/Models/Context.php17
1 files changed, 15 insertions, 2 deletions
diff --git a/app/Models/Context.php b/app/Models/Context.php
index 55607f5c4..ab855966b 100644
--- a/app/Models/Context.php
+++ b/app/Models/Context.php
@@ -198,6 +198,20 @@ class FreshRSS_Context {
}
/**
+ * @return bool true if the current request targets all feeds (main view), false otherwise.
+ */
+ public static function isAll(): bool {
+ return self::$current_get['all'] != false;
+ }
+
+ /**
+ * @return bool true if the current request targets a category, false otherwise.
+ */
+ public static function isCategory(): bool {
+ return self::$current_get['category'] != false;
+ }
+
+ /**
* @return bool true if the current request targets a feed (and not a category or all articles), false otherwise.
*/
public static function isFeed(): bool {
@@ -251,8 +265,7 @@ class FreshRSS_Context {
*/
public static function _get($get) {
$type = $get[0];
- $id = substr($get, 2);
- $nb_unread = 0;
+ $id = intval(substr($get, 2));
if (empty(self::$categories)) {
$catDAO = FreshRSS_Factory::createCategoryDao();