2011-08-04 Javier Lanz <javier.lanz@artica.es>

* godmode/modules/manage_nc_groups.php: Fixed creating &
        * updating
        component gruops with blank names

        Fixes: #3384668



git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@4665 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
javilanz 2011-08-04 11:25:02 +00:00
parent 0f9275e6fe
commit bbb4e4cabf
2 changed files with 31 additions and 14 deletions

View File

@ -1,3 +1,10 @@
2011-08-04 Javier Lanz <javier.lanz@artica.es>
* godmode/modules/manage_nc_groups.php: Fixed creating & updating
component gruops with blank names
Fixes: #3384668
2011-08-02 Javier Lanz <javier.lanz@artica.es>
* images/skin/skin_default/include/styles/pandora.css: Removed old

View File

@ -41,25 +41,35 @@ if ($create) {
$name = (string) get_parameter ('name');
$parent = (int) get_parameter ('parent');
$result = db_process_sql_insert ('tnetwork_component_group',
array ('name' => $name,
'parent' => $parent));
ui_print_result_message ($result,
__('Successfully created'),
__('Could not be created'));
if ($name == '') {
ui_print_error_message (__('Could not be created. Blank name'));
require_once ('manage_nc_groups_form.php');
return;
} else {
$result = db_process_sql_insert ('tnetwork_component_group',
array ('name' => $name,
'parent' => $parent));
ui_print_result_message ($result,
__('Successfully created'),
__('Could not be created'));
}
}
if ($update) {
$name = (string) get_parameter ('name');
$parent = (int) get_parameter ('parent');
$result = db_process_sql_update ('tnetwork_component_group',
array ('name' => $name,
'parent' => $parent),
array ('id_sg' => $id));
ui_print_result_message ($result,
__('Successfully updated'),
__('Not updated. Error updating data'));
if ($name == '') {
ui_print_error_message (__('Not updated. Blank name'));
} else {
$result = db_process_sql_update ('tnetwork_component_group',
array ('name' => $name,
'parent' => $parent),
array ('id_sg' => $id));
ui_print_result_message ($result,
__('Successfully updated'),
__('Not updated. Error updating data'));
}
}
if ($delete) {
@ -70,7 +80,7 @@ if ($delete) {
__('Not deleted. Error deleting data'));
}
if ($id || $new) {
if (($id || $new) && !$delete) {
require_once ('manage_nc_groups_form.php');
return;
}