|
Lines 239-250
elsif ( $phase eq 'Update SQL'){
Link Here
|
| 239 |
|
239 |
|
| 240 |
create_non_existing_group_and_subgroup($input, $group, $subgroup); |
240 |
create_non_existing_group_and_subgroup($input, $group, $subgroup); |
| 241 |
|
241 |
|
| 242 |
if ($sql =~ /;?\W?(UPDATE|DELETE|DROP|INSERT|SHOW|CREATE)\W/i) { |
242 |
push(@errors, @{Koha::Reports->validate_sql($sql)}); |
| 243 |
push @errors, {sqlerr => $1}; |
|
|
| 244 |
} |
| 245 |
elsif ($sql !~ /^(SELECT)/i) { |
| 246 |
push @errors, {queryerr => "No SELECT"}; |
| 247 |
} |
| 248 |
|
243 |
|
| 249 |
if (@errors) { |
244 |
if (@errors) { |
| 250 |
$template->param( |
245 |
$template->param( |
|
Lines 600-611
elsif ( $phase eq 'Save Report' ) {
Link Here
|
| 600 |
|
595 |
|
| 601 |
create_non_existing_group_and_subgroup($input, $group, $subgroup); |
596 |
create_non_existing_group_and_subgroup($input, $group, $subgroup); |
| 602 |
## FIXME this is AFTER entering a name to save the report under |
597 |
## FIXME this is AFTER entering a name to save the report under |
| 603 |
if ($sql =~ /;?\W?(UPDATE|DELETE|DROP|INSERT|SHOW|CREATE)\W/i) { |
598 |
push(@errors, @{Koha::Reports->validate_sql($sql)}); |
| 604 |
push @errors, {sqlerr => $1}; |
|
|
| 605 |
} |
| 606 |
elsif ($sql !~ /^(SELECT)/i) { |
| 607 |
push @errors, {queryerr => "No SELECT"}; |
| 608 |
} |
| 609 |
|
599 |
|
| 610 |
if (@errors) { |
600 |
if (@errors) { |
| 611 |
$template->param( |
601 |
$template->param( |