aboutsummaryrefslogtreecommitdiff
path: root/app/views/entry
diff options
context:
space:
mode:
authorGravatar Clément <clement@selfhost.fr> 2017-02-15 14:14:03 +0100
committerGravatar Clément <clement@selfhost.fr> 2017-02-15 14:14:03 +0100
commit5a1bb1393b4496eb35a2ffb3cc63d41c9dc1e2e5 (patch)
tree67028e45792c575c25c92616633f64cc7a4a13eb /app/views/entry
parent7e949d50320317b5c3b5a2da2bdaf324e794b2f7 (diff)
parent5f637bd816b7323885bfe1751a1724ee59a822f6 (diff)
Merge remote-tracking branch 'FreshRSS/master'
Diffstat (limited to 'app/views/entry')
-rwxr-xr-xapp/views/entry/bookmark.phtml22
-rwxr-xr-xapp/views/entry/read.phtml22
2 files changed, 22 insertions, 22 deletions
diff --git a/app/views/entry/bookmark.phtml b/app/views/entry/bookmark.phtml
index c1fc32b7f..d85706669 100755
--- a/app/views/entry/bookmark.phtml
+++ b/app/views/entry/bookmark.phtml
@@ -1,16 +1,16 @@
<?php
header('Content-Type: application/json; charset=UTF-8');
-if (Minz_Request::param ('is_favorite', true)) {
- Minz_Request::_param ('is_favorite', 0);
-} else {
- Minz_Request::_param ('is_favorite', 1);
-}
+$url = array(
+ 'c' => Minz_Request::controllerName(),
+ 'a' => Minz_Request::actionName(),
+ 'params' => Minz_Request::fetchGET(),
+);
-$url = Minz_Url::display (array (
- 'c' => Minz_Request::controllerName (),
- 'a' => Minz_Request::actionName (),
- 'params' => Minz_Request::params (),
-));
+$url['params']['is_favorite'] = Minz_Request::param('is_favorite', true) ? '0' : '1';
-echo json_encode (array ('url' => str_ireplace ('&amp;', '&', $url), 'icon' => FreshRSS_Themes::icon(Minz_Request::param ('is_favorite') ? 'non-starred' : 'starred')));
+FreshRSS::loadStylesAndScripts();
+echo json_encode(array(
+ 'url' => str_ireplace('&amp;', '&', Minz_Url::display($url)),
+ 'icon' => _i($url['params']['is_favorite'] === '1' ? 'non-starred' : 'starred')
+ ));
diff --git a/app/views/entry/read.phtml b/app/views/entry/read.phtml
index 9e79d4c07..73977d94b 100755
--- a/app/views/entry/read.phtml
+++ b/app/views/entry/read.phtml
@@ -1,16 +1,16 @@
<?php
header('Content-Type: application/json; charset=UTF-8');
-if (Minz_Request::param ('is_read', true)) {
- Minz_Request::_param ('is_read', 0);
-} else {
- Minz_Request::_param ('is_read', 1);
-}
+$url = array(
+ 'c' => Minz_Request::controllerName(),
+ 'a' => Minz_Request::actionName(),
+ 'params' => Minz_Request::fetchGET(),
+);
-$url = Minz_Url::display (array (
- 'c' => Minz_Request::controllerName (),
- 'a' => Minz_Request::actionName (),
- 'params' => Minz_Request::params (),
-));
+$url['params']['is_read'] = Minz_Request::param('is_read', true) ? '0' : '1';
-echo json_encode (array ('url' => str_ireplace ('&amp;', '&', $url), 'icon' => FreshRSS_Themes::icon(Minz_Request::param ('is_read') ? 'unread' : 'read')));
+FreshRSS::loadStylesAndScripts();
+echo json_encode(array(
+ 'url' => str_ireplace('&amp;', '&', Minz_Url::display($url)),
+ 'icon' => _i($url['params']['is_read'] === '1' ? 'unread' : 'read')
+ ));