"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "includes/WebRequestUpload.php" between
mediawiki-1.31.1.tar.gz and mediawiki-1.32.0.tar.gz

About: MediaWiki is a wiki engine (the collaborative editing software that runs for e.g. Wikipedia, the free encyclopedia).

WebRequestUpload.php  (mediawiki-1.31.1):WebRequestUpload.php  (mediawiki-1.32.0)
skipping to change at line 23 skipping to change at line 23
* GNU General Public License for more details. * GNU General Public License for more details.
* *
* You should have received a copy of the GNU General Public License along * You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc., * with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
* http://www.gnu.org/copyleft/gpl.html * http://www.gnu.org/copyleft/gpl.html
* *
* @file * @file
*/ */
use MediaWiki\MediaWikiServices;
/** /**
* Object to access the $_FILES array * Object to access the $_FILES array
* *
* @ingroup HTTP * @ingroup HTTP
*/ */
class WebRequestUpload { class WebRequestUpload {
protected $request; protected $request;
protected $doesExist; protected $doesExist;
protected $fileInfo; protected $fileInfo;
skipping to change at line 66 skipping to change at line 68
/** /**
* Return the original filename of the uploaded file * Return the original filename of the uploaded file
* *
* @return string|null Filename or null if non-existent * @return string|null Filename or null if non-existent
*/ */
public function getName() { public function getName() {
if ( !$this->exists() ) { if ( !$this->exists() ) {
return null; return null;
} }
global $wgContLang;
$name = $this->fileInfo['name']; $name = $this->fileInfo['name'];
# Safari sends filenames in HTML-encoded Unicode form D... # Safari sends filenames in HTML-encoded Unicode form D...
# Horrid and evil! Let's try to make some kind of sense of it. # Horrid and evil! Let's try to make some kind of sense of it.
$name = Sanitizer::decodeCharReferences( $name ); $name = Sanitizer::decodeCharReferences( $name );
$name = $wgContLang->normalize( $name ); $name = MediaWikiServices::getInstance()->getContentLanguage()->n ormalize( $name );
wfDebug( __METHOD__ . ": {$this->fileInfo['name']} normalized to '$name'\n" ); wfDebug( __METHOD__ . ": {$this->fileInfo['name']} normalized to '$name'\n" );
return $name; return $name;
} }
/** /**
* Return the file size of the uploaded file * Return the file size of the uploaded file
* *
* @return int File size or zero if non-existent * @return int File size or zero if non-existent
*/ */
public function getSize() { public function getSize() {
 End of changes. 3 change blocks. 
2 lines changed or deleted 3 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)