lhc/web/wiklou.git
15 years agoWar on wfElement() and friends. Call the Xml members directly, rather than using...
Chad Horohoe [Sun, 14 Dec 2008 19:14:21 +0000 (19:14 +0000)]
War on wfElement() and friends. Call the Xml members directly, rather than using old wrappers.

15 years ago* removed useless check for $wgAllowUserSkin since we're already checked for it 18...
Alexandre Emsenhuber [Sun, 14 Dec 2008 18:41:30 +0000 (18:41 +0000)]
* removed useless check for $wgAllowUserSkin since we're already checked for it 18 lines above
* wfHidden() -> Xml::hidden()

15 years agoFollow-up to r44584: finishing comment.
Roan Kattouw [Sun, 14 Dec 2008 17:44:13 +0000 (17:44 +0000)]
Follow-up to r44584: finishing comment.

15 years agoAPI: (bug 15579) clshow considers all categories !hidden. Modified patch by Brad...
Roan Kattouw [Sun, 14 Dec 2008 17:39:50 +0000 (17:39 +0000)]
API: (bug 15579) clshow considers all categories !hidden. Modified patch by Brad Jorsch

15 years agoAPI: (bug 16549) Kill a filesort in list=allpages&apfilterlanglinks=withlanglinks...
Roan Kattouw [Sun, 14 Dec 2008 17:04:24 +0000 (17:04 +0000)]
API: (bug 16549) Kill a filesort in list=allpages&apfilterlanglinks=withlanglinks by replacing DISTINCT with GROUP BY. Of course GROUP BY page_namespace, page_title would suffice on MySQL, but Postgres will reportedly whine about that being against the SQL standard. Using GROUP BY on all selected fields instead (should please pgsql) and taking care that page_namespace, page_title is on front, which shouldn't cause a filesort is MySQL is smart enough (5.0 is, let's just hope 4.1 is too)

15 years agoAPI: Fix broken block expiry calculation in list=recentchanges
Roan Kattouw [Sun, 14 Dec 2008 15:50:40 +0000 (15:50 +0000)]
API: Fix broken block expiry calculation in list=recentchanges

15 years agoLocalization fix.
Rotem Liss [Sun, 14 Dec 2008 15:14:38 +0000 (15:14 +0000)]
Localization fix.

15 years agobetter parser test coverage of {{ns:}}
Ilmari Karonen [Sun, 14 Dec 2008 10:11:53 +0000 (10:11 +0000)]
better parser test coverage of {{ns:}}

15 years agoLocalisation updates for core messages from Betawiki (2008-14-10 10:36 CET)
Siebrand Mazeland [Sun, 14 Dec 2008 09:45:33 +0000 (09:45 +0000)]
Localisation updates for core messages from Betawiki (2008-14-10 10:36 CET)

15 years agoFix regression in parserTests.inc caused by r44560.
Ilmari Karonen [Sun, 14 Dec 2008 07:38:16 +0000 (07:38 +0000)]
Fix regression in parserTests.inc caused by r44560.

15 years agoRemove comment
Aaron Schulz [Sun, 14 Dec 2008 07:12:03 +0000 (07:12 +0000)]
Remove comment

15 years ago(bug 12645) File histories should be paged
Aaron Schulz [Sun, 14 Dec 2008 07:10:42 +0000 (07:10 +0000)]
(bug 12645) File histories should be paged

15 years agoAdd some sanity checking. Return nicely if Http::get fails (in general) on fetchImage...
Chad Horohoe [Sun, 14 Dec 2008 07:02:44 +0000 (07:02 +0000)]
Add some sanity checking. Return nicely if Http::get fails (in general) on fetchImageQuery(), and also if our query returns poorly in findBySha1(), similar to queryImage().

15 years agoExpand ASC condition as it should be
Aaron Schulz [Sun, 14 Dec 2008 07:02:38 +0000 (07:02 +0000)]
Expand ASC condition as it should be

15 years agoFindBySha1 now works in ForeignApiRepo :)
Chad Horohoe [Sun, 14 Dec 2008 06:55:21 +0000 (06:55 +0000)]
FindBySha1 now works in ForeignApiRepo :)

15 years agoAdd a new FileCache class to wrap RepoGroup::findFile() and findFiles(), and make...
Ilmari Karonen [Sun, 14 Dec 2008 05:47:48 +0000 (05:47 +0000)]
Add a new FileCache class to wrap RepoGroup::findFile() and findFiles(), and make wfFindFile() use it by default.  This should improve performance for pages that refer to the same image several times, but the real benefit is that it allows batch file existence checks, à la LinkBatch, by collecting a set of titles (or DB keys) and calling FileCache::findFiles() on them to prefill the cache.
XXX: The code seems to more or less work, but it obviously needs more testing, regarding both stability and memory usage.  In particular, I have not tested file uploads yet -- there may be consistency issues there.

15 years agoMake boundary inclusion optional in getHistory()
Aaron Schulz [Sun, 14 Dec 2008 03:53:05 +0000 (03:53 +0000)]
Make boundary inclusion optional in getHistory()

15 years agoFollowup to r44525: remove the broken $flags parameter from RepoGroup::findFiles...
Ilmari Karonen [Sun, 14 Dec 2008 03:43:10 +0000 (03:43 +0000)]
Followup to r44525: remove the broken $flags parameter from RepoGroup::findFiles() too.

15 years agoTweak comment
Aaron Schulz [Sun, 14 Dec 2008 00:13:16 +0000 (00:13 +0000)]
Tweak comment

15 years ago(bug 16635) Add TOC to Special:Watchlist/edit
Ilmari Karonen [Sat, 13 Dec 2008 22:45:18 +0000 (22:45 +0000)]
(bug 16635) Add TOC to Special:Watchlist/edit

15 years agoAdd a bit in RELEASE-NOTES about what prompted me to play with the installer: bug...
Chad Horohoe [Sat, 13 Dec 2008 21:36:28 +0000 (21:36 +0000)]
Add a bit in RELEASE-NOTES about what prompted me to play with the installer: bug 16293, change the PD URL to point at Creative Commons.

15 years agoGFDL 1.3 is out, need to update the installer appropriately.
Chad Horohoe [Sat, 13 Dec 2008 21:34:11 +0000 (21:34 +0000)]
GFDL 1.3 is out, need to update the installer appropriately.
* GFDL 1.2 now links to 1.2, instead of 1.3
* 1.3 has been added as an option, 1.2 still Wikipedia-compatible
* The rights codes were tweaked a bit (see RELEASE-NOTES)

15 years ago(Actually, we can simplify that a bit more.)
Ilmari Karonen [Sat, 13 Dec 2008 21:21:40 +0000 (21:21 +0000)]
(Actually, we can simplify that a bit more.)

15 years agoFix interwiki link regression from r44524.
Ilmari Karonen [Sat, 13 Dec 2008 21:14:50 +0000 (21:14 +0000)]
Fix interwiki link regression from r44524.

15 years ago* (bug 16626) action=delete now correctly handles empty "reason" param
Alex Z [Sat, 13 Dec 2008 21:07:18 +0000 (21:07 +0000)]
* (bug 16626) action=delete now correctly handles empty "reason" param

15 years agoMake getHistory() a bit more paging friendly
Aaron Schulz [Sat, 13 Dec 2008 19:38:34 +0000 (19:38 +0000)]
Make getHistory() a bit more paging friendly

15 years ago*sigh* Forgot db->timestamp
Aaron Schulz [Sat, 13 Dec 2008 19:03:15 +0000 (19:03 +0000)]
*sigh* Forgot db->timestamp

15 years agoTweak r44534: simplify this
Aaron Schulz [Sat, 13 Dec 2008 15:26:19 +0000 (15:26 +0000)]
Tweak r44534: simplify this

15 years agoTweak timestamp handling to allow no lower limit
Aaron Schulz [Sat, 13 Dec 2008 14:59:08 +0000 (14:59 +0000)]
Tweak timestamp handling to allow no lower limit

