diff options
author | Dave Whiteland <dave@mysociety.org> | 2013-01-28 16:16:50 +0000 |
---|---|---|
committer | Dave Whiteland <dave@mysociety.org> | 2013-01-28 16:16:50 +0000 |
commit | 70b0ae0e9b927498c2724eac79aa29811cb6a523 (patch) | |
tree | 76ffa4b40aa4e6ec05a5bf59274a6a9bf5a3a5b7 /bin/oxfordshire | |
parent | 61cb6ccd7722068aeff8ebce0e36d7cdaa29ccc7 (diff) |
suppress debug output from Oxfordshire script for deployment
Diffstat (limited to 'bin/oxfordshire')
-rwxr-xr-x | bin/oxfordshire/open311_service_request_update.cgi | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/bin/oxfordshire/open311_service_request_update.cgi b/bin/oxfordshire/open311_service_request_update.cgi index 9dda434a7..cfceffcc8 100755 --- a/bin/oxfordshire/open311_service_request_update.cgi +++ b/bin/oxfordshire/open311_service_request_update.cgi @@ -78,12 +78,7 @@ sub get_service_request_updates { my $limit = $req -> param($CGI_VAR_LIMIT) =~ /^(\d{1,3})$/? $1 : $MAX_LIMIT; $sql = "SELECT * FROM ($sql) WHERE ROWNUM <= $limit" if $limit; - my $debug_str = <<XML; - <!-- DEBUG: from: $raw_start_date => $start_date --> - <!-- DEBUG: to: $raw_end_date => $end_date --> - <!-- DEBUG: sql: $sql --> -XML - + my $debug_str; my $ary_ref; if ($TESTING_WRITE_TO_FILE) { @@ -91,6 +86,12 @@ XML [97, 1000, '2013-01-05', 'OPEN', 'report was opened'], [99, 1000, '2013-01-06', 'CLOSED', 'report was closed'] ]; + # only add debug now if config says we're testing + $debug_str = <<XML; + <!-- DEBUG: from: $raw_start_date => $start_date --> + <!-- DEBUG: to: $raw_end_date => $end_date --> + <!-- DEBUG: sql: $sql --> +XML } else { my $dbh = get_db_connection(); $ary_ref = $dbh->selectall_arrayref($sql); |