diff options
| author | 2015-01-05 16:54:16 +0100 | |
|---|---|---|
| committer | 2015-01-05 16:54:16 +0100 | |
| commit | 51a71ec4b9d62528054be8faee1576a8fd6d37f6 (patch) | |
| tree | f92299dd5314aef43e9e69e8fde317b9b7790213 /app/layout/header.phtml | |
| parent | 7584364a4c2b407e97909e94ba274da62620abea (diff) | |
New configuration system (not working yet)
- Use only Minz_Configuration
- register() method to load a new configuration file
- get() to get a configuration
- new exceptions related to configuration
- fix a list configuration calls to have FRSS working
Current problems to resolve:
- How to handle configuration param verifications (i.e. check auth_type
is a value from none, http_auth, persona or form)
- We must use $conf = Minz_Configuration::get('system'); $general_conf = $conf->general;
to access global system configuration which is quite annoying. How to change that?
See https://github.com/FreshRSS/FreshRSS/issues/730
Diffstat (limited to 'app/layout/header.phtml')
| -rw-r--r-- | app/layout/header.phtml | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/app/layout/header.phtml b/app/layout/header.phtml index ba13c2a45..2f16b5f63 100644 --- a/app/layout/header.phtml +++ b/app/layout/header.phtml @@ -1,5 +1,8 @@ <?php -if (Minz_Configuration::canLogIn()) { + +$conf = Minz_Configuration::get('system'); + +if (FreshRSS_Auth::accessNeedLogin()) { ?><ul class="nav nav-head nav-login"><?php if (FreshRSS_Auth::hasAccess()) { ?><li class="item"><?php echo _i('logout'); ?> <a class="signout" href="<?php echo _url('auth', 'logout'); ?>"><?php echo _t('gen.auth.logout'); ?></a></li><?php @@ -15,13 +18,13 @@ if (Minz_Configuration::canLogIn()) { <h1> <a href="<?php echo _url('index', 'index'); ?>"> <img class="logo" src="<?php echo _i('icon', true); ?>" alt="⊚" /> - <?php echo Minz_Configuration::title(); ?> + <?php echo $conf->general['title']; ?> </a> </h1> </div> <div class="item search"> - <?php if (FreshRSS_Auth::hasAccess() || Minz_Configuration::allowAnonymous()) { ?> + <?php if (FreshRSS_Auth::hasAccess() || $conf->general['allow_anonymous']) { ?> <form action="<?php echo _url('index', 'index'); ?>" method="get"> <div class="stick"> <?php $search = Minz_Request::param('search', ''); ?> @@ -76,14 +79,14 @@ if (Minz_Configuration::canLogIn()) { <li class="item"><a href="<?php echo _url('index', 'logs'); ?>"><?php echo _t('gen.menu.logs'); ?></a></li> <li class="item"><a href="<?php echo _url('index', 'about'); ?>"><?php echo _t('gen.menu.about'); ?></a></li> <?php - if (Minz_Configuration::canLogIn()) { + if (FreshRSS_Auth::accessNeedLogin()) { ?><li class="separator"></li> <li class="item"><a class="signout" href="<?php echo _url('auth', 'logout'); ?>"><?php echo _i('logout'), ' ', _t('gen.auth.logout'); ?></a></li><?php } ?> </ul> </div> </div> - <?php } elseif (Minz_Configuration::canLogIn()) { ?> + <?php } elseif (FreshRSS_Auth::accessNeedLogin()) { ?> <div class="item configure"> <?php echo _i('login'); ?><a class="signin" href="<?php echo _url('auth', 'login'); ?>"><?php echo _t('gen.auth.login'); ?></a> </div> |
