Brion Vibber wrote:
On Tue, 8 Jul 2003, Timwi wrote:
Things seem to work now, except editing an article. If I submit an article, I get:
Warning: Empty regular expression in Language.php on line 1424
Set $wgUseDynamicDates = false in LocalSettings.php to be sure it's disabled for now. Or try to fix it. :)
Thanks again for your input. Now that my Wikipedia test server works fine (yay!), I was able to test my own patch.
PHP seems to have very different operator precedence than both Perl and C. (This is my first time doing PHP, does it show? :) ) It does not seem to be possible to do this: return $var == $value ? $one : $two . $three; without parentheses.
Anyway, just wanted to say that. I've reworked my patch to use parentheses in some cases, and ifs in most cases (for sake of readability).
There's only one final decision left that I need someone to make: How do we parse the following input?
''line 1
line 2''
There are three possibilities with my patch as it is now:
1) <em>line 1 <p> line 2</em> (incorrect HTML)
2) ''line 1 <p> line 2'' (shows author what's wrong)
3) line 1 <p> line 2 (least confusing to readers, but author may wonder why '' ... '' didn't work)
Of course other things are possible, e.g.
4) <em>line 1</em> <p> <em>line 2</em>
but that requires slightly more work (especially for line 2).
Thanks for any opinions, Timwi