fix: renomme /cursor/ en /page/ pour la pagination
This commit is contained in:
+2
-2
@@ -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>
|
||||
RewriteRule ^categorie/(.+?)/?$ /index.php?cat=$1 [L,QSA,NE]
|
||||
|
||||
# Pagination par curseur : /cursor/<uuid>
|
||||
RewriteRule ^cursor/([0-9a-f-]{36})/?$ /index.php?cursor=$1 [L,QSA]
|
||||
# Pagination par curseur : /page/<uuid>
|
||||
RewriteRule ^page/([0-9a-f-]{36})/?$ /index.php?cursor=$1 [L,QSA]
|
||||
|
||||
# Édition / création
|
||||
RewriteRule ^edit/([0-9a-f-]{36})/?$ /index.php?action=edit&uuid=$1 [L,QSA]
|
||||
|
||||
@@ -85,13 +85,13 @@ ob_start();
|
||||
} elseif ($hasCat) {
|
||||
$prevHref = $catBase . '?cursor=' . rawurlencode($prevCursor);
|
||||
} else {
|
||||
$prevHref = '/cursor/' . rawurlencode($prevCursor);
|
||||
$prevHref = '/page/' . rawurlencode($prevCursor);
|
||||
}
|
||||
?>
|
||||
<a class="pagination-btn" href="<?= htmlspecialchars($prevHref) ?>">← Plus récents</a>
|
||||
<?php endif; ?>
|
||||
<?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>
|
||||
<?php endif; ?>
|
||||
</nav>
|
||||
|
||||
Reference in New Issue
Block a user