EBernhardson (WMF) has submitted this change and it was merged. Change subject: (bug 53506) Protection disables feedback even if nothing is touched ......................................................................
(bug 53506) Protection disables feedback even if nothing is touched By default & depending on the lottery settings, either aft-editor or aft-none value is selected already. When nothing is explicitly changed for AFT, no protection changes should be saved to the database. Current situation will make every protection change for regular page protection settings save the AFT settings (that may have been left untouched) Bug: 53506 Change-Id: Ia1355bcd6314f2f30015dffab7f133f8ce700e44 --- M ArticleFeedbackv5.hooks.php 1 file changed, 6 insertions(+), 0 deletions(-) Approvals: EBernhardson (WMF): Verified; Looks good to me, approved jenkins-bot: Checked diff --git a/ArticleFeedbackv5.hooks.php b/ArticleFeedbackv5.hooks.php index 63bacda..d4f902f 100644 --- a/ArticleFeedbackv5.hooks.php +++ b/ArticleFeedbackv5.hooks.php @@ -838,6 +838,12 @@ } } + // don't save if nothing's changed + $existingRestriction = ArticleFeedbackv5Permissions::getAppliedRestriction( $article->getId() ); + if ( $existingRestriction->pr_level == $requestPermission && $existingRestriction->pr_expiry == $expirationTime ) { + return true; + } + $success = ArticleFeedbackv5Permissions::setRestriction( $article->getId(), $requestPermission, -- To view, visit https://gerrit.wikimedia.org/r/81950 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ia1355bcd6314f2f30015dffab7f133f8ce700e44 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/ArticleFeedbackv5 Gerrit-Branch: master Gerrit-Owner: Matthias Mullie <mmul...@wikimedia.org> Gerrit-Reviewer: EBernhardson (WMF) <ebernhard...@wikimedia.org> Gerrit-Reviewer: jenkins-bot _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits