summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorzach%zachlipton.com <>2002-04-04 06:01:01 +0200
committerzach%zachlipton.com <>2002-04-04 06:01:01 +0200
commit09114c215c8c58595964ff017ab80394860fd75b (patch)
tree2e6931289bde6c6fc426dcbccbcc004970ef7984
parent153a60fc43567d0b79aa6bf1d70e76be12521de1 (diff)
downloadbugzilla-09114c215c8c58595964ff017ab80394860fd75b.tar.gz
bugzilla-09114c215c8c58595964ff017ab80394860fd75b.tar.xz
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
-rw-r--r--t/004template.t20
-rw-r--r--template/default/admin/account_created.tmpl1
-rw-r--r--template/default/admin/account_exists.tmpl1
-rw-r--r--template/default/admin/change-password.html.tmpl1
-rw-r--r--template/default/admin/create_account.tmpl1
-rw-r--r--template/default/attachment/created.atml1
-rwxr-xr-xtemplate/default/attachment/edit.atml1
-rw-r--r--template/default/attachment/enter.atml1
-rwxr-xr-xtemplate/default/attachment/list.atml1
-rwxr-xr-xtemplate/default/attachment/updated.atml1
-rwxr-xr-xtemplate/default/attachment/viewall.atml1
-rwxr-xr-xtemplate/default/attachstatus/create.atml1
-rw-r--r--template/default/attachstatus/delete.atml1
-rwxr-xr-xtemplate/default/attachstatus/edit.atml1
-rwxr-xr-xtemplate/default/attachstatus/list.atml1
-rw-r--r--template/default/buglist/colchange.tmpl1
-rw-r--r--template/default/buglist/server-push.html.tmpl1
-rw-r--r--template/default/entry/enter_bug.tmpl1
-rw-r--r--template/default/global/choose_product.tmpl1
-rwxr-xr-xtemplate/default/global/footer2
-rwxr-xr-xtemplate/default/global/header1
-rw-r--r--template/default/global/message.html.tmpl1
-rw-r--r--template/default/index.tmpl1
-rw-r--r--template/default/info/describe-components.tmpl1
-rw-r--r--template/default/info/describe-keywords.html.tmpl1
-rw-r--r--template/default/info/quips.tmpl1
-rw-r--r--template/default/prefs/userprefs.tmpl1
-rw-r--r--template/default/query/query.atml1
-rw-r--r--template/default/show/activity.html.tmpl1
-rw-r--r--template/default/show/bug-activity.html.tmpl1
-rw-r--r--template/default/show/choose_bug.html.tmpl1
-rw-r--r--template/default/show/choose_xml.html.tmpl1
-rw-r--r--template/default/show/comments.tmpl1
-rw-r--r--template/default/show/multiple.tmpl1
-rw-r--r--template/default/show/show_bug.html.tmpl1
-rw-r--r--template/default/sidebar/xul.tmpl1
-rw-r--r--template/default/token/confirmemail.html.tmpl1
-rw-r--r--template/default/token/emailchangenew.txt.tmpl1
-rw-r--r--template/default/token/emailchangeold.txt.tmpl1
-rw-r--r--template/default/token/tokencancel.txt.tmpl1
40 files changed, 56 insertions, 4 deletions
diff --git a/t/004template.t b/t/004template.t
index 4c3c898c1..e831e42e4 100644
--- a/t/004template.t
+++ b/t/004template.t
@@ -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);
+}
diff --git a/template/default/admin/account_created.tmpl b/template/default/admin/account_created.tmpl
index f104eb0ac..ad4310ec4 100644
--- a/template/default/admin/account_created.tmpl
+++ b/template/default/admin/account_created.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
diff --git a/template/default/admin/account_exists.tmpl b/template/default/admin/account_exists.tmpl
index 0f1882b42..23b9e0338 100644
--- a/template/default/admin/account_exists.tmpl
+++ b/template/default/admin/account_exists.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
diff --git a/template/default/admin/change-password.html.tmpl b/template/default/admin/change-password.html.tmpl
index d3c8f42a0..29d03c030 100644
--- a/template/default/admin/change-password.html.tmpl
+++ b/template/default/admin/change-password.html.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
diff --git a/template/default/admin/create_account.tmpl b/template/default/admin/create_account.tmpl
index 60effdf61..61ad95b8a 100644
--- a/template/default/admin/create_account.tmpl
+++ b/template/default/admin/create_account.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
diff --git a/template/default/attachment/created.atml b/template/default/attachment/created.atml
index 49db040fe..ab5e5ef9c 100644
--- a/template/default/attachment/created.atml
+++ b/template/default/attachment/created.atml
@@ -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
diff --git a/template/default/attachment/edit.atml b/template/default/attachment/edit.atml
index 8b4f4ea78..599aff00a 100755
--- a/template/default/attachment/edit.atml
+++ b/template/default/attachment/edit.atml
@@ -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
diff --git a/template/default/attachment/enter.atml b/template/default/attachment/enter.atml
index 7d83e77bc..9f7d359e5 100644
--- a/template/default/attachment/enter.atml
+++ b/template/default/attachment/enter.atml
@@ -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
diff --git a/template/default/attachment/list.atml b/template/default/attachment/list.atml
index f8fe4c96d..72006cf29 100755
--- a/template/default/attachment/list.atml
+++ b/template/default/attachment/list.atml
@@ -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
diff --git a/template/default/attachment/updated.atml b/template/default/attachment/updated.atml
index 9e511e133..e24595747 100755
--- a/template/default/attachment/updated.atml
+++ b/template/default/attachment/updated.atml
@@ -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
diff --git a/template/default/attachment/viewall.atml b/template/default/attachment/viewall.atml
index 43aca6019..0500a09d4 100755
--- a/template/default/attachment/viewall.atml
+++ b/template/default/attachment/viewall.atml
@@ -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
diff --git a/template/default/attachstatus/create.atml b/template/default/attachstatus/create.atml
index 7387d82ad..128d811dc 100755
--- a/template/default/attachstatus/create.atml
+++ b/template/default/attachstatus/create.atml
@@ -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
diff --git a/template/default/attachstatus/delete.atml b/template/default/attachstatus/delete.atml
index 6f33ee0ed..19648c6d0 100644
--- a/template/default/attachstatus/delete.atml
+++ b/template/default/attachstatus/delete.atml
@@ -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
diff --git a/template/default/attachstatus/edit.atml b/template/default/attachstatus/edit.atml
index a2200528a..366f8eb70 100755
--- a/template/default/attachstatus/edit.atml
+++ b/template/default/attachstatus/edit.atml
@@ -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
diff --git a/template/default/attachstatus/list.atml b/template/default/attachstatus/list.atml
index 60199a292..f2d0a4f51 100755
--- a/template/default/attachstatus/list.atml
+++ b/template/default/attachstatus/list.atml
@@ -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
diff --git a/template/default/buglist/colchange.tmpl b/template/default/buglist/colchange.tmpl
index 4aecf9656..d3b008c49 100644
--- a/template/default/buglist/colchange.tmpl
+++ b/template/default/buglist/colchange.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
diff --git a/template/default/buglist/server-push.html.tmpl b/template/default/buglist/server-push.html.tmpl
index be10f7ab3..5a2dde0b1 100644
--- a/template/default/buglist/server-push.html.tmpl
+++ b/template/default/buglist/server-push.html.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
diff --git a/template/default/entry/enter_bug.tmpl b/template/default/entry/enter_bug.tmpl
index 57e9b8689..446aeb729 100644
--- a/template/default/entry/enter_bug.tmpl
+++ b/template/default/entry/enter_bug.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
diff --git a/template/default/global/choose_product.tmpl b/template/default/global/choose_product.tmpl
index 03d3fcd63..31d9ea7ba 100644
--- a/template/default/global/choose_product.tmpl
+++ b/template/default/global/choose_product.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
diff --git a/template/default/global/footer b/template/default/global/footer
index e06d3d8e1..98d525a78 100755
--- a/template/default/global/footer
+++ b/template/default/global/footer
@@ -1,4 +1,4 @@
-
+<!-- 1.0@bugzilla.org -->
[% PerformSubsts(Param('footerhtml')) %]
</body>
diff --git a/template/default/global/header b/template/default/global/header
index d175dd4df..5e6a183dd 100755
--- a/template/default/global/header
+++ b/template/default/global/header
@@ -1,3 +1,4 @@
+<!-- 1.0@bugzilla.org -->
[% DEFAULT
title = ""
h1 = title
diff --git a/template/default/global/message.html.tmpl b/template/default/global/message.html.tmpl
index 912e9f322..d0c8281eb 100644
--- a/template/default/global/message.html.tmpl
+++ b/template/default/global/message.html.tmpl
@@ -1,3 +1,4 @@
+<!-- 1.0@bugzilla.org -->
[% DEFAULT title = "Bugzilla Message" %]
[% PROCESS global/header %]
diff --git a/template/default/index.tmpl b/template/default/index.tmpl
index 7620a3d69..2f3603c68 100644
--- a/template/default/index.tmpl
+++ b/template/default/index.tmpl
@@ -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
diff --git a/template/default/info/describe-components.tmpl b/template/default/info/describe-components.tmpl
index 068559667..5ee8bf4a0 100644
--- a/template/default/info/describe-components.tmpl
+++ b/template/default/info/describe-components.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
diff --git a/template/default/info/describe-keywords.html.tmpl b/template/default/info/describe-keywords.html.tmpl
index 7e7742334..3c897026b 100644
--- a/template/default/info/describe-keywords.html.tmpl
+++ b/template/default/info/describe-keywords.html.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
diff --git a/template/default/info/quips.tmpl b/template/default/info/quips.tmpl
index b48bb631a..37e9d863f 100644
--- a/template/default/info/quips.tmpl
+++ b/template/default/info/quips.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
diff --git a/template/default/prefs/userprefs.tmpl b/template/default/prefs/userprefs.tmpl
index 91bb4f027..8992794b1 100644
--- a/template/default/prefs/userprefs.tmpl
+++ b/template/default/prefs/userprefs.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
diff --git a/template/default/query/query.atml b/template/default/query/query.atml
index 94bcb5c5d..8591b748c 100644
--- a/template/default/query/query.atml
+++ b/template/default/query/query.atml
@@ -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
diff --git a/template/default/show/activity.html.tmpl b/template/default/show/activity.html.tmpl
index 12fcc2b6e..3ebb970e3 100644
--- a/template/default/show/activity.html.tmpl
+++ b/template/default/show/activity.html.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
diff --git a/template/default/show/bug-activity.html.tmpl b/template/default/show/bug-activity.html.tmpl
index b298eb0d9..387ba6d6c 100644
--- a/template/default/show/bug-activity.html.tmpl
+++ b/template/default/show/bug-activity.html.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
diff --git a/template/default/show/choose_bug.html.tmpl b/template/default/show/choose_bug.html.tmpl
index 1df89ce8f..b776ff255 100644
--- a/template/default/show/choose_bug.html.tmpl
+++ b/template/default/show/choose_bug.html.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
diff --git a/template/default/show/choose_xml.html.tmpl b/template/default/show/choose_xml.html.tmpl
index 7418be91d..4456534f5 100644
--- a/template/default/show/choose_xml.html.tmpl
+++ b/template/default/show/choose_xml.html.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
diff --git a/template/default/show/comments.tmpl b/template/default/show/comments.tmpl
index a840d6324..14828175d 100644
--- a/template/default/show/comments.tmpl
+++ b/template/default/show/comments.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
diff --git a/template/default/show/multiple.tmpl b/template/default/show/multiple.tmpl
index 8706d8912..2673c5457 100644
--- a/template/default/show/multiple.tmpl
+++ b/template/default/show/multiple.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
diff --git a/template/default/show/show_bug.html.tmpl b/template/default/show/show_bug.html.tmpl
index 5006a92eb..62e43f222 100644
--- a/template/default/show/show_bug.html.tmpl
+++ b/template/default/show/show_bug.html.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
diff --git a/template/default/sidebar/xul.tmpl b/template/default/sidebar/xul.tmpl
index 2991af580..9f42ddf3b 100644
--- a/template/default/sidebar/xul.tmpl
+++ b/template/default/sidebar/xul.tmpl
@@ -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
diff --git a/template/default/token/confirmemail.html.tmpl b/template/default/token/confirmemail.html.tmpl
index 848828e60..e34a93e63 100644
--- a/template/default/token/confirmemail.html.tmpl
+++ b/template/default/token/confirmemail.html.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
diff --git a/template/default/token/emailchangenew.txt.tmpl b/template/default/token/emailchangenew.txt.tmpl
index 36bf02bf8..7fd195c6f 100644
--- a/template/default/token/emailchangenew.txt.tmpl
+++ b/template/default/token/emailchangenew.txt.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
diff --git a/template/default/token/emailchangeold.txt.tmpl b/template/default/token/emailchangeold.txt.tmpl
index ce7ccd08c..14bea8a22 100644
--- a/template/default/token/emailchangeold.txt.tmpl
+++ b/template/default/token/emailchangeold.txt.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
diff --git a/template/default/token/tokencancel.txt.tmpl b/template/default/token/tokencancel.txt.tmpl
index bcab8c388..1a9097115 100644
--- a/template/default/token/tokencancel.txt.tmpl
+++ b/template/default/token/tokencancel.txt.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