Commit graph

220 commits

Author SHA1 Message Date
Ed Sanders 796da84576 Allow extensions to support extra namespaces and content models
Change-Id: If67bab93da355da609b6df274514b5c72a6ed91a
2016-06-01 01:55:03 +01:00
Aaron Schulz 838d5bc7e4 Send edit stash metrics for cache attempts
Change-Id: Ic5ffcb20ca9062748c2cde232d6aa4ee1522aa55
2016-05-26 21:27:33 +00:00
Alex Monk c40070b5cf Debug log strange-looking ETags being sent to RB
Bug: T135171
Change-Id: Ie127cfbd515cd217abd272cb7a81566b91e13f4d
2016-05-19 03:33:40 +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
Bartosz Dziewoński 2ff4195772 Simplify GlobalBlocking code
Depends-On: I2893b9e24173d21fe518c360f6c6add363cc7b23
Change-Id: I242e5daaeda4e981099228ffa860b274a9794127
2016-04-25 23:55:22 +02:00
jenkins-bot 5dc1257507 Merge "More minor/watch checkbox state computation server-side" 2016-04-11 14:18:56 +00:00
Alex Monk 149dab8fc5 Add ?redirect=false to VE's RB /page/html/ requests
Untested.

Bug: T130757
Change-Id: I27570d3212bd41bf7da93608302dae04c364783f
2016-04-09 03:34:34 +01:00
Roan Kattouw 12eb41acff More minor/watch checkbox state computation server-side
Following through on my threat from 72b0d2a19c (November 2013).

Change-Id: I0daeef2a0373bbdb06627053e9d726d6fc20a3f6
2016-04-08 18:02:01 -07:00
Alex Monk 1c455a5fb8 Set User-Agent in server-side VRS requests to RESTBase/Parsoid
Bug: T131171
Change-Id: I385ef1f3efb674c4ad3ffb334c0ff5b830f89a37
2016-03-30 01:05:50 +01:00
Alex Monk d2a9aefba7 Better handling of read-only mode
* Don't just fail to load, action=visualeditor itself should not write to the DB
  (we have action=visualeditoredit for that)
* Send notice to the client in the usual way
* Handle read only errors on save, log as unknown

This won't let you review changes because that uses visualeditoredit

Bug: T129501
Change-Id: Id78c06b031423e47a7ddf94ec615b6d6975309d3
2016-03-10 21:02:52 +00:00
Alex Monk 4ed6fd4010 Change Accept header a bit
Per post-merge commit on I77af4b58 by Subbu

Bug: T128233
Change-Id: I30c4c1ad5b68e5b8a006d7a6c7bcbaac7e2eb164
2016-03-02 15:37:37 +00:00
Alex Monk 2f135e9590 API: Send Accept: header to RESTbase
Bug: T128233
Change-Id: I77af4b58e5469a898063a3f838802e4f5769514b
2016-03-01 01:14:02 +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
James D. Forrester 8063603ca5 [BREAKING CHANGE] Drop MW pre-1.25 PHP API documentation compatibility
getDescription() and getParamDescription() have been replaced by a proper i18n-based
API documentation system since MediaWiki 1.25. Retaining these does not help us with
backwards-compatibility given that the repo already requires MediaWiki 1.27.0-alpha,
so just drop them before they become out of date.

Change-Id: Ic8b87235aeb7e1bcd7b24d5609c7d002658a66ba
2016-02-06 17:43:37 -08:00
James D. Forrester ada58df361 build: Bump file copyright notices for 2016
Change-Id: I3c618c196e504a80ca297a4132a17f1977a24fb7
2016-01-03 14:57:25 -08:00
Bartosz Dziewoński 8afae11a1c ApiVisualEditor: Return the correct notice when user is not allowed to create page
'nocreatetext' is only the right error message when anonymous users
are generally not allowed to create pages on the wiki. But there are
other situations, for example a title might be blacklisted.

Change-Id: I7b8e83fa0bf98449e63e67705b709d227d9a379f
2015-11-05 04:02:42 +01:00
Alex Monk 85b745666f Allow switching from wikitext to VE
Just by pressing the VE tab for now

Requires a relatively new version of restbase

