Skip to content

Commit

Permalink
MAGETWO-80884: Fixed issue #10738: Don't display attribute label if d…
Browse files Browse the repository at this point in the history
…efined as 'none' in layout #11168

 - Merge Pull Request #11168 from maksek/magento2:none_transaltion_fix
 - Merged commits:
   1. 3c68ca8
  • Loading branch information
Oleksii Korshenko committed Oct 4, 2017
2 parents 14e7a37 + 3c68ca8 commit 67d265d
Show file tree
Hide file tree
Showing 9,233 changed files with 103,196 additions and 112,870 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
3 changes: 2 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,5 +59,6 @@ script:
- test $TEST_SUITE = "functional" && TEST_FILTER='dev/tests/functional/testsuites/Magento/Mtf/TestSuite/InjectableTests.php' || true

# The scripts for grunt/phpunit type tests
- if [ $TEST_SUITE != "js" ]; then phpunit -c dev/tests/$TEST_SUITE $TEST_FILTER; fi
- if [ $TEST_SUITE == "functional" ]; then dev/tests/functional/vendor/phpunit/phpunit/phpunit -c dev/tests/$TEST_SUITE $TEST_FILTER; fi
- if [ $TEST_SUITE != "functional" ] && [ $TEST_SUITE != "js" ]; then phpunit -c dev/tests/$TEST_SUITE $TEST_FILTER; fi
- if [ $TEST_SUITE == "js" ]; then grunt $GRUNT_COMMAND; fi
6 changes: 3 additions & 3 deletions app/bootstrap.php
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,6 @@

date_default_timezone_set('UTC');

/* Adjustment of precision value for several versions of PHP */
ini_set('precision', 17);
ini_set('serialize_precision', 17);
/* For data consistency between displaying (printing) and serialization a float number */
ini_set('precision', 14);
ini_set('serialize_precision', 14);
1 change: 1 addition & 0 deletions app/code/Magento/AdminNotification/Block/Inbox.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@

/**
* @api
* @since 100.0.2
*/
class Inbox extends \Magento\Backend\Block\Widget\Grid\Container
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@

/**
* @api
* @since 100.0.2
*/
class UnreadMessagePopup extends \Magento\Backend\Block\Template
{
Expand Down
1 change: 1 addition & 0 deletions app/code/Magento/AdminNotification/Block/ToolbarEntry.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
*
* @api
* @author Magento Core Team <core@magentocommerce.com>
* @since 100.0.2
*/
class ToolbarEntry extends \Magento\Backend\Block\Template
{
Expand Down
1 change: 1 addition & 0 deletions app/code/Magento/AdminNotification/Block/Window.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@

/**
* @api
* @since 100.0.2
*/
class Window extends \Magento\Backend\Block\Template
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@

/**
* @api
* @since 100.0.2
*/
abstract class Notification extends \Magento\Backend\App\AbstractAction
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,11 @@

class ListAction extends \Magento\Backend\App\AbstractAction
{
/**
* Authorization level of a basic admin session
*/
const ADMIN_RESOURCE = 'Magento_AdminNotification::show_list';

/**
* @var \Magento\Framework\Json\Helper\Data
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
*
* @codeCoverageIgnore
* @api
* @since 100.0.2
*/
class Frequency implements \Magento\Framework\Option\ArrayInterface
{
Expand Down
18 changes: 15 additions & 3 deletions app/code/Magento/AdminNotification/Model/Feed.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
* @author Magento Core Team <core@magentocommerce.com>
* @SuppressWarnings(PHPMD.CouplingBetweenObjects)
* @api
* @since 100.0.2
*/
class Feed extends \Magento\Framework\Model\AbstractModel
{
Expand Down Expand Up @@ -147,9 +148,9 @@ public function checkUpdate()
$feedData[] = [
'severity' => (int)$item->severity,
'date_added' => date('Y-m-d H:i:s', $itemPublicationDate),
'title' => (string)$item->title,
'description' => (string)$item->description,
'url' => (string)$item->link,
'title' => $this->escapeString($item->title),
'description' => $this->escapeString($item->description),
'url' => $this->escapeString($item->link),
];
}
}
Expand Down Expand Up @@ -245,4 +246,15 @@ public function getFeedXml()

return $xml;
}

/**
* Converts incoming data to string format and escapes special characters.
*
* @param \SimpleXMLElement $data
* @return string
*/
private function escapeString(\SimpleXMLElement $data)
{
return htmlspecialchars((string)$data);
}
}
3 changes: 1 addition & 2 deletions app/code/Magento/AdminNotification/Model/Inbox.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@
/**
* AdminNotification Inbox model
*
* @method \Magento\AdminNotification\Model\ResourceModel\Inbox _getResource()
* @method \Magento\AdminNotification\Model\ResourceModel\Inbox getResource()
* @method int getSeverity()
* @method \Magento\AdminNotification\Model\Inbox setSeverity(int $value)
* @method string getDateAdded()
Expand All @@ -30,6 +28,7 @@
* @method \Magento\AdminNotification\Model\Inbox setIsRemove(int $value)
*
* @api
* @since 100.0.2
*/
class Inbox extends \Magento\Framework\Model\AbstractModel implements NotifierInterface, InboxInterface
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
*
* @author Magento Core Team <core@magentocommerce.com>
* @api
* @since 100.0.2
*/
interface InboxInterface
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
*
* @author Magento Core Team <core@magentocommerce.com>
* @api
* @since 100.0.2
*/
class NotificationService
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@

/**
* @api
* @since 100.0.2
*/
class Collection extends \Magento\AdminNotification\Model\ResourceModel\Inbox\Collection
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@

/**
* @api
* @since 100.0.2
*/
class Inbox extends \Magento\Framework\Model\ResourceModel\Db\AbstractDb
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
* @api
* @author Magento Core Team <core@magentocommerce.com>
* @api
* @since 100.0.2
*/
class Collection extends \Magento\Framework\Model\ResourceModel\Db\Collection\AbstractCollection
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@

/**
* @api
* @since 100.0.2
*/
class Critical extends \Magento\Framework\Model\ResourceModel\Db\Collection\AbstractCollection
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@

/**
* @api
* @since 100.0.2
*/
class Unread extends \Magento\AdminNotification\Model\ResourceModel\Inbox\Collection
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@

/**
* @api
* @since 100.0.2
*/
class Message extends \Magento\Framework\Model\ResourceModel\Db\AbstractDb
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@

/**
* @api
* @since 100.0.2
*/
class Collection extends \Magento\Framework\Model\ResourceModel\Db\Collection\AbstractCollection
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@

/**
* @api
* @since 100.0.2
*/
class Synchronized extends \Magento\AdminNotification\Model\ResourceModel\System\Message\Collection
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
/**
* @codeCoverageIgnore
* @api
* @since 100.0.2
*/
class Message extends \Magento\Framework\Model\AbstractModel implements \Magento\Framework\Notification\MessageInterface
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
use Magento\Store\Model\Store;

/**
* @deprecated
* @deprecated 100.1.0
*/
class Baseurl implements \Magento\Framework\Notification\MessageInterface
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@

/**
* @api
* @since 100.0.2
*/
class CacheOutdated implements \Magento\Framework\Notification\MessageInterface
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@

/**
* @api
* @since 100.0.2
*/
abstract class AbstractSynchronization implements \Magento\Framework\Notification\MessageInterface
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

/**
* @api
* @since 100.0.2
*/
class Error extends \Magento\AdminNotification\Model\System\Message\Media\AbstractSynchronization
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@

/**
* @api
* @since 100.0.2
*/
class Success extends \Magento\AdminNotification\Model\System\Message\Media\AbstractSynchronization
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@

/**
* @api
* @since 100.0.2
*/
class Security implements \Magento\Framework\Notification\MessageInterface
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
*/
namespace Magento\AdminNotification\Test\Unit\Block;

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

Expand Down
Loading

0 comments on commit 67d265d

Please sign in to comment.