2011-08-04 Javier Lanz <javier.lanz@artica.es>
* godmode/setup/os.php: Fixed blank names in OS names Fixes: #3371409 git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@4670 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
parent
ff95967b7f
commit
9b448bb1db
|
@ -1,3 +1,9 @@
|
||||||
|
2011-08-04 Javier Lanz <javier.lanz@artica.es>
|
||||||
|
|
||||||
|
* godmode/setup/os.php: Fixed blank names in OS names
|
||||||
|
|
||||||
|
Fixes: #3371409
|
||||||
|
|
||||||
2011-08-04 Javier Lanz <javier.lanz@artica.es>
|
2011-08-04 Javier Lanz <javier.lanz@artica.es>
|
||||||
|
|
||||||
* godmode/reporting/visual_console_builder.php: Fixed blank names in
|
* godmode/reporting/visual_console_builder.php: Fixed blank names in
|
||||||
|
|
|
@ -62,17 +62,19 @@ switch ($action) {
|
||||||
if (($icon !== 0) && ($icon != '')) {
|
if (($icon !== 0) && ($icon != '')) {
|
||||||
$values['icon_name'] = $icon;
|
$values['icon_name'] = $icon;
|
||||||
}
|
}
|
||||||
|
$resultOrId = false;
|
||||||
|
if ($name != '')
|
||||||
$resultOrId = db_process_sql_insert('tconfig_os', $values);
|
$resultOrId = db_process_sql_insert('tconfig_os', $values);
|
||||||
|
|
||||||
if ($resultOrId === false) {
|
if ($resultOrId === false) {
|
||||||
$message = ui_print_error_message(__('Fail to create OS'), '', true);
|
$message = ui_print_error_message(__('Fail creating OS'), '', true);
|
||||||
$tab = 'builder';
|
$tab = 'builder';
|
||||||
$actionHidden = 'save';
|
$actionHidden = 'save';
|
||||||
$textButton = __('Create');
|
$textButton = __('Create');
|
||||||
$classButton = 'class="sub next"';
|
$classButton = 'class="sub next"';
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$message = ui_print_success_message(__('Success to create OS'), '', true);
|
$message = ui_print_success_message(__('Success creating OS'), '', true);
|
||||||
$tab = 'list';
|
$tab = 'list';
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
@ -88,13 +90,19 @@ switch ($action) {
|
||||||
if (($icon !== 0) && ($icon != '')) {
|
if (($icon !== 0) && ($icon != '')) {
|
||||||
$values['icon_name'] = $icon;
|
$values['icon_name'] = $icon;
|
||||||
}
|
}
|
||||||
|
$result = false;
|
||||||
|
if ($name != '')
|
||||||
$result = db_process_sql_update('tconfig_os', $values, array('id_os' => $idOS));
|
$result = db_process_sql_update('tconfig_os', $values, array('id_os' => $idOS));
|
||||||
|
|
||||||
$message = ui_print_result_message($result, __('Success to update OS'), __('Error to update OS'), '', true);
|
$message = ui_print_result_message($result, __('Success updatng OS'), __('Error updating OS'), '', true);
|
||||||
if ($result !== false) {
|
if ($result !== false) {
|
||||||
$tab = 'list';
|
$tab = 'list';
|
||||||
}
|
}
|
||||||
|
else {
|
||||||
|
$tab = 'builder';
|
||||||
|
$os = db_get_row_filter('tconfig_os', array('id_os' => $idOS));
|
||||||
|
$name = $os['name'];
|
||||||
|
}
|
||||||
$actionHidden = 'update';
|
$actionHidden = 'update';
|
||||||
$textButton = __('Update');
|
$textButton = __('Update');
|
||||||
$classButton = 'class="sub upd"';
|
$classButton = 'class="sub upd"';
|
||||||
|
@ -110,7 +118,7 @@ switch ($action) {
|
||||||
else {
|
else {
|
||||||
$result = (bool)db_process_sql_delete('tconfig_os', array('id_os' => $idOS));
|
$result = (bool)db_process_sql_delete('tconfig_os', array('id_os' => $idOS));
|
||||||
|
|
||||||
$message = ui_print_result_message($result, __('Success to delete'), __('Error to delete'), '', true);
|
$message = ui_print_result_message($result, __('Success deleting'), __('Error deleting'), '', true);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue