Fix some issues
authorMatthias Schmidt <gravatronics@live.com>
Tue, 22 Dec 2015 20:17:48 +0000 (21:17 +0100)
committerMatthias Schmidt <gravatronics@live.com>
Tue, 22 Dec 2015 20:17:48 +0000 (21:17 +0100)
com.woltlab.wcf/option.xml
com.woltlab.wcf/templates/languageChooser.tpl
wcfsetup/install/files/acp/templates/languageChooser.tpl
wcfsetup/install/files/js/3rdParty/redactor2/plugins/WoltLabMedia.js
wcfsetup/install/files/js/WoltLab/WCF/Attachment/Upload.js
wcfsetup/install/files/lib/system/upload/DefaultUploadFileSaveStrategy.class.php

index f09b7fd1da64170f9f2691871033b7cd7957bd9f..a535aadd4a3ad0617719bec81d0732497e8c92b5 100644 (file)
@@ -1489,6 +1489,7 @@ DESC:wcf.global.sortOrder.descending]]></selectoptions>
                                <defaultvalue>280</defaultvalue> <!-- TODO: temporary value -->
                                <minvalue>145</minvalue> <!-- TODO: temporary value -->
                                <maxvalue>400</maxvalue> <!-- TODO: temporary value -->
+                               <suffix>pixel</suffix>
                        </option>
                        <option name="media_small_thumbnail_height">
                                <categoryname>cms.media.thumbnail</categoryname>
@@ -1496,6 +1497,7 @@ DESC:wcf.global.sortOrder.descending]]></selectoptions>
                                <defaultvalue>210</defaultvalue> <!-- TODO: temporary value -->
                                <minvalue>145</minvalue> <!-- TODO: temporary value -->
                                <maxvalue>300</maxvalue> <!-- TODO: temporary value -->
+                               <suffix>pixel</suffix>
                        </option>
                        <option name="media_small_thumbnail_retain_dimensions">
                                <categoryname>cms.media.thumbnail</categoryname>
@@ -1508,6 +1510,7 @@ DESC:wcf.global.sortOrder.descending]]></selectoptions>
                                <defaultvalue>560</defaultvalue> <!-- TODO: temporary value -->
                                <minvalue>400</minvalue> <!-- TODO: temporary value -->
                                <maxvalue>900</maxvalue> <!-- TODO: temporary value -->
+                               <suffix>pixel</suffix>
                        </option>
                        <option name="media_medium_thumbnail_height">
                                <categoryname>cms.media.thumbnail</categoryname>
@@ -1515,6 +1518,7 @@ DESC:wcf.global.sortOrder.descending]]></selectoptions>
                                <defaultvalue>420</defaultvalue> <!-- TODO: temporary value -->
                                <minvalue>300</minvalue> <!-- TODO: temporary value -->
                                <maxvalue>700</maxvalue> <!-- TODO: temporary value -->
+                               <suffix>pixel</suffix>
                        </option>
                        <option name="media_medium_thumbnail_retain_dimensions">
                                <categoryname>cms.media.thumbnail</categoryname>
@@ -1526,12 +1530,14 @@ DESC:wcf.global.sortOrder.descending]]></selectoptions>
                                <optiontype>integer</optiontype>
                                <defaultvalue>1200</defaultvalue> <!-- TODO: temporary value -->
                                <minvalue>900</minvalue> <!-- TODO: temporary value -->
+                               <suffix>pixel</suffix>
                        </option>
                        <option name="media_large_thumbnail_height">
                                <categoryname>cms.media.thumbnail</categoryname>
                                <optiontype>integer</optiontype>
                                <defaultvalue>900</defaultvalue> <!-- TODO: temporary value -->
                                <minvalue>700</minvalue> <!-- TODO: temporary value -->
+                               <suffix>pixel</suffix>
                        </option>
                        <option name="media_large_thumbnail_retain_dimensions">
                                <categoryname>cms.media.thumbnail</categoryname>
index c75dfaa79c38454f508d20c0032962314ba5c72b..b22a59d60ba31d44bd9b774a0f0535a9cda847f3 100644 (file)
@@ -19,7 +19,7 @@
                        var languages = {
                                {implode from=$languages item=__language}
                                        '{@$__language->languageID}': {
-                                               iconPath: '{@$__language->getIconPath()}',
+                                               iconPath: '{@$__language->getIconPath()|encodeJS}',
                                                languageName: '{$__language}'
                                        }
                                {/implode}
index ddbeb076e2d27671584b3ebd937237dfcf8429de..8e522e106b62b5fa9ee7cb689a903a8962546e7d 100644 (file)
@@ -19,7 +19,7 @@
                        var languages = {
                                {implode from=$languages item=__language}
                                        '{@$__language->languageID}': {
-                                               iconPath: '{@$__language->getIconPath()}',
+                                               iconPath: '{@$__language->getIconPath()|encodeJS}',
                                                languageName: '{$__language}'
                                        }
                                {/implode}
index 6bf08d8529599ead5f309e2da2357c038df89fcf..5c645401e7a403235651f11ca7298c5110ceb4ca 100644 (file)
@@ -6,9 +6,9 @@ $.Redactor.prototype.WoltLabMedia = function() {
                        var button = this.button.add('woltlabMedia', 'Media');
                        $(button).attr('id', 'mediaManagerButton');
                        
-                       require(['WoltLab/WCF/Media/Manager'], (function(MediaManager) {
+                       require(['WoltLab/WCF/Media/Manager'], function(MediaManager) {
                                new MediaManager();
-                       }).bind(this));
+                       });
                },
        };
 };
index fae9ea7923de42d30152086649f4ef86cfb6064c..403545884cd4e9984f23bcc6e65178641191cfb0 100644 (file)
@@ -1,4 +1,6 @@
-
+/**
+ * TODO: complete implementation
+ */
 define(['Core', 'Dom/ChangeListener', 'Dom/Traverse', 'Language', 'List', 'Upload'], function(Core, DomChangeListener, DomTraverse, Language, List, Upload) {
        "use strict";
        
@@ -112,10 +114,10 @@ define(['Core', 'Dom/ChangeListener', 'Dom/Traverse', 'Language', 'List', 'Uploa
                 */
                _getParameters: function() {
                        return {
-                               objectID: this._objectIdh,
+                               objectID: this._objectId,
                                objectType: this._objectType,
                                parentObjectID: this._parentObjectId,
-                               tmpHash: this._tmpHas
+                               tmpHash: this._tmpHash
                        };
                },
                
index af36be427b71b82aa30c20d92ee8e8a356ad75e5..3f6472d5bd16721d1c625c1b127b4704932587bd 100644 (file)
@@ -124,7 +124,7 @@ class DefaultUploadFileSaveStrategy implements IUploadFileSaveStrategy {
                        FileUtil::makePath($dir, 0777);
                }
                
-               // move uploaded filex
+               // move uploaded file
                if (@move_uploaded_file($uploadFile->getLocation(), $object->getLocation())) {
                        // rotate image based on the exif data
                        if (!empty($this->options['rotateImages'])) {
@@ -165,7 +165,7 @@ class DefaultUploadFileSaveStrategy implements IUploadFileSaveStrategy {
                                                                
                                                                $adapter->writeImage($object->getLocation());
                                                                
-                                                               // update width, height and filesize of the attachment
+                                                               // update width, height and filesize of the object
                                                                if ($newImage !== null && ($orientation == ExifUtil::ORIENTATION_90_ROTATE || $orientation == ExifUtil::ORIENTATION_270_ROTATE)) {
                                                                        (new $this->editorClassName($object))->update([
                                                                                'height' => $object->width,