Update initializing copyright_text option
This commit is contained in:
parent
8f55aab848
commit
ca8a01aced
|
|
@ -30,7 +30,7 @@ return [
|
||||||
'score_per_player' => '100',
|
'score_per_player' => '100',
|
||||||
'sign_after_zero' => 'false',
|
'sign_after_zero' => 'false',
|
||||||
'version' => '',
|
'version' => '',
|
||||||
'copyright_text' => '<strong>Copyright © '.getdate()['year'].' <a href="{site_url}">{site_name}</a>.</strong> All rights reserved.',
|
'copyright_text' => '<strong>Copyright © {year} <a href="{site_url}">{site_name}</a>.</strong> All rights reserved.',
|
||||||
'auto_del_invalid_texture' => 'false',
|
'auto_del_invalid_texture' => 'false',
|
||||||
'allow_downloading_texture' => 'true',
|
'allow_downloading_texture' => 'true',
|
||||||
'texture_name_regexp' => '',
|
'texture_name_regexp' => '',
|
||||||
|
|
|
||||||
|
|
@ -15,13 +15,20 @@ class ImportOptions extends Migration
|
||||||
// import options
|
// import options
|
||||||
$options = config('options');
|
$options = config('options');
|
||||||
|
|
||||||
$options['version'] = config('app.version');
|
$options['version'] = config('app.version');
|
||||||
|
|
||||||
$options['announcement'] = str_replace(
|
$options['announcement'] = str_replace(
|
||||||
'{version}',
|
'{version}',
|
||||||
$options['version'],
|
$options['version'],
|
||||||
$options['announcement']
|
$options['announcement']
|
||||||
);
|
);
|
||||||
|
|
||||||
|
$options['copyright_text'] = str_replace(
|
||||||
|
'{year}',
|
||||||
|
Carbon\Carbon::now()->year,
|
||||||
|
$options['copyright_text']
|
||||||
|
);
|
||||||
|
|
||||||
foreach ($options as $key => $value) {
|
foreach ($options as $key => $value) {
|
||||||
Option::set($key, $value);
|
Option::set($key, $value);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user