From a52a40506c6a5b7dbcadbb2339d35b2316c0b66a Mon Sep 17 00:00:00 2001 From: Fil <fil@rezo.net> Date: Sat, 22 Jul 2006 13:44:21 +0000 Subject: [PATCH] plus efficace (toggg) --- ecrire/urls/page.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/ecrire/urls/page.php b/ecrire/urls/page.php index a41b74375c..dd2601bff1 100644 --- a/ecrire/urls/page.php +++ b/ecrire/urls/page.php @@ -70,15 +70,15 @@ function recuperer_parametres_url(&$fond, $url) { // Ce bloc gere les urls page et la compatibilite avec les "urls standard" if ($fond=='sommaire' AND preg_match( - ',^[^?]*([?]|/)(article|rubrique|breve|mot|site|auteur)(\.php3?)?.*?([0-9]+),', + ',^[^?]*[?/](article|rubrique|breve|mot|site|auteur)(\.php3?)?.*?([0-9]+),', $url, $regs)) { - $fond = $regs[2]; - if ($regs[2] == 'site') { + $fond = $regs[1]; + if ($regs[1] == 'site') { if (!isset($contexte['id_syndic'])) - $contexte['id_syndic'] = $regs[4]; + $contexte['id_syndic'] = $regs[3]; } else { if (!isset($contexte['id_'.$fond])) - $contexte['id_'.$fond] = $regs[4]; + $contexte['id_'.$fond] = $regs[3]; } return; -- GitLab