diff --git a/ecrire/exec/articles.php b/ecrire/exec/articles.php index 4217e5ebbbe834222844ff54ec4bb1e03c248869..140b2b1309c3682fe0394df6b8e4e0746dbed838 100644 --- a/ecrire/exec/articles.php +++ b/ecrire/exec/articles.php @@ -1336,7 +1336,10 @@ function affiche_forums_article($id_article, $id_rubrique, $titre, $debut, $mute echo "</div>"; } - $result_forum = spip_query("SELECT * FROM spip_forum WHERE statut='prive' AND id_article='$id_article' AND id_parent=0 ORDER BY date_heure DESC LIMIT $total_afficher OFFSET $debut"); + $result_forum = spip_query("SELECT * FROM spip_forum WHERE statut='prive' AND id_article='$id_article' AND id_parent=0 ORDER BY date_heure DESC" . +# " LIMIT $total_afficher OFFSET $debut" # PG + " LIMIT $debut,$total_afficher" + ); afficher_forum($result_forum, $forum_retour, $mute); diff --git a/ecrire/exec/articles_forum.php b/ecrire/exec/articles_forum.php index 2ef4268bd884e734c59eb231e56199f204b50e8f..52dcf1b81be71fda23c0151ca96b02910acf5f12 100644 --- a/ecrire/exec/articles_forum.php +++ b/ecrire/exec/articles_forum.php @@ -85,9 +85,10 @@ $enplus = 200; // intervalle affiche autour du debut $limitdeb = ($debut > $enplus) ? $debut-$enplus : 0; $limitnb = $debut + $enplus - $limitdeb; -$query_forum = "SELECT id_forum FROM spip_forum WHERE id_article='$id_article' AND id_parent=0 AND statut IN ('publie', 'off', 'prop') LIMIT $limitnb OFFSET $limitdeb"; -$result_forum = spip_query($query_forum); - +$result_forum = spip_query("SELECT id_forum FROM spip_forum WHERE id_article='$id_article' AND id_parent=0 AND statut IN ('publie', 'off', 'prop')" . +# " LIMIT $limitnb OFFSET $limitdeb" # PG + " LIMIT $limitdeb, $limitnb" + ); $i = $limitdeb; if ($i>0) diff --git a/ecrire/exec/controle_forum.php b/ecrire/exec/controle_forum.php index cf38757bf29832c447c21f8a7d43f00f2547f24e..b7411adfc35dd433d4cc54102904d01f8f3fc863 100644 --- a/ecrire/exec/controle_forum.php +++ b/ecrire/exec/controle_forum.php @@ -267,7 +267,10 @@ F.url_site, F.statut, F.ip, F.id_auteur -$query_forum ORDER BY F.date_heure DESC LIMIT $limitnb OFFSET $limitdeb"); +$query_forum ORDER BY F.date_heure DESC" . +# LIMIT $limitnb OFFSET $limitdeb" #PG +" LIMIT $limitnb, $limitdeb" +); debut_gauche(); debut_boite_info(); diff --git a/ecrire/exec/export_all.php b/ecrire/exec/export_all.php index 0e6986a488f4edc222d2725bed46eae494d3876f..bac5cac7d55ddc75dbda4c5e2808dd7a236f8df9 100644 --- a/ecrire/exec/export_all.php +++ b/ecrire/exec/export_all.php @@ -135,7 +135,10 @@ function export_objets($query, $type, $file = 0, $gz = false, $etape_en_cours="" if ($type == "forum"){ $total = spip_num_rows($result); if ($total > 5000){ - $result = spip_query($query." LIMIT 5000 OFFSET $debut_limit"); + $result = spip_query($query. +#" LIMIT 5000 OFFSET $debut_limit" # PG +" LIMIT 5000,$debut_limit" + ); $debut_limit = $debut_limit + 5000; if ($debut_limit > $total) { $debut_limit = 0; @@ -152,7 +155,10 @@ function export_objets($query, $type, $file = 0, $gz = false, $etape_en_cours="" if ($type == "article"){ $total = spip_num_rows($result); if ($total > 500){ - $result = spip_query($query." LIMIT 500 OFFSET $debut_limit"); + $result = spip_query($query. +#" LIMIT 500 OFFSET $debut_limit" # PG +" LIMIT 500,$debut_limit" + }; $debut_limit = $debut_limit + 500; if ($debut_limit > $total) { $debut_limit = 0; diff --git a/ecrire/inc/signatures.php b/ecrire/inc/signatures.php index 41447c8505ed0020777c1a360111ba305c938cc4..cb9415ee484d1ecca46edae9ae4062d7a4a3d8da 100644 --- a/ecrire/inc/signatures.php +++ b/ecrire/inc/signatures.php @@ -22,8 +22,10 @@ function controle_signatures($script, $id, $debut, $where, $order, $limit=10) { $request = spip_query("SELECT * FROM spip_signatures " . ($where ? " WHERE $where" : "") . ($order ? " ORDER BY $order" : "") . - " LIMIT $limit" . - ($debut ? " OFFSET $debut" : "")); + " LIMIT " . + (($debut ? "$debut," : "") . $limit) +# ($limit . ($debut ? " OFFSET $debut" : "")); #PG + ); while($row=spip_fetch_array($request)){ $id_signature = $row['id_signature'];