diff options
| author | 2014-11-22 08:05:21 -0500 | |
|---|---|---|
| committer | 2014-11-22 08:05:21 -0500 | |
| commit | 0ad04f82ea1a09e39f68782f697c678b220b38ee (patch) | |
| tree | 415d8088de387d2d12ace7844f0098d1c4757243 /app/Models | |
| parent | 2c50ed7dc1c11571e3af0ee163e414cc321be2ca (diff) | |
| parent | a3a77b09e96f66eec4e31e638b58c785cfb369a3 (diff) | |
Merge pull request #710 from FreshRSS/hide-article
Add an automatic sticky post configuration
Diffstat (limited to 'app/Models')
| -rw-r--r-- | app/Models/Context.php | 18 |
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; + } } |
