Resolve git conflict

This commit is contained in:
Alexandre Alapetite
2016-08-01 18:10:46 +02:00
65 changed files with 112 additions and 600 deletions

View File

@@ -32,12 +32,12 @@ Nous sommes une communauté amicale.
* Serveur modeste, par exemple sous Linux ou Windows
* Fonctionne même sur un Raspberry Pi 1 avec des temps de réponse < 1s (testé sur 150 flux, 22k articles)
* Serveur Web Apache2 (recommandé), ou nginx, lighttpd (non testé sur les autres)
* PHP 5.3+ (PHP 5.3.7+ recommandé, et PHP 5.5+ pour les performances, et PHP 7+ pour dencore meilleures performances)
* PHP 5.3.3+ (PHP 5.3.7+ recommandé, et PHP 5.5+ pour les performances, et PHP 7+ pour dencore meilleures performances)
* Requis : [PDO_MySQL](http://php.net/pdo-mysql) ou [PDO_SQLite](http://php.net/pdo-sqlite), [cURL](http://php.net/curl), [GMP](http://php.net/gmp) (pour accès API sur plateformes < 64 bits), [IDN](http://php.net/intl.idn) (pour les noms de domaines internationalisés)
* Recommandés : [iconv](http://php.net/iconv), [JSON](http://php.net/json), [mbstring](http://php.net/mbstring), [Zip](http://php.net/zip), [zlib](http://php.net/zlib)
* Inclus par défaut : [DOM](http://php.net/dom), [XML](http://php.net/xml)…
* MySQL 5.0.3+ (recommandé) ou SQLite 3.7.4+
* Un navigateur Web récent tel Firefox, Internet Explorer 11 / Edge, Chrome, Opera, Safari.
* MySQL 5.5.3+ (recommandé) ou SQLite 3.7.4+
* Un navigateur Web récent tel Firefox, Chrome, Opera, Safari. [Internet Explorer ne fonctionne plus, mais ce sera corrigé](https://github.com/FreshRSS/FreshRSS/issues/772).
* Fonctionne aussi sur mobile
* Lentête HTTP `Referer` ne doit pas être désactivé pour pouvoir utiliser le formulaire de connexion
@@ -89,7 +89,6 @@ sudo chmod -R g+w ./data/
# Contrôle daccès
Il est requis pour le mode multi-utilisateur, et recommandé dans tous les cas, de limiter laccès à votre FreshRSS. Au choix :
* En utilisant lidentification par formulaire (requiert JavaScript, et PHP 5.3.7+ recommandé fonctionne avec certaines versions de PHP 5.3.3+)
* En utilisant lidentification par [Mozilla Persona](https://login.persona.org/about) incluse dans FreshRSS
* En utilisant un contrôle daccès HTTP défini par votre serveur Web
* Voir par exemple la [documentation dApache sur lauthentification](http://httpd.apache.org/docs/trunk/howto/auth.html)
* Créer dans ce cas un fichier `./p/i/.htaccess` avec un fichier `.htpasswd` correspondant.
@@ -111,7 +110,7 @@ Par exemple, pour exécuter le script toutes les heures :
* En cas de problème, les logs peuvent être utile à lire, soit depuis linterface de FreshRSS, soit manuellement depuis `./data/log/*.log`.
# Sauvegarde
* Il faut conserver vos fichiers `./data/config.php` ainsi que `./data/*_user.php` et éventuellement `./data/persona/`
* Il faut conserver vos fichiers `./data/config.php` ainsi que `./data/*_user.php`
* Vous pouvez exporter votre liste de flux depuis FreshRSS au format OPML
* Pour sauvegarder les articles eux-mêmes, vous pouvez utiliser [phpMyAdmin](http://www.phpmyadmin.net) ou les outils de MySQL :

View File

@@ -32,11 +32,12 @@ We are a friendly community.
* Light server running Linux or Windows
* It even works on Raspberry Pi 1 with response time under a second (tested with 150 feeds, 22k articles)
* A web server: Apache2 (recommended), nginx, lighttpd (not tested on others)
* PHP 5.3+ (PHP 5.3.7+ recommended, and PHP 5.5+ for performance, and PHP 7 for even higher performance)
* PHP 5.3.3+ (PHP 5.3.7+ recommended, and PHP 5.5+ for performance, and PHP 7 for even higher performance)
* Required extensions: [PDO_MySQL](http://php.net/pdo-mysql) or [PDO_SQLite](http://php.net/pdo-sqlite), [cURL](http://php.net/curl), [GMP](http://php.net/gmp) (for API access on platforms < 64 bits), [IDN](http://php.net/intl.idn) (for Internationalized Domain Names)
* Recommended extensions: [iconv](http://php.net/iconv), [JSON](http://php.net/json), [mbstring](http://php.net/mbstring), [Zip](http://php.net/zip), [zlib](http://php.net/zlib)
* Enabled by default: [DOM](http://php.net/dom), [XML](http://php.net/xml)…
* MySQL 5.0.3+ (recommended) or SQLite 3.7.4+
* MySQL 5.5.3+ (recommended) or SQLite 3.7.4+
* A recent browser like Firefox, Internet Explorer 11 / Edge, Chrome, Opera, Safari.
* Works on mobile
* The browser HTTP `Referer` header must not be disabled when using the form login method
@@ -89,7 +90,6 @@ sudo chmod -R g+w ./data/
# Access control
It is needed for the multi-user mode to limit access to FreshRSS. You can:
* use form authentication (need JavaScript and PHP 5.3.7+, works with some PHP 5.3.3+)
* use [Mozilla Persona](https://login.persona.org/about) authentication included in FreshRSS
* use HTTP authentication supported by your web server
* See [Apache documentation](http://httpd.apache.org/docs/trunk/howto/auth.html)
* In that case, create a `./p/i/.htaccess` file with a matching `.htpasswd` file.
@@ -111,7 +111,7 @@ For example, if you want to run the script every hour:
* If you encounter any problem, logs are accessible from the interface or manually in `./data/log/*.log` files.
# Backup
* You need to keep `./data/config.php`, `./data/*_user.php` and `./data/persona/` files
* You need to keep `./data/config.php`, and `./data/*_user.php` files
* You can export your feed list in OPML format from FreshRSS
* To save articles, you can use [phpMyAdmin](http://www.phpmyadmin.net) or MySQL tools:

View File

@@ -70,7 +70,7 @@ class FreshRSS_auth_Controller extends Minz_ActionController {
/**
* This action handles the login page.
*
* It forwards to the correct login page (form or Persona) or main page if
* It forwards to the correct login page (form) or main page if
* the user is already connected.
*/
public function loginAction() {
@@ -83,9 +83,6 @@ class FreshRSS_auth_Controller extends Minz_ActionController {
case 'form':
Minz_Request::forward(array('c' => 'auth', 'a' => 'formLogin'));
break;
case 'persona':
Minz_Request::forward(array('c' => 'auth', 'a' => 'personaLogin'));
break;
case 'http_auth':
case 'none':
// It should not happened!
@@ -188,81 +185,6 @@ class FreshRSS_auth_Controller extends Minz_ActionController {
}
}
/**
* This action handles Persona login page.
*
* If this action is reached through a POST request, assertion from Persona
* is verificated and user connected if all is ok.
*
* Parameter is:
* - assertion (default: false)
*
* @todo: Persona system should be moved to a plugin
*/
public function personaLoginAction() {
$this->view->res = false;
if (Minz_Request::isPost()) {
$this->view->_useLayout(false);
$assert = Minz_Request::param('assertion');
$url = 'https://verifier.login.persona.org/verify';
$params = 'assertion=' . $assert . '&audience=' .
urlencode(Minz_Url::display(null, 'php', true));
$ch = curl_init();
$options = array(
CURLOPT_URL => $url,
CURLOPT_RETURNTRANSFER => TRUE,
CURLOPT_POST => 2,
CURLOPT_POSTFIELDS => $params
);
curl_setopt_array($ch, $options);
$result = curl_exec($ch);
curl_close($ch);
$res = json_decode($result, true);
$login_ok = false;
$reason = '';
if ($res['status'] === 'okay') {
$email = filter_var($res['email'], FILTER_VALIDATE_EMAIL);
if ($email != '') {
$persona_file = DATA_PATH . '/persona/' . $email . '.txt';
if (($current_user = @file_get_contents($persona_file)) !== false) {
$current_user = trim($current_user);
$conf = get_user_configuration($current_user);
if (!is_null($conf)) {
$login_ok = strcasecmp($email, $conf->mail_login) === 0;
} else {
$reason = 'Invalid configuration for user ' .
'[' . $current_user . ']';
}
}
} else {
$reason = 'Invalid email format [' . $res['email'] . ']';
}
} else {
$reason = $res['reason'];
}
if ($login_ok) {
Minz_Session::_param('currentUser', $current_user);
Minz_Session::_param('mail', $email);
FreshRSS_Auth::giveAccess();
invalidateHttpCache();
} else {
Minz_Log::warning($reason);
$res = array();
$res['status'] = 'failure';
$res['reason'] = _t('feedback.auth.login.invalid');
}
header('Content-Type: application/json; charset=UTF-8');
$this->view->res = $res;
}
}
/**
* This action removes all accesses of the current user.
*/
@@ -273,78 +195,6 @@ class FreshRSS_auth_Controller extends Minz_ActionController {
array('c' => 'index', 'a' => 'index'));
}
/**
* This action resets the authentication system.
*
* After reseting, form auth is set by default.
*/
public function resetAction() {
Minz_View::prependTitle(_t('admin.auth.title_reset') . ' · ');
Minz_View::appendScript(Minz_Url::display(
'/scripts/bcrypt.min.js?' . @filemtime(PUBLIC_PATH . '/scripts/bcrypt.min.js')
));
$this->view->no_form = false;
// Enable changement of auth only if Persona!
if (FreshRSS_Context::$system_conf->auth_type != 'persona') {
$this->view->message = array(
'status' => 'bad',
'title' => _t('gen.short.damn'),
'body' => _t('feedback.auth.not_persona')
);
$this->view->no_form = true;
return;
}
$conf = get_user_configuration(FreshRSS_Context::$system_conf->default_user);
if (is_null($conf)) {
return;
}
// Admin user must have set its master password.
if (!$conf->passwordHash) {
$this->view->message = array(
'status' => 'bad',
'title' => _t('gen.short.damn'),
'body' => _t('feedback.auth.no_password_set')
);
$this->view->no_form = true;
return;
}
invalidateHttpCache();
if (Minz_Request::isPost()) {
$nonce = Minz_Session::param('nonce');
$username = Minz_Request::param('username', '');
$challenge = Minz_Request::param('challenge', '');
$ok = FreshRSS_FormAuth::checkCredentials(
$username, $conf->passwordHash, $nonce, $challenge
);
if ($ok) {
FreshRSS_Context::$system_conf->auth_type = 'form';
$ok = FreshRSS_Context::$system_conf->save();
if ($ok) {
Minz_Request::good(_t('feedback.auth.form.set'));
} else {
Minz_Request::bad(_t('feedback.auth.form.not_set'),
array('c' => 'auth', 'a' => 'reset'));
}
} else {
Minz_Log::warning('Password mismatch for' .
' user=' . $username .
', nonce=' . $nonce .
', c=' . $challenge);
Minz_Request::bad(_t('feedback.auth.login.invalid'),
array('c' => 'auth', 'a' => 'reset'));
}
}
}
/**
* This action gives possibility to a user to create an account.
*/

View File

@@ -200,7 +200,9 @@ class FreshRSS_feed_Controller extends Minz_ActionController {
$entryDAO->addEntry($values);
}
$feedDAO->updateLastUpdate($feed->id());
$feedDAO->commit();
if ($feedDAO->inTransaction()) {
$feedDAO->commit();
}
// Entries are in DB, we redirect to feed configuration page.
$url_redirect['params']['id'] = $feed->id();
@@ -364,7 +366,7 @@ class FreshRSS_feed_Controller extends Minz_ActionController {
//', old hash ' . $existingHash . ', new hash ' . $entry->hash());
//TODO: Make an updated/is_read policy by feed, in addition to the global one.
$entry->_isRead(FreshRSS_Context::$user_conf->mark_updated_article_unread ? false : null); //Change is_read according to policy.
if (!$entryDAO->hasTransaction()) {
if (!$entryDAO->inTransaction()) {
$entryDAO->beginTransaction();
}
$entryDAO->updateEntry($entry->toArray());
@@ -396,7 +398,7 @@ class FreshRSS_feed_Controller extends Minz_ActionController {
$feed->pubSubHubbubError(true);
}
if (!$entryDAO->hasTransaction()) {
if (!$entryDAO->inTransaction()) {
$entryDAO->beginTransaction();
}
$entryDAO->addEntry($entry->toArray());
@@ -408,7 +410,7 @@ class FreshRSS_feed_Controller extends Minz_ActionController {
if ($feed_history >= 0 && rand(0, 30) === 1) {
// TODO: move this function in web cron when available (see entry::purge)
// Remove old entries once in 30.
if (!$entryDAO->hasTransaction()) {
if (!$entryDAO->inTransaction()) {
$entryDAO->beginTransaction();
}
@@ -421,8 +423,8 @@ class FreshRSS_feed_Controller extends Minz_ActionController {
}
}
$feedDAO->updateLastUpdate($feed->id(), 0, $entryDAO->hasTransaction());
if ($entryDAO->hasTransaction()) {
$feedDAO->updateLastUpdate($feed->id(), 0, $entryDAO->inTransaction());
if ($entryDAO->inTransaction()) {
$entryDAO->commit();
}

View File

@@ -64,21 +64,8 @@ class FreshRSS_user_Controller extends Minz_ActionController {
FreshRSS_Context::$user_conf->apiPasswordHash = $passwordHash;
}
// TODO: why do we need of hasAccess here?
if (FreshRSS_Auth::hasAccess('admin')) {
FreshRSS_Context::$user_conf->mail_login = Minz_Request::param('mail_login', '', true);
}
$email = FreshRSS_Context::$user_conf->mail_login;
Minz_Session::_param('mail', $email);
$ok &= FreshRSS_Context::$user_conf->save();
if ($email != '') {
$personaFile = DATA_PATH . '/persona/' . $email . '.txt';
@unlink($personaFile);
$ok &= (file_put_contents($personaFile, Minz_Session::param('currentUser', '_')) !== false);
}
if ($ok) {
Minz_Request::good(_t('feedback.profile.updated'),
array('c' => 'user', 'a' => 'profile'));
@@ -119,7 +106,6 @@ class FreshRSS_user_Controller extends Minz_ActionController {
* - new_user_language
* - new_user_name
* - new_user_passwordPlain
* - new_user_email
* - r (i.e. a redirection url, optional)
*
* @todo clean up this method. Idea: write a method to init a user with basic information.
@@ -168,22 +154,12 @@ class FreshRSS_user_Controller extends Minz_ActionController {
if (empty($passwordHash)) {
$passwordHash = '';
}
$new_user_email = filter_var($_POST['new_user_email'], FILTER_VALIDATE_EMAIL);
if (empty($new_user_email)) {
$new_user_email = '';
} else {
$personaFile = join_path(DATA_PATH, 'persona', $new_user_email . '.txt');
@unlink($personaFile);
$ok &= (file_put_contents($personaFile, $new_user_name) !== false);
}
}
if ($ok) {
mkdir(join_path(DATA_PATH, 'users', $new_user_name));
$config_array = array(
'language' => $new_user_language,
'passwordHash' => $passwordHash,
'mail_login' => $new_user_email,
);
$ok &= (file_put_contents($configPath, "<?php\n return " . var_export($config_array, true) . ';') !== false);
}
@@ -255,7 +231,6 @@ class FreshRSS_user_Controller extends Minz_ActionController {
$userDAO = new FreshRSS_UserDAO();
$ok &= $userDAO->deleteUser($username);
$ok &= recursive_unlink($user_data);
//TODO: delete Persona file
}
if ($ok && $self_deletion) {
FreshRSS_Auth::removeAccess();

View File

@@ -98,14 +98,6 @@ class FreshRSS extends Minz_FrontController {
Minz_View::appendScript(Minz_Url::display('/scripts/jquery.min.js?' . @filemtime(PUBLIC_PATH . '/scripts/jquery.min.js')));
Minz_View::appendScript(Minz_Url::display('/scripts/shortcut.js?' . @filemtime(PUBLIC_PATH . '/scripts/shortcut.js')));
Minz_View::appendScript(Minz_Url::display('/scripts/main.js?' . @filemtime(PUBLIC_PATH . '/scripts/main.js')));
if (FreshRSS_Context::$system_conf->auth_type === 'persona') {
// TODO move it in a plugin
// Needed for login AND logout with Persona.
Minz_View::appendScript('https://login.persona.org/include.js');
$file_mtime = @filemtime(PUBLIC_PATH . '/scripts/persona.js');
Minz_View::appendScript(Minz_Url::display('/scripts/persona.js?' . $file_mtime));
}
}
private static function loadNotifications() {

View File

@@ -60,16 +60,6 @@ class FreshRSS_Auth {
Minz_Session::_param('currentUser', $current_user);
}
return $login_ok;
case 'persona':
$email = filter_var(Minz_Session::param('mail'), FILTER_VALIDATE_EMAIL);
$persona_file = DATA_PATH . '/persona/' . $email . '.txt';
if (($current_user = @file_get_contents($persona_file)) !== false) {
$current_user = trim($current_user);
Minz_Session::_param('currentUser', $current_user);
Minz_Session::_param('mail', $email);
return true;
}
return false;
case 'none':
return true;
default:
@@ -93,9 +83,6 @@ class FreshRSS_Auth {
case 'http_auth':
self::$login_ok = strcasecmp($current_user, httpAuthUser()) === 0;
break;
case 'persona':
self::$login_ok = strcasecmp(Minz_Session::param('mail'), $user_conf->mail_login) === 0;
break;
case 'none':
self::$login_ok = true;
break;
@@ -143,9 +130,6 @@ class FreshRSS_Auth {
Minz_Session::_param('passwordHash');
FreshRSS_FormAuth::deleteCookie();
break;
case 'persona':
Minz_Session::_param('mail');
break;
case 'http_auth':
case 'none':
// Nothing to do...
@@ -170,7 +154,7 @@ class FreshRSS_Auth {
public static function accessNeedsAction() {
$conf = Minz_Configuration::get('system');
$auth_type = $conf->auth_type;
return $auth_type === 'form' || $auth_type === 'persona';
return $auth_type === 'form';
}
}

View File

@@ -95,11 +95,6 @@ class FreshRSS_ConfigurationSetter {
$data['language'] = $value;
}
private function _mail_login(&$data, $value) {
$value = filter_var($value, FILTER_VALIDATE_EMAIL);
$data['mail_login'] = $value ? $value : '';
}
private function _old_entries(&$data, $value) {
$value = intval($value);
$data['old_entries'] = $value > 0 ? $value : 3;
@@ -278,7 +273,7 @@ class FreshRSS_ConfigurationSetter {
private function _auth_type(&$data, $value) {
$value = strtolower($value);
if (!in_array($value, array('form', 'http_auth', 'persona', 'none'))) {
if (!in_array($value, array('form', 'http_auth', 'none'))) {
$value = 'none';
}
$data['auth_type'] = $value;

View File

@@ -11,7 +11,7 @@ class FreshRSS_EntryDAO extends Minz_ModelPdo implements FreshRSS_Searchable {
}
protected function addColumn($name) {
Minz_Log::debug('FreshRSS_EntryDAO::autoAddColumn: ' . $name);
Minz_Log::warning('FreshRSS_EntryDAO::addColumn: ' . $name);
$hasTransaction = false;
try {
$stm = null;
@@ -38,7 +38,7 @@ class FreshRSS_EntryDAO extends Minz_ModelPdo implements FreshRSS_Searchable {
return $stm && $stm->execute();
}
} catch (Exception $e) {
Minz_Log::debug('FreshRSS_EntryDAO::autoAddColumn error: ' . $e->getMessage());
Minz_Log::error('FreshRSS_EntryDAO::addColumn error: ' . $e->getMessage());
if ($hasTransaction) {
$this->bd->rollBack();
}
@@ -46,9 +46,44 @@ class FreshRSS_EntryDAO extends Minz_ModelPdo implements FreshRSS_Searchable {
return false;
}
protected function autoAddColumn($errorInfo) {
private $triedUpdateToUtf8mb4 = false;
protected function updateToUtf8mb4() {
if ($this->triedUpdateToUtf8mb4) {
return false;
}
$this->triedUpdateToUtf8mb4 = true;
$db = FreshRSS_Context::$system_conf->db;
if ($db['type'] === 'mysql') {
include_once(APP_PATH . '/SQL/install.sql.mysql.php');
if (defined('SQL_UPDATE_UTF8MB4')) {
Minz_Log::warning('Updating MySQL to UTF8MB4...');
$hadTransaction = $this->bd->inTransaction();
if ($hadTransaction) {
$this->bd->commit();
}
$ok = false;
try {
$sql = sprintf(SQL_UPDATE_UTF8MB4, $this->prefix, $db['base']);
$stm = $this->bd->prepare($sql);
$ok = $stm->execute();
} catch (Exception $e) {
Minz_Log::error('FreshRSS_EntryDAO::updateToUtf8mb4 error: ' . $e->getMessage());
}
if ($hadTransaction) {
$this->bd->beginTransaction();
//NB: Transaction not starting. Why? (tested on PHP 7.0.8-0ubuntu and MySQL 5.7.13-0ubuntu)
}
return $ok;
}
}
return false;
}
protected function autoUpdateDb($errorInfo) {
if (isset($errorInfo[0])) {
if ($errorInfo[0] == '42S22') { //ER_BAD_FIELD_ERROR
if ($errorInfo[0] === '42S22') { //ER_BAD_FIELD_ERROR
//autoAddColumn
foreach (array('lastSeen', 'hash') as $column) {
if (stripos($errorInfo[2], $column) !== false) {
return $this->addColumn($column);
@@ -56,6 +91,11 @@ class FreshRSS_EntryDAO extends Minz_ModelPdo implements FreshRSS_Searchable {
}
}
}
if (isset($errorInfo[1])) {
if ($errorInfo[1] == '1366') { //ER_TRUNCATED_WRONG_VALUE_FOR_FIELD
return $this->updateToUtf8mb4();
}
}
return false;
}
@@ -94,7 +134,7 @@ class FreshRSS_EntryDAO extends Minz_ModelPdo implements FreshRSS_Searchable {
return $this->bd->lastInsertId();
} else {
$info = $this->addEntryPrepared == null ? array(0 => '', 1 => '', 2 => 'syntax error') : $this->addEntryPrepared->errorInfo();
if ($this->autoAddColumn($info)) {
if ($this->autoUpdateDb($info)) {
return $this->addEntry($valuesTmp);
} elseif ((int)($info[0] / 1000) !== 23) { //Filter out "SQLSTATE Class code 23: Constraint Violation" because of expected duplicate entries
Minz_Log::error('SQL error addEntry: ' . $info[0] . ': ' . $info[1] . ' ' . $info[2]
@@ -145,7 +185,7 @@ class FreshRSS_EntryDAO extends Minz_ModelPdo implements FreshRSS_Searchable {
return $this->bd->lastInsertId();
} else {
$info = $this->updateEntryPrepared == null ? array(0 => '', 1 => '', 2 => 'syntax error') : $this->updateEntryPrepared->errorInfo();
if ($this->autoAddColumn($info)) {
if ($this->autoUpdateDb($info)) {
return $this->updateEntry($valuesTmp);
}
Minz_Log::error('SQL error updateEntry: ' . $info[0] . ': ' . $info[1] . ' ' . $info[2]
@@ -615,7 +655,7 @@ class FreshRSS_EntryDAO extends Minz_ModelPdo implements FreshRSS_Searchable {
return $result;
} else {
$info = $stm == null ? array(0 => '', 1 => '', 2 => 'syntax error') : $stm->errorInfo();
if ($this->autoAddColumn($info)) {
if ($this->autoUpdateDb($info)) {
return $this->listHashForFeedGuids($id_feed, $guids);
}
Minz_Log::error('SQL error listHashForFeedGuids: ' . $info[0] . ': ' . $info[1] . ' ' . $info[2]
@@ -636,7 +676,7 @@ class FreshRSS_EntryDAO extends Minz_ModelPdo implements FreshRSS_Searchable {
return $stm->rowCount();
} else {
$info = $stm == null ? array(0 => '', 1 => '', 2 => 'syntax error') : $stm->errorInfo();
if ($this->autoAddColumn($info)) {
if ($this->autoUpdateDb($info)) {
return $this->updateLastSeen($id_feed, $guids);
}
Minz_Log::error('SQL error updateLastSeen: ' . $info[0] . ': ' . $info[1] . ' ' . $info[2]
@@ -692,7 +732,9 @@ class FreshRSS_EntryDAO extends Minz_ModelPdo implements FreshRSS_Searchable {
public function optimizeTable() {
$sql = 'OPTIMIZE TABLE `' . $this->prefix . 'entry`'; //MySQL
$stm = $this->bd->prepare($sql);
$stm->execute();
if ($stm) {
return $stm->execute();
}
}
public function size($all = false) {

View File

@@ -2,17 +2,17 @@
define('SQL_CREATE_TABLES', '
CREATE TABLE IF NOT EXISTS `%1$scategory` (
`id` SMALLINT NOT NULL AUTO_INCREMENT, -- v0.7
`name` varchar(255) NOT NULL,
`name` varchar(191) NOT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY (`name`) -- v0.7
) DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci
) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci
ENGINE = INNODB;
CREATE TABLE IF NOT EXISTS `%1$sfeed` (
`id` SMALLINT NOT NULL AUTO_INCREMENT, -- v0.7
`url` varchar(511) CHARACTER SET latin1 NOT NULL,
`category` SMALLINT DEFAULT 0, -- v0.7
`name` varchar(255) NOT NULL,
`name` varchar(191) NOT NULL,
`website` varchar(255) CHARACTER SET latin1,
`description` text,
`lastUpdate` int(11) DEFAULT 0, -- Until year 2038
@@ -30,7 +30,7 @@ CREATE TABLE IF NOT EXISTS `%1$sfeed` (
INDEX (`name`), -- v0.7
INDEX (`priority`), -- v0.7
INDEX (`keep_history`) -- v0.7
) DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci
) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci
ENGINE = INNODB;
CREATE TABLE IF NOT EXISTS `%1$sentry` (
@@ -53,7 +53,7 @@ CREATE TABLE IF NOT EXISTS `%1$sentry` (
INDEX (`is_favorite`), -- v0.7
INDEX (`is_read`), -- v0.7
INDEX `entry_lastSeen_index` (`lastSeen`) -- v1.1.1
) DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci
) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci
ENGINE = INNODB;
INSERT IGNORE INTO `%1$scategory` (id, name) VALUES(1, "%2$s");
@@ -62,3 +62,24 @@ INSERT IGNORE INTO `%1$sfeed` (url, category, name, website, description, ttl) V
');
define('SQL_DROP_TABLES', 'DROP TABLES %1$sentry, %1$sfeed, %1$scategory');
define('SQL_UPDATE_UTF8MB4', '
ALTER DATABASE `%2$s` CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
ALTER TABLE `%1$scategory` CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
UPDATE `%1$scategory` SET name=SUBSTRING(name,1,190) WHERE LENGTH(name) > 191;
ALTER TABLE `%1$scategory` MODIFY `name` VARCHAR(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL;
OPTIMIZE TABLE `%1$scategory`;
ALTER TABLE `%1$sfeed` CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
UPDATE `%1$sfeed` SET name=SUBSTRING(name,1,190) WHERE LENGTH(name) > 191;
ALTER TABLE `%1$sfeed` MODIFY `name` VARCHAR(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL;
ALTER TABLE `%1$sfeed` MODIFY `description` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
OPTIMIZE TABLE `%1$sfeed`;
ALTER TABLE `%1$sentry` CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
ALTER TABLE `%1$sentry` MODIFY `title` VARCHAR(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL;
ALTER TABLE `%1$sentry` MODIFY `author` VARCHAR(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
ALTER TABLE `%1$sentry` MODIFY `tags` VARCHAR(1023) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
OPTIMIZE TABLE `%1$sentry`;
');

View File

@@ -8,7 +8,6 @@ return array(
'form' => 'Webový formulář (tradiční, vyžaduje JavaScript)',
'http' => 'HTTP (pro pokročilé uživatele s HTTPS)',
'none' => 'Žádný (nebezpečné)',
'persona' => 'Mozilla Persona (moderní, vyžaduje JavaScript)',
'title' => 'Přihlášení',
'title_reset' => 'Reset přihlášení',
'token' => 'Authentizační token',
@@ -75,10 +74,6 @@ return array(
'nok' => 'Nemáte PDO nebo některý z podporovaných ovladačů (pdo_mysql, pdo_sqlite).',
'ok' => 'Máte PDO a alespoň jeden z podporovaných ovladačů (pdo_mysql, pdo_sqlite).',
),
'persona' => array(
'nok' => 'Zkontrolujte oprávnění adresáře <em>./data/persona</em>. HTTP server musí mít do tohoto adresáře práva zápisu',
'ok' => 'Oprávnění adresáře Mozilla Persona jsou v pořádku.',
),
'php' => array(
'_' => 'PHP instalace',
'nok' => 'Vaše verze PHP je %s, ale FreshRSS vyžaduje alespoň verzi %s.',
@@ -169,7 +164,6 @@ return array(
'user' => array(
'articles_and_size' => '%s článků (%s)',
'create' => 'Vytvořit nového uživatele',
'email_persona' => 'Email pro přihlášení<br /><small>(pro <a href="https://persona.org/" rel="external">Mozilla Persona</a>)</small>',
'language' => 'Jazyk',
'number' => 'Zatím je vytvořen %d účet',
'numbers' => 'Zatím je vytvořeno %d účtů',

View File

@@ -76,7 +76,6 @@ return array(
'_' => 'Smazání účtu',
'warn' => 'Váš účet bude smazán spolu se všemi souvisejícími daty',
),
'email_persona' => 'Email pro přihlášení<br /><small>(pro <a href="https://persona.org/" rel="external">Mozilla Persona</a>)</small>',
'password_api' => 'Password API<br /><small>(tzn. pro mobilní aplikace)</small>',
'password_form' => 'Heslo<br /><small>(pro přihlášení webovým formulářem)</small>',
'password_format' => 'Alespoň 7 znaků',

View File

@@ -21,7 +21,6 @@ return array(
'success' => 'Jste odhlášen',
),
'no_password_set' => 'Heslo administrátora nebylo nastaveno. Tato funkce není k dispozici.',
'not_persona' => 'Resetovat lze pouze systém Persona.',
),
'conf' => array(
'error' => 'Během ukládání nastavení došlo k chybě',

View File

@@ -24,8 +24,6 @@ return array(
'email' => 'Email',
'keep_logged_in' => 'Zapamatovat přihlášení <small>(1 měsíc)</small>',
'login' => 'Login',
'login_persona' => 'Přihlášení pomocí Persona',
'login_persona_problem' => 'Problém s připojením k Persona?',
'logout' => 'Odhlášení',
'password' => array(
'_' => 'Heslo',
@@ -42,7 +40,6 @@ return array(
'admin' => 'Název administrátorského účtu',
'format' => '<small>maximálně 16 alfanumerických znaků</small>',
),
'will_reset' => 'Přihlašovací systém bude vyresetován: místo sytému Persona bude použito přihlášení formulářem.',
),
'date' => array(
'Apr' => '\\D\\u\\b\\e\\n',

View File

@@ -9,13 +9,11 @@ return array(
'reinstall' => 'Reinstalovat FreshRSS',
),
'auth' => array(
'email_persona' => 'Email pro přihlášení<br /><small>(pro <a href="https://persona.org/" rel="external">Mozilla Persona</a>)</small>',
'form' => 'Webový formulář (tradiční, vyžaduje JavaScript)',
'http' => 'HTTP (pro pokročilé uživatele s HTTPS)',
'none' => 'Žádný (nebezpečné)',
'password_form' => 'Heslo<br /><small>(pro přihlášení webovým formulářem)</small>',
'password_format' => 'Alespoň 7 znaků',
'persona' => 'Mozilla Persona (moderní, vyžaduje JavaScript)',
'type' => 'Způsob přihlášení',
),
'bdd' => array(
@@ -78,10 +76,6 @@ return array(
'nok' => 'Nemáte PDO nebo některý z podporovaných ovladačů (pdo_mysql, pdo_sqlite).',
'ok' => 'Máte PDO a alespoň jeden z podporovaných ovladačů (pdo_mysql, pdo_sqlite).',
),
'persona' => array(
'nok' => 'Zkontrolujte oprávnění adresáře <em>./data/persona</em>. HTTP server musí mít do tohoto adresáře práva zápisu',
'ok' => 'Oprávnění adresáře Mozilla Persona jsou v pořádku.',
),
'php' => array(
'nok' => 'Vaše verze PHP je %s, ale FreshRSS vyžaduje alespoň verzi %s.',
'ok' => 'Vaše verze PHP je %s a je kompatibilní s FreshRSS.',

View File

@@ -8,7 +8,6 @@ return array(
'form' => 'Webformular (traditionell, benötigt JavaScript)',
'http' => 'HTTP (HTTPS für erfahrene Benutzer)',
'none' => 'Keine (gefährlich)',
'persona' => 'Mozilla Persona (modern, benötigt JavaScript)',
'title' => 'Authentifizierung',
'title_reset' => 'Zurücksetzen der Authentifizierung',
'token' => 'Authentifizierungs-Token',
@@ -75,10 +74,6 @@ return array(
'nok' => 'Ihnen fehlt PDO oder einer der unterstützten Treiber (pdo_mysql, pdo_sqlite).',
'ok' => 'Sie haben PDO und mindestens einen der unterstützten Treiber (pdo_mysql, pdo_sqlite).',
),
'persona' => array(
'nok' => 'Überprüfen Sie die Berechtigungen des Verzeichnisses <em>./data/persona</em>. Der HTTP-Server muss Schreibrechte besitzen.',
'ok' => 'Die Berechtigungen des Verzeichnisses <em>./data/persona</em> sind in Ordnung.',
),
'php' => array(
'_' => 'PHP-Installation',
'nok' => 'Ihre PHP-Version ist %s aber FreshRSS benötigt mindestens Version %s.',
@@ -169,7 +164,6 @@ return array(
'user' => array(
'articles_and_size' => '%s Artikel (%s)',
'create' => 'Neuen Benutzer erstellen',
'email_persona' => 'Anmelde-E-Mail-Adresse<br /><small>(für <a href="https://persona.org/" rel="external">Mozilla Persona</a>)</small>',
'language' => 'Sprache',
'number' => 'Es wurde bis jetzt %d Account erstellt',
'numbers' => 'Es wurden bis jetzt %d Accounts erstellt',

View File

@@ -76,7 +76,6 @@ return array(
'_' => 'Accountlöschung',
'warn' => 'Dein Account und alle damit bezogenen Daten werden gelöscht.',
),
'email_persona' => 'Anmelde-E-Mail-Adresse<br /><small>(für <a href="https://persona.org/" rel="external">Mozilla Persona</a>)</small>',
'password_api' => 'Passwort-API<br /><small>(z. B. für mobile Anwendungen)</small>',
'password_form' => 'Passwort<br /><small>(für die Anmeldemethode per Webformular)</small>',
'password_format' => 'mindestens 7 Zeichen',

View File

@@ -21,7 +21,6 @@ return array(
'success' => 'Sie sind abgemeldet',
),
'no_password_set' => 'Administrator-Passwort ist nicht gesetzt worden. Dieses Feature ist nicht verfügbar.',
'not_persona' => 'Nur das Persona-System kann zurückgesetzt werden.',
),
'conf' => array(
'error' => 'Während der Speicherung der Konfiguration trat ein Fehler auf',

View File

@@ -24,8 +24,6 @@ return array(
'email' => 'E-Mail-Adresse',
'keep_logged_in' => 'Eingeloggt bleiben <small>(1 Monat)</small>',
'login' => 'Anmelden',
'login_persona' => 'Anmelden mit Persona',
'login_persona_problem' => 'Verbindungsproblem mit Persona?',
'logout' => 'Abmelden',
'password' => array(
'_' => 'Passwort',
@@ -42,7 +40,6 @@ return array(
'admin' => 'Administrator-Nutzername',
'format' => '<small>maximal 16 alphanumerische Zeichen</small>',
),
'will_reset' => 'Authentifikationssystem wird zurückgesetzt: ein Formular wird anstelle von Persona benutzt.',
),
'date' => array(
'Apr' => '\\A\\p\\r\\i\\l',

View File

@@ -9,13 +9,11 @@ return array(
'reinstall' => 'Neuinstallation von FreshRSS',
),
'auth' => array(
'email_persona' => 'Anmelde-E-Mail-Adresse<br /><small>(für <a href="https://persona.org/" rel="external">Mozilla Persona</a>)</small>',
'form' => 'Webformular (traditionell, benötigt JavaScript)',
'http' => 'HTTP (HTTPS für erfahrene Benutzer)',
'none' => 'Keine (gefährlich)',
'password_form' => 'Passwort<br /><small>(für die Anmeldemethode per Webformular)</small>',
'password_format' => 'mindestens 7 Zeichen',
'persona' => 'Mozilla Persona (modern, benötigt JavaScript)',
'type' => 'Authentifizierungsmethode',
),
'bdd' => array(
@@ -78,10 +76,6 @@ return array(
'nok' => 'Ihnen fehlt PDO oder einer der unterstützten Treiber (pdo_mysql, pdo_sqlite).',
'ok' => 'Sie haben PDO und mindestens einen der unterstützten Treiber (pdo_mysql, pdo_sqlite).',
),
'persona' => array(
'nok' => 'Überprüfen Sie die Berechtigungen des Verzeichnisses <em>./data/persona</em>. Der HTTP-Server muss Schreibrechte besitzen.',
'ok' => 'Die Berechtigungen des Verzeichnisses <em>./data/persona</em> sind in Ordnung.',
),
'php' => array(
'nok' => 'Ihre PHP-Version ist %s aber FreshRSS benötigt mindestens Version %s.',
'ok' => 'Ihre PHP-Version ist %s, welche kompatibel mit FreshRSS ist.',

View File

@@ -8,7 +8,6 @@ return array(
'form' => 'Web form (traditional, requires JavaScript)',
'http' => 'HTTP (for advanced users with HTTPS)',
'none' => 'None (dangerous)',
'persona' => 'Mozilla Persona (modern, requires JavaScript)',
'title' => 'Authentication',
'title_reset' => 'Authentication reset',
'token' => 'Authentication token',
@@ -75,10 +74,6 @@ return array(
'nok' => 'You lack PDO or one of the supported drivers (pdo_mysql, pdo_sqlite).',
'ok' => 'You have PDO and at least one of the supported drivers (pdo_mysql, pdo_sqlite).',
),
'persona' => array(
'nok' => 'Check permissions on <em>./data/persona</em> directory. HTTP server must have rights to write into',
'ok' => 'Permissions on Mozilla Persona directory are good.',
),
'php' => array(
'_' => 'PHP installation',
'nok' => 'Your PHP version is %s but FreshRSS requires at least version %s.',
@@ -169,7 +164,6 @@ return array(
'user' => array(
'articles_and_size' => '%s articles (%s)',
'create' => 'Create new user',
'email_persona' => 'Login mail address<br /><small>(for <a href="https://persona.org/" rel="external">Mozilla Persona</a>)</small>',
'language' => 'Language',
'number' => 'There is %d account created yet',
'numbers' => 'There are %d accounts created yet',

View File

@@ -76,7 +76,6 @@ return array(
'_' => 'Account deletion',
'warn' => 'Your account and all the related data will be deleted.',
),
'email_persona' => 'Login email address<br /><small>(for <a href="https://persona.org/" rel="external">Mozilla Persona</a>)</small>',
'password_api' => 'API password<br /><small>(e.g., for mobile apps)</small>',
'password_form' => 'Password<br /><small>(for the Web-form login method)</small>',
'password_format' => 'At least 7 characters',

View File

@@ -21,7 +21,6 @@ return array(
'success' => 'You are disconnected',
),
'no_password_set' => 'Administrator password hasnt been set. This feature isnt available.',
'not_persona' => 'Only Persona system can be reset.',
),
'conf' => array(
'error' => 'An error occurred during configuration saving',

View File

@@ -24,8 +24,6 @@ return array(
'email' => 'Email address',
'keep_logged_in' => 'Keep me logged in <small>(1 month)</small>',
'login' => 'Login',
'login_persona' => 'Login with Persona',
'login_persona_problem' => 'Connection problem with Persona?',
'logout' => 'Logout',
'password' => array(
'_' => 'Password',
@@ -42,7 +40,6 @@ return array(
'admin' => 'Administrator username',
'format' => '<small>maximum 16 alphanumeric characters</small>',
),
'will_reset' => 'Authentication system will be reset: a form will be used instead of Persona.',
),
'date' => array(
'Apr' => '\\A\\p\\r\\i\\l',

View File

@@ -9,13 +9,11 @@ return array(
'reinstall' => 'Reinstall FreshRSS',
),
'auth' => array(
'email_persona' => 'Login email address<br /><small>(for <a href="https://persona.org/" rel="external">Mozilla Persona</a>)</small>',
'form' => 'Web form (traditional, requires JavaScript)',
'http' => 'HTTP (for advanced users with HTTPS)',
'none' => 'None (dangerous)',
'password_form' => 'Password<br /><small>(for the Web-form login method)</small>',
'password_format' => 'At least 7 characters',
'persona' => 'Mozilla Persona (modern, requires JavaScript)',
'type' => 'Authentication method',
),
'bdd' => array(
@@ -78,10 +76,6 @@ return array(
'nok' => 'You lack PDO or one of the supported drivers (pdo_mysql, pdo_sqlite).',
'ok' => 'You have PDO and at least one of the supported drivers (pdo_mysql, pdo_sqlite).',
),
'persona' => array(
'nok' => 'Check permissions on <em>./data/persona</em> directory. HTTP server must have rights to write into',
'ok' => 'Permissions on Mozilla Persona directory are good.',
),
'php' => array(
'nok' => 'Your PHP version is %s but FreshRSS requires at least version %s.',
'ok' => 'Your PHP version is %s, which is compatible with FreshRSS.',

View File

@@ -8,7 +8,6 @@ return array(
'form' => 'Formulaire (traditionnel, requiert JavaScript)',
'http' => 'HTTP (pour utilisateurs avancés avec HTTPS)',
'none' => 'Aucune (dangereux)',
'persona' => 'Mozilla Persona (moderne, requiert JavaScript)',
'title' => 'Authentification',
'title_reset' => 'Réinitialisation de lauthentification',
'token' => 'Jeton didentification',
@@ -75,10 +74,6 @@ return array(
'nok' => 'Vous ne disposez pas de PDO ou dun des drivers supportés (pdo_mysql, pdo_sqlite).',
'ok' => 'Vous disposez de PDO et dau moins un des drivers supportés (pdo_mysql, pdo_sqlite).',
),
'persona' => array(
'nok' => 'Veuillez vérifier les droits sur le répertoire <em>./data/persona</em>. Le serveur HTTP doit être capable décrire dedans',
'ok' => 'Les droits sur le répertoire de Mozilla Persona sont bons.',
),
'php' => array(
'_' => 'Installation de PHP',
'nok' => 'Votre version de PHP est la %s mais FreshRSS requiert au moins la version %s.',
@@ -169,7 +164,6 @@ return array(
'user' => array(
'articles_and_size' => '%s articles (%s)',
'create' => 'Créer un nouvel utilisateur',
'email_persona' => 'Adresse courriel de connexion<br /><small>(pour <a href="https://persona.org/" rel="external">Mozilla Persona</a>)</small>',
'language' => 'Langue',
'number' => '%d compte a déjà été créé',
'numbers' => '%d comptes ont déjà été créés',

View File

@@ -76,7 +76,6 @@ return array(
'_' => 'Suppression du compte',
'warn' => 'Le compte et toutes les données associées vont être supprimées.',
),
'email_persona' => 'Adresse courriel de connexion<br /><small>(pour <a href="https://persona.org/" rel="external">Mozilla Persona</a>)</small>',
'password_api' => 'Mot de passe API<br /><small>(ex. : pour applis mobiles)</small>',
'password_form' => 'Mot de passe<br /><small>(pour connexion par formulaire)</small>',
'password_format' => '7 caractères minimum',

View File

@@ -21,7 +21,6 @@ return array(
'success' => 'Vous avez été déconnecté',
),
'no_password_set' => 'Aucun mot de passe administrateur na été précisé. Cette fonctionnalité nest pas disponible.',
'not_persona' => 'Seul le système dauthentification Persona peut être réinitialisé.',
),
'conf' => array(
'error' => 'Une erreur est survenue durant la sauvegarde de la configuration',

View File

@@ -24,8 +24,6 @@ return array(
'email' => 'Adresse courriel',
'keep_logged_in' => 'Rester connecté <small>(1 mois)</small>',
'login' => 'Connexion',
'login_persona' => 'Connexion avec Persona',
'login_persona_problem' => 'Problème de connexion à Persona ?',
'logout' => 'Déconnexion',
'password' => array(
'_' => 'Mot de passe',
@@ -42,7 +40,6 @@ return array(
'admin' => 'Nom dutilisateur administrateur',
'format' => '<small>16 caractères alphanumériques maximum</small>',
),
'will_reset' => 'Le système dauthentification va être réinitialisé : un formulaire sera utilisé à la place de Persona.',
),
'date' => array(
'Apr' => '\\a\\v\\r\\i\\l',

View File

@@ -9,13 +9,11 @@ return array(
'reinstall' => 'Réinstaller FreshRSS',
),
'auth' => array(
'email_persona' => 'Adresse courriel de connexion<br /><small>(pour <a href="https://persona.org/" rel="external">Mozilla Persona</a>)</small>',
'form' => 'Formulaire (traditionnel, requiert JavaScript)',
'http' => 'HTTP (pour utilisateurs avancés avec HTTPS)',
'none' => 'Aucune (dangereux)',
'password_form' => 'Mot de passe<br /><small>(pour connexion par formulaire)</small>',
'password_format' => '7 caractères minimum',
'persona' => 'Mozilla Persona (moderne, requiert JavaScript)',
'type' => 'Méthode dauthentification',
),
'bdd' => array(
@@ -78,10 +76,6 @@ return array(
'nok' => 'Vous ne disposez pas de PDO ou dun des drivers supportés (pdo_mysql, pdo_sqlite).',
'ok' => 'Vous disposez de PDO et dau moins un des drivers supportés (pdo_mysql, pdo_sqlite).',
),
'persona' => array(
'nok' => 'Veuillez vérifier les droits sur le répertoire <em>./data/persona</em>. Le serveur HTTP doit être capable décrire dedans',
'ok' => 'Les droits sur le répertoire de Mozilla Persona sont bons.',
),
'php' => array(
'nok' => 'Votre version de PHP est la %s mais FreshRSS requiert au moins la version %s.',
'ok' => 'Votre version de PHP est la %s, qui est compatible avec FreshRSS.',

View File

@@ -8,7 +8,6 @@ return array(
'form' => 'Web form (tradizionale, richiede JavaScript)',
'http' => 'HTTP (per gli utenti avanzati con HTTPS)',
'none' => 'Nessuno (pericoloso)',
'persona' => 'Mozilla Persona (moderno, richiede JavaScript)',
'title' => 'Autenticazione',
'title_reset' => 'Reset autenticazione',
'token' => 'Token di autenticazione',
@@ -75,10 +74,6 @@ return array(
'nok' => 'Manca PDO o uno degli altri driver supportati (pdo_mysql, pdo_sqlite).',
'ok' => 'PDO e altri driver supportati (pdo_mysql, pdo_sqlite).',
),
'persona' => array(
'nok' => 'Verifica i permessi sulla cartella <em>./data/persona</em>. Il server HTTP deve avere i permessi per scriverci dentro',
'ok' => 'I permessi sulla cartella Mozilla Persona sono corretti.',
),
'php' => array(
'_' => 'Installazione PHP',
'nok' => 'Versione PHP %s FreshRSS richiede almeno la versione %s.',
@@ -169,7 +164,6 @@ return array(
'user' => array(
'articles_and_size' => '%s articoli (%s)',
'create' => 'Crea nuovo utente',
'email_persona' => 'Indirizzo mail<br /><small>(Login <a href="https://persona.org/" rel="external">Mozilla Persona</a>)</small>',
'language' => 'Lingua',
'number' => ' %d profilo utente creato',
'numbers' => 'Sono presenti %d profili utente',

View File

@@ -76,7 +76,6 @@ return array(
'_' => 'Cancellazione account',
'warn' => 'Il tuo account e tutti i dati associati saranno cancellati.',
),
'email_persona' => 'Indirizzo email<br /><small>(Login <a href="https://persona.org/" rel="external">Mozilla Persona</a>)</small>',
'password_api' => 'Password API<br /><small>(e.g., per applicazioni mobili)</small>',
'password_form' => 'Password<br /><small>(per il login classico)</small>',
'password_format' => 'Almeno 7 caratteri',

View File

@@ -21,7 +21,6 @@ return array(
'success' => 'Disconnessione effettuata',
),
'no_password_set' => 'Password di amministrazione non impostata. Opzione non disponibile.',
'not_persona' => 'Solo il sistema Mozilla Persona può essere resettato.',
),
'conf' => array(
'error' => 'Si è verificato un errore durante il salvataggio della configurazione',

View File

@@ -24,8 +24,6 @@ return array(
'email' => 'Indirizzo email',
'keep_logged_in' => 'Ricorda i dati <small>(1 mese)</small>',
'login' => 'Accedi',
'login_persona' => 'Accedi con Mozilla Persona',
'login_persona_problem' => 'Problemi di connessione con Mozilla Persona?',
'logout' => 'Esci',
'password' => array(
'_' => 'Password',
@@ -42,7 +40,6 @@ return array(
'admin' => 'Username amministratore',
'format' => '<small>massimo 16 caratteri alfanumerici</small>',
),
'will_reset' => 'Il sistema di autenticazione verrà resettato: un form verrà usato per Mozilla Persona.',
),
'date' => array(
'Apr' => '\\A\\p\\r\\i\\l\\e',

View File

@@ -9,13 +9,11 @@ return array(
'reinstall' => 'Reinstalla FreshRSS',
),
'auth' => array(
'email_persona' => 'Indirizzo mail<br /><small>(per <a href="https://persona.org/" rel="external">Mozilla Persona</a>)</small>',
'form' => 'Web form (tradizionale, richiede JavaScript)',
'http' => 'HTTP (per gli utenti avanzati con HTTPS)',
'none' => 'Nessuno (pericoloso)',
'password_form' => 'Password<br /><small>(per il login tramite Web-form tradizionale)</small>',
'password_format' => 'Almeno 7 caratteri',
'persona' => 'Mozilla Persona (moderno, richiede JavaScript)',
'type' => 'Metodo di autenticazione',
),
'bdd' => array(
@@ -78,10 +76,6 @@ return array(
'nok' => 'Manca PDO o uno degli altri driver supportati (pdo_mysql, pdo_sqlite).',
'ok' => 'PDO e altri driver supportati (pdo_mysql, pdo_sqlite).',
),
'persona' => array(
'nok' => 'Verifica i permessi sulla cartella <em>./data/persona</em>. Il server HTTP deve avere i permessi per scriverci dentro',
'ok' => 'I permessi sulla cartella Mozilla Persona sono corretti.',
),
'php' => array(
'_' => 'Installazione PHP',
'nok' => 'Versione di PHP %s FreshRSS richiede almeno la versione %s.',

View File

@@ -8,7 +8,6 @@ return array(
'form' => 'Web formulier (traditioneel, benodigd JavaScript)',
'http' => 'HTTP (voor geavanceerde gebruikers met HTTPS)',
'none' => 'Geen (gevaarlijk)',
'persona' => 'Mozilla Persona (modern, benodigd JavaScript)',
'title' => 'Authenticatie',
'title_reset' => 'Authenticatie terugzetten',
'token' => 'Authenticatie teken',
@@ -75,10 +74,6 @@ return array(
'nok' => 'U mist PDO of een van de ondersteunde drivers (pdo_mysql, pdo_sqlite).',
'ok' => 'U hebt PDO en ten minste één van de ondersteunde drivers (pdo_mysql, pdo_sqlite).',
),
'persona' => array(
'nok' => 'Controleer de permissies op de <em>./data/persona</em> map. HTTP server moet rechten hebben om hierin te schrijven',
'ok' => 'Permissies op de Mozilla Persona map zijn goed.',
),
'php' => array(
'_' => 'PHP installatie',
'nok' => 'Uw PHP versie is %s maar FreshRSS benodigd tenminste versie %s.',
@@ -169,7 +164,6 @@ return array(
'user' => array(
'articles_and_size' => '%s artikelen (%s)',
'create' => 'Creëer nieuwe gebruiker',
'email_persona' => 'Log in mail adres<br /><small>(voor <a href="https://persona.org/" rel="external">Mozilla Persona</a>)</small>',
'language' => 'Taal',
'number' => 'Er is %d accounts gemaakt',
'numbers' => 'Er zijn %d accounts gemaakt',

View File

@@ -76,7 +76,6 @@ return array(
'_' => 'Account verwijderen',
'warn' => 'Uw account en alle gerelateerde gegvens worden verwijderd.',
),
'email_persona' => 'Log in mail adres<br /><small>(voor <a href="https://persona.org/" rel="external">Mozilla Persona</a>)</small>',
'password_api' => 'Wachtwoord API<br /><small>(e.g., voor mobiele apps)</small>',
'password_form' => 'Wachtwoord<br /><small>(voor de Web-formulier log in methode)</small>',
'password_format' => 'Ten minste 7 tekens',

View File

@@ -21,7 +21,6 @@ return array(
'success' => 'U bent uitgelogd',
),
'no_password_set' => 'Administrateur wachtwoord is niet ingesteld. Deze mogelijkheid is niet beschikbaar.',
'not_persona' => 'Alleen Persona systeem kan worden gereset.',
),
'conf' => array(
'error' => 'Er is een fout opgetreden tijdens het opslaan van de configuratie',

View File

@@ -24,8 +24,6 @@ return array(
'email' => 'Email adres',
'keep_logged_in' => 'Ingelogd blijven voor <small>(1 maand)</small>',
'login' => 'Log in',
'login_persona' => 'Login met Persona',
'login_persona_problem' => 'Connectiviteits problemen met Persona',
'logout' => 'Log uit',
'password' => array(
'_' => 'Wachtwoord',
@@ -42,7 +40,6 @@ return array(
'admin' => 'Administrator gebruikersnaam',
'format' => '<small>maximaal 16 alphanumerieke tekens</small>',
),
'will_reset' => 'Het authenticatie system zal worden gereset: een formulier zal worden gebruikt in plaats van Persona.',
),
'date' => array(
'Apr' => '\\A\\p\\r\\i\\l',

View File

@@ -9,13 +9,11 @@ return array(
'reinstall' => 'Installeer FreshRSS opnieuw',
),
'auth' => array(
'email_persona' => 'Log in mail adres<br /><small>(voor <a href="https://persona.org/" rel="external">Mozilla Persona</a>)</small>',
'form' => 'Web formulier (traditioneel, benodigd JavaScript)',
'http' => 'HTTP (voor geavanceerde gebruikers met HTTPS)',
'none' => 'Geen (gevaarlijk)',
'password_form' => 'Wachtwoord<br /><small>(voor de Web-formulier log in methode)</small>',
'password_format' => 'Tenminste 7 tekens',
'persona' => 'Mozilla Persona (modern, benodigd JavaScript)',
'type' => 'Authenticatie methode',
),
'bdd' => array(
@@ -78,10 +76,6 @@ return array(
'nok' => 'U mist PDO of één van de ondersteunde (pdo_mysql, pdo_sqlite).',
'ok' => 'U hebt PDO en ten minste één van de ondersteunde drivers (pdo_mysql, pdo_sqlite).',
),
'persona' => array(
'nok' => 'Controleer permissies van de <em>./data/persona</em> map. HTTP server moet rechten hebben om er in te kunnen schrijven',
'ok' => 'Permissies van de Mozilla Persona map zijn goed.',
),
'php' => array(
'nok' => 'Uw PHP versie is %s maar FreshRSS benodigd tenminste versie %s.',
'ok' => 'Uw PHP versie is %s, welke compatibel is met FreshRSS.',

View File

@@ -8,7 +8,6 @@ return array(
'form' => 'На основе веб-формы (традиционный, необходим JavaScript)',
'http' => 'HTTP (для продвинутых пользователей - по HTTPS)',
'none' => 'Без аутентификации (небезопасный)',
'persona' => 'Mozilla Persona (новый, необходим JavaScript)',
'title' => 'Аутентификации',
'title_reset' => 'Сброс аутентицикации',
'token' => 'Токен аутентификации',
@@ -75,10 +74,6 @@ return array(
'nok' => 'У вас не установлен PDO или один из необходимых драйверов (pdo_mysql, pdo_sqlite).',
'ok' => 'У вас установлен PDO и как минимум один из поддерживаемых драйверов (pdo_mysql, pdo_sqlite).',
),
'persona' => array(
'nok' => 'Проверьте права доступа к папке <em>./data/persona</em> . Сервер HTTP должен иметь права на запись в эту папку.',
'ok' => 'Права на папку Mozilla Persona в порядке.',
),
'php' => array(
'_' => 'PHP installation',
'nok' => 'У вас установлен PHP версии %s, но FreshRSS необходима версия не ниже %s.',
@@ -169,7 +164,6 @@ return array(
'user' => array(
'articles_and_size' => '%s статей (%s)',
'create' => 'Создать нового пользователя',
'email_persona' => 'Адрес электронной почты для входа<br /><small>(for <a href="https://persona.org/" rel="external">Mozilla Persona</a>)</small>',
'language' => 'Язык',
'number' => 'На данный момент создан %d аккаунт',
'numbers' => 'На данный момент аккаунтов создано: %d',

View File

@@ -76,7 +76,6 @@ return array(
'_' => 'Account deletion',
'warn' => 'Your account and all the related data will be deleted.',
),
'email_persona' => 'Login email address<br /><small>(for <a href="https://persona.org/" rel="external">Mozilla Persona</a>)</small>',
'password_api' => 'Password API<br /><small>(e.g., for mobile apps)</small>',
'password_form' => 'Password<br /><small>(for the Web-form login method)</small>',
'password_format' => 'At least 7 characters',

View File

@@ -21,7 +21,6 @@ return array(
'success' => 'You are disconnected',
),
'no_password_set' => 'Administrator password hasnt been set. This feature isnt available.',
'not_persona' => 'Only Persona system can be reset.',
),
'conf' => array(
'error' => 'An error occurred during configuration saving',

View File

@@ -24,8 +24,6 @@ return array(
'email' => 'Email address',
'keep_logged_in' => 'Keep me logged in <small>(1 month)</small>',
'login' => 'Login',
'login_persona' => 'Login with Persona',
'login_persona_problem' => 'Connection problem with Persona?',
'logout' => 'Logout',
'password' => array(
'_' => 'Password',
@@ -42,7 +40,6 @@ return array(
'admin' => 'Administrator username',
'format' => '<small>maximum 16 alphanumeric characters</small>',
),
'will_reset' => 'Authentication system will be reset: a form will be used instead of Persona.',
),
'date' => array(
'Apr' => '\\A\\p\\r\\i\\l',

View File

@@ -9,13 +9,11 @@ return array(
'reinstall' => 'Переустановить FreshRSS',
),
'auth' => array(
'email_persona' => 'Почта (логин) для <br /><small>(for <a href="https://persona.org/" rel="external">Mozilla Persona</a>)</small>',
'form' => 'Вэб-форма (традиционный, необходим JavaScript)',
'http' => 'HTTP (для продвинутых пользователей с HTTPS)',
'none' => 'Никакого (опасно)',
'password_form' => 'Пароль<br /><small>(для метода аутентификации на Вэб-формах)</small>',
'password_format' => 'Как минимум 7 букв',
'persona' => 'Mozilla Persona (современный, необходим JavaScript)',
'type' => 'Метод аутентификации',
),
'bdd' => array(
@@ -74,10 +72,6 @@ return array(
'nok' => 'У вас не установлен PDO или один из необходимых драйверов (pdo_mysql, pdo_sqlite).',
'ok' => 'У вас установлен PDO и как минимум один из поддерживаемых драйверов (pdo_mysql, pdo_sqlite).',
),
'persona' => array(
'nok' => 'Проверьте права доступа к папке <em>./data/persona</em> . Сервер HTTP должен иметь права на запись в эту папку.',
'ok' => 'Права на папку Mozilla Persona в порядке.',
),
'php' => array(
'nok' => 'У вас установлен PHP версии %s, но FreshRSS необходима версия не ниже %s.',
'ok' => 'У вас установлен PHP версии %s, который совместим с FreshRSS.',

View File

@@ -8,7 +8,6 @@ return array(
'form' => 'Web formu (geleneksel, JavaScript gerektirir)',
'http' => 'HTTP (ileri kullanıcılar için, HTTPS)',
'none' => 'Hiçbiri (tehlikeli)',
'persona' => 'Mozilla Persona (modern, JavaScript gerektirir)',
'title' => 'Kimlik doğrulama',
'title_reset' => 'Kimlik doğrulama sıfırla',
'token' => 'Kimlik doğrulama işareti',
@@ -75,10 +74,6 @@ return array(
'nok' => 'PDO veya PDO destekli bir sürücü eksik (pdo_mysql, pdo_sqlite).',
'ok' => 'PDO sorunsuz (pdo_mysql, pdo_sqlite).',
),
'persona' => array(
'nok' => '<em>./data/persona</em> klasör yetkisini kontrol edin. HTTP yazma yetkisi olmalı',
'ok' => 'Mozilla Persona klasörü yetkileri sorunsuz.',
),
'php' => array(
'_' => 'PHP kurulumu',
'nok' => 'PHP versiyonunuz %s fakat FreshRSS için gerekli olan en düşük sürüm %s.',
@@ -169,7 +164,6 @@ return array(
'user' => array(
'articles_and_size' => '%s makale (%s)',
'create' => 'Yeni kullanıcı oluştur',
'email_persona' => 'Giriş email adresi<br /><small>(<a href="https://persona.org/" rel="external">Mozilla Persona</a> için)</small>',
'language' => 'Dil',
'number' => 'Oluşturulmuş %d hesap var',
'numbers' => 'Oluşturulmuş %d hesap var',

View File

@@ -76,7 +76,6 @@ return array(
'_' => 'Hesap silme',
'warn' => 'Hesabınız ve tüm verileriniz silinecek.',
),
'email_persona' => 'Giriş email adresi<br /><small>(<a href="https://persona.org/" rel="external">Mozilla Persona</a> için)</small>',
'password_api' => 'API Şifresi<br /><small>(ör. mobil uygulamalar için)</small>',
'password_form' => 'Şifre<br /><small>(Tarayıcı girişi için)</small>',
'password_format' => 'En az 7 karakter',

View File

@@ -21,7 +21,6 @@ return array(
'success' => 'Bağlantı koptu',
),
'no_password_set' => 'Yönetici şifresi ayarlanmadı. Bu özellik kullanıma uygun değil.',
'not_persona' => 'Sadece Persona sistem sıfırlanabilir.',
),
'conf' => array(
'error' => 'Yapılandırma ayarları kaydedilirken hata oluştu',

View File

@@ -24,8 +24,6 @@ return array(
'email' => 'Email adresleri',
'keep_logged_in' => '<small>(1 ay)</small> oturumu açık tut',
'login' => 'Giriş',
'login_persona' => 'Persona ile giriş yap',
'login_persona_problem' => 'Persona ile bağlantı sorununuz mu var ?',
'logout' => ıkış',
'password' => array(
'_' => 'Şifre',
@@ -42,7 +40,6 @@ return array(
'admin' => 'Yönetici kullanıcı adı',
'format' => '<small>en fazla 16 alfanümerik karakter</small>',
),
'will_reset' => 'Kimlik doğrulama sistemi sıfırlanacak: Persone yerine bir form kullanılacak.',
),
'date' => array(
'Apr' => '\\N\\i\\s\\a\\n',

View File

@@ -9,13 +9,11 @@ return array(
'reinstall' => 'FreshRSS i yeniden yükle',
),
'auth' => array(
'email_persona' => 'Giriş email adresi<br /><small>(<a href="https://persona.org/" rel="external">Mozilla Persona</a> için)</small>',
'form' => 'Web formu (geleneksel, JavaScript gerektirir)',
'http' => 'HTTP (ileri kullanıcılar için, HTTPS)',
'none' => 'Hiçbiri (tehlikeli)',
'password_form' => 'Şifre<br /><small>(Tarayıcı girişi için)</small>',
'password_format' => 'En az 7 karakter',
'persona' => 'Mozilla Persona (modern, JavaScript gerektirir)',
'type' => 'Kimlik doğrulama yöntemi',
),
'bdd' => array(
@@ -78,10 +76,6 @@ return array(
'nok' => 'PDO veya PDO destekli bir sürücü eksik (pdo_mysql, pdo_sqlite).',
'ok' => 'PDO sorunsuz (pdo_mysql, pdo_sqlite).',
),
'persona' => array(
'nok' => '<em>./data/persona</em> klasör yetkisini kontrol edin. HTTP yazma yetkisi olmalı',
'ok' => 'Mozilla Persona klasörü yetkileri sorunsuz.',
),
'php' => array(
'nok' => 'PHP versiyonunuz %s fakat FreshRSS için gerekli olan en düşük sürüm %s.',
'ok' => 'PHP versiyonunuz %s, FreshRSS ile tam uyumlu.',

View File

@@ -19,7 +19,7 @@ if (isset($_GET['step'])) {
define('STEP', 0);
}
define('SQL_CREATE_DB', 'CREATE DATABASE IF NOT EXISTS %1$s DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci;');
define('SQL_CREATE_DB', 'CREATE DATABASE IF NOT EXISTS %1$s DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;');
if (STEP === 3 && isset($_POST['type'])) {
$_SESSION['bd_type'] = $_POST['type'];
@@ -103,7 +103,6 @@ function saveStep1() {
$_SESSION['title'] = $system_conf->title;
$_SESSION['auth_type'] = $system_conf->auth_type;
$_SESSION['old_entries'] = $user_conf->old_entries;
$_SESSION['mail_login'] = $user_conf->mail_login;
$_SESSION['default_user'] = $current_user;
$_SESSION['passwordHash'] = $user_conf->passwordHash;
@@ -128,7 +127,6 @@ function saveStep2() {
$_SESSION['old_entries'] = param('old_entries', $user_default_config->old_entries);
$_SESSION['auth_type'] = param('auth_type', 'form');
$_SESSION['default_user'] = substr(preg_replace('/[^a-zA-Z0-9]/', '', param('default_user', '')), 0, 16);
$_SESSION['mail_login'] = filter_var(param('mail_login', ''), FILTER_VALIDATE_EMAIL);
$password_plain = param('passwordPlain', false);
if ($password_plain !== false && cryptAvailable()) {
@@ -146,8 +144,7 @@ function saveStep2() {
return false;
}
if (($_SESSION['auth_type'] === 'form' && empty($_SESSION['passwordHash'])) ||
($_SESSION['auth_type'] === 'persona' && empty($_SESSION['mail_login']))) {
if ($_SESSION['auth_type'] === 'form' && empty($_SESSION['passwordHash'])) {
return false;
}
@@ -157,15 +154,11 @@ function saveStep2() {
}
$token = '';
if ($_SESSION['mail_login']) {
$token = sha1($_SESSION['salt'] . $_SESSION['mail_login']);
}
$config_array = array(
'language' => $_SESSION['language'],
'theme' => $user_default_config->theme,
'old_entries' => $_SESSION['old_entries'],
'mail_login' => $_SESSION['mail_login'],
'passwordHash' => $_SESSION['passwordHash'],
'token' => $token,
);
@@ -179,12 +172,6 @@ function saveStep2() {
mkdir($user_dir);
file_put_contents($user_config_path, "<?php\n return " . var_export($config_array, true) . ';');
if ($_SESSION['mail_login'] != '') {
$personaFile = join_path(DATA_PATH, 'persona', $_SESSION['mail_login'] . '.txt');
@unlink($personaFile);
file_put_contents($personaFile, $_SESSION['default_user']);
}
header('Location: index.php?step=3');
}
}
@@ -253,7 +240,7 @@ function newPdo() {
case 'mysql':
$str = 'mysql:host=' . $_SESSION['bd_host'] . ';dbname=' . $_SESSION['bd_base'];
$driver_options = array(
PDO::MYSQL_ATTR_INIT_COMMAND => 'SET NAMES utf8',
PDO::MYSQL_ATTR_INIT_COMMAND => 'SET NAMES utf8mb4',
);
break;
case 'sqlite':
@@ -309,7 +296,7 @@ function checkStep0() {
}
function checkStep1() {
$php = version_compare(PHP_VERSION, '5.3.0') >= 0;
$php = version_compare(PHP_VERSION, '5.3.3') >= 0;
$minz = file_exists(join_path(LIB_PATH, 'Minz'));
$curl = extension_loaded('curl');
$pdo_mysql = extension_loaded('pdo_mysql');
@@ -324,7 +311,6 @@ function checkStep1() {
$cache = CACHE_PATH && is_writable(CACHE_PATH);
$users = USERS_PATH && is_writable(USERS_PATH);
$favicons = is_writable(join_path(DATA_PATH, 'favicons'));
$persona = is_writable(join_path(DATA_PATH, 'persona'));
$http_referer = is_referer_from_same_domain();
return array(
@@ -343,10 +329,9 @@ function checkStep1() {
'cache' => $cache ? 'ok' : 'ko',
'users' => $users ? 'ok' : 'ko',
'favicons' => $favicons ? 'ok' : 'ko',
'persona' => $persona ? 'ok' : 'ko',
'http_referer' => $http_referer ? 'ok' : 'ko',
'all' => $php && $minz && $curl && $pdo && $pcre && $ctype && $dom && $xml &&
$data && $cache && $users && $favicons && $persona && $http_referer ?
$data && $cache && $users && $favicons && $http_referer ?
'ok' : 'ko'
);
}
@@ -380,7 +365,6 @@ function freshrss_already_installed() {
function checkStep2() {
$conf = !empty($_SESSION['old_entries']) &&
isset($_SESSION['mail_login']) &&
!empty($_SESSION['default_user']);
$form = (
@@ -388,11 +372,6 @@ function checkStep2() {
($_SESSION['auth_type'] != 'form' || !empty($_SESSION['passwordHash']))
);
$persona = (
isset($_SESSION['auth_type']) &&
($_SESSION['auth_type'] != 'persona' || !empty($_SESSION['mail_login']))
);
$defaultUser = empty($_POST['default_user']) ? null : $_POST['default_user'];
if ($defaultUser === null) {
$defaultUser = empty($_SESSION['default_user']) ? '' : $_SESSION['default_user'];
@@ -402,9 +381,8 @@ function checkStep2() {
return array(
'conf' => $conf ? 'ok' : 'ko',
'form' => $form ? 'ok' : 'ko',
'persona' => $persona ? 'ok' : 'ko',
'data' => $data ? 'ok' : 'ko',
'all' => $conf && $form && $persona && $data ? 'ok' : 'ko'
'all' => $conf && $form && $data ? 'ok' : 'ko'
);
}
@@ -437,7 +415,7 @@ function checkBD() {
switch ($_SESSION['bd_type']) {
case 'mysql':
$driver_options = array(
PDO::MYSQL_ATTR_INIT_COMMAND => 'SET NAMES utf8'
PDO::MYSQL_ATTR_INIT_COMMAND => 'SET NAMES utf8mb4'
);
try { // on ouvre une connexion juste pour créer la base si elle n'existe pas
@@ -536,7 +514,7 @@ function printStep1() {
<?php if ($res['php'] == 'ok') { ?>
<p class="alert alert-success"><span class="alert-head"><?php echo _t('gen.short.ok'); ?></span> <?php echo _t('install.check.php.ok', PHP_VERSION); ?></p>
<?php } else { ?>
<p class="alert alert-error"><span class="alert-head"><?php echo _t('gen.short.damn'); ?></span> <?php echo _t('install.check.php.nok', PHP_VERSION, '5.3.0'); ?></p>
<p class="alert alert-error"><span class="alert-head"><?php echo _t('gen.short.damn'); ?></span> <?php echo _t('install.check.php.nok', PHP_VERSION, '5.3.3'); ?></p>
<?php } ?>
<?php if ($res['minz'] == 'ok') { ?>
@@ -612,12 +590,6 @@ function printStep1() {
<p class="alert alert-error"><span class="alert-head"><?php echo _t('gen.short.damn'); ?></span> <?php echo _t('install.check.favicons.nok', DATA_PATH . '/favicons'); ?></p>
<?php } ?>
<?php if ($res['persona'] == 'ok') { ?>
<p class="alert alert-success"><span class="alert-head"><?php echo _t('gen.short.ok'); ?></span> <?php echo _t('install.check.persona.ok'); ?></p>
<?php } else { ?>
<p class="alert alert-error"><span class="alert-head"><?php echo _t('gen.short.damn'); ?></span> <?php echo _t('install.check.persona.nok', DATA_PATH . '/persona'); ?></p>
<?php } ?>
<?php if ($res['http_referer'] == 'ok') { ?>
<p class="alert alert-success"><span class="alert-head"><?php echo _t('gen.short.ok'); ?></span> <?php echo _t('install.check.http_referer.ok'); ?></p>
<?php } else { ?>
@@ -673,12 +645,11 @@ function printStep2() {
<select id="auth_type" name="auth_type" required="required" tabindex="4">
<?php
function no_auth($auth_type) {
return !in_array($auth_type, array('form', 'persona', 'http_auth', 'none'));
return !in_array($auth_type, array('form', 'http_auth', 'none'));
}
$auth_type = isset($_SESSION['auth_type']) ? $_SESSION['auth_type'] : '';
?>
<option value="form"<?php echo $auth_type === 'form' || (no_auth($auth_type) && cryptAvailable()) ? ' selected="selected"' : '', cryptAvailable() ? '' : ' disabled="disabled"'; ?>><?php echo _t('install.auth.form'); ?></option>
<option value="persona"<?php echo $auth_type === 'persona' ? ' selected="selected"' : ''; ?>><?php echo _t('install.auth.persona'); ?></option>
<option value="http_auth"<?php echo $auth_type === 'http_auth' ? ' selected="selected"' : '', httpAuthUser() == '' ? ' disabled="disabled"' : ''; ?>><?php echo _t('install.auth.http'); ?>(REMOTE_USER = '<?php echo httpAuthUser(); ?>')</option>
<option value="none"<?php echo $auth_type === 'none' || (no_auth($auth_type) && !cryptAvailable()) ? ' selected="selected"' : ''; ?>><?php echo _t('install.auth.none'); ?></option>
</select>
@@ -697,14 +668,6 @@ function printStep2() {
</div>
</div>
<div class="form-group">
<label class="group-name" for="mail_login"><?php echo _t('install.auth.email_persona'); ?></label>
<div class="group-controls">
<input type="email" id="mail_login" name="mail_login" value="<?php echo isset($_SESSION['mail_login']) ? $_SESSION['mail_login'] : ''; ?>" placeholder="alice@example.net" <?php echo $auth_type === 'persona' ? ' required="required"' : ''; ?> tabindex="6"/>
<noscript><b><?php echo _t('gen.js.should_be_activated'); ?></b></noscript>
</div>
</div>
<div class="form-group form-actions">
<div class="group-controls">
<button type="submit" class="btn btn-important" tabindex="7" ><?php echo _t('gen.action.submit'); ?></button>

View File

@@ -10,11 +10,10 @@
<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" data-leave-validation="<?php echo FreshRSS_Context::$system_conf->auth_type; ?>">
<?php if (!in_array(FreshRSS_Context::$system_conf->auth_type, array('form', 'persona', 'http_auth', 'none'))) { ?>
<?php if (!in_array(FreshRSS_Context::$system_conf->auth_type, array('form', 'http_auth', 'none'))) { ?>
<option selected="selected"></option>
<?php } ?>
<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>

View File

@@ -1,28 +0,0 @@
<?php if ($this->res === false) { ?>
<div class="prompt">
<h1><?php echo _t('gen.auth.login'); ?></h1>
<?php if (!max_registrations_reached()) { ?>
<a href="<?php echo _url('auth', 'register'); ?>"><?php echo _t('gen.auth.registration.ask'); ?></a>
<?php } ?>
<p>
<a class="signin btn btn-important" href="<?php echo _url('auth', 'login'); ?>">
<?php echo _i('login'); ?> <?php echo _t('gen.auth.login_persona'); ?>
</a>
<br /><br />
<?php echo _i('help'); ?>
<small>
<a href="<?php echo _url('auth', 'reset'); ?>"><?php echo _t('gen.auth.login_persona_problem'); ?></a>
</small>
</p>
<p><a href="<?php echo _url('index', 'about'); ?>"><?php echo _t('gen.freshrss.about'); ?></a></p>
</div>
<?php
} else {
echo json_encode($this->res);
}
?>

View File

@@ -16,11 +16,6 @@
<noscript><b><?php echo _t('gen.js.should_be_activated'); ?></b></noscript>
</div>
<div>
<label class="group-name" for="new_user_email"><?php echo _t('gen.auth.email'); ?></label>
<input type="email" id="new_user_email" name="new_user_email" class="extend" required="required" autocomplete="off" />
</div>
<div>
<?php
$redirect_url = urlencode(Minz_Url::display(

View File

@@ -1,33 +0,0 @@
<div class="prompt">
<h1><?php echo _t('gen.auth.reset'); ?></h1>
<?php if (!empty($this->message)) { ?>
<p class="alert <?php echo $this->message['status'] === 'bad' ? 'alert-error' : 'alert-warn'; ?>">
<span class="alert-head"><?php echo $this->message['title']; ?></span><br />
<?php echo $this->message['body']; ?>
</p>
<?php } ?>
<?php if (!$this->no_form) { ?>
<form id="crypto-form" method="post" action="<?php echo _url('auth', 'reset'); ?>">
<p class="alert alert-warn">
<span class="alert-head"><?php echo _t('gen.short.attention'); ?></span><br />
<?php echo _t('gen.auth.will_reset'); ?>
</p>
<div>
<label for="username"><?php echo _t('gen.auth.username.admin'); ?></label>
<input type="text" id="username" name="username" size="16" required="required" maxlength="16" pattern="[0-9a-zA-Z]{1,16}" autofocus="autofocus" />
</div>
<div>
<label for="passwordPlain"><?php echo _t('gen.auth.password'); ?></label>
<input type="password" id="passwordPlain" required="required" />
<input type="hidden" id="challenge" name="challenge" /><br />
<noscript><strong><?php echo _t('gen.js.should_be_activated'); ?></strong></noscript>
</div>
<div>
<button id="loginButton" type="submit" class="btn btn-important"><?php echo _t('gen.action.submit'); ?></button>
</div>
</form>
<?php } ?>
</div>

View File

@@ -1,6 +1,5 @@
<?php
$mark = FreshRSS_Context::$user_conf->mark_when;
$mail = Minz_Session::param('mail', false);
$s = FreshRSS_Context::$user_conf->shortcuts;
echo htmlspecialchars(json_encode(array(
'context' => array(
@@ -16,7 +15,6 @@ echo htmlspecialchars(json_encode(array(
'sticky_post' => !!FreshRSS_Context::isStickyPostEnabled(),
'html5_notif_timeout' => FreshRSS_Context::$user_conf->html5_notif_timeout,
'auth_type' => FreshRSS_Context::$system_conf->auth_type,
'current_user_mail' => $mail ? ('"' . $mail . '"') : null,
'current_view' => Minz_Request::actionName(),
),
'shortcuts' => array(

View File

@@ -9,7 +9,7 @@
<p class="alert <?php echo $status ? 'alert-success' : 'alert-error'; ?>">
<?php
if ($key === 'php') {
echo _t('admin.check_install.' . $key . '.' . ($status ? 'ok' : 'nok'), PHP_VERSION, '5.3.0');
echo _t('admin.check_install.' . $key . '.' . ($status ? 'ok' : 'nok'), PHP_VERSION, '5.3.3');
} else {
echo _t('admin.check_install.' . $key . '.' . ($status ? 'ok' : 'nok'));
}

View File

@@ -37,14 +37,6 @@
</div>
</div>
<div class="form-group">
<label class="group-name" for="new_user_email"><?php echo _t('admin.user.email_persona'); ?></label>
<?php $mail = FreshRSS_Context::$user_conf->mail_login; ?>
<div class="group-controls">
<input type="email" id="new_user_email" name="new_user_email" class="extend" autocomplete="off" placeholder="alice@example.net" />
</div>
</div>
<div class="form-group form-actions">
<div class="group-controls">
<button type="submit" class="btn btn-important"><?php echo _t('gen.action.create'); ?></button>

View File

@@ -42,15 +42,6 @@
</div>
<?php } ?>
<div class="form-group">
<label class="group-name" for="mail_login"><?php echo _t('conf.profile.email_persona'); ?></label>
<?php $mail = FreshRSS_Context::$user_conf->mail_login; ?>
<div class="group-controls">
<input type="email" id="mail_login" name="mail_login" class="extend" autocomplete="off" value="<?php echo $mail; ?>" <?php echo FreshRSS_Auth::hasAccess('admin') ? '' : 'disabled="disabled"'; ?> placeholder="alice@example.net" />
<noscript><b><?php echo _t('gen.js.should_be_activated'); ?></b></noscript>
</div>
</div>
<div class="form-group form-actions">
<div class="group-controls">
<button type="submit" class="btn btn-important"><?php echo _t('gen.action.submit'); ?></button>

View File

@@ -40,7 +40,6 @@ return array(
# Login method:
# `none` is without password and shows only the default user;
# `form` is a conventional Web login form;
# `persona` is the email-based login by Mozilla;
# `http_auth` is an access controled by the HTTP Web server (e.g. `/FreshRSS/p/i/.htaccess` for Apache)
# if you use `http_auth`, remember to protect only `/FreshRSS/p/i/`,
# and in particular not protect `/FreshRSS/p/api/` if you would like to use the API (different login system).

View File

@@ -5,7 +5,6 @@ return array (
'old_entries' => 3,
'keep_history_default' => 0,
'ttl_default' => 3600,
'mail_login' => '',
'token' => '',
'passwordHash' => '',
'apiPasswordHash' => '',

View File

@@ -16,7 +16,6 @@ class Minz_ModelPdo {
public static $useSharedBd = true;
private static $sharedBd = null;
private static $sharedPrefix;
private static $has_transaction = false;
private static $sharedCurrentUser;
protected static $sharedDbType;
@@ -60,8 +59,8 @@ class Minz_ModelPdo {
if ($type === 'mysql') {
$string = 'mysql:host=' . $db['host']
. ';dbname=' . $db['base']
. ';charset=utf8';
$driver_options[PDO::MYSQL_ATTR_INIT_COMMAND] = 'SET NAMES utf8';
. ';charset=utf8mb4';
$driver_options[PDO::MYSQL_ATTR_INIT_COMMAND] = 'SET NAMES utf8mb4';
$this->prefix = $db['prefix'] . $currentUser . '_';
} elseif ($type === 'sqlite') {
$string = 'sqlite:' . join_path(DATA_PATH, 'users', $currentUser, 'db.sqlite');
@@ -96,18 +95,15 @@ class Minz_ModelPdo {
public function beginTransaction() {
$this->bd->beginTransaction();
self::$has_transaction = true;
}
public function hasTransaction() {
return self::$has_transaction;
public function inTransaction() {
return $this->bd->inTransaction(); //requires PHP >= 5.3.3
}
public function commit() {
$this->bd->commit();
self::$has_transaction = false;
}
public function rollBack() {
$this->bd->rollBack();
self::$has_transaction = false;
}
public static function clean() {

View File

@@ -440,7 +440,6 @@ function check_install_files() {
'cache' => CACHE_PATH && is_writable(CACHE_PATH),
'users' => USERS_PATH && is_writable(USERS_PATH),
'favicons' => is_writable(DATA_PATH . '/favicons'),
'persona' => is_writable(DATA_PATH . '/persona'),
'tokens' => is_writable(DATA_PATH . '/tokens'),
);
}

View File

@@ -24,18 +24,12 @@ function auth_type_change() {
var auth_type = document.getElementById('auth_type');
if (auth_type) {
var auth_value = auth_type.value,
password_input = document.getElementById('passwordPlain'),
mail_input = document.getElementById('mail_login');
password_input = document.getElementById('passwordPlain');
if (auth_value === 'form') {
password_input.required = true;
mail_input.required = false;
} else if (auth_value === 'persona') {
password_input.required = false;
mail_input.required = true;
} else {
password_input.required = false;
mail_input.required = false;
}
}
}

View File

@@ -1,76 +0,0 @@
"use strict";
function init_persona() {
if (!(navigator.id && window.$ && window.url)) {
if (window.console) {
console.log('FreshRSS (Persona) waiting for JS…');
}
window.setTimeout(init_persona, 100);
return;
}
$('a.signin').click(function() {
navigator.id.request();
return false;
});
$('a.signout').click(function() {
navigator.id.logout();
return false;
});
navigator.id.watch({
loggedInUser: context['current_user_mail'],
onlogin: function(assertion) {
// A user has logged in! Here you need to:
// 1. Send the assertion to your backend for verification and to create a session.
// 2. Update your UI.
$.ajax ({
type: 'POST',
url: url['login'],
data: {assertion: assertion},
success: function(res, status, xhr) {
if (res.status === 'failure') {
openNotification(res.reason, 'bad');
} else if (res.status === 'okay') {
location.href = url['index'];
}
},
error: function(res, status, xhr) {
// alert(res);
}
});
},
onlogout: function() {
// A user has logged out! Here you need to:
// Tear down the user's session by redirecting the user or making a call to your backend.
// Also, make sure loggedInUser will get set to null on the next page load.
// (That's a literal JavaScript null. Not false, 0, or undefined. null.)
$.ajax ({
type: 'POST',
url: url['logout'],
success: function(res, status, xhr) {
location.href = url['index'];
},
error: function(res, status, xhr) {
// alert(res);
}
});
}
});
}
if (document.readyState && document.readyState !== 'loading') {
if (window.console) {
console.log('FreshRSS (Persona) immediate init…');
}
init_persona();
} else if (document.addEventListener) {
document.addEventListener('DOMContentLoaded', function () {
if (window.console) {
console.log('FreshRSS (Persona) waiting for DOMContentLoaded…');
}
init_persona();
}, false);
}