Skip to content

Commit 4536c8a

Browse files
Merge branch 'develop' of github.com:magento/magento2ce into PR-5
2 parents 688df43 + ee6ee6e commit 4536c8a

File tree

43 files changed

+858
-342
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+858
-342
lines changed

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,10 @@ atlassian*
2525
/.grunt
2626
/Gruntfile.js
2727
/package.json
28+
/.php_cs
29+
/.php_cs.cache
30+
/grunt-config.json
31+
/dev/tools/grunt/configs/local-themes.js
2832

2933
/pub/media/*.*
3034
!/pub/media/.htaccess

.htaccess

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,7 @@
222222
order allow,deny
223223
deny from all
224224
</Files>
225-
<Files .php_cs>
225+
<Files .php_cs.dist>
226226
order allow,deny
227227
deny from all
228228
</Files>

.htaccess.sample

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,7 @@
198198
order allow,deny
199199
deny from all
200200
</Files>
201-
<Files .php_cs>
201+
<Files .php_cs.dist>
202202
order allow,deny
203203
deny from all
204204
</Files>

.php_cs

Lines changed: 0 additions & 52 deletions
This file was deleted.

.php_cs.dist

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
<?php
2+
/**
3+
* Copyright © 2013-2017 Magento, Inc. All rights reserved.
4+
* See COPYING.txt for license details.
5+
*/
6+
7+
/**
8+
* Pre-commit hook installation:
9+
* vendor/bin/static-review.php hook:install dev/tools/Magento/Tools/StaticReview/pre-commit .git/hooks/pre-commit
10+
*/
11+
$finder = PhpCsFixer\Finder::create()
12+
->name('*.phtml')
13+
->exclude('dev/tests/functional/generated')
14+
->exclude('dev/tests/functional/var')
15+
->exclude('dev/tests/functional/vendor')
16+
->exclude('dev/tests/integration/tmp')
17+
->exclude('dev/tests/integration/var')
18+
->exclude('lib/internal/Cm')
19+
->exclude('lib/internal/Credis')
20+
->exclude('lib/internal/Less')
21+
->exclude('lib/internal/LinLibertineFont')
22+
->exclude('pub/media')
23+
->exclude('pub/static')
24+
->exclude('setup/vendor')
25+
->exclude('var');
26+
27+
return PhpCsFixer\Config::create()
28+
->setFinder($finder)
29+
->setRules([
30+
'@PSR2' => true,
31+
'array_syntax' => ['syntax' => 'short'],
32+
'concat_space' => ['spacing' => 'one'],
33+
'include' => true,
34+
'new_with_braces' => true,
35+
'no_empty_statement' => true,
36+
'no_extra_consecutive_blank_lines' => true,
37+
'no_leading_import_slash' => true,
38+
'no_leading_namespace_whitespace' => true,
39+
'no_multiline_whitespace_around_double_arrow' => true,
40+
'no_multiline_whitespace_before_semicolons' => true,
41+
'no_singleline_whitespace_before_semicolons' => true,
42+
'no_trailing_comma_in_singleline_array' => true,
43+
'no_unused_imports' => true,
44+
'no_whitespace_in_blank_line' => true,
45+
'object_operator_without_whitespace' => true,
46+
'ordered_imports' => true,
47+
'standardize_not_equals' => true,
48+
'ternary_operator_spaces' => true,
49+
]);
Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
"Read Details","Read Details"
22
"Mark as Read","Mark as Read"
33
"Are you sure?","Are you sure?"
4-
Remove,Remove
4+
"Remove","Remove"
55
"Messages Inbox","Messages Inbox"
66
"You have %1 new system messages","You have %1 new system messages"
77
"You have %1 new system message","You have %1 new system message"
88
"Incoming Message","Incoming Message"
9-
close,close
10-
Notifications,Notifications
9+
"close","close"
10+
"Notifications","Notifications"
1111
"The message has been marked as Read.","The message has been marked as Read."
1212
"We couldn't mark the notification as Read because of an error.","We couldn't mark the notification as Read because of an error."
1313
"Please select messages.","Please select messages."
@@ -20,10 +20,10 @@ Notifications,Notifications
2020
"6 Hours","6 Hours"
2121
"12 Hours","12 Hours"
2222
"24 Hours","24 Hours"
23-
critical,critical
24-
major,major
25-
minor,minor
26-
notice,notice
23+
"critical","critical"
24+
"major","major"
25+
"minor","minor"
26+
"notice","notice"
2727
"Wrong message type","Wrong message type"
2828
"Wrong notification ID specified.","Wrong notification ID specified."
2929
"{{base_url}} is not recommended to use in a production environment to declare the Base Unsecure URL / Base Secure URL. We highly recommend changing this value in your Magento <a href=""%1"">configuration</a>.","{{base_url}} is not recommended to use in a production environment to declare the Base Unsecure URL / Base Secure URL. We highly recommend changing this value in your Magento <a href=""%1"">configuration</a>."
@@ -33,7 +33,7 @@ notice,notice
3333
"Synchronization of media storages has been completed.","Synchronization of media storages has been completed."
3434
"Your web server is set up incorrectly and allows unauthorized access to sensitive files. Please contact your hosting provider.","Your web server is set up incorrectly and allows unauthorized access to sensitive files. Please contact your hosting provider."
3535
"Close popup","Close popup"
36-
Close,Close
36+
"Close","Close"
3737
"System Messages:","System Messages:"
3838
"Critical System Messages","Critical System Messages"
3939
"Major System Messages","Major System Messages"
@@ -45,7 +45,7 @@ Close,Close
4545
"Use HTTPS to Get Feed","Use HTTPS to Get Feed"
4646
"Update Frequency","Update Frequency"
4747
"Last Update","Last Update"
48-
Severity,Severity
48+
"Severity","Severity"
4949
"Date Added","Date Added"
50-
Message,Message
51-
Actions,Actions
50+
"Message","Message"
51+
"Actions","Actions"

