From: mutec Date: Sun, 22 Feb 2015 23:41:46 +0000 (+0100) Subject: Fixed uninitialized wcfDialog X-Git-Tag: 2.1.0~45^2 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=74cde0740811f992df1466ffd94e217e3aa1f034;p=GitHub%2FWoltLab%2FWCF.git Fixed uninitialized wcfDialog Fixed error using an uninitialized wcfDialog when no purchased products are found and auth data are stored within the packageserver see also https://community.woltlab.com/thread/233253-api-error-bei-gekaufte-produkte-plugin-store/?postID=1418941#post1418941 --- diff --git a/wcfsetup/install/files/acp/js/WCF.ACP.js b/wcfsetup/install/files/acp/js/WCF.ACP.js index 784175bd0d..45c4395981 100644 --- a/wcfsetup/install/files/acp/js/WCF.ACP.js +++ b/wcfsetup/install/files/acp/js/WCF.ACP.js @@ -1687,9 +1687,16 @@ WCF.ACP.PluginStore.PurchasedItems.Search = Class.extend({ } else if (data.returnValues.noResults) { // there are no purchased products yet - this._dialog.wcfDialog('option', 'title', WCF.Language.get('wcf.acp.pluginStore.purchasedItems')); - this._dialog.html(data.returnValues.noResults); - this._dialog.wcfDialog('open'); + if (this._dialog === null) { + this._dialog = $('
').hide().appendTo(document.body); + this._dialog.html(data.returnValues.noResults).wcfDialog({ + title: WCF.Language.get('wcf.acp.pluginStore.purchasedItems') + }); + } else { + this._dialog.wcfDialog('option', 'title', WCF.Language.get('wcf.acp.pluginStore.purchasedItems')); + this._dialog.html(data.returnValues.noResults); + this._dialog.wcfDialog('open'); + } } else if (data.returnValues.noSSL) { // PHP was compiled w/o OpenSSL support