[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Noalyss-commit] [noalyss] 13/46: Forecast : protect against empty name
From: |
Dany De Bontridder |
Subject: |
[Noalyss-commit] [noalyss] 13/46: Forecast : protect against empty name |
Date: |
Tue, 13 Jul 2021 05:01:51 -0400 (EDT) |
sparkyx pushed a commit to branch master
in repository noalyss.
commit 5e153bd44d7460ca1515fe44ff6717c83a73a278
Author: sparkyx <danydb@noalyss.eu>
AuthorDate: Thu Jun 10 16:42:54 2021 +0200
Forecast : protect against empty name
---
include/ajax/ajax_forecast.php | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/include/ajax/ajax_forecast.php b/include/ajax/ajax_forecast.php
index e048f3e..1e94320 100644
--- a/include/ajax/ajax_forecast.php
+++ b/include/ajax/ajax_forecast.php
@@ -54,7 +54,12 @@ if ($action == "ok") {
$data_sql = new Forecast_SQL($cn, $f_id);
switch ($input->name) {
case 'f_name':
- $data_sql->setp($input->name, $value);
+ if ( trim($value)!="") {
+ $data_sql->setp($input->name, $value);
+ } else {
+ $value=$data_sql->getp('f_name');
+ $ajax->set_value($value);
+ }
break;
case 'p_start':
$data_sql->setp("f_start_date", $value);
- [Noalyss-commit] [noalyss] 31/46: Module decrease font-size, (continued)
- [Noalyss-commit] [noalyss] 31/46: Module decrease font-size, Dany De Bontridder, 2021/07/13
- [Noalyss-commit] [noalyss] 32/46: Code Cleaning #0002022: Utilisation d'un autoloader, Dany De Bontridder, 2021/07/13
- [Noalyss-commit] [noalyss] 35/46: Update Translation, Dany De Bontridder, 2021/07/13
- [Noalyss-commit] [noalyss] 36/46: get the output with transform2pdf in case it fails, Dany De Bontridder, 2021/07/13
- [Noalyss-commit] [noalyss] 41/46: Cosmetic #0002033: Alignement totaux + Trésorerie -> Financier/banque, Dany De Bontridder, 2021/07/13
- [Noalyss-commit] [noalyss] 42/46: Typo , debug information, jQuery available, Dany De Bontridder, 2021/07/13
- [Noalyss-commit] [noalyss] 43/46: check that g_user exists and not the g_theme, Dany De Bontridder, 2021/07/13
- [Noalyss-commit] [noalyss] 46/46: Merge branch 'master' of gitlab.noalyss.eu:noalyss/noalyss, Dany De Bontridder, 2021/07/13
- [Noalyss-commit] [noalyss] 45/46: Cosmetic : unwanted char in operation detail, Dany De Bontridder, 2021/07/13
- [Noalyss-commit] [noalyss] 37/46: Manage_Table show header even if table empty, Dany De Bontridder, 2021/07/13
- [Noalyss-commit] [noalyss] 13/46: Forecast : protect against empty name,
Dany De Bontridder <=
- [Noalyss-commit] [noalyss] 14/46: Bug simple report : FROM 00.0000 was computed from user preference instead of end period. Improve ergonomy, Dany De Bontridder, 2021/07/13
- [Noalyss-commit] [noalyss] 25/46: Cosmetic : appearance h2.info, Dany De Bontridder, 2021/07/13
- [Noalyss-commit] [noalyss] 30/46: fix bug, Dany De Bontridder, 2021/07/13
- [Noalyss-commit] [noalyss] 34/46: Typo , adapt unit-test, Dany De Bontridder, 2021/07/13
- [Noalyss-commit] [noalyss] 38/46: Remove Actif / Passif as card attribute, Dany De Bontridder, 2021/07/13
- [Noalyss-commit] [noalyss] 39/46: Acc_ledger : use $currency_rate instead of variable from extract, Dany De Bontridder, 2021/07/13
- [Noalyss-commit] [noalyss] 40/46: Merge branch 'b-orion' into 'master', Dany De Bontridder, 2021/07/13
- [Noalyss-commit] [noalyss] 44/46: Cosmetic : unwanted char in operation detail, Dany De Bontridder, 2021/07/13