$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;
$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;
# 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;
# 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;
}
$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;
$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;
# 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;
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());
}
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());
}
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());
}
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());
}
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());
}
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;
}
$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;
# 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;
$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;
}
$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;
};
$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;
};
$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;
};
$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;
};
}
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
################################################################################
# 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());
################################################################################
# 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());
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;
}
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());
"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;
}
$::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());
$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());
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 {
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());
}
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());
}
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());
}
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();
"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;
}
$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;
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());
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());
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);
$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;
}
$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());
# 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;
$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;
}
# 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()
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;
}
# 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) {
$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());
}
# 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());
}
$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");
}
# 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());
# 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());
}
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());
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;
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());
# 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());
$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 #
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;
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 {
$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 {
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 {
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 {
$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 {
$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 {
$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());
}
# 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());
$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
$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.
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) {
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();