Commit graph

352 commits

Author SHA1 Message Date
Kunal Mehta 04f2027d77 Remove unused ContentHandlerDefaultModelFor hook
This was supposed to be removed in 7f02824ec4 except it got missed
somehow...

There was nothing registering it in extension.json, so it was entirely
unused.

Change-Id: I991c464ef0b60543a0ecd4cb1f9dda62e9d73dd4
2016-09-15 18:17:40 -07:00
James D. Forrester deef47414a Vary the 'save' labels to 'publish' for public wikis
Bug: T131132
Change-Id: I4a497265661d5ce0f6144988b514509dfa1bddfd
Depends-On: I56634ed223778a0650cf36ac7256151b13c494f1
2016-08-25 09:37:52 -07:00
Aaron Schulz 5f8dfc4b8f Defer preferences update and avoid CAS errors in onUserLoggedIn()
Bug: T143367
Change-Id: I9509f6ef565d9953f9c05b00b02b57098eef9e3a
2016-08-18 16:11:52 -07:00
Ed Sanders c452e134cc Wikitext surface alpha feature
Edit wikitext with the VE interace.

Bug: T104479
Bug: T142138
Change-Id: Ic95b47e0dd378578555c4a2342ca9c87064ed1d5
2016-08-12 18:37:29 +00:00
Thalia d156af59aa Fetch default options for gallery dialog
Fetch default options for mode, image heights and image widths
rather than hard-coding them.

Bug: T139632
Change-Id: I1adc7987fdeb1258ee87ce46acbab469ea18116e
2016-08-05 14:08:20 -07:00
jenkins-bot 8bbfeb08b9 Merge "Don't depend on captcha extension messages in ext.visualEditor.mwcore module" 2016-07-27 16:35:52 +00:00
Alex Monk c1e14db757 Don't depend on captcha extension messages in ext.visualEditor.mwcore module
Create an ext.visualEditor.mwextensionmessages module in our
ResourceLoaderRegisterModules hook and load them there as available instead.

Bug: T139550
Change-Id: I89e942052f86291085652ae93ae8d10efefb5f44
2016-07-12 21:08:59 +01:00
Alex Monk 16c38ec27a DAT.init#setEditorPreference: Change section edit alongside tab labels
When our remember-last preference changes work, alongside changing the
label of the edit tab, also change the label of the edit section links.

I seriously have no idea WTF I was thinking back in December when I
put some of this code into #activatePageTarget.

Bug: T137424
Change-Id: I581c0acf0a3ad11ad3bcf4e2e46242907ca9166f
2016-06-30 10:22:44 +00:00
jenkins-bot 81f9eb7c2f Merge "When logging in, if VEE cookie is set, change the user's preference to match it" 2016-06-29 12:20:12 +00:00
Tpt 2a2a041933 Allow extensions to register a specific target per content model
Bug: T138489
Change-Id: Ic9d2fa34b90afc58f7e31adf38f97a701aac64f9
2016-06-24 15:38:28 +00:00
Alex Monk b471ef3868 When logging in, if VEE cookie is set, change the user's preference to match it
Bug: T133304
Change-Id: I9660cfc7b0e980192dd063f44d32d04cf34b1d6d
2016-06-20 22:15:40 +01:00
Ed Sanders 6ee6ac7bdf Make namespace and content model lists extensible
This should really be done automatically by resource loader,
but merging only works on globals. We use this same hack
for plugin modules.

Change-Id: I5f729ddb6146565dc839f60353ac8fa5b2a29ca8
2016-06-01 09:29:34 -07:00
Alex Monk e91fd07a5c Follow-up If67bab93: Try to unbreak content model checking more
Some code was expecting an associative array with content model IDs
as keys, and some wwas expecting a numeric array.

Make it work more like namespace checks.

Change-Id: I804db88ed4562a6eea2b6723cb5cc8ae39d7c08f
2016-06-01 02:59:13 +01:00
Alex Monk 1aeedf2f4b Fix fatal error in our SkinTemplateNavigation handler
I must've been testing with some state that didn't trigger this

Change-Id: I6e74ea8c23b0a37fd7e808a66484d5b547b1f844
2016-06-01 02:28:34 +01:00
Ed Sanders 796da84576 Allow extensions to support extra namespaces and content models
Change-Id: If67bab93da355da609b6df274514b5c72a6ed91a
2016-06-01 01:55:03 +01:00
James D. Forrester 0549dc0e47 Hooks: Replace AddNewAccount, AuthPluginAutoCreate with LocalUserCreated
The first two are deprecated. Take advantage of this to consolidate the
code and add comments. Note that these config options are not currently
used in WMF production, and might never be used again, depending on how
futher roll-outs go.

