Commit graph

1000 commits

Author SHA1 Message Date
Alexandre Emsenhuber
352cbb523e Per Nikerabbit and Siebrand: removed $skinNames from localisation files and replaced them with messages. Messages names are "skinname-<skin>" where <skin> is the internal name of the skin.
Updates for other languages should come soon :)
2008-12-25 18:00:26 +00:00
Niklas Laxström
f05ca8373b * No need to use is_null here 2008-12-24 15:05:44 +00:00
Brion Vibber
c672ce6032 * (bug 505) Time zones can now be specified by location in user preferences,
avoiding the need to manually update for DST. Patch by Brad Jorsch.
2008-12-22 21:55:09 +00:00
Brion Vibber
920eb84f1f * (bug 15027) Internet domain names and IP addresses can now be indexed and searched sensibly with the default MySQL search backend.
Previously things like "192.168.1.1" couldn't be searched very cleanly in the MySQL backend for two reasons:
* First, the periods were stripped out. This resulted in it being broken into multiple short words: "192 168 1 1", leading at best to false positives and general weirdness.
* Second, for IP addresses these were shorter than the default minimum word length of 4 and thus didn't even get indexed!

The addition of padding for short words let them at least get indexed, but they still didn't turn up cleanly due to the word split. Now allowing periods through to the indexed text, and encoding periods that appear within a compound word so they get caught more cleanly.

Also made a tweak so highlighting works a bit better on word boundaries -- eg "192.168.1.1" no longer hits a highlight match for "192.168.1.100". However it's still not 100% handling some cases with the periods. Sigh.
2008-12-19 01:50:07 +00:00
Brion Vibber
432372fd46 Throw in $wgEnableSerializedMessages which I can disable on test wikipedia so it'll now show up to date messages. Yay! 2008-12-11 22:20:26 +00:00
Brion Vibber
a418ead5d7 Let's try limiting the language object cache... see if that fixes our problem with centralnotice all-languages preview running out of ram 2008-11-25 19:38:22 +00:00
Brion Vibber
7ebf0e431b * (bug 5477) Searches for words less than 4 characters now work without
requiring customization of MySQL server settings

Short words are padded so they now get indexed. Yay!

Adapted part of Werdna's patch, with some additional cleanup:
* Using 'U00' to pad instead of 'SMALL' to reduce false positives (eg search for "small*" could match "Smallville" and "SMALLc")
* Checking server's ft_min_word_len variable to see if we need to do anything. This preserves index compatibility with existing installations which have customized their index length.
* Some further cleanup on redundant code -- just toss everything through lc() and be done with it :D
* Cleaned out some more evals in zh and yue classes :P
* Fixed yue class to call the parent adjustor properly
2008-11-25 02:39:06 +00:00
Siebrand Mazeland
907433aeca Remove fixed characters (spaces and comma) from listToText().
* Updated message 'and' for all languages to keep behaviour the same, no change for 'ksh' (wanted behaviour), changed 'en' (trailing comma).
* Added message 'word-separator' as optional message. Just a space for all languages at the moment.
2008-11-21 00:05:24 +00:00
Tim Starling
61633a942b Fixed fallback feature broken by r43398. 2008-11-12 00:11:10 +00:00
Tim Starling
49ef4c23a2 Language object cache, for faster wfMsg() performance with unusual languages, and hopefully less memory. Committing for test on server. 2008-11-11 23:26:07 +00:00
Tim Starling
2b4c3cd654 * Rewrote wfArrayMerge() in terms of array plus
* Two callers of wfArrayMerge() were bugs, both assuming strange and complex behaviour in wfArrayMerge() which has never been present or documented.
* Introduced wfMergeErrorArrays() to remove duplicates from merged error arrays, e.g. from getUserPermissionsErrors().
* Rewrote the remaining callers of wfArrayMerge() to use array plus. It makes the code clearer, assuming the reader knows more about basic PHP operators than GlobalFunctions.php. Considering the two bugs discussed above, this seems like a fair assumption. If you don't know PHP, you shouldn't be writing MediaWiki code.
2008-11-01 23:20:25 +00:00
Raimond Spekking
63e88fdcbb * (bug 15717) Set $separatorTransformTable for language 'eu'
* Fixes reference to the no longer present LanguageIs.php on Language.php
2008-10-17 20:06:37 +00:00
Alexandre Emsenhuber
67740ef9cb Tweak for r41431: also use wfMsgExt() in Language::getMessageFromDB() 2008-09-30 19:03:22 +00:00
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
Chad Horohoe
a11a33f787 * Add $forContent option to Language::commaList
* Add pipeList() for similar lists separated by pipes
* More docs.
2008-09-30 16:24:23 +00:00
Brion Vibber
5127e19626 Revert r41352-41355, r41362-41363: unauthorized schema change breaks parser tests 2008-09-30 00:07:04 +00:00
Victor Vasiliev
bec6903108 * (bug 674) Allow users to be blocked from editing a specific article
** Also supports blocking user from editing whole namespace
* Replace ugly ipboptions parsing code in Title.php with a simple message

Requires schema change (I showed it to Tim Starling).
2008-09-28 16:08:18 +00:00
Chad Horohoe
ffa1bd425f Cleanup to r41041. escape-noentities => escapenoentities 2008-09-19 19:06:57 +00:00
Brion Vibber
716dafe9e6 Quickie example adding $wgLang->commaList() to encapsulate use of 'comma-separator' message.
Fixme: being in a hurry, I didn't make it work correctly for non-UI languages. It should grab from the appropriate lang, not just wfMsgExt.
2008-09-19 18:47:47 +00:00
Siebrand Mazeland
798f535951 * Fix common spelling error (seperate -> separate) 2008-09-15 20:38:27 +00:00
Tim Starling
fab46da1eb Minus one is plural in English. 2008-09-03 03:54:38 +00:00
Tim Starling
350b498b9f * Revert back to my parser pseudo-branch again. Note: if you feel like reverting this, reverting Parser.php alone to r40010 will work just fine.
* Merged replaceFreeExternalLinks() with doMagicLinks(). Makes a lot of sense, very similar operations, doesn't break any parser tests. Stops free links from interacting with other parser stages, the same way ISBN links don't. 
* The pass order change fixes Brion's complaint in r39980. Early link expansion, triggered by having more than 1000 links in the page, was outputting URLs which were destroyed by RFEL. Added parser test.
* Fixed an unrelated bug in LinkHolderArray::replace(): if a link to a redirect appears in two separate RLH calls, the second and subsequent calls do not add the mw-redirect class. Caused by an unmigrated LinkCache fetch.
* Added a parser test for a pass interaction bug that the pass order change fixes.
* The fuzzer told me to tell you that free external links in non-caption image parameters, which are and have always been invisible, are now not registered either.
* Miscellaneous supporting updates to the test infrastructure.
2008-08-26 14:37:15 +00:00
Brion Vibber
c83882e96e Revert r39949 "* Revert revert r39662 of my parser changes."
Causes weird regressions on http://meta.wikimedia.org/wiki/Talk:Spam_blacklist
Couldn't isolate to a parser test in a few minutes; some kind of template interaction perhaps.

Sample bad HTML like:
The associated page is used by the Mediawiki <a href="&lt;a href=" class="external free" title="http://www.mediawiki.org/wiki/Extension:SpamBlacklist" rel="nofollow">http://www.mediawiki.org/wiki/Extension:SpamBlacklist</a>" class="extiw" title="mw:Extension:SpamBlacklist"&gt;Spam Blacklist extension, and lists strings of text that may not be used in URLs in any page in Wikimedia Foundation projects (as well as many external wikis). Any meta <a href="/wiki/Administrator" title="Administrator">administrator</a> can edit the spam blacklist. There is also a more aggressive way to block spamming through direct use of <a href="/wiki/Anti-spam_features#.24wgSpamRegex" title="Anti-spam features">$wgSpamRegex</a>. Only <a href="/wiki/Developers" title="Developers" class="mw-redirect">developers</a> can make changes to $wgSpamRegex, and its use is to be avoided whenever possible.
2008-08-25 22:19:50 +00:00
Alexandre Emsenhuber
05b0fbd558 (bug 15303) Title conversion for templates wasn't working in some cases 2008-08-25 18:06:54 +00:00
Tim Starling
ccacba9f3a * Revert revert r39662 of my parser changes.
* Fixed image link whitespace handling (Brion's complaint, r39662)
* Added fuzz test capability to parserTests.php
* Added __destruct() functions to Parser and Language, and called them explicitly from parserTests.inc, to avoid unconstrained memory usage during fuzz testing.
* Added unified diff to output of Parser_DiffTest
* Fixed whitespace change in Parser::doTableStuff() (found by fuzzing)
* Added feature to RELEASE-NOTES which I'd committed last time but forgotten to note: <gallery> will accept image names with no "Image:" prefix (rediscovered by fuzzing)
* Limit memory usage in Title::getInterwikiLink()
* Fixed chronic fail of all interwiki link parser tests (hid Siebrand's complaint, r39464)
* Fixed chronic fail of one of the LanguageConverter parser tests. Was actually an ignored bug.
2008-08-25 16:08:19 +00:00
Aaron Schulz
3ea68e2fc6 be more specific in error 2008-08-18 03:30:36 +00:00
Niklas Laxström
5b9c3cc844 * More helpful error messages 2008-08-12 10:14:09 +00:00
Rotem Liss
0920a8ba42 Fixing comment of Language::tsToHebrew: Month 1 is Tishrei. 2008-08-06 20:06:22 +00:00
Aryeh Gregor
9b11ddad12 Document what the month number means for Language::tsToHebrew(). 2008-08-04 00:53:13 +00:00
Niklas Laxström
30febddb2c * (bug 11732) Allow localisation of edit button images 2008-07-04 10:34:41 +00:00
Niklas Laxström
34a888e161 * $code may be undefined, because it is defined inside the loop above, don't use it 2008-06-25 15:14:41 +00:00
Niklas Laxström
e364855c37 * Partially revert 36631, can't use this 2008-06-25 13:50:46 +00:00
Niklas Laxström
3c43d81af5 * Handle fallbacks too in extension aliases 2008-06-25 11:23:34 +00:00
Niklas Laxström
530ec5d524 * $wgExtensionAliasesFiles option to simplify adding aliases for special pages provided by extensions 2008-06-25 10:59:22 +00:00
Robert Leverington
ad21ca8009 * Correct fix, remove if that should have been replaced. 2008-06-19 16:14:48 +00:00
Robert Leverington
b04dfb9d25 * Improve indentation.
* Remove excess tabs.
* Fix syntax error.
2008-06-19 15:18:48 +00:00
Meno25
9034f66255 Add support for Higri (Islamic) calendar
Patch by AhmadSherif
2008-06-19 14:46:50 +00:00
Niklas Laxström
bd490dfbff * Fix redundant assignment 2008-06-03 20:15:16 +00:00
Tim Starling
f3bffd7ca9 Revert r35478, r35264, r35262: $wgPerLanguageCaching feature. Bug found with $wgPerLanguageCaching=false. Nikerabbit, please see me for a detailed code review. 2008-06-01 03:27:48 +00:00
Robert Leverington
4808158b9b * Language::getFallbackFor() now returns 'en' when the passed language does not exist, rather than bool(false).
* Remove excess tab from end of one line.
Patch by Nike.
2008-05-27 09:19:24 +00:00
Niklas Laxström
0f5e68b417 * New option $wgPerLanguageCaching, for wikies with many translated system messages in MediaWiki namespace.
* Sidebar is now cached for all languages
2008-05-23 22:14:32 +00:00
Alexandre Emsenhuber
b5debc4f65 Doc tweaks:
* @ingrouo -> @ingroup (whoops!)
* Fix doxygen warnings
* Remove duplicate definition of $wgMetaNamespaceTalk in DefaultSettings.php, thanks to VasilievVV for pointing this out
2008-05-21 18:18:58 +00:00
Alexandre Emsenhuber
087a9f70c5 WARNING: HUGE COMMIT
Doxygen documentation update:
* Changed alls @addtogroup to @ingroup. @addtogroup adds the comment to the group description, but doesn't add the file, class, function, ... to the group like @ingroup does. See for example http://svn.wikimedia.org/doc/group__SpecialPage.html where it's impossible to see related files, classes, ... that should belong to that group.
* Added @file to file description, it seems that it should be explicitely decalred for file descriptions, otherwise doxygen will think that the comment document the first class, variabled, function, ... that is in that file.
* Removed some empty comments
* Removed some ?>

Added following groups:
* ExternalStorage
* JobQueue
* MaintenanceLanguage

One more thing: there are still a lot of warnings when generating the doc.
2008-05-20 17:13:28 +00:00
Brion Vibber
3dda804bd6 * (bug 1701) Korean Hangul syllables now broken down properly in Category lists even if the wiki's overall content language is not Korean
Nothing else left in LanguageKo class, so ditching it.
2008-05-19 20:20:33 +00:00
Niklas Laxström
aabf9dead4 * Use local cache as well, this might be called a lot in certain circumstances 2008-05-10 12:55:59 +00:00
Robert Leverington
ea37286fc1 * Add exception if magicWords array is empty. 2008-05-05 14:33:00 +00:00
Niklas Laxström
4407633053 * Really fix fallbacks
Apparently $wgMemc->get can return either FALSE or NULL on failure, depending on the cache engine used... blah
2008-05-02 16:04:06 +00:00
Shinjiman
f6112c7709 Partially reverting r33937, the localisation message fallback for extensions were not used. 2008-05-02 15:36:15 +00:00
Niklas Laxström
ace68fbca5 * Shortcut the known and most common case 2008-04-27 14:55:15 +00:00
Niklas Laxström
a2a69d487d * Fix the previous commit 2008-04-27 14:49:40 +00:00