aboutsummaryrefslogtreecommitdiffstats
path: root/bin/oxfordshire
diff options
context:
space:
mode:
authorDave Whiteland <dave@mysociety.org>2013-01-28 16:16:50 +0000
committerDave Whiteland <dave@mysociety.org>2013-01-28 16:16:50 +0000
commit70b0ae0e9b927498c2724eac79aa29811cb6a523 (patch)
tree76ffa4b40aa4e6ec05a5bf59274a6a9bf5a3a5b7 /bin/oxfordshire
parent61cb6ccd7722068aeff8ebce0e36d7cdaa29ccc7 (diff)
suppress debug output from Oxfordshire script for deployment
Diffstat (limited to 'bin/oxfordshire')
-rwxr-xr-xbin/oxfordshire/open311_service_request_update.cgi13
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);