Skip to content

Commit

Permalink
20.2.0 SHQ16-2938 option to not modify carrier, SHQ16-2434 add IP to …
Browse files Browse the repository at this point in the history
…request, SHQ16-2489 handle empty street
  • Loading branch information
wsajason committed Dec 21, 2017
1 parent 592b423 commit 22d211f
Show file tree
Hide file tree
Showing 26 changed files with 125 additions and 119 deletions.
1 change: 1 addition & 0 deletions CHANGELOG-PUBLIC.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# Change Log
49 changes: 28 additions & 21 deletions CHANGELOG.MD
Original file line number Diff line number Diff line change
@@ -1,43 +1,50 @@
# Change Log

## [1.3.2](https://github.com/webshopapps/module-logger/tree/1.3.2) (2017-03-10)
[Full Changelog](https://github.com/webshopapps/module-logger/compare/1.3.0...1.3.2)
## [20.2.0](https://github.com/webshopapps/module-logger/tree/20.2.0) (2017-12-01)
[Full Changelog](https://github.com/webshopapps/module-logger/compare/20.1.1...20.2.0)

## [1.3.0](https://github.com/webshopapps/module-logger/tree/1.3.0) (2017-03-10)
[Full Changelog](https://github.com/webshopapps/module-logger/compare/1.3.1...1.3.0)
**Merged pull requests:**

## [1.3.1](https://github.com/webshopapps/module-logger/tree/1.3.1) (2017-03-10)
[Full Changelog](https://github.com/webshopapps/module-logger/compare/1.3.3...1.3.1)
- SHQ16-2432 Code sniffer changes [\#1](https://github.com/webshopapps/module-logger/pull/1) ([wsagen](https://github.com/wsagen))

## [1.3.3](https://github.com/webshopapps/module-logger/tree/1.3.3) (2017-03-10)
[Full Changelog](https://github.com/webshopapps/module-logger/compare/1.2.9...1.3.3)
## [20.1.1](https://github.com/webshopapps/module-logger/tree/20.1.1) (2017-03-10)
[Full Changelog](https://github.com/webshopapps/module-logger/compare/20.1.0...20.1.1)

## [1.2.9](https://github.com/webshopapps/module-logger/tree/1.2.9) (2017-02-14)
[Full Changelog](https://github.com/webshopapps/module-logger/compare/1.2.7...1.2.9)
## [20.1.0](https://github.com/webshopapps/module-logger/tree/20.1.0) (2017-03-10)
[Full Changelog](https://github.com/webshopapps/module-logger/compare/20.1.3...20.1.0)

## [1.2.7](https://github.com/webshopapps/module-logger/tree/1.2.7) (2016-11-30)
[Full Changelog](https://github.com/webshopapps/module-logger/compare/1.2.8...1.2.7)
## [20.1.3](https://github.com/webshopapps/module-logger/tree/20.1.3) (2017-03-10)
[Full Changelog](https://github.com/webshopapps/module-logger/compare/20.1.2...20.1.3)

## [20.1.2](https://github.com/webshopapps/module-logger/tree/20.1.2) (2017-03-10)
[Full Changelog](https://github.com/webshopapps/module-logger/compare/1.2.9...20.1.2)

## [1.2.9](https://github.com/webshopapps/module-logger/tree/1.2.9) (2017-02-14)
[Full Changelog](https://github.com/webshopapps/module-logger/compare/1.2.8...1.2.9)

## [1.2.8](https://github.com/webshopapps/module-logger/tree/1.2.8) (2016-11-30)
[Full Changelog](https://github.com/webshopapps/module-logger/compare/1.2.6...1.2.8)
[Full Changelog](https://github.com/webshopapps/module-logger/compare/1.2.7...1.2.8)

## [1.2.6](https://github.com/webshopapps/module-logger/tree/1.2.6) (2016-08-18)
[Full Changelog](https://github.com/webshopapps/module-logger/compare/1.2.1...1.2.6)
## [1.2.7](https://github.com/webshopapps/module-logger/tree/1.2.7) (2016-11-30)
[Full Changelog](https://github.com/webshopapps/module-logger/compare/1.2.6...1.2.7)

## [1.2.1](https://github.com/webshopapps/module-logger/tree/1.2.1) (2016-03-09)
[Full Changelog](https://github.com/webshopapps/module-logger/compare/1.2.2...1.2.1)
## [1.2.6](https://github.com/webshopapps/module-logger/tree/1.2.6) (2016-08-18)
[Full Changelog](https://github.com/webshopapps/module-logger/compare/1.2.2...1.2.6)

## [1.2.2](https://github.com/webshopapps/module-logger/tree/1.2.2) (2016-03-09)
[Full Changelog](https://github.com/webshopapps/module-logger/compare/1.2.3...1.2.2)
[Full Changelog](https://github.com/webshopapps/module-logger/compare/1.2.1...1.2.2)

## [1.2.3](https://github.com/webshopapps/module-logger/tree/1.2.3) (2016-03-09)
[Full Changelog](https://github.com/webshopapps/module-logger/compare/1.2.4...1.2.3)
## [1.2.1](https://github.com/webshopapps/module-logger/tree/1.2.1) (2016-03-09)
[Full Changelog](https://github.com/webshopapps/module-logger/compare/1.2.4...1.2.1)

## [1.2.4](https://github.com/webshopapps/module-logger/tree/1.2.4) (2016-03-09)
[Full Changelog](https://github.com/webshopapps/module-logger/compare/1.2.5...1.2.4)

## [1.2.5](https://github.com/webshopapps/module-logger/tree/1.2.5) (2016-03-09)
[Full Changelog](https://github.com/webshopapps/module-logger/compare/1.0.2...1.2.5)
[Full Changelog](https://github.com/webshopapps/module-logger/compare/1.2.3...1.2.5)

## [1.2.3](https://github.com/webshopapps/module-logger/tree/1.2.3) (2016-03-09)
[Full Changelog](https://github.com/webshopapps/module-logger/compare/1.0.2...1.2.3)

## [1.0.2](https://github.com/webshopapps/module-logger/tree/1.0.2) (2016-03-04)
[Full Changelog](https://github.com/webshopapps/module-logger/compare/1.0.1...1.0.2)
Expand Down
2 changes: 1 addition & 1 deletion src/Block/Adminhtml/Logger.php
Original file line number Diff line number Diff line change
Expand Up @@ -51,4 +51,4 @@ protected function _construct()

$this->buttonList->remove('add');
}
}
}
3 changes: 1 addition & 2 deletions src/Block/Adminhtml/Logger/Grid.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,5 +42,4 @@ class Grid extends WidgetGrid
* @var string
*/
protected $_template = 'ShipperHQ_Logger::grid.phtml';

}
}
13 changes: 7 additions & 6 deletions src/Block/Adminhtml/Logger/Grid/Renderer/Actions.php
Original file line number Diff line number Diff line change
Expand Up @@ -64,10 +64,12 @@ public function render(\Magento\Framework\DataObject $row)
{
$encodedUrl = $this->_urlHelper->getEncodedUrl();
if (!$row->getIsRead()) {
return sprintf('<a href="%s">%s</a> | <a href="%s" onClick="deleteConfirm(\'%s\',this.href); return false;">%s</a>',
return sprintf(
'<a href="%s">%s</a> | <a href="%s" onClick="deleteConfirm(\'%s\',this.href); return false;">%s</a>',
$this->getUrl(
'*/*/markAsRead/',
['_current' => true, 'id' => $row->getId()] ),
['_current' => true, 'id' => $row->getId()]
),
__('Mark as Read'),
$this->getUrl(
'*/*/remove/',
Expand All @@ -80,9 +82,9 @@ public function render(\Magento\Framework\DataObject $row)
__('Are you sure?'),
__('Remove')
);
}
else {
return sprintf('<a href="%s" onClick="deleteConfirm(\'%s\',this.href); return false;">%s</a>',
} else {
return sprintf(
'<a href="%s" onClick="deleteConfirm(\'%s\',this.href); return false;">%s</a>',
$this->getUrl(
'*/*/remove/',
[
Expand All @@ -98,4 +100,3 @@ public function render(\Magento\Framework\DataObject $row)
return parent::render($row);
}
}

5 changes: 3 additions & 2 deletions src/Block/Adminhtml/Logger/Grid/Renderer/Message.php
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,10 @@ class Message extends \Magento\Backend\Block\Widget\Grid\Column\Renderer\Abstrac
public function render(\Magento\Framework\DataObject $row)
{
$dots = '';
if(strlen($row->getDescription())>512) { $dots = ' . . . '; }
if (strlen($row->getDescription())>512) {
$dots = ' . . . ';
}
return '<span class="grid-row-title">' . $row->getTitle() . '</span>'
. ($row->getDescription() ? '<br />' . substr($row->getDescription(), 0, 512) . $dots : '');
}
}

3 changes: 2 additions & 1 deletion src/Block/Adminhtml/Logger/View.php
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,8 @@ public function getMessageData()
return $log;
}

public function getBackUrl() {
public function getBackUrl()
{
return $this->getUrl('shqlogger/*/index');
}
}
13 changes: 7 additions & 6 deletions src/Block/Config/Form/Fieldset/Modules/DisableLogging.php
Original file line number Diff line number Diff line change
Expand Up @@ -83,24 +83,25 @@ public function render(\Magento\Framework\Data\Form\Element\AbstractElement $ele

$modules = $this->_moduleList->getNames();

$wsaApproved = array('webshopapps','shipperhq');
$wsaApproved = ['webshopapps','shipperhq'];

sort($modules);

$viewAllExtns = $this->_scopeConfig->isSetFlag(
'shqlogmenu/shqlogger/view_all_extns',
\Magento\Store\Model\ScopeInterface::SCOPE_STORE);
\Magento\Store\Model\ScopeInterface::SCOPE_STORE
);

foreach ($modules as $moduleName) {
if ($moduleName==='Mage_Adminhtml' ||$moduleName==='ShipperHQ_Common' || $moduleName==='ShipperHQ_Logger'
|| stripos($moduleName,'Mage_') !== false) {
if ($moduleName==='Mage_Adminhtml' || $moduleName==='ShipperHQ_Common' || $moduleName==='ShipperHQ_Logger'
|| stripos($moduleName, 'Mage_') !== false) {
continue;
}

$providerArray = explode('_',$moduleName);
$providerArray = explode('_', $moduleName);
$provider = strtolower($providerArray[0]);

if (!$viewAllExtns && !in_array($provider, $wsaApproved)){
if (!$viewAllExtns && !in_array($provider, $wsaApproved)) {
continue;
}
$html.= $this->_getFieldHtml($element, $moduleName);
Expand Down
3 changes: 1 addition & 2 deletions src/Controller/Adminhtml/Logger.php
Original file line number Diff line number Diff line change
Expand Up @@ -88,5 +88,4 @@ protected function _isAllowed()
{
return $this->_authorization->isAllowed('ShipperHQ_Logger::logger');
}

}
}
2 changes: 1 addition & 1 deletion src/Controller/Adminhtml/Logger/Index.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
* See COPYING.txt for license details.
*/
namespace ShipperHQ\Logger\Controller\Adminhtml\Logger;

class Index extends \ShipperHQ\Logger\Controller\Adminhtml\Logger
{
/**
Expand All @@ -50,4 +51,3 @@ public function execute()
return $resultPage;
}
}
?>
1 change: 0 additions & 1 deletion src/Controller/Adminhtml/Logger/MassDestroy.php
Original file line number Diff line number Diff line change
Expand Up @@ -58,5 +58,4 @@ public function execute()

$this->_redirect('shqlogger/*/index');
}

}
1 change: 0 additions & 1 deletion src/Controller/Adminhtml/Logger/MassMarkAsRead.php
Original file line number Diff line number Diff line change
Expand Up @@ -65,5 +65,4 @@ public function execute()
}
$this->_redirect('shqlogger/*/index');
}

}
1 change: 0 additions & 1 deletion src/Controller/Adminhtml/Logger/MassRemove.php
Original file line number Diff line number Diff line change
Expand Up @@ -61,5 +61,4 @@ public function execute()

$this->_redirect('shqlogger/*/index');
}

}
3 changes: 1 addition & 2 deletions src/Controller/Adminhtml/Logger/View.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
* See COPYING.txt for license details.
*/
namespace ShipperHQ\Logger\Controller\Adminhtml\Logger;

class View extends \ShipperHQ\Logger\Controller\Adminhtml\Logger
{
/**
Expand All @@ -51,7 +52,5 @@ public function execute()
$this->_view->loadLayout();
$this->_view->getLayout()->getBlock('shqlogger_logger_log_view')->setData('log', $model);
$this->_view->renderLayout();

}
}
?>
6 changes: 2 additions & 4 deletions src/Helper/Config.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,6 @@
use ShipperHQ\Common\Helper\AbstractConfig;
use Psr\Log\LogLevel;



/**
* Class Config
*/
Expand All @@ -60,13 +58,13 @@ class Config extends AbstractConfig implements ConfigInterface
public function getCodes()
{
return [
'logLevel' =>array(
'logLevel' =>[
self::SEVERITY_CRITICAL => __('critical'),
self::SEVERITY_MAJOR => __('warning'),
self::SEVERITY_MINOR => __('info'),
self::SEVERITY_NOTICE => __('debug'),
self::SEVERITY_NONE => __('DISABLED')
),
],
];
}
}
15 changes: 7 additions & 8 deletions src/Model/Log.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ protected function _construct()
*/
public function loadLatestNotice()
{
$this->setData(array());
$this->setData([]);
$this->getResource()->loadLatestNotice($this);
return $this;
}
Expand All @@ -74,21 +74,21 @@ public function getNoticeStatus()
* @param array $data
* @return \ShipperHQ\Logger\Model\Log
*/
public function parse($severity,$extension,$title,$description,$code=0,$url='')
public function parse($severity, $extension, $title, $description, $code = 0, $url = '')
{
if (is_array($description) || is_object($description)) {
$description = print_r($description, true);
}

$feedData[] = array(
$feedData[] = [
'severity' => $severity,
'date_added' => gmdate('Y-m-d H:i:s'),
'extension' => $extension,
'title' => $title,
'description' => $description,
'code' => $code,
'url' => $url
);
'code' => $code,
'url' => $url
];

return $this->getResource()->parse($this, $feedData);
}
Expand All @@ -97,5 +97,4 @@ public function truncate()
{
return $this->getResource()->truncate();
}

}
}
Loading

0 comments on commit 22d211f

Please sign in to comment.