Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 637325bb

Von Moritz Bunkus vor etwa 19 Jahren hinzugefügt

  • ID 637325bb8d8050099eaaeb06c2a50e49ccbc29a7
  • Vorgänger 2787b39a
  • Nachfolger 6f73d970

Die Funktion Form::error(), die u.a. auch von Form::isblank() und Form::dberror() aufgerufen wird, gibt nun ihre Fehlermeldung ueber die Standard-Fehler-Vorlage aus. [r778 aus LINET prog-Repo]

Unterschiede anzeigen:

SL/Form.pm
$msg =~ s/\n/<br>/g;
$self->header;
print qq|
<body>
<h2 class=error>Error!</h2>
<p><b>$msg</b>
</body>
</html>
|;
$self->show_generic_error($msg);
die "Error: $msg\n";
templates/webpages/generic/error.html
<body>
<table width=100%>
<tr>
<th class=listtop><TMPL_VAR NAME=title DEFAULT="Error!"></th>
</tr>
<tr height="5"></tr>
<tr><td><TMPL_VAR NAME=label_error></td></tr>
</table>
<TMPL_VAR NAME=DEBUG>
</body>
</html>
templates/webpages/generic/error_de.html
<body>
<table width=100%>
<tr>
<th class=listtop><TMPL_VAR NAME=title DEFAULT="Fehler!"></th>
</tr>
<tr height="5"></tr>
<tr><td><TMPL_VAR NAME=label_error></td></tr>
</table>
<TMPL_VAR NAME=DEBUG>
</body>
</html>

Auch abrufbar als: Unified diff