Skip to content
Snippets Groups Projects
Commit f231a695 authored by pierre oudot's avatar pierre oudot
Browse files

Hotline #182736 : Fix Kiosque : PHP 8.1 type issues

parent 0b1b84f3
Branches
Tags
No related merge requests found
Pipeline #24444 passed with stage
in 22 minutes
- correctif #182736 : Opac : passage en 8.1, résolution du problème de chargement des kiosques.
\ No newline at end of file
......@@ -165,7 +165,7 @@ class ZendAfi_View_Helper_Accueil_Kiosque extends ZendAfi_View_Helper_Accueil_Ba
case 'slide_show':
$controler = 'java';
$this->preferences['vue']='slide_show';
$hauteur = $this->preferences['op_hauteur_img'] + 7;
$hauteur = (int)$this->preferences['op_hauteur_img'] + 7;
if ($hauteur == 7)
$hauteur = 117;
break;
......@@ -177,27 +177,27 @@ class ZendAfi_View_Helper_Accueil_Kiosque extends ZendAfi_View_Helper_Accueil_Ba
case 'cube':
$controler = 'java';
$this->preferences['vue'] = 'cube';
$hauteur = $this->preferences['op_hauteur_img'] + 20;
$hauteur = (int)$this->preferences['op_hauteur_img'] + 20;
break;
case 'diaporama':
$controler = 'java';
$this->preferences['vue'] = 'diaporama';
$hauteur = $this->preferences['op_hauteur_boite'];
$hauteur = (int)$this->preferences['op_hauteur_boite'];
break;
case 'jcarousel':
$controler = 'java';
$this->preferences['vue'] = 'jcarousel';
$hauteur = $this->preferences['op_hauteur_img'] + 10;
$hauteur = (int)$this->preferences['op_hauteur_img'] + 10;
break;
case 'mycarousel_horizontal':
$controler = 'java';
$this->preferences['vue'] = 'mycarousel_horizontal';
$hauteur = $this->preferences['op_hauteur_img'] + 5;
$hauteur = (int)$this->preferences['op_hauteur_img'] + 5;
break;
case 'mycarousel_vertical':
$controler = 'java';
$this->preferences['vue'] = 'mycarousel_vertical';
$hauteur = ($this->preferences['op_visible'] * $this->preferences['op_hauteur_img']) + 15;
$hauteur = ((int)$this->preferences['op_visible'] * (int) $this->preferences['op_hauteur_img']) + 15;
break;
case 'coverflow':
$controler = 'flash';
......
......@@ -54,3 +54,29 @@ class IndexControllerArticlesWidgetAccordionPrintTest extends AbstractController
$this->assertXPath('//a[contains(@href, "/cms/print/ids/12/strategy/Article_List")]');
}
}
/* @see https://forge.afi-sa.net/issues/182736 */
class IndexControllerArticlesWidgetKiosqueTest extends AbstractControllerTestCase {
protected function _initProfilHook($profil) {
$profil->setBoiteOfTypeInDivision(1, Class_Systeme_ModulesAccueil_Kiosque::CODE,
['style_liste'=> 'cube',
'op_hauteur_img' => ""]);
}
public function setUp() {
parent::setUp();
$this->dispatch('/opac/index/index');
}
/** @test */
public function pageShouldContainsLinkToPrintArticle12InCmsController() {
$this->assertXPath('//iframe[@height="20"]');
}
}
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