Added nb=all to get all links in RSS/ATOM feed.
This commit is contained in:
parent
eea58b3d5a
commit
c677013b93
1 changed files with 10 additions and 2 deletions
12
index.php
12
index.php
|
@ -898,7 +898,11 @@ function showRSS()
|
|||
if (!empty($_GET['searchterm'])) $linksToDisplay = $LINKSDB->filterFulltext($_GET['searchterm']);
|
||||
elseif (!empty($_GET['searchtags'])) $linksToDisplay = $LINKSDB->filterTags(trim($_GET['searchtags']));
|
||||
else $linksToDisplay = $LINKSDB;
|
||||
$nblinksToDisplay = !empty($_GET['nb']) ? max($_GET['nb'] + 0, 1) : 50;
|
||||
$nblinksToDisplay = 50; // Number of links to display.
|
||||
if (!empty($_GET['nb'])) // In URL, you can specificy the number of links. Example: nb=200 or nb=all for all links.
|
||||
{
|
||||
$nblinksToDisplay = $_GET['nb']=='all' ? count($linksToDisplay) : max($_GET['nb']+0,1) ;
|
||||
}
|
||||
|
||||
$pageaddr=htmlspecialchars(indexUrl());
|
||||
echo '<?xml version="1.0" encoding="UTF-8"?><rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/">';
|
||||
|
@ -969,7 +973,11 @@ function showATOM()
|
|||
if (!empty($_GET['searchterm'])) $linksToDisplay = $LINKSDB->filterFulltext($_GET['searchterm']);
|
||||
elseif (!empty($_GET['searchtags'])) $linksToDisplay = $LINKSDB->filterTags(trim($_GET['searchtags']));
|
||||
else $linksToDisplay = $LINKSDB;
|
||||
$nblinksToDisplay = !empty($_GET['nb']) ? max($_GET['nb'] + 0, 1) : 50;
|
||||
$nblinksToDisplay = 50; // Number of links to display.
|
||||
if (!empty($_GET['nb'])) // In URL, you can specificy the number of links. Example: nb=200 or nb=all for all links.
|
||||
{
|
||||
$nblinksToDisplay = $_GET['nb']=='all' ? count($linksToDisplay) : max($_GET['nb']+0,1) ;
|
||||
}
|
||||
|
||||
$pageaddr=htmlspecialchars(indexUrl());
|
||||
$latestDate = '';
|
||||
|
|
Loading…
Reference in a new issue