On 3/31/07, Zeljko Trogrlic <zeljko_t(a)post.htnet.hr> wrote:
Sergiu Dumitriu wrote:
1. We can add a new table, xwikiredirects, which
holds redirect URLs.
2. We add document.getRedirects() (maybe both ways, from and to)
3. We need can change docdoesnotexist.vm to check for redirects.
That would be great. Or, you can take slightly different approach:
Use two tables:
* "dictionary"
* "document" (this is existing table).
In "dictionary" table, store all possible names for document. It could
be used for
* renaming
* synonyms.
Same document can have multiple names, e.g. "IP" and "Internet
Protocol". Both entries in dictionary point to the same entry in
documents.
You mean that pointing to ..../view/Doc/IP will display the
Doc/Internet_Protocol document, but without redirecting? (this is what
MediaWiki does). Otherwise, I don't see the difference with the approach
above. I did not describe the actual structure of the table, but how it can
be used.
If document is renamed, create new entry and add put its name in the
redirect field of the original entry. Original entry
becomes deprecated,
but it is still working.
"It is still working" means that the page content is preserved as it is at
the moment of renaming?
Optionally, update all old links.
Optionally, garbage collect old synonyms.
Not automatically, because IP should always be a synonim for Internet
Protocol (until we make a disambiguation page). But anyway, the
redirects/synonyms table should be editable from the wiki interface.
You should probably do this after 1.0
Definitely.
Sergiu
--
http://purl.org/net/sergiu