Bug: T49779
Change-Id: I2a5294345f5e0f469c1dd1bdd29dbce211571a4e
2015-11-02 20:55:19 +00:00
James D. Forrester 5732bd26fb ApiVisualEditor: Switch RESTbase config from 'scrubWikitext' to 'scrub_wikitext'
Change-Id: I08ca5eab1423232b96faf39f12b25b679a0d77bd
2015-10-17 00:07:34 +00:00
jenkins-bot e14c8e11cf Merge "Change a bunch of parsoid references to acknowledge that RESTBase is sometimes in the middle" 2015-10-01 16:14:29 +00:00
C. Scott Ananian 0ec26ef23b Rename RESTBase1/Parsoid3 bodyOnly parameter to body_only
The old `bodyOnly` name was deprecated on 2015-09-09.

Bug: T114185
Change-Id: Ic7b71acdbf56366cd4bd0172f06f75babf45edb7
2015-09-30 10:31:05 -04:00
Alex Monk 82b62896e1 Change a bunch of parsoid references to acknowledge that RESTBase is sometimes in the middle
Bug: T112339
Change-Id: I0eac521a89fc399de168408ef55c9143c0db742a
2015-09-14 21:18:01 +01:00
C. Scott Ananian 96e330650d Use RESTBase v1 API
This requires https://gerrit.wikimedia.org/r/214351 in core, which adds
support for emulating the RESTBase v1 API to the
ParsoidVirtualRESTService.

$wgVisualEditorPrefix is now deprecated.  Parsoid is configured using
VRS (preferred) or $wgVisualEditorDomain, which defaults to
$wgCanonicalServer.

This bumps our MW-core dependency to 1.26wmf21.

Bug: T110780
Change-Id: I9175ac8db8310f0c9574c8272b5e39932557d57e
2015-08-29 02:12:29 +00:00
Alex Monk ea34d938c8 Revert "Revert "Replace wgVisualEditorNamespaces with an associative array""
This reverts commit 7ca1afbbd2.

Bug: T104898
Change-Id: I061c1fd9ab8ec6b2afac92feef888ba207e1a9b1
2015-08-02 23:13:24 +01:00
Alex Monk 7ca1afbbd2 Revert "Replace wgVisualEditorNamespaces with an associative array"
This reverts commit 647a5597bb.

Change-Id: Idaf4960f5df2fbb426162830a15383ecfc96118e
2015-07-31 04:41:28 +01:00
Alex Monk 647a5597bb Replace wgVisualEditorNamespaces with an associative array
Bug: T104898
Change-Id: Ibf4812caeaa9290959bc757fc49a151854bff337
2015-07-23 18:49:21 +00:00
Ed Sanders 5ee35e2c6a ApiVisualEditor: Ask Parsoid to 'scrubWikitext' on save
Bug: T105239
Change-Id: I9e39dc2c12a3262431d15629c89fa90ba0fd73bc
2015-07-09 11:39:43 +01:00
Ed Sanders 8971edb480 Check if links are 'known' rather than 'exist' locally
This data is used for marking links red, but links which are known
but don't exist (e.g. interwikis) are not red.

Also fix bug in API caused by trying to return a value of (bool)true which is
apparently not allowed. Use (number)1 instead.

Bug: T104604
Change-Id: I599a513a27b31f7167e688d73bc3685141249971
2015-07-08 20:26:04 +01:00
Esanders b2ff7aaa17 Revert "Show <newarticletext> as surface placeholder, not an edit notice"
This reverts commit 5ac5c7a05b.

Bug: T104227
Change-Id: Id86dd228c2c671758acc6d2d3314c92da8917472
2015-07-02 15:20:24 +00:00
Alex Monk 5ac5c7a05b Show <newarticletext> as surface placeholder, not an edit notice
Bug: T104227
Change-Id: If0e1df48c1b3818235f7e02220144d467fb78fe9
2015-07-01 15:46:09 +00:00
Timo Tijhof c3b837e6b5 api: Expand helppage url before passing to 'newarticletext'
By default 'helppage' is set to a full url (using Special:MyLanguage
on www.mediawiki.org). When it is set to a page name, we expand
to a url. However that url is relative (e.g. "/wiki/..") which
is not a valid external link in the "[$1 ..]" syntax MediaWiki
uses in the 'newarticletext' message.

In MediaWiki's EditPage.php this is handled by wrapping the return
value in wfExpandUrl(), we should do the same here.

Without this, on wiki's like pl.wikipedia.org that set 'helppage'
to a local wiki page, "[/wiki/Project:Help Help]" shows up literally
in the message shown to the user instead of a clickable link.

Change-Id: I2ffc35a1b255269d5b489c68eace9edafb42d8ff
2015-05-06 21:01:59 +01:00
Brad Jorsch ccd2091f5d Further cleanup for core API change
PS25 and later changed things around a fair bit, meaning the previous update
needs some further updating. In some cases additional cleanup is also necessary
for future core API changes.

Bug: T96595
Change-Id: Iaac674f77079d29d42813fd69620bdce8905730f
2015-04-20 14:41:29 -04:00
Alex Monk 4779f83cfe Avoid undefined index warning for oldid if it's not set in serializeforcache
Official VE client always sets this.

Bug: T95015
Change-Id: Ibcef5e4360e2f9d882e9441ff8d3bdbf7179f2f6
2015-04-03 19:58:11 +01:00
Alex Monk 54071c2187 Check whether html parameter is valid rather than allow warnings to be raised if it is not
Bug: T95015
Change-Id: Iece859db0b67c906ac1f6f3e2e948815b455626c
2015-04-03 19:20:09 +01:00
Matthew Flaschen be9847c24f Allow parsefragment even if VE is not enabled for that title
Fixes T94282

Bug: T94282
Change-Id: Id3ee4dfba669b3119b8b4cbdfab20f70061856fb
2015-04-01 20:47:19 -04:00
jenkins-bot aa3f8b9eb9 Merge "Stash edits alongside the html -> wikitext stashing step" 2015-03-31 18:52:39 +00:00
Aaron Schulz 24c9f45816 Stash edits alongside the html -> wikitext stashing step
* The standard core method for page saving already checks the cache.
  By stashing the parser output as the user types, the final save step
  will be faster, just as with the wikitext editor.

Bug: T90040
Change-Id: If10a79381c6301d52f4a68ca91d0e1d7fbc79bb5
2015-03-31 18:19:59 +00:00
ecotg 175e60edaf Strip X-Parsoid Performance Headers from Visual Editor
Stripped out X-Parsoid Performance Headers, previously used to gather and
forward Parsoid's performance information, from ApiVisualEditor.php,
ve.init.mw.Target.js and ve.init.mw.TargetLoader.js. Change I936ada7b1 strips
out the corresponding X-Parsoid Performance Headers from Parsoid. Parsoid's
current performance instrumentation is achieved using Graphite and txstatsd.

Change-Id: I57d6f866a7d8287a5115e6236b0fb25bc4d0eabd
2015-03-27 12:03:15 -06:00
Roan Kattouw b19104ed04 Send requests to RESTbase directly when so configured
Also introduces paction=metadata in ApiVisualEditor which
doesn't hit Parsoid but gets all the other information we need.

Bug: T90374
Change-Id: I71edbc0f8dc15a6f8d3672c10ca3c641cc172be7
2015-03-26 16:00:54 -07:00
Roan Kattouw 9538d4c0f3 ApiVisualEditor: Rename $page to $title, since it's a Title, not a WikiPage
Change-Id: I45b23158b87e49c90375ea73635285fdb63a0c1c
2015-03-26 15:45:52 -07:00
Matthew Flaschen 77a5a6cdd5 Ensure wikitext is treated as such in PST
Fixes T92934

Bug: T92934
Change-Id: I9cc75b18ae65ab0a986e9916d0c685fc1bf8b31e
2015-03-17 16:43:03 -04:00
Roan Kattouw 25afae342a Move parseWikitext from ApiVisualEditor.php to ApiVisualEditorEdit.php
It's only actually being called in the latter.

Change-Id: Ifbf568738f38aa52878197813ec458c34bee5d5b
2015-03-14 00:27:11 +01:00
Roan Kattouw b52cbc443f Remove basetimestamp/starttimestamp from ApiVisualEditor
These were only used in ApiVisualEditorEdit.php, seem to have
been missed when the split was done.

Change-Id: I60a9152d244100526cef755cf578d7dfd38a96b9
2015-03-14 00:27:03 +01:00
Alex Monk 28a293ebaf Don't try to access x-parsoid-performance on restbase cache hits
It doesn't get set

