Commit graph

120 commits

Author SHA1 Message Date
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