Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 619bf139

Von Sven Schöling vor mehr als 15 Jahren hinzugefügt

  • ID 619bf1391478bddaa1a47c5028d0694000cc52d2
  • Vorgänger 0c19f07b
  • Nachfolger 9b220b88

am.pl strictness

Unterschiede anzeigen:

am.pl
#
#######################################################################
#use strict;
BEGIN {
unshift @INC, "modules/override"; # Use our own versions of various modules (e.g. YAML).
push @INC, "modules/fallback"; # Only use our own versions of modules if there's no system version.
}
# setup defaults, DO NOT CHANGE
$userspath = "users";
$templates = "templates";
$memberfile = "users/members";
$sendmail = "| /usr/sbin/sendmail -t";
$main::userspath = "users";
$main::templates = "templates";
$main::memberfile = "users/members";
$main::sendmail = "| /usr/sbin/sendmail -t";
########## end ###########################################
$| = 1;
use SL::LXDebug;
$lxdebug = LXDebug->new();
$main::lxdebug = LXDebug->new();
use CGI qw( -no_xhtml);
use SL::Auth;
......
require "bin/mozilla/common.pl";
if (defined($latex) && !defined($latex_templates)) {
$latex_templates = $latex;
undef($latex);
if (defined($main::latex) && !defined($main::latex_templates)) {
$main::latex_templates = $main::latex;
undef($main::latex);
}
# this prevents most of the tabindexes being created by CGI.
......
# name of this script
$0 =~ tr/\\/\//;
$pos = rindex $0, '/';
$script = substr($0, $pos + 1);
my $pos = rindex $0, '/';
my $script = substr($0, $pos + 1);
# we use $script for the language module
$form->{script} = $script;
......
use DBI;
# locale messages
$locale = new Locale($language, "$script");
$main::locale = new Locale($main::language, "$script");
my $locale = $main::locale;
# did sysadmin lock us out
if (-e "$userspath/nologin") {
if (-e "$main::userspath/nologin") {
$form->error($locale->text('System currently down for maintenance!'));
}
......
$form->{login} =~ s|.*/||;
%myconfig = $auth->read_user($form->{login});
%main::myconfig = $auth->read_user($form->{login});
my %myconfig = %main::myconfig;
if (!$myconfig{login}) {
_show_error('login/password_error', 'password');
......
sub _show_error {
my $template = shift;
my $error_type = shift;
$locale = Locale->new($language, 'all');
my $locale = Locale->new($main::language, 'all');
$form->{error} = $locale->text('The session is invalid or has expired.') if ($error_type eq 'session');
$form->{error} = $locale->text('Incorrect password!.') if ($error_type eq 'password');
$myconfig{countrycode} = $language;
$myconfig{countrycode} = $main::language;
$form->{stylesheet} = 'css/lx-office-erp.css';
$form->header();

Auch abrufbar als: Unified diff