aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Alexandre Alapetite <alexandre.alapetite@alexandra.dk> 2015-07-30 23:43:00 +0200
committerGravatar Alexandre Alapetite <alexandre.alapetite@alexandra.dk> 2015-07-30 23:43:00 +0200
commit27b93e9a9f7002ddb4ce30d4a9ee626e44c8037f (patch)
treefce9e030ca193b93c69aaa172ac47c1b22e7c201
parent2f2facac300b95021406085d5d1701e001a0af65 (diff)
parentf7190c34e1a1ea36bbc81a7dea8dcb7a39cea7cf (diff)
Merge remote-tracking branch 'origin/MinzSessionCookie' into dev
-rw-r--r--CHANGELOG.md11
-rw-r--r--app/Models/ConfigurationSetter.php1
-rw-r--r--app/i18n/cz/admin.php10
-rw-r--r--app/i18n/cz/conf.php4
-rw-r--r--app/i18n/cz/feedback.php2
-rw-r--r--app/i18n/cz/gen.php6
-rw-r--r--app/i18n/cz/install.php8
-rw-r--r--app/i18n/de/admin.php10
-rw-r--r--app/i18n/de/conf.php4
-rw-r--r--app/i18n/de/feedback.php2
-rw-r--r--app/i18n/de/gen.php6
-rw-r--r--app/i18n/de/install.php8
-rw-r--r--constants.php2
-rw-r--r--lib/Minz/Configuration.php28
-rw-r--r--lib/Minz/Session.php7
15 files changed, 56 insertions, 53 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 68a9d0b73..c89b52790 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,6 +1,11 @@
# Changelog
-## 2015-07-xx FreshRSS 1.1.2 (beta)
+## 2015-08-31 FreshRSS 1.1.3-beta
+
+Nothing for the moment.
+
+
+## 2015-07-30 FreshRSS 1.1.2-beta
* Features
* Support for PubSubHubbub for instant notifications from compatible Web sites. [#312](https://github.com/FreshRSS/FreshRSS/issues/312)
@@ -23,6 +28,10 @@
* Fix broken links for extension script / style files. [#862](https://github.com/FreshRSS/FreshRSS/issues/862)
* Load default configuration during installation to avoid hard-coded values. [#890](https://github.com/FreshRSS/FreshRSS/issues/890)
* Fix non-consistent behaviour in Minz_Request::getBaseUrl() and introduce Minz_Request::guessBaseUrl(). [#906](https://github.com/FreshRSS/FreshRSS/issues/906)
+ * Generate `base_url` during the installation and add a `pubsubhubbub_enabled` configuration key. [#865](https://github.com/FreshRSS/FreshRSS/issues/865)
+ * Load configuration by recursion to overwrite array values. [#923](https://github.com/FreshRSS/FreshRSS/issues/923)
+ * Cast `$limits` configuration values in integer. [#925](https://github.com/FreshRSS/FreshRSS/issues/925)
+ * Don't hide errors in configuration. [#920](https://github.com/FreshRSS/FreshRSS/issues/920)
## 2015-05-31 FreshRSS 1.1.1 (beta)
diff --git a/app/Models/ConfigurationSetter.php b/app/Models/ConfigurationSetter.php
index d7378d4d8..992a3a387 100644
--- a/app/Models/ConfigurationSetter.php
+++ b/app/Models/ConfigurationSetter.php
@@ -362,6 +362,7 @@ class FreshRSS_ConfigurationSetter {
continue;
}
+ $value = intval($value);
$limits = $limits_keys[$key];
if (
(!isset($limits['min']) || $value >= $limits['min']) &&
diff --git a/app/i18n/cz/admin.php b/app/i18n/cz/admin.php
index bfa67573e..4ca56cc37 100644
--- a/app/i18n/cz/admin.php
+++ b/app/i18n/cz/admin.php
@@ -160,14 +160,14 @@ return array(
'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' => 'There is %d account created yet', // TODO: translate
- 'numbers' => 'There are %d accounts created yet', // TODO: translate
+ 'number' => 'Zatím je vytvořen %d účet',
+ 'numbers' => 'Zatím je vytvořeno %d účtů',
'password_form' => 'Heslo<br /><small>(pro přihlášení webovým formulářem)</small>',
'password_format' => 'Alespoň 7 znaků',
'registration' => array(
- 'allow' => 'Allow account creation', // TODO: translate
- 'help' => '0 means that there is no account limit', // TODO: translate
- 'number' => 'Max number of accounts', // TODO: translate
+ 'allow' => 'Povolit vytváření účtů',
+ 'help' => '0 znamená žádná omezení účtu',
+ 'number' => 'Maximální počet účtů',
),
'title' => 'Správa uživatelů',
'user_list' => 'Seznam uživatelů',
diff --git a/app/i18n/cz/conf.php b/app/i18n/cz/conf.php
index 859eeac89..823ab1ea3 100644
--- a/app/i18n/cz/conf.php
+++ b/app/i18n/cz/conf.php
@@ -73,8 +73,8 @@ return array(
'profile' => array(
'_' => 'Správa profilu',
'delete' => array(
- '_' => 'Account deletion', // TODO: translate
- 'warn' => 'Your account and all the related data will be deleted.', // TODO: translate
+ '_' => '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>',
diff --git a/app/i18n/cz/feedback.php b/app/i18n/cz/feedback.php
index cf2ee518c..5ba64b938 100644
--- a/app/i18n/cz/feedback.php
+++ b/app/i18n/cz/feedback.php
@@ -102,7 +102,7 @@ return array(
'_' => 'Uživatel %s byl smazán',
'error' => 'Uživatele %s nelze smazat',
),
- 'set_registration' => 'The maximum amount of accounts has been updated.', // TODO: translate
+ 'set_registration' => 'Maximální počet účtů byl změněn',
),
'profile' => array(
'error' => 'Váš profil nelze změnit',
diff --git a/app/i18n/cz/gen.php b/app/i18n/cz/gen.php
index 53127998f..138def772 100644
--- a/app/i18n/cz/gen.php
+++ b/app/i18n/cz/gen.php
@@ -32,9 +32,9 @@ return array(
'format' => '<small>Alespoň 7 znaků</small>',
),
'registration' => array(
- '_' => 'New account', // TODO: translate
- 'ask' => 'Create an account?', // TODO: translate
- 'title' => 'Account creation', // TODO: translate
+ '_' => 'Nový účet',
+ 'ask' => 'Vytvořit účet?',
+ 'title' => 'Vytvoření účtu',
),
'reset' => 'Reset přihlášení',
'username' => array(
diff --git a/app/i18n/cz/install.php b/app/i18n/cz/install.php
index cca717513..a8bc62909 100644
--- a/app/i18n/cz/install.php
+++ b/app/i18n/cz/install.php
@@ -4,9 +4,9 @@ return array(
'action' => array(
'finish' => 'Dokončit instalaci',
'fix_errors_before' => 'Chyby prosím před přechodem na další krok opravte.',
- 'keep_install' => 'Keep previous installation', // TODO: translate
+ 'keep_install' => 'Zachovat předchozí instalaci',
'next_step' => 'Přejít na další krok',
- 'reinstall' => 'Reinstall FreshRSS', // TODO: translate
+ '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>',
@@ -33,7 +33,7 @@ return array(
),
'check' => array(
'_' => 'Kontrola',
- 'already_installed' => 'We have detected that FreshRSS is already installed!', // TODO: translate
+ 'already_installed' => 'Zjistili jsme, že FreshRSS je již nainstalován!',
'cache' => array(
'nok' => 'Zkontrolujte oprávnění adresáře <em>./data/cache</em>. HTTP server musí mít do tohoto adresáře práva zápisu',
'ok' => 'Oprávnění adresáře cache jsou v pořádku.',
@@ -97,7 +97,7 @@ return array(
'fix_errors_before' => 'Chyby prosím před přechodem na další krok opravte.',
'javascript_is_better' => 'Práce s FreshRSS je příjemnější se zapnutým JavaScriptem',
'js' => array(
- 'confirm_reinstall' => 'You will lose your previous configuration by reinstalling FreshRSS. Are you sure you want to continue?', // TODO: translate
+ 'confirm_reinstall' => 'Reinstalací FreshRSS ztratíte předchozí konfiguraci. Opravdu chcete pokračovat?',
),
'language' => array(
'_' => 'Jazyk',
diff --git a/app/i18n/de/admin.php b/app/i18n/de/admin.php
index 667f7af8d..68dcc2ebf 100644
--- a/app/i18n/de/admin.php
+++ b/app/i18n/de/admin.php
@@ -160,14 +160,14 @@ return array(
'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' => 'There is %d account created yet', // TODO: translate
- 'numbers' => 'There are %d accounts created yet', // TODO: translate
+ 'number' => 'Es wurde bis jetzt %d Account erstellt',
+ 'numbers' => 'Es wurden bis jetzt %d Accounts erstellt',
'password_form' => 'Passwort<br /><small>(für die Anmeldemethode per Webformular)</small>',
'password_format' => 'mindestens 7 Zeichen',
'registration' => array(
- 'allow' => 'Allow account creation', // TODO: translate
- 'help' => '0 means that there is no account limit', // TODO: translate
- 'number' => 'Max number of accounts', // TODO: translate
+ 'allow' => 'Erlaube die Accounterstellung',
+ 'help' => '0 meint, dass es kein Account Limit gibt',
+ 'number' => 'Maximale Anzahl von Accounts',
),
'title' => 'Benutzer verwalten',
'user_list' => 'Liste der Benutzer',
diff --git a/app/i18n/de/conf.php b/app/i18n/de/conf.php
index 5313ec3fd..c1a762f12 100644
--- a/app/i18n/de/conf.php
+++ b/app/i18n/de/conf.php
@@ -73,8 +73,8 @@ return array(
'profile' => array(
'_' => 'Profil-Verwaltung',
'delete' => array(
- '_' => 'Account deletion', // TODO: translate
- 'warn' => 'Your account and all the related data will be deleted.', // TODO: translate
+ '_' => '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>',
diff --git a/app/i18n/de/feedback.php b/app/i18n/de/feedback.php
index 61a7d9d61..e92dacfe9 100644
--- a/app/i18n/de/feedback.php
+++ b/app/i18n/de/feedback.php
@@ -102,7 +102,7 @@ return array(
'_' => 'Der Benutzer %s ist gelöscht worden',
'error' => 'Der Benutzer %s kann nicht gelöscht werden',
),
- 'set_registration' => 'The maximum amount of accounts has been updated.', // TODO: translate
+ 'set_registration' => 'Die maximale Anzahl von Accounts wurde aktualisiert.',
),
'profile' => array(
'error' => 'Ihr Profil kann nicht geändert werden',
diff --git a/app/i18n/de/gen.php b/app/i18n/de/gen.php
index f8f4823a6..de2d846c5 100644
--- a/app/i18n/de/gen.php
+++ b/app/i18n/de/gen.php
@@ -32,9 +32,9 @@ return array(
'format' => '<small>mindestens 7 Zeichen</small>',
),
'registration' => array(
- '_' => 'New account', // TODO: translate
- 'ask' => 'Create an account?', // TODO: translate
- 'title' => 'Account creation', // TODO: translate
+ '_' => 'Neuer Account',
+ 'ask' => 'Erstelle einen Account?',
+ 'title' => 'Accounterstellung',
),
'reset' => 'Zurücksetzen der Authentifizierung',
'username' => array(
diff --git a/app/i18n/de/install.php b/app/i18n/de/install.php
index 222c65b32..286272e71 100644
--- a/app/i18n/de/install.php
+++ b/app/i18n/de/install.php
@@ -4,9 +4,9 @@ return array(
'action' => array(
'finish' => 'Installation fertigstellen',
'fix_errors_before' => 'Bitte Fehler korrigieren, bevor zum nächsten Schritt gesprungen wird.',
- 'keep_install' => 'Keep previous installation', // TODO: translate
+ 'keep_install' => 'Vorherige Installation beibehalten (Daten)',
'next_step' => 'Zum nächsten Schritt springen',
- 'reinstall' => 'Reinstall FreshRSS', // TODO: translate
+ '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>',
@@ -33,7 +33,7 @@ return array(
),
'check' => array(
'_' => 'Überprüfungen',
- 'already_installed' => 'We have detected that FreshRSS is already installed!', // TODO: translate
+ 'already_installed' => 'Wir haben festgestellt, dass FreshRSS bereits installiert wurde!',
'cache' => array(
'nok' => 'Überprüfen Sie die Berechtigungen des Verzeichnisses <em>./data/cache</em>. Der HTTP-Server muss Schreibrechte besitzen.',
'ok' => 'Die Berechtigungen des Verzeichnisses <em>./data/cache</em> sind in Ordnung.',
@@ -97,7 +97,7 @@ return array(
'fix_errors_before' => 'Bitte den Fehler korrigieren, bevor zum nächsten Schritt gesprungen wird.',
'javascript_is_better' => 'FreshRSS ist ansprechender mit aktiviertem JavaScript',
'js' => array(
- 'confirm_reinstall' => 'You will lose your previous configuration by reinstalling FreshRSS. Are you sure you want to continue?', // TODO: translate
+ 'confirm_reinstall' => 'Du wirst deine vorherige Konfiguration (Daten) verlieren FreshRSS. Bist du sicher, dass du fortfahren willst?',
),
'language' => array(
'_' => 'Sprache',
diff --git a/constants.php b/constants.php
index d5f0cc06b..dbc594fc3 100644
--- a/constants.php
+++ b/constants.php
@@ -1,5 +1,5 @@
<?php
-define('FRESHRSS_VERSION', '1.1.2-dev');
+define('FRESHRSS_VERSION', '1.1.3-dev');
define('FRESHRSS_WEBSITE', 'http://freshrss.org');
define('FRESHRSS_UPDATE_WEBSITE', 'https://update.freshrss.org?v=' . FRESHRSS_VERSION);
define('FRESHRSS_WIKI', 'http://doc.freshrss.org');
diff --git a/lib/Minz/Configuration.php b/lib/Minz/Configuration.php
index ab5bb4fc2..d695d4a53 100644
--- a/lib/Minz/Configuration.php
+++ b/lib/Minz/Configuration.php
@@ -39,7 +39,7 @@ class Minz_Configuration {
throw new Minz_FileNotExistException($filename);
}
- $data = @include($filename);
+ $data = include($filename);
if (is_array($data)) {
return $data;
} else {
@@ -85,11 +85,6 @@ class Minz_Configuration {
private $data = array();
/**
- * The default values, an empty array by default.
- */
- private $data_default = array();
-
- /**
* An object which help to set good values in configuration.
*/
private $configuration_setter = null;
@@ -119,21 +114,22 @@ class Minz_Configuration {
$configuration_setter = null) {
$this->namespace = $namespace;
$this->config_filename = $config_filename;
+ $this->default_filename = $default_filename;
+ $this->_configurationSetter($configuration_setter);
+
+ if (!is_null($this->default_filename)) {
+ $this->data = self::load($this->default_filename);
+ }
try {
- $this->data = self::load($this->config_filename);
+ $this->data = array_replace_recursive(
+ $this->data, self::load($this->config_filename)
+ );
} catch (Minz_FileNotExistException $e) {
- if (is_null($default_filename)) {
+ if (is_null($this->default_filename)) {
throw $e;
}
}
-
- $this->default_filename = $default_filename;
- if (!is_null($this->default_filename)) {
- $this->data_default = self::load($this->default_filename);
- }
-
- $this->_configurationSetter($configuration_setter);
}
/**
@@ -160,8 +156,6 @@ class Minz_Configuration {
return $this->data[$key];
} elseif (!is_null($default)) {
return $default;
- } elseif (isset($this->data_default[$key])) {
- return $this->data_default[$key];
} else {
Minz_Log::warning($key . ' does not exist in configuration');
return null;
diff --git a/lib/Minz/Session.php b/lib/Minz/Session.php
index 058685ada..14a093bf7 100644
--- a/lib/Minz/Session.php
+++ b/lib/Minz/Session.php
@@ -65,10 +65,9 @@ class Minz_Session {
* @param $l la durée de vie
*/
public static function keepCookie($l) {
- // Get the script_name (e.g. /p/i/index.php) and keep only the path.
- $cookie_dir = empty($_SERVER['SCRIPT_NAME']) ? '' : $_SERVER['SCRIPT_NAME'];
- $cookie_dir = dirname($cookie_dir);
- session_set_cookie_params($l, $cookie_dir, '', false, true);
+ // Get the script_name (e.g. /p/i/index.php) and keep only the path.
+ $cookie_dir = dirname(empty($_SERVER['REQUEST_URI']) ? '/' : dirname($_SERVER['REQUEST_URI']));
+ session_set_cookie_params($l, $cookie_dir, '', false, false);
}