Skip to content

Commit

Permalink
2.0.0.0-dev70
Browse files Browse the repository at this point in the history
* Fixed bugs:
  * Fixed an issue where the schedule of recurring payments was not displayed in the shopping cart
  * Fixed an issue with displaying tax class names in the Customer Groups grid
  * Fixed an issue with testing Solr connection
  * Fixed an issue with using custom module front name
  * Fixed an issue with USPS and DHL usage in the production mode
* Modularity improvements:
  * Consolidated all logic related to Layered Navigation in one separate module
* Framework Improvements:
  * Covered Magento library components with unit tests:
     * Magento/Interception
     * Magento/ObjectManager
     * Magento/Message
     * Magento/Module
     * Magento/Mail
     * Magento/Object
     * Magento/Math
* Updated XML files to include a reference to the schema file in a form of a relative path
* Updated code to be PSR-2 compliant
  • Loading branch information
magento-team committed Mar 21, 2014
1 parent 2defd65 commit 9c2b633
Show file tree
Hide file tree
Showing 8,492 changed files with 183,155 additions and 139,768 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
22 changes: 22 additions & 0 deletions CHANGELOG.md
@@ -1,3 +1,25 @@
2.0.0.0-dev70
=============
* Fixed bugs:
* Fixed an issue where the schedule of recurring payments was not displayed in the shopping cart
* Fixed an issue with displaying tax class names in the Customer Groups grid
* Fixed an issue with testing Solr connection
* Fixed an issue with using custom module front name
* Fixed an issue with USPS and DHL usage in the production mode
* Modularity improvements:
* Consolidated all logic related to Layered Navigation in one separate module
* Framework Improvements:
* Covered Magento library components with unit tests:
* Magento/Interception
* Magento/ObjectManager
* Magento/Message
* Magento/Module
* Magento/Mail
* Magento/Object
* Magento/Math
* Updated XML files to include a reference to the schema file in a form of a relative path
* Updated code to be PSR-2 compliant

2.0.0.0-dev69
=============
* Themes update:
Expand Down
5 changes: 1 addition & 4 deletions app/bootstrap.php
Expand Up @@ -63,10 +63,7 @@
require_once BP . '/app/functions.php';

require_once __DIR__ . '/autoload.php';
\Magento\Autoload\IncludePath::addIncludePath(array(
BP . '/app/code',
BP . '/lib',
));
\Magento\Autoload\IncludePath::addIncludePath(array(BP . '/app/code', BP . '/lib'));
$classMapPath = BP . '/var/classmap.ser';
if (file_exists($classMapPath)) {
require_once BP . '/lib/Magento/Autoload/ClassMap.php';
Expand Down
34 changes: 19 additions & 15 deletions app/code/Magento/AdminNotification/Block/Grid/Renderer/Actions.php
Expand Up @@ -25,8 +25,7 @@
*/
namespace Magento\AdminNotification\Block\Grid\Renderer;

class Actions
extends \Magento\Backend\Block\Widget\Grid\Column\Renderer\AbstractRenderer
class Actions extends \Magento\Backend\Block\Widget\Grid\Column\Renderer\AbstractRenderer
{
/**
* @var \Magento\Core\Helper\Url
Expand Down Expand Up @@ -55,24 +54,29 @@ public function __construct(
*/
public function render(\Magento\Object $row)
{
$readDetailsHtml = ($row->getUrl())
? '<a target="_blank" href="'. $row->getUrl() .'">' .
__('Read Details') .'</a> | '
: '';
$readDetailsHtml = $row->getUrl() ? '<a target="_blank" href="' . $row->getUrl() . '">' . __(
'Read Details'
) . '</a> | ' : '';

$markAsReadHtml = (!$row->getIsRead())
? '<a href="'. $this->getUrl('*/*/markAsRead/', array('_current' => true, 'id' => $row->getId())) .'">' .
__('Mark as Read') .'</a> | '
: '';
$markAsReadHtml = !$row->getIsRead() ? '<a href="' . $this->getUrl(
'*/*/markAsRead/',
array('_current' => true, 'id' => $row->getId())
) . '">' . __(
'Mark as Read'
) . '</a> | ' : '';

$encodedUrl = $this->_urlHelper->getEncodedUrl();
return sprintf('%s%s<a href="%s" onClick="deleteConfirm(\'%s\', this.href); return false;">%s</a>',
return sprintf(
'%s%s<a href="%s" onClick="deleteConfirm(\'%s\', this.href); return false;">%s</a>',
$readDetailsHtml,
$markAsReadHtml,
$this->getUrl('*/*/remove/', array(
'_current'=>true,
'id' => $row->getId(),
\Magento\App\Action\Action::PARAM_NAME_URL_ENCODED => $encodedUrl)
$this->getUrl(
'*/*/remove/',
array(
'_current' => true,
'id' => $row->getId(),
\Magento\App\Action\Action::PARAM_NAME_URL_ENCODED => $encodedUrl
)
),
__('Are you sure?'),
__('Remove')
Expand Down
Expand Up @@ -27,8 +27,7 @@
*/
namespace Magento\AdminNotification\Block\Grid\Renderer;

class Notice
extends \Magento\Backend\Block\Widget\Grid\Column\Renderer\AbstractRenderer
class Notice extends \Magento\Backend\Block\Widget\Grid\Column\Renderer\AbstractRenderer
{
/**
* Renders grid column
Expand All @@ -38,7 +37,10 @@ class Notice
*/
public function render(\Magento\Object $row)
{
return '<span class="grid-row-title">' . $row->getTitle() . '</span>'
. ($row->getDescription() ? '<br />' . $row->getDescription() : '');
return '<span class="grid-row-title">' .
$row->getTitle() .
'</span>' .
($row->getDescription() ? '<br />' .
$row->getDescription() : '');
}
}
Expand Up @@ -27,8 +27,7 @@
*/
namespace Magento\AdminNotification\Block\Grid\Renderer;

class Severity
extends \Magento\Backend\Block\Widget\Grid\Column\Renderer\AbstractRenderer
class Severity extends \Magento\Backend\Block\Widget\Grid\Column\Renderer\AbstractRenderer
{
/**
* @var \Magento\AdminNotification\Model\Inbox
Expand Down
23 changes: 13 additions & 10 deletions app/code/Magento/AdminNotification/Block/System/Messages.php
Expand Up @@ -75,8 +75,9 @@ protected function _toHtml()
public function getLastCritical()
{
$items = array_values($this->_messages->getItems());
if (isset($items[0]) && $items[0]->getSeverity()
== \Magento\AdminNotification\Model\System\MessageInterface::SEVERITY_CRITICAL
if (isset(
$items[0]
) && $items[0]->getSeverity() == \Magento\AdminNotification\Model\System\MessageInterface::SEVERITY_CRITICAL
) {
return $items[0];
}
Expand Down Expand Up @@ -114,7 +115,7 @@ public function getMajorCount()
*/
public function hasMessages()
{
return (bool) count($this->_messages->getItems());
return (bool)count($this->_messages->getItems());
}

/**
Expand All @@ -134,12 +135,14 @@ protected function _getMessagesUrl()
*/
public function getSystemMessageDialogJson()
{
return $this->_coreHelper->jsonEncode(array(
'systemMessageDialog' => array(
'autoOpen' => false,
'width' => 600,
'ajaxUrl' => $this->_getMessagesUrl(),
),
));
return $this->_coreHelper->jsonEncode(
array(
'systemMessageDialog' => array(
'autoOpen' => false,
'width' => 600,
'ajaxUrl' => $this->_getMessagesUrl()
)
)
);
}
}
6 changes: 5 additions & 1 deletion app/code/Magento/AdminNotification/Block/ToolbarEntry.php
Expand Up @@ -84,7 +84,11 @@ public function getLatestUnreadNotifications()
public function formatNotificationDate($dateString)
{
if (date('Ymd') == date('Ymd', strtotime($dateString))) {
return $this->formatTime($dateString, \Magento\Stdlib\DateTime\TimezoneInterface::FORMAT_TYPE_SHORT, false);
return $this->formatTime(
$dateString,
\Magento\Stdlib\DateTime\TimezoneInterface::FORMAT_TYPE_SHORT,
false
);
}
return $this->formatDate($dateString, \Magento\Stdlib\DateTime\TimezoneInterface::FORMAT_TYPE_MEDIUM, true);
}
Expand Down
2 changes: 1 addition & 1 deletion app/code/Magento/AdminNotification/Block/Window.php
Expand Up @@ -32,7 +32,7 @@ class Window extends \Magento\Backend\Block\Template
/**
* XML path of Severity icons url
*/
const XML_SEVERITY_ICONS_URL_PATH = 'system/adminnotification/severity_icons_url';
const XML_SEVERITY_ICONS_URL_PATH = 'system/adminnotification/severity_icons_url';

/**
* Severity icons url
Expand Down
Expand Up @@ -37,11 +37,12 @@ public function indexAction()
$this->_title->add(__('Notifications'));

$this->_view->loadLayout();
$this->_setActiveMenu('Magento_AdminNotification::system_adminnotification')
->_addBreadcrumb(
__('Messages Inbox'),
__('Messages Inbox')
);
$this->_setActiveMenu(
'Magento_AdminNotification::system_adminnotification'
)->_addBreadcrumb(
__('Messages Inbox'),
__('Messages Inbox')
);
$this->_view->renderLayout();
}

Expand All @@ -53,8 +54,11 @@ public function markAsReadAction()
$notificationId = (int)$this->getRequest()->getParam('id');
if ($notificationId) {
try {
$this->_objectManager->create('Magento\AdminNotification\Model\NotificationService')
->markAsRead($notificationId);
$this->_objectManager->create(
'Magento\AdminNotification\Model\NotificationService'
)->markAsRead(
$notificationId
);
$this->messageManager->addSuccess(__('The message has been marked as Read.'));
} catch (\Magento\Core\Exception $e) {
$this->messageManager->addError($e->getMessage());
Expand Down Expand Up @@ -84,8 +88,11 @@ public function ajaxMarkAsReadAction()
$notificationId = (int)$this->getRequest()->getPost('id');
$responseData = array();
try {
$this->_objectManager->create('Magento\AdminNotification\Model\NotificationService')
->markAsRead($notificationId);
$this->_objectManager->create(
'Magento\AdminNotification\Model\NotificationService'
)->markAsRead(
$notificationId
);
$responseData['success'] = true;
} catch (\Exception $e) {
$responseData['success'] = false;
Expand All @@ -106,14 +113,14 @@ public function massMarkAsReadAction()
} else {
try {
foreach ($ids as $id) {
$model = $this->_objectManager->create('Magento\AdminNotification\Model\Inbox')
->load($id);
$model = $this->_objectManager->create('Magento\AdminNotification\Model\Inbox')->load($id);
if ($model->getId()) {
$model->setIsRead(1)
->save();
$model->setIsRead(1)->save();
}
}
$this->messageManager->addSuccess(__('A total of %1 record(s) have been marked as Read.', count($ids)));
$this->messageManager->addSuccess(
__('A total of %1 record(s) have been marked as Read.', count($ids))
);
} catch (\Magento\Core\Exception $e) {
$this->messageManager->addError($e->getMessage());
} catch (\Exception $e) {
Expand All @@ -132,27 +139,20 @@ public function massMarkAsReadAction()
public function removeAction()
{
if ($id = $this->getRequest()->getParam('id')) {
$model = $this->_objectManager->create('Magento\AdminNotification\Model\Inbox')
->load($id);
$model = $this->_objectManager->create('Magento\AdminNotification\Model\Inbox')->load($id);

if (!$model->getId()) {
$this->_redirect('adminhtml/*/');
return;
}

try {
$model->setIsRemove(1)
->save();
$this->messageManager->addSuccess(
__('The message has been removed.')
);
$model->setIsRemove(1)->save();
$this->messageManager->addSuccess(__('The message has been removed.'));
} catch (\Magento\Core\Exception $e) {
$this->messageManager->addError($e->getMessage());
} catch (\Exception $e) {
$this->messageManager->addException(
$e,
__("We couldn't remove the messages because of an error.")
);
$this->messageManager->addException($e, __("We couldn't remove the messages because of an error."));
}

$this->_redirect('adminhtml/*/');
Expand All @@ -172,11 +172,9 @@ public function massRemoveAction()
} else {
try {
foreach ($ids as $id) {
$model = $this->_objectManager->create('Magento\AdminNotification\Model\Inbox')
->load($id);
$model = $this->_objectManager->create('Magento\AdminNotification\Model\Inbox')->load($id);
if ($model->getId()) {
$model->setIsRemove(1)
->save();
$model->setIsRemove(1)->save();
}
}
$this->messageManager->addSuccess(__('Total of %1 record(s) have been removed.', count($ids)));
Expand Down
Expand Up @@ -31,19 +31,21 @@ class Message extends \Magento\Backend\App\AbstractAction
public function listAction()
{
$severity = $this->getRequest()->getParam('severity');
$messageCollection = $this->_objectManager
->get('Magento\AdminNotification\Model\Resource\System\Message\Collection');
$messageCollection = $this->_objectManager->get(
'Magento\AdminNotification\Model\Resource\System\Message\Collection'
);
if ($severity) {
$messageCollection->setSeverity($severity);
}
$result = array();
foreach ($messageCollection->getItems() as $item) {
$result[] = array(
'severity' => $item->getSeverity(), 'text' => $item->getText()
);
$result[] = array('severity' => $item->getSeverity(), 'text' => $item->getText());
}
$this->getResponse()
->setHeader('Content-Type', 'application/json')
->setBody($this->_objectManager->get('Magento\Core\Helper\Data')->jsonEncode($result));
$this->getResponse()->setHeader(
'Content-Type',
'application/json'
)->setBody(
$this->_objectManager->get('Magento\Core\Helper\Data')->jsonEncode($result)
);
}
}
2 changes: 1 addition & 1 deletion app/code/Magento/AdminNotification/Helper/Data.php
Expand Up @@ -34,7 +34,7 @@
*/
class Data extends \Magento\App\Helper\AbstractHelper
{
const XML_PATH_POPUP_URL = 'system/adminnotification/popup_url';
const XML_PATH_POPUP_URL = 'system/adminnotification/popup_url';

/**
* Widget Popup Notification Object URL
Expand Down
Expand Up @@ -40,11 +40,11 @@ class Frequency implements \Magento\Option\ArrayInterface
public function toOptionArray()
{
return array(
1 => __('1 Hour'),
2 => __('2 Hours'),
6 => __('6 Hours'),
12 => __('12 Hours'),
24 => __('24 Hours')
1 => __('1 Hour'),
2 => __('2 Hours'),
6 => __('6 Hours'),
12 => __('12 Hours'),
24 => __('24 Hours')
);
}
}

0 comments on commit 9c2b633

Please sign in to comment.