diff --git a/CHANGELOG.md b/CHANGELOG.md index 9b46804..bad1195 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,14 @@ Format : [Keep a Changelog](https://keepachangelog.com/fr/1.0.0/) — versionnag --- +## [1.6.22] - 2026-05-16 + +### Ajouté +- Widget de notation ★ (1-5 étoiles) sur les articles, accessible aux utilisateurs connectés ; affiche la moyenne et le nombre de votes pour tous (#13) +- Admin `flux` : onglet listant tous les flux RSS agrégés avec action de suppression admin (#87) + +--- + ## [1.6.21] - 2026-05-16 ### Ajouté diff --git a/public/index.php b/public/index.php index 6618c23..8091305 100644 --- a/public/index.php +++ b/public/index.php @@ -45,7 +45,7 @@ $action = $_GET['action'] ?? 'list'; $uuid = $_GET['uuid'] ?? ''; $slug = $_GET['slug'] ?? ''; -$_noindexActions = ['create', 'edit', 'admin', 'categories', 'diff', 'add_files', 'import_image', 'import_image_step2', 'sources', 'profile', 'delete_file', 'delete_external_link', 'rename_category', 'delete_category', 'toggle_private_category', 'admin_save_site', 'not_found', 'add_feed', 'delete_feed', 'add_link', 'delete_link', 'reorder_links', 'react', 'comment', 'verify_comment', 'comment_moderate', 'comment_delete', 'comment_resend', 'create_tag_type', 'delete_tag_type', 'edit_tags', 'book_save', 'book_delete', 'admin_save_as_groups', 'admin_save_folio_config', 'run_engine_update', 'run_content_migrations']; +$_noindexActions = ['create', 'edit', 'admin', 'categories', 'diff', 'add_files', 'import_image', 'import_image_step2', 'sources', 'profile', 'delete_file', 'delete_external_link', 'rename_category', 'delete_category', 'toggle_private_category', 'admin_save_site', 'not_found', 'add_feed', 'delete_feed', 'add_link', 'delete_link', 'reorder_links', 'react', 'comment', 'verify_comment', 'comment_moderate', 'comment_delete', 'comment_resend', 'create_tag_type', 'delete_tag_type', 'edit_tags', 'book_save', 'book_delete', 'admin_save_as_groups', 'admin_save_folio_config', 'run_engine_update', 'run_content_migrations', 'admin_delete_feed', 'rate']; $metaRobots = in_array($action, $_noindexActions, true) ? 'noindex, nofollow' : null; unset($_noindexActions); @@ -2735,6 +2735,21 @@ switch ($action) { $adminData['tagTypes'] = $articles->getTagTypes(); } + if ($tab === 'flux') { + if (!isAdmin()) { + http_response_code(403); + exit; + } + $pdo = dbPdo(); + $adminData['flux_feeds'] = []; + if ($pdo) { + try { + $st = $pdo->query('SELECT id, user_email, feed_url, label, created_at FROM rss_feeds ORDER BY created_at DESC'); + $adminData['flux_feeds'] = $st->fetchAll(PDO::FETCH_ASSOC); + } catch (\Throwable) {} + } + } + if ($tab === 'books') { if (!isAdmin()) { http_response_code(403); @@ -3366,6 +3381,24 @@ switch ($action) { header('Location: /profile#feeds'); exit; + case 'admin_delete_feed': + requireAuth(); + if (!isAdmin() || $_SERVER['REQUEST_METHOD'] !== 'POST') { + http_response_code(403); + exit; + } + $feedId = (int)($_POST['id'] ?? 0); + if ($feedId > 0) { + $pdo = dbPdo(); + if ($pdo) { + try { + $pdo->prepare('DELETE FROM rss_feeds WHERE id = :id')->execute([':id' => $feedId]); + } catch (\Throwable) {} + } + } + header('Location: /admin/flux?deleted=1'); + exit; + case 'search_files': requireAuth(); header('Content-Type: application/json'); diff --git a/public/version.txt b/public/version.txt index 49e1fe3..d619516 100644 --- a/public/version.txt +++ b/public/version.txt @@ -1 +1 @@ -1.6.21 +1.6.22 diff --git a/templates/admin.php b/templates/admin.php index 6f6ff58..4cde464 100644 --- a/templates/admin.php +++ b/templates/admin.php @@ -69,6 +69,10 @@ function adminStatusBadge(array $a, int $now): string Livres +