aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/app/Controllers/entryController.php
diff options
context:
space:
mode:
Diffstat (limited to 'app/Controllers/entryController.php')
-rw-r--r--app/Controllers/entryController.php22
1 files changed, 11 insertions, 11 deletions
diff --git a/app/Controllers/entryController.php b/app/Controllers/entryController.php
index d27276cbb..9faf20331 100644
--- a/app/Controllers/entryController.php
+++ b/app/Controllers/entryController.php
@@ -22,7 +22,7 @@ class FreshRSS_entry_Controller extends FreshRSS_ActionController {
}
// If ajax request, we do not print layout
- $this->ajax = Minz_Request::param('ajax');
+ $this->ajax = Minz_Request::paramBoolean('ajax');
if ($this->ajax) {
$this->view->_layout(false);
Minz_Request::_param('ajax');
@@ -44,13 +44,13 @@ class FreshRSS_entry_Controller extends FreshRSS_ActionController {
*/
public function readAction(): void {
$id = Minz_Request::param('id');
- $get = Minz_Request::param('get');
- $next_get = Minz_Request::param('nextGet', $get);
- $id_max = Minz_Request::param('idMax', 0);
- $is_read = (bool)(Minz_Request::param('is_read', true));
- FreshRSS_Context::$search = new FreshRSS_BooleanSearch(Minz_Request::param('search', ''));
+ $get = Minz_Request::paramString('get');
+ $next_get = Minz_Request::paramString('nextGet') ?: $get;
+ $id_max = Minz_Request::paramString('idMax') ?: '0';
+ $is_read = Minz_Request::paramTernary('is_read') ?? true;
+ FreshRSS_Context::$search = new FreshRSS_BooleanSearch(Minz_Request::paramString('search'));
- FreshRSS_Context::$state = Minz_Request::param('state', 0);
+ FreshRSS_Context::$state = Minz_Request::paramInt('state');
if (FreshRSS_Context::isStateEnabled(FreshRSS_Entry::STATE_FAVORITE)) {
FreshRSS_Context::$state = FreshRSS_Entry::STATE_FAVORITE;
} elseif (FreshRSS_Context::isStateEnabled(FreshRSS_Entry::STATE_NOT_FAVORITE)) {
@@ -63,7 +63,7 @@ class FreshRSS_entry_Controller extends FreshRSS_ActionController {
$this->view->tags = array();
$entryDAO = FreshRSS_Factory::createEntryDao();
- if ($id === false) {
+ if ($id == false) {
// id is false? It MUST be a POST request!
if (!Minz_Request::isPost()) {
Minz_Request::bad(_t('feedback.access.not_found'), array('c' => 'index', 'a' => 'index'));
@@ -134,9 +134,9 @@ class FreshRSS_entry_Controller extends FreshRSS_ActionController {
* If id is false, nothing happened.
*/
public function bookmarkAction(): void {
- $id = Minz_Request::param('id');
- $is_favourite = (bool)Minz_Request::param('is_favorite', true);
- if ($id !== false) {
+ $id = Minz_Request::paramString('id');
+ $is_favourite = Minz_Request::paramTernary('is_favorite') ?? true;
+ if ($id != '') {
$entryDAO = FreshRSS_Factory::createEntryDao();
$entryDAO->markFavorite($id, $is_favourite);
}