summaryrefslogtreecommitdiffstats
path: root/Bugzilla/Constants.pm
diff options
context:
space:
mode:
authorlpsolit%gmail.com <>2009-04-09 13:37:56 +0200
committerlpsolit%gmail.com <>2009-04-09 13:37:56 +0200
commit719303d9928bf0a727478c32f83a39b015a25136 (patch)
treef1b91f5e441fcba753483298426893d0927154fb /Bugzilla/Constants.pm
parent4afa077fc379af8eeec47f3dbd245b7c8fa9ff80 (diff)
downloadbugzilla-719303d9928bf0a727478c32f83a39b015a25136.tar.gz
bugzilla-719303d9928bf0a727478c32f83a39b015a25136.tar.xz
Bug 454251: Implement Bugzilla::Attachment->create() and $attachment->update() - Patch by Frédéric Buclin <LpSolit@gmail.com> a=LpSolit (module owner)
Diffstat (limited to 'Bugzilla/Constants.pm')
-rw-r--r--Bugzilla/Constants.pm29
1 files changed, 17 insertions, 12 deletions
diff --git a/Bugzilla/Constants.pm b/Bugzilla/Constants.pm
index 0150f3124..91a97b7a2 100644
--- a/Bugzilla/Constants.pm
+++ b/Bugzilla/Constants.pm
@@ -148,6 +148,7 @@ use File::Basename;
MAX_LOGINCOOKIE_AGE
SAFE_PROTOCOLS
+ LEGAL_CONTENT_TYPES
MIN_SMALLINT
MAX_SMALLINT
@@ -236,18 +237,6 @@ use constant LOGOUT_ALL => 0;
use constant LOGOUT_CURRENT => 1;
use constant LOGOUT_KEEP_CURRENT => 2;
-use constant contenttypes =>
- {
- "html"=> "text/html" ,
- "rdf" => "application/rdf+xml" ,
- "atom"=> "application/atom+xml" ,
- "xml" => "application/xml" ,
- "js" => "application/x-javascript" ,
- "csv" => "text/csv" ,
- "png" => "image/png" ,
- "ics" => "text/calendar" ,
- };
-
use constant GRANT_DIRECT => 0;
use constant GRANT_REGEXP => 2;
@@ -377,6 +366,22 @@ use constant SAFE_PROTOCOLS => ('afs', 'cid', 'ftp', 'gopher', 'http', 'https',
'irc', 'mid', 'news', 'nntp', 'prospero', 'telnet',
'view-source', 'wais');
+# Valid MIME types for attachments.
+use constant LEGAL_CONTENT_TYPES => ('application', 'audio', 'image', 'message',
+ 'model', 'multipart', 'text', 'video');
+
+use constant contenttypes =>
+ {
+ "html"=> "text/html" ,
+ "rdf" => "application/rdf+xml" ,
+ "atom"=> "application/atom+xml" ,
+ "xml" => "application/xml" ,
+ "js" => "application/x-javascript" ,
+ "csv" => "text/csv" ,
+ "png" => "image/png" ,
+ "ics" => "text/calendar" ,
+ };
+
# Usage modes. Default USAGE_MODE_BROWSER. Use with Bugzilla->usage_mode.
use constant USAGE_MODE_BROWSER => 0;
use constant USAGE_MODE_CMDLINE => 1;