aboutsummaryrefslogtreecommitdiff
path: root/app/layout/layout.phtml
diff options
context:
space:
mode:
authorGravatar Marien Fressinaud <dev@marienfressinaud.fr> 2014-10-22 17:57:22 +0200
committerGravatar Marien Fressinaud <dev@marienfressinaud.fr> 2014-10-22 17:57:22 +0200
commit98587d5d617f157ba57a260091c8e2c944f5163f (patch)
tree24760d52ffc5d3411e986749054d08e3c63fc002 /app/layout/layout.phtml
parentf1f9b2f5ff60f6dca05fad831b766ea7d63ff3a3 (diff)
Fix a set of TODO and bugs
- Context object raises correct Exception if get is invalid - RSS feed is well-indicated on the home page - State is better calculated - Add some comments See https://github.com/marienfressinaud/FreshRSS/issues/634
Diffstat (limited to 'app/layout/layout.phtml')
-rw-r--r--app/layout/layout.phtml17
1 files changed, 9 insertions, 8 deletions
diff --git a/app/layout/layout.phtml b/app/layout/layout.phtml
index 2b38df4a1..1827d6c26 100644
--- a/app/layout/layout.phtml
+++ b/app/layout/layout.phtml
@@ -10,21 +10,22 @@
<?php $this->renderHelper('javascript_vars'); ?>
//]]></script>
<?php
+ $url_base = Minz_Request::currentRequest();
if (FreshRSS_Context::$next_id !== '') {
- $params = Minz_Request::params();
- $params['next'] = FreshRSS_Context::$next_id;
- $params['ajax'] = 1;
+ $url_next = $url_base;
+ $url_next['params']['next'] = FreshRSS_Context::$next_id;
+ $url_next['params']['ajax'] = 1;
?>
- <link id="prefetch" rel="next prefetch" href="<?php echo Minz_Url::display(array('c' => Minz_Request::controllerName(), 'a' => Minz_Request::actionName(), 'params' => $params)); ?>" />
+ <link id="prefetch" rel="next prefetch" href="<?php echo Minz_Url::display($url_next); ?>" />
<?php } ?>
<link rel="shortcut icon" id="favicon" type="image/x-icon" sizes="16x16 64x64" href="<?php echo Minz_Url::display('/favicon.ico'); ?>" />
<link rel="icon msapplication-TileImage apple-touch-icon" type="image/png" sizes="256x256" href="<?php echo Minz_Url::display('/themes/icons/favicon-256.png'); ?>" />
<?php
- if (isset($this->url)) {
- $rss_url = $this->url;
- $rss_url['params']['output'] = 'rss';
+ if (isset($this->rss_title)) {
+ $url_rss = $url_base;
+ $url_rss['a'] = 'rss';
?>
- <link rel="alternate" type="application/rss+xml" title="<?php echo $this->rss_title; ?>" href="<?php echo Minz_Url::display($rss_url); ?>" />
+ <link rel="alternate" type="application/rss+xml" title="<?php echo $this->rss_title; ?>" href="<?php echo Minz_Url::display($url_rss); ?>" />
<?php } ?>
<link rel="prefetch" href="<?php echo FreshRSS_Themes::icon('starred', true); ?>">
<link rel="prefetch" href="<?php echo FreshRSS_Themes::icon('non-starred', true); ?>">