From e49c19ab00451dc0dbfdf4775bcc4ad837019f9e Mon Sep 17 00:00:00 2001
From: Markus Jung
Date: Sat, 18 Jun 2016 22:14:15 +0200
Subject: [PATCH 01/23] Avoid warnings due to non-existant 'en' datepicker
locale
---
app/classes/Framadate/Utils.php | 8 ++++++--
tpl/page.tpl | 2 ++
2 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/app/classes/Framadate/Utils.php b/app/classes/Framadate/Utils.php
index dba51d6..1fae70e 100644
--- a/app/classes/Framadate/Utils.php
+++ b/app/classes/Framadate/Utils.php
@@ -59,8 +59,12 @@ class Utils {
-
-
+ ';
+ if ('en' != $locale) {
+ echo '
+ ';
+ }
+ echo '
';
if (is_file($_SERVER['DOCUMENT_ROOT'] . "/nav/nav.js")) {
echo '';
diff --git a/tpl/page.tpl b/tpl/page.tpl
index 72c4661..db31fb8 100644
--- a/tpl/page.tpl
+++ b/tpl/page.tpl
@@ -17,7 +17,9 @@
+ {if "en" != $locale}
+ {/if}
{block name="header"}{/block}
From 72335e1ec54fa69b1cd872e6fdcef8a8e849bba6 Mon Sep 17 00:00:00 2001
From: Markus Jung
Date: Sat, 18 Jun 2016 22:42:50 +0200
Subject: [PATCH 02/23] Fix divBy0 if all info columns are disabled
---
index.php | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/index.php b/index.php
index eae8073..de725b6 100644
--- a/index.php
+++ b/index.php
@@ -36,7 +36,7 @@ $pollService = new PollService($connect, new $logService());
/* ---- */
$demoPoll = $pollService->findById('aqg259dth55iuhwm');
-$nbcol = $config['show_what_is_that'] + $config['show_the_software'] + $config['show_cultivate_your_garden'];
+$nbcol = max( $config['show_what_is_that'] + $config['show_the_software'] + $config['show_cultivate_your_garden'], 1 );
$smarty->assign('show_what_is_that', $config['show_what_is_that']);
$smarty->assign('show_the_software', $config['show_the_software']);
From a1ca38e269e5177b201035e18b178393ea5f411e Mon Sep 17 00:00:00 2001
From: Markus Jung
Date: Sat, 18 Jun 2016 22:46:02 +0200
Subject: [PATCH 03/23] Update german translation
---
locale/de.json | 148 ++++++++++++++++++++++++-------------------------
1 file changed, 74 insertions(+), 74 deletions(-)
diff --git a/locale/de.json b/locale/de.json
index ce3101c..9034792 100644
--- a/locale/de.json
+++ b/locale/de.json
@@ -50,10 +50,10 @@
"DATE": "%Y-%m-%d",
"MONTH_YEAR": "%B %Y",
"DATETIME": "%Y-%m-%d %H:%M",
- "Add range dates": "DE_Ajout d'un intervalle de dates",
- "Max dates count": "DE_Vous pouvez sélectionner au maximum 4 mois",
- "Start date": "DE_Date de début",
- "End date": "DE_Date de fin"
+ "Add range dates": "Datumsbereich hinzufügen",
+ "Max dates count": "Es können maximal 4 Monate ausgewählt werden",
+ "Start date": "Startdatum",
+ "End date": "Enddatum"
},
"Language selector": {
"Select the language": "Sprache wählen",
@@ -128,10 +128,10 @@
"Cancel the rules edit": "Abbruch, Regeln nicht ändern",
"Results are hidden": "Ergebnisse werden ausgeblendet",
"Results are visible": "Ergebnisse sind sichtbar",
- "Password protected": "DE_Protégé par mot de passe",
- "Votes protected by password": "DE_Votes protégés par mot de passe",
- "No password": "DE_Pas de mot de passe",
- "Remove password": "DE_Supprimer le mot de passe"
+ "Password protected": "Passwortgeschützt",
+ "Votes protected by password": "Wertungen sind passwortgeschützt",
+ "No password": "Kein Passwort",
+ "Remove password": "Passwort entfernen"
},
"Poll results": {
"Votes of the poll": "Stimmabgaben zur Umfrage",
@@ -163,11 +163,11 @@
"Comment added": "Kommentar hinzugefügt"
},
"Password": {
- "Password": "DE_Mot de passe",
- "Wrong password": "DE_Mot de passe incorrect.",
- "Submit access": "DE_Accèder",
- "You have to provide a password to access the poll.": "DE_Vous devez donner le mot de passe pour avoir accès à ce sondage.",
- "You have to provide a password so you can participate to the poll.": "DE_Vous devez donner le mot de passe pour pouvoir participer à ce sondage."
+ "Password": "Passwort",
+ "Wrong password": "Falsches Passwort",
+ "Submit access": "Eingabe bestätigen",
+ "You have to provide a password to access the poll.": "Sie müssen ein Passwort eingeben um auf die Abstimmung zuzugreifen.",
+ "You have to provide a password so you can participate to the poll.": "Sie müssen ein Passwort eingeben um an der Abstimmung teilzunehmen."
},
"studs": {
"If you want to vote in this poll, you have to give your name, choose the values that fit best for you and validate with the plus button at the end of the line.": "Wenn Sie an dieser Umfrage teilnehmen möchten, müssen Sie ihren Namen angeben, die Auswahl treffen, die Ihnen am ehesten zusagt und mit dem Plus-Button am Ende der Zeile bestätigen.",
@@ -179,14 +179,14 @@
"Adding the vote succeeded": "Die Wertung wurde hinzugefügt"
},
"EditLink": {
- "Send": "DE_Envoyer",
- "If you don't want to lose your personalized link, we can send it to your email.": "DE_Afin de ne pas perdre ce lien d'édition de vote, nous pouvons vous l'envoyer par courriel.",
- "The email address is not correct.": "DE_Courriel incorrect.",
- "REMINDER": "DE_RAPPEL",
- "Edit link for poll \"%s\"": "DE_Lien d'édition du sondage \"%s\"",
- "Please wait %d seconds before we can send an email to you then try again.": "DE_Veuillez patienter encore %d seconds avant que nous puissions vous envoyer un email, puis réessayez.",
- "Here is the link for editing your vote:": "DE_Voici le lien pour éditer votre vote :",
- "Your reminder has been successfully sent!": "DE_Votre rappel a été envoyé avec succès !"
+ "Send": "Absenden",
+ "If you don't want to lose your personalized link, we can send it to your email.": "Wenn Sie ihren personalisierten Link nicht verlieren möchten, können wir ihn an Ihre E-Mail-Adresse senden.",
+ "The email address is not correct.": "Die E-Mail-Adresse ist fehlerhaft.",
+ "REMINDER": "HINWEIS",
+ "Edit link for poll \"%s\"": "Link für die Abstimmung \"%s\" bearbeiten",
+ "Please wait %d seconds before we can send an email to you then try again.": "Bitte warten Sie %d Sekunden bis die E-Mail an Sie gesendet werden kann. Versuchen Sie es dann erneut.",
+ "Here is the link for editing your vote:": "Hier ist der Link zum Ändern ihrer Wertung:",
+ "Your reminder has been successfully sent!": "Ihre Erinnerungsnachricht wurde erfolgreich abgesendet."
},
"adminstuds": {
"As poll administrator, you can change all the lines of this poll with this button": "Als Administrator der Umfrage können Sie alle Zeilen der Umfrage über diesen Button ändern",
@@ -209,7 +209,7 @@
"Back to the poll": "Zurück zur Umfrage",
"Add a column": "Spalte hinzufügen",
"Remove the column": "Spalte entfernen",
- "Confirm removal of the column.": "DE_Confirmer la supression de cette colonne.",
+ "Confirm removal of the column.": "Bestätigen Sie die Entfernung der Spalte",
"Column removed": "Spalte entfernt",
"Choice added": "Alternative hinzugefügt",
"Confirm removal of all votes of the poll": "Bestätigen Sie die Entfernung aller Wertungen aus der Umfrage",
@@ -229,19 +229,19 @@
"You are in the poll creation section.": "Hier erstellen Sie die Umfrage",
"Required fields cannot be left blank.": "Mit * markierte Felder müssen ausgefüllt sein.",
"Poll title": "Titel der Umfrage",
- "Poll id": "DE_Identifiant",
- "Poll id rules": "DE_L'identifiant peut contenir des lettres, des chiffres et des tirets \"-\".",
- "Poll id warning": "DE_En définissant un identifiant cela peut faciliter l'accès à ce sondage pour des personnes non désirées. Il est recommandé de le protéger par mot de passe.",
+ "Poll id": "Bezeichner",
+ "Poll id rules": "Der Bezeichner kann Buchstaben, Zahlen und Bindestriche enhalten \"-\".",
+ "Poll id warning": "Mit der Verwendung eines Bezeichners können möglicherweise Personen unerwünscht Zugriff auf die Umfrage erhalten. Es wird empfohlen sie mit einem Passwort zu schützen.",
"Votes cannot be modified": "Wertungen können nicht verändert werden",
"All voters can modify any vote": "Jeder Teilnehmer kann jede abgegebene Wertung ändern",
"Voters can modify their vote themselves": "Teilnehmer können ihre Wertungen verändern",
"To receive an email for each new vote": "Bei jeder neuen Wertung eine E-Mail erhalten",
"To receive an email for each new comment": "Bei jedem neuen Kommentar eine E-Mail erhalten",
"Only the poll maker can see the poll's results": "Einzig der Autor der Abstimmung kann die Ergebnisse einsehen",
- "Use a password to restrict access": "DE_Utiliser un mot de passe pour restreindre l'accès au sondage",
- "The results are publicly visible": "DE_Les résultats sont visibles sans mot de passe",
- "Poll password": "DE_Mot de passe",
- "Confirm password": "DE_Confirmer votre mot de passe",
+ "Use a password to restrict access": "Verwende ein Passwort um den Zugriff zu beschänken",
+ "The results are publicly visible": "Die Ergebnisse sind öffentlich Einsehbar",
+ "Poll password": "Password",
+ "Confirm password": "Passwort bestätigen",
"Go to step 2": "Weiter zum 2. Schritt"
},
"Step 2": {
@@ -286,8 +286,8 @@
"Your poll will be automatically archived in %d days.": "Ihre Umfrage wird automatisch in %d Tage archiviert werden.",
"You can set a closer archiving date for it.": "Sie können das Datum der Archivierung vorverlegen.",
"Archiving date:": "Tag der Archivierung:",
- "Your poll will automatically be archived": "DE_Your poll will automatically be archived",
- "after the last date of your poll.": "DE_after the last date of your poll."
+ "Your poll will automatically be archived": "Ihre Umfrage wird automatisch",
+ "after the last date of your poll.": "nach dem letzten Termin der Abstimmung archiviert."
},
"Admin": {
"Back to administration": "Zurück zur Verwaltung",
@@ -323,11 +323,11 @@
"FindPolls": {
"Send me my polls": "Senden Sie mir mein Umfragen",
"Polls sent": "Umfragen abgeschickt",
- "List of your polls": "DE_Liste de vos sondages",
- "Here is the list of the polls that you manage on %s:": "DE_Voici la liste des sondages que vous administrez sur %s :",
- "Have a good day!": "DE_Bonne journée !",
- "PS: this email has been sent because you – or someone else – asked to get back the polls created with your email address.": "DE_PS : ce mail a été envoyé parce que vous – ou quelqu'un d'autre – a demandé la récupération des sondages créés à l'aide de votre adresse email.",
- "If you weren't the source of this action and if you think this is an abuse of the service, please notify the administrator on %s.": "DE_Si jamais vous n'étiez pas à l'origine de cette action et que vous pensez qu'il s'agit d'un abus, vous pouvez nous le signaler à l'administrateur sur %s."
+ "List of your polls": "Liste Ihrer Umfragen",
+ "Here is the list of the polls that you manage on %s:": "Hier ist die Liste der Umfragen die Sie auf %s verwalten:",
+ "Have a good day!": "Einen schönen Tag noch!",
+ "PS: this email has been sent because you – or someone else – asked to get back the polls created with your email address.": "PS : Diese E-Mail wurde abgeschickt weil Sie – oder jemand anderes – Zugriff auf die mit Ihrer E-Mail-Adresse angelegten Umfragen angefordert hat.",
+ "If you weren't the source of this action and if you think this is an abuse of the service, please notify the administrator on %s.": "Wenn Sie diesen Vorgang nicht veranlasst haben und glauben dass dieser Dienst missbraucht wurde, benachrichtene Sie bitte den Administrator auf %s."
},
"Mail": {
"Poll's participation: %s": "Beteiligung an der Umfrage: %s",
@@ -349,19 +349,19 @@
"For sending to the polled users": "Nachricht für die Teilnehmer"
},
"Installation": {
- "AppMail": "DE_Adresse mail de l'application",
- "AppName": "DE_Nom de l'application",
- "CleanUrl": "DE_URL propres",
- "Database": "DE_Base de données",
- "DbConnectionString": "DE_Chaîne de connexion",
- "DbPassword": "DE_Mot de passe",
- "DbPrefix": "DE_Préfixe",
- "DbUser": "DE_Utilisateur",
- "DefaultLanguage": "DE_Langue par défaut",
- "General": "DE_Général",
+ "AppMail": "E-Mail-Adresse der Anwendung/des Datenbankadministrators",
+ "AppName": "Name der Anwendung",
+ "CleanUrl": "Säubere URLs (boolean)",
+ "Database": "Datenbank",
+ "DbConnectionString": "Name des Datenbankservers, leer lassen um eine lokale Socket-Verbindung zu nutzen",
+ "DbPassword": "Datenbank-Passwort",
+ "DbPrefix": "Tabellen-Präfix",
+ "DbUser": "Datenbank-Nutzername",
+ "DefaultLanguage": "Standardsprache",
+ "General": "Allgemeine Konfiguration",
"Install": "DE_Installer",
- "MigrationTable": "DE_Table de migration",
- "ResponseMail": "DE_Mail de réponse"
+ "MigrationTable": "Name der Tabelle welche den Migrationsstatus speichert",
+ "ResponseMail": "E-Mail-Adresse für automatische Antworten (sollte auf \"no-reply\" gesetzt werden)"
},
"Error": {
"Error!": "Fehler!",
@@ -381,42 +381,42 @@
"The name you've chosen already exist in this poll!": "Der von Ihnen eingegebenen Name existiert schon in dieser Umfrage",
"Enter a name and a comment!": "Geben Sie einen Namen und ein Kommentar ein!",
"Failed to insert the comment!": "Einfügen des Kommentars gescheitert!",
- "Failed to delete the vote!": "DE_Échec de la suppression du vote !",
+ "Failed to delete the vote!": "Löschen der Wertung gescheitert!",
"Framadate is not properly installed, please check the \"INSTALL\" to setup the database before continuing.": "Framadate ist nicht richtig installiert. Bevor Sie fortfahren, beachten Sie bitte die Angaben zum Aufsetzen der Datenbank in \"INSTALL\".",
"Failed to save poll": "Speichern der Umfrage fehlgeschlagen",
"Update vote failed": "Aktualisierung der Wertung fehlgeschlagen",
"Adding vote failed": "Stimmabgabe fehlgeschlagen",
- "You already voted": "DE_Vous avez déjà voté",
- "Poll has been updated before you vote": "DE_Le sondage a été mis à jour avant votre vote",
+ "You already voted": "Sie haben bereits abgestimmt",
+ "Poll has been updated before you vote": "Die Abstimmung wurde vor Ihrer Stimmabgabe aktualisiert",
"Comment failed": "Abgabe des Kommentars gescheitert",
"You can't create a poll with hidden results with the following edition option:": "Sie können mit der folgenden Editier-Option keine Umfrage mit versteckten Ergebnissen erzeugen:",
"Failed to delete column": "Löschen der Spalte fehlgeschlagen",
- "The column already exists": "DE_La colonne existe déjà ",
+ "The column already exists": "Die Spalte existiert bereits",
"MISSING_VALUES": "Fehlende Werte",
"CANT_CONNECT_TO_DATABASE": "Kann nicht mit der Datenbank verbinden",
- "Password is empty": "DE_Le mot de passe est vide.",
- "Passwords do not match": "DE_Les mot de passes ne correspondent pas.",
- "Poll id already used": "DE_L'identifiant est déjà utilisé",
- "You can't select more than %d dates": "DE_Vous ne pouvez pas choisir plus de %d dates",
- "Can't create the config.php file in '%s'.": "DE_Impossible de créer le fichier config.php dans '%s'.",
- "Can't create an empty column.": "DE_Impossible de créer une colonne vide."
+ "Password is empty": "Das Passwort ist leer.",
+ "Passwords do not match": "Die Passwörter stimmen nicht überein.",
+ "Poll id already used": "Der Bezeichner ist bereits in Verwendung",
+ "You can't select more than %d dates": "Es können nicht mehr als %d Termine ausgewählt werden",
+ "Can't create the config.php file in '%s'.": "Kann die config.php nicht in '%s' angelegen.",
+ "Can't create an empty column.": "Kann keine leere Spalte anlegen."
},
"Check": {
- "Installation checking": "DE_Vérifications de l'installation",
- "Your PHP version (%s) is too old. This application needs at least PHP %s.": "DE_Votre version de PHP (%s) est trop vieille. Cette application a besoin de PHP %s au moins.",
- "PHP version %s is enough (needed at least PHP %s).": "DE_Version de PHP %s suffisante (nécessite au moins PHP %s).",
- "You need to enable the PHP Intl extension.": "DE_Vous devez activer l'extension PHP Intl.",
- "PHP Intl extension is enabled.": "DE_L'extension PHP Intl est activée.",
- "The template compile directory (%s) is not writable.": "DE_Le dossier de compilation des templates (%s) n'est pas accessible en écriture.",
- "The template compile directory (%s) is writable.": "DE_Le dossier de compilation des templates (%s) est accessible en écriture.",
- "The config file directory (%s) is not writable and the config file (%s) dos not exists.": "DE_Le dossier du fichier de configuration (%s) n'est pas accessible en écriture et le fichier de configuration (%s) n'éxiste pas.",
- "The config file exists.": "DE_Le fichier de configuration existe.",
- "The config file directory (%s) is writable.": "DE_Le dossier du fichier de configuration (%s) est accessible en écriture.",
- "OpenSSL extension loaded.": "DE_L'extension PHP OpenSSL est chargée.",
- "Consider enabling the PHP extension OpenSSL for increased security.": "DE_Veuillez considérer l'activation de l'extension PHP OpenSSL pour améliorer la sécurité.",
- "date.timezone is set.": "DE_date.timezone est défini.",
- "Consider setting the date.timezone in php.ini.": "DE_Veuillez considérer la définition de date.timezone dans le php.ini.",
- "Check again": "DE_Vérifier à nouveau",
- "Continue the installation": "DE_Continuer l'installation"
+ "Installation checking": "Verifikation der Installation",
+ "Your PHP version (%s) is too old. This application needs at least PHP %s.": "Ihre PHP-Version (%s) ist zu alt. Diese Anwendung benötigt mindestens PHP Version %s.",
+ "PHP version %s is enough (needed at least PHP %s).": "PHP Version %s ist ausreichend (mindestens PHP %s wird benötigt).",
+ "You need to enable the PHP Intl extension.": "Sie müssen die PHP-Erweiterung Intl aktivieren.",
+ "PHP Intl extension is enabled.": "Die PHP-Erweiterung Intl ist aktiviert.",
+ "The template compile directory (%s) is not writable.": "Der Vorlagen-Ãœbersetzungspfad (%s) ist nicht beschreibbar.",
+ "The template compile directory (%s) is writable.": "Der Vorlagen-Ãœbersetzungspfad (%s) ist beschreibbar.",
+ "The config file directory (%s) is not writable and the config file (%s) dos not exists.": "Der Konfigurationspfad (%s) ist nicht beschreibbar und es existiert keine Konfigurationsdatei (%s).",
+ "The config file exists.": "Die Konfigurationsdatei existiert.",
+ "The config file directory (%s) is writable.": "Die Konfigurationsdatei (%s) ist beschreibbar.",
+ "OpenSSL extension loaded.": "Die OpenSSL-Erweiterung ist geladen.",
+ "Consider enabling the PHP extension OpenSSL for increased security.": "Ziehen Sie in Erwägung, für eine verbesserte Sicherheit die OpenSSL-Erweiterung zu aktivieren.",
+ "date.timezone is set.": "date.timezone ist konfiguriert.",
+ "Consider setting the date.timezone in php.ini.": "Ziehen Sie in Erwägung, date.timezone in php.ini zu konfigurieren.",
+ "Check again": "Erneut prüfen",
+ "Continue the installation": "Installation fortsetzen"
}
}
From b69c171d796d9de0c4f993080d2e8c93e3afbb2d Mon Sep 17 00:00:00 2001
From: Erik Martin-Dorel
Date: Mon, 13 Jun 2016 18:48:05 +0200
Subject: [PATCH 04/23] Fix typo in locale/en.json
---
locale/en.json | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/locale/en.json b/locale/en.json
index 6ae4fed..cc49b95 100644
--- a/locale/en.json
+++ b/locale/en.json
@@ -277,7 +277,7 @@
},
"Step 3": {
"Back to step 2": "Back to step 2",
- "Removal date and confirmation (3 on 3)": "Removal date and confirmation (1 of 3)",
+ "Removal date and confirmation (3 on 3)": "Removal date and confirmation (3 of 3)",
"Confirm the creation of your poll": "Confirm the creation of your poll",
"List of your choices": "List of options",
"Once you have confirmed the creation of your poll, you will be automatically redirected on the administration page of your poll.": "Once you have confirmed the creation of your poll, you will automatically be redirected to the poll's administration page.",
From d605a1455c276f3fd9a16770f6b36d4fdd3db675 Mon Sep 17 00:00:00 2001
From: Pierre Rudloff
Date: Tue, 24 May 2016 16:31:54 +0200
Subject: [PATCH 05/23] Valid SPDX license
---
composer.json | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/composer.json b/composer.json
index 9256455..8c88655 100644
--- a/composer.json
+++ b/composer.json
@@ -5,7 +5,7 @@
"poll"
],
"version": "0.9.0",
- "license": "CeCILL-B",
+ "license": "CECILL-B",
"type": "project",
From 318d409464ffa6c2279d6a7184cbe084aaf364cd Mon Sep 17 00:00:00 2001
From: Antonin
Date: Thu, 30 Jun 2016 19:26:45 +0200
Subject: [PATCH 06/23] Merge branch 'editorconfig' into 'master'
Add editorconfig file
See merge request !123
---
.editorconfig | 12 ++++++++++++
1 file changed, 12 insertions(+)
create mode 100644 .editorconfig
diff --git a/.editorconfig b/.editorconfig
new file mode 100644
index 0000000..779f99a
--- /dev/null
+++ b/.editorconfig
@@ -0,0 +1,12 @@
+root = true
+
+[*]
+indent_style = space
+indent_size = 4
+end_of_line = lf
+charset = utf-8
+trim_trailing_whitespace = true
+insert_final_newline = true
+
+[*.md]
+trim_trailing_whitespace = false
From 5862e647d3653254acc869b0cd7db63c4e60a430 Mon Sep 17 00:00:00 2001
From: Olivier Perez
Date: Wed, 4 May 2016 01:36:42 +0200
Subject: [PATCH 07/23] Fix edition limits for expired polls
---
tpl/part/poll_info.tpl | 10 ++++------
1 file changed, 4 insertions(+), 6 deletions(-)
diff --git a/tpl/part/poll_info.tpl b/tpl/part/poll_info.tpl
index 61f3957..3c8f9c6 100644
--- a/tpl/part/poll_info.tpl
+++ b/tpl/part/poll_info.tpl
@@ -102,8 +102,8 @@
{/if}
@@ -199,8 +199,7 @@
{$rule_icon = ''}
{$rule_txt = __('PollInfo', 'Votes and comments are locked')}
{/if}
- {$rule_icon} {$rule_txt|html}{if !$expired} {/if}
- {if !$expired}
+ {$rule_icon} {$rule_txt|html}
@@ -216,7 +215,6 @@
- {/if}
From d3db76ccd79f92cd0bf2ca22814af2479757da03 Mon Sep 17 00:00:00 2001
From: Olivier Perez
Date: Wed, 4 May 2016 01:51:49 +0200
Subject: [PATCH 08/23] Allow admin to delete an expired poll
---
tpl/part/poll_info.tpl | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/tpl/part/poll_info.tpl b/tpl/part/poll_info.tpl
index 3c8f9c6..c568721 100644
--- a/tpl/part/poll_info.tpl
+++ b/tpl/part/poll_info.tpl
@@ -22,7 +22,8 @@
{__('PollInfo', 'Export to CSV')}
- {if $admin && !$expired}
+ {if $admin}
+ {if !$expired}
@@ -32,6 +33,12 @@
+ {else}
+
+ {/if}
{/if}
From fa5014de325bf5cbc821a078129923d299529fc4 Mon Sep 17 00:00:00 2001
From: Olivier Perez
Date: Thu, 30 Jun 2016 20:48:30 +0200
Subject: [PATCH 09/23] Fixed expiry date edition
---
adminstuds.php | 3 +--
app/classes/Framadate/Services/AdminPollService.php | 3 ++-
app/classes/Framadate/Services/InputService.php | 8 +++++++-
3 files changed, 10 insertions(+), 4 deletions(-)
diff --git a/adminstuds.php b/adminstuds.php
index 5750828..cc6f675 100644
--- a/adminstuds.php
+++ b/adminstuds.php
@@ -122,8 +122,7 @@ if (isset($_POST['update_poll_info'])) {
break;
}
} elseif ($field == 'expiration_date') {
- $expiration_date = filter_input(INPUT_POST, 'expiration_date', FILTER_VALIDATE_REGEXP,
- ['options' => ['regexp' => '#^[0-9]{4}-[0-9]{2}-[0-9]{2}$#']]);
+ $expiration_date = $inputService->filterDate($_POST['expiration_date']);
if ($expiration_date) {
$poll->end_date = $expiration_date;
$updated = true;
diff --git a/app/classes/Framadate/Services/AdminPollService.php b/app/classes/Framadate/Services/AdminPollService.php
index 369d13d..2e3f3af 100644
--- a/app/classes/Framadate/Services/AdminPollService.php
+++ b/app/classes/Framadate/Services/AdminPollService.php
@@ -4,6 +4,7 @@ namespace Framadate\Services;
use Framadate\Exception\MomentAlreadyExistsException;
use Framadate\FramaDB;
use Framadate\Repositories\RepositoryFactory;
+use Framadate\Utils;
/**
* Class AdminPollService
@@ -33,7 +34,7 @@ class AdminPollService {
function updatePoll($poll) {
global $config;
- if ($poll->end_date > $poll->creation_date && $poll->end_date <= strtotime($poll->creation_date) + (86400 * $config['default_poll_duration'])) {
+ if ($poll->end_date > $poll->creation_date) {
return $this->pollRepository->update($poll);
} else {
return false;
diff --git a/app/classes/Framadate/Services/InputService.php b/app/classes/Framadate/Services/InputService.php
index 5db7f7e..ebf3c5f 100644
--- a/app/classes/Framadate/Services/InputService.php
+++ b/app/classes/Framadate/Services/InputService.php
@@ -17,6 +17,7 @@
* Auteurs de Framadate/OpenSondage : Framasoft (https://github.com/framasoft)
*/
namespace Framadate\Services;
+use DateTime;
/**
* This class helps to clean all inputs from the users or external services.
@@ -90,6 +91,11 @@ class InputService {
return $this->returnIfNotBlank($comment);
}
+ public function filterDate($date) {
+ $dDate = DateTime::createFromFormat(__('Date', 'datetime_parseformat'), $date)->setTime(0, 0, 0);
+ return $dDate->format('Y-m-d H:i:s');
+ }
+
/**
* Return the value if it's not blank.
*
@@ -107,4 +113,4 @@ class InputService {
return null;
}
-}
\ No newline at end of file
+}
From 2af04c3b1accff957d30561d66e99ff7c854589e Mon Sep 17 00:00:00 2001
From: Antonin
Date: Thu, 30 Jun 2016 23:10:47 +0200
Subject: [PATCH 10/23] Removing php escape and completing template ones.
---
app/classes/Framadate/Utils.php | 2 +-
tpl/create_poll.tpl | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/app/classes/Framadate/Utils.php b/app/classes/Framadate/Utils.php
index 1fae70e..4f2997f 100644
--- a/app/classes/Framadate/Utils.php
+++ b/app/classes/Framadate/Utils.php
@@ -190,7 +190,7 @@ class Utils {
}
public static function fromPostOrDefault($postKey, $default = '') {
- return !empty($_POST[$postKey]) ? Utils::htmlEscape($_POST[$postKey]) : $default;
+ return !empty($_POST[$postKey]) ? $_POST[$postKey] : $default;
}
public static function base64url_encode($input) {
diff --git a/tpl/create_poll.tpl b/tpl/create_poll.tpl
index 3e42d9b..780431e 100644
--- a/tpl/create_poll.tpl
+++ b/tpl/create_poll.tpl
@@ -42,7 +42,7 @@
{__('Step 1', 'Poll id rules')}
@@ -104,7 +104,7 @@
{if $useRemoteUser}
{$form->admin_mail}
{else}
-
+
{/if}
From 0a8d955f775effa84baabfdaac1e84b1d6e2aab1 Mon Sep 17 00:00:00 2001
From: Olivier Perez
Date: Thu, 30 Jun 2016 23:36:50 +0200
Subject: [PATCH 11/23] Update CHANGELOG.md
---
CHANGELOG.md | 31 +++++++++++++++++++++++++------
1 file changed, 25 insertions(+), 6 deletions(-)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 8fdaf01..7d6f1d0 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,17 +1,36 @@
# Changelog de framadate
-## Version 1.0 (Antonin - Julien - Luc - Olivier - Pierre)
- - Technique : Travail sur le service des notifications
- - Technique : Prise en compte de l'entête X-Forwarded-Proto
- - Technique : Utilisation de PHPMailer pour l'envoi de mails
+## Version 1.0 (Erik - Markus - Ecmu - Julien - Imre - Luc - Pierre - Antonin - Olivier)
- Amélioration : Conserver les votes en cours lors que l'utilisateur envoie un commentaire
- - Amélioration : Les mails sont envoyés en multipart pour les lecteurs ne supportant pas HMTL
+ - Amélioration : Les mails sont envoyés en multipart pour les lecteurs ne supportant pas HTML
- Amélioration : Masquer l'encart au dessus du tableau des votes, maintenant visible grâce à un bouton
- Amélioration : Les commentaires sont horodatés
- Amélioration : Auto wrapping de la description du sondage
- - Amélioration : Possibilité de choisir l'URL du sondage
- Amélioration : Protection de sondages par mots de passe
- Amélioration : Un click dans les champs URL sélectionne le contenu
+ - Amélioration : Choix du lien du sondage
+ - Amélioration : Possibilité de modifier un sondage après expiration
+ - Amélioration : Confirmation demandée pour supprimer une colonne
+ - Amélioration : Création d'une sondage par intervale de dates
+ - Amélioration : Possibilité de ne pas faire de choix sur une colonne
+ - Amélioration : Amélioration du format des mails
+ - Amélioration : Amélioration du mode où chaque votant ne peut modifier que son vote
+ - Amélioration : Fichier check.php pour vérifier la possibilité d'installation
+ - Amélioration : Changements de libellés
+ - Amélioration : Admin - Rechercher un sondage grâce à l'adresse mail
+ - Amélioration : Fluidification du défilement de la page
+ - Fix : Correction de traductions
+ - Fix : Corrections diverses sur les dates et leurs formats
+ - Fix : Impossible d'ajouter une colonne vide
+ - Fix : Possibilité de supprimer des colonnes vides
+ - Fix : Correction du formulaire de commentaires
+ - Fix : Correction d'échappements de caractères
+ - Fix : Rectification des contraintes sur les sondage expirés
+ - Technique : Travail sur le service des notifications
+ - Technique : Prise en compte de l'entête X-Forwarded-Proto
+ - Technique : Utilisation de PHPMailer pour l'envoi de mails
+ - Technique : Encore de la Smartization
+ - Technique : Pas mal de nettoyage de code
## Version 0.9.6 (goofy-bz - Olivier - Quentin - Vincent)
- Fix : Corrections mineures de langues
From 0cf52c8461a91b3c8d45fa7b9f73873b12073691 Mon Sep 17 00:00:00 2001
From: Olivier Perez
Date: Thu, 7 Jul 2016 14:15:34 +0200
Subject: [PATCH 12/23] Merge branch 'bugfix/install-config-escape' into
'develop'
Added escaping for install in config.tpl
In the installation process, string like the one below should be a valid application name (or DB password).
> Framadate c'est vraiment super ! "Datez" comme vous voulez \o/
It missed some escaping for single quote (') and backslash (\\), resulting in PHP parse errors.
It should be cherry-picked to the `release` branch too.
See merge request !136
---
app/inc/smarty.php | 3 +++
tpl/admin/config.tpl | 4 ++--
2 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/app/inc/smarty.php b/app/inc/smarty.php
index 39f191c..248fc01 100644
--- a/app/inc/smarty.php
+++ b/app/inc/smarty.php
@@ -64,6 +64,9 @@ function smarty_modifier_markdown($md, $clear = false) {
function smarty_modifier_resource($link) {
return Utils::get_server_name() . $link;
}
+function smarty_modifier_addslashes_single_quote($string) {
+ return addcslashes($string, '\\\'');
+}
function smarty_modifier_html($html) {
return Utils::htmlEscape($html);
diff --git a/tpl/admin/config.tpl b/tpl/admin/config.tpl
index bb5d9dc..2865359 100644
--- a/tpl/admin/config.tpl
+++ b/tpl/admin/config.tpl
@@ -23,7 +23,7 @@
// const APP_URL = '';
// Application name
-const NOMAPPLICATION = '{$appName}';
+const NOMAPPLICATION = '{$appName|addslashes_single_quote}';
// Database administrator email
const ADRESSEMAILADMIN = '{$appMail}';
@@ -38,7 +38,7 @@ const DB_CONNECTION_STRING = '{$dbConnectionString}';
const DB_USER= '{$dbUser}';
// Database password
-const DB_PASSWORD = '{$dbPassword}';
+const DB_PASSWORD = '{$dbPassword|addslashes_single_quote}';
// Table name prefix
const TABLENAME_PREFIX = '{$dbPrefix}';
From e642d1e35c1cdb0c28b091d780abcad175c90e54 Mon Sep 17 00:00:00 2001
From: Olivier Perez
Date: Thu, 7 Jul 2016 15:11:14 +0200
Subject: [PATCH 13/23] Merge branch 'bugfix/php54-empty-compatibility' into
'develop'
PHP5.4 compatibility for empty() function.
See merge request !137
---
admin/check.php | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/admin/check.php b/admin/check.php
index 878e284..81bc78f 100644
--- a/admin/check.php
+++ b/admin/check.php
@@ -124,14 +124,14 @@ if (extension_loaded('openssl')) {
}
// Datetime
-if (!empty(ini_get('date.timezone'))) {
+$timezone = ini_get('date.timezone');
+if (!empty($timezone)) {
$messages[] = new Message('info', __('Check','date.timezone is set.'));
} else {
$messages[] = new Message('warning', __('Check','Consider setting the date.timezone in php.ini.'));
}
-
// The percentage of steps needed to be ready to launch the application
$errors = 0;
$warnings = 0;
From d7675831e15d7bd9ef18dda14218450b75e511c5 Mon Sep 17 00:00:00 2001
From: Olivier Perez
Date: Fri, 29 Jul 2016 13:43:59 +0200
Subject: [PATCH 14/23] New style of poll id
---
locale/en.json | 2 +-
locale/fr.json | 6 +++---
tpl/create_poll.tpl | 9 +++++++--
3 files changed, 11 insertions(+), 6 deletions(-)
diff --git a/locale/en.json b/locale/en.json
index cc49b95..44c8e7f 100644
--- a/locale/en.json
+++ b/locale/en.json
@@ -229,7 +229,7 @@
"You are in the poll creation section.": "You are in the poll creation section.",
"Required fields cannot be left blank.": "Required fields cannot be left blank.",
"Poll title": "Poll title",
- "Poll id": "Identifier",
+ "Poll id": "Poll link",
"Poll id rules": "The identifier can contain letters, numbers and dashes \"-\".",
"Poll id warning": "By defining an identifier that can facilitate access to the poll for unwanted people. It is recommended to protect it with a password.",
"Votes cannot be modified": "Votes cannot be modified",
diff --git a/locale/fr.json b/locale/fr.json
index e80c610..241267b 100644
--- a/locale/fr.json
+++ b/locale/fr.json
@@ -229,9 +229,9 @@
"You are in the poll creation section.": "Vous avez choisi de créer un nouveau sondage.",
"Required fields cannot be left blank.": "Merci de remplir les champs obligatoires, marqués d'une *.",
"Poll title": "Titre du sondage",
- "Poll id": "Identifiant",
- "Poll id rules": "L'identifiant peut contenir des lettres, des chiffres et des tirets \"-\".",
- "Poll id warning": "En définissant un identifiant cela peut faciliter l'accès à ce sondage pour des personnes non désirées. Il est recommandé de le protéger par mot de passe.",
+ "Poll id": "Lien du sondage",
+ "Poll id rules": "(peut contenir des lettres, des chiffres et des tirets)",
+ "Poll id warning": "La modification du lien du sondage peut faciliter l'accès à ce sondage pour des personnes non désirées. Il est recommandé de le protéger par mot de passe.",
"Votes cannot be modified": "Aucun vote ne peut être modifié",
"All voters can modify any vote": "Tous les sondés peuvent modifier tous les votes",
"Voters can modify their vote themselves": "Chaque sondé peut modifier son propre vote",
diff --git a/tpl/create_poll.tpl b/tpl/create_poll.tpl
index 780431e..e7438a3 100644
--- a/tpl/create_poll.tpl
+++ b/tpl/create_poll.tpl
@@ -34,18 +34,23 @@
{/if}
From 8066e18ae762b265fe3bd7b2c0dd6a0521f7eaee Mon Sep 17 00:00:00 2001
From: Olivier Perez
Date: Fri, 29 Jul 2016 16:22:12 +0200
Subject: [PATCH 15/23] Reorder parameters at poll creation
---
tpl/create_poll.tpl | 221 ++++++++++++++++++++++----------------------
1 file changed, 108 insertions(+), 113 deletions(-)
diff --git a/tpl/create_poll.tpl b/tpl/create_poll.tpl
index e7438a3..fd3dbde 100644
--- a/tpl/create_poll.tpl
+++ b/tpl/create_poll.tpl
@@ -17,68 +17,6 @@
-
- {if !empty($errors['title']['msg'])}
-
-
- {$errors['title']['msg']}
-
-
- {/if}
-
-
- {if !empty($errors['id']['msg'])}
-
-
- {$errors['id']['msg']}
-
-
- {/if}
-
-
- {if !empty($errors['description']['msg'])}
-
-
- {$errors['description']['msg']}
-
-
- {/if}
-