Replace usage of WCF.User with User
authorMatthias Schmidt <gravatronics@live.com>
Sat, 30 Jul 2016 17:26:05 +0000 (19:26 +0200)
committerMatthias Schmidt <gravatronics@live.com>
Sat, 30 Jul 2016 17:26:30 +0000 (19:26 +0200)
wcfsetup/install/files/js/WoltLab/WCF/Ui/Like/Handler.js

index 5e86fc2c9834d692d0859a4d9166b32c7b059750..5708adad516a8e4828389ac87c88647603b18923 100644 (file)
@@ -10,12 +10,12 @@ define(
        [
                'Ajax',      'Core',                     'Dictionary',         'Language',
                'ObjectMap', 'StringUtil',               'Dom/ChangeListener', 'Dom/Util',
-               'Ui/Dialog', 'WoltLab/WCF/Ui/User/List'
+               'Ui/Dialog', 'WoltLab/WCF/Ui/User/List', 'User'
        ],
        function(
                Ajax,        Core,                        Dictionary,           Language,
                ObjectMap,   StringUtil,                  DomChangeListener,    DomUtil,
-               UiDialog,    UiUserList
+               UiDialog,    UiUserList,                  User
        )
 {
        "use strict";
@@ -166,7 +166,7 @@ define(
                                this._updateBadge(element);
                        }
                        
-                       if (this._options.canLike && (WCF.User.userID != elData(element, 'user-id') || this._options.canLikeOwnContent)) {
+                       if (this._options.canLike && (User.userId != elData(element, 'user-id') || this._options.canLikeOwnContent)) {
                                var appendTo = (this._options.buttonAppendToSelector) ? ((this._options.isSingleItem) ? elBySel(this._options.buttonAppendToSelector) : elBySel(this._options.buttonAppendToSelector, element)) : null;
                                var insertPosition = (this._options.buttonBeforeSelector) ? ((this._options.isSingleItem) ? elBySel(this._options.buttonBeforeSelector) : elBySel(this._options.buttonBeforeSelector, element)) : null;
                                if (insertPosition === null && appendTo === null) {