Fix the override of the 'create' value
This commit is contained in:
parent
76ab05c8c7
commit
31d43467ce
3 changed files with 4 additions and 5 deletions
|
@ -24,12 +24,11 @@ if (empty($_POST)) {
|
||||||
<label for="fsize"><?php echo L::cloud_size ?></label>
|
<label for="fsize"><?php echo L::cloud_size ?></label>
|
||||||
<input type="number" id="fsize" name="fsize" min="1" max="9" value=<?php echo DataBase::DEFAULT_SIZE ?>>
|
<input type="number" id="fsize" name="fsize" min="1" max="9" value=<?php echo DataBase::DEFAULT_SIZE ?>>
|
||||||
</div>
|
</div>
|
||||||
<input type="submit" id="cloud_create_submit" value="<?php echo L::create ?>">
|
<input type="submit" id="cloud_create_submit" value="<?php echo L::create_button ?>">
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
<?php
|
<?php
|
||||||
} else {
|
} else {
|
||||||
/*$token = bin2hex(random_bytes(DataBase::CLOUD_CODE_LENGTH));*/
|
|
||||||
if (isset($_POST['fsize']) && is_numeric($_POST['fsize'])) {
|
if (isset($_POST['fsize']) && is_numeric($_POST['fsize'])) {
|
||||||
$size = $_POST['fsize'];
|
$size = $_POST['fsize'];
|
||||||
} else {
|
} else {
|
||||||
|
@ -45,7 +44,7 @@ if (empty($_POST)) {
|
||||||
} else {
|
} else {
|
||||||
$duration = DataBase::DEFAULT_DURATION;
|
$duration = DataBase::DEFAULT_DURATION;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($cloud = $db->createCloud($text, $size, $duration)) {
|
if ($cloud = $db->createCloud($text, $size, $duration)) {
|
||||||
$viewUrl = 'result.php?id=' . $cloud['code'];
|
$viewUrl = 'result.php?id=' . $cloud['code'];
|
||||||
$viewName = 'https://' . $_SERVER['HTTP_HOST'] . '/' . $viewUrl;
|
$viewName = 'https://' . $_SERVER['HTTP_HOST'] . '/' . $viewUrl;
|
||||||
|
|
|
@ -29,7 +29,7 @@ if (isset($_GET['id'])) {
|
||||||
?>
|
?>
|
||||||
<p><?php echo L::cloud_create_message ?></p>
|
<p><?php echo L::cloud_create_message ?></p>
|
||||||
<form method="post" action="create.php">
|
<form method="post" action="create.php">
|
||||||
<input type="submit" value="<?php echo L::create ?>">
|
<input type="submit" value="<?php echo L::create_button ?>">
|
||||||
</form>
|
</form>
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
|
|
|
@ -18,7 +18,6 @@
|
||||||
|
|
||||||
title = "SimpleWordsCloud"
|
title = "SimpleWordsCloud"
|
||||||
description = "Création de nuage de mots, simple, sans inscriptions et respectant la vie privée"
|
description = "Création de nuage de mots, simple, sans inscriptions et respectant la vie privée"
|
||||||
create = "Créer"
|
|
||||||
|
|
||||||
[cloud]
|
[cloud]
|
||||||
description = "Description du nuage"
|
description = "Description du nuage"
|
||||||
|
@ -47,6 +46,7 @@ cloudNotFound = "Le nuage <em>%s</em> n'a pas été trouvé, veuillez vérifier
|
||||||
|
|
||||||
[create]
|
[create]
|
||||||
errorCode = "Erreur lors de la création du nuage, désolé du dérangement."
|
errorCode = "Erreur lors de la création du nuage, désolé du dérangement."
|
||||||
|
button = "Créer"
|
||||||
|
|
||||||
[duration]
|
[duration]
|
||||||
day = "un jour"
|
day = "un jour"
|
||||||
|
|
Loading…
Reference in a new issue