diff options
-rw-r--r-- | Bugzilla/Attachment.pm | 1 | ||||
-rw-r--r-- | Bugzilla/Bug.pm | 1 | ||||
-rw-r--r-- | Bugzilla/BugUrl.pm | 4 | ||||
-rw-r--r-- | Bugzilla/Comment.pm | 4 | ||||
-rw-r--r-- | Bugzilla/DB/Schema.pm | 5 | ||||
-rw-r--r-- | Bugzilla/Flag.pm | 2 | ||||
-rw-r--r-- | Bugzilla/Object.pm | 6 | ||||
-rw-r--r-- | Bugzilla/Search/Recent.pm | 4 | ||||
-rw-r--r-- | Bugzilla/Search/Saved.pm | 4 | ||||
-rw-r--r-- | docs/en/xml/administration.xml | 2 | ||||
-rw-r--r-- | template/en/default/attachment/list.html.tmpl | 4 | ||||
-rw-r--r-- | template/en/default/bug/create/create.html.tmpl | 3 | ||||
-rw-r--r-- | template/en/default/bug/field.html.tmpl | 4 | ||||
-rw-r--r-- | template/en/default/filterexceptions.pl | 2 |
14 files changed, 32 insertions, 14 deletions
diff --git a/Bugzilla/Attachment.pm b/Bugzilla/Attachment.pm index 5ac71412c..b80228e78 100644 --- a/Bugzilla/Attachment.pm +++ b/Bugzilla/Attachment.pm @@ -72,6 +72,7 @@ use constant DB_TABLE => 'attachments'; use constant ID_FIELD => 'attach_id'; use constant LIST_ORDER => ID_FIELD; # Attachments are tracked in bugs_activity. +use constant AUDIT_CREATES => 0; use constant AUDIT_UPDATES => 0; sub DB_COLUMNS { diff --git a/Bugzilla/Bug.pm b/Bugzilla/Bug.pm index 6b51129af..2361e7343 100644 --- a/Bugzilla/Bug.pm +++ b/Bugzilla/Bug.pm @@ -74,6 +74,7 @@ use constant ID_FIELD => 'bug_id'; use constant NAME_FIELD => 'alias'; use constant LIST_ORDER => ID_FIELD; # Bugs have their own auditing table, bugs_activity. +use constant AUDIT_CREATES => 0; use constant AUDIT_UPDATES => 0; # This is a sub because it needs to call other subroutines. diff --git a/Bugzilla/BugUrl.pm b/Bugzilla/BugUrl.pm index 347d8d232..837c0d4fe 100644 --- a/Bugzilla/BugUrl.pm +++ b/Bugzilla/BugUrl.pm @@ -35,6 +35,10 @@ use URI::QueryParam; use constant DB_TABLE => 'bug_see_also'; use constant NAME_FIELD => 'value'; use constant LIST_ORDER => 'id'; +# See Also is tracked in bugs_activity. +use constant AUDIT_CREATES => 0; +use constant AUDIT_UPDATES => 0; +use constant AUDIT_REMOVES => 0; use constant DB_COLUMNS => qw( id diff --git a/Bugzilla/Comment.pm b/Bugzilla/Comment.pm index 1d42f04c6..ee342fb2d 100644 --- a/Bugzilla/Comment.pm +++ b/Bugzilla/Comment.pm @@ -37,7 +37,9 @@ use Scalar::Util qw(blessed); #### Initialization #### ############################### -# Updates of comments are audited in bugs_activity instead of audit_log. +# Creation and updating of comments are audited in longdescs +# and bugs_activity respectively instead of audit_log. +use constant AUDIT_CREATES => 0; use constant AUDIT_UPDATES => 0; use constant DB_COLUMNS => qw( diff --git a/Bugzilla/DB/Schema.pm b/Bugzilla/DB/Schema.pm index 7b7e4ffb6..da0c7d207 100644 --- a/Bugzilla/DB/Schema.pm +++ b/Bugzilla/DB/Schema.pm @@ -901,7 +901,10 @@ use constant ABSTRACT_SCHEMA => { profile_search => { FIELDS => [ id => {TYPE => 'INTSERIAL', NOTNULL => 1, PRIMARYKEY => 1}, - user_id => {TYPE => 'INT3', NOTNULL => 1}, + user_id => {TYPE => 'INT3', NOTNULL => 1, + REFERENCES => {TABLE => 'profiles', + COLUMN => 'userid', + DELETE => 'CASCADE'}}, bug_list => {TYPE => 'MEDIUMTEXT', NOTNULL => 1}, list_order => {TYPE => 'MEDIUMTEXT'}, ], diff --git a/Bugzilla/Flag.pm b/Bugzilla/Flag.pm index 61c06a9f5..35719ee8f 100644 --- a/Bugzilla/Flag.pm +++ b/Bugzilla/Flag.pm @@ -75,7 +75,9 @@ use base qw(Bugzilla::Object Exporter); use constant DB_TABLE => 'flags'; use constant LIST_ORDER => 'id'; # Flags are tracked in bugs_activity. +use constant AUDIT_CREATES => 0; use constant AUDIT_UPDATES => 0; +use constant AUDIT_REMOVES => 0; use constant SKIP_REQUESTEE_ON_ERROR => 1; diff --git a/Bugzilla/Object.pm b/Bugzilla/Object.pm index 29a6415b9..422a2ffa5 100644 --- a/Bugzilla/Object.pm +++ b/Bugzilla/Object.pm @@ -43,7 +43,9 @@ use constant VALIDATOR_DEPENDENCIES => {}; # XXX At some point, this will be joined with FIELD_MAP. use constant REQUIRED_FIELD_MAP => {}; use constant EXTRA_REQUIRED_FIELDS => (); +use constant AUDIT_CREATES => 1; use constant AUDIT_UPDATES => 1; +use constant AUDIT_REMOVES => 1; # This allows the JSON-RPC interface to return Bugzilla::Object instances # as though they were hashes. In the future, this may be modified to return @@ -411,7 +413,7 @@ sub remove_from_db { my $id_field = $self->ID_FIELD; my $dbh = Bugzilla->dbh; $dbh->bz_start_transaction(); - $self->audit_log(AUDIT_REMOVE); + $self->audit_log(AUDIT_REMOVE) if $self->AUDIT_REMOVES; $dbh->do("DELETE FROM $table WHERE $id_field = ?", undef, $self->id); $dbh->bz_commit_transaction(); undef $self; @@ -559,7 +561,7 @@ sub insert_create_data { Bugzilla::Hook::process('object_end_of_create', { class => $class, object => $object }); - $object->audit_log(AUDIT_CREATE); + $object->audit_log(AUDIT_CREATE) if $object->AUDIT_CREATES; return $object; } diff --git a/Bugzilla/Search/Recent.pm b/Bugzilla/Search/Recent.pm index ccd4a0f09..5f04b180b 100644 --- a/Bugzilla/Search/Recent.pm +++ b/Bugzilla/Search/Recent.pm @@ -33,6 +33,10 @@ use Bugzilla::Util; use constant DB_TABLE => 'profile_search'; use constant LIST_ORDER => 'id DESC'; +# Do not track buglists viewed by users. +use constant AUDIT_CREATES => 0; +use constant AUDIT_UPDATES => 0; +use constant AUDIT_REMOVES => 0; use constant DB_COLUMNS => qw( id diff --git a/Bugzilla/Search/Saved.pm b/Bugzilla/Search/Saved.pm index 9828d6e02..fc773fcde 100644 --- a/Bugzilla/Search/Saved.pm +++ b/Bugzilla/Search/Saved.pm @@ -39,6 +39,10 @@ use Scalar::Util qw(blessed); ############# use constant DB_TABLE => 'namedqueries'; +# Do not track buglists saved by users. +use constant AUDIT_CREATES => 0; +use constant AUDIT_UPDATES => 0; +use constant AUDIT_REMOVES => 0; use constant DB_COLUMNS => qw( id diff --git a/docs/en/xml/administration.xml b/docs/en/xml/administration.xml index f629ee329..46346bf7d 100644 --- a/docs/en/xml/administration.xml +++ b/docs/en/xml/administration.xml @@ -2527,7 +2527,7 @@ ReadOnly: ENTRY, NA/NA, CANEDIT <title>Viewing/Editing legal values</title> <para> Editing legal values requires <quote>admin</quote> privileges. - Select "Legal Values" from the Administration page. A list of all + Select "Field Values" from the Administration page. A list of all fields, both system fields and Custom Fields, for which legal values can be edited appears. Click a field name to edit its legal values. </para> diff --git a/template/en/default/attachment/list.html.tmpl b/template/en/default/attachment/list.html.tmpl index 4ad5e528a..fa8e4774e 100644 --- a/template/en/default/attachment/list.html.tmpl +++ b/template/en/default/attachment/list.html.tmpl @@ -19,7 +19,7 @@ # Frédéric Buclin <LpSolit@gmail.com> #%] -[% RETURN UNLESS attachments.size || Param("maxattachmentsize") %] +[% RETURN UNLESS attachments.size || Param("maxattachmentsize") || Param("maxlocalattachment") %] <script type="text/javascript"> <!-- @@ -160,7 +160,7 @@ function toggle_display(link) { [% END %] </span> [% END %] - [% IF Param("maxattachmentsize") %] + [% IF Param("maxattachmentsize") || Param("maxlocalattachment") %] <a href="attachment.cgi?bugid=[% bugid %]&action=enter">Add an attachment</a> (proposed patch, testcase, etc.) [% END %] diff --git a/template/en/default/bug/create/create.html.tmpl b/template/en/default/bug/create/create.html.tmpl index 7f2ddc42f..d6911770a 100644 --- a/template/en/default/bug/create/create.html.tmpl +++ b/template/en/default/bug/create/create.html.tmpl @@ -544,8 +544,7 @@ TUI_hide_default('attachment_text_field'); </tr> </tbody> -<tbody> - [% IF Param("maxattachmentsize") %] + [% IF Param("maxattachmentsize") || Param("maxlocalattachment") %] <tr> <th>Attachment:</th> <td colspan="3"> diff --git a/template/en/default/bug/field.html.tmpl b/template/en/default/bug/field.html.tmpl index 582853d0c..29cf82a62 100644 --- a/template/en/default/bug/field.html.tmpl +++ b/template/en/default/bug/field.html.tmpl @@ -33,10 +33,6 @@ # the field value. # no_tds: boolean; if true, don't display the label <th> or the # wrapping <td> for the field. - # desc_url: string; Normally the label of a non-custom field links to - # fields.html. If you want it to link elsewhere, specify the - # relative URL you want to link to, here. Remember to call - # url_quote on any query string arguments. # bug (optional): The current Bugzilla::Bug being displayed, or a hash # with default field values being displayed on a page. #%] diff --git a/template/en/default/filterexceptions.pl b/template/en/default/filterexceptions.pl index b4986e1f7..7a542f427 100644 --- a/template/en/default/filterexceptions.pl +++ b/template/en/default/filterexceptions.pl @@ -34,7 +34,7 @@ # [% foo.push() %] # TT loop variables - [% loop.count %] # Already-filtered stuff - [% wibble FILTER html %] -# where the filter is one of html|csv|js|url_quote|quoteUrls|time|uri|xml|none +# where the filter is one of html|csv|js|quoteUrls|time|uri|xml|none %::safe = ( |