Do not show duplicate media in person gallery
svn: r10560
This commit is contained in:
		@@ -577,9 +577,12 @@ class BasePage:
 | 
			
		||||
 | 
			
		||||
        of.write('\t<div id="indivgallery" class="subsection">\n')
 | 
			
		||||
        of.write('\t\t<h4>%s</h4>\n' % _('Gallery'))
 | 
			
		||||
        displayed = []
 | 
			
		||||
        for mediaref in photolist:
 | 
			
		||||
            photo_handle = mediaref.get_reference_handle()
 | 
			
		||||
            photo = db.get_object_from_handle(photo_handle)
 | 
			
		||||
            if photo_handle in displayed:
 | 
			
		||||
                continue
 | 
			
		||||
            mime_type = photo.get_mime_type()
 | 
			
		||||
            title = photo.get_description()
 | 
			
		||||
            if title == "":
 | 
			
		||||
@@ -603,6 +606,7 @@ class BasePage:
 | 
			
		||||
                        self.photo_list[photo_handle] = [lnk]
 | 
			
		||||
                except (IOError,OSError),msg:
 | 
			
		||||
                    WarningDialog(_("Could not add photo to page"),str(msg))
 | 
			
		||||
            displayed.append(photo_handle)
 | 
			
		||||
 | 
			
		||||
        of.write('\t\t<div class="fullclear"></div>\n')
 | 
			
		||||
        of.write('\t</div>\n\n')
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user