mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Thanks
synced 2024-11-15 02:54:23 +00:00
Use new signature for WikiPage::doDeleteArticleReal in MW 1.35+
Bug: T247869 Change-Id: I606611d2cf5cd77c8cef68cc96def9207d2e5940
This commit is contained in:
parent
ea29a94abc
commit
80fe5f9228
|
@ -41,8 +41,12 @@ class ApiCoreThankIntegrationTest extends ApiTestCase {
|
|||
// If the page already exists, delete it, otherwise our edit will not result in a new revision
|
||||
if ( $pageTitle->exists() ) {
|
||||
$wikiPage = WikiPage::factory( $pageTitle );
|
||||
if ( version_compare( MW_VERSION, '1.35', '<' ) ) {
|
||||
$error = ''; // passed by reference
|
||||
$wikiPage->doDeleteArticleReal( '', false, null, null, $error, $user );
|
||||
} else {
|
||||
$wikiPage->doDeleteArticleReal( '', $user );
|
||||
}
|
||||
}
|
||||
$result = $this->editPage( $pageName, $content, 'Summary', NS_MAIN, $user );
|
||||
/** @var Status $result */
|
||||
|
@ -62,6 +66,7 @@ class ApiCoreThankIntegrationTest extends ApiTestCase {
|
|||
$user
|
||||
);
|
||||
|
||||
if ( version_compare( MW_VERSION, '1.35', '<' ) ) {
|
||||
$error = ''; // passed by reference
|
||||
$deleteStatus = $pageToDelete->doDeleteArticleReal(
|
||||
'',
|
||||
|
@ -71,6 +76,10 @@ class ApiCoreThankIntegrationTest extends ApiTestCase {
|
|||
$error,
|
||||
$user
|
||||
);
|
||||
} else {
|
||||
$deleteStatus = $pageToDelete->doDeleteArticleReal( '', $user );
|
||||
}
|
||||
|
||||
$this->logId = $deleteStatus->getValue();
|
||||
|
||||
DeferredUpdates::clearPendingUpdates();
|
||||
|
|
Loading…
Reference in a new issue