2011-08-29 Vanessa Gil <vanessa.gil@artica.es>
*godmode/agentes/fields_manager.php: Fixed: is possible to create custom fields with the same name. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@4837 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
parent
c777a00149
commit
2e95c5a042
|
@ -1,3 +1,7 @@
|
|||
2011-08-29 Vanessa Gil <vanessa.gil@artica.es>
|
||||
|
||||
*godmode/agentes/fields_manager.php: Fixed: is possible to create custom fields with the same name.
|
||||
|
||||
2011-08-29 Miguel de Dios <miguel.dedios@artica.es>
|
||||
|
||||
* godmode/reporting/map_builder.php: wrote the source code for copy the
|
||||
|
|
|
@ -40,19 +40,14 @@ $display_on_front = (int) get_parameter ('display_on_front', 0);
|
|||
/* Create field */
|
||||
if ($create_field) {
|
||||
/*Check if name field is empty*/
|
||||
if ($name != "") {
|
||||
if ($name == ""){
|
||||
echo "<h3 class='error'>".__('The name must not be empty')."</h3>";
|
||||
} else if ($name == db_get_value ('name', 'tagent_custom_fields', 'name', $name)) {
|
||||
echo "<h3 class='error'>".__('The name must be unique')."</h3>";
|
||||
} else {
|
||||
$result = db_process_sql_insert('tagent_custom_fields', array('name' => $name, 'display_on_front' => $display_on_front));
|
||||
}
|
||||
else {
|
||||
$result = false;
|
||||
}
|
||||
|
||||
if ($result) {
|
||||
echo "<h3 class='suc'>".__('Field successfully created')."</h3>";
|
||||
}
|
||||
else {
|
||||
echo "<h3 class='error'>".__('There was a problem creating field')."</h3>";
|
||||
}
|
||||
}
|
||||
|
||||
/* Update field */
|
||||
|
|
Loading…
Reference in New Issue