Commit ae185749 authored by lpsolit%gmail.com's avatar lpsolit%gmail.com

Bug 312197: Templatize sanitycheck.cgi - Patch by Fré©ric Buclin <LpSolit@gmail.com> r/a=mkanat

parent 439851b4
......@@ -187,22 +187,6 @@ sub getTemplateIncludePath {
return Bugzilla->request_cache->{"template_include_path_$lang"};
}
sub put_header {
my $self = shift;
my $vars = {};
($vars->{'title'}, $vars->{'h1'}, $vars->{'h2'}) = (@_);
$self->process("global/header.html.tmpl", $vars)
|| ThrowTemplateError($self->error());
$vars->{'header_done'} = 1;
}
sub put_footer {
my $self = shift;
$self->process("global/footer.html.tmpl")
|| ThrowTemplateError($self->error());
}
sub get_format {
my $self = shift;
my ($template, $format, $ctype) = @_;
......@@ -924,10 +908,6 @@ Bugzilla::Template - Wrapper around the Template Toolkit C<Template> object
=head1 SYNOPSIS
my $template = Bugzilla::Template->create;
$template->put_header($title, $h1, $h2);
$template->put_footer();
my $format = $template->get_format("foo/bar",
scalar($cgi->param('format')),
scalar($cgi->param('ctype')));
......@@ -960,24 +940,6 @@ Returns: nothing
=over
=item C<put_header($title, $h1, $h2)>
Description: Display the header of the page for non yet templatized .cgi files.
Params: $title - Page title.
$h1 - Main page header.
$h2 - Page subheader.
Returns: nothing
=item C<put_footer()>
Description: Display the footer of the page for non yet templatized .cgi files.
Params: none
Returns: nothing
=item C<get_format($file, $format, $ctype)>
Description: Construct a format object from URL parameters.
......
......@@ -29,6 +29,11 @@
border-color: red;
}
.alert {
color: red;
background-color: inherit;
}
p.areyoureallyreallysure {
color: red;
font-size: 120%;
......
[%# 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
# 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 Frédéric Buclin.
#
# Contributor(s): Frédéric Buclin <LpSolit@gmail.com>
#%]
[% PROCESS global/variables.none.tmpl %]
[% PROCESS global/header.html.tmpl title = "Sanity Check"
style_urls = ['skins/standard/admin.css'] %]
<div>
<p>
[% terms.Bugzilla %] is checking the referential integrity of your database.
This may take several minutes to complete.
</p>
<p>
Errors, if any, will be <span class="alert">emphasized like this</span>.
Depending on the errors found, some links will be displayed allowing you
to easily fix them. Fixing these errors will automatically run this script
again (so be aware that it may take an even longer time than the first run).
</p>
</div>
<hr>
......@@ -374,6 +374,11 @@
set to zero automatically as part of marking this [% terms.bug %]
as either RESOLVED or CLOSED.
[% ELSIF message_tag == "sanitycheck" %]
[%# We use this way to call sanitycheck-specific messages so that
# we can still use get_text(). %]
[% PROCESS "admin/sanitycheck/messages.html.tmpl" %]
[% ELSIF message_tag == "sudo_started" %]
[% title = "Sudo session started" %]
The sudo session has been started. For the next 6 hours, or until you
......
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