Revision 5b8c6acb
Von Sven Schöling vor mehr als 3 Jahren hinzugefügt
SL/Layout/Base.pm | ||
---|---|---|
44 | 44 |
} |
45 | 45 |
|
46 | 46 |
sub init_auto_reload_resources_param { |
47 |
return sprintf('?rand=%d-%d-%d', Time::HiRes::gettimeofday(), int(rand 1000000000000)) if $::lx_office_conf{debug}->{auto_reload_resources}; |
|
47 |
if ($::lx_office_conf{debug}->{auto_reload_resources}) { |
|
48 |
return sprintf('?rand=%d-%d-%d', Time::HiRes::gettimeofday(), int(rand 1000000000000)); |
|
49 |
} |
|
50 |
|
|
51 |
if ($::lx_office_conf{debug}{git_commit_reload_resources}) { |
|
52 |
my $git_dir = SL::System::Process::exe_dir() . '/.git'; |
|
48 | 53 |
|
49 |
my $git_dir = SL::System::Process::exe_dir() . '/.git';
|
|
54 |
return '' unless -d $git_dir;
|
|
50 | 55 |
|
51 |
return '' unless -d $git_dir;
|
|
56 |
my $content = eval { scalar(read_file($git_dir . '/HEAD')) };
|
|
52 | 57 |
|
53 |
my $content = eval { scalar(read_file($git_dir . '/HEAD')) };
|
|
58 |
return '' unless ($content // '') =~ m{\Aref: ([^\r\n]+)};
|
|
54 | 59 |
|
55 |
return '' unless ($content // '') =~ m{\Aref: ([^\r\n]+)};
|
|
60 |
$content = eval { scalar(read_file($git_dir . '/' . $1)) };
|
|
56 | 61 |
|
57 |
$content = eval { scalar(read_file($git_dir . '/' . $1)) };
|
|
62 |
return '' unless ($content // '') =~ m{\A([0-9a-fA-F]+)};
|
|
58 | 63 |
|
59 |
return '' unless ($content // '') =~ m{\A([0-9a-fA-F]+)}; |
|
64 |
return '?rand=' . $1; |
|
65 |
} |
|
60 | 66 |
|
61 |
return '?rand=' . $1;
|
|
67 |
return '';
|
|
62 | 68 |
} |
63 | 69 |
|
64 | 70 |
########################################## |
config/kivitendo.conf.default | ||
---|---|---|
374 | 374 |
# the web browser to always reload the resources. |
375 | 375 |
auto_reload_resources = 0 |
376 | 376 |
|
377 |
# Alternative to auto_reload_resources. If the installation dir is under git |
|
378 |
# version control, this will use the HEAD commit sha1 as the random GET |
|
379 |
# parameter, so that resources are reloaded if the installed version charnges. |
|
380 |
git_commit_reload_recources = 0 |
|
381 |
|
|
377 | 382 |
# If set to 1 each exception will include a full stack backtrace. |
378 | 383 |
backtrace_on_die = 0 |
379 | 384 |
|
Auch abrufbar als: Unified diff
Layout::Base: git_commit_reload_resources config parameter
Ermöglicht das Ausschalten von git commit Resourcesversionierung das
bisher immer an war.