Commit graph

12 commits

Author SHA1 Message Date
Umherirrender
6ea3d6ac2c Add explicit casts between scalar types
php internal functions like floor/round/ceil documented to return
float, most cases the result is used as int, added casts

Found by phan strict checks

Change-Id: I92daeb0f7be8a0566fd9258f66ed3aced9a7b792
2022-03-08 16:59:01 +00:00
Bartosz Dziewoński
0feccb0cb1 Rename CSS class 'mw-htmlform-field-autoinfuse' to fit the convention
Rename to 'mw-htmlform-autoinfuse'. This avoids the 'mw-htmlform-field-'
prefix normally only used by HTMLFormField subclasses, and matches the
'mw-htmlform-autoinfuse-lazy' class used in related code.

Bug: T278036
Change-Id: I4a73ec6d5993a7e4f10ef8523eef594a70c9abcc
2021-06-19 15:57:43 +02:00
Umherirrender
8de3b7d324 Use static closures where safe to use
This is micro-optimization of closure code to avoid binding the closure
to $this where it is not needed.

Created by I25a17fb22b6b669e817317a0f45051ae9c608208

Change-Id: I0ffc6200f6c6693d78a3151cb8cea7dce7c21653
2021-02-11 00:13:52 +00:00
Nikki Nikkhoui
6b0e9eafe1 HTML Classes stability annotations
Add stability annotations for HTML classes.

Bug: T247862
Change-Id: I4dad7b98213ceceb8c04b24e5d52e6fecadb3538
2020-07-13 14:54:28 +02:00
James D. Forrester
0958a0bce4 Coding style: Auto-fix MediaWiki.Usage.IsNull.IsNull
Change-Id: I90cfe8366c0245c9c67e598d17800684897a4e27
2020-01-10 14:17:13 -08:00
James D. Forrester
4f2d1efdda Coding style: Auto-fix MediaWiki.Classes.UnsortedUseStatements.UnsortedUse
Change-Id: I94a0ae83c65e8ee419bbd1ae1e86ab21ed4d8210
2020-01-10 09:32:25 -08:00
Thalia
84552a9814 Improve error message for HTML multiselect fields
Introduce a more specific message for when the number of selected items
exceeds the maximum number allowed.

Change-Id: I359b65ac397b4acef32940ff8ff9af33651f7a7b
2019-11-14 04:57:35 +00:00
Thalia
ffcb5928e1 Allow empty input in namespaces multiselect on Special:Block
Follow-up to 83ebbb519f

Bug: T219882
Change-Id: I5f3d907a8f8be02f9e2c23d2a66c42752daa38b5
2019-07-18 17:04:26 +01:00
Thalia
83ebbb519f Check namespace exists in HTMLNamespacesMultiselectField validation
Bug: T219882
Change-Id: I710d0abed6bd40dcea5bdd1c59c8d936565961eb
2019-07-16 18:07:10 +01:00
Reedy
c13fee87d4 Collapse some nested if statements
Change-Id: I9a97325d738d09370d29d35d5254bc0dadc57ff4
2019-04-04 19:02:22 +00:00
Dayllan Maza
3b547150d8 Fix invalid namespace restriction when js is disabled
When JS is disabled on Special:Block you were able to specify
any namespace as part of the namespace restrictions field. This patch
rejects any virtual namespace submitted on that field

Bug: T216831
Change-Id: If09c43e5f836e1fdd9438b856d7f44f434c29fe1
2019-03-29 19:15:56 +00:00
Thalia
ccbe9f3590 Introduce multiselect widgets for namespaces
Bug: T204986
Change-Id: Ie3916e2322d8b1a7effe9ba4604b596b568004e6
2019-01-22 12:48:42 +00:00