From 09114c215c8c58595964ff017ab80394860fd75b Mon Sep 17 00:00:00 2001 From: "zach%zachlipton.com" <> Date: Thu, 4 Apr 2002 04:01:01 +0000 Subject: [PATCH] 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 --- t/004template.t | 20 ++++++++++++++++--- template/default/admin/account_created.tmpl | 1 + template/default/admin/account_exists.tmpl | 1 + .../default/admin/change-password.html.tmpl | 1 + template/default/admin/create_account.tmpl | 1 + template/default/attachment/created.atml | 1 + template/default/attachment/edit.atml | 1 + template/default/attachment/enter.atml | 1 + template/default/attachment/list.atml | 1 + template/default/attachment/updated.atml | 1 + template/default/attachment/viewall.atml | 1 + template/default/attachstatus/create.atml | 1 + template/default/attachstatus/delete.atml | 1 + template/default/attachstatus/edit.atml | 1 + template/default/attachstatus/list.atml | 1 + template/default/buglist/colchange.tmpl | 1 + .../default/buglist/server-push.html.tmpl | 1 + template/default/entry/enter_bug.tmpl | 1 + template/default/global/choose_product.tmpl | 1 + template/default/global/footer | 2 +- template/default/global/header | 1 + template/default/global/message.html.tmpl | 1 + template/default/index.tmpl | 1 + .../default/info/describe-components.tmpl | 1 + .../default/info/describe-keywords.html.tmpl | 1 + template/default/info/quips.tmpl | 1 + template/default/prefs/userprefs.tmpl | 1 + template/default/query/query.atml | 1 + template/default/show/activity.html.tmpl | 1 + template/default/show/bug-activity.html.tmpl | 1 + template/default/show/choose_bug.html.tmpl | 1 + template/default/show/choose_xml.html.tmpl | 1 + template/default/show/comments.tmpl | 1 + template/default/show/multiple.tmpl | 1 + template/default/show/show_bug.html.tmpl | 1 + template/default/sidebar/xul.tmpl | 1 + template/default/token/confirmemail.html.tmpl | 1 + .../default/token/emailchangenew.txt.tmpl | 1 + .../default/token/emailchangeold.txt.tmpl | 1 + template/default/token/tokencancel.txt.tmpl | 1 + 40 files changed, 56 insertions(+), 4 deletions(-) diff --git a/t/004template.t b/t/004template.t index 4c3c898c1c..e831e42e4d 100644 --- a/t/004template.t +++ b/t/004template.t @@ -18,15 +18,16 @@ # Rights Reserved. # # Contributor(s): Jacob Steenhagen +# Zach Lipton # ################# #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 = ; + if ($firstline =~ //) { + 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 f104eb0ac9..ad4310ec4b 100644 --- a/template/default/admin/account_created.tmpl +++ b/template/default/admin/account_created.tmpl @@ -1,3 +1,4 @@ + [%# 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 0f1882b42c..23b9e03382 100644 --- a/template/default/admin/account_exists.tmpl +++ b/template/default/admin/account_exists.tmpl @@ -1,3 +1,4 @@ + [%# 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 d3c8f42a03..29d03c030b 100644 --- a/template/default/admin/change-password.html.tmpl +++ b/template/default/admin/change-password.html.tmpl @@ -1,3 +1,4 @@ + [%# 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 60effdf61e..61ad95b8a8 100644 --- a/template/default/admin/create_account.tmpl +++ b/template/default/admin/create_account.tmpl @@ -1,3 +1,4 @@ + [%# 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 49db040fec..ab5e5ef9cd 100644 --- a/template/default/attachment/created.atml +++ b/template/default/attachment/created.atml @@ -1,3 +1,4 @@ + [%# 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 8b4f4ea781..599aff00aa 100755 --- a/template/default/attachment/edit.atml +++ b/template/default/attachment/edit.atml @@ -1,3 +1,4 @@ + [%# 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 7d83e77bca..9f7d359e58 100644 --- a/template/default/attachment/enter.atml +++ b/template/default/attachment/enter.atml @@ -1,3 +1,4 @@ + [%# 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 f8fe4c96d7..72006cf290 100755 --- a/template/default/attachment/list.atml +++ b/template/default/attachment/list.atml @@ -1,3 +1,4 @@ + [%# 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 9e511e1338..e245957474 100755 --- a/template/default/attachment/updated.atml +++ b/template/default/attachment/updated.atml @@ -1,3 +1,4 @@ + [%# 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 43aca60192..0500a09d4f 100755 --- a/template/default/attachment/viewall.atml +++ b/template/default/attachment/viewall.atml @@ -1,3 +1,4 @@ + [%# 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 7387d82ade..128d811dcd 100755 --- a/template/default/attachstatus/create.atml +++ b/template/default/attachstatus/create.atml @@ -1,3 +1,4 @@ + [%# 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 6f33ee0ed1..19648c6d0a 100644 --- a/template/default/attachstatus/delete.atml +++ b/template/default/attachstatus/delete.atml @@ -1,3 +1,4 @@ + [%# 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 a2200528ac..366f8eb707 100755 --- a/template/default/attachstatus/edit.atml +++ b/template/default/attachstatus/edit.atml @@ -1,3 +1,4 @@ + [%# 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 60199a2926..f2d0a4f512 100755 --- a/template/default/attachstatus/list.atml +++ b/template/default/attachstatus/list.atml @@ -1,3 +1,4 @@ + [%# 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 4aecf96563..d3b008c49e 100644 --- a/template/default/buglist/colchange.tmpl +++ b/template/default/buglist/colchange.tmpl @@ -1,3 +1,4 @@ + [%# 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 be10f7ab30..5a2dde0b1a 100644 --- a/template/default/buglist/server-push.html.tmpl +++ b/template/default/buglist/server-push.html.tmpl @@ -1,3 +1,4 @@ + [%# 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 57e9b8689b..446aeb7296 100644 --- a/template/default/entry/enter_bug.tmpl +++ b/template/default/entry/enter_bug.tmpl @@ -1,3 +1,4 @@ + [%# 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 03d3fcd634..31d9ea7bad 100644 --- a/template/default/global/choose_product.tmpl +++ b/template/default/global/choose_product.tmpl @@ -1,3 +1,4 @@ + [%# 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 e06d3d8e1f..98d525a788 100755 --- a/template/default/global/footer +++ b/template/default/global/footer @@ -1,4 +1,4 @@ - + [% PerformSubsts(Param('footerhtml')) %] diff --git a/template/default/global/header b/template/default/global/header index d175dd4dfe..5e6a183dde 100755 --- a/template/default/global/header +++ b/template/default/global/header @@ -1,3 +1,4 @@ + [% DEFAULT title = "" h1 = title diff --git a/template/default/global/message.html.tmpl b/template/default/global/message.html.tmpl index 912e9f3222..d0c8281eb5 100644 --- a/template/default/global/message.html.tmpl +++ b/template/default/global/message.html.tmpl @@ -1,3 +1,4 @@ + [% DEFAULT title = "Bugzilla Message" %] [% PROCESS global/header %] diff --git a/template/default/index.tmpl b/template/default/index.tmpl index 7620a3d698..2f3603c682 100644 --- a/template/default/index.tmpl +++ b/template/default/index.tmpl @@ -1,3 +1,4 @@ + [%# -*- 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 0685596670..5ee8bf4a0b 100644 --- a/template/default/info/describe-components.tmpl +++ b/template/default/info/describe-components.tmpl @@ -1,3 +1,4 @@ + [%# 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 7e77423349..3c897026b3 100644 --- a/template/default/info/describe-keywords.html.tmpl +++ b/template/default/info/describe-keywords.html.tmpl @@ -1,3 +1,4 @@ + [%# 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 b48bb631af..37e9d863fb 100644 --- a/template/default/info/quips.tmpl +++ b/template/default/info/quips.tmpl @@ -1,3 +1,4 @@ + [%# 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 91bb4f0273..8992794b11 100644 --- a/template/default/prefs/userprefs.tmpl +++ b/template/default/prefs/userprefs.tmpl @@ -1,3 +1,4 @@ + [%# 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 94bcb5c5d9..8591b748ce 100644 --- a/template/default/query/query.atml +++ b/template/default/query/query.atml @@ -1,3 +1,4 @@ + [%# 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 12fcc2b6ee..3ebb970e3c 100644 --- a/template/default/show/activity.html.tmpl +++ b/template/default/show/activity.html.tmpl @@ -1,3 +1,4 @@ + [%# 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 b298eb0d99..387ba6d6c6 100644 --- a/template/default/show/bug-activity.html.tmpl +++ b/template/default/show/bug-activity.html.tmpl @@ -1,3 +1,4 @@ + [%# 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 1df89ce8f5..b776ff255e 100644 --- a/template/default/show/choose_bug.html.tmpl +++ b/template/default/show/choose_bug.html.tmpl @@ -1,3 +1,4 @@ + [%# 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 7418be91dc..4456534f5b 100644 --- a/template/default/show/choose_xml.html.tmpl +++ b/template/default/show/choose_xml.html.tmpl @@ -1,3 +1,4 @@ + [%# 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 a840d63248..14828175d5 100644 --- a/template/default/show/comments.tmpl +++ b/template/default/show/comments.tmpl @@ -1,3 +1,4 @@ + [%# 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 8706d89124..2673c54571 100644 --- a/template/default/show/multiple.tmpl +++ b/template/default/show/multiple.tmpl @@ -1,3 +1,4 @@ + [%# 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 5006a92eb2..62e43f2225 100644 --- a/template/default/show/show_bug.html.tmpl +++ b/template/default/show/show_bug.html.tmpl @@ -1,3 +1,4 @@ + [%# 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 2991af580c..9f42ddf3ba 100644 --- a/template/default/sidebar/xul.tmpl +++ b/template/default/sidebar/xul.tmpl @@ -1,3 +1,4 @@ + [%# -*- 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 848828e608..e34a93e63c 100644 --- a/template/default/token/confirmemail.html.tmpl +++ b/template/default/token/confirmemail.html.tmpl @@ -1,3 +1,4 @@ + [%# 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 36bf02bf86..7fd195c6fe 100644 --- a/template/default/token/emailchangenew.txt.tmpl +++ b/template/default/token/emailchangenew.txt.tmpl @@ -1,3 +1,4 @@ + [%# 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 ce7ccd08cd..14bea8a225 100644 --- a/template/default/token/emailchangeold.txt.tmpl +++ b/template/default/token/emailchangeold.txt.tmpl @@ -1,3 +1,4 @@ + [%# 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 bcab8c3886..1a90971158 100644 --- a/template/default/token/tokencancel.txt.tmpl +++ b/template/default/token/tokencancel.txt.tmpl @@ -1,3 +1,4 @@ + [%# 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 -- 2.47.2