Reviews_Sidebar - Version 1.0.5

Version Notes

None

Download this release

Release Info

Developer Magento Core Team
Extension Reviews_Sidebar
Version 1.0.5
Comparing to
See all releases


Code changes from version 1.0.4 to 1.0.5

app/code/community/Amasty/Review/etc/config.xml CHANGED
@@ -2,7 +2,7 @@
2
  <config>
3
  <modules>
4
  <Amasty_Review>
5
- <version>1.0.1</version>
6
  </Amasty_Review>
7
  </modules>
8
  <adminhtml>
2
  <config>
3
  <modules>
4
  <Amasty_Review>
5
+ <version>1.0.5</version>
6
  </Amasty_Review>
7
  </modules>
8
  <adminhtml>
app/code/local/Amasty/Base/Model/Feed.php CHANGED
@@ -22,6 +22,7 @@ class Amasty_Base_Model_Feed extends Mage_AdminNotification_Model_Feed
22
  if (($this->getFrequency() + $this->getLastUpdate()) > time()) {
23
  return $this;
24
  }
 
25
  $this->setLastUpdate();
26
 
27
  if (!extension_loaded('curl')) {
@@ -36,11 +37,14 @@ class Amasty_Base_Model_Feed extends Mage_AdminNotification_Model_Feed
36
  if ($feedXml && $feedXml->channel && $feedXml->channel->item) {
37
  foreach ($feedXml->channel->item as $item) {
38
  $date = $this->getDate((string)$item->pubDate);
 
39
  // compare strings, but they are well-formmatted
40
- if ($date < $wasInstalled)
41
  continue;
42
- if (!$this->isInteresting($item))
 
43
  continue;
 
44
 
45
  $feedData[] = array(
46
  'severity' => 3,
@@ -101,13 +105,13 @@ class Amasty_Base_Model_Feed extends Mage_AdminNotification_Model_Feed
101
 
102
  protected function getInterests()
103
  {
104
- return Mage::getStoreConfig(self::XML_FREQUENCY_PATH);
105
  }
106
 
107
  protected function isInteresting($item)
108
  {
109
  $interests = @explode(',', $this->getInterests());
110
- $types = @explode(':', (string)$item->types);
111
  $extenion = (string)$item->extension;
112
 
113
  $selfUpgrades = array_search(Amasty_Base_Model_Source_Updates_Type::TYPE_INSTALLED_UPDATE, $types);
22
  if (($this->getFrequency() + $this->getLastUpdate()) > time()) {
23
  return $this;
24
  }
25
+
26
  $this->setLastUpdate();
27
 
28
  if (!extension_loaded('curl')) {
37
  if ($feedXml && $feedXml->channel && $feedXml->channel->item) {
38
  foreach ($feedXml->channel->item as $item) {
39
  $date = $this->getDate((string)$item->pubDate);
40
+
41
  // compare strings, but they are well-formmatted
42
+ if ($date < $wasInstalled){
43
  continue;
44
+ }
45
+ if (!$this->isInteresting($item)){
46
  continue;
47
+ }
48
 
49
  $feedData[] = array(
50
  'severity' => 3,
105
 
106
  protected function getInterests()
107
  {
108
+ return Mage::getStoreConfig(self::XML_ITERESTS);
109
  }
110
 
111
  protected function isInteresting($item)
112
  {
113
  $interests = @explode(',', $this->getInterests());
114
+ $types = @explode(':', (string)$item->type);
115
  $extenion = (string)$item->extension;
116
 
117
  $selfUpgrades = array_search(Amasty_Base_Model_Source_Updates_Type::TYPE_INSTALLED_UPDATE, $types);
app/code/local/Amasty/Base/etc/config.xml CHANGED
@@ -1,94 +1,91 @@
1
- <?xml version="1.0"?>
2
- <config>
3
- <modules>
4
- <Amasty_Base>
5
- <version>1.0.1</version>
6
- <platform>ee</platform>
7
- </Amasty_Base>
8
- </modules>
9
-
10
- <global>
11
- <blocks>
12
- <ambase>
13
- <class>Amasty_Base_Block</class>
14
- </ambase>
15
- </blocks>
16
- <resources>
17
- <ambase_setup>
18
- <setup>
19
- <module>Amasty_Base</module>
20
- </setup>
21
- <connection>
22
- <use>core_setup</use>
23
- </connection>
24
- </ambase_setup>
25
- <ambase_write>
26
- <connection>
27
- <use>core_write</use>
28
- </connection>
29
- </ambase_write>
30
- <ambase_read>
31
- <connection>
32
- <use>core_read</use>
33
- </connection>
34
- </ambase_read>
35
- </resources>
36
- <models>
37
- <ambase>
38
- <class>Amasty_Base_Model</class>
39
- </ambase>
40
- </models>
41
- <helpers>
42
- <ambase>
43
- <class>Amasty_Base_Helper</class>
44
- </ambase>
45
- </helpers>
46
- </global>
47
-
48
- <adminhtml>
49
- <acl>
50
- <resources>
51
- <all>
52
- <title>Allow Everything</title>
53
- </all>
54
- <admin>
55
- <children>
56
- <system>
57
- <children>
58
- <config>
59
- <children>
60
- <ambase>
61
- <title>Amasty - Extensions Information</title>
62
- </ambase>
63
- </children>
64
- </config>
65
- </children>
66
- </system>
67
- </children>
68
- </admin>
69
- </resources>
70
- </acl>
71
- <events>
72
- <controller_action_predispatch>
73
- <observers>
74
- <ambase_upds>
75
- <type>singleton</type>
76
- <class>ambase/feed</class>
77
- <method>check</method>
78
- </ambase_upds>
79
- </observers>
80
- </controller_action_predispatch>
81
- </events>
82
- </adminhtml>
83
- <default>
84
- <ambase>
85
- <feed>
86
- <url>amasty.com/feed.xml</url>
87
- <use_https>0</use_https>
88
- <check_frequency>86400</check_frequency>
89
- <enabled>1</enabled>
90
- <interests>INFO,PROMO,UPDATE_RELEASE,NEW_RELEASE,INSTALLED_UPDATE</interests>
91
- </feed>
92
- </ambase>
93
- </default>
94
  </config>
1
+ <?xml version="1.0"?>
2
+ <config>
3
+ <modules>
4
+ <Amasty_Base>
5
+ <version>1.0.1</version>
6
+ <platform>ee</platform>
7
+ </Amasty_Base>
8
+ </modules>
9
+
10
+ <global>
11
+ <blocks>
12
+ <ambase>
13
+ <class>Amasty_Base_Block</class>
14
+ </ambase>
15
+ </blocks>
16
+ <resources>
17
+ <ambase_setup>
18
+ <setup>
19
+ <module>Amasty_Base</module>
20
+ </setup>
21
+ <connection>
22
+ <use>core_setup</use>
23
+ </connection>
24
+ </ambase_setup>
25
+ <ambase_write>
26
+ <connection>
27
+ <use>core_write</use>
28
+ </connection>
29
+ </ambase_write>
30
+ <ambase_read>
31
+ <connection>
32
+ <use>core_read</use>
33
+ </connection>
34
+ </ambase_read>
35
+ </resources>
36
+ <models>
37
+ <ambase>
38
+ <class>Amasty_Base_Model</class>
39
+ </ambase>
40
+ </models>
41
+ <helpers>
42
+ <ambase>
43
+ <class>Amasty_Base_Helper</class>
44
+ </ambase>
45
+ </helpers>
46
+ </global>
47
+
48
+ <adminhtml>
49
+ <acl>
50
+ <resources>
51
+ <all>
52
+ <title>Allow Everything</title>
53
+ </all>
54
+ <admin>
55
+ <children>
56
+ <system>
57
+ <children>
58
+ <config>
59
+ <children>
60
+ <ambase>
61
+ <title>Amasty - Extensions Information</title>
62
+ </ambase>
63
+ </children>
64
+ </config>
65
+ </children>
66
+ </system>
67
+ </children>
68
+ </admin>
69
+ </resources>
70
+ </acl>
71
+ <events>
72
+ <controller_action_predispatch>
73
+ <observers>
74
+ <ambase_upds>
75
+ <type>singleton</type>
76
+ <class>ambase/feed</class>
77
+ <method>check</method>
78
+ </ambase_upds>
79
+ </observers>
80
+ </controller_action_predispatch>
81
+ </events>
82
+ </adminhtml>
83
+ <default>
84
+ <ambase>
85
+ <feed>
86
+ <check_frequency>86400</check_frequency>
87
+ <interests>INFO,PROMO,UPDATE_RELEASE,NEW_RELEASE,INSTALLED_UPDATE</interests>
88
+ </feed>
89
+ </ambase>
90
+ </default>
 
 
 
91
  </config>
app/code/local/Amasty/Base/sql/ambase_setup/mysql4-upgrade-1.0.0-1.0.1.php CHANGED
@@ -9,13 +9,14 @@ Mage::getModel('core/config_data')
9
 
10
  $feedData = array();
11
  $feedData[] = array(
12
- 'severity' => 3,
13
- 'date_added' => gmdate('Y-m-d H:i:s', time()); ,
14
- 'title' => 'Amasty\'s extension has been installed.',
15
  'description' => 'You can see versions of the installed extensions right in the admin, as well as configure notifications about major updates.',
16
- 'url' => '#', // getModel('admin/url')->getUrl('config/ambase'),
 
17
  );
18
 
19
- Mage::getModel('adminnotification/inbox')->parse(($feedData));
20
 
21
  $this->endSetup();
9
 
10
  $feedData = array();
11
  $feedData[] = array(
12
+ 'severity' => 4,
13
+ 'date_added' => gmdate('Y-m-d H:i:s', time()),
14
+ 'title' => 'Amasty\'s extension has been installed. Check the Admin > Configuration > Amasty section.',
15
  'description' => 'You can see versions of the installed extensions right in the admin, as well as configure notifications about major updates.',
16
+ 'url' => 'http://amasty.com/news/updates-and-notifications-configuration-9.html'
17
+ // 'url' => Mage::getModel('adminhtml/url')->getUrl('adminhtml/system_config/edit', array('section'=>'ambase')),
18
  );
19
 
20
+ Mage::getModel('adminnotification/inbox')->parse($feedData);
21
 
22
  $this->endSetup();
package.xml CHANGED
@@ -1,7 +1,7 @@
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>Reviews_Sidebar</name>
4
- <version>1.0.4</version>
5
  <stability>stable</stability>
6
  <license>AFL</license>
7
  <channel>community</channel>
@@ -10,9 +10,9 @@
10
  <description>Reviews sidebar block</description>
11
  <notes>None</notes>
12
  <authors><author><name>Amasty Team</name><user>auto-converted</user><email>amastysupport@gmail.com</email></author></authors>
13
- <date>2011-03-04</date>
14
- <time>14:21:19</time>
15
- <contents><target name="mageskin"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="images"><dir name="ambase"><file name="bad.gif" hash="b8379f1ba7ab552ca46b9d5fd0452345"/><file name="ok.gif" hash="a38bc2ee6e116e39c6e2e3013ee50f5e"/><file name="update.gif" hash="8342e11f7739fcfa25134707f0536ed6"/></dir></dir></dir></dir></dir></target><target name="magelocal"><dir name="Amasty"><dir name="Base"><dir name="Block"><file name="Extensions.php" hash="e0f76a6c0e9d3db6f634562cbb0266bc"/></dir><dir name="etc"><file name="adminhtml.xml" hash="2134fcecc3d5cb639a2446dded0032d5"/><file name="config.xml" hash="aca36e496aac596ef0e5266961b71f16"/><file name="system.xml" hash="d7e5cda7d0b09152931039fdf1d4b2bc"/></dir><dir name="Helper"><file name="Data.php" hash="dd3a5d1f14acb20f3a86c43d50fe0dd4"/></dir><dir name="Model"><file name="Feed.php" hash="983c85338cd4e79c154c3672f1f6cfb7"/><dir name="Source"><dir name="Updates"><file name="Type.php" hash="dbb958c4aa01c61578cfb22a1c88a482"/></dir></dir></dir><dir name="sql"><dir name="ambase_setup"><file name="mysql4-install-1.0.0.php" hash="ba30c778afd0f4a959ec9f86d439ea0a"/><file name="mysql4-upgrade-1.0.0-1.0.1.php" hash="2c6e57b799da65393e07e8f9fe77f21b"/></dir></dir></dir></dir></target><target name="magecommunity"><dir name="Amasty"><dir name="Review"><dir name="Block"><file name="Sidebar.php" hash="728917213d55a4e0878a1adf7560beda"/></dir><dir name="etc"><file name="adminhtml.xml" hash="95bdba467b5adbf7920b239fc0e1a003"/><file name="config.xml" hash="36092860f0272d1b84ad25a58e6f441e"/><file name="system.xml" hash="9416b00448bcd2e251196088b3175e4e"/></dir><dir name="Helper"><file name="Data.php" hash="e21dbd2eb8bbbb330f01d9f1c0c6785a"/></dir><dir name="Model"><dir name="Mysql4"><file name="Collection.php" hash="92d8ff7b807bf3fc9aa23be784dc7414"/></dir></dir></dir></dir></target><target name="magedesign"><dir name="frontend"><dir name="default"><dir name="default"><dir name="layout"><file name="amreview.xml" hash="bb51db7e5319681cbcdb30818cafb9d1"/></dir><dir name="template"><dir name="amreview"><file name="sidebar.phtml" hash="59fa56389faa85d68468caa7351f7cf8"/></dir></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Amasty_Base.xml" hash="651f99cee7568ab645fdef118f7933ca"/><file name="Amasty_Review.xml" hash="84f047ff01bce56c789217157cdcfd53"/></dir></target></contents>
16
  <compatible/>
17
  <dependencies/>
18
  </package>
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>Reviews_Sidebar</name>
4
+ <version>1.0.5</version>
5
  <stability>stable</stability>
6
  <license>AFL</license>
7
  <channel>community</channel>
10
  <description>Reviews sidebar block</description>
11
  <notes>None</notes>
12
  <authors><author><name>Amasty Team</name><user>auto-converted</user><email>amastysupport@gmail.com</email></author></authors>
13
+ <date>2011-03-05</date>
14
+ <time>15:31:41</time>
15
+ <contents><target name="mageskin"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="images"><dir name="ambase"><file name="bad.gif" hash="b8379f1ba7ab552ca46b9d5fd0452345"/><file name="ok.gif" hash="a38bc2ee6e116e39c6e2e3013ee50f5e"/><file name="update.gif" hash="8342e11f7739fcfa25134707f0536ed6"/></dir></dir></dir></dir></dir></target><target name="magelocal"><dir name="Amasty"><dir name="Base"><dir name="Block"><file name="Extensions.php" hash="e0f76a6c0e9d3db6f634562cbb0266bc"/></dir><dir name="etc"><file name="adminhtml.xml" hash="2134fcecc3d5cb639a2446dded0032d5"/><file name="config.xml" hash="d4da2c9935b894c6362576209905ff89"/><file name="system.xml" hash="d7e5cda7d0b09152931039fdf1d4b2bc"/></dir><dir name="Helper"><file name="Data.php" hash="dd3a5d1f14acb20f3a86c43d50fe0dd4"/></dir><dir name="Model"><file name="Feed.php" hash="eac82b4e6093caaeee75ed815974e95f"/><dir name="Source"><dir name="Updates"><file name="Type.php" hash="dbb958c4aa01c61578cfb22a1c88a482"/></dir></dir></dir><dir name="sql"><dir name="ambase_setup"><file name="mysql4-install-1.0.0.php" hash="ba30c778afd0f4a959ec9f86d439ea0a"/><file name="mysql4-upgrade-1.0.0-1.0.1.php" hash="f3190a47b20973b8526213c60c96b304"/></dir></dir></dir></dir></target><target name="magecommunity"><dir name="Amasty"><dir name="Review"><dir name="Block"><file name="Sidebar.php" hash="728917213d55a4e0878a1adf7560beda"/></dir><dir name="etc"><file name="adminhtml.xml" hash="95bdba467b5adbf7920b239fc0e1a003"/><file name="config.xml" hash="48b83a8848431c3f26edd01b4ab54f6b"/><file name="system.xml" hash="9416b00448bcd2e251196088b3175e4e"/></dir><dir name="Helper"><file name="Data.php" hash="e21dbd2eb8bbbb330f01d9f1c0c6785a"/></dir><dir name="Model"><dir name="Mysql4"><file name="Collection.php" hash="92d8ff7b807bf3fc9aa23be784dc7414"/></dir></dir></dir></dir></target><target name="magedesign"><dir name="frontend"><dir name="default"><dir name="default"><dir name="layout"><file name="amreview.xml" hash="bb51db7e5319681cbcdb30818cafb9d1"/></dir><dir name="template"><dir name="amreview"><file name="sidebar.phtml" hash="59fa56389faa85d68468caa7351f7cf8"/></dir></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Amasty_Base.xml" hash="651f99cee7568ab645fdef118f7933ca"/><file name="Amasty_Review.xml" hash="84f047ff01bce56c789217157cdcfd53"/></dir></target></contents>
16
  <compatible/>
17
  <dependencies/>
18
  </package>