Fix for bug 98658: Let administrator know which customised templates have been updated by Bugzilla team.

Patch adds a version string to every template and a check in
t/004template.t to check for version strings in templates.
Note that two templates that were not included in the initial patch
now have version strings added.

r=justdave, r2=myk
This commit is contained in:
zach%zachlipton.com 2002-04-03 20:01:42 +00:00
Родитель 679fcade75
Коммит 995b6f5d6f
40 изменённых файлов: 47 добавлений и 319 удалений

Просмотреть файл

@ -18,15 +18,16 @@
# Rights Reserved.
#
# Contributor(s): Jacob Steenhagen <jake@acutex.net>
# Zach Lipton <zach@zachlipton.com>
#
#################
#Bugzilla Test 4#
##Templates######
####Templates####
BEGIN { use lib "t/"; }
BEGIN { use Support::Templates; }
BEGIN { $tests = @Support::Templates::testitems * 2; }
BEGIN { $tests = @Support::Templates::testitems * 3; }
BEGIN { use Test::More tests => $tests; }
use strict;
@ -80,10 +81,23 @@ foreach my $file(@testitems) {
}
}
else {
ok(1, "$file doesn't exists, skipping test");
ok(1, "$file doesn't exist, skipping test");
}
}
open STDOUT, ">&SAVEOUT"; # redirect back to original stream
open STDERR, ">&SAVEERR";
close SAVEOUT;
close SAVEERR;
# check to see that all templates have a version string:
foreach my $file(@testitems) {
open(TMPL,"$include_path/$file");
my $firstline = <TMPL>;
if ($firstline =~ /<!-- \d+\.\d+\@[\w\._]+ -->/) {
ok(1,"$file has a version string");
} else {
ok(0,"$file does not have a version string --ERROR");
}
close(TMPL);
}

Просмотреть файл

@ -1,3 +1,4 @@
<!-- 1.0@bugzilla.org -->
[%# The contents of this file are subject to the Mozilla Public
# License Version 1.1 (the "License"); you may not use this file
# except in compliance with the License. You may obtain a copy of

Просмотреть файл

@ -1,3 +1,4 @@
<!-- 1.0@bugzilla.org -->
[%# The contents of this file are subject to the Mozilla Public
# License Version 1.1 (the "License"); you may not use this file
# except in compliance with the License. You may obtain a copy of

Просмотреть файл

@ -1,3 +1,4 @@
<!-- 1.0@bugzilla.org -->
[%# The contents of this file are subject to the Mozilla Public
# License Version 1.1 (the "License"); you may not use this file
# except in compliance with the License. You may obtain a copy of

Просмотреть файл

@ -1,3 +1,4 @@
<!-- 1.0@bugzilla.org -->
[%# The contents of this file are subject to the Mozilla Public
# License Version 1.1 (the "License"); you may not use this file
# except in compliance with the License. You may obtain a copy of

Просмотреть файл

@ -1,3 +1,4 @@
<!-- 1.0@bugzilla.org -->
[%# The contents of this file are subject to the Mozilla Public
# License Version 1.1 (the "License"); you may not use this file
# except in compliance with the License. You may obtain a copy of

Просмотреть файл

@ -1,3 +1,4 @@
<!-- 1.0@bugzilla.org -->
[%# The contents of this file are subject to the Mozilla Public
# License Version 1.1 (the "License"); you may not use this file
# except in compliance with the License. You may obtain a copy of

Просмотреть файл

@ -1,3 +1,4 @@
<!-- 1.0@bugzilla.org -->
[%# The contents of this file are subject to the Mozilla Public
# License Version 1.1 (the "License"); you may not use this file
# except in compliance with the License. You may obtain a copy of

Просмотреть файл

@ -1,3 +1,4 @@
<!-- 1.0@bugzilla.org -->
[%# The contents of this file are subject to the Mozilla Public
# License Version 1.1 (the "License"); you may not use this file
# except in compliance with the License. You may obtain a copy of

Просмотреть файл

@ -1,45 +0,0 @@
[%# The contents of this file are subject to the Mozilla Public
# License Version 1.1 (the "License"); you may not use this file
# except in compliance with the License. You may obtain a copy of
# the License at http://www.mozilla.org/MPL/
#
# Software distributed under the License is distributed on an "AS
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
# implied. See the License for the specific language governing
# rights and limitations under the License.
#
# The Original Code is the Bugzilla Bug Tracking System.
#
# The Initial Developer of the Original Code is Netscape Communications
# Corporation. Portions created by Netscape are
# Copyright (C) 1998 Netscape Communications Corporation. All
# Rights Reserved.
#
# Contributor(s): Myk Melez <myk@mozilla.org>
# Gervase Markham <gerv@gerv.net>
#%]
[% INCLUDE global/header
title = "Changes Submitted"
style = "th { text-align: left; }"
%]
<hr>
<table border="1">
<tr>
<td>
<h2>Changes to
<a href="attachment.cgi?id=[% attachid %]&action=edit">attachment [% attachid %]</a>
of bug [% bugid %] submitted
</h2>
[% mailresults %]
</td>
<td>
<a href="show_bug.cgi?id=[% bugid %]">Back to Bug #[% bugid %]</a>
</td>
</tr>
</table>
[% INCLUDE global/footer %]

Просмотреть файл

@ -1,3 +1,4 @@
<!-- 1.0@bugzilla.org -->
[%# The contents of this file are subject to the Mozilla Public
# License Version 1.1 (the "License"); you may not use this file
# except in compliance with the License. You may obtain a copy of

Просмотреть файл

@ -1,3 +1,4 @@
<!-- 1.0@bugzilla.org -->
[%# The contents of this file are subject to the Mozilla Public
# License Version 1.1 (the "License"); you may not use this file
# except in compliance with the License. You may obtain a copy of

Просмотреть файл

@ -1,3 +1,4 @@
<!-- 1.0@bugzilla.org -->
[%# The contents of this file are subject to the Mozilla Public
# License Version 1.1 (the "License"); you may not use this file
# except in compliance with the License. You may obtain a copy of

Просмотреть файл

@ -1,3 +1,4 @@
<!-- 1.0@bugzilla.org -->
[%# The contents of this file are subject to the Mozilla Public
# License Version 1.1 (the "License"); you may not use this file
# except in compliance with the License. You may obtain a copy of

Просмотреть файл

@ -1,3 +1,4 @@
<!-- 1.0@bugzilla.org -->
[%# The contents of this file are subject to the Mozilla Public
# License Version 1.1 (the "License"); you may not use this file
# except in compliance with the License. You may obtain a copy of

Просмотреть файл

@ -1,50 +0,0 @@
[%# The contents of this file are subject to the Mozilla Public
# License Version 1.1 (the "License"); you may not use this file
# except in compliance with the License. You may obtain a copy of
# the License at http://www.mozilla.org/MPL/
#
# Software distributed under the License is distributed on an "AS
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
# implied. See the License for the specific language governing
# rights and limitations under the License.
#
# The Original Code is the Bugzilla Bug Tracking System.
#
# The Initial Developer of the Original Code is Netscape Communications
# Corporation. Portions created by Netscape are
# Copyright (C) 1998 Netscape Communications Corporation. All
# Rights Reserved.
#
# Contributor(s): Dave Lawrence <dkl@redhat.com>
#%]
[% INCLUDE global/header
title = "Change Columns"
%]
Check which columns you wish to appear on the list, and then click
on submit. (Cookies are required.)
<p>
<form action="colchange.cgi">
<input type="hidden" name="rememberedquery" value="[% buffer %]">
[% FOREACH column = masterlist %]
<input type="checkbox" id="[% column %]" name="column_[% column %]" [% "CHECKED" IF lsearch(collist, column) != -1 %]>
<label for="[% column %]">[% desc.${column} %]</label><br>
[% END %]
</p><p>
<input id="nosplitheader" type="radio" name="splitheader" value="0" [% "CHECKED" IF ! splitheader %]>
<label for="nosplitheader">Normal headers (prettier)</label><br>
<input id="splitheader" type="radio" name="splitheader" value="1" [% "CHECKED" IF splitheader %]>
<label for="splitheader">Stagger headers (often makes list more compact)</label>
</p><p>
<input type="submit" value="Submit">
</form>
<form action="colchange.cgi">
<input type="hidden" name="rememberedquery" value="[% buffer %]">
<input type="hidden" name="resetit" value="1">
<input type="submit" value="Reset to Bugzilla default">
</form>
</p>
[% INCLUDE global/footer %]

Просмотреть файл

@ -1,35 +0,0 @@
[%# The contents of this file are subject to the Mozilla Public
# License Version 1.1 (the "License"); you may not use this file
# except in compliance with the License. You may obtain a copy of
# the License at http://www.mozilla.org/MPL/
#
# Software distributed under the License is distributed on an "AS
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
# implied. See the License for the specific language governing
# rights and limitations under the License.
#
# The Original Code is the Bugzilla Bug Tracking System.
#
# The Initial Developer of the Original Code is Netscape Communications
# Corporation. Portions created by Netscape are
# Copyright (C) 1998 Netscape Communications Corporation. All
# Rights Reserved.
#
# Contributor(s): Myk Melez <myk@mozilla.org>
#%]
<html>
<head>
<title>Bugzilla is pondering your query</title>
</head>
<body>
<h1 style="margin-top: 20%; text-align: center;">Please stand by ...</h1>
[% IF debug %]
<p>
<code>[% query FILTER html %]</code>
</p>
[% END %]
</body>
</html>

Просмотреть файл

@ -1,3 +1,4 @@
<!-- 1.0@bugzilla.org -->
[%# The contents of this file are subject to the Mozilla Public
# License Version 1.1 (the "License"); you may not use this file
# except in compliance with the License. You may obtain a copy of

Просмотреть файл

@ -1,41 +0,0 @@
[%# The contents of this file are subject to the Mozilla Public
# License Version 1.1 (the "License"); you may not use this file
# except in compliance with the License. You may obtain a copy of
# the License at http://www.mozilla.org/MPL/
#
# Software distributed under the License is distributed on an "AS
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
# implied. See the License for the specific language governing
# rights and limitations under the License.
#
# The Original Code is the Bugzilla Bug Tracking System.
#
# The Initial Developer of the Original Code is Netscape Communications
# Corporation. Portions created by Netscape are
# Copyright (C) 1998 Netscape Communications Corporation. All
# Rights Reserved.
#
# Contributor(s): Gervase Markham <gerv@gerv.net>
#%]
[% DEFAULT title = "Choose a Product" %]
[% INCLUDE global/header %]
<table>
[% FOREACH p = proddesc.keys.sort %]
<tr>
<th align="right" valign="top">
<a href="[% target %]?product=[% p FILTER uri %]">
[% p FILTER html %]</a>:
</th>
[% IF proddesc.$p %]
<td valign="top">&nbsp;[% proddesc.$p %]</td>
[% END %]
</tr>
[% END %]
</table>
[% INCLUDE global/footer %]

Просмотреть файл

@ -1,6 +0,0 @@
[% PerformSubsts(Param('footerhtml')) %]
</body>
</html>

Просмотреть файл

@ -1,3 +1,4 @@
<!-- 1.0@bugzilla.org -->
[% DEFAULT
title = ""
h1 = title

Просмотреть файл

@ -1,16 +0,0 @@
[% DEFAULT title = "Bugzilla Message" %]
[% PROCESS global/header %]
[%# The "header" template automatically displays the contents of a "message"
variable if it finds one, so it is not necessary to display the message
here. %]
[%# Display a URL if the calling script has included one. %]
[% IF url && link %]
<p>
<a href="[% url %]">[% link %]</a>
</p>
[% END %]
[% PROCESS global/footer %]

Просмотреть файл

@ -1,3 +1,4 @@
<!-- 1.0@bugzilla.org -->
[%# -*- mode: html -*- %]
[%# The contents of this file are subject to the Mozilla Public
# License Version 1.1 (the "License"); you may not use this file

Просмотреть файл

@ -1,3 +1,4 @@
<!-- 1.0@bugzilla.org -->
[%# The contents of this file are subject to the Mozilla Public
# License Version 1.1 (the "License"); you may not use this file
# except in compliance with the License. You may obtain a copy of

Просмотреть файл

@ -1,3 +1,4 @@
<!-- 1.0@bugzilla.org -->
[%# The contents of this file are subject to the Mozilla Public
# License Version 1.1 (the "License"); you may not use this file
# except in compliance with the License. You may obtain a copy of

Просмотреть файл

@ -1,3 +1,4 @@
<!-- 1.0@bugzilla.org -->
[%# The contents of this file are subject to the Mozilla Public
# License Version 1.1 (the "License"); you may not use this file
# except in compliance with the License. You may obtain a copy of

Просмотреть файл

@ -1,3 +1,4 @@
<!-- 1.0@bugzilla.org -->
[%# The contents of this file are subject to the Mozilla Public
# License Version 1.1 (the "License"); you may not use this file
# except in compliance with the License. You may obtain a copy of

Просмотреть файл

@ -1,3 +1,4 @@
<!-- 1.0@bugzilla.org -->
[%# The contents of this file are subject to the Mozilla Public
# License Version 1.1 (the "License"); you may not use this file
# except in compliance with the License. You may obtain a copy of

Просмотреть файл

@ -1,3 +1,4 @@
<!-- 1.0@bugzilla.org -->
[%# The contents of this file are subject to the Mozilla Public
# License Version 1.1 (the "License"); you may not use this file
# except in compliance with the License. You may obtain a copy of

Просмотреть файл

@ -1,42 +0,0 @@
[%# The contents of this file are subject to the Mozilla Public
# License Version 1.1 (the "License"); you may not use this file
# except in compliance with the License. You may obtain a copy of
# the License at http://www.mozilla.org/MPL/
#
# Software distributed under the License is distributed on an "AS
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
# implied. See the License for the specific language governing
# rights and limitations under the License.
#
# The Original Code is the Bugzilla Bug Tracking System.
#
# The Initial Developer of the Original Code is Netscape Communications
# Corporation. Portions created by Netscape are
# Copyright (C) 1998 Netscape Communications Corporation. All
# Rights Reserved.
#
# Contributor(s): Gervase Markham <gerv@gerv.net>
#%]
[%# INTERFACE:
# bug_id: integer. The bug ID.
#
# This template also needs to be called with the interface to the
# activity.html.tmpl template fulfilled.
#%]
[% INCLUDE global/header
title = "Changes made to bug $bug_id"
h1 = "Activity log"
h2 = "Bug <a href='show_bug.cgi?id=$bug_id'>$bug_id</a>"
%]
<br>
[% INCLUDE show/activity.html.tmpl %]
<p>
<a href="show_bug.cgi?id=[% bug_id %]">Back to bug [% bug_id %]</a>
</p>
[% INCLUDE global/footer %]

Просмотреть файл

@ -1,35 +0,0 @@
[%# The contents of this file are subject to the Mozilla Public
# License Version 1.1 (the "License"); you may not use this file
# except in compliance with the License. You may obtain a copy of
# the License at http://www.mozilla.org/MPL/
#
# Software distributed under the License is distributed on an "AS
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
# implied. See the License for the specific language governing
# rights and limitations under the License.
#
# The Original Code is the Bugzilla Bug Tracking System.
#
# The Initial Developer of the Original Code is Netscape Communications
# Corporation. Portions created by Netscape are
# Copyright (C) 1998 Netscape Communications Corporation. All
# Rights Reserved.
#
# Contributor(s): Gervase Markham <gerv@gerv.net>
#%]
[% UNLESS header_done %]
[% INCLUDE global/header
title = "Search by bug number"
%]
[% END %]
<form method="get" action="show_bug.cgi">
<p>
You may find a single bug by entering its bug id here:
<input name="id" size="6">
<input type="submit" value="Show Me This Bug">
</p>
</form>
[% INCLUDE global/footer %]

Просмотреть файл

@ -1,46 +0,0 @@
[%# The contents of this file are subject to the Mozilla Public
# License Version 1.1 (the "License"); you may not use this file
# except in compliance with the License. You may obtain a copy of
# the License at http://www.mozilla.org/MPL/
#
# Software distributed under the License is distributed on an "AS
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
# implied. See the License for the specific language governing
# rights and limitations under the License.
#
# The Original Code is the Bugzilla Bug Tracking System.
#
# The Initial Developer of the Original Code is Netscape Communications
# Corporation. Portions created by Netscape are
# Copyright (C) 1998 Netscape Communications Corporation. All
# Rights Reserved.
#
# Contributor(s): Gervase Markham <gerv@gerv.net>
#%]
[% INCLUDE global/header
title = "Display bugs as XML"
%]
<form method="get" action="xml.cgi">
<table>
<tr>
<td>
Display bugs as XML by entering a list of bug numbers here:
</td>
<td>
<input name="id" size="30" />
<input type="submit" value="Display as XML" />
</td>
</tr>
<tr>
<td>&nbsp;</td>
<td>
(e.g. 1000, 2467, 852)
</td>
</tr>
</table>
</form>
[% INCLUDE global/footer %]

Просмотреть файл

@ -1,3 +1,4 @@
<!-- 1.0@bugzilla.org -->
[%# The contents of this file are subject to the Mozilla Public
# License Version 1.1 (the "License"); you may not use this file
# except in compliance with the License. You may obtain a copy of

Просмотреть файл

@ -1,3 +1,4 @@
<!-- 1.0@bugzilla.org -->
[%# The contents of this file are subject to the Mozilla Public
# License Version 1.1 (the "License"); you may not use this file
# except in compliance with the License. You may obtain a copy of

Просмотреть файл

@ -1,3 +1,4 @@
<!-- 1.0@bugzilla.org -->
[%# The contents of this file are subject to the Mozilla Public
# License Version 1.1 (the "License"); you may not use this file
# except in compliance with the License. You may obtain a copy of

Просмотреть файл

@ -1,3 +1,4 @@
<!-- 1.0@bugzilla.org -->
[%# -*- mode: sgml -*- %]
[%# The contents of this file are subject to the Mozilla Public
# License Version 1.1 (the "License"); you may not use this file

Просмотреть файл

@ -1,3 +1,4 @@
<!-- 1.0@bugzilla.org -->
[%# The contents of this file are subject to the Mozilla Public
# License Version 1.1 (the "License"); you may not use this file
# except in compliance with the License. You may obtain a copy of

Просмотреть файл

@ -1,3 +1,4 @@
<!-- 1.0@bugzilla.org -->
[%# The contents of this file are subject to the Mozilla Public
# License Version 1.1 (the "License"); you may not use this file
# except in compliance with the License. You may obtain a copy of

Просмотреть файл

@ -1,3 +1,4 @@
<!-- 1.0@bugzilla.org -->
[%# The contents of this file are subject to the Mozilla Public
# License Version 1.1 (the "License"); you may not use this file
# except in compliance with the License. You may obtain a copy of

Просмотреть файл

@ -1,3 +1,4 @@
<!-- 1.0@bugzilla.org -->
[%# The contents of this file are subject to the Mozilla Public
# License Version 1.1 (the "License"); you may not use this file
# except in compliance with the License. You may obtain a copy of