Commit Graph

125 Commits

Author SHA1 Message Date
KartikMistry
5ee9a7529b Revert "Fix ULSCompactLinksEnableAnon configuration"
This reverts commit e08d9bcc57.

Change-Id: I6830300561264a8344029c2bf7ea3d44b9da199b
2016-06-23 13:29:54 +00:00
Kartik Mistry
e08d9bcc57 Fix ULSCompactLinksEnableAnon configuration
Compact Language Links was enabled by default despite of
ULSCompactLinksEnableAnon was set false.

Bug: T138321
Change-Id: I776c31f94c1314091a3d9b635a33962775dd9b52
2016-06-22 10:50:30 +05:30
Niklas Laxström
d21e271c92 Do not output accept language list if it might get cached
Bug: T137522
Change-Id: Ib603f836f59f7078ac5dbb7bbbb3b84ca358cb43
2016-06-10 10:04:02 +02:00
Santhosh Thottingal
02da4454e2 Add config to enable compact language links for anonymous users
By default, the value is false.

Change-Id: I16dd24182c6e2b8e5e63ebfc0ea305a3511a9e1d
2016-05-16 11:20:56 +00:00
Santhosh Thottingal
35e7d72e35 Add config to enable compact links for new accounts
By default the value is false.

Change-Id: I30e9c3d929158d9ebe90edfcb10c90712ad294f9
2016-05-16 15:07:20 +05:30
Santhosh Thottingal
f1995bc603 Introduce a preference to disable compact language links
Bug: T133030
Change-Id: If9ec0b8c75c59c62991f0d4bfa99f6d4c9324c30
2016-05-13 14:51:21 +02:00
Kunal Mehta
6b8c33e763 build: Updating mediawiki/mediawiki-codesniffer to 0.7.1
Also added "composer fix" command.

Change-Id: I6f3f29f03abb607fbca9cec6f140875f2a3468a0
2016-05-09 18:30:34 -07:00
Santhosh Thottingal
aa4e4b417d Introduce a config variable to enable Compact language links by default
Configuration: ULSCompactLanguageLinksBetaFeature
Default value: True

Bug: T134145
Change-Id: I8d4e97653daf7fcee9175c6d7cefb5c5abb22305
2016-05-09 08:40:53 +00:00
Santhosh Thottingal
695ea37918 Remove wgULSCompactLinks configuration variable
This was used to expose Compact language links as beta feature.
Now a days, we want it as beta feature unconditionally and this
configuration does not make sense. So removing.

Bug: T134145
Change-Id: I40d5c07064b5f407ec37837b0835e0698f3a5256
2016-05-02 04:11:13 +00:00
Siebrand Mazeland
7565fdcf43 Call static Language::fetchLanguageName() statically
Change-Id: I3203ec8c601bc869b5c1b153fb745620ff9c03f6
2016-04-01 12:55:34 +02:00
Siebrand Mazeland
626d4e81d7 Fix case mismatch in method call
Change-Id: Ie002b925afaae7c88b587570659ffde3c579574d
2016-03-07 07:13:02 +00:00
Siebrand Mazeland
0e83adfef7 Perform cheaper check first
Change-Id: I4f82eb6a4ebf04ce5a41562b56ce3ee3794b018d
2016-03-07 08:11:57 +01:00
Siebrand Mazeland
12abc7daca Pass-by-reference is not needed
https://secure.php.net/manual/en/language.oop5.references.php

Change-Id: I6730b8e4326abf304f102fe5c50041342e3a70a1
2016-03-05 16:14:28 +01:00
Siebrand Mazeland
49b4cc0028 Declare functions with access modifiers
Change-Id: I047d3dc6642de07130a43ad4c2fd4a8106450aac
2016-03-05 16:10:52 +01:00
Florian
00349ab0eb Register ext.uls.eventlogger conditionally
The ext.uls.eventlogger module is now registered depending on
the configuration variable $wgULSEventLogging. This will prevent
the Structuretest Resourcetest to fail, if EventLogging isn't
installed on the test system (like on my jenkins environment :P).

Change-Id: I1e2545492ec04fb043638765ac42f09da89813e9
2016-01-25 14:53:32 +00:00
jenkins-bot
c6d5599ad8 Merge "Defer "language" preference update" 2015-09-08 19:37:05 +00:00
Niklas Laxström
f3a05e271b Remove not useful comments
Change-Id: I99c30a6c6d6b59e86e5e3efe31f38439c5e95095
2015-08-28 18:24:49 +02:00
Aaron Schulz
b83f99cf54 Defer "language" preference update
* This avoids DBPerformance log notices on GET requests

Bug: T92357
Change-Id: I9e4bc3fab4cfe36ca820abe8eb46594adac66dc4
2015-08-27 00:42:21 +00:00
James D. Forrester
9afbea2914 Use jQuery.i18n from MediaWiki core if available.
This allows other extensions to use this too, without needing a hack to detect
ULS's existence and work around it by not loading their copies of j/i18n code.

