Withoutaname has uploaded a new change for review.
https://gerrit.wikimedia.org/r/148298
Change subject: Remove two unused constants from EditPage.php
......................................................................
Remove two unused constants from EditPage.php
Specifically constants AS_USER_CANNOT_EDIT and AS_OK
Change-Id: I96b20962b7d4cab5c026a0f03abf9da066fbd9af
---
M includes/EditPage.php
M tests/phpunit/includes/EditPageTest.php
2 files changed, 2 insertions(+), 12 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core
refs/changes/98/148298/1
diff --git a/includes/EditPage.php b/includes/EditPage.php
index a8a6811..9d512ab 100644
--- a/includes/EditPage.php
+++ b/includes/EditPage.php
@@ -67,11 +67,6 @@
const AS_CONTENT_TOO_BIG = 216;
/**
- * Status: User cannot edit? (not used)
- */
- const AS_USER_CANNOT_EDIT = 217;
-
- /**
* Status: this anonymous user is not allowed to edit this page
*/
const AS_READ_ONLY_PAGE_ANON = 218;
@@ -128,11 +123,6 @@
* Status: article is too big (> $wgMaxArticleSize), after merging in
the new section
*/
const AS_MAX_ARTICLE_SIZE_EXCEEDED = 229;
-
- /**
- * not used
- */
- const AS_OK = 230;
/**
* Status: WikiPage::doEdit() was unsuccessful
diff --git a/tests/phpunit/includes/EditPageTest.php
b/tests/phpunit/includes/EditPageTest.php
index 6b8bf27..28c35b3 100644
--- a/tests/phpunit/includes/EditPageTest.php
+++ b/tests/phpunit/includes/EditPageTest.php
@@ -82,7 +82,7 @@
* * wpMinorEdit: mark as minor edit
* * wpWatchthis: whether to watch the page
* @param int|null $expectedCode The expected result code
(EditPage::AS_XXX constants).
- * Set to null to skip the check. Defaults to
EditPage::AS_OK.
+ * Set to null to skip the check.
* @param string|null $expectedText The text expected to be on the page
after the edit.
* Set to null to skip the check.
* @param string|null $message An optional message to show along with
any error message.
@@ -90,7 +90,7 @@
* @return WikiPage The page that was just edited, useful for getting
the edit's rev_id, etc.
*/
protected function assertEdit( $title, $baseText, $user = null, array
$edit,
- $expectedCode = EditPage::AS_OK, $expectedText = null, $message
= null
+ $expectedCode = null, $expectedText = null, $message = null
) {
if ( is_string( $title ) ) {
$ns = $this->getDefaultWikitextNS();
--
To view, visit https://gerrit.wikimedia.org/r/148298
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I96b20962b7d4cab5c026a0f03abf9da066fbd9af
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Withoutaname <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits