2010-04-29 Sergio Martin <sergio.martin@artica.es>

* godmode/reporting/visual_console_builder.php: Fixed that
	was allowed to create a visual map without name and without
	background. Bug: 2993503



git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@2636 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
zarzuelo 2010-04-29 11:20:51 +00:00
parent cf45f76d37
commit 8200395bf8
2 changed files with 20 additions and 3 deletions

View File

@ -1,3 +1,9 @@
2010-04-29 Sergio Martin <sergio.martin@artica.es>
* godmode/reporting/visual_console_builder.php: Fixed that
was allowed to create a visual map without name and without
background. Bug: 2993503
2010-04-29 Sergio Martin <sergio.martin@artica.es>
* include/functions_visual_map.php: Fixed the critical render

View File

@ -58,7 +58,11 @@ switch ($activeTab) {
}
break;
case 'save':
$idVisualConsole = process_sql_insert('tlayout', $values);
if($values['name'] != "" && $values['background'])
$idVisualConsole = process_sql_insert('tlayout', $values);
else
$idVisualConsole = false;
if ($idVisualConsole !== false) {
$action = 'edit';
$statusProcessInDB = array('flag' => true, 'message' => '<h3 class="suc">'.__('Successfully created.').'</h3>');
@ -175,8 +179,15 @@ $buttons = array(
'text' => '<a href="index.php?sec=gmap&sec2=godmode/reporting/visual_console_builder&tab=preview&action=' . $action . '&id_visual_console=' . $idVisualConsole . '">' .
print_image ("images/eye.png", true, array ("title" => __('Preview'))) .'</a>'),);
if ($action == 'new') $buttons = array('data' => $buttons['data']); //Show only the data tab
if ($action == 'new' || $idVisualConsole === false){
$buttons = array('data' => $buttons['data']); //Show only the data tab
// If it is a fail try, reset the values
$action = 'new';
$visualConsoleName = "";
}
$buttons[$activeTab]['active'] = true;
print_page_header(__('Visual console builder') . "&nbsp;" . $visualConsoleName, "", false, "visual_console_editor_" . $activeTab . "_tab", true, $buttons);
//The source code for PAINT THE PAGE