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.php18
1 files changed, 18 insertions, 0 deletions
diff --git a/app/Models/Context.php b/app/Models/Context.php
index cbd6a5888..3dc5349ad 100644
--- a/app/Models/Context.php
+++ b/app/Models/Context.php
@@ -287,4 +287,22 @@ class FreshRSS_Context {
}
return true;
}
+
+ /**
+ * Determine if the "sticky post" option is enabled. It can be enable
+ * by the user when it is selected in the configuration page or by the
+ * application when the context allows to auto-remove articles when they
+ * are read.
+ *
+ * @return boolean
+ */
+ public static function isStickyPostEnabled() {
+ if (self::$conf->sticky_post) {
+ return true;
+ }
+ if (self::isAutoRemoveAvailable()) {
+ return true;
+ }
+ return false;
+ }
}