Bug: T135071
Change-Id: Ie7638b1aed9f71c19d0735e831956f853201902b
2016-05-26 18:09:22 +01:00
Ed Sanders 216ef78cb0 [DEPRECATING CHANGE] Use canonical namespace names for enabling VE
These are more meaningful and the actual namespace IDs used can
vary, especially for extensions.

Change-Id: I781d484d7525ff09b5d348e79b63b161a7a26997
2016-05-04 18:56:00 +01:00
jenkins-bot 80636c235e Merge "Add a popup after switching into VE from WTE" 2016-04-25 22:42:55 +00:00
Aaron Schulz 2c877414c3 Do not call saveSettings() on anon users
Also actually check wfReadOnly().

Change-Id: I83e78532c66039e9764e70246bd6597a2bf4e60f
2016-04-21 08:28:27 -07:00
Alex Monk 0bbe2e38ee Add a popup after switching into VE from WTE
Bug: T131066
Change-Id: I2294da7d09dfbacb9187aba5e6e703511cec3c9f
2016-04-20 18:46:00 -07:00
James D. Forrester e9af948c3e Hooks#onAuthPluginAutoCreate: Only act if not default
Change-Id: If52c23b523953aabf52ef3e889a77b422a149c63
2016-04-01 14:29:26 +03:00
jenkins-bot ec1f924c59 Merge "Defer the user save in onCustomEditor() to post-send" 2016-03-26 03:16:50 +00:00
Aaron Schulz 42943a49d1 Defer the user save in onCustomEditor() to post-send
Bug: T92357
Change-Id: Ifc71b57f006673b2ea62175976292ca0562fc787
2016-03-24 14:21:39 -07:00
Aaron Schulz 7fd0747ffd Avoid master queries on GET requests for blocking
Bug: T92357
Change-Id: I031d71a87d49e0a33eed7c0c520097770f14937e
2016-03-24 13:24:00 -07:00
Alex Monk 73969d74cd Simplify showtabdialog logic a little bit
Don't unnecessarily nest if statements, don't check tabs preference twice

Change-Id: I788d978b2e13030104be7ea295137a09abc032a8
2016-03-06 00:07:06 +00:00
Alex Monk ade0862db1 Give a useful message in the temporary blank edit screen
Bug: T128028
Change-Id: Ife0a9de96965a9848f362696fc403708fd344825
2016-02-27 21:42:10 +00:00
James D. Forrester e7a3ec43bf build: Update mediawiki-codesniffer to 0.6.0, add "composer fix"
Change-Id: Ic96081539c2ae98b5b239b59ca9b0362b337e522
2016-02-17 08:18:02 -08:00
Alex Monk 35d38ae13a Revert "DesktopArticleTarget: Don't abort in SET mode if veswitched is set"
This reverts commit 5b083a7272.

Change-Id: Ief26646da34e88b6a32c782a8b0b40dd1ba53903
2016-02-13 02:17:54 +00:00
jenkins-bot 4a751524c4 Merge "Edit mode switch: Show popup next to VE switch button" 2016-02-10 01:51:57 +00:00
Ed Sanders 80124c88a6 Edit mode switch: Show popup next to VE switch button
Only show if the user came from VE.

Change-Id: Ic362ba534d135fca5516c8ba401f6b2a22886ff1
2016-02-10 01:36:32 +00:00
Alex Monk 188ec0f5d2 Send users whose browsers support JS but are unsupported by MW to the WTE using venoscript=1
Bug: T123457
Change-Id: Ia7e6f4dc1b7dc15fa287bf6b2c4ea12eb4a7c4ba
Depends-On: Ice6ebb95bfcb2050f4813705467942f95f7e720c
2016-02-09 19:04:14 +00:00
jenkins-bot b7f710baa0 Merge "Set page title when we take over action=edit" 2016-02-06 15:38:39 +00:00
James D. Forrester 1e0486a679 Remove all Extension:Cite code, now moved there
Depends-on: I39936ed83d5a60471a0a75da753f498e80aef234
Depends-on: Ifd853bf9f901065798bd0063aeaa786a3761aa71
Depends-on: I32c93c5118eafe5f071252290c58d3de8dacc81a
Change-Id: Iba0f25b3ebe4e5e63377da57afb760d6980f9907
2016-02-05 21:36:56 +00:00
Ed Sanders 094555cb3c Remove mwReference tests, moved to Cite extension
Change-Id: I07a2bf45117c2d14c7b00875c0a710e20980a23a
2016-02-05 21:36:56 +00:00
Alex Monk eb1cab32ff Set page title when we take over action=edit
Bug: T125670
Change-Id: If2ac6457ba82fbd046649afb1e24eab3232c5d85
2016-02-05 02:26:14 +00:00
Alex Monk c2e792e334 SET: Set user's editor to wikitext if the browser doesn't do JS
Bug: T121257
Change-Id: I8c734934a76ac73ff943db1712e679a7e73aa1e1
2016-02-04 01:22:54 +00:00
Alex Monk d7183d7e64 Check user permissions for viewsource before loading VE on-load on action=edit/submit etc.
Clicking 'View source' should probably not cause VE to load

Bug: T124650
Change-Id: I236de38b0f90f1aaa5d04b57cb7759e5951baf2b
2016-01-26 16:47:26 +00:00
Alex Monk f6c2d234be Try to do a better job of matching user agent strings
Bug: T124264
Change-Id: Ieb51d97f46c478ee5527e4bc20a54c6929b54727
2016-01-22 02:32:32 +00:00
jenkins-bot dbad1e0495 Merge "SET: Browser blacklisting checks" 2016-01-15 20:59:19 +00:00
Alex Monk b0cadabcd8 SET: Browser blacklisting checks
Only basic testing done.

Bug: T121298
Change-Id: I3a3e2632916ce359d8f91f3f9404b86353b87d31
2016-01-12 17:16:18 +00:00
James D. Forrester ada58df361 build: Bump file copyright notices for 2016
Change-Id: I3c618c196e504a80ca297a4132a17f1977a24fb7
2016-01-03 14:57:25 -08:00
jenkins-bot 6b7fc00f68 Merge "DesktopArticleTarget: Change tab text on server side when possible" 2015-12-16 19:51:03 +00:00
Alex Monk 27822d6612 SET: Always show wikitext editor on action=edit if multiple tabs are in use
VE tab will take you to veaction=edit then instead

Bug: T120987
Change-Id: I6e9bb24199e974435992c3b9a7b87c1b668187b3
2015-12-15 20:12:43 +00:00
Alex Monk c99a5b627e DesktopArticleTarget: Change tab text on server side when possible
Usually. Unless you load VE, because then you might be loading on
`action=edit` in remember-last mode and therefore the tab text needs to
be updated from "Edit source" to "Edit". Or "Create source" to "Create".
Or the equivalent with 'local description' in the case of pages from
foreign file repos, etc.

Bug: T120970
Change-Id: I8f07be6c8e415b40ad134ee82d0bda1d63cc4f96
2015-12-15 10:49:45 -08:00
Alex Monk 76a12f2f9b Try to actually resolve visualeditor-editor preference setting when switching editors
Seems we need to make sure this returns before navigating to the target page.
This reverts commit 40807a0743.

Bug: T121122
Change-Id: I4edf03bc0d57b03897d9f1802eabd8f0dd9962b9
2015-12-15 17:35:22 +00:00
jenkins-bot 33cbf199f1 Merge "Revert "DesktopArticleTarget: Don't abort in SET mode if veswitched is set"" 2015-12-14 20:53:28 +00:00
Jforrester 40807a0743 Revert "DesktopArticleTarget: Don't abort in SET mode if veswitched is set"
This reverts commit 5b083a7272.

Change-Id: Ieac905b80ea219075b4de498d645f22c3e86c5ca
2015-12-14 20:46:08 +00:00
jenkins-bot 51d493918b Merge "DesktopArticleTarget: Don't abort in SET mode if veswitched is set" 2015-12-14 16:46:02 +00:00
Kunal Mehta 7f02824ec4 Remove no longer needed ContentHandlerDefaultModelFor hook
As of 3b44da3261673 in MediaWiki core, all MediaWiki:*.json pages are
given the JSON content model, so our hook that does the same is no
longer needed.

Change-Id: I8b39edf36b479ca22d74481c3d571d15db69aa1e
2015-12-12 13:34:11 -08:00
James D. Forrester 5b083a7272 DesktopArticleTarget: Don't abort in SET mode if veswitched is set
Bug: T121122
Change-Id: I6dca85361be0c1c1c0d39b12b167af813706ae0b
2015-12-11 18:15:25 -08:00