From dcbc801cbe8d46ef7a5ac785d66ad0a54f8773e1 Mon Sep 17 00:00:00 2001 From: Thai Phan Date: Tue, 26 Jan 2016 19:26:28 +1100 Subject: [PATCH 001/105] Update nginx.conf.sample I replaced the `?` characters with `$is_args`. `$is_args` returns `?` if a request line has arguments or an empty string if otherwise. --- nginx.conf.sample | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/nginx.conf.sample b/nginx.conf.sample index 87b28aa9f691d..1897d59bfae9b 100644 --- a/nginx.conf.sample +++ b/nginx.conf.sample @@ -65,7 +65,7 @@ location /update { } location / { - try_files $uri $uri/ /index.php?$args; + try_files $uri $uri/ /index.php$is_args$args; } location /pub { @@ -105,7 +105,7 @@ location /static/ { } location /media/ { - try_files $uri $uri/ /get.php?$args; + try_files $uri $uri/ /get.php$is_args$args; location ~ ^/media/theme_customization/.*\.xml { deny all; @@ -115,13 +115,13 @@ location /media/ { add_header Cache-Control "public"; add_header X-Frame-Options "SAMEORIGIN"; expires +1y; - try_files $uri $uri/ /get.php?$args; + try_files $uri $uri/ /get.php$is_args$args; } location ~* \.(zip|gz|gzip|bz2|csv|xml)$ { add_header Cache-Control "no-store"; add_header X-Frame-Options "SAMEORIGIN"; expires off; - try_files $uri $uri/ /get.php?$args; + try_files $uri $uri/ /get.php$is_args$args; } add_header X-Frame-Options "SAMEORIGIN"; } From b03bfd05cd683f779e60ad7472b354f7a17bc7cb Mon Sep 17 00:00:00 2001 From: Oleksandr Miroshnichenko Date: Thu, 24 Mar 2016 11:00:55 +0200 Subject: [PATCH 002/105] MAGETWO-49763: JS validation is missed on required User-Agent fields on "Edit Design Configuration" Admin page --- .../view/adminhtml/ui_component/design_config_form.xml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/app/code/Magento/Backend/view/adminhtml/ui_component/design_config_form.xml b/app/code/Magento/Backend/view/adminhtml/ui_component/design_config_form.xml index 6cbada2179fc4..2db844b952b3b 100644 --- a/app/code/Magento/Backend/view/adminhtml/ui_component/design_config_form.xml +++ b/app/code/Magento/Backend/view/adminhtml/ui_component/design_config_form.xml @@ -69,6 +69,9 @@ false Search String false + + true + @@ -82,6 +85,9 @@ false Theme Name false + + true + From 66d19602e9627b2c446dd5445ff62bfbc2eea2b6 Mon Sep 17 00:00:00 2001 From: Aneurin Barker Snook Date: Wed, 4 May 2016 10:12:21 +0100 Subject: [PATCH 003/105] don't hardcode the Magento_Backend::admin index --- .../Integration/Activate/Permissions/Tab/Webapi.php | 12 ++++++++++-- .../Block/Adminhtml/Integration/Edit/Tab/Webapi.php | 6 +++++- app/code/Magento/User/Block/Role/Tab/Edit.php | 10 +++++++--- 3 files changed, 22 insertions(+), 6 deletions(-) diff --git a/app/code/Magento/Integration/Block/Adminhtml/Integration/Activate/Permissions/Tab/Webapi.php b/app/code/Magento/Integration/Block/Adminhtml/Integration/Activate/Permissions/Tab/Webapi.php index 81b558f3267e2..0c108b11a4049 100644 --- a/app/code/Magento/Integration/Block/Adminhtml/Integration/Activate/Permissions/Tab/Webapi.php +++ b/app/code/Magento/Integration/Block/Adminhtml/Integration/Activate/Permissions/Tab/Webapi.php @@ -148,7 +148,11 @@ public function isEverythingAllowed() public function getResourcesTreeJson() { $resources = $this->_resourceProvider->getAclResources(); - $aclResourcesTree = $this->_integrationData->mapResources($resources[1]['children']); + $configResource = array_filter($resources, function($node) { + return $node['id'] == 'Magento_Backend::admin'; + }); + $configResource = reset($configResource); + $aclResourcesTree = $this->_integrationData->mapResources($configResource['children']); return $this->encoder->encode($aclResourcesTree); } @@ -167,7 +171,11 @@ public function getSelectedResourcesJson() $selectedResources = $this->_selectedResources; if ($this->isEverythingAllowed()) { $resources = $this->_resourceProvider->getAclResources(); - $selectedResources = $this->_getAllResourceIds($resources[1]['children']); + $configResource = array_filter($resources, function($node) { + return $node['id'] == 'Magento_Backend::admin'; + }); + $configResource = reset($configResource); + $selectedResources = $this->_getAllResourceIds($configResource['children']); } return $this->encoder->encode($selectedResources); } diff --git a/app/code/Magento/Integration/Block/Adminhtml/Integration/Edit/Tab/Webapi.php b/app/code/Magento/Integration/Block/Adminhtml/Integration/Edit/Tab/Webapi.php index ecd361aaadf94..d6eb51cd27914 100644 --- a/app/code/Magento/Integration/Block/Adminhtml/Integration/Edit/Tab/Webapi.php +++ b/app/code/Magento/Integration/Block/Adminhtml/Integration/Edit/Tab/Webapi.php @@ -176,8 +176,12 @@ public function isEverythingAllowed() public function getTree() { $resources = $this->aclResourceProvider->getAclResources(); + $configResource = array_filter($resources, function($node) { + return $node['id'] == 'Magento_Backend::admin'; + }); + $configResource = reset($configResource); $rootArray = $this->integrationData->mapResources( - isset($resources[1]['children']) ? $resources[1]['children'] : [] + isset($configResource['children']) ? $configResource['children'] : [] ); return $rootArray; } diff --git a/app/code/Magento/User/Block/Role/Tab/Edit.php b/app/code/Magento/User/Block/Role/Tab/Edit.php index 81fe19eeff706..caf8a60007675 100644 --- a/app/code/Magento/User/Block/Role/Tab/Edit.php +++ b/app/code/Magento/User/Block/Role/Tab/Edit.php @@ -198,9 +198,13 @@ public function getSelectedResources() */ public function getTree() { - $resources = $this->_aclResourceProvider->getAclResources(); - $rootArray = $this->_integrationData->mapResources( - isset($resources[1]['children']) ? $resources[1]['children'] : [] + $resources = $this->aclResourceProvider->getAclResources(); + $configResource = array_filter($resources, function($node) { + return $node['id'] == 'Magento_Backend::admin'; + }); + $configResource = reset($configResource); + $rootArray = $this->integrationData->mapResources( + isset($configResource['children']) ? $configResource['children'] : [] ); return $rootArray; } From e84b5a5c176ccbda91e0aa60fd18f0a11a943714 Mon Sep 17 00:00:00 2001 From: Raj KB Date: Fri, 13 May 2016 17:22:32 +0400 Subject: [PATCH 004/105] Correction: variable naming for user roles & role id --- app/code/Magento/User/Block/User/Edit/Tab/Roles.php | 10 +++++----- .../Magento/User/Controller/Adminhtml/User/Save.php | 6 +++--- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/app/code/Magento/User/Block/User/Edit/Tab/Roles.php b/app/code/Magento/User/Block/User/Edit/Tab/Roles.php index 8d835267fca5e..c3b2a5f7050ee 100644 --- a/app/code/Magento/User/Block/User/Edit/Tab/Roles.php +++ b/app/code/Magento/User/Block/User/Edit/Tab/Roles.php @@ -143,19 +143,19 @@ public function getSelectedRoles($json = false) //checking if we have this data and we //don't need load it through resource model if ($user->hasData('roles')) { - $uRoles = $user->getData('roles'); + $userRoles = $user->getData('roles'); } else { - $uRoles = $user->getRoles(); + $userRoles = $user->getRoles(); } if ($json) { $jsonRoles = []; - foreach ($uRoles as $urid) { - $jsonRoles[$urid] = 0; + foreach ($userRoles as $roleId) { + $jsonRoles[$roleId] = 0; } return $this->_jsonEncoder->encode((object)$jsonRoles); } else { - return $uRoles; + return $userRoles; } } } diff --git a/app/code/Magento/User/Controller/Adminhtml/User/Save.php b/app/code/Magento/User/Controller/Adminhtml/User/Save.php index 048bf50ddba33..f64f480d0bb98 100644 --- a/app/code/Magento/User/Controller/Adminhtml/User/Save.php +++ b/app/code/Magento/User/Controller/Adminhtml/User/Save.php @@ -26,9 +26,9 @@ public function execute() return; } $model->setData($this->_getAdminUserData($data)); - $uRoles = $this->getRequest()->getParam('roles', []); - if (count($uRoles)) { - $model->setRoleId($uRoles[0]); + $userRoles = $this->getRequest()->getParam('roles', []); + if (count($userRoles)) { + $model->setRoleId($userRoles[0]); } /** @var $currentUser \Magento\User\Model\User */ From 5cc1875be0a6c1fcb660040986a92a972931de5b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafael=20Corr=C3=AAa=20Gomes?= Date: Sun, 15 May 2016 21:54:01 -0300 Subject: [PATCH 005/105] Create auth.json.sample Sample auth file like repository Magento Enterprise Cloud Edition --- auth.json.sample | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 auth.json.sample diff --git a/auth.json.sample b/auth.json.sample new file mode 100644 index 0000000000000..81c8fd220eae2 --- /dev/null +++ b/auth.json.sample @@ -0,0 +1,8 @@ +{ + "http-basic": { + "repo.magento.com": { + "username": "", + "password": "" + } + } +} From d2d1d193204fcd3ca2d50b3a989157a88a03a513 Mon Sep 17 00:00:00 2001 From: Kristof Ringleff Date: Fri, 29 Apr 2016 20:51:11 +0200 Subject: [PATCH 006/105] Adds test for getDataUsingMethod using digits --- .../Magento/Framework/Test/Unit/ObjectTest.php | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/lib/internal/Magento/Framework/Test/Unit/ObjectTest.php b/lib/internal/Magento/Framework/Test/Unit/ObjectTest.php index 96ecb2d8d27a8..11a9b697c44e8 100644 --- a/lib/internal/Magento/Framework/Test/Unit/ObjectTest.php +++ b/lib/internal/Magento/Framework/Test/Unit/ObjectTest.php @@ -170,6 +170,22 @@ public function testSetGetDataUsingMethod() $mock->getDataUsingMethod('test_data'); } + /** + * Test documenting current behaviour of getDataUsingMethod + * _underscore assumes an underscore before any digit + */ + public function testGetDataUsingMethodWithoutUnderscore() + { + $this->_object->setData('key_1', 'value1'); + $this->assertTrue($this->_object->hasData('key_1')); + $this->assertEquals('value1', $this->_object->getDataUsingMethod('key_1')); + + $this->_object->setData('key2', 'value2'); + $this->assertEquals('value2', $this->_object->getData('key2')); + $this->assertEquals(null, $this->_object->getKey2()); + $this->assertEquals(null, $this->_object->getDataUsingMethod('key2')); + } + /** * Tests \Magento\Framework\DataObject->hasData() */ From 29abd2f8babc1763e523b77d7a9e2560835163f1 Mon Sep 17 00:00:00 2001 From: Oleksandr Miroshnichenko Date: Wed, 8 Jun 2016 15:09:18 +0300 Subject: [PATCH 007/105] MAGETWO-53161: Tooltip click does not prevent anchor event --- .../Ui/view/base/web/js/lib/knockout/bindings/tooltip.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/code/Magento/Ui/view/base/web/js/lib/knockout/bindings/tooltip.js b/app/code/Magento/Ui/view/base/web/js/lib/knockout/bindings/tooltip.js index 819058ff7a8dd..6040b1efa7a85 100644 --- a/app/code/Magento/Ui/view/base/web/js/lib/knockout/bindings/tooltip.js +++ b/app/code/Magento/Ui/view/base/web/js/lib/knockout/bindings/tooltip.js @@ -599,6 +599,8 @@ define([ } tooltip.setContent.apply(null, arguments); + + return false; }, /** From ff31e19e3fbf7c9c57c0f34cce6d765476af36cb Mon Sep 17 00:00:00 2001 From: Oleksandr Miroshnichenko Date: Sat, 11 Jun 2016 17:08:56 +0300 Subject: [PATCH 008/105] MAGETWO-51616: Admin data grids search values aren't trimmed --- app/code/Magento/Ui/view/base/web/js/grid/search/search.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/code/Magento/Ui/view/base/web/js/grid/search/search.js b/app/code/Magento/Ui/view/base/web/js/grid/search/search.js index 5760866ec3376..16b850e7641d6 100644 --- a/app/code/Magento/Ui/view/base/web/js/grid/search/search.js +++ b/app/code/Magento/Ui/view/base/web/js/grid/search/search.js @@ -105,7 +105,7 @@ define([ apply: function (value) { value = value || this.inputValue; - this.value = this.inputValue = value; + this.value = this.inputValue = value.trim(); return this; }, From a61d4966aca254fc53cd3a751784c69a67f2969e Mon Sep 17 00:00:00 2001 From: Oleksandr Miroshnichenko Date: Fri, 17 Jun 2016 13:11:02 +0300 Subject: [PATCH 009/105] MAGETWO-46843: Inline translation unavailable for some templates in UI module --- .../template/dynamic-rows/cells/action-delete.html | 2 +- .../adminhtml/web/template/dynamic-rows/grid.html | 6 +++--- .../web/template/form/element/action-delete.html | 2 +- .../templates/dynamic-rows/cells/action-delete.html | 2 +- .../dynamic-rows/templates/collapsible.html | 10 +++++----- .../templates/dynamic-rows/templates/default.html | 6 +++--- .../web/templates/dynamic-rows/templates/grid.html | 6 +++--- .../templates/form/element/uploader/uploader.html | 4 ++-- .../Ui/view/base/web/templates/form/field.html | 4 ++-- .../Ui/view/base/web/templates/form/fieldset.html | 2 +- .../view/base/web/templates/grid/columns/text.html | 2 +- .../base/web/templates/grid/controls/columns.html | 2 +- .../web/templates/grid/filters/elements/group.html | 2 +- .../templates/grid/filters/elements/ui-select.html | 12 ++++-------- .../view/base/web/templates/grid/filters/field.html | 2 +- .../Ui/view/base/web/templates/group/group.html | 2 +- .../web/templates/form/element/helper/tooltip.html | 3 +-- .../Ui/view/frontend/web/templates/form/field.html | 2 +- .../Ui/view/frontend/web/templates/group/group.html | 2 +- 19 files changed, 34 insertions(+), 39 deletions(-) diff --git a/app/code/Magento/Backend/view/adminhtml/web/template/dynamic-rows/cells/action-delete.html b/app/code/Magento/Backend/view/adminhtml/web/template/dynamic-rows/cells/action-delete.html index 117eee7e69fdc..44c460825b45d 100644 --- a/app/code/Magento/Backend/view/adminhtml/web/template/dynamic-rows/cells/action-delete.html +++ b/app/code/Magento/Backend/view/adminhtml/web/template/dynamic-rows/cells/action-delete.html @@ -11,5 +11,5 @@ title: $parent.deleteButtonLabel } "> - + diff --git a/app/code/Magento/Backend/view/adminhtml/web/template/dynamic-rows/grid.html b/app/code/Magento/Backend/view/adminhtml/web/template/dynamic-rows/grid.html index 6e24ee96a62a0..63a3196ff3385 100644 --- a/app/code/Magento/Backend/view/adminhtml/web/template/dynamic-rows/grid.html +++ b/app/code/Magento/Backend/view/adminhtml/web/template/dynamic-rows/grid.html @@ -16,7 +16,7 @@ class="action-secondary" type="button" click="processingAddChild.bind($data, false, false, false)"> - + @@ -30,7 +30,7 @@ css="element.setClasses(element)" attr="'data-index': index">
@@ -51,7 +51,7 @@ diff --git a/app/code/Magento/Catalog/view/adminhtml/web/template/form/element/action-delete.html b/app/code/Magento/Catalog/view/adminhtml/web/template/form/element/action-delete.html index 9f223325939fb..13445314101b2 100644 --- a/app/code/Magento/Catalog/view/adminhtml/web/template/form/element/action-delete.html +++ b/app/code/Magento/Catalog/view/adminhtml/web/template/form/element/action-delete.html @@ -12,5 +12,5 @@ title: $parent.deleteButtonLabel } "> - + \ No newline at end of file diff --git a/app/code/Magento/Ui/view/base/web/templates/dynamic-rows/cells/action-delete.html b/app/code/Magento/Ui/view/base/web/templates/dynamic-rows/cells/action-delete.html index a8a77d593fe98..854705a75d5ce 100644 --- a/app/code/Magento/Ui/view/base/web/templates/dynamic-rows/cells/action-delete.html +++ b/app/code/Magento/Ui/view/base/web/templates/dynamic-rows/cells/action-delete.html @@ -12,5 +12,5 @@ title: $parent.deleteButtonLabel } "> - + \ No newline at end of file diff --git a/app/code/Magento/Ui/view/base/web/templates/dynamic-rows/templates/collapsible.html b/app/code/Magento/Ui/view/base/web/templates/dynamic-rows/templates/collapsible.html index 84a4114254830..df776f59e7b40 100644 --- a/app/code/Magento/Ui/view/base/web/templates/dynamic-rows/templates/collapsible.html +++ b/app/code/Magento/Ui/view/base/web/templates/dynamic-rows/templates/collapsible.html @@ -6,7 +6,7 @@ -->
@@ -22,7 +22,7 @@ - @@ -39,7 +39,7 @@ - +
@@ -66,7 +66,7 @@
diff --git a/app/code/Magento/Ui/view/base/web/templates/dynamic-rows/templates/default.html b/app/code/Magento/Ui/view/base/web/templates/dynamic-rows/templates/default.html index b69c6b0de652a..55ecfedb1affd 100644 --- a/app/code/Magento/Ui/view/base/web/templates/dynamic-rows/templates/default.html +++ b/app/code/Magento/Ui/view/base/web/templates/dynamic-rows/templates/default.html @@ -6,7 +6,7 @@ -->
@@ -24,7 +24,7 @@ - +
diff --git a/app/code/Magento/Ui/view/base/web/templates/dynamic-rows/templates/grid.html b/app/code/Magento/Ui/view/base/web/templates/dynamic-rows/templates/grid.html index 13f1bed36d297..3a5b8ad4631c4 100644 --- a/app/code/Magento/Ui/view/base/web/templates/dynamic-rows/templates/grid.html +++ b/app/code/Magento/Ui/view/base/web/templates/dynamic-rows/templates/grid.html @@ -11,7 +11,7 @@ css="element.setClasses(element)" attr="'data-index': index">
@@ -40,7 +40,7 @@ @@ -73,7 +73,7 @@
diff --git a/app/code/Magento/Ui/view/base/web/templates/form/element/uploader/uploader.html b/app/code/Magento/Ui/view/base/web/templates/form/element/uploader/uploader.html index 7415b4e6c330e..84381319ed22a 100644 --- a/app/code/Magento/Ui/view/base/web/templates/form/element/uploader/uploader.html +++ b/app/code/Magento/Ui/view/base/web/templates/form/element/uploader/uploader.html @@ -6,7 +6,7 @@ -->
@@ -22,7 +22,7 @@
- +