Change-Id: I6695ab0e7d461b7541dd56e392f8d1479998f2b5
2015-03-13 00:53:19 +00:00
Marko Obrovac b46a2bd105 Use the RESTBase back-end if available
Change I4d4043e5052327bbd789331f1c05b607c45fe7cb introduces RESTBase's
virtual REST service in the MW core, as well as $wgVirtualRestConfig,
which represents the first step towards central VRS configuration.
This patch modifies VE to use RESTBase instead of Parsoid, if
available. RESTBase's virtual REST service transparently maps Parsoid
URIs to RESTBase's, so there is no need to change them in VE for now.

Note that the patch keeps full compatibility with systems/domains that
do not have $wgVirtualRestConfig declared (or even with those that do
not include the RESTBase virtual REST service class). This allows us
to use RESTBase as the back-end only on selected domains.

Bug: T89066
Change-Id: Ie7488f64868a41f28ec24ab1217c12c6249b5523
2015-03-10 21:41:39 +01:00
Roan Kattouw 6642e4f0bc Don't claim all links exist when ParserCache misses
On a ParserCache miss when viewing the current version of a
page, we'd output {missing: [], extant: true} which means
all links are marked blue. That's wrong, instead output
that we don't know anything.

Bug: T91299
Change-Id: Icf66735141a8d2a6579dce0ffd847dd099437029
2015-03-02 21:14:38 +01:00
Alex Monk 7475141a2c Don't try to get X-Cache header if it's not set
It's set if Parsoid is behind Varnish, and this was fine until I2342fa5b

Change-Id: I4480506bf1393c4c02a10377a5269a5c85cbf23d
2015-02-16 01:13:54 +00:00
jenkins-bot b43e798bb4 Merge "Make API module's LinkCache data transmission format more efficient" 2015-02-04 01:18:21 +00:00
Roan Kattouw e367ecc948 Make API module's LinkCache data transmission format more efficient
We used to send data like { title: { missing: true|false } }
With this change, we send data like { missing: [titles], existing: true|[titles] }
where 'existing' is set to true (assume all non-missing titles exist)
for current revisions and to an array of existing titles for
old revisions.

This is because we always output this data for links in the current
revision, even when loading an old revision: in that case we rely
on the client to request the omitted information, so there we can't
assume that all pages we don't have information about exist.

Bug: T88259
Change-Id: I7b58b3f669cc78fd81b60859cf76928a9087066f
2015-02-03 11:30:40 -08:00
James D. Forrester c3f716add8 ApiVisualEditor: Default format is jsonfm not json, so note this
Bug: T87582
Change-Id: I15952626c50690708d7cff8cc5a2983d8e4fb6bb
2015-02-03 10:24:51 -08:00
Alex Monk 9841d1012c Update "Watch this page" option when necessary
On load and change the user presses the button

Bug: T78694
Change-Id: I1df2836f8ba4ae647bfb142513e5de9f32ecd0fe
2015-01-31 02:43:59 +00:00
James D. Forrester 2f8b3e0d96 build: Bump copyright notices to 2015
Change-Id: Ie92dab7411116d3410195c3fb0a3513c664c0c30
2015-01-12 20:34:19 -08:00
Brad Jorsch c891a8e8b4 Update ApiResult handling for mediawiki/core change I7b37295e
Change I7b37295e for mediawiki/core deprecates several methods, and more
importantly changes the format of the data returned from
ApiResult::getData(). This change should handle these differences in a
backwards-compatible manner.

Change-Id: I7b37295e8862b188d1f3b0cd07f66ac34629678e
2015-01-08 12:47:56 -05:00
Alex Monk 63b41a65ba Fix Parsoid transformation calls
Bug: T86046
Change-Id: I659cc1fe4138856116aee63e3ef8840d8c5d262b
2015-01-07 22:01:51 +00:00
James D. Forrester 152a507e11 Follow-up I2342fa5b: Bump wfUseMW to 1.25wmf14 for ParsoidVirtualRESTService
I2342fa5b added a dependency on Id658d925 in MediaWiki core which will first
be available in 1.25wmf14.

Also fix a spelling error.

Change-Id: I20a850f5da58b377b3c208d86b7f5c56f518fdb8
2015-01-07 02:25:45 +00:00
jenkins-bot 9b11db5f18 Merge "Use ParsoidVirtualRESTService" 2015-01-07 01:51:06 +00:00
Alex Monk f8e09abdc8 Use ParsoidVirtualRESTService
Breaking change: Introduces new dependency on php5-curl package.

Relies on Id658d925 which introduces this class into core.

Bug: T1218
Change-Id: I2342fa5b0a185f3e8d46d1ba8fa08278970cafb0
2015-01-07 01:43:46 +00:00
jenkins-bot 6b800c31f8 Merge "Pre-populate LinkCache for page we're editing" 2014-12-18 00:05:11 +00:00
Kunal Mehta 5999490065 Avoid GlobalTitleFail in ApiVisualEditor::diffWikitext()
Change-Id: I93e352d4e1cfef38f9f75f973933c8247d304e2a
2014-12-17 15:41:15 -08:00
Alex Monk 3007270645 Pre-populate LinkCache for page we're editing
Bug: T78642
Change-Id: I2293903f9e131f3ea8c31302f86a138208ae57e3
2014-12-17 01:07:57 +00:00
Tim Starling 4c50307cd5 Fix duplicate wikitext parse for displaytitle
Instead of doing a whole new parse for displaytitle, just get it from
the same API action=parse internal request that is used for returning
the content HTML.

Also escape entities as in OutputPage::setPageTitle(). The format of
OutputPage::setPageTitle()/getPageTitle() is a bit confused -- it's
mostly treated as HTML, but Article::view() sets it to the unescaped
title text -- a historical error which was unfortunately wallpapered
over.

Change-Id: I387c1ccd9a75f9c6c6a006d83235c6c1c3d1ecb5
2014-12-10 09:50:59 +11:00
Brad Jorsch 7d4ecc09c8 Add i18n for API module help
MediaWiki core change I04b1a384 added support for i18n of API module
help. This takes advantage of that while still maintaining backwards
compatibility with earlier versions of MediaWiki.

Once support for MediaWiki before 1.25 is dropped, the methods marked
deprecated in this patch may be removed.

Change-Id: I67395aff48185f3e09da31b51a08aa2541fe6a17
2014-10-29 13:59:41 -07:00
Roan Kattouw 36060a2782 Apply pre-save transform to template previews
Because autoValues often involve {{subst:}}

Bug: 71157
Change-Id: I2787f2595f8c4b8838a3e9ac9ba898af0b43b58e
2014-10-22 15:47:51 -07:00
James D. Forrester dc99a82eac Mark action=visualeditor as an internal API
This will reduce the level to which the VisualEditor API looks like a
tempting target for third parties, given it is undocumented and isn't
supported.

Bug: 62452
Change-Id: Ib34e526fcee46ea4ffe76261012c706233461dad
2014-10-14 00:26:27 +00:00
jenkins-bot 2d92bdb9d1 Merge "Update anoneditwarning message per core change" 2014-09-02 19:05:03 +00:00
Alex Monk 100b70bd50 Update anoneditwarning message per core change
Follows up I687e47c2 by James, approved by Bartosz.
This should be merged before thursday.

Change-Id: Ia28f59a341e1a04b4d143abbfe5c63e4a420056f
2014-09-02 19:59:13 +01:00
Mark A. Hershberger 363b986879 Add debugging help to VisualEditor
VE doesn't use the debug log at all, it seems.  This adds a single
wfDebugLog call so that the person using the debug log can see that it
actually does hit VE.

Also, returns better information for parsoid errors.

For example, without it, a parsoid misconfiguration of setInterwiki()
gives:

    Error loading data from server: parsoidserver-http-bad-status:
    500. Would you like to retry?

with it, you get something like the following:

    Error loading data from server: parsoidserver-http-bad-status:
    500: Page Fetch failure for "BADURL": Error: getaddrinfo
    ENOTFOUND. Would you like to retry?

or

    Error loading data from server: parsoidserver-http-bad-status:
    500: Page Fetch failure for "BADURL": 404. Would you like to
    retry?

Bug: 39057
Bug: 43147
Bug: 63149
Change-Id: I52db9fac42d7c0228b93ce3caec470fff98254f0
2014-09-02 14:57:06 +00:00
addshore ef1c12e445 Fix @returns >> @return phpdoc
Change-Id: Ibff7dfb5e870a35e5e932658490de1923f9233ad
2014-08-17 20:43:56 +01:00
Kunal Mehta 5575bed67c Use Config instead of globals
Change-Id: Iecf6358fcd15fe578b3e0dcdfa6022e0a1a763c8
2014-08-15 15:50:26 -07:00
Alex Monk a75bf88f6e Give a notice if the user isn't allowed to create the page
Bug: 67550
Change-Id: I59bc9bf5efe0b2fe9261350276316bfab117e6cf
2014-07-19 15:38:36 +01:00
Ed Sanders 288da5b704 Compress HTML data with deflate before POSTing
Bug: 66914
Change-Id: I7b0a9cfd4d4c10986769a868884688ffca833cb6
2014-06-24 17:39:03 +01:00
Krenair f8d609a8c7 Add class name to protected pages, to allow for specific CSS styling of edit area
Also get rid of checking for NS_MEDIAWIKI explictly and use
MWNamespace::getRestrictionLevels instead

Bug: 50783
Change-Id: I5986ddb9b6f17e4a2aca12dbb551cce4a6cfd663
2014-04-30 13:59:30 -07:00
jenkins-bot 09d8df88d1 Merge "Apply PST when generating diff" 2014-04-23 20:03:08 +00:00
Krenair c32880049f Apply PST when generating diff
Bug: 52345
Change-Id: Ic676105d230baf77994224bd64ed40cb52bb2e8b
2014-04-23 20:49:39 +01:00
jenkins-bot 61674b4631 Merge "Check cascade protection and show notice if relevant" 2014-04-23 18:24:10 +00:00
jenkins-bot c034e31404 Merge "Show notice if user is globally blocked" 2014-04-22 23:02:26 +00:00
Krenair 820ff5e8a0 Check cascade protection and show notice if relevant
Bug: 53893
Change-Id: Ie34c193da5ae41db1908afae35e5ba4949630176
2014-04-22 19:36:57 +01:00
Alex Monk cb9022bfe3 Show notice if user is globally blocked
Bug: 53009
Change-Id: I5c8a31f40535e7495133738a03d83648d57fb526
2014-04-22 01:22:48 +01:00
jenkins-bot a24cffed00 Merge "Set context title when rendering edit notices and checkboxes" 2014-04-19 03:48:53 +00:00
Roan Kattouw ddb8d826e3 Set context title when rendering edit notices and checkboxes
Bug: 59608
Bug: 63600
Change-Id: Ia2fdb3b3d383415feaf122d235d0c9a9e0ba0900
2014-04-19 03:09:28 +01:00
Ed Sanders 509b3db9ba Use Parsoid API for action=parsefragment
Bug: 48524
Change-Id: I8a61d2fab87d2a2e88ec2f3bbdef9ede1c7ad773
2014-04-18 13:19:54 -07:00
Ed Sanders 46988b2bd4 Create requestParsoid method for all requests to Parsoid API
Merges logic for GET & POST requests.

Change-Id: I17578177a6fc28b32f7d41c7ca6e6cf4ccaab9d9
2014-04-18 13:17:02 -07:00
Niklas Laxström dc4015455b Remove getVersion from api module
This method is deprecated since 1.21, VE is marked to require 1.22.

Change-Id: I67d30777fe0b2ebdacffcb2d6ca92275321c4e68
2014-04-17 14:04:21 +00:00
Niklas Laxström 32446f3cb3 Add whitespace
Change-Id: Id4448bcd952b1b9664cf74a99be80b8129fafa4d
2014-04-17 14:03:46 +00:00
jenkins-bot 797430e9ef Merge "Kill $wgVisualEditorEditNotices" 2014-03-27 18:34:39 +00:00
jenkins-bot b55d28bd24 Merge "Show blockedtext message in edit notices" 2014-03-26 23:02:24 +00:00
Krenair f1afe2fb48 Kill $wgVisualEditorEditNotices
Global that isn't used outside of this function.

Change-Id: Ie967523df5d61491e0042ed159c59e45439bf19e
2014-03-26 22:23:58 +00:00
jenkins-bot d9741aef73 Merge "Update use of newarticletext for added parameter" 2014-03-26 22:00:43 +00:00
jenkins-bot 58f5c76f46 Merge "Block non-JSON API access to VisualEditor, as it won't work" 2014-03-26 21:49:02 +00:00
Krenair d23d2a5853 Update use of newarticletext for added parameter
I999b9772 added a new parameter to the message, since then VE has just
been pointing this link to $1.

Bug: 63146
Change-Id: Icbaa79e6db9536c5bba2b8b3537f0920b0439f52
2014-03-26 21:34:52 +00:00
Krenair 2dcb2419dd Possibly show blocked-notice-logextract or userpage-userdoesnotexist when editing a user page
Bug is just about blocked-notice-logextract, but the same EditPage code also deals with
userpage-userdoesnotexist so lets deal with that too while we're here as it's trivial.

Bug: 51454
Change-Id: Ic8a8f135c9f76f645c25a31d9432b5e2786dcfa0
2014-03-26 14:19:53 -07:00
James D. Forrester 64a0c983a9 Block non-JSON API access to VisualEditor, as it won't work
Bug: 61017
Change-Id: I1d8f4509fc012bf5da91d2fd431651e55291edfa
2014-03-24 18:25:57 -07:00
Krenair aec9279d84 Show blockedtext message in edit notices
Depends on If5b7ef401 in oojs-ui

Bug: 52004
Change-Id: Icf672dfec4f57bef3e485428d07759ab51470999
2014-03-24 15:13:30 -07:00
Roan Kattouw 78a52f1f80 Display links to nonexistent pages as red
* Add ve.init.mw.LinkCache to track page existence and
  transparently query it
* Populate it with initial data from the parser cache
  if available, obtained in the VE API module
* Use linkCache data in link annotation rendering

This doesn't yet integrate the LinkCache with other
components like the link inspector. That should be
done so we can deduplicate the existence checks.

Additionally, we should generalize LinkCache and use
it for the category existence/status checks as well.

Bug: 37901
Change-Id: I9fd43e8c3864dd375cf6dadfdeedd05e4fe9cf3b
2014-03-20 02:42:33 +00:00
Krenair 438f9df04f Show last protection log entry and link to full protection log on protection notice
Bug: 51215
Change-Id: I95e50451003f24bd37a2125dd21dbffcdd4fcafa
2014-03-17 22:17:17 +00:00
James D. Forrester 831141e692 Pass 'pst' as true in parse request for fragments
In our parse request for 'wikitext fragments', used in the transclusion dialog
and extension inspectors, we weren't passing 'pst' as true, so while [[Foo|Bar]]
came back as expected, [[Foo (bar)|]] just came back as plain text, confusing
users.

Bug: 60998
Change-Id: I9931ad8034273ceb19c027d5035c63422cc0e570
2014-02-11 17:06:26 -08:00
Antoine Musso ae5e922837 Global setting for Parsoid HTTP proxy
On sites using $wgHTTPProxy, any curl requests made via MWHttpRequest
would be passed through that proxy. The Parsoid daemon is most probably
reachable directly, hence we want to be able to disable the proxy.
This can be done using the new $wgVisualEditorParsoidHTTPProxy which is
passed to MWHttpRequest in VisualEditor API.

Change-Id: I855249950b1b368ae0afe662154eb48e5b1a14f2
2014-02-07 14:45:56 -08:00
Ed Sanders c74d7f1a21 Update categories HTML on page save
Because there's an API for that.

Bug: 48560
Change-Id: I410647d2b1aa740f606ddca64052b8d2b54671bf
2014-01-12 14:55:39 +00:00
Rob Moen 3577ca7f6d Provide content format faux reqeust now that content format is validated
Related core change: I6c1bb9774542e39bfb899a47.

Bug: 59867
Change-Id: I5cc44c5ef358d9b19e9964545be29662083bd55c
2014-01-09 21:29:37 +00:00
James D. Forrester 0ffd654bed Bump copyright like it's 2014
Change-Id: Ic469ebda2c061dc7da0b4c1625f43a7be55da4fa
2014-01-05 20:06:50 +08:00
Ed Sanders 1a5bdd5bd2 Show full language names in the MW language dialog
Bug: 54086
Change-Id: I099ac552638d666a447eb3aeaef68329ffacdfce
2013-12-06 13:10:33 +00:00