Commit graph

95273 commits

Author SHA1 Message Date
Sohom Datta
db039086d4 Added message to be displayed when query returns no revision
Added message that is displayed when no revisions are returned by
query, also stopped HistoryPager::getStartBody and
HistoryPager::getEndBody from outputting unnecessary html when no
revisions are returned.

Bug: T227578
Change-Id: I18981c8d8d4feea548ba7321137237017a714bb6
2020-04-02 18:44:21 +00:00
jenkins-bot
8c53f65794 Merge "Replace deprecated PHPUnit method in test" 2020-04-02 17:48:17 +00:00
jenkins-bot
97fb08f614 Merge "MovePage: Use correct Title when creating the null revision" 2020-04-02 16:51:44 +00:00
jenkins-bot
2facf71c2d Merge "phpunit: Add structure test for suite.xml registering all test suites" 2020-04-02 16:47:18 +00:00
Brad Jorsch
3309ead776 MovePage: Use correct Title when creating the null revision
Prior to I4a5fe41fe, the call to Revision::newNullRevision() would load
the Title from the database and use that to create the null revision.

I4a5fe41fe, in removing uses of the deprecated Revision, changed that to
call RevisionStore::newNullRevision() directly. Instead of loading the
Title, that takes one as a parameter. $this->oldTitle was being passed,
which at this point in the execution contains the correct page_id but
the *old* page_namespace/page_title. Passing $nt would also not work,
since that contains the target page's old page_id (likely 0).

The solution is to reset the ID in $nt (so it contains both the correct
ID and name), so we can then pass it to RevisionStore::newNullRevision().

Bug: T248789
Change-Id: I8e0ae616006c0cebde60cfa53c0a842bd2cc1545
2020-04-02 11:59:08 -04:00
C. Scott Ananian
8c18f2b41c Add a wfDeprecated to an overlooked code path where parser output is not tidy
We formally deprecated running the parser with tidy disabled in 1.33, but
I missed a hard-deprecation on this code path.

Be careful not to spam the logs with deprecation warnings triggered by
(deprecated) API requests, though.

Change-Id: I10f64e76ec0c5aee8b26fc00bc11ebb0e39f961b
2020-04-02 11:53:53 -04:00
jenkins-bot
91e0179765 Merge "Revert "WikiPage/Article split. Rely on Article inside Action"" 2020-04-02 14:52:10 +00:00
jenkins-bot
a3fc6596d4 Merge "Allow partially blocked admins to block users" 2020-04-02 14:34:43 +00:00
jenkins-bot
f69bfff2a7 Merge "Add localisation for "infinity" to languages/classes/LanguageFi.php" 2020-04-02 13:27:28 +00:00
4shadoww
16a12fcfc2 Add localisation for "infinity" to languages/classes/LanguageFi.php
As the title says: add localisation for "infinity".

Bug: T249132
Change-Id: I214ca47e388f3602adca16c8db76afcf102462dc
2020-04-02 16:00:04 +03:00
jenkins-bot
a5f17ab4d5 Merge "Fix Doxygen comment of Content::replaceSection() - wrong return type" 2020-04-02 12:52:54 +00:00
Ammar Abdulhamid
3fbed46f0b Replace deprecated PHPUnit method in test
The method has been simply renamed to expectExceptionMessageMatches()
and the old name, kept as alias, will be removed in PHPUnit 9

Bug: T243600
Change-Id: Ida95d92ba28faab012370a1ac62c7a09a91221aa
2020-04-02 10:06:58 +01:00
DannyS712
7c74e448aa Revert "Deprecate parserTests format v1"
This reverts commit a7242a2eaa.

Reason for revert: Not all extension tests included in gated jobs
have been updated (specifically Scribunto and SyntaxHighlight tests)

Bug: T174199
Bug: T249194
Change-Id: I02997eda14e392e042df02dc8f64912bd4a54320
2020-04-02 08:17:08 +00:00
Translation updater bot
3f2b18da03 Localisation updates from https://translatewiki.net.
Change-Id: I92a19c0ecd046e4d3396079ff7cadbb873209087
2020-04-02 08:22:48 +02:00
jenkins-bot
9a9be7305d Merge "rdbms: convert "Exception" try/catch blocks to "Throwable" or "RuntimeException"" 2020-04-02 01:49:53 +00:00
Aaron Schulz
dc5c0242de phpunit: Add structure test for suite.xml registering all test suites
Follows-up 1f493dfca7.

Change-Id: I4eabc2b7238ac99d7b1f287fc73e023c45125204
2020-04-02 01:47:48 +00:00
jenkins-bot
6c0a0405b8 Merge "Fix docs for $wgRCFeeds" 2020-04-02 01:47:32 +00:00
Brad Jorsch
65af695018 Fix docs for $wgRCFeeds
Doxygen's @example is intended for referring to a code file that
contains example code, not for embedding examples inside a doc comment.

@code seems like the best option for the latter.

Change-Id: Ia442ef70492bedd95d6c92cfcfb1786ab9d4573d
2020-04-02 01:32:57 +00:00
Aaron Schulz
303ec64395 rdbms: convert "Exception" try/catch blocks to "Throwable" or "RuntimeException"
Change-Id: I95c204c5c436c3504dcab9e7fe2ae27936ffb590
2020-04-02 01:14:17 +00:00
jenkins-bot
74fa5a46b4 Merge "installer: Replace Vector dependency in WebInstallerOutput with fallback skin" 2020-04-02 00:35:53 +00:00
jenkins-bot
a645d3c2fa Merge "Deprecate parserTests format v1" 2020-04-01 22:45:04 +00:00
Ppchelko
64650aaba9 Revert "WikiPage/Article split. Rely on Article inside Action"
This partialy reverts commit 07f57bd271.

Reason for revert: Article::newFromWikiPage causes an infinite loop
if 'ArticleFromTitle' hook handler ends up calling Action::getActionName.

The revert preserves new getArticle and getWikiPage methods since there
are a few extension changes merged dependent on these. Alternatively this partial revert, we could do a full revert with all the dependencies  https://gerrit.wikimedia.org/r/c/mediawiki/core/+/585343

Bug: T249162
Change-Id: Ifa642a631caa2d265ee097711dc8727f84435ef0
2020-04-01 22:30:51 +00:00
C. Scott Ananian
a7242a2eaa Deprecate parserTests format v1
Parser tests should be tidy by default; we will
shortly stop running untidy tests.

Bug: T174199
Depends-On: I7c8a08c4e6eff7caf4539a26fae475a4133f9a0c
Depends-On: I9c8acb05fdf2c79f618f0f317d511df77f26ec3b
Depends-On: Ibb23da480ac25cdee2ab24492e6eaebb51851bf9
Depends-On: Ifb13838c32748b1d52612da0cdb0e0a44c6e0689
Depends-On: I663c3919e08688354d68ced6945f6eb40265d2ac
Depends-On: I5f6b82d24754e438a4df9e2b1f6b4c9d6eca1be9
Depends-On: I746ee2b985537dc6bbb8a114e21cd11a683e0f74
Change-Id: Id78d04a56f83d8c554cb0a8e395fcaf75a7a9a06
2020-04-01 21:21:44 +00:00
jenkins-bot
0f685ee35b Merge "Remove hack comment from IRCLineURL" 2020-04-01 19:24:58 +00:00
jenkins-bot
be3b16844d Merge "Fix capitalisation of updateSearchIndex.php parameter desc" 2020-04-01 19:24:30 +00:00
Reedy
ff71056565 Fix capitalisation of updateSearchIndex.php parameter desc
Change-Id: Ie76d11114d68489d4900067443e0d7592ca46453
2020-04-01 19:29:10 +01:00
jdlrobson
00e8bde685 installer: Replace Vector dependency in WebInstallerOutput with fallback skin
Rather than hardcode a Vector module, the installer should use the fallback
skin.

This leaves it mostly unstyled, which will be restored in a separate change
that adds a minimal stylesheet for the web installer (see Ibdb0a7208).

Bug: T248133
Change-Id: I5c7f16ec9efda35b94355b6c81ec78d9bdfb574b
2020-04-01 18:17:43 +00:00
C. Scott Ananian
65dd29ea12 Update extraParserTests.txt to parserTests v2 (tidy by default)
Bug: T174199
Change-Id: I8b4f6865772176667d3072f5a87c26885850194f
2020-04-01 13:15:32 -04:00
Tim Starling
507501d6ee Stop using SCRIPT_NAME where possible, rely on statically configured routing
It has become apparent that $_SERVER['SCRIPT_NAME'] may contain the same
thing as REQUEST_URI, for example in WMF production. PATH_INFO is not
set, so there is no way to split the URL into SCRIPT_NAME and PATH_INFO
components apart from configuration.

* Revert the fix for T34486, which added a route for SCRIPT_NAME to the
  PathRouter for the benefit of img_auth.php. In T235357, the route thus
  added contained $1, breaking everything.
* Remove calls to WebRequest::getPathInfo() from everywhere other than
  index.php. Dynamic modification of $wgArticlePath in order to make
  PathRouter work was weird and broken anyway. All that is really needed
  is a suffix of REQUEST_URI, so I added a function which provides that.
* Add $wgImgAuthPath, for use as a last resort workaround for T34486.
* Avoid the use of $_SERVER['SCRIPT_NAME'] to detect the currently
  running script.
* Deprecated wfGetScriptUrl(), a fairly simple wrapper for SCRIPT_NAME.
  Apparently no callers in core or extensions.

Bug: T235357
Change-Id: If2b82759f3f4aecec79d6e2d88cd4330927fdeca
2020-04-01 12:33:38 -04:00
jenkins-bot
b740a787a9 Merge "Add MW_ENTRY_POINT to bootstrap.php" 2020-04-01 16:32:03 +00:00
jenkins-bot
28f959c5ca Merge "[docker] Use a .env file for setting the port and user" 2020-04-01 16:16:30 +00:00
Kosta Harlan
c27eda79a0 [docker] Use a .env file for setting the port and user
- allows for cleanly overriding host exposed port
- easier to override XDebug settings
- easier setup for Linux hosts

When wikimedia/fresh is updated with https://github.com/wikimedia/fresh/pull/18,
we can simplify the Selenium / API testing instructions too (removing the
`export` statements).

Bug: T246586
Bug: T246588
Change-Id: Ibd266411636ac144789617bb0999c33a83e9e652
2020-04-01 17:29:14 +02:00
jenkins-bot
baabeb458f Merge "Deprecate most public fields of Parser; make private those unused outside core" 2020-04-01 15:11:07 +00:00
C. Scott Ananian
8a1c656150 Hard deprecate ParserCache::singleton(), deprecated in 1.30
Code search:
https://codesearch.wmflabs.org/search/?q=ParserCache%5Cs*%3A%3A%5Cs*singleton&i=fosho&files=&repos=

Bug: T249032
Change-Id: I22308bb2530a4aaa6a29e42d50fd679b932a6e9f
2020-04-01 10:31:38 -04:00
jenkins-bot
4df90065db Merge "Make use of DiffOp::norig/nclosing() and update tests" 2020-04-01 08:24:06 +00:00
Translation updater bot
b9c99d370f Localisation updates from https://translatewiki.net.
Change-Id: I0fa2aa42c4617ebd9a0624b226b72afa8b62b9e6
2020-04-01 08:23:49 +02:00
Sam Wilson
aedb1b5a86 Add release notes for recently-merged watchlist expiry work
Bug: T244804
Bug: T245213
Bug: T245078
Change-Id: I1372ed292d02e0eb695bc76f26836d92f4b799d2
2020-04-01 10:18:35 +08:00
Tim Starling
d9c662397d Add MW_ENTRY_POINT to bootstrap.php
This is an entry point that we missed.

