aboutsummaryrefslogtreecommitdiff
path: root/app/views/helpers
diff options
context:
space:
mode:
authorGravatar Marien Fressinaud <dev@marienfressinaud.fr> 2014-10-20 18:45:22 +0200
committerGravatar Marien Fressinaud <dev@marienfressinaud.fr> 2014-10-20 18:45:22 +0200
commit1a22a87fb1b1fcb61d201de399c33c2185dc1f6e (patch)
treeb0a9a2fb19b6cf01be8496131b4e7d552137835c /app/views/helpers
parentad92dd7dae35e7205da3172d4ba35ea01da2bc8b (diff)
Use FreshRSS_Context::$conf only
- Replace $this->view->conf in controllers - Replace $this->conf in views
Diffstat (limited to 'app/views/helpers')
-rw-r--r--app/views/helpers/javascript_vars.phtml16
-rwxr-xr-xapp/views/helpers/pagination.phtml2
-rw-r--r--app/views/helpers/view/global_view.phtml6
-rw-r--r--app/views/helpers/view/normal_view.phtml30
-rw-r--r--app/views/helpers/view/reader_view.phtml4
5 files changed, 29 insertions, 29 deletions
diff --git a/app/views/helpers/javascript_vars.phtml b/app/views/helpers/javascript_vars.phtml
index 3bbcc3848..8e9141d4e 100644
--- a/app/views/helpers/javascript_vars.phtml
+++ b/app/views/helpers/javascript_vars.phtml
@@ -1,12 +1,12 @@
"use strict";
<?php
-$mark = $this->conf->mark_when;
+$mark = FreshRSS_Context::$conf->mark_when;
$mail = Minz_Session::param('mail', false);
$auto_actualize = Minz_Session::param('actualize_feeds', false);
-$hide_posts = ($this->conf->display_posts ||
+$hide_posts = (FreshRSS_Context::$conf->display_posts ||
Minz_Request::param('output') === 'reader');
-$s = $this->conf->shortcuts;
+$s = FreshRSS_Context::$conf->shortcuts;
$url_login = Minz_Url::display(array(
'c' => 'auth',
@@ -19,15 +19,15 @@ $url_logout = Minz_Url::display(array(
echo 'var context={',
'hide_posts:', $hide_posts ? 'false' : 'true', ',',
- 'display_order:"', Minz_Request::param('order', $this->conf->sort_order), '",',
+ 'display_order:"', Minz_Request::param('order', FreshRSS_Context::$conf->sort_order), '",',
'auto_mark_article:', $mark['article'] ? 'true' : 'false', ',',
'auto_mark_site:', $mark['site'] ? 'true' : 'false', ',',
'auto_mark_scroll:', $mark['scroll'] ? 'true' : 'false', ',',
- 'auto_load_more:', $this->conf->auto_load_more ? 'true' : 'false', ',',
+ 'auto_load_more:', FreshRSS_Context::$conf->auto_load_more ? 'true' : 'false', ',',
'auto_actualize_feeds:', $auto_actualize ? 'true' : 'false', ',',
- 'does_lazyload:', $this->conf->lazyload ? 'true' : 'false', ',',
- 'sticky_post:', $this->conf->sticky_post ? 'true' : 'false', ',',
- 'html5_notif_timeout:', $this->conf->html5_notif_timeout, ',',
+ 'does_lazyload:', FreshRSS_Context::$conf->lazyload ? 'true' : 'false', ',',
+ 'sticky_post:', FreshRSS_Context::$conf->sticky_post ? 'true' : 'false', ',',
+ 'html5_notif_timeout:', FreshRSS_Context::$conf->html5_notif_timeout, ',',
'auth_type:"', Minz_Configuration::authType(), '",',
'current_user_mail:', $mail ? ('"' . $mail . '"') : 'null', ',',
'current_view:"', Minz_Request::param('output', 'normal'), '"',
diff --git a/app/views/helpers/pagination.phtml b/app/views/helpers/pagination.phtml
index cea338364..d642443a8 100755
--- a/app/views/helpers/pagination.phtml
+++ b/app/views/helpers/pagination.phtml
@@ -20,7 +20,7 @@
</a>
<?php } elseif ($markReadUrl) { ?>
<button id="bigMarkAsRead"
- class="as-link <?php echo $this->conf->reading_confirm ? 'confirm' : ''; ?>"
+ class="as-link <?php echo FreshRSS_Context::$conf->reading_confirm ? 'confirm' : ''; ?>"
form="mark-read-pagination"
formaction="<?php echo $markReadUrl; ?>"
type="submit">
diff --git a/app/views/helpers/view/global_view.phtml b/app/views/helpers/view/global_view.phtml
index 2bac09d04..ae8af820d 100644
--- a/app/views/helpers/view/global_view.phtml
+++ b/app/views/helpers/view/global_view.phtml
@@ -4,11 +4,11 @@
<div id="stream" class="global categories">
<?php
$arUrl = array('c' => 'index', 'a' => 'index', 'params' => array());
- if ($this->conf->view_mode !== 'normal') {
+ if (FreshRSS_Context::$conf->view_mode !== 'normal') {
$arUrl['params']['output'] = 'normal';
}
$p = Minz_Request::param('state', '');
- if (($p != '') && ($this->conf->default_view !== $p)) {
+ if (($p != '') && (FreshRSS_Context::$conf->default_view !== $p)) {
$arUrl['params']['state'] = $p;
}
@@ -41,7 +41,7 @@
</div>
<div id="overlay"></div>
-<div id="panel"<?php echo $this->conf->display_posts ? '' : ' class="hide_posts"'; ?>>
+<div id="panel"<?php echo FreshRSS_Context::$conf->display_posts ? '' : ' class="hide_posts"'; ?>>
<a class="close" href="#"><?php echo _i('close'); ?></a>
</div>
diff --git a/app/views/helpers/view/normal_view.phtml b/app/views/helpers/view/normal_view.phtml
index db25714bb..afe8ed872 100644
--- a/app/views/helpers/view/normal_view.phtml
+++ b/app/views/helpers/view/normal_view.phtml
@@ -8,24 +8,24 @@ if (!empty($this->entries)) {
$display_yesterday = true;
$display_others = true;
if (FreshRSS_Auth::hasAccess()) {
- $sharing = $this->conf->sharing;
+ $sharing = FreshRSS_Context::$conf->sharing;
} else {
$sharing = array();
}
- $hidePosts = !$this->conf->display_posts;
- $lazyload = $this->conf->lazyload;
- $topline_read = $this->conf->topline_read;
- $topline_favorite = $this->conf->topline_favorite;
- $topline_date = $this->conf->topline_date;
- $topline_link = $this->conf->topline_link;
- $bottomline_read = $this->conf->bottomline_read;
- $bottomline_favorite = $this->conf->bottomline_favorite;
- $bottomline_sharing = $this->conf->bottomline_sharing && (count($sharing));
- $bottomline_tags = $this->conf->bottomline_tags;
- $bottomline_date = $this->conf->bottomline_date;
- $bottomline_link = $this->conf->bottomline_link;
+ $hidePosts = !FreshRSS_Context::$conf->display_posts;
+ $lazyload = FreshRSS_Context::$conf->lazyload;
+ $topline_read = FreshRSS_Context::$conf->topline_read;
+ $topline_favorite = FreshRSS_Context::$conf->topline_favorite;
+ $topline_date = FreshRSS_Context::$conf->topline_date;
+ $topline_link = FreshRSS_Context::$conf->topline_link;
+ $bottomline_read = FreshRSS_Context::$conf->bottomline_read;
+ $bottomline_favorite = FreshRSS_Context::$conf->bottomline_favorite;
+ $bottomline_sharing = FreshRSS_Context::$conf->bottomline_sharing && (count($sharing));
+ $bottomline_tags = FreshRSS_Context::$conf->bottomline_tags;
+ $bottomline_date = FreshRSS_Context::$conf->bottomline_date;
+ $bottomline_link = FreshRSS_Context::$conf->bottomline_link;
- $content_width = $this->conf->content_width;
+ $content_width = FreshRSS_Context::$conf->content_width;
?>
<div id="stream" class="normal<?php echo $hidePosts ? ' hide_posts' : ''; ?>"><?php
@@ -140,7 +140,7 @@ if (!empty($this->entries)) {
<li class="dropdown-close"><a href="#close">❌</a></li>
<?php foreach ($sharing as $share) :?>
<li class="item share">
- <a target="_blank" href="<?php echo FreshRSS_Share::generateUrl($this->conf->shares, $share, $item->link(), $item->title() . ' . ' . $feed->name())?>">
+ <a target="_blank" href="<?php echo FreshRSS_Share::generateUrl(FreshRSS_Context::$conf->shares, $share, $item->link(), $item->title() . ' . ' . $feed->name())?>">
<?php echo _t($share['name']);?>
</a>
</li>
diff --git a/app/views/helpers/view/reader_view.phtml b/app/views/helpers/view/reader_view.phtml
index 894c71924..821a50f7f 100644
--- a/app/views/helpers/view/reader_view.phtml
+++ b/app/views/helpers/view/reader_view.phtml
@@ -2,8 +2,8 @@
$this->partial('nav_menu');
if (!empty($this->entries)) {
- $lazyload = $this->conf->lazyload;
- $content_width = $this->conf->content_width;
+ $lazyload = FreshRSS_Context::$conf->lazyload;
+ $content_width = FreshRSS_Context::$conf->content_width;
?>
<div id="stream" class="reader">