Skip to content

Commit

Permalink
Merge pull request #45 from WikibaseSolutions/REL1_39-dev
Browse files Browse the repository at this point in the history
Fix bug when changing imgwidth (#44)
  • Loading branch information
lroelen authored Nov 6, 2024
2 parents c873185 + de21aed commit 57f943a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
14 changes: 7 additions & 7 deletions custom_plugins/mediawiki/plugins/mw_wikiupload/plugin.js
Original file line number Diff line number Diff line change
Expand Up @@ -633,7 +633,7 @@ var wikiupload = function (editor) {
//set up wiki text for inserting or updating in editor window
wikitext += "[[" + uploadPage;

if ( _imageFileExtensions.indexOf( extension) > -1 ) {
if ( _imageFileExtensions.indexOf( extension.toLowerCase() ) > -1 ) {
// add additional image attributes if image file
if ( dialogData.dimensions.width <= 0 && dialogData.dimensions.width != '') {
dialogData.dimensions.width = _userThumbsize;
Expand Down Expand Up @@ -836,16 +836,16 @@ var wikiupload = function (editor) {
ignoreWarnings = true,
uploadDetails,
result;

dialogData.type = 'File';
fileContent = _srccontent;
fileType = dialogData.type;
fileName = dialogData.dest.split('/').pop().split('#')[0].split('?')[0].split('!')[0].replace(/\s/gmi,'_');
fileSummary = dialogData.summary;
var fileContent = _srccontent;
var fileType = dialogData.type;
var fileName = dialogData.dest.split('/').pop().split('#')[0].split('?')[0].split('!')[0].replace(/\s/gmi,'_');
var fileSummary = dialogData.summary;
uploadDetails = doUpload(fileType, fileContent, fileName, fileSummary, ignoreWarnings);
result = checkUploadDetail( editor, uploadDetails, ignoreWarnings, fileName );
if (result[ "state" ] != "error" ) {
uploadPage = _mwtFileNamespace + ":" + fileName;
var uploadPage = _mwtFileNamespace + ":" + fileName;
insertUpload( uploadPage, dialogData );
}

Expand Down
2 changes: 1 addition & 1 deletion extension.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "TinyMCE",
"version": "1.1.2 (2.14.1)",
"version": "1.1.2 (2.14.3)",
"author": [
"Ephox",
"Hallo Welt",
Expand Down

0 comments on commit 57f943a

Please sign in to comment.