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:
parent
4ab536af57
commit
15cd275722
|
@ -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>
|
2011-08-02 Javier Lanz <javier.lanz@artica.es>
|
||||||
|
|
||||||
* images/skin/skin_default/include/styles/pandora.css: Removed old
|
* images/skin/skin_default/include/styles/pandora.css: Removed old
|
||||||
|
|
|
@ -41,25 +41,35 @@ if ($create) {
|
||||||
$name = (string) get_parameter ('name');
|
$name = (string) get_parameter ('name');
|
||||||
$parent = (int) get_parameter ('parent');
|
$parent = (int) get_parameter ('parent');
|
||||||
|
|
||||||
$result = db_process_sql_insert ('tnetwork_component_group',
|
if ($name == '') {
|
||||||
array ('name' => $name,
|
ui_print_error_message (__('Could not be created. Blank name'));
|
||||||
'parent' => $parent));
|
require_once ('manage_nc_groups_form.php');
|
||||||
ui_print_result_message ($result,
|
return;
|
||||||
__('Successfully created'),
|
} else {
|
||||||
__('Could not be created'));
|
$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) {
|
if ($update) {
|
||||||
$name = (string) get_parameter ('name');
|
$name = (string) get_parameter ('name');
|
||||||
$parent = (int) get_parameter ('parent');
|
$parent = (int) get_parameter ('parent');
|
||||||
|
|
||||||
$result = db_process_sql_update ('tnetwork_component_group',
|
if ($name == '') {
|
||||||
array ('name' => $name,
|
ui_print_error_message (__('Not updated. Blank name'));
|
||||||
'parent' => $parent),
|
} else {
|
||||||
array ('id_sg' => $id));
|
$result = db_process_sql_update ('tnetwork_component_group',
|
||||||
ui_print_result_message ($result,
|
array ('name' => $name,
|
||||||
__('Successfully updated'),
|
'parent' => $parent),
|
||||||
__('Not updated. Error updating data'));
|
array ('id_sg' => $id));
|
||||||
|
ui_print_result_message ($result,
|
||||||
|
__('Successfully updated'),
|
||||||
|
__('Not updated. Error updating data'));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($delete) {
|
if ($delete) {
|
||||||
|
@ -70,7 +80,7 @@ if ($delete) {
|
||||||
__('Not deleted. Error deleting data'));
|
__('Not deleted. Error deleting data'));
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($id || $new) {
|
if (($id || $new) && !$delete) {
|
||||||
require_once ('manage_nc_groups_form.php');
|
require_once ('manage_nc_groups_form.php');
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue