This means that the rememberme checkbox will not result in DB
writes on HTTP GET. If JS is enabled, it becomes GET initially.
Bug: T151903
Change-Id: If700ba9d6d1fe582d3d7c5660fcefd6d2639e4ee
$offset,
$isPowerSearch
) {
+ $user = $this->specialSearch->getUser();
+
return '<div class="mw-search-form-wrapper">' .
Xml::openElement(
'form',
[
'id' => $isPowerSearch ? 'powersearch' : 'search',
- 'method' => 'get',
+ // T151903: default to POST in case JS is disabled
+ 'method' => ( $isPowerSearch && $user->isLoggedIn() ) ? 'post' : 'get',
'action' => wfScript(),
]
) .