mirror of
https://codeberg.org/PostERG/xamxam.git
synced 2026-11-09 19:20:09 +01: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:
1 parent
92e344b757
commit
372abb5cd6
6 files changed
+84
-7
No files matched your search
@@ -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