Skip to content

Commit 67d265d

Browse files
author
Oleksii Korshenko
committed
MAGETWO-80884: Fixed issue #10738: Don't display attribute label if defined as 'none' in layout #11168
- Merge Pull Request #11168 from maksek/magento2:none_transaltion_fix - Merged commits: 1. 3c68ca8
2 parents 14e7a37 + 3c68ca8 commit 67d265d

File tree

9,233 files changed

+103196
-112870
lines changed

Some content is hidden

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

9,233 files changed

+103196
-112870
lines changed

.travis.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,5 +59,6 @@ script:
5959
- test $TEST_SUITE = "functional" && TEST_FILTER='dev/tests/functional/testsuites/Magento/Mtf/TestSuite/InjectableTests.php' || true
6060

6161
# The scripts for grunt/phpunit type tests
62-
- if [ $TEST_SUITE != "js" ]; then phpunit -c dev/tests/$TEST_SUITE $TEST_FILTER; fi
62+
- if [ $TEST_SUITE == "functional" ]; then dev/tests/functional/vendor/phpunit/phpunit/phpunit -c dev/tests/$TEST_SUITE $TEST_FILTER; fi
63+
- if [ $TEST_SUITE != "functional" ] && [ $TEST_SUITE != "js" ]; then phpunit -c dev/tests/$TEST_SUITE $TEST_FILTER; fi
6364
- if [ $TEST_SUITE == "js" ]; then grunt $GRUNT_COMMAND; fi

app/bootstrap.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,6 @@
6262

6363
date_default_timezone_set('UTC');
6464

65-
/* Adjustment of precision value for several versions of PHP */
66-
ini_set('precision', 17);
67-
ini_set('serialize_precision', 17);
65+
/* For data consistency between displaying (printing) and serialization a float number */
66+
ini_set('precision', 14);
67+
ini_set('serialize_precision', 14);

app/code/Magento/AdminNotification/Block/Inbox.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99

1010
/**
1111
* @api
12+
* @since 100.0.2
1213
*/
1314
class Inbox extends \Magento\Backend\Block\Widget\Grid\Container
1415
{

app/code/Magento/AdminNotification/Block/System/Messages/UnreadMessagePopup.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99

1010
/**
1111
* @api
12+
* @since 100.0.2
1213
*/
1314
class UnreadMessagePopup extends \Magento\Backend\Block\Template
1415
{

app/code/Magento/AdminNotification/Block/ToolbarEntry.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
*
1212
* @api
1313
* @author Magento Core Team <[email protected]>
14+
* @since 100.0.2
1415
*/
1516
class ToolbarEntry extends \Magento\Backend\Block\Template
1617
{

app/code/Magento/AdminNotification/Block/Window.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99

1010
/**
1111
* @api
12+
* @since 100.0.2
1213
*/
1314
class Window extends \Magento\Backend\Block\Template
1415
{

app/code/Magento/AdminNotification/Controller/Adminhtml/Notification.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99

1010
/**
1111
* @api
12+
* @since 100.0.2
1213
*/
1314
abstract class Notification extends \Magento\Backend\App\AbstractAction
1415
{

app/code/Magento/AdminNotification/Controller/Adminhtml/System/Message/ListAction.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,11 @@
88

99
class ListAction extends \Magento\Backend\App\AbstractAction
1010
{
11+
/**
12+
* Authorization level of a basic admin session
13+
*/
14+
const ADMIN_RESOURCE = 'Magento_AdminNotification::show_list';
15+
1116
/**
1217
* @var \Magento\Framework\Json\Helper\Data
1318
*/

app/code/Magento/AdminNotification/Model/Config/Source/Frequency.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
*
1111
* @codeCoverageIgnore
1212
* @api
13+
* @since 100.0.2
1314
*/
1415
class Frequency implements \Magento\Framework\Option\ArrayInterface
1516
{

app/code/Magento/AdminNotification/Model/Feed.php

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
* @author Magento Core Team <[email protected]>
1414
* @SuppressWarnings(PHPMD.CouplingBetweenObjects)
1515
* @api
16+
* @since 100.0.2
1617
*/
1718
class Feed extends \Magento\Framework\Model\AbstractModel
1819
{
@@ -147,9 +148,9 @@ public function checkUpdate()
147148
$feedData[] = [
148149
'severity' => (int)$item->severity,
149150
'date_added' => date('Y-m-d H:i:s', $itemPublicationDate),
150-
'title' => (string)$item->title,
151-
'description' => (string)$item->description,
152-
'url' => (string)$item->link,
151+
'title' => $this->escapeString($item->title),
152+
'description' => $this->escapeString($item->description),
153+
'url' => $this->escapeString($item->link),
153154
];
154155
}
155156
}
@@ -245,4 +246,15 @@ public function getFeedXml()
245246

246247
return $xml;
247248
}
249+
250+
/**
251+
* Converts incoming data to string format and escapes special characters.
252+
*
253+
* @param \SimpleXMLElement $data
254+
* @return string
255+
*/
256+
private function escapeString(\SimpleXMLElement $data)
257+
{
258+
return htmlspecialchars((string)$data);
259+
}
248260
}

app/code/Magento/AdminNotification/Model/Inbox.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,6 @@
1212
/**
1313
* AdminNotification Inbox model
1414
*
15-
* @method \Magento\AdminNotification\Model\ResourceModel\Inbox _getResource()
16-
* @method \Magento\AdminNotification\Model\ResourceModel\Inbox getResource()
1715
* @method int getSeverity()
1816
* @method \Magento\AdminNotification\Model\Inbox setSeverity(int $value)
1917
* @method string getDateAdded()
@@ -30,6 +28,7 @@
3028
* @method \Magento\AdminNotification\Model\Inbox setIsRemove(int $value)
3129
*
3230
* @api
31+
* @since 100.0.2
3332
*/
3433
class Inbox extends \Magento\Framework\Model\AbstractModel implements NotifierInterface, InboxInterface
3534
{

app/code/Magento/AdminNotification/Model/InboxInterface.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
*
1111
* @author Magento Core Team <[email protected]>
1212
* @api
13+
* @since 100.0.2
1314
*/
1415
interface InboxInterface
1516
{

app/code/Magento/AdminNotification/Model/NotificationService.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
*
1111
* @author Magento Core Team <[email protected]>
1212
* @api
13+
* @since 100.0.2
1314
*/
1415
class NotificationService
1516
{

app/code/Magento/AdminNotification/Model/ResourceModel/Grid/Collection.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313

1414
/**
1515
* @api
16+
* @since 100.0.2
1617
*/
1718
class Collection extends \Magento\AdminNotification\Model\ResourceModel\Inbox\Collection
1819
{

app/code/Magento/AdminNotification/Model/ResourceModel/Inbox.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77

88
/**
99
* @api
10+
* @since 100.0.2
1011
*/
1112
class Inbox extends \Magento\Framework\Model\ResourceModel\Db\AbstractDb
1213
{

app/code/Magento/AdminNotification/Model/ResourceModel/Inbox/Collection.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
* @api
1212
* @author Magento Core Team <[email protected]>
1313
* @api
14+
* @since 100.0.2
1415
*/
1516
class Collection extends \Magento\Framework\Model\ResourceModel\Db\Collection\AbstractCollection
1617
{

app/code/Magento/AdminNotification/Model/ResourceModel/Inbox/Collection/Critical.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99

1010
/**
1111
* @api
12+
* @since 100.0.2
1213
*/
1314
class Critical extends \Magento\Framework\Model\ResourceModel\Db\Collection\AbstractCollection
1415
{

app/code/Magento/AdminNotification/Model/ResourceModel/Inbox/Collection/Unread.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313

1414
/**
1515
* @api
16+
* @since 100.0.2
1617
*/
1718
class Unread extends \Magento\AdminNotification\Model\ResourceModel\Inbox\Collection
1819
{

app/code/Magento/AdminNotification/Model/ResourceModel/System/Message.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77

88
/**
99
* @api
10+
* @since 100.0.2
1011
*/
1112
class Message extends \Magento\Framework\Model\ResourceModel\Db\AbstractDb
1213
{

app/code/Magento/AdminNotification/Model/ResourceModel/System/Message/Collection.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77

88
/**
99
* @api
10+
* @since 100.0.2
1011
*/
1112
class Collection extends \Magento\Framework\Model\ResourceModel\Db\Collection\AbstractCollection
1213
{

app/code/Magento/AdminNotification/Model/ResourceModel/System/Message/Collection/Synchronized.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77

88
/**
99
* @api
10+
* @since 100.0.2
1011
*/
1112
class Synchronized extends \Magento\AdminNotification\Model\ResourceModel\System\Message\Collection
1213
{

app/code/Magento/AdminNotification/Model/System/Message.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
/**
99
* @codeCoverageIgnore
1010
* @api
11+
* @since 100.0.2
1112
*/
1213
class Message extends \Magento\Framework\Model\AbstractModel implements \Magento\Framework\Notification\MessageInterface
1314
{

app/code/Magento/AdminNotification/Model/System/Message/Baseurl.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
use Magento\Store\Model\Store;
1010

1111
/**
12-
* @deprecated
12+
* @deprecated 100.1.0
1313
*/
1414
class Baseurl implements \Magento\Framework\Notification\MessageInterface
1515
{

app/code/Magento/AdminNotification/Model/System/Message/CacheOutdated.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77

88
/**
99
* @api
10+
* @since 100.0.2
1011
*/
1112
class CacheOutdated implements \Magento\Framework\Notification\MessageInterface
1213
{

app/code/Magento/AdminNotification/Model/System/Message/Media/AbstractSynchronization.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77

88
/**
99
* @api
10+
* @since 100.0.2
1011
*/
1112
abstract class AbstractSynchronization implements \Magento\Framework\Notification\MessageInterface
1213
{

app/code/Magento/AdminNotification/Model/System/Message/Media/Synchronization/Error.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88

99
/**
1010
* @api
11+
* @since 100.0.2
1112
*/
1213
class Error extends \Magento\AdminNotification\Model\System\Message\Media\AbstractSynchronization
1314
{

app/code/Magento/AdminNotification/Model/System/Message/Media/Synchronization/Success.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77

88
/**
99
* @api
10+
* @since 100.0.2
1011
*/
1112
class Success extends \Magento\AdminNotification\Model\System\Message\Media\AbstractSynchronization
1213
{

app/code/Magento/AdminNotification/Model/System/Message/Security.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010

1111
/**
1212
* @api
13+
* @since 100.0.2
1314
*/
1415
class Security implements \Magento\Framework\Notification\MessageInterface
1516
{

app/code/Magento/AdminNotification/Test/Unit/Block/ToolbarEntryTest.php

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
*/
1010
namespace Magento\AdminNotification\Test\Unit\Block;
1111

12-
class ToolbarEntryTest extends \PHPUnit_Framework_TestCase
12+
class ToolbarEntryTest extends \PHPUnit\Framework\TestCase
1313
{
1414
/**
1515
* Retrieve toolbar entry block instance
@@ -21,12 +21,9 @@ protected function _getBlockInstance($unreadNotifications)
2121
{
2222
$objectManagerHelper = new \Magento\Framework\TestFramework\Unit\Helper\ObjectManager($this);
2323
// mock collection of unread notifications
24-
$notificationList = $this->getMock(
24+
$notificationList = $this->createPartialMock(
2525
\Magento\AdminNotification\Model\ResourceModel\Inbox\Collection\Unread::class,
26-
['getSize', 'setCurPage', 'setPageSize'],
27-
[],
28-
'',
29-
false
26+
['getSize', 'setCurPage', 'setPageSize']
3027
);
3128
$notificationList->expects($this->any())->method('getSize')->will($this->returnValue($unreadNotifications));
3229

0 commit comments

Comments
 (0)