15 years agoLocalization update for he, and whitespace fixes.
Rotem Liss [Sat, 13 Dec 2008 14:44:44 +0000 (14:44 +0000)]
Localization update for he, and whitespace fixes.

15 years agoFollow up r44528: Bump $wgStyleVersion
Raimond Spekking [Sat, 13 Dec 2008 13:00:10 +0000 (13:00 +0000)]
Follow up r44528: Bump $wgStyleVersion

15 years agoFollow up r44514: Add new message to messages.inc
Raimond Spekking [Sat, 13 Dec 2008 12:43:21 +0000 (12:43 +0000)]
Follow up r44514: Add new message to messages.inc

15 years ago(bug 1941) Add textarea { font-family: monospace; } to shared.css for Safari
Ilmari Karonen [Sat, 13 Dec 2008 08:49:16 +0000 (08:49 +0000)]
(bug 1941) Add textarea { font-family: monospace; } to shared.css for Safari

15 years ago* (bug 16623) Add missing </p> tag in Special:LockDB -- patch by Nakon
Ryan Schmidt [Sat, 13 Dec 2008 05:02:26 +0000 (05:02 +0000)]
* (bug 16623) Add missing </p> tag in Special:LockDB -- patch by Nakon

15 years agoRemove it from the comments too. (Who reads those, anyway?)
Ilmari Karonen [Sat, 13 Dec 2008 04:40:25 +0000 (04:40 +0000)]
Remove it from the comments too. (Who reads those, anyway?)

15 years agoRemove parameter from FileRepo::findFiles(), it was fubar and nobody was using it...
Ilmari Karonen [Sat, 13 Dec 2008 04:35:48 +0000 (04:35 +0000)]
Remove  parameter from FileRepo::findFiles(), it was fubar and nobody was using it anyway.  (What we really need is some way to pass timestamps to that function, which probably requires further rethinking of the interface.)

15 years agofollowup to r44520: simplify various bits by removing checks now made redundant
Ilmari Karonen [Sat, 13 Dec 2008 04:14:40 +0000 (04:14 +0000)]
followup to r44520: simplify various bits by removing checks now made redundant

15 years ago(bug 5506) Make Title::isAlwaysKnown() return true for known special pages and files...
Ilmari Karonen [Sat, 13 Dec 2008 02:40:53 +0000 (02:40 +0000)]
(bug 5506) Make Title::isAlwaysKnown() return true for known special pages and files in foreign repos.

Besides fixing the display of the latter in logs, edit summaries and other places relying on Linker::link(),
the change should allow considerable simplification (not included in this commit) of that function, as
well as of several related functions e.g. in the Parser and Skin classes.  To that end, I've also introduced
a new function Title::isKnown() to wrap the common condition "$title->exists() || $title->isAlwaysKnown()",
and have clarified the roles of the three methods.

15 years agoNeed to define $text
Chad Horohoe [Sat, 13 Dec 2008 01:53:18 +0000 (01:53 +0000)]
Need to define $text

15 years agoComplete rewrite of Special:Statistics:
Chad Horohoe [Sat, 13 Dec 2008 01:45:49 +0000 (01:45 +0000)]
Complete rewrite of Special:Statistics:
* Now subclasses SpecialPage like it should
* All of the individual sections were split off into their own methods for readability
* Fixed Brion's comments on code review (r44509): not using <small> in the message, breaking to a new line, and keeping the description message separate
* Since -tooltip is a misleading name for the message, I renamed them to -desc, all message files and messages.inc have been updated

15 years ago* (bug 2391) A warning is now shown for invalid ISBN numbers on Special:Booksources.
Brion Vibber [Fri, 12 Dec 2008 23:59:15 +0000 (23:59 +0000)]
* (bug 2391) A warning is now shown for invalid ISBN numbers on Special:Booksources.
This could be called from the parser as well, but I'm a little hesitant just yet.
Parser tests currently contain some bogus ISBN numbers which need to be replaced with
legit ones... there's also the possibility that some books really are published with
bad ISBNs... on the other hand, Amazon won't let you search for them. :)
Plus the feedback as you're hitting preview might be nice... but it's also not clear
what's wrong -- that is, that it's an invalid number rather than that you just didn't
do something right. Do we want better feedback?

