Commit graph

548 commits

Author SHA1 Message Date
Alexandre Emsenhuber
5167cf4cad Fix for r41430: wfMsgExt() now accepts a Language object in the language key of $options 2008-09-30 17:15:11 +00:00
Tim Starling
dc935786a3 Hostnames are allowed to have dots in them 2008-09-30 08:45:52 +00:00
Tim Starling
c69d5d46e8 Proposed fix for bug 14944, specifically the reports that some servers do not have en_US.UTF-8. Make the locale configurable via $wgShellLocale. Detect available locales and set $wgShellLocale to an appropriate value on install. Also fixes safe_mode putenv() warnings. RELEASE-NOTES entry will go to 1.13. 2008-09-29 10:19:11 +00:00
Aryeh Gregor
695161a6f1 Fix totally broken last commit, misread the existing code 2008-09-26 21:35:03 +00:00
Aryeh Gregor
3fe917dc68 Remove unnecessary conditional 2008-09-26 21:31:17 +00:00
Aryeh Gregor
82d21903e6 Fix for 41288, don't raise errors for language parameter
The documentation didn't make it clear that the wfMsgExt() array can take a single associative parameter.  I've clarified this, and fixed error-checking for that.  Also adjusted indentation in the comment for clarity (one space isn't enough).
2008-09-26 21:31:10 +00:00
Aryeh Gregor
70f83843e0 Raise E_USER_WARNING if bad option passed to wfMsgExt() 2008-09-26 17:25:17 +00:00
Tim Starling
80a610618c Fix unnecessary GlobalFunctions.php bloat from r41148 2008-09-24 08:36:44 +00:00
Tim Starling
aab518cf78 * Add a simple log demultiplexer, written in python, for low-volume MediaWiki logs
* in wfErrorLog(): clean up log text so that it works properly with the multiplexer
2008-09-24 08:17:35 +00:00
Tim Starling
b77387ca89 Implemented UDP logging. 2008-09-24 07:11:41 +00:00
Aaron Schulz
9894dfb363 Refactor RC2UDP code some 2008-09-22 12:22:18 +00:00
Tim Starling
9b8782aaa8 Don't run hour-long, unlimited row-count DB queries with set_time_limit(0) in response to unauthenticated web requests on the master. Run them on the slave instead. Maybe we can crash the whole cluster instead of just a master or two.
Don't use DB_LAST, ever again.
2008-09-20 15:00:53 +00:00
Brion Vibber
37dded29d1 Revert r40953 '(bug 7509) Don't hardcode separation strings, make them configurable'
This seems to make code much uglier and harder to maintain -- there are a bajillion new calls to "wfMsgExt( 'pipe-separator' , 'escapenoentities' )" which is not trivial or easy to remember. This makes code uglier, harder to read, harder to maintain, and more prone to error.
2008-09-18 17:11:51 +00:00
Siebrand Mazeland
0057d58e09 (bug 7509) Don't hardcode separation strings, make them configurable
* Introduced message 'pipe-separator' to replace many occurrence of " | ". No changes made in skin "Nostalgia".
2008-09-17 09:41:51 +00:00
Brion Vibber
11132c0edb * (bug 10463) Apply $wgRenderHashAppend to sitenotice cache keys so SSL and non-SSL sites get separate notice caches.
This seems to be a little funny, though, at least on commons -- the commonswiki:sitenotice:https=1 key is just storing 'false' so it presumably gets reparsed on each run. I can't see any way that this should be happening, which is a little intimidating...
2008-09-16 21:14:25 +00:00
Tim Starling
a549004e6d In wfDebugLog(): log the hostname if $wgShowHostnames is true. Cache the hostname. 2008-09-05 03:46:07 +00:00
Tim Starling
a76bedb1a8 In wfShellExec(), log return code 127 to a special log file, to check for missing executables on the Wikimedia cluster. 2008-09-05 03:32:09 +00:00
Tim Starling
fde6099061 header() replaces by default, there's no need to pass a second parameter 2008-09-01 04:32:36 +00:00
Antoine Musso
8ec6021ab7 wfDebugMem() to report memory usage 2008-08-28 16:22:10 +00:00
Greg Sabino Mullane
2f217035e2 Once we reset, no need to keep looping. 2008-08-28 14:18:13 +00:00
Aaron Schulz
d1902b0d39 Set replace flag for headers 2008-08-27 20:44:43 +00:00
Andrew Garrett
5a2a85a1b4 *ahem* self-revert. Something weird happened with getAll() 2008-08-20 14:12:52 +00:00
Andrew Garrett
4b5d8c21a8 Use a nice fancy deep-merge function for merging arrays in SiteConfiguration (newly written), and move the merging of config options and globals deeper into get(), so we don't need to duplicate the same functionality in the entry points. 2008-08-20 14:08:50 +00:00
Aryeh Gregor
c7a50892d6 Re-committing 37663 for the new release, per old Wikitech-l discussion.
* (bug 13815) In the comment for page moves, use the colon-separator message instead of a hardcoded colon.
* So that this works properly, don't escape HTML entities in edit summaries.  I don't see any good reason for them to be escaped there.  Of course, this may result in old edit summaries displaying slightly differently if for some reason they included an entity, but in that case there's at least a 50% chance that they intended it to not be escaped in the first place.
2008-08-18 18:15:47 +00:00
Aryeh Gregor
6b1a9d4e4e Unescape more "safe" characters when producing URLs, for added prettiness. Checked against RFC 1738; should cause no problems if wfUrlencode() is only applied to bits of the URL after the domain name. And if it is applied to the domain name or protocol as well, this is probably less broken, if anything, not more, since hex escapes aren't permitted in the domain name or protocol part. 2008-08-08 15:45:52 +00:00
Fran Rogers
851eaecd50 Wrapped certain tricky constructs in @cond/@endcond to prevent Doxygen
from choking on them and segfaulting.
2008-08-06 03:55:49 +00:00
Aryeh Gregor
81d611bcac Re-commit turning makeKnownLinkObj(), makeBrokenLinkObj(), makeLinkObj() into link() wrappers. This should mean that all link processing now goes through link(). Per Brion's advice, remove the BrokenLink hook and replace it with LinkBegin and LinkEnd hooks. All parser tests pass except the usual suspects. 2008-08-05 17:05:59 +00:00
Aryeh Gregor
280afa8af2 Last commit contained errors. Revert most of it, keep only the tweaks to link() itself (and relevant parser test changes). 2008-08-03 17:05:17 +00:00
Aryeh Gregor
b83553af8b * Output title before class in Linker::link() to match behavior of makeLink() and friends, so as not to have to change old parser tests.
* Do not add action=edit to nonexistent special pages.
* Add profiling point for the bit where we add classes in linkAttribs().
* Turn makeLinkObj(), makeKnownLinkObj(), makeBrokenLinkObj() into wrappers for link().  This requires the creation of two new functions to turn query strings/attribute strings into arrays, but still results in fewer LOC (-11 lines) due to less code duplication.  This should be well-tested by the parser tests, because pretty much all link creation now goes through link(), but the only changes are encoding single quotes in attributes, which is a good change.  I find no additional database queries, so since this isn't a CPU bottleneck, there should be no performance issues.
2008-08-03 16:52:55 +00:00
Alexandre Emsenhuber
a4cfa79ea8 * factorize common code
* allow to pass directly a Language object
2008-07-26 20:41:52 +00:00
Chad Horohoe
9ec4162d33 Add some docs on how far back wfLoadExtensionMessages() goes 2008-07-25 13:39:00 +00:00
Alexandre Emsenhuber
e66e5e2416 Use the internal diff engine if the diff excutable is not found 2008-07-21 16:24:39 +00:00
Brion Vibber
b006e95852 Cleanup for r37830 & earlier ($wgDirectoryMode default to wfMkdirParents()):
Just check is_null() here. is_int() isn't necessarily safe, as numbers frequently get passed around in what are really strings. :)
2008-07-19 07:29:43 +00:00
Chad Horohoe
65517fd5ff $wgDefaultDirectoryChmod -> $wgDirectoryMode. Less crappy name + docs I should've written on the original commit. 2008-07-18 18:03:50 +00:00
Alexandre Emsenhuber
335b860fb5 fix in debug output 2008-07-17 16:55:21 +00:00
Andrew Garrett
34ba79f969 Fix handling of non-unified diffs in wfDiff 2008-07-17 12:30:40 +00:00
Andrew Garrett
d1e81fec8b Add wfDiff function, similar to wfMerge (some copied), used in AbuseFilter extension to generate a line-by-line machine-readable diff between two texts. Shells out to diff utility. 2008-07-17 12:19:51 +00:00
Chad Horohoe
21a76ba181 Add $wgDefaultDirectoryChmod, allows customizing the default chmod value. Set to 0777 by default to keep current behavior. 2008-07-16 18:36:40 +00:00
Brion Vibber
f9a9047219 Revert r37663 for now:
"* (bug 13815) In the comment for page moves, use the colon-separator message instead of a hardcoded colon."
"* So that this works properly, don't escape HTML entities in edit summaries.  I don't see any good reason for them to be escaped there.  Of course, this may result in old edit summaries displaying slightly differently if for some reason they included an entity, but in that case there's at least a 50% chance that they intended it to not be escaped in the first place."

This breaks the ability to easily discuss entities in summaries such as "add  ".
2008-07-15 21:13:34 +00:00
Aryeh Gregor
32e0e290a6 * (bug 13815) In the comment for page moves, use the colon-separator message instead of a hardcoded colon.
* So that this works properly, don't escape HTML entities in edit summaries.  I don't see any good reason for them to be escaped there.  Of course, this may result in old edit summaries displaying slightly differently if for some reason they included an entity, but in that case there's at least a 50% chance that they intended it to not be escaped in the first place.
2008-07-14 21:43:27 +00:00
Brion Vibber
4aedae2126 Revert r37567 for nwo ("(bug 8604) padright: and similar functions fail with non-ASCII arguments")
This implements an mb_str_pad fallback function, but there is no mb_str_pad in PHP documentation, and the doc comments are really weird -- it says it returns an integer!
If this function is created from whole cloth and doesn't exist in PHP, it should be given a MediaWiki style name and not be done with a function_exists check as though it were a compat function.
2008-07-12 14:05:04 +00:00
Niklas Laxström
9ba65533b5 * (bug 8604) padright: and similar functions fail with non-ASCII arguments 2008-07-11 18:08:18 +00:00
Aryeh Gregor
12b4eba6ef Revert r37299. It's causing some extremely strange behavior that I can't pin down. Try copying the text =={{[[Navbox]]}}== into a page, where [[Template:Navbox]] is copied from enwiki. An exhibit is up at <http://en.wikipedia.org/wiki/User:Simetrical/Tl_test> until this fix goes live. This was reported at <http://en.wikipedia.org/wiki/Wikipedia:Village_pump_(technical)#Problem_with_.7B.7Btl.7D.7D_in_section_headers> by CapitalR; thanks to RockMFR for tracking down the revision that was causing it.
As a general rule, it would be a good idea to first split the functions off into their own file without changing them, and then refactor them in a separate commit.  Otherwise it's very hard to follow what's actually being changed.  (git actually tracks changes to functions when they're moved across files, incidentally, which is quite awesome.)
2008-07-10 19:18:00 +00:00
Victor Vasiliev
0c6e06d583 Fix previous commit (removed accidentally commited wfVarDump change + whitespace fix) 2008-07-10 08:32:34 +00:00
Victor Vasiliev
b9c4d8d7a7 * (bug 14772) Disallow moving images to invalid titles 2008-07-10 08:16:58 +00:00
Brion Vibber
1fd0e2db0c Revert r37443 for the moment:
* Code duplication of validity checks between wfIsValidFileName() and UploadForm::internalProcessUpload() -- this guarantees behavior will become inconsistent over time. Move the normalization into a single place.
* The additional chars excluded for Windows don't cover the entire set of illegal chars. There are several more punctuation characters, plus general issues such as all non-ASCII characters.
* Application of filesystem rules based on OS could result in strange inconsistent behavior; alternate filestore backends could support different sets of legal characters.
* No clear reason for the change to wfVarDump(); var_export works just fine and doesn't use the fragile output buffering
2008-07-10 04:47:25 +00:00
Victor Vasiliev
e7487c0789 * Forbid files with * and ? to be uploaded under Windows (it caused internal errors since such characters are illegal there)
* Forbid files to be moved to invalid filenames
* wfVarDump() should use var_dump(), not var_export()
2008-07-09 21:11:08 +00:00
Niklas Laxström
60f3e72328 * Move message functions to own file
* Improve documentation
* Reduce code duplication
* Fix the braindamage that wfMsg and friends were doing transform, but in the wrong language
2008-07-08 08:05:54 +00:00
Ryan Schmidt
a070873551 * Add new hook NormalizeMessageKey to allow extensions to change what system message is being shown before any queries are made 2008-07-07 22:37:42 +00:00
Brion Vibber
c0edae192b Revert r37281 "Split Compatibility functions to own file"
This would make maintenance harder by duplicating information between GlobalFunctions.php and CompatibilityFunctions.php. If you forget to add a function to the list, the compat functions might not get loaded and you'll run into surprise errors.
2008-07-07 20:15:16 +00:00