зеркало из https://github.com/mozilla/pjs.git
- display error message for common error conditions when displaying a single result
This commit is contained in:
Родитель
9723b01ba6
Коммит
df1115f2c0
|
@ -47,6 +47,11 @@ if ($c->param && $c->param('id')) {
|
|||
|
||||
my $result = Litmus::DB::Testresult->retrieve($c->param('id'));
|
||||
|
||||
if (!$result) {
|
||||
internalError("There is no test result corresponding to id#: " . $c->param('id') . ".");
|
||||
exit 1;
|
||||
}
|
||||
|
||||
my $time = &Date::Manip::UnixDate("now","%q");
|
||||
my $cookie = Litmus::Auth::getCookie();
|
||||
my $user;
|
||||
|
@ -93,11 +98,10 @@ if ($c->param && $c->param('id')) {
|
|||
$vars->{"defaultemail"} = Litmus::Auth::getCookie();
|
||||
|
||||
Litmus->template()->process("reporting/single_result.tmpl", $vars) ||
|
||||
internalError(Litmus->template()->error());
|
||||
internalError("Error loading template.");
|
||||
|
||||
} else {
|
||||
internalError(Litmus->template()->error());
|
||||
print "Error\n";
|
||||
internalError("You must provide a test result id#.");
|
||||
exit 1;
|
||||
}
|
||||
|
||||
|
@ -112,3 +116,12 @@ exit 0;
|
|||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче