changeset 186:dc2b06ba392b

Fixed bugs with getting incoming/outgoing links.
author Ludovic Chabant <ludovic@chabant.com>
date Tue, 04 Feb 2014 23:04:04 -0800
parents 955eb4d5dbd4
children 5ac0b5fe4cee
files wikked/views/read.py
diffstat 1 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/wikked/views/read.py	Tue Feb 04 23:03:14 2014 -0800
+++ b/wikked/views/read.py	Tue Feb 04 23:04:04 2014 -0800
@@ -154,8 +154,8 @@
     page = get_page_or_404(url, check_perms=CHECK_FOR_READ)
     links = []
     for link in page.links:
-        other = get_page_or_none(link)
-        if other is not None:
+        other = get_page_or_none(link, convert_url=False)
+        if other is not None and is_page_readable(other):
             links.append({
                 'url': other.url,
                 'title': other.title
@@ -177,7 +177,7 @@
     page = get_page_or_404(url, check_perms=CHECK_FOR_READ)
     links = []
     for link in page.getIncomingLinks():
-        other = get_page_or_none(link)
+        other = get_page_or_none(link, convert_url=False)
         if other is not None and is_page_readable(other):
             links.append({
                 'url': link,