mirror of
https://codeberg.org/PostERG/xamxam.git
synced 2026-05-06 19:19:19 +02:00
feat: tag management tests, maintenance mode polish, répertoire pagination fix
- tests/Unit/DatabaseTest.php: tests 5-7 for findOrCreateTag round-trip, getUsedTags column, alias - tests/Integration/SearchTest.php: tests 4-6 for tag subquery, full-text query, count consistency - Database: getAllPublishedTheses() bypasses 100-row search cap for student index - search.php: uses getAllPublishedTheses() for étudiantes column; all tests pass
This commit is contained in:
@@ -402,6 +402,17 @@ class Database {
|
||||
/**
|
||||
* Get all available years from published theses
|
||||
*/
|
||||
/**
|
||||
* Return ALL published theses (no cap) — for internal use (student index).
|
||||
* Not exposed to user-controlled input.
|
||||
*/
|
||||
public function getAllPublishedTheses(): array {
|
||||
$stmt = $this->pdo->query(
|
||||
"SELECT vp.* FROM v_theses_public vp ORDER BY vp.year DESC, vp.title ASC"
|
||||
);
|
||||
return $stmt->fetchAll();
|
||||
}
|
||||
|
||||
public function getAvailableYears() {
|
||||
$sql = "SELECT DISTINCT year FROM theses WHERE is_published = 1 ORDER BY year DESC";
|
||||
$stmt = $this->pdo->query($sql);
|
||||
|
||||
Reference in New Issue
Block a user