diff options
| author | 2014-03-14 06:15:52 -0400 | |
|---|---|---|
| committer | 2014-03-14 06:15:52 -0400 | |
| commit | f31747ee7bdaebf02e7e58d51c27102e0c7c9ef1 (patch) | |
| tree | 74d9338a7ce4f067c6ee46aa3bdce012db7d1bed | |
| parent | 8320154f6c4896567a679d7905fbc6cc8e30ac5a (diff) | |
Refresh page after getting new articles.
Change the URL to the refresh link. Before it was redirecting to the home page.
Now it is redirecting to the same page, which make more sense.
See #457
| -rwxr-xr-x | app/Controllers/indexController.php | 4 | ||||
| -rw-r--r-- | app/layout/nav_menu.phtml | 20 | ||||
| -rw-r--r-- | app/views/helpers/view/normal_view.phtml | 2 |
3 files changed, 7 insertions, 19 deletions
diff --git a/app/Controllers/indexController.php b/app/Controllers/indexController.php index 73f454715..9da1e5022 100755 --- a/app/Controllers/indexController.php +++ b/app/Controllers/indexController.php @@ -25,16 +25,14 @@ class FreshRSS_index_Controller extends Minz_ActionController { } } - // construction of RSS url of this feed $params = Minz_Request::params (); - $params['output'] = 'rss'; if (isset ($params['search'])) { $params['search'] = urlencode ($params['search']); } if (!Minz_Configuration::allowAnonymous()) { $params['token'] = $token; } - $this->view->rss_url = array ( + $this->view->url = array ( 'c' => 'index', 'a' => 'index', 'params' => $params diff --git a/app/layout/nav_menu.phtml b/app/layout/nav_menu.phtml index 097809e08..ffdc95b24 100644 --- a/app/layout/nav_menu.phtml +++ b/app/layout/nav_menu.phtml @@ -99,17 +99,6 @@ </div> <?php } ?> - <?php - $params = Minz_Request::params (); - if (isset ($params['search'])) { - $params['search'] = urlencode ($params['search']); - } - $url = array ( - 'c' => 'index', - 'a' => 'index', - 'params' => $params - ); - ?> <div class="dropdown" id="nav_menu_views"> <div id="dropdown-views" class="dropdown-target"></div> <a class="dropdown-toggle btn" href="#dropdown-views"><?php echo Minz_Translate::t ('display'); ?> <?php echo FreshRSS_Themes::icon('down'); ?></a> @@ -117,7 +106,7 @@ <li class="dropdown-close"><a href="#close">❌</a></li> <?php - $url_output = $url; + $url_output = $this->url; if ($actual_view !== 'normal') { ?> <li class="item"> <?php $url_output['params']['output'] = 'normal'; ?> @@ -144,7 +133,7 @@ <li class="separator"></li> <?php - $url_state = $url; + $url_state = $this->url; $url_state['params']['state'] = 'all'; ?> <li class="item" role="checkbox" aria-checked="<?php echo ($this->state === 'all') ? 'true' :'false'; ?>"> @@ -181,7 +170,7 @@ <li class="item"> <?php - $url_order = $url; + $url_order = $this->url; if ($this->order === 'DESC') { $url_order['params']['order'] = 'ASC'; ?> @@ -201,7 +190,8 @@ <li class="separator"></li> <li class="item"> - <a class="view_rss" target="_blank" href="<?php echo Minz_Url::display ($this->rss_url); ?>"> + <?php $url_output['params']['output'] = 'rss'; ?> + <a class="view_rss" target="_blank" href="<?php echo Minz_Url::display ($url_output); ?>"> <?php echo Minz_Translate::t ('rss_view'); ?> </a> </li> diff --git a/app/views/helpers/view/normal_view.phtml b/app/views/helpers/view/normal_view.phtml index 9fd06ebae..b0f90b4c9 100644 --- a/app/views/helpers/view/normal_view.phtml +++ b/app/views/helpers/view/normal_view.phtml @@ -28,7 +28,7 @@ if (!empty($this->entries)) { <div id="stream" class="normal<?php echo $hidePosts ? ' hide_posts' : ''; ?>"><?php ?><div id="new-article"> - <a href="<?php echo _url('index', 'index'); ?>"><?php echo Minz_Translate::t ('new_article'); ?></a> + <a href="<?php echo Minz_Url::display ($this->url); ?>"><?php echo Minz_Translate::t ('new_article'); ?></a> </div><?php foreach ($this->entries as $item) { if ($display_today && $item->isDay (FreshRSS_Days::TODAY, $this->today)) { |
