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>
|
# 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]
|
||||||
|
|||||||
@@ -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>
|
||||||
|
|||||||
Reference in New Issue
Block a user