summaryrefslogtreecommitdiffstats
path: root/Bugzilla/DB.pm
diff options
context:
space:
mode:
authormkanat%bugzilla.org <>2009-01-29 22:22:19 +0100
committermkanat%bugzilla.org <>2009-01-29 22:22:19 +0100
commitfc293fbd39f14308fbccd0cf9b523664ae813761 (patch)
tree2eff5448dfbcf0fb0a0671fad80da0752db8f727 /Bugzilla/DB.pm
parent25e6018ac8a6cf1a99b299fe60ce6c5b1e1d61e6 (diff)
downloadbugzilla-fc293fbd39f14308fbccd0cf9b523664ae813761.tar.gz
bugzilla-fc293fbd39f14308fbccd0cf9b523664ae813761.tar.xz
Bug 219021: Only display email addresses to logged-in users
Patch By Max Kanat-Alexander <mkanat@bugzilla.org> r=LpSolit, a=LpSolit
Diffstat (limited to 'Bugzilla/DB.pm')
-rw-r--r--Bugzilla/DB.pm25
1 files changed, 25 insertions, 0 deletions
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<sql_string_until>
+
+=over
+
+=item B<Description>
+
+Returns SQL for truncating a string at the first occurrence of a certain
+substring.
+
+=item B<Params>
+
+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<sql_fulltext_search>
=over