Dan-nl has uploaded a new change for review.

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


Change subject: augmentAllowedExtensions
......................................................................

augmentAllowedExtensions

chris steipp requested that:

* we remove augmentAllowedExtensions from includes/Handlers/UploadHandler.php 
if it's unused

Change-Id: If2cf6ef87f42d97ebd7fdeb18f83ef23e65b54c1
---
M includes/Handlers/UploadHandler.php
1 file changed, 0 insertions(+), 48 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/GWToolset 
refs/changes/12/98812/1

diff --git a/includes/Handlers/UploadHandler.php 
b/includes/Handlers/UploadHandler.php
index 4384558..3f044fc 100644
--- a/includes/Handlers/UploadHandler.php
+++ b/includes/Handlers/UploadHandler.php
@@ -75,13 +75,6 @@
 
        /**
         * @var {array}
-        * used to hold the original wiki file extension array while the 
extension
-        * augments it for metadata file upload.
-        */
-       private $_wgFileExtensions;
-
-       /**
-        * @var {array}
         */
        public $mediafile_jobs;
 
@@ -220,37 +213,6 @@
                }
 
                return $result;
-       }
-
-       /**
-        * adds to the wiki’s allowed extensions array, $wgFileExtensions so 
that
-        * UploadBase will accept certain types. original intention is to allow
-        * xml file uploads as metadata sets
-        *
-        * @param {array} $accepted_types
-        * @throws {MWException}
-        */
-       protected function augmentAllowedExtensions( array $accepted_types = 
array() ) {
-               global $wgFileExtensions;
-
-               if ( empty( $accepted_types ) ) {
-                       throw new MWException(
-                               wfMessage( 'gwtoolset-developer-issue' )
-                                       ->params(
-                                               wfMessage( 
'gwtoolset-no-accepted-types' )
-                                                       ->escaped( 
'gwtoolset-no-accepted-types-provided' )
-                                       )
-                                       ->parse()
-                       );
-               }
-
-               $this->_wgFileExtensions = $wgFileExtensions;
-
-               foreach ( array_keys( Config::$accepted_metadata_types ) as 
$accepted_extension ) {
-                       if ( !in_array( $accepted_extension, $wgFileExtensions 
) ) {
-                               $wgFileExtensions[] = Utils::sanitizeString( 
$accepted_extension );
-                       }
-               }
        }
 
        /**
@@ -425,16 +387,6 @@
 
                $this->mediafile_jobs = array();
                $this->user_options = array();
-       }
-
-       /**
-        * restores the wiki’s allowed extensions array
-        *
-        * @param {array} $accepted_types
-        */
-       protected function restoreAllowedExtensions( array $accepted_types = 
array() ) {
-               global $wgFileExtensions;
-               $wgFileExtensions = $this->_wgFileExtensions;
        }
 
        /**

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: If2cf6ef87f42d97ebd7fdeb18f83ef23e65b54c1
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/GWToolset
Gerrit-Branch: master
Gerrit-Owner: Dan-nl <d_ent...@yahoo.com>

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

Reply via email to