Preserves backwards-compatibility for archaïc versions of MediaWiki.

Bug: T95666
Change-Id: I25b33437ceddb60570322b9aa51844acc42a3e32
2015-07-23 15:33:42 -07:00
jenkins-bot
bb36aec8ea Merge "Use Language::isSupportedLanguage for language code validation" 2015-07-09 06:37:26 +00:00
Niklas Laxström
8a7bccc5ce Set ULS_VERSION when using extension registration
This unbreaks Translate and CleanChanges who depend on the constant.

Change-Id: I8bfb9e2aaeb77351beefb130f71daeee4e07afae
2015-07-07 21:28:09 +02:00
Niklas Laxström
417f8ff655 Use Language::isSupportedLanguage for language code validation
Aforementioned function is faster and available since 1.21 so we
can start using it. In addition it is needed to fix T104987.

Made it so that default value is empty string instead of null
because the language validations barf at null.

Bug: T104987
Change-Id: Ie944f5c8af0c825546f9fab660451f41ab7dde3c
2015-07-07 15:04:35 +02:00
Ori Livneh
61a6983bec Update geoiplookup URL endpoint for I8c90977e4
Bits is slated to be decomissioned. Change I8c90977e4 ensures the /geoiplookup
endpoint remains accessible by serving it from all domains. This patch updates
ULS to use http://meta.wikimedia.org/geoiplookup.

Change-Id: I4dc1b135af4ab8a5dcac77e73de5c8c9276bfb52
2015-05-06 11:08:04 -07:00
Santhosh Thottingal
dc2b8492b3 Add missing RL dependency ext.uls.init to test module ext.uls.tests
Bug: T93510
Change-Id: Ie1280c8b442be70d4b6f53bf85a5f9b7fdc29dbc
2015-03-24 10:42:42 +05:30
Chad Horohoe
961e20585c Remove obvious function-level profiling
Change-Id: I835cc1ce411b2cf583c1dc22196378e7c4ab1244
2015-02-10 14:10:26 -08:00
Brad Jorsch
266a601b3a UserGetLanguageObject hook should accept any IContextSource
Bug: 72951
Change-Id: Id5df9783b5aa4cd9dd3a1d234492448d70b13c63
2014-11-04 11:23:34 -05:00
Kunal Mehta
59e0efab56 Use EventLoggingRegisterSchemas hook
Change-Id: Id4772b7663e5f192962c7943458bd5d0518b958a
2014-10-11 11:31:32 -07:00
jenkins-bot
6860d7c49f Merge "Remove workaround code only needed for MW 1.20 and lower" 2014-09-29 14:26:10 +00:00
Kunal Mehta
b8079bb376 Remove extension function, move code into hooks
So the code only runs on requests which actually need it.

Change-Id: I057f6e93b60037da2b01b1775f841726d14017ba
2014-09-24 18:13:47 -07:00
Niklas Laxström
f1d969efdb Remove workaround code only needed for MW 1.20 and lower
Change-Id: Ifc256ccc144fab2a359dcd9ef0ae7be6751a471c
2014-09-19 12:11:43 +02:00
Niklas Laxström
d25f7f3307 Fix ULS QUnit tests
Tests were failing for two reasons: wrong modules as dependencies of the
test module and test timing out due to incorrect usage of QUnit.asyncTest
and QUnit.start() and QUnit.Stop.

While at it, did some small cleanups and converted the number of
assertions to use non-deprecated QUnit.expect() instead.

Options are saved using postWithToken of mw.API. This also rises minimum
MediaWiki version to 1.22. This allowed removing hundred lines of code.
MLEB is already 1.22 and above.

Change-Id: I46a1674e4ede48a0e331c8d201d1d847db51d9dd
2014-09-18 11:40:39 +00:00
jenkins-bot
ccd83b1f84 Merge "Compact links beta feature conditions sync" 2014-08-25 07:51:37 +00:00
Nemo bis
8d33793472 Compact links beta feature conditions sync
Enforce same conditions on enabling as on showing the BetaFeatures preference
to the user, for the sake of clarity.

Bug: 62362
Change-Id: I11ee32a90ba8ecca9136a6ff33581bf6d72240bd
2014-08-25 10:41:02 +03:00
Amir E. Aharoni
6de6bdf8f2 Remove tofu detection logging
Change-Id: I2b808bae2ee19062c16d8aaff2bdf0b2986e8ad0
2014-06-26 16:02:49 +03:00
jenkins-bot
53a4d8b087 Merge "Allow always logging tofu detection" 2014-04-14 03:46:01 +00:00
Amir E. Aharoni
10a25c1cc9 Allow always logging tofu detection
This commit allows to log tofu detection always,
even if the rest of the webfonts library is not loaded.

By default this is disabled.

To enable it, set the variable $wgULSTofuLoggingChance
to a number between 0 and 100, indicating the chance of it
getting logged. The idea of the lottery is that even a partial
sample can be useful.

