Skip to content

Commit 649dec3

Browse files
committed
MAGETWO-72279: Always use https for Vimeo video's. #10768
- Merge Pull Request #10768 from hostep/magento2:use-https-for-vimeo - Merged commits: 1. c4da890
2 parents e05217d + c4da890 commit 649dec3

File tree

11 files changed

+34
-38
lines changed

11 files changed

+34
-38
lines changed

app/code/Magento/Catalog/Block/Product/Compare/ListCompare.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,6 @@ public function getProductAttributeValue($product, $attribute)
206206
['select', 'boolean', 'multiselect']
207207
)
208208
) {
209-
//$value = $attribute->getSource()->getOptionText($product->getData($attribute->getAttributeCode()));
210209
$value = $attribute->getFrontend()->getValue($product);
211210
} else {
212211
$value = $product->getData($attribute->getAttributeCode());

app/code/Magento/Catalog/view/frontend/templates/product/view/attribute.phtml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ if ($_attributeType && $_attributeType == 'text') {
3434

3535
<?php if ($_attributeValue): ?>
3636
<div class="product attribute <?= /* @escapeNotVerified */ $_className ?>">
37-
<?php if ($_attributeLabel != 'none'): ?><strong class="type"><?= /* @escapeNotVerified */ $_attributeLabel ?></strong><?php endif; ?>
37+
<?php if ($_attributeLabel != __('none')): ?><strong class="type"><?= /* @escapeNotVerified */ $_attributeLabel ?></strong><?php endif; ?>
3838
<div class="value" <?= /* @escapeNotVerified */ $_attributeAddAttribute ?>><?= /* @escapeNotVerified */ $_attributeValue ?></div>
3939
</div>
4040
<?php endif; ?>

app/code/Magento/Email/Test/Unit/Model/Template/FilterTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -369,7 +369,7 @@ public function applyInlineCssDataProvider()
369369
'<html><head><style type="text/css">div { color: #111; }</style></head><p></p></html>',
370370
'p { color: #000 }',
371371
[
372-
'<head><style type="text/css">div { color: #111; }</style></head>',
372+
'<style type="text/css">div { color: #111; }</style>',
373373
'<p style="color: #000;"></p>',
374374
],
375375
],

app/code/Magento/ProductVideo/view/adminhtml/web/js/get-video-information.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -302,7 +302,7 @@ define([
302302
additionalParams += '&autoplay=1';
303303
}
304304

305-
src = window.location.protocol + '//player.vimeo.com/video/' +
305+
src = 'https://player.vimeo.com/video/' +
306306
this._code + '?api=1&player_id=vimeo' +
307307
this._code +
308308
timestamp +
@@ -525,7 +525,7 @@ define([
525525
);
526526
} else if (type === 'vimeo') {
527527
$.ajax({
528-
url: window.location.protocol + '//www.vimeo.com/api/v2/video/' + id + '.json',
528+
url: 'https://www.vimeo.com/api/v2/video/' + id + '.json',
529529
dataType: 'jsonp',
530530
data: {
531531
format: 'json'

app/code/Magento/ProductVideo/view/frontend/web/js/load-player.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -317,7 +317,7 @@ define(['jquery', 'jquery/ui'], function ($) {
317317
if (this._loop) {
318318
additionalParams += '&loop=1';
319319
}
320-
src = window.location.protocol + '//player.vimeo.com/video/' +
320+
src = 'https://player.vimeo.com/video/' +
321321
this._code + '?api=1&player_id=vimeo' +
322322
this._code +
323323
timestamp +

app/code/Magento/Sales/Model/Order.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1774,7 +1774,7 @@ public function getTracksCollection()
17741774
*/
17751775
public function hasInvoices()
17761776
{
1777-
return $this->getInvoiceCollection()->count();
1777+
return (bool)$this->getInvoiceCollection()->count();
17781778
}
17791779

17801780
/**
@@ -1784,7 +1784,7 @@ public function hasInvoices()
17841784
*/
17851785
public function hasShipments()
17861786
{
1787-
return $this->getShipmentsCollection()->count();
1787+
return (bool)$this->getShipmentsCollection()->count();
17881788
}
17891789

17901790
/**
@@ -1794,7 +1794,7 @@ public function hasShipments()
17941794
*/
17951795
public function hasCreditmemos()
17961796
{
1797-
return $this->getCreditmemosCollection()->count();
1797+
return (bool)$this->getCreditmemosCollection()->count();
17981798
}
17991799

18001800
/**

app/code/Magento/Ui/view/base/web/js/lib/core/class.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,12 @@ define([
2727
* Creates constructor function which allows
2828
* initialization without usage of a 'new' operator.
2929
*
30-
* @param {Object} protoProps - Prototypal propeties of a new consturctor.
31-
* @param {Function} consturctor
32-
* @returns {Function} Created consturctor.
30+
* @param {Object} protoProps - Prototypal propeties of a new constructor.
31+
* @param {Function} constructor
32+
* @returns {Function} Created constructor.
3333
*/
34-
function createConstructor(protoProps, consturctor) {
35-
var UiClass = consturctor;
34+
function createConstructor(protoProps, constructor) {
35+
var UiClass = constructor;
3636

3737
if (!UiClass) {
3838

@@ -61,7 +61,7 @@ define([
6161
Class = createConstructor({
6262

6363
/**
64-
* Entry point to the initialization of consturctors' instance.
64+
* Entry point to the initialization of constructor's instance.
6565
*
6666
* @param {Object} [options={}]
6767
* @returns {Class} Chainable.

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
"composer/composer": "1.4.1",
4444
"monolog/monolog": "^1.17",
4545
"oyejorge/less.php": "~1.7.0",
46-
"pelago/emogrifier": "0.1.1",
46+
"pelago/emogrifier": "1.2.0",
4747
"tubalmartin/cssmin": "4.1.0",
4848
"magento/magento-composer-installer": ">=0.1.11",
4949
"braintree/braintree_php": "3.22.0",

composer.lock

Lines changed: 14 additions & 10 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dev/tests/integration/testsuite/Magento/Framework/Css/PreProcessor/Adapter/CssInlinerTest.php

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -75,13 +75,12 @@ public function testGetFilesEmogrifier($htmlFilePath, $cssFilePath, $cssExpected
7575
$emogrifier->setCss($css);
7676
$emogrifier->setHtml($html);
7777
$result = $emogrifier->emogrify();
78+
7879
/**
79-
* Tests a bug in the library where there's no spaces to CSS string before passing to Emogrifier
80-
* to fix known parsing issue with library.
81-
* This test should will fail when this bug is fixed in the library and we should fix the adapter.
82-
* https://github.com/jjriv/emogrifier/issues/370
80+
* This test was implemented for the issue which existed in the older version of Emogrifier.
81+
* Test was updated, as the library got updated as well.
8382
*/
84-
$this->assertNotContains($cssExpected, $result);
83+
$this->assertContains($cssExpected, $result);
8584
}
8685

8786
/**

0 commit comments

Comments
 (0)