Commit Graph

392 Commits

Author SHA1 Message Date
Nicolas Bouilleaud
31f0a26baa Remove o80/i18n 2019-04-19 14:46:26 +02:00
Nicolas Bouilleaud
3a6317c25a Rework i18n using Symfony/translation
Reimplement the __() and __f() functions using Symfony.
2019-04-19 14:46:26 +02:00
PaulR
c26fef6b39 CI: cleanup the gitlab-ci yml file and test MySQL and PostgreSQL migrations
This commit splits the `test` job into three separate jobs:
- test
- lint
- db:migrate

It also factorise some code, and remove useless use of git checkout
2019-04-19 14:32:56 +02:00
Liquidsoul
c72dfa17b8
Extract mail creation for FindPollsByMail into NotificationService 2019-04-17 17:41:21 +02:00
Liquidsoul
26d3552276
Move edit link mail notification to NotificationService 2019-04-17 17:41:21 +02:00
Liquidsoul
8dcea674e8
Add notificationservice->sendPollCreationMails 2019-04-17 17:41:20 +02:00
Liquidsoul
29e599983e
Add smarty dependency on NotificationService 2019-04-17 17:41:20 +02:00
Thomas Citharel
ec939a8a30 Merge branch 'framadate-bug/limit_end_date_when_updating_poll' into 'develop'
Limit end date when updating poll (#336)

See merge request framasoft/framadate/framadate!372
2019-04-16 16:14:15 +02:00
2e87e1f761
Fixed the previous fix about end_date bug in case of too far date. 2019-04-16 16:06:00 +02:00
38552da738
Updated AdminPollService to limit end_date (#336). 2019-04-16 16:06:00 +02:00
Paul B
6d9130ef84
refacto(utils): remove a useless intermediate variable
This is the commit of the suggestion I made here:
https://framagit.org/framasoft/framadate/framadate/merge_requests/344/diffs#note_399810
2019-04-16 16:04:27 +02:00
Marc Karassev
b58e61c575
Handled domain determination when constant APP_URL is defined but empty.
Now the bahavior matches the comments in config.php:
// Fully qualified domain name of your webserver.
// If this is unset or empty, the servername is determined automatically.
// You *have to set this* if you are running Framadate behind a reverse proxy.
// const APP_URL = '<www.mydomain.fr>';
2019-04-16 15:56:28 +02:00
Liquidsoul
46e0edc3dd
Replace html <br/> tags with \n in mail text 2019-04-16 14:11:07 +02:00
Thomas Citharel
6a4b2a44a1 Merge branch 'framadate-feature/add_version' into 'develop'
Add version in the pages footer

See merge request framasoft/framadate/framadate!366
2019-04-16 12:19:57 +02:00
2624f2da10
#338: Affichage de la version 2019-04-16 12:00:35 +02:00
Paul B
a51ee59d1c
mailservice: use a custom html2text callback for plain text emails
The current `html2text` function from the PHPMailer library strips all
html tags and only keeps the inner html.

In the case of <a> tags we need to share the `href` attribute to the
user when he reads his mail in plain text format.

Fixes #419
2019-04-15 18:43:27 +02:00
Nicolas Bouilleaud
7b0e42bec4 Use the new named constant for 'utf-8' 2019-04-15 17:53:53 +02:00
Nicolas Bouilleaud
6b91a226ba Set the MailService Charset before setting the body
msgHTML builds the text/plain part by converting the passed html to text in the current CharSet; the default Charset being iso-8859-1, most non-ascii characters are lost.

fixes #416
2019-04-15 17:22:09 +02:00
Paul B
e8620026cf
refacto(logService): add a new logEntries method to the log service
As a followup to #362 this is a small addition to the log service when
we want to log a list of entries into a single message.

The log service can itself make sure to escape commas instead of
expecting callers to do so.
2019-04-15 16:07:32 +02:00
Paul B
dc164c4d79
fix(admin/add_column): stop modifying user input in stored data
An [earlier
change](892fa11373)
modifed the user's input when creating new columns in an existing
Poll.

Indeed all `,` comma were replaced by `-` dashes and the user inputs
was saved as such.

It seems the rational behind it was to keep the existing "formatting"
of log messages where different elements were separated by commas.

This commit makes sure to not strip the users' data but only the
logged message.

Fixes #384
2019-04-15 15:05:26 +02:00
Tai Kedzierski
179b048f59 Removed redundant truth check. 2018-11-30 11:19:50 +01:00
Tai Kedzierski
4242fe2914 Allow overriding HTTPS
In the case where the proxy does not pass `HTTP_X_FORWARDED_PROTO`, we need a way to explicitly request `https://` scheme on callbacks.

This change adds a constant `FORCE_HTTPS` which can be used to forcibly override automatic detection of HTTPS usage, when set.
2018-10-24 18:07:09 +01:00
Luc Didry
6b3c5f0610
WIP Working on locales 2018-08-14 14:35:08 +02:00
Thomas Citharel
5e43c1974d Merge branch 'master' into develop 2018-08-14 14:26:15 +02:00
Thomas Citharel
84ac58c430 Release 1.1.8
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
2018-08-03 14:30:09 +02:00
Thomas Citharel
70db1e91e0 Release v1.1.8-beta.1
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
2018-08-03 14:07:02 +02:00
Thomas Citharel
5ffd4361e4 Fix #358, #355 and #342
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
2018-08-03 14:06:23 +02:00
Thomas Citharel
e7d5b1762e Merge tag '1.1.7' into develop 2018-07-09 15:53:59 +02:00
Thomas Citharel
b40957f484 Bump version
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
2018-07-09 15:51:05 +02:00
Thomas Citharel
a6e337e046 Fix issue with limit of participants
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
2018-07-09 15:50:46 +02:00
Thomas Citharel
f861b77326 Merge tag '1.1.6' into develop 2018-07-09 12:26:38 +02:00
Thomas Citharel
0da24788d0 Bump version
(yeah, forgot last one)

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
2018-07-09 12:18:22 +02:00
Thomas Citharel
bc28281477 Update deps and bump PHPMailer to version 6
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
2018-07-09 12:17:33 +02:00
Thomas Citharel
c4b562d016 Merge tag '1.1.5' into develop 2018-07-09 11:25:41 +02:00
Thomas Citharel
be128e8158 Handle XSS issue on date poll slots
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
2018-07-09 10:56:09 +02:00
m
a1a7d180f8 fork-awesome enabled by default 2018-07-09 10:26:12 +02:00
m
15e78ba070 Better handle undefined config values
https://framagit.org/framasoft/framadate/issues/322
2018-07-09 10:26:06 +02:00
Thomas Citharel
92f699337f
Properly handle markdown choices inside titles, if no text as fallback, use the number of the choice column
Also, unrelated, but finally disabled smarty caching on php's build-in server

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
2018-05-25 19:24:54 +02:00
Thomas Citharel
d6c2f01457
Introduce an use_sendmail option
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
2018-05-25 15:50:35 +02:00
Thomas Citharel
2cd54d9c4d
Add a missing migration back
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
2018-05-25 15:18:56 +02:00
Thomas Citharel
4c0c2a16f9
Small fixes
Change CollectMail class name, add a title on voters name in admin with email value

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
2018-05-25 12:36:18 +02:00
Meteor-Furet
feb0c1e6ce
Modification collect_users_mail de bool à int (MAJ de la création d'un sondage) 2018-05-25 11:39:28 +02:00
PICHOU Kyâne
a64e182076 Fix missing beginTransaction() 2018-05-16 21:55:54 +02:00
Thomas Citharel
87a61ebea3
Couple of fixes following DBAL migration
* Make sure we save timestamp as a string (🙈) inside slot table
* Make sure to set poll format properly at creation
* More Repository methods use DBAL specifics
* Clear legacy check all tables call

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
2018-04-23 10:27:15 +02:00
Thomas Citharel
7f41eb831c
Remove class FramaDB and unused call
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
2018-04-22 18:45:30 +02:00
Thomas Citharel
006a191544
Make Framadate compatible with PostgreSQL and great again !
* Move the database handling to Doctrine DBAL
* Move Migrations to Doctrine Migrations
* Rename migrations for Doctrine Migrations Uses
* Fix Migrations
* Change config parameters, introduce db name, host and port parameters and get rid of database url
* Change install form for this
* Add a CLI command to make migrations
* Add config.test.php to be used with APP_ENV=test for testing

Signed-off-by: Thomas Citharel <tcit@tcit.fr>

CS

Signed-off-by: Thomas Citharel <tcit@tcit.fr>

Add sqlite to CI and execute migration in test env

Signed-off-by: Thomas Citharel <tcit@tcit.fr>

Typo

Signed-off-by: Thomas Citharel <tcit@tcit.fr>

SQLite is already inside the image...

Signed-off-by: Thomas Citharel <tcit@tcit.fr>

Rebase two new migrations

Signed-off-by: Thomas Citharel <tcit@tcit.fr>

Move from trait to abstract class and remove legacy migration table after checks

Signed-off-by: Thomas Citharel <tcit@tcit.fr>

CS

Signed-off-by: Thomas Citharel <tcit@tcit.fr>

Move doctrine command path inside CI

Signed-off-by: Thomas Citharel <tcit@tcit.fr>

Move abstract migration class to correct namespace and remove unused command

Signed-off-by: Thomas Citharel <tcit@tcit.fr>

CS

Signed-off-by: Thomas Citharel <tcit@tcit.fr>

Check for legacy migration table existence

Signed-off-by: Thomas Citharel <tcit@tcit.fr>

Check if legacy migration table exists before deleting it

Signed-off-by: Thomas Citharel <tcit@tcit.fr>

Add messages for skipped migrations and fix an issue with MySQL ERR_NO_DATE Migration

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
2018-04-22 18:37:53 +02:00
Thomas Citharel
0409256588 Merge branch 'Justine/Issue1' into 'develop'
Collecting polled users emails

Closes #38

See merge request framasoft/framadate!266
2018-04-19 16:55:21 +02:00
m
fb7c5e2f12 fork-awesome enabled by default 2018-04-18 17:05:20 +02:00
m
cc0f572335 Better handle undefined config values
https://framagit.org/framasoft/framadate/issues/322
2018-04-18 16:49:02 +02:00
JMarlow
68d5b64180
Collecting Polled Users Emails
Modification de la BDD : ajout de la colonne mail dans la table vote

Modification de la BDD : ajout de la colonne mail dans la table vote (bis)

MAJ de VoteRepository : méthode insert et update

MAJ de PollService : méthodes updateVote, addVote et splitVotes

Modification studs.php, adminstuds.php et vote_table_date.tpl : OK pour l'ajout d'un vote avec nom + mail

Modification de vote_table_classic.tpl : OK pour l'ajout d'un vote avec nom + mail

Ajout d'un bouton enveloppe pour chaque colonne avec méthode de traitement pour test

Le numéro de la colonne est enfin récupéré correctement

Implémentation récupération des adresses mails des sondés intéressants dans adminstuds.php et appel d'un fichier display_mails.tpl qui affichent ces adresses mails.

Extension du traitement pour les sondages classic

Ajout récupération des adresses des non aussi, et ajouts de tests pour l'affichage

Changement des input type=text en type=email

Corrections automatiques pour passage pipelines

Corrections suite aux remarques sur la merge request

Corrections 2 suite aux remarques sur la merge request

Corrections 3 suite aux remarques sur la merge request

Modif BDD : ajout colonne collect_mail dans poll

Modif classes Form, PollRepository

Passage de la collecte des mails des sondés en fonctionalité optionnelle

Si la collecte de mail est activée, la saisie du mail est obligatoire

Ajout avertissements collect_mail + editableByAll dans création de sondage et tableaux de vote

Update create poll string and put a danger background on warning

Signed-off-by: Thomas Citharel <tcit@tcit.fr>

Translation strings updated and better position for the email public warning message

Also, a CSS tweak and cleanup

Signed-off-by: Thomas Citharel <tcit@tcit.fr>

CS

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
2018-04-18 12:34:08 +02:00