diff options
42 files changed, 335 insertions, 254 deletions
diff --git a/Bugzilla/Install/DB.pm b/Bugzilla/Install/DB.pm index f30e1503b..1b6acce35 100644 --- a/Bugzilla/Install/DB.pm +++ b/Bugzilla/Install/DB.pm @@ -637,9 +637,6 @@ sub update_table_definitions { # 2009-05-07 ghendricks@novell.com - Bug 77193 _add_isactive_to_product_fields(); - # 2009-05-07 ghendricks@novell.com - Bug 77193 - _add_isactive_to_product_fields(); - # 2010-10-09 LpSolit@gmail.com - Bug 505165 $dbh->bz_alter_column('flags', 'setter_id', {TYPE => 'INT3', NOTNULL => 1}); @@ -3429,26 +3426,6 @@ sub _remove_attachment_isurl { } } -sub _add_isactive_to_product_fields { - my $dbh = Bugzilla->dbh; - - # If we add the isactive column all values should start off as active - if (!$dbh->bz_column_info('components', 'isactive')) { - $dbh->bz_add_column('components', 'isactive', - {TYPE => 'BOOLEAN', NOTNULL => 1, DEFAULT => 'TRUE'}); - } - - if (!$dbh->bz_column_info('versions', 'isactive')) { - $dbh->bz_add_column('versions', 'isactive', - {TYPE => 'BOOLEAN', NOTNULL => 1, DEFAULT => 'TRUE'}); - } - - if (!$dbh->bz_column_info('milestones', 'isactive')) { - $dbh->bz_add_column('milestones', 'isactive', - {TYPE => 'BOOLEAN', NOTNULL => 1, DEFAULT => 'TRUE'}); - } -} - sub _migrate_field_visibility_value { my $dbh = Bugzilla->dbh; diff --git a/extensions/BMO/lib/FakeBug.pm b/extensions/BMO/lib/FakeBug.pm index 5610f5433..6127cb560 100644 --- a/extensions/BMO/lib/FakeBug.pm +++ b/extensions/BMO/lib/FakeBug.pm @@ -3,6 +3,8 @@ package Bugzilla::Extension::BMO::FakeBug; # hack to allow the bug entry templates to use check_can_change_field to see if # various field values should be available to the current user +use strict; + use Bugzilla::Bug; our $AUTOLOAD; diff --git a/extensions/BMO/template/en/default/account/create.html.tmpl b/extensions/BMO/template/en/default/account/create.html.tmpl index 47355cf00..275df01f8 100644 --- a/extensions/BMO/template/en/default/account/create.html.tmpl +++ b/extensions/BMO/template/en/default/account/create.html.tmpl @@ -122,17 +122,17 @@ function onSubmit() { <ol> <li> Please consider reading our - <a href="https://developer.mozilla.org/en/Bug_writing_guidelines" target="_blank">bug writing guidelines</a>. + <a href="https://developer.mozilla.org/en/Bug_writing_guidelines" target="_blank">[% terms.bug %] writing guidelines</a>. </li> <li> - Bugzilla is a public place, so what you type and your email address will be visible + [% terms.Bugzilla %] is a public place, so what you type and your email address will be visible to all logged-in users. Some people use an <a href="http://email.about.com/od/freeemailreviews/tp/free_email.htm" target="_blank">alternative email address</a> for this reason. </li> <li> Please give us an email address you want to use. Once we confirm that it works, - you'll be asked to set a password and then you can start filing bugs and helping fix them. + you'll be asked to set a password and then you can start filing [% terms.bugs %] and helping fix them. </li> </ol> </div> @@ -158,9 +158,9 @@ function onSubmit() { </table> <p id="bmo-admin"> - If you think there's something wrong with Bugzilla, you can + If you think there's something wrong with [% terms.Bugzilla %], you can <a href="mailto:bugzilla-admin@mozilla.org">send an email to the admins</a>, but - remember, they can't file bugs for you, or solve tech support problems. + remember, they can't file [% terms.bugs %] for you, or solve tech support problems. </p> [% PROCESS global/footer.html.tmpl %] diff --git a/extensions/BMO/template/en/default/bug/create/create-brownbag.html.tmpl b/extensions/BMO/template/en/default/bug/create/create-brownbag.html.tmpl index e4c6cabfb..7016477f5 100644 --- a/extensions/BMO/template/en/default/bug/create/create-brownbag.html.tmpl +++ b/extensions/BMO/template/en/default/bug/create/create-brownbag.html.tmpl @@ -89,7 +89,7 @@ function trySubmit() { <input type="hidden" name="bug_severity" id="bug_severity" value="normal"> <input type="hidden" name="comment" id="comment" value=""> <input type="hidden" name="short_desc" id="short_desc" value=""> - <input type="hidden" name="groups" value="mozilla-corporation-confidential"> + <input type="hidden" name="groups" value="mozilla-corporation-confidential"> <table> <tr> @@ -146,7 +146,7 @@ function trySubmit() { <option value="AM" selected>AM</option> <option value="PM">PM</option> </select> - </td> + </td> </tr> <tr> diff --git a/extensions/BMO/template/en/default/bug/create/create-itrequest.html.tmpl b/extensions/BMO/template/en/default/bug/create/create-itrequest.html.tmpl index 08207fd8c..d9b0579ba 100644 --- a/extensions/BMO/template/en/default/bug/create/create-itrequest.html.tmpl +++ b/extensions/BMO/template/en/default/bug/create/create-itrequest.html.tmpl @@ -32,7 +32,7 @@ [% USE Bugzilla %] <p><strong>Please use this form for IT requests only!</strong></p> -<p>If you have a bug to file, go <a href="enter_bug.cgi">here</a>.</p> +<p>If you have a [% terms.bug %] to file, go <a href="enter_bug.cgi">here</a>.</p> <form method="post" action="post_bug.cgi" id="itRequestForm" enctype="multipart/form-data"> <input type="hidden" name="product" value="mozilla.org"> @@ -172,7 +172,7 @@ </table> <br> - <!-- infra bugs --> + <!-- infra [% terms.bugs %] --> <input type="checkbox" name="groups" id="groups" value="infra" checked="checked"><label for="groups"><strong>This is an internal issue which should not be publicly visible.</strong></label><br>(please uncheck this box if it isn't) <br><br> diff --git a/extensions/BMO/template/en/default/bug/create/create-mktgevent.html.tmpl b/extensions/BMO/template/en/default/bug/create/create-mktgevent.html.tmpl index d6b6c188f..8aaa84678 100644 --- a/extensions/BMO/template/en/default/bug/create/create-mktgevent.html.tmpl +++ b/extensions/BMO/template/en/default/bug/create/create-mktgevent.html.tmpl @@ -99,9 +99,8 @@ function validateAndSubmit() { <input type="hidden" name="priority" value="--"> <input type="hidden" name="version" value="unspecified"> <input type="hidden" name="bug_severity" id="bug_severity" value="normal"> - <input type="hidden" name="short_desc" id="short_desc" value=""> - <input type="hidden" name="groups" value="mozilla-corporation-confidential"> + <input type="hidden" name="groups" value="mozilla-corporation-confidential"> <table> <tr> diff --git a/extensions/BMO/template/en/default/bug/create/create-mozlist.html.tmpl b/extensions/BMO/template/en/default/bug/create/create-mozlist.html.tmpl index 138f1754b..0a2edb5ee 100644 --- a/extensions/BMO/template/en/default/bug/create/create-mozlist.html.tmpl +++ b/extensions/BMO/template/en/default/bug/create/create-mozlist.html.tmpl @@ -88,21 +88,21 @@ var listName = document.getElementById('listName').value; var listAdmin = document.getElementById('listAdmin').value; var listTypeRadio = document.getElementsByName('listType'); - var listType = ""; + var listType = ""; - for (var i = 0; i < listTypeRadio.length; i++) { - if (listTypeRadio[i].checked) { - listType = listTypeRadio[i].value; - } - } + for (var i = 0; i < listTypeRadio.length; i++) { + if (listTypeRadio[i].checked) { + listType = listTypeRadio[i].value; + } + } var alert_text = ""; var short_desc = ""; - if (listType) { + if (listType) { if (listType == "lists.mozilla.org") { document.getElementById('component').value = "Discussion Forums"; - short_desc = "Discussion Forum: " + listName; + short_desc = "Discussion Forum: " + listName; } else if (listType == "mozilla.com" ) { document.getElementById('component').value = "Server Operations: Desktop Issues"; short_desc = "[Zimbra Distribution List Request] " + listName + "@" + listType; @@ -112,7 +112,7 @@ } } else { alert_text += "Please select a list type\n"; - } + } if (!isFilledOut('listName')) { alert_text += "Please enter the list name\n"; @@ -127,7 +127,7 @@ return false; } - document.getElementById('short_desc').value = short_desc; + document.getElementById('short_desc').value = short_desc; return true; } @@ -220,8 +220,8 @@ <br> <b>Note:</b>The list administrator is also initially considered to be the list moderator and will be responsible for moderation tasks unless delegated to someone else. For - convenience, Bugzilla user accounts will autocomplete. The administrator is not required - to have a Bugzilla account, and you can enter an address that doesn't autocomplete if + convenience, [% terms.Bugzilla %] user accounts will autocomplete. The administrator is not required + to have a [% terms.Bugzilla %] account, and you can enter an address that doesn't autocomplete if necessary.<hr /> </td> </tr> @@ -287,7 +287,7 @@ <br> <div id="groups" style="display:none;"> - <!-- infra bugs --> + <!-- infra [% terms.bugs %] --> <input type="checkbox" name="groups" id="group_35" value="infra" disabled="true"> <label for="group_35"><strong>This is an internal issue which should not be publicly visible.</strong></label> <br><br> diff --git a/extensions/BMO/template/en/default/bug/create/create-mozpr.html.tmpl b/extensions/BMO/template/en/default/bug/create/create-mozpr.html.tmpl index 28a37a31e..a272e0b41 100644 --- a/extensions/BMO/template/en/default/bug/create/create-mozpr.html.tmpl +++ b/extensions/BMO/template/en/default/bug/create/create-mozpr.html.tmpl @@ -299,9 +299,9 @@ TUI_hide_default('expert_fields'); </td> </tr> </table> - <input type="hidden" name="bug_severity" value="[% default.bug_severity %]"> - <input type="hidden" name="rep_platform" value="[% default.rep_platform %]"> - <input type="hidden" name="op_sys" value="[% default.op_sys %]"> + <input type="hidden" name="bug_severity" value="[% default.bug_severity FILTER html %]"> + <input type="hidden" name="rep_platform" value="[% default.rep_platform FILTER html %]"> + <input type="hidden" name="op_sys" value="[% default.op_sys FILTER html %]"> <input type="hidden" name="version" value="unspecified"> </td> </tr> @@ -466,7 +466,7 @@ TUI_hide_default('expert_fields'); <td colspan="3"> [% defaultcontent = BLOCK %] [% IF cloned_bug_id %] -+++ This [% terms.bug %] was initially created as a clone of [% terms.Bug %] #[% cloned_bug_id %] +++ ++++ This [% terms.bug %] was initially created as a clone of [% terms.Bug %] #[% cloned_bug_id FILTER html %] +++ [% END %] @@ -552,7 +552,7 @@ TUI_hide_default('expert_fields'); <th>Status Whiteboard:</th> <td colspan="3"> <input id="status_whiteboard" name="status_whiteboard" size="70" - value="[% status_whiteboard %]"> + value="[% status_whiteboard FILTER html %]"> </td> </tr> <tr> @@ -571,13 +571,14 @@ TUI_hide_default('expert_fields'); </tbody> <tbody class="expert_fields"> - [% IF group.size %] + [% IF product.groups_available.size %] <tr> <th> </th> <td colspan="3"> <br> <strong> - Only users in all of the selected groups can view this [% terms.bug %]: + Only users in all of the selected groups can view this + [%+ terms.bug %]: </strong> <br> <font size="-1"> @@ -587,12 +588,14 @@ TUI_hide_default('expert_fields'); <br> <!-- Checkboxes --> - [% FOREACH g = group %] - - <input type="checkbox" id="bit-[% g.bit %]" - name="bit-[% g.bit %]" value="1" - [% " checked=\"checked\"" IF g.checked %]> - <label for="bit-[% g.bit %]">[% g.description FILTER html_light %]</label><br> + <input type="hidden" name="defined_groups" value="1"> + [% FOREACH group = product.groups_available %] + <input type="checkbox" id="group_[% group.id FILTER html %]" + name="groups" value="[% group.name FILTER html %]" + [% ' checked="checked"' IF default.groups.contains(group.name) + OR group.is_default %]> + <label for="group_[% group.id FILTER html %]"> + [%- group.description FILTER html_light %]</label><br> [% END %] </td> </tr> diff --git a/extensions/BMO/template/en/default/bug/create/create-presentation.html.tmpl b/extensions/BMO/template/en/default/bug/create/create-presentation.html.tmpl index cdbce5c8c..b28a81004 100644 --- a/extensions/BMO/template/en/default/bug/create/create-presentation.html.tmpl +++ b/extensions/BMO/template/en/default/bug/create/create-presentation.html.tmpl @@ -86,7 +86,7 @@ function trySubmit() { <input type="hidden" name="bug_severity" id="bug_severity" value="normal"> <input type="hidden" name="comment" id="comment" value=""> <input type="hidden" name="short_desc" id="short_desc" value=""> - <input type="hidden" name="groups" value="mozilla-corporation-confidential"> + <input type="hidden" name="groups" value="mozilla-corporation-confidential"> <table> <tr> @@ -142,7 +142,7 @@ function trySubmit() { <option value="AM" selected>AM</option> <option value="PM">PM</option> </select> - </td> + </td> </tr> <tr> diff --git a/extensions/BMO/template/en/default/bug/create/create-swag.html.tmpl b/extensions/BMO/template/en/default/bug/create/create-swag.html.tmpl index f7edccbe1..2b47f60c5 100644 --- a/extensions/BMO/template/en/default/bug/create/create-swag.html.tmpl +++ b/extensions/BMO/template/en/default/bug/create/create-swag.html.tmpl @@ -34,7 +34,7 @@ <p><strong>Swag Request:</strong> Please use this form to file a request for swag. </p> <ol> - <li>You first need submit a <a href="/enter_bug.cgi?product=Marketing&format=mktgevent">Event Request Form</a>. You'll be asked for the bug number below.</li> + <li>You first need submit a <a href="/enter_bug.cgi?product=Marketing&format=mktgevent">Event Request Form</a>. You'll be asked for the [% terms.bug %] number below.</li> <li>Complete and submit request below.</li> <li>Your request will be reviewed by the appropriate person in the Engagement team.</li> <li>Your swag request will be reviewed and if approved shipped to you from @@ -70,7 +70,7 @@ function validateAndSubmit() { var alert_text = ''; if(!isFilledOut('firstname')) alert_text += "Please enter your first name\n"; if(!isFilledOut('lastname')) alert_text += "Please enter your last name\n"; - if(!isFilledOut('dependson')) alert_text += "Please enter the bug number for your Event Request Form\n"; + if(!isFilledOut('dependson')) alert_text += "Please enter the [% terms.bug %] number for your Event Request Form\n"; if(!isValidEmail(document.getElementById('email').value)) alert_text += "Please enter a valid email address\n"; //Everything required is filled out..try to submit the form! @@ -96,9 +96,8 @@ function validateAndSubmit() { <input type="hidden" name="priority" value="--"> <input type="hidden" name="version" value="unspecified"> <input type="hidden" name="bug_severity" id="bug_severity" value="normal"> - <input type="hidden" name="short_desc" id="short_desc" value=""> - <input type="hidden" name="groups" value="mozilla-corporation-confidential"> + <input type="hidden" name="groups" value="mozilla-corporation-confidential"> <table> <tr> @@ -143,7 +142,7 @@ function validateAndSubmit() { </tr> <tr> - <td align="right"><strong>Bug number assigned to previously- <br>submitted <a href="/enter_bug.cgi?product=Marketing&format=mktgevent">Event Request Form</a>: <span style="color: red;">*</span></strong></td> + <td align="right"><strong>[% terms.Bug %] number assigned to previously- <br>submitted <a href="/enter_bug.cgi?product=Marketing&format=mktgevent">Event Request Form</a>: <span style="color: red;">*</span></strong></td> <td colspan="3"><input name="dependson" id="dependson"></td> </tr> diff --git a/extensions/BMO/template/en/default/bug/create/user-message.html.tmpl b/extensions/BMO/template/en/default/bug/create/user-message.html.tmpl index e7cea5d2b..fdc4b5f0c 100644 --- a/extensions/BMO/template/en/default/bug/create/user-message.html.tmpl +++ b/extensions/BMO/template/en/default/bug/create/user-message.html.tmpl @@ -62,9 +62,9 @@ the <a href="https://bugzilla.mozilla.org/enter_bug.cgi">full product list</a>. <p> <b>The product you have chosen is for [% terms.bug %] reports and enhancement requests for the -<a href="http://www.bugzilla.org/">Bugzilla [% terms.bug %] tracking software</a> only.</b> -If your [% terms.bug %] is not reporting that Bugzilla is broken or that you'd like -a new feature in Bugzilla, your [% terms.bug %] report does not belong in this product. +<a href="http://www.bugzilla.org/">[% terms.Bugzilla +%] [%+ terms.bug %] tracking software</a> only.</b> +If your [% terms.bug %] is not reporting that [% terms.Bugzilla %] is broken or that you'd like +a new feature in [% terms.Bugzilla %], your [% terms.bug %] report does not belong in this product. [% IF format == "guided" %] See the instructions next to the stop sign above. [% ELSE %] @@ -72,22 +72,22 @@ a new feature in Bugzilla, your [% terms.bug %] report does not belong in this p [% END %] </p> -<p><b>We WILL NOT accept [% terms.bug %] reports for Bugzilla -installed via the Debian packaging system. If you obtained Bugzilla from Debian, +<p><b>We WILL NOT accept [% terms.bug %] reports for [% terms.Bugzilla %] +installed via the Debian packaging system. If you obtained [% terms.Bugzilla %] from Debian, please visit the <a href="http://www.debian.org/support">Debian Support page</a>, -or file a bug on the <a href="http://bugs.debian.org/cgi-bin/pkgreport.cgi?pkg=bugzilla">Debian -Bug Tracker</a>.</b> The Debian package maintainer will then determine whether the bug -is specific to the package or not, and can move the bug "upstream" if needed.</p> +or file a [% terms.bug %] on the <a href="http://bugs.debian.org/cgi-bin/pkgreport.cgi?pkg=bugzilla">Debian +[% terms.Bug %] Tracker</a>.</b> The Debian package maintainer will then determine whether the [% terms.bug %] +is specific to the package or not, and can move the [% terms.bug %] "upstream" if needed.</p> <p> -Bugs specific to bugzilla.mozilla.org, rather than the Bugzilla software in +[% terms.Bugs %] specific to bugzilla.mozilla.org, rather than the [% terms.Bugzilla %] software in general (which is used by many sites), should be filed in the <a href="enter_bug.cgi?product=mozilla.org">mozilla.org product</a>. </p> <p> Please do not file test [% terms.bugs %] or support requests here! You -can test Bugzilla at +can test [% terms.Bugzilla %] at <a href="http://landfill.bugzilla.org/">landfill.bugzilla.org</a> and ask for support in the <a href="news://news.mozilla.org/mozilla.support.bugzilla"> @@ -106,7 +106,7 @@ support-bugzilla@lists.mozilla.org mailing list</a>, or [% UNLESS cloned_bug_id %] Consider using the <a href="enter_bug.cgi?product=[% product.name FILTER html %]&format=guided"> -Bugzilla Helper</a> instead of this form. +[% terms.Bugzilla %] Helper</a> instead of this form. [% END +%] Before reporting a [% terms.bug %], make sure you've read our <a href="http://www.mozilla.org/quality/bug-writing-guidelines.html"> diff --git a/extensions/BMO/template/en/default/global/choose-product.html.tmpl b/extensions/BMO/template/en/default/global/choose-product.html.tmpl index a65605a93..7e0a8dc18 100644 --- a/extensions/BMO/template/en/default/global/choose-product.html.tmpl +++ b/extensions/BMO/template/en/default/global/choose-product.html.tmpl @@ -42,7 +42,8 @@ <center> <hr> -<p><span style="font-family: verdana,helvetica;">Looking for technical support or help getting your site to work with Mozilla? <a href="http://www.mozilla.org/support/">Visit the mozilla.org support page</a> before filing bugs.</span></p> +<p><span style="font-family: verdana,helvetica;">Looking for technical support or help getting your site to work with Mozilla? <a +href="http://www.mozilla.org/support/">Visit the mozilla.org support page</a> before filing [% terms.bugs %].</span></p> <hr> </center> @@ -96,12 +97,12 @@ icon="dino.png" %] <tr> - <td><a href="[% target FILTER uri i%]?full=1 + <td><a href="[% target FILTER uri %]?full=1 [%- IF cloned_bug_id %]&cloned_bug_id=[% cloned_bug_id FILTER uri %][% END -%] [%- IF classification %]&classification=[% classification FILTER uri %][% END -%] [%- IF format %]&format=[% format FILTER uri %][% END %]"> <img src="extensions/BMO/web/producticons/other.png" height="64" width="64" border="0"></a></td> - <td><h2 align="left" style="margin-bottom: 0px;"><a href="[% target FILTER uri i%]?full=1 + <td><h2 align="left" style="margin-bottom: 0px;"><a href="[% target FILTER uri %]?full=1 [%- IF cloned_bug_id %]&cloned_bug_id=[% cloned_bug_id FILTER uri %][% END -%] [%- IF classification %]&classification=[% classification FILTER uri %][% END -%] [%- IF format %]&format=[% format FILTER uri %][% END %]"> @@ -146,7 +147,7 @@ <br> [% IF target == "enter_bug.cgi" AND user.settings.product_chooser.value != 'full_product_chooser' %] -<p align="center">You can choose to get this screen by default when you click "New Bug" by changing your <a href="userprefs.cgi?tab=settings">preferences</a>.</p> +<p align="center">You can choose to get this screen by default when you click "New [% terms.Bug %]" by changing your <a href="userprefs.cgi?tab=settings">preferences</a>.</p> [% END %] [% END %] <br> diff --git a/extensions/BMO/template/en/default/hook/bug/create/create-guided-form.html.tmpl b/extensions/BMO/template/en/default/hook/bug/create/create-guided-form.html.tmpl index ee88aac7c..a0fff4175 100644 --- a/extensions/BMO/template/en/default/hook/bug/create/create-guided-form.html.tmpl +++ b/extensions/BMO/template/en/default/hook/bug/create/create-guided-form.html.tmpl @@ -1,4 +1,4 @@ - <tr bgcolor="[% tablecolour %]"> + <tr bgcolor="[% tablecolour FILTER html %]"> <td valign="middle" align="right"> <b>Security</b> </td> diff --git a/extensions/BMO/template/en/default/hook/global/header-additional_header.html.tmpl b/extensions/BMO/template/en/default/hook/global/header-additional_header.html.tmpl index 0277f3e7e..05276d5f7 100644 --- a/extensions/BMO/template/en/default/hook/global/header-additional_header.html.tmpl +++ b/extensions/BMO/template/en/default/hook/global/header-additional_header.html.tmpl @@ -21,7 +21,7 @@ <link rel="shortcut icon" href="extensions/BMO/web/images/bugzilla.png"> [% IF bug %] -<link id="shorturl" rev="canonical" href="https://bugzil.la/[% bug.bug_id %]"> +<link id="shorturl" rev="canonical" href="https://bugzil.la/[% bug.bug_id FILTER uri %]"> [% END %] <style type="text/css"> diff --git a/extensions/BMO/template/en/default/hook/global/header-start.html.tmpl b/extensions/BMO/template/en/default/hook/global/header-start.html.tmpl index 3c2f90e19..9c96ebffa 100644 --- a/extensions/BMO/template/en/default/hook/global/header-start.html.tmpl +++ b/extensions/BMO/template/en/default/hook/global/header-start.html.tmpl @@ -1,3 +1,13 @@ +[% IF !javascript_urls %] + [% javascript_urls = [] %] +[% END %] + [% IF template.name == 'list/list.html.tmpl' %] [% javascript_urls.push('extensions/BMO/web/js/sorttable.js') %] -[% END %]
\ No newline at end of file +[% END %] + +[% IF user.in_group('editusers') || user.bless_groups.size > 0 %] + [% yui.push('container', 'menu') %] + [% style_urls.push('js/yui/assets/skins/sam/menu.css') %] + [% javascript_urls.push('extensions/BMO/web/js/edituser_menu.js') %] +[% END %] diff --git a/extensions/BMO/template/en/default/hook/global/user-error.html.tmpl/auth_failure/permissions.html.tmpl b/extensions/BMO/template/en/default/hook/global/user-error.html.tmpl/auth_failure/permissions.html.tmpl index 5f6ca946a..346e02373 100644 --- a/extensions/BMO/template/en/default/hook/global/user-error.html.tmpl/auth_failure/permissions.html.tmpl +++ b/extensions/BMO/template/en/default/hook/global/user-error.html.tmpl/auth_failure/permissions.html.tmpl @@ -22,7 +22,7 @@ [% IF (group == "canconfirm" OR group == "editbugs") AND !reason %] <p> - If you are attempting to confirm an unconfirmed bug or edit the fields of a bug, + If you are attempting to confirm an unconfirmed [% terms.bug %] or edit the fields of a [% terms.bug %], <a href="http://www.gerv.net/hacking/before-you-mail-gerv.html#bugzilla-permissions">find out how to get the necessary permissions</a>. </p> diff --git a/extensions/BMO/template/en/default/list/list.microsummary.tmpl b/extensions/BMO/template/en/default/list/list.microsummary.tmpl index 8f6b13cbd..8925db8dd 100644 --- a/extensions/BMO/template/en/default/list/list.microsummary.tmpl +++ b/extensions/BMO/template/en/default/list/list.microsummary.tmpl @@ -23,7 +23,7 @@ [% IF searchname %] - [% searchname %] ([% bugs.size %]) + [% searchname FILTER html %] ([% bugs.size %]) [% ELSE %] [% terms.Bug %] List ([% bugs.size %]) [% END %] diff --git a/extensions/BMO/template/en/default/list/server-push.html.tmpl b/extensions/BMO/template/en/default/list/server-push.html.tmpl index 40432a35b..1c1f3cf36 100644 --- a/extensions/BMO/template/en/default/list/server-push.html.tmpl +++ b/extensions/BMO/template/en/default/list/server-push.html.tmpl @@ -34,7 +34,7 @@ <div style="margin-top: 15%; text-align: center;"> <center><img src="extensions/BMO/web/images/mozchomp.gif" alt="" width="160" height="87"></center> - <h1>Please wait while your bugs are retrieved.</h1> + <h1>Please wait while your [% terms.bugs %] are retrieved.</h1> </div> [% IF debug %] diff --git a/extensions/BMO/template/en/default/pages/etiquette.html.tmpl b/extensions/BMO/template/en/default/pages/etiquette.html.tmpl index 281057eeb..8bccaea9d 100644 --- a/extensions/BMO/template/en/default/pages/etiquette.html.tmpl +++ b/extensions/BMO/template/en/default/pages/etiquette.html.tmpl @@ -21,15 +21,15 @@ #%] [% INCLUDE global/header.html.tmpl - title = "Bugzilla Etiquette" + title = "$terms.Bugzilla Etiquette" style = "li { margin: 5px } .heading { font-weight: bold }" %] <p> There's a number of <i lang="fr">faux pas</i> you can commit when using - Bugzilla. At the very + [% terms.Bugzilla %]. At the very least, these will make Mozilla contributors upset at you; if committed enough times they will cause those contributors to demand the disabling of your - Bugzilla account. So, ignore this advice at your peril. + [% terms.Bugzilla %] account. So, ignore this advice at your peril. </p> <p> @@ -47,14 +47,14 @@ <li> <span class="heading">No pointless comments</span>. Unless you have something constructive and helpful to say, do not add a - comment to a bug. In bugs where there is a heated debate going on, you + comment to a [% terms.bug %]. In [% terms.bugs %] where there is a heated debate going on, you should be even more inclined not to add a comment. Unless you have something new to contribute, - then the bug owner is aware of all the issues, and will make a judgement - as to what to do. If you agree the bug should be fixed, vote for it. + then the [% terms.bug %] owner is aware of all the issues, and will make a judgement + as to what to do. If you agree the [% terms.bug %] should be fixed, vote for it. Additional "I see this too" or "It works for me" comments are unnecessary unless they are on a different platform or a significantly different build. - Constructive and helpful thoughts unrelated to the topic of the bug + Constructive and helpful thoughts unrelated to the topic of the [% terms.bug %] should go in the appropriate <a href="http://www.mozilla.org/about/forums/">newsgroup</a>. </li> @@ -63,8 +63,8 @@ <span class="heading">No obligation</span>. "Open Source" is not the same as "the developers must do my bidding." Everyone here wants to help, but the only person who has any - <i>obligation</i> to fix the bugs you want fixed is you. Therefore, you - should not act as if you expect someone to fix a bug by a particular date + <i>obligation</i> to fix the [% terms.bugs %] you want fixed is you. Therefore, you + should not act as if you expect someone to fix a [% terms.bug %] by a particular date or release. Aggressive or repeated demands will not be received well and will almost certainly diminish the impact and interest in your suggestions. @@ -80,17 +80,17 @@ <i>things</i>, not <i>people</i>. Examples of things include: interfaces, algorithms, and schedules. Examples of people include: developers, designers and users. <b>Attacking a person may result in you being banned - from Bugzilla.</b> + from [% terms.Bugzilla %].</b> </li> <li> <span class="heading">No private email</span>. - Unless the bug owner or another respected project contributor has asked you + Unless the [% terms.bug %] owner or another respected project contributor has asked you to email them with specific information, please place all information - relating to bugs - in the bug itself. Do not send them by private email; no-one else can read + relating to [% terms.bugs %] + in the [% terms.bug %] itself. Do not send them by private email; no-one else can read them if you do that, and they'll probably just get ignored. If a file - is too big for Bugzilla, add a comment giving the file size and contents + is too big for [% terms.Bugzilla %], add a comment giving the file size and contents and ask what to do. </li> </ol> @@ -99,19 +99,19 @@ <ol> <li> - <span class="heading">No messing with other people's bugs</span>. - Unless you are the bug assignee, or have some say over the use of their + <span class="heading">No messing with other people's [% terms.bugs %]</span>. + Unless you are the [% terms.bug %] assignee, or have some say over the use of their time, never change the Priority or Target Milestone fields. If in doubt, - do not change the fields of bugs you do not own - add a comment + do not change the fields of [% terms.bugs %] you do not own - add a comment instead, suggesting the change. </li> <li> <span class="heading">No whining about decisions</span>. - If a respected project contributor has marked a bug as INVALID, then it is + If a respected project contributor has marked a [% terms.bug %] as INVALID, then it is invalid. Someone filing another duplicate of it does not change this. Unless you have further important evidence, do not post a comment arguing that an - INVALID or WONTFIX bug should be reopened. + INVALID or WONTFIX [% terms.bug %] should be reopened. </li> </ol> @@ -129,7 +129,7 @@ <p> If you see someone not following these rules, the first step is, as an exception to guideline 1.4, to make them aware of this document by <em>private</em> mail. - Flaming people publically in bugs violates guidelines 1.1 and 1.3. In the case of + Flaming people publically in [% terms.bugs %] violates guidelines 1.1 and 1.3. In the case of persistent offending you should report the matter to <a href="mailto:gerv@mozilla.org">Gerv</a>. </p> @@ -141,7 +141,7 @@ <p> Other useful documents: - <a href="page.cgi?id=bug-writing.html">The Bug Writing Guidelines</a>. + <a href="page.cgi?id=bug-writing.html">The [% terms.Bug %] Writing Guidelines</a>. </p> [% INCLUDE global/footer.html.tmpl %] diff --git a/extensions/BMO/template/en/default/pages/triage_reports.html.tmpl b/extensions/BMO/template/en/default/pages/triage_reports.html.tmpl index 023dc4791..a7f26e86d 100644 --- a/extensions/BMO/template/en/default/pages/triage_reports.html.tmpl +++ b/extensions/BMO/template/en/default/pages/triage_reports.html.tmpl @@ -59,7 +59,7 @@ var selected_components = [ <input type="hidden" name="id" value="triage_reports.html"> <input type="hidden" name="action" value="run"> -Show UNCONFIRMED bugs with: +Show UNCONFIRMED [% terms.bugs %] with: <table id="triage_form"> <tr> @@ -149,7 +149,7 @@ Show UNCONFIRMED bugs with: </p> <table border="0" cellspacing="0" id="report" width="100%"> <tr id="report-header"> - <th>Bug / Date</th> + <th>[% terms.Bug %] / Date</th> <th>Summary</th> <th>Reporter / Commenter</th> <th>Comment Date</th> @@ -190,7 +190,7 @@ Show UNCONFIRMED bugs with: [% ELSE %] <p> - No bugs found. + No [% terms.bugs %] found. </p> [% END %] diff --git a/extensions/BMO/template/en/default/pages/user_activity.html.tmpl b/extensions/BMO/template/en/default/pages/user_activity.html.tmpl index dd16595ab..bd48d00fd 100644 --- a/extensions/BMO/template/en/default/pages/user_activity.html.tmpl +++ b/extensions/BMO/template/en/default/pages/user_activity.html.tmpl @@ -110,7 +110,7 @@ <tr id="report-header"> <th>Who</th> <th>When</th> - <th>Bug</th> + <th>[% terms.Bug %]</th> <th>What</th> <th>Removed</th> <th>Added</th> @@ -131,9 +131,9 @@ [% "</tr><tr>" IF loop.index > 0 %] <td> [% IF change.attachid %] - <a href="attachment.cgi?id=[% change.attachid %]">Attachment #[% change.attachid %]</a> + <a href="attachment.cgi?id=[% change.attachid FILTER uri %]">Attachment #[% change.attachid FILTER html %]</a> [% ELSIF change.comment.defined && change.fieldname == 'longdesc' %] - [% "Comment $change.comment.count" FILTER bug_link(operation.bug, comment_num => change.comment.count) %] + [% "Comment $change.comment.count" FILTER bug_link(operation.bug, comment_num => change.comment.count) FILTER none %] [% ELSE %] [%+ field_descs.${change.fieldname} FILTER html %] [% END %] diff --git a/extensions/BzAPI/template/en/default/config.json.tmpl b/extensions/BzAPI/template/en/default/config.json.tmpl index d567c6c55..a3556ed3d 100644 --- a/extensions/BzAPI/template/en/default/config.json.tmpl +++ b/extensions/BzAPI/template/en/default/config.json.tmpl @@ -127,7 +127,7 @@ OLDATTACH2NEW = { [% FOREACH cl IN classifications %] [% cl_name_for.${cl.id} = cl.name %] "[% cl.name FILTER json %]": { - "id": [% cl.id %], + "id": [% cl.id FILTER json %], "description": "[% cl.description FILTER json %]", "products": [ [% FOREACH product IN cl.products %] @@ -142,7 +142,7 @@ OLDATTACH2NEW = { "product": { [% FOREACH product = products %] "[% product.name FILTER json %]": { - "id": [% product.id %], + "id": [% product.id FILTER json %], "description": "[% product.description FILTER json %]", "is_active": [% product.isactive ? "true" : "false" %], "is_permitting_unconfirmed": [% product.allows_unconfirmed ? "true" : "false" %], @@ -152,7 +152,7 @@ OLDATTACH2NEW = { "component": { [% FOREACH component = product.components %] "[% component.name FILTER json %]": { - "id": [% component.id %], + "id": [% component.id FILTER json %], [% IF show_flags %] "flag_type": [ [% flag_types = @@ -186,7 +186,7 @@ OLDATTACH2NEW = { "group": [ [% FOREACH group = product.groups_valid %] - [% group.id %][% ',' UNLESS loop.last() %] + [% group.id FILTER json %][% ',' UNLESS loop.last() %] [% END %] ] }[% ',' UNLESS loop.last() %] @@ -195,7 +195,7 @@ OLDATTACH2NEW = { "group": { [% FOREACH group = product.groups_valid %] - "[% group.id %]": { + "[% group.id FILTER json %]": { "name": "[% group.name FILTER json %]", "description": "[% group.description FILTER json %]", "is_accepting_bugs": [% group.is_bug_group ? 'true' : 'false' %], @@ -207,15 +207,15 @@ OLDATTACH2NEW = { [% IF show_flags %] "flag_type": { [% FOREACH flag_type = all_visible_flag_types.values.sort('name') %] - "[%+ flag_type.id %]": { + "[%+ flag_type.id FILTER json %]": { "name": "[% flag_type.name FILTER json %]", "description": "[% flag_type.description FILTER json %]", [% IF user.in_group("editcomponents") %] [% IF flag_type.request_group_id %] - "request_group": [% flag_type.request_group_id %], + "request_group": [% flag_type.request_group_id FILTER json %], [% END %] [% IF flag_type.grant_group_id %] - "grant_group": [% flag_type.grant_group_id %], + "grant_group": [% flag_type.grant_group_id FILTER json %], [% END %] [% END %] "is_for_bugs": [% flag_type.target_type == "bug" ? 'true' : 'false' %], @@ -309,7 +309,7 @@ OLDATTACH2NEW = { [% IF newname.match("^cf_") %] "is_on_bug_entry": [% item.enter_bug ? 'true' : 'false' %], [% END %] - "type": [% item.type || type_id_for.$newname || 0 %] + "type": [% item.type || type_id_for.$newname || 0 FILTER json %] }[% ',' UNLESS loop.last() %] [% END %] } diff --git a/extensions/ComponentWatching/template/en/default/account/prefs/component_watch.html.tmpl b/extensions/ComponentWatching/template/en/default/account/prefs/component_watch.html.tmpl index 057a32e36..225cca3bb 100644 --- a/extensions/ComponentWatching/template/en/default/account/prefs/component_watch.html.tmpl +++ b/extensions/ComponentWatching/template/en/default/account/prefs/component_watch.html.tmpl @@ -113,19 +113,19 @@ You are currently watching: [% FOREACH watch IN watches %] <tr> [% IF (watch.component) %] - <td><input type="checkbox" name="del_[% watch.product.id %]_[% watch.component.id %]" value="1"></td> + <td><input type="checkbox" name="del_[% watch.product.id FILTER uri %]_[% watch.component.id FILTER uri %]" value="1"></td> <td>[% watch.component.product.name FILTER html %]</td> <td> - <a href="buglist.cgi?product=[% watch.product.name FILTER url ~%] - &component=[% watch.component.name FILTER url %]&resolution=---"> + <a href="buglist.cgi?product=[% watch.product.name FILTER uri ~%] + &component=[% watch.component.name FILTER uri %]&resolution=---"> [% watch.component.name FILTER html %] </a> </td> [% ELSE %] - <td><input type="checkbox" name="del_[% watch.product.id %]" value="1"></td> + <td><input type="checkbox" name="del_[% watch.product.id FILTER uri %]" value="1"></td> <td>[% watch.product.name FILTER html %]</td> <td> - <a href="describecomponents.cgi?product=[% watch.product.name FILTER url %]"> + <a href="describecomponents.cgi?product=[% watch.product.name FILTER uri %]"> __Any__ </a> </td> diff --git a/extensions/Example/Extension.pm b/extensions/Example/Extension.pm index ef20a28f0..4498d2b22 100644 --- a/extensions/Example/Extension.pm +++ b/extensions/Example/Extension.pm @@ -211,15 +211,12 @@ sub search_operator_field_override { sub _component_nonchanged { my $original = shift; - my $invocant = shift; - - my %func_args = @_; - $invocant->$original(%func_args); + my ($invocant, $args) = @_; + $invocant->$original($args); # Actually, it does not change anything in the result, # just an example. - my ($term) = @func_args{qw(term)}; - $$term = $$term . " OR 1=2"; + $args->{term} = $args->{term} . " OR 1=2"; } sub bugmail_recipients { @@ -264,9 +261,14 @@ sub config_modify_panels { my $auth_params = $panels->{'auth'}->{params}; my ($info_class) = grep($_->{name} eq 'user_info_class', @$auth_params); my ($verify_class) = grep($_->{name} eq 'user_verify_class', @$auth_params); - + push(@{ $info_class->{choices} }, 'CGI,Example'); push(@{ $verify_class->{choices} }, 'Example'); + + push(@$auth_params, { name => 'param_example', + type => 't', + default => 0, + checker => \&check_numeric }); } sub db_schema_abstract_schema { @@ -454,6 +456,26 @@ sub install_update_db { # $dbh->bz_add_index('example', 'example_new_column_idx', [qw(value)]); } +sub install_update_db_fielddefs { + my $dbh = Bugzilla->dbh; +# $dbh->bz_add_column('fielddefs', 'example_column', +# {TYPE => 'MEDIUMTEXT', NOTNULL => 1, DEFAULT => ''}); +} + +sub job_map { + my ($self, $args) = @_; + + my $job_map = $args->{job_map}; + + # This adds the named class (an instance of TheSchwartz::Worker) as a + # handler for when a job is added with the name "some_task". + $job_map->{'some_task'} = 'Bugzilla::Extension::Example::Job::SomeClass'; + + # Schedule a job like this: + # my $queue = Bugzilla->job_queue(); + # $queue->insert('some_task', { some_parameter => $some_variable }); +} + sub mailer_before_send { my ($self, $args) = @_; diff --git a/extensions/Example/lib/Config.pm b/extensions/Example/lib/Config.pm index a126e82df..75db22957 100644 --- a/extensions/Example/lib/Config.pm +++ b/extensions/Example/lib/Config.pm @@ -25,6 +25,8 @@ use warnings; use Bugzilla::Config::Common; +our $sortkey = 5000; + sub get_param_list { my ($class) = @_; diff --git a/extensions/GuidedBugEntry/template/en/default/guided/guided.html.tmpl b/extensions/GuidedBugEntry/template/en/default/guided/guided.html.tmpl index 8f8817344..37c4c5590 100644 --- a/extensions/GuidedBugEntry/template/en/default/guided/guided.html.tmpl +++ b/extensions/GuidedBugEntry/template/en/default/guided/guided.html.tmpl @@ -27,7 +27,7 @@ [% PROCESS global/variables.none.tmpl %] [% PROCESS global/header.html.tmpl - title = "Enter A Bug" + title = "Enter A $terms.Bug" javascript_urls = [ 'extensions/GuidedBugEntry/web/js/products.js', 'extensions/GuidedBugEntry/web/js/guided.js', @@ -41,8 +41,8 @@ <input id="yui-history-field" type="hidden"> <noscript> -You require JavaScript to use this bug entry form.<br><br> -Please use the <a href="enter_bug.cgi?format=__default__">advanced bug entry form</a>. +You require JavaScript to use this [% terms.bug %] entry form.<br><br> +Please use the <a href="enter_bug.cgi?format=__default__">advanced [% terms.bug %] entry form</a>. </noscript> <div id="loading" class="hidden"> @@ -62,7 +62,7 @@ YAHOO.util.Dom.removeClass('loading', 'hidden'); <div id="advanced"> <a id="advanced_img" href="enter_bug.cgi?format=__default__"><img src="extensions/GuidedBugEntry/web/images/advanced.png" width="16" height="16" border="0"></a> - <a id="advanced_link" href="enter_bug.cgi?format=__default__">Switch to the advanced bug entry form</a> + <a id="advanced_link" href="enter_bug.cgi?format=__default__">Switch to the advanced [% terms.bug %] entry form</a> </div> <script type="text/javascript"> @@ -94,7 +94,7 @@ dupes.setLabels( [% BLOCK page_title %] <div id="page_title"> - <h2>Enter A Bug</h2> + <h2>Enter A [% terms.Bug %]</h2> <h3>Step [% step_number FILTER html %] of 3</h3> </div> [% END %] @@ -145,7 +145,7 @@ dupes.setLabels( <td class="product_img"> <a href="javascript:void(0)" [% IF onclick %] - onclick="[% onclick %]" + onclick="[% onclick FILTER none %]" [% ELSE %] onclick="product.select('[% name FILTER js %]')" [% END %] @@ -156,7 +156,7 @@ dupes.setLabels( <h2> <a href="javascript:void(0)" [% IF onclick %] - onclick="[% onclick %]" + onclick="[% onclick FILTER none %]" [% ELSE %] onclick="product.select('[% name FILTER js %]')" [% END %] @@ -267,7 +267,7 @@ dupes.setLabels( </tr> </table> <h3> - None of the above; my bug is in: + None of the above; my [% terms.bug %] is in: </h3> [% END %] @@ -275,14 +275,14 @@ dupes.setLabels( <tr> <td> <div class="exit_img"> - <a href="[% href %]" + <a href="[% href FILTER none %]" ><img src="extensions/GuidedBugEntry/web/images/[% icon FILTER uri %]" width="32" height="32" ></a> </div> </td> <td width="100%"> <h2> - <a href="[% href %]">[% name FILTER html %]</a> + <a href="[% href FILTER none %]">[% name FILTER html %]</a> </h2> [% desc FILTER html %] </td> @@ -359,7 +359,7 @@ Product: <b><span id="dupes_product_name">?</span></b>: <li>Please fill out this form clearly, precisely and in as much detail as you can manage.</li> <li>Please report only a single problem at a time.</li> <li><a href="https://developer.mozilla.org/en/Bug_writing_guidelines" target="_blank">These guidelines</a> -explain how to write effective bug reports.</li> +explain how to write effective [% terms.bug %] reports.</li> </ul> <table id="bugForm" cellspacing="0"> @@ -512,7 +512,7 @@ explain how to write effective bug reports.</li> <tr class="odd"> <td> </td> <td colspan="2" id="submitTD"> - <input type="submit" id="submit" value="Submit Bug"> + <input type="submit" id="submit" value="Submit [% terms.Bug %]"> </td> </tr> diff --git a/extensions/InlineHistory/Extension.pm b/extensions/InlineHistory/Extension.pm index 63a67304b..d8d5161cc 100644 --- a/extensions/InlineHistory/Extension.pm +++ b/extensions/InlineHistory/Extension.pm @@ -91,6 +91,12 @@ sub template_before_process { $change->{added} = $change->{added} ? 'true' : 'false'; } + # identify buglist changes + $change->{buglist} = + $change->{fieldname} eq 'blocked' || + $change->{fieldname} eq 'dependson' || + $change->{fieldname} eq 'dupe'; + # split multiple flag changes (must be processed last) if ($change->{fieldname} eq 'flagtypes.name') { my @added = split(/, /, $change->{added}); diff --git a/extensions/InlineHistory/template/en/default/hook/bug/comments-aftercomments.html.tmpl b/extensions/InlineHistory/template/en/default/hook/bug/comments-aftercomments.html.tmpl index 4af08dca8..68c3e2703 100644 --- a/extensions/InlineHistory/template/en/default/hook/bug/comments-aftercomments.html.tmpl +++ b/extensions/InlineHistory/template/en/default/hook/bug/comments-aftercomments.html.tmpl @@ -66,25 +66,36 @@ + '>Attachment #[% change.attachid FILTER none %]</a> - '; [% END %] - [%# display duplicates as history rather than comments %] - [% IF change.dupe %] - html += 'Duplicate of this [% terms.bug %]: '; + [%# buglists need to be displayed differently, as we shouldn't use strike-out %] + [% IF change.buglist %] + [% IF change.dupe %] + [% label = 'Duplicate of this ' _ terms.bug %] + [% ELSE %] + [% label = field_descs.${change.fieldname} %] + [% END %] + [% IF change.added != '' %] + html += '[% label FILTER js %]: '; + [% PROCESS add_change value = change.added %] + [% END %] + [% IF change.removed != '' %] + html += 'No longer [% label FILTER lcfirst FILTER js %]: '; + [% PROCESS add_change value = change.removed %] + [% END %] [% ELSE %] html += '[% field_descs.${change.fieldname} FILTER js %]: '; - [% END %] - - [% IF change.removed != '' %] - [% IF change.added == '' %] - html += '<span class="ih_deleted">'; - [% END %] - [% PROCESS add_change value = change.removed, is_old = 1 %] - [% IF change.added == '' %] - html += '</span>'; - [% ELSE %] - html += ' ➔ '; + [% IF change.removed != '' %] + [% IF change.added == '' %] + html += '<span class="ih_deleted">'; + [% END %] + [% PROCESS add_change value = change.removed %] + [% IF change.added == '' %] + html += '</span>'; + [% ELSE %] + html += ' ➔ '; + [% END %] [% END %] + [% PROCESS add_change value = change.added %] [% END %] - [% PROCESS add_change value = change.added, is_old = 0 %] [% "html += '<br>';" UNLESS loop.last %] [% IF change.fieldname == 'cc' %] @@ -112,14 +123,11 @@ [% BLOCK add_change %] html += '[%~%] - [% '<span class="old">' IF is_old %] [% IF change.fieldname == 'estimated_time' || change.fieldname == 'remaining_time' || change.fieldname == 'work_time' %] [% PROCESS formattimeunit time_unit = value FILTER html FILTER js %] - [% ELSIF change.fieldname == 'blocked' || - change.fieldname == 'dependson' || - change.fieldname == 'dupe' %] + [% ELSIF change.buglist %] [% value FILTER bug_list_link FILTER js %] [% ELSIF change.fieldname == 'assigned_to' || change.fieldname == 'reporter' || @@ -130,6 +138,5 @@ [% ELSE %] [% display_value(change.fieldname, value) FILTER html FILTER js %] [% END %] - [% '</span>' IF is_old %] [%~ %]'; [% END %] diff --git a/extensions/REMO/template/en/default/bug/create/create-mozreps.html.tmpl b/extensions/REMO/template/en/default/bug/create/create-mozreps.html.tmpl index 8b126f9dd..401772b77 100644 --- a/extensions/REMO/template/en/default/bug/create/create-mozreps.html.tmpl +++ b/extensions/REMO/template/en/default/bug/create/create-mozreps.html.tmpl @@ -92,12 +92,12 @@ function submitForm() { <table id="reps-form"> <tr class="odd"> - <th>First Name:[% mandatory %]</th> + <th>First Name:[% mandatory FILTER none %]</th> <td><input id="first_name" name="first_name" size="40" placeholder="John"></td> </tr> <tr class="even"> - <th>Last Name:[% mandatory %]</th> + <th>Last Name:[% mandatory FILTER none %]</th> <td><input id="last_name" name="last_name" size="40" placeholder="Doe"></td> </tr> @@ -107,7 +107,7 @@ function submitForm() { </tr> <tr class="even"> - <th>Sex:[% mandatory %]</th> + <th>Sex:[% mandatory FILTER none %]</th> <td> <select id="sex" name="sex"> <option value="Male">Male</option> @@ -118,12 +118,12 @@ function submitForm() { </tr> <tr class="odd"> - <th>City:[% mandatory %]</th> + <th>City:[% mandatory FILTER none %]</th> <td><input id="city" name="city" size="40" placeholder="Your city"></td> </tr> <tr class="even"> - <th>Country:[% mandatory %]</th> + <th>Country:[% mandatory FILTER none %]</th> <td><input id="country" name="country" size="40" placeholder="Your country"></td> </tr> @@ -161,17 +161,17 @@ function submitForm() { </tr> <tr class="odd"> - <th>Languages Spoken:[% mandatory %]</th> + <th>Languages Spoken:[% mandatory FILTER none %]</th> <td><input id="languages" name="languages" size="40"></td> </tr> <tr class="even"> - <th>How did you learn about Mozilla Reps?[% mandatory %]</th> + <th>How did you learn about Mozilla Reps?[% mandatory FILTER none %]</th> <td><input id="learn" name="learn" size="40"></td> </tr> <tr class="odd"> - <th colspan="2">What motivates you most about joining Mozilla Reps?[% mandatory %]</th> + <th colspan="2">What motivates you most about joining Mozilla Reps?[% mandatory FILTER none %]</th> </tr> <tr class="odd"> <td colspan="2"><textarea id="motivation" name="motivation" rows="4"></textarea></td> @@ -187,7 +187,7 @@ function submitForm() { <tr class="odd"> <th> I have read the - <a href="http://www.mozilla.com/en-US/privacy-policy" target="_blank">Mozilla Privacy Policy</a>:[% mandatory %] + <a href="http://www.mozilla.com/en-US/privacy-policy" target="_blank">Mozilla Privacy Policy</a>:[% mandatory FILTER none %] </th> <td><input id="privacy" type="checkbox"></td> </tr> diff --git a/extensions/REMO/template/en/default/bug/create/created-mozreps.html.tmpl b/extensions/REMO/template/en/default/bug/create/created-mozreps.html.tmpl index 378ab45d0..a8a3ca112 100644 --- a/extensions/REMO/template/en/default/bug/create/created-mozreps.html.tmpl +++ b/extensions/REMO/template/en/default/bug/create/created-mozreps.html.tmpl @@ -32,7 +32,7 @@ mentor will contact you shortly at your bugzilla email address. </p> <p style="font-size: x-small"> -Reference: <a href="show_bug.cgi?id=[% id %]">#[% id %]</a> +Reference: <a href="show_bug.cgi?id=[% id FILTER uri %]">#[% id FILTER html %]</a> </p> [% PROCESS global/footer.html.tmpl %] diff --git a/extensions/SecureMail/template/en/default/account/prefs/securemail.html.tmpl b/extensions/SecureMail/template/en/default/account/prefs/securemail.html.tmpl index dadfbb537..c71ea902e 100644 --- a/extensions/SecureMail/template/en/default/account/prefs/securemail.html.tmpl +++ b/extensions/SecureMail/template/en/default/account/prefs/securemail.html.tmpl @@ -17,10 +17,10 @@ # Contributor(s): Max Kanat-Alexander <mkanat@bugzilla.org> #%] -<p>Some bugs in this [% terms.Bugzilla %] are in groups the administrator has -deemed 'secure'. This means emails containing information about those bugs +<p>Some [% terms.bugs %] in this [% terms.Bugzilla %] are in groups the administrator has +deemed 'secure'. This means emails containing information about those [% terms.bugs %] will only be sent encrypted. Enter your PGP/GPG public key or -SMIME certificate here to receive full update emails for such bugs.</p> +SMIME certificate here to receive full update emails for such [% terms.bugs %].</p> <p>If you are a member of a secure group, or if you enter a key here, your password reset email will also be sent to you encrypted. If you are a member of a secure group and do not enter a key, you will not be able to reset your password without the assistance of an administrator.</p> diff --git a/extensions/SecureMail/template/en/default/pages/securemail/help.html.tmpl b/extensions/SecureMail/template/en/default/pages/securemail/help.html.tmpl index 76525eac2..f87ac82cb 100644 --- a/extensions/SecureMail/template/en/default/pages/securemail/help.html.tmpl +++ b/extensions/SecureMail/template/en/default/pages/securemail/help.html.tmpl @@ -24,12 +24,12 @@ title = "SecureMail Help" %] -Bugzilla considers certain groups as "secure". If a bug is in one of those groups, Bugzilla will not send unencrypted +[% terms.Bugzilla %] considers certain groups as "secure". If a [% terms.bug %] is in one of those groups, [% terms.Bugzilla %] will not send unencrypted email about it. To receive encrypted email rather than just a "something changed" placeholder, you must provide either a S/MIME or a GPG/PGP key on the <a href="[% urlbase FILTER none %]userprefs.cgi?tab=securemail">SecureMail preferences tab</a>.<br> <br> In addition, if you have uploaded a S/MIME or GPG/PGP key using the <a href="[% urlbase FILTER none %]userprefs.cgi?tab=securemail"> -SecureMail preferences tab</a>, if you request your password to be reset, Bugzilla will send the reset email encrypted and you will +SecureMail preferences tab</a>, if you request your password to be reset, [% terms.Bugzilla %] will send the reset email encrypted and you will be required to decrypt it to view the reset instructions. <h2>S/MIME</h2> @@ -86,7 +86,7 @@ You’ll have to answer several questions:</p> <p><code>gpg --armor --output pubkey.txt --export 'Your Name'</code></p> -<p>Paste the contents of pubkey.txt into the SecureMail text field in Bugzilla. +<p>Paste the contents of pubkey.txt into the SecureMail text field in [% terms.Bugzilla %]. <li>Configure your email client to use your associated private key to decrypt the encrypted emails. For Thunderbird, you need the <a href="https://addons.mozilla.org/en-us/thunderbird/addon/enigmail/">Enigmail</a> extension.</p> </ol> diff --git a/extensions/SiteMapIndex/lib/Util.pm b/extensions/SiteMapIndex/lib/Util.pm index 6b5491d1c..3c322d8c7 100644 --- a/extensions/SiteMapIndex/lib/Util.pm +++ b/extensions/SiteMapIndex/lib/Util.pm @@ -112,8 +112,8 @@ sub generate_sitemap { last if !@$bugs; - # We only need the product links in the first sitemap file - $products = [] if $filecount > 1; + # We only need the product links in the first sitemap file + $products = [] if $filecount > 1; push(@$filelist, _generate_sitemap_file($extension_name, $filecount, $products, $bugs)); diff --git a/extensions/Splinter/lib/Util.pm b/extensions/Splinter/lib/Util.pm index 1861d7ab6..c8c0d52d2 100644 --- a/extensions/Splinter/lib/Util.pm +++ b/extensions/Splinter/lib/Util.pm @@ -21,6 +21,8 @@ package Bugzilla::Extension::Splinter::Util; +use strict; + use Bugzilla; use Bugzilla::Util; @@ -66,9 +68,9 @@ sub get_review_url { my $bug_id = $bug->id; if (defined $absolute && $absolute) { - my $urlbase = correct_urlbase(); - $urlbase =~ s!/$!! if $base =~ "^/"; - $base = $urlbase . $base; + my $urlbase = correct_urlbase(); + $urlbase =~ s!/$!! if $base =~ "^/"; + $base = $urlbase . $base; } if ($base =~ /\?/) { @@ -93,12 +95,12 @@ sub munge_create_attachment { my ($bug, $intro_text, $attach_id, $view_link) = @_; if (attachment_id_is_patch ($attach_id)) { - return ("$intro_text" . + return ("$intro_text" . " View: $view_link\015\012" . " Review: " . get_review_url($bug, $attach_id, 1) . "\015\012"); } else { - return ("$intro_text --> ($view_link)"); + return ("$intro_text --> ($view_link)"); } } @@ -115,24 +117,24 @@ sub add_review_links_to_email { if ($email->header('Subject') =~ /^\[Bug\s+(\d+)\]/ && Bugzilla->user->can_see_bug($1)) { - $bug = Bugzilla::Bug->new($1); + $bug = Bugzilla::Bug->new($1); } return unless defined $bug; if ($body =~ /Review\s+of\s+attachment\s+\d+\s*:/) { - $body =~ s~(Review\s+of\s+attachment\s+(\d+)\s*:) + $body =~ s~(Review\s+of\s+attachment\s+(\d+)\s*:) ~"$1\015\012 --> (" . get_review_url($bug, $2, 1) . ")" ~egx; - $new_body = 1; + $new_body = 1; } if ($body =~ /Created attachment \d+\015\012 --> /) { - $body =~ s~(Created\ attachment\ (\d+)\015\012) + $body =~ s~(Created\ attachment\ (\d+)\015\012) \ -->\ \(([^\015\012]*)\)[^\015\012]* ~munge_create_attachment($bug, $1, $2, $3) ~egx; - $new_body = 1; + $new_body = 1; } $email->body_set($body) if $new_body; diff --git a/extensions/Splinter/template/en/default/pages/splinter.html.tmpl b/extensions/Splinter/template/en/default/pages/splinter.html.tmpl index 4728967c7..0d2648e58 100644 --- a/extensions/Splinter/template/en/default/pages/splinter.html.tmpl +++ b/extensions/Splinter/template/en/default/pages/splinter.html.tmpl @@ -38,7 +38,7 @@ <script type="text/javascript"> Splinter.configBase = '[% urlbase FILTER none %][% Param('splinter_base') FILTER js %]'; - Splinter.configBugzillaUrl = '[% urlbase FILTER none %]'; + Splinter.configBugUrl = '[% urlbase FILTER none %]'; Splinter.configHaveExtension = true; Splinter.configHelp = '[% urlbase FILTER none %]page.cgi?id=splinter/help.html'; Splinter.configNote = ''; @@ -115,7 +115,7 @@ </div> <div id="bugInfo" style="display: none;"> - <b>Bug <a id="bugLink"><span id="bugId"></span></a>:</b> + <b>[% terms.Bug %]<a id="bugLink"><span id="bugId"></span></a>:</b> <span id="bugShortDesc"></span> - <span id="bugReporter"></span> - <span id="bugCreationDate"></span> @@ -138,7 +138,7 @@ <div id="error" style="display: none;"> </div> <div id="enterBug" style="display: none;"> - Bug to review: + [% terms.Bug %] to review: <input id="enterBugInput" /> <input id="enterBugGo" type="button" value="Go" /> <div id="chooseReview" style="display: none;"> @@ -167,7 +167,7 @@ <li>To comment on a specific lines in the patch, first select the filename from the file navigation links.</li> <li>Then double click the line you want to review and a comment box will appear below the line.</li> <li>When the review is complete and you publish it, the overview comment and all line specific comments with their context, - will be combined together into a single review comment on the bug report.</li> + will be combined together into a single review comment on the [% terms.bug %] report.</li> <li>For more detailed instructions, read the Splinter <a id='helpLink' target='splinterHelp' href="[% urlbase FILTER none %]page.cgi?id=splinter/help.html">help page</a>. </li> @@ -233,7 +233,7 @@ </form> <div id="buttonBox"> <span id="attachmentStatusSpan">Patch Status: - <select id="attachmentStatus"> </select> + <select id="attachmentStatus"> </select> </span> <input id="publishButton" type="button" value="Publish" /> <input id="cancelButton" type="button" value="Cancel" /> diff --git a/extensions/Splinter/template/en/default/pages/splinter/help.html.tmpl b/extensions/Splinter/template/en/default/pages/splinter/help.html.tmpl index 7c797c94d..3e4ca4787 100644 --- a/extensions/Splinter/template/en/default/pages/splinter/help.html.tmpl +++ b/extensions/Splinter/template/en/default/pages/splinter/help.html.tmpl @@ -25,15 +25,15 @@ <h2>Splinter Patch Review</h2> <p> - Splinter is an add-on for Bugzilla to allow conveniently + Splinter is an add-on for [% terms.Bugzilla %] to allow conveniently reviewing patches that people have attached to - Bugzilla. <a href="http://fishsoup.net/software/splinter">More + [% terms.Bugzilla %]. <a href="http://fishsoup.net/software/splinter">More information about Splinter</a>. </p> <h3>The patch review view</h3> <p> If you get to Splinter by clicking on a link next to an - attachment in Bugzilla, you are presented with the patch + attachment in [% terms.Bugzilla %], you are presented with the patch review view. This view has a number of different pages that can be switched between with the links at the top of the screen. The first page is the Overview page, the other pages correspond to @@ -69,31 +69,31 @@ </p> <ul> <li> - An overall comment. The text area on the first page allows - you to enter your overall thoughts on the bug. + An overall comment. The text area on the first page allows + you to enter your overall thoughts on the [% terms.bug %]. </li> <li> - Detailed comments on changes within the files. To comment on a - line in a patch, double click on it, and a text area will open - beneath that comment. When you are done, click the Save button - to save your comment or the Cancel button to throw your - comment away. You can double-click on a saved comment to start - editing it again and make further changes. + Detailed comments on changes within the files. To comment on a + line in a patch, double click on it, and a text area will open + beneath that comment. When you are done, click the Save button + to save your comment or the Cancel button to throw your + comment away. You can double-click on a saved comment to start + editing it again and make further changes. </li> <li> - A change to the attachment status. (This is specific to - Bugzilla instances that have attachment status, which is a - non-upstream patch. It's somewhat similar to attachment flags, - which splinter doesn't currently support displaying or - changing.) This allows you to mark a patch as read to commit - or needing additional work. This is done by changing the - drop-down next to the Publish button. + A change to the attachment status. (This is specific to + [% terms.Bugzilla %] instances that have attachment status, which is a + non-upstream patch. It's somewhat similar to attachment flags, + which splinter doesn't currently support displaying or + changing.) This allows you to mark a patch as read to commit + or needing additional work. This is done by changing the + drop-down next to the Publish button. </li> </ul> <p> Once you are done writing your review, go back to Overview page and click the "Publish" button to submit it as a comment on the - bug. The comment will have a link back to the review page so + [% terms.bug %]. The comment will have a link back to the review page so that people can see your comments with the full context. </p> <h3>Saved drafts</h3> @@ -122,31 +122,31 @@ <h3>Uploading patches for review</h3> <p> Splinter doesn't really care how patches are provided to - Bugzilla, as long as they are well-formatted patches. If you are + [% terms.Bugzilla %], as long as tmey are well-formatted patches. If you are using Git for version control, you can either format changes as patches using <a href="http://www.kernel.org/pub/software/scm/git/docs/git-format-patch.html">'git - format-patch</a> and attach them manually to the bug, or you + format-patch</a> and attach them manually to the [% terms.bug %], or you can use <a href="http://fishsoup.net/software/git-bz">git-bz</a>. git-bz is highly recommended; it automates most of the steps - that Splinter can't handle: it files new bugs, attaches updated - attachments to existing bugs, and closes bugs when you push the + that Splinter can't handle: it files new [% terms.bugs %], attaches updated + attachments to existing [% terms.bugs %], and closes [% terms.bugs %] when you push the corresponding git commits to your central repository. </p> -<h3>The bug review view</h3> +<h3>The [% terms.bug %] review view</h3> <p> Splinter also has a view where it shows all patches attached to - the bug with their status and links to review them. You are + the [% terms.bug %] with their status and links to review them. You are taken to this page after publishing a review. You can also get - to this page with the bug link in the upper-right corner of the + to this page with the [% terms.bug %] link in the upper-right corner of the patch review view. </p> <h3>Your reviews</h3> <p> Splinter can also show you a list of all your draft and published reviews. Access this page with the "Your reviews" - link at the bottom of the bug review view. In-progress drafts + link at the bottom of the [% terms.bug %] review view. In-progress drafts are shown in bold. </p> diff --git a/extensions/Splinter/web/splinter.js b/extensions/Splinter/web/splinter.js index 87a8b49d5..842bebdb7 100644 --- a/extensions/Splinter/web/splinter.js +++ b/extensions/Splinter/web/splinter.js @@ -236,12 +236,23 @@ Splinter.Patch = { HUNK_START_RE : /^@@[ \t]+-(\d+),(\d+)[ \t]+\+(\d+),(\d+)[ \t]+@@(.*)\n/mg, HUNK_RE : /((?:[ +\\-].*\n)*)/mg, + GIT_FILE_RE : /^diff --git a\/(\S+).*\n(?:(new|deleted) file mode \d+\n)?(?:index.*\n)?GIT binary patch\n(delta )?/mg, + _cleanIntro : function(intro) { var m; - intro = Splinter.Utils.strip(intro); + intro = Splinter.Utils.strip(intro) + "\n\n"; + + // Git: remove binary diffs + var binary_re = /^(?:diff --git .*\n|literal \d+\n)(?:.+\n)+\n/mg; + m = binary_re.exec(intro); + while (m) { + intro = intro.substr(m.index + m[0].length); + binary_re.lastIndex = 0; + m = binary_re.exec(intro); + } - // Git: remove leading 'From <commit_id> <date' + // Git: remove leading 'From <commit_id> <date>' m = /^From\s+[a-f0-9]{40}.*\n/.exec(intro); if (m) { intro = intro.substr(m.index + m[0].length); @@ -253,7 +264,7 @@ Splinter.Patch = { intro = intro.substr(0, m.index); } - return intro; + return Splinter.Utils.strip(intro); } }; @@ -470,10 +481,24 @@ Splinter.Patch.Patch.prototype = { this.files = []; var m = Splinter.Patch.FILE_START_RE.exec(text); - if (m != null) { - this.intro = Splinter.Patch._cleanIntro(text.substring(0, m.index)); - } else { + var bm = Splinter.Patch.GIT_FILE_RE.exec(text); + if (m == null && bm == null) throw "Not a patch"; + this.intro = m == null ? '' : Splinter.Patch._cleanIntro(text.substring(0, m.index)); + + // show binary files in the intro + + if (bm && this.intro.length) + this.intro += "\n\n"; + while (bm != null) { + if (bm[2]) { + // added or deleted file + this.intro += bm[2].charAt(0).toUpperCase() + bm[2].slice(1) + ' Binary File: ' + bm[1] + "\n"; + } else { + // delta + this.intro += 'Modified Binary File: ' + bm[1] + "\n"; + } + bm = Splinter.Patch.GIT_FILE_RE.exec(text); } while (m != null) { @@ -1630,6 +1655,7 @@ Splinter.insertCommentEditor = function (commentArea, file, location, type) { var commentTextArea = new Element(document.createElement('textarea')); Dom.setAttribute(commentTextArea, 'id', 'commentTextArea'); + Dom.setAttribute(commentTextArea, 'tabindex', 1); commentTextArea.appendChild(document.createTextNode(previousText)); commentTextArea.appendTo(commentTextFrame); Event.addListener('commentTextArea', 'keydown', function (e) { @@ -1651,6 +1677,7 @@ Splinter.insertCommentEditor = function (commentArea, file, location, type) { commentCancel.set('id','commentCancel'); commentCancel.set('type', 'button'); commentCancel.set('value', 'Cancel'); + Dom.setAttribute(commentCancel, 'tabindex', 4); commentCancel.appendTo(commentEditorLeftButtons); Event.addListener('commentCancel', 'click', function () { Splinter.cancelComment(previousText); }); @@ -1659,6 +1686,7 @@ Splinter.insertCommentEditor = function (commentArea, file, location, type) { commentDelete.set('id','commentDelete'); commentDelete.set('type', 'button'); commentDelete.set('value', 'Delete'); + Dom.setAttribute(commentDelete, 'tabindex', 3); commentDelete.appendTo(commentEditorLeftButtons); Event.addListener('commentDelete', 'click', Splinter.deleteComment); } @@ -1671,6 +1699,7 @@ Splinter.insertCommentEditor = function (commentArea, file, location, type) { commentSave.set('id','commentSave'); commentSave.set('type', 'button'); commentSave.set('value', 'Save'); + Dom.setAttribute(commentSave, 'tabindex', 2); commentSave.appendTo(commentEditorRightButtons); Event.addListener('commentSave', 'click', Splinter.saveComment); @@ -2512,7 +2541,7 @@ Splinter.init = function () { } Dom.get("bugId").innerHTML = Splinter.theBug.id; - Dom.get("bugLink").setAttribute('href', Splinter.configBugzillaUrl + "show_bug.cgi?id=" + Splinter.theBug.id); + Dom.get("bugLink").setAttribute('href', Splinter.configBugUrl + "show_bug.cgi?id=" + Splinter.theBug.id); Dom.get("bugShortDesc").innerHTML = YAHOO.lang.escapeHTML(Splinter.theBug.shortDesc); Dom.get("bugReporter").appendChild(document.createTextNode(Splinter.theBug.getReporter())); Dom.get("bugCreationDate").innerHTML = Splinter.Utils.formatDate(Splinter.theBug.creationDate); @@ -2535,7 +2564,7 @@ Splinter.init = function () { } else { Dom.get("attachId").innerHTML = Splinter.theAttachment.id; - Dom.get("attachLink").setAttribute('href', Splinter.configBugzillaUrl + "attachment.cgi?id=" + Splinter.theAttachment.id); + Dom.get("attachLink").setAttribute('href', Splinter.configBugUrl + "attachment.cgi?id=" + Splinter.theAttachment.id); Dom.get("attachDesc").innerHTML = YAHOO.lang.escapeHTML(Splinter.theAttachment.description); Dom.get("attachCreator").appendChild(document.createTextNode(Splinter.Bug._formatWho(Splinter.theAttachment.whoName, Splinter.theAttachment.whoEmail))); diff --git a/extensions/TagNewUsers/template/en/default/hook/bug/comments-user.html.tmpl b/extensions/TagNewUsers/template/en/default/hook/bug/comments-user.html.tmpl index 274d26435..316d381bb 100644 --- a/extensions/TagNewUsers/template/en/default/hook/bug/comments-user.html.tmpl +++ b/extensions/TagNewUsers/template/en/default/hook/bug/comments-user.html.tmpl @@ -23,11 +23,11 @@ <span class="new_user" title=" -[%- comment.author.comment_count %] comment[% "s" IF comment.author.comment_count != 1 -%] +[%- comment.author.comment_count FILTER html %] comment[% "s" IF comment.author.comment_count != 1 -%] , created [% IF comment.author.creation_age == 0 %]today[% ELSIF comment.author.creation_age > 365 %]more than a year ago[% -ELSE %][% comment.author.creation_age %] day[% "s" IF comment.author.creation_age != 1 %] ago[% END %]." +ELSE %][% comment.author.creation_age FILTER html %] day[% "s" IF comment.author.creation_age != 1 %] ago[% END %]." > (New to [% terms.Bugzilla %]) </span> diff --git a/extensions/Voting/Extension.pm b/extensions/Voting/Extension.pm index 44344d7f5..26fb58fa3 100644 --- a/extensions/Voting/Extension.pm +++ b/extensions/Voting/Extension.pm @@ -56,6 +56,21 @@ BEGIN { # Installation # ################ +BEGIN { + *Bugzilla::Bug::votes = \&votes; +} + +sub votes { + my $self = shift; + my $dbh = Bugzilla->dbh; + + return $self->{votes} if exists $self->{votes}; + + $self->{votes} = $dbh->selectrow_array('SELECT votes FROM bugs WHERE bug_id = ?', + undef, $self->id); + return $self->{votes}; +} + sub db_schema_abstract_schema { my ($self, $args) = @_; $args->{'schema'}->{'votes'} = { @@ -676,7 +691,7 @@ sub _modify_bug_votes { } } - $changes->{'too_many_votes'} = \@toomanyvotes_list; + $changes->{'_too_many_votes'} = \@toomanyvotes_list; # 2. too many total votes for a single user. # This part doesn't work in the general case because _remove_votes @@ -723,7 +738,7 @@ sub _modify_bug_votes { } } - $changes->{'too_many_total_votes'} = \@toomanytotalvotes_list; + $changes->{'_too_many_total_votes'} = \@toomanytotalvotes_list; # 3. enough votes to confirm my $bug_list = $dbh->selectcol_arrayref( @@ -736,7 +751,7 @@ sub _modify_bug_votes { my $confirmed = _confirm_if_vote_confirmed($bug_id); push (@updated_bugs, $bug_id) if $confirmed; } - $changes->{'confirmed_bugs'} = \@updated_bugs; + $changes->{'_confirmed_bugs'} = \@updated_bugs; # Now that changes are done, we can send emails to voters. foreach my $msg (@msgs) { @@ -746,7 +761,7 @@ sub _modify_bug_votes { foreach my $bug_id (@updated_bugs) { my $sent_bugmail = Bugzilla::BugMail::Send( $bug_id, { changer => Bugzilla->user }); - $changes->{'confirmed_bugs_sent_bugmail'}->{$bug_id} = $sent_bugmail; + $changes->{'_confirmed_bugs_sent_bugmail'}->{$bug_id} = $sent_bugmail; } } @@ -819,7 +834,7 @@ sub _remove_votes { }; my $voter = new Bugzilla::User($userid); - my $template = Bugzilla->template_inner($voter->settings->{'lang'}->{'value'}); + my $template = Bugzilla->template_inner($voter->setting('lang')); my $msg; $template->process("voting/votes-removed.txt.tmpl", $vars, \$msg); diff --git a/extensions/Voting/template/en/default/hook/admin/products/updated-changes.html.tmpl b/extensions/Voting/template/en/default/hook/admin/products/updated-changes.html.tmpl index af2b1c102..15fb1efe0 100644 --- a/extensions/Voting/template/en/default/hook/admin/products/updated-changes.html.tmpl +++ b/extensions/Voting/template/en/default/hook/admin/products/updated-changes.html.tmpl @@ -56,8 +56,8 @@ <p>Checking existing votes in this product for anybody who now has too many votes for [% terms.abug %]...<br> - [% IF changes.too_many_votes.size %] - [% FOREACH detail = changes.too_many_votes %] + [% IF changes._too_many_votes.size %] + [% FOREACH detail = changes._too_many_votes %] →removed votes for [% terms.bug %] <a href="show_bug.cgi?id= [%- detail.id FILTER uri %]"> [%- detail.id FILTER html %]</a> from [% detail.name FILTER html %]<br> @@ -69,8 +69,8 @@ <p>Checking existing votes in this product for anybody who now has too many total votes...<br> - [% IF changes.too_many_total_votes.size %] - [% FOREACH detail = changes.too_many_total_votes %] + [% IF changes._too_many_total_votes.size %] + [% FOREACH detail = changes._too_many_total_votes %] →removed votes for [% terms.bug %] <a href="show_bug.cgi?id= [%- detail.id FILTER uri %]"> [%- detail.id FILTER html %]</a> from [% detail.name FILTER html %]<br> @@ -82,15 +82,15 @@ <p>Checking unconfirmed [% terms.bugs %] in this product for any which now have sufficient votes...<br> - [% IF changes.confirmed_bugs.size %] - [% FOREACH id = changes.confirmed_bugs %] + [% IF changes._confirmed_bugs.size %] + [% FOREACH id = changes._confirmed_bugs %] [%# This is INCLUDED instead of PROCESSED to avoid variables getting overwritten, which happens otherwise %] [% INCLUDE bug/process/results.html.tmpl type = 'votes' header_done = 1 - sent_bugmail = changes.confirmed_bugs_sent_bugmail.$id + sent_bugmail = changes._confirmed_bugs_sent_bugmail.$id id = id %] [% END %] diff --git a/extensions/Voting/template/en/default/pages/voting/user.html.tmpl b/extensions/Voting/template/en/default/pages/voting/user.html.tmpl index 169e9995d..61eaf8491 100644 --- a/extensions/Voting/template/en/default/pages/voting/user.html.tmpl +++ b/extensions/Voting/template/en/default/pages/voting/user.html.tmpl @@ -111,8 +111,15 @@ [% FOREACH bug = product.bugs %] <tr [% IF bug.id == this_bug.id && canedit %] class="bz_bug_being_voted_on" [% END %]> - <td>[% IF bug.id == this_bug.id && canedit %]Enter New Vote here → - [%- END %]</td> + <td> + [% IF bug.id == this_bug.id && canedit %] + [% IF product.onevoteonly %] + Vote For This [% terms.Bug %] → + [% ELSE %] + Enter Votes Here → + [% END %] + [%- END %] + </td> <td align="right"><a name="vote_[% bug.id FILTER html %]"> [% IF canedit %] [% IF product.onevoteonly %] diff --git a/template/en/default/list/list.html.tmpl b/template/en/default/list/list.html.tmpl index 4120fc228..982695f35 100644 --- a/template/en/default/list/list.html.tmpl +++ b/template/en/default/list/list.html.tmpl @@ -42,7 +42,7 @@ [%# Page Header #%] [%############################################################################%] -[% url_filtered_title = title FILTER url_quote %] +[% url_filtered_title = title FILTER uri %] [% PROCESS global/header.html.tmpl title = title style = style @@ -198,7 +198,7 @@ [% urlquerypart FILTER html %]&ctype=csv&human=1">CSV</a> | <a href="buglist.cgi? [% urlquerypart FILTER html %]&title= - [%- title FILTER url_quote %]&ctype=atom">Feed</a> | + [%- title FILTER uri %]&ctype=atom">Feed</a> | <a href="buglist.cgi? [% urlquerypart FILTER html %]&ctype=ics">iCalendar</a> | <a href="colchange.cgi? |