From 02059d58c3a7490e25dc91ae02e9e98a367efc9e Mon Sep 17 00:00:00 2001 From: Jean-Pierre Pourrez Date: Sun, 12 Jan 2025 18:49:05 +0100 Subject: [PATCH] Fix template for article in plxMotor::prechauffage --- core/lib/class.plx.motor.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/core/lib/class.plx.motor.php b/core/lib/class.plx.motor.php index b0a5e1aac..c70bec668 100644 --- a/core/lib/class.plx.motor.php +++ b/core/lib/class.plx.motor.php @@ -151,14 +151,15 @@ public function prechauffage() { } } elseif($this->get AND preg_match('#^article(\d+)\/?([\w-]+)?#',$this->get,$capture)) { - $this->mode = 'article'; # Mode article - $this->template = 'article.php'; $this->cible = str_pad($capture[1],4,'0',STR_PAD_LEFT); # On complete sur 4 caracteres $this->motif = '#^'.$this->cible.'.(?:\d|home|,)*(?:'.$this->activeCats.'|home)(?:\d|home|,)*.\d{3}.\d{12}.[\w-]+.xml$#'; # Motif de recherche if($this->getArticles()) { # Redirection 301 if(!isset($capture[2]) OR $this->plxRecord_arts->f('url')!=$capture[2]) { $this->redir301($this->urlRewrite('?article'.intval($this->cible).'/'.$this->plxRecord_arts->f('url'))); + } else { + $this->mode = 'article'; # Mode article + $this->template = $this->plxRecord_arts->f('template'); } } else { $this->error404(L_UNKNOWN_ARTICLE);