Phrases: Prevent empty Structure entry from being created on save.

This commit is contained in:
Nate Jones 2015-02-25 23:38:20 +00:00
parent 571a0cd2d8
commit f734a88530
2 changed files with 73 additions and 69 deletions

View File

@ -70,10 +70,10 @@
$text['label-function']['pt-pt'] = "Função";
$text['label-function']['fr-fr'] = "Fonction";
$text['label-file']['en-us'] = "File";
$text['label-file']['es-cl'] = "Expediente";
$text['label-file']['pt-pt'] = "Arquivo";
$text['label-file']['fr-fr'] = "Fichier";
$text['label-action']['en-us'] = "Action";
$text['label-action']['es-cl'] = "Acción";
$text['label-action']['pt-pt'] = "Ação";
$text['label-action']['fr-fr'] = "Action";
$text['label-order']['en-us'] = "Order";
$text['label-order']['es-cl'] = "Orden";

View File

@ -116,6 +116,7 @@ if (count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0) {
$_POST['phrase_detail_tag'] = 'action'; // default, for now
$_POST['phrase_detail_group'] = "0"; // one group, for now
if ($_POST['phrase_detail_data'] != '') {
$phrase_detail_uuid = uuid();
$sql = "insert into v_phrase_details ";
$sql .= "( ";
@ -149,6 +150,7 @@ if (count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0) {
$db->exec(check_sql($sql));
unset($sql);
}
}
save_phrases_xml();
@ -174,6 +176,7 @@ if (count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0) {
$_POST['phrase_detail_tag'] = 'action'; // default, for now
$_POST['phrase_detail_group'] = "0"; // one group, for now
if ($_POST['phrase_detail_data'] != '') {
$phrase_detail_uuid = uuid();
$sql = "insert into v_phrase_details ";
$sql .= "( ";
@ -207,6 +210,7 @@ if (count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0) {
$db->exec(check_sql($sql));
unset($sql);
}
}
save_phrases_xml();
@ -319,7 +323,7 @@ if (count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0) {
echo " <table width='59%' border='0' cellpadding='0' cellspacing='0'>\n";
echo " <tr>\n";
echo " <td class='vtable'>".$text['label-function']."</td>\n";
echo " <td class='vtable'>".$text['label-file']."</td>\n";
echo " <td class='vtable'>".$text['label-action']."</td>\n";
echo " <td class='vtable' style='text-align: center;'>".$text['label-order']."</td>\n";
echo " <td></td>\n";
echo " </tr>\n";