Commit 05d101e5 authored by gerv%gerv.net's avatar gerv%gerv.net

Bug 138588 - change to use new template structure. Patch by gerv, r=myk, afranke.

parent c29a6dcb
......@@ -71,9 +71,8 @@ sub IssueEmailChangeToken {
$vars->{'emailaddress'} = $old_email . &::Param('emailsuffix');
my $message;
$template->process("token/emailchangeold.txt.tmpl", $vars, \$message)
|| &::DisplayError("Template process failed: " . $template->error())
&& exit;
$template->process("account/email/change-old.txt.tmpl", $vars, \$message)
|| &::ThrowTemplateError($template->error());
open SENDMAIL, "|/usr/lib/sendmail -t -i";
print SENDMAIL $message;
......@@ -83,9 +82,8 @@ sub IssueEmailChangeToken {
$vars->{'emailaddress'} = $new_email . &::Param('emailsuffix');
$message = "";
$template->process("token/emailchangenew.txt.tmpl", $vars, \$message)
|| &::DisplayError("Template process failed: " . $template->error())
&& exit;
$template->process("account/email/change-new.txt.tmpl", $vars, \$message)
|| &::ThrowTemplateError($template->error());
open SENDMAIL, "|/usr/lib/sendmail -t -i";
print SENDMAIL $message;
......@@ -222,9 +220,8 @@ sub Cancel {
# Notify the user via email about the cancellation.
my $message;
$template->process("token/tokencancel.txt.tmpl", $vars, \$message)
|| &::DisplayError("Template process failed: " . $template->error())
&& exit;
$template->process("account/cancel-token.txt.tmpl", $vars, \$message)
|| &::ThrowTemplateError($template->error());
open SENDMAIL, "|/usr/lib/sendmail -t -i";
print SENDMAIL $message;
......
......@@ -69,7 +69,7 @@ if (Param("shutdownhtml") && $0 !~ m:[\\/](do)?editparams.cgi$:) {
# Generate and return an HTML message about the downtime.
$::template->process("global/message.html.tmpl", $::vars)
|| DisplayError("Template process failed: " . $::template->error());
|| ThrowTemplateError($::template->error());
exit;
}
......
......@@ -71,9 +71,8 @@ sub IssueEmailChangeToken {
$vars->{'emailaddress'} = $old_email . &::Param('emailsuffix');
my $message;
$template->process("token/emailchangeold.txt.tmpl", $vars, \$message)
|| &::DisplayError("Template process failed: " . $template->error())
&& exit;
$template->process("account/email/change-old.txt.tmpl", $vars, \$message)
|| &::ThrowTemplateError($template->error());
open SENDMAIL, "|/usr/lib/sendmail -t -i";
print SENDMAIL $message;
......@@ -83,9 +82,8 @@ sub IssueEmailChangeToken {
$vars->{'emailaddress'} = $new_email . &::Param('emailsuffix');
$message = "";
$template->process("token/emailchangenew.txt.tmpl", $vars, \$message)
|| &::DisplayError("Template process failed: " . $template->error())
&& exit;
$template->process("account/email/change-new.txt.tmpl", $vars, \$message)
|| &::ThrowTemplateError($template->error());
open SENDMAIL, "|/usr/lib/sendmail -t -i";
print SENDMAIL $message;
......@@ -222,9 +220,8 @@ sub Cancel {
# Notify the user via email about the cancellation.
my $message;
$template->process("token/tokencancel.txt.tmpl", $vars, \$message)
|| &::DisplayError("Template process failed: " . $template->error())
&& exit;
$template->process("account/cancel-token.txt.tmpl", $vars, \$message)
|| &::ThrowTemplateError($template->error());
open SENDMAIL, "|/usr/lib/sendmail -t -i";
print SENDMAIL $message;
......
......@@ -416,9 +416,8 @@ sub viewall
print "Content-Type: text/html\n\n";
# Generate and return the UI (HTML page) from the appropriate template.
$template->process("attachment/viewall.atml", $vars)
|| DisplayError("Template process failed: " . $template->error())
&& exit;
$template->process("attachment/show-multiple.html.tmpl", $vars)
|| ThrowTemplateError($template->error());
}
......@@ -459,9 +458,8 @@ sub enter
print "Content-Type: text/html\n\n";
# Generate and return the UI (HTML page) from the appropriate template.
$template->process("attachment/enter.atml", $vars)
|| DisplayError("Template process failed: " . $template->error())
&& exit;
$template->process("attachment/create.html.tmpl", $vars)
|| ThrowTemplateError($template->error());
}
......@@ -527,9 +525,8 @@ sub insert
print "Content-Type: text/html\n\n";
# Generate and return the UI (HTML page) from the appropriate template.
$template->process("attachment/created.atml", $vars)
|| DisplayError("Template process failed: " . $template->error())
&& exit;
$template->process("attachment/created.html.tmpl", $vars)
|| ThrowTemplateError($template->error());
}
......@@ -603,9 +600,8 @@ sub edit
print "Content-Type: text/html\n\n";
# Generate and return the UI (HTML page) from the appropriate template.
$template->process("attachment/edit.atml", $vars)
|| DisplayError("Template process failed: " . $template->error())
&& exit;
$template->process("attachment/edit.html.tmpl", $vars)
|| ThrowTemplateError($template->error());
}
......@@ -787,8 +783,6 @@ sub update
print "Content-Type: text/html\n\n";
# Generate and return the UI (HTML page) from the appropriate template.
$template->process("attachment/updated.atml", $vars)
|| DisplayError("Template process failed: " . $template->error())
&& exit;
$template->process("attachment/updated.html.tmpl", $vars)
|| ThrowTemplateError($template->error());
}
......@@ -67,8 +67,8 @@ sub show_bug {
my $id = $::FORM{'id'};
if (!defined($id)) {
$template->process("show/choose_bug.html.tmpl", $vars)
|| DisplayError("Template process failed: " . $template->error());
$template->process("bug/choose.html.tmpl", $vars)
|| ThrowTemplateError($template->error());
exit;
}
......@@ -312,9 +312,8 @@ sub show_bug {
$vars->{'user'} = \%user;
# Generate and return the UI (HTML page) from the appropriate template.
$template->process("show/show_bug.html.tmpl", $vars)
|| DisplayError("Template process failed: " . $template->error())
&& exit;
$template->process("bug/edit.html.tmpl", $vars)
|| ThrowTemplateError($template->error());
}
1;
......@@ -69,7 +69,7 @@ ConnectToDatabase();
# Determine the format in which the user would like to receive the output.
# Uses the default format if the user did not specify an output format;
# otherwise validates the user's choice against the list of available formats.
my $format = ValidateOutputFormat($::FORM{'format'});
my $format = ValidateOutputFormat($::FORM{'format'}, "list");
# Whether or not the user wants to change multiple bugs.
my $dotweak = $::FORM{'tweak'} ? 1 : 0;
......@@ -117,7 +117,7 @@ if ($::buffer =~ /&cmd-/) {
$vars->{'url'} = $url;
$vars->{'link'} = "Click here if the page does not redisplay automatically.";
$template->process("global/message.html.tmpl", $vars)
|| DisplayError("Template process failed: " . $template->error());
|| ThrowTemplateError($template->error());
exit;
}
......@@ -1053,7 +1053,7 @@ CMD: for ($::FORM{'cmdtype'}) {
$vars->{'url'} = $url;
$vars->{'link'} = "Click here if the page does not redisplay automatically.";
$template->process("global/message.html.tmpl", $vars)
|| DisplayError("Template process failed: " . $template->error());
|| ThrowTemplateError($template->error());
exit;
};
......@@ -1069,7 +1069,7 @@ CMD: for ($::FORM{'cmdtype'}) {
$vars->{'url'} = "query.cgi";
$vars->{'link'} = "Go back to the query page.";
$template->process("global/message.html.tmpl", $vars)
|| DisplayError("Template process failed: " . $template->error());
|| ThrowTemplateError($template->error());
exit;
};
......@@ -1088,7 +1088,7 @@ CMD: for ($::FORM{'cmdtype'}) {
$vars->{'url'} = "query.cgi";
$vars->{'link'} = "Go back to the query page, using the new default.";
$template->process("global/message.html.tmpl", $vars)
|| DisplayError("Template process failed: " . $template->error());
|| ThrowTemplateError($template->error());
exit;
};
......@@ -1128,7 +1128,7 @@ CMD: for ($::FORM{'cmdtype'}) {
$vars->{'url'} = "query.cgi";
$vars->{'link'} = "Go back to the query page.";
$template->process("global/message.html.tmpl", $vars)
|| DisplayError("Template process failed: " . $template->error());
|| ThrowTemplateError($template->error());
exit;
};
}
......@@ -1361,9 +1361,8 @@ if ($serverpush) {
print "Content-Type: text/html\n\n";
# Generate and return the UI (HTML page) from the appropriate template.
$template->process("buglist/server-push.html.tmpl", $vars)
|| DisplayError("Template process failed: " . $template->error())
&& exit;
$template->process("list/server-push.html.tmpl", $vars)
|| ThrowTemplateError($template->error());
}
# Connect to the shadow database if this installation is using one to improve
......@@ -1565,9 +1564,8 @@ print "\n"; # end HTTP headers
################################################################################
# Generate and return the UI (HTML page) from the appropriate template.
$template->process("buglist/$format->{'template'}", $vars)
|| DisplayError("Template process failed: " . $template->error())
&& exit;
$template->process("list/$format->{'template'}", $vars)
|| ThrowTemplateError($template->error());
################################################################################
......
......@@ -119,7 +119,6 @@ $vars->{buffer} = $::buffer;
# Generate and return the UI (HTML page) from the appropriate template.
print "Content-type: text/html\n\n";
$template->process("buglist/colchange.tmpl", $vars)
|| DisplayError("Template process failed: " . $template->error())
&& exit;
$template->process("list/change-columns.html.tmpl", $vars)
|| ThrowTemplateError($template->error());
......@@ -68,8 +68,8 @@ if (defined($login)) {
if (!ValidateNewUser($login)) {
# Account already exists
$template->process("admin/account_exists.tmpl", $vars)
|| DisplayError("Template process failed: " . $template->error());
$template->process("account/exists.html.tmpl", $vars)
|| ThrowTemplateError($template->error());
exit;
}
......@@ -77,12 +77,11 @@ if (defined($login)) {
my $password = InsertNewUser($login, $realname);
MailPassword($login, $password);
$template->process("admin/account_created.tmpl", $vars)
|| DisplayError("Template process failed: " . $template->error());
$template->process("account/created.html.tmpl", $vars)
|| DisplayError($template->error());
exit;
}
# Show the standard "would you like to create an account?" form.
$template->process("admin/create_account.tmpl", $vars)
|| DisplayError("Template process failed: " . $template->error())
&& exit;
$template->process("account/create.html.tmpl", $vars)
|| ThrowTemplateError($template->error());
......@@ -67,8 +67,8 @@ if (!defined $::FORM{'product'}) {
"Please specify the product whose components you want described.";
print "Content-type: text/html\n\n";
$::template->process("global/choose_product.tmpl", $::vars)
|| DisplayError("Template process failed: " . $::template->error());
$::template->process("global/choose-product.html.tmpl", $::vars)
|| ThrowTemplateError($::template->error());
exit;
}
......@@ -123,6 +123,6 @@ $::vars->{'product'} = $product;
$::vars->{'components'} = \@components;
print "Content-type: text/html\n\n";
$::template->process("info/describe-components.tmpl", $::vars)
|| DisplayError("Template process failed: " . $::template->error());
$::template->process("reports/components.html.tmpl", $::vars)
|| ThrowTemplateError($::template->error());
......@@ -54,6 +54,5 @@ $vars->{'keywords'} = \@keywords;
$vars->{'caneditkeywords'} = UserInGroup("editkeywords");
print "Content-type: text/html\n\n";
$template->process("info/describe-keywords.html.tmpl", $vars)
|| DisplayError("Template process failed: " . $template->error())
&& exit;
$template->process("reports/keywords.html.tmpl", $vars)
|| ThrowTemplateError($template->error());
......@@ -197,9 +197,8 @@ $vars->{'products'} = \@::legal_product;
print "Content-type: text/html\n\n";
# Generate and return the UI (HTML page) from the appropriate template.
$template->process("report/duplicates.html.tmpl", $vars)
|| DisplayError("Template process failed: " . $template->error())
&& exit;
$template->process("reports/duplicates.html.tmpl", $vars)
|| ThrowTemplateError($template->error());
sub days_ago {
......
......@@ -201,9 +201,8 @@ sub list
print "Content-type: text/html\n\n";
# Generate and return the UI (HTML page) from the appropriate template.
$template->process("attachstatus/list.atml", $vars)
|| DisplayError("Template process failed: " . $template->error())
&& exit;
$template->process("admin/attachstatus/list.html.tmpl", $vars)
|| ThrowTemplateError($template->error());
}
......@@ -223,9 +222,8 @@ sub create
print "Content-type: text/html\n\n";
# Generate and return the UI (HTML page) from the appropriate template.
$template->process("attachstatus/create.atml", $vars)
|| DisplayError("Template process failed: " . $template->error())
&& exit;
$template->process("admin/attachstatus/create.html.tmpl", $vars)
|| ThrowTemplateError($template->error());
}
......@@ -272,9 +270,8 @@ sub edit
print "Content-type: text/html\n\n";
# Generate and return the UI (HTML page) from the appropriate template.
$template->process("attachstatus/edit.atml", $vars)
|| DisplayError("Template process failed: " . $template->error())
&& exit;
$template->process("admin/attachstatus/edit.html.tmpl", $vars)
|| ThrowTemplateError($template->error());
}
......@@ -322,9 +319,8 @@ sub confirmDelete
print "Content-type: text/html\n\n";
$template->process("attachstatus/delete.atml", $vars)
|| DisplayError("Template process failed: " . & $template->error())
&& exit;
$template->process("admin/attachstatus/delete.html.tmpl", $vars)
|| ThrowTemplateError($template->error());
}
else {
deleteStatus();
......
......@@ -86,8 +86,8 @@ if (!defined $::FORM{'product'}) {
"First, you must pick a product on which to enter a bug.";
print "Content-type: text/html\n\n";
$template->process("global/choose_product.tmpl", $vars)
|| DisplayError("Template process failed: " . $template->error());
$template->process("global/choose-product.html.tmpl", $vars)
|| ThrowTemplateError($template->error());
exit;
}
......@@ -355,6 +355,6 @@ if ($::usergroupset ne '0') {
$vars->{'default'} = \%default;
print "Content-type: text/html\n\n";
$template->process("entry/enter_bug.tmpl", $vars)
|| DisplayError("Template process failed: " . $template->error());
$template->process("bug/create/create.html.tmpl", $vars)
|| ThrowTemplateError($template->error());
exit;
......@@ -60,6 +60,5 @@ $vars->{'subst'} = { 'userid' => $vars->{'username'} };
print "Content-Type: text/html\n\n";
# Generate and return the UI (HTML page) from the appropriate template.
$template->process("index.tmpl", $vars)
|| DisplayError("Template process failed: " . $template->error())
&& exit;
$template->process("index.html.tmpl", $vars)
|| ThrowTemplateError($template->error());
......@@ -112,6 +112,5 @@ print "Content-Type: text/html\n";
print "Content-Disposition: inline; filename=$filename\n\n";
# Generate and return the UI (HTML page) from the appropriate template.
$template->process("show/multiple.tmpl", $vars)
|| DisplayError("Template process failed: " . $template->error())
&& exit;
$template->process("bug/show-multiple.html.tmpl", $vars)
|| ThrowTemplateError($template->error());
......@@ -57,7 +57,8 @@ confirm_login();
my $comment;
$vars->{'form'} = \%::FORM;
$template->process("entry/comment.txt.tmpl", $vars, \$comment)
$template->process("bug/create/initial-comment.txt.tmpl", $vars, \$comment)
|| ThrowTemplateError($template->error());
ValidateComment($comment);
......@@ -80,8 +81,8 @@ if (defined $::FORM{'maketemplate'}) {
$vars->{'url'} = $::buffer;
print "Content-type: text/html\n\n";
$template->process("entry/create-template.html.tmpl", $vars)
|| DisplayError("Template process failed: " . $template->error());
$template->process("bug/create/make-template.html.tmpl", $vars)
|| ThrowTemplateError($template->error());
exit;
}
......@@ -301,5 +302,5 @@ $vars->{'bug_id'} = $id;
$vars->{'mailresults'} = $mailresults;
print "Content-type: text/html\n\n";
$template->process("entry/post-bug.html.tmpl", $vars)
|| DisplayError("Template process failed: " . $template->error());
$template->process("bug/create/created.html.tmpl", $vars)
|| ThrowTemplateError($template->error());
......@@ -108,7 +108,7 @@ print "Content-type: text/html\n\n";
# Start displaying the response page.
$vars->{'title'} = "Bug processed";
$template->process("global/header", $vars)
$template->process("global/header.html.tmpl", $vars)
|| ThrowTemplateError($template->error());
$vars->{'header_done'} = 1;
......@@ -210,7 +210,7 @@ if ((($::FORM{'id'} && $::FORM{'product'} ne $::oldproduct)
$vars->{'verify_bug_group'} = (Param('usebuggroups')
&& !defined($::FORM{'addtonewgroup'}));
$template->process("process/verify-new-product.html.tmpl", $vars)
$template->process("bug/process/verify-new-product.html.tmpl", $vars)
|| ThrowTemplateError($template->error());
exit;
}
......@@ -332,7 +332,7 @@ sub DuplicateUserConfirm {
# Confirm whether or not to add the reporter to the cc: list
# of the original bug (the one this bug is being duped against).
print "Content-type: text/html\n\n";
$template->process("process/confirm-dupe.html.tmpl", $vars)
$template->process("bug/process/confirm-duplicate.html.tmpl", $vars)
|| ThrowTemplateError($template->error());
exit;
} # end DuplicateUserConfirm()
......@@ -873,7 +873,7 @@ foreach my $id (@idlist) {
SendSQL("UNLOCK TABLES");
# Warn the user about the mid-air collision and ask them what to do.
$template->process("process/mid-air.html.tmpl", $vars)
$template->process("bug/process/midair.html.tmpl", $vars)
|| ThrowTemplateError($template->error());
exit;
}
......@@ -1251,7 +1251,7 @@ foreach my $id (@idlist) {
# Let the user know the bug was changed and who did and didn't
# receive email about the change.
$template->process("process/results.html.tmpl", $vars)
$template->process("bug/process/results.html.tmpl", $vars)
|| ThrowTemplateError($template->error());
if ($duplicate) {
......@@ -1281,7 +1281,7 @@ foreach my $id (@idlist) {
$vars->{'type'} = "dupe";
# Let the user know a duplication notation was added to the original bug.
$template->process("process/results.html.tmpl", $vars)
$template->process("bug/process/results.html.tmpl", $vars)
|| ThrowTemplateError($template->error());
}
......@@ -1297,7 +1297,7 @@ foreach my $id (@idlist) {
# Let the user know we checked to see if we should email notice
# of this change to users with a relationship to the dependent
# bug and who did and didn't receive email about it.
$template->process("process/results.html.tmpl", $vars)
$template->process("bug/process/results.html.tmpl", $vars)
|| ThrowTemplateError($template->error());
}
......@@ -1316,7 +1316,7 @@ if ($::COOKIE{"BUGLIST"} && $::FORM{'id'}) {
$vars->{'next_id'} = $next_bug;
# Let the user know we are about to display the next bug in their list.
$template->process("process/next-bug.html.tmpl", $vars)
$template->process("bug/process/next.html.tmpl", $vars)
|| ThrowTemplateError($template->error());
show_bug("header is already done");
......@@ -1327,7 +1327,7 @@ if ($::COOKIE{"BUGLIST"} && $::FORM{'id'}) {
}
# End the response page.
$template->process("show/navigate.html.tmpl", $vars)
$template->process("bug/navigate.html.tmpl", $vars)
|| ThrowTemplateError($template->error());
$template->process("global/footer", $vars)
$template->process("global/footer.html.tmpl", $vars)
|| ThrowTemplateError($template->error());
......@@ -381,6 +381,5 @@ $vars->{'default'} = \%default;
# Generate and return the UI (HTML page) from the appropriate template.
print "Content-type: text/html\n\n";
$template->process("query/query.atml", $vars)
|| DisplayError("Template process failed: " . $template->error())
&& exit;
$template->process("search/search.html.tmpl", $vars)
|| ThrowTemplateError($template->error());
......@@ -70,6 +70,5 @@ if ($action eq "add") {
}
print "Content-type: text/html\n\n";
$template->process("info/quips.tmpl", $vars)
|| DisplayError("Template process failed: " . $template->error())
&& exit;
$template->process("list/quips.html.tmpl", $vars)
|| ThrowTemplateError($template->error());
......@@ -69,8 +69,7 @@ delete $::COOKIE{"Bugzilla_login"};
print "Content-Type: text/html\n\n";
$template->process("global/message.html.tmpl", $vars)
|| DisplayError("Template process failed: " . $template->error())
&& exit;
|| ThrowTemplateError($template->error());
exit;
......@@ -57,7 +57,6 @@ $vars->{'bug_id'} = $::FORM{'id'};
print "Content-type: text/html\n\n";
$template->process("show/bug-activity.html.tmpl", $vars)
|| DisplayError("Template process failed: " . $template->error())
&& exit;
$template->process("bug/activity/show.html.tmpl", $vars)
|| ThrowTemplateError($template->error());
......@@ -190,6 +190,5 @@ $vars->{'showsummary'} = $::FORM{'showsummary'};
# Generate and return the UI (HTML page) from the appropriate template.
print "Content-type: text/html\n\n";
$template->process("show/dependency-graph.html.tmpl", $vars)
|| DisplayError("Template process failed: " . $template->error())
&& exit;
$template->process("bug/dependency-graph.html.tmpl", $vars)
|| ThrowTemplateError($template->error());
......@@ -94,9 +94,8 @@ $vars->{'hide_resolved'} = $hide_resolved;
$vars->{'canedit'} = UserInGroup("editbugs");
print "Content-Type: text/html\n\n";
$template->process("show/dependency-tree.html.tmpl", $vars)
|| DisplayError("Template process failed: " . $template->error())
&& exit;
$template->process("bug/dependency-tree.html.tmpl", $vars)
|| ThrowTemplateError($template->error());
################################################################################
# Recursive Tree Generation Function #
......
......@@ -73,9 +73,8 @@ my $useragent = $ENV{HTTP_USER_AGENT};
if ($useragent =~ m:Mozilla/([1-9][0-9]*):i && $1 >= 5 && $useragent !~ m/compatible/i) {
print "Content-type: application/vnd.mozilla.xul+xml\n\n";
# Generate and return the XUL from the appropriate template.
$template->process("sidebar/xul.tmpl", $vars)
|| DisplayError("Template process failed: " . $template->error())
&& exit;
$template->process("sidebar.xul.tmpl", $vars)
|| ThrowTemplateError($template->error());
} else {
DisplayError("sidebar.cgi currently only supports Mozilla based web browsers");
exit;
......
......@@ -178,8 +178,7 @@ sub requestChangePassword {
print "Content-Type: text/html\n\n";
$template->process("global/message.html.tmpl", $vars)
|| DisplayError("Template process failed: " . $template->error())
&& exit;
|| ThrowTemplateError($template->error());
}
sub confirmChangePassword {
......@@ -187,9 +186,8 @@ sub confirmChangePassword {
$vars->{'token'} = $::token;
print "Content-Type: text/html\n\n";
$template->process("admin/change-password.html.tmpl", $vars)
|| DisplayError("Template process failed: " . $template->error())
&& exit;
$template->process("account/password/set-forgotten-password.html.tmpl", $vars)
|| ThrowTemplateError($template->error());
}
sub cancelChangePassword {
......@@ -200,8 +198,7 @@ sub cancelChangePassword {
print "Content-Type: text/html\n\n";
$template->process("global/message.html.tmpl", $vars)
|| DisplayError("Template process failed: " . $template->error())
&& exit;
|| ThrowTemplateError($template->error());
}
sub changePassword {
......@@ -229,8 +226,7 @@ sub changePassword {
print "Content-Type: text/html\n\n";
$template->process("global/message.html.tmpl", $vars)
|| DisplayError("Template process failed: " . $template->error())
&& exit;
|| ThrowTemplateError($template->error());
}
sub confirmChangeEmail {
......@@ -240,9 +236,8 @@ sub confirmChangeEmail {
$vars->{'title'} = "Confirm Change Email";
$vars->{'token'} = $::token;
$template->process("token/confirmemail.html.tmpl", $vars)
|| &::DisplayError("Template process failed: " . $template->error())
&& exit;
$template->process("account/email/confirm.html.tmpl", $vars)
|| ThrowTemplateError($template->error());
}
sub changeEmail {
......@@ -287,8 +282,7 @@ sub changeEmail {
$vars->{'message'} = "Your Bugzilla login has been changed.";
$template->process("global/message.html.tmpl", $vars)
|| &::DisplayError("Template process failed: " . $template->error())
&& exit;
|| ThrowTemplateError($template->error());
}
sub cancelChangeEmail {
......@@ -336,7 +330,6 @@ sub cancelChangeEmail {
$vars->{'title'} = "Cancel Request to Change Email Address";
$template->process("global/message.html.tmpl", $vars)
|| &::DisplayError("Template process failed: " . $template->error())
&& exit;
|| ThrowTemplateError($template->error());
}
......@@ -409,7 +409,6 @@ SWITCH: for ($current_tab_name) {
# Generate and return the UI (HTML page) from the appropriate template.
print "Content-type: text/html\n\n";
$template->process("prefs/userprefs.tmpl", $vars)
|| DisplayError("Template process failed: " . $template->error())
&& exit;
$template->process("account/prefs/prefs.html.tmpl", $vars)
|| ThrowTemplateError($template->error());
......@@ -110,9 +110,8 @@ sub show_bug {
$vars->{'total'} = $total;
print "Content-type: text/html\n\n";
$template->process("voting/show-bug-votes.html.tmpl", $vars)
|| DisplayError("Template process failed: " . $template->error())
&& exit;
$template->process("bug/votes/list-for-bug.html.tmpl", $vars)
|| ThrowTemplateError($template->error());
}
# Display all the votes for a particular user. If it's the user
......@@ -218,9 +217,8 @@ sub show_user {
$vars->{'products'} = \@products;
print "Content-type: text/html\n\n";
$template->process("voting/show-user-votes.html.tmpl", $vars)
|| DisplayError("Template process failed: " . $template->error())
&& exit;
$template->process("bug/votes/list-for-user.html.tmpl", $vars)
|| ThrowTemplateError($template->error());
}
# Update the user's votes in the database.
......@@ -239,8 +237,8 @@ sub record_votes {
if (scalar(@buglist) == 0) {
if (!defined($::FORM{'delete_all_votes'})) {
print "Content-type: text/html\n\n";
$template->process("voting/delete-all-votes.html.tmpl", $vars)
|| DisplayError("Template process failed: " . $template->error());
$template->process("bug/votes/delete-all.html.tmpl", $vars)
|| ThrowTemplateError($template->error());
exit();
}
elsif ($::FORM{'delete_all_votes'} == 0) {
......
......@@ -34,10 +34,9 @@ use vars qw($template $vars);
if (!defined $::FORM{'id'} || !$::FORM{'id'}) {
print "Content-Type: text/html\n\n";
$template->process("show/choose_xml.html.tmpl", $vars)
|| DisplayError("Template process failed: " . $template->error())
&& exit;
exit;
$template->process("bug/choose-xml.html.tmpl", $vars)
|| ThrowTemplateError($template->error());
exit;
}
quietly_check_login();
......
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