diff options
Diffstat (limited to 'index.php')
-rw-r--r-- | index.php | 12 |
1 files changed, 6 insertions, 6 deletions
@@ -709,7 +709,7 @@ function showRSS() | |||
709 | if (!empty($_GET['searchterm'])) $linksToDisplay = $LINKSDB->filterFulltext($_GET['searchterm']); | 709 | if (!empty($_GET['searchterm'])) $linksToDisplay = $LINKSDB->filterFulltext($_GET['searchterm']); |
710 | else if (!empty($_GET['searchtags'])) $linksToDisplay = $LINKSDB->filterTags(trim($_GET['searchtags'])); | 710 | else if (!empty($_GET['searchtags'])) $linksToDisplay = $LINKSDB->filterTags(trim($_GET['searchtags'])); |
711 | else $linksToDisplay = $LINKSDB; | 711 | else $linksToDisplay = $LINKSDB; |
712 | 712 | ||
713 | $nblinksToDisplay = 50; // Number of links to display. | 713 | $nblinksToDisplay = 50; // Number of links to display. |
714 | if (!empty($_GET['nb'])) // In URL, you can specificy the number of links. Example: nb=200 or nb=all for all links. | 714 | if (!empty($_GET['nb'])) // In URL, you can specificy the number of links. Example: nb=200 or nb=all for all links. |
715 | { | 715 | { |
@@ -789,7 +789,7 @@ function showATOM() | |||
789 | if (!empty($_GET['searchterm'])) $linksToDisplay = $LINKSDB->filterFulltext($_GET['searchterm']); | 789 | if (!empty($_GET['searchterm'])) $linksToDisplay = $LINKSDB->filterFulltext($_GET['searchterm']); |
790 | else if (!empty($_GET['searchtags'])) $linksToDisplay = $LINKSDB->filterTags(trim($_GET['searchtags'])); | 790 | else if (!empty($_GET['searchtags'])) $linksToDisplay = $LINKSDB->filterTags(trim($_GET['searchtags'])); |
791 | else $linksToDisplay = $LINKSDB; | 791 | else $linksToDisplay = $LINKSDB; |
792 | 792 | ||
793 | $nblinksToDisplay = 50; // Number of links to display. | 793 | $nblinksToDisplay = 50; // Number of links to display. |
794 | if (!empty($_GET['nb'])) // In URL, you can specificy the number of links. Example: nb=200 or nb=all for all links. | 794 | if (!empty($_GET['nb'])) // In URL, you can specificy the number of links. Example: nb=200 or nb=all for all links. |
795 | { | 795 | { |
@@ -948,12 +948,12 @@ function showDaily() | |||
948 | 948 | ||
949 | $days = $LINKSDB->days(); | 949 | $days = $LINKSDB->days(); |
950 | $i = array_search($day,$days); | 950 | $i = array_search($day,$days); |
951 | if ($i==false) { $i=count($days)-1; $day=$days[$i]; } | 951 | if ($i===false) { $i=count($days)-1; $day=$days[$i]; } |
952 | $previousday=''; | 952 | $previousday=''; |
953 | $nextday=''; | 953 | $nextday=''; |
954 | if ($i!==false) | 954 | if ($i!==false) |
955 | { | 955 | { |
956 | if ($i>1) $previousday=$days[$i-1]; | 956 | if ($i>=1) $previousday=$days[$i-1]; |
957 | if ($i<count($days)-1) $nextday=$days[$i+1]; | 957 | if ($i<count($days)-1) $nextday=$days[$i+1]; |
958 | } | 958 | } |
959 | 959 | ||
@@ -1041,7 +1041,7 @@ function renderPage() | |||
1041 | if (!empty($_GET['searchterm'])) $links = $LINKSDB->filterFulltext($_GET['searchterm']); | 1041 | if (!empty($_GET['searchterm'])) $links = $LINKSDB->filterFulltext($_GET['searchterm']); |
1042 | elseif (!empty($_GET['searchtags'])) $links = $LINKSDB->filterTags(trim($_GET['searchtags'])); | 1042 | elseif (!empty($_GET['searchtags'])) $links = $LINKSDB->filterTags(trim($_GET['searchtags'])); |
1043 | else $links = $LINKSDB; | 1043 | else $links = $LINKSDB; |
1044 | 1044 | ||
1045 | $body=''; | 1045 | $body=''; |
1046 | $linksToDisplay=array(); | 1046 | $linksToDisplay=array(); |
1047 | 1047 | ||
@@ -1056,7 +1056,7 @@ function renderPage() | |||
1056 | $linksToDisplay[]=$link; // Add to array. | 1056 | $linksToDisplay[]=$link; // Add to array. |
1057 | } | 1057 | } |
1058 | } | 1058 | } |
1059 | 1059 | ||
1060 | $PAGE = new pageBuilder; | 1060 | $PAGE = new pageBuilder; |
1061 | $PAGE->assign('linkcount',count($LINKSDB)); | 1061 | $PAGE->assign('linkcount',count($LINKSDB)); |
1062 | $PAGE->assign('linksToDisplay',$linksToDisplay); | 1062 | $PAGE->assign('linksToDisplay',$linksToDisplay); |