Commit c9f84563 authored by Ghislain Loas's avatar Ghislain Loas

Merge branch 'dev#86010_reactiver_variables_opds' into 'master'

Dev#86010 reactiver variables opds

See merge request !2991
parents a4c039c5 1c090598
Pipeline #6219 failed with stage
in 27 minutes and 48 seconds
- ticket #86010 : Administration : activation des fonctionnalités de la version 8.0 .
\ No newline at end of file
<?php
(new Class_Migration_BokehHeight)->run();
\ No newline at end of file
(new Class_Migration_BokehEight)->run();
\ No newline at end of file
......@@ -154,10 +154,10 @@ class Class_AdminVarLoader extends Storm_Model_Loader {
'ALBUM_MEDIA_NO_AUTOINDEX_TITLE' => Class_AdminVar_Meta::newOnOff($this->_('Bibliothèque numérique: ne pas créer de zone 464 pour les médias dont le titre n\'est pas saisi')),
'BIBNUM' => Class_AdminVar_Meta::newOnOff($this->_('Activer ou désactiver la bibliothèque numérique')),
'BIBNUM' => Class_AdminVar_Meta::newOnOff($this->_('Activer ou désactiver la bibliothèque numérique'))->enable(),
'IMPORT_EAD' => Class_AdminVar_Meta::newOnOff($this->_('Activation de l\'import EAD')),
'OAI_REPOSITORY' => Class_AdminVar_Meta::newOnOff($this->_('Activation de l\'import de dépôts OAI')),
'OPDS' => Class_AdminVar_Meta::newOnOff($this->_('Activation de l\'import de catalogues OPDS')),
'OPDS' => Class_AdminVar_Meta::newOnOff($this->_('Activation de l\'import de catalogues OPDS'))->enable(),
'SITO_IN_ALBUMS' => Class_AdminVar_Meta::newOnOff($this->_('Gérer la sitothèque dans la bibliothèque numérique, nécessite l\'activation de la bibliothèque numérique')),
'NUMILOG_URL' => Class_AdminVar_Meta::newDefault($this->_('Paramétrage <a href="http://forge.afi-sa.fr/projects/opac3/wiki/Ressources_externes_enrichissements#Numilog">Numilog</a>'))->bePrivate(),
......
......@@ -20,7 +20,7 @@
*/
class Class_Migration_BokehHeight {
class Class_Migration_BokehEight {
use Trait_Translator;
......@@ -30,6 +30,8 @@ class Class_Migration_BokehHeight {
Class_AdminVar::set('INSPECTOR_GADGET_MARC_XML', 1);
Class_AdminVar::set('CUSTOM_SEARCH_FORM', 1);
Class_AdminVar::set('AUTHOR_PAGE', 1);
Class_AdminVar::set('OPDS', 1);
Class_AdminVar::set('BIBNUM', 1);
$this
->_manageLoginThroughSigbOnly()
......
......@@ -2463,5 +2463,5 @@ class UpgradeDB_365_Test extends UpgradeDBTestCase {
public function prepare() {}
/** @test */
public function placeholderForBokehHeightMigration() {}
public function placeholderForBokehEightMigration() {}
}
......@@ -20,11 +20,40 @@
*/
class Class_Migration_BokehHeightTest extends ModelTestCase {
class Class_Migration_BokehEightTest extends ModelTestCase {
/** @test */
public function bibnumShouldBecomeEnabled() {
Class_AdminVar::set('BIBNUM', 0);
(new Class_Migration_BokehEight)->run();
$this->assertTrue(Class_AdminVar::isBibNumEnabled());
}
/** @test */
public function bibnumDefaultShouldBeEnabled() {
$this->assertTrue(Class_AdminVar::isBibNumEnabled());
}
/** @test */
public function opdsShouldBecomeEnabled() {
Class_AdminVar::set('OPDS', 0);
(new Class_Migration_BokehEight)->run();
$this->assertTrue(Class_AdminVar::isOpdsEnabled());
}
/** @test */
public function opdsDefaultShouldBeEnabled() {
$this->assertTrue(Class_AdminVar::isOpdsEnabled());
}
/** @test */
public function codificationBrowserShouldBecomeEnabled() {
Class_AdminVar::set('CODIFICATION_BROWSER', 0);
(new Class_Migration_BokehHeight)->run();
(new Class_Migration_BokehEight)->run();
$this->assertTrue(Class_AdminVar::isCodificationBrowserEnabled());
}
......@@ -38,7 +67,7 @@ class Class_Migration_BokehHeightTest extends ModelTestCase {
/** @test */
public function inspectorGadgetMarcXMLShouldBecomeEnabled() {
Class_AdminVar::set('INSPECTOR_GADGET_MARC_XML', 0);
(new Class_Migration_BokehHeight)->run();
(new Class_Migration_BokehEight)->run();
$this->assertTrue(Class_AdminVar::isInspectorGadgetMarcXmlEnabled());
}
......@@ -52,7 +81,7 @@ class Class_Migration_BokehHeightTest extends ModelTestCase {
/** @test */
public function customSearchFormShouldBecomeEnabled() {
Class_AdminVar::set('CUSTOM_SEARCH_FORM', 0);
(new Class_Migration_BokehHeight)->run();
(new Class_Migration_BokehEight)->run();
$this->assertTrue(Class_AdminVar::isCustomSearchFormEnabled());
}
......@@ -66,7 +95,7 @@ class Class_Migration_BokehHeightTest extends ModelTestCase {
/** @test */
public function authorPageShouldBecomeEnabled() {
Class_AdminVar::set('AUTHOR_PAGE', 0);
(new Class_Migration_BokehHeight)->run();
(new Class_Migration_BokehEight)->run();
$this->assertTrue(Class_AdminVar::isAuthorPageEnabled());
}
......@@ -84,7 +113,7 @@ class Class_Migration_BokehHeightTest extends ModelTestCase {
['id' => 4,
'sigb' => Class_IntBib::SIGB_KOHA,
'comm_params' => ['url_serveur' => 'https://service.local']]);
(new Class_Migration_BokehHeight)->run();
(new Class_Migration_BokehEight)->run();
$this->assertTrue(Class_AdminVar::isLoginThroughSigbOnlyEnabled());
}
......@@ -96,7 +125,7 @@ class Class_Migration_BokehHeightTest extends ModelTestCase {
['id' => 4,
'sigb' => Class_IntBib::SIGB_NANOOK,
'comm_params' => ['url_serveur' => 'https://service.local']]);
(new Class_Migration_BokehHeight)->run();
(new Class_Migration_BokehEight)->run();
$this->assertTrue(Class_AdminVar::isLoginThroughSigbOnlyEnabled());
}
......@@ -108,7 +137,7 @@ class Class_Migration_BokehHeightTest extends ModelTestCase {
['id' => 4,
'sigb' => Class_IntBib::SIGB_ORPHEE,
'comm_params' => ['url_serveur' => 'https://service.local']]);
(new Class_Migration_BokehHeight)->run();
(new Class_Migration_BokehEight)->run();
$this->assertFalse(Class_AdminVar::isLoginThroughSigbOnlyEnabled());
}
......@@ -125,7 +154,7 @@ class Class_Migration_BokehHeightTest extends ModelTestCase {
'sigb' => Class_IntBib::SIGB_KOHA,
'comm_params' => ['url_serveur' => 'https://service-koha.local']]);
(new Class_Migration_BokehHeight)->run();
(new Class_Migration_BokehEight)->run();
$this->assertFalse(Class_AdminVar::isLoginThroughSigbOnlyEnabled());
}
......@@ -133,7 +162,7 @@ class Class_Migration_BokehHeightTest extends ModelTestCase {
/** @test */
public function variableDateMajAlbumsShouldHaveGroup6() {
Class_CosmoVar::setValueOf('date_maj_albums', '');
(new Class_Migration_BokehHeight)->run();
(new Class_Migration_BokehEight)->run();
$this->assertEquals(6, Class_CosmoVar::find('date_maj_albums')->getGroupe());
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment