From 1527c1852f7731d5862b6ab295d983b3e317f823 Mon Sep 17 00:00:00 2001 From: Miraty Date: Tue, 19 Oct 2021 17:07:51 +0200 Subject: [PATCH] Use the example TLD (as per RFC 2606) --- CHANGELOG.md | 1 + config.inc.php | 2 +- index.php | 6 +++--- locales/en.php | 12 +++++------- locales/fr.php | 10 ++++------ locales/oc.php | 8 +++----- style.less | 4 +++- 7 files changed, 20 insertions(+), 23 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4a5ba87..738fec7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). ### Changed +* Replace GET by POST for QR codes generation (privacy enhancement) * Use less.php instead of lesserphp * Use the prefers-color-scheme CSS feature to let the client choose their prefered theme (dark/light) diff --git a/config.inc.php b/config.inc.php index b3aa3d0..bd40b5d 100755 --- a/config.inc.php +++ b/config.inc.php @@ -28,4 +28,4 @@ $fileNameLenght = 32; // EN: Will be printed at the bottom of the interface // FR : Sera affiché en bas de l'interface $customTextEnabled = false; -$customText = "This LibreQR instance is hosted by foo."; +$customText = "This LibreQR instance is hosted by foo."; diff --git a/index.php b/index.php index c2b078a..8dc0736 100755 --- a/index.php +++ b/index.php @@ -7,7 +7,7 @@ |_____|_|_.__/|_| \___|\__\_|_| \_\ A PHP Web interface for generating QR codes -Source code : https://code.antopie.org/miraty/libreqr +Source code: https://code.antopie.org/miraty/libreqr This file is part of LibreQR. @@ -91,8 +91,8 @@ if ( require_once "less.php/lib/Less/Autoloader.php"; Less_Autoloader::register(); - $options = array('cache_dir' => '/srv/http/libreqr/temp/', 'compress' => true); - $cssFileName = Less_Cache::Get(array("/srv/http/libreqr/style.less" => ""), $options, $colorScheme); + $options = array('cache_dir' => 'temp/', 'compress' => true); + $cssFileName = Less_Cache::Get(array("style.less" => ""), $options, $colorScheme); ?> diff --git a/locales/en.php b/locales/en.php index 7e8e09f..d83ebb0 100644 --- a/locales/en.php +++ b/locales/en.php @@ -16,15 +16,13 @@ $loc = array( 'help_content' => " You can only encode whatever text you want.
- Softwares which decode these QR codes could suggest to open them with dedicated software, depending on their URI scheme.

+ Software which decodes these QR codes could suggest to open them with dedicated software, depending on their URI scheme.

For instance, to open a webpage:
- https://www.domain.tld/

+ https://www.example/

To send an email:
- mailto:contact@domain.tld

+ mailto:contact@email.example

To share geographic coordinates:
- geo:48.867564,2.364057

- To call a phone number:
- tel:+33639981871 + geo:48.867564,2.364057 ", 'help_redondancy' => "Redundancy is the duplication of information in the QR code to correct errors during decoding. A higher rate will produce a bigger QR code, but will have a better chance of being decoded correctly.", 'help_margin' => "Number of pixels in the white bands around the QR code.", @@ -40,7 +38,7 @@ $loc = array( 'metaText_qr' => "

What's a QR code?

- A QR code is a 2 dimensions barcode in which a text is written in binary. It can be decoded with a device equipped with a photo sensor and an adequate software. + A QR code is a 2 dimensional barcode in which text is written in binary. It can be decoded with a device equipped with a photo sensor and an adequate software. QR code on Wikipedia. ", 'metaText_legal' => "LibreQR " . $libreqrVersion . " is a free software whose source code is available under the terms of the AGPLv3+.", diff --git a/locales/fr.php b/locales/fr.php index d17be68..7812083 100644 --- a/locales/fr.php +++ b/locales/fr.php @@ -1,7 +1,7 @@ "Générateur de codes QR", - 'description' => "Générez des codes QR librement. Choisissez le contenu, la taille, les couleurs…", + 'description' => "Générer des codes QR librement. Choix du contenu, de la taille, des couleurs…", 'label_content' => "Texte à encoder", 'label_redondancy' => "Taux de redondance", @@ -18,13 +18,11 @@ $loc = array( Vous pouvez encoder ce que vous voulez sous forme de texte.
Les logiciels qui décodent ces codes QR pourraient proposer de les ouvrir avec un logiciel dédié, en fonction de leur schéma d'URI.

Par exemple, pour ouvrir une page Web :
- https://www.domaine.tld/

+ https://www.example/

Pour envoyer un mail :
- mailto:contact@domaine.tld

+ mailto:contact@email.example

Pour partager des coordonnées géographique :
- geo:48.867564,2.364057

- Pour appeler un numéro de téléphone :
- tel:+33639981871 + geo:48.867564,2.364057 ", 'help_redondancy' => "La redondance est la duplication des informations dans le code QR afin de corriger les erreurs lors du décodage. Un taux plus élevé produira un code QR plus grand, mais aura plus de chance d'être décodé correctement.", 'help_margin' => "Nombre de pixels des bandes blanches autour du code QR.", diff --git a/locales/oc.php b/locales/oc.php index 49e37f2..9e71758 100644 --- a/locales/oc.php +++ b/locales/oc.php @@ -18,13 +18,11 @@ $loc = array( Podètz pas que codar lo tèxt que volètz.
Los logicials que deschifran los còdis QR poirián suggerir de los dubrir dins de logicials especials, segon lor esquèma URI.

Per exemple, per dubrir la pagina web :
- https://www.domain.tld/

+ https://www.example/

Per enviar un corrièl :
- mailto:contact@domain.tld

+ mailto:contact@email.example

Per partejar de coordonadas geograficas :
- geo:48.867564,2.364057

- Per sonar un numèro de telefòn :
- tel:+33639981871 + geo:48.867564,2.364057 ", 'help_redondancy' => "La redondància es la duplicacion de las informacions al còdi QR per dire de corregir las errors pendent lo deschiframent. Un taux mai naut produirà un còdi mai grand, mas serà de melhor deschifrar corrèctament.", 'help_margin' => "Nombre de pixèls de la banda blanca a l’entorn del còdi QR.", diff --git a/style.less b/style.less index 6dd613d..b397484 100755 --- a/style.less +++ b/style.less @@ -309,14 +309,16 @@ header, footer { #redondancy { width: 250px; + height: 44px; } #size, #margin { width: 234px; + height: 38px; } #redondancy, #size, #margin { - height: 40px; + @media @light { background-color: @bgField-light; }