diff --git a/config.inc.php b/config.inc.php
index afdab6a..cb063da 100755
--- a/config.inc.php
+++ b/config.inc.php
@@ -17,4 +17,4 @@ define("DEFAULT_REDUNDANCY", "high");
define("DEFAULT_MARGIN", 20);
define("DEFAULT_SIZE", 300);
define("DEFAULT_BGCOLOR", "FFFFFF");
-define("DEFAULT_MAINCOLOR", "000000");
+define("DEFAULT_FGCOLOR", "000000");
diff --git a/index.php b/index.php
index a33bed9..2971644 100755
--- a/index.php
+++ b/index.php
@@ -35,7 +35,7 @@ $params = array(
"margin" => DEFAULT_MARGIN,
"size" => DEFAULT_SIZE,
"bgColor" => DEFAULT_BGCOLOR,
- "mainColor" => DEFAULT_MAINCOLOR,
+ "fgColor" => DEFAULT_FGCOLOR,
);
$validFormSubmitted = false;
@@ -46,7 +46,7 @@ if (
AND isset($_POST['margin'])
AND isset($_POST['size'])
AND isset($_POST['bgColor'])
- AND isset($_POST['mainColor'])
+ AND isset($_POST['fgColor'])
) {
if (strlen($_POST['txt']) >= 1 AND strlen($_POST['txt']) <= 4096) {
@@ -88,11 +88,11 @@ if (
exit("Wrong value for bgColor");
}
- if (preg_match("/^#[abcdefABCDEF0-9]{6}$/", $_POST['mainColor'])) {
- $params['mainColor'] = substr($_POST['mainColor'], -6);
+ if (preg_match("/^#[abcdefABCDEF0-9]{6}$/", $_POST['fgColor'])) {
+ $params['fgColor'] = substr($_POST['fgColor'], -6);
} else {
http_response_code(400);
- exit("Wrong value for mainColor");
+ exit("Wrong value for fgColor");
}
$validFormSubmitted = true;
@@ -192,8 +192,8 @@ foreach($themeDimensionsIcons as $dimFav) // Set all icons dimensions
-
-
+
+
@@ -236,9 +236,9 @@ if ($validFormSubmitted) {
$rgbBgColor['b']
))
->foregroundColor(new Color(
- hexdec(substr($params['mainColor'],0,2)),
- hexdec(substr($params['mainColor'],2,2)),
- hexdec(substr($params['mainColor'],4,2))
+ hexdec(substr($params['fgColor'],0,2)),
+ hexdec(substr($params['fgColor'],2,2)),
+ hexdec(substr($params['fgColor'],4,2))
));
$result = $qrCode->build();
diff --git a/locales/en.php b/locales/en.php
index d9a63e8..56a4c95 100644
--- a/locales/en.php
+++ b/locales/en.php
@@ -8,7 +8,7 @@ $loc = array(
'label_margin' => "Margin size",
'label_size' => "Image size",
'label_bgColor' => "Background color",
- 'label_mainColor' => "Foreground color",
+ 'label_fgColor' => "Foreground color",
'placeholder' => "Enter the text to encode in the QR code",
'placeholder_pixels' => "automatic",
diff --git a/locales/fr.php b/locales/fr.php
index 32e62da..888a1ea 100644
--- a/locales/fr.php
+++ b/locales/fr.php
@@ -8,7 +8,7 @@ $loc = array(
'label_margin' => "Taille de la marge",
'label_size' => "Taille de l'image",
'label_bgColor' => "Couleur de fond",
- 'label_mainColor' => "Couleur de premier plan",
+ 'label_fgColor' => "Couleur de premier plan",
'placeholder' => "Entrez le texte à encoder dans le code QR",
'placeholder_pixels' => "automatique",
diff --git a/locales/oc.php b/locales/oc.php
index 8d3cdc4..b7e820f 100644
--- a/locales/oc.php
+++ b/locales/oc.php
@@ -8,7 +8,7 @@ $loc = array(
'label_margin' => "Talha del marge",
'label_size' => "Talha de l’imatge",
'label_bgColor' => "Color de fons",
- 'label_mainColor' => "Color del primièr plan",
+ 'label_fgColor' => "Color del primièr plan",
'placeholder' => "Dintratz lo tèxt de codar en còdi QR",
'placeholder_pixels' => "auto",
diff --git a/locales/template.php b/locales/template.php
index bf27fe1..5205d6f 100644
--- a/locales/template.php
+++ b/locales/template.php
@@ -8,7 +8,7 @@ $loc = array(
'label_margin' => "label_margin",
'label_size' => "label_size",
'label_bgColor' => "label_bgColor",
- 'label_mainColor' => "label_mainColor",
+ 'label_fgColor' => "label_fgColor",
'placeholder' => "placeholder",
'placeholder_pixels' => "placeholder_pixels",