Change-Id: I0e8529568adbf2ae887e4a5ed93ca6aca5ee53ad
2020-04-01 10:12:41 +11:00
DannyS712
f7366e1979 Use wfMessage in UserNameUtils::isUsable for now
Until a MessageFactory can be properly created without the time pressure
of holding the train

Bug: T249045
Change-Id: I7474c4aaaaaa095abeb697b3a0c9a6bba2f67633
2020-03-31 20:53:10 +00:00
jenkins-bot
35eea56a95 Merge "Hard deprecate Revision::getSerializedData" 2020-03-31 17:05:03 +00:00
jenkins-bot
8c6d22474a Merge "Hard deprecate the RevisionInsertComplete hook" 2020-03-31 16:52:45 +00:00
DannyS712
93e278b5db Hard deprecate Revision::getSerializedData
Bug: T246284
Change-Id: I49ac11b4f952b2494349cc49360501dd3bfc2c90
2020-03-31 16:33:04 +00:00
DannyS712
b2327fef07 Hard deprecate the RevisionInsertComplete hook
Bug: T232877
Change-Id: Ic4b26c86c0f11215a6472a84cc1f44df84d83367
2020-03-31 16:16:42 +00:00
C. Scott Ananian
a5afda55bf Deprecate most public fields of Parser; make private those unused outside core
Fields which have at least one user outside of mediawiki-core (as reported
by the 'everything' search in codesearch.wmflabs.org) have been deprecated;
those which have no users have been immediately made private.

Code search url for the fields made private:
https://codesearch.wmflabs.org/search/?q=-%3E%28mFunctionSynonyms%7CmFunctionTagHooks%7CmStripList%7CmVarCache%7CmImageParams%7CmImageParamsMagicArray%7CmSubstWords%7CmConf%7CmExtLinkBracketedRegex%7CmUrlProtocols%7CmAutonumber%7CmLinkHolders%7CmDefaultSort%7CmTplRedirCache%7CmForceTocPosition%7CmTplDomCache%7CmOutputType%7CmLangLinkLanguages%7CcurrentRevisionCache%7CmProfiler%7CmLinkRenderer%29&i=nope&files=&repos=

Bug: T248889
Change-Id: I28e88e574ec9f99231bd590e9a87fbc1c4349fa1
2020-03-31 11:47:34 -04:00
C. Scott Ananian
3a7ecc11b4 Prepare to deprecate public fields of Parser
This is preparatory work for I28e88e574ec9f99231bd590e9a87fbc1c4349fa1
which simply splits comma-separated lists into individual lines and
does minor documentation tweaks, so that the main body of the follow-up
patch is easier to review.

Bug: T248889
Change-Id: I196d047ce694fe0e8447bd96455c7fb1b75247e4
2020-03-31 11:47:34 -04:00
C. Scott Ananian
baca583042 Make private some Parser constants
These have no users outside Parser.php.

Code search url for the constants made private:
https://codesearch.wmflabs.org/search/?q=%28EXT_LINK_ADDR%7CEXT_IMAGE_REGEX%7CSPACE_NOT_NL%29&i=nope&files=&repos=

Bug: T248889
Change-Id: I46f19c4386c2f2e8cbdb8979db628493127c1925
2020-03-31 11:47:34 -04:00
jenkins-bot
bec758b668 Merge "Remove Parser::$mRevIdForTs" 2020-03-31 15:32:55 +00:00
jenkins-bot
1afd5f4cb3 Merge "Add tests for ContentHandler::getPageViewLanguage" 2020-03-31 15:18:25 +00:00
jenkins-bot
babf7c6ced Merge "Make RevisionFactory extend IDBAccessObject" 2020-03-31 13:25:18 +00:00
Ammar Abdulhamid
d8786ebf7d Allow partially blocked admins to block users
Bug: T208965
Change-Id: Ic5354113ab7310cdcd4fe4574c60e2342f682d02
2020-03-31 12:49:28 +01:00