A free, self-hostable news aggregator…
Liste d'utilisateurs
Alexandre Alapetite8ffa896e68d0
diff --git a/app/i18n/en.php b/app/i18n/en.phpindex 7c4f090ae..c7ac16ae0 100644--- a/app/i18n/en.php+++ b/app/i18n/en.php@@ -162,9 +162,10 @@ return array ('allow_anonymous' => 'Allow anonymous reading','auth_token' => 'Authentication token','explain_token' => 'Allows to access RSS output without authentication.<br />%s?token=%s',- 'login_configuration' => 'Login',- 'is_admin' => 'is administrator',- 'auth_type' => 'Authentication method',+ 'login_configuration' => 'Login',+ 'is_admin' => 'is administrator',+ 'auth_type' => 'Authentication method',+ 'users_list' => 'List of users','language' => 'Language','month' => 'months',diff --git a/app/i18n/fr.php b/app/i18n/fr.phpindex 9dff6dd33..e8da1c603 100644--- a/app/i18n/fr.php+++ b/app/i18n/fr.php@@ -162,9 +162,10 @@ return array ('allow_anonymous' => 'Autoriser la lecture anonyme','auth_token' => 'Jeton d’identification','explain_token' => 'Permet d’accéder à la sortie RSS sans besoin de s’authentifier.<br />%s?output=rss&token=%s',- 'login_configuration' => 'Identification',- 'is_admin' => 'est administrateur',- 'auth_type' => 'Méthode d’authentification',+ 'login_configuration' => 'Identification',+ 'is_admin' => 'est administrateur',+ 'auth_type' => 'Méthode d’authentification',+ 'users_list' => 'Liste des utilisateurs','language' => 'Langue','month' => 'mois',diff --git a/app/views/configure/users.phtml b/app/views/configure/users.phtmlindex 81e551d95..e6bebc77c 100644--- a/app/views/configure/users.phtml+++ b/app/views/configure/users.phtml@@ -39,6 +39,22 @@</div></div>+ <?php if (Minz_Configuration::isAdmin()) { ?>++ <div class="form-group">+ <label class="group-name" for="users_list"><?php echo Minz_Translate::t('users_list'); ?></label>+ <div class="group-controls">+ <select id="users_list" name="users_list"><?php+ foreach (listUsers() as $user) {+ echo '<option>', $user, '</option>';+ }+ ?></select>+ (not implemented yet)+ </div>+ </div>++ <?php } ?>+<div class="form-group form-actions"><div class="group-controls"><button type="submit" class="btn btn-important"><?php echo Minz_Translate::t('save'); ?></button>diff --git a/lib/lib_rss.php b/lib/lib_rss.phpindex 160a65bbf..c7698b5c5 100644--- a/lib/lib_rss.php+++ b/lib/lib_rss.php@@ -176,3 +176,15 @@ function uSecString() {function invalidateHttpCache() {file_put_contents(DATA_PATH . '/touch.txt', uTimeString());}++function usernameFromPath($userPath) {+ if (preg_match('%/([a-z0-9]{1,16})_user\.php$%', $userPath, $matches)) {+ return $matches[1];+ } else {+ return '';+ }+}++function listUsers() {+ return array_map('usernameFromPath', glob(DATA_PATH . '/*_user.php'));+}