fix: renomme /cursor/ en /page/ pour la pagination

This commit is contained in:
Cedric Abonnel
2026-05-12 10:07:49 +02:00
parent 7e5280abcd
commit 77cc391ff1
2 changed files with 4 additions and 4 deletions
+2 -2
View File
@@ -14,8 +14,8 @@ RewriteRule ^post/([a-z0-9][a-z0-9-]*)/?$ /index.php?action=view&slug=$1 [L,QSA]
# Filtre par catégorie : /categorie/<nom> # Filtre par catégorie : /categorie/<nom>
RewriteRule ^categorie/(.+?)/?$ /index.php?cat=$1 [L,QSA,NE] RewriteRule ^categorie/(.+?)/?$ /index.php?cat=$1 [L,QSA,NE]
# Pagination par curseur : /cursor/<uuid> # Pagination par curseur : /page/<uuid>
RewriteRule ^cursor/([0-9a-f-]{36})/?$ /index.php?cursor=$1 [L,QSA] RewriteRule ^page/([0-9a-f-]{36})/?$ /index.php?cursor=$1 [L,QSA]
# Édition / création # Édition / création
RewriteRule ^edit/([0-9a-f-]{36})/?$ /index.php?action=edit&uuid=$1 [L,QSA] RewriteRule ^edit/([0-9a-f-]{36})/?$ /index.php?action=edit&uuid=$1 [L,QSA]
+2 -2
View File
@@ -85,13 +85,13 @@ ob_start();
} elseif ($hasCat) { } elseif ($hasCat) {
$prevHref = $catBase . '?cursor=' . rawurlencode($prevCursor); $prevHref = $catBase . '?cursor=' . rawurlencode($prevCursor);
} else { } else {
$prevHref = '/cursor/' . rawurlencode($prevCursor); $prevHref = '/page/' . rawurlencode($prevCursor);
} }
?> ?>
<a class="pagination-btn" href="<?= htmlspecialchars($prevHref) ?>">← Plus récents</a> <a class="pagination-btn" href="<?= htmlspecialchars($prevHref) ?>">← Plus récents</a>
<?php endif; ?> <?php endif; ?>
<?php if ($nextCursor !== null): ?> <?php if ($nextCursor !== null): ?>
<?php $nextHref = $hasCat ? $catBase . '?cursor=' . rawurlencode($nextCursor) : '/cursor/' . rawurlencode($nextCursor); ?> <?php $nextHref = $hasCat ? $catBase . '?cursor=' . rawurlencode($nextCursor) : '/page/' . rawurlencode($nextCursor); ?>
<a class="pagination-btn ms-auto" href="<?= htmlspecialchars($nextHref) ?>">Plus anciens →</a> <a class="pagination-btn ms-auto" href="<?= htmlspecialchars($nextHref) ?>">Plus anciens →</a>
<?php endif; ?> <?php endif; ?>
</nav> </nav>