Skip to content

Commit

Permalink
PSR2 update
Browse files Browse the repository at this point in the history
  • Loading branch information
sreichel committed Jun 23, 2019
1 parent 49ead4d commit 8478c2f
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 18 deletions.
10 changes: 4 additions & 6 deletions app/code/core/Mage/AdminNotification/Model/Feed.php
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,8 @@ class Mage_AdminNotification_Model_Feed extends Mage_Core_Model_Abstract
*
*/
protected function _construct()
{}
{
}

/**
* Retrieve feed url
Expand Down Expand Up @@ -96,7 +97,6 @@ public function checkUpdate()
if ($feedData) {
Mage::getModel('adminnotification/inbox')->parse(array_reverse($feedData));
}

}
$this->setLastUpdate();

Expand Down Expand Up @@ -171,8 +171,7 @@ public function getFeedData()

try {
$xml = new SimpleXMLElement($data);
}
catch (Exception $e) {
} catch (Exception $e) {
return false;
}

Expand All @@ -187,8 +186,7 @@ public function getFeedXml()
try {
$data = $this->getFeedData();
$xml = new SimpleXMLElement($data);
}
catch (Exception $e) {
} catch (Exception $e) {
$xml = new SimpleXMLElement('<?xml version="1.0" encoding="utf-8" ?>');
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@
* @package Mage_AdminNotification
* @author Magento Core Team <core@magentocommerce.com>
*/
class Mage_AdminNotification_Model_Mysql4_Inbox_Collection
extends Mage_AdminNotification_Model_Resource_Inbox_Collection
class Mage_AdminNotification_Model_Mysql4_Inbox_Collection extends Mage_AdminNotification_Model_Resource_Inbox_Collection
{
}
4 changes: 0 additions & 4 deletions app/code/core/Mage/AdminNotification/Model/Observer.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,15 +41,11 @@ class Mage_AdminNotification_Model_Observer
*/
public function preDispatch(Varien_Event_Observer $observer)
{

if (Mage::getSingleton('admin/session')->isLoggedIn()) {

$feedModel = Mage::getModel('adminnotification/feed');
/* @var Mage_AdminNotification_Model_Feed $feedModel */

$feedModel->checkUpdate();

}

}
}
Original file line number Diff line number Diff line change
Expand Up @@ -71,12 +71,18 @@
'nullable' => false,
'default' => '0',
), 'Flag if notification might be removed')
->addIndex($installer->getIdxName('adminnotification/inbox', array('severity')),
array('severity'))
->addIndex($installer->getIdxName('adminnotification/inbox', array('is_read')),
array('is_read'))
->addIndex($installer->getIdxName('adminnotification/inbox', array('is_remove')),
array('is_remove'))
->addIndex(
$installer->getIdxName('adminnotification/inbox', array('severity')),
array('severity')
)
->addIndex(
$installer->getIdxName('adminnotification/inbox', array('is_read')),
array('is_read')
)
->addIndex(
$installer->getIdxName('adminnotification/inbox', array('is_remove')),
array('is_remove')
)
->setComment('Adminnotification Inbox');
$installer->getConnection()->createTable($table);

Expand Down

0 comments on commit 8478c2f

Please sign in to comment.