Réponse en partie à la requête #1886192.
Une limitation du nombre de strip affiché dans le flux rss en appellant le RSS de cette manière: http://site/rss.php?limit=10 (on affiche alors les 10 derniers strips)
This commit is contained in:
parent
65419836e7
commit
6dcfdba0e0
1 changed files with 10 additions and 1 deletions
11
rss.php
11
rss.php
|
|
@ -53,7 +53,16 @@ class rss_manager
|
||||||
|
|
||||||
$sm->strips_list_get();
|
$sm->strips_list_get();
|
||||||
|
|
||||||
for( $i = $sm->strips_count-1; $i >= 0; $i-- ) { // reverser order
|
// limit the number of strip in RSS
|
||||||
|
$limit = 0;
|
||||||
|
if (isset($_GET['limit']) && is_numeric($_GET['limit'])) {
|
||||||
|
// check for have no infinite for
|
||||||
|
if ($_GET['limit'] > 0 && $_GET['limit'] < $sm->strips_count) {
|
||||||
|
$limit = $sm->strips_count - $_GET['limit'];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
for( $i = $sm->strips_count-1; $i >= $limit; $i-- ) { // reverser order
|
||||||
$sm->strip_info_get( $i );
|
$sm->strip_info_get( $i );
|
||||||
|
|
||||||
// conversion iso8601 -> RFC822
|
// conversion iso8601 -> RFC822
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue