From 62ff28ae3a50cb7b57075b52e2cbdf11d70b2a28 Mon Sep 17 00:00:00 2001 From: max Date: Mon, 7 Aug 2023 00:48:30 +0200 Subject: [PATCH] refactor: Replace sSYSTEM->sCONFIG calls in export --- engine/Shopware/Core/sExport.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/engine/Shopware/Core/sExport.php b/engine/Shopware/Core/sExport.php index f29df3ac098..2e503017e25 100644 --- a/engine/Shopware/Core/sExport.php +++ b/engine/Shopware/Core/sExport.php @@ -354,7 +354,7 @@ public function sInitSettings() $this->shop = $shop; - $this->sSYSTEM->sCONFIG = Shopware()->Config(); + $this->sSYSTEM->sCONFIG = $this->config; } /** @@ -378,7 +378,7 @@ public function sInitSmarty() $this->sSmarty->registerPlugin('modifier', 'shippingcost', [$this, 'sGetArticleShippingcost']); $this->sSmarty->registerPlugin('modifier', 'property', [$this, 'sGetArticleProperties']); - $this->sSmarty->assign('sConfig', $this->sSYSTEM->sCONFIG); + $this->sSmarty->assign('sConfig', $this->config); $this->sSmarty->assign('shopData', $this->shopData); $this->sSmarty->assign('sCurrency', $this->sCurrency); $this->sSmarty->assign('sCustomergroup', $this->sCustomergroup); @@ -557,7 +557,7 @@ public function sEscapeString($string, $esc_type = '', $char_set = null) */ public function sGetArticleLink($articleID, $title = '') { - return Shopware()->Modules()->Core()->sRewriteLink($this->sSYSTEM->sCONFIG['sBASEFILE'] . "?sViewport=detail&sArticle=$articleID", $title) . (empty($this->sSettings['partnerID']) ? '' : '?sPartner=' . urlencode($this->sSettings['partnerID'])); + return Shopware()->Modules()->Core()->sRewriteLink($this->config->get('sBASEFILE') . "?sViewport=detail&sArticle=$articleID", $title) . (empty($this->sSettings['partnerID']) ? '' : '?sPartner=' . urlencode($this->sSettings['partnerID'])); } /** @@ -1446,8 +1446,8 @@ public function sGetDispatch($dispatch = null, $country = null) public function sGetDispatchBasket($article, $countryID = null, $paymentID = null) { $sql_select = ''; - if (!empty($this->sSYSTEM->sCONFIG['sPREMIUMSHIPPIUNGASKETSELECT'])) { - $sql_select .= ', ' . $this->sSYSTEM->sCONFIG['sPREMIUMSHIPPIUNGASKETSELECT']; + if (!empty($this->config->get('sPREMIUMSHIPPIUNGASKETSELECT'))) { + $sql_select .= ', ' . $this->config->get('sPREMIUMSHIPPIUNGASKETSELECT'); } $sql = 'SELECT id, calculation_sql FROM s_premium_dispatch WHERE calculation=3'; $calculations = $this->db->fetchPairs($sql);