Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion src/admin/fields.php
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,14 @@
// Everything was alright, go and check if the entry exists!
$result = DB_Query("SELECT FieldID FROM " . DB_FIELDS . " WHERE FieldID = '" . $content['FieldID'] . "'");
$myrow = DB_GetSingleRow($result, true);
if ( !isset($myrow['FieldID']) )

if ( $_POST['op'] == "addnewfield" && isset($myrow['FieldID']) )
{
// Duplicate FieldID submitted via the add-new-field form — reject it.
$content['ISERROR'] = true;
$content['ERROR_MSG'] = GetAndReplaceLangStr( $content['LN_FIELDS_ERROR_FIELDIDEXISTS'], $content['FieldID'] );
}
else if ( !isset($myrow['FieldID']) )
{
//TODO: Trunscate NOT USED YET, it is currently set to 30 to avoid error mysql.
// check "parsers.php" when using Truncate
Expand Down
1 change: 1 addition & 0 deletions src/lang/de/admin.php
Original file line number Diff line number Diff line change
Expand Up @@ -355,6 +355,7 @@
$content['LN_FIELDS_ERROR_FIELDIDEMPTY'] = "Die ID des Feldes war leer. ";
$content['LN_FIELDS_ERROR_SEARCHFIELDEMPTY'] = "Der Suchfilter war leer. ";
$content['LN_FIELDS_ERROR_FIELDDEFINEEMPTY'] = "Die interne Feld-ID war leer. ";
$content['LN_FIELDS_ERROR_FIELDIDEXISTS'] = "Ein Feld mit der Feld-ID '%1' existiert bereits. Verwenden Sie die Bearbeiten-Funktion, um ein vorhandenes Feld zu ändern.";
$content['LN_FIELDS_HASBEENEDIT'] = "Die Konfiguration des Feldes %1' wurde erfolgreich geÄndert.";
$content['LN_FIELDS_HASBEENADDED'] = "Die Konfiguration des Feldes '%1' wurde erfolgreich hinzugefügt.";
$content['LN_FIELDS_'] = "";
Expand Down
1 change: 1 addition & 0 deletions src/lang/en/admin.php
Original file line number Diff line number Diff line change
Expand Up @@ -374,6 +374,7 @@
$content['LN_FIELDS_ERROR_FIELDIDEMPTY'] = "The field id was empty. ";
$content['LN_FIELDS_ERROR_SEARCHFIELDEMPTY'] = "The searchfilter was empty. ";
$content['LN_FIELDS_ERROR_FIELDDEFINEEMPTY'] = "The internal FieldID was empty. ";
$content['LN_FIELDS_ERROR_FIELDIDEXISTS'] = "A field with the FieldID '%1' already exists. Use the edit function to modify an existing field.";
$content['LN_FIELDS_HASBEENEDIT'] = "The configuration for the field '%1' has been successfully edited.";
$content['LN_FIELDS_HASBEENADDED'] = "The configuration for the field '%1' has been successfully added.";
$content['LN_FIELDS_'] = "";
Expand Down
1 change: 1 addition & 0 deletions src/lang/es/admin.php
Original file line number Diff line number Diff line change
Expand Up @@ -367,6 +367,7 @@
$content['LN_FIELDS_ERROR_FIELDIDEMPTY'] = "La ID del Campo estaba vacía. ";
$content['LN_FIELDS_ERROR_SEARCHFIELDEMPTY'] = "El Filtro de Búsqueda estaba vacío. ";
$content['LN_FIELDS_ERROR_FIELDDEFINEEMPTY'] = "El ID Interno estaba vacío. ";
$content['LN_FIELDS_ERROR_FIELDIDEXISTS'] = "Ya existe un campo con el ID de campo '%1'. Use la función de edición para modificar un campo existente.";
$content['LN_FIELDS_HASBEENEDIT'] = "La configuración para el Campo '%1' se ha editado correctamente.";
$content['LN_FIELDS_HASBEENADDED'] = "La configuración para el Campo '%1' se ha agregado con éxito.";
$content['LN_FIELDS_'] = "";
Expand Down
1 change: 1 addition & 0 deletions src/lang/ja/admin.php
Original file line number Diff line number Diff line change
Expand Up @@ -370,6 +370,7 @@
$content['LN_FIELDS_ERROR_FIELDIDEMPTY'] = "The field id was empty. ";
$content['LN_FIELDS_ERROR_SEARCHFIELDEMPTY'] = "The searchfilter was empty. ";
$content['LN_FIELDS_ERROR_FIELDDEFINEEMPTY'] = "The internal FieldID was empty. ";
$content['LN_FIELDS_ERROR_FIELDIDEXISTS'] = "A field with the FieldID '%1' already exists. Use the edit function to modify an existing field.";
$content['LN_FIELDS_HASBEENEDIT'] = "The configuration for the field '%1' has been successfully edited.";
$content['LN_FIELDS_HASBEENADDED'] = "The configuration for the field '%1' has been successfully added.";
$content['LN_FIELDS_'] = "";
Expand Down
Loading