mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Thanks
synced 2024-11-14 18:44:51 +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 );
|
||||
$error = ''; // passed by reference
|
||||
$wikiPage->doDeleteArticleReal( '', false, null, null, $error, $user );
|
||||
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,15 +66,20 @@ class ApiCoreThankIntegrationTest extends ApiTestCase {
|
|||
$user
|
||||
);
|
||||
|
||||
$error = ''; // passed by reference
|
||||
$deleteStatus = $pageToDelete->doDeleteArticleReal(
|
||||
'',
|
||||
false,
|
||||
null,
|
||||
null,
|
||||
$error,
|
||||
$user
|
||||
);
|
||||
if ( version_compare( MW_VERSION, '1.35', '<' ) ) {
|
||||
$error = ''; // passed by reference
|
||||
$deleteStatus = $pageToDelete->doDeleteArticleReal(
|
||||
'',
|
||||
false,
|
||||
null,
|
||||
null,
|
||||
$error,
|
||||
$user
|
||||
);
|
||||
} else {
|
||||
$deleteStatus = $pageToDelete->doDeleteArticleReal( '', $user );
|
||||
}
|
||||
|
||||
$this->logId = $deleteStatus->getValue();
|
||||
|
||||
DeferredUpdates::clearPendingUpdates();
|
||||
|
|
Loading…
Reference in a new issue