diff --git a/VERSIONS_HOTLINE/136506 b/VERSIONS_HOTLINE/136506 new file mode 100644 index 0000000000000000000000000000000000000000..9c0a1947858058b718901a66ecda179b8fef2148 --- /dev/null +++ b/VERSIONS_HOTLINE/136506 @@ -0,0 +1 @@ + - ticket #136506 : Administration : Mise à jour de l'URL de publication automatique du rapport système \ No newline at end of file diff --git a/cosmogramme/sql/patch/patch_413.php b/cosmogramme/sql/patch/patch_413.php new file mode 100644 index 0000000000000000000000000000000000000000..4a8e2f52ec8c5a6707c86406cb3550aef861c111 --- /dev/null +++ b/cosmogramme/sql/patch/patch_413.php @@ -0,0 +1,7 @@ +<?php +$adapter = Zend_Db_Table::getDefaultAdapter(); + +try { + $adapter->query('update bib_admin_var set valeur="https://pola.afi-sa.net/smile.php" where clef="STATUS_REPORT_PUSH_URL" and valeur="http://pola.afi-sa.net/smile.php"'); +} catch(Exception $e) { +} diff --git a/library/Class/AdminVar.php b/library/Class/AdminVar.php index 6e177da829dcd63e1d523dfff282f0a7b4ccd3ad..11606d7200cb9e40eef71e7b32239a307d22f621 100644 --- a/library/Class/AdminVar.php +++ b/library/Class/AdminVar.php @@ -423,7 +423,8 @@ Pour vous désabonner de la lettre d\'information, merci de cliquer sur le lien 'URL_COSMOGRAMME' => Class_AdminVar_Meta::newDefault('')->bePrivate(), 'PACK_MOBILE' => Class_AdminVar_Meta::newOnOff($this->_('Activation des fonctions avancées du téléphone'))->bePrivate(), 'BUID' => Class_AdminVar_Meta::newRawText($this->_('Identifiant unique (attention: la modification de cette variable impactera les outils de suivi de cette installation)'))->bePrivate(), - 'STATUS_REPORT_PUSH_URL' => Class_AdminVar_Meta::newRawText($this->_('URL destinataire du rapport d\'état du système (0 pour désactiver)'), ['value' => 'http://pola.afi-sa.net/smile.php'])->bePrivate(), + 'STATUS_REPORT_PUSH_URL' => Class_AdminVar_Meta::newRawText($this->_('URL destinataire du rapport d\'état du système (0 pour désactiver)'), + ['value' => 'https://pola.afi-sa.net/smile.php'])->bePrivate(), 'STATUS_REPORT_TAGS' => Class_AdminVar_Meta::newMultiInput($this->_('Liste des tags à ajouter au rapport d\'état du système'))->bePrivate(), 'FEATURES_TRACKING_ENABLE' => Class_AdminVar_Meta::newOnOff('Affiche les dernières modifications apportés au logiciel Bokeh', ['value' => 1]), 'INSPECTOR_GADGET_MARC_XML' => Class_AdminVar_Meta::newOnOff('Affiche le MARC XML de la notice dans Inspector Gadget')->enable(), diff --git a/tests/db/UpgradeDBTest.php b/tests/db/UpgradeDBTest.php index cbecb361d13c1e19489b465a73f3804b6b142b12..b0e11d2f81d411a1ea02ad8dc390b0cc880f9d79 100644 --- a/tests/db/UpgradeDBTest.php +++ b/tests/db/UpgradeDBTest.php @@ -3913,3 +3913,28 @@ class UpgradeDB_412_Test extends UpgradeDBTestCase { $this->assertFieldType('codif_genre', 'libelle', 'varchar(255)'); } } + + + + +class UpgradeDB_413_Test extends UpgradeDBTestCase { + + public function prepare() { + $this->query('replace into bib_admin_var (clef, valeur) values ("STATUS_REPORT_PUSH_URL", "http://pola.afi-sa.net/smile.php")'); + } + + + public function tearDown() { + $this->query('replace into bib_admin_var (clef, valeur) values ("STATUS_REPORT_PUSH_URL", "no")'); + parent::tearDown(); + } + + + /** @test */ + public function statusReportPushUrlShouldBeHttps() { + $this->assertEquals('https://pola.afi-sa.net/smile.php', + current($this + ->query('select valeur from bib_admin_var where clef="STATUS_REPORT_PUSH_URL"') + ->fetch())); + } +} diff --git a/tests/library/Class/Cosmogramme/Integration/PhaseEndProcessTest.php b/tests/library/Class/Cosmogramme/Integration/PhaseEndProcessTest.php index d3d375eb2f9794f55f8770cc23ffc2e2727f8bc8..6e229ee263274e8619277381376ffaf4555886b3 100644 --- a/tests/library/Class/Cosmogramme/Integration/PhaseEndProcessTest.php +++ b/tests/library/Class/Cosmogramme/Integration/PhaseEndProcessTest.php @@ -49,7 +49,7 @@ class PhaseEndProcessTest extends Class_Cosmogramme_Integration_PhaseTestCase { /** @test */ public function reportShouldBePushedToPola() { $this->_phase = $this->_buildPhase('EndProcess')->run(); - $this->assertEquals('http://pola.afi-sa.net/smile.php', + $this->assertEquals('https://pola.afi-sa.net/smile.php', $this->_http_client->getFirstAttributeForLastCallOn('postData')); } @@ -100,7 +100,7 @@ class PhaseEndProcessTest extends Class_Cosmogramme_Integration_PhaseTestCase { ->willDo(function() { throw new RunTimeException('no more paper'); }); $this->_phase = $this->_buildPhase('EndProcess')->run(); - $this->assertLogContains('Echec de la publication du rapport sur http://pola.afi-sa.net/smile.php (no more paper)'); + $this->assertLogContains('Echec de la publication du rapport sur https://pola.afi-sa.net/smile.php (no more paper)'); } } ?> \ No newline at end of file