2010-07-12 Sergio Martin <sergio.martin@artica.es>
* godmode/reporting/visual_console_builder.php: fixed the reset of the size when change a visual map background git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@2988 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
parent
a292faa482
commit
fc00321fac
|
@ -1,3 +1,8 @@
|
|||
2010-07-12 Sergio Martin <sergio.martin@artica.es>
|
||||
|
||||
* godmode/reporting/visual_console_builder.php: fixed the
|
||||
reset of the size when change a visual map background
|
||||
|
||||
2010-07-12 Dario Rodriguez <dario.rodriguez@artica.es>
|
||||
|
||||
* operation/search_results.php: fixed bug in search with zero matches
|
||||
|
|
|
@ -47,6 +47,16 @@ switch ($activeTab) {
|
|||
$visualConsoleName = get_parameter('name');
|
||||
|
||||
$values = array('name' => $visualConsoleName, 'id_group' => $idGroup, 'background' => $background);
|
||||
|
||||
// If the background is changed the size is reseted
|
||||
$visualConsole = get_db_row_filter('tlayout', array('id' => $idVisualConsole));
|
||||
$background_now = $visualConsole['background'];
|
||||
if($background_now != $background) {
|
||||
$sizeBackground = getimagesize($config['homedir'] . '/images/console/background/' . $background);
|
||||
$values['width'] = $sizeBackground[0];
|
||||
$values['height'] = $sizeBackground[1];
|
||||
}
|
||||
|
||||
switch ($action) {
|
||||
case 'update':
|
||||
$result = process_sql_update('tlayout', $values, array('id' => $idVisualConsole));
|
||||
|
@ -59,9 +69,6 @@ switch ($activeTab) {
|
|||
}
|
||||
break;
|
||||
case 'save':
|
||||
$sizeBackground = getimagesize($config['homedir'] . '/images/console/background/' . $background);
|
||||
$values['width'] = $sizeBackground[0];
|
||||
$values['height'] = $sizeBackground[1];
|
||||
|
||||
if($values['name'] != "" && $values['background'])
|
||||
$idVisualConsole = process_sql_insert('tlayout', $values);
|
||||
|
|
Loading…
Reference in New Issue