Kaldari has uploaded a new change for review.

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

Change subject: Fixing merge conflict bettween 2 cherry-picks for wmf15
......................................................................

Fixing merge conflict bettween 2 cherry-picks for wmf15

Change-Id: I92633477d1cb237c4354193c557a8c2ece8873a6
---
M includes/skins/SkinMinerva.php
1 file changed, 20 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/MobileFrontend 
refs/changes/77/150077/1

diff --git a/includes/skins/SkinMinerva.php b/includes/skins/SkinMinerva.php
index d80812c..421488a 100644
--- a/includes/skins/SkinMinerva.php
+++ b/includes/skins/SkinMinerva.php
@@ -137,6 +137,26 @@
        }
 
        /**
+        * Whether the user is allowed to upload
+        * @return boolean
+        */
+       public function userCanUpload() {
+               global $wgMFUploadMinEdits, $wgEnableUploads;
+               $user = $this->getUser();
+
+               if ( $wgEnableUploads ) {
+                       // Make sure the user is either in desktop mode or 
meets the special
+                       // conditions necessary for uploading in mobile mode.
+                       if ( !$this->mobileContext->shouldDisplayMobileView() ||
+                               ( $user->isAllowed( 'mf-uploadbutton' ) && 
$user->getEditCount() >= $wgMFUploadMinEdits )
+                       ) {
+                               return true;
+                       }
+               }
+               return false;
+       }
+
+       /**
         * Overrides Skin::doEditSectionLink
         * @param Title $nt
         * @param string $section

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I92633477d1cb237c4354193c557a8c2ece8873a6
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MobileFrontend
Gerrit-Branch: wmf/1.24wmf15
Gerrit-Owner: Kaldari <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to