Skip to content

Commit 4282752

Browse files
committed
Changed copyright
1 parent 39f4b02 commit 4282752

File tree

7 files changed

+50
-52
lines changed

7 files changed

+50
-52
lines changed

Controller/Adminhtml/Actions.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?php
2-
/** Copyright © Magefan (support@magefan.com).
3-
* All rights reserved.
4-
* See LICENSE.txt for license details (http://opensource.org/licenses/osl-3.0.php).
2+
/**
3+
* Copyright © Magefan (support@magefan.com). All rights reserved.
4+
* Please visit Magefan.com for license details (https://magefan.com/end-user-license-agreement).
55
*/
66

77
namespace Magefan\Community\Controller\Adminhtml;

Model/AdminNotificationFeed.php

Lines changed: 16 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
<?php
2-
3-
/** Copyright © Magefan (support@magefan.com).
4-
* All rights reserved.
5-
* See LICENSE.txt for license details (http://opensource.org/licenses/osl-3.0.php).
2+
/**
3+
* Copyright © Magefan (support@magefan.com). All rights reserved.
4+
* Please visit Magefan.com for license details (https://magefan.com/end-user-license-agreement).
65
*/
76

87
namespace Magefan\Community\Model;
@@ -15,18 +14,26 @@
1514
*/
1615
class AdminNotificationFeed extends \Magento\AdminNotification\Model\Feed
1716
{
17+
/**
18+
* @var string
19+
*/
20+
const MAGEFAN_CACHE_KEY = 'magefan_admin_notifications_lastcheck' ;
21+
1822
/**
1923
* @var \Magento\Backend\Model\Auth\Session
2024
*/
2125
protected $_backendAuthSession;
26+
2227
/**
2328
* @var \Magento\Framework\Module\ModuleListInterface
2429
*/
2530
protected $_moduleList;
31+
2632
/**
2733
* @var \Magento\Framework\Module\Manager
2834
*/
2935
protected $_moduleManager;
36+
3037
/**
3138
* @param \Magento\Framework\Model\Context $context
3239
* @param \Magento\Framework\Registry $registry
@@ -92,7 +99,7 @@ public function getFeedUrl()
9299
}
93100

94101
/**
95-
* Get Magefan Modules Info
102+
* Retrieve Magefan modules info
96103
*
97104
* @return $this
98105
*/
@@ -127,13 +134,13 @@ public function checkUpdate()
127134
}
128135

129136
/**
130-
* Retrieve Update Frequency
137+
* Retrieve update аrequency
131138
*
132139
* @return int
133140
*/
134141
public function getFrequency()
135142
{
136-
return 86400;
143+
return 86400 * 2;
137144
}
138145

139146
/**
@@ -143,7 +150,7 @@ public function getFrequency()
143150
*/
144151
public function getLastUpdate()
145152
{
146-
return $this->_cacheManager->load('magefan_admin_notifications_lastcheck');
153+
return $this->_cacheManager->load(self::MAGEFAN_CACHE_KEY);
147154
}
148155

149156
/**
@@ -153,7 +160,7 @@ public function getLastUpdate()
153160
*/
154161
public function setLastUpdate()
155162
{
156-
$this->_cacheManager->save(time(), 'magefan_admin_notifications_lastcheck');
163+
$this->_cacheManager->save(time(), self::MAGEFAN_CACHE_KEY);
157164
return $this;
158165
}
159166
}
Lines changed: 12 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
<?php
2-
3-
/** Copyright © Magefan (support@magefan.com).
4-
* All rights reserved.
5-
* See LICENSE.txt for license details (http://opensource.org/licenses/osl-3.0.php).
2+
/**
3+
* Copyright © Magefan (support@magefan.com). All rights reserved.
4+
* Please visit Magefan.com for license details (https://magefan.com/end-user-license-agreement).
65
*/
76

