Commit graph

83064 commits

Author SHA1 Message Date
Aaron Schulz
505a0e913a Make LocalFile file locking calls use Status::wrap
This avoids the assumption that a wrapper was set in the FileBackend.

Change-Id: I4d41d63b00e41476d885f714d17d1ba62b63b6ec
2018-06-14 07:30:07 +00:00
C. Scott Ananian
7de2c566dd Deprecate Language::markNoConversion, which confuses readers
Language::markNoConversion is used only within Parser.php and differs
from LanguageConverter::markNoConversion in that, contrary to its name
and its namesake, it only protects *things which look like URLs* from
language conversion.

This wasted several days of my time before I realized what was going on.
It's needless; just hoist the "looks like a URL" special casing inline
to the single place where that functionality is used.  (And I wonder
if the "looks like a URL" case is actually needed at all any more,
since most of those cases are probably free external links, which
go through a different code path, not bracketed external links.)

This is a clean-up to the clean-up that liangent performed in 2012
with e01adbfc0b.

Change-Id: I80479600f34170651732b032e8881855aa1204d8
2018-06-13 13:26:58 -04:00
jenkins-bot
70c79f3fc2 Merge "Move RELEASE-NOTES-1.31 into HISTORY" 2018-06-13 16:36:58 +00:00
jenkins-bot
dcdd787aed Merge "Update feedbacklink text" 2018-06-13 16:34:04 +00:00
jenkins-bot
1abed55d47 Merge "Expose sort orders from search engine in ApiQuerySearch" 2018-06-13 16:29:36 +00:00
James D. Forrester
ebb3da76de Move RELEASE-NOTES-1.31 into HISTORY
Change-Id: I82f6707af79846688cc8ccbbe30909198c647f1a
2018-06-13 09:14:34 -07:00
Hagar Shilo
8959c4b530 Update feedbacklink text
Bug: T195902
Change-Id: I69a9c42ed44eb45513084c01882d8ea8f376c6de
2018-06-13 16:13:19 +00:00
jenkins-bot
3b00273a5a Merge "mediawiki.ui: Don't style non-MWUI <input type="number"> elements" 2018-06-13 16:11:37 +00:00
jenkins-bot
a3e99ae1a2 Merge "Silently drop unknown titles in completion search" 2018-06-13 16:04:40 +00:00
Erik Bernhardson
7bf3c40506 Expose sort orders from search engine in ApiQuerySearch
Selectable sort orders were added to search some time ago, but never
appear to have been used.  Expose them in ApiQuerySearch.

There is one large problem here, but it's not easily solvable.
Specifically supported sort orders vary per search engine, but the
available api parameters are calculated with the default search
engine. This is already a problem with search profiles so it's
nothing new, just continuing the existing problem. Much like
search profiles we hide the functionality when multiple engines
are available.

Bug: T195071
Change-Id: I187a530bc973c08386d2c2126e02a85b952d9022
2018-06-13 08:57:16 -07:00
jenkins-bot
f01a6937aa Merge "Push pagination decision for search into SearchEngine" 2018-06-13 15:55:31 +00:00
jenkins-bot
c451267578 Merge "Pass $parser, &$query and &$widthOption to the 'ImageBeforeProduceHTML' hook" 2018-06-13 15:31:01 +00:00
jenkins-bot
21fb9bb32b Merge "Use 'trash' icon in the saved filters menu & change 'remove' to 'delete'" 2018-06-13 14:37:19 +00:00
Hagar Shilo
a6402b5c9a Use 'trash' icon in the saved filters menu & change 'remove' to 'delete'
Using 'trash' icon instead of misleading 'clear' and changing 'remove'
to 'delete' accordingly.

Bug: T191530
Change-Id: I8369977df5cdf0dca63683bc682e470223cf6fed
2018-06-13 14:27:20 +00:00
jenkins-bot
ad71ef9720 Merge "Use more diverse unicode chars in basic browser tests" 2018-06-13 13:27:54 +00:00
jenkins-bot
eb0758923d Merge "Disable WebResponse setters for post-send processing" 2018-06-13 13:21:51 +00:00
Gergő Tisza
c8b0acfe7c shell.php: update PsySH from 0.8.11 to 0.9.6
Major changes: fix for T186936, external editor support,
timeit command, emulate HISTCONTROL=ignorespace,
fixed tab completion

mediawiki/vendor patch: I5f604250fb213618f734e6ac9c48969ceeb3e7fb

Change-Id: I994689638632f39d86ce88027445d8fe4ea4f649
2018-06-13 13:01:07 +00:00
WMDE-Fisch
3ad98462e7 Use more diverse unicode chars in basic browser tests
See comment in I3423011c467b0a6426cfa0dad522435618f24bd0
and https://mathiasbynens.be/notes/javascript-unicode#poo-test

Decided on using something more positive than a pile of poo though.

Change-Id: Ic34d0d78044cede71fd1cd8742214c117ed2e99f
2018-06-13 14:59:46 +02:00
addshore
8602e489e1 selenium, page spec, make "should be editable" actually edit
This was using the same content for the edit before this
patch, so no edit was actually made, (just a null edit).

Change-Id: I945090647226e82f22b5b10a414a2a0bf9f2bc19
2018-06-13 11:56:29 +00:00
addshore
09536c527d selenium: page spec, make it easier to see where strings come from
Having randomly generated strings is great, but sometimes
it can help to allow a human to easily see where the string
is actually being generated in code, so add an optional suffix
to the string being generated.

Change-Id: Ibfe45f74b4880a70a76c01223a787dabcd43607e
2018-06-13 11:56:23 +00:00
addshore
ea4e00d590 Use wd/hub not /wd/hub in selenium.sh
I have run into this before and we fixed it in the README
but not in this script (I wasn't using this script at the time)

This was changed in the README in change:
I85a9e7dbd9a66418c85585969adb5ac1548f5ef6

Bug: T182421
Change-Id: I6ab92c6a61a57dc313b05321d0789dcbeb776c94
2018-06-13 11:56:15 +00:00
addshore
ae5f5b84c2 Don't use killall in selenium.sh
git bash for windows apparently doesn't have killall
by default, so instead get the PID of the chrome driver
we start and kill that specifically.

Change-Id: I8a9a773a7d3dc23807dc3ec12f5b3ef03661c9e3
2018-06-13 11:55:59 +00:00
jenkins-bot
6d7677df1f Merge "RCFilters: Reduce min-height for Watchlist" 2018-06-13 11:02:58 +00:00
Kunal Mehta
6a2e2d1837 Improve LinkRenderer::getLinkText() coverage
Change-Id: I067522025c247346888c9f5a3d905bf03a93b7bc
2018-06-13 01:30:04 -07:00
Kunal Mehta
03e7ae45bc Remove deprecated Linker::getLinkColour()
Change-Id: I1818d9eb369c620cc436c13446a5362816e8362d
2018-06-13 01:30:04 -07:00
jenkins-bot
22012ab27e Merge "linker: Hard-deprecate LinkBegin and LinkEnd hooks" 2018-06-13 06:02:23 +00:00
Bartosz Dziewoński
dbba9cfa80 mediawiki.ui: Don't style non-MWUI <input type="number"> elements
These styles mess with the styles for OOUI NumberInputWidget.

Change-Id: I9b7c8a010bc704c922cb6200a0316ed8e48851c5
2018-06-13 04:15:27 +02:00
jenkins-bot
c4568ad41b Merge "rdbms: make getCPInfoFromCookieValue() stricter about allowed values" 2018-06-12 23:51:49 +00:00
C. Scott Ananian
dbda7cdfb0 Remove unnecessary Parser::getConverterLanguage() indirection
The getConverterLanguage() method was added in March 2012 in commit
561424c266 as a workaround for a regression
in mediawiki 1.19.  It was an indirection which checked the global variable
$wgBug34832TransitionalRollback to return a different converter language
for Chinese wikis.

When this temporary bugfix was reverted in January 2013 in commit
a3fbdaaa2c, the temporary global variable
was removed, but not the getConverterLanguage() indirection.  Since then,
new code in the parser seems to have faithfully used getConverterLanguage()
instead of getTargetLanguage(), even though they are identical and the
need for getConverterLanguage() has long since passed.

Strike a small blow for elegant minimalism by removing the completely
unnecessary Parser::getConverterLanguage() indirection.  Well, sort
of: since this blight has been slowly growing inside Parser.php for
so long, we need to deprecate getConverterLanguage() first just in
case any external dependency has been infected.  Next release we
can finally excise the unnecessary method.

Change-Id: I567c29c9c7699020955699b76cbe8578d02e2fe6
2018-06-12 23:33:03 +00:00
jenkins-bot
4261fec2fa Merge "Add @coversNothing to tests that don't cover specific PHP classes" 2018-06-12 23:17:06 +00:00
jenkins-bot
be443601ad Merge "hooks.txt: Clean-up whitespace and wrapping for consistency" 2018-06-12 22:34:54 +00:00
Roan Kattouw
12dfa83db2 RCFilters: Reduce min-height for Watchlist
Bug: T195903
Change-Id: I8d4622951026cb5058efd63aa1adcb3607dd79bc
2018-06-12 15:31:53 -07:00
Fomafix
0f1858321c Use PHP 7 '??' operator instead of if-then-else
Change-Id: I790b86e2e9e3e41386144637659516a4bfca1cfe
2018-06-12 23:14:18 +02:00
Kunal Mehta
4acb7ed51c Add @coversNothing to tests that don't cover specific PHP classes
Change-Id: Idbd364561bc28547e9fac20d7a80b9a44edf14a9
2018-06-12 13:27:40 -07:00
James D. Forrester
49806d3748 hooks.txt: Clean-up whitespace and wrapping for consistency
This file is a disaster, but now at least we actually wrap at 80 chars
for all the hooks, not just the ones where the developer felt like it.

Change-Id: I10d3d51412af29b135fd7e9a0393ff0b57eb25aa
2018-06-12 13:22:58 -07:00
James D. Forrester
06ac71f9a6 hooks.txt: Label which hooks are deprecated when
Many of these are still soft-deprecated, so tracking down their age
and kicking off the full deprecation process is hard, let alone
actually removing them. Doing this makes that future work easier.

Change-Id: Ib096190accceabf9082f621ba96243f7dedb025d
2018-06-12 13:22:58 -07:00
jenkins-bot
6e9bd4bae3 Merge "Follow-up 23cfebd3d2: Hard-deprecate LanguageGetMagic hook" 2018-06-12 19:52:24 +00:00
jenkins-bot
6508c760c2 Merge "Follow-up 23cfebd3d2: Hard-deprecate LanguageGetSpecialPageAliases hook" 2018-06-12 19:52:22 +00:00
jenkins-bot
a0a426acee Merge "Fix typehint-typo in MediaWikiTestCase" 2018-06-12 19:19:23 +00:00
jenkins-bot
720fdfa790 Merge "Convert SearchResultSet to typical iteration" 2018-06-12 19:04:43 +00:00
Marius Hoch
291440ba49 Fix typehint-typo in MediaWikiTestCase
Change-Id: I3817d586cfaaaf38439820741e68eff044e9bf76
2018-06-12 20:20:49 +02:00
Aaron Schulz
44b47b43ee rdbms: make getCPInfoFromCookieValue() stricter about allowed values
All components, not just the write index, must now be present.

Bug: T194403
Change-Id: I279ba3e16d470aca09fdb74cec91d28efb5e2f95
2018-06-12 18:18:54 +00:00
Brad Jorsch
23706be35c Disable WebResponse setters for post-send processing
When jobs are being run synchronously post-send, we don't want to allow
bugs to result in a job somehow setting cookies or headers that
interfere with those that were intended to be set in the request.

Bug: T191537
Change-Id: Ib5714a17af417797140f99e41eaacbba1bfd20f4
2018-06-12 12:35:41 -04:00
James D. Forrester
fd4a49e1a7 Follow-up 23cfebd3d2: Hard-deprecate LanguageGetMagic hook
Change-Id: I7e442e20744a196644d6be186158fd901f9db1ce
2018-06-12 15:45:29 +00:00
Brad Jorsch
4aa09d4759 Category: Lock the category row before the categorylinks rows
We've noticed a large increase in deadlocks between
LinksDeletionUpdate deleting categorylinks rows and
Category::refreshCounts() trying to update the category table.

My best guess as to what's going on there is that LinksDeletionUpdate
locks the category row via the call to WikiPage::updateCategoryCounts()
then the categorylinks rows via its own deletions, while Category first
locks the categorylinks rows (in share mode) and then the category row
when it tries to update or delete it.

To break the deadlock, let's have Category do a SELECT FOR UPDATE on the
category row first before it locks the categorylinks rows.

Bug: T195397
Change-Id: Ie11baadf2ff0ba2afbc86b10bc523525c570a490
2018-06-12 11:28:25 -04:00
jenkins-bot
7261721e55 Merge "Link to revisions and log entries from tag logs" 2018-06-12 15:21:22 +00:00
James D. Forrester
f511719957 Follow-up 23cfebd3d2: Hard-deprecate LanguageGetSpecialPageAliases hook
Change-Id: I543c2ff9e9d82869a4b443410528a179f65e3d02
2018-06-12 07:53:18 -07:00
Kunal Mehta
1f286e8d40 Add release notes for 0eb4eaefd3 and f7f71359
Change-Id: Ie139db2f178660aa42009661716290158d60c8fc
2018-06-11 18:12:02 -07:00
jenkins-bot
23b7f3bbd5 Merge "parser: Validate $length in padleft/padright parser functions" 2018-06-12 00:39:53 +00:00
Brian Wolff
d561f646b9 Make $wgEmailConfirmToEdit only affect edit actions.
Previously it would affect all actions that use Title::userCan.
This used to be less noticable, but recently was expanded to include
the 'read' action. This only affected the case where both
$wgBlockDisablesLogin and $wgEmailConfirmedToEdit were enabled.

I don't think anyone was relying on the old behaviour as it was
undocumented, and only affected obscure permissions (checked with
Title::userCan and not depending on "edit" rights)

Follow-up b675be2083

Bug: T143790
Change-Id: I4ad93ed78de4f1ed444f73df6dc26d405a67e553
2018-06-12 00:13:18 +00:00