Change-Id: Ia08fe0de348b7eebfa95498a6be58ae41608ba3b
2014-04-14 09:14:14 +05:30
Amir E. Aharoni
0d384a3f09 Use rtl beta feature icon for compact links
Change-Id: Ifaaadba7815efe00f38253b450d4ef9803986d08
2014-03-22 01:09:14 +02:00
Amir E. Aharoni
9732c5b3cf Coding conventions - whitespace, ===
Change-Id: I56d876529993970b42cf33dc1badb1429b1eda12
2014-03-14 16:47:19 +02:00
Niharika Kohli
76bf85a3e4 Enable compact links feature when ULS position is "personal"
Placing a check to not allow feature to appear in beta feature list
if there are no interlanguage links in wiki
Bug: 62361

Change-Id: I8fff949539f40953845c8ee695006ff3f4ea8241
2014-03-07 10:20:59 +00:00
James D. Forrester
ba97f53114 Follow-up Ia268c3a49: Actually hide the BF behind a feature flag
Change-Id: I9bfbfb4512bc6d5c96cdd8e7f75056f0e26b2016
2014-03-06 17:26:26 -08:00
Niharika Kohli
7f405134c7 Put new compact language links Beta Feature behind a feature flag
Add new $wgULSCompactLinks feature flag, defaulting to false (as is standard
for Beta Features). Only allow enabling of the feature if ULS position is
'interlanguage'.

Change-Id: Ia268c3a49b5aa14b6a00e33c7f01a61eba48e776
2014-03-06 15:34:59 -08:00
Niharika Kohli
5ca0d5d400 Compacting the interlanguage links with the ULS
Displays a shorter version of the language list with the languages that are more relevant to you.
More info at https://www.mediawiki.org/wiki/Universal_Language_Selector/Design/Interlanguage_links

Due to a problem with duplicate patchsets we had to create a new one. 
The history and info on code and security revisions is available at
https://gerrit.wikimedia.org/r/#/c/104793/

Change-Id: I109bfb10f6181b6408aab170db5e8ca32493d657
2014-03-04 09:41:47 +00:00
Santhosh Thottingal
27771fdeaf Restore enableWebfonts pref and remove uls-enable
This patch restores the enableWebfonts preference, stored inside
the uls-preferences blob. It existed as 'enable-webfonts' in
the past and was removed in
If735a733717596fae03042c5e277bd538bd8501f

Each wiki can be configured to load the fonts by default
using the new global variable $wgULSWebfontsEnabled.
Its default value is true (to load fonts).

This also removes the preference 'uls-enable', recently added in
I71b70d8ee7c3cad7f49b32e5dc494ef4fc1bdb2f

The initialization of ext.uls.webfonts.js is changed as well,
so that minimal webfonts JS library code is loaded,
and the rest is loaded only if a user requests it.

Bug: 60304
Change-Id: I49e812eae32266f165591c75fd67b86ca06b13f0
2014-02-10 17:40:30 +05:30
Santhosh Thottingal
81c4dfe848 Refactor the css so that embedded images are optimally loaded
Change-Id: If19d20fb22afafbf62c355394dcda825a0151ac6
2014-01-23 16:48:18 +00:00
Kunal Mehta
ad9caf32be Add user preference to enable ULS
Adds an option, 'enable-uls' for users to enable ULS. By default
it is enabled. Wikis can use $wgHiddenPrefs to prevent users from
disabling ULS.

Bug: 46306
Change-Id: I71b70d8ee7c3cad7f49b32e5dc494ef4fc1bdb2f
2014-01-21 02:46:01 -08:00
Kunal Mehta
091b8a9e02 Load wgULSCurrentAutonym variable in MakeGlobalVariablesScript hook
The ResourceLoaderGetConfigVars hook is intended for static
variables, not ones that depend on the current request.

Change-Id: I596495bd103e5b7735fb454e3b5f12cd4257ee99
2013-12-17 21:55:57 -08:00
Amir E. Aharoni
fd885d9881 Initial support for webfonts in MobileFrontend
Written in pair-programming with Ryan Kaldari.

This adds a version of webfonts initialization that is stripped
of any smart features. It only loads the basic jquery.webfonts
library and the fonts repository in a way that is usable
with the MobileFronted extension.

It is completely disabled by default.

It can be enabled by setting
$wgULSMobileWebfontsEnabled = true;
and even then it will only be enabled for users
who opted in for the mobile beta mode.

Change-Id: I488e411232a1192bbf46ae5675c701366bda9a3e
2013-11-30 12:28:46 +02:00
jenkins-bot
4c6229e9ba Merge "Revert "Do not load jquery.jStorage for logged in users"" 2013-11-12 12:48:51 +00:00
Nikerabbit
2bc77f2c18 Revert "Do not load jquery.jStorage for logged in users"
This reverts commit 5884337c9f.

Change-Id: Icfdfd89059a417a6aaea30d12164e7174dd5f58b
2013-11-12 12:47:56 +00:00
jenkins-bot
601ff3bc60 Merge "Do not load jquery.jStorage for logged in users" 2013-11-12 10:43:57 +00:00