Mattflaschen has uploaded a new change for review. https://gerrit.wikimedia.org/r/65009
Change subject: Add wgIsProbablyEditable for editability based on quickUserCan. ...................................................................... Add wgIsProbablyEditable for editability based on quickUserCan. Change-Id: I2f77b69624cc1a4cd74c8178eea53681f3f2b107 --- M includes/OutputPage.php 1 file changed, 2 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/09/65009/1 diff --git a/includes/OutputPage.php b/includes/OutputPage.php index b63e658..cbba6b0 100644 --- a/includes/OutputPage.php +++ b/includes/OutputPage.php @@ -3096,6 +3096,8 @@ if ( $wgContLang->hasVariants() ) { $vars['wgUserVariant'] = $wgContLang->getPreferredVariant(); } + // Same test as SkinTemplate + $vars['wgIsProbablyEditable'] = $title->quickUserCan( 'edit', $user ) && ( $title->exists() || $title->quickUserCan( 'create', $user ) ); foreach ( $title->getRestrictionTypes() as $type ) { $vars['wgRestriction' . ucfirst( $type )] = $title->getRestrictions( $type ); } -- To view, visit https://gerrit.wikimedia.org/r/65009 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I2f77b69624cc1a4cd74c8178eea53681f3f2b107 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core 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