Skip to content
This repository has been archived by the owner on Feb 9, 2025. It is now read-only.

Commit

Permalink
Bugfixes.
Browse files Browse the repository at this point in the history
  • Loading branch information
david committed Oct 3, 2002
1 parent dedd5d9 commit f7b3884
Show file tree
Hide file tree
Showing 52 changed files with 601 additions and 1,069 deletions.
3 changes: 3 additions & 0 deletions Changelog
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,6 @@ CVS Created two new packages -- persistence and
objects. datamanager works like an object factory,
accepting requests for object sets and serving them.

Implemented a cache for each datamanager.

Finally fixed database synchronization issues.
29 changes: 17 additions & 12 deletions bin/gnome-import
Original file line number Diff line number Diff line change
Expand Up @@ -19,18 +19,15 @@
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
from Globals import *
from Docs import docs, Doc
from Topics import topics
from DocTopics import doctopics, DocTopic
from DocFiles import docfiles, DocFile
from DocCollections import doccollections, DocCollection
import sys
import os
import fnmatch
import fileinput # FIXME: I think this can go.
import re
import string

from CoreDM import dms

# Set to 1 to get debugging messages, 2 to get more
DEBUG = 0

Expand Down Expand Up @@ -422,7 +419,7 @@ def callback(arg, directory, files):
if DEBUG >= 1:
omf.print_debug()

doc = Doc(docs)
doc = dms.document.new()
doc.title = omf.title
doc.version = omf.version
doc.pub_status_code = 'N'
Expand All @@ -434,15 +431,23 @@ def callback(arg, directory, files):
doc.language = omf.language
doc.sk_seriesid = omf.seriesid
doc.replaced_by_id = 0
docs.add(doc)
doc.save()

# Add document file
if omf.url > '':
docfile = DocFile(docfiles)
docfile = dms.document_file.new()
docfile.doc_id = doc.id
docfile.filename = omf.url
docfile.top = 1
docfile = doc.files.add(docfile)

# Make sure there's a file to refer to, before saving!
sourcefile = docfile.sourcefile
if sourcefile==None:
sourcefile = dms.sourcefile.new()
sourcefile.filename = docfile.filename
sourcefile.save()

doc.files.add(docfile)

# Add document topics
for category in omf.categories:
Expand All @@ -460,18 +465,18 @@ def callback(arg, directory, files):
continue

# Double-check the topic_code.
topic = topics[topic_code]
topic = dms.topic.get_by_id(topic_code)
if topic==None:
print 'ERROR: Gnome category mapped to an invalid topic: ' + topic_code
sys.exit(1)

doctopic = DocTopic(doctopics)
doctopic = dms.document_topic.new()
doctopic.doc_id = doc.id
doctopic.topic_code = topic_code
doc.topics.add(doctopic)

# Store in the GNOME collection.
doccoll = DocCollection(doccollections)
doccoll = dms.document_collection.new()
doccoll.collection_code = 'gnome'
doccoll.doc_id = doc.id
doc.collections.add(doccoll)
Expand Down
20 changes: 10 additions & 10 deletions database/tables/page/EN.m4
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,17 @@ insert(my, default, main, 2, [], t,
insert(doctable, default, main, 3, [], f, f, f, f)
insert(search, default, main, 4, [], t, f, f, f)

insert(sessions, default, admin, 1, [], t, f, f, t)
insert(users, default, admin, 2, [letter], t, f, t, f)
insert(adduser, default, admin, 3, [], t, f, t, f)
insert(errors, default, admin, 4, [], t, f, t, f)
insert(sessions, default, admin, 1, [], t, t, f, t)
insert(users, default, admin, 2, [letter], t, t, t, f)
insert(adduser, default, admin, 3, [], t, t, t, f)
insert(errors, default, admin, 4, [], t, t, t, f)
insert(adddocument, default, admin, 5, [], t, t, t, f)
insert(news, default, admin, 6, [], f, f, t, f)
insert(addnews, default, admin, 7, [], f, f, t, f)
insert(pages, default, admin, 8, [], f, f, t, f)
insert(addpage, default, admin, 9, [], f, f, t, f)
insert(strings, default, admin, 10, [], f, f, t, f)
insert(addstring, default, admin, 11, [], f, f, t, f)
insert(news, default, admin, 6, [], t, t, t, f)
insert(addnews, default, admin, 7, [], t, t, t, f)
insert(pages, default, admin, 8, [], t, t, t, f)
insert(addpage, default, admin, 9, [], t, t, t, f)
insert(strings, default, admin, 10, [], t, t, t, f)
insert(addstring, default, admin, 11, [], t, t, t, f)

insert(recentnews, default, news, 1, [], f, f, f, f)
insert(stats, default, news, 2, [], f, f, f, f)
Expand Down
Loading

0 comments on commit f7b3884

Please sign in to comment.