87
namespace Magefan\Community\Observer;
@@ -15,33 +14,25 @@
1514
class PredispathAdminActionControllerObserver implements ObserverInterface
1615
{
1716
/**
18-
* @var \Magefan\Blog\Model\AdminNotificationFeedFactory
17+
* @var \Magefan\Community\Model\AdminNotificationFeedFactory
1918
*/
20-
protected $_feedFactory;
19+
protected $feedFactory;
2120

2221
/**
2322
* @var \Magento\Backend\Model\Auth\Session
2423
*/
25-
protected $_backendAuthSession;
26-
27-
/**
28-
* @var \Magefan\Blog\Model\Comment\Notification
29-
*/
30-
protected $commentNotification;
24+
protected $backendAuthSession;
3125

3226
/**
33-
* @param \Magefan\Blog\Model\AdminNotificationFeedFactory $feedFactory
27+
* @param \Magefan\Community\Model\AdminNotificationFeedFactory $feedFactory
3428
* @param \Magento\Backend\Model\Auth\Session $backendAuthSession
35-
* @param \Magefan\Blog\Model\Comment\Notification $commentNotification,
3629
*/
3730
public function __construct(
3831
\Magefan\Community\Model\AdminNotificationFeedFactory $feedFactory,
39-
\Magento\Backend\Model\Auth\Session $backendAuthSession,
40-
\Magefan\Blog\Model\Comment\Notification $commentNotification
32+
\Magento\Backend\Model\Auth\Session $backendAuthSession
4133
) {
42-
$this->_feedFactory = $feedFactory;
43-
$this->_backendAuthSession = $backendAuthSession;
44-
$this->commentNotification = $commentNotification;
34+
$this->feedFactory = $feedFactory;
35+
$this->backendAuthSession = $backendAuthSession;
4536
}
4637

4738
/**
@@ -53,13 +44,11 @@ public function __construct(
5344
*/
5445
public function execute(\Magento\Framework\Event\Observer $observer)
5546
{
56-
if ($this->_backendAuthSession->isLoggedIn()) {
47+
if ($this->backendAuthSession->isLoggedIn()) {
5748

58-
$feedModel = $this->_feedFactory->create();
49+
$feedModel = $this->feedFactory->create();
5950
/* @var $feedModel \Magefan\Community\Model\AdminNotificationFeed */
6051
$feedModel->checkUpdate();
61-
/** Check pending blog comments */
62-
$this->commentNotification->checkComments();
6352
}
6453
}
6554
}

composer.json

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,12 @@
11
{
22
"name": "magefan/module-community",
33
"description": "",
4-
"license": "proprietary",
5-
"authors": [
6-
{
7-
"email": "info@mage2gen.com",
8-
"name": "Mage2Gen"
9-
}
10-
],
11-
"minimum-stability": "dev",
12-
"require": {},
4+
"require": {
5+
"php": "~5.6.5 || >=7.0"
6+
},
7+
"license": "EULA",
8+
"version": "2.0.0",
9+
"type": "magento2-module",
1310
"autoload": {
1411
"files": [
1512
"registration.php"

etc/adminhtml/events.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
<?xml version="1.0"?>
22
<!--
3-
/** Copyright © Magefan (support@magefan.com).
4-
* All rights reserved.
5-
* See LICENSE.txt for license details (http://opensource.org/licenses/osl-3.0.php).
3+
/**
4+
* Copyright © Magefan (support@magefan.com). All rights reserved.
5+
* Please visit Magefan.com for license details (https://magefan.com/end-user-license-agreement).
66
*/
77
-->
88
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Event/etc/events.xsd">

etc/module.xml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,10 @@
11
<?xml version="1.0" ?>
2+
<!--
3+
/**
4+
* Copyright © Magefan (support@magefan.com). All rights reserved.
5+
* Please visit Magefan.com for license details (https://magefan.com/end-user-license-agreement).
6+
*/
7+
-->
28
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Module/etc/module.xsd">
3-
<module name="Magefan_Community" setup_version="1.0.0"/>
9+
<module name="Magefan_Community" setup_version="2.0.0"/>
410
</config>

registration.php

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
<?php
2-
3-
/** Copyright © Magefan (support@magefan.com).
4-
* All rights reserved.
5-
* See LICENSE.txt for license details (http://opensource.org/licenses/osl-3.0.php).
2+
/**
3+
* Copyright © Magefan (support@magefan.com). All rights reserved.
4+
* Please visit Magefan.com for license details (https://magefan.com/end-user-license-agreement).
65
*/
76

87
\Magento\Framework\Component\ComponentRegistrar::register(

0 commit comments

Comments
 (0)