fix first part of issue #1280

svn: r9296
This commit is contained in:
Stéphane Charette 2007-11-05 07:16:10 +00:00
parent aa0a835330
commit 535ba0f64a
2 changed files with 9 additions and 3 deletions

View File

@ -1,3 +1,8 @@
2007-11-04 Stéphane Charette <stephanecharette@gmail.com>
* src/plugins/NarrativeWeb.py: Fix first problem described in issue
#1280 (HTTP 404 errors due to source references on media pages); there
is still a serious problem for which I don't yet have a solution
2007-11-04 Martin Hawlisch <Martin.Hawlisch@gmx.de> 2007-11-04 Martin Hawlisch <Martin.Hawlisch@gmx.de>
* src/gen/lib/Makefile.am * src/gen/lib/Makefile.am
* src/gen/db/Makefile.am * src/gen/db/Makefile.am

View File

@ -1071,6 +1071,9 @@ class MediaPage(BasePage):
photo.gramps_id) photo.gramps_id)
of = self.create_link_file(handle,"img") of = self.create_link_file(handle,"img")
self.db = db
self.src_list = src_list
mime_type = photo.get_mime_type() mime_type = photo.get_mime_type()
if mime_type: if mime_type:
@ -1191,8 +1194,6 @@ class MediaPage(BasePage):
self.close_file(of) self.close_file(of)
def display_media_sources(self, of, db, photo): def display_media_sources(self, of, db, photo):
self.db = db
self.src_list = {}
self.bibli = Bibliography() self.bibli = Bibliography()
for sref in photo.get_source_references(): for sref in photo.get_source_references():
self.bibli.add_reference(sref) self.bibli.add_reference(sref)
@ -2498,9 +2499,9 @@ class WebReport(Report):
self.person_pages(ind_list, place_list, source_list, archive) self.person_pages(ind_list, place_list, source_list, archive)
self.surname_pages(ind_list, archive) self.surname_pages(ind_list, archive)
self.place_pages(place_list, source_list, archive) self.place_pages(place_list, source_list, archive)
self.source_pages(source_list, self.photo_list, archive)
if self.inc_gallery: if self.inc_gallery:
self.gallery_pages(self.photo_list, source_list, archive) self.gallery_pages(self.photo_list, source_list, archive)
self.source_pages(source_list, self.photo_list, archive)
if archive: if archive:
archive.close() archive.close()