/etc/lx-office-erp/lx-office-erp.apache2.conf
/etc/lx-office-erp/lx-office-erp.cherokee
/etc/lx-office-erp/lx-office-erp.cherokee.handler
+/etc/lx-office-erp/lx-erp.conf.default
+/etc/lx-office-erp/console.conf.default
+/etc/lx-office-erp/authentication.pl.default
Priority: optional
Installed-Size: 0
Maintainer: Holger Lindemann <hli@lx-system.de>, Adrian Weibel <adrian_weibel@web.de>
-Depends: patch, apache2 | apache | lighttpd, postgresql | postgresql-7.4 | postgresql-8.0 | postgresql-8.1 | postgresql-8.2 | postgresql-8.3 | postgresql-8.4, libdbi-perl, libdbd-pg-perl, libpg-perl, libarchive-zip-perl, libyaml-perl, libio-stringy-perl, libtemplate-perl, libpdf-api2-perl, libcgi-ajax-perl, liblist-moreutils-perl, libxml-writer-perl, libtext-csv-xs-perl | libtext-csv-perl, liburi-perl, libdatetime-perl, libtext-iconv-perl, libclass-accessor-perl,libemail-address-perl,libparent-perl
-Suggests: tetex-base, tetex-bin, tetex-extra, xpdf | evince | okular, libfcgi-perl, libapache2-mod-fastcgi
+Depends: patch, apache2 | apache | lighttpd, postgresql-8.2 | postgresql-8.3 | postgresql-8.4, libdbi-perl, libdbd-pg-perl, libpg-perl, libarchive-zip-perl, libyaml-perl, libio-stringy-perl, libtemplate-perl, libpdf-api2-perl, libcgi-ajax-perl, liblist-moreutils-perl, libxml-writer-perl, libtext-csv-xs-perl | libtext-csv-perl, liburi-perl, libdatetime-perl, libtext-iconv-perl, libclass-accessor-perl,libemail-address-perl,libparent-perl, librose-object-perl, librose-db-perl, librose-db-object-perl
+Suggests: tetex-base | texlive-latex-base, tetex-bin | texlive-base-bin , tetex-extra | texlive-latex-extra, xpdf | evince | okular, libfcgi-perl, libapache2-mod-fastcgi
Homepage: http://www.lx-office.org
Description: Extended double entry accounting system for the german market.
Lx-Office is derived from sql-ledger and rewritten
data format to a tax consultant. Most of the documents are printable in
html or pdf format.
Further information about Lx-Office is available at http://www.lx-office.org .
- Revision:
+ Revision:
db_get lx-office-erp/admin-password
ADMINPASSWORD="$RET"
- #cat /usr/lib/lx-office-erp/config/authentication.pl.default | \
cat /etc/lx-office-erp/authentication.pl.default | \
sed --expression "s/\$self->{admin_password} = 'admin';/\$self->{admin_password} = '$ADMINPASSWORD';/g" \
> /tmp/1.txt
- #mv /tmp/1.txt /usr/lib/lx-office-erp/config/authentication.pl
mv /tmp/1.txt /etc/lx-office-erp/authentication.pl
- #chmod 0600 /usr/lib/lx-office-erp/config/authentication.pl
- #chown www-data:www-data /usr/lib/lx-office-erp/config/authentication.pl
-
}
db_get lx-office-erp/lx-office-erp-user-postgresql-password
PASSWORD="$RET"
- #cat /usr/lib/lx-office-erp/config/authentication.pl | \
cat /etc/lx-office-erp/authentication.pl | \
sed --expression "s/'password' => '',/'password' => '$PASSWORD',/g" \
> /tmp/1.txt
- #mv /tmp/1.txt /usr/lib/lx-office-erp/config/authentication.pl
mv /tmp/1.txt /etc/lx-office-erp/authentication.pl
}
set_lx_office_erp_authentication_db_user() {
USER="lxoffice"
- #cat /usr/lib/lx-office-erp/config/authentication.pl | \
cat /etc/lx-office-erp/authentication.pl | \
sed --expression "s/'user' => 'postgres',/'user' => '$USER',/g" \
> /tmp/1.txt
- #mv /tmp/1.txt /usr/lib/lx-office-erp/config/authentication.pl
mv /tmp/1.txt /etc/lx-office-erp/authentication.pl
}
set_user_rights() {
chown -R www-data:www-data /usr/lib/lx-office-erp/users
chown -R www-data:www-data /usr/lib/lx-office-erp/templates
- chown www-data:www-data /etc/lx-office-erp/lx-erp.conf
- chown www-data:www-data /usr/lib/lx-office-erp/menu.ini
- chown www-data:www-data /etc/lx-office-erp/authentication.pl
- chmod 0600 /etc/lx-office-erp/lx-erp.conf
- chmod 0600 /etc/lx-office-erp/authentication.pl
+ chown www-data:www-data /etc/lx-office-erp/lx_office.conf
+ chown www-data:www-data /usr/lib/lx-office-erp/menu.ini
+ chown www-data:www-data /etc/lx-office-erp/authentication.pl
+ chmod 0600 /etc/lx-office-erp/lx_office.conf
+ chmod 0600 /etc/lx-office-erp/authentication.pl
}
disable_ipv6_on_lo_interface() {
}
mk_new_menu() {
- if [ -e /usr/lib/lx-office-crm ] ; then
+ if [ -e /usr/lib/lx-office-crm ] ; then
#crm vorhanden, dann die menu.ini mit der höchsten VersNr nehmen
- for i in `ls -1 /usr/lib/lx-office-crm/update/menu*ini` ; do
+ for i in `ls -1 /usr/lib/lx-office-crm/update/menu*ini` ; do
cat $i > /usr/lib/lx-office-erp/menu.ini
done;
cat /usr/lib/lx-office-erp/menu.default >> /usr/lib/lx-office-erp/menu.ini
else
cp /usr/lib/lx-office-erp/menu.default /usr/lib/lx-office-erp/menu.ini
fi
-}
+}
mk_new_config() {
- if ! [ -f /etc/lx-office-erp/lx-erp.conf ] ; then
- cp /etc/lx-office-erp/lx-erp.conf.default /etc/lx-office-erp/lx-erp.conf
+ if ! [ -f /etc/lx-office-erp/lx_office.conf ] ; then
+ cp /etc/lx-office-erp/lx_office.conf.default /etc/lx-office-erp/lx_office.conf
fi
-}
+}
mk_links() {
if ! [ -f /usr/lib/lx-office-erp/config/authentication.pl ] ; then
ln -s /etc/lx-office-erp/authentication.pl /usr/lib/lx-office-erp/config/authentication.pl
fi;
- if ! [ -f /usr/lib/lx-office-erp/config/lx-erp.conf ] ; then
- ln -s /etc/lx-office-erp/lx-erp.conf /usr/lib/lx-office-erp/config/lx-erp.conf
+ if ! [ -f /usr/lib/lx-office-erp/config/lx_office.conf ] ; then
+ ln -s /etc/lx-office-erp/lx_office.conf /usr/lib/lx-office-erp/config/lx_office.conf
fi;
- if [ -e /etc/apache2 ] ; then
+ if [ -e /etc/apache2 ] ; then
if ! [ -f /etc/apache2/conf.d/lx-office-erp.apache2.conf ] ; then
ln -s /etc/lx-office-erp/lx-office-erp.apache2.conf /etc/apache2/conf.d/lx-office-erp.apache2.conf
fi;
fi;
- if [ -e /etc/cherokee/sites-available ] ; then
+ if [ -e /etc/cherokee/sites-available ] ; then
if ! [ -f /etc/cherokee/sites-available/lx-office-erp.cherokee ] ; then
cat /etc/lx-office-erp/lx-office-erp.cherokee.handler >> /etc/cherokee/sites-available/default
ln -s /etc/lx-office-erp/lx-office-erp.cherokee /etc/cherokee/sites-available/lx-office-erp.cherokee
fi;
}
reload_web_server() {
- if [ -f /etc/init.d/apache* ] ; then
+ if [ -f /etc/init.d/apache* ] ; then
/etc/init.d/apache* reload
fi
- if [ -f /etc/init.d/cherokee ] ; then
+ if [ -f /etc/init.d/cherokee ] ; then
/etc/init.d/cherokee reload
fi
}
install|configure)
echo " ! "`date`" $1 !" >> /tmp/lxo-erp.log
-
+
mk_new_menu
mk_new_config
config_postgresql_factory_script
#!/bin/sh
#Nur für das Update von einer 2.6.0 nötig, da hier gnadenlos gelöscht wird
-set -e
+#set -x
+
+(
echo " ! "`date`" Preinst $1 !" >> /tmp/lxo-erp.log
+)
+
if [ "$1" = "upgrade" ]; then
- echo "#!/bin/sh" > /var/lib/dpkg/info/lx-office-erp.postrm
- echo "set -e" >> /var/lib/dpkg/info/lx-office-erp.postrm
- echo "echo ' ! '`date`' postrm2 $1 !'" >> /var/lib/dpkg/info/lx-office-erp.postrm
- chmod +x /var/lib/dpkg/info/lx-office-erp.postrm
+ echo " ! upgrade !" >> /tmp/lxo-erp.log
+ cnt=`grep -c '\-e /usr/lib/lx-office-erp' /var/lib/dpkg/info/lx-office-erp.postrm`
+ echo " ! $cnt !" >> /tmp/lxo-erp.log
+ if [ $cnt -gt 0 ]; then
+ echo "#!/bin/sh" > /var/lib/dpkg/info/lx-office-erp.postrm
+ echo "set -e" >> /var/lib/dpkg/info/lx-office-erp.postrm
+ echo "echo ' ! '`date`' postrm2 $1 !'" >> /var/lib/dpkg/info/lx-office-erp.postrm
+ chmod +x /var/lib/dpkg/info/lx-office-erp.postrm
+ else
+ echo " ! ok !" >> /tmp/lxo-erp.log
+ fi
fi
+++ /dev/null
-#!/bin/sh
-#
-## shell script for lx-office-erp to start the login manager in a browser
-
-set -e
-
-/usr/bin/sensible-browser http://localhost/lx-office-erp/login.pl
-
-
+++ /dev/null
-AddHandler cgi-script .pl
-Alias /lx-office /usr/lib/lx-office-erp/
-Alias /lx-office-erp /usr/lib/lx-office-erp/
-
-<Directory /usr/lib/lx-office-erp>
- Options ExecCGI Includes FollowSymlinks
- DirectoryIndex login.pl
- AddDefaultCharset UTF-8
-</Directory>
-
-<Directory /usr/lib/lx-office-erp/users>
- Order Deny,Allow
- Deny from All
-</Directory>
\ No newline at end of file
+++ /dev/null
-##
-## Virtual server for lx-office-erp
-##
-Directory /lx-office-erp {
- Handler common
- DocumentRoot /usr/lib/lx-office-erp/
-}
-Directory /lx-office-erp/image {
- DocumentRoot /usr/share/lx-office-erp/
-}
-Directory /lx-office-erp/css{
- DocumentRoot /var/lib/lx-office-erp/css
-}
-Directory /lx-office-erp/templates{
- DocumentRoot /var/lib/lx-office-erp/templates
-}
-Directory /lx-office-erp/users{
- DocumentRoot /var/lib/lx-office-erp/users
-}
-Directory /lx-office-erp/webdav{
- DocumentRoot /var/lib/lx-office-erp/webdav
-}
-Directory /lx-office-erp/spool{
- DocumentRoot /var/lib/lx-office-erp/spool
-}
+++ /dev/null
-Extension pl {
- Handler cgi
-}
NR="0"
#hier wurde das Git-Paket entpakt:
-SRC=/tmp/deb_test/unstable
+SRC=/tmp/lx-office-erp
#hier wird das Debian-Paket gebaut:
-DST=/tmp/deb_test/package
+DST=/tmp/package
################################################
VER=`cat VERSION`
DEST=$DST/lx-office-erp_$VER-$NR-all
-FILES='
-usr/lib/lx-office-erp/
-usr/share/lx-office-erp/
-usr/share/doc/lx-office-erp/
-var/lib/lx-office-erp/spool/
-var/lib/lx-office-erp/users/
-var/lib/lx-office-erp/css/
-var/lib/lx-office-erp/xslt/
-var/lib/lx-office-erp/templates/
-var/lib/lx-office-erp/webdav/lieferantenbestellungen/
-var/lib/lx-office-erp/webdav/anfragen/
-var/lib/lx-office-erp/webdav/gutschriften/
-var/lib/lx-office-erp/webdav/einkaufsrechnungen/
-var/lib/lx-office-erp/webdav/rechnungen/
-var/lib/lx-office-erp/webdav/bestellungen/
-var/lib/lx-office-erp/webdav/angebote/
-usr/lib/lx-office-erp/
-usr/share/lx-office-erp/
-usr/share/doc/lx-office-erp/
-usr/share/man/man1/:lx-office-erp.1.gz
-etc/lx-office-erp/:lx-office-erp.cherokee.handler
-etc/lx-office-erp/:lx-office-erp.apache2.conf
-etc/lx-office-erp/:lx-office-erp.cherokee
-usr/bin/:lx-office-erp
-'
-
-for filespec in $FILES; do
- set - `echo $filespec | sed -e 's/:/ /g'`
- dir=$1
- file=$2
- mkdir -p $SRC/DEBIAN/$dir
- if [ -f $SRC/DEBIAN/files/$file ]; then
- cp $SRC/DEBIAN/files/$file $SRC/DEBIAN/$dir/$file
- else
- echo '1' > $SRC/DEBIAN/$dir/.dummy
- fi
-done
-
-SYMLINKS='
-css:/var/lib/lx-office-erp/css
-doc:/usr/share/doc/lx-office-erp/
-image:/usr/share/lx-office-erp
-spool:/var/lib/lx-office-erp/spool
-templates:/var/lib/lx-office-erp/templates
-users:/var/lib/lx-office-erp/users/
-webdav:/var/lib/lx-office-erp/webdav
-xslt:/var/lib/lx-office-erp/xslt
-'
-
-for symspec in $SYMLINKS; do
- set - `echo $symspec | sed -e 's/:/ /g'`
- src=$1
- tar=$2
-
- ln -s $tar $SRC/DEBIAN/usr/lib/lx-office-erp/$src
-done
-#fertig
mkdir -p $DEST
cd $DEST
#Struktur anlegen:
-cp -a $SRC/DEBIAN/* .
-rm ./mk*.sh
+cp -a $SRC/DEBIAN/DEBIAN .
+tar xzf $SRC/DEBIAN/struktur.tgz
#Dateien kopieren:
#aber keine fertigen Konfigurationen, nur *.default
cp -a $SRC/*.pl usr/lib/lx-office-erp
cp $SRC/VERSION usr/lib/lx-office-erp
cp $SRC/index.html usr/lib/lx-office-erp
-cp $SRC/config/lx-erp.conf etc/lx-office-erp/lx-erp.conf.default
+cp $SRC/config/lx_office.conf.default etc/lx-office-erp/lx_office.conf.default
cp $SRC/config/authentication.pl.default etc/lx-office-erp/
cp $SRC/menu.ini usr/lib/lx-office-erp/menu.default
cp -a $SRC/css var/lib/lx-office-erp
sub save_preferences {
$main::lxdebug->enter_sub();
- my ($self, $myconfig, $form, $webdav) = @_;
+ my ($self, $myconfig, $form) = @_;
my $dbh = $form->get_standard_dbh($myconfig);
$myconfig->{$item} = $form->{$item};
}
- $myconfig->save_member($main::memberfile);
+ $myconfig->save_member;
my $auth = $main::auth;
- if ($auth->can_change_password()
- && defined $form->{new_password}
- && ($form->{new_password} ne '********')) {
- $auth->change_password($form->{login}, $form->{new_password});
-
- $form->{password} = $form->{new_password};
- $auth->set_session_value('password', $form->{password});
- $auth->create_or_refresh_session();
- }
-
$main::lxdebug->leave_sub();
return $rc;
sub delete_transaction {
$main::lxdebug->enter_sub();
- my ($self, $myconfig, $form, $spool) = @_;
+ my ($self, $myconfig, $form) = @_;
# connect to database
my $dbh = $form->dbconnect_noauto($myconfig);
$main::lxdebug->message(LXDebug->DEBUG1(), "Auth::create_database DSN: $dsn");
- my $charset = $main::dbcharset;
+ my $charset = $::lx_office_conf{system}->{dbcharset};
$charset ||= Common::DEFAULT_CHARSET;
my $encoding = $Common::charset_to_db_encoding{$charset};
$encoding ||= 'UNICODE';
my $self = shift;
my $dbh = $self->dbconnect();
- my $charset = $main::dbcharset;
+ my $charset = $::lx_office_conf{system}->{dbcharset};
$charset ||= Common::DEFAULT_CHARSET;
$dbh->rollback();
__END__
+=encoding utf8
+
=head1 NAME
SL::Auth::Constants - COnstants for Auth module
This module provides status constants for authentication handling
-=head1 FUNCTIONS
-
=head1 BUGS
+none yet.
+
=head1 AUTHOR
+Sven Schöling E<lt>s.schoeling@linet-services.deE<gt>
+
=cut
--- /dev/null
+package SL::Auth::PasswordPolicy;
+
+use strict;
+
+use parent qw(Rose::Object);
+
+use constant OK => 0;
+use constant TOO_SHORT => 1;
+use constant TOO_LONG => 2;
+use constant MISSING_LOWERCASE => 4;
+use constant MISSING_UPPERCASE => 8;
+use constant MISSING_DIGIT => 16;
+use constant MISSING_SPECIAL_CHAR => 32;
+use constant INVALID_CHAR => 64;
+use constant WEAK => 128;
+
+use Rose::Object::MakeMethods::Generic
+(
+ 'scalar --get_set_init' => 'config',
+);
+
+sub verify {
+ my ($self, $password, $is_admin) = @_;
+
+ my $cfg = $self->config;
+ return OK() unless $cfg && %{ $cfg };
+ return OK() if $is_admin && $cfg->{disable_policy_for_admin};
+
+ my $result = OK();
+ $result |= TOO_SHORT() if $cfg->{min_length} && (length($password) < $cfg->{min_length});
+ $result |= TOO_LONG() if $cfg->{max_length} && (length($password) > $cfg->{max_length});
+ $result |= MISSING_LOWERCASE() if $cfg->{require_lowercase} && $password !~ m/[a-z]/;
+ $result |= MISSING_UPPERCASE() if $cfg->{require_uppercase} && $password !~ m/[A-Z]/;
+ $result |= MISSING_DIGIT() if $cfg->{require_digit} && $password !~ m/[0-9]/;
+ $result |= MISSING_SPECIAL_CHAR() if $cfg->{require_special_character} && $password !~ $cfg->{special_characters_re};
+ $result |= INVALID_CHAR() if $cfg->{invalid_characters_re} && $password =~ $cfg->{invalid_characters_re};
+
+ if ($cfg->{use_cracklib}) {
+ require Crypt::Cracklib;
+ $result |= WEAK() if !Crypt::Cracklib::check($password);
+ }
+
+ return $result;
+}
+
+sub errors {
+ my ($self, $result) = @_;
+
+ my @errors;
+
+ push @errors, $::locale->text('The password is too short (minimum length: #1).', $self->config->{min_length}) if $result & TOO_SHORT();
+ push @errors, $::locale->text('The password is too long (maximum length: #1).', $self->config->{max_length}) if $result & TOO_LONG();
+ push @errors, $::locale->text('A lower-case character is required.') if $result & MISSING_LOWERCASE();
+ push @errors, $::locale->text('An upper-case character is required.') if $result & MISSING_UPPERCASE();
+ push @errors, $::locale->text('A digit is required.') if $result & MISSING_DIGIT();
+ push @errors, $::locale->text('The password is weak (e.g. it can be found in a dictionary).') if $result & WEAK();
+
+ if ($result & MISSING_SPECIAL_CHAR()) {
+ my $char_list = join ' ', sort split(m//, $self->config->{special_characters});
+ push @errors, $::locale->text('A special character is required (valid characters: #1).', $char_list);
+ }
+
+ if (($result & INVALID_CHAR())) {
+ my $char_list = join ' ', sort split(m//, $self->config->{ $self->config->{invalid_characters} ? 'invalid_characters' : 'valid_characters' });
+ push @errors, $::locale->text('An invalid character was used (invalid characters: #1).', $char_list) if $self->config->{invalid_characters};
+ push @errors, $::locale->text('An invalid character was used (valid characters: #1).', $char_list) if $self->config->{valid_characters};
+ }
+
+ return @errors;
+}
+
+
+sub init_config {
+ my ($self) = @_;
+
+ my %cfg = %{ $::emmvee_conf{password_policy} || {} };
+
+ $cfg{valid_characters} =~ s/[ \n\r]//g if $cfg{valid_characters};
+ $cfg{invalid_characters} =~ s/[ \n\r]//g if $cfg{invalid_characters};
+ $cfg{invalid_characters_re} = '[^' . quotemeta($cfg{valid_characters}) . ']' if $cfg{valid_characters};
+ $cfg{invalid_characters_re} = '[' . quotemeta($cfg{invalid_characters}) . ']' if $cfg{invalid_characters};
+ $cfg{special_characters} = '!@#$%^&*()_+=[]{}<>\'"|\\,;.:?-';
+ $cfg{special_characters_re} = '[' . quotemeta($cfg{special_characters}) . ']';
+
+ map { $cfg{"require_${_}"} = $cfg{"require_${_}"} =~ m/^(?:1|true|t|yes|y)$/i } qw(lowercase uppercase digit special_char);
+
+ $self->config(\%cfg);
+}
+
+1;
+__END__
+
+=pod
+
+=encoding utf8
+
+=head1 NAME
+
+SL::Auth::PasswordPolicy - Verify a given password against the policy
+set in the configuration file
+
+=head1 SYNOPSIS
+
+ my $verifier = SL::Auth::PasswordPolicy->new;
+ my $result = $verifier->verify($password);
+ if ($result != SL::Auth::PasswordPolicy->OK()) {
+ print "Errors: " . join(' ', $verifier->errors($result)) . "\n";
+ }
+
+=head1 CONSTANTS
+
+=over 4
+
+=item C<OK>
+
+Password is OK.
+
+=item C<TOO_SHORT>
+
+The password is too short.
+
+=item C<TOO_LONG>
+
+The password is too long.
+
+=item C<MISSING_LOWERCASE>
+
+The password is missing a lower-case character.
+
+=item C<MISSING_UPPERCASE>
+
+The password is missing an upper-case character.
+
+=item C<MISSING_DIGIT>
+
+The password is missing a digit.
+
+=item C<MISSING_SPECIAL_CHAR>
+
+The password is missing a special character. Special characters are
+the following: ! " # $ % & ' ( ) * + , - . : ; E<lt> = E<gt> ? @ [ \ ]
+^ _ { | }
+
+=item C<INVALID_CHAR>
+
+The password contains an invalid character.
+
+=back
+
+=head1 FUNCTIONS
+
+=over 4
+
+=item C<verify $password, $is_admin>
+
+Checks whether or not the password matches the policy. Returns C<OK()>
+if it does and an error code otherwise (binary or'ed of the error
+constants).
+
+If C<$is_admin> is trueish and the configuration specifies that the
+policy checks are disabled for the administrator then C<verify> will
+always return C<OK()>.
+
+=item C<errors $code>
+
+Returns an array of human-readable strings describing the issues set
+in C<$code> which should be the result of L</verify>.
+
+=back
+
+=head1 BUGS
+
+Nothing here yet.
+
+=head1 AUTHOR
+
+Moritz Bunkus E<lt>m.bunkus@linet-services.deE<gt>
+
+=cut
sub delete_spool {
$main::lxdebug->enter_sub();
- my ($self, $myconfig, $form, $spool) = @_;
+ my ($self, $myconfig, $form) = @_;
+
+ my $spool = $::lx_office_conf{paths}->{spool};
# connect to database, turn AutoCommit off
my $dbh = $form->dbconnect_noauto($myconfig);
sub print_spool {
$main::lxdebug->enter_sub();
- my ($self, $myconfig, $form, $spool, $output) = @_;
+ my ($self, $myconfig, $form, $output) = @_;
+
+ my $spool = $::lx_office_conf{paths}->{spool};
# connect to database
my $dbh = $form->dbconnect($myconfig);
sub _send_email {
my ($posted_invoices, $printed_invoices) = @_;
- read_config 'config/lx_office.conf' => my %config;
+ my %config = %::lx_office_conf;
return if !$config{periodic_invoices} || !$config{periodic_invoices}->{send_email_to} || !scalar @{ $posted_invoices };
$form->throw_on_error(sub {
eval {
- $form->parse_template(\%::myconfig, $::userspath);
+ $form->parse_template(\%::myconfig);
1;
} || die $EVAL_ERROR->{error};
});
delete $form->{OUT};
- $form->parse_template($myconfig, $main::userspath);
+ $form->parse_template($myconfig);
$main::lxdebug->leave_sub();
}
do_statement($form, $sth, $query, @values);
- my $valid_index = "$params{name_prefix}cvar_$config->{name}$params{name_postfix}_valid";
- $self->save_custom_variables_validity(trans_id => $params{trans_id}, config_id => $config->{id},
- validity => ($params{variables}{$valid_index} || $params{always_valid} ? 1 : 0)
- );
+ if ($params{save_validity}) {
+ my $valid_index = "$params{name_prefix}cvar_$config->{name}$params{name_postfix}_valid";
+ $self->save_custom_variables_validity(trans_id => $params{trans_id},
+ config_id => $config->{id},
+ validity => ($params{variables}{$valid_index} || $params{always_valid} ? 1 : 0)
+ );
+ }
}
$sth->finish();
my ($form) = @_;
return $main::lxdebug->leave_sub()
- unless ($main::webdav && $form->{id});
+ unless ($::lx_office_conf{system}->{webdav} && $form->{id});
my ($path, $number);
my $content_type = $options->{type} eq 'js' ? 'text/javascript' : 'text/html';
print $::form->create_http_response(content_type => $content_type,
- charset => $::dbcharset || Common::DEFAULT_CHARSET());
+ charset => $::lx_office_conf{system}->{dbcharset} || Common::DEFAULT_CHARSET());
} else {
$::form->{title} = $locals{title} if $locals{title};
AUTH => $::auth,
FORM => $::form,
LOCALE => $::locale,
- LXCONFIG => { dbcharset => $::dbcharset,
- webdav => $::webdav,
- lizenzen => $::lizenzen,
- latex_templates => $::latex,
- opendocument_templates => $::opendocument_templates,
- vertreter => $::vertreter,
- show_best_before => $::show_best_before,
- },
+ LXCONFIG => \%::lx_office_conf,
LXDEBUG => $::lxdebug,
MYCONFIG => \%::myconfig,
SELF => $self,
PLUGIN_BASE => 'SL::Template::Plugin',
INCLUDE_PATH => '.:templates/webpages',
COMPILE_EXT => '.tcc',
- COMPILE_DIR => $::userspath . '/templates-cache',
+ COMPILE_DIR => $::lx_office_conf{paths}->{userspath} . '/templates-cache',
}) || croak;
return $self->{__basepriv_template_obj};
=item * C<LOCALE> -- C<$::locale>
-=item * C<LXCONFIG> -- all parameters from C<config/lx-erp.conf> with
-the same name they appear in the file (e.g. C<dbcharset>, C<webdav>
-etc)
+=item * C<LXCONFIG> -- all parameters from C<config/lx_office.conf>
+with the same name they appear in the file (first level is the
+section, second the actual variable, e.g. C<system.dbcharset>,
+C<features.webdav> etc)
=item * C<LXDEBUG> -- C<$::lxdebug>
my $path;
if ($token =~ m|^(\d+)-(\d+)-(\d+)$|) {
- $path = "${main::userspath}/datev-export-${1}-${2}-${3}";
+ $path = $::lx_office_conf{paths}->{userspath} . "/datev-export-${1}-${2}-${3}";
}
$main::lxdebug->leave_sub();
sub clean_temporary_directories {
$main::lxdebug->enter_sub();
- foreach my $path (glob "${main::userspath}/datev-export-*") {
+ foreach my $path (glob($::lx_office_conf{paths}->{userspath} . "/datev-export-*")) {
next unless (-d $path);
my $mtime = (stat($path))[9];
sub get_first {
shift->get_all(
+ @_,
limit => 1,
)->[0];
}
sub _calculate_assembly_item {
my ($self, $data, $part, $total_qty, $base_factor) = @_;
- return 0 if $::eur || !$data->{is_invoice};
+ return 0 if $::lx_office_conf{system}->{eur} || !$data->{is_invoice};
foreach my $assembly_entry (@{ $part->assemblies }) {
push @{ $data->{assembly_items}->[-1] }, { part => $assembly_entry->part,
_dbg("cpsi tq " . $total_qty);
- return 0 if $::eur || !$data->{is_invoice} || !$total_qty;
+ return 0 if $::lx_office_conf{system}->{eur} || !$data->{is_invoice} || !$total_qty;
my ($entry);
$base_factor ||= 1;
=item 6. Items in C<invoice> are updated according to their allocation
status (regarding for costs of goold sold). Will only be done if
Lx-Office is not configured to use Einnahmenüberschussrechnungen
-(C<$::eur>).
+(see config/lx_office.conf, section "system", variable "eur").
=item 7. The invoice and its items are saved.
use strict;
-use Readonly;
use Rose::DB::Object;
use List::MoreUtils qw(any);
return $class->meta->convention_manager->auto_manager_class_name($class);
}
-Readonly my %text_column_types => (text => 1, char => 1, varchar => 1);
+my %text_column_types = (text => 1, char => 1, varchar => 1);
sub assign_attributes {
my $self = shift;
package SL::DB::Shipto;
use strict;
-use Readonly;
use SL::DB::MetaSetup::Shipto;
-Readonly our @SHIPTO_VARIABLES => qw(shiptoname shiptostreet shiptozipcode shiptocity shiptocountry shiptocontact
- shiptophone shiptofax shiptoemail shiptodepartment_1 shiptodepartment_2);
+our @SHIPTO_VARIABLES = qw(shiptoname shiptostreet shiptozipcode shiptocity shiptocountry shiptocontact
+ shiptophone shiptofax shiptoemail shiptodepartment_1 shiptodepartment_2);
__PACKAGE__->meta->make_manager_class;
return 0 if !@unapplied_scripts;
- my $db_charset = $main::dbcharset || Common::DEFAULT_CHARSET;
+ my $db_charset = $::lx_office_conf{system}->{dbcharset} || Common::DEFAULT_CHARSET;
$self->{form}->{login} ||= 'admin';
map { $_->{description} = SL::Iconv::convert($_->{charset}, $db_charset, $_->{description}) } values %{ $self->{all_controls} };
sub save_dunning {
$main::lxdebug->enter_sub();
- my ($self, $myconfig, $form, $rows, $userspath, $spool) = @_;
+ my ($self, $myconfig, $form, $rows) = @_;
# connect to database
my $dbh = $form->dbconnect_noauto($myconfig);
$copies *= 1;
$copies = 1 unless $copies;
- my $inputfiles = join " ", map { "${main::spool}/$_ " x $copies } @{ $form->{DUNNING_PDFS} };
+ my $spool = $::lx_office_conf{paths}->{spool};
+ my $inputfiles = join " ", map { "$spool/$_ " x $copies } @{ $form->{DUNNING_PDFS} };
my $dunning_id = $form->{dunning_id};
$dunning_id =~ s|[^\d]||g;
- my $in = IO::File->new("gs -dBATCH -dNOPAUSE -q -sDEVICE=pdfwrite -sOutputFile=- $inputfiles |");
+ my $in = IO::File->new($::lx_office_conf{applications}->{ghostscript} . " -dBATCH -dNOPAUSE -q -sDEVICE=pdfwrite -sOutputFile=- $inputfiles |");
$form->error($main::locale->text('Could not spawn ghostscript.')) unless $in;
if ($form->{media} eq 'printer') {
$in->close();
- map { unlink("${main::spool}/$_") } @{ $form->{DUNNING_PDFS} };
+ map { unlink("$spool/$_") } @{ $form->{DUNNING_PDFS} };
$main::lxdebug->leave_sub();
}
$self->set_template_options($myconfig, $form);
my $filename = "dunning_${dunning_id}_" . Common::unique_id() . ".pdf";
- $form->{OUT} = ">${main::spool}/$filename";
+ my $spool = $::lx_office_conf{paths}->{spool};
+ $form->{OUT} = ">${spool}/$filename";
$form->{keep_tmpfile} = 1;
delete $form->{tmpfile};
push @{ $form->{DUNNING_PDFS} }, $filename;
- push @{ $form->{DUNNING_PDFS_EMAIL} }, { 'filename' => "${main::spool}/$filename",
+ push @{ $form->{DUNNING_PDFS_EMAIL} }, { 'filename' => "${spool}/$filename",
'name' => "dunning_${dunning_id}.pdf" };
- $form->parse_template($myconfig, $main::userspath);
+ $form->parse_template($myconfig);
$dbh->disconnect() unless $provided_dbh;
my $filename = Common::unique_id() . "dunning_invoice_${dunning_id}.pdf";
- $form->{OUT} = ">$main::spool/$filename";
+ my $spool = $::lx_office_conf{paths}->{spool};
+ $form->{OUT} = ">$spool/$filename";
$form->{keep_tmpfile} = 1;
delete $form->{tmpfile};
map { delete $form->{$_} } grep /^[a-z_]+_\d+$/, keys %{ $form };
- $form->parse_template($myconfig, $main::userspath);
+ $form->parse_template($myconfig);
restore_form($saved_form);
push @{ $form->{DUNNING_PDFS} }, $filename;
- push @{ $form->{DUNNING_PDFS_EMAIL} }, { 'filename' => "${main::spool}/$filename",
+ push @{ $form->{DUNNING_PDFS_EMAIL} }, { 'filename' => "${spool}/$filename",
'name' => "dunning_invoice_${dunning_id}.pdf" };
$dbh->disconnect() unless $provided_dbh;
$form->{saved_donumber} = $form->{donumber};
- Common::webdav_folder($form) if ($main::webdav);
+ Common::webdav_folder($form);
$main::lxdebug->leave_sub();
my $myconfig = \%main::myconfig;
my $form = $main::form;
- my $spool = $main::spool;
+ my $spool = $::lx_office_conf{paths}->{spool};
# connect to database
my $dbh = $form->get_standard_dbh($myconfig);
$sth->finish();
}
- Common::webdav_folder($form) if ($main::webdav);
+ Common::webdav_folder($form);
$main::lxdebug->leave_sub();
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.
- push @INC, "SL"; # FCGI won't find modules that are not properly named. Help it by inclduging SL
}
use CGI qw( -no_xhtml);
use English qw(-no_match_vars);
use SL::Auth;
use SL::LXDebug;
+use SL::LxOfficeConf;
use SL::Locale;
use SL::Common;
+use SL::Form;
use SL::Helper::DateTime;
-use Form;
use List::Util qw(first);
use File::Basename;
my $template = shift;
my $error_type = shift || '';
- $::locale = Locale->new($::language);
+ $::locale = Locale->new($::lx_office_conf{system}->{language});
$::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} = $::lx_office_conf{system}->{language};
$::form->{stylesheet} = 'css/lx-office-erp.css';
$::form->header;
}
sub pre_startup_setup {
- eval {
- package main;
- require "config/lx-erp.conf";
- };
- eval {
- package main;
- require "config/lx-erp-local.conf";
- } if -f "config/lx-erp-local.conf";
+ SL::LxOfficeConf->read;
+ _init_environment();
eval {
package main;
# canonial globals. if it's not here, chances are it will get refactored someday.
{
no warnings 'once';
- $::userspath = "users";
- $::templates = "templates";
- $::memberfile = "users/members";
- $::menufile = "menu.ini";
- $::sendmail = "| /usr/sbin/sendmail -t";
$::lxdebug = LXDebug->new;
$::auth = SL::Auth->new;
$::form = undef;
%::myconfig = ();
%::called_subs = (); # currently used for recursion detection
-
- read_config 'config/lx_office.conf' => %::lx_office_conf if -f "config/lx_office.conf";
- _decode_recursively(\%::lx_office_conf);
}
$SIG{__WARN__} = sub {
$self->unrequire_bin_mozilla;
$::cgi = CGI->new('');
- $::locale = Locale->new($::language);
+ $::locale = Locale->new($::lx_office_conf{system}->{language});
$::form = Form->new;
%::called_subs = ();
my $session_result = $::auth->restore_session;
$::auth->create_or_refresh_session;
- $::form->error($::locale->text('System currently down for maintenance!')) if -e "$::userspath/nologin" && $script ne 'admin';
+ $::form->error($::locale->text('System currently down for maintenance!')) if -e ($::lx_office_conf{paths}->{userspath} . "/nologin") && $script ne 'admin';
if ($script eq 'login' or $script eq 'admin' or $script eq 'kopf') {
$::form->{titlebar} = "Lx-Office " . $::locale->text('Version') . " $::form->{version}";
return $self->{interface} =~ m/f(?:ast)cgi/i ? $self->{request}->GetHandles() : (\*STDIN, \*STDOUT, \*STDERR);
}
-sub _decode_recursively {
- my ($obj) = @_;
+sub _init_environment {
+ my %key_map = ( lib => { name => 'PERL5LIB', append_path => 1 },
+ path => { name => 'PATH', append_path => 1 },
+ );
+ my $cfg = $::lx_office_conf{environment} || {};
- while (my ($key, $value) = each %{ $obj }) {
- if (ref($value) eq 'HASH') {
- _decode_recursively($value);
- } else {
- $obj->{$key} = decode('UTF-8', $value);
+ while (my ($key, $value) = each %{ $cfg }) {
+ next unless $value;
+
+ my $info = $key_map{$key} || {};
+ $key = $info->{name} || $key;
+
+ if ($info->{append_path}) {
+ $value = ':' . $value unless $value =~ m/^:/ || !$ENV{$key};
+ $value = $ENV{$key} . $value;
}
+
+ $ENV{$key} = $value;
}
}
sub fix_print_and_internal_encoding_after_0_68 {
return if version->new("$FCGI::VERSION")->numify <= version->new("0.68")->numify;
- return if lc($::dbcharset) !~ m/^(?:utf-?8|unicode)$/;
+ return if lc($::lx_office_conf{system}->{dbcharset}) !~ m/^(?:utf-?8|unicode)$/;
my $encoder = Encode::find_encoding('UTF-8');
my $original_fcgi_print = \&FCGI::Stream::PRINT;
$self->_request_to_hash($content);
}
- my $db_charset = $main::dbcharset;
+ my $db_charset = $::lx_office_conf{system}->{dbcharset};
$db_charset ||= Common::DEFAULT_CHARSET;
my $encoding = $self->{INPUT_ENCODING} || $db_charset;
# extra code is currently only used by menuv3 and menuv4 to set their css.
# it is strongly deprecated, and will be changed in a future version.
my ($self, $extra_code) = @_;
- my $db_charset = $::dbcharset || Common::DEFAULT_CHARSET;
+ my $db_charset = $::lx_office_conf{system}->{dbcharset} || Common::DEFAULT_CHARSET;
my @header;
$::lxdebug->leave_sub and return if !$ENV{HTTP_USER_AGENT} || $self->{header}++;
my ($self) = @_;
- my $db_charset = $main::dbcharset ? $main::dbcharset : Common::DEFAULT_CHARSET;
+ my $db_charset = $::lx_office_conf{system}->{dbcharset} || Common::DEFAULT_CHARSET;
my $cgi = $main::cgi || CGI->new('');
my $output = $cgi->header('-charset' => $db_charset);
my $language;
if (!%::myconfig || !$::myconfig{"countrycode"}) {
- $language = $main::language;
+ $language = $::lx_office_conf{system}->{language};
} else {
$language = $main::myconfig{"countrycode"};
}
map { $additional_params->{"myconfig_${_}"} = $main::myconfig{$_}; } keys %::myconfig;
}
- $additional_params->{"conf_dbcharset"} = $::dbcharset;
- $additional_params->{"conf_webdav"} = $::webdav;
- $additional_params->{"conf_lizenzen"} = $::lizenzen;
- $additional_params->{"conf_latex_templates"} = $::latex;
- $additional_params->{"conf_opendocument_templates"} = $::opendocument_templates;
- $additional_params->{"conf_vertreter"} = $::vertreter;
- $additional_params->{"conf_show_best_before"} = $::show_best_before;
- $additional_params->{"conf_parts_image_css"} = $::parts_image_css;
- $additional_params->{"conf_parts_listing_images"} = $::parts_listing_images;
- $additional_params->{"conf_parts_show_image"} = $::parts_show_image;
+ $additional_params->{"conf_dbcharset"} = $::lx_office_conf{system}->{dbcharset};
+ $additional_params->{"conf_webdav"} = $::lx_office_conf{system}->{webdav};
+ $additional_params->{"conf_lizenzen"} = $::lx_office_conf{system}->{lizenzen};
+ $additional_params->{"conf_latex_templates"} = $::lx_office_conf{print_templates}->{latex};
+ $additional_params->{"conf_opendocument_templates"} = $::lx_office_conf{print_templates}->{opendocument};
+ $additional_params->{"conf_vertreter"} = $::lx_office_conf{system}->{vertreter};
+ $additional_params->{"conf_show_best_before"} = $::lx_office_conf{system}->{show_best_before};
+ $additional_params->{"conf_parts_image_css"} = $::lx_office_conf{features}->{parts_image_css};
+ $additional_params->{"conf_parts_listing_images"} = $::lx_office_conf{features}->{parts_listing_images};
+ $additional_params->{"conf_parts_show_image"} = $::lx_office_conf{features}->{parts_show_image};
if (%main::debug_options) {
map { $additional_params->{'DEBUG_' . uc($_)} = $main::debug_options{$_} } keys %main::debug_options;
'PLUGIN_BASE' => 'SL::Template::Plugin',
'INCLUDE_PATH' => '.:templates/webpages',
'COMPILE_EXT' => '.tcc',
- 'COMPILE_DIR' => $::userspath . '/templates-cache',
+ 'COMPILE_DIR' => $::lx_office_conf{paths}->{userspath} . '/templates-cache',
})) || die;
}
sub parse_template {
$main::lxdebug->enter_sub();
- my ($self, $myconfig, $userspath) = @_;
+ my ($self, $myconfig) = @_;
my $out;
local (*IN, *OUT);
+ my $userspath = $::lx_office_conf{paths}->{userspath};
+
$self->{"cwd"} = getcwd();
$self->{"tmpdir"} = $self->{cwd} . "/${userspath}";
map { $mail->{$_} = $self->{$_} }
qw(cc bcc subject message version format);
- $mail->{charset} = $main::dbcharset ? $main::dbcharset : Common::DEFAULT_CHARSET;
+ $mail->{charset} = $::lx_office_conf{system}->{dbcharset} || Common::DEFAULT_CHARSET;
$mail->{to} = $self->{EMAIL_RECIPIENT} ? $self->{EMAIL_RECIPIENT} : $self->{email};
$mail->{from} = qq|"$myconfig->{name}" <$myconfig->{email}>|;
$mail->{fileid} = "$fileid.";
my $numbytes = (-s $self->{tmpfile});
open(IN, $self->{tmpfile})
or $self->error($self->cleanup . "$self->{tmpfile} : $!");
+ binmode IN;
$self->{copies} = 1 unless $self->{media} eq 'printer';
close(FH);
}
- if ($self->{tmpfile} && ! $::keep_temp_files) {
+ if ($self->{tmpfile} && !($::lx_office_conf{debug} && $::lx_office_conf{debug}->{keep_temp_files})) {
$self->{tmpfile} =~ s|.*/||g;
# strip extension
$self->{tmpfile} =~ s/\.\w+$//g;
package DateTime;
+use strict;
+
sub now_local {
return shift->now(time_zone => $::locale->get_local_time_zone);
}
}
}
- CVar->save_custom_variables('dbh' => $dbh,
- 'module' => 'IC',
- 'trans_id' => $form->{id},
- 'variables' => $form);
+ CVar->save_custom_variables(dbh => $dbh,
+ module => 'IC',
+ trans_id => $form->{id},
+ variables => $form,
+ save_validity => 1);
# commit
my $rc = $dbh->commit;
$form->{"qty_$i"} = $form->parse_amount($myconfig, $form->{"qty_$i"});
$form->{"qty_$i"} *= -1 if $form->{storno};
- $form->{"inventory_accno_$i"} = $form->{"expense_accno_$i"} if $main::eur;
+ $form->{"inventory_accno_$i"} = $form->{"expense_accno_$i"} if $::lx_office_conf{system}->{eur};
# get item baseunit
if (!$item_units{$form->{"id_$i"}}) {
# delete zero entries
do_query($form, $dbh, qq|DELETE FROM acc_trans WHERE amount = 0|);
- Common::webdav_folder($form) if ($main::webdav);
+ Common::webdav_folder($form);
# Link this record to the records it was created from.
RecordLinks->create_links('dbh' => $dbh,
}
$sth->finish();
- Common::webdav_folder($form) if ($main::webdav);
+ Common::webdav_folder($form);
$dbh->disconnect();
# save printed, emailed and queued
$form->save_status($dbh);
- Common::webdav_folder($form) if ($main::webdav);
+ Common::webdav_folder($form);
# Link this record to the records it was created from.
RecordLinks->create_links('dbh' => $dbh,
# sellprice is the cost of the item
my $linetotal = $form->round_amount(($ref->{sellprice} * $qty) / ( ($ref->{price_factor} || 1) * ( $basefactor || 1 )), 2);
- if (!$main::eur) {
+ if (!$::lx_office_conf{system}->{eur}) {
$ref->{expense_accno} = ($form->{"expense_accno_$row"}) ? $form->{"expense_accno_$row"} : $ref->{expense_accno};
# add to expense
$form->{amount_cogs}{ $form->{id} }{ $ref->{expense_accno} } += -$linetotal;
sub delete_invoice {
$main::lxdebug->enter_sub();
- my ($self, $myconfig, $form, $spool) = @_;
+ my ($self, $myconfig, $form) = @_;
# connect to database
my $dbh = $form->dbconnect_noauto($myconfig);
$dbh->disconnect;
if ($rc) {
+ my $spool = $::lx_office_conf{paths}->{spool};
map { unlink "$spool/$_" if -f "$spool/$_"; } @spoolfiles;
}
}
$sth->finish;
- Common::webdav_folder($form) if ($main::webdav);
+ Common::webdav_folder($form);
}
my $rc = $dbh->commit;
my ($price, $selectedpricegroup_id) = split(/--/, $form->{"sellprice_pg_$i"});
my $pricegroup_old = $form->{"pricegroup_old_$i"};
+
+ # sellprice has format 13,0000 or 0,00000, can't check for 0 numerically
+ my $sellprice = $form->{"sellprice_$i"};
+ my $pricegroup_id = $form->{"pricegroup_id_$i"};
$form->{"new_pricegroup_$i"} = $selectedpricegroup_id;
$form->{"old_pricegroup_$i"} = $pricegroup_old;
$pkr->{price} = $form->format_amount($myconfig, $pkr->{price}, 5);
if ($selectedpricegroup_id eq undef) {
- if ($pkr->{pricegroup_id} eq $form->{customer_klass}) {
+ # new entries in article list, either old invoice was loaded (edit) or a new article was added
+ # Case A: open old invoice, no pricegroup selected
+ # Case B: add new article to invoice, no pricegroup selected
+ # to distinguish case A and B the variable pricegroup_id_$i is used
+ # for new articles this variable isn't defined, for loaded articles it is
+ # sellprice can't be used, as it already has 0,00 set
+
+ if ($pkr->{pricegroup_id} eq $form->{"pricegroup_id_$i"} and defined $form->{"pricegroup_id_$i"}) {
+ # Case A
$pkr->{selected} = ' selected';
+ } elsif ($pkr->{pricegroup_id} eq $form->{customer_klass}
+ and not defined $form->{"pricegroup_id_$i"}
+ and $pkr->{price} != 0 # only use customer pricegroup price if it has a value, else use default_sellprice
+ # for the case where pricegroup prices haven't been set
+ ) {
+ # Case B: use default pricegroup of customer
+
+ $pkr->{selected} = ' selected'; # unless $form->{selected};
+
# no customer pricesgroup set
if ($pkr->{price} == $pkr->{default_sellprice}) {
} else {
# this sub should not set anything and only return. --sschoeling, 20090506
-# $form->{"sellprice_$i"} = $pkr->{price};
+# is this correct? put in again... -- grichardson 20110119
+ $form->{"sellprice_$i"} = $pkr->{price};
}
- } elsif ($pkr->{price} == $pkr->{default_sellprice}) {
+ } elsif ($pkr->{price} == $pkr->{default_sellprice} and $pkr->{default_sellprice} != 0) {
$pkr->{price} = $form->{"sellprice_$i"};
$pkr->{selected} = ' selected';
}
- } else {
+ }
+
+ # existing article: pricegroup or price changed
+ if ($selectedpricegroup_id or $selectedpricegroup_id == 0) {
if ($selectedpricegroup_id ne $pricegroup_old) {
+ # pricegroup has changed
if ($pkr->{pricegroup_id} eq $selectedpricegroup_id) {
$pkr->{selected} = ' selected';
}
- } elsif ( ( $form->parse_amount($myconfig, $price_new)
- != $form->parse_amount($myconfig, $form->{"sellprice_$i"}))
- and ($price_new ne 0)) {
+ } elsif ( ($form->parse_amount($myconfig, $price_new)
+ != $form->parse_amount($myconfig, $form->{"sellprice_$i"}))
+ and ($price_new ne 0) and defined $price_new) {
+ # sellprice has changed
+ # when loading existing invoices $price_new is NULL
if ($pkr->{pricegroup_id} == 0) {
$pkr->{price} = $form->{"sellprice_$i"};
$pkr->{selected} = ' selected';
}
} elsif ($pkr->{pricegroup_id} eq $selectedpricegroup_id) {
+ # neither sellprice nor pricegroup changed
$pkr->{selected} = ' selected';
- if ( ($pkr->{pricegroup_id} == 0)
- and ($pkr->{price} == $form->{"sellprice_$i"})) {
+ if ( ($pkr->{pricegroup_id} == 0) and ($pkr->{price} == $form->{"sellprice_$i"})) {
# $pkr->{price} = $form->{"sellprice_$i"};
} else {
$pkr->{price} = $form->{"sellprice_$i"};
BEGIN {
@required_modules = (
- { name => "parent", url => "http://search.cpan.org/~corion/" },
- { name => "Archive::Zip", version => '1.16', url => "http://search.cpan.org/~adamk/" },
- { name => "Class::Accessor", version => '0.30', url => "http://search.cpan.org/~kasei/" },
- { name => "CGI::Ajax", version => '0.697', url => "http://search.cpan.org/~bct/" },
- { name => "DateTime", url => "http://search.cpan.org/~drolsky/" },
- { name => "DBI", version => '1.50', url => "http://search.cpan.org/~timb/" },
- { name => "DBD::Pg", version => '1.49', url => "http://search.cpan.org/~dbdpg/" },
- { name => "Email::Address", url => "http://search.cpan.org/~rjbs/" },
- { name => "FCGI", url => "http://search.cpan.org/~mstrout/" },
- { name => "List::MoreUtils", version => '0.21', url => "http://search.cpan.org/~vparseval/" },
- { name => "PDF::API2", version => '2.000', url => "http://search.cpan.org/~areibens/" },
- { name => "Readonly", url => "http://search.cpan.org/~roode/" },
- { name => "Rose::Object", url => "http://search.cpan.org/~jsiracusa/" },
- { name => "Rose::DB", url => "http://search.cpan.org/~jsiracusa/" },
- { name => "Rose::DB::Object", url => "http://search.cpan.org/~jsiracusa/" },
- { name => "Template", version => '2.18', url => "http://search.cpan.org/~abw/" },
- { name => "Text::CSV_XS", version => '0.23', url => "http://search.cpan.org/~hmbrand/" },
- { name => "Text::Iconv", version => '1.2', url => "http://search.cpan.org/~mpiotr/" },
- { name => "URI", version => '1.35', url => "http://search.cpan.org/~gaas/" },
- { name => "XML::Writer", version => '0.602', url => "http://search.cpan.org/~josephw/" },
- { name => "YAML", version => '0.62', url => "http://search.cpan.org/~ingy/" },
+ { name => "parent", url => "http://search.cpan.org/~corion/", debian => 'libparent-perl' },
+ { name => "Archive::Zip", version => '1.16', url => "http://search.cpan.org/~adamk/", debian => 'libarchive-zip-perl' },
+ { name => "Class::Accessor", version => '0.30', url => "http://search.cpan.org/~kasei/", debian => 'libclass-accessor-perl' },
+ { name => "CGI::Ajax", version => '0.697', url => "http://search.cpan.org/~bct/" }, # no debian package, ours contains bugfixes
+ { name => "DateTime", url => "http://search.cpan.org/~drolsky/", debian => 'libdatetime-perl' },
+ { name => "DBI", version => '1.50', url => "http://search.cpan.org/~timb/", debian => 'libdbi-perl' },
+ { name => "DBD::Pg", version => '1.49', url => "http://search.cpan.org/~dbdpg/", debian => 'libdbd-pg' },
+ { name => "Email::Address", url => "http://search.cpan.org/~rjbs/", debian => 'libemail-address-perl' },
+ { name => "FCGI", url => "http://search.cpan.org/~mstrout/", debian => 'libfcgi-perl' },
+ { name => "List::MoreUtils", version => '0.21', url => "http://search.cpan.org/~vparseval/", debian => 'liblist-moreutils-perl' },
+ { name => "PDF::API2", version => '2.000', url => "http://search.cpan.org/~areibens/", debian => 'libpdf-api2-perl' },
+ { name => "Rose::Object", url => "http://search.cpan.org/~jsiracusa/", debian => 'librose-object-perl' },
+ { name => "Rose::DB", url => "http://search.cpan.org/~jsiracusa/", debian => 'librose-db-perl' },
+ { name => "Rose::DB::Object", url => "http://search.cpan.org/~jsiracusa/", debian => 'librose-db-object-perl' },
+ { name => "Sort::Naturally", url => "http://search.cpan.org/~sburke/", debian => 'libsort-naturally-perl' },
+ { name => "Template", version => '2.18', url => "http://search.cpan.org/~abw/", debian => 'libtemplate-perl' },
+ { name => "Text::CSV_XS", version => '0.23', url => "http://search.cpan.org/~hmbrand/", debian => 'libtext-csv-xs-perl' },
+ { name => "Text::Iconv", version => '1.2', url => "http://search.cpan.org/~mpiotr/", debian => 'libtext-iconv-perl' },
+ { name => "URI", version => '1.35', url => "http://search.cpan.org/~gaas/", debian => 'liburi-perl' },
+ { name => "XML::Writer", version => '0.602', url => "http://search.cpan.org/~josephw/", debian => 'libxml-writer-perl' },
+ { name => "YAML", version => '0.62', url => "http://search.cpan.org/~ingy/", debian => 'libyaml-perl' },
);
@optional_modules = ();
my $type = shift;
my $self = {};
+ _init_globals_from_config();
+
$self->{"calldepth"} = 0;
$self->{"file"} = $file_name || "/tmp/lx-office-debug.log";
$self->{"target"} = FILE_TARGET;
bless($self, $type);
}
+my $globals_inited_from_config;
+sub _init_globals_from_config {
+ return if $globals_inited_from_config;
+ $globals_inited_from_config = 1;
+
+ my $cfg = $::lx_office_conf{debug} || {};
+
+ $global_level = NONE() if $cfg->{global_level} =~ /NONE/;
+ foreach my $level (grep { $_} split(m/\s+/, $cfg->{global_level})) {
+ $global_level |= eval "${level}()";
+ }
+
+ $watch_form = $cfg->{watch_form};
+ $file_name = $cfg->{file_name} || "/tmp/lx-office-debug.log";
+}
+
sub set_target {
my ($self, $target, $file) = @_;
my ($type, $country) = @_;
- $country ||= $::language;
+ $country ||= $::lx_office_conf{system}->{language};
$country =~ s|.*/||;
$country =~ s|\.||g;
}
}
- my $db_charset = $main::dbcharset || Common::DEFAULT_CHARSET;
- $self->{is_utf8} = (any { lc($::dbcharset || '') eq $_ } qw(utf8 utf-8 unicode)) ? 1 : 0;
+ my $db_charset = $::lx_office_conf{system}->{dbcharset} || Common::DEFAULT_CHARSET;
+ $self->{is_utf8} = (any { lc($::lx_office_conf{system}->{dbcharset} || '') eq $_ } qw(utf8 utf-8 unicode)) ? 1 : 0;
if ($self->{is_utf8}) {
binmode STDOUT, ":utf8";
--- /dev/null
+package SL::LxOfficeConf;
+
+use strict;
+
+use Config::Std;
+use Encode;
+
+sub read {
+ my $file = -f 'config/lx_office.conf' ? 'config/lx_office.conf' : 'config/lx_office.conf.default';
+ read_config $file => %::lx_office_conf;
+ _decode_recursively(\%::lx_office_conf);
+}
+
+sub _decode_recursively {
+ my ($obj) = @_;
+
+ while (my ($key, $value) = each %{ $obj }) {
+ if (ref($value) eq 'HASH') {
+ _decode_recursively($value);
+ } else {
+ $obj->{$key} = decode('UTF-8', $value);
+ }
+ }
+}
+
+1;
my %temp_form = ( %{ $form }, 'myconfig_email' => $email );
my $template = SL::Template::create(type => 'PlainText', form => \%temp_form);
- my $sendmail = $template->parse_block($main::sendmail);
+ my $sendmail = $template->parse_block($::lx_office_conf{applications}->{sendmail});
- if (!open(OUT, $sendmail)) {
+ if (!open(OUT, "|$sendmail")) {
$main::lxdebug->leave_sub();
return "$sendmail : $!";
}
$form->{saved_xyznumber} = $form->{$form->{type} =~ /_quotation$/ ?
"quonumber" : "ordnumber"};
- Common::webdav_folder($form) if ($main::webdav);
+ Common::webdav_folder($form);
my $rc = $dbh->commit;
sub delete {
$main::lxdebug->enter_sub();
- my ($self, $myconfig, $form, $spool) = @_;
+ my ($self, $myconfig, $form) = @_;
# connect to database
my $dbh = $form->dbconnect_noauto($myconfig);
$dbh->disconnect;
if ($rc) {
+ my $spool = $::lx_office_conf{paths}->{spool};
foreach $spoolfile (@spoolfiles) {
unlink "$spool/$spoolfile" if $spoolfile;
}
$form->{exchangerate} = $form->get_exchangerate($dbh, $form->{currency}, $form->{transdate}, ($form->{vc} eq 'customer') ? "buy" : "sell");
- Common::webdav_folder($form) if ($main::webdav);
+ Common::webdav_folder($form);
$self->load_periodic_invoice_config($form);
my $num_columns = scalar @visible_columns;
my $num_header_rows = 1;
- my $font_encoding = $main::dbcharset || 'ISO-8859-15';
+ my $font_encoding = $::lx_office_conf{system}->{dbcharset} || 'ISO-8859-15';
foreach my $name (@visible_columns) {
push @column_props, { 'justify' => $self->{columns}->{$name}->{align} eq 'right' ? 'right' : 'left' };
my %params = @_;
my $package = "SL::Template::" . $params{type};
- $package->new($params{file_name}, $params{form}, $params{myconfig} || \%::myconfig, $params{userspath} || $::userspath);
+ $package->new($params{file_name}, $params{form}, $params{myconfig} || \%::myconfig, $params{userspath} || $::lx_office_conf{paths}->{userspath});
}
1;
$psfile .= ".ps";
}
- system("html2ps -f html2ps-config < $form->{tmpfile} > $psfile");
+ system($::lx_office_conf{applications}->{html2ps} . " -f html2ps-config < $form->{tmpfile} > $psfile");
if ($?) {
$self->{"error"} = $form->cleanup();
$self->cleanup();
$pdffile .= ".pdf";
}
- system("html2ps -f html2ps-config < $form->{tmpfile} | ps2pdf - $pdffile");
+ system($::lx_office_conf{applications}->{html2ps} . " -f html2ps-config < $form->{tmpfile} | ps2pdf - $pdffile");
if ($?) {
$self->{"error"} = $form->cleanup();
$self->cleanup();
my $keyword_pos = $pos - 1 + $tag_start_len;
- if ((substr($text, $keyword_pos, 2) eq 'if') || (substr($text, $keyword_pos, 3) eq 'foreach')) {
+ if ((substr($text, $keyword_pos, 2) eq 'if') || (substr($text, $keyword_pos, 7) eq 'foreach')) {
$depth++;
} elsif ((substr($text, $keyword_pos, 4) eq 'else') && (1 == $depth)) {
}
sub _get_latex_path {
- return $main::latex_bin || 'pdflatex';
+ return $::lx_office_conf{applications}->{latex} || 'pdflatex';
}
sub get_mime_type() {
my $self = $type->SUPER::new(@_);
$self->{"rnd"} = int(rand(1000000));
- $self->{"iconv"} = SL::Iconv->new($main::dbcharset, "UTF-8");
+ $self->{"iconv"} = SL::Iconv->new($::lx_office_conf{system}->{dbcharset}, "UTF-8");
$self->set_tag_style('<%', '%>');
$self->{quot_re} = '"';
my $pid = fork();
if (0 == $pid) {
$main::lxdebug->message(LXDebug->DEBUG2(), " Child execing\n");
- exec($main::xvfb_bin, $display, "-screen", "0", "640x480x8", "-nolisten", "tcp");
+ exec($::lx_office_conf{applications}->{xvfb}, $display, "-screen", "0", "640x480x8", "-nolisten", "tcp");
}
sleep(3);
$main::lxdebug->message(LXDebug->DEBUG2(), " parent dont sleeping\n");
sub is_openoffice_running {
$main::lxdebug->enter_sub();
- my $output = `./scripts/oo-uno-test-conn.py $main::openofficeorg_daemon_port 2> /dev/null`;
+ my $cmd = "./scripts/oo-uno-test-conn.py " . $::lx_office_conf{print_templates}->{openofficeorg_daemon_port} . " 2> /dev/null";
+ my $output = `$cmd`;
chomp $output;
my $res = ($? == 0) || $output;
exit if ($new_pid);
my $ssres = setsid();
$main::lxdebug->message(LXDebug->DEBUG2(), " Child execing\n");
- my @cmdline = ($main::openofficeorg_writer_bin,
+ my @cmdline = ($::lx_office_conf{applications}->{openofficeorg_writer},
"-minimized", "-norestore", "-nologo", "-nolockcheck",
"-headless",
"-accept=socket,host=localhost,port=" .
- $main::openofficeorg_daemon_port . ";urp;");
+ $::lx_office_conf{print_templates}->{openofficeorg_daemon_port} . ";urp;");
exec(@cmdline);
}
}
my @cmdline;
- if (!$main::openofficeorg_daemon) {
- @cmdline = ($main::openofficeorg_writer_bin,
+ if (!$::lx_office_conf{print_templates}->{openofficeorg_daemon}) {
+ @cmdline = ($::lx_office_conf{applications}->{openofficeorg_writer},
"-minimized", "-norestore", "-nologo", "-nolockcheck",
"-headless",
"file:${filename}.odt",
}
@cmdline = ("./scripts/oo-uno-convert-pdf.py",
- $main::openofficeorg_daemon_port,
+ $::lx_office_conf{print_templates}->{openofficeorg_daemon_port},
"${filename}.odt");
}
use Carp;
use List::MoreUtils qw(any none);
-use Readonly;
use SL::DBUtils;
use Rose::Object::MakeMethods::Generic
scalar => [ qw(type id number save dbh dbh_provided business_id) ],
);
-Readonly my @SUPPORTED_TYPES => qw(invoice credit_note customer vendor sales_delivery_order purchase_delivery_order sales_order purchase_order sales_quotation request_quotation);
+my @SUPPORTED_TYPES = qw(invoice credit_note customer vendor sales_delivery_order purchase_delivery_order sales_order purchase_order sales_quotation request_quotation);
sub new {
my $class = shift;
}
# update the tables
- if (!open(FH, ">$main::userspath/nologin")) {
+ if (!open(FH, ">" . $::lx_office_conf{paths}->{userspath} . "/nologin")) {
$form->show_generic_error($main::locale->text('A temporary file could not be created. ' .
'Please verify that the directory "#1" is writeable by the webserver.',
- $main::userspath),
+ $::lx_office_conf{paths}->{userspath}),
'back_button' => 1);
}
close(FH);
# remove lock file
- unlink("$main::userspath/nologin");
+ unlink($::lx_office_conf{paths}->{userspath} . "/nologin");
my $menufile =
$self->{"menustyle"} eq "v3" ? "menuv3.pl" :
closedir(SQLDIR);
}
- my $db_charset = $main::dbcharset;
+ my $db_charset = $::lx_office_conf{system}->{dbcharset};
$db_charset ||= Common::DEFAULT_CHARSET;
my $dbupdater = SL::DBUpgrade2->new(form => $form, dbdriver => $form->{dbdriver});
$form->{sid} = $form->{dbdefault};
my $rc = -2;
- my $db_charset = $main::dbcharset || Common::DEFAULT_CHARSET;
+ my $db_charset = $::lx_office_conf{system}->{dbcharset} || Common::DEFAULT_CHARSET;
map { $_->{description} = SL::Iconv::convert($_->{charset}, $db_charset, $_->{description}) } values %{ $dbupdater->{all_controls} };
-2.6.2-beta1
+2.6.2-beta2
use Sys::Hostname;
use SL::Auth;
+use SL::Auth::PasswordPolicy;
use SL::Form;
use SL::Iconv;
use SL::Mailer;
::end_of_request();
}
- if (-f $main::memberfile) {
+ my $memberfile = $::lx_office_conf{paths}->{memberfile};
+ if (-f $memberfile) {
my $memberdir = "";
- if ($main::memberfile =~ m|^.*/|) {
+ if ($memberfile =~ m|^.*/|) {
$memberdir = $&;
}
$form->{title} = $locale->text('User data migration');
$form->header();
- print $form->parse_html_template('admin/user_migration', { 'memberfile' => $main::memberfile,
+ print $form->parse_html_template('admin/user_migration', { 'memberfile' => $memberfile,
'backupdir' => $backupdir });
::end_of_request();
$main::auth->set_session_value('rpw', $form->{rpw});
$main::auth->create_or_refresh_session();
- if (!-f $main::memberfile) {
+ my $memberfile = $::lx_office_conf{paths}->{memberfile};
+ if (!-f $memberfile) {
# New installation -- create a standard group with full access
my %members;
my $group = {
my $memberdir = "";
- if ($main::memberfile =~ m|^.*/|) {
+ my $memberfile = $::lx_office_conf{paths}->{memberfile};
+ if ($memberfile =~ m|^.*/|) {
$memberdir = $&;
}
$form->error(sprintf($locale->text('The directory "%s" could not be created:\n%s'), $backupdir, $!));
}
- copy $main::memberfile, "users/member-file-migration/members";
+ copy $memberfile, "users/member-file-migration/members";
- my $in = IO::File->new($main::memberfile, "r");
+ my $in = IO::File->new($memberfile, "r");
$form->error($locale->text('Could not open the old memberfile.')) if (!$in);
}
}
- unlink $main::memberfile;
+ unlink $memberfile;
my @member_list = sort { lc $a->{login} cmp lc $b->{login} } values %members;
map { $_->{templates} =~ s|.*/||; } values %members;
$form->{title} = "Lx-Office ERP " . $locale->text('Administration');
- $form->{LOCKED} = -e "$main::userspath/nologin";
+ $form->{LOCKED} = -e _nologin_file_name();
$form->{MEMBERS} = [ @members{sort { lc $a cmp lc $b } keys %members} ];
$form->header();
}
# is there a templates basedir
- if (!-d "$main::templates") {
- $form->error(sprintf($locale->text("The directory %s does not exist."), $main::templates));
+ if (!-d $::lx_office_conf{paths}->{templates}) {
+ $form->error(sprintf($locale->text("The directory %s does not exist."), $::lx_office_conf{paths}->{templates}));
}
- opendir TEMPLATEDIR, "$main::templates/." or $form->error("$main::templates : $ERRNO");
+ opendir TEMPLATEDIR, $::lx_office_conf{paths}->{templates} or $form->error($::lx_office_conf{paths}->{templates} . " : $ERRNO");
my @all = readdir(TEMPLATEDIR);
- my @alldir = sort grep { -d "$main::templates/$_" && !/^\.\.?$/ } @all;
- my @allhtml = sort grep { -f "$main::templates/$_" && /\.html$/ } @all;
+ my @alldir = sort grep { -d ($::lx_office_conf{paths}->{templates} . "/$_") && !/^\.\.?$/ } @all;
+ my @allhtml = sort grep { -f ($::lx_office_conf{paths}->{templates} . "/$_") && /\.html$/ } @all;
closedir TEMPLATEDIR;
@alldir = grep !/\.(html|tex|sty|odt|xml|txb)$/, @alldir;
}
# is there a basedir
- if (!-d "$main::templates") {
- $form->error(sprintf($locale->text("The directory %s does not exist."), $main::templates));
+ if (!-d $::lx_office_conf{paths}->{templates}) {
+ $form->error(sprintf($locale->text("The directory %s does not exist."), $::lx_office_conf{paths}->{templates}));
}
# add base directory to $form->{templates}
$form->{templates} =~ s|.*/||;
- $form->{templates} = "$main::templates/$form->{templates}";
+ $form->{templates} = $::lx_office_conf{paths}->{templates} . "/$form->{templates}";
my $myconfig = new User($form->{login});
$myconfig->save_member();
- if ($main::auth->can_change_password()
- && defined $form->{new_password}
- && ($form->{new_password} ne '********')) {
- $main::auth->change_password($form->{login}, $form->{new_password});
- }
-
$form->{templates} =~ s|.*/||;
- $form->{templates} = "$main::templates/$form->{templates}";
+ $form->{templates} = $::lx_office_conf{paths}->{templates} . "/$form->{templates}";
$form->{mastertemplates} =~ s|.*/||;
# create user template directory and copy master files
umask(007);
# copy templates to the directory
- opendir TEMPLATEDIR, "$main::templates/." or $form->error("$main::templates : $ERRNO");
+ opendir TEMPLATEDIR, $::lx_office_conf{paths}->{templates} or $form->error($::lx_office_conf{paths}->{templates} . " : $ERRNO");
my @templates = grep /$form->{mastertemplates}.*?\.(html|tex|sty|odt|xml|txb)$/,
readdir TEMPLATEDIR;
closedir TEMPLATEDIR;
foreach my $file (@templates) {
- open(TEMP, "$main::templates/$file")
- or $form->error("$main::templates/$file : $ERRNO");
+ open(TEMP, $::lx_office_conf{paths}->{templates} . "/$file")
+ or $form->error($::lx_office_conf{paths}->{templates} . "/$file : $ERRNO");
$file =~ s/\Q$form->{mastertemplates}\E-//;
open(NEW, ">$form->{templates}/$file")
}
}
- $form->redirect($locale->text('User saved!'));
+ if ($main::auth->can_change_password()
+ && defined $form->{new_password}
+ && ($form->{new_password} ne '********')) {
+ my $verifier = SL::Auth::PasswordPolicy->new;
+ my $result = $verifier->verify($form->{new_password}, 1);
+
+ if ($result != SL::Auth::PasswordPolicy->OK()) {
+ $form->error($::locale->text('The settings were saved, but the password was not changed.') . ' ' . join(' ', $verifier->errors($result)));
+ }
+ $main::auth->change_password($form->{login}, $form->{new_password});
+ }
+
+ $form->redirect($locale->text('User saved!'));
}
sub save_user_as_new {
}
closedir SQLDIR;
- my $default_charset = $main::dbcharset;
+ my $default_charset = $::lx_office_conf{system}->{dbcharset};
$default_charset ||= Common::DEFAULT_CHARSET;
my $cluster_encoding = User->dbclusterencoding($form);
if ($cluster_encoding && ($cluster_encoding =~ m/^(?:UTF-?8|UNICODE)$/i)) {
- if ($main::dbcharset !~ m/^UTF-?8$/i) {
+ if ($::lx_office_conf{system}->{dbcharset} !~ m/^UTF-?8$/i) {
$form->show_generic_error($locale->text('The selected PostgreSQL installation uses UTF-8 as its encoding. ' .
'Therefore you have to configure Lx-Office to use UTF-8 as well.'),
'back_button' => 1);
$form->{title} = "Lx-Office ERP " . $locale->text('Database Administration') . " / " . $locale->text('Backup Dataset');
- if ("$main::pg_dump_exe" eq "DISABLED") {
- $form->error($locale->text('Database backups and restorations are disabled in lx-erp.conf.'));
+ if ($::lx_office_conf{applications}->{pg_dump} eq "DISABLED") {
+ $form->error($locale->text('Database backups and restorations are disabled in the configuration.'));
}
my @dbsources = sort User->dbsources($form);
$form->{title} = "Lx-Office ERP " . $locale->text('Database Administration') . " / " . $locale->text('Backup Dataset');
- $main::pg_dump_exe ||= "pg_dump";
+ my $pg_dump_exe = $::lx_office_conf{applications}->{pg_dump} || "pg_dump";
- if ("$main::pg_dump_exe" eq "DISABLED") {
- $form->error($locale->text('Database backups and restorations are disabled in lx-erp.conf.'));
+ if ("$pg_dump_exe" eq "DISABLED") {
+ $form->error($locale->text('Database backups and restorations are disabled in the configuration.'));
}
$form->isblank("dbname", $locale->text('The dataset name is missing.'));
push @args, ("-p", $form->{dbport}) if ($form->{dbport});
push @args, $form->{dbname};
- my $cmd = "$main::pg_dump_exe " . join(" ", map { s/\\/\\\\/g; s/\"/\\\"/g; $_ } @args);
+ my $cmd = "$pg_dump_exe " . join(" ", map { s/\\/\\\\/g; s/\"/\\\"/g; $_ } @args);
my $name = "dataset_backup_$form->{dbname}_" . strftime("%Y%m%d", localtime()) . ".tar";
if ($form->{destination} ne "email") {
map { $mail->{$_} = $form->{$_} } qw(from to cc subject message);
- $mail->{charset} = $main::dbcharset ? $main::dbcharset : Common::DEFAULT_CHARSET;
+ $mail->{charset} = $::lx_office_conf{system}->{dbcharset} || Common::DEFAULT_CHARSET;
$mail->{attachments} = [ { "filename" => $tmp, "name" => $name } ];
$mail->send();
$form->{title} = "Lx-Office ERP " . $locale->text('Database Administration') . " / " . $locale->text('Restore Dataset');
- if ("$main::pg_restore_exe" eq "DISABLED") {
- $form->error($locale->text('Database backups and restorations are disabled in lx-erp.conf.'));
+ if ($::lx_office_conf{applications}->{pg_restore} eq "DISABLED") {
+ $form->error($locale->text('Database backups and restorations are disabled in the configuration.'));
}
- my $default_charset = $main::dbcharset;
+ my $default_charset = $::lx_office_conf{system}->{dbcharset};
$default_charset ||= Common::DEFAULT_CHARSET;
$form->{DBENCODINGS} = [];
$form->{title} = "Lx-Office ERP " . $locale->text('Database Administration') . " / " . $locale->text('Restore Dataset');
- $main::pg_restore_exe ||= "pg_restore";
+ my $pg_restore_exe = $::lx_office_conf{applications}->{pg_restore} || "pg_restore";
- if ("$main::pg_restore_exe" eq "DISABLED") {
- $form->error($locale->text('Database backups and restorations are disabled in lx-erp.conf.'));
+ if ("$pg_restore_exe" eq "DISABLED") {
+ $form->error($locale->text('Database backups and restorations are disabled in the configuration.'));
}
$form->isblank("new_dbname", $locale->text('The dataset name is missing.'));
push @args, ("-p", $form->{dbport}) if ($form->{dbport});
push @args, $tmp;
- my $cmd = "$main::pg_restore_exe " . join(" ", map { s/\\/\\\\/g; s/\"/\\\"/g; $_ } @args);
+ my $cmd = "$pg_restore_exe " . join(" ", map { s/\\/\\\\/g; s/\"/\\\"/g; $_ } @args);
my $in = IO::File->new("$cmd 2>&1 |");
my $form = $main::form;
my $locale = $main::locale;
- unlink "$main::userspath/nologin";
+ unlink _nologin_file_name();;
$form->{callback} = "admin.pl?action=list_users";
my $form = $main::form;
my $locale = $main::locale;
- open(FH, ">$main::userspath/nologin")
+ open(FH, ">" . _nologin_file_name())
or $form->error($locale->text('Cannot create Lock!'));
close(FH);
::end_of_request() if SL::DBUpgrade2->new(form => $::form, dbdriver => 'Pg', auth => 1)->apply_admin_dbupgrade_scripts(1);
}
+sub _nologin_file_name {
+ return $::lx_office_conf{paths}->{userspath} . '/nologin';
+}
+
1;
use utf8;
use SL::Auth;
+use SL::Auth::PasswordPolicy;
use SL::AM;
use SL::CA;
use SL::Form;
$form->{title} = $locale->text('Type of Business');
my @column_index = qw(description discount customernumberinit);
- push @column_index, 'salesman' if $::vertreter;
+ push @column_index, 'salesman' if $::lx_office_conf{system}->{vertreter};
my %column_header;
$column_header{description} =
qq|<th class=listheading width=60%>|
$form->format_amount(\%myconfig, $form->{discount} * 100);
my $salesman_code;
- if ($::vertreter) {
+ if ($::lx_office_conf{system}->{vertreter}) {
$salesman_code = qq|
<tr>
<th align="right">| . $locale->text('Representative') . qq|</th>
}
my $linkaccounts;
- if (!$main::eur) {
+ if (!$::lx_office_conf{system}->{eur}) {
$linkaccounts = qq|
<tr>
<th align=right>| . $locale->text('Inventory') . qq|</th>
_build_cfg_options('numberformat', ('1,000.00', '1000.00', '1.000,00', '1000,00'));
my @formats = ();
- if ($main::opendocument_templates && $main::openofficeorg_writer_bin &&
- $main::xvfb_bin && (-x $main::openofficeorg_writer_bin) && (-x $main::xvfb_bin)) {
+ if ($::lx_office_conf{print_templates}->{opendocument}
+ && $::lx_office_conf{applications}->{openofficeorg_writer} && (-x $::lx_office_conf{applications}->{openofficeorg_writer})
+ && $::lx_office_conf{applications}->{xvfb} && (-x $::lx_office_conf{applications}->{xvfb})) {
push(@formats, { "name" => $locale->text("PDF (OpenDocument/OASIS)"),
"value" => "opendocument_pdf" });
}
- if ($main::latex_templates) {
+ if ($::lx_office_conf{print_templates}->{latex}) {
push(@formats, { "name" => $locale->text("PDF"), "value" => "pdf" });
}
push(@formats, { "name" => "HTML", "value" => "html" });
- if ($main::latex_templates) {
+ if ($::lx_office_conf{print_templates}->{latex}) {
push(@formats, { "name" => $locale->text("Postscript"),
"value" => "postscript" });
}
- if ($main::opendocument_templates) {
+ if ($::lx_office_conf{print_templates}->{opendocument}) {
push(@formats, { "name" => $locale->text("OpenDocument/OASIS"),
"value" => "opendocument" });
}
TODO->save_user_config('login' => $form->{login}, %{ $form->{todo_cfg} || { } });
- $form->redirect($locale->text('Preferences saved!')) if (AM->save_preferences(\%myconfig, \%$form, 0));
+ if (AM->save_preferences(\%myconfig, $form)) {
+ if ($::auth->can_change_password()
+ && defined $form->{new_password}
+ && ($form->{new_password} ne '********')) {
+ my $verifier = SL::Auth::PasswordPolicy->new;
+ my $result = $verifier->verify($form->{new_password});
+
+ if ($result != SL::Auth::PasswordPolicy->OK()) {
+ $form->error($::locale->text('The settings were saved, but the password was not changed.') . ' ' . join(' ', $verifier->errors($result)));
+ }
+
+ $::auth->change_password($form->{login}, $form->{new_password});
+
+ $form->{password} = $form->{new_password};
+ $::auth->set_session_value('password', $form->{password});
+ $::auth->create_or_refresh_session();
+ }
+
+ $form->redirect($locale->text('Preferences saved!'));
+ }
+
$form->error($locale->text('Cannot save preferences!'));
$main::lxdebug->leave_sub();
$main::auth->assert('general_ledger');
- if (AP->delete_transaction(\%myconfig, \%$form, $main::spool)) {
+ if (AP->delete_transaction(\%myconfig, \%$form)) {
# saving the history
if(!exists $form->{addition}) {
$form->{snumbers} = qq|invnumber_| . $form->{invnumber};
$form->{exchangerate} = $form->{forex} if $form->{forex};
# format amounts
- $form->{exchangerate} =
- $form->format_amount(\%myconfig, $form->{exchangerate});
-
- if ($form->{exchangerate} == 0) {
- $form->{exchangerate} = "";
- }
-
- $form->{creditlimit} =
- $form->format_amount(\%myconfig, $form->{creditlimit}, 0, "0");
- $form->{creditremaining} =
- $form->format_amount(\%myconfig, $form->{creditremaining}, 0, "0");
+ $form->{exchangerate} = $form->{exchangerate} ? $form->format_amount(\%myconfig, $form->{exchangerate}) : '';
+ $form->{creditlimit} = $form->format_amount(\%myconfig, $form->{creditlimit}, 0, "0");
+ $form->{creditremaining} = $form->format_amount(\%myconfig, $form->{creditremaining}, 0, "0");
$exchangerate = qq|
<input type=hidden name=forex value=$form->{forex}>
=head1 NAME
-<<<<<<< HEAD:bin/mozilla/arap.pl
-bin/mozilla/arap.pl - helper routines for invoiceing frontend.
-
-=head1 SYNOPSIS
-
-nothing yet
-
-=head1 DESCRIPTION
-
-nothing yet
-=======
arap.pl - helper functions or customer/vendor retrieval
=head1 SYNOPSIS
Don't use anyting in this file without extreme care, and even then be prepared for massive headaches.
It's a collection of helper routines that wrap the customer/vendor dropdown/textfield duality into something even complexer.
->>>>>>> 88f5a78... check_name erweitert um ein no_select flag. siehe perldoc bin/mozilla/arap.pl:bin/mozilla/arap.pl
=head1 FUNCTIONS
=head2 check_name customer|vendor
-<<<<<<< HEAD:bin/mozilla/arap.pl
check_name was originally meant to update the selected customer or vendor. The
way it does that has generted more hate than almost any other part of this
software.
=over 4
-=item
+=item *
It checks if a vendor or customer is given. No failsafe, vendor fallback if
$_[0] is something fancy.
-=item
+=item *
It assumes, that there is a field named customer or vendor in $form.
-=item
+=item *
It assumes, that this field is filled with name--id, and tries to split that.
sql ledger uses that combination to get ids into the select keys.
-=item
+=item *
It looks for a field selectcustomer or selectvendor in $form. sql ledger used
to store a copy of the html select in there. (again, don't ask)
-=item
+=item *
If this field exists, it looks for a field called oldcustomer or oldvendor, in
which the old name--id string was stored in sql ledger, and compares those.
-=item
+=item *
if they don't match, it will set customer_id or vendor_id in $form, load the
entry (which will clobber everything in $form named like a column in customer
oder vendor) and return.
-=item
+=item *
If there was no select* entry, it assumes that vclimit was lower than the
number of entries, and that an input field was generated. In that case the
splitting is omitted (since users don't generally include ids in entered names)
-=item
+=item *
It looks for a *_id field, and combines it with the given input into a name--id
entry and compares it to the old* entry. (Missing any of these will instantly
break check_namea.
-=item
+=item *
If those do not match, $form->get_name is called to get matching results.
get_name only matches by *number and name, not by id, don't try to get it to do
so.
-=item
+=item *
The results are stored in $form>{name_list} but a count is returned, and
checked.
-=item
+=item *
If only one result was found, *_id, * and old* are copied into $form, the entry
is loaded (like above, clobbering)
-=item
+=item *
If there is more than one, a selection dialog is rendered
-=item
+=item *
If none is found, an error is generated.
Since get_customer and get_vendor clobber a lot of fields, make sure what
changes exactly.
-=======
-This function will take the contents of $form->{vendor} or $form->{customer}, try to guess if there was a selectbox or not, and search for matching customer/vendors.
-This mostly works great, except for the case when there is more than one match.
-In that case check_name will display a select form, that will redirect to the
-original C<nextsub>. Unfortunately any hidden vars or input fields will be lost
-in the process unless saved before in a callback.
+=head3 select- version works fine, but things go awry when I use a textbox, any idea?
+
+If there is more than one match, check_name will display a select form, that
+will redirect to the original C<nextsub>. Unfortunately any hidden vars or
+input fields will be lost in the process unless saved before in a callback.
If you still want to use it, you can disable this feature, like this:
In that case multiple matches will trigger an error.
-=head1 BUGS
-
-=head1 AUTHOR
->>>>>>> 88f5a78... check_name erweitert um ein no_select flag. siehe perldoc bin/mozilla/arap.pl:bin/mozilla/arap.pl
+Otherwise you'll have to care to include a complete state in callback.
=cut
$form->{callback} .= "&header=1" if $form->{callback};
$form->redirect($locale->text('Removed spoolfiles!'))
- if (BP->delete_spool(\%myconfig, \%$form, $main::spool));
+ if (BP->delete_spool(\%myconfig, \%$form));
$form->error($locale->text('Cannot remove files!'));
$main::lxdebug->leave_sub();
if ($form->{"checked_$i"}) {
$form->info($locale->text('Printing ... '));
- if (BP->print_spool(\%myconfig, \%$form, $main::spool, "| $selected_printer")) {
+ if (BP->print_spool(\%myconfig, \%$form, "| $selected_printer")) {
print $locale->text('done');
$form->redirect($locale->text('Marked entries printed!'));
}
my $i = 0;
my $j = 0;
my $spoolfile;
+ my $spool = $::lx_office_conf{paths}->{spool};
foreach my $ref (@{ $form->{SPOOL} }) {
"<td><a href=$module?action=edit&id=$ref->{id}&type=$form->{type}&callback=$callback>$ref->{quonumber}</a></td>";
$column_data{name} = "<td>$ref->{name}</td>";
$column_data{spoolfile} =
- qq|<td><a href=$main::spool/$ref->{spoolfile}>$ref->{spoolfile}</a></td>
+ qq|<td><a href=$spool/$ref->{spoolfile}>$ref->{spoolfile}</a></td>
<input type=hidden name="spoolfile_$i" value=$ref->{spoolfile}>
|;
$form->{title} = $locale->text('Chart of Accounts');
- if ($main::eur) {
+ if ($::lx_office_conf{system}->{eur}) {
$form->{method} = "cash";
}
<td colspan=3><select name=department>$form->{selectdepartment}</select></td>
</tr>
| if $form->{selectdepartment};
- my $accrual = ($main::eur) ? "" : "checked";
- my $cash = ($main::eur) ? "checked" : "";
+ my $accrual = $::lx_office_conf{system}->{eur} ? "" : "checked";
+ my $cash = $::lx_office_conf{system}->{eur} ? "checked" : "";
my $name_1 = "fromdate";
my $id_1 = "fromdate";
$form->{description} =~ s/\"/"/g;
+ my $eur = $::lx_office_conf{system}->{eur};
+
print qq|
<body onLoad="$onload">
<input type=hidden name=accno value=$form->{accno}>
<input type=hidden name=description value="$form->{description}">
<input type=hidden name=sort value=transdate>
-<input type=hidden name=eur value=$main::eur>
+<input type=hidden name=eur value=$eur>
<input type=hidden name=accounttype value=$form->{accounttype}>
<table border=0 width=100%>
use Carp;
use SL::Common;
+use SL::DB::Helper::Mappings;
use SL::DBUtils;
use SL::Form;
use SL::MoreCommon;
$main::lxdebug->leave_sub();
}
-if ($::use_rdbo) {
- eval {
- require SL::DB::Helper::Mappings;
- sub db {
- goto &SL::DB::Helper::Mappings::db;
- }
- } or die $@;
+sub db {
+ goto &SL::DB::Helper::Mappings::db;
}
1;
taxzones => "ALL_TAXZONES");
$form->get_pricegroup(\%myconfig, { all => 1 });
- $form->get_lists(customers => { key => "ALL_SALESMAN_CUSTOMERS", business_is_salesman => 1 }) if $::vertreter;
+ $form->get_lists(customers => { key => "ALL_SALESMAN_CUSTOMERS", business_is_salesman => 1 }) if $::lx_office_conf{system}->{vertreter};
$form->{ALL_SALESMEN} = $form->{ALL_EMPLOYEES};
$form->{taxincluded} = ($form->{taxincluded}) ? "checked" : "";
$::form->isblank("name", $::locale->text("Name missing!"));
- if ($::form->{new_salesman_id} && $::vertreter) {
+ if ($::form->{new_salesman_id} && $::lx_office_conf{system}->{vertreter}) {
$::form->{salesman_id} = $::form->{new_salesman_id};
delete $::form->{new_salesman_id};
}
foreach my $level (values %{ $levels }) {
next unless scalar @{ $level };
- DN->save_dunning(\%myconfig, $form, $level, $main::userspath, $main::spool);
+ DN->save_dunning(\%myconfig, $form, $level);
}
}
"customer_id" => $form->{"customer_id_$i"},
"next_dunning_config_id" => $form->{"next_dunning_config_id_$i"},
"email" => $form->{"email_$i"}, } ];
- DN->save_dunning(\%myconfig, $form, $level, $main::userspath, $main::spool);
+ DN->save_dunning(\%myconfig, $form, $level);
}
}
$form->all_vc(\%myconfig, $form->{vc}, ($form->{vc} eq 'customer') ? "AR" : "AP");
# retrieve order/quotation
- $form->{webdav} = $main::webdav;
+ $form->{webdav} = $::lx_office_conf{system}->{webdav};
$form->{jsscript} = 1;
my $editing = $form->{id};
my $currency = $form->{currency};
invoice_links();
+ if ($form->{ordnumber}) {
+ require SL::DB::Order;
+ if (my $order = SL::DB::Manager::Order->find_by(ordnumber => $form->{ordnumber})) {
+ $order->load;
+ $form->{orddate} = $order->transdate_as_date;
+ $form->{$_} = $order->$_ for qw(payment_id salesman_id taxzone_id quonumber);
+ }
+ }
+
$form->{currency} = $currency;
$form->{exchangerate} = "";
$form->{forex} = $form->check_exchangerate(\%myconfig, $form->{currency}, $form->{invdate}, $buysell);
map { $form->{"${_}_$form->{rowcount}"} = $ref->{$_} } keys %{ $ref };
map { $form->{"${_}_$form->{rowcount}"} = $form->format_amount(\%myconfig, $ref->{$_}) } qw(qty sellprice lastcost);
- if ($vc_discount){ # falls wir einen Lieferanten/Kundenrabatt haben
+ if ($vc_discount){ # falls wir einen Lieferanten/Kundenrabatt haben
# und keinen anderen discount wert an $i ...
$form->{"discount_$form->{rowcount}"} ||= $vc_discount; # ... nehmen wir diesen Rabatt
}
foreach my $request (@{ DO->unpack_stock_information('packed' => $form->{"stock_out_$i"}) }) {
$request->{parts_id} = $form->{"id_$i"};
$request->{base_qty} = $request->{qty} * $units->{$request->{unit}}->{factor} / $base_unit_factor;
- $request->{project_id} = $form->{"project_id_$i"} ? $form->{"project_id_$i"} : $form->{globalproject_id};
+ $request->{project_id} = $form->{"project_id_$i"} ? $form->{"project_id_$i"} : $form->{globalproject_id};
my $map_key = join '--', ($form->{"id_$i"}, @{$request}{qw(warehouse_id bin_id chargenumber bestbefore)});
my $pinfo = $part_info_map{$request->{parts_id}};
my $binfo = $bin_info_map{$request->{bin_id}};
- if ($main::show_best_before) {
+ if ($::lx_office_conf{system}->{show_best_before}) {
push @{ $form->{ERRORS} }, $locale->text("There is not enough available of '#1' at warehouse '#2', bin '#3', #4, #5, for the transfer of #6.",
$pinfo->{description},
$binfo->{warehouse_description},
$auth->assert('part_service_assembly_edit');
- $form->{eur} = $main::eur; # config dumps into namespace - yuck
+ $form->{eur} = $::lx_office_conf{system}->{eur}; # config dumps into namespace - yuck
$form->{pg_keys} = sub { "$_[0]->{partsgroup}--$_[0]->{id}" };
$form->{description_area} = ($form->{rows} = $form->numtextrows($form->{description}, 40)) > 1;
$form->{notes_rows} = max 4, $form->numtextrows($form->{notes}, 40), $form->numtextrows($form->{formel}, 40);
return if (scalar(@missing_modules) == 0);
use SL::Locale;
- my $locale = new Locale($main::language, "installationcheck");
+
+ my $locale = new Locale($::lx_office_conf{system}->{language}, "installationcheck");
print(qq|content-type: text/html
if ($item->{selected} && ($pricegroup_id != 0)) {
$form->{"pricegroup_old_$j"} = $pricegroup_id;
$form->{"price_new_$j"} = $price;
- $form->{"sellprice_$j"} = $price;
+ # edit: don't change the sellprice here
+ # $form->{"sellprice_$j"} = $price; # this must only be updated for existing articles, not new ones
}
if ($pricegroup_id == 0) {
$form->{"price_new_$j"} = $form->{"sellprice_$j"};
::end_of_request();
}
- Common::webdav_folder($form) if ($main::webdav);
+ Common::webdav_folder($form);
# if ( $form->{print_and_post}
# && $form->{second_run}
# for last row and report
# set pricegroup drop down list from report menu
if ($form->{"sellprice_$i"} != 0) {
+ # remember the pricegroup_id in pricegroup_old
+ # but don't overwrite it
$form->{"pricegroup_old_$i"} = $form->{"pricegroup_id_$i"};
my $default_option = $form->{"sellprice_$i"}.'--'.$form->{"pricegroup_id_$i"};
- $column_data{sellprice_pg} = NTI($cgi->popup_menu("sellpricepg_$i", [ $default_option ], $default_option, { $default_option => $form->{"pricegroup_$i"} || '' }));
+ $column_data{sellprice_pg} = NTI($cgi->popup_menu("sellprice_pg_$i", [ $default_option ], $default_option, { $default_option => $form->{"pricegroup_$i"} || '' }));
} else {
$column_data{sellprice_pg} = qq| |;
}
qw(bin listprice inventory_accno income_accno expense_accno unit weight
assembly taxaccounts partsgroup formel longdescription not_discountable
part_payment_id partnotes id lastcost price_factor_id price_factor);
- push @new_fields, "lizenzen" if ($main::lizenzen);
+ push @new_fields, "lizenzen" if $::lx_office_conf{system}->{lizenzen};
push @new_fields, grep { m/^ic_cvar_/ } keys %{ $form->{item_list}->[0] };
my $i = 0;
foreach my $ref (@{ $form->{item_list} }) {
my $checked = ($i++) ? "" : "checked";
- if ($main::lizenzen) {
+ if ($::lx_office_conf{system}->{lizenzen}) {
if ($ref->{inventory_accno} > 0) {
$ref->{"lizenzen"} = qq|<option></option>|;
foreach my $item (@{ $form->{LIZENZEN}{ $ref->{"id"} } }) {
$form->{payment_id} = $form->{"part_payment_id_$i"};
}
- if ($main::lizenzen) {
+ if ($::lx_office_conf{system}->{lizenzen}) {
map { $form->{"${_}_$i"} = $form->{"new_${_}_$j"} } qw(lizenzen);
}
my $script = $form->{"script"};
$script =~ s|.*/||;
$script =~ s|.pl$||;
- $locale = new Locale($main::language, $script);
+ $locale = new Locale($::lx_office_conf{system}->{language}, $script);
map { $form->{"select$_"} = "" } ($form->{vc}, "currency");
push @MEDIA, grep $_,
opthash("screen", $form->{OP}{screen}, $locale->text('Screen')),
- ($form->{printers} && scalar @{ $form->{printers} } && $main::latex_templates) ?
+ ($form->{printers} && scalar @{ $form->{printers} } && $::lx_office_conf{print_templates}->{latex}) ?
opthash("printer", $form->{OP}{printer}, $locale->text('Printer')) : undef,
- ($main::latex_templates && !$options{no_queue}) ?
+ ($::lx_office_conf{print_templates}->{latex} && !$options{no_queue}) ?
opthash("queue", $form->{OP}{queue}, $locale->text('Queue')) : undef
if ($form->{media} ne 'email');
push @FORMAT, grep $_,
- ($main::opendocument_templates && $main::openofficeorg_writer_bin && $main::xvfb_bin
- && (-x $main::openofficeorg_writer_bin) && (-x $main::xvfb_bin)
+ ($::lx_office_conf{print_templates}->{opendocument} && $::lx_office_conf{applications}->{openofficeorg_writer} && $::lx_office_conf{applications}->{xvfb}
+ && (-x $::lx_office_conf{applications}->{openofficeorg_writer}) && (-x $::lx_office_conf{applications}->{xvfb})
&& !$options{no_opendocument_pdf}) ?
opthash("opendocument_pdf", $form->{DF}{"opendocument_pdf"}, $locale->text("PDF (OpenDocument/OASIS)")) : undef,
- ($main::latex_templates) ?
+ ($::lx_office_conf{print_templates}->{latex}) ?
opthash("pdf", $form->{DF}{pdf}, $locale->text('PDF')) : undef,
- ($main::latex_templates && !$options{no_postscript}) ?
+ ($::lx_office_conf{print_templates}->{latex} && !$options{no_postscript}) ?
opthash("postscript", $form->{DF}{postscript}, $locale->text('Postscript')) : undef,
(!$options{no_html}) ?
opthash("html", $form->{DF}{html}, "HTML") : undef,
- ($main::opendocument_templates && !$options{no_opendocument}) ?
+ ($::lx_office_conf{print_templates}->{opendocument} && !$options{no_opendocument}) ?
opthash("opendocument", $form->{DF}{opendocument}, $locale->text("OpenDocument/OASIS")) : undef,
- ($main::excel_templates && !$options{no_excel}) ?
+ ($::lx_office_conf{print_templates}->{excel} && !$options{no_excel}) ?
opthash("excel", $form->{DF}{excel}, $locale->text("Excel")) : undef;
push @LANGUAGE_ID,
);
my %template_vars = (
- display_copies => scalar @{ $form->{printers} || [] } && $main::latex_templates && $form->{media} ne 'email',
+ display_copies => scalar @{ $form->{printers} || [] } && $::lx_office_conf{print_templates}->{latex} && $form->{media} ne 'email',
display_remove_draft => (!$form->{id} && $form->{draft_id}),
display_groupitems => !$dont_display_groupitems{$form->{type}},
groupitems_checked => $form->{groupitems} ? "checked" : '',
my $filename;
if ($filename = $queued{ $form->{formname} }) {
$form->{queued} =~ s/\Q$form->{formname} $filename\E//;
- unlink "$main::spool/$filename";
+ unlink $::lx_office_conf{paths}->{spool} . "/$filename";
$filename =~ s/\..*$//g;
} else {
$filename = time;
}
$filename .= ($form->{postscript}) ? '.ps' : '.pdf';
- $form->{OUT} = ">$main::spool/$filename";
+ $form->{OUT} = ">" . $::lx_office_conf{paths}->{spool} . "/$filename";
# add type
$form->{queued} .= " $form->{formname} $filename";
}
# /saving the history
- $form->parse_template(\%myconfig, $main::userspath);
+ $form->parse_template(\%myconfig);
$form->{callback} = "";
$form->{vc} = 'vendor';
# create links
- $form->{webdav} = $main::webdav;
+ $form->{webdav} = $::lx_office_conf{system}->{webdav};
$form->{jsscript} = 1;
$form->create_links("AP", \%myconfig, "vendor");
$form->{vc} = 'customer';
# create links
- $form->{webdav} = $main::webdav;
- $form->{lizenzen} = $main::lizenzen;
+ $form->{webdav} = $::lx_office_conf{system}->{webdav};
+ $form->{lizenzen} = $::lx_office_conf{system}->{lizenzen};
$form->create_links("AR", \%myconfig, "customer");
# get pricegroups for parts
IS->get_pricegroups_for_parts(\%myconfig, \%$form);
- set_pricegroup($_) for 1 .. $form->{rowcount};
+
+ # Problem: set_pricegroup resets the sellprice of old invoices to the price
+ # currently defined in the pricegroup, which is a problem if the price has
+ # changed, as the old invoice gets the new price
+ # set_pricegroup must never be called, when an old invoice is initially loaded
+
+ # set_pricegroup($_) for 1 .. $form->{rowcount};
}
$main::lxdebug->leave_sub();
}
$form->{"qty_$i"} = $form->format_amount(\%myconfig, $form->{"qty_$i"});
- if ($main::lizenzen) {
+ if ($::lx_office_conf{system}->{lizenzen}) {
if ($form->{"inventory_accno_$i"} ne "") {
$form->{"lizenzen_$i"} = qq|<option></option>|;
foreach my $item (@{ $form->{LIZENZEN}{ $form->{"id_$i"} } }) {
$form->{paidaccounts} = 1;
$form->{rowcount}--;
$form->{invdate} = $form->current_date(\%myconfig);
+
+ # remember pricegroups for "use as template"
+ IS->get_pricegroups_for_parts(\%myconfig, \%$form);
+ set_pricegroup($_) for 1 .. $form->{rowcount};
+
&display_form;
$main::lxdebug->leave_sub();
$main::auth->assert('invoice_edit');
- if (IS->delete_invoice(\%myconfig, \%$form, $main::spool)) {
+ if (IS->delete_invoice(\%myconfig, \%$form)) {
# saving the history
if(!exists $form->{addition}) {
$form->{snumbers} = qq|invnumber_| . $form->{invnumber};
$form->{title} = $locale->text('Add License');
- if (!$main::lizenzen) {
+ if (!$::lx_office_conf{system}->{lizenzen}) {
$form->error(
$locale->text(
- 'The licensing module has been deactivated in lx-erp.conf.')
+ 'The licensing module has been deactivated in the configuration.')
);
}
$form->{title} = $locale->text('Licenses');
- if (!$main::lizenzen) {
+ if (!$::lx_office_conf{system}->{lizenzen}) {
$form->error(
$locale->text(
- 'The licensing module has been deactivated in lx-erp.conf.')
+ 'The licensing module has been deactivated in the configuration.')
);
}
sub show_error {
my $template = shift;
my %myconfig = %main::myconfig;
- $myconfig{countrycode} = $main::language;
+ $myconfig{countrycode} = $::lx_office_conf{system}->{language};
$form->{stylesheet} = 'css/lx-office-erp.css';
$form->header();
$::lxdebug->enter_sub;
my $framesize = _calc_framesize() - 2;
- my $menu = Menu->new($::menufile);
+ my $menu = Menu->new("menu.ini");
$mainlevel = $::form->{level};
$::form->{title} = $::locale->text('Lx-Office');
$::form->header;
my $form = $main::form;
my %myconfig = %main::myconfig;
- my $charset = $main::dbcharset || 'ISO-8859-1';
+ my $charset = $::lx_office_conf{system}->{dbcharset} || 'ISO-8859-1';
my $callback = $form->unescape($form->{callback});
$callback = URI->new($callback)->rel($callback) if $callback;
$callback = "login.pl?action=company_logo" if $callback =~ /^(\.\/)?$/;
my $mainlevel = $form->{level};
$mainlevel =~ s/$mainlevel--//g;
- my $menu = Menu->new($::menufile);
+ my $menu = Menu->new("menu.ini");
$| = 1;
my $mainlevel = $form->{level};
$mainlevel =~ s/$mainlevel--//g;
- my $menu = Menu->new($::menufile);
+ my $menu = Menu->new("menu.ini");
$| = 1;
my $mainlevel = $form->{level};
$mainlevel =~ s/\Q$mainlevel\E--//g;
- my $menu = Menu->new($::menufile);
+ my $menu = Menu->new("menu.ini");
$| = 1;
my $mainlevel = $form->{level};
$mainlevel =~ s/\Q$mainlevel\E--//g;
- my $menu = Menu->new($::menufile);
+ my $menu = Menu->new("menu.ini");
$| = 1;
$form->all_vc(\%myconfig, $form->{vc}, ($form->{vc} eq 'customer') ? "AR" : "AP");
# retrieve order/quotation
- $form->{webdav} = $main::webdav;
+ $form->{webdav} = $::lx_office_conf{system}->{webdav};
$form->{jsscript} = 1;
my $editing = $form->{id};
print $form->parse_html_template("oe/form_footer", {
%TMPL_VAR,
- webdav => $main::webdav,
+ webdav => $::lx_office_conf{system}->{webdav},
print_options => print_options(inline => 1),
label_edit => $locale->text("Edit the $form->{type}"),
label_workflow => $locale->text("Workflow $form->{type}"),
$msg = $locale->text('Quotation deleted!');
$err = $locale->text('Cannot delete quotation!');
}
- if (OE->delete(\%myconfig, \%$form, $main::spool)){
+ if (OE->delete(\%myconfig, \%$form)){
# saving the history
if(!exists $form->{addition}) {
$form->{snumbers} = qq|ordnumber_| . $form->{ordnumber};
}
+ # show pricegroup in newly loaded invoice when creating invoice from quotation/order
+ IS->get_pricegroups_for_parts(\%myconfig, \%$form);
+ set_pricegroup($_) for 1 .. $form->{rowcount};
+
&display_form;
$main::lxdebug->leave_sub();
$form->language_payment(\%myconfig);
- Common::webdav_folder($form) if ($main::webdav);
+ Common::webdav_folder($form);
&form_header;
$form->{title} = $locale->text($title{ $form->{report} });
- my $accrual = ($main::eur) ? "" : "checked";
- my $cash = ($main::eur) ? "checked" : "";
+ my $accrual = $::lx_office_conf{system}->{eur} ? "" : "checked";
+ my $cash = $::lx_office_conf{system}->{eur} ? "checked" : "";
my $year = (localtime)[5] + 1900;
$form->{attachment_filename} = $locale->quote_special_chars('filenames', $locale->text("Statement") . "_$form->{todate}.$attachment_suffix");
$form->{attachment_filename} =~ s/\s+/_/g;
- $form->parse_template(\%myconfig, $main::userspath);
+ $form->parse_template(\%myconfig);
}
}
} else {
$media = qq|
<option value=screen $form->{OP}{screen}>| . $locale->text('Screen');
- if ($myconfig{printer} && $main::latex_templates) {
+ if ($myconfig{printer} && $::lx_office_conf{print_templates}->{latex}) {
$media .= qq|
<option value=printer $form->{OP}{printer}>| . $locale->text('Printer');
}
}
my $format;
- if ($main::latex_templates) {
+ if ($::lx_office_conf{print_templates}->{latex}) {
$format .= qq|
<option value=html $form->{DF}{html}>| . $locale->text('HTML')
. qq| <option value=pdf $form->{DF}{pdf}>| . $locale->text('PDF')
<td><select name=media>$media</select></td>
|;
- if ($myconfig{printer} && $main::latex_templates && $form->{media} ne 'email') {
+ if ($myconfig{printer} && $::lx_office_conf{print_templates}->{latex} && $form->{media} ne 'email') {
$output .= qq|
<td>| . $locale->text('Copies') . qq|
<input name=copies size=2 value=$form->{copies}></td>
my $sepa_xml = SL::SEPA::XML->new('company' => $myconfig->{company},
'creditor_id' => $myconfig->{sepa_creditor_id},
- 'src_charset' => $main::dbcharset || 'ISO-8859-15',
+ 'src_charset' => $::lx_office_conf{system}->{dbcharset} || 'ISO-8859-15',
'message_id' => $message_id,
'grouped' => 1,
'collection' => $vc eq 'customer',
"ean" => $form->{ean},
"description" => $form->{description});
- $form->show_generic_error($locale->text("The selected warehouse is empty.")) if (0 == scalar(@contents));
+ if (0 == scalar(@contents)) {
+ $form->show_generic_error($locale->text("The selected warehouse is empty, or no stocked items where found that match the filter settings."));
+ }
my $all_units = AM->retrieve_units(\%myconfig, $form);
$form->error($locale->text('The warehouse or the bin is missing.'));
}
- if (!$main::show_best_before) {
+ if (!$::lx_office_conf{system}->{show_best_before}) {
$form->{bestbefore} = '';
}
+++ /dev/null
-use Cwd;
-
-use vars qw(
-$dbcharset $eur $ghostscript_bin $html2ps_bin $language $latex_bin
-$latex_templates $lizenzen $memberfile $opendocument_templates
-$openofficeorg_daemon $openofficeorg_daemon_port $openofficeorg_writer_bin
-$pg_dump_exe $pg_restore_exe $sendmail $show_best_before $sid $spool $templates
-$use_rdbo $userspath $vertreter $webdav $xvfb_bin
-);
-
-# path to user configuration files
-$userspath = "users";
-
-# spool directory for batch printing
-$spool = "spool";
-
-# templates base directory
-$templates = "templates";
-
-# member file
-$memberfile = "users/members";
-
-# Wenn Einnahmen-Überschussrechnung, dann auf 1 setzen
-# Wenn Bilanzierung (z.B. GmbH), dann auf 0 setzen
-$eur = 1;
-
-# location of sendmail
-$sendmail = '| /usr/sbin/sendmail -t<%if myconfig_email%> -f <%myconfig_email%><%end%>';
-
-# set language for login and admin
-# currently "de" (German), "de_DE" (new German) and "en" (English, not perfect) are available
-$language = "de";
-
-# Oracle
-$sid = "T80509";
-$ENV{"ORACLE_HOME"} = "/usr/local/oracle";
-
-# if you have latex installed set to 1
-$latex_templates = 1;
-
-# if the server can't find gzip, latex, dvips or pdflatex, add the path
-$ENV{PATH} .= ":/usr/local/bin";
-
-# on mac os X using Fink's Perl libs, add the path
-$ENV{PERL5LIB} .= ":/sw/lib/perl5";
-
-# Aktivierung der verschiedenen Spezialmodule
-$webdav = 0;
-$lizenzen = 1;
-$vertreter = 0;
-$excel_templates = 0; # Minimalunterstützung für Excel-Druckvorlagen
-
-# Zeige Felder für Mindesthaltbarkeitsdatum
-$show_best_before = 0;
-
-## Support fuer OpenDocument-Vorlagen
-# Diese Option legt fest, ob OpenDocument-Vorlagen generell verfuegbar sind.
-$opendocument_templates = 1;
-
-# Die folgenden zwei Variablen legen Pfade zu Programmen fest, die benoetigt
-# werden, um OpenDocument-Vorlagen in PDFs umzuwandeln.
-
-# Pfad zu OpenOffice.org writer
-$openofficeorg_writer_bin = "/usr/bin/oowriter";
-
-# Soll OpenOffice dauerhaft gestartet bleiben? Die Konvertierung nachfolgender
-# Dokumente geht dann schneller. Allerdings wird auf dem System ein
-# installiertes Python mit den Python-UNO-Bindings benoetigt, die Bestandteil
-# von OpenOffice sind.
-$openofficeorg_daemon = 1;
-$openofficeorg_daemon_port = 2002;
-
-# Pfad zum "X virtual frame buffer", unter dem OpenOffice gestartet wird.
-# Zusaetzlich muessen die Programme "xauth" und "mcookie" gefunden werden
-# koennen, was eine Aenderung an PATH bedeuten kann.
-$ENV{"PATH"} = $ENV{"PATH"} . ":/usr/X11R6/bin:/usr/X11/bin";
-$xvfb_bin = "/usr/bin/Xvfb";
-
-# Das charset, in dem die Daten in der Datenbank abgelegt sind.
-$dbcharset = 'UTF-8'; # Für UNICODE UTF-8
-# $dbcharset = "ISO-8859-15";
-
-
-# Pfad zu 'html2ps' zum Export von Listenansichten als PDF
-$html2ps_bin = "/usr/bin/html2ps";
-$ghostscript_bin = "/usr/bin/gs";
-
-# Name von bzw. Pfad zu 'pdflatex' oder einer anderen kompatiblen Version
-# wie z.B. 'xetex'
-$latex_bin = 'pdflatex';
-
-# Datenbankbackups werden mit dem externen Programm "pg_dump" erledigt.
-# Wenn es nicht im aktuellen Pfad vorhanden ist, so muss hier der vollständige
-# Pfad eingetragen werden. Wenn die Variable auf "DISABLED" gesetzt wird,
-# so wird der Menüpunkt zum Backup von Datenbanken im Administrationsfrontend
-# nicht angeboten.
-# Das gleiche gilt analog für das Wiederherstellen mittels "pg_restore".
-$pg_dump_exe = "pg_dump";
-$pg_restore_exe = "pg_restore";
-
-# Rose::DB::Object Environment laden.
-# Die RDBO Klassen bieten für Addon Schreiber sehr einfache Interfaces zu den
-# bestehenden Klassen, haben aber den Nachteil, dass der Start des Programms
-# etwa 2s mehr dauert. Damit fällt die Möglichkeit Lx-Office über CGI zu
-# betreiben weg.
-$use_rdbo = 1;
-
-# Globale Debug-Ausgaben (de-)aktivieren? Moegliche Werte sind
-# LXDebug::NONE - keine Debugausgaben
-# LXDebug::INFO
-# LXDebug::DEBUG1
-# LXDebug::DEBUG2
-# LXDebug::QUERY - SQL Queries
-# LXDebug::TRACE - Tracing von Funktionsaufrufen
-# LXDebug::BACKTRACE_ON_ERROR - Vollständiger Aufrufpfad, wenn $form->error() aufgerufen wird
-# LXDebug::REQUEST_TIMER - Timing von Requests loggen
-# LXDebug::WARN - warnings
-# LXDebug::ALL - alle Debugausgaben
-#
-# LXDebug::DEVEL - wie INFO | QUERY | TRACE | BACKTRACE_ON_ERROR
-#
-# Beipiel:
-# $LXDebug::global_level = LXDebug::TRACE | LXDebug::QUERY;
-$LXDebug::global_level = LXDebug->NONE;
-
-# Überwachung der Inhalte von $form aktiviert oder nicht? Wenn ja,
-# dann können einzelne Variablen mit
-# $form->{"Watchdog::<variablenname>"} = 1;
-# überwacht werden. Bedeutet aber auch einen Geschwindigkeitsverlust,
-# weshalb sie normalerweise deaktiviert ist.
-$LXDebug::watch_form = 0;
-
-# Zum debuggen von Latexausgaben. Wenn diese Option auf 1 gesetzt wird, werden
-# temporäre Dateien, die bei der Erstellung von PDFs aus Latex erzeugt werden,
-# nach Abschluß der Erstellung oder im Fehlerfall nicht gelöscht, damit man sie
-# untersuchen kann.
-$::keep_temp_files = 0;
-
-1;
+++ /dev/null
-use Cwd;
-
-use vars qw(
- $dbcharset $eur $ghostscript_bin $html2ps_bin $language $latex_bin
- $latex_templates $lizenzen $memberfile $opendocument_templates
- $openofficeorg_daemon $openofficeorg_daemon_port $openofficeorg_writer_bin
- $parts_image_css $parts_listing_images $parts_show_image $pg_dump_exe
- $pg_restore_exe $sendmail $show_best_before $sid $spool $templates $userspath
- $vertreter $webdav $xvfb_bin
-);
-
-
-# path to user configuration files
-$userspath = "users";
-
-# spool directory for batch printing
-$spool = "spool";
-
-# templates base directory
-$templates = "templates";
-
-# member file
-$memberfile = "users/members";
-
-# Wenn nicht Bilanzierung dann auf 1 setzen
-$eur = 1;
-
-# location of sendmail
-$sendmail = '| /usr/sbin/sendmail -t<%if myconfig_email%> -f <%myconfig_email%><%end%>';
-
-# set language for login and admin
-$language = "de";
-
-# Oracle
-$sid = "T80509";
-$ENV{"ORACLE_HOME"} = "/usr/local/oracle";
-
-# if you have latex installed set to 1
-$latex_templates = 1;
-
-# if the server can't find gzip, latex, dvips or pdflatex, add the path
-$ENV{PATH} .= ":/usr/local/bin";
-
-# on mac os X using Fink's Perl libs, add the path
-$ENV{PERL5LIB} .= ":/sw/lib/perl5";
-
-# Aktivierung der verschiedenen Spezialmodule
-$webdav = 0;
-$lizenzen = 1;
-$vertreter = 0;
-
-# Zeige Felder für Mindesthaltbarkeitsdatum
-$show_best_before = 0;
-
-## Artikelbilder anzeigen
-# Artikelbild in der Detailansicht anzeigen
-$parts_show_image = 1; # [0|1]
-$parts_image_css = 'border:0;float:left;max-width:250px;margin-top:20px:margin-right:10px;margin-left:10px;'; # [belibige valide css definiton]
-# Artikelbilder per default in den Suchergebnissen anzeigen
-$parts_listing_images = 0; # [0|1]
-
-## Support fuer OpenDocument-Vorlagen
-# Diese Option legt fest, ob OpenDocument-Vorlagen generell verfuegbar sind.
-$opendocument_templates = 1;
-
-# Die folgenden zwei Variablen legen Pfade zu Programmen fest, die benoetigt
-# werden, um OpenDocument-Vorlagen in PDFs umzuwandeln.
-
-# Pfad zu OpenOffice.org writer
-$openofficeorg_writer_bin = "/usr/bin/oowriter";
-
-# Soll OpenOffice dauerhaft gestartet bleiben? Die Konvertierung nachfolgender
-# Dokumente geht dann schneller. Allerdings wird auf dem System ein
-# installiertes Python mit den Python-UNO-Bindings benoetigt, die Bestandteil
-# von OpenOffice sind.
-$openofficeorg_daemon = 1;
-$openofficeorg_daemon_port = 2002;
-
-# Pfad zum "X virtual frame buffer", unter dem OpenOffice gestartet wird.
-# Zusaetzlich muessen die Programme "xauth" und "mcookie" gefunden werden
-# koennen, was eine Aenderung an PATH bedeuten kann.
-$ENV{"PATH"} = $ENV{"PATH"} . ":/usr/X11R6/bin:/usr/X11/bin";
-$xvfb_bin = "/usr/bin/Xvfb";
-
-# Das charset, in dem die Daten in der Datenbank abgelegt sind.
-$dbcharset = 'UTF-8'; # Für UNICODE UTF-8
-# $dbcharset = "ISO-8859-15";
-
-
-# Pfad zu 'html2ps' zum Export von Listenansichten als PDF
-$html2ps_bin = "/usr/bin/html2ps";
-$ghostscript_bin = "/usr/bin/gs";
-
-# Name von bzw. Pfad zu 'pdflatex' oder einer anderen kompatiblen Version
-# wie z.B. 'xetex'
-$latex_bin = 'pdflatex';
-
-# Datenbankbackups werden mit dem externen Programm "pg_dump" erledigt.
-# Wenn es nicht im aktuellen Pfad vorhanden ist, so muss hier der vollständige
-# Pfad eingetragen werden. Wenn die Variable auf "DISABLED" gesetzt wird,
-# so wird der Menüpunkt zum Backup von Datenbanken im Administrationsfrontend
-# nicht angeboten.
-# Das gleiche gilt analog für das Wiederherstellen mittels "pg_restore".
-$pg_dump_exe = "pg_dump";
-$pg_restore_exe = "pg_restore";
-
-# Globale Debug-Ausgaben (de-)aktivieren? Moegliche Werte sind
-# LXDebug::NONE - keine Debugausgaben
-# LXDebug::INFO
-# LXDebug::DEBUG1
-# LXDebug::DEBUG2
-# LXDebug::QUERY - SQL Queries
-# LXDebug::TRACE - Tracing von Funktionsaufrufen
-# LXDebug::BACKTRACE_ON_ERROR - Vollständiger Aufrufpfad, wenn $form->error() aufgerufen wird
-# LXDebug::REQUEST_TIMER - Timing von Requests loggen
-# LXDebug::WARN - warnings
-# LXDebug::ALL - alle Debugausgaben
-#
-# LXDebug::DEVEL - wie INFO | QUERY | TRACE | BACKTRACE_ON_ERROR
-#
-# Beipiel:
-# $LXDebug::global_level = LXDebug::TRACE | LXDebug::QUERY;
-$LXDebug::global_level = LXDebug::NONE;
-
-# Überwachung der Inhalte von $form aktiviert oder nicht? Wenn ja,
-# dann können einzelne Variablen mit
-# $form->{"Watchdog::<variablenname>"} = 1;
-# überwacht werden. Bedeutet aber auch einen Geschwindigkeitsverlust,
-# weshalb sie normalerweise deaktiviert ist.
-$LXDebug::watch_form = 0;
-
-# Zum debuggen von Latexausgaben. Wenn diese Option auf 1 gesetzt wird, werden
-# temporäre Dateien, die bei der Erstellung von PDFs aus Latex erzeugt werden,
-# nach Abschluß der Erstellung oder im Fehlerfall nicht gelöscht, damit man sie
-# untersuchen kann.
-$::keep_temp_files = 0;
-
-1;
+[system]
+# EUR: Einnahmen-Überschussrechnung (net income method). Set this to 1
+# if your company uses the net income method and to 0 for balacing.
+eur = 1
+
+# Set language for login and admin forms. Currently "de" (German),
+# "de_DE" (new German) and "en" (English, not perfect) are available.
+language = de
+
+# The database charset. Must match the database cluster you want to
+# connect to.
+dbcharset = UTF-8
+
+[features]
+# Activate certain optional features and modules.
+webdav = 0
+lizenzen = 1
+vertreter = 0
+
+# Show fields used for the best before date
+show_best_before = 0
+
+## Pictures for parts
+# Show the picture in the part form
+parts_show_image = 1
+# Style the picture with the following CSS code:
+parts_image_css = border:0;float:left;max-width:250px;margin-top:20px:margin-right:10px;margin-left:10px;
+# Show the picture in the results when you search for parts
+parts_listing_images = 0
+
+[paths]
+# path to temporary files (must be writeable by the web server)
+userspath = users
+# spool directory for batch printing
+spool = spool
+# templates base directory
+templates = templates
+# Path to the old memberfile (ignored on new installations)
+memberfile = users/members
+
+[applications]
+# Location of sendmail
+sendmail = /usr/sbin/sendmail -t<%if myconfig_email%> -f <%myconfig_email%><%end%>
+# Location of OpenOffice.org writer
+openofficeorg_writer = oowriter
+# Location of the X virtual frame buffer used for OpenOffice
+xvfb = Xvfb
+# Location of the html2ps binary
+html2ps = html2ps
+# Location of the Ghostscript binary
+ghostscript = gs
+# Location of the pdflatex (or compatible, e.g. xetex) binary
+latex = pdflatex
+# Location of the two executables "pg_dump" and "pg_restore" used for
+# database backup and restoration from the admin section. If
+# "pg_dump" or "pg_restore" is set to "DISABLED" then the
+# corresponding option (backup/restoration) will be hidden from the
+# admin section.
+pg_dump = pg_dump
+pg_restore = pg_restore
+
+[environment]
+# Add the following paths to the PATH environment variable.
+path = /usr/local/bin:/usr/X11R6/bin:/usr/X11/bin
+# Add the following paths to the PERL5LIB environment variable.
+# "/sw/lib/perl5" is for Mac OS X with Fink's Perl.
+lib = /sw/lib/perl5
+
+[print_templates]
+# If you have LaTeX installed set to 1
+latex = 1
+# Minimal support for Excel print templates
+excel = 0
+# Enable or disable support for OpenDocument print templates
+opendocument = 1
+# Chose whether or not OpenOffice should remain running after a
+# conversion. If yes then the conversion of subsequent documents will
+# be a lot faster. You need to have Python and the Python UNO bindings
+# (part of OpenOffice) installed.
+openofficeorg_daemon = 1
+openofficeorg_daemon_port = 2002
+
[task_server]
# User name to use for database access
login = mb
[periodic_invoices]
# The user name a report about the posted and printed invoices is sent
# to.
-send_email_to = login
+send_email_to = mb
# The "From:" header for said email.
email_from = Lx-Office Daemon <root@localhost>
# The subject for said email.
# The template file used for the email's body.
email_template = templates/webpages/oe/periodic_invoices_email.txt
-[Console]
+[console]
# autologin to use if none is given
-login = demo
+login = mb
# autorun lines will be executed after autologin.
# be warned that loading huge libraries will noticably lengthen startup time.
-#autorun = use SL::Module
-# = use SL::Other::Module
+#autorun = require "bin/mozilla/common.pl";
+# = use English qw(-no_match_vars);
+# = use List::Util qw(min max);
+# = sub take { my $max = shift; my $r = ref($_[0]) eq 'ARRAY' ? $_[0] : \@_; return @{$r}[0..List::Util::min($max, scalar(@{$r})) - 1]; }
# location of history file for permanent history
history_file = users/console_history
= log4perl.appender.A1.mode=append
= log4perl.appender.A1.layout=Log::Log4perl::Layout::PatternLayout
= log4perl.appender.A1.layout.ConversionPattern=%d %p> %F{1}:%L %M - %m%n
+
+# Activate certain global debug messages. If you want to combine
+# several options then list them seperated by spaces.
+#
+# Possible values include:
+# NONE - no debug output (default)
+# INFO
+# DEBUG1
+# DEBUG2
+# QUERY - Dump SQL queries (only in legacy code; see also "dbix_log4perl" above)
+# TRACE - Track function calls and returns
+# BACKTRACE_ON_ERROR - Print a function call backtrace when $form->error() is called
+# REQUEST_TIMER - Log timing of HTTP requests
+# WARN - warnings
+# ALL - all possible debug messages
+#
+# DEVEL - sames as "INFO QUERY TRACE BACKTRACE_ON_ERROR REQUEST_TIMER"
+#
+# Example:
+# global_level = TRACE QUERY
+global_level = NONE
+
+# Activate monitoring of the content of $form. If it is active then
+# monitoring can be turned on for certain variables with the
+# following:
+# $form->{"Watchdog::<variable>"} = 1;
+# Monitoring has a performance cost and is therefore deactivated by
+# default.
+watch_form = 0
+
+# If you want to debug the creation of LaTeX files then set this to 1.
+# That way the temporary LaTeX files created during PDF creation are
+# not removed and remain in the "users" directory.
+keep_temp_files = 0
+
+# The file name where the debug messages are written to.
+file_name = /tmp/mb-lxdebug.log
ist sie deutlich leichter zu lesen.
+=encoding utf8
+
=head1 FastCGI für Lx-Office
=head2 Was ist FastCGI?
Folgende Kombinationen sind getestet:
+ * Apache 2.2.11 (Ubuntu) und mod_fcgid.
* Apache 2.2.11 (Ubuntu) und mod_fastcgi.
- * Apache 2.2.11 (Ubuntu) und mod_fcgid:
Als Perl Backend wird das Modul FCGI.pm verwendet. Vorsicht: FCGI 0.69 und
höher ist extrem strict in der Behandlung von Unicode, und verweigert bestimmte
Zuerst muss das FastCGI-Modul aktiviert werden. Dies kann unter
Debian/Ubuntu z.B. mit folgendem Befehl geschehen:
- a2enmod fastcgi
+ a2enmod fcgid
bzw.
- a2enmod fcgid
+ a2enmod fastcgi
Die Konfiguration für die Verwendung von Lx-Office mit FastCGI erfolgt
durch Anpassung der vorhandenen Alias- und Directory-Direktiven. Dabei
("/path/to/lx-office-erp") und der URL unterschieden, unter der
Lx-Office im Webbrowser erreichbar ist ("/web/path/to/lx-office-erp").
-Folgendes Template funktioniert mit mod_fastcgi:
+Folgendes Template funktioniert mit mod_fcgid:
- AliasMatch ^/web/path/to/lx-office-erp/[^/]+\.pl /path/to/lx-office-erp/dispatcher.fpl
+ AliasMatch ^/web/path/to/lx-office-erp/[^/]+\.pl /path/to/lx-office-erp/dispatcher.fcgi
Alias /web/path/to/lx-office-erp/ /path/to/lx-office-erp/
<Directory /path/to/lx-office-erp>
AllowOverride All
- AddHandler fastcgi-script .fpl
Options ExecCGI Includes FollowSymlinks
Order Allow,Deny
Allow from All
Deny from All
</DirectoryMatch>
-...und für mod_fcgid muss die erste Zeile geändert werden in:
+Für mod_fastcgi muss ein AddHandler ergänzt werden und die erste Zeile geändert werden:
- AliasMatch ^/web/path/to/lx-office-erp/[^/]+\.pl /path/to/lx-office-erp/dispatcher.fcgi
+ AddHandler fastcgi-script .fpl
+ AliasMatch ^/web/path/to/lx-office-erp/[^/]+\.pl /path/to/lx-office-erp/dispatcher.fpl
+
+Das ganze sollte dann so aussehen:
+ AddHandler fastcgi-script .fpl
+ AliasMatch ^/web/path/to/lx-office-erp/[^/]+\.pl /path/to/lx-office-erp/dispatcher.fpl
+ Alias /web/path/to/lx-office-erp/ /path/to/lx-office-erp/
+
+ <Directory /path/to/lx-office-erp>
+ AllowOverride All
+ Options ExecCGI Includes FollowSymlinks
+ Order Allow,Deny
+ Allow from All
+ </Directory>
+
+ <DirectoryMatch /path/to/lx-office-erp/users>
+ Order Deny,Allow
+ Deny from All
+ </DirectoryMatch>
Hierdurch wird nur ein zentraler Dispatcher gestartet. Alle Zugriffe
auf die einzelnen Scripte werden auf diesen umgeleitet. Dadurch, dass
Es ist möglich die gleiche Lx-Office Version parallel unter cgi und fastcgi zu
-betreiben. Dafür bleiben Directorydirektiven bleiben wie oben beschrieben, die
-URLs werden aber umgeleitet:
+betreiben. Dafür bleiben die Directorydirektiven wie oben beschrieben, die URLs
+werden aber umgeleitet:
- # Zugriff ohne FastCGI
+ # Zugriff über cgi
Alias /web/path/to/lx-office-erp /path/to/lx-office-erp
- # Zugriff mit FastCGI:
- AliasMatch ^/web/path/to/lx-office-erp-fcgi/[^/]+\.pl /path/to/lx-office-erp/dispatcher.fpl
- Alias /web/path/to/lx-office-erp-fcgi/ /path/to/lx-office-erp/
+ # Zugriff mit mod_fastcgi:
+ AliasMatch ^/web/path/to/lx-office-erp-fcgid/[^/]+\.pl /path/to/lx-office-erp/dispatcher.fcgi
+ Alias /web/path/to/lx-office-erp-fcgid/ /path/to/lx-office-erp/
+
+ # Zugriff mit mod_fastcgi:
+ AliasMatch ^/web/path/to/lx-office-erp-fastcgi/[^/]+\.pl /path/to/lx-office-erp/dispatcher.fpl
+ Alias /web/path/to/lx-office-erp-fastcgi/ /path/to/lx-office-erp/
Dann ist unter C</web/path/to/lx-office-erp/> die normale Version erreichbar,
-und unter C</web/opath/to/lx-office-erp-fcgi/> die FastCGI Version.
+und unter C</web/opath/to/lx-office-erp-fcgid/> bzw.
+C</web/opath/to/lx-office-erp-fastcgi/> die FastCGI Version.
Achtung:
\input texinfo @c -*-texinfo-*-
@c %**start of header
-@documentencoding UTF-8
@setfilename INSTALL.info
+@documentencoding UTF-8
@settitle Lx-Office Installationsanleitung
@c %**end of header
@menu
* Aktuelle Hinweise:: Andere Informationsquellen als diese Anleitung
* Benötigte Software und Pakete:: Vorraussetzungen zum Betrieb von Lx-Office
-* Installation des Programmpaketes:: Installationsort, Berechtigungen
+* Manuelle Installation des Programmpaketes:: Installationsort, Berechtigungen
* Anpassung der PostgreSQL-Konfiguration:: Verschiedene Aspekte der Datenbankkonfiguration
* Apache-Konfiguration:: Einrichtung eines Aliases und Optionen für das Ausführen von CGI-Scripten
* Benutzerauthentifizierung und Administratorpasswort:: Einrichtung der Authentifizierungsdatenbank und der Passwortüberprüfung
@node Benötigte Software und Pakete
@chapter Benötigte Software und Pakete
-Zum Betrieb von Lx-Office werden zwingend ein Webserver (meist Apache) und ein Datenbankserver (PostgreSQL) benötigt.
+@menu
+* Betriebssystem:: Unterstützte Betriebsysteme und Hinweise für ältere Systeme
+* Pakete:: Benötigte Software und Perlpakete sowie deren Quellen
+@end menu
+
+@node Betriebssystem
+@section Betriebssystem
-Zusätzlich benötigt Lx-Office die folgenden Perl-Pakete, die nicht Bestandteil einer Standard-Perl-Installation sind:
+Lx-Office ist für Linux konzipiert, und sollte auf jedem unixoiden
+Betriebssystem zum Laufen zu kriegen sein. Getestet ist diese Version im
+speziellen auf Debian und Ubuntu, grundsätzlich wurde bei der Auswahl der
+Pakete aber darauf Rücksicht genommen, dass es ohne große Probleme auf den
+derzeit aktuellen verbreiteten Distributionen läuft.
+
+Anfang 2011 sind das folgende Systeme:
@itemize
@item
+Ubuntu 8.04 LTS Hardy Heron
+@item
+Ubuntu 9.10 Karmic Koala
+@item
+Ubuntu 10.04 Lucid Lynx
+@item
+Ubuntu 10.10 Maverick Meerkat
+@item
+Debian 5.0 Lenny
+@item
+Debian 6.0 Squeeze
+@item
+openSUSE 11.2
+@item
+openSUSE 11.3
+@item
+SuSE Linux Enterprice Server 11
+@item
+Fedora 13
+@item
+Fedora 14
+@end itemize
+
+Für die debianoiden Betriebssysteme existiert ein .deb, das deutlich einfacher
+zu installieren ist.
+
+Ubuntu 8.04 LTS hat zusätzlich die Schwierigkeit, dass die Module im Archiv
+recht alt sind, und das viele der benötigten Module nicht einfach zu
+installieren sind. Dafür sollte es kurz nach dem Release ein eigenes .deb
+geben.
+
+Alternativ dazu kann die normale Installation durchgeführt werden
+(@pxref{Manuelle Installation des Programmpaketes}), wenn vorher ein
+Kompatibilitätspaket installiert wird, das die fehlenden Pakete bereitstellt.
+Das Paket ist auf @uref{https://sourceforge.net/projects/lx-office/files/Lx-Office%20ERP/2.6.2/, Sourceforge} unter dem Namen @code{lx-erp-perl-libs-compat-v2.tar.gz} hinterlegt.
+
+Zur Installation das Paket in das entpackte Lx-Office Verzeichnis entpacken:
+
+@code{tar xzf lx-erp-perl-libs-compat-v2.tar.gz /path/to/lx-office/}
+
+Danach sollte der Installationscheck (@pxref{Pakete}) die enthaltenen Pakete erkennen.
+
+@node Pakete
+@section Pakete
+
+Zum Betrieb von Lx-Office werden zwingend ein Webserver (meist Apache)
+und ein Datenbankserver (PostgreSQL, mindestens v8.2) benötigt.
+
+Zusätzlich benötigt Lx-Office die folgenden Perl-Pakete, die nicht Bestandteil
+einer Standard-Perl-Installation sind:
+
+@itemize
+@item
+parent
+@item
Archive::Zip
@item
Class::Accessor
@item
PDF::API2
@item
-Readonly (benötigt) und Readonly::XS (optional)
-@item
Rose::Object
@item
Rose::DB
Gegenüber Version 2.6.0 sind zu dieser Liste 2 Pakete hinzugekommen, @code{URI}
und @code{XML::Writer} sind notwendig. Ohne startet Lx-Office nicht.
+Gegenüber Version 2.6.1 sind @code{parent}, @code{DateTime},
+@code{Rose::Object}, @code{Rose::DB} und @code{Rose::DB::Object} neu
+hinzugekommen. @code{IO::Wrap} wurde entfernt.
+
@code{Email::Address} und @code{List::MoreUtils} sind schon länger feste
Abhängigkeiten, wurden aber bisher mit Lx-Office mitgeliefert. Beide sind auch
in 2.6.1 weiterhin mit ausgeliefert, wurden in einer zukünftigen Version aber
Für Debian oder Ubuntu benötigen Sie diese Pakete:
-@code{apache2 postgresql libarchive-zip-perl libclass-accessor-perl libdatetime-perl libdbi-perl libdbd-pg-perl libpg-perl libemail-address-perl libio-stringy-perl liblist-moreutils-perl libpdf-api2-perl libtemplate-perl libtext-csv-xs-perl libtext-iconv-perl liburi-perl libxml-writer-perl libyaml-perl}
+@code{apache2 postgresql libparent-perl libarchive-zip-perl libclass-accessor-perl libdatetime-perl libdbi-perl libdbd-pg-perl libpg-perl libemail-address-perl liblist-moreutils-perl libpdf-api2-perl librose-object-perl librose-db-perl librose-db-object-perl libtemplate-perl libtext-csv-xs-perl libtext-iconv-perl liburi-perl libxml-writer-perl libyaml-perl}
Für Fedora Core benötigen Sie diese Pakete:
-@code{httpd postgresql-server perl-Class-Accessor perl-DateTime perl-DBI perl-DBD-Pg perl-Email-Address perl-IO-stringy perl-List-MoreUtils perl-PDF-API2 perl-Template-Toolkit perl-Text-CSV_XS perl-Text-Iconv perl-URI perl-XML-Writer perl-YAML}
+@code{httpd postgresql-server perl-parent perl-Class-Accessor perl-DateTime perl-DBI perl-DBD-Pg perl-Email-Address perl-List-MoreUtils perl-PDF-API2 perl-Rose-Object perl-Rose-DB perl-Rose-DB-Object perl-Template-Toolkit perl-Text-CSV_XS perl-Text-Iconv perl-URI perl-XML-Writer perl-YAML}
Für OpenSuSE benötigen Sie diese Pakete:
-@code{apache2 postgresql-server perl-Archive-Zip perl-Class-Accessor perl-DateTime perl-DBI perl-DBD-Pg perl-MailTools perl-IO-stringy perl-List-MoreUtils perl-PDF-API2 perl-Template-Toolkit perl-Text-CSV_XS perl-Text-Iconv perl-URI perl-XML-Writer perl-YAML}
+@code{apache2 postgresql-server perl-Archive-Zip perl-Class-Accessor perl-DateTime perl-DBI perl-DBD-Pg perl-MailTools perl-List-MoreUtils perl-PDF-API2 perl-Template-Toolkit perl-Text-CSV_XS perl-Text-Iconv perl-URI perl-XML-Writer perl-YAML}
+
+Bei openSuSE 11 ist @code{parent} bereits enthalten, und braucht nicht nachinstalliert werden. Die @code{Rose::*} Pakete sind derzeit nicht für SuSE gepackt, und müssen anderweitig nachinstalliert werden.
Lx-Office enthält ein Script, mit dem überprüft werden kann, ob alle
benötigten Perl-Module installiert sind. Der Aufruf lautet wie folgt:
@c ---------------------------------------------------------------
-@node Installation des Programmpaketes
-@chapter Installation des Programmpaketes
+@node Manuelle Installation des Programmpaketes
+@chapter Manuelle Installation des Programmpaketes
-Die Lx-Office ERP Installationsdatei (lxoffice-erp-2.6.1.tgz) wird im
+Die Lx-Office ERP Installationsdatei (lxoffice-erp-2.6.2.tgz) wird im
Dokumentenverzeichnis des Webservers (z.B. @code{/var/www/html/},
@code{/srv/www/htdocs} oder @code{/var/www/}) entpackt:
@code{cd /var/www
@*
-tar xvzf lxoffice-erp-2.6.1.tgz}
+tar xvzf lxoffice-erp-2.6.2.tgz}
Verändern Sie evtl. noch den Namen des Verzeichnisses mit
In der Datei @code{postgresql.conf}, die je nach Distribution in
verschiedenen Verzeichnissen liegen kann
(z.B. @code{/var/lib/pgsql/data/} oder @code{/etc/postgresql/}, muss
-sichergestellt werden, dass TCP/IP-Verbindungen aktiviert sind. Für
-PostgreSQL vor Version v8.0 lautete dieser Parameter
-
-@code{TCPIP_SOCKET = 1}
-
-Ab v8.0 wird das Verhalten hingegen über den neuen Parameter
-@code{listen_address} gesteuert. Laufen PostgreSQL und Lx-Office auf
-demselben Rechner, so kann dort der Wert @code{localhost} verwendet
-werden. Andernfalls müssen Datenbankverbindungen auch von anderen
-Rechnern aus zugelassen werden, was mit dem Wert \@code{*} geschieht.
+sichergestellt werden, dass TCP/IP-Verbindungen aktiviert sind. Das
+Verhalten wird über den Parameter @code{listen_address}
+gesteuert. Laufen PostgreSQL und Lx-Office auf demselben Rechner, so
+kann dort der Wert @code{localhost} verwendet werden. Andernfalls
+müssen Datenbankverbindungen auch von anderen Rechnern aus zugelassen
+werden, was mit dem Wert \@code{*} geschieht.
In der Datei @code{pg_hba.conf}, die im gleichen Verzeichnis wie die
@code{postgresql.conf} zu finden sein sollte, müssen die
@node Erweiterung für servergespeicherte Prozeduren
@section Erweiterung für servergespeicherte Prozeduren
-In der Datenbank @code{template1} muss die Unterstützung für
-servergespeicherte Prozeduren eingerichet werden. Melden Sie sich
-dafür als Benutzer ``postgres'' an der Datenbank an, und führen Sie
-die folgenden Kommandos aus:
+In der Datenbank @code{template1} muss die Unterstützung für servergespeicherte
+Prozeduren eingerichet werden. Melden Sie sich dafür als Benutzer ``postgres''
+an der Datenbank an, und führen Sie die folgenden Kommandos aus:
+
+@code{create language 'plpgsql';}
+
+Achtung: In älteren Postgresversionen (vor 8.0) muss der Handler für die
+Sprache manuell anlelegt werden, diese Versionen werden aber nicht mehr
+offiziell von Lx-Office unterstützt. Dafür dann die folgenden Kommandos:
@code{create function plpgsql_call_handler () returns opaque as '/usr/lib/pgsql/plpgsql.so' language 'c';
@*
-create language 'plpgsql' handler plpgsql_call_handler
-lancompiler 'pl/pgsql';}
-
-Bitte beachten Sie, dass der Pfad zur Datei @code{plpgsql.so} von
-Distribution zu Distribution verschiedlich sein kann. Bei
-Debian/Ubuntu befindet sie sich unter
-@code{/usr/lib/postgresql/lib/plpgsql.so}, bei Ubuntu 9.10 unter @code{/usr/lib/postgresql/8.4/lib/plpgsql.so}.
+create language 'plpgsql' handler plpgsql_call_handler lancompiler 'pl/pgsql';}
+Bitte beachten Sie, dass der Pfad zur Datei @code{plpgsql.so} von Distribution
+zu Distribution verschiedlich sein kann. Bei Debian/Ubuntu befindet sie sich
+unter @code{/usr/lib/postgresql/lib/plpgsql.so}.
@c ---------------------------------------------------------------
@node Apache-Konfiguration
@chapter Apache-Konfiguration
+Hinweis: Für einen deutlichen Performanceschub sorgt die Ausführung
+mittels FCGI. Die Einrichtung wird ausführlich in der Datei
+@code{INSTALL.fcgi} beschrieben.
+
Der Zugriff auf das Programmverzeichnis muss in der Apache
Webserverkonfigurationsdatei @code{httpd.conf} eingestellt
werden. Fügen Sie den folgenden Abschnitt dieser Datei oder einer
Wenn Sie für die Lx-Office-Installation nicht den europäischen
Schriftsatz ISO-8859-15 sondern UTF-8 (Unicode) benutzen wollen, so
müssen Sie vor dem Anlegen der Datenbank in der Datei
-@code{config/lx-erp.conf} die Variable @code{$dbcharset} auf den Wert
-@samp{UTF-8} setzen. Zusätzlich muss beim Anlegen der Datenbank
-@samp{UTF-8 Unicode} als Schriftsatz ausgewählt werden.
+@code{config/lx_office.conf} die Variable @code{dbcharset} im
+Abschnitt @code{system} auf den Wert @samp{UTF-8} setzen. Zusätzlich
+muss beim Anlegen der Datenbank @samp{UTF-8 Unicode} als Schriftsatz
+ausgewählt werden.
Bitte beachten Sie, dass alle Datenbanken den selben Zeichensatz
verwenden müssen, da diese Einstellungen momentan global in Lx-Office
@node Migration alter Installationen
@section Migration alter Installationen
-Wenn Lx-Office 2.6.1 über eine ältere Version installiert wird, in der
+Wenn Lx-Office 2.6.2 über eine ältere Version installiert wird, in der
die Benutzerdaten noch im Dateisystem im Verzeichnis @code{users}
verwaltet wurden, so bietet Lx-Office die Möglichkeit, diese
Benutzerdaten automatisch in die Authentifizierungsdatenbank zu
erzeugt. Lx-Office kann dabei sowohl neue OpenDocument-Dokumente als
auch aus diesen direkt PDF-Dateien erzeugen. Um die Unterstützung von
OpenDocument-Vorlagen zu aktivieren muss in der Datei
-@code{config/lx-erp.conf} die Variable @code{$opendocument_templates}
-auf @samp{1} stehen. Dieses ist die Standardeinstellung.
+@code{config/lx_office.conf} die Variable @code{opendocument} im
+Abschnitt @code{print_templates} auf @samp{1} stehen. Dieses ist die
+Standardeinstellung.
-Weiterhin muss in der Datei @code{config/lx-erp.conf} die Variable
-@code{$dbcharset} auf die Zeichenkodierung gesetzt werden, die auch
-bei der Speicherung der Daten in der Datenbank verwendet wird. Diese
-ist in den meisten Fällen "UTF-8".
+Weiterhin muss in der Datei @code{config/lx_office.conf} die Variable
+@code{dbcharset} im Abschnitt @code{system} auf die Zeichenkodierung
+gesetzt werden, die auch bei der Speicherung der Daten in der
+Datenbank verwendet wird. Diese ist in den meisten Fällen "UTF-8".
Während die Erzeugung von reinen OpenDocument-Dateien keinerlei
weitere Software benötigt, wird zur Umwandlung dieser Dateien in PDF
(xvfb) installiert werden. Bei Debian ist er im Paket ``xvfb''
enthalten. Andere Distributionen enthalten ihn in anderen Paketen.
-Nach der Installation müssen in der Datei @code{config/lx-erp.conf}
-zwei weitere Variablen angepasst werden:
-@code{$openofficeorg_writer_bin} muss den vollständigen Pfad zur
-OpenOffice.org Writer-Anwendung enthalten. @code{$xvfb_bin} muss den
-Pfad zum ``X virtual frame buffer'' enthalten.
+Nach der Installation müssen in der Datei @code{config/lx_config.conf}
+zwei weitere Variablen angepasst werden: @code{openofficeorg_writer}
+muss den vollständigen Pfad zur OpenOffice.org Writer-Anwendung
+enthalten. @code{xvfb} muss den Pfad zum ``X virtual frame buffer''
+enthalten. Beide stehen im Abschnitt @code{applications}.
Zusätzlich gibt es zwei verschiedene Arten, wie Lx-Office mit
OpenOffice kommuniziert. Die erste Variante, die benutzt wird, wenn
@code{mv users/.openoffice.org2 users/.openoffice}
-Dieses Verzeichnis, wie auch das komplette @code{users}-Verzeichnis,
-muss vom Webserver beschreibbar sein. Dieses wurde in Schritt
-@code{Installation des Programmpakets} oben bereits erledigt, kann
-aber erneut überprüft werden, wenn die Konvertierung nach PDF
-fehlschlägt.
+Dieses Verzeichnis, wie auch das komplette @code{users}-Verzeichnis, muss vom
+Webserver beschreibbar sein. Dieses wurde bereits erledigt
+(@pxref{Manuelle Installation des Programmpaketes}), kann aber erneut überprüft
+werden, wenn die Konvertierung nach PDF fehlschlägt.
@c ---------------------------------------------------------------
Inhalt der Anleitung
1 Aktuelle Hinweise
2 Benötigte Software und Pakete
-3 Installation des Programmpaketes
+ 2.1 Betriebssystem
+ 2.2 Pakete
+3 Manuelle Installation des Programmpaketes
4 Anpassung der PostgreSQL-Konfiguration
4.1 Zeichensätze/die Verwendung von UTF-8
4.2 Änderungen an Konfigurationsdateien
2 Benötigte Software und Pakete
********************************
+2.1 Betriebssystem
+==================
+
+Lx-Office ist für Linux konzipiert, und sollte auf jedem unixoiden
+Betriebssystem zum Laufen zu kriegen sein. Getestet ist diese Version im
+speziellen auf Debian und Ubuntu, grundsätzlich wurde bei der Auswahl
+der Pakete aber darauf Rücksicht genommen, dass es ohne große Probleme
+auf den derzeit aktuellen verbreiteten Distributionen läuft.
+
+ Anfang 2011 sind das folgende Systeme:
+
+ * Ubuntu 8.04 LTS Hardy Heron
+
+ * Ubuntu 9.10 Karmic Koala
+
+ * Ubuntu 10.04 Lucid Lynx
+
+ * Ubuntu 10.10 Maverick Meerkat
+
+ * Debian 5.0 Lenny
+
+ * Debian 6.0 Squeeze
+
+ * openSUSE 11.2
+
+ * openSUSE 11.3
+
+ * SuSE Linux Enterprice Server 11
+
+ * Fedora 13
+
+ * Fedora 14
+
+ Für die debianoiden Betriebssysteme existiert ein .deb, das deutlich
+einfacher zu installieren ist.
+
+ Ubuntu 8.04 LTS hat zusätzlich die Schwierigkeit, dass die Module im
+Archiv recht alt sind, und das viele der benötigten Module nicht
+einfach zu installieren sind. Dafür sollte es kurz nach dem Release ein
+eigenes .deb geben.
+
+ Alternativ dazu kann die normale Installation durchgeführt werden
+(*note Manuelle Installation des Programmpaketes::), wenn vorher ein
+Kompatibilitätspaket installiert wird, das die fehlenden Pakete
+bereitstellt. Das Paket ist auf Sourceforge
+(https://sourceforge.net/projects/lx-office/files/Lx-Office%20ERP/2.6.2/)
+unter dem Namen `lx-erp-perl-libs-compat-v2.tar.gz' hinterlegt.
+
+ Zur Installation das Paket in das entpackte Lx-Office Verzeichnis
+entpacken:
+
+ `tar xzf lx-erp-perl-libs-compat-v2.tar.gz /path/to/lx-office/'
+
+ Danach sollte der Installationscheck (*note Pakete::) die
+enthaltenen Pakete erkennen.
+
+2.2 Pakete
+==========
+
Zum Betrieb von Lx-Office werden zwingend ein Webserver (meist Apache)
-und ein Datenbankserver (PostgreSQL) benötigt.
+und ein Datenbankserver (PostgreSQL, mindestens v8.2) benötigt.
Zusätzlich benötigt Lx-Office die folgenden Perl-Pakete, die nicht
Bestandteil einer Standard-Perl-Installation sind:
+ * parent
+
* Archive::Zip
* Class::Accessor
* PDF::API2
- * Readonly (benötigt) und Readonly::XS (optional)
-
* Rose::Object
* Rose::DB
Gegenüber Version 2.6.0 sind zu dieser Liste 2 Pakete hinzugekommen,
`URI' und `XML::Writer' sind notwendig. Ohne startet Lx-Office nicht.
+ Gegenüber Version 2.6.1 sind `parent', `DateTime', `Rose::Object',
+`Rose::DB' und `Rose::DB::Object' neu hinzugekommen. `IO::Wrap' wurde
+entfernt.
+
`Email::Address' und `List::MoreUtils' sind schon länger feste
Abhängigkeiten, wurden aber bisher mit Lx-Office mitgeliefert. Beide
sind auch in 2.6.1 weiterhin mit ausgeliefert, wurden in einer
Für Debian oder Ubuntu benötigen Sie diese Pakete:
- `apache2 postgresql libarchive-zip-perl libclass-accessor-perl
-libdatetime-perl libdbi-perl libdbd-pg-perl libpg-perl
-libemail-address-perl libio-stringy-perl liblist-moreutils-perl
-libpdf-api2-perl libtemplate-perl libtext-csv-xs-perl
-libtext-iconv-perl liburi-perl libxml-writer-perl libyaml-perl
-librose-object-perl librose-db-perl librose-db-object-perl
-libreadonly-xs-perl'
+ `apache2 postgresql libparent-perl libarchive-zip-perl
+libclass-accessor-perl libdatetime-perl libdbi-perl libdbd-pg-perl
+libpg-perl libemail-address-perl liblist-moreutils-perl
+libpdf-api2-perl librose-object-perl librose-db-perl
+librose-db-object-perl libtemplate-perl libtext-csv-xs-perl
+libtext-iconv-perl liburi-perl libxml-writer-perl libyaml-perl'
Für Fedora Core benötigen Sie diese Pakete:
- `httpd postgresql-server perl-Class-Accessor perl-DateTime perl-DBI
-perl-DBD-Pg perl-Email-Address perl-IO-stringy perl-List-MoreUtils
-perl-PDF-API2 perl-Template-Toolkit perl-Text-CSV_XS perl-Text-Iconv
-perl-URI perl-XML-Writer perl-YAML'
+ `httpd postgresql-server perl-parent perl-Class-Accessor
+perl-DateTime perl-DBI perl-DBD-Pg perl-Email-Address
+perl-List-MoreUtils perl-PDF-API2 perl-Rose-Object perl-Rose-DB
+perl-Rose-DB-Object perl-Template-Toolkit perl-Text-CSV_XS
+perl-Text-Iconv perl-URI perl-XML-Writer perl-YAML'
Für OpenSuSE benötigen Sie diese Pakete:
`apache2 postgresql-server perl-Archive-Zip perl-Class-Accessor
-perl-DateTime perl-DBI perl-DBD-Pg perl-MailTools perl-IO-stringy
-perl-List-MoreUtils perl-PDF-API2 perl-Template-Toolkit
-perl-Text-CSV_XS perl-Text-Iconv perl-URI perl-XML-Writer perl-YAML'
+perl-DateTime perl-DBI perl-DBD-Pg perl-MailTools perl-List-MoreUtils
+perl-PDF-API2 perl-Template-Toolkit perl-Text-CSV_XS perl-Text-Iconv
+perl-URI perl-XML-Writer perl-YAML'
+
+ Bei openSuSE 11 ist `parent' bereits enthalten, und braucht nicht
+nachinstalliert werden. Die `Rose::*' Pakete sind derzeit nicht für
+SuSE gepackt, und müssen anderweitig nachinstalliert werden.
Lx-Office enthält ein Script, mit dem überprüft werden kann, ob alle
benötigten Perl-Module installiert sind. Der Aufruf lautet wie folgt:
`./scripts/installation_check.pl'
-3 Installation des Programmpaketes
-**********************************
+3 Manuelle Installation des Programmpaketes
+*******************************************
-Die Lx-Office ERP Installationsdatei (lxoffice-erp-2.6.1.tgz) wird im
+Die Lx-Office ERP Installationsdatei (lxoffice-erp-2.6.2.tgz) wird im
Dokumentenverzeichnis des Webservers (z.B. `/var/www/html/',
`/srv/www/htdocs' oder `/var/www/') entpackt:
`cd /var/www
-tar xvzf lxoffice-erp-2.6.1.tgz'
+tar xvzf lxoffice-erp-2.6.2.tgz'
Verändern Sie evtl. noch den Namen des Verzeichnisses mit
In der Datei `postgresql.conf', die je nach Distribution in
verschiedenen Verzeichnissen liegen kann (z.B. `/var/lib/pgsql/data/'
oder `/etc/postgresql/', muss sichergestellt werden, dass
-TCP/IP-Verbindungen aktiviert sind. Für PostgreSQL vor Version v8.0
-lautete dieser Parameter
-
- `TCPIP_SOCKET = 1'
-
- Ab v8.0 wird das Verhalten hingegen über den neuen Parameter
-`listen_address' gesteuert. Laufen PostgreSQL und Lx-Office auf
-demselben Rechner, so kann dort der Wert `localhost' verwendet werden.
-Andernfalls müssen Datenbankverbindungen auch von anderen Rechnern aus
-zugelassen werden, was mit dem Wert \`*' geschieht.
+TCP/IP-Verbindungen aktiviert sind. Das Verhalten wird über den
+Parameter `listen_address' gesteuert. Laufen PostgreSQL und Lx-Office
+auf demselben Rechner, so kann dort der Wert `localhost' verwendet
+werden. Andernfalls müssen Datenbankverbindungen auch von anderen
+Rechnern aus zugelassen werden, was mit dem Wert \`*' geschieht.
In der Datei `pg_hba.conf', die im gleichen Verzeichnis wie die
`postgresql.conf' zu finden sein sollte, müssen die Berichtigungen für
als Benutzer "postgres" an der Datenbank an, und führen Sie die
folgenden Kommandos aus:
+ `create language 'plpgsql';'
+
+ Achtung: In älteren Postgresversionen (vor 8.0) muss der Handler für
+die Sprache manuell anlelegt werden, diese Versionen werden aber nicht
+mehr offiziell von Lx-Office unterstützt. Dafür dann die folgenden
+Kommandos:
+
`create function plpgsql_call_handler () returns opaque as
'/usr/lib/pgsql/plpgsql.so' language 'c';
create language 'plpgsql' handler plpgsql_call_handler lancompiler
Bitte beachten Sie, dass der Pfad zur Datei `plpgsql.so' von
Distribution zu Distribution verschiedlich sein kann. Bei Debian/Ubuntu
-befindet sie sich unter `/usr/lib/postgresql/lib/plpgsql.so', bei
-Ubuntu 9.10 unter `/usr/lib/postgresql/8.4/lib/plpgsql.so'.
+befindet sie sich unter `/usr/lib/postgresql/lib/plpgsql.so'.
4.4 Datenbankbenutzer anlegen
=============================
5 Apache-Konfiguration
**********************
-Der Zugriff auf das Programmverzeichnis muss in der Apache
+Hinweis: Für einen deutlichen Performanceschub sorgt die Ausführung
+mittels FCGI. Die Einrichtung wird ausführlich in der Datei
+`INSTALL.fcgi' beschrieben.
+
+ Der Zugriff auf das Programmverzeichnis muss in der Apache
Webserverkonfigurationsdatei `httpd.conf' eingestellt werden. Fügen Sie
den folgenden Abschnitt dieser Datei oder einer anderen Datei hinzu,
die beim Starten des Webservers eingelesen wird:
Wenn Sie für die Lx-Office-Installation nicht den europäischen
Schriftsatz ISO-8859-15 sondern UTF-8 (Unicode) benutzen wollen, so
müssen Sie vor dem Anlegen der Datenbank in der Datei
-`config/lx-erp.conf' die Variable `$dbcharset' auf den Wert `UTF-8'
-setzen. Zusätzlich muss beim Anlegen der Datenbank `UTF-8 Unicode' als
-Schriftsatz ausgewählt werden.
+`config/lx_office.conf' die Variable `dbcharset' im Abschnitt `system'
+auf den Wert `UTF-8' setzen. Zusätzlich muss beim Anlegen der Datenbank
+`UTF-8 Unicode' als Schriftsatz ausgewählt werden.
Bitte beachten Sie, dass alle Datenbanken den selben Zeichensatz
verwenden müssen, da diese Einstellungen momentan global in Lx-Office
7.6 Migration alter Installationen
==================================
-Wenn Lx-Office 2.6.1 über eine ältere Version installiert wird, in der
+Wenn Lx-Office 2.6.2 über eine ältere Version installiert wird, in der
die Benutzerdaten noch im Dateisystem im Verzeichnis `users' verwaltet
wurden, so bietet Lx-Office die Möglichkeit, diese Benutzerdaten
automatisch in die Authentifizierungsdatenbank zu übernehmen. Dies
Lx-Office kann dabei sowohl neue OpenDocument-Dokumente als auch aus
diesen direkt PDF-Dateien erzeugen. Um die Unterstützung von
OpenDocument-Vorlagen zu aktivieren muss in der Datei
-`config/lx-erp.conf' die Variable `$opendocument_templates' auf `1'
-stehen. Dieses ist die Standardeinstellung.
+`config/lx_office.conf' die Variable `opendocument' im Abschnitt
+`print_templates' auf `1' stehen. Dieses ist die Standardeinstellung.
- Weiterhin muss in der Datei `config/lx-erp.conf' die Variable
-`$dbcharset' auf die Zeichenkodierung gesetzt werden, die auch bei der
-Speicherung der Daten in der Datenbank verwendet wird. Diese ist in den
-meisten Fällen "UTF-8".
+ Weiterhin muss in der Datei `config/lx_office.conf' die Variable
+`dbcharset' im Abschnitt `system' auf die Zeichenkodierung gesetzt
+werden, die auch bei der Speicherung der Daten in der Datenbank
+verwendet wird. Diese ist in den meisten Fällen "UTF-8".
Während die Erzeugung von reinen OpenDocument-Dateien keinerlei
weitere Software benötigt, wird zur Umwandlung dieser Dateien in PDF
(xvfb) installiert werden. Bei Debian ist er im Paket "xvfb"
enthalten. Andere Distributionen enthalten ihn in anderen Paketen.
- Nach der Installation müssen in der Datei `config/lx-erp.conf' zwei
-weitere Variablen angepasst werden: `$openofficeorg_writer_bin' muss
+ Nach der Installation müssen in der Datei `config/lx_config.conf'
+zwei weitere Variablen angepasst werden: `openofficeorg_writer' muss
den vollständigen Pfad zur OpenOffice.org Writer-Anwendung enthalten.
-`$xvfb_bin' muss den Pfad zum "X virtual frame buffer" enthalten.
+`xvfb' muss den Pfad zum "X virtual frame buffer" enthalten. Beide
+stehen im Abschnitt `applications'.
Zusätzlich gibt es zwei verschiedene Arten, wie Lx-Office mit
OpenOffice kommuniziert. Die erste Variante, die benutzt wird, wenn die
`mv users/.openoffice.org2 users/.openoffice'
Dieses Verzeichnis, wie auch das komplette `users'-Verzeichnis, muss
-vom Webserver beschreibbar sein. Dieses wurde in Schritt `Installation
-des Programmpakets' oben bereits erledigt, kann aber erneut überprüft
+vom Webserver beschreibbar sein. Dieses wurde bereits erledigt (*note
+Manuelle Installation des Programmpaketes::), kann aber erneut überprüft
werden, wenn die Konvertierung nach PDF fehlschlägt.
9 Lx-Office ERP verwenden
`http://localhost/lx-office-erp/admin.pl'
+
+\1f
+Local Variables:
+coding: utf-8
+End:
<html lang="en">
<head>
<title>Administratorpasswort - Lx-Office Installationsanleitung</title>
-<meta http-equiv="Content-Type" content="text/html">
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="description" content="Lx-Office Installationsanleitung">
-<meta name="generator" content="makeinfo 4.13">
+<meta name="generator" content="makeinfo 4.11">
<link title="Top" rel="start" href="index.html#Top">
<link rel="up" href="Benutzerauthentifizierung-und-Administratorpasswort.html#Benutzerauthentifizierung-und-Administratorpasswort" title="Benutzerauthentifizierung und Administratorpasswort">
<link rel="prev" href="Grundlagen-zur-Benutzerauthentifizierung.html#Grundlagen-zur-Benutzerauthentifizierung" title="Grundlagen zur Benutzerauthentifizierung">
</head>
<body>
<div class="node">
-<a name="Administratorpasswort"></a>
<p>
-Next: <a rel="next" accesskey="n" href="Authentifizierungsdatenbank.html#Authentifizierungsdatenbank">Authentifizierungsdatenbank</a>,
-Previous: <a rel="previous" accesskey="p" href="Grundlagen-zur-Benutzerauthentifizierung.html#Grundlagen-zur-Benutzerauthentifizierung">Grundlagen zur Benutzerauthentifizierung</a>,
-Up: <a rel="up" accesskey="u" href="Benutzerauthentifizierung-und-Administratorpasswort.html#Benutzerauthentifizierung-und-Administratorpasswort">Benutzerauthentifizierung und Administratorpasswort</a>
+<a name="Administratorpasswort"></a>
+nächstes: <a rel="next" accesskey="n" href="Authentifizierungsdatenbank.html#Authentifizierungsdatenbank">Authentifizierungsdatenbank</a>,
+voriges: <a rel="previous" accesskey="p" href="Grundlagen-zur-Benutzerauthentifizierung.html#Grundlagen-zur-Benutzerauthentifizierung">Grundlagen zur Benutzerauthentifizierung</a>,
+aufwärts: <a rel="up" accesskey="u" href="Benutzerauthentifizierung-und-Administratorpasswort.html#Benutzerauthentifizierung-und-Administratorpasswort">Benutzerauthentifizierung und Administratorpasswort</a>
<hr>
</div>
<html lang="en">
<head>
<title>Aktuelle Hinweise - Lx-Office Installationsanleitung</title>
-<meta http-equiv="Content-Type" content="text/html">
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="description" content="Lx-Office Installationsanleitung">
-<meta name="generator" content="makeinfo 4.13">
+<meta name="generator" content="makeinfo 4.11">
<link title="Top" rel="start" href="index.html#Top">
<link rel="prev" href="index.html#Top" title="Top">
<link rel="next" href="Ben_00c3_00b6tigte-Software-und-Pakete.html#Ben_00c3_00b6tigte-Software-und-Pakete" title="Benötigte Software und Pakete">
</head>
<body>
<div class="node">
-<a name="Aktuelle-Hinweise"></a>
<p>
-Next: <a rel="next" accesskey="n" href="Ben_00c3_00b6tigte-Software-und-Pakete.html#Ben_00c3_00b6tigte-Software-und-Pakete">Benötigte Software und Pakete</a>,
-Previous: <a rel="previous" accesskey="p" href="index.html#Top">Top</a>,
-Up: <a rel="up" accesskey="u" href="index.html#Top">Top</a>
+<a name="Aktuelle-Hinweise"></a>
+nächstes: <a rel="next" accesskey="n" href="Ben_00c3_00b6tigte-Software-und-Pakete.html#Ben_00c3_00b6tigte-Software-und-Pakete">Benötigte Software und Pakete</a>,
+voriges: <a rel="previous" accesskey="p" href="index.html#Top">Top</a>,
+aufwärts: <a rel="up" accesskey="u" href="index.html#Top">Top</a>
<hr>
</div>
<html lang="en">
<head>
<title>Anlegen der Authentifizierungsdatenbank - Lx-Office Installationsanleitung</title>
-<meta http-equiv="Content-Type" content="text/html">
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="description" content="Lx-Office Installationsanleitung">
-<meta name="generator" content="makeinfo 4.13">
+<meta name="generator" content="makeinfo 4.11">
<link title="Top" rel="start" href="index.html#Top">
<link rel="up" href="Benutzerauthentifizierung-und-Administratorpasswort.html#Benutzerauthentifizierung-und-Administratorpasswort" title="Benutzerauthentifizierung und Administratorpasswort">
<link rel="prev" href="Name-des-Session_002dCookies.html#Name-des-Session_002dCookies" title="Name des Session-Cookies">
</head>
<body>
<div class="node">
-<a name="Anlegen-der-Authentifizierungsdatenbank"></a>
<p>
-Previous: <a rel="previous" accesskey="p" href="Name-des-Session_002dCookies.html#Name-des-Session_002dCookies">Name des Session-Cookies</a>,
-Up: <a rel="up" accesskey="u" href="Benutzerauthentifizierung-und-Administratorpasswort.html#Benutzerauthentifizierung-und-Administratorpasswort">Benutzerauthentifizierung und Administratorpasswort</a>
+<a name="Anlegen-der-Authentifizierungsdatenbank"></a>
+voriges: <a rel="previous" accesskey="p" href="Name-des-Session_002dCookies.html#Name-des-Session_002dCookies">Name des Session-Cookies</a>,
+aufwärts: <a rel="up" accesskey="u" href="Benutzerauthentifizierung-und-Administratorpasswort.html#Benutzerauthentifizierung-und-Administratorpasswort">Benutzerauthentifizierung und Administratorpasswort</a>
<hr>
</div>
<html lang="en">
<head>
<title>Anpassung der PostgreSQL-Konfiguration - Lx-Office Installationsanleitung</title>
-<meta http-equiv="Content-Type" content="text/html">
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="description" content="Lx-Office Installationsanleitung">
-<meta name="generator" content="makeinfo 4.13">
+<meta name="generator" content="makeinfo 4.11">
<link title="Top" rel="start" href="index.html#Top">
-<link rel="prev" href="Installation-des-Programmpaketes.html#Installation-des-Programmpaketes" title="Installation des Programmpaketes">
+<link rel="prev" href="Manuelle-Installation-des-Programmpaketes.html#Manuelle-Installation-des-Programmpaketes" title="Manuelle Installation des Programmpaketes">
<link rel="next" href="Apache_002dKonfiguration.html#Apache_002dKonfiguration" title="Apache-Konfiguration">
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
<meta http-equiv="Content-Style-Type" content="text/css">
</head>
<body>
<div class="node">
+<p>
<a name="Anpassung-der-PostgreSQL-Konfiguration"></a>
<a name="Anpassung-der-PostgreSQL_002dKonfiguration"></a>
-<p>
-Next: <a rel="next" accesskey="n" href="Apache_002dKonfiguration.html#Apache_002dKonfiguration">Apache-Konfiguration</a>,
-Previous: <a rel="previous" accesskey="p" href="Installation-des-Programmpaketes.html#Installation-des-Programmpaketes">Installation des Programmpaketes</a>,
-Up: <a rel="up" accesskey="u" href="index.html#Top">Top</a>
+nächstes: <a rel="next" accesskey="n" href="Apache_002dKonfiguration.html#Apache_002dKonfiguration">Apache-Konfiguration</a>,
+voriges: <a rel="previous" accesskey="p" href="Manuelle-Installation-des-Programmpaketes.html#Manuelle-Installation-des-Programmpaketes">Manuelle Installation des Programmpaketes</a>,
+aufwärts: <a rel="up" accesskey="u" href="index.html#Top">Top</a>
<hr>
</div>
<html lang="en">
<head>
<title>Apache-Konfiguration - Lx-Office Installationsanleitung</title>
-<meta http-equiv="Content-Type" content="text/html">
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="description" content="Lx-Office Installationsanleitung">
-<meta name="generator" content="makeinfo 4.13">
+<meta name="generator" content="makeinfo 4.11">
<link title="Top" rel="start" href="index.html#Top">
<link rel="prev" href="Anpassung-der-PostgreSQL_002dKonfiguration.html#Anpassung-der-PostgreSQL_002dKonfiguration" title="Anpassung der PostgreSQL-Konfiguration">
<link rel="next" href="Benutzerauthentifizierung-und-Administratorpasswort.html#Benutzerauthentifizierung-und-Administratorpasswort" title="Benutzerauthentifizierung und Administratorpasswort">
</head>
<body>
<div class="node">
+<p>
<a name="Apache-Konfiguration"></a>
<a name="Apache_002dKonfiguration"></a>
-<p>
-Next: <a rel="next" accesskey="n" href="Benutzerauthentifizierung-und-Administratorpasswort.html#Benutzerauthentifizierung-und-Administratorpasswort">Benutzerauthentifizierung und Administratorpasswort</a>,
-Previous: <a rel="previous" accesskey="p" href="Anpassung-der-PostgreSQL_002dKonfiguration.html#Anpassung-der-PostgreSQL_002dKonfiguration">Anpassung der PostgreSQL-Konfiguration</a>,
-Up: <a rel="up" accesskey="u" href="index.html#Top">Top</a>
+nächstes: <a rel="next" accesskey="n" href="Benutzerauthentifizierung-und-Administratorpasswort.html#Benutzerauthentifizierung-und-Administratorpasswort">Benutzerauthentifizierung und Administratorpasswort</a>,
+voriges: <a rel="previous" accesskey="p" href="Anpassung-der-PostgreSQL_002dKonfiguration.html#Anpassung-der-PostgreSQL_002dKonfiguration">Anpassung der PostgreSQL-Konfiguration</a>,
+aufwärts: <a rel="up" accesskey="u" href="index.html#Top">Top</a>
<hr>
</div>
<h2 class="chapter">5 Apache-Konfiguration</h2>
-<p>Der Zugriff auf das Programmverzeichnis muss in der Apache
+<p>Hinweis: Für einen deutlichen Performanceschub sorgt die Ausführung
+mittels FCGI. Die Einrichtung wird ausführlich in der Datei
+<code>INSTALL.fcgi</code> beschrieben.
+
+ <p>Der Zugriff auf das Programmverzeichnis muss in der Apache
Webserverkonfigurationsdatei <code>httpd.conf</code> eingestellt
werden. Fügen Sie den folgenden Abschnitt dieser Datei oder einer
anderen Datei hinzu, die beim Starten des Webservers eingelesen wird:
<html lang="en">
<head>
<title>Authentifizierungsdatenbank - Lx-Office Installationsanleitung</title>
-<meta http-equiv="Content-Type" content="text/html">
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="description" content="Lx-Office Installationsanleitung">
-<meta name="generator" content="makeinfo 4.13">
+<meta name="generator" content="makeinfo 4.11">
<link title="Top" rel="start" href="index.html#Top">
<link rel="up" href="Benutzerauthentifizierung-und-Administratorpasswort.html#Benutzerauthentifizierung-und-Administratorpasswort" title="Benutzerauthentifizierung und Administratorpasswort">
<link rel="prev" href="Administratorpasswort.html#Administratorpasswort" title="Administratorpasswort">
</head>
<body>
<div class="node">
-<a name="Authentifizierungsdatenbank"></a>
<p>
-Next: <a rel="next" accesskey="n" href="Passwort_00c3_00bcberpr_00c3_00bcfung.html#Passwort_00c3_00bcberpr_00c3_00bcfung">Passwortüberprüfung</a>,
-Previous: <a rel="previous" accesskey="p" href="Administratorpasswort.html#Administratorpasswort">Administratorpasswort</a>,
-Up: <a rel="up" accesskey="u" href="Benutzerauthentifizierung-und-Administratorpasswort.html#Benutzerauthentifizierung-und-Administratorpasswort">Benutzerauthentifizierung und Administratorpasswort</a>
+<a name="Authentifizierungsdatenbank"></a>
+nächstes: <a rel="next" accesskey="n" href="Passwort_00c3_00bcberpr_00c3_00bcfung.html#Passwort_00c3_00bcberpr_00c3_00bcfung">Passwortüberprüfung</a>,
+voriges: <a rel="previous" accesskey="p" href="Administratorpasswort.html#Administratorpasswort">Administratorpasswort</a>,
+aufwärts: <a rel="up" accesskey="u" href="Benutzerauthentifizierung-und-Administratorpasswort.html#Benutzerauthentifizierung-und-Administratorpasswort">Benutzerauthentifizierung und Administratorpasswort</a>
<hr>
</div>
<html lang="en">
<head>
<title>Benötigte Software und Pakete - Lx-Office Installationsanleitung</title>
-<meta http-equiv="Content-Type" content="text/html">
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="description" content="Lx-Office Installationsanleitung">
-<meta name="generator" content="makeinfo 4.13">
+<meta name="generator" content="makeinfo 4.11">
<link title="Top" rel="start" href="index.html#Top">
<link rel="prev" href="Aktuelle-Hinweise.html#Aktuelle-Hinweise" title="Aktuelle Hinweise">
-<link rel="next" href="Installation-des-Programmpaketes.html#Installation-des-Programmpaketes" title="Installation des Programmpaketes">
+<link rel="next" href="Manuelle-Installation-des-Programmpaketes.html#Manuelle-Installation-des-Programmpaketes" title="Manuelle Installation des Programmpaketes">
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
<meta http-equiv="Content-Style-Type" content="text/css">
<style type="text/css"><!--
</head>
<body>
<div class="node">
+<p>
<a name="Ben%c3%b6tigte-Software-und-Pakete"></a>
<a name="Ben_00c3_00b6tigte-Software-und-Pakete"></a>
-<p>
-Next: <a rel="next" accesskey="n" href="Installation-des-Programmpaketes.html#Installation-des-Programmpaketes">Installation des Programmpaketes</a>,
-Previous: <a rel="previous" accesskey="p" href="Aktuelle-Hinweise.html#Aktuelle-Hinweise">Aktuelle Hinweise</a>,
-Up: <a rel="up" accesskey="u" href="index.html#Top">Top</a>
+nächstes: <a rel="next" accesskey="n" href="Manuelle-Installation-des-Programmpaketes.html#Manuelle-Installation-des-Programmpaketes">Manuelle Installation des Programmpaketes</a>,
+voriges: <a rel="previous" accesskey="p" href="Aktuelle-Hinweise.html#Aktuelle-Hinweise">Aktuelle Hinweise</a>,
+aufwärts: <a rel="up" accesskey="u" href="index.html#Top">Top</a>
<hr>
</div>
<h2 class="chapter">2 Benötigte Software und Pakete</h2>
-<p>Zum Betrieb von Lx-Office werden zwingend ein Webserver (meist Apache) und ein Datenbankserver (PostgreSQL) benötigt.
-
- <p>Zusätzlich benötigt Lx-Office die folgenden Perl-Pakete, die nicht Bestandteil einer Standard-Perl-Installation sind:
-
- <ul>
-<li>Archive::Zip
-<li>Class::Accessor
-<li>CGI::Ajax
-<li>DateTime
-<li>DBI
-<li>DBD::Pg
-<li>Email::Address
-<li>List::MoreUtils
-<li>PDF::API2
-<li>Readonly (benötigt) und Readonly::XS (optional)
-<li>Rose::Object
-<li>Rose::DB
-<li>Rose::DB::Object
-<li>Template
-<li>Text::CSV_XS
-<li>Text::Iconv
-<li>URI
-<li>XML::Writer
-<li>YAML
+<ul class="menu">
+<li><a accesskey="1" href="Betriebssystem.html#Betriebssystem">Betriebssystem</a>: Unterstützte Betriebsysteme und Hinweise für ältere Systeme
+<li><a accesskey="2" href="Pakete.html#Pakete">Pakete</a>: Benötigte Software und Perlpakete sowie deren Quellen
</ul>
- <p>Gegenüber Version 2.6.0 sind zu dieser Liste 2 Pakete hinzugekommen, <code>URI</code>
-und <code>XML::Writer</code> sind notwendig. Ohne startet Lx-Office nicht.
-
- <p><code>Email::Address</code> und <code>List::MoreUtils</code> sind schon länger feste
-Abhängigkeiten, wurden aber bisher mit Lx-Office mitgeliefert. Beide sind auch
-in 2.6.1 weiterhin mit ausgeliefert, wurden in einer zukünftigen Version aber
-aus dem Paket entfernt werden. Es wird empfohlen diese Module zusammen mit den
-anderen als Bibliotheken zu installieren.
-
- <p><code>CGI::Ajax</code> ist nach wie vor in einer modifizierten Version mitgeliefert
-und braucht nicht nachinstalliert werden.
-
- <p>Die zu installierenden Pakete können in den verschiedenen Distributionen unterschiedlich heißen.
-
- <p>Für Debian oder Ubuntu benötigen Sie diese Pakete:
-
- <p><code>apache2 postgresql libarchive-zip-perl libclass-accessor-perl libdatetime-perl libdbi-perl libdbd-pg-perl libpg-perl libemail-address-perl libio-stringy-perl liblist-moreutils-perl libpdf-api2-perl libtemplate-perl libtext-csv-xs-perl libtext-iconv-perl liburi-perl libxml-writer-perl libyaml-perl</code>
-
- <p>Für Fedora Core benötigen Sie diese Pakete:
-
- <p><code>httpd postgresql-server perl-Class-Accessor perl-DateTime perl-DBI perl-DBD-Pg perl-Email-Address perl-IO-stringy perl-List-MoreUtils perl-PDF-API2 perl-Template-Toolkit perl-Text-CSV_XS perl-Text-Iconv perl-URI perl-XML-Writer perl-YAML</code>
-
- <p>Für OpenSuSE benötigen Sie diese Pakete:
-
- <p><code>apache2 postgresql-server perl-Archive-Zip perl-Class-Accessor perl-DateTime perl-DBI perl-DBD-Pg perl-MailTools perl-IO-stringy perl-List-MoreUtils perl-PDF-API2 perl-Template-Toolkit perl-Text-CSV_XS perl-Text-Iconv perl-URI perl-XML-Writer perl-YAML</code>
-
- <p>Lx-Office enthält ein Script, mit dem überprüft werden kann, ob alle
-benötigten Perl-Module installiert sind. Der Aufruf lautet wie folgt:
-
- <p><code>./scripts/installation_check.pl</code>
-
-<!-- -->
- </body></html>
+</body></html>
<html lang="en">
<head>
<title>Benutzer anlegen - Lx-Office Installationsanleitung</title>
-<meta http-equiv="Content-Type" content="text/html">
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="description" content="Lx-Office Installationsanleitung">
-<meta name="generator" content="makeinfo 4.13">
+<meta name="generator" content="makeinfo 4.11">
<link title="Top" rel="start" href="index.html#Top">
<link rel="up" href="Benutzer_002d-und-Gruppenverwaltung.html#Benutzer_002d-und-Gruppenverwaltung" title="Benutzer- und Gruppenverwaltung">
<link rel="prev" href="Gruppen-anlegen.html#Gruppen-anlegen" title="Gruppen anlegen">
</head>
<body>
<div class="node">
-<a name="Benutzer-anlegen"></a>
<p>
-Next: <a rel="next" accesskey="n" href="Gruppenmitgliedschaften-verwalten.html#Gruppenmitgliedschaften-verwalten">Gruppenmitgliedschaften verwalten</a>,
-Previous: <a rel="previous" accesskey="p" href="Gruppen-anlegen.html#Gruppen-anlegen">Gruppen anlegen</a>,
-Up: <a rel="up" accesskey="u" href="Benutzer_002d-und-Gruppenverwaltung.html#Benutzer_002d-und-Gruppenverwaltung">Benutzer- und Gruppenverwaltung</a>
+<a name="Benutzer-anlegen"></a>
+nächstes: <a rel="next" accesskey="n" href="Gruppenmitgliedschaften-verwalten.html#Gruppenmitgliedschaften-verwalten">Gruppenmitgliedschaften verwalten</a>,
+voriges: <a rel="previous" accesskey="p" href="Gruppen-anlegen.html#Gruppen-anlegen">Gruppen anlegen</a>,
+aufwärts: <a rel="up" accesskey="u" href="Benutzer_002d-und-Gruppenverwaltung.html#Benutzer_002d-und-Gruppenverwaltung">Benutzer- und Gruppenverwaltung</a>
<hr>
</div>
<html lang="en">
<head>
<title>Benutzer- und Gruppenverwaltung - Lx-Office Installationsanleitung</title>
-<meta http-equiv="Content-Type" content="text/html">
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="description" content="Lx-Office Installationsanleitung">
-<meta name="generator" content="makeinfo 4.13">
+<meta name="generator" content="makeinfo 4.11">
<link title="Top" rel="start" href="index.html#Top">
<link rel="prev" href="Benutzerauthentifizierung-und-Administratorpasswort.html#Benutzerauthentifizierung-und-Administratorpasswort" title="Benutzerauthentifizierung und Administratorpasswort">
<link rel="next" href="OpenDocument_002dVorlagen.html#OpenDocument_002dVorlagen" title="OpenDocument-Vorlagen">
</head>
<body>
<div class="node">
+<p>
<a name="Benutzer--und-Gruppenverwaltung"></a>
<a name="Benutzer_002d-und-Gruppenverwaltung"></a>
-<p>
-Next: <a rel="next" accesskey="n" href="OpenDocument_002dVorlagen.html#OpenDocument_002dVorlagen">OpenDocument-Vorlagen</a>,
-Previous: <a rel="previous" accesskey="p" href="Benutzerauthentifizierung-und-Administratorpasswort.html#Benutzerauthentifizierung-und-Administratorpasswort">Benutzerauthentifizierung und Administratorpasswort</a>,
-Up: <a rel="up" accesskey="u" href="index.html#Top">Top</a>
+nächstes: <a rel="next" accesskey="n" href="OpenDocument_002dVorlagen.html#OpenDocument_002dVorlagen">OpenDocument-Vorlagen</a>,
+voriges: <a rel="previous" accesskey="p" href="Benutzerauthentifizierung-und-Administratorpasswort.html#Benutzerauthentifizierung-und-Administratorpasswort">Benutzerauthentifizierung und Administratorpasswort</a>,
+aufwärts: <a rel="up" accesskey="u" href="index.html#Top">Top</a>
<hr>
</div>
<html lang="en">
<head>
<title>Benutzerauthentifizierung und Administratorpasswort - Lx-Office Installationsanleitung</title>
-<meta http-equiv="Content-Type" content="text/html">
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="description" content="Lx-Office Installationsanleitung">
-<meta name="generator" content="makeinfo 4.13">
+<meta name="generator" content="makeinfo 4.11">
<link title="Top" rel="start" href="index.html#Top">
<link rel="prev" href="Apache_002dKonfiguration.html#Apache_002dKonfiguration" title="Apache-Konfiguration">
<link rel="next" href="Benutzer_002d-und-Gruppenverwaltung.html#Benutzer_002d-und-Gruppenverwaltung" title="Benutzer- und Gruppenverwaltung">
</head>
<body>
<div class="node">
-<a name="Benutzerauthentifizierung-und-Administratorpasswort"></a>
<p>
-Next: <a rel="next" accesskey="n" href="Benutzer_002d-und-Gruppenverwaltung.html#Benutzer_002d-und-Gruppenverwaltung">Benutzer- und Gruppenverwaltung</a>,
-Previous: <a rel="previous" accesskey="p" href="Apache_002dKonfiguration.html#Apache_002dKonfiguration">Apache-Konfiguration</a>,
-Up: <a rel="up" accesskey="u" href="index.html#Top">Top</a>
+<a name="Benutzerauthentifizierung-und-Administratorpasswort"></a>
+nächstes: <a rel="next" accesskey="n" href="Benutzer_002d-und-Gruppenverwaltung.html#Benutzer_002d-und-Gruppenverwaltung">Benutzer- und Gruppenverwaltung</a>,
+voriges: <a rel="previous" accesskey="p" href="Apache_002dKonfiguration.html#Apache_002dKonfiguration">Apache-Konfiguration</a>,
+aufwärts: <a rel="up" accesskey="u" href="index.html#Top">Top</a>
<hr>
</div>
--- /dev/null
+<html lang="en">
+<head>
+<title>Betriebssystem - Lx-Office Installationsanleitung</title>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+<meta name="description" content="Lx-Office Installationsanleitung">
+<meta name="generator" content="makeinfo 4.11">
+<link title="Top" rel="start" href="index.html#Top">
+<link rel="up" href="Ben_00c3_00b6tigte-Software-und-Pakete.html#Ben_00c3_00b6tigte-Software-und-Pakete" title="Benötigte Software und Pakete">
+<link rel="next" href="Pakete.html#Pakete" title="Pakete">
+<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
+<meta http-equiv="Content-Style-Type" content="text/css">
+<style type="text/css"><!--
+ pre.display { font-family:inherit }
+ pre.format { font-family:inherit }
+ pre.smalldisplay { font-family:inherit; font-size:smaller }
+ pre.smallformat { font-family:inherit; font-size:smaller }
+ pre.smallexample { font-size:smaller }
+ pre.smalllisp { font-size:smaller }
+ span.sc { font-variant:small-caps }
+ span.roman { font-family:serif; font-weight:normal; }
+ span.sansserif { font-family:sans-serif; font-weight:normal; }
+--></style>
+</head>
+<body>
+<div class="node">
+<p>
+<a name="Betriebssystem"></a>
+nächstes: <a rel="next" accesskey="n" href="Pakete.html#Pakete">Pakete</a>,
+aufwärts: <a rel="up" accesskey="u" href="Ben_00c3_00b6tigte-Software-und-Pakete.html#Ben_00c3_00b6tigte-Software-und-Pakete">Benötigte Software und Pakete</a>
+<hr>
+</div>
+
+<h3 class="section">2.1 Betriebssystem</h3>
+
+<p>Lx-Office ist für Linux konzipiert, und sollte auf jedem unixoiden
+Betriebssystem zum Laufen zu kriegen sein. Getestet ist diese Version im
+speziellen auf Debian und Ubuntu, grundsätzlich wurde bei der Auswahl der
+Pakete aber darauf Rücksicht genommen, dass es ohne große Probleme auf den
+derzeit aktuellen verbreiteten Distributionen läuft.
+
+ <p>Anfang 2011 sind das folgende Systeme:
+
+ <ul>
+<li>Ubuntu 8.04 LTS Hardy Heron
+<li>Ubuntu 9.10 Karmic Koala
+<li>Ubuntu 10.04 Lucid Lynx
+<li>Ubuntu 10.10 Maverick Meerkat
+<li>Debian 5.0 Lenny
+<li>Debian 6.0 Squeeze
+<li>openSUSE 11.2
+<li>openSUSE 11.3
+<li>SuSE Linux Enterprice Server 11
+<li>Fedora 13
+<li>Fedora 14
+</ul>
+
+ <p>Für die debianoiden Betriebssysteme existiert ein .deb, das deutlich einfacher
+zu installieren ist.
+
+ <p>Ubuntu 8.04 LTS hat zusätzlich die Schwierigkeit, dass die Module im Archiv
+recht alt sind, und das viele der benötigten Module nicht einfach zu
+installieren sind. Dafür sollte es kurz nach dem Release ein eigenes .deb
+geben.
+
+ <p>Alternativ dazu kann die normale Installation durchgeführt werden
+(siehe <a href="Manuelle-Installation-des-Programmpaketes.html#Manuelle-Installation-des-Programmpaketes">Manuelle Installation des Programmpaketes</a>), wenn vorher ein
+Kompatibilitätspaket installiert wird, das die fehlenden Pakete bereitstellt.
+Das Paket ist auf <a href="https://sourceforge.net/projects/lx-office/files/Lx-Office%20ERP/2.6.2/">Sourceforge</a> unter dem Namen <code>lx-erp-perl-libs-compat-v2.tar.gz</code> hinterlegt.
+
+ <p>Zur Installation das Paket in das entpackte Lx-Office Verzeichnis entpacken:
+
+ <p><code>tar xzf lx-erp-perl-libs-compat-v2.tar.gz /path/to/lx-office/</code>
+
+ <p>Danach sollte der Installationscheck (siehe <a href="Pakete.html#Pakete">Pakete</a>) die enthaltenen Pakete erkennen.
+
+ </body></html>
+
<html lang="en">
<head>
<title>Datenbankbenutzer anlegen - Lx-Office Installationsanleitung</title>
-<meta http-equiv="Content-Type" content="text/html">
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="description" content="Lx-Office Installationsanleitung">
-<meta name="generator" content="makeinfo 4.13">
+<meta name="generator" content="makeinfo 4.11">
<link title="Top" rel="start" href="index.html#Top">
<link rel="up" href="Anpassung-der-PostgreSQL_002dKonfiguration.html#Anpassung-der-PostgreSQL_002dKonfiguration" title="Anpassung der PostgreSQL-Konfiguration">
<link rel="prev" href="Erweiterung-f_00c3_00bcr-servergespeicherte-Prozeduren.html#Erweiterung-f_00c3_00bcr-servergespeicherte-Prozeduren" title="Erweiterung für servergespeicherte Prozeduren">
</head>
<body>
<div class="node">
-<a name="Datenbankbenutzer-anlegen"></a>
<p>
-Previous: <a rel="previous" accesskey="p" href="Erweiterung-f_00c3_00bcr-servergespeicherte-Prozeduren.html#Erweiterung-f_00c3_00bcr-servergespeicherte-Prozeduren">Erweiterung für servergespeicherte Prozeduren</a>,
-Up: <a rel="up" accesskey="u" href="Anpassung-der-PostgreSQL_002dKonfiguration.html#Anpassung-der-PostgreSQL_002dKonfiguration">Anpassung der PostgreSQL-Konfiguration</a>
+<a name="Datenbankbenutzer-anlegen"></a>
+voriges: <a rel="previous" accesskey="p" href="Erweiterung-f_00c3_00bcr-servergespeicherte-Prozeduren.html#Erweiterung-f_00c3_00bcr-servergespeicherte-Prozeduren">Erweiterung für servergespeicherte Prozeduren</a>,
+aufwärts: <a rel="up" accesskey="u" href="Anpassung-der-PostgreSQL_002dKonfiguration.html#Anpassung-der-PostgreSQL_002dKonfiguration">Anpassung der PostgreSQL-Konfiguration</a>
<hr>
</div>
<html lang="en">
<head>
<title>Datenbanken anlegen - Lx-Office Installationsanleitung</title>
-<meta http-equiv="Content-Type" content="text/html">
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="description" content="Lx-Office Installationsanleitung">
-<meta name="generator" content="makeinfo 4.13">
+<meta name="generator" content="makeinfo 4.11">
<link title="Top" rel="start" href="index.html#Top">
<link rel="up" href="Benutzer_002d-und-Gruppenverwaltung.html#Benutzer_002d-und-Gruppenverwaltung" title="Benutzer- und Gruppenverwaltung">
<link rel="prev" href="Zusammenh_00c3_00a4nge.html#Zusammenh_00c3_00a4nge" title="Zusammenhänge">
</head>
<body>
<div class="node">
-<a name="Datenbanken-anlegen"></a>
<p>
-Next: <a rel="next" accesskey="n" href="Gruppen-anlegen.html#Gruppen-anlegen">Gruppen anlegen</a>,
-Previous: <a rel="previous" accesskey="p" href="Zusammenh_00c3_00a4nge.html#Zusammenh_00c3_00a4nge">Zusammenhänge</a>,
-Up: <a rel="up" accesskey="u" href="Benutzer_002d-und-Gruppenverwaltung.html#Benutzer_002d-und-Gruppenverwaltung">Benutzer- und Gruppenverwaltung</a>
+<a name="Datenbanken-anlegen"></a>
+nächstes: <a rel="next" accesskey="n" href="Gruppen-anlegen.html#Gruppen-anlegen">Gruppen anlegen</a>,
+voriges: <a rel="previous" accesskey="p" href="Zusammenh_00c3_00a4nge.html#Zusammenh_00c3_00a4nge">Zusammenhänge</a>,
+aufwärts: <a rel="up" accesskey="u" href="Benutzer_002d-und-Gruppenverwaltung.html#Benutzer_002d-und-Gruppenverwaltung">Benutzer- und Gruppenverwaltung</a>
<hr>
</div>
<p>Wenn Sie für die Lx-Office-Installation nicht den europäischen
Schriftsatz ISO-8859-15 sondern UTF-8 (Unicode) benutzen wollen, so
müssen Sie vor dem Anlegen der Datenbank in der Datei
-<code>config/lx-erp.conf</code> die Variable <code>$dbcharset</code> auf den Wert
-‘<samp><span class="samp">UTF-8</span></samp>’ setzen. Zusätzlich muss beim Anlegen der Datenbank
-‘<samp><span class="samp">UTF-8 Unicode</span></samp>’ als Schriftsatz ausgewählt werden.
+<code>config/lx_office.conf</code> die Variable <code>dbcharset</code> im
+Abschnitt <code>system</code> auf den Wert ‘<samp><span class="samp">UTF-8</span></samp>’ setzen. Zusätzlich
+muss beim Anlegen der Datenbank ‘<samp><span class="samp">UTF-8 Unicode</span></samp>’ als Schriftsatz
+ausgewählt werden.
<p>Bitte beachten Sie, dass alle Datenbanken den selben Zeichensatz
verwenden müssen, da diese Einstellungen momentan global in Lx-Office
<html lang="en">
<head>
<title>Erweiterung für servergespeicherte Prozeduren - Lx-Office Installationsanleitung</title>
-<meta http-equiv="Content-Type" content="text/html">
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="description" content="Lx-Office Installationsanleitung">
-<meta name="generator" content="makeinfo 4.13">
+<meta name="generator" content="makeinfo 4.11">
<link title="Top" rel="start" href="index.html#Top">
<link rel="up" href="Anpassung-der-PostgreSQL_002dKonfiguration.html#Anpassung-der-PostgreSQL_002dKonfiguration" title="Anpassung der PostgreSQL-Konfiguration">
<link rel="prev" href="_00c3_0084nderungen-an-Konfigurationsdateien.html#g_t_00c3_0084nderungen-an-Konfigurationsdateien" title="Änderungen an Konfigurationsdateien">
</head>
<body>
<div class="node">
+<p>
<a name="Erweiterung-f%c3%bcr-servergespeicherte-Prozeduren"></a>
<a name="Erweiterung-f_00c3_00bcr-servergespeicherte-Prozeduren"></a>
-<p>
-Next: <a rel="next" accesskey="n" href="Datenbankbenutzer-anlegen.html#Datenbankbenutzer-anlegen">Datenbankbenutzer anlegen</a>,
-Previous: <a rel="previous" accesskey="p" href="_00c3_0084nderungen-an-Konfigurationsdateien.html#g_t_00c3_0084nderungen-an-Konfigurationsdateien">Änderungen an Konfigurationsdateien</a>,
-Up: <a rel="up" accesskey="u" href="Anpassung-der-PostgreSQL_002dKonfiguration.html#Anpassung-der-PostgreSQL_002dKonfiguration">Anpassung der PostgreSQL-Konfiguration</a>
+nächstes: <a rel="next" accesskey="n" href="Datenbankbenutzer-anlegen.html#Datenbankbenutzer-anlegen">Datenbankbenutzer anlegen</a>,
+voriges: <a rel="previous" accesskey="p" href="_00c3_0084nderungen-an-Konfigurationsdateien.html#g_t_00c3_0084nderungen-an-Konfigurationsdateien">Änderungen an Konfigurationsdateien</a>,
+aufwärts: <a rel="up" accesskey="u" href="Anpassung-der-PostgreSQL_002dKonfiguration.html#Anpassung-der-PostgreSQL_002dKonfiguration">Anpassung der PostgreSQL-Konfiguration</a>
<hr>
</div>
<h3 class="section">4.3 Erweiterung für servergespeicherte Prozeduren</h3>
-<p>In der Datenbank <code>template1</code> muss die Unterstützung für
-servergespeicherte Prozeduren eingerichet werden. Melden Sie sich
-dafür als Benutzer “postgres” an der Datenbank an, und führen Sie
-die folgenden Kommandos aus:
+<p>In der Datenbank <code>template1</code> muss die Unterstützung für servergespeicherte
+Prozeduren eingerichet werden. Melden Sie sich dafür als Benutzer “postgres”
+an der Datenbank an, und führen Sie die folgenden Kommandos aus:
+
+ <p><code>create language 'plpgsql';</code>
+
+ <p>Achtung: In älteren Postgresversionen (vor 8.0) muss der Handler für die
+Sprache manuell anlelegt werden, diese Versionen werden aber nicht mehr
+offiziell von Lx-Office unterstützt. Dafür dann die folgenden Kommandos:
<p><code>create function plpgsql_call_handler () returns opaque as '/usr/lib/pgsql/plpgsql.so' language 'c';
<br>
-create language 'plpgsql' handler plpgsql_call_handler
-lancompiler 'pl/pgsql';</code>
+create language 'plpgsql' handler plpgsql_call_handler lancompiler 'pl/pgsql';</code>
- <p>Bitte beachten Sie, dass der Pfad zur Datei <code>plpgsql.so</code> von
-Distribution zu Distribution verschiedlich sein kann. Bei
-Debian/Ubuntu befindet sie sich unter
-<code>/usr/lib/postgresql/lib/plpgsql.so</code>, bei Ubuntu 9.10 unter <code>/usr/lib/postgresql/8.4/lib/plpgsql.so</code>.
+ <p>Bitte beachten Sie, dass der Pfad zur Datei <code>plpgsql.so</code> von Distribution
+zu Distribution verschiedlich sein kann. Bei Debian/Ubuntu befindet sie sich
+unter <code>/usr/lib/postgresql/lib/plpgsql.so</code>.
<!-- -->
</body></html>
<html lang="en">
<head>
<title>Grundlagen zur Benutzerauthentifizierung - Lx-Office Installationsanleitung</title>
-<meta http-equiv="Content-Type" content="text/html">
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="description" content="Lx-Office Installationsanleitung">
-<meta name="generator" content="makeinfo 4.13">
+<meta name="generator" content="makeinfo 4.11">
<link title="Top" rel="start" href="index.html#Top">
<link rel="up" href="Benutzerauthentifizierung-und-Administratorpasswort.html#Benutzerauthentifizierung-und-Administratorpasswort" title="Benutzerauthentifizierung und Administratorpasswort">
<link rel="next" href="Administratorpasswort.html#Administratorpasswort" title="Administratorpasswort">
</head>
<body>
<div class="node">
-<a name="Grundlagen-zur-Benutzerauthentifizierung"></a>
<p>
-Next: <a rel="next" accesskey="n" href="Administratorpasswort.html#Administratorpasswort">Administratorpasswort</a>,
-Up: <a rel="up" accesskey="u" href="Benutzerauthentifizierung-und-Administratorpasswort.html#Benutzerauthentifizierung-und-Administratorpasswort">Benutzerauthentifizierung und Administratorpasswort</a>
+<a name="Grundlagen-zur-Benutzerauthentifizierung"></a>
+nächstes: <a rel="next" accesskey="n" href="Administratorpasswort.html#Administratorpasswort">Administratorpasswort</a>,
+aufwärts: <a rel="up" accesskey="u" href="Benutzerauthentifizierung-und-Administratorpasswort.html#Benutzerauthentifizierung-und-Administratorpasswort">Benutzerauthentifizierung und Administratorpasswort</a>
<hr>
</div>
<html lang="en">
<head>
<title>Gruppen anlegen - Lx-Office Installationsanleitung</title>
-<meta http-equiv="Content-Type" content="text/html">
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="description" content="Lx-Office Installationsanleitung">
-<meta name="generator" content="makeinfo 4.13">
+<meta name="generator" content="makeinfo 4.11">
<link title="Top" rel="start" href="index.html#Top">
<link rel="up" href="Benutzer_002d-und-Gruppenverwaltung.html#Benutzer_002d-und-Gruppenverwaltung" title="Benutzer- und Gruppenverwaltung">
<link rel="prev" href="Datenbanken-anlegen.html#Datenbanken-anlegen" title="Datenbanken anlegen">
</head>
<body>
<div class="node">
-<a name="Gruppen-anlegen"></a>
<p>
-Next: <a rel="next" accesskey="n" href="Benutzer-anlegen.html#Benutzer-anlegen">Benutzer anlegen</a>,
-Previous: <a rel="previous" accesskey="p" href="Datenbanken-anlegen.html#Datenbanken-anlegen">Datenbanken anlegen</a>,
-Up: <a rel="up" accesskey="u" href="Benutzer_002d-und-Gruppenverwaltung.html#Benutzer_002d-und-Gruppenverwaltung">Benutzer- und Gruppenverwaltung</a>
+<a name="Gruppen-anlegen"></a>
+nächstes: <a rel="next" accesskey="n" href="Benutzer-anlegen.html#Benutzer-anlegen">Benutzer anlegen</a>,
+voriges: <a rel="previous" accesskey="p" href="Datenbanken-anlegen.html#Datenbanken-anlegen">Datenbanken anlegen</a>,
+aufwärts: <a rel="up" accesskey="u" href="Benutzer_002d-und-Gruppenverwaltung.html#Benutzer_002d-und-Gruppenverwaltung">Benutzer- und Gruppenverwaltung</a>
<hr>
</div>
<html lang="en">
<head>
<title>Gruppenmitgliedschaften verwalten - Lx-Office Installationsanleitung</title>
-<meta http-equiv="Content-Type" content="text/html">
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="description" content="Lx-Office Installationsanleitung">
-<meta name="generator" content="makeinfo 4.13">
+<meta name="generator" content="makeinfo 4.11">
<link title="Top" rel="start" href="index.html#Top">
<link rel="up" href="Benutzer_002d-und-Gruppenverwaltung.html#Benutzer_002d-und-Gruppenverwaltung" title="Benutzer- und Gruppenverwaltung">
<link rel="prev" href="Benutzer-anlegen.html#Benutzer-anlegen" title="Benutzer anlegen">
</head>
<body>
<div class="node">
-<a name="Gruppenmitgliedschaften-verwalten"></a>
<p>
-Next: <a rel="next" accesskey="n" href="Migration-alter-Installationen.html#Migration-alter-Installationen">Migration alter Installationen</a>,
-Previous: <a rel="previous" accesskey="p" href="Benutzer-anlegen.html#Benutzer-anlegen">Benutzer anlegen</a>,
-Up: <a rel="up" accesskey="u" href="Benutzer_002d-und-Gruppenverwaltung.html#Benutzer_002d-und-Gruppenverwaltung">Benutzer- und Gruppenverwaltung</a>
+<a name="Gruppenmitgliedschaften-verwalten"></a>
+nächstes: <a rel="next" accesskey="n" href="Migration-alter-Installationen.html#Migration-alter-Installationen">Migration alter Installationen</a>,
+voriges: <a rel="previous" accesskey="p" href="Benutzer-anlegen.html#Benutzer-anlegen">Benutzer anlegen</a>,
+aufwärts: <a rel="up" accesskey="u" href="Benutzer_002d-und-Gruppenverwaltung.html#Benutzer_002d-und-Gruppenverwaltung">Benutzer- und Gruppenverwaltung</a>
<hr>
</div>
+++ /dev/null
-<html lang="en">
-<head>
-<title>Installation des Programmpaketes - Lx-Office Installationsanleitung</title>
-<meta http-equiv="Content-Type" content="text/html">
-<meta name="description" content="Lx-Office Installationsanleitung">
-<meta name="generator" content="makeinfo 4.13">
-<link title="Top" rel="start" href="index.html#Top">
-<link rel="prev" href="Ben_00c3_00b6tigte-Software-und-Pakete.html#Ben_00c3_00b6tigte-Software-und-Pakete" title="Benötigte Software und Pakete">
-<link rel="next" href="Anpassung-der-PostgreSQL_002dKonfiguration.html#Anpassung-der-PostgreSQL_002dKonfiguration" title="Anpassung der PostgreSQL-Konfiguration">
-<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
-<meta http-equiv="Content-Style-Type" content="text/css">
-<style type="text/css"><!--
- pre.display { font-family:inherit }
- pre.format { font-family:inherit }
- pre.smalldisplay { font-family:inherit; font-size:smaller }
- pre.smallformat { font-family:inherit; font-size:smaller }
- pre.smallexample { font-size:smaller }
- pre.smalllisp { font-size:smaller }
- span.sc { font-variant:small-caps }
- span.roman { font-family:serif; font-weight:normal; }
- span.sansserif { font-family:sans-serif; font-weight:normal; }
---></style>
-</head>
-<body>
-<div class="node">
-<a name="Installation-des-Programmpaketes"></a>
-<p>
-Next: <a rel="next" accesskey="n" href="Anpassung-der-PostgreSQL_002dKonfiguration.html#Anpassung-der-PostgreSQL_002dKonfiguration">Anpassung der PostgreSQL-Konfiguration</a>,
-Previous: <a rel="previous" accesskey="p" href="Ben_00c3_00b6tigte-Software-und-Pakete.html#Ben_00c3_00b6tigte-Software-und-Pakete">Benötigte Software und Pakete</a>,
-Up: <a rel="up" accesskey="u" href="index.html#Top">Top</a>
-<hr>
-</div>
-
-<h2 class="chapter">3 Installation des Programmpaketes</h2>
-
-<p>Die Lx-Office ERP Installationsdatei (lxoffice-erp-2.6.1.tgz) wird im
-Dokumentenverzeichnis des Webservers (z.B. <code>/var/www/html/</code>,
-<code>/srv/www/htdocs</code> oder <code>/var/www/</code>) entpackt:
-
- <p><code>cd /var/www
-<br>
-tar xvzf lxoffice-erp-2.6.1.tgz</code>
-
- <p>Verändern Sie evtl. noch den Namen des Verzeichnisses mit
-
- <p><code>mv lxoffice-erp/ lx-erp/</code>
-
- <p>Alternativ können Sie auch einen Alias in der Webserverkonfiguration
-benutzen, um auf das tatsächliche Installationsverzeichnis zu
-verweisen.
-
- <p>Die Verzeichnisse <code>users</code>, <code>spool</code> und <code>webdav</code> müssen
-für den Benutzer beschreibbar sein, unter dem der Webserver läuft. Die
-restlichen Dateien müssen für diesen Benutzer lesbar sein. Der
-Benutzername ist bei verschiedenen Distributionen unterschiedlich
-(z.B. bei Debian/Ubuntu <code>www-data</code>, bei Fedora core <code>apache</code>
-oder bei OpenSuSE <code>wwwrun</code>).
-
- <p>Der folgende Befehl ändert den Besitzer für die oben genannten
-Verzeichnisse auf einem Debian/Ubuntu-System:
-
- <p><code>chown -R www-data lx-office-erp/users lx-office-erp/spool lx-office-erp/webdav</code>
-
- <p>Weiterhin muss der Webserver-Benutzer im Verzeichnis <code>templates</code> Verzeichnisse für
-jeden neuen Benutzer, der in lx-office angelegt wird, anlegen dürfen:
-
- <p><code>chgrp www-data lx-office-erp/templates; chmod g+w lx-office-erp/templates</code>
-
-<!-- -->
- </body></html>
-
<html lang="en">
<head>
<title>Lx-Office ERP verwenden - Lx-Office Installationsanleitung</title>
-<meta http-equiv="Content-Type" content="text/html">
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="description" content="Lx-Office Installationsanleitung">
-<meta name="generator" content="makeinfo 4.13">
+<meta name="generator" content="makeinfo 4.11">
<link title="Top" rel="start" href="index.html#Top">
<link rel="prev" href="OpenDocument_002dVorlagen.html#OpenDocument_002dVorlagen" title="OpenDocument-Vorlagen">
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
</head>
<body>
<div class="node">
+<p>
<a name="Lx-Office-ERP-verwenden"></a>
<a name="Lx_002dOffice-ERP-verwenden"></a>
-<p>
-Previous: <a rel="previous" accesskey="p" href="OpenDocument_002dVorlagen.html#OpenDocument_002dVorlagen">OpenDocument-Vorlagen</a>,
-Up: <a rel="up" accesskey="u" href="index.html#Top">Top</a>
+voriges: <a rel="previous" accesskey="p" href="OpenDocument_002dVorlagen.html#OpenDocument_002dVorlagen">OpenDocument-Vorlagen</a>,
+aufwärts: <a rel="up" accesskey="u" href="index.html#Top">Top</a>
<hr>
</div>
--- /dev/null
+<html lang="en">
+<head>
+<title>Manuelle Installation des Programmpaketes - Lx-Office Installationsanleitung</title>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+<meta name="description" content="Lx-Office Installationsanleitung">
+<meta name="generator" content="makeinfo 4.11">
+<link title="Top" rel="start" href="index.html#Top">
+<link rel="prev" href="Ben_00c3_00b6tigte-Software-und-Pakete.html#Ben_00c3_00b6tigte-Software-und-Pakete" title="Benötigte Software und Pakete">
+<link rel="next" href="Anpassung-der-PostgreSQL_002dKonfiguration.html#Anpassung-der-PostgreSQL_002dKonfiguration" title="Anpassung der PostgreSQL-Konfiguration">
+<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
+<meta http-equiv="Content-Style-Type" content="text/css">
+<style type="text/css"><!--
+ pre.display { font-family:inherit }
+ pre.format { font-family:inherit }
+ pre.smalldisplay { font-family:inherit; font-size:smaller }
+ pre.smallformat { font-family:inherit; font-size:smaller }
+ pre.smallexample { font-size:smaller }
+ pre.smalllisp { font-size:smaller }
+ span.sc { font-variant:small-caps }
+ span.roman { font-family:serif; font-weight:normal; }
+ span.sansserif { font-family:sans-serif; font-weight:normal; }
+--></style>
+</head>
+<body>
+<div class="node">
+<p>
+<a name="Manuelle-Installation-des-Programmpaketes"></a>
+nächstes: <a rel="next" accesskey="n" href="Anpassung-der-PostgreSQL_002dKonfiguration.html#Anpassung-der-PostgreSQL_002dKonfiguration">Anpassung der PostgreSQL-Konfiguration</a>,
+voriges: <a rel="previous" accesskey="p" href="Ben_00c3_00b6tigte-Software-und-Pakete.html#Ben_00c3_00b6tigte-Software-und-Pakete">Benötigte Software und Pakete</a>,
+aufwärts: <a rel="up" accesskey="u" href="index.html#Top">Top</a>
+<hr>
+</div>
+
+<h2 class="chapter">3 Manuelle Installation des Programmpaketes</h2>
+
+<p>Die Lx-Office ERP Installationsdatei (lxoffice-erp-2.6.2.tgz) wird im
+Dokumentenverzeichnis des Webservers (z.B. <code>/var/www/html/</code>,
+<code>/srv/www/htdocs</code> oder <code>/var/www/</code>) entpackt:
+
+ <p><code>cd /var/www
+<br>
+tar xvzf lxoffice-erp-2.6.2.tgz</code>
+
+ <p>Verändern Sie evtl. noch den Namen des Verzeichnisses mit
+
+ <p><code>mv lxoffice-erp/ lx-erp/</code>
+
+ <p>Alternativ können Sie auch einen Alias in der Webserverkonfiguration
+benutzen, um auf das tatsächliche Installationsverzeichnis zu
+verweisen.
+
+ <p>Die Verzeichnisse <code>users</code>, <code>spool</code> und <code>webdav</code> müssen
+für den Benutzer beschreibbar sein, unter dem der Webserver läuft. Die
+restlichen Dateien müssen für diesen Benutzer lesbar sein. Der
+Benutzername ist bei verschiedenen Distributionen unterschiedlich
+(z.B. bei Debian/Ubuntu <code>www-data</code>, bei Fedora core <code>apache</code>
+oder bei OpenSuSE <code>wwwrun</code>).
+
+ <p>Der folgende Befehl ändert den Besitzer für die oben genannten
+Verzeichnisse auf einem Debian/Ubuntu-System:
+
+ <p><code>chown -R www-data lx-office-erp/users lx-office-erp/spool lx-office-erp/webdav</code>
+
+ <p>Weiterhin muss der Webserver-Benutzer im Verzeichnis <code>templates</code> Verzeichnisse für
+jeden neuen Benutzer, der in lx-office angelegt wird, anlegen dürfen:
+
+ <p><code>chgrp www-data lx-office-erp/templates; chmod g+w lx-office-erp/templates</code>
+
+<!-- -->
+ </body></html>
+
<html lang="en">
<head>
<title>Migration alter Installationen - Lx-Office Installationsanleitung</title>
-<meta http-equiv="Content-Type" content="text/html">
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="description" content="Lx-Office Installationsanleitung">
-<meta name="generator" content="makeinfo 4.13">
+<meta name="generator" content="makeinfo 4.11">
<link title="Top" rel="start" href="index.html#Top">
<link rel="up" href="Benutzer_002d-und-Gruppenverwaltung.html#Benutzer_002d-und-Gruppenverwaltung" title="Benutzer- und Gruppenverwaltung">
<link rel="prev" href="Gruppenmitgliedschaften-verwalten.html#Gruppenmitgliedschaften-verwalten" title="Gruppenmitgliedschaften verwalten">
</head>
<body>
<div class="node">
-<a name="Migration-alter-Installationen"></a>
<p>
-Previous: <a rel="previous" accesskey="p" href="Gruppenmitgliedschaften-verwalten.html#Gruppenmitgliedschaften-verwalten">Gruppenmitgliedschaften verwalten</a>,
-Up: <a rel="up" accesskey="u" href="Benutzer_002d-und-Gruppenverwaltung.html#Benutzer_002d-und-Gruppenverwaltung">Benutzer- und Gruppenverwaltung</a>
+<a name="Migration-alter-Installationen"></a>
+voriges: <a rel="previous" accesskey="p" href="Gruppenmitgliedschaften-verwalten.html#Gruppenmitgliedschaften-verwalten">Gruppenmitgliedschaften verwalten</a>,
+aufwärts: <a rel="up" accesskey="u" href="Benutzer_002d-und-Gruppenverwaltung.html#Benutzer_002d-und-Gruppenverwaltung">Benutzer- und Gruppenverwaltung</a>
<hr>
</div>
<h3 class="section">7.6 Migration alter Installationen</h3>
-<p>Wenn Lx-Office 2.6.1 über eine ältere Version installiert wird, in der
+<p>Wenn Lx-Office 2.6.2 über eine ältere Version installiert wird, in der
die Benutzerdaten noch im Dateisystem im Verzeichnis <code>users</code>
verwaltet wurden, so bietet Lx-Office die Möglichkeit, diese
Benutzerdaten automatisch in die Authentifizierungsdatenbank zu
<html lang="en">
<head>
<title>Name des Session-Cookies - Lx-Office Installationsanleitung</title>
-<meta http-equiv="Content-Type" content="text/html">
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="description" content="Lx-Office Installationsanleitung">
-<meta name="generator" content="makeinfo 4.13">
+<meta name="generator" content="makeinfo 4.11">
<link title="Top" rel="start" href="index.html#Top">
<link rel="up" href="Benutzerauthentifizierung-und-Administratorpasswort.html#Benutzerauthentifizierung-und-Administratorpasswort" title="Benutzerauthentifizierung und Administratorpasswort">
<link rel="prev" href="Passwort_00c3_00bcberpr_00c3_00bcfung.html#Passwort_00c3_00bcberpr_00c3_00bcfung" title="Passwortüberprüfung">
</head>
<body>
<div class="node">
+<p>
<a name="Name-des-Session-Cookies"></a>
<a name="Name-des-Session_002dCookies"></a>
-<p>
-Next: <a rel="next" accesskey="n" href="Anlegen-der-Authentifizierungsdatenbank.html#Anlegen-der-Authentifizierungsdatenbank">Anlegen der Authentifizierungsdatenbank</a>,
-Previous: <a rel="previous" accesskey="p" href="Passwort_00c3_00bcberpr_00c3_00bcfung.html#Passwort_00c3_00bcberpr_00c3_00bcfung">Passwortüberprüfung</a>,
-Up: <a rel="up" accesskey="u" href="Benutzerauthentifizierung-und-Administratorpasswort.html#Benutzerauthentifizierung-und-Administratorpasswort">Benutzerauthentifizierung und Administratorpasswort</a>
+nächstes: <a rel="next" accesskey="n" href="Anlegen-der-Authentifizierungsdatenbank.html#Anlegen-der-Authentifizierungsdatenbank">Anlegen der Authentifizierungsdatenbank</a>,
+voriges: <a rel="previous" accesskey="p" href="Passwort_00c3_00bcberpr_00c3_00bcfung.html#Passwort_00c3_00bcberpr_00c3_00bcfung">Passwortüberprüfung</a>,
+aufwärts: <a rel="up" accesskey="u" href="Benutzerauthentifizierung-und-Administratorpasswort.html#Benutzerauthentifizierung-und-Administratorpasswort">Benutzerauthentifizierung und Administratorpasswort</a>
<hr>
</div>
<html lang="en">
<head>
<title>OpenDocument-Vorlagen - Lx-Office Installationsanleitung</title>
-<meta http-equiv="Content-Type" content="text/html">
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="description" content="Lx-Office Installationsanleitung">
-<meta name="generator" content="makeinfo 4.13">
+<meta name="generator" content="makeinfo 4.11">
<link title="Top" rel="start" href="index.html#Top">
<link rel="prev" href="Benutzer_002d-und-Gruppenverwaltung.html#Benutzer_002d-und-Gruppenverwaltung" title="Benutzer- und Gruppenverwaltung">
<link rel="next" href="Lx_002dOffice-ERP-verwenden.html#Lx_002dOffice-ERP-verwenden" title="Lx-Office ERP verwenden">
</head>
<body>
<div class="node">
+<p>
<a name="OpenDocument-Vorlagen"></a>
<a name="OpenDocument_002dVorlagen"></a>
-<p>
-Next: <a rel="next" accesskey="n" href="Lx_002dOffice-ERP-verwenden.html#Lx_002dOffice-ERP-verwenden">Lx-Office ERP verwenden</a>,
-Previous: <a rel="previous" accesskey="p" href="Benutzer_002d-und-Gruppenverwaltung.html#Benutzer_002d-und-Gruppenverwaltung">Benutzer- und Gruppenverwaltung</a>,
-Up: <a rel="up" accesskey="u" href="index.html#Top">Top</a>
+nächstes: <a rel="next" accesskey="n" href="Lx_002dOffice-ERP-verwenden.html#Lx_002dOffice-ERP-verwenden">Lx-Office ERP verwenden</a>,
+voriges: <a rel="previous" accesskey="p" href="Benutzer_002d-und-Gruppenverwaltung.html#Benutzer_002d-und-Gruppenverwaltung">Benutzer- und Gruppenverwaltung</a>,
+aufwärts: <a rel="up" accesskey="u" href="index.html#Top">Top</a>
<hr>
</div>
erzeugt. Lx-Office kann dabei sowohl neue OpenDocument-Dokumente als
auch aus diesen direkt PDF-Dateien erzeugen. Um die Unterstützung von
OpenDocument-Vorlagen zu aktivieren muss in der Datei
-<code>config/lx-erp.conf</code> die Variable <code>$opendocument_templates</code>
-auf ‘<samp><span class="samp">1</span></samp>’ stehen. Dieses ist die Standardeinstellung.
+<code>config/lx_office.conf</code> die Variable <code>opendocument</code> im
+Abschnitt <code>print_templates</code> auf ‘<samp><span class="samp">1</span></samp>’ stehen. Dieses ist die
+Standardeinstellung.
- <p>Weiterhin muss in der Datei <code>config/lx-erp.conf</code> die Variable
-<code>$dbcharset</code> auf die Zeichenkodierung gesetzt werden, die auch
-bei der Speicherung der Daten in der Datenbank verwendet wird. Diese
-ist in den meisten Fällen "UTF-8".
+ <p>Weiterhin muss in der Datei <code>config/lx_office.conf</code> die Variable
+<code>dbcharset</code> im Abschnitt <code>system</code> auf die Zeichenkodierung
+gesetzt werden, die auch bei der Speicherung der Daten in der
+Datenbank verwendet wird. Diese ist in den meisten Fällen "UTF-8".
<p>Während die Erzeugung von reinen OpenDocument-Dateien keinerlei
weitere Software benötigt, wird zur Umwandlung dieser Dateien in PDF
(xvfb) installiert werden. Bei Debian ist er im Paket “xvfb”
enthalten. Andere Distributionen enthalten ihn in anderen Paketen.
- <p>Nach der Installation müssen in der Datei <code>config/lx-erp.conf</code>
-zwei weitere Variablen angepasst werden:
-<code>$openofficeorg_writer_bin</code> muss den vollständigen Pfad zur
-OpenOffice.org Writer-Anwendung enthalten. <code>$xvfb_bin</code> muss den
-Pfad zum “X virtual frame buffer” enthalten.
+ <p>Nach der Installation müssen in der Datei <code>config/lx_config.conf</code>
+zwei weitere Variablen angepasst werden: <code>openofficeorg_writer</code>
+muss den vollständigen Pfad zur OpenOffice.org Writer-Anwendung
+enthalten. <code>xvfb</code> muss den Pfad zum “X virtual frame buffer”
+enthalten. Beide stehen im Abschnitt <code>applications</code>.
<p>Zusätzlich gibt es zwei verschiedene Arten, wie Lx-Office mit
OpenOffice kommuniziert. Die erste Variante, die benutzt wird, wenn
<p><code>mv users/.openoffice.org2 users/.openoffice</code>
- <p>Dieses Verzeichnis, wie auch das komplette <code>users</code>-Verzeichnis,
-muss vom Webserver beschreibbar sein. Dieses wurde in Schritt
-<code>Installation des Programmpakets</code> oben bereits erledigt, kann
-aber erneut überprüft werden, wenn die Konvertierung nach PDF
-fehlschlägt.
+ <p>Dieses Verzeichnis, wie auch das komplette <code>users</code>-Verzeichnis, muss vom
+Webserver beschreibbar sein. Dieses wurde bereits erledigt
+(siehe <a href="Manuelle-Installation-des-Programmpaketes.html#Manuelle-Installation-des-Programmpaketes">Manuelle Installation des Programmpaketes</a>), kann aber erneut überprüft
+werden, wenn die Konvertierung nach PDF fehlschlägt.
<!-- -->
</body></html>
--- /dev/null
+<html lang="en">
+<head>
+<title>Pakete - Lx-Office Installationsanleitung</title>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+<meta name="description" content="Lx-Office Installationsanleitung">
+<meta name="generator" content="makeinfo 4.11">
+<link title="Top" rel="start" href="index.html#Top">
+<link rel="up" href="Ben_00c3_00b6tigte-Software-und-Pakete.html#Ben_00c3_00b6tigte-Software-und-Pakete" title="Benötigte Software und Pakete">
+<link rel="prev" href="Betriebssystem.html#Betriebssystem" title="Betriebssystem">
+<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
+<meta http-equiv="Content-Style-Type" content="text/css">
+<style type="text/css"><!--
+ pre.display { font-family:inherit }
+ pre.format { font-family:inherit }
+ pre.smalldisplay { font-family:inherit; font-size:smaller }
+ pre.smallformat { font-family:inherit; font-size:smaller }
+ pre.smallexample { font-size:smaller }
+ pre.smalllisp { font-size:smaller }
+ span.sc { font-variant:small-caps }
+ span.roman { font-family:serif; font-weight:normal; }
+ span.sansserif { font-family:sans-serif; font-weight:normal; }
+--></style>
+</head>
+<body>
+<div class="node">
+<p>
+<a name="Pakete"></a>
+voriges: <a rel="previous" accesskey="p" href="Betriebssystem.html#Betriebssystem">Betriebssystem</a>,
+aufwärts: <a rel="up" accesskey="u" href="Ben_00c3_00b6tigte-Software-und-Pakete.html#Ben_00c3_00b6tigte-Software-und-Pakete">Benötigte Software und Pakete</a>
+<hr>
+</div>
+
+<h3 class="section">2.2 Pakete</h3>
+
+<p>Zum Betrieb von Lx-Office werden zwingend ein Webserver (meist Apache)
+und ein Datenbankserver (PostgreSQL, mindestens v8.2) benötigt.
+
+ <p>Zusätzlich benötigt Lx-Office die folgenden Perl-Pakete, die nicht Bestandteil
+einer Standard-Perl-Installation sind:
+
+ <ul>
+<li>parent
+<li>Archive::Zip
+<li>Class::Accessor
+<li>CGI::Ajax
+<li>DateTime
+<li>DBI
+<li>DBD::Pg
+<li>Email::Address
+<li>List::MoreUtils
+<li>PDF::API2
+<li>Rose::Object
+<li>Rose::DB
+<li>Rose::DB::Object
+<li>Template
+<li>Text::CSV_XS
+<li>Text::Iconv
+<li>URI
+<li>XML::Writer
+<li>YAML
+</ul>
+
+ <p>Gegenüber Version 2.6.0 sind zu dieser Liste 2 Pakete hinzugekommen, <code>URI</code>
+und <code>XML::Writer</code> sind notwendig. Ohne startet Lx-Office nicht.
+
+ <p>Gegenüber Version 2.6.1 sind <code>parent</code>, <code>DateTime</code>,
+<code>Rose::Object</code>, <code>Rose::DB</code> und <code>Rose::DB::Object</code> neu
+hinzugekommen. <code>IO::Wrap</code> wurde entfernt.
+
+ <p><code>Email::Address</code> und <code>List::MoreUtils</code> sind schon länger feste
+Abhängigkeiten, wurden aber bisher mit Lx-Office mitgeliefert. Beide sind auch
+in 2.6.1 weiterhin mit ausgeliefert, wurden in einer zukünftigen Version aber
+aus dem Paket entfernt werden. Es wird empfohlen diese Module zusammen mit den
+anderen als Bibliotheken zu installieren.
+
+ <p><code>CGI::Ajax</code> ist nach wie vor in einer modifizierten Version mitgeliefert
+und braucht nicht nachinstalliert werden.
+
+ <p>Die zu installierenden Pakete können in den verschiedenen Distributionen unterschiedlich heißen.
+
+ <p>Für Debian oder Ubuntu benötigen Sie diese Pakete:
+
+ <p><code>apache2 postgresql libparent-perl libarchive-zip-perl libclass-accessor-perl libdatetime-perl libdbi-perl libdbd-pg-perl libpg-perl libemail-address-perl liblist-moreutils-perl libpdf-api2-perl librose-object-perl librose-db-perl librose-db-object-perl libtemplate-perl libtext-csv-xs-perl libtext-iconv-perl liburi-perl libxml-writer-perl libyaml-perl</code>
+
+ <p>Für Fedora Core benötigen Sie diese Pakete:
+
+ <p><code>httpd postgresql-server perl-parent perl-Class-Accessor perl-DateTime perl-DBI perl-DBD-Pg perl-Email-Address perl-List-MoreUtils perl-PDF-API2 perl-Rose-Object perl-Rose-DB perl-Rose-DB-Object perl-Template-Toolkit perl-Text-CSV_XS perl-Text-Iconv perl-URI perl-XML-Writer perl-YAML</code>
+
+ <p>Für OpenSuSE benötigen Sie diese Pakete:
+
+ <p><code>apache2 postgresql-server perl-Archive-Zip perl-Class-Accessor perl-DateTime perl-DBI perl-DBD-Pg perl-MailTools perl-List-MoreUtils perl-PDF-API2 perl-Template-Toolkit perl-Text-CSV_XS perl-Text-Iconv perl-URI perl-XML-Writer perl-YAML</code>
+
+ <p>Bei openSuSE 11 ist <code>parent</code> bereits enthalten, und braucht nicht nachinstalliert werden. Die <code>Rose::*</code> Pakete sind derzeit nicht für SuSE gepackt, und müssen anderweitig nachinstalliert werden.
+
+ <p>Lx-Office enthält ein Script, mit dem überprüft werden kann, ob alle
+benötigten Perl-Module installiert sind. Der Aufruf lautet wie folgt:
+
+ <p><code>./scripts/installation_check.pl</code>
+
+<!-- -->
+ </body></html>
+
<html lang="en">
<head>
<title>Passwortüberprüfung - Lx-Office Installationsanleitung</title>
-<meta http-equiv="Content-Type" content="text/html">
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="description" content="Lx-Office Installationsanleitung">
-<meta name="generator" content="makeinfo 4.13">
+<meta name="generator" content="makeinfo 4.11">
<link title="Top" rel="start" href="index.html#Top">
<link rel="up" href="Benutzerauthentifizierung-und-Administratorpasswort.html#Benutzerauthentifizierung-und-Administratorpasswort" title="Benutzerauthentifizierung und Administratorpasswort">
<link rel="prev" href="Authentifizierungsdatenbank.html#Authentifizierungsdatenbank" title="Authentifizierungsdatenbank">
</head>
<body>
<div class="node">
+<p>
<a name="Passwort%c3%bcberpr%c3%bcfung"></a>
<a name="Passwort_00c3_00bcberpr_00c3_00bcfung"></a>
-<p>
-Next: <a rel="next" accesskey="n" href="Name-des-Session_002dCookies.html#Name-des-Session_002dCookies">Name des Session-Cookies</a>,
-Previous: <a rel="previous" accesskey="p" href="Authentifizierungsdatenbank.html#Authentifizierungsdatenbank">Authentifizierungsdatenbank</a>,
-Up: <a rel="up" accesskey="u" href="Benutzerauthentifizierung-und-Administratorpasswort.html#Benutzerauthentifizierung-und-Administratorpasswort">Benutzerauthentifizierung und Administratorpasswort</a>
+nächstes: <a rel="next" accesskey="n" href="Name-des-Session_002dCookies.html#Name-des-Session_002dCookies">Name des Session-Cookies</a>,
+voriges: <a rel="previous" accesskey="p" href="Authentifizierungsdatenbank.html#Authentifizierungsdatenbank">Authentifizierungsdatenbank</a>,
+aufwärts: <a rel="up" accesskey="u" href="Benutzerauthentifizierung-und-Administratorpasswort.html#Benutzerauthentifizierung-und-Administratorpasswort">Benutzerauthentifizierung und Administratorpasswort</a>
<hr>
</div>
<html lang="en">
<head>
<title>Zeichensätze/die Verwendung von UTF-8 - Lx-Office Installationsanleitung</title>
-<meta http-equiv="Content-Type" content="text/html">
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="description" content="Lx-Office Installationsanleitung">
-<meta name="generator" content="makeinfo 4.13">
+<meta name="generator" content="makeinfo 4.11">
<link title="Top" rel="start" href="index.html#Top">
<link rel="up" href="Anpassung-der-PostgreSQL_002dKonfiguration.html#Anpassung-der-PostgreSQL_002dKonfiguration" title="Anpassung der PostgreSQL-Konfiguration">
<link rel="next" href="_00c3_0084nderungen-an-Konfigurationsdateien.html#g_t_00c3_0084nderungen-an-Konfigurationsdateien" title="Änderungen an Konfigurationsdateien">
</head>
<body>
<div class="node">
+<p>
<a name="Zeichens%c3%a4tze%2fdie-Verwendung-von-UTF-8"></a>
<a name="Zeichens_00c3_00a4tze_002fdie-Verwendung-von-UTF_002d8"></a>
-<p>
-Next: <a rel="next" accesskey="n" href="_00c3_0084nderungen-an-Konfigurationsdateien.html#g_t_00c3_0084nderungen-an-Konfigurationsdateien">Änderungen an Konfigurationsdateien</a>,
-Up: <a rel="up" accesskey="u" href="Anpassung-der-PostgreSQL_002dKonfiguration.html#Anpassung-der-PostgreSQL_002dKonfiguration">Anpassung der PostgreSQL-Konfiguration</a>
+nächstes: <a rel="next" accesskey="n" href="_00c3_0084nderungen-an-Konfigurationsdateien.html#g_t_00c3_0084nderungen-an-Konfigurationsdateien">Änderungen an Konfigurationsdateien</a>,
+aufwärts: <a rel="up" accesskey="u" href="Anpassung-der-PostgreSQL_002dKonfiguration.html#Anpassung-der-PostgreSQL_002dKonfiguration">Anpassung der PostgreSQL-Konfiguration</a>
<hr>
</div>
<html lang="en">
<head>
<title>Zusammenhänge - Lx-Office Installationsanleitung</title>
-<meta http-equiv="Content-Type" content="text/html">
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="description" content="Lx-Office Installationsanleitung">
-<meta name="generator" content="makeinfo 4.13">
+<meta name="generator" content="makeinfo 4.11">
<link title="Top" rel="start" href="index.html#Top">
<link rel="up" href="Benutzer_002d-und-Gruppenverwaltung.html#Benutzer_002d-und-Gruppenverwaltung" title="Benutzer- und Gruppenverwaltung">
<link rel="next" href="Datenbanken-anlegen.html#Datenbanken-anlegen" title="Datenbanken anlegen">
</head>
<body>
<div class="node">
+<p>
<a name="Zusammenh%c3%a4nge"></a>
<a name="Zusammenh_00c3_00a4nge"></a>
-<p>
-Next: <a rel="next" accesskey="n" href="Datenbanken-anlegen.html#Datenbanken-anlegen">Datenbanken anlegen</a>,
-Up: <a rel="up" accesskey="u" href="Benutzer_002d-und-Gruppenverwaltung.html#Benutzer_002d-und-Gruppenverwaltung">Benutzer- und Gruppenverwaltung</a>
+nächstes: <a rel="next" accesskey="n" href="Datenbanken-anlegen.html#Datenbanken-anlegen">Datenbanken anlegen</a>,
+aufwärts: <a rel="up" accesskey="u" href="Benutzer_002d-und-Gruppenverwaltung.html#Benutzer_002d-und-Gruppenverwaltung">Benutzer- und Gruppenverwaltung</a>
<hr>
</div>
<html lang="en">
<head>
<title>Änderungen an Konfigurationsdateien - Lx-Office Installationsanleitung</title>
-<meta http-equiv="Content-Type" content="text/html">
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="description" content="Lx-Office Installationsanleitung">
-<meta name="generator" content="makeinfo 4.13">
+<meta name="generator" content="makeinfo 4.11">
<link title="Top" rel="start" href="index.html#Top">
<link rel="up" href="Anpassung-der-PostgreSQL_002dKonfiguration.html#Anpassung-der-PostgreSQL_002dKonfiguration" title="Anpassung der PostgreSQL-Konfiguration">
<link rel="prev" href="Zeichens_00c3_00a4tze_002fdie-Verwendung-von-UTF_002d8.html#Zeichens_00c3_00a4tze_002fdie-Verwendung-von-UTF_002d8" title="Zeichensätze/die Verwendung von UTF-8">
</head>
<body>
<div class="node">
+<p>
<a name="%c3%84nderungen-an-Konfigurationsdateien"></a>
<a name="g_t_00c3_0084nderungen-an-Konfigurationsdateien"></a>
-<p>
-Next: <a rel="next" accesskey="n" href="Erweiterung-f_00c3_00bcr-servergespeicherte-Prozeduren.html#Erweiterung-f_00c3_00bcr-servergespeicherte-Prozeduren">Erweiterung für servergespeicherte Prozeduren</a>,
-Previous: <a rel="previous" accesskey="p" href="Zeichens_00c3_00a4tze_002fdie-Verwendung-von-UTF_002d8.html#Zeichens_00c3_00a4tze_002fdie-Verwendung-von-UTF_002d8">Zeichensätze/die Verwendung von UTF-8</a>,
-Up: <a rel="up" accesskey="u" href="Anpassung-der-PostgreSQL_002dKonfiguration.html#Anpassung-der-PostgreSQL_002dKonfiguration">Anpassung der PostgreSQL-Konfiguration</a>
+nächstes: <a rel="next" accesskey="n" href="Erweiterung-f_00c3_00bcr-servergespeicherte-Prozeduren.html#Erweiterung-f_00c3_00bcr-servergespeicherte-Prozeduren">Erweiterung für servergespeicherte Prozeduren</a>,
+voriges: <a rel="previous" accesskey="p" href="Zeichens_00c3_00a4tze_002fdie-Verwendung-von-UTF_002d8.html#Zeichens_00c3_00a4tze_002fdie-Verwendung-von-UTF_002d8">Zeichensätze/die Verwendung von UTF-8</a>,
+aufwärts: <a rel="up" accesskey="u" href="Anpassung-der-PostgreSQL_002dKonfiguration.html#Anpassung-der-PostgreSQL_002dKonfiguration">Anpassung der PostgreSQL-Konfiguration</a>
<hr>
</div>
<p>In der Datei <code>postgresql.conf</code>, die je nach Distribution in
verschiedenen Verzeichnissen liegen kann
(z.B. <code>/var/lib/pgsql/data/</code> oder <code>/etc/postgresql/</code>, muss
-sichergestellt werden, dass TCP/IP-Verbindungen aktiviert sind. Für
-PostgreSQL vor Version v8.0 lautete dieser Parameter
-
- <p><code>TCPIP_SOCKET = 1</code>
-
- <p>Ab v8.0 wird das Verhalten hingegen über den neuen Parameter
-<code>listen_address</code> gesteuert. Laufen PostgreSQL und Lx-Office auf
-demselben Rechner, so kann dort der Wert <code>localhost</code> verwendet
-werden. Andernfalls müssen Datenbankverbindungen auch von anderen
-Rechnern aus zugelassen werden, was mit dem Wert \<code>*</code> geschieht.
+sichergestellt werden, dass TCP/IP-Verbindungen aktiviert sind. Das
+Verhalten wird über den Parameter <code>listen_address</code>
+gesteuert. Laufen PostgreSQL und Lx-Office auf demselben Rechner, so
+kann dort der Wert <code>localhost</code> verwendet werden. Andernfalls
+müssen Datenbankverbindungen auch von anderen Rechnern aus zugelassen
+werden, was mit dem Wert \<code>*</code> geschieht.
<p>In der Datei <code>pg_hba.conf</code>, die im gleichen Verzeichnis wie die
<code>postgresql.conf</code> zu finden sein sollte, müssen die
<html lang="en">
<head>
<title>Lx-Office Installationsanleitung</title>
-<meta http-equiv="Content-Type" content="text/html">
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="description" content="Lx-Office Installationsanleitung">
-<meta name="generator" content="makeinfo 4.13">
+<meta name="generator" content="makeinfo 4.11">
<link title="Top" rel="start" href="#Top">
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
<meta http-equiv="Content-Style-Type" content="text/css">
<li><a name="toc_Top" href="index.html#Top">Inhalt der Anleitung</a>
<li><a name="toc_Aktuelle-Hinweise" href="Aktuelle-Hinweise.html#Aktuelle-Hinweise">1 Aktuelle Hinweise</a>
<li><a name="toc_Ben_00c3_00b6tigte-Software-und-Pakete" href="Ben_00c3_00b6tigte-Software-und-Pakete.html#Ben_00c3_00b6tigte-Software-und-Pakete">2 Benötigte Software und Pakete</a>
-<li><a name="toc_Installation-des-Programmpaketes" href="Installation-des-Programmpaketes.html#Installation-des-Programmpaketes">3 Installation des Programmpaketes</a>
+<ul>
+<li><a href="Betriebssystem.html#Betriebssystem">2.1 Betriebssystem</a>
+<li><a href="Pakete.html#Pakete">2.2 Pakete</a>
+</li></ul>
+<li><a name="toc_Manuelle-Installation-des-Programmpaketes" href="Manuelle-Installation-des-Programmpaketes.html#Manuelle-Installation-des-Programmpaketes">3 Manuelle Installation des Programmpaketes</a>
<li><a name="toc_Anpassung-der-PostgreSQL_002dKonfiguration" href="Anpassung-der-PostgreSQL_002dKonfiguration.html#Anpassung-der-PostgreSQL_002dKonfiguration">4 Anpassung der PostgreSQL-Konfiguration</a>
<ul>
<li><a href="Zeichens_00c3_00a4tze_002fdie-Verwendung-von-UTF_002d8.html#Zeichens_00c3_00a4tze_002fdie-Verwendung-von-UTF_002d8">4.1 Zeichensätze/die Verwendung von UTF-8</a>
<div class="node">
-<a name="Top"></a>
<p>
-Next: <a rel="next" accesskey="n" href="Aktuelle-Hinweise.html#Aktuelle-Hinweise">Aktuelle Hinweise</a>,
-Up: <a rel="up" accesskey="u" href="../index.html#dir">(dir)</a>
+<a name="Top"></a>
+nächstes: <a rel="next" accesskey="n" href="Aktuelle-Hinweise.html#Aktuelle-Hinweise">Aktuelle Hinweise</a>,
+aufwärts: <a rel="up" accesskey="u" href="../index.html#dir">(dir)</a>
<hr>
</div>
<ul class="menu">
<li><a accesskey="1" href="Aktuelle-Hinweise.html#Aktuelle-Hinweise">Aktuelle Hinweise</a>: Andere Informationsquellen als diese Anleitung
<li><a accesskey="2" href="Ben_00c3_00b6tigte-Software-und-Pakete.html#Ben_00c3_00b6tigte-Software-und-Pakete">Benötigte Software und Pakete</a>: Vorraussetzungen zum Betrieb von Lx-Office
-<li><a accesskey="3" href="Installation-des-Programmpaketes.html#Installation-des-Programmpaketes">Installation des Programmpaketes</a>: Installationsort, Berechtigungen
+<li><a accesskey="3" href="Manuelle-Installation-des-Programmpaketes.html#Manuelle-Installation-des-Programmpaketes">Manuelle Installation des Programmpaketes</a>: Installationsort, Berechtigungen
<li><a accesskey="4" href="Anpassung-der-PostgreSQL_002dKonfiguration.html#Anpassung-der-PostgreSQL_002dKonfiguration">Anpassung der PostgreSQL-Konfiguration</a>: Verschiedene Aspekte der Datenbankkonfiguration
<li><a accesskey="5" href="Apache_002dKonfiguration.html#Apache_002dKonfiguration">Apache-Konfiguration</a>: Einrichtung eines Aliases und Optionen für das Ausführen von CGI-Scripten
<li><a accesskey="6" href="Benutzerauthentifizierung-und-Administratorpasswort.html#Benutzerauthentifizierung-und-Administratorpasswort">Benutzerauthentifizierung und Administratorpasswort</a>: Einrichtung der Authentifizierungsdatenbank und der Passwortüberprüfung
<!-- -->
</body></html>
+<!--
+\1f
+Local Variables:
+coding: utf-8
+End:
+
+-->
all:
rm -f INSTALL/*.html
- makeinfo --html --document-language=de_DE INSTALL.texi
- makeinfo --plaintext --document-language=de_DE -o INSTALL.txt INSTALL.texi
+ makeinfo --html --document-language=de_DE.UTF-8 INSTALL.texi
+ makeinfo --plaintext --document-language=de_DE.UTF-8 -o INSTALL.txt INSTALL.texi
Distribution sollte für die automatische Installation der anderen
zwei Pakete sorgen)
+ Neue Gruppenrechte
+ ------------------
+
+Es wurde ein neues Recht "Druck" eingeführt. Dieses bestimmt, ob die
+Benutzerin das Menü "Druck" zu Gesicht bekommt oder nicht, unabhängig
+davon, wie die Rechte für die einzelnen Unterpunkte gesetzt sind.
+
+Für bereits bestehende Gruppen muss es sofern gewünscht vom
+Administrator manuell gewährt werden.
+
Upgrade auf v2.6.1
==================
# Veränderungen von Lx-Office ERP #
###################################
-
-
-
+2011-02-?? - Release 2.6.2
Größere neue Features:
Das Program läuft jetzt optional unter FastCGI, und damit etwa um
Faktor 10 schneller. Siehe Dokumentation in doc INSTALL.fcgi.
+ - Neues Gruppenrecht "Druck"
+
+ Es wurde ein neues Recht "Druck" eingeführt. Dieses bestimmt, ob
+ die Benutzerin das Menü "Druck" zu Gesicht bekommt oder nicht,
+ unabhängig davon, wie die Rechte für die einzelnen Unterpunkte
+ gesetzt sind.
+
+ Für bereits bestehende Gruppen muss es sofern gewünscht vom
+ Administrator manuell gewährt werden.
+
Kleinere neue Features und Detailverbesserungen:
- Druckvorlage optional auf Excel erweitert, um Variablen die sich nicht in foreach-Schleifen
Liste gefixter Bugs aus dem Bugtracker:
-
- - Bug 1388 - Berichte sind defekt, wenn abweichendes Datumsformat (ISO) eingestellt ist
- - Bug 1395 - Einlagern ueber Lieferschein: Einheiten entsprechen nicht den Standardeinheiten der Artikel
- - Bug 1398 - Im Lagerjournal werden Projektnummern nicht erfasst
- - Bug 1409 - Bei "Erzeugnis fertigen" wird nur der Bestand der letzten Komponente geprüft
- - Bug 1412 - Wenn die Ware ausgewählt werden muss wird der Rabatt verworfen
- - Bug 1421 - Stornorechnungen loeschen bereitet Probleme
- - Bug 1484 - Das Ankreuzfeld 'alle' hat keine Funktion wenn man einen Auswahlliste (multibox) an Lieferanten hat
- Es wird trotzdem nach der Auswahlliste gefiltert und die Option 'alle' wird
- ignoriert auch wenn man auf Erneuern klickt.
- Das Eingabefeld 'Betrag' im oberen Teil der Maske hat in Lx-Office
- keinen Sinn mehr, da nur noch über die Auswahl der offenen
- Kreditorenposten ein Zahlungsausgang veranlasst wird.
- Neu-Aufbau Lx-Office Bildschirm
- Nach einer erfolgreichen Buchung erscheint die Meldung: 'Zahlung gebucht.' und
- die Startseite wird angezeigt. Wünschenwert wäre es, wenn man in
- Zahlungsverkehr bleiben würde, optimalerweise mit vorbelegten Feldern.
- - Bug 1502 - 2. Zahlung buchen, auch wenn die erste Zahlung in einen abgeschlossenen Zeitraum liegt
-
+ - Bugfix 1131: Einkaufslieferscheine: Mengen muessen beim Auslagern manuell in die maske eingetragen werden
+ - Bugfix 1154: Debitoren und Kreditoren werden nicht korrekt gebucht
+ - Bugfix 1185: Preis überschreiben bei Preisgruppe
+ - Bugfix 1206: Kein Preis bei Preisgruppen
+ - Bugfix 1220: Zahlungsverkehr - Zahlungseingang: Aufteilung des Rechnungsbetrages
+ - Bugfix 1277: Fehler in der BWA Zuordnung in den SKR03 und dem daraus generierten skr04
+ - Bugfix 1298: SKR04 überarbeitet
+ - Bugfix 1302: Inkonsistenz in Buchungsdaten: In Verkaufsrechnungen wird die Zahlung nicht angezeit, Gegenbuchung fehlt
+ - Bugfix 1367: Feature-Vorschlag: SEPA auch für Lastschriften von Debitoren unterstützen
+ - Bugfix 1370: Umlautfehler beim Erfassen einer Einkaufsrechnung
+ - Bugfix 1375: Übersetzungsdateien im Verzeichnis ""locale/de/"" immer noch in ISO-8859-15 kodiert statt UTF-8
+ - Bugfix 1376: Benutzerdefinierte Variablen sollten auch im mahnsystem zur Verfuegung stehen
+ - Bugfix 1378: leere Buchungen (text, beschreibung und referenz) bei Splittbuchungen
+ - Bugfix 1381: missing files in package
+ - Bugfix 1383: Dienstleistungen in Stammdaten und Lager
+ - Bugfix 1384: Zinsen bei Mahnung falsch berechnet
+ - Bugfix 1387: Englische Eingabemaske bei Aufruf von Deb./Kred.-buchung aus Buchungsjournal
+ - Bugfix 1388: Berichte sind defekt, wenn abweichendes Datumsformat (ISO) eingestellt ist
+ - Bugfix 1389: Bilanz repariert
+ - Bugfix 1393: CSV-Export sollte ohne Tausender-Trenner erfolgen
+ - Bugfix 1395: Einlagern ueber Lieferschein: Einheiten entsprechen nicht den Standardeinheiten der Artikl
+ - Bugfix 1398: Im Lagerjournal werden Projektnummern nicht erfasst
+ - Bugfix 1399: Lieferdaten zu einzelnen Positionen ""verrutschen"" beim Loeschen hoeherer Positionszeilen
+ - Bugfix 1400: Lieferscheine: Usability bei Auslagerung - Positionsindikator
+ - Bugfix 1406: Kunde erfassen
+ - Bugfix 1410: Beschriftung bei Eingabe der Einkaufsrechnung falsch
+ - Bugfix 1412: Wenn die Ware ausgewählt werden muss wird der Rabatt verworfen
+ - Bugfix 1414: Einfügen der \usepackage{textcomp}-Zeile in TeX-Templates ungünstig
+ - Bugfix 1422: Loeschen von Stornos bereitet eine Reihe von Problemen: (3)Gutschriften aus Rechnungen, die einstmals storniert wurden
+ - Bugfix 1429: Debitorenbuchungen 1: Wechsel des Debitoren loescht Bemerkungsfeld nicht
+ - Bugfix 1432: Mahnläufe: Nach manuellem Zurücksetzen der Mahnstufen gibt es ein Chaos bei der weiteren Erzeugung
+ - Bugfix 1439: Sortierkriterium ""Strasse"" in Listenansicht der Lieferanten geht nicht
+ - Bugfix 1440: Eingrenzen der angelegten Waren nach Lieferant liefert immer kein Ergebnis
+ - Bugfix 1445: Kleines Chaos bei Vorlagenbezeichnungen zu Lieferscheinen: picklist, packing_list, sales_delivery_order
+ - Bugfix 1449: Konto 3170 langfristige Verbindlichkeiten SKR04 Aktiva
+ - Bugfix 1451: Menüsetup Alt (seitlich) wird nicht lokalisiert
+ - Bugfix 1452: Fehler bei Lokalisierung der Überschriften und weiterer Beschriftungen
+ - Bugfix 1454: mehrere Rechnungen mit gleicher Rechnungsnummer möglich
+ - Bugfix 1455: Feld wird nach Einlagerung nicht zurückgesetzt.
+ - Bugfix 1456: Lieferanschrift wird im Workflow nicht zuverlässig vom Auftrag in den Lieferschein übernommen
+ - Bugfix 1459: Gruppen bearbteien unter FCGI
+ - Bugfix 1467: System entsperren nicht möglich
+ - Bugfix 1468: Title Javascript setzt den Titel auch, wenn die Informationen nicht verfügbar sind.
+ - Bugfix 1469: Umlaute gehen auf der Startseite kaputt bei update von 2.6.1 auf unstable (August 2010)
+ - Bugfix 1470: Falsche Übersetzung für ""Expenses EU without UStId""
+ - Bugfix 1471: System -> Historien Suchmaschinen gibt folgenden Fehler:
+ - Bugfix 1472: Bei fehlender config/authentication.pl -> Webserver Error 500
+ - Bugfix 1475: Workflow Angebot -> Rechnung wird Angebotsnummer nicht übernommen
+ - Bugfix 1477: Sicherheitsloch bei 2.6er Versionen
+ - Bugfix 1479: Debian Paket bauen schlägt fehl
+ - Bugfix 1480: Filter für Abteilungen ohne Ergebnis
+ - Bugfix 1483: Formelberechnung und Zahlenformat
+ - Bugfix 1484: Zahlungsausgang diverses
+ - Bugfix 1485: Rechnung->neuer Artikel->Speichern->Fehler ""Can't use string ... as a HASH ref ... bin/mozilla/io.pl line 2075""
+ - Bugfix 1487: Wechselkurs wird falsch ausgelesen
+ - Bugfix 1488: Ust-Voranmeldung - Elster-Export nach Taxbird
+ - Bugfix 1491: Nitpicking: Beim ersten Login in eine DB werden im Text HTML Formatierungen ausgegeben, nicht interpretiert
+ - Bugfix 1492: ""Korrekturen im Hauptbuch"" wirft Fehler
+ - Bugfix 1494: undokumentiert -- dependency parent.pm / Dokumentvariable ustid
+ - Bugfix 1495: Ansicht von Artikelbilderen (Suchergebnis/Artikelmaske)
+ - Bugfix 1496: Grad-Symbol (°) verursacht Latex-Fehler
+ - Bugfix 1498: (versehentlicher?) commit der menu.ini mit crm Spalte
+ - Bugfix 1499: Einstellungen ""Nicht rabattierfähig"" ist nicht für Dienstleistungen verfügbar (z.B. Versandkosten)
+ - Bugfix 1502: Bücherkontrolle prüft auch ALTE Zahlungseingänge
+ - Bugfix 1504: UStVa Modul SQL Fehler: ""text >= integer"" nicht erlaubt
+ - Bugfix 1506: Email-Formular: Mailadresse der Firma anstelle des Ansprechpartners
+ - Bugfix 1513: Berichte - Projektbuchungen. Gibt es keine Datensaetze zu einer Projektnummer wird eine unschoene Fehlermeldung geworfen statt einer Erklaerung was gerade schief lief
+ - Bugfix 1517: Kreditorrechnung: Wechselkurs bei gleichem Re.-Datum nicht vorhanden
+ - Bugfix 1520: Division-by-Zero-Fehler bei einigen Rechnungsbuchungen
+ - Bugfix 1521: Fix von Bug 1521 bringt neuen Fehler bei Login und Verkaufsmasken
+ - Bugfix 1523: Rabatt geht verloren, wenn Rechnung aus Lieferscheinliste generiert wird
+ - Bugfix 1524: Kundenrabatt geht verloren (wie 1284, aber auch Einkauf)
+ - Bugfix 1528: Vorlagen
+ - Bugfix 1529: falsche Tabellendefinition in Default-request_quotation.tex
+ - Bugfix 1530: Debitorenbuchung: Abfragefehler bei Kontonummer mit ""."" (Punkt) oder Text
+ - Bugfix 1533: Zahlungen in Rechnungsmaske einbuchen scheitert an locale
+ - Bugfix 1535: CSV-Exporte sind nicht mehr UTF8
+ - Bugfix 1536: 'Alte' dbupgrade Skripte die SL::DBUtils verwenden sind defekt
+ - Bugfix 1537: Debitoren: Feld curr in Tabelle ar wird nicht gefüllt
+ - Bugfix 1541: Preisgruppeneintrag in Einkaufsrechungen ??
+ - Bugfix 1547: Kreditorenbuchung in Fremdwährung: Steuerfehler
+ - Bugfix 1550: Sortieren einer Kundenauflistung ""vergisst"" gewählte Filterkriterien
+ - Bugfix 1551: MWst Buchung wird bei neu angelegten SKR04 ""vergessen""
+ - Bugfix 1552: Diverse Probleme mit der Sortierfunktion bei Stammdaten
+ - Bugfix 1553: Diese Kundennummer wird bereits verwendet. - Obwohl keine eingetragen ist
+ - Bugfix 1554: Kein Wechselkurs bei Debitotenbuchung in Fremdwährung unter 1 bei gleichem Datum
+ - Bugfix 1555: Sonderzeichen nicht korrekt escaped (Stückliste beim Erstellen eines Erzeugnisses)
+ - Bugfix 1561: benutzerdefinierte Variable wird unabsichtlich deaktiviert
+ - Bugfix 1562: Fehlender Hinweis im changelog zu gaenderten Rechten Beim Druck
+ - Bugfix 1564: Vorlagen: TEX - Vorlagen bearbeiten -> Anzeigen -> Bearbeiten -> Steuer erfassen??
+ - Bugfix 1571: INSTALL.texi
+ - Bugfix 1573: Irrefuehrende Fehlermeldung ""das ausgewaehlte Lager ist leer""
+ - Bugfix 1574: OpenOffice (ODT) document may be corrupted
+ - Bugfix 1576: Änderung der Datenbank bei einem Benutzer führt zu Fehler
+ - Bugfix 1577: oberer Zurück-Knopf in 'Gruppe bearbeiten' im Admin-Interface bewirkt nichts
+ - Bugfix 1580: /doc/INSTALL/*.html in UTF-8 kein Coding im HTML Header
2010-03-24 - Release 2.6.1
--- /dev/null
+README for Sort::Naturally
+ Time-stamp: "2001-05-25 21:17:33 MDT"
+
+ Sort::Naturally
+
+[extracted from the Pod...]
+
+NAME
+ Sort::Naturally -- sort lexically, but sort numeral parts
+ numerically
+
+SYNOPSIS
+ @them = nsort(qw(
+ foo12a foo12z foo13a foo 14 9x foo12 fooa foolio Foolio Foo12a
+ ));
+ print join(' ', @them), "\n";
+
+ Prints:
+
+ 9x 14 foo fooa foolio Foolio foo12 foo12a Foo12a foo12z foo13a
+
+ (Or "foo12a" + "Foo12a" and "foolio" + "Foolio" and might be
+ switched, depending on your locale.)
+
+DESCRIPTION
+ This module exports two functions, nsort and ncmp; they are
+ used in implementing my idea of a "natural sorting"
+ algorithm. Under natural sorting, numeric substrings are
+ compared numerically, and other word-characters are compared
+ lexically.
+
+ This is the way I define natural sorting:
+
+ o Non-numeric word-character substrings are sorted
+ lexically, case-insensitively: "Foo" comes between
+ "fish" and "fowl".
+
+ o Numeric substrings are sorted numerically: "100" comes
+ after "20", not before.
+
+ o \W substrings (neither words-characters nor digits) are
+ ignored.
+
+ o Our use of \w, \d, \D, and \W is locale-sensitive:
+ Sort::Naturally uses a use locale statement.
+
+ o When comparing two strings, where a numeric substring
+ in one place is not up against a numeric substring in
+ another, the non-numeric always comes first. This is
+ fudged by reading pretending that the lack of a number
+ substring has the value -1, like so:
+
+ foo => "foo", -1
+ foobar => "foo", -1, "bar"
+ foo13 => "foo", 13,
+ foo13xyz => "foo", 13, "xyz"
+
+ That's so that "foo" will come before "foo13", which
+ will come before "foobar".
+
+ o The start of a string is exceptional: leading non-\W
+ (non-word, non-digit) components are are ignored, and
+ numbers come before letters.
+
+ o I define "numeric substring" just as sequences matching
+ m/\d+/ -- scientific notation, commas, decimals, etc.,
+ are not seen. If your data has thousands separators in
+ numbers ("20,000 Leagues Under The Sea" or "20.000
+ lieues sous les mers"), consider stripping them before
+ feeding them to nsort or ncmp.
+
+[end Pod extract]
+
+
+INSTALLATION
+
+You install Sort::Naturally, as you would install any perl module
+library, by running these commands:
+
+ perl Makefile.PL
+ make
+ make test
+ make install
+
+If you want to install a private copy of Sort::Naturally in your home
+directory, then you should try to produce the initial Makefile with
+something like this command:
+
+ perl Makefile.PL LIB=~/perl
+
+See perldoc perlmodinstall for more information on installing modules.
+
+
+DOCUMENTATION
+
+POD-format documentation is included in Naturally.pm. POD is readable
+with the 'perldoc' utility. See ChangeLog for recent changes.
+
+
+SUPPORT
+
+Questions, bug reports, useful code bits, and suggestions for
+Sort::Naturally should just be sent to me at sburke@cpan.org
+
+
+AVAILABILITY
+
+The latest version of Sort::Naturally is available from the
+Comprehensive Perl Archive Network (CPAN). Visit
+<http://www.perl.com/CPAN/> to find a CPAN site near you.
+
+
+COPYRIGHT
+
+Copyright 2001, Sean M. Burke <sburke@cpan.org>, all rights
+reserved.
+
+The programs and documentation in this dist are distributed in
+the hope that they will be useful, but without any warranty; without
+even the implied warranty of merchantability or fitness for a
+particular purpose.
+
+This library is free software; you can redistribute it and/or modify
+it under the same terms as Perl itself.
'4. Quarter' => '4. Quartal',
'<b>What</b> do you want to look for?' => '<b>Wonach</b> wollen Sie suchen?',
'A Buchungsgruppe consists of a descriptive name and the account numbers for the income and expense accounts for those four tax zones as well as the inventory account number.' => 'Eine Buchungsgruppe besteht aus einem deskriptiven Namen, den Erlös- und Aufwandskonten für diese vier Steuerzonen sowie aus einem Inventarkonto.',
+ 'A digit is required.' => 'Eine Ziffer ist vorgeschrieben.',
'A group named "Full Access" has been created.' => 'Eine Gruppe namens "Vollzugriff" wurde angelegt.',
'A group with that name does already exist.' => 'Eine Gruppe mit diesem Namen gibt es bereits.',
'A lot of the usability of Lx-Office has been enhanced with javascript. Although it is currently possible to use every aspect of Lx-Office without javascript, we strongly recommend it. In a future version this may change and javascript may be necessary to access advanced features.' => 'Die Bedienung von Lx-Office wurde an vielen Stellen mit Javascript verbessert. Obwohl es derzeit möglich ist, jeden Aspekt von Lx-Office auch ohne Javascript zu benutzen, empfehlen wir es. In einer zukünftigen Version wird Javascript eventuell notwendig sein um weitergehende Features zu benutzen.',
+ 'A lower-case character is required.' => 'Ein Kleinbuchstabe ist vorgeschrieben.',
+ 'A special character is required (valid characters: #1).' => 'Ein Sonderzeichen ist vorgeschrieben (gültige Zeichen: #1).',
'A temporary directory could not be created:' => 'Ein temporäres Verzeichnis konnte nicht erstellt werden:',
'A temporary file could not be created. Please verify that the directory "#1" is writeable by the webserver.' => 'Eine temporäre Datei konnte nicht angelegt werden. Bitte stellen Sie sicher, dass das Verzeichnis "#1" vom Webserver beschrieben werden darf.',
'A temporary file could not be created:' => 'Eine temporäre Datei konnte nicht erstellt werden:',
'Amount' => 'Betrag',
'Amount Due' => 'Betrag fällig',
'Amount has to be greater then zero! Wrong row number: ' => 'Leere Eingabe oder Werte kleiner, gleich null eingegeben. Fehler in Reihe Nummer: ',
+ 'An invalid character was used (invalid characters: #1).' => 'Ein ungültiges Zeichen wurde benutzt (ungültige Zeichen: #1).',
+ 'An invalid character was used (valid characters: #1).' => 'Ein ungültiges Zeichen wurde benutzt (gültige Zeichen: #1).',
+ 'An upper-case character is required.' => 'Ein Großbuchstabe ist vorgeschrieben.',
'Annotations' => 'Anmerkungen',
'Another user with the login #1 does already exist.' => 'Es existiert bereits ein anderer Benutzer mit diesem Login.',
'Ap aging on %s' => 'Offene Verbindlichkeiten zum %s',
'BOM' => 'Stückliste',
'BWA' => 'BWA',
'Back' => 'Zurück',
+ 'Back to the login page' => 'Zurück zur Loginseite',
'Backup Dataset' => 'Datenbank sichern',
'Backup file' => 'Sicherungsdatei',
'Backup of dataset' => 'Sicherung der Datenbank',
'Database Host' => 'Datenbankcomputer',
'Database User' => 'Datenbankbenutzer',
'Database User missing!' => 'Datenbankbenutzer fehlt!',
- 'Database backups and restorations are disabled in lx-erp.conf.' => 'Datenbanksicherungen und -wiederherstellungen sind in der lx-erp.conf deaktiviert.',
+ 'Database backups and restorations are disabled in the configuration.' => 'Datenbanksicherungen und -wiederherstellungen sind in der Konfiguration deaktiviert.',
'Database name' => 'Datenbankname',
'Database template' => 'Datenbankvorlage',
'Database update error:' => 'Fehler beim Datenbankupgrade:',
'Help Template Variables' => 'Hilfe zu Dokumenten-Variablen',
'Here\'s an example command line:' => 'Hier ist eine Kommandozeile, die als Beispiel dient:',
'Hide by default' => 'Standardmäßig verstecken',
- 'History' => 'Historie',
'History Search' => 'Historien Suche',
'History Search Engine' => 'Historien Suchmaschine',
'Homepage' => 'Homepage',
'List Price' => 'Listenpreis',
'List Price Factors' => 'Preisfaktoren anzeigen',
'List Pricegroups' => 'Preisgruppen anzeigen',
- 'List Tax' => 'Bearbeiten',
'List Transactions' => 'Buchungsliste',
'List Warehouses' => 'Lager anzeigen',
'List bank accounts' => 'Bankkonten anzeigen',
'Not done yet' => 'Noch nicht fertig',
'Not obsolete' => 'Gültig',
'Note' => 'Hinweis',
- 'Note: Taxkeys must have a "valid from" date, and will not behave correctly without.' => 'Hinweis: Steuerschlüssel sind fehlerhaft ohne gültiges "von Datum"',
+ 'Note: Taxkeys must have a "valid from" date, and will not behave correctly without.' => 'Hinweis: Steuerschlüssel sind fehlerhaft ohne "Gültig ab" Datum',
'Notes' => 'Bemerkungen',
'Notes (will appear on hard copy)' => 'Bemerkungen',
'Nothing has been selected for removal.' => 'Es wurde nichts für eine Entnahme ausgewählt.',
'The group has been saved.' => 'Die Gruppe wurde gespeichert.',
'The group memberships have been saved.' => 'Die Gruppenmitgliedschaften wurden gespeichert.',
'The group name is missing.' => 'Der Gruppenname fehlt.',
- 'The licensing module has been deactivated in lx-erp.conf.' => 'Das Lizenzverwaltungsmodul wurde in lx-erp.conf deaktiviert.',
+ 'The licensing module has been deactivated in the configuration.' => 'Das Lizenzverwaltungsmodul wurde in der Konfiguration deaktiviert.',
'The list has been printed.' => 'Die Liste wurde ausgedruckt.',
'The login is missing.' => 'Das Login fehlt.',
'The name in row %d has already been used before.' => 'Der Name in Zeile %d wurde vorher bereits benutzt.',
'The parts have been removed.' => 'Die Waren wurden aus dem Lager entnommen.',
'The parts have been stocked.' => 'Die Artikel wurden eingelagert.',
'The parts have been transferred.' => 'Die Waren wurden umgelagert.',
+ 'The password is too long (maximum length: #1).' => 'Das Passwort ist zu lang (maximale Länge: #1).',
+ 'The password is too short (minimum length: #1).' => 'Das Password ist zu kurz (minimale Länge: #1).',
+ 'The password is weak (e.g. it can be found in a dictionary).' => 'Das Passwort ist schwach (z.B. wenn es in einem Wörterbuch steht).',
'The payments have been posted.' => 'Die Zahlungen wurden gebucht.',
'The pg_dump process could not be started.' => 'Der pg_dump-Prozess konnte nicht gestartet werden.',
'The pg_restore process could not be started.' => 'Der pg_restore-Prozess konnte nicht gestartet werden.',
'The selected bin does not exist.' => 'Der ausgewählte Lagerplatz existiert nicht.',
'The selected exports have been closed.' => 'Die ausgewählten Exporte wurden abgeschlossen.',
'The selected warehouse does not exist.' => 'Das ausgewählte Lager existiert nicht.',
- 'The selected warehouse is empty.' => 'Das ausgewählte Lager ist leer.',
+ 'The selected warehouse is empty, or no stocked items where found that match the filter settings.' => 'Das ausgewählte Lager ist leer, oder in ihm wurden keine zu den Sucheinstellungen passenden eingelagerten Artikel gefunden.',
'The session is invalid or has expired.' => 'Sie sind von Lx-Office abgemeldet.',
+ 'The settings were saved, but the password was not changed.' => 'Die Einstellungen wurden gespeichert, aber das Passwort wurde nicht geändert.',
'The source warehouse does not contain any bins.' => 'Das Quelllager enthält keine Lagerplätze.',
'The start date is missing.' => 'Das Startdatum fehlt.',
'The subject is missing.' => 'Der Betreff fehlt.',
'4. Quarter' => '4. Quartal',
'<b>What</b> do you want to look for?' => '<b>Wonach</b> wollen Sie suchen?',
'A Buchungsgruppe consists of a descriptive name and the account numbers for the income and expense accounts for those four tax zones as well as the inventory account number.' => 'Eine Buchungsgruppe besteht aus einem deskriptiven Namen, den Erlös- und Aufwandskonten für diese vier Steuerzonen sowie aus einem Inventarkonto.',
+ 'A digit is required.' => '',
'A group named "Full Access" has been created.' => 'Eine Gruppe namens "Vollzugriff" wurde angelegt.',
'A group with that name does already exist.' => 'Eine Gruppe mit diesem Namen gibt es bereits.',
'A lot of the usability of Lx-Office has been enhanced with javascript. Although it is currently possible to use every aspect of Lx-Office without javascript, we strongly recommend it. In a future version this may change and javascript may be necessary to access advanced features.' => 'Die Bedienung von Lx-Office wurde an vielen Stellen mit Javascript verbessert. Obwohl es derzeit möglich ist, jeden Aspekt von Lx-Office auch ohne Javascript zu benutzen, empfehlen wir es. In einer zukünftigen Version wird Javascript eventuell notwendig sein um weitergehende Features zu benutzen.',
+ 'A lower-case character is required.' => '',
+ 'A special character is required (valid characters: #1).' => '',
'A temporary directory could not be created:' => 'Ein temporäres Verzeichnis konnte nicht erstellt werden:',
'A temporary file could not be created. Please verify that the directory "#1" is writeable by the webserver.' => 'Eine temporäre Datei konnte nicht angelegt werden. Bitte stellen Sie sicher, dass das Verzeichnis "#1" vom Webserver beschrieben werden darf.',
'A temporary file could not be created:' => 'Eine temporäre Datei konnte nicht erstellt werden:',
'Amount' => 'Betrag',
'Amount Due' => 'Betrag fällig',
'Amount has to be greater then zero! Wrong row number: ' => '"Betrag" muss größer Null sein. Fehlerhafte Zeile: ',
+ 'An invalid character was used (invalid characters: #1).' => '',
+ 'An invalid character was used (valid characters: #1).' => '',
+ 'An upper-case character is required.' => '',
'Annotations' => 'Hilfe',
'Another user with the login #1 does already exist.' => 'Es existiert bereits ein anderer Benutzer mit diesem Login.',
'Ap aging on %s' => 'Offene Verbindlichkeiten zum %s',
'Company Name' => 'Firmenname',
'Compare to' => 'Gegenüberstellen zu',
'Configuration of individual TODO items' => 'Konfiguration für die einzelnen Aufgabenlistenpunkte',
+ 'Configure' => '',
'Confirm' => 'Bestätigen',
'Confirm!' => 'Bestätigen Sie!',
'Confirmation' => 'Auftragsbestätigung',
'Database Host' => 'Datenbankcomputer',
'Database User' => 'Datenbankbenutzer',
'Database User missing!' => 'Datenbankbenutzer fehlt!',
- 'Database backups and restorations are disabled in lx-erp.conf.' => 'Datenbanksicherungen und -wiederherstellungen sind in der lx-erp.conf deaktiviert.',
+ 'Database backups and restorations are disabled in the configuration.' => 'Datenbanksicherungen und -wiederherstellungen sind in der Konfiguration deaktiviert.',
'Database name' => 'Datenbankname',
'Database template' => 'Datenbankvorlage',
'Database update error:' => 'Fehler beim Datenbankupgrade:',
'Edit rights' => 'Rechte bearbeiten',
'Edit templates' => 'Vorlagen bearbeiten',
'Edit the Delivery Order' => 'Lieferschein bearbeiten',
+ 'Edit the configuration for periodic invoices' => '',
'Edit the membership of all users in all groups:' => 'Bearbeiten der Mitgliedschaft aller Benutzer in allen Gruppen:',
'Edit the purchase_order' => 'Bearbeiten des Lieferantenauftrags',
'Edit the request_quotation' => 'Bearbeiten der Preisanfrage',
'Element disabled' => 'Element deaktiviert',
'Employee' => 'Bearbeiter',
'Empty transaction!' => 'Buchung ist leer!',
+ 'End date' => '',
'Enter a description for this new draft.' => 'Geben Sie eine Beschreibung für diesen Entwurf ein.',
'Enter longdescription' => 'Langtext eingeben',
'Enter the requested execution date or leave empty for the quickest possible execution:' => 'Geben Sie das jeweils gewünschte Ausführungsdatum an, oder lassen Sie das Feld leer für die schnellstmögliche Ausführung:',
'Export date' => 'Exportdatum',
'Export date from' => 'Exportdatum von',
'Export date to' => 'Exportdatum bis',
+ 'Extend automatically by n months' => '',
'Extended' => 'Gesamt',
'Extension Of Time' => 'Dauerfristverlängerung',
'Factor' => 'Faktor',
'Help Template Variables' => 'Hilfe zu Dokumenten-Variablen',
'Here\'s an example command line:' => 'Hier ist eine Kommandozeile, die als Beispiel dient:',
'Hide by default' => 'Standardmäßig verstecken',
- 'History' => 'Historie',
'History Search' => 'Historien Suche',
'History Search Engine' => 'Historien Suchmaschine',
'Homepage' => 'Homepage',
'List Price' => 'Listenpreis',
'List Price Factors' => 'Preisfaktoren anzeigen',
'List Pricegroups' => 'Preisgruppen anzeigen',
- 'List Tax' => 'Bearbeiten',
'List Transactions' => 'Buchungsliste',
'List Warehouses' => 'Lager anzeigen',
'List bank accounts' => 'Bankkonten anzeigen',
'Not done yet' => 'Noch nicht fertig',
'Not obsolete' => 'Gültig',
'Note' => 'Hinweis',
- 'Note: Taxkeys must have a "valid from" date, and will not behave correctly without.' => 'Hinweis: Steuerschlüssel sind fehlerhaft ohne gültiges "von Datum"',
+ 'Note: Taxkeys must have a "valid from" date, and will not behave correctly without.' => 'Hinweis: Steuerschlüssel sind fehlerhaft ohne "Gültig ab" Datum',
'Notes' => 'Notizen',
'Notes (will appear on hard copy)' => 'Hinweise (erscheinen auf Ausdruck)',
'Nothing has been selected for removal.' => 'Es wurde nichts für eine Entnahme ausgewählt.',
'Payment posted!' => 'Zahlung gebucht!',
'Payment terms deleted!' => 'Zahlungskonditionen gelöscht!',
'Payments' => 'Zahlungsausgänge',
+ 'Per. Inv.' => '',
'Period' => 'Zeitraum',
'Period:' => 'Zeitraum:',
+ 'Periodic Invoices' => '',
+ 'Periodic invoices active' => '',
+ 'Periodic invoices inactive' => '',
+ 'Periodicity' => '',
'Personal settings' => 'Meine Daten',
'Pg Database Administration' => 'Datenbankadministration',
'Phone' => 'Telefon',
'Pricegroups' => 'Preisgruppen',
'Print' => 'Drucken',
'Print and Post' => 'Drucken und Buchen',
+ 'Print automatically' => '',
'Print dunnings' => 'Mahnungen drucken',
'Print list' => 'Liste ausdrucken',
'Print options' => 'Drucken',
'Spoolfile' => 'Druckdatei',
'Start Dunning Process' => 'Neue Mahnung',
'Start analysis' => 'Analyse beginnen',
+ 'Start date' => '',
'Start the correction assistant' => 'Korrekturassistenten starten',
'Startdate_coa' => 'Gültig ab',
'Starting Balance' => 'Eröffnungsbilanzwerte',
'Statement Balance' => 'Sammelrechnungsbilanz',
'Statement sent to' => 'Sammelrechnung verschickt an',
'Statements sent to printer!' => 'Sammelrechnungen an Drucker geschickt!',
+ 'Status' => '',
'Step 1 of 3: Parts' => 'Schritt 1 von 3: Waren',
'Step 2' => 'Schritt 2',
'Step 2 of 3: Services' => 'Schritt 2 von 3: Dienstleistungen',
'The dunning process started' => 'Der Mahnprozess ist gestartet.',
'The dunnings have been printed.' => 'Die Mahnung(en) wurden gedruckt.',
'The email address is missing.' => 'Die Emailadresse fehlt.',
+ 'The end date is the last day for which invoices will possibly be created.' => '',
'The factor is missing in row %d.' => 'Der Faktor fehlt in Zeile %d.',
'The factor is missing.' => 'Der Faktor fehlt.',
'The first reason is that Lx-Office contained a bug which resulted in the wrong taxkeys being recorded for transactions in which two entries are posted for the same chart with different taxkeys.' => 'Zum Einen gab es einen Bug in Lx-Office, der dazu führte, dass bei Buchungen mit verschiedenen Steuerschlüssel auf ein Konto teilweise falsche Steuerschlüssel gespeichert wurden.',
'The group has been saved.' => 'Die Gruppe wurde gespeichert.',
'The group memberships have been saved.' => 'Die Gruppenmitgliedschaften wurden gespeichert.',
'The group name is missing.' => 'Der Gruppenname fehlt.',
- 'The licensing module has been deactivated in lx-erp.conf.' => 'Das Lizenzverwaltungsmodul wurde in lx-erp.conf deaktiviert.',
+ 'The licensing module has been deactivated in the configuration.' => 'Das Lizenzverwaltungsmodul wurde in der Konfiguration deaktiviert.',
'The list has been printed.' => 'Die Liste wurde ausgedruckt.',
'The login is missing.' => 'Das Login fehlt.',
'The name in row %d has already been used before.' => 'Der Name in Zeile %d wurde vorher bereits benutzt.',
'The parts have been removed.' => 'Die Waren wurden aus dem Lager entnommen.',
'The parts have been stocked.' => 'Die Artikel wurden eingelagert.',
'The parts have been transferred.' => 'Die Waren wurden umgelagert.',
+ 'The password is too long (maximum length: #1).' => '',
+ 'The password is too short (minimum length: #1).' => '',
+ 'The password is weak (e.g. it can be found in a dictionary).' => '',
'The payments have been posted.' => 'Die Zahlungen wurden gebucht.',
'The pg_dump process could not be started.' => 'Der pg_dump-Prozess konnte nicht gestartet werden.',
'The pg_restore process could not be started.' => 'Der pg_restore-Prozess konnte nicht gestartet werden.',
'The selected warehouse does not exist.' => 'Das ausgewählte Lager existiert nicht.',
'The selected warehouse is empty.' => 'Das ausgewählte Lager ist leer.',
'The session is invalid or has expired.' => 'Sie sind von Lx-Office abgemeldet.',
+ 'The settings were saved, but the password was not changed.' => '',
'The source warehouse does not contain any bins.' => 'Das Quelllager enthält keine Lagerplätze.',
+ 'The start date is missing.' => '',
'The subject is missing.' => 'Der Betreff fehlt.',
'The tables for user management and authentication do not exist. They will be created in the next step in the following database:' => 'Die Tabellen zum Speichern der Benutzerdaten und zur Benutzerauthentifizierung wurden nicht gefunden. Sie werden in der folgenden Datenbank angelegt:',
'The tabulator character' => 'Das Tabulator-Symbol',
'Warehouse management' => 'Lagerverwaltung/Bestandsveränderung',
'Warehouse saved.' => 'Lager gespeichert.',
'Warehouses' => 'Lager',
+ 'Warning' => 'Warnung',
'Warnings during template upgrade' => 'Warnungen bei Aktualisierung der Dokumentenvorlagen',
'WebDAV link' => 'WebDAV-Link',
'Weight' => 'Gewicht',
'[email]' => '[email]',
'account_description' => 'Beschreibung',
'accrual' => 'Bilanzierung (Soll-Versteuerung)',
+ 'active' => '',
'all entries' => 'alle Einträge',
'ap_aging_list' => 'liste_offene_verbindlichkeiten',
'ar_aging_list' => 'liste_offene_forderungen',
'general_ledger_list' => 'buchungsjournal',
'history' => 'Historie',
'history search engine' => 'Historien Suchmaschine',
+ 'inactive' => '',
'invoice' => 'Rechnung',
'invoice_list' => 'debitorenbuchungsliste',
'lead deleted!' => 'Kundenquelle gelöscht',
'mark as paid' => 'als bezahlt markieren',
'missing' => 'Fehlbestand',
'month' => 'Monatliche Abgabe',
+ 'monthly' => '',
'new Window' => 'neues Fenster',
'no' => 'nein',
'no bestbefore' => 'keine Mindesthaltbarkeit',
'no chargenumber' => 'keine Chargennummer',
'none (pricegroup)' => 'keine',
+ 'not configured' => '',
'not executed' => 'nicht ausgeführt',
'not transferred in yet' => 'noch nicht eingelagert',
'not transferred out yet' => 'noch nicht ausgelagert',
'purchase_order' => 'Auftrag',
'purchase_order_list' => 'lieferantenauftragsliste',
'quarter' => 'Vierteljährliche (quartalsweise) Abgabe',
+ 'quarterly' => '',
'quotation_list' => 'angebotsliste',
'release_material' => 'Materialausgabebe',
'report_generator_dispatch_to is not defined.' => 'report_generator_dispatch_to ist nicht definiert.',
'tax_taxdescription' => 'Steuername',
'tax_taxkey' => 'Steuerschlüssel',
'taxnumber' => 'Automatikkonto',
+ 'terminated' => '',
'to (date)' => 'bis',
'to (time)' => 'bis',
'transfer' => 'Umlagerung',
'warehouse_journal_list' => 'lagerbuchungsliste',
'warehouse_report_list' => 'lagerbestandsliste',
'wrongformat' => 'Falsches Format',
+ 'yearly' => '',
'yes' => 'ja',
};
'List Price' => '',
'List Price Factors' => '',
'List Pricegroups' => '',
- 'List Tax' => '',
'List Transactions' => '',
'List Warehouses' => '',
'List bank accounts' => '',
'Warehouse management' => '',
'Warehouse saved.' => '',
'Warehouses' => '',
+ 'Warning' => '',
'Warnings during template upgrade' => '',
'WebDAV link' => '',
'Weight' => '',
target=acc_menu
submenu=1
-[System--Taxes--List Tax]
+[System--Taxes--Edit]
module=am.pl
action=list_tax
require Exporter;
require DynaLoader;
+
+
use vars qw($VERSION @ISA @EXPORT_OK %EXPORT_TAGS);
@ISA = qw(Exporter DynaLoader);
all => [ qw(any all none notall true false firstidx first_index lastidx
last_index insert_after insert_after_string apply after after_incl before
before_incl indexes firstval first_value lastval last_value each_array
- each_arrayref pairwise natatime mesh zip uniq minmax part) ],
+ each_arrayref pairwise natatime mesh zip uniq minmax part bsearch) ],
);
@EXPORT_OK = ( @{ $EXPORT_TAGS{'all'} } );
-$VERSION = '0.22';
+$VERSION = '0.25_02';
eval {
local $ENV{PERL_DL_NONLAZY} = 0 if $ENV{PERL_DL_NONLAZY};
eval <<'EOP' if not defined &any;
+require POSIX;
+
sub any (&@) {
my $f = shift;
return if ! @_;
sub none (&@) {
my $f = shift;
- return if ! @_;
+ return 1 if ! @_;
for (@_) {
return 0 if $f->();
}
sub uniq (@) {
my %h;
- map { $h{$_}++ == 0 ? $_ : () } @_;
+ my $ref = \1;
+ map { $h{defined $_ ? $_ : $ref}++ == 0 ? $_ : () } @_;
}
sub minmax (@) {
return @parts;
}
+sub bsearch(&@) {
+ my $code = shift;
+
+ my $rc;
+ my $i = 0;
+ my $j = @_;
+ do {
+ my $k = int(($i + $j) / 2);
+
+ return if $k >= @_;
+
+ local *_ = \$_[$k];
+ $rc = $code->();
+
+ $rc == 0 and
+ return wantarray ? $_ : 1;
+
+ if ($rc < 0) {
+ $i = $k + 1;
+ } else {
+ $j = $k - 1;
+ }
+ } until $i > $j;
+
+ return;
+}
+
sub _XScompiled {
return 0;
}
EOP
+die $@ if $@;
*first_index = \&firstidx;
*last_index = \&lastidx;
my $i = 0;
my @part = part { $idx[$++ % 3] } 1 .. 8; # [1, 4, 7], [2, 3, 5, 6, 8]
+=item bsearch BLOCK LIST
+
+Performs a binary search on LIST which must be a sorted list of values. BLOCK
+must return a negative value if the current element (stored in C<$_>) is smaller,
+a positive value if it is bigger and zero if it matches.
+
+Returns a boolean value in scalar context. In list context, it returns the element
+if it was found, otherwise the empty list.
+
=back
=head1 EXPORTS
=head1 VERSION
-This is version 0.22.
+This is version 0.25_01.
=head1 BUGS
=head1 AUTHOR
-Tassilo von Parseval, E<lt>tassilo.von.parseval@rwth-aachen.deE<gt>
+Tassilo von Parseval, E<lt>vparseval@gmail.comE<gt>
=head1 COPYRIGHT AND LICENSE
-Copyright (C) 2004-2006 by Tassilo von Parseval
+Copyright (C) 2004-2009 by Tassilo von Parseval
This library is free software; you can redistribute it and/or modify
it under the same terms as Perl itself, either Perl version 5.8.4 or,
--- /dev/null
+
+require 5;
+package Sort::Naturally; # Time-stamp: "2004-12-29 18:30:03 AST"
+$VERSION = '1.02';
+@EXPORT = ('nsort', 'ncmp');
+require Exporter;
+@ISA = ('Exporter');
+
+use strict;
+use locale;
+use integer;
+
+#-----------------------------------------------------------------------------
+# constants:
+BEGIN { *DEBUG = sub () {0} unless defined &DEBUG }
+
+use Config ();
+BEGIN {
+ # Make a constant such that if a whole-number string is that long
+ # or shorter, we KNOW it's treatable as an integer
+ no integer;
+ my $x = length(256 ** $Config::Config{'intsize'} / 2) - 1;
+ die "Crazy intsize: <$Config::Config{'intsize'}>" if $x < 4;
+ eval 'sub MAX_INT_SIZE () {' . $x . '}';
+ die $@ if $@;
+ print "intsize $Config::Config{'intsize'} => MAX_INT_SIZE $x\n" if DEBUG;
+}
+
+sub X_FIRST () {-1}
+sub Y_FIRST () { 1}
+
+my @ORD = ('same', 'swap', 'asis');
+
+#-----------------------------------------------------------------------------
+# For lack of a preprocessor:
+
+my($code, $guts);
+$guts = <<'EOGUTS'; # This is the guts of both ncmp and nsort:
+
+ if($x eq $y) {
+ # trap this expensive case first, and then fall thru to tiebreaker
+ $rv = 0;
+
+ # Convoluted hack to get numerics to sort first, at string start:
+ } elsif($x =~ m/^\d/s) {
+ if($y =~ m/^\d/s) {
+ $rv = 0; # fall thru to normal comparison for the two numbers
+ } else {
+ $rv = X_FIRST;
+ DEBUG > 1 and print "Numeric-initial $x trumps letter-initial $y\n";
+ }
+ } elsif($y =~ m/^\d/s) {
+ $rv = Y_FIRST;
+ DEBUG > 1 and print "Numeric-initial $y trumps letter-initial $x\n";
+ } else {
+ $rv = 0;
+ }
+
+ unless($rv) {
+ # Normal case:
+ $rv = 0;
+ DEBUG and print "<$x> and <$y> compared...\n";
+
+ Consideration:
+ while(length $x and length $y) {
+
+ DEBUG > 2 and print " <$x> and <$y>...\n";
+
+ # First, non-numeric comparison:
+ $x2 = ($x =~ m/^(\D+)/s) ? length($1) : 0;
+ $y2 = ($y =~ m/^(\D+)/s) ? length($1) : 0;
+ # Now make x2 the min length of the two:
+ $x2 = $y2 if $x2 > $y2;
+ if($x2) {
+ DEBUG > 1 and printf " <%s> and <%s> lexically for length $x2...\n",
+ substr($x,0,$x2), substr($y,0,$x2);
+ do {
+ my $i = substr($x,0,$x2);
+ my $j = substr($y,0,$x2);
+ my $sv = $i cmp $j;
+ print "SCREAM! on <$i><$j> -- $sv != $rv \n" unless $rv == $sv;
+ last;
+ }
+
+
+ if $rv =
+ # The ''. things here force a copy that seems to work around a
+ # mysterious intermittent bug that 'use locale' provokes in
+ # many versions of Perl.
+ $cmp
+ ? $cmp->(substr($x,0,$x2) . '',
+ substr($y,0,$x2) . '',
+ )
+ :
+ scalar(( substr($x,0,$x2) . '' ) cmp
+ ( substr($y,0,$x2) . '' )
+ )
+ ;
+ # otherwise trim and keep going:
+ substr($x,0,$x2) = '';
+ substr($y,0,$x2) = '';
+ }
+
+ # Now numeric:
+ # (actually just using $x2 and $y2 as scratch)
+
+ if( $x =~ s/^(\d+)//s ) {
+ $x2 = $1;
+ if( $y =~ s/^(\d+)//s ) {
+ # We have two numbers here.
+ DEBUG > 1 and print " <$x2> and <$1> numerically\n";
+ if(length($x2) < MAX_INT_SIZE and length($1) < MAX_INT_SIZE) {
+ # small numbers: we can compare happily
+ last if $rv = $x2 <=> $1;
+ } else {
+ # ARBITRARILY large integers!
+
+ # This saves on loss of precision that could happen
+ # with actual stringification.
+ # Also, I sense that very large numbers aren't too
+ # terribly common in sort data.
+
+ # trim leading 0's:
+ ($y2 = $1) =~ s/^0+//s;
+ $x2 =~ s/^0+//s;
+ print " Treating $x2 and $y2 as bigint\n" if DEBUG;
+
+ no locale; # we want the dumb cmp back.
+ last if $rv = (
+ # works only for non-negative whole numbers:
+ length($x2) <=> length($y2)
+ # the longer the numeral, the larger the value
+ or $x2 cmp $y2
+ # between equals, compare lexically!! amazing but true.
+ );
+ }
+ } else {
+ # X is numeric but Y isn't
+ $rv = Y_FIRST;
+ last;
+ }
+ } elsif( $y =~ s/^\d+//s ) { # we don't need to capture the substring
+ $rv = X_FIRST;
+ last;
+ }
+ # else one of them is 0-length.
+
+ # end-while
+ }
+ }
+EOGUTS
+
+sub maker {
+ my $code = $_[0];
+ $code =~ s/~COMPARATOR~/$guts/g || die "Can't find ~COMPARATOR~";
+ eval $code;
+ die $@ if $@;
+}
+
+##############################################################################
+
+maker(<<'EONSORT');
+sub nsort {
+ # get options:
+ my($cmp, $lc);
+ ($cmp,$lc) = @{shift @_} if @_ and ref($_[0]) eq 'ARRAY';
+
+ return @_ unless @_ > 1 or wantarray; # be clever
+
+ my($x, $x2, $y, $y2, $rv); # scratch vars
+
+ # We use a Schwartzian xform to memoize the lc'ing and \W-removal
+
+ map $_->[0],
+ sort {
+ if($a->[0] eq $b->[0]) { 0 } # trap this expensive case
+ else {
+
+ $x = $a->[1];
+ $y = $b->[1];
+
+~COMPARATOR~
+
+ # Tiebreakers...
+ DEBUG > 1 and print " -<${$a}[0]> cmp <${$b}[0]> is $rv ($ORD[$rv])\n";
+ $rv ||= (length($x) <=> length($y)) # shorter is always first
+ || ($cmp and $cmp->($x,$y) || $cmp->($a->[0], $b->[0]))
+ || ($x cmp $y )
+ || ($a->[0] cmp $b->[0])
+ ;
+
+ DEBUG > 1 and print " <${$a}[0]> cmp <${$b}[0]> is $rv ($ORD[$rv])\n";
+ $rv;
+ }}
+
+ map {;
+ $x = $lc ? $lc->($_) : lc($_); # x as scratch
+ $x =~ s/\W+//s;
+ [$_, $x];
+ }
+ @_
+}
+EONSORT
+
+#-----------------------------------------------------------------------------
+maker(<<'EONCMP');
+sub ncmp {
+ # The guts are basically the same as above...
+
+ # get options:
+ my($cmp, $lc);
+ ($cmp,$lc) = @{shift @_} if @_ and ref($_[0]) eq 'ARRAY';
+
+ if(@_ == 0) {
+ @_ = ($a, $b); # bit of a hack!
+ DEBUG > 1 and print "Hacking in <$a><$b>\n";
+ } elsif(@_ != 2) {
+ require Carp;
+ Carp::croak("Not enough options to ncmp!");
+ }
+ my($a,$b) = @_;
+ my($x, $x2, $y, $y2, $rv); # scratch vars
+
+ DEBUG > 1 and print "ncmp args <$a><$b>\n";
+ if($a eq $b) { # trap this expensive case
+ 0;
+ } else {
+ $x = ($lc ? $lc->($a) : lc($a));
+ $x =~ s/\W+//s;
+ $y = ($lc ? $lc->($b) : lc($b));
+ $y =~ s/\W+//s;
+
+~COMPARATOR~
+
+
+ # Tiebreakers...
+ DEBUG > 1 and print " -<$a> cmp <$b> is $rv ($ORD[$rv])\n";
+ $rv ||= (length($x) <=> length($y)) # shorter is always first
+ || ($cmp and $cmp->($x,$y) || $cmp->($a,$b))
+ || ($x cmp $y)
+ || ($a cmp $b)
+ ;
+
+ DEBUG > 1 and print " <$a> cmp <$b> is $rv\n";
+ $rv;
+ }
+}
+EONCMP
+
+# clean up:
+undef $guts;
+undef &maker;
+
+#-----------------------------------------------------------------------------
+1;
+
+############### END OF MAIN SOURCE ###########################################
+__END__
+
+=head1 NAME
+
+Sort::Naturally -- sort lexically, but sort numeral parts numerically
+
+=head1 SYNOPSIS
+
+ @them = nsort(qw(
+ foo12a foo12z foo13a foo 14 9x foo12 fooa foolio Foolio Foo12a
+ ));
+ print join(' ', @them), "\n";
+
+Prints:
+
+ 9x 14 foo fooa foolio Foolio foo12 foo12a Foo12a foo12z foo13a
+
+(Or "foo12a" + "Foo12a" and "foolio" + "Foolio" and might be
+switched, depending on your locale.)
+
+=head1 DESCRIPTION
+
+This module exports two functions, C<nsort> and C<ncmp>; they are used
+in implementing my idea of a "natural sorting" algorithm. Under natural
+sorting, numeric substrings are compared numerically, and other
+word-characters are compared lexically.
+
+This is the way I define natural sorting:
+
+=over
+
+=item *
+
+Non-numeric word-character substrings are sorted lexically,
+case-insensitively: "Foo" comes between "fish" and "fowl".
+
+=item *
+
+Numeric substrings are sorted numerically:
+"100" comes after "20", not before.
+
+=item *
+
+\W substrings (neither words-characters nor digits) are I<ignored>.
+
+=item *
+
+Our use of \w, \d, \D, and \W is locale-sensitive: Sort::Naturally
+uses a C<use locale> statement.
+
+=item *
+
+When comparing two strings, where a numeric substring in one
+place is I<not> up against a numeric substring in another,
+the non-numeric always comes first. This is fudged by
+reading pretending that the lack of a number substring has
+the value -1, like so:
+
+ foo => "foo", -1
+ foobar => "foo", -1, "bar"
+ foo13 => "foo", 13,
+ foo13xyz => "foo", 13, "xyz"
+
+That's so that "foo" will come before "foo13", which will come
+before "foobar".
+
+=item *
+
+The start of a string is exceptional: leading non-\W (non-word,
+non-digit)
+components are are ignored, and numbers come I<before> letters.
+
+=item *
+
+I define "numeric substring" just as sequences matching m/\d+/ --
+scientific notation, commas, decimals, etc., are not seen. If
+your data has thousands separators in numbers
+("20,000 Leagues Under The Sea" or "20.000 lieues sous les mers"),
+consider stripping them before feeding them to C<nsort> or
+C<ncmp>.
+
+=back
+
+=head2 The nsort function
+
+This function takes a list of strings, and returns a copy of the list,
+sorted.
+
+This is what most people will want to use:
+
+ @stuff = nsort(...list...);
+
+When nsort needs to compare non-numeric substrings, it
+uses Perl's C<lc> function in scope of a <use locale>.
+And when nsort needs to lowercase things, it uses Perl's
+C<lc> function in scope of a <use locale>. If you want nsort
+to use other functions instead, you can specify them in
+an arrayref as the first argument to nsort:
+
+ @stuff = nsort( [
+ \&string_comparator, # optional
+ \&lowercaser_function # optional
+ ],
+ ...list...
+ );
+
+If you want to specify a string comparator but no lowercaser,
+then the options list is C<[\&comparator, '']> or
+C<[\&comparator]>. If you want to specify no string comparator
+but a lowercaser, then the options list is
+C<['', \&lowercaser]>.
+
+Any comparator you specify is called as
+C<$comparator-E<gt>($left, $right)>,
+and, like a normal Perl C<cmp> replacement, must return
+-1, 0, or 1 depending on whether the left argument is stringwise
+less than, equal to, or greater than the right argument.
+
+Any lowercaser function you specify is called as
+C<$lowercased = $lowercaser-E<gt>($original)>. The routine
+must not modify its C<$_[0]>.
+
+=head2 The ncmp function
+
+Often, when sorting non-string values like this:
+
+ @objects_sorted = sort { $a->tag cmp $b->tag } @objects;
+
+...or even in a Schwartzian transform, like this:
+
+ @strings =
+ map $_->[0]
+ sort { $a->[1] cmp $b->[1] }
+ map { [$_, make_a_sort_key_from($_) ]
+ @_
+ ;
+
+...you wight want something that replaces not C<sort>, but C<cmp>.
+That's what Sort::Naturally's C<ncmp> function is for. Call it with
+the syntax C<ncmp($left,$right)> instead of C<$left cmp $right>,
+but otherwise it's a fine replacement:
+
+ @objects_sorted = sort { ncmp($a->tag,$b->tag) } @objects;
+
+ @strings =
+ map $_->[0]
+ sort { ncmp($a->[1], $b->[1]) }
+ map { [$_, make_a_sort_key_from($_) ]
+ @_
+ ;
+
+Just as with C<nsort> can take different a string-comparator
+and/or lowercaser, you can do the same with C<ncmp>, by passing
+an arrayref as the first argument:
+
+ ncmp( [
+ \&string_comparator, # optional
+ \&lowercaser_function # optional
+ ],
+ $left, $right
+ )
+
+You might get string comparators from L<Sort::ArbBiLex|Sort::ArbBiLex>.
+
+=head1 NOTES
+
+=over
+
+=item *
+
+This module is not a substitute for
+L<Sort::Versions|Sort::Versions>! If
+you just need proper version sorting, use I<that!>
+
+=item *
+
+If you need something that works I<sort of> like this module's
+functions, but not quite the same, consider scouting thru this
+module's source code, and adapting what you see. Besides
+the functions that actually compile in this module, after the POD,
+there's several alternate attempts of mine at natural sorting
+routines, which are not compiled as part of the module, but which you
+might find useful. They should all be I<working> implementations of
+slightly different algorithms
+(all of them based on Martin Pool's C<nsort>) which I eventually
+discarded in favor of my algorithm. If you are having to
+naturally-sort I<very large> data sets, and sorting is getting
+ridiculously slow, you might consider trying one of those
+discarded functions -- I have a feeling they might be faster on
+large data sets. Benchmark them on your data and see. (Unless
+you I<need> the speed, don't bother. Hint: substitute C<sort>
+for C<nsort> in your code, and unless your program speeds up
+drastically, it's not the sorting that's slowing things down.
+But if it I<is> C<nsort> that's slowing things down, consider
+just:
+
+ if(@set >= SOME_VERY_BIG_NUMBER) {
+ no locale; # vroom vroom
+ @sorted = sort(@set); # feh, good enough
+ } elsif(@set >= SOME_BIG_NUMBER) {
+ use locale;
+ @sorted = sort(@set); # feh, good enough
+ } else {
+ # but keep it pretty for normal cases
+ @sorted = nsort(@set);
+ }
+
+=item *
+
+If you do adapt the routines in this module, email me; I'd
+just be interested in hearing about it.
+
+=item *
+
+Thanks to the EFNet #perl people for encouraging this module,
+especially magister and a-mused.
+
+=back
+
+=head1 COPYRIGHT AND DISCLAIMER
+
+Copyright 2001, Sean M. Burke C<sburke@cpan.org>, all rights
+reserved. This program is free software; you can redistribute it
+and/or modify it under the same terms as Perl itself.
+
+This program is distributed in the hope that it will be useful, but
+without any warranty; without even the implied warranty of
+merchantability or fitness for a particular purpose.
+
+=head1 AUTHOR
+
+Sean M. Burke C<sburke@cpan.org>
+
+=cut
+
+############ END OF DOCS ############
+
+############################################################################
+############################################################################
+
+############ BEGIN OLD STUFF ############
+
+# We can't have "use integer;", or else (5 <=> 5.1) comes out "0" !
+
+#-----------------------------------------------------------------------------
+sub nsort {
+ my($cmp, $lc);
+ return @_ if @_ < 2; # Just to be CLEVER.
+
+ my($x, $i); # scratch vars
+
+ # And now, the GREAT BIG Schwartzian transform:
+
+ map
+ $_->[0],
+
+ sort {
+ # Uses $i as the index variable, $x as the result.
+ $x = 0;
+ $i = 1;
+ DEBUG and print "\nComparing ", map("{$_}", @$a),
+ ' : ', map("{$_}", @$b), , "...\n";
+
+ while($i < @$a and $i < @$b) {
+ DEBUG and print " comparing $i: {$a->[$i]} cmp {$b->[$i]} => ",
+ $a->[$i] cmp $b->[$i], "\n";
+ last if ($x = ($a->[$i] cmp $b->[$i])); # lexicographic
+ ++$i;
+
+ DEBUG and print " comparing $i: {$a->[$i]} <=> {$b->[$i]} => ",
+ $a->[$i] <=> $b->[$i], "\n";
+ last if ($x = ($a->[$i] <=> $b->[$i])); # numeric
+ ++$i;
+ }
+
+ DEBUG and print "{$a->[0]} : {$b->[0]} is ",
+ $x || (@$a <=> @$b) || 0
+ ,"\n"
+ ;
+ $x || (@$a <=> @$b) || ($a->[0] cmp $b->[0]);
+ # unless we found a result for $x in the while loop,
+ # use length as a tiebreaker, otherwise use cmp
+ # on the original string as a fallback tiebreaker.
+ }
+
+ map {
+ my @bit = ($x = defined($_) ? $_ : '');
+
+ if($x =~ m/^[+-]?(?=\d|\.\d)\d*(?:\.\d*)?(?:[Ee](?:[+-]?\d+))?\z/s) {
+ # It's entirely purely numeric, so treat it specially:
+ push @bit, '', $x;
+ } else {
+ # Consume the string.
+ while(length $x) {
+ push @bit, ($x =~ s/^(\D+)//s) ? lc($1) : '';
+ push @bit, ($x =~ s/^(\d+)//s) ? $1 : 0;
+ }
+ }
+ DEBUG and print "$bit[0] => ", map("{$_} ", @bit), "\n";
+
+ # End result: [original bit , (text, number), (text, number), ...]
+ # Minimally: [0-length original bit,]
+ # Examples:
+ # ['10' => '' , 10, ]
+ # ['fo900' => 'fo' , 900, ]
+ # ['foo10' => 'foo', 10, ]
+ # ['foo9.pl' => 'foo', 9, , '.pl', 0 ]
+ # ['foo32.pl' => 'foo', 32, , '.pl', 0 ]
+ # ['foo325.pl' => 'foo', 325, , '.pl', 0 ]
+ # Yes, always an ODD number of elements.
+
+ \@bit;
+ }
+ @_;
+}
+
+#-----------------------------------------------------------------------------
+# Same as before, except without the pure-number trap.
+
+sub nsorts {
+ return @_ if @_ < 2; # Just to be CLEVER.
+
+ my($x, $i); # scratch vars
+
+ # And now, the GREAT BIG Schwartzian transform:
+
+ map
+ $_->[0],
+
+ sort {
+ # Uses $i as the index variable, $x as the result.
+ $x = 0;
+ $i = 1;
+ DEBUG and print "\nComparing ", map("{$_}", @$a),
+ ' : ', map("{$_}", @$b), , "...\n";
+
+ while($i < @$a and $i < @$b) {
+ DEBUG and print " comparing $i: {$a->[$i]} cmp {$b->[$i]} => ",
+ $a->[$i] cmp $b->[$i], "\n";
+ last if ($x = ($a->[$i] cmp $b->[$i])); # lexicographic
+ ++$i;
+
+ DEBUG and print " comparing $i: {$a->[$i]} <=> {$b->[$i]} => ",
+ $a->[$i] <=> $b->[$i], "\n";
+ last if ($x = ($a->[$i] <=> $b->[$i])); # numeric
+ ++$i;
+ }
+
+ DEBUG and print "{$a->[0]} : {$b->[0]} is ",
+ $x || (@$a <=> @$b) || 0
+ ,"\n"
+ ;
+ $x || (@$a <=> @$b) || ($a->[0] cmp $b->[0]);
+ # unless we found a result for $x in the while loop,
+ # use length as a tiebreaker, otherwise use cmp
+ # on the original string as a fallback tiebreaker.
+ }
+
+ map {
+ my @bit = ($x = defined($_) ? $_ : '');
+
+ while(length $x) {
+ push @bit, ($x =~ s/^(\D+)//s) ? lc($1) : '';
+ push @bit, ($x =~ s/^(\d+)//s) ? $1 : 0;
+ }
+ DEBUG and print "$bit[0] => ", map("{$_} ", @bit), "\n";
+
+ # End result: [original bit , (text, number), (text, number), ...]
+ # Minimally: [0-length original bit,]
+ # Examples:
+ # ['10' => '' , 10, ]
+ # ['fo900' => 'fo' , 900, ]
+ # ['foo10' => 'foo', 10, ]
+ # ['foo9.pl' => 'foo', 9, , '.pl', 0 ]
+ # ['foo32.pl' => 'foo', 32, , '.pl', 0 ]
+ # ['foo325.pl' => 'foo', 325, , '.pl', 0 ]
+ # Yes, always an ODD number of elements.
+
+ \@bit;
+ }
+ @_;
+}
+
+#-----------------------------------------------------------------------------
+# Same as before, except for the sort-key-making
+
+sub nsort0 {
+ return @_ if @_ < 2; # Just to be CLEVER.
+
+ my($x, $i); # scratch vars
+
+ # And now, the GREAT BIG Schwartzian transform:
+
+ map
+ $_->[0],
+
+ sort {
+ # Uses $i as the index variable, $x as the result.
+ $x = 0;
+ $i = 1;
+ DEBUG and print "\nComparing ", map("{$_}", @$a),
+ ' : ', map("{$_}", @$b), , "...\n";
+
+ while($i < @$a and $i < @$b) {
+ DEBUG and print " comparing $i: {$a->[$i]} cmp {$b->[$i]} => ",
+ $a->[$i] cmp $b->[$i], "\n";
+ last if ($x = ($a->[$i] cmp $b->[$i])); # lexicographic
+ ++$i;
+
+ DEBUG and print " comparing $i: {$a->[$i]} <=> {$b->[$i]} => ",
+ $a->[$i] <=> $b->[$i], "\n";
+ last if ($x = ($a->[$i] <=> $b->[$i])); # numeric
+ ++$i;
+ }
+
+ DEBUG and print "{$a->[0]} : {$b->[0]} is ",
+ $x || (@$a <=> @$b) || 0
+ ,"\n"
+ ;
+ $x || (@$a <=> @$b) || ($a->[0] cmp $b->[0]);
+ # unless we found a result for $x in the while loop,
+ # use length as a tiebreaker, otherwise use cmp
+ # on the original string as a fallback tiebreaker.
+ }
+
+ map {
+ my @bit = ($x = defined($_) ? $_ : '');
+
+ if($x =~ m/^[+-]?(?=\d|\.\d)\d*(?:\.\d*)?(?:[Ee](?:[+-]?\d+))?\z/s) {
+ # It's entirely purely numeric, so treat it specially:
+ push @bit, '', $x;
+ } else {
+ # Consume the string.
+ while(length $x) {
+ push @bit, ($x =~ s/^(\D+)//s) ? lc($1) : '';
+ # Secret sauce:
+ if($x =~ s/^(\d+)//s) {
+ if(substr($1,0,1) eq '0' and $1 != 0) {
+ push @bit, $1 / (10 ** length($1));
+ } else {
+ push @bit, $1;
+ }
+ } else {
+ push @bit, 0;
+ }
+ }
+ }
+ DEBUG and print "$bit[0] => ", map("{$_} ", @bit), "\n";
+
+ \@bit;
+ }
+ @_;
+}
+
+#-----------------------------------------------------------------------------
+# Like nsort0, but WITHOUT pure number handling, and WITH special treatment
+# of pulling off extensions and version numbers.
+
+sub nsortf {
+ return @_ if @_ < 2; # Just to be CLEVER.
+
+ my($x, $i); # scratch vars
+
+ # And now, the GREAT BIG Schwartzian transform:
+
+ map
+ $_->[0],
+
+ sort {
+ # Uses $i as the index variable, $x as the result.
+ $x = 0;
+ $i = 3;
+ DEBUG and print "\nComparing ", map("{$_}", @$a),
+ ' : ', map("{$_}", @$b), , "...\n";
+
+ while($i < @$a and $i < @$b) {
+ DEBUG and print " comparing $i: {$a->[$i]} cmp {$b->[$i]} => ",
+ $a->[$i] cmp $b->[$i], "\n";
+ last if ($x = ($a->[$i] cmp $b->[$i])); # lexicographic
+ ++$i;
+
+ DEBUG and print " comparing $i: {$a->[$i]} <=> {$b->[$i]} => ",
+ $a->[$i] <=> $b->[$i], "\n";
+ last if ($x = ($a->[$i] <=> $b->[$i])); # numeric
+ ++$i;
+ }
+
+ DEBUG and print "{$a->[0]} : {$b->[0]} is ",
+ $x || (@$a <=> @$b) || 0
+ ,"\n"
+ ;
+ $x || (@$a <=> @$b ) || ($a->[1] cmp $b->[1])
+ || ($a->[2] <=> $b->[2]) || ($a->[0] cmp $b->[0]);
+ # unless we found a result for $x in the while loop,
+ # use length as a tiebreaker, otherwise use the
+ # lc'd extension, otherwise the verison, otherwise use
+ # the original string as a fallback tiebreaker.
+ }
+
+ map {
+ my @bit = ( ($x = defined($_) ? $_ : ''), '',0 );
+
+ {
+ # Consume the string.
+
+ # First, pull off any VAX-style version
+ $bit[2] = $1 if $x =~ s/;(\d+)$//;
+
+ # Then pull off any apparent extension
+ if( $x !~ m/^\.+$/s and # don't mangle ".", "..", or "..."
+ $x =~ s/(\.[^\.\;]*)$//sg
+ # We could try to avoid catching all-digit extensions,
+ # but I think that's getting /too/ clever.
+ ) {
+ $i = $1;
+ if($x =~ m<[^\\\://]$>s) {
+ # We didn't take the whole basename.
+ $bit[1] = lc $i;
+ DEBUG and print "Consuming extension \"$1\"\n";
+ } else {
+ # We DID take the whole basename. Fix it.
+ $x = $1; # Repair it.
+ }
+ }
+
+ push @bit, '', -1 if $x =~ m/^\./s;
+ # A hack to make .-initial filenames sort first, regardless of locale.
+ # And -1 is always a sort-firster, since in the code below, there's
+ # no allowance for filenames containing negative numbers: -1.dat
+ # will be read as string '-' followed by number 1.
+
+ while(length $x) {
+ push @bit, ($x =~ s/^(\D+)//s) ? lc($1) : '';
+ # Secret sauce:
+ if($x =~ s/^(\d+)//s) {
+ if(substr($1,0,1) eq '0' and $1 != 0) {
+ push @bit, $1 / (10 ** length($1));
+ } else {
+ push @bit, $1;
+ }
+ } else {
+ push @bit, 0;
+ }
+ }
+ }
+
+ DEBUG and print "$bit[0] => ", map("{$_} ", @bit), "\n";
+
+ \@bit;
+ }
+ @_;
+}
+
+# yowza yowza yowza.
+
push @INC, "modules/fallback"; # Only use our own versions of modules if there's no system version.
}
-use Config::Std;
use Data::Dumper;
use Devel::REPL 1.002001;
use Term::ReadLine::Perl::Bind; # use sane key binding for rxvt users
-read_config 'config/lx_office.conf' => my %config;
+use SL::LxOfficeConf;
+SL::LxOfficeConf->read;
-my $login = shift || $config{Console}{login} || 'demo';
-my $history_file = $config{Console}{history_file} || '/tmp/lxoffice_console_history.log'; # fallback if users is not writable
-my $autorun = $config{Console}{autorun};
+my $login = shift || $::lx_office_conf{console}{login} || 'demo';
+my $history_file = $::lx_office_conf{console}{history_file} || '/tmp/lxoffice_console_history.log'; # fallback if users is not writable
+my $autorun = $::lx_office_conf{console}{autorun};
# will be configed eventually
my @plugins = qw(History LexEnv Colors MultiLine::PPI FancyPrompt PermanentHistory AutoloadModules);
use CGI qw( -no_xhtml);
use DateTime;
use SL::Auth;
-use SL::Dispatcher;
use SL::Form;
use SL::Helper::DateTime;
use SL::Locale;
package main;
- { no warnings 'once';
- $::userspath = "users";
- $::templates = "templates";
- $::sendmail = "| /usr/sbin/sendmail -t";
- }
-
- eval { require "config/lx-erp.conf"; };
- eval { require "config/lx-erp-local.conf"; } if -f "config/lx-erp-local.conf";
-
$::lxdebug = LXDebug->new;
- $::locale = Locale->new($::language);
+ $::locale = Locale->new($::lx_office_conf{system}->{language});
$::cgi = CGI->new qw();
$::form = Form->new;
$::auth = SL::Auth->new;
- read_config 'config/lx_office.conf' => %::lx_office_conf;
- SL::Dispatcher::_decode_recursively(\%::lx_office_conf);
-
die 'cannot reach auth db' unless $::auth->session_tables_present;
$::auth->restore_session;
use utf8;
use English '-no_match_vars';
+use Config::Std;
use DBI;
use Data::Dumper;
use Getopt::Long;
use Text::Iconv;
use SL::LXDebug;
+use SL::LxOfficeConf;
+SL::LxOfficeConf->read;
our $lxdebug = LXDebug->new();
use SL::Auth;
#######
#######
-eval { require "config/lx-erp.conf"; };
-eval { require "config/lx-erp-local.conf"; } if (-f "config/lx-erp-local.conf");
-
$form = Form->new();
$locale = Locale->new("de");
PLPGSQL=""
#Datei plpgsql.so suchen
-#Mit Paketmanager (RPM oder APT) suchen
-#PLPGSQL=`dpkg -L postgresql | grep plpgsql.so`
+POSTGRESQL=`dpkg -l | grep -E "postgresql-[0-9]" | cut -d" " -f3 | sort -r | head -1 -`
+
+#Mit Paketmanager (Apt) suchen
+if [ "$POSTGRESQL#" == "#" ]; then
+ writeln 1 1 $FEHLER
+ writeln 2 1 Keine PostgreSQL mit Paketmanager installiert
+ writeln 3 1 Datenbank bitte manuell einrichten.
+ exit 0
+else
+ PLPGSQL=`dpkg -L postgresql-8.3 | grep plpgsql.so`
+fi
+
+#Mit Paketmanager (RPM) suchen ?
#PLPGSQL=`rpm -q --list postgres | grep plpgsql.so`
if [ "$PLPGSQL#" == "#" ]; then
#Probleme mit Paketmanager, dann zunaechst mit locate, geht schneller
+ updatedb
writeln 3 3 --locate
tmp=`locate plpgsql.so 2>/dev/null`
PLPGSQL=`echo $tmp | cut -d " " -f 1`
tput rmso
exit 1
fi
-v7=`su postgres -c "echo 'select version()' | psql template1 2>/dev/null | grep -E "[Ss][Qq][Ll][[:space:]]+7\.[0-9]\.[0-9]" | wc -l"`
-v8=`su postgres -c "echo 'select version()' | psql template1 2>/dev/null | grep -E "[Ss][Qq][Ll][[:space:]]+8\.[0-9]\.[0-9]" | wc -l"`
-#cnt=`echo $v7 + $v8 | bc -l`
+v8=`su postgres -c "echo 'select version()' | psql template1 2>/dev/null | grep -E "[Ss][Qq][Ll][[:space:]]+8\.[2-9]\.[0-9]" | wc -l"`
if [ $v8 -eq 0 ]; then
- if [ $v7 -eq 0 ]; then
- tput bel
- tput bold
- echo User postgres konnte die Datenbank nicht ansprechen
- tput rmso
- exit 1;
- else
- tput clear
- writeln 1 1 Datenbank Version 7x konnte erreicht werden.
- fi
+ tput bel
+ tput bold
+ echo User postgres konnte die Datenbank 8.2.x - 8.9.x nicht ansprechen
+ tput rmso
+ exit 1;
else
tput clear
- writeln 1 1 Datenbank Version 8x konnte erreicht werden.
+ writeln 1 1 Datenbank Version 8.2.x - 8.9.x konnte erreicht werden.
fi
echo "CREATE FUNCTION plpgsql_call_handler() RETURNS language_handler" > lxdbinst.sql
writeln 12 1 Datenbankberechtigung einrichten
#wo ist die pg_hba.conf
writeln 13 3 --find erst /etc dann /var/lib
-tmp=`find /etc -name pg_hba.conf -type f`
+tmp=`find /etc/postgresql -name pg_hba.conf -type f`
[ "$tmp#" == "#" ] && tmp=`find /var/lib -name pg_hba.conf -type f`
PGHBA=`echo $tmp | cut -d " " -f 1`
fi
mv $CONFDIR/postgresql.conf $CONFDIR/postgresql.conf.org
-if ! [ $v7 -eq 0 ]; then
- #Nur bei der V7.x: tcpip_socket = true
- sed 's/^.*tcpip_socket.*/tcpip_socket = true/i' $CONFDIR/postgresql.conf.org > $CONFDIR/postgresql.conf
- cnt=`grep tcpip_socket $CONFDIR/postgresql.conf | wc -l`
- if [ $cnt -eq 0 ]; then
- cp $CONFDIR/postgresql.conf.org $CONFDIR/postgresql.conf
- echo "tcpip_socket = true" >> $CONFDIR/postgresql.conf
- fi
-else
- #Bei der V8.x OID einschalten.
- sed 's/^.*default_with_oids.*/default_with_oids = true/i' $CONFDIR/postgresql.conf.org > $CONFDIR/postgresql.conf
- cnt=`grep default_with_oids $CONFDIR/postgresql.conf | wc -l`
- if [ $cnt -eq 0 ]; then
- cp $CONFDIR/postgresql.conf.org $CONFDIR/postgresql.conf
- echo "default_with_oids = true" >> $CONFDIR/postgresql.conf
- fi
+#Bei der V8.x OID einschalten.
+sed 's/^.*default_with_oids.*/default_with_oids = true/i' $CONFDIR/postgresql.conf.org > $CONFDIR/postgresql.conf
+cnt=`grep default_with_oids $CONFDIR/postgresql.conf | wc -l`
+if [ $cnt -eq 0 ]; then
+ cp $CONFDIR/postgresql.conf.org $CONFDIR/postgresql.conf
+ echo "default_with_oids = true" >> $CONFDIR/postgresql.conf
fi
-tmp=`ls /etc/init.d/postgres*`
+tmp=`ls -r1 /etc/init.d/postgres*`
PGSQL=`echo $tmp | cut -d " " -f 1`
writeln 18 1 Datenbank neu starten
#!/bin/bash
-#set -x
-
# e = exit on error
set -e
# x = xtrace
#set -x
+FEHLER="Achtung!! Es hat ein Problem gegeben"
+ERRCNT=0
source /usr/share/debconf/confmodule
-
-function writeln()
-{
- tput cup $1 $2 # Cursor positionieren
- tput el # Rest der Zeile löschen
- shift 2 # Parameter für die Koordinaten entfernen
- echo -n $*" " # Rest der Parameterliste ausgeben
-}
-
-#tput clear
-
#Als root anmelden
if [ `id -u` -gt 0 ]; then echo "Bitte als root anmelden"; exit 1; fi
+POSTGRESQL=`dpkg -l | grep -E "postgresql-[0-9]" | cut -d" " -f3 | sort -r | head -1 -`
-#writeln 1 1 PostgreSQL fuer Lx-Office vorbereiten
-#writeln 2 1 1. plpgsql.so suchen
-PLPGSQL=""
#Datei plpgsql.so suchen
-
-#Mit Paketmanager (RPM oder APT) suchen
-#PLPGSQL=`dpkg -L postgresql | grep plpgsql.so`
-#PLPGSQL=`rpm -q --list postgres | grep plpgsql.so`
+#Mit Paketmanager suchen
+if [ "$POSTGRESQL#" == "#" ]; then
+ echo $FEHLER
+ echo Keine PostgreSQL mit Paketmanager installiert
+ echo Datenbank bitte manuell einrichten.
+ exit 0
+else
+ PLPGSQL=`dpkg -L postgresql-8.3 | grep plpgsql.so`
+fi
if [ "$PLPGSQL#" == "#" ]; then
- #Probleme mit Paketmanager, dann zunaechst mit locate, geht schneller
-# writeln 3 3 --locate
- tmp=`locate plpgsql.so 2>/dev/null`
- PLPGSQL=`echo $tmp | cut -d " " -f 1`
+ #Probleme mit Paketmanager, dann zunaechst mit locate, geht schneller
+ updatedb
+ tmp=`locate plpgsql.so 2>/dev/null`
+ PLPGSQL=`echo $tmp | cut -d " " -f 1`
fi
if [ "$PLPGSQL#" == "#" ]; then
- #noch nicht gefunden, also mit find suchen
-# writeln 3 15 --find /usr/lib
- tmp=`find /usr/lib -name plpgsql.so -type f`
- PLPGSQL=`echo $tmp | cut -d " " -f 1`
+ #noch nicht gefunden, also mit find suchen
+ tmp=`find /usr/lib -name plpgsql.so -type f`
+ PLPGSQL=`echo $tmp | cut -d " " -f 1`
fi
if [ "$PLPGSQL#" == "#" ]; then
- while :; do
-# writeln 4 1 'plpgsql.so' nicht gefunden.
-# tput bold
-# writeln 5 1 "Bitte den Pfad eingeben: "
-# tput rmso
-# read PLPGSQL
- [ "$PLPGSQL#" != "#" ] && [ -f $PLPGSQL ] && break
- # tput bel
- done
+ echo $FEHLER
+ echo 'plpgsql.so' nicht gefunden.
+ echo Datenbank manuell einrichten.
+ exit 0
fi
-#writeln 6 1 ok. 'plpgsql.so' gefunden
#Kann der User postgres die db erreichen
cnt=`ps aux | grep postgres | wc -l`
if [ $cnt -eq 0 ]; then
-# tput bel
-# tput bold
- echo Die postgreSQL-Datebbank ist nicht gestartet!
-# tput rmso
- exit 1
+ echo $FEHLER
+ echo Die postgreSQL-Datebbank ist nicht gestartet!
+ echo Datenbank manuell einrichten.
+ exit 0
fi
-v7=`su postgres -c "echo 'select version()' | psql template1 2>/dev/null | grep -E "[Ss][Qq][Ll][[:space:]]+7\.[0-9]\.[0-9]" | wc -l"`
-v8=`su postgres -c "echo 'select version()' | psql template1 2>/dev/null | grep -E "[Ss][Qq][Ll][[:space:]]+8\.[0-9]\.[0-9]" | wc -l"`
-#cnt=`echo $v7 + $v8 | bc -l`
+
+v8=`su postgres -c "echo 'select version()' | psql template1 2>/dev/null | grep -E "[Ss][Qq][Ll][[:space:]]+8\.[2-9]\.[0-9]" | wc -l"`
if [ $v8 -eq 0 ]; then
- if [ $v7 -eq 0 ]; then
-# tput bel
-# tput bold
- echo User postgres konnte die Datenbank nicht ansprechen
-# tput rmso
- exit 1;
- else
- # do nothing
- echo ""
-
-# tput clear
-# writeln 1 1 Datenbank Version 7x konnte erreicht werden.
- fi
-else
- # do nothing
- echo ""
-# tput clear
-# writeln 1 1 Datenbank Version 8x konnte erreicht werden.
+ echo $FEHLER
+ echo Datenbank Version 8x konnte erreicht werden.
+ exit 0
fi
echo "CREATE FUNCTION plpgsql_call_handler() RETURNS language_handler" > lxdbinst.sql
echo "CREATE PROCEDURAL LANGUAGE plpgsql HANDLER plpgsql_call_handler;" >> lxdbinst.sql
#writeln 2 1 Datenbankbenutzer einrichten
-#tput bold
-#writeln 3 1 "Bitte den Datenbank-Benutzernamen (Kleinbuchstaben) eingeben [lxoffice]: "
-#tput rmso
-#read LXOUSER
-#if [ "$LXOUSER#" == "#" ]; then LXOUSER="lxoffice"; fi
-#while :; do
-# tput bold
-# writeln 4 1 "Bitte ein Kennwort eingeben : "
-# tput rmso
-# read USRPWD
- if ! [ "$USRPWD#" == "#" ]; then break; fi
-# tput bel
-#done;
-
LXOUSER="lxoffice"
-
db_get lx-office-erp/lx-office-erp-user-postgresql-password
USRPWD="$RET"
-
echo "CREATE USER $LXOUSER with CREATEDB ;" >> lxdbinst.sql
echo "ALTER USER $LXOUSER PASSWORD '$USRPWD';" >> lxdbinst.sql
echo "UPDATE pg_language SET lanpltrusted = true WHERE lanname = 'plpgsql';" >> lxdbinst.sql
echo "Fehlermeldungen die 'already exists' enthalten koennen ignoriert werden"
-#writeln 11 1 Datenbank fuer Lx-Office vorbereitet
-
#writeln 12 1 Datenbankberechtigung einrichten
-#wo ist die pg_hba.conf
-#writeln 13 3 --find erst /etc dann /var/lib
-tmp=`find /etc -name pg_hba.conf -type f`
-[ "$tmp#" == "#" ] && tmp=`find /var/lib -name pg_hba.conf -type f`
-PGHBA=`echo $tmp | cut -d " " -f 1`
+PGHBA=`find /etc/postgresql -name pg_hba.conf -type f | sort -r | head -1 -`
+if [ "$PGHBA#" == "#" ] ; then
+ PGHBA=`find /var/lib -name pg_hba.conf -type f | sort -r | head -1 -`
+fi
if [ "$PGHBA#" == "#" ]; then
- while :; do
-# writeln 14 1 'pg_hba.conf' nicht gefunden.
-# tput bold
-# writeln 15 1 "Bitte den Pfad eingeben: "
-# tput rmso
-# read PGHBA
- [ "$PGHBA#" != "#" ] && [ -f $PGHBA ] && break
- # tput bel
- done
+ echo $FEHLER
+ echo 'pg_hba.conf' nicht gefunden.
+ echo "Berechtigungen bitte selber einrichten"
+ ERRCNT=1
fi
-#writeln 16 1 ok. 'pg_hba.conf' gefunden
cnt=`grep $LXOUSER $PGHBA | wc -l `
if [ $cnt -eq 0 ]; then
- mv $PGHBA $PGHBA.org
- echo "local all $LXOUSER password" > $PGHBA
- echo "host all $LXOUSER 127.0.0.1 255.255.255.255 password" >> $PGHBA
- cat $PGHBA.org >> $PGHBA
+ mv $PGHBA $PGHBA.org
+ echo "local all $LXOUSER password" > $PGHBA
+ echo "host all $LXOUSER 127.0.0.1 255.255.255.255 password" >> $PGHBA
+ cat $PGHBA.org >> $PGHBA
fi
CONFDIR=`dirname $PGHBA`
#postgresql.conf anpassen, liegt vermutlich im gleichen Verzeichnis wie pg_hba.conf
if ! [ -f $CONFDIR/postgresql.conf ]; then
- #doch nicht da, dann fragen
- while :; do
-# writeln 13 1 'postgresql.conf' nicht gefunden.
-# tput bold
-# writeln 14 1 "Bitte den Pfad eingeben: "
-# tput rmso
-# read PGCONF
- [ "$PGCONF#" != "#" ] && [ -f $PGCONF ] && break
- # tput bel
- done
- CONFDIR=`dirname $PGCONF`
+ echo $FEHLER
+ echo 'postgresql.conf' nicht gefunden.
+ echo PostgreSQL selber konfigurieren
+ ERRCNT=1
fi
mv $CONFDIR/postgresql.conf $CONFDIR/postgresql.conf.org
-if ! [ $v7 -eq 0 ]; then
- #Nur bei der V7.x: tcpip_socket = true
- sed 's/^.*tcpip_socket.*/tcpip_socket = true/i' $CONFDIR/postgresql.conf.org > $CONFDIR/postgresql.conf
- cnt=`grep tcpip_socket $CONFDIR/postgresql.conf | wc -l`
- if [ $cnt -eq 0 ]; then
- cp $CONFDIR/postgresql.conf.org $CONFDIR/postgresql.conf
- echo "tcpip_socket = true" >> $CONFDIR/postgresql.conf
- fi
-else
- #Bei der V8.x OID einschalten.
- sed 's/^.*default_with_oids.*/default_with_oids = true/i' $CONFDIR/postgresql.conf.org > $CONFDIR/postgresql.conf
- cnt=`grep default_with_oids $CONFDIR/postgresql.conf | wc -l`
- if [ $cnt -eq 0 ]; then
- cp $CONFDIR/postgresql.conf.org $CONFDIR/postgresql.conf
- echo "default_with_oids = true" >> $CONFDIR/postgresql.conf
- fi
+#Bei der V8.x OID einschalten.
+sed 's/^.*default_with_oids.*/default_with_oids = true/i' $CONFDIR/postgresql.conf.org > $CONFDIR/postgresql.conf
+cnt=`grep default_with_oids $CONFDIR/postgresql.conf | wc -l`
+if [ $cnt -eq 0 ]; then
+ cp $CONFDIR/postgresql.conf.org $CONFDIR/postgresql.conf
+ echo "default_with_oids = true" >> $CONFDIR/postgresql.conf
fi
-tmp=`ls /etc/init.d/postgres*`
-PGSQL=`echo $tmp | cut -d " " -f 1`
+PGSQL=`ls -r1 /etc/init.d/postgres* | head -1 -`
#writeln 18 1 Datenbank neu starten
$PGSQL reload
-#tput bold
-#tput smso
-#writeln 20 12 ok. Das sollte es gewesen sein.
-#tput rmso
-#tput rmso
-echo
+if [ $ERRCNT -gt 0 ]; then
+ echo $FEHLER
+ echo Das betrifft aber nicht die Lx-Office Installation
+ echo sondern die Konfiguration der Datenbank.
+ echo $POSTGRESQL , $PGHBA , $CONFDIR/postgresql.conf ??
+ sleep 10
+fi
push @texts, <<EOL if $module->{debian};
- On Debian, Ubuntu and other distros you can install it with apt-get:
sudo apt-get install $module->{debian}
- Note these may be out of date as well if you system is old.
+ Note: These may be out of date as well if your system is old.
EOL
# TODO: SuSE and Fedora packaging. Windows packaging.
my $basedir = "../..";
my $locales_dir = ".";
my $bindir = "$basedir/bin/mozilla";
-my @progdirs = ( "$basedir/SL/Controller", "$basedir/SL/Template/Plugin" );
+my @progdirs = ( "$basedir/SL/Controller", "$basedir/SL/Template/Plugin", "$basedir/SL/Auth" );
my $dbupdir = "$basedir/sql/Pg-upgrade";
my $dbupdir2 = "$basedir/sql/Pg-upgrade2";
my $menufile = "menu.ini";
}
use CGI qw( -no_xhtml);
+use Config::Std;
use Data::Dumper;
use English qw( -no_match_vars );
use List::MoreUtils qw(any);
use SL::Form;
use SL::Locale;
use SL::LXDebug;
+use SL::LxOfficeConf;
use SL::DB::Helper::ALL;
use SL::DB::Helper::Mappings;
our $form;
our $cgi;
our $auth;
+our %lx_office_conf;
our $script = __FILE__;
$script =~ s:.*/::;
exit 1;
}
- my $login = shift @ARGV;
+ SL::LxOfficeConf->read;
- $::userspath = "users";
- $::templates = "templates";
- $::sendmail = "| /usr/sbin/sendmail -t";
+ my $login = shift @ARGV;
$::lxdebug = LXDebug->new();
- require "config/lx-erp.conf";
- require "config/lx-erp-local.conf" if -f "config/lx-erp-local.conf";
-
# locale messages
$::locale = Locale->new("de");
$::form = new Form;
use SL::Form;
use SL::Template;
-$userspath = "users";
-$templates = "templates";
-$memberfile = "users/members";
$sendmail = "| /usr/sbin/sendmail -t";
$| = 1;
$lxdebug = LXDebug->new();
-require "lx-erp.conf";
-
$form = new Form;
$form->{"script"} = "oe.pl";
}
use CGI qw( -no_xhtml);
-use Config::Std;
use Cwd;
use Daemon::Generic;
use Data::Dumper;
use SL::Form;
use SL::Helper::DateTime;
use SL::LXDebug;
+use SL::LxOfficeConf;
use SL::Locale;
our %lx_office_conf;
package main;
- { no warnings 'once';
- $::userspath = "users";
- $::templates = "templates";
- $::sendmail = "| /usr/sbin/sendmail -t";
- }
-
- eval { require "config/lx-erp.conf"; 1; } or die $EVAL_ERROR;
- eval { require "config/lx-erp-local.conf"; 1; } or die $EVAL_ERROR if -f "config/lx-erp-local.conf";
-
$::lxdebug = LXDebug->new;
- $::locale = Locale->new($::language);
+ $::locale = Locale->new($::lx_office_conf{system}->{language});
$::cgi = CGI->new qw();
$::form = Form->new;
$::auth = SL::Auth->new;
sub gd_preconfig {
my $self = shift;
- read_config $self->{configfile} => %lx_office_conf;
+ SL::LxOfficeConf->read;
die "Missing section [task_server] in config file" unless $lx_office_conf{task_server};
die "Missing key 'login' in section [task_server] in config file" unless $lx_office_conf{task_server}->{login};
foreach my $job (@{ $jobs }) {
# Provide fresh global variables in case legacy code modifies
# them somehow.
- $::locale = Locale->new($::language);
+ $::locale = Locale->new($::lx_office_conf{system}->{language});
$::form = Form->new;
$job->run;
mkdir($pidbase) if !-d $pidbase;
-newdaemon(configfile => "${cwd}/config/lx_office.conf",
+my $file = -f "${cwd}/config/lx_office.conf" ? "${cwd}/config/lx_office.conf" : "${cwd}/config/lx_office.conf.default";
+newdaemon(configfile => $file,
progname => 'lx-office-task-server',
pidbase => "${pidbase}/",
);
-- Ergaenzungen fuer 19% UmSt. ab 1.01.2007
+INSERT INTO tax (chart_id, rate, taxnumber, taxkey, taxdescription) VALUES ((SELECT id from CHART WHERE accno='3806'), 0.19, '3806', 3, 'Umsatzsteuer 19%');
+INSERT INTO tax (chart_id, rate, taxnumber, taxkey, taxdescription) VALUES ((SELECT id from CHART WHERE accno='1406'), 0.19, '1406', 9, 'Vorsteuer 19%');
insert into taxkeys (chart_id, tax_id, taxkey_id, pos_ustva, startdate) select chart.id, tax.id, taxkey_id, pos_ustva, '1970-01-01' from chart LEFT JOIN tax on (tax.taxkey=chart.taxkey_id) WHERE taxkey_id is not null;
insert into taxkeys (chart_id, tax_id, taxkey_id,startdate) SELECT 0, id, taxkey, '1970-01-01' FROM tax;
insert into taxkeys (chart_id, tax_id, taxkey_id, pos_ustva, startdate) select chart.id, (SELECT id from tax where taxdescription='Umsatzsteuer 19%'), 3, pos_ustva, '2007-01-01' from chart WHERE taxkey_id=3;
$sth->execute() || mydberror($query);
my $query_update = "UPDATE parts SET buchungsgruppen_id = ?";
- $query_update .= ", inventory_accno_id = ?" if ($main::eur);
+ $query_update .= ", inventory_accno_id = ?" if $::lx_office_conf{system}->{eur};
$query_update .= " WHERE id = ?";
my $sth_update = $dbh->prepare($query_update);
while (my $ref = $sth->fetchrow_hashref()) {
foreach my $bg (@{$buchungsgruppen}) {
- if (($main::eur ||
+ if (($::lx_office_conf{system}->{eur} ||
($ref->{"inventory_accno_id"} == $bg->{"inventory_accno_id"})) &&
($ref->{"income_accno_id"} == $bg->{"income_accno_id_0"}) &&
($ref->{"expense_accno_id"} == $bg->{"expense_accno_id_0"})) {
my @values = ($bg->{"id"}, $ref->{"id"});
- splice(@values, 1, 0, $bg->{"inventory_accno_id"}) if ($main::eur);
+ splice(@values, 1, 0, $bg->{"inventory_accno_id"}) if $::lx_office_conf{system}->{eur};
$sth_update->execute(@values) ||
mydberror($query_update . " (" . join(", ", @values) . ")");
last;
if (($ref->{"income_accno_id"} == $bg->{"income_accno_id_0"}) &&
($ref->{"expense_accno_id"} == $bg->{"expense_accno_id_0"})) {
my @values = ($bg->{"id"}, $ref->{"id"});
- splice(@values, 1, 0, undef) if ($main::eur);
+ splice(@values, 1, 0, undef) if $::lx_office_conf{system}->{eur};
$sth_update->execute(@values) ||
mydberror($query_update . " (" . join(", ", @values) . ")");
last;
$entry->{"ACC_INVENTORY"} = $acc_inventory;
$entry->{"ACC_INCOME"} = $acc_income;
$entry->{"ACC_EXPENSE"} = $acc_expense;
- $entry->{"eur"} = $main::eur;
+ $entry->{"eur"} = $::lx_office_conf{system}->{eur};
}
# $form->parse_html_template("dbupgrade/buchungsgruppen_parts")
# If balancing is off then force parts.inventory_accno_id to
# a single value for parts.
- force_inventory_accno_id_for_parts() if ($main::eur);
+ force_inventory_accno_id_for_parts() if $::lx_office_conf{system}->{eur};
# Force "IC" to be present in chart.link for all accounts
# which have been used as inventory accounts in parts.
--- /dev/null
+-- @tag: invalid_entries_in_custom_variables_validity
+-- @description: Ungültige Einträge in custom_variables_validity bereinigen
+-- @depends: release_2_6_1
+-- @charset: utf-8
+DELETE FROM custom_variables_validity
+WHERE trans_id NOT IN (
+ SELECT id
+ FROM parts
+);
--- /dev/null
+#!/usr/bin/perl
+
+# adapted from Michael Stevens' test script posted in p5p
+# in the thread "broken links in blead" from 01/19/2011
+#
+# caveats: wikipedia seems to have crawler protection and
+# will give 403 forbidden unless the user agent is faked.
+
+use strict;
+use File::Find;
+use LWP::Simple;
+use Test::More tests => 1;
+use URI::Find;
+
+my @fails;
+
+my $finder = URI::Find->new(sub {
+ my ($uri_obj, $uri_text) = @_;
+ $uri_text =~ s/^\<//;
+ $uri_text =~ s/\>$//;
+
+ push @fails, "$uri_text in file $File::Find::name"
+ if !defined get($uri_text);
+
+ return $_[1];
+});
+
+find(sub {
+ open(FH, $File::Find::name) or return;
+ my $text;
+ { local $/; $text = <FH>; }
+
+ $finder->find(\$text);
+
+ }, "."
+);
+
+if (@fails) {
+ ok(0, join "\n", @fails);
+} else {
+ ok(1, "no broken links found");
+}
[%- USE T8 %]
-[% USE HTML %]<body class="admin" onload="document.getElementById('rpw').focus()">
- <p><input type="button" class="submit" onclick="history.back()" value="[% 'Back' | $T8 %]"></p>
+[% USE HTML %]
+[% USE LxERP%]
+<body class="admin" onload="document.getElementById('rpw').focus()">
<div align="center">
<a href="http://www.lx-office.org"><img src="image/lx-office-erp.png" border="0"></a>
<p>[% 'Lx-Office Homepage' | $T8 %]: <a href="http://lx-office.org" target="_blank" title="[% 'Lx-Office Homepage' | $T8 %]">http://lx-office.org</a></p>
+ <p><a href="login.pl">[%- LxERP.t8('Back to the login page') %]</a></p>
+
</div>
</body>
<br>
<input type="submit" class="submit" name="action" value="[% 'Continue' | $T8 %]">
- <input type="submit" class="submit" name="action" value="[% 'Back' | $T8 %]">
+ <a href="admin.pl?action=pg_database_administration">[% 'Back' | $T8 %]</a>
</form>
<h2>[% title %]</h2>
<form method="post" action="admin.pl">
- <p><input type="button" class="submit" onclick="history.back()" value="[% 'Back' | $T8 %]"></p>
+ <p><a href="admin.pl?action=pg_database_administration">[% 'Back' | $T8 %]</a></p>
<p>
[% 'You can either create a new database or chose an existing database.' | $T8 %]
[% 'In the latter case the tables needed by Lx-Office will be created in that database.' | $T8 %]
<h2>[% title %]</h2>
<form method="post" action="admin.pl">
- <input type="hidden" name="back_nextsub" value="list_users">
- <input type="submit" class="submit" name="action" value="[% 'Back' | $T8 %]">
+ <a href="admin.pl?action=list_users">[% 'Back' | $T8 %]</a>
<table>
<tr>
[% USE HTML %]<body class="admin">
<h2>[% title %]</h2>
- <p><input type="button" class="submit" onclick="history.back()" value="[% 'Back' | $T8 %]"></p>
+ <p><a href="admin.pl?action=pg_database_administration">[% 'Back' | $T8 %]</a></p>
<form method="post" action="admin.pl">
<p>[% 'You can only delete datasets that are not in use.' | $T8 %]
<p class="message_hint">[ [% name %] ] - [% 'Do you really want to delete this group?' | $T8 %]</p>
<form name="Form" method="post" action="admin.pl">
- <input type="hidden" name="back_nextsub" value="edit_groups">
- <input type="submit" class="submit" name="action" value="[% 'Back' | $T8 %]">
-
+ <a href="admin.pl?action=edit_groups">[% 'Back' | $T8 %]</a>
<input type="hidden" name="group_id" value="[% HTML.escape(id) %]">
<input type="hidden" name="confirmed" value="1">
<div class="listtop">[% 'Edit group ' | $T8 %]: [% HTML.escape(name) %]</div>
- <p><input type="submit" class="submit" name="action" value="[% 'Back' | $T8 %]"></p>
+ <p><a href="admin.pl?action=edit_groups">[% 'Back' | $T8 %]</a></p>
<hr>
<div class="listtop">[% 'Edit group membership' | $T8 %]</div>
- <p><input type="button" class="submit" onclick="history.back()" value="[% 'Back' | $T8 %]"></p>
+ <p><a href="admin.pl?action=edit_groups">[% 'Back' | $T8 %]</a></p>
<p>[% 'Select the checkboxes that match users to the groups they should belong to.' | $T8 %]</p>
<form action="admin.pl">
<form name="Form" id="Form" method="post" action="admin.pl">
<div class="listtop" width="100%">[% title %]</div>
- <p><input type="button" class="submit" onclick="history.back()" value="[% 'Back' | $T8 %]"></p>
+ <p><a href="admin.pl?action=list_users">[% 'Back' | $T8 %]</a></p>
<table width="100%">
<tr valign="top">
<input name="callback" type="hidden" value="admin.pl?action=list_users">
- <input type="button" class="submit" onclick="history.back()" value="[% 'Back' | $T8 %]">
+ <a href="admin.pl?action=list_users">[% 'Back' | $T8 %]</a>
<input type="hidden" name="action" value="dispatcher">
<input type="submit" class="submit" name="action_save_user" value="[% 'Save' | $T8 %]">
[% USE HTML %]<body class="admin">
<h2>[% title %]</h2>
- <p><input type="button" class="submit" onclick="history.back()" value="[% 'Back' | $T8 %]"></p>
+ <p><a href="admin.pl?action=pg_database_administration">[% 'Back' | $T8 %]</a></p>
[% IF ALL_UPDATED %]
[% 'All Datasets up to date!' | $T8 %]