diff options
Diffstat (limited to 'index.php')
-rw-r--r-- | index.php | 9 |
1 files changed, 5 insertions, 4 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 | { |
@@ -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); |
@@ -1330,6 +1330,7 @@ function renderPage() | |||
1330 | { | 1330 | { |
1331 | if (!tokenOk($_POST['token'])) die('Wrong token.'); // Go away! | 1331 | if (!tokenOk($_POST['token'])) die('Wrong token.'); // Go away! |
1332 | $tags = trim(preg_replace('/\s\s+/',' ', $_POST['lf_tags'])); // Remove multiple spaces. | 1332 | $tags = trim(preg_replace('/\s\s+/',' ', $_POST['lf_tags'])); // Remove multiple spaces. |
1333 | $tags = implode(' ', array_unique(explode(' ', $tags))); // Remove duplicates. | ||
1333 | $linkdate=$_POST['lf_linkdate']; | 1334 | $linkdate=$_POST['lf_linkdate']; |
1334 | $url = trim($_POST['lf_url']); | 1335 | $url = trim($_POST['lf_url']); |
1335 | if (!startsWith($url,'http:') && !startsWith($url,'https:') && !startsWith($url,'ftp:') && !startsWith($url,'magnet:') && !startsWith($url,'?') && !startsWith($url,'javascript:')) | 1336 | if (!startsWith($url,'http:') && !startsWith($url,'https:') && !startsWith($url,'ftp:') && !startsWith($url,'magnet:') && !startsWith($url,'?') && !startsWith($url,'javascript:')) |