From fc293fbd39f14308fbccd0cf9b523664ae813761 Mon Sep 17 00:00:00 2001 From: "mkanat%bugzilla.org" <> Date: Thu, 29 Jan 2009 21:22:19 +0000 Subject: Bug 219021: Only display email addresses to logged-in users Patch By Max Kanat-Alexander r=LpSolit, a=LpSolit --- Bugzilla/DB.pm | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) (limited to 'Bugzilla/DB.pm') diff --git a/Bugzilla/DB.pm b/Bugzilla/DB.pm index 377f83930..81a720ee5 100644 --- a/Bugzilla/DB.pm +++ b/Bugzilla/DB.pm @@ -342,6 +342,12 @@ sub sql_string_concat { return '(' . join(' || ', @params) . ')'; } +sub sql_string_until { + my ($self, $string, $substring) = @_; + return "SUBSTRING($string FROM 1 FOR " . + $self->sql_position($substring, $string) . " - 1)"; +} + sub sql_in { my ($self, $column_name, $in_list_ref) = @_; return " $column_name IN (" . join(',', @$in_list_ref) . ") "; @@ -1811,6 +1817,25 @@ Formatted SQL for concatenating specified strings =back +=item C + +=over + +=item B + +Returns SQL for truncating a string at the first occurrence of a certain +substring. + +=item B + +Note that both parameters need to be sql-quoted. + +=item C<$string> The string we're truncating + +=item C<$substring> The substring we're truncating at. + +=back + =item C =over -- cgit v1.2.3-24-g4f1b