2010-12-20 Miguel de Dios <miguel.dedios@artica.es>
* godmode/reporting/reporting_builder.php: fixed the action to sort up or down the items in the report, and improvement the order number and now start to each new report. Fixes: #3140930 git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@3672 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
parent
9aac97b2b0
commit
de0eb7b681
|
@ -1,3 +1,11 @@
|
||||||
|
2010-12-20 Miguel de Dios <miguel.dedios@artica.es>
|
||||||
|
|
||||||
|
* godmode/reporting/reporting_builder.php: fixed the action to sort up or
|
||||||
|
down the items in the report, and improvement the order number and now
|
||||||
|
start to each new report.
|
||||||
|
|
||||||
|
Fixes: #3140930
|
||||||
|
|
||||||
2010-12-20 Miguel de Dios <miguel.dedios@artica.es>
|
2010-12-20 Miguel de Dios <miguel.dedios@artica.es>
|
||||||
|
|
||||||
* godmode/reporting/reporting_builder.item_editor.php: fixed the copy &
|
* godmode/reporting/reporting_builder.item_editor.php: fixed the copy &
|
||||||
|
|
|
@ -246,7 +246,14 @@ switch ($action) {
|
||||||
else {
|
else {
|
||||||
$idItem = $result;
|
$idItem = $result;
|
||||||
|
|
||||||
$max = get_db_all_rows_sql('select max(`order`) as max from treport_content;'); $max = $max[0]['max'];
|
$max = get_db_all_rows_sql('SELECT max(`order`) AS max
|
||||||
|
FROM treport_content WHERE id_report = ' . $idReport . ';');
|
||||||
|
if ($max === false) {
|
||||||
|
$max = 0;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
$max = $max[0]['max'];
|
||||||
|
}
|
||||||
process_sql_update('treport_content', array('`order`' => $max + 1), array('id_rc' => $idItem));
|
process_sql_update('treport_content', array('`order`' => $max + 1), array('id_rc' => $idItem));
|
||||||
|
|
||||||
$resultOperationDB = true;
|
$resultOperationDB = true;
|
||||||
|
@ -368,7 +375,8 @@ switch ($action) {
|
||||||
}
|
}
|
||||||
|
|
||||||
process_sql_begin();
|
process_sql_begin();
|
||||||
$resultOperationDB = process_sql_update('treport_content', array('`order`' => $oldOrder), array('`order`' => $newOrder, 'id_rc' => $idReport));
|
$resultOperationDB = process_sql_update('treport_content',
|
||||||
|
array('`order`' => $oldOrder), array('`order`' => $newOrder, 'id_report' => $idReport));
|
||||||
if ($resultOperationDB !== false) {
|
if ($resultOperationDB !== false) {
|
||||||
$resultOperationDB = process_sql_update('treport_content', array('`order`' => $newOrder), array('id_rc' => $idItem));
|
$resultOperationDB = process_sql_update('treport_content', array('`order`' => $newOrder), array('id_rc' => $idItem));
|
||||||
if ($resultOperationDB !== false) {
|
if ($resultOperationDB !== false) {
|
||||||
|
|
Loading…
Reference in New Issue