diff --git a/config/configuration.sample.yml b/config/configuration.sample.yml index a912e61876..968d309c88 100644 --- a/config/configuration.sample.yml +++ b/config/configuration.sample.yml @@ -313,6 +313,7 @@ geocoding-providers: - '2.335062' default-zoom: 5 marker-default-zoom: 9 + position-fields: [] geonames-field-mapping: true cityfields: City, Ville provincefields: Province @@ -330,3 +331,5 @@ workers: user_account: deleting_policies: email_confirmation: true + +Console_logger_enabled_environments: [test] diff --git a/lib/Alchemy/Phrasea/Core/Configuration/RegistryFormManipulator.php b/lib/Alchemy/Phrasea/Core/Configuration/RegistryFormManipulator.php index 9ebd69c829..786e244c09 100644 --- a/lib/Alchemy/Phrasea/Core/Configuration/RegistryFormManipulator.php +++ b/lib/Alchemy/Phrasea/Core/Configuration/RegistryFormManipulator.php @@ -181,19 +181,14 @@ class RegistryFormManipulator ], 'custom-links' => [ [ - 'linkName' => 'Phraseanet store', - 'linkLanguage' => 'fr', - 'linkUrl' => 'https://alchemy.odoo.com/shop', - 'linkLocation' => 'help-menu', - 'linkOrder' => '1', - ], - [ - 'linkName' => 'Phraseanet store', - 'linkLanguage' => 'en', - 'linkUrl' => 'https://alchemy.odoo.com/en_US/shop', - 'linkLocation' => 'help-menu', - 'linkOrder' => '1', - ], + 'linkName' => 'Phraseanet store', + 'linkLanguage' => 'all', + 'linkUrl' => 'https://store.alchemy.fr', + 'linkLocation' => 'help-menu', + 'linkOrder' => 1, + 'linkBold' => false, + 'linkColor' => '' + ] ] ]; } diff --git a/lib/Alchemy/Phrasea/Core/Version.php b/lib/Alchemy/Phrasea/Core/Version.php index 007027470a..6db56c191c 100644 --- a/lib/Alchemy/Phrasea/Core/Version.php +++ b/lib/Alchemy/Phrasea/Core/Version.php @@ -17,7 +17,7 @@ class Version * @var string */ - private $number = '4.1.0-alpha.27a'; + private $number = '4.1.0-alpha.28a'; /** * @var string diff --git a/lib/Alchemy/Phrasea/Setup/Installer.php b/lib/Alchemy/Phrasea/Setup/Installer.php index 74cb131e9b..0bd40fd5cd 100644 --- a/lib/Alchemy/Phrasea/Setup/Installer.php +++ b/lib/Alchemy/Phrasea/Setup/Installer.php @@ -198,7 +198,7 @@ class Installer $config['main']['database']['driver'] = 'pdo_mysql'; $config['main']['database']['charset'] = 'UTF8'; - $config['main']['binaries'] = $binaryData; + $config['main']['binaries'] = array_merge($config['main']['binaries'], $binaryData); $config['servername'] = $serverName; $config['main']['key'] = $this->app['random.medium']->generateString(16); diff --git a/lib/classes/patch/410alpha28a.php b/lib/classes/patch/410alpha28a.php new file mode 100644 index 0000000000..2ff20e4b32 --- /dev/null +++ b/lib/classes/patch/410alpha28a.php @@ -0,0 +1,174 @@ +release; + } + + /** + * {@inheritdoc} + */ + public function concern() + { + return $this->concern; + } + + /** + * {@inheritdoc} + */ + public function require_all_upgrades() + { + return false; + } + + /** + * {@inheritdoc} + */ + public function getDoctrineMigrations() + { + return []; + } + + /** + * {@inheritdoc} + */ + public function apply(base $appbox, Application $app) + { + // add geoloc section if not exist + if (!$app['conf']->has(['geocoding-providers'])) { + $providers[0] = [ + 'map-provider' => 'mapboxWebGL', + 'enabled' => false, + 'public-key' => '', + 'map-layers' => [ + 0 => [ + 'name' => 'Light', + 'value' => 'mapbox://styles/mapbox/light-v9' + ], + 1 => [ + 'name' => 'Streets', + 'value' => 'mapbox://styles/mapbox/streets-v9' + ], + 2 => [ + 'name' => 'Basic', + 'value' => 'mapbox://styles/mapbox/basic-v9' + ], + 3 => [ + 'name' => 'Satellite', + 'value' => 'mapbox://styles/mapbox/satellite-v9' + ], + 4 => [ + 'name' => 'Dark', + 'value' => 'mapbox://styles/mapbox/dark-v9' + ] + ], + 'transition-mapboxgl' => [ + 0 => [ + 'animate' => true, + 'speed' => '2.2', + 'curve' => '1.42' + ] + ], + 'default-position' => [ + '48.879162', + '2.335062' + ], + 'default-zoom' => 5, + 'marker-default-zoom' => 9, + 'position-fields' => [], + 'geonames-field-mapping' => true, + 'cityfields' => 'City, Ville', + 'provincefields' => 'Province', + 'countryfields' => 'Country, Pays' + ]; + + $app['conf']->set(['geocoding-providers'], $providers); + } + + // add video-editor section if not exist + if (!$app['conf']->has(['video-editor'])) { + $videoEditor = [ + 'ChapterVttFieldName' => 'VideoTextTrackChapters', + 'seekBackwardStep' => 500, + 'seekForwardStep' => 500, + 'playbackRates' => [ + 1, + '1.5', + 3 + ] + ]; + + $app['conf']->set(['video-editor'], $videoEditor); + } + + // add api_token_header if not exist + if (!$app['conf']->has(['main', 'api_token_header'])) { + $app['conf']->set(['main', 'api_token_header'], false); + } + + // insert timeout if not exist + if (!$app['conf']->has(['main', 'binaries', 'ffmpeg_timeout'])) { + $app['conf']->set(['main', 'binaries', 'ffmpeg_timeout'], 3600); + } + if (!$app['conf']->has(['main', 'binaries', 'ffprobe_timeout'])) { + $app['conf']->set(['main', 'binaries', 'ffprobe_timeout'], 60); + } + if (!$app['conf']->has(['main', 'binaries', 'gs_timeout'])) { + $app['conf']->set(['main', 'binaries', 'gs_timeout'], 60); + } + if (!$app['conf']->has(['main', 'binaries', 'mp4box_timeout'])) { + $app['conf']->set(['main', 'binaries', 'mp4box_timeout'], 60); + } + if (!$app['conf']->has(['main', 'binaries', 'swftools_timeout'])) { + $app['conf']->set(['main', 'binaries', 'swftools_timeout'], 60); + } + if (!$app['conf']->has(['main', 'binaries', 'unoconv_timeout'])) { + $app['conf']->set(['main', 'binaries', 'unoconv_timeout'], 60); + } + if (!$app['conf']->has(['main', 'binaries', 'exiftool_timeout'])) { + $app['conf']->set(['main', 'binaries', 'exiftool_timeout'], 60); + } + + // custom-link section, remove default store + $app['conf']->remove(['registry', 'custom-links', 0]); + $app['conf']->remove(['registry', 'custom-links', 1]); + + $customLinks = [ + 'linkName' => 'Phraseanet store', + 'linkLanguage' => 'all', + 'linkUrl' => 'https://store.alchemy.fr', + 'linkLocation' => 'help-menu', + 'linkOrder' => 1, + 'linkBold' => false, + 'linkColor' => '' + ]; + + $app['conf']->set(['registry', 'custom-links', 0], $customLinks); + + return true; + } +} diff --git a/lib/conf.d/configuration.yml b/lib/conf.d/configuration.yml index 8a7a62052d..a42aea60a4 100644 --- a/lib/conf.d/configuration.yml +++ b/lib/conf.d/configuration.yml @@ -10,6 +10,7 @@ main: maintenance: false key: '' api_require_ssl: true + api_token_header: false database: host: 'sql-host' port: 3306