aboutsummaryrefslogtreecommitdiffstats
path: root/perllib/Open311.pm
diff options
context:
space:
mode:
Diffstat (limited to 'perllib/Open311.pm')
-rw-r--r--perllib/Open311.pm19
1 files changed, 13 insertions, 6 deletions
diff --git a/perllib/Open311.pm b/perllib/Open311.pm
index 6ad93cf78..60b658dc3 100644
--- a/perllib/Open311.pm
+++ b/perllib/Open311.pm
@@ -79,9 +79,13 @@ sub send_service_request {
}
}
- warn sprintf( "Failed to submit problem %s over Open311, response\n: %s\n%s", $problem->id, $response, $self->debug_details );
- return 0;
+ warn sprintf( "Failed to submit problem %s over Open311, response\n: %s\n%s", $problem->id, $response, $self->debug_details )
+ unless $problem->send_fail_count;
+ } else {
+ warn sprintf( "Failed to submit problem %s over Open311, details:\n%s", $problem->id, $self->error)
+ unless $problem->send_fail_count;
}
+ return 0;
}
sub _populate_service_request_params {
@@ -263,9 +267,13 @@ sub post_service_request_update {
}
}
- warn sprintf( "Failed to submit comment %s over Open311, response - %s\n%s\n", $comment->id, $response, $self->debug_details );
- return 0;
+ warn sprintf( "Failed to submit comment %s over Open311, response - %s\n%s\n", $comment->id, $response, $self->debug_details )
+ unless $comment->send_fail_count;
+ } else {
+ warn sprintf( "Failed to submit comment %s over Open311, details\n%s\n", $comment->id, $self->error)
+ unless $comment->send_fail_count;
}
+ return 0;
}
sub _populate_service_request_update_params {
@@ -389,7 +397,6 @@ sub _post {
$self->_process_error( $res->decoded_content ),
$self->debug_details
) );
- warn $self->error;
return 0;
}
}
@@ -418,7 +425,7 @@ sub _get_xml_object {
my $obj;
eval {
- $obj = $simple ->XMLin( $xml, ForceArray => [ qr/^key$/, qr/^name$/ ] );
+ $obj = $simple ->parse_string( $xml, ForceArray => [ qr/^key$/, qr/^name$/ ] );
};
return $obj;
bold } /* Name.Function.Magic */ .highlight .vc { color: #336699 } /* Name.Variable.Class */ .highlight .vg { color: #dd7700 } /* Name.Variable.Global */ .highlight .vi { color: #3333bb } /* Name.Variable.Instance */ .highlight .vm { color: #336699 } /* Name.Variable.Magic */ .highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */
---
layout: post
title: Improving Configuration
author: matthew
---

Now that a default install is a bit more straightforward to set up, our
thoughts turn to improving the customistation of that default install.
Currently, apart from the options already present in the main configuration
file, that involves knowing a bit of Perl, in order to create a Cobrand .pm
file containing the various customistations. So to reduce that dependency,
we've moved a number of these options into the main configuration file, so that
hopefully a standard customisation might not need a Cobrand .pm file at all.

These changes range from simple text strings that are now in templates, through
to specifying what areas from MapIt you are interested in, or what languages
the site is available in. The general.yml-example file contains information on
each option, and we've updated our [customisation documentation](/customising/)
as well.

Also, thanks to some testing of a current installation by
[Anders](https://github.com/kagee) for FiksGataMi, we've made more incremental
improvements to the installation, including fixing a couple of tests that
shouldn't run unless your configuration is set up in a particular way, making
sure inherited cobrands use the best templates, and including the
Catalyst::Devel module so running the development server is easier.