summaryrefslogtreecommitdiffstats
path: root/Bugzilla
diff options
context:
space:
mode:
authorlpsolit%gmail.com <>2005-09-07 21:05:10 +0200
committerlpsolit%gmail.com <>2005-09-07 21:05:10 +0200
commit25385f53b2dc79bf807f6fbef2f0f73491f83445 (patch)
tree96cfb0bf9255432dfb27c6de458caca8e8e3deaa /Bugzilla
parente679c1864efe76002b2b202dfbaa42acbba516a0 (diff)
downloadbugzilla-25385f53b2dc79bf807f6fbef2f0f73491f83445.tar.gz
bugzilla-25385f53b2dc79bf807f6fbef2f0f73491f83445.tar.xz
Bug 302669 (2nd part): show_bug.cgi?ctype=xml should allow the option of exporting attachment data - Patch by Greg Hendricks <ghendricks@novell.com> r/a=myk
Diffstat (limited to 'Bugzilla')
-rw-r--r--Bugzilla/Template.pm10
1 files changed, 9 insertions, 1 deletions
diff --git a/Bugzilla/Template.pm b/Bugzilla/Template.pm
index 91b98f5b8..92201507f 100644
--- a/Bugzilla/Template.pm
+++ b/Bugzilla/Template.pm
@@ -26,6 +26,7 @@
# Myk Melez <myk@mozilla.org>
# Max Kanat-Alexander <mkanat@bugzilla.org>
# Frédéric Buclin <LpSolit@gmail.com>
+# Greg Hendricks <ghendricks@novell.com>
package Bugzilla::Template;
@@ -37,6 +38,7 @@ use Bugzilla::Config qw(:DEFAULT $templatedir $datadir);
use Bugzilla::Util;
use Bugzilla::User;
use Bugzilla::Error;
+use MIME::Base64;
# for time2str - replace by TT Date plugin??
use Date::Format ();
@@ -319,7 +321,13 @@ sub create {
$var =~ s/\@/\\x40/g; # anti-spam for email addresses
return $var;
},
-
+
+ # Converts data to base64
+ base64 => sub {
+ my ($data) = @_;
+ return encode_base64($data);
+ },
+
# HTML collapses newlines in element attributes to a single space,
# so form elements which may have whitespace (ie comments) need
# to be encoded using &#013;