3676: NarrativeWeb report sometimes uses urls not availables (filter, proxy, living)

svn: r15095
This commit is contained in:
Doug Blank 2010-04-13 02:16:42 +00:00
parent 614ac18c5d
commit 73ed8a51dc

View File

@ -1189,12 +1189,16 @@ class BasePage(object):
_name = "" _name = ""
_linkurl = "#" _linkurl = "#"
if classname == "Person": if classname == "Person":
_obj = db.get_person_from_handle( newhandle ) # Is this a person for whom we have built a page:
# what is the shortest possible name we could use for this person? if newhandle in self.report.person_handles:
_name = _obj.get_primary_name().get_call_name() # If so, let's add a link to them:
if not _name or _name == "": _obj = db.get_person_from_handle( newhandle )
_name = _obj.get_primary_name().get_first_name() if _obj:
_linkurl = self.report.build_url_fname_html(_obj.handle, "ppl", True) # what is the shortest possible name we could use for this person?
_name = _obj.get_primary_name().get_call_name()
if not _name or _name == "":
_name = _obj.get_primary_name().get_first_name()
_linkurl = self.report.build_url_fname_html(_obj.handle, "ppl", True)
elif classname == "Family": elif classname == "Family":
_obj = db.get_family_from_handle( newhandle ) _obj = db.get_family_from_handle( newhandle )
partner1_handle = _obj.get_father_handle() partner1_handle = _obj.get_father_handle()
@ -5105,10 +5109,12 @@ class NavWebReport(Report):
""" """
# gets the person list and applies the requested filter # gets the person list and applies the requested filter
self.person_handles = {}
ind_list = self.database.iter_person_handles() ind_list = self.database.iter_person_handles()
self.progress.set_pass(_('Applying Filter...'), self.database.get_number_of_people()) self.progress.set_pass(_('Applying Filter...'), self.database.get_number_of_people())
ind_list = self.filter.apply(self.database, ind_list, self.progress) ind_list = self.filter.apply(self.database, ind_list, self.progress)
for handle in ind_list:
self.person_handles[handle] = True
return ind_list return ind_list
def copy_narrated_files(self): def copy_narrated_files(self):