Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 672d08f2

Von Sven Schöling vor etwa 4 Jahren hinzugefügt

  • ID 672d08f210993b3e7ab0608dce93cdcba7af1b30
  • Vorgänger 023edaf2
  • Nachfolger 73dcd174

Layout::Base: git_commit_reload_resources config parameter

Ermöglicht das Ausschalten von git commit Resourcesversionierung das
bisher immer an war.

Unterschiede anzeigen:

SL/Layout/Base.pm
}
sub init_auto_reload_resources_param {
return sprintf('?rand=%d-%d-%d', Time::HiRes::gettimeofday(), int(rand 1000000000000)) if $::lx_office_conf{debug}->{auto_reload_resources};
if ($::lx_office_conf{debug}->{auto_reload_resources}) {
return sprintf('?rand=%d-%d-%d', Time::HiRes::gettimeofday(), int(rand 1000000000000));
}
if ($::lx_office_conf{debug}{git_commit_reload_resources}) {
my $git_dir = SL::System::Process::exe_dir() . '/.git';
my $git_dir = SL::System::Process::exe_dir() . '/.git';
return '' unless -d $git_dir;
return '' unless -d $git_dir;
my $content = eval { scalar(read_file($git_dir . '/HEAD')) };
my $content = eval { scalar(read_file($git_dir . '/HEAD')) };
return '' unless ($content // '') =~ m{\Aref: ([^\r\n]+)};
return '' unless ($content // '') =~ m{\Aref: ([^\r\n]+)};
$content = eval { scalar(read_file($git_dir . '/' . $1)) };
$content = eval { scalar(read_file($git_dir . '/' . $1)) };
return '' unless ($content // '') =~ m{\A([0-9a-fA-F]+)};
return '' unless ($content // '') =~ m{\A([0-9a-fA-F]+)};
return '?rand=' . $1;
}
return '?rand=' . $1;
return '';
}
##########################################
config/kivitendo.conf.default
# the web browser to always reload the resources.
auto_reload_resources = 0
# Alternative to auto_reload_resources. If the installation dir is under git
# version control, this will use the HEAD commit sha1 as the random GET
# parameter, so that resources are reloaded if the installed version charnges.
git_commit_reload_recources = 0
# If set to 1 each exception will include a full stack backtrace.
backtrace_on_die = 0

Auch abrufbar als: Unified diff