Mattflaschen has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/316037

Change subject: Fix page moves by calling safeAllowCreation in canBeUsedOn
......................................................................

Fix page moves by calling safeAllowCreation in canBeUsedOn

Basically, this marks the new title as allowed if the user has
permission to do so (flow-create-board).

Follow-up to f9b54ea8434a8c57f3db9fcb921b167ae85dbf1b

Bug: T147942
Change-Id: Iaf0bc9c36b5178333b4e37b97d7bb09cfd99e285
---
M includes/TalkpageManager.php
1 file changed, 6 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Flow 
refs/changes/37/316037/1

diff --git a/includes/TalkpageManager.php b/includes/TalkpageManager.php
index ad102b0..b1882ec 100644
--- a/includes/TalkpageManager.php
+++ b/includes/TalkpageManager.php
@@ -224,6 +224,12 @@
         * @return bool
         */
        public function canBeUsedOn( Title $title ) {
+               global $wgUser;
+
+               // If the user has rights, mark the page as allowed
+               // For MovePage
+               $this->safeAllowCreation( $title, $wgUser, /* $mustNotExist = 
*/ true );
+
                return
                        // default content model already
                        ContentHandler::getDefaultModelFor( $title ) === 
CONTENT_MODEL_FLOW_BOARD ||

-- 
To view, visit https://gerrit.wikimedia.org/r/316037
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Iaf0bc9c36b5178333b4e37b97d7bb09cfd99e285
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Flow
Gerrit-Branch: master
Gerrit-Owner: Mattflaschen <mflasc...@wikimedia.org>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to