15 years agoremove no longer needed line for Parser_OldPP (now banished!)
Brion Vibber [Fri, 12 Dec 2008 23:57:18 +0000 (23:57 +0000)]
remove no longer needed line for Parser_OldPP (now banished!)

15 years agoRemove these tooltips in favor of actually putting the information inline.
Chad Horohoe [Fri, 12 Dec 2008 18:29:33 +0000 (18:29 +0000)]
Remove these tooltips in favor of actually putting the information inline.

15 years agoManual exporting namespaces aliases from Betawiki (bug 44: renaming of Image namespac...
Alexandre Emsenhuber [Fri, 12 Dec 2008 18:21:35 +0000 (18:21 +0000)]
Manual exporting namespaces aliases from Betawiki (bug 44: renaming of Image namespace to File)
Only added alias for "Discussion Image" (Image talk) since the name of the "Image" namespace is the same in English and French and the alias is already present

15 years agosvn:eol-style native
Alexandre Emsenhuber [Fri, 12 Dec 2008 17:31:06 +0000 (17:31 +0000)]
svn:eol-style native

15 years agoMoved the IE content type checks to their own class. Disassembled IE 5 and 6 and...
Tim Starling [Fri, 12 Dec 2008 15:06:35 +0000 (15:06 +0000)]
Moved the IE content type checks to their own class. Disassembled IE 5 and 6 and added the results to the class. The entry points now return an array giving MIME types for all versions. The most important version difference is the introduction of an early check for PNG headers in IE 7. Added application/x-msdownload to disallowed types, haven't been able to reproduce any vulnerability, but it's better to be on the safe side.

15 years agoLocalization update.
Rotem Liss [Fri, 12 Dec 2008 14:10:03 +0000 (14:10 +0000)]
Localization update.

15 years agoLocalization update.
Rotem Liss [Fri, 12 Dec 2008 14:07:23 +0000 (14:07 +0000)]
Localization update.

15 years agoQuick hack to disable import for non privileged users. Prolly a regression from r43963
Raimond Spekking [Fri, 12 Dec 2008 14:06:30 +0000 (14:06 +0000)]
Quick hack to disable import for non privileged users. Prolly a regression from r43963

15 years agoFollow up for r44497: Rebuild all message files
Raimond Spekking [Fri, 12 Dec 2008 11:35:22 +0000 (11:35 +0000)]
Follow up for r44497: Rebuild all message files

15 years ago* Reword some resetpass related messages: It is a password change, always. IMO "reset...
Raimond Spekking [Fri, 12 Dec 2008 11:26:11 +0000 (11:26 +0000)]
* Reword some resetpass related messages: It is a password change, always. IMO "reset" is misleading now.
* Rearrange resetpass related messages in messages.inc
* Remove 1 unused message.

15 years agoSome tweaks for Special:ResetPass
Raimond Spekking [Fri, 12 Dec 2008 11:19:31 +0000 (11:19 +0000)]
Some tweaks for Special:ResetPass
* Use a more appropriate message for 'Retype new password:'
* Add missing CSS IDs for table and rows

15 years ago(bug 44) Fix omission: Image -> File in namespace names for yue, zh-hans, and zh...
Siebrand Mazeland [Fri, 12 Dec 2008 11:11:44 +0000 (11:11 +0000)]
(bug 44) Fix omission: Image -> File in namespace names for yue, zh-hans, and zh-hant

15 years ago(bug 12716) Unprotecting a non-protected page leaves a log entry
Aaron Schulz [Fri, 12 Dec 2008 04:55:11 +0000 (04:55 +0000)]
(bug 12716) Unprotecting a non-protected page leaves a log entry

15 years agoTweak JS focusing
Aaron Schulz [Fri, 12 Dec 2008 04:23:28 +0000 (04:23 +0000)]
Tweak JS focusing

15 years agoClarify the $section parameter a bit on Article::replaceSection() to indicate accepta...
Brion Vibber [Fri, 12 Dec 2008 01:05:51 +0000 (01:05 +0000)]
Clarify the $section parameter a bit on Article::replaceSection() to indicate acceptable input values.
Throw in a strval() around the param on compare so if somebody thinks "hey I'll make it a === because it's 5ns faster" again it won't break anything. :)

15 years agoFix regression from r44015 "Various minor cleanup/spacing"
Brion Vibber [Fri, 12 Dec 2008 00:55:58 +0000 (00:55 +0000)]
Fix regression from r44015 "Various minor cleanup/spacing"
Damaged some section editing, or at least display of undo, by causing null section parameters in section replacement to be treated as section 0.

15 years agomore NS alias breakage
Ilmari Karonen [Fri, 12 Dec 2008 00:16:00 +0000 (00:16 +0000)]
more NS alias breakage

15 years agoFix broken NS aliases.
Chad Horohoe [Fri, 12 Dec 2008 00:09:01 +0000 (00:09 +0000)]
Fix broken NS aliases.

15 years agoSelf revert. Need to focus when there's no results, not only when there's no term.
Chad Horohoe [Thu, 11 Dec 2008 23:55:44 +0000 (23:55 +0000)]
Self revert. Need to focus when there's no results, not only when there's no term.

15 years agoPer code review. Only set focus if we have a search term.
Chad Horohoe [Thu, 11 Dec 2008 23:49:35 +0000 (23:49 +0000)]
Per code review. Only set focus if we have a search term.

15 years agoThrow in $wgEnableSerializedMessages which I can disable on test wikipedia so it...
Brion Vibber [Thu, 11 Dec 2008 22:20:26 +0000 (22:20 +0000)]
Throw in $wgEnableSerializedMessages which I can disable on test wikipedia so it'll now show up to date messages. Yay!

15 years agoLocalization update for he.
Rotem Liss [Thu, 11 Dec 2008 21:52:53 +0000 (21:52 +0000)]
Localization update for he.

15 years agoAPI: (bug 16594) Use strict comparison in list=allusers. This'll hopefully make ...
Roan Kattouw [Thu, 11 Dec 2008 21:51:01 +0000 (21:51 +0000)]
API: (bug 16594) Use strict comparison in list=allusers. This'll hopefully make [[User:]] on enwiki show up again; he's currently being dropped from the user list because false == ''

15 years agoLoosen requirements for cascading protection: instead of requiring that both edit...
Roan Kattouw [Thu, 11 Dec 2008 21:37:48 +0000 (21:37 +0000)]
Loosen requirements for cascading protection: instead of requiring that both edit=sysop and move=sysop (and any other custom restriction types be set to sysop as well), just require edit=sysop and leave the other restriction types alone. This makes it possible to protect a page with e.g. edit=sysop and move=autoconfirmed and still use cascading protection, but only through the API: the UI won't do this (yet) because the JS greys out the cascade checkbox (that'll need to be fixed).

15 years agoFix log list regression and fix funky $allLogs case while at it
Aaron Schulz [Thu, 11 Dec 2008 21:34:15 +0000 (21:34 +0000)]
Fix log list regression and fix funky $allLogs case while at it

15 years agoMake 'ChangePassword' be the default name form for the password change form instead...
Brion Vibber [Thu, 11 Dec 2008 21:12:11 +0000 (21:12 +0000)]
Make 'ChangePassword' be the default name form for the password change form instead of ResetPass.
Since it's something we're sending people to with an actual UI, for general password changing, and no longer specific to by-email password *resets*, it's nicer to use the cleaner name.

15 years agoConsistency tweak: Add horizental line same as exists in Special:RecentChanges
Raimond Spekking [Thu, 11 Dec 2008 20:13:24 +0000 (20:13 +0000)]
Consistency tweak: Add horizental line same as exists in Special:RecentChanges

15 years agoSet focus
Aaron Schulz [Thu, 11 Dec 2008 19:52:56 +0000 (19:52 +0000)]
Set focus

15 years agoFix encoding
Alexandre Emsenhuber [Thu, 11 Dec 2008 19:11:11 +0000 (19:11 +0000)]
Fix encoding

15 years ago*Disabled hit counter
Aaron Schulz [Thu, 11 Dec 2008 18:59:11 +0000 (18:59 +0000)]
*Disabled hit counter
*Added 'overwrite' option

15 years agoReverting r44454 "(bug 14843) IRC should flag redirects with "R" like it does with...
Brion Vibber [Thu, 11 Dec 2008 18:44:51 +0000 (18:44 +0000)]
Reverting r44454 "(bug 14843) IRC should flag redirects with "R" like it does with bots, etc."
This doesn't work as intended; when editing existing articles, this'll pull the *previous* redirection state of the article, rather than the current state, so it's wrong whenever a page is changed into, or away from, being a redirect.

15 years agoSome more verbose output and fix infinite loop if you make the block size small :)
Brion Vibber [Thu, 11 Dec 2008 18:38:06 +0000 (18:38 +0000)]
Some more verbose output and fix infinite loop if you make the block size small :)

15 years ago(bug 14843) IRC should flag redirects with "R" like it does with bots, etc.
Chad Horohoe [Thu, 11 Dec 2008 17:42:49 +0000 (17:42 +0000)]
(bug 14843) IRC should flag redirects with "R" like it does with bots, etc.

15 years agoAdd a script to filecache content pages on the wiki
Aaron Schulz [Thu, 11 Dec 2008 14:35:33 +0000 (14:35 +0000)]
Add a script to filecache content pages on the wiki

15 years agoPull up and tweak filecache check to make it much faster and able to for request...
Aaron Schulz [Thu, 11 Dec 2008 14:29:16 +0000 (14:29 +0000)]
Pull up and tweak filecache check to make it much faster and able to for request to avoid a db hit if counters are off and job rate = 0

15 years agodocument SetupAfterCache hook ;)
Alexandre Emsenhuber [Thu, 11 Dec 2008 11:50:45 +0000 (11:50 +0000)]
document SetupAfterCache hook ;)

15 years agoReduce queries for pagesize thingy
Aaron Schulz [Thu, 11 Dec 2008 01:33:27 +0000 (01:33 +0000)]
Reduce queries for pagesize thingy

15 years agoMay as well set article ID in title
Aaron Schulz [Thu, 11 Dec 2008 01:28:37 +0000 (01:28 +0000)]
May as well set article ID in title

15 years agoFix this broken crap some more
Aaron Schulz [Thu, 11 Dec 2008 01:17:17 +0000 (01:17 +0000)]
Fix this broken crap some more

15 years agoRevert r44381 "Remove noisy profiling"
Brion Vibber [Thu, 11 Dec 2008 00:54:21 +0000 (00:54 +0000)]
Revert r44381 "Remove noisy profiling"
We... like profiling? :D

15 years agoRevert r44365 "Cleanup Title::getTouched()"
Brion Vibber [Thu, 11 Dec 2008 00:42:50 +0000 (00:42 +0000)]
Revert r44365 "Cleanup Title::getTouched()"
Rather than a cleanup, this rev seems to be adding a per-Title-object cache of page_touched. I'm a little leery of adding extra caches like this, particularly since it's not clear that it'll get consistently updated.

15 years agoRevert r44335 "Tweak profile calls"
Brion Vibber [Thu, 11 Dec 2008 00:29:37 +0000 (00:29 +0000)]
Revert r44335 "Tweak profile calls"
Let the doUpdates() func get counted even when it has nothing to do; otherwise stats will be skewed to only times when there are multiple updates. Or.... hmmm. bleah.

15 years agoRevert part of r44296 "*Skip autoloading of skin, always does inefficient strtolower...
Brion Vibber [Wed, 10 Dec 2008 23:39:02 +0000 (23:39 +0000)]
Revert part of r44296 "*Skip autoloading of skin, always does inefficient strtolower() stuff and fails (returns false) anyway" and r44302 "Tweak r44296: use autoloader if it is set there".
Unless there's some really huge overriding reason to do this, there's no point poking around in the autoloader's guts to try to outsmart it. Just let it take a few nanoseconds to check its array and don't add yourself a dependency on its implementation details.
If there *is* some really huge overriding reason to complicate the code, please provide some data supporting it.

15 years agoRevert r44292 "Assign by ref to make sure cache fields carry over"
Brion Vibber [Wed, 10 Dec 2008 23:29:43 +0000 (23:29 +0000)]
Revert r44292 "Assign by ref to make sure cache fields carry over"
This isn't PHP 4; the object's fields are changed on the object itself just fine. Unless people are changing the global variable $wgTitle to something different this should be fine. If there is a problem that this fixes, that's probably a problem itself and should be fixed in a cleaner way :D

15 years ago(bug 16589) CoreParserFunctions error causes 500
Aaron Schulz [Wed, 10 Dec 2008 23:27:25 +0000 (23:27 +0000)]
(bug 16589) CoreParserFunctions error causes 500

15 years agoRevert r44271 "(bug 12998) Weaken DISPLAYTITLE restictions (patch by 'rememberthedot...
Brion Vibber [Wed, 10 Dec 2008 23:21:28 +0000 (23:21 +0000)]
Revert r44271 "(bug 12998) Weaken DISPLAYTITLE restictions (patch by 'rememberthedot@gmail.com')"
Behavior seems a bit hard to predict, as far as what's going to go in the header and what in the browser window etc. Pulling it back for further testing and discussion.

15 years agoConfigure extension: With DB handler, defer wfConfigureSetup() to a new hook, SetupAf...
Andrew Garrett [Wed, 10 Dec 2008 23:15:50 +0000 (23:15 +0000)]
Configure extension: With DB handler, defer wfConfigureSetup() to a new hook, SetupAfterCache, which, as the name implies, is executed in Setup.php, after caches are initialised.
This avoids some weird issues with Configure and maintenance scripts.

15 years agoRevert r44257 "Use boolean searching with '?' char"
Brion Vibber [Wed, 10 Dec 2008 23:06:44 +0000 (23:06 +0000)]
Revert r44257 "Use boolean searching with '?' char"
Let's avoid making up our own syntax that nobody will know or think to try...
Lucene, Google, Yahoo!, and Windows Live search all understand "red OR lion" but see nothing special in "?red ?lion". If we're going to add it, let's make the OR thing work. :)

15 years agoRevert r44254 "Cleanup to wfGetNull(): * Add override in case /dev/null isn't accessi...
Brion Vibber [Wed, 10 Dec 2008 22:58:24 +0000 (22:58 +0000)]
Revert r44254 "Cleanup to wfGetNull(): * Add override in case /dev/null isn't accessible (bug 11009)"
Doesn't seem like a proper fix here... At best, this'll be dumping random crap to some random file unless the user has a local copy of the /dev/null device file, which seems.... wrong. :)
For anything generating command lines, it probably won't make any difference (assuming exec() is enabled at all!) since open_basedir won't be searching through the command line (I think).
Assuming the core use case actually happens (open_basedir is set, but proc_open() is available to run tidy), a more correct fix is probably to go ahead and read in stderr and toss the results, or maybe better pass it through to PHP's stderr FD instead of opening /dev/null ourselves. Tidy has a -q option which should suppress random "hi i'm tidy version XYZ" if it's currently present.

15 years agoAttempting to import a title that came out as an interwiki would sort of half-work...
Brion Vibber [Wed, 10 Dec 2008 22:41:13 +0000 (22:41 +0000)]
Attempting to import a title that came out as an interwiki would sort of half-work somewhere then explode when trying to save the null revision with the import info:
Fatal error:  Call to a member function insertOn() on a non-object in /Library/WebServer/Documents/trunk/includes/specials/SpecialImport.php on line 305

Now such titles are skipped. You can probably force import of the page by forcing the target namespace...

Better long-term solution might include title renormalization, adapation of remote namespace names (eg Wikipedia -> Project), etc.

15 years ago* API: (bug 16613) action=protect doesn't say when &cascade is set but cascading...
Roan Kattouw [Wed, 10 Dec 2008 22:39:41 +0000 (22:39 +0000)]
* API: (bug 16613) action=protect doesn't say when &cascade is set but cascading protection wasn't allowed
* Changed Article::updateRestrictions()'s $cascade parameter to a reference which is set to false if cascading protection isn't allowed
* Used this in ApiProtect
* Expand help message for &cascade a bit

15 years agoFollow-up to r44245, r44250 (comment field on Special:Import)
Brion Vibber [Wed, 10 Dec 2008 22:31:32 +0000 (22:31 +0000)]
Follow-up to r44245, r44250 (comment field on Special:Import)
Label now clickable for comment field on the transwiki form as well as the upload form; gave them both distinctive IDs.

15 years agoFollow-up to r44216/r44217 "Followup to r44204. Hardcoding image because it should...
Brion Vibber [Wed, 10 Dec 2008 22:07:04 +0000 (22:07 +0000)]
Follow-up to r44216/r44217 "Followup to r44204. Hardcoding image because it should (in theory) work always and forever. If you have a wiki acting as repo and you've overridden the canonical name Image: it's your own fault."
It was noted that the existing code could fail for unusual article path settings including a suffix if only the 'articleUrl' was available. Pretty corner case, and probably breaks a lot of other things, but who knows. :)
Went ahead and refactored this a bit to handle the case and feel a little cleaner to me...
Dropped the private getDescBaseUrl() method since this seems a little easier to handle directly in getDescriptionUrl() now.

15 years agoFix regression in Special:Ipblocklist caused by r43047 -- options arrays in show...
Brion Vibber [Wed, 10 Dec 2008 20:01:38 +0000 (20:01 +0000)]
Fix regression in Special:Ipblocklist caused by r43047 -- options arrays in show/hide links broken by being merged in the wrong order when moved from wfArrayMerge() to "+" operator.

15 years agoRevert r44119 "Remove extract() comment"
Brion Vibber [Wed, 10 Dec 2008 19:41:20 +0000 (19:41 +0000)]
Revert r44119 "Remove extract() comment"
extract() is pretty much the devil and shouldn't ever be used for safe, legible code because it makes it much more difficult to analyse the code -- you have to run around trying to track down the source of local variables and there's generally a lot of pain.
Removing the FIXME comment isn't a substitute for fixing it. ;)

15 years agoadd debug lines for UDP output so it can be more easily tested offline
Brion Vibber [Wed, 10 Dec 2008 18:49:16 +0000 (18:49 +0000)]
add debug lines for UDP output so it can be more easily tested offline

15 years agorevert r44412 and part of r44406: keep the improved new page URLs, but use the old...
Ilmari Karonen [Wed, 10 Dec 2008 18:41:28 +0000 (18:41 +0000)]
revert r44412 and part of r44406: keep the improved new page URLs, but use the old getInternalURL()/preg_replace() hack to generate them

15 years agoSeems r44406 would've broken the RC feed on secure.wikimedia org: fix by introducing...
Ilmari Karonen [Wed, 10 Dec 2008 17:03:57 +0000 (17:03 +0000)]
Seems r44406 would've broken the RC feed on secure.wikimedia org: fix by introducing a new config variable $wgRC2UDPScriptUrl (defaulting to $wgServer . $wgScript if not set).
NOTE: Wikimedia's secure.php needs to be updated to use the new variable.  It might be possible to retire the fixupSquidUrl() hack once this is done, though I'm not sure if anything else relies on it.

15 years ago(bug 4253, bug 16586) Don't repeat titles of new pages in URLs in the RC->IRC feed...
Ilmari Karonen [Wed, 10 Dec 2008 15:56:02 +0000 (15:56 +0000)]
(bug 4253, bug 16586) Don't repeat titles of new pages in URLs in the RC->IRC feed, use the shorter and more useful revision ID instead.
Also simplify URL construction: old code used to call Title::getInternalURL() to build the URLs and then undo most of the work with preg_replace().
(TODO: Maybe consider introducing new global $wgIRCLineURLPrefix to optionally override the $wgInternalServer.$wgScript prefix?)