summaryrefslogtreecommitdiffstats
path: root/Bugzilla/DB
diff options
context:
space:
mode:
authorMax Kanat-Alexander <mkanat@bugzilla.org>2011-02-14 21:29:09 +0100
committerMax Kanat-Alexander <mkanat@bugzilla.org>2011-02-14 21:29:09 +0100
commite9346b996d8a49f9438cf567ea9eb356b31f206a (patch)
treef0e6732495e9c0cd5bb2fbdbfebc5b4fb261a2bf /Bugzilla/DB
parentff3ae632c32d6d004de167b572e34e4f9a3542e1 (diff)
downloadbugzilla-e9346b996d8a49f9438cf567ea9eb356b31f206a.tar.gz
bugzilla-e9346b996d8a49f9438cf567ea9eb356b31f206a.tar.xz
Remove tabs and fix some formatting in Bugzilla::DB::Pg.
https://bugzilla.mozilla.org/show_bug.cgi?id=616981
Diffstat (limited to 'Bugzilla/DB')
-rw-r--r--Bugzilla/DB/Pg.pm8
1 files changed, 4 insertions, 4 deletions
diff --git a/Bugzilla/DB/Pg.pm b/Bugzilla/DB/Pg.pm
index f0a395900..386a67709 100644
--- a/Bugzilla/DB/Pg.pm
+++ b/Bugzilla/DB/Pg.pm
@@ -198,10 +198,10 @@ sub sql_string_until {
# PostgreSQL does not permit a negative substring length; therefore we
# use CASE to only perform the SUBSTRING operation when $substring can
# be found withing $string.
- return "CASE WHEN " . $self->sql_position($substring, $string)
- . " != 0 THEN SUBSTRING($string FROM 1 FOR "
- . $self->sql_position($substring, $string) . " - 1)"
- . " ELSE $string END";
+ my $position = $self->sql_position($substring, $string);
+ return "CASE WHEN $position != 0"
+ . " THEN SUBSTRING($string FROM 1 FOR $position - 1)"
+ . " ELSE $string END";
}
# Tell us whether or not a particular sequence exists in the DB.