aboutsummaryrefslogtreecommitdiffstats
path: root/includes/collation
Commit message (Collapse)AuthorAgeFilesLines
...
* Add missing public visibility on some methodsUmherirrender2020-05-082-3/+3
| | | | | | RSSFeed::formatTime and AtomFeed::formatTime are private Change-Id: I6bf081c31c92e7130ae0ae527ba4a8f4635c7de2
* docs: Hook interface doc comment reviewapaskulin2020-04-211-4/+6
| | | | | | | | Edited doc comments for hook interfaces to improve consistency and add type hints. Bug: T246855 Change-Id: I38fa802463cd6f39bf5946dbbeb1b3ebaea604b2
* Automatically generated hook interfacesTim Starling2020-04-201-0/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Add hook interfaces which were generated by a script which parses hooks.txt and identifies caller namespaces and directories. Hook interfaces are mostly placed in a Hook/ subdirectory relative to the caller location. When there are callers in multiple directories, a "primary" caller was manually selected. The exceptions to this are: * The source root, maintenance and tests, which use includes/Hook. Test hooks need to be autoloadable in a non-test request so that implementing test interfaces in a generic handler will not fail. * resources uses includes/resourceloader/Hook * The following third-level subdirectories had their hooks placed in the parent ../Hook: * includes/filerepo/file * includes/search/searchwidgets * includes/specials/forms * includes/specials/helpers * includes/specials/pagers Parameters marked as legacy references in hooks.txt are passed by value in the interfaces. Bug: T240307 Change-Id: I6efe2e7dd1f0c6a3d0f4d100a4c34e41f8428720
* doxygen: Changed Doxygen tags causing warnings during documentation generationHolger Knust2020-04-142-3/+3
| | | | | | | | | | | Updated Doxygen markup in several .php files triggering warnings when mwdocgen.php is executed. Removed obsolete settings MSCGEN_PATH and TCL_SUBST from Doxyfile. The former would generate a warning in 1.8.16 while TCL support was removed in 1.8.18. Since TCL_SUBST was blank anyway, it was removed prior to getting to .18 in production. Increased DOT_GRAPH_MAX_NODES from 50 to 200 since Doxygen complained about it being too low for API and Maintenance. Bug: T248706 Change-Id: I9c67f0807d1b43089d351263d4f591dee5501f36
* collation: Add 64-67 ICU->Unicode mappingsReedy2020-03-211-0/+4
| | | | | | 67 not released yet, but due next month according to schedule Change-Id: I3dedc025e9800bc46040fc606af2b16eb52841a0
* Avoid PHP scalar type juggling in includes/ (part 2)Daimona Eaytoy2019-12-301-1/+1
| | | | | | Continuation of e5444ea55a8000f0040. Change-Id: I9f95e7de4e219dee3abcdd210bb708d949f378d0
* Remove Language::factory and getParentLanguage useAryeh Gregor2019-10-275-5/+17
| | | | Change-Id: I11f8801ef47ec1a1f63d840116e69667e6f3ae3c
* Declare dynamic propertiesDaimona Eaytoy2019-09-141-0/+3
| | | | | | | | This is for classes with a single undeclared property - aside from BlockManager: I3f51fd3579514b83b567dfe20926df2f0930dc85 removed the declaration of $permissionManager without actually removing all uses. Change-Id: Ic2a95f77071312041be6e0633ea9b5325e98de42
* Remove several methods, deprecated in 1.32Derick Alangi2019-05-091-17/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I've checked and doubled checked that these methods are no longer used anywhere in core or extensions, hence removed them. They were hard deprecated in MediaWiki 1.32. * OutputPage: ** `::showFileCopyError()` ** `::showFileRenameError()` ** `::showFileDeleteError()` ** `::showFileNotFoundError()` * ApiBase: ** `::truncateArray()` * IcuCollation: ** `::getICUVersion()` * HTMLForm: ** `::setSubmitProgressive()` * ResourceLoaderStartUpModules: ** `::getStartupModules()` ** `::getLegacyModules()` * BaseTemplate: ** `::msgHtml()` * QuickTemplate: ** `::msgHtml()` * WatchAction: ** `::getUnwatchToken()` Bug: T220656 Change-Id: Ic1a723a991f4ff63fcb5f045ddcda18d1f8c3c68
* Collapse some nested if statementsReedy2019-04-041-9/+7
| | | | Change-Id: I9a97325d738d09370d29d35d5254bc0dadc57ff4
* collation: Use `self` to reference same class instead of class nameDerick Alangi2019-03-201-1/+1
| | | | | | | | With the use of `self`, even if the class name is changed (which is very unlikely), then the code won't break. So it's a way of future proofing the code. Change-Id: Ib4046315b8aaee2e77af036893924962d25ceeb1
* Make uca-tr use I as uppercase of dotless ı instead of reverseBrian Wolff2019-02-201-1/+2
| | | | | | | The primary collision resolution makes wrong choice Bug: T203158 Change-Id: Id677476937cc6575950496767b50c1e8c21f2fbc
* collation: Fix non-canonical order of elementsDerick Alangi2019-01-111-1/+1
| | | | Change-Id: Ie3f19e9e1f91faf6cee32c3c63d86215ba52c8e2
* Add ICU mapping for versions 62 and 63Reedy2018-10-181-0/+2
| | | | Change-Id: I5e1238e856d4149c30806e6b2cb3619c0c9c1dbf
* Write Latin and other scripts with captial letterFomafix2018-10-051-2/+2
| | | | Change-Id: I16c660e54191b63cd6eb3407cb00504665930c4e
* Remove xx-uca-et collation workaroundPikne2018-09-113-63/+1
| | | | | | | Remove workaround introduced in I3e8031b9. No longer needed. Bug: T202977 Change-Id: I39921ef83cddc33535b99bd9c0b75f8afb52ea9a
* Merge "collation: Move first-letters-root to includes/collation/data"jenkins-bot2018-08-142-6/+14759
|\
| * collation: Move first-letters-root to includes/collation/dataTimo Tijhof2018-08-012-6/+14759
| | | | | | | | | | | | | | | | | | | | | | For consistency with other data files. Also, like the other data files: * For automated fetching of the Unicode files, move the steps from Makefile to a bash script. * Switch to a static array file format. Change-Id: If07487950a270283b8eaeda9a507e723ed2d89c4
* | Mass conversion of $wgContLang to serviceAryeh Gregor2018-08-113-7/+9
| | | | | | | | | | | | | | Brought to you by vim macros. Bug: T200246 Change-Id: I79e919f4553e3bd3eb714073fed7a43051b4fb2a
* | Remove special collation for Northern Samijhsoby2018-08-072-85/+0
|/ | | | | | | | | | This removes the special collation for Northern Sami that was added in 396007, when UCA support for Northern Sami was not yet in MediaWiki. Now it is, so this is no longer needed. Bug: T182431 Change-Id: I760eb7ae8bf92f0ac93b5fca5cb69148a28d8f6f
* Use PHP 7 '??' operator instead of if-then-elseFomafix2018-06-121-5/+1
| | | | Change-Id: I790b86e2e9e3e41386144637659516a4bfca1cfe
* Use PHP 7 "\u{NNNN}" Unicode codepoint escapes in string literalsBartosz Dziewoński2018-06-041-18/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In cases where we're operating on text data (and not binary data), use e.g. "\u{00A0}" to refer directly to the Unicode character 'NO-BREAK SPACE' instead of "\xc2\xa0" to specify the bytes C2h A0h (which correspond to the UTF-8 encoding of that character). This makes it easier to look up those mysterious sequences, as not all are as recognizable as the no-break space. This is not enforced by PHP, but I think we should write those in uppercase and zero-padded to at least four characters, like the Unicode standard does. Note that not all "\xNN" escapes can be automatically replaced: * We can't use Unicode escapes for binary data that is not UTF-8 (e.g. in code converting from legacy encodings or testing the handling of invalid UTF-8 byte sequences). * '\xNN' escapes in regular expressions in single-quoted strings are actually handled by PCRE and have to be dealt with carefully (those regexps should probably be changed to use the /u modifier). * "\xNN" referring to ASCII characters ("\x7F" and lower) should probably be left as-is. The replacements in this commit were done semi-manually by piping the existing "\xNN" escapes through the following terrible Ruby script I devised: chars = eval('"' + ARGV[0] + '"').force_encoding('utf-8') puts chars.split('').map{|char| '\\u{' + char.ord.to_s(16).upcase.rjust(4, '0') + '}' }.join('') Change-Id: Idc3dee3a7fb5ebfaef395754d8859b18f1f8769a
* Use PHP 7 '<=>' operator in 'sort()' callbacksBartosz Dziewoński2018-05-301-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | `$a <=> $b` returns `-1` if `$a` is lesser, `1` if `$b` is lesser, and `0` if they are equal, which are exactly the values 'sort()' callbacks are supposed to return. It also enables the neat idiom `$a[x] <=> $b[x] ?: $a[y] <=> $b[y]` to sort arrays of objects first by 'x', and by 'y' if they are equal. * Replace a common pattern like `return $a < $b ? -1 : 1` with the new operator (and similar patterns with the variables, the numbers or the comparison inverted). Some of the uses were previously not correctly handling the variables being equal; this is now automatically fixed. * Also replace `return $a - $b`, which is equivalent to `return $a <=> $b` if both variables are integers but less intuitive. * (Do not replace `return strcmp( $a, $b )`. It is also equivalent when both variables are strings, but if any of the variables is not, 'strcmp()' converts it to a string before comparison, which could give different results than '<=>', so changing this would require careful review and isn't worth it.) * Also replace `return $a > $b`, which presumably sort of works most of the time (returns `1` if `$b` is lesser, and `0` if they are equal or `$a` is lesser) but is erroneous. Change-Id: I19a3d2fc8fcdb208c10330bd7a42c4e05d7f5cf3
* Follow-up If8dfdaf1: Hard-deprecate, drop two uses, other pre-5.3 ↵James D. Forrester2018-05-241-0/+1
| | | | | | back-compat code Change-Id: I1c5eee3fe30d6687d88e07011a3d40b6770d0daf
* Merge "Add unicode mapping for ICU 60 and 61"jenkins-bot2018-05-241-0/+2
|\
| * Add unicode mapping for ICU 60 and 61Reedy2018-05-241-0/+2
| | | | | | | | Change-Id: Ifbbc8d7ecc788bc2c6b07a8ebba46a9648545786
* | IcuCollation: Deprecate getICUVersion(), no need for PHP53 back-compatJames D. Forrester2018-05-241-10/+6
|/ | | | Change-Id: If8dfdaf187b32b7b9a2c09a240416b9f481593f1
* Remove everything related to CollationFaAmir Sarabadani2018-05-182-62/+0
| | | | | | | | | This workaround was needed when ICU in production was broken but after T189295 this is not needed anymore and we switched off this collation from all Persian Wikis already Bug: T139110 Change-Id: Ifad89555b6ac96a3eb36ca24b55e1f8ee57a1f05
* IcuCollation: Use codepoint as tiebreaker when getting first-lettersBartosz Dziewoński2018-05-111-3/+11
| | | | | | | | This prevents unexpected cuneiform digits from acting as headings for 2 and 3 on category pages. Bug: T187645 Change-Id: I0424a24769899cb23b28704f97e1002fa44999fd
* Merge "Add collation for Abkhaz (ab)"jenkins-bot2018-01-233-15/+121
|\
| * Add collation for Abkhaz (ab)Bartosz Dziewoński2017-12-253-15/+121
| | | | | | | | | | | | | | | | | | * Adding new class AbkhazUppercaseCollation, mapped to 'uppercase-ab'. * Extended CustomUppercaseCollation with support for sorting digraphs and for alphabets larger than 64 letters (up to 4096). Bug: T183430 Change-Id: I16d44568e44d7ef5b39c38b1a6257b9fe10a34d4
* | Improve some parameter docsUmherirrender2018-01-071-1/+0
|/ | | | Change-Id: I31e983d7ac287158101b18ad95779d83537302a2
* Add custom collation for Northern Samijhsoby2017-12-072-0/+85
| | | | | | | | | | | | | | This commit adds a custom collation order for Northern Sami ('se'). Northern Sami exists in ICU, but the version of ICU that Wikimedia uses is a few years old, and does *not* include Northern Sami. It could be years before Wikimedia's production servers use the one that includes Northern Sami (see bug), so this is a temporary workaround to amend this issue. Bug: T181503 Change-Id: Ib8a48b8db99bef8ec4b05144aace5dbdcacfeded
* Add Unicode to ICU mappings for versions 58 and 59Reedy2017-10-251-0/+2
| | | | Change-Id: I87a5e6ce3a44a2be1e6bf8adf2f98cd0a4745574
* Fix typo in 'language'Umherirrender2017-10-071-1/+1
| | | | Change-Id: I3c4d090640892ae07d3da33dcfe3ace397a40808
* Improve some parameter docsUmherirrender2017-09-101-0/+8
| | | | | | Add missing @return and @param to function docs and fixed some @param Change-Id: I810727961057cfdcc274428b239af5975c57468d
* Merge "Move around "ا" to after "آ" and not before"jenkins-bot2017-09-061-1/+5
|\
| * Move around "ا" to after "آ" and not beforeAmir Sarabadani2017-08-311-1/+5
| | | | | | | | | | Bug: T173601 Change-Id: I0f6b3ecc2800180a2c6a8217803411862a299e04
* | Use short type bool/int in param documentationUmherirrender2017-08-201-1/+1
|/ | | | | | Enable the phpcs sniffs for this and used phpcbf Change-Id: Iaa36687154ddd2bf663b9dd519f5c99409d37925
* Add missing type to @param documentationUmherirrender2017-08-111-3/+3
| | | | Change-Id: I6b2c9c7af9a281fe457099cc3a336a60a25e74aa
* Use correct variable name in @param documentationUmherirrender2017-08-111-1/+1
| | | | | | | | | | | For some varargs a variable name is added with suffix ,... as seen for many other varargs Some @param are swapped, because there are in the wrong order Enable Sniff MediaWiki.Commenting.FunctionComment.ParamNameNoMatch Change-Id: I60fec6025bce824d5c67563ab7b65ad6cd628ad8
* build: Update mediawiki/mediawiki-codesniffer to 0.10.1Kunal Mehta2017-07-221-1/+1
| | | | | | | | | And auto-fix all errors. The `<exclude-pattern>` stanzas are now included in the default ruleset and don't need to be repeated. Change-Id: I928af549dc88ac2c6cb82058f64c7c7f3111598a
* Merge "Remove auto-generated "Constructor" documentation on constructors"jenkins-bot2017-07-211-2/+0
|\
| * Remove auto-generated "Constructor" documentation on constructorsThiemo Mättig2017-07-211-2/+0
| | | | | | | | | | | | | | | | | | | | | | Having such comments is worse than not having them. They add zero information. But you must read the text to understand there is nothing you don't already know from the class and the method name. This is similar to I994d11e. Even more trivial, because this here is about comments that don't say anything but "constructor". Change-Id: I474dcdb5997bea3aafd11c0760ee072dfaff124c
* | IcuCollation: Fix diacritic characters for Aromanian (rup) and Moldovan (mo) ↵Bartosz Dziewoński2017-07-191-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | headings They should be Ș, Ț (comma-below) and instead they were cedilla-below (Ş, Ţ). Same as for Romanian (ro) in 486f64f28302ecceed04977180fd21470cb54c81. Both of these languages are unsupported by libicu and so the collations are unlikely to have been used in practice. Bug: T171043 Bug: T171044 Change-Id: Idd0d593e73cd784fbef7b75e8985f988f5555e26
* | Update FIRST_LETTER_VERSION for rowiki changesBrian Wolff2017-07-191-1/+1
| | | | | | | | | | | | | | | | | | Can't just clear cache on production, as this now uses per-server apc instance. Follow-up 486f64f28302ecceed04977 Change-Id: I88df6d5a91c86ef687543d1a6988e0ec050bbfce
* | IcuCollation: Fix diacritic characters for Romanian (ro) headingsBartosz Dziewoński2017-07-191-1/+1
|/ | | | | | | They should be Ș, Ț (comma-below) and instead they were cedilla-below (Ş, Ţ). Bug: T168711 Change-Id: I6dc873c3ce93bca3e425439f70d0fb30aecc9533
* CollationFa: Avoid PHP 7 Unicode escape syntaxBartosz Dziewoński2017-06-221-2/+2
| | | | | | We still support PHP 5.5. Change-Id: I587cb794cded95afe7ad493614a6090a108efe6c
* Hack around icu breakage for fa sortingBrian Wolff2017-05-191-13/+19
| | | | | Bug: T139110 Change-Id: I35bcdaf309f595258289f01bbe5713ce6d1ffad1
* Add collation for Bashkir (ba)Brian Wolff2017-05-103-0/+160
| | | | | | | | This is based on a numeric uppercase collation. Bashkir characters will be remapped to the private use area for the purpose of sorting. Bug: T162823 Change-Id: I65f1af0b57ff6ded7d464e39efd401f178a3519e