summaryrefslogtreecommitdiff
path: root/app/views
diff options
context:
space:
mode:
authorGravatar Marien Fressinaud <dev@marienfressinaud.fr> 2015-01-06 20:50:58 +0100
committerGravatar Marien Fressinaud <dev@marienfressinaud.fr> 2015-01-06 20:50:58 +0100
commit5f9672111f86c693d843138c00934a6c3eeede45 (patch)
tree4aa58d52cb0650c482820db6d3be6606bfa5c163 /app/views
parentd3a93ea2905ae50a2365d293f9f3ef3e51bf5f30 (diff)
Fix last calls to Minz_Configuration methods
- We have still to fix actualize_script and greader api (refactoring?) - We have to fix the FreshRSS_Configuration calls - We have to fix availableLanguages calls See https://github.com/FreshRSS/FreshRSS/issues/730
Diffstat (limited to 'app/views')
-rw-r--r--app/views/auth/index.phtml32
-rw-r--r--app/views/helpers/export/opml.phtml2
-rw-r--r--app/views/index/index.phtml2
-rw-r--r--app/views/user/profile.phtml2
4 files changed, 19 insertions, 19 deletions
diff --git a/app/views/auth/index.phtml b/app/views/auth/index.phtml
index bb07cc2af..f7a862ac9 100644
--- a/app/views/auth/index.phtml
+++ b/app/views/auth/index.phtml
@@ -10,13 +10,13 @@
<label class="group-name" for="auth_type"><?php echo _t('admin.auth.type'); ?></label>
<div class="group-controls">
<select id="auth_type" name="auth_type" required="required">
- <?php if (!in_array(Minz_Configuration::authType(), array('form', 'persona', 'http_auth', 'none'))) { ?>
+ <?php if (!in_array(FreshRSS_Context::$system_conf->auth_type, array('form', 'persona', 'http_auth', 'none'))) { ?>
<option selected="selected"></option>
<?php } ?>
- <option value="form"<?php echo Minz_Configuration::authType() === 'form' ? ' selected="selected"' : '', cryptAvailable() ? '' : ' disabled="disabled"'; ?>><?php echo _t('admin.auth.form'); ?></option>
- <option value="persona"<?php echo Minz_Configuration::authType() === 'persona' ? ' selected="selected"' : '', FreshRSS_Context::$user_conf->mail_login == '' ? ' disabled="disabled"' : ''; ?>><?php echo _t('admin.auth.persona'); ?></option>
- <option value="http_auth"<?php echo Minz_Configuration::authType() === 'http_auth' ? ' selected="selected"' : '', httpAuthUser() == '' ? ' disabled="disabled"' : ''; ?>><?php echo _t('admin.auth.http'); ?> (REMOTE_USER = '<?php echo httpAuthUser(); ?>')</option>
- <option value="none"<?php echo Minz_Configuration::authType() === 'none' ? ' selected="selected"' : ''; ?>><?php echo _t('admin.auth.none'); ?></option>
+ <option value="form"<?php echo FreshRSS_Context::$system_conf->auth_type === 'form' ? ' selected="selected"' : '', cryptAvailable() ? '' : ' disabled="disabled"'; ?>><?php echo _t('admin.auth.form'); ?></option>
+ <option value="persona"<?php echo FreshRSS_Context::$system_conf->auth_type === 'persona' ? ' selected="selected"' : '', FreshRSS_Context::$user_conf->mail_login == '' ? ' disabled="disabled"' : ''; ?>><?php echo _t('admin.auth.persona'); ?></option>
+ <option value="http_auth"<?php echo FreshRSS_Context::$system_conf->auth_type === 'http_auth' ? ' selected="selected"' : '', httpAuthUser() == '' ? ' disabled="disabled"' : ''; ?>><?php echo _t('admin.auth.http'); ?> (REMOTE_USER = '<?php echo httpAuthUser(); ?>')</option>
+ <option value="none"<?php echo FreshRSS_Context::$system_conf->auth_type === 'none' ? ' selected="selected"' : ''; ?>><?php echo _t('admin.auth.none'); ?></option>
</select>
</div>
</div>
@@ -24,9 +24,9 @@
<div class="form-group">
<div class="group-controls">
<label class="checkbox" for="anon_access">
- <input type="checkbox" name="anon_access" id="anon_access" value="1"<?php echo Minz_Configuration::allowAnonymous() ? ' checked="checked"' : '',
- Minz_Configuration::canLogIn() ? '' : ' disabled="disabled"'; ?> />
- <?php echo _t('admin.auth.allow_anonymous', Minz_Configuration::defaultUser()); ?>
+ <input type="checkbox" name="anon_access" id="anon_access" value="1"<?php echo FreshRSS_Context::$system_conf->allow_anonymous ? ' checked="checked"' : '',
+ FreshRSS_Auth::accessNeedsAction() ? '' : ' disabled="disabled"'; ?> />
+ <?php echo _t('admin.auth.allow_anonymous', FreshRSS_Context::$system_conf->default_user); ?>
</label>
</div>
</div>
@@ -34,8 +34,8 @@
<div class="form-group">
<div class="group-controls">
<label class="checkbox" for="anon_refresh">
- <input type="checkbox" name="anon_refresh" id="anon_refresh" value="1"<?php echo Minz_Configuration::allowAnonymousRefresh() ? ' checked="checked"' : '',
- Minz_Configuration::canLogIn() ? '' : ' disabled="disabled"'; ?> />
+ <input type="checkbox" name="anon_refresh" id="anon_refresh" value="1"<?php echo FreshRSS_Context::$system_conf->allow_anonymous_refresh ? ' checked="checked"' : '',
+ FreshRSS_Auth::accessNeedsAction() ? '' : ' disabled="disabled"'; ?> />
<?php echo _t('admin.auth.allow_anonymous_refresh'); ?>
</label>
</div>
@@ -44,21 +44,21 @@
<div class="form-group">
<div class="group-controls">
<label class="checkbox" for="unsafe_autologin">
- <input type="checkbox" name="unsafe_autologin" id="unsafe_autologin" value="1"<?php echo Minz_Configuration::unsafeAutologinEnabled() ? ' checked="checked"' : '',
- Minz_Configuration::canLogIn() ? '' : ' disabled="disabled"'; ?> />
+ <input type="checkbox" name="unsafe_autologin" id="unsafe_autologin" value="1"<?php echo FreshRSS_Context::$system_conf->unsafe_autologin_enabled ? ' checked="checked"' : '',
+ FreshRSS_Auth::accessNeedsAction() ? '' : ' disabled="disabled"'; ?> />
<?php echo _t('admin.auth.unsafe_autologin'); ?>
<kbd><?php echo Minz_Url::display(array('c' => 'auth', 'a' => 'login', 'params' => array('u' => 'alice', 'p' => '1234')), 'html', true); ?></kbd>
</label>
</div>
</div>
- <?php if (Minz_Configuration::canLogIn()) { ?>
+ <?php if (FreshRSS_Auth::accessNeedsAction()) { ?>
<div class="form-group">
<label class="group-name" for="token"><?php echo _t('admin.auth.token'); ?></label>
<?php $token = FreshRSS_Context::$user_conf->token; ?>
<div class="group-controls">
<input type="text" id="token" name="token" value="<?php echo $token; ?>" placeholder="<?php echo _t('gen.short.blank_to_disable'); ?>"<?php
- echo Minz_Configuration::canLogIn() ? '' : ' disabled="disabled"'; ?> />
+ echo FreshRSS_Auth::accessNeedsAction() ? '' : ' disabled="disabled"'; ?> />
<?php echo _i('help'); ?> <?php echo _t('admin.auth.token_help'); ?>
<kbd><?php echo Minz_Url::display(array('params' => array('output' => 'rss', 'token' => $token)), 'html', true); ?></kbd>
</div>
@@ -68,8 +68,8 @@
<div class="form-group">
<div class="group-controls">
<label class="checkbox" for="api_enabled">
- <input type="checkbox" name="api_enabled" id="api_enabled" value="1"<?php echo Minz_Configuration::apiEnabled() ? ' checked="checked"' : '',
- Minz_Configuration::needsLogin() ? '' : ' disabled="disabled"'; ?> />
+ <input type="checkbox" name="api_enabled" id="api_enabled" value="1"<?php echo FreshRSS_Context::$system_conf->api_enabled ? ' checked="checked"' : '',
+ FreshRSS_Auth::accessNeedsLogin() ? '' : ' disabled="disabled"'; ?> />
<?php echo _t('admin.auth.api_enabled'); ?>
</label>
</div>
diff --git a/app/views/helpers/export/opml.phtml b/app/views/helpers/export/opml.phtml
index 8622d9144..236cca303 100644
--- a/app/views/helpers/export/opml.phtml
+++ b/app/views/helpers/export/opml.phtml
@@ -2,7 +2,7 @@
$opml_array = array(
'head' => array(
- 'title' => Minz_Configuration::title(),
+ 'title' => FreshRSS_Context::$system_conf->title,
'dateCreated' => date('D, d M Y H:i:s')
),
'body' => array()
diff --git a/app/views/index/index.phtml b/app/views/index/index.phtml
index 8b93461dd..8b94c7f7d 100644
--- a/app/views/index/index.phtml
+++ b/app/views/index/index.phtml
@@ -2,7 +2,7 @@
$output = Minz_Request::param('output', 'normal');
-if (FreshRSS_Auth::hasAccess() || Minz_Configuration::allowAnonymous()) {
+if (FreshRSS_Auth::hasAccess() || FreshRSS_Context::$system_conf->allow_anonymous) {
if ($output === 'normal') {
$this->renderHelper('view/normal_view');
} elseif ($output === 'reader') {
diff --git a/app/views/user/profile.phtml b/app/views/user/profile.phtml
index a3f7bf15d..d85499ad8 100644
--- a/app/views/user/profile.phtml
+++ b/app/views/user/profile.phtml
@@ -28,7 +28,7 @@
</div>
</div>
- <?php if (Minz_Configuration::apiEnabled()) { ?>
+ <?php if (FreshRSS_Context::$system_conf->api_enabled) { ?>
<div class="form-group">
<label class="group-name" for="apiPasswordPlain"><?php echo _t('conf.profile.password_api'); ?></label>
<div class="group-controls">