* src/GrampsDb/_WriteXML.py (write_data_map): Escape special chars
in key/value pairs. * src/GrampsDb/_GrampsBSDDB.py (load): Do not create logs when TXN is disabled; (gramps_upgrade_9): Include upgrade_11 steps into upgrade_9. svn: r7360
This commit is contained in:
parent
6c4d70bf2a
commit
4952e06acd
@ -4,8 +4,11 @@
|
|||||||
* src/plugins/SoundGen.py: Dont fail with empty database
|
* src/plugins/SoundGen.py: Dont fail with empty database
|
||||||
|
|
||||||
2006-10-06 Alex Roitman <shura@gramps-project.org>
|
2006-10-06 Alex Roitman <shura@gramps-project.org>
|
||||||
* src/GrampsDb/_GrampsBSDDB.py (GrampsBSDDB.load): Do not create
|
* src/GrampsDb/_WriteXML.py (write_data_map): Escape special chars
|
||||||
logs when TXN is disabled.
|
in key/value pairs.
|
||||||
|
* src/GrampsDb/_GrampsBSDDB.py (load): Do not create logs when TXN
|
||||||
|
is disabled;
|
||||||
|
(gramps_upgrade_9): Include upgrade_11 steps into upgrade_9.
|
||||||
|
|
||||||
2006-10-05 Alex Roitman <shura@gramps-project.org>
|
2006-10-05 Alex Roitman <shura@gramps-project.org>
|
||||||
* src/DataViews/_PersonView.py (set_inactive): Check active status.
|
* src/DataViews/_PersonView.py (set_inactive): Check active status.
|
||||||
|
@ -1488,7 +1488,7 @@ class GrampsBSDDB(GrampsDbBase,UpdateCallback):
|
|||||||
self.metadata.sync()
|
self.metadata.sync()
|
||||||
|
|
||||||
def gramps_upgrade_9(self):
|
def gramps_upgrade_9(self):
|
||||||
print "Upgrading to DB version 10 -- this may take a while"
|
print "Upgrading to DB version 11 -- this may take a while"
|
||||||
# The very very first thing is to check for duplicates in the
|
# The very very first thing is to check for duplicates in the
|
||||||
# primary tables and remove them.
|
# primary tables and remove them.
|
||||||
self.set_total(7)
|
self.set_total(7)
|
||||||
@ -1727,6 +1727,10 @@ class GrampsBSDDB(GrampsDbBase,UpdateCallback):
|
|||||||
for item in person.lds_ord_list:
|
for item in person.lds_ord_list:
|
||||||
item.private = False
|
item.private = False
|
||||||
|
|
||||||
|
# Upgrade addresses: this is an upgrade_11 step
|
||||||
|
for addr in person.address_list:
|
||||||
|
addr.county = u''
|
||||||
|
|
||||||
self.commit_person(person,trans)
|
self.commit_person(person,trans)
|
||||||
self.update()
|
self.update()
|
||||||
|
|
||||||
@ -1828,7 +1832,7 @@ class GrampsBSDDB(GrampsDbBase,UpdateCallback):
|
|||||||
place = Place()
|
place = Place()
|
||||||
place.handle = handle
|
place.handle = handle
|
||||||
(junk_handle, place.gramps_id, place.title, place.long, place.lat,
|
(junk_handle, place.gramps_id, place.title, place.long, place.lat,
|
||||||
place.main_loc, place.alt_loc, place.urls, place.media_list,
|
main_loc, alt_loc, place.urls, place.media_list,
|
||||||
place.source_list, place.note, place.change) = info
|
place.source_list, place.note, place.change) = info
|
||||||
|
|
||||||
# Cover attributes contained in MediaRefs
|
# Cover attributes contained in MediaRefs
|
||||||
@ -1839,6 +1843,12 @@ class GrampsBSDDB(GrampsDbBase,UpdateCallback):
|
|||||||
for url in place.urls:
|
for url in place.urls:
|
||||||
convert_url_9(url)
|
convert_url_9(url)
|
||||||
|
|
||||||
|
# Upgrade locations: this is an upgrade_11 step
|
||||||
|
if place.main_loc:
|
||||||
|
place.main_loc.street = u''
|
||||||
|
for l in place.alt_loc:
|
||||||
|
l.street = u''
|
||||||
|
|
||||||
self.commit_place(place,trans)
|
self.commit_place(place,trans)
|
||||||
self.update()
|
self.update()
|
||||||
|
|
||||||
@ -1868,13 +1878,13 @@ class GrampsBSDDB(GrampsDbBase,UpdateCallback):
|
|||||||
the_txn = self.env.txn_begin()
|
the_txn = self.env.txn_begin()
|
||||||
else:
|
else:
|
||||||
the_txn = None
|
the_txn = None
|
||||||
self.metadata.put('version',10,txn=the_txn)
|
self.metadata.put('version',11,txn=the_txn)
|
||||||
if self.UseTXN:
|
if self.UseTXN:
|
||||||
the_txn.commit()
|
the_txn.commit()
|
||||||
else:
|
else:
|
||||||
self.metadata.sync()
|
self.metadata.sync()
|
||||||
|
|
||||||
print "Done upgrading to DB version 10"
|
print "Done upgrading to DB version 11"
|
||||||
|
|
||||||
def gramps_upgrade_10(self):
|
def gramps_upgrade_10(self):
|
||||||
print "Upgrading to DB version 10 -- this may take a while"
|
print "Upgrading to DB version 10 -- this may take a while"
|
||||||
|
@ -912,7 +912,7 @@ class XmlWriter(UpdateCallback):
|
|||||||
sp = ' '*indent
|
sp = ' '*indent
|
||||||
for key in datamap.keys():
|
for key in datamap.keys():
|
||||||
self.g.write('%s<data_item key="%s" value="%s"/>\n' %
|
self.g.write('%s<data_item key="%s" value="%s"/>\n' %
|
||||||
(sp,key,datamap[key]))
|
(sp,self.fix(key),self.fix(datamap[key])))
|
||||||
|
|
||||||
def write_reporef_list(self,rrlist,index=1):
|
def write_reporef_list(self,rrlist,index=1):
|
||||||
for reporef in rrlist:
|
for reporef in rrlist:
|
||||||
|
Loading…
Reference in New Issue
Block a user