Skip to content

Commit

Permalink
Merge branch 'article-template-250112' into 5.8.10
Browse files Browse the repository at this point in the history
  • Loading branch information
bazooka07 committed Jan 12, 2025
2 parents 60482a6 + 02059d5 commit c4870b8
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions core/lib/class.plx.motor.php
Original file line number Diff line number Diff line change
Expand Up @@ -152,14 +152,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);
Expand Down

0 comments on commit c4870b8

Please sign in to comment.