diff options
Diffstat (limited to 'Bugzilla/Constants.pm')
-rw-r--r-- | Bugzilla/Constants.pm | 53 |
1 files changed, 38 insertions, 15 deletions
diff --git a/Bugzilla/Constants.pm b/Bugzilla/Constants.pm index 534c74d2f..ef3afeccb 100644 --- a/Bugzilla/Constants.pm +++ b/Bugzilla/Constants.pm @@ -105,7 +105,7 @@ use Memoize; POS_EVENTS EVT_OTHER EVT_ADDED_REMOVED EVT_COMMENT EVT_ATTACHMENT EVT_ATTACHMENT_DATA EVT_PROJ_MANAGEMENT EVT_OPENED_CLOSED EVT_KEYWORD EVT_CC EVT_DEPEND_BLOCK - EVT_BUG_CREATED + EVT_BUG_CREATED EVT_COMPONENT NEG_EVENTS EVT_UNCONFIRMED EVT_CHANGED_BY_ME @@ -125,10 +125,14 @@ use Memoize; FIELD_TYPE_MULTI_SELECT FIELD_TYPE_TEXTAREA FIELD_TYPE_DATETIME + FIELD_TYPE_DATE FIELD_TYPE_BUG_ID FIELD_TYPE_BUG_URLS FIELD_TYPE_KEYWORDS + FIELD_TYPE_EXTENSION + FIELD_TYPE_HIGHEST_PLUS_ONE + EMPTY_DATETIME_REGEX ABNORMAL_SELECTS @@ -141,12 +145,14 @@ use Memoize; USAGE_MODE_EMAIL USAGE_MODE_JSON USAGE_MODE_TEST + USAGE_MODE_REST ERROR_MODE_WEBPAGE ERROR_MODE_DIE ERROR_MODE_DIE_SOAP_FAULT ERROR_MODE_JSON_RPC ERROR_MODE_TEST + ERROR_MODE_REST COLOR_ERROR COLOR_SUCCESS @@ -182,6 +188,7 @@ use Memoize; MAX_FREETEXT_LENGTH MAX_BUG_URL_LENGTH MAX_POSSIBLE_DUPLICATES + MAX_WEBDOT_BUGS PASSWORD_DIGEST_ALGORITHM PASSWORD_SALT_LENGTH @@ -262,7 +269,8 @@ use constant AUTH_NO_SUCH_USER => 5; use constant AUTH_LOCKOUT => 6; # The minimum length a password must have. -use constant USER_PASSWORD_MIN_LENGTH => 6; +# BMO uses 8 characters. +use constant USER_PASSWORD_MIN_LENGTH => 8; use constant LOGIN_OPTIONAL => 0; use constant LOGIN_NORMAL => 1; @@ -355,11 +363,13 @@ use constant EVT_KEYWORD => 7; use constant EVT_CC => 8; use constant EVT_DEPEND_BLOCK => 9; use constant EVT_BUG_CREATED => 10; +use constant EVT_COMPONENT => 11; use constant POS_EVENTS => EVT_OTHER, EVT_ADDED_REMOVED, EVT_COMMENT, EVT_ATTACHMENT, EVT_ATTACHMENT_DATA, EVT_PROJ_MANAGEMENT, EVT_OPENED_CLOSED, EVT_KEYWORD, - EVT_CC, EVT_DEPEND_BLOCK, EVT_BUG_CREATED; + EVT_CC, EVT_DEPEND_BLOCK, EVT_BUG_CREATED, + EVT_COMPONENT; use constant EVT_UNCONFIRMED => 50; use constant EVT_CHANGED_BY_ME => 51; @@ -389,7 +399,8 @@ use constant SENDMAIL_PATH => '/usr/lib:/usr/sbin:/usr/ucblib'; # only storage but also logic. For example, we might add a "user" field type # whose values are stored in an integer column in the database but for which # we do more than we would do for a standard integer type (f.e. we might -# display a user picker). +# display a user picker). Fields of type FIELD_TYPE_EXTENSION should generally +# be ignored by the core code and is used primary by extensions. use constant FIELD_TYPE_UNKNOWN => 0; use constant FIELD_TYPE_FREETEXT => 1; @@ -400,6 +411,12 @@ use constant FIELD_TYPE_DATETIME => 5; use constant FIELD_TYPE_BUG_ID => 6; use constant FIELD_TYPE_BUG_URLS => 7; use constant FIELD_TYPE_KEYWORDS => 8; +use constant FIELD_TYPE_DATE => 9; +use constant FIELD_TYPE_EXTENSION => 99; + +# Add new field types above this line, and change the below value in the +# obvious fashion +use constant FIELD_TYPE_HIGHEST_PLUS_ONE => 100; use constant EMPTY_DATETIME_REGEX => qr/^[0\-:\sA-Za-z]+$/; @@ -431,8 +448,8 @@ use constant MAX_LOGIN_ATTEMPTS => 5; use constant LOGIN_LOCKOUT_INTERVAL => 30; # The maximum number of seconds the Strict-Transport-Security header -# will remain valid. Default is one week. -use constant MAX_STS_AGE => 604800; +# will remain valid. BMO uses one year. +use constant MAX_STS_AGE => 31536000; # Protocols which are considered as safe. use constant SAFE_PROTOCOLS => ('afs', 'cid', 'ftp', 'gopher', 'http', 'https', @@ -445,15 +462,16 @@ use constant LEGAL_CONTENT_TYPES => ('application', 'audio', 'image', 'message', use constant contenttypes => { - "html"=> "text/html" , - "rdf" => "application/rdf+xml" , - "atom"=> "application/atom+xml" , - "xml" => "application/xml" , - "js" => "application/x-javascript" , - "json"=> "application/json" , - "csv" => "text/csv" , - "png" => "image/png" , - "ics" => "text/calendar" , + "html" => "text/html" , + "rdf" => "application/rdf+xml" , + "atom" => "application/atom+xml" , + "xml" => "application/xml" , + "dtd" => "application/xml-dtd" , + "js" => "application/x-javascript" , + "json" => "application/json" , + "csv" => "text/csv" , + "png" => "image/png" , + "ics" => "text/calendar" , }; # Usage modes. Default USAGE_MODE_BROWSER. Use with Bugzilla->usage_mode. @@ -463,6 +481,7 @@ use constant USAGE_MODE_XMLRPC => 2; use constant USAGE_MODE_EMAIL => 3; use constant USAGE_MODE_JSON => 4; use constant USAGE_MODE_TEST => 5; +use constant USAGE_MODE_REST => 6; # Error modes. Default set by Bugzilla->usage_mode (so ERROR_MODE_WEBPAGE # usually). Use with Bugzilla->error_mode. @@ -471,6 +490,7 @@ use constant ERROR_MODE_DIE => 1; use constant ERROR_MODE_DIE_SOAP_FAULT => 2; use constant ERROR_MODE_JSON_RPC => 3; use constant ERROR_MODE_TEST => 4; +use constant ERROR_MODE_REST => 5; # The ANSI colors of messages that command-line scripts use use constant COLOR_ERROR => 'red'; @@ -562,6 +582,9 @@ use constant MAX_BUG_URL_LENGTH => 255; # will return. use constant MAX_POSSIBLE_DUPLICATES => 25; +# Maximum number of bugs to display in a dependency graph +use constant MAX_WEBDOT_BUGS => 2000; + # This is the name of the algorithm used to hash passwords before storing # them in the database. This can be any string that is valid to pass to # Perl's "Digest" module. Note that if you change this, it won't take |