--- MPIWGWeb/bibliography.py 2005/05/09 10:01:54 1.7 +++ MPIWGWeb/bibliography.py 2005/10/10 08:42:49 1.7.2.1 @@ -12,13 +12,14 @@ def getBib(value): return value else: return "" -def formatBiblHelp(self,found,table,id): +def formatBiblHelp(self,found,table,id,foundIB=None): ret="" - try: - foundIB=self.ZSQLInlineSearch(_table=table,id=id)[0] + if not foundIB: + try: + foundIB=self.ZSQLInlineSearch(_table=table,id=id)[0] - except: - return ret + except: + return ret if foundIB.reference_type.lower()=='journal article': @@ -42,7 +43,7 @@ def formatBiblHelp(self,found,table,id): if (foundIB.secondary_author_semi_colon) and (not foundIB.secondary_author_semi_colon==''): ret+=", eds.: "+foundIB.secondary_author_semi_colon ret+=". " - if foundIB.pages and (not foundIB.pages)=='': + if foundIB.pages and (not foundIB.pages)=='': ret+=foundIB.pages+". " if foundIB.place_published and (not foundIB.place_published==''): ret+=foundIB.place_published+": " @@ -53,16 +54,16 @@ def formatBiblHelp(self,found,table,id): ret+=foundIB.author_semi_colon+". "+foundIB.title+". " if foundIB.pages and (not foundIB.pages==''): ret+=foundIB.pages+". " - if not foundIB.place_published=='': + if foundIB.place_published and (not foundIB.place_published==''): ret+=foundIB.place_published+": " - if not foundIB.publisher=='': + if foundIB.publisher and (not foundIB.publisher==''): ret+=foundIB.publisher+", " ret+=foundIB.year+"." elif foundIB.reference_type.lower()=='newspaper article': ret+=foundIB.author_semi_colon+". ""+foundIB.title+"." "+foundIB.secondary_title+", " ret+=foundIB.date+"."+foundIB.year+"," - if not foundIB.pages=='': + if foundIB.pages and (not foundIB.pages==''): ret+=foundIB.pages+". "