Commit 09114c21 authored by zach%zachlipton.com's avatar zach%zachlipton.com

Fix for bug 98658: Let administrator know which customised templates have been…

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
parent 153a60fc
...@@ -18,15 +18,16 @@ ...@@ -18,15 +18,16 @@
# Rights Reserved. # Rights Reserved.
# #
# Contributor(s): Jacob Steenhagen <jake@acutex.net> # Contributor(s): Jacob Steenhagen <jake@acutex.net>
# Zach Lipton <zach@zachlipton.com>
# #
################# #################
#Bugzilla Test 4# #Bugzilla Test 4#
##Templates###### ####Templates####
BEGIN { use lib "t/"; } BEGIN { use lib "t/"; }
BEGIN { use Support::Templates; } BEGIN { use Support::Templates; }
BEGIN { $tests = @Support::Templates::testitems * 2; } BEGIN { $tests = @Support::Templates::testitems * 3; }
BEGIN { use Test::More tests => $tests; } BEGIN { use Test::More tests => $tests; }
use strict; use strict;
...@@ -80,10 +81,23 @@ foreach my $file(@testitems) { ...@@ -80,10 +81,23 @@ foreach my $file(@testitems) {
} }
} }
else { 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 STDOUT, ">&SAVEOUT"; # redirect back to original stream
open STDERR, ">&SAVEERR"; open STDERR, ">&SAVEERR";
close SAVEOUT; close SAVEOUT;
close SAVEERR; 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.0@bugzilla.org -->
[%# The contents of this file are subject to the Mozilla Public [%# The contents of this file are subject to the Mozilla Public
# License Version 1.1 (the "License"); you may not use this file # License Version 1.1 (the "License"); you may not use this file
# except in compliance with the License. You may obtain a copy of # except in compliance with the License. You may obtain a copy of
......
<!-- 1.0@bugzilla.org -->
[%# The contents of this file are subject to the Mozilla Public [%# The contents of this file are subject to the Mozilla Public
# License Version 1.1 (the "License"); you may not use this file # License Version 1.1 (the "License"); you may not use this file
# except in compliance with the License. You may obtain a copy of # except in compliance with the License. You may obtain a copy of
......
<!-- 1.0@bugzilla.org -->
[%# The contents of this file are subject to the Mozilla Public [%# The contents of this file are subject to the Mozilla Public
# License Version 1.1 (the "License"); you may not use this file # License Version 1.1 (the "License"); you may not use this file
# except in compliance with the License. You may obtain a copy of # except in compliance with the License. You may obtain a copy of
......
<!-- 1.0@bugzilla.org -->
[%# The contents of this file are subject to the Mozilla Public [%# The contents of this file are subject to the Mozilla Public
# License Version 1.1 (the "License"); you may not use this file # License Version 1.1 (the "License"); you may not use this file
# except in compliance with the License. You may obtain a copy of # except in compliance with the License. You may obtain a copy of
......
<!-- 1.0@bugzilla.org -->
[%# The contents of this file are subject to the Mozilla Public [%# The contents of this file are subject to the Mozilla Public
# License Version 1.1 (the "License"); you may not use this file # License Version 1.1 (the "License"); you may not use this file
# except in compliance with the License. You may obtain a copy of # except in compliance with the License. You may obtain a copy of
......
<!-- 1.0@bugzilla.org -->
[%# The contents of this file are subject to the Mozilla Public [%# The contents of this file are subject to the Mozilla Public
# License Version 1.1 (the "License"); you may not use this file # License Version 1.1 (the "License"); you may not use this file
# except in compliance with the License. You may obtain a copy of # except in compliance with the License. You may obtain a copy of
......
<!-- 1.0@bugzilla.org -->
[%# The contents of this file are subject to the Mozilla Public [%# The contents of this file are subject to the Mozilla Public
# License Version 1.1 (the "License"); you may not use this file # License Version 1.1 (the "License"); you may not use this file
# except in compliance with the License. You may obtain a copy of # except in compliance with the License. You may obtain a copy of
......
<!-- 1.0@bugzilla.org -->
[%# The contents of this file are subject to the Mozilla Public [%# The contents of this file are subject to the Mozilla Public
# License Version 1.1 (the "License"); you may not use this file # License Version 1.1 (the "License"); you may not use this file
# except in compliance with the License. You may obtain a copy of # except in compliance with the License. You may obtain a copy of
......
<!-- 1.0@bugzilla.org -->
[%# The contents of this file are subject to the Mozilla Public [%# The contents of this file are subject to the Mozilla Public
# License Version 1.1 (the "License"); you may not use this file # License Version 1.1 (the "License"); you may not use this file
# except in compliance with the License. You may obtain a copy of # except in compliance with the License. You may obtain a copy of
......
<!-- 1.0@bugzilla.org -->
[%# The contents of this file are subject to the Mozilla Public [%# The contents of this file are subject to the Mozilla Public
# License Version 1.1 (the "License"); you may not use this file # License Version 1.1 (the "License"); you may not use this file
# except in compliance with the License. You may obtain a copy of # except in compliance with the License. You may obtain a copy of
......
<!-- 1.0@bugzilla.org -->
[%# The contents of this file are subject to the Mozilla Public [%# The contents of this file are subject to the Mozilla Public
# License Version 1.1 (the "License"); you may not use this file # License Version 1.1 (the "License"); you may not use this file
# except in compliance with the License. You may obtain a copy of # except in compliance with the License. You may obtain a copy of
......
<!-- 1.0@bugzilla.org -->
[%# The contents of this file are subject to the Mozilla Public [%# The contents of this file are subject to the Mozilla Public
# License Version 1.1 (the "License"); you may not use this file # License Version 1.1 (the "License"); you may not use this file
# except in compliance with the License. You may obtain a copy of # except in compliance with the License. You may obtain a copy of
......
<!-- 1.0@bugzilla.org -->
[%# The contents of this file are subject to the Mozilla Public [%# The contents of this file are subject to the Mozilla Public
# License Version 1.1 (the "License"); you may not use this file # License Version 1.1 (the "License"); you may not use this file
# except in compliance with the License. You may obtain a copy of # except in compliance with the License. You may obtain a copy of
......
<!-- 1.0@bugzilla.org -->
[%# The contents of this file are subject to the Mozilla Public [%# The contents of this file are subject to the Mozilla Public
# License Version 1.1 (the "License"); you may not use this file # License Version 1.1 (the "License"); you may not use this file
# except in compliance with the License. You may obtain a copy of # except in compliance with the License. You may obtain a copy of
......
<!-- 1.0@bugzilla.org -->
[%# The contents of this file are subject to the Mozilla Public [%# The contents of this file are subject to the Mozilla Public
# License Version 1.1 (the "License"); you may not use this file # License Version 1.1 (the "License"); you may not use this file
# except in compliance with the License. You may obtain a copy of # except in compliance with the License. You may obtain a copy of
......
<!-- 1.0@bugzilla.org -->
[%# The contents of this file are subject to the Mozilla Public [%# The contents of this file are subject to the Mozilla Public
# License Version 1.1 (the "License"); you may not use this file # License Version 1.1 (the "License"); you may not use this file
# except in compliance with the License. You may obtain a copy of # except in compliance with the License. You may obtain a copy of
......
<!-- 1.0@bugzilla.org -->
[%# The contents of this file are subject to the Mozilla Public [%# The contents of this file are subject to the Mozilla Public
# License Version 1.1 (the "License"); you may not use this file # License Version 1.1 (the "License"); you may not use this file
# except in compliance with the License. You may obtain a copy of # except in compliance with the License. You may obtain a copy of
......
<!-- 1.0@bugzilla.org -->
[%# The contents of this file are subject to the Mozilla Public [%# The contents of this file are subject to the Mozilla Public
# License Version 1.1 (the "License"); you may not use this file # License Version 1.1 (the "License"); you may not use this file
# except in compliance with the License. You may obtain a copy of # except in compliance with the License. You may obtain a copy of
......
<!-- 1.0@bugzilla.org -->
[% PerformSubsts(Param('footerhtml')) %] [% PerformSubsts(Param('footerhtml')) %]
</body> </body>
......
<!-- 1.0@bugzilla.org -->
[% DEFAULT [% DEFAULT
title = "" title = ""
h1 = title h1 = title
......
<!-- 1.0@bugzilla.org -->
[% DEFAULT title = "Bugzilla Message" %] [% DEFAULT title = "Bugzilla Message" %]
[% PROCESS global/header %] [% PROCESS global/header %]
......
<!-- 1.0@bugzilla.org -->
[%# -*- mode: html -*- %] [%# -*- mode: html -*- %]
[%# The contents of this file are subject to the Mozilla Public [%# The contents of this file are subject to the Mozilla Public
# License Version 1.1 (the "License"); you may not use this file # License Version 1.1 (the "License"); you may not use this file
......
<!-- 1.0@bugzilla.org -->
[%# The contents of this file are subject to the Mozilla Public [%# The contents of this file are subject to the Mozilla Public
# License Version 1.1 (the "License"); you may not use this file # License Version 1.1 (the "License"); you may not use this file
# except in compliance with the License. You may obtain a copy of # except in compliance with the License. You may obtain a copy of
......
<!-- 1.0@bugzilla.org -->
[%# The contents of this file are subject to the Mozilla Public [%# The contents of this file are subject to the Mozilla Public
# License Version 1.1 (the "License"); you may not use this file # License Version 1.1 (the "License"); you may not use this file
# except in compliance with the License. You may obtain a copy of # except in compliance with the License. You may obtain a copy of
......
<!-- 1.0@bugzilla.org -->
[%# The contents of this file are subject to the Mozilla Public [%# The contents of this file are subject to the Mozilla Public
# License Version 1.1 (the "License"); you may not use this file # License Version 1.1 (the "License"); you may not use this file
# except in compliance with the License. You may obtain a copy of # except in compliance with the License. You may obtain a copy of
......
<!-- 1.0@bugzilla.org -->
[%# The contents of this file are subject to the Mozilla Public [%# The contents of this file are subject to the Mozilla Public
# License Version 1.1 (the "License"); you may not use this file # License Version 1.1 (the "License"); you may not use this file
# except in compliance with the License. You may obtain a copy of # except in compliance with the License. You may obtain a copy of
......
<!-- 1.0@bugzilla.org -->
[%# The contents of this file are subject to the Mozilla Public [%# The contents of this file are subject to the Mozilla Public
# License Version 1.1 (the "License"); you may not use this file # License Version 1.1 (the "License"); you may not use this file
# except in compliance with the License. You may obtain a copy of # except in compliance with the License. You may obtain a copy of
......
<!-- 1.0@bugzilla.org -->
[%# The contents of this file are subject to the Mozilla Public [%# The contents of this file are subject to the Mozilla Public
# License Version 1.1 (the "License"); you may not use this file # License Version 1.1 (the "License"); you may not use this file
# except in compliance with the License. You may obtain a copy of # except in compliance with the License. You may obtain a copy of
......
<!-- 1.0@bugzilla.org -->
[%# The contents of this file are subject to the Mozilla Public [%# The contents of this file are subject to the Mozilla Public
# License Version 1.1 (the "License"); you may not use this file # License Version 1.1 (the "License"); you may not use this file
# except in compliance with the License. You may obtain a copy of # except in compliance with the License. You may obtain a copy of
......
<!-- 1.0@bugzilla.org -->
[%# The contents of this file are subject to the Mozilla Public [%# The contents of this file are subject to the Mozilla Public
# License Version 1.1 (the "License"); you may not use this file # License Version 1.1 (the "License"); you may not use this file
# except in compliance with the License. You may obtain a copy of # except in compliance with the License. You may obtain a copy of
......
<!-- 1.0@bugzilla.org -->
[%# The contents of this file are subject to the Mozilla Public [%# The contents of this file are subject to the Mozilla Public
# License Version 1.1 (the "License"); you may not use this file # License Version 1.1 (the "License"); you may not use this file
# except in compliance with the License. You may obtain a copy of # except in compliance with the License. You may obtain a copy of
......
<!-- 1.0@bugzilla.org -->
[%# The contents of this file are subject to the Mozilla Public [%# The contents of this file are subject to the Mozilla Public
# License Version 1.1 (the "License"); you may not use this file # License Version 1.1 (the "License"); you may not use this file
# except in compliance with the License. You may obtain a copy of # except in compliance with the License. You may obtain a copy of
......
<!-- 1.0@bugzilla.org -->
[%# The contents of this file are subject to the Mozilla Public [%# The contents of this file are subject to the Mozilla Public
# License Version 1.1 (the "License"); you may not use this file # License Version 1.1 (the "License"); you may not use this file
# except in compliance with the License. You may obtain a copy of # except in compliance with the License. You may obtain a copy of
......
<!-- 1.0@bugzilla.org -->
[%# The contents of this file are subject to the Mozilla Public [%# The contents of this file are subject to the Mozilla Public
# License Version 1.1 (the "License"); you may not use this file # License Version 1.1 (the "License"); you may not use this file
# except in compliance with the License. You may obtain a copy of # except in compliance with the License. You may obtain a copy of
......
<!-- 1.0@bugzilla.org -->
[%# -*- mode: sgml -*- %] [%# -*- mode: sgml -*- %]
[%# The contents of this file are subject to the Mozilla Public [%# The contents of this file are subject to the Mozilla Public
# License Version 1.1 (the "License"); you may not use this file # License Version 1.1 (the "License"); you may not use this file
......
<!-- 1.0@bugzilla.org -->
[%# The contents of this file are subject to the Mozilla Public [%# The contents of this file are subject to the Mozilla Public
# License Version 1.1 (the "License"); you may not use this file # License Version 1.1 (the "License"); you may not use this file
# except in compliance with the License. You may obtain a copy of # except in compliance with the License. You may obtain a copy of
......
<!-- 1.0@bugzilla.org -->
[%# The contents of this file are subject to the Mozilla Public [%# The contents of this file are subject to the Mozilla Public
# License Version 1.1 (the "License"); you may not use this file # License Version 1.1 (the "License"); you may not use this file
# except in compliance with the License. You may obtain a copy of # except in compliance with the License. You may obtain a copy of
......
<!-- 1.0@bugzilla.org -->
[%# The contents of this file are subject to the Mozilla Public [%# The contents of this file are subject to the Mozilla Public
# License Version 1.1 (the "License"); you may not use this file # License Version 1.1 (the "License"); you may not use this file
# except in compliance with the License. You may obtain a copy of # except in compliance with the License. You may obtain a copy of
......
<!-- 1.0@bugzilla.org -->
[%# The contents of this file are subject to the Mozilla Public [%# The contents of this file are subject to the Mozilla Public
# License Version 1.1 (the "License"); you may not use this file # License Version 1.1 (the "License"); you may not use this file
# except in compliance with the License. You may obtain a copy of # except in compliance with the License. You may obtain a copy of
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment