Attachements are striped.
On Apr 2, 2005 5:52 PM, Ryan Rempel <rgrempel(a)gmail.com> wrote:
I've been working on this a bit, and thought
I'd let you know what
I've come up with. I should say at the outset that I don't really know
what I'm doing and none of this is tested very much, so it's kind of
experimental at this point.
As far as the database is concerned, it seems that it is possible in
mysql to make the cur_title (and related fields) case-insensitive
within mysql itself. So I did that, as a kind of experiment. The idea
is to avoid (if possible) storing a second version of the cur_title
field (though it may end up being required for reasons that I don't
know about yet).
The next issue is that the mediawiki PHP code uses associative arrays
here and there with titles as the keys (often as caches and the like).
So what I've done (for some of these arrays) is use mb_stringtolower
when inserting keys and checking for keys. This involves changes to
LinkCache.php, Parser.php, and Title.php (so far). I've attached a
.diff file as an example (remember, this is just an experiment so
far).
I haven't done a whole lot of testing, but so far this seems (at least
superficially) to do what I want. I can create new pages with whatever
case for title that I want, and links work even if case doesn't match.
What will need some experimenting is to figure out what this breaks --
I'm sure it breaks something!
One interesting thing I've noticed is that the "headline" on a page is
controlled by the URL you use to reach it, rather than the cur_title
of the page itself. That is, the headline matches the case of the URL,
rather than the case of the actual cur_title. I suppose what I could
do is normalize the URL generated for the link so that it matches the
case of cur_title (rather than the case in the wikitext). Either that
or change the code that generates the headline to use cur_title's
case, but I suspect there may be a reason why it doesn't do that.
The other thing I've thought of is that I would probably want to
special-case "move page" where the new title differs from the old
title only in case. In that event, it may be possible simply to update
cur_title without doing much else -- depending on what side effects
arise.
Anyway, I thought that people might be interested in this -- again, it
is just and experiment, and I don't really know the mediawiki code
well, so I'm sure there is lots that this wrong with this.
_______________________________________________
MediaWiki-l mailing list
MediaWiki-l(a)Wikimedia.org
http://mail.wikipedia.org/mailman/listinfo/mediawiki-l