Skip to content

Commit

Permalink
Merge pull request #1433 from magento-engcom/develop-prs
Browse files Browse the repository at this point in the history
[EngCom] Public Pull Requests
 - MAGETWO-71833: Grammar fix for #9533 #10627
 - MAGETWO-71801: FIX for issue 9930 - Asymmetric Transaction Error with ElasticSearch #10610
 - MAGETWO-71762: Bug fix, prevent displaying 0000-00-00 00:00:00 as anything else in admin grids #10598
 - MAGETWO-71532: Fix swagger-ui on instances of Magento running on a non-standard port #10504
  • Loading branch information
ishakhsuvarov authored Aug 23, 2017
2 parents df7d1c7 + d000df4 commit 6c5ba1f
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,7 @@ public function addImage(
$mediaGalleryData['images'][] = [
'file' => $fileName,
'position' => $position,
'media_type' => 'image',
'label' => '',
'disabled' => (int)$exclude,
];
Expand Down
4 changes: 2 additions & 2 deletions app/code/Magento/Customer/i18n/en_US.csv
Original file line number Diff line number Diff line change
Expand Up @@ -400,12 +400,12 @@ Password:,Password:
"If you did not make this request, you can ignore this email and your password will remain the same.","If you did not make this request, you can ignore this email and your password will remain the same."
"Your %store_name password has been changed","Your %store_name password has been changed"
"We have received a request to change the following information associated with your account at %store_name: password.","We have received a request to change the following information associated with your account at %store_name: password."
"Checkout out as a new customer","Checkout out as a new customer"
"Checkout as a new customer","Checkout as a new customer"
"Creating an account has many benefits:","Creating an account has many benefits:"
"See order and shipping status","See order and shipping status"
"Track order history","Track order history"
"Check out faster","Check out faster"
"Checkout out using your account","Checkout out using your account"
"Checkout using your account","Checkout using your account"
"Email Address","Email Address"
"Are you sure you want to do this?","Are you sure you want to do this?"
"Are you sure you want to delete this address?","Are you sure you want to delete this address?"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<strong id="block-new-customer-heading"
role="heading"
aria-level="2"
data-bind="i18n: 'Checkout out as a new customer'"></strong>
data-bind="i18n: 'Checkout as a new customer'"></strong>
</div>
<div class="block-content" aria-labelledby="block-new-customer-heading">
<p data-bind="i18n: 'Creating an account has many benefits:'"></p>
Expand All @@ -39,7 +39,7 @@
<strong id="block-customer-login-heading"
role="heading"
aria-level="2"
data-bind="i18n: 'Checkout out using your account'"></strong>
data-bind="i18n: 'Checkout using your account'"></strong>
</div>
<!-- ko foreach: getRegion('messages') -->
<!-- ko template: getTemplate() --><!-- /ko -->
Expand Down
4 changes: 3 additions & 1 deletion app/code/Magento/Ui/Component/Listing/Columns/Date.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,9 @@ public function prepareDataSource(array $dataSource)
{
if (isset($dataSource['data']['items'])) {
foreach ($dataSource['data']['items'] as & $item) {
if (isset($item[$this->getData('name')])) {
if (isset($item[$this->getData('name')])
&& $item[$this->getData('name')] !== "0000-00-00 00:00:00"
) {
$date = $this->timezone->date(new \DateTime($item[$this->getData('name')]));
$timezone = isset($this->getConfiguration()['timezone'])
? $this->booleanUtils->convert($this->getConfiguration()['timezone'])
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,4 +89,14 @@ public function testPrepareDataSource()
$result = $this->model->prepareDataSource(['data' => ['items' => [$item]]]);
$this->assertEquals(self::TEST_TIME, $result['data']['items'][0]['field_name']);
}

public function testPrepareDataSourceWithZeroDate()
{
$zeroDate = '0000-00-00 00:00:00';
$item = ['test_data' => 'some_data', 'field_name' => $zeroDate];
$this->timezoneMock->expects($this->never())->method('date');

$result = $this->model->prepareDataSource(['data' => ['items' => [$item]]]);
$this->assertEquals($zeroDate, $result['data']['items'][0]['field_name']);
}
}
2 changes: 1 addition & 1 deletion app/code/Magento/Webapi/Controller/Rest.php
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,7 @@ protected function processSchemaRequest()
$responseBody = $this->swaggerGenerator->generate(
$requestedServices,
$this->_request->getScheme(),
$this->_request->getHttpHost(),
$this->_request->getHttpHost(false),
$this->_request->getRequestUri()
);
$this->_response->setBody($responseBody)->setHeader('Content-Type', 'application/json');
Expand Down

0 comments on commit 6c5ba1f

Please sign in to comment.