Skip to content

Commit c4870b8

Browse files
committed
Merge branch 'article-template-250112' into 5.8.10
2 parents 60482a6 + 02059d5 commit c4870b8

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

core/lib/class.plx.motor.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -152,14 +152,15 @@ public function prechauffage() {
152152
}
153153
}
154154
elseif($this->get AND preg_match('#^article(\d+)\/?([\w-]+)?#',$this->get,$capture)) {
155-
$this->mode = 'article'; # Mode article
156-
$this->template = 'article.php';
157155
$this->cible = str_pad($capture[1],4,'0',STR_PAD_LEFT); # On complete sur 4 caracteres
158156
$this->motif = '#^'.$this->cible.'.(?:\d|home|,)*(?:'.$this->activeCats.'|home)(?:\d|home|,)*.\d{3}.\d{12}.[\w-]+.xml$#'; # Motif de recherche
159157
if($this->getArticles()) {
160158
# Redirection 301
161159
if(!isset($capture[2]) OR $this->plxRecord_arts->f('url')!=$capture[2]) {
162160
$this->redir301($this->urlRewrite('?article'.intval($this->cible).'/'.$this->plxRecord_arts->f('url')));
161+
} else {
162+
$this->mode = 'article'; # Mode article
163+
$this->template = $this->plxRecord_arts->f('template');
163164
}
164165
} else {
165166
$this->error404(L_UNKNOWN_ARTICLE);

0 commit comments

Comments
 (0)