From 1c299956be3ce6fe59cd3021b6132bcb9c6cbe81 Mon Sep 17 00:00:00 2001 From: Fabrizio Balliano Date: Tue, 9 May 2023 20:49:13 +0100 Subject: [PATCH 01/15] Removed scriptaculous/dragdrop.js from frontend (#3215) --- app/design/frontend/base/default/layout/oauth.xml | 1 - app/design/frontend/base/default/layout/page.xml | 1 - app/design/frontend/rwd/default/layout/oauth.xml | 1 - app/design/frontend/rwd/default/layout/page.xml | 1 - 4 files changed, 4 deletions(-) diff --git a/app/design/frontend/base/default/layout/oauth.xml b/app/design/frontend/base/default/layout/oauth.xml index 0917456e078..ad141cbc4bc 100644 --- a/app/design/frontend/base/default/layout/oauth.xml +++ b/app/design/frontend/base/default/layout/oauth.xml @@ -24,7 +24,6 @@ jslib/ccard.js jsscriptaculous/controls.js jsscriptaculous/builder.js - jsscriptaculous/dragdrop.js jsscriptaculous/controls.js jsscriptaculous/slider.js jsvarien/js.js diff --git a/app/design/frontend/base/default/layout/page.xml b/app/design/frontend/base/default/layout/page.xml index 17b802ba437..4405aa7e13d 100644 --- a/app/design/frontend/base/default/layout/page.xml +++ b/app/design/frontend/base/default/layout/page.xml @@ -29,7 +29,6 @@ Default layout, loads most of the pages - diff --git a/app/design/frontend/rwd/default/layout/oauth.xml b/app/design/frontend/rwd/default/layout/oauth.xml index 4399c424f04..99a5883c414 100644 --- a/app/design/frontend/rwd/default/layout/oauth.xml +++ b/app/design/frontend/rwd/default/layout/oauth.xml @@ -24,7 +24,6 @@ jslib/ccard.js jsscriptaculous/controls.js jsscriptaculous/builder.js - jsscriptaculous/dragdrop.js jsscriptaculous/controls.js jsscriptaculous/slider.js jsvarien/js.js diff --git a/app/design/frontend/rwd/default/layout/page.xml b/app/design/frontend/rwd/default/layout/page.xml index c8cfec73f01..5e05ec85299 100644 --- a/app/design/frontend/rwd/default/layout/page.xml +++ b/app/design/frontend/rwd/default/layout/page.xml @@ -31,7 +31,6 @@ - From 27ae828f57bbea81836e28df79cd19a93b6143af Mon Sep 17 00:00:00 2001 From: Fabrizio Balliano Date: Wed, 10 May 2023 09:10:27 +0100 Subject: [PATCH 02/15] Removed unmatched errors from PHPStan baseline after PHP8.1 upgrade (#3240) --- phpstan.dist.baseline.neon | 30 ------------------------------ 1 file changed, 30 deletions(-) diff --git a/phpstan.dist.baseline.neon b/phpstan.dist.baseline.neon index e2c7bf2021a..d3e0b286e85 100644 --- a/phpstan.dist.baseline.neon +++ b/phpstan.dist.baseline.neon @@ -2310,11 +2310,6 @@ parameters: count: 1 path: app/code/core/Mage/Core/Model/Resource/Setup.php - - - message: "#^Binary operation \"\\.\" between \\(string\\|false\\) and array results in an error\\.$#" - count: 1 - path: app/code/core/Mage/Core/Model/Resource/Setup/Query/Modifier.php - - message: "#^Negated boolean expression is always false\\.$#" count: 1 @@ -3360,11 +3355,6 @@ parameters: count: 1 path: app/code/core/Mage/Payment/Model/Method/Abstract.php - - - message: "#^Binary operation \"\\-\" between string and int\\<\\-9, 9\\> results in an error\\.$#" - count: 1 - path: app/code/core/Mage/Payment/Model/Method/Cc.php - - message: "#^Loose comparison using \\!\\= between ''\\|'OT' and 'SS' will always evaluate to true\\.$#" count: 1 @@ -4660,11 +4650,6 @@ parameters: count: 1 path: lib/Mage/DB/Mysqli.php - - - message: "#^Property Mage_HTTP_Client_Curl\\:\\:\\$_ch \\(object\\) does not accept resource\\.$#" - count: 1 - path: lib/Mage/HTTP/Client/Curl.php - - message: "#^Property Mage_HTTP_Client_Socket\\:\\:\\$_postFields is never read, only written\\.$#" count: 1 @@ -4880,21 +4865,6 @@ parameters: count: 1 path: lib/Varien/Filter/Template/Tokenizer/Variable.php - - - message: "#^Method Varien_Http_Adapter_Curl\\:\\:_getResource\\(\\) has invalid return type CurlHandle\\.$#" - count: 1 - path: lib/Varien/Http/Adapter/Curl.php - - - - message: "#^Property Varien_Http_Adapter_Curl\\:\\:\\$_resource has unknown class CurlHandle as its type\\.$#" - count: 1 - path: lib/Varien/Http/Adapter/Curl.php - - - - message: "#^Property Varien_Image_Adapter_Abstract\\:\\:\\$_imageHandler has unknown class GdImage as its type\\.$#" - count: 1 - path: lib/Varien/Image/Adapter/Abstract.php - - message: "#^Call to an undefined method SimpleXMLElement\\:\\:setNode\\(\\)\\.$#" count: 1 From e464b270a1deca5e9dfd8307eeb178d5a5921ce1 Mon Sep 17 00:00:00 2001 From: Fabrizio Balliano Date: Thu, 11 May 2023 09:08:11 +0100 Subject: [PATCH 03/15] Fixed model hasDataCchanges is true right after loading (#3243) Co-authored-by: Mohamed ELIDRISSI <67818913+elidrissidev@users.noreply.github.com> Co-authored-by: Wouter Samaey --- app/code/core/Mage/Eav/Model/Entity/Attribute/Abstract.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/code/core/Mage/Eav/Model/Entity/Attribute/Abstract.php b/app/code/core/Mage/Eav/Model/Entity/Attribute/Abstract.php index b988a47590b..d24c447c747 100644 --- a/app/code/core/Mage/Eav/Model/Entity/Attribute/Abstract.php +++ b/app/code/core/Mage/Eav/Model/Entity/Attribute/Abstract.php @@ -145,6 +145,8 @@ public function loadByCode($entityType, $code) $this->_getResource()->loadByCode($this, $entityTypeId, $code); } $this->_afterLoad(); + $this->setOrigData(); + $this->_hasDataChanges = false; Varien_Profiler::stop('_LOAD_ATTRIBUTE_BY_CODE__'); return $this; } From d39d289cc30410cd4cc8c3adcfaf97e71eace453 Mon Sep 17 00:00:00 2001 From: Fabrizio Balliano Date: Thu, 11 May 2023 17:05:28 +0100 Subject: [PATCH 04/15] Removed reference to unexisting class Varien_Image_Adapter_ImagemagicExternal (#3242) --- lib/Varien/Image/Adapter.php | 5 ----- 1 file changed, 5 deletions(-) diff --git a/lib/Varien/Image/Adapter.php b/lib/Varien/Image/Adapter.php index 9a8ab7e2f3e..b4e3b794eee 100644 --- a/lib/Varien/Image/Adapter.php +++ b/lib/Varien/Image/Adapter.php @@ -18,7 +18,6 @@ class Varien_Image_Adapter public const ADAPTER_GD = 'GD'; public const ADAPTER_GD2 = 'GD2'; public const ADAPTER_IM = 'IMAGEMAGIC'; - public const ADAPTER_IME = 'IMAGEMAGIC_EXTERNAL'; public static function factory($adapter) { @@ -35,10 +34,6 @@ public static function factory($adapter) return new Varien_Image_Adapter_Imagemagic(); break; - case self::ADAPTER_IME: - return new Varien_Image_Adapter_ImagemagicExternal(); - break; - default: throw new Exception('Invalid adapter selected.'); break; From 4da40b18d509f48ce6cb0d3cada24e090377d6ae Mon Sep 17 00:00:00 2001 From: Matt Davenport Date: Fri, 12 May 2023 11:46:47 -0400 Subject: [PATCH 05/15] Ensure store-scoped values are selected before default (#2966) Co-authored-by: Fabrizio Balliano Co-authored-by: Colin Mollenhour --- app/code/core/Mage/Catalog/Model/Resource/Abstract.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/code/core/Mage/Catalog/Model/Resource/Abstract.php b/app/code/core/Mage/Catalog/Model/Resource/Abstract.php index 1b945fe1c02..bbc8e9c4e34 100644 --- a/app/code/core/Mage/Catalog/Model/Resource/Abstract.php +++ b/app/code/core/Mage/Catalog/Model/Resource/Abstract.php @@ -117,6 +117,9 @@ protected function _getLoadAttributesSelect($object, $table) ->from(['attr_table' => $table], []) ->where("attr_table.{$this->getEntityIdField()} = ?", $object->getId()) ->where('attr_table.store_id IN (?)', $storeIds); + if (count($storeIds) > 1) { + $select->order('attr_table.store_id ASC'); + } if ($setId) { $select->join( ['set_table' => $this->getTable('eav/entity_attribute')], From 1f22ced6d9f38751e7e30fc03d7695a81922262d Mon Sep 17 00:00:00 2001 From: Damien Biasotto Date: Sat, 13 May 2023 19:19:40 +1000 Subject: [PATCH 06/15] Added configuration for captcha failed_attempts_ip in backend (#1074) Co-authored-by: Fabrizio Balliano --- app/code/core/Mage/Captcha/etc/config.xml | 2 +- app/code/core/Mage/Captcha/etc/system.xml | 21 +++++++++++++++++---- app/locale/en_US/Mage_Captcha.csv | 3 ++- 3 files changed, 20 insertions(+), 6 deletions(-) diff --git a/app/code/core/Mage/Captcha/etc/config.xml b/app/code/core/Mage/Captcha/etc/config.xml index 907a904455d..098aa7bd345 100644 --- a/app/code/core/Mage/Captcha/etc/config.xml +++ b/app/code/core/Mage/Captcha/etc/config.xml @@ -197,7 +197,7 @@ after_fail backend_forgotpassword 3 - 1000 + 10 7 4-5 ABCDEFGHJKMnpqrstuvwxyz23456789 diff --git a/app/code/core/Mage/Captcha/etc/system.xml b/app/code/core/Mage/Captcha/etc/system.xml index b359e0275ef..38c1f167296 100644 --- a/app/code/core/Mage/Captcha/etc/system.xml +++ b/app/code/core/Mage/Captcha/etc/system.xml @@ -77,9 +77,22 @@ required-entry validate-digits + + + text + 6 + 1 + 0 + 0 + + after_fail + 1 + + required-entry validate-digits + - 6 + 7 1 0 0 @@ -89,7 +102,7 @@ Please specify 8 symbols at the most. Range allowed (e.g. 3-5) - 7 + 8 1 0 0 @@ -99,7 +112,7 @@ Similar looking characters (e.g. "i", "l", "1") decrease chance of correct recognition by customer.]]> - 8 + 9 1 0 0 @@ -110,7 +123,7 @@ select adminhtml/system_config_source_yesno - 9 + 10 1 0 0 diff --git a/app/locale/en_US/Mage_Captcha.csv b/app/locale/en_US/Mage_Captcha.csv index e5a7814ab67..42ea5178ea9 100644 --- a/app/locale/en_US/Mage_Captcha.csv +++ b/app/locale/en_US/Mage_Captcha.csv @@ -19,4 +19,5 @@ "Please type the letters from the image:","Please type the letters from the image:" "Please use only letters (a-z or A-Z) or numbers (0-9) in this field. No spaces or other characters are allowed.
Similar looking characters (e.g. ""i"", ""l"", ""1"") decrease chance of correct recognition by customer.","Please use only letters (a-z or A-Z) or numbers (0-9) in this field. No spaces or other characters are allowed.
Similar looking characters (e.g. ""i"", ""l"", ""1"") decrease chance of correct recognition by customer." "Reload captcha","Reload captcha" -"Symbols Used in CAPTCHA","Symbols Used in CAPTCHA" +"Symbols Used in CAPTCHA","Symbols Used in CAPTCHA", +"Number of Unsuccessful Attempts to Login per IP Address","Number of Unsuccessful Attempts to Login per IP Address" From bb9cfc1540c2ad43b1205e7498c8e9bb729d4a5e Mon Sep 17 00:00:00 2001 From: Fabrizio Balliano Date: Sat, 13 May 2023 11:37:02 +0100 Subject: [PATCH 07/15] Converted RWD's default logos to SVG (and removed some Magento names) (#3148) --- app/code/core/Mage/Page/Block/Html/Header.php | 1 + app/code/core/Mage/Page/etc/config.xml | 14 +++--- .../mysql4-upgrade-0.6.2-0.7.0.php | 4 +- .../mysql4-upgrade-0.7.2-0.7.3.php | 4 +- .../mysql4-upgrade-0.8.3-0.8.4.php | 2 +- .../base/default/template/page/print.phtml | 2 +- .../default/template/page/html/header.phtml | 10 +--- skin/frontend/rwd/default/css/styles.css | 12 ----- skin/frontend/rwd/default/images/logo.gif | Bin 1013 -> 0 bytes skin/frontend/rwd/default/images/logo.svg | 45 ++++++++++++++++++ .../rwd/default/images/logo_print.gif | Bin 949 -> 0 bytes .../rwd/default/scss/layout/_header.scss | 14 ------ 12 files changed, 60 insertions(+), 48 deletions(-) delete mode 100644 skin/frontend/rwd/default/images/logo.gif create mode 100644 skin/frontend/rwd/default/images/logo.svg delete mode 100644 skin/frontend/rwd/default/images/logo_print.gif diff --git a/app/code/core/Mage/Page/Block/Html/Header.php b/app/code/core/Mage/Page/Block/Html/Header.php index f983fc607e5..e073473604a 100644 --- a/app/code/core/Mage/Page/Block/Html/Header.php +++ b/app/code/core/Mage/Page/Block/Html/Header.php @@ -64,6 +64,7 @@ public function getLogoSrc() /** * @return string + * @deprecated Use SVG or srcset */ public function getLogoSrcSmall() { diff --git a/app/code/core/Mage/Page/etc/config.xml b/app/code/core/Mage/Page/etc/config.xml index 8a177e6d709..acfc1994269 100644 --- a/app/code/core/Mage/Page/etc/config.xml +++ b/app/code/core/Mage/Page/etc/config.xml @@ -105,21 +105,21 @@ - Magento Commerce + OpenMage Default Description - Magento, Varien, E-commerce + OpenMage, e-commerce * text/html utf-8
- images/logo.gif - Magento Commerce - images/logo.gif - Default welcome msg! + images/logo.svg + OpenMage + images/logo.svg + Welcome!
- &copy; 2020 OpenMage Demo Store. All Rights Reserved. + &copy; 2023 OpenMage Demo Store. All Rights Reserved.
diff --git a/app/code/core/Mage/Sales/sql/sales_setup/mysql4-upgrade-0.6.2-0.7.0.php b/app/code/core/Mage/Sales/sql/sales_setup/mysql4-upgrade-0.6.2-0.7.0.php index 8e1e4e18b1c..6552fcd589e 100644 --- a/app/code/core/Mage/Sales/sql/sales_setup/mysql4-upgrade-0.6.2-0.7.0.php +++ b/app/code/core/Mage/Sales/sql/sales_setup/mysql4-upgrade-0.6.2-0.7.0.php @@ -19,8 +19,8 @@ $installer->run(" -UPDATE {$this->getTable('core_email_template')} set template_text='\r\n\r\n
\r\n \r\n \r\n \r\n \r\n
\r\n \r\n \r\n \r\n \r\n \r\n
\r\n \"Magento\"
\r\n\r\n \r\n \r\n \r\n \r\n \r\n
\r\n

Hello {{var billing.name}},
\r\n Thank you for your order from Magento Demo Store. Once your package ships we will send an email with a link to track your order. You can check the status of your order by logging into your account. If you have any questions about your order please contact us at dummyemail@openmage.org or call us at (555) 555-0123 Monday - Friday, 8am - 5pm PST.

\r\n

Your order confirmation is below. Thank you again for your business.

\r\n \r\n

Your Order #{{var order.increment_id}} (placed on {{var order.getCreatedAtFormated(\'long\')}})

\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
Billing \r\n Information:Payment \r\n Method:
{{var order.billing_address.getFormated(\'html\')}}  {{var payment_html}}

\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
Shipping \r\n Information:Shipping \r\n Method:
{{var order.shipping_address.getFormated(\'html\')}} {{var order.shipping_description}}

\r\n\r\n{{var items_html}}
\r\n {{var order.getEmailCustomerNote()}} \r\n

Thank you again,
Magento Demo Store

\r\n\r\n\r\n
\r\n \r\n
\r\n
\r\n' WHERE template_code='New order (HTML)'; -UPDATE {$this->getTable('core_email_template')} set template_text='\r\n
\r\n\r\n \r\n \r\n \r\n
\r\n \r\n \r\n \r\n \r\n \r\n
\r\n \"Magento\"
\r\n\r\n \r\n \r\n \r\n \r\n \r\n
\r\n

Dear {{var billing.name}},
\r\n Your order # {{var order.increment_id}} has been {{var order.getStatusLabel()}}.

\r\n

{{var comment}}

\r\n

If you have any questions, please feel free to contact us at \r\n dummyemail@openmage.org or by phone at (555) 555-0123.

\r\n

Thank you again,
Magento Demo Store

\r\n
\r\n
\r\n
\r\n' WHERE template_code='Order update (HTML)'; +UPDATE {$this->getTable('core_email_template')} set template_text='\r\n\r\n
\r\n \r\n \r\n \r\n \r\n
\r\n \r\n \r\n \r\n \r\n \r\n
\r\n \"OpenMage\"
\r\n\r\n \r\n \r\n \r\n \r\n \r\n
\r\n

Hello {{var billing.name}},
\r\n Thank you for your order from OpenMage Demo Store. Once your package ships we will send an email with a link to track your order. You can check the status of your order by logging into your account. If you have any questions about your order please contact us at dummyemail@openmage.org or call us at (555) 555-0123 Monday - Friday, 8am - 5pm PST.

\r\n

Your order confirmation is below. Thank you again for your business.

\r\n \r\n

Your Order #{{var order.increment_id}} (placed on {{var order.getCreatedAtFormated(\'long\')}})

\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
Billing \r\n Information:Payment \r\n Method:
{{var order.billing_address.getFormated(\'html\')}}  {{var payment_html}}

\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
Shipping \r\n Information:Shipping \r\n Method:
{{var order.shipping_address.getFormated(\'html\')}} {{var order.shipping_description}}

\r\n\r\n{{var items_html}}
\r\n {{var order.getEmailCustomerNote()}} \r\n

Thank you again,
OpenMage Demo Store

\r\n\r\n\r\n
\r\n \r\n
\r\n
\r\n' WHERE template_code='New order (HTML)'; +UPDATE {$this->getTable('core_email_template')} set template_text='\r\n
\r\n\r\n \r\n \r\n \r\n
\r\n \r\n \r\n \r\n \r\n \r\n
\r\n \"OpenMage\"
\r\n\r\n \r\n \r\n \r\n \r\n \r\n
\r\n

Dear {{var billing.name}},
\r\n Your order # {{var order.increment_id}} has been {{var order.getStatusLabel()}}.

\r\n

{{var comment}}

\r\n

If you have any questions, please feel free to contact us at \r\n dummyemail@openmage.org or by phone at (555) 555-0123.

\r\n

Thank you again,
OpenMage Demo Store

\r\n
\r\n
\r\n
\r\n' WHERE template_code='Order update (HTML)'; DROP TABLE IF EXISTS {$this->getTable('sales_order_status')}; diff --git a/app/code/core/Mage/Sales/sql/sales_setup/mysql4-upgrade-0.7.2-0.7.3.php b/app/code/core/Mage/Sales/sql/sales_setup/mysql4-upgrade-0.7.2-0.7.3.php index 31d4d761b72..bdc14af29d5 100644 --- a/app/code/core/Mage/Sales/sql/sales_setup/mysql4-upgrade-0.7.2-0.7.3.php +++ b/app/code/core/Mage/Sales/sql/sales_setup/mysql4-upgrade-0.7.2-0.7.3.php @@ -18,8 +18,8 @@ $installer->startSetup(); $installer->run(" -UPDATE {$this->getTable('core_email_template')} set template_text='\r\n\r\n
\r\n \r\n \r\n \r\n \r\n
\r\n \r\n \r\n \r\n \r\n \r\n
\r\n \"Magento\"
\r\n\r\n \r\n \r\n \r\n \r\n \r\n
\r\n

Hello {{var billing.name}},
\r\n Thank you for your order from Magento Demo Store. Once your package ships we will send an email with a link to track your order. You can check the status of your order by logging into your account. If you have any questions about your order please contact us at dummyemail@openmage.org or call us at (555) 555-0123 Monday - Friday, 8am - 5pm PST.

\r\n

Your order confirmation is below. Thank you again for your business.

\r\n \r\n

Your Order #{{var order.increment_id}} (placed on {{var order.getCreatedAtFormated(\'long\')}})

\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
Billing \r\n Information:Payment \r\n Method:
{{var order.billing_address.format(\'html\')}}  {{var payment_html}}

\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
Shipping \r\n Information:Shipping \r\n Method:
{{var order.shipping_address.format(\'html\')}} {{var order.shipping_description}}

\r\n\r\n{{var items_html}}
\r\n {{var order.getEmailCustomerNote()}} \r\n

Thank you again,
Magento Demo Store

\r\n\r\n\r\n
\r\n \r\n
\r\n
\r\n' WHERE template_code='New order (HTML)'; -UPDATE {$this->getTable('core_email_template')} set template_text='\r\n
\r\n\r\n \r\n \r\n \r\n
\r\n \r\n \r\n \r\n \r\n \r\n
\r\n \"Magento\"
\r\n\r\n \r\n \r\n \r\n \r\n \r\n
\r\n

Dear {{var billing.name}},
\r\n Your order # {{var order.increment_id}} has been {{var order.getStatusLabel()}}.

\r\n

{{var comment}}

\r\n

If you have any questions, please feel free to contact us at \r\n dummyemail@openmage.org or by phone at (555) 555-0123.

\r\n

Thank you again,
Magento Demo Store

\r\n
\r\n
\r\n
\r\n' WHERE template_code='Order update (HTML)'; +UPDATE {$this->getTable('core_email_template')} set template_text='\r\n\r\n
\r\n \r\n \r\n \r\n \r\n
\r\n \r\n \r\n \r\n \r\n \r\n
\r\n \"OpenMage\"
\r\n\r\n \r\n \r\n \r\n \r\n \r\n
\r\n

Hello {{var billing.name}},
\r\n Thank you for your order from OpenMage Demo Store. Once your package ships we will send an email with a link to track your order. You can check the status of your order by logging into your account. If you have any questions about your order please contact us at dummyemail@openmage.org or call us at (555) 555-0123 Monday - Friday, 8am - 5pm PST.

\r\n

Your order confirmation is below. Thank you again for your business.

\r\n \r\n

Your Order #{{var order.increment_id}} (placed on {{var order.getCreatedAtFormated(\'long\')}})

\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
Billing \r\n Information:Payment \r\n Method:
{{var order.billing_address.format(\'html\')}}  {{var payment_html}}

\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
Shipping \r\n Information:Shipping \r\n Method:
{{var order.shipping_address.format(\'html\')}} {{var order.shipping_description}}

\r\n\r\n{{var items_html}}
\r\n {{var order.getEmailCustomerNote()}} \r\n

Thank you again,
OpenMage Demo Store

\r\n\r\n\r\n
\r\n \r\n
\r\n
\r\n' WHERE template_code='New order (HTML)'; +UPDATE {$this->getTable('core_email_template')} set template_text='\r\n
\r\n\r\n \r\n \r\n \r\n
\r\n \r\n \r\n \r\n \r\n \r\n
\r\n \"OpenMage\"
\r\n\r\n \r\n \r\n \r\n \r\n \r\n
\r\n

Dear {{var billing.name}},
\r\n Your order # {{var order.increment_id}} has been {{var order.getStatusLabel()}}.

\r\n

{{var comment}}

\r\n

If you have any questions, please feel free to contact us at \r\n dummyemail@openmage.org or by phone at (555) 555-0123.

\r\n

Thank you again,
OpenMage Demo Store

\r\n
\r\n
\r\n
\r\n' WHERE template_code='Order update (HTML)'; "); $installer->endSetup(); diff --git a/app/code/core/Mage/Sales/sql/sales_setup/mysql4-upgrade-0.8.3-0.8.4.php b/app/code/core/Mage/Sales/sql/sales_setup/mysql4-upgrade-0.8.3-0.8.4.php index 061b38ee435..174d9dad8d0 100644 --- a/app/code/core/Mage/Sales/sql/sales_setup/mysql4-upgrade-0.8.3-0.8.4.php +++ b/app/code/core/Mage/Sales/sql/sales_setup/mysql4-upgrade-0.8.3-0.8.4.php @@ -18,7 +18,7 @@ $installer->startSetup(); $installer->run(" -UPDATE {$this->getTable('core_email_template')} set template_text='\r\n\r\n
\r\n \r\n \r\n \r\n \r\n
\r\n \r\n \r\n \r\n \r\n \r\n
\r\n \"Magento\"
\r\n\r\n \r\n \r\n \r\n \r\n \r\n
\r\n

Hello {{var billing.name}},
\r\n Thank you for your order from Magento Demo Store. Once your package ships we will send an email with a link to track your order.{{depend order.getCustomerId()}} You can check the status of your order by logging into your account.{{/depend}} If you have any questions about your order please contact us at dummyemail@openmage.org or call us at (555) 555-0123 Monday - Friday, 8am - 5pm PST.

\r\n

Your order confirmation is below. Thank you again for your business.

\r\n \r\n

Your Order #{{var order.increment_id}} (placed on {{var order.getCreatedAtFormated(\'long\')}})

\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
Billing \r\n Information:Payment \r\n Method:
{{var order.billing_address.format(\'html\')}}  {{var payment_html}}

\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
Shipping \r\n Information:Shipping \r\n Method:
{{var order.shipping_address.format(\'html\')}} {{var order.shipping_description}}

\r\n\r\n{{var items_html}}
\r\n {{var order.getEmailCustomerNote()}} \r\n

Thank you again,
Magento Demo Store

\r\n\r\n\r\n
\r\n \r\n
\r\n
\r\n' WHERE template_code='New order (HTML)'; +UPDATE {$this->getTable('core_email_template')} set template_text='\r\n\r\n
\r\n \r\n \r\n \r\n \r\n
\r\n \r\n \r\n \r\n \r\n \r\n
\r\n \"OpenMage\"
\r\n\r\n \r\n \r\n \r\n \r\n \r\n
\r\n

Hello {{var billing.name}},
\r\n Thank you for your order from OpenMage Demo Store. Once your package ships we will send an email with a link to track your order.{{depend order.getCustomerId()}} You can check the status of your order by logging into your account.{{/depend}} If you have any questions about your order please contact us at dummyemail@openmage.org or call us at (555) 555-0123 Monday - Friday, 8am - 5pm PST.

\r\n

Your order confirmation is below. Thank you again for your business.

\r\n \r\n

Your Order #{{var order.increment_id}} (placed on {{var order.getCreatedAtFormated(\'long\')}})

\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
Billing \r\n Information:Payment \r\n Method:
{{var order.billing_address.format(\'html\')}}  {{var payment_html}}

\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
Shipping \r\n Information:Shipping \r\n Method:
{{var order.shipping_address.format(\'html\')}} {{var order.shipping_description}}

\r\n\r\n{{var items_html}}
\r\n {{var order.getEmailCustomerNote()}} \r\n

Thank you again,
OpenMage Demo Store

\r\n\r\n\r\n
\r\n \r\n
\r\n
\r\n' WHERE template_code='New order (HTML)'; "); $installer->endSetup(); diff --git a/app/design/frontend/base/default/template/page/print.phtml b/app/design/frontend/base/default/template/page/print.phtml index 93c5fbadc38..9f0583f942d 100644 --- a/app/design/frontend/base/default/template/page/print.phtml +++ b/app/design/frontend/base/default/template/page/print.phtml @@ -26,7 +26,7 @@
-
getChildHtml('topMenu') ?>
- -
getChildHtml('topLinks') ?>
diff --git a/skin/frontend/rwd/default/css/styles.css b/skin/frontend/rwd/default/css/styles.css index 1d08f990864..280a5fefdd2 100644 --- a/skin/frontend/rwd/default/css/styles.css +++ b/skin/frontend/rwd/default/css/styles.css @@ -3230,12 +3230,6 @@ body { .logo img { max-width: 100%; } -.logo .small { - display: block; -} -.logo .large { - display: none; -} .logo:hover { opacity: 0.8; @@ -3246,12 +3240,6 @@ body { max-width: 300px; min-height: 90px; } - .logo .small { - display: none; - } - .logo .large { - display: block; - } } /* ============================================ * * Skip Links diff --git a/skin/frontend/rwd/default/images/logo.gif b/skin/frontend/rwd/default/images/logo.gif deleted file mode 100644 index e4202278b26456e518f483e479805e2db85a36f6..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1013 zcmVgYnPz5Y|Ns900000000000A^!_bMO0Hm zK~P09E-(WD0000X`2+<300aOm00000!~i$|00aL>y4?OS%1NueIP1;3|6nMNWNDsg zs;+G7zHlthbZy^wuJ3&B|G=QI2Phhk$fOb=2n?ULrF41}K(8^XR%*q1SKDyX`7N8o z=wjE*4yDuNww&`u$LIJgp5>0|d&; z&A!jOqRXw;oN?08+riSm$=g=m)z9Y3w%eTxOsxx6Xr(H7DinJ#&&U+_aoOh4K?uPaC*a;!Y;j^$clGsuiWhvr15cCJH){ z1RL5wt4Oj85}rlnz#GjzX4UFDI+tzHy1%}KEXj%M09XL=0RX1zq^qxGcb5Eg6m0{5 zdp|Cui)^!M{*K=Fr8VZNq@*8% znOpep-Mx3R&JB02r4>iVCl77>?%@CawHF$F1E435dIz$n-Cqw>HJyH_%tqT*lDXFz zL89^ZUVq>@;9!0b4*1H1eHbVTf+s47QgbC);h1LG+(zPU`0e+fjRG#nSaCG+h+|H) zndsaS>xsqJ9d8N8Ab&1)*pF@4`IXytA#Ugwiwi=tqI_CjMw5`L9Z}>)H!=g&PfGr! z6ovqyq|Au65=HSPisq$CjJet{E8TIFLe%6`E2ull z2_l`2qN>h*xHbxEPYS@Agsi7UU{X{cuu+vOJ7&^K$|t0-a_s}cSc{lEtkyD0GPkg1 z9Xhskyiv+U(;531}_ExY;A^}dIubA#O+X27<+vJ~I z7${MvpzWrpsRj%;>=i&KMWq3W^@40qVIVL3tHut?gk>8UqnuGn{(8}}%iIn$tsKVD joB>vZ>Fo2*KnE@K&_ow)^wCHst@P4NH|;bI2><{)w7cd1 diff --git a/skin/frontend/rwd/default/images/logo.svg b/skin/frontend/rwd/default/images/logo.svg new file mode 100644 index 00000000000..c64be5599bf --- /dev/null +++ b/skin/frontend/rwd/default/images/logo.svg @@ -0,0 +1,45 @@ + + + + + + + + + diff --git a/skin/frontend/rwd/default/images/logo_print.gif b/skin/frontend/rwd/default/images/logo_print.gif deleted file mode 100644 index 0c4ed888223917621f89d9a637839a6215f436a0..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 949 zcmV;m14{fyNk%w1VZ;C?0HOo{M)jvi#5OhB$|>%Q=a&ZZjQc&_7g?@YU( za7ZNhjtX0G$!vmjFTz=$7x>^MbO<>-f;^Pbh^Y(1v54%RCX6|*YS(Emzk-zt6dG2HVkLx2l0_IqK@kE{ zEa^{fSrud}1U)KNnAg4>5AoGIE3m4nP!AVAW_4CKRo$|zWlHoR23rI$XOI`{o9E7h z>l(h0m~`R47piJ*3@w&7&$;M6eGqWzf_R}T-$Jc5pGJ6R&zx1k*mOVR)p$?+sa&^B zgtR%Ckp4rrn`6y6UMv?}@z~?NtFcc0b2Ibu<8N(u{Fv8t_ti(IK3&+nZ)TpqNyVID_2d&q zVZBwAkRaaZ+<`2Y`~iys&LDP3&p9TL8cItd0PwFeLDmuZlt@$teYxet^(e2 z;I6tm^cSFACBS=ak|f-VuMRJ{*%ArOvO;XaZDFDfx-t$-1g!r^{DHt0-$3z68F#Q+ X#}mJ!E6C&VOLD&a7+Nm}2><{)TVcs4 diff --git a/skin/frontend/rwd/default/scss/layout/_header.scss b/skin/frontend/rwd/default/scss/layout/_header.scss index 4b951315aa6..5c2b8633d02 100644 --- a/skin/frontend/rwd/default/scss/layout/_header.scss +++ b/skin/frontend/rwd/default/scss/layout/_header.scss @@ -117,13 +117,6 @@ img { max-width: 100%; } - - .small { - display: block; - } - .large { - display: none; - } } .logo:hover { @@ -137,13 +130,6 @@ .logo { max-width: 300px; min-height: 90px; - - .small { - display: none; - } - .large { - display: block; - } } } From 0e8319ca1481a540e19327c1837330d60ec44f86 Mon Sep 17 00:00:00 2001 From: Fabrizio Balliano Date: Sat, 13 May 2023 11:38:35 +0100 Subject: [PATCH 08/15] Removed "MAGE" cache tag (#3246) --- app/code/core/Mage/Admin/Model/Resource/Block.php | 2 +- app/code/core/Mage/Admin/Model/Resource/Variable.php | 2 +- app/code/core/Mage/Core/Model/App.php | 6 ------ app/code/core/Mage/Core/Model/Cache.php | 9 +-------- .../Mage/Core/Model/Resource/Db/Collection/Abstract.php | 1 - 5 files changed, 3 insertions(+), 17 deletions(-) diff --git a/app/code/core/Mage/Admin/Model/Resource/Block.php b/app/code/core/Mage/Admin/Model/Resource/Block.php index 9d813502937..bec218c7fcf 100644 --- a/app/code/core/Mage/Admin/Model/Resource/Block.php +++ b/app/code/core/Mage/Admin/Model/Resource/Block.php @@ -70,7 +70,7 @@ protected function _generateCache() Mage::app()->saveCache( Mage::helper('core')->jsonEncode($data), self::CACHE_ID, - [Mage_Core_Model_App::CACHE_TAG] + [Mage_Core_Model_Resource_Db_Collection_Abstract::CACHE_TAG] ); } diff --git a/app/code/core/Mage/Admin/Model/Resource/Variable.php b/app/code/core/Mage/Admin/Model/Resource/Variable.php index bef4a9d08cb..05264f8fee1 100644 --- a/app/code/core/Mage/Admin/Model/Resource/Variable.php +++ b/app/code/core/Mage/Admin/Model/Resource/Variable.php @@ -38,7 +38,7 @@ protected function _generateCache() Mage::app()->saveCache( Mage::helper('core')->jsonEncode($data), self::CACHE_ID, - [Mage_Core_Model_App::CACHE_TAG] + [Mage_Core_Model_Resource_Db_Collection_Abstract::CACHE_TAG] ); } diff --git a/app/code/core/Mage/Core/Model/App.php b/app/code/core/Mage/Core/Model/App.php index 63fcd034ea8..e6750cf4ace 100644 --- a/app/code/core/Mage/Core/Model/App.php +++ b/app/code/core/Mage/Core/Model/App.php @@ -36,12 +36,6 @@ class Mage_Core_Model_App public const DISTRO_LOCALE_CODE = 'en_US'; - /** - * Cache tag for all cache data exclude config cache - * - */ - public const CACHE_TAG = 'MAGE'; - /** * Default store Id (for install) */ diff --git a/app/code/core/Mage/Core/Model/Cache.php b/app/code/core/Mage/Core/Model/Cache.php index 3e2c236d69c..bc34eb5072f 100644 --- a/app/code/core/Mage/Core/Model/Cache.php +++ b/app/code/core/Mage/Core/Model/Cache.php @@ -381,12 +381,6 @@ public function save($data, $id, $tags = [], $lifeTime = null) return true; } - /** - * Add global magento cache tag to all cached data exclude config cache - */ - if (!in_array(Mage_Core_Model_Config::CACHE_TAG, $tags)) { - $tags[] = Mage_Core_Model_App::CACHE_TAG; - } return $this->getFrontend()->save((string)$data, $this->_id($id), $this->_tags($tags), $lifeTime); } @@ -427,8 +421,7 @@ public function clean($tags = []) } $res = $this->getFrontend()->clean($mode, $this->_tags($tags)); } else { - $res = $this->getFrontend()->clean($mode, [Mage_Core_Model_App::CACHE_TAG]); - $res = $res && $this->getFrontend()->clean($mode, [Mage_Core_Model_Config::CACHE_TAG]); + $this->flush(); } return $res; } diff --git a/app/code/core/Mage/Core/Model/Resource/Db/Collection/Abstract.php b/app/code/core/Mage/Core/Model/Resource/Db/Collection/Abstract.php index cce44677818..5da86165218 100644 --- a/app/code/core/Mage/Core/Model/Resource/Db/Collection/Abstract.php +++ b/app/code/core/Mage/Core/Model/Resource/Db/Collection/Abstract.php @@ -687,7 +687,6 @@ protected function _saveCache($data, $select) protected function _getCacheTags() { $tags = parent::_getCacheTags(); - $tags[] = Mage_Core_Model_App::CACHE_TAG; $tags[] = self::CACHE_TAG; return $tags; } From c0d136a15bed3972997da017d0badf11dac89db6 Mon Sep 17 00:00:00 2001 From: Tony Date: Sat, 13 May 2023 14:06:35 +0200 Subject: [PATCH 09/15] Improved handling of ignore_user_agents (#3238) Co-authored-by: Fabrizio Balliano --- app/code/core/Mage/Log/Model/Visitor.php | 17 ++++++++++------ app/code/core/Mage/Log/etc/config.xml | 25 +++++++++++++++++++++--- 2 files changed, 33 insertions(+), 9 deletions(-) diff --git a/app/code/core/Mage/Log/Model/Visitor.php b/app/code/core/Mage/Log/Model/Visitor.php index 96b8e29d344..751a504d5f7 100644 --- a/app/code/core/Mage/Log/Model/Visitor.php +++ b/app/code/core/Mage/Log/Model/Visitor.php @@ -101,17 +101,22 @@ public function __construct(array $data = []) protected function _construct() { $this->_init('log/visitor'); - $userAgent = $this->_httpHelper->getHttpUserAgent(); + if ($this->_logCondition->isLogDisabled()) { + $this->_skipRequestLogging = true; + return; + } + $ignoreAgents = $this->_config->getNode('global/ignore_user_agents'); if ($ignoreAgents) { $ignoreAgents = $ignoreAgents->asArray(); - if (in_array($userAgent, $ignoreAgents)) { - $this->_skipRequestLogging = true; + $userAgent = $this->_httpHelper->getHttpUserAgent(); + foreach ($ignoreAgents as $ignoreAgent) { + if (stripos($userAgent, $ignoreAgent) !== false) { + $this->_skipRequestLogging = true; + break; + } } } - if ($this->_logCondition->isLogDisabled()) { - $this->_skipRequestLogging = true; - } } /** diff --git a/app/code/core/Mage/Log/etc/config.xml b/app/code/core/Mage/Log/etc/config.xml index 41e8f048295..f7119dd1259 100644 --- a/app/code/core/Mage/Log/etc/config.xml +++ b/app/code/core/Mage/Log/etc/config.xml @@ -29,9 +29,28 @@ - Googlebot/1.0 (googlebot@googlebot.com http://googlebot.com/) - Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html) - Googlebot/2.1 (+http://www.googlebot.com/bot.html) + AdsBot + AlphaBot + Amazonbot + bingbot + BLEXBot + DotBot + facebookexternalhit + Googlebot + Google-Site-Verification + AhrefsBot + istellabot + MauiBot + MJ12bot + mod_pagespeed + spbot + Pinterestbot + SemrushBot + SEOTesterBot + YandexBot + YandexImages + YandexMobileBot + ZoominfoBot From 63595d09af513e5319385e5276bfd22c7ecd26b1 Mon Sep 17 00:00:00 2001 From: Cosmo Date: Sat, 13 May 2023 21:13:13 +0800 Subject: [PATCH 10/15] Fixed "if newsletter module disabled, customer backend would blank without notice" (#3078) Co-authored-by: Fabrizio Balliano --- .../Adminhtml/Block/Customer/Edit/Tabs.php | 16 +++++----- .../Block/Sales/Order/View/Giftmessage.php | 29 +++++++++++-------- app/etc/modules/Mage_Captcha.xml | 4 +-- lib/Varien/Data/Form/Abstract.php | 8 ++++- 4 files changed, 34 insertions(+), 23 deletions(-) diff --git a/app/code/core/Mage/Adminhtml/Block/Customer/Edit/Tabs.php b/app/code/core/Mage/Adminhtml/Block/Customer/Edit/Tabs.php index 510700ea5dd..256c104c1c3 100644 --- a/app/code/core/Mage/Adminhtml/Block/Customer/Edit/Tabs.php +++ b/app/code/core/Mage/Adminhtml/Block/Customer/Edit/Tabs.php @@ -73,13 +73,15 @@ protected function _beforeToHtml() 'url' => $this->getUrl('*/*/wishlist', ['_current' => true]), ]); - /** @var Mage_Adminhtml_Block_Customer_Edit_Tab_Newsletter $block */ - $block = $this->getLayout()->createBlock('adminhtml/customer_edit_tab_newsletter'); - if (Mage::getSingleton('admin/session')->isAllowed('newsletter/subscriber')) { - $this->addTab('newsletter', [ - 'label' => Mage::helper('customer')->__('Newsletter'), - 'content' => $block->initForm()->toHtml() - ]); + if (Mage::helper('core')->isModuleOutputEnabled('Mage_Newsletter')) { + /** @var Mage_Adminhtml_Block_Customer_Edit_Tab_Newsletter $block */ + $block = $this->getLayout()->createBlock('adminhtml/customer_edit_tab_newsletter'); + if (Mage::getSingleton('admin/session')->isAllowed('newsletter/subscriber')) { + $this->addTab('newsletter', [ + 'label' => Mage::helper('customer')->__('Newsletter'), + 'content' => $block->initForm()->toHtml() + ]); + } } if (Mage::getSingleton('admin/session')->isAllowed('catalog/reviews_ratings')) { diff --git a/app/code/core/Mage/Adminhtml/Block/Sales/Order/View/Giftmessage.php b/app/code/core/Mage/Adminhtml/Block/Sales/Order/View/Giftmessage.php index ce5b18ce4de..88c894a345a 100644 --- a/app/code/core/Mage/Adminhtml/Block/Sales/Order/View/Giftmessage.php +++ b/app/code/core/Mage/Adminhtml/Block/Sales/Order/View/Giftmessage.php @@ -50,10 +50,14 @@ public function getOrder() */ protected function _beforeToHtml() { - if ($this->getParentBlock() && ($order = $this->getOrder())) { - $this->setEntity($order); + if (Mage::helper('core')->isModuleOutputEnabled('Mage_Giftmessage')) { + if ($this->getParentBlock() && ($order = $this->getOrder())) { + $this->setEntity($order); + } + return parent::_beforeToHtml(); + } else { + return parent::_beforeToHtml(); } - return parent::_beforeToHtml(); } /** @@ -63,15 +67,16 @@ protected function _beforeToHtml() */ protected function _prepareLayout() { - $this->setChild( - 'save_button', - $this->getLayout()->createBlock('adminhtml/widget_button') - ->setData([ - 'label' => Mage::helper('giftmessage')->__('Save Gift Message'), - 'class' => 'save' - ]) - ); - + if (Mage::helper('core')->isModuleOutputEnabled('Mage_Giftmessage')) { + $this->setChild( + 'save_button', + $this->getLayout()->createBlock('adminhtml/widget_button') + ->setData([ + 'label' => Mage::helper('giftmessage')->__('Save Gift Message'), + 'class' => 'save' + ]) + ); + } return $this; } diff --git a/app/etc/modules/Mage_Captcha.xml b/app/etc/modules/Mage_Captcha.xml index 6622355c4d0..a7e1ae74b07 100644 --- a/app/etc/modules/Mage_Captcha.xml +++ b/app/etc/modules/Mage_Captcha.xml @@ -21,9 +21,7 @@ core - - - + diff --git a/lib/Varien/Data/Form/Abstract.php b/lib/Varien/Data/Form/Abstract.php index 8c43dec64c3..e71920d1107 100644 --- a/lib/Varien/Data/Form/Abstract.php +++ b/lib/Varien/Data/Form/Abstract.php @@ -132,7 +132,13 @@ public function addField($elementId, $type, $config, $after = false) } else { $className = 'Varien_Data_Form_Element_' . ucfirst(strtolower($type)); } - $element = new $className($config); + + if (class_exists($className)) { + $element = new $className($config); + } else { + $className = 'Varien_Data_Form_Element_Note'; + $element = new $className($config); + } $element->setId($elementId); $this->addElement($element, $after); return $element; From 5ab1fd6979cf2ad626ed61711d2a5752bebb6db4 Mon Sep 17 00:00:00 2001 From: Rasmus Frederiksen Date: Sun, 14 May 2023 11:03:25 +0200 Subject: [PATCH 11/15] Also change the default when calling setTheme (#1736) Co-authored-by: Fabrizio Balliano --- app/code/core/Mage/Core/Model/Design/Package.php | 4 ++-- phpstan.dist.baseline.neon | 10 ---------- 2 files changed, 2 insertions(+), 12 deletions(-) diff --git a/app/code/core/Mage/Core/Model/Design/Package.php b/app/code/core/Mage/Core/Model/Design/Package.php index dc1b5d02526..d276084c3e0 100644 --- a/app/code/core/Mage/Core/Model/Design/Package.php +++ b/app/code/core/Mage/Core/Model/Design/Package.php @@ -56,7 +56,7 @@ class Mage_Core_Model_Design_Package /** * Package theme * - * @var string + * @var array */ protected $_theme; @@ -242,7 +242,7 @@ public function setTheme() { switch (func_num_args()) { case 1: - foreach (['layout', 'template', 'skin', 'locale'] as $type) { + foreach (['layout', 'template', 'skin', 'locale', 'default'] as $type) { $this->_theme[$type] = func_get_arg(0); } break; diff --git a/phpstan.dist.baseline.neon b/phpstan.dist.baseline.neon index e2c7bf2021a..36ac815ce73 100644 --- a/phpstan.dist.baseline.neon +++ b/phpstan.dist.baseline.neon @@ -2125,16 +2125,6 @@ parameters: count: 1 path: app/code/core/Mage/Core/Model/Design/Package.php - - - message: "#^Cannot assign offset 'layout'\\|'locale'\\|'skin'\\|'template' to string\\.$#" - count: 1 - path: app/code/core/Mage/Core/Model/Design/Package.php - - - - message: "#^Cannot assign offset string to string\\.$#" - count: 1 - path: app/code/core/Mage/Core/Model/Design/Package.php - - message: "#^Property Mage_Core_Model_Design_Package\\:\\:\\$_store \\(int\\|Mage_Core_Model_Store\\|string\\) on left side of \\?\\? is not nullable\\.$#" count: 1 From c925d26cfc03fae3a96a939e23aef4c9ae494f29 Mon Sep 17 00:00:00 2001 From: Loek van Gool Date: Sun, 14 May 2023 11:32:01 +0200 Subject: [PATCH 12/15] Allowed "force enabling" of flat tables use for a product collection (#2954) Co-authored-by: Fabrizio Balliano --- app/code/core/Mage/Catalog/Helper/Product/Flat.php | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/app/code/core/Mage/Catalog/Helper/Product/Flat.php b/app/code/core/Mage/Catalog/Helper/Product/Flat.php index cc1b0d1cbee..7e2f801ef14 100644 --- a/app/code/core/Mage/Catalog/Helper/Product/Flat.php +++ b/app/code/core/Mage/Catalog/Helper/Product/Flat.php @@ -164,6 +164,20 @@ public function isAddChildData() return (int) Mage::getConfig()->getNode(self::XML_NODE_ADD_CHILD_DATA); } + /** + * Enable Catalog Product Flat + * + * @param bool $save + */ + public function enableFlatCollection($save = false) + { + if ($save) { + $this->_forceFlatStatusOld = $this->_forceFlatStatus; + } + + $this->_forceFlatStatus = false; + } + /** * Disable Catalog Product Flat * From b427332d8fcdb6676d523048f948644b4858b2d8 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 15 May 2023 08:46:01 +0100 Subject: [PATCH 13/15] Bump phpunit/phpunit from 9.6.7 to 9.6.8 (#3261) --- composer.lock | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/composer.lock b/composer.lock index bc07386c91c..41fce5a0797 100644 --- a/composer.lock +++ b/composer.lock @@ -3748,16 +3748,16 @@ }, { "name": "phpunit/phpunit", - "version": "9.6.7", + "version": "9.6.8", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "c993f0d3b0489ffc42ee2fe0bd645af1538a63b2" + "reference": "17d621b3aff84d0c8b62539e269e87d8d5baa76e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/c993f0d3b0489ffc42ee2fe0bd645af1538a63b2", - "reference": "c993f0d3b0489ffc42ee2fe0bd645af1538a63b2", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/17d621b3aff84d0c8b62539e269e87d8d5baa76e", + "reference": "17d621b3aff84d0c8b62539e269e87d8d5baa76e", "shasum": "" }, "require": { @@ -3831,7 +3831,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/phpunit/issues", "security": "https://github.com/sebastianbergmann/phpunit/security/policy", - "source": "https://github.com/sebastianbergmann/phpunit/tree/9.6.7" + "source": "https://github.com/sebastianbergmann/phpunit/tree/9.6.8" }, "funding": [ { @@ -3847,7 +3847,7 @@ "type": "tidelift" } ], - "time": "2023-04-14T08:58:40+00:00" + "time": "2023-05-11T05:14:45+00:00" }, { "name": "psr/cache", @@ -4298,16 +4298,16 @@ }, { "name": "sebastian/diff", - "version": "4.0.4", + "version": "4.0.5", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/diff.git", - "reference": "3461e3fccc7cfdfc2720be910d3bd73c69be590d" + "reference": "74be17022044ebaaecfdf0c5cd504fc9cd5a7131" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/3461e3fccc7cfdfc2720be910d3bd73c69be590d", - "reference": "3461e3fccc7cfdfc2720be910d3bd73c69be590d", + "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/74be17022044ebaaecfdf0c5cd504fc9cd5a7131", + "reference": "74be17022044ebaaecfdf0c5cd504fc9cd5a7131", "shasum": "" }, "require": { @@ -4352,7 +4352,7 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/diff/issues", - "source": "https://github.com/sebastianbergmann/diff/tree/4.0.4" + "source": "https://github.com/sebastianbergmann/diff/tree/4.0.5" }, "funding": [ { @@ -4360,7 +4360,7 @@ "type": "github" } ], - "time": "2020-10-26T13:10:38+00:00" + "time": "2023-05-07T05:35:17+00:00" }, { "name": "sebastian/environment", From 7055d1966d6447cc964c561c474cae21927a8e06 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 15 May 2023 08:46:30 +0100 Subject: [PATCH 14/15] Bump phpstan/phpstan from 1.10.14 to 1.10.15 (#3260) --- composer.lock | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/composer.lock b/composer.lock index 41fce5a0797..551b6d6fc52 100644 --- a/composer.lock +++ b/composer.lock @@ -3368,16 +3368,16 @@ }, { "name": "phpstan/phpstan", - "version": "1.10.14", + "version": "1.10.15", "source": { "type": "git", "url": "https://github.com/phpstan/phpstan.git", - "reference": "d232901b09e67538e5c86a724be841bea5768a7c" + "reference": "762c4dac4da6f8756eebb80e528c3a47855da9bd" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpstan/zipball/d232901b09e67538e5c86a724be841bea5768a7c", - "reference": "d232901b09e67538e5c86a724be841bea5768a7c", + "url": "https://api.github.com/repos/phpstan/phpstan/zipball/762c4dac4da6f8756eebb80e528c3a47855da9bd", + "reference": "762c4dac4da6f8756eebb80e528c3a47855da9bd", "shasum": "" }, "require": { @@ -3426,7 +3426,7 @@ "type": "tidelift" } ], - "time": "2023-04-19T13:47:27+00:00" + "time": "2023-05-09T15:28:01+00:00" }, { "name": "phpunit/php-code-coverage", From f12eb44ecf6b0581fa4aa4f15774fcf021546432 Mon Sep 17 00:00:00 2001 From: Fabrizio Balliano Date: Mon, 15 May 2023 08:54:40 +0100 Subject: [PATCH 15/15] Fixed PHPStan error in Mage_HTTP_Client_Socket and Mage_HTTP_Client_Curl (#3205) --- lib/Mage/HTTP/Client/Curl.php | 12 ++++++------ lib/Mage/HTTP/Client/Socket.php | 12 ++++++------ phpstan.dist.issues.neon | 6 ------ 3 files changed, 12 insertions(+), 18 deletions(-) diff --git a/lib/Mage/HTTP/Client/Curl.php b/lib/Mage/HTTP/Client/Curl.php index 8b34c3e6aab..7d094a6b3d8 100644 --- a/lib/Mage/HTTP/Client/Curl.php +++ b/lib/Mage/HTTP/Client/Curl.php @@ -264,11 +264,11 @@ public function getCookies() if (!$c) { continue; } - list($key, $val) = explode("=", $values[0]); - if (is_null($val)) { + list($key, $val) = array_pad(array_map('trim', explode('=', $values[0])), 2, null); + if (is_null($val) || !strlen($key)) { continue; } - $out[trim($key)] = trim($val); + $out[$key] = $val; } return $out; } @@ -290,11 +290,11 @@ public function getCookiesFull() if (!$c) { continue; } - list($key, $val) = explode("=", $values[0]); - if (is_null($val)) { + list($key, $val) = array_pad(array_map('trim', explode('=', $values[0])), 2, null); + if (is_null($val) || !strlen($key)) { continue; } - $out[trim($key)] = ['value' => trim($val)]; + $out[$key] = ['value' => $val]; array_shift($values); $c--; if (!$c) { diff --git a/lib/Mage/HTTP/Client/Socket.php b/lib/Mage/HTTP/Client/Socket.php index 685a345a2d8..78f7827f4df 100644 --- a/lib/Mage/HTTP/Client/Socket.php +++ b/lib/Mage/HTTP/Client/Socket.php @@ -303,11 +303,11 @@ public function getCookies() if (!$c) { continue; } - list($key, $val) = explode("=", $values[0]); - if (is_null($val)) { + list($key, $val) = array_pad(array_map('trim', explode('=', $values[0])), 2, null); + if (is_null($val) || !strlen($key)) { continue; } - $out[trim($key)] = trim($val); + $out[$key] = $val; } return $out; } @@ -329,11 +329,11 @@ public function getCookiesFull() if (!$c) { continue; } - list($key, $val) = explode("=", $values[0]); - if (is_null($val)) { + list($key, $val) = array_pad(array_map('trim', explode('=', $values[0])), 2, null); + if (is_null($val) || !strlen($key)) { continue; } - $out[trim($key)] = ['value' => trim($val)]; + $out[$key] = ['value' => $val]; array_shift($values); $c--; if (!$c) { diff --git a/phpstan.dist.issues.neon b/phpstan.dist.issues.neon index 6bbad89042e..3c05c5a34c8 100644 --- a/phpstan.dist.issues.neon +++ b/phpstan.dist.issues.neon @@ -5,9 +5,3 @@ parameters: - message: "#Call to function is_null\\(\\) with bool will always evaluate to false.$#" path: app/code/core/Mage/Newsletter/Model/Subscriber.php - - - message: "#Call to function is_null\\(\\) with string will always evaluate to false.$#" - path: lib/Mage/HTTP/Client/Curl.php - - - message: "#Call to function is_null\\(\\) with string will always evaluate to false.$#" - path: lib/Mage/HTTP/Client/Socket.php