Skip to content

Commit d559d44

Browse files
committed
MAGETWO-60185: Remove distinction in http/https for requirejs-config.js
1 parent e643a67 commit d559d44

File tree

4 files changed

+7
-27
lines changed

4 files changed

+7
-27
lines changed

lib/internal/Magento/Framework/View/Asset/File/FallbackContext.php

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,6 @@
1313
*/
1414
class FallbackContext extends Context
1515
{
16-
/**
17-
* Secure path
18-
*/
19-
const SECURE_PATH = 'secure';
20-
2116
/**
2217
* @var string
2318
*/
@@ -33,24 +28,17 @@ class FallbackContext extends Context
3328
*/
3429
private $locale;
3530

36-
/**
37-
* @var bool
38-
*/
39-
private $isSecure;
40-
4131
/**
4232
* @param string $baseUrl
4333
* @param string $areaType
4434
* @param string $themePath
4535
* @param string $localeCode
46-
* @param bool $isSecure
4736
*/
48-
public function __construct($baseUrl, $areaType, $themePath, $localeCode, $isSecure = false)
37+
public function __construct($baseUrl, $areaType, $themePath, $localeCode)
4938
{
5039
$this->area = $areaType;
5140
$this->theme = $themePath;
5241
$this->locale = $localeCode;
53-
$this->isSecure = $isSecure;
5442
parent::__construct($baseUrl, DirectoryList::STATIC_VIEW, $this->generatePath());
5543
}
5644

@@ -103,6 +91,6 @@ private function generatePath()
10391
*/
10492
public function getConfigPath()
10593
{
106-
return $this->getPath() . ($this->isSecure ? '/' . self::SECURE_PATH : '');
94+
return $this->getPath();
10795
}
10896
}

lib/internal/Magento/Framework/View/Asset/Repository.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -268,8 +268,7 @@ private function getFallbackContext($urlType, $isSecure, $area, $themePath, $loc
268268
'baseUrl' => $url,
269269
'areaType' => $area,
270270
'themePath' => $themePath,
271-
'localeCode' => $locale,
272-
'isSecure' => $isSecure
271+
'localeCode' => $locale
273272
]
274273
);
275274
}

lib/internal/Magento/Framework/View/Test/Unit/Asset/File/FallbackContextTest.php

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@ protected function setUp()
3131
* @param string $areaType
3232
* @param string $themePath
3333
* @param string $localeCode
34-
* @param bool $isSecure
3534
* @param string $expectedResult
3635
* @dataProvider getConfigPathDataProvider
3736
*/
@@ -40,7 +39,6 @@ public function testGetConfigPath(
4039
$areaType,
4140
$themePath,
4241
$localeCode,
43-
$isSecure,
4442
$expectedResult
4543
) {
4644
$this->fallbackContext = $this->objectManager->getObject(
@@ -49,8 +47,7 @@ public function testGetConfigPath(
4947
'baseUrl' => $baseUrl,
5048
'areaType' => $areaType,
5149
'themePath' => $themePath,
52-
'localeCode' => $localeCode,
53-
'isSecure' => $isSecure
50+
'localeCode' => $localeCode
5451
]
5552
);
5653
$this->assertEquals($expectedResult, $this->fallbackContext->getConfigPath());
@@ -64,16 +61,14 @@ public function getConfigPathDataProvider()
6461
'areaType' => 'frontend',
6562
'themePath' => 'Magento/blank',
6663
'localeCode' => 'en_US',
67-
'isSecure' => false,
6864
'expectedResult' => 'frontend/Magento/blank/en_US'
6965
],
7066
'https' => [
7167
'baseUrl' => 'https://some-name.com/pub/static/',
7268
'areaType' => 'frontend',
7369
'themePath' => 'Magento/blank',
7470
'localeCode' => 'en_US',
75-
'isSecure' => true,
76-
'expectedResult' => 'frontend/Magento/blank/en_US/secure'
71+
'expectedResult' => 'frontend/Magento/blank/en_US'
7772
]
7873
];
7974
}

lib/internal/Magento/Framework/View/Test/Unit/Asset/RepositoryTest.php

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -185,8 +185,7 @@ public function testCreateAsset()
185185
'baseUrl' => '',
186186
'areaType' => '',
187187
'themePath' => 'Default',
188-
'localeCode' => '',
189-
'isSecure' => '',
188+
'localeCode' => ''
190189
]
191190
)
192191
->willReturn($fallbackContextMock);
@@ -251,8 +250,7 @@ public function testGetStaticViewFileContext()
251250
'baseUrl' => '',
252251
'areaType' => 'area',
253252
'themePath' => '',
254-
'localeCode' => 'locale',
255-
'isSecure' => '',
253+
'localeCode' => 'locale'
256254
]
257255
)
258256
->willReturn($fallbackContextMock);

0 commit comments

Comments
 (0)