app/code/Magento/Backend/i18n/en_US.csv

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -250,7 +250,7 @@ Minute,Minute
250250
"JavaScript may be disabled in your browser.","JavaScript may be disabled in your browser."
251251
"To use this website you must first enable JavaScript in your browser.","To use this website you must first enable JavaScript in your browser."
252252
"This is only a demo store. You can browse and place orders, but nothing will be processed.","This is only a demo store. You can browse and place orders, but nothing will be processed."
253-
"Report a Bug","Report a Bug"
253+
"Report an Issue","Report an Issue"
254254
"Store View:","Store View:"
255255
"Stores Configuration","Stores Configuration"
256256
"Please confirm scope switching. All data that hasn\'t been saved will be lost.","Please confirm scope switching. All data that hasn\'t been saved will be lost."

app/code/Magento/Backend/view/adminhtml/templates/page/report.phtml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,5 @@
88

99
?>
1010
<?php if ($block->getBugreportUrl()): ?>
11-
<a class="link-report" href="<?php /* @escapeNotVerified */ echo $block->getBugreportUrl(); ?>" id="footer_bug_tracking"><?php /* @escapeNotVerified */ echo __('Report a Bug') ?></a>
11+
<a class="link-report" href="<?php /* @escapeNotVerified */ echo $block->getBugreportUrl(); ?>" id="footer_bug_tracking"><?php /* @escapeNotVerified */ echo __('Report an Issue') ?></a>
1212
<?php endif; ?>
Loading

app/code/Magento/CatalogImportExport/Model/Import/Product.php

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2116,7 +2116,6 @@ protected function _saveProductWebsites(array $websiteData)
21162116
*/
21172117
protected function _saveStockItem()
21182118
{
2119-
$indexer = $this->indexerRegistry->get('catalog_product_category');
21202119
/** @var $stockResource \Magento\CatalogInventory\Model\ResourceModel\Stock\Item */
21212120
$stockResource = $this->_stockResItemFac->create();
21222121
$entityTable = $stockResource->getMainTable();
@@ -2172,13 +2171,25 @@ protected function _saveStockItem()
21722171
$this->_connection->insertOnDuplicate($entityTable, array_values($stockData));
21732172
}
21742173

2175-
if ($productIdsToReindex) {
2176-
$indexer->reindexList($productIdsToReindex);
2177-
}
2174+
$this->reindexProducts($productIdsToReindex);
21782175
}
21792176
return $this;
21802177
}
21812178

2179+
/**
2180+
* Initiate product reindex by product ids
2181+
*
2182+
* @param array $productIdsToReindex
2183+
* @return void
2184+
*/
2185+
private function reindexProducts($productIdsToReindex = [])
2186+
{
2187+
$indexer = $this->indexerRegistry->get('catalog_product_category');
2188+
if (is_array($productIdsToReindex) && count($productIdsToReindex) > 0 && !$indexer->isScheduled()) {
2189+
$indexer->reindexList($productIdsToReindex);
2190+
}
2191+
}
2192+
21822193
/**
21832194
* Retrieve attribute by code
21842195
*

0 commit comments

Comments
 (0)