fix: load more button

This commit is contained in:
2026-01-15 19:38:55 +04:00
parent 10f0b9a6eb
commit b3eae9ea82
6 changed files with 64 additions and 136 deletions
+7 -1
View File
@@ -1,4 +1,9 @@
<?php
// Démarrer la session avant tout
if (session_status() === PHP_SESSION_NONE) {
session_start();
}
// Inclure la configuration
require_once '../includes/config.php';
@@ -44,7 +49,8 @@ if ($type === 'category' && $categoryId <= 0) {
// Récupérer les vidéos en fonction du type
$videos = [];
$offset = $page * LOAD_MORE_COUNT;
// Utiliser offset directement s'il est fourni, sinon calculer à partir de page
$offset = isset($_GET['offset']) ? intval($_GET['offset']) : $page * LOAD_MORE_COUNT;
switch ($type) {
case 'recent':