Version Notes
Bug Fix:
Fixed compatibility issue with latest version Sitemap Plus extension.
Download this release
Release Info
Developer | Francesco Magazzu |
Extension | CueBlocks_XMLSitemap_Plus_Plugin_AwBlog |
Version | 1.0.3 |
Comparing to | |
See all releases |
Code changes from version 1.0.2 to 1.0.3
app/code/community/CueBlocks/SitemapPluginAwBlog/Model/Mysql4/Processor/Blog/Blog.php
CHANGED
@@ -18,6 +18,8 @@ class CueBlocks_SitemapPluginAwBlog_Model_Mysql4_Processor_Blog_Blog extends Mag
|
|
18 |
*/
|
19 |
protected $_select;
|
20 |
|
|
|
|
|
21 |
/**
|
22 |
* Init resource model (catalog/category)
|
23 |
*
|
@@ -27,17 +29,18 @@ class CueBlocks_SitemapPluginAwBlog_Model_Mysql4_Processor_Blog_Blog extends Mag
|
|
27 |
$this->_init('blog/blog', 'post_id');
|
28 |
}
|
29 |
|
30 |
-
|
31 |
-
* Retrieve cms page collection array
|
32 |
-
*
|
33 |
-
* @param unknown_type $storeId
|
34 |
-
* @return array
|
35 |
-
*/
|
36 |
-
public function getCollection($storeId)
|
37 |
{
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
38 |
$pages = array();
|
39 |
|
40 |
-
$
|
41 |
->from(array('main_table' => $this->getMainTable()), array($this->getIdFieldName(), 'identifier AS url', 'DATE(update_time) as updated_at'))
|
42 |
->join(
|
43 |
array('store_table' => $this->getTable('blog/store')),
|
@@ -46,11 +49,39 @@ class CueBlocks_SitemapPluginAwBlog_Model_Mysql4_Processor_Blog_Blog extends Mag
|
|
46 |
)
|
47 |
->where('main_table.status=?', AW_Blog_Model_Status::STATUS_ENABLED)
|
48 |
->where('store_table.store_id IN(?)', array(0, $storeId));
|
49 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
50 |
|
51 |
-
|
52 |
|
53 |
-
|
|
|
54 |
}
|
55 |
|
56 |
}
|
18 |
*/
|
19 |
protected $_select;
|
20 |
|
21 |
+
protected $_config = null;
|
22 |
+
|
23 |
/**
|
24 |
* Init resource model (catalog/category)
|
25 |
*
|
29 |
$this->_init('blog/blog', 'post_id');
|
30 |
}
|
31 |
|
32 |
+
public function init($config)
|
|
|
|
|
|
|
|
|
|
|
|
|
33 |
{
|
34 |
+
$this->_config = $config;
|
35 |
+
return $this;
|
36 |
+
}
|
37 |
+
|
38 |
+
protected function _setSql()
|
39 |
+
{
|
40 |
+
$storeId = $this->_config->getStoreId();
|
41 |
$pages = array();
|
42 |
|
43 |
+
$this->_select = $this->_getWriteAdapter()->select()
|
44 |
->from(array('main_table' => $this->getMainTable()), array($this->getIdFieldName(), 'identifier AS url', 'DATE(update_time) as updated_at'))
|
45 |
->join(
|
46 |
array('store_table' => $this->getTable('blog/store')),
|
49 |
)
|
50 |
->where('main_table.status=?', AW_Blog_Model_Status::STATUS_ENABLED)
|
51 |
->where('store_table.store_id IN(?)', array(0, $storeId));
|
52 |
+
}
|
53 |
+
|
54 |
+
/**
|
55 |
+
* Retrieve cms page collection array
|
56 |
+
*
|
57 |
+
* @param unknown_type $storeId
|
58 |
+
* @return array
|
59 |
+
*/
|
60 |
+
public function getCollection()
|
61 |
+
{
|
62 |
+
$this->_setSql(true);
|
63 |
+
return $this->_getWriteAdapter()->query($this->_select);
|
64 |
+
}
|
65 |
+
|
66 |
+
/**
|
67 |
+
* @return Count SQL for pagination
|
68 |
+
* @throws Zend_Db_Select_Exception
|
69 |
+
*/
|
70 |
+
public function getCount()
|
71 |
+
{
|
72 |
+
// populate select
|
73 |
+
$this->_setSql(true);
|
74 |
+
|
75 |
+
$countSelect = clone $this->_select;
|
76 |
+
$countSelect->reset(Zend_Db_Select::ORDER);
|
77 |
+
$countSelect->reset(Zend_Db_Select::LIMIT_COUNT);
|
78 |
+
$countSelect->reset(Zend_Db_Select::LIMIT_OFFSET);
|
79 |
+
$countSelect->reset(Zend_Db_Select::COLUMNS);
|
80 |
|
81 |
+
$countSelect->columns('COUNT(*)');
|
82 |
|
83 |
+
$count = $this->_getWriteAdapter()->fetchOne($countSelect);
|
84 |
+
return $count;
|
85 |
}
|
86 |
|
87 |
}
|
app/code/community/CueBlocks/SitemapPluginAwBlog/etc/config.xml
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
<config>
|
3 |
<modules>
|
4 |
<CueBlocks_SitemapPluginAwBlog>
|
5 |
-
<version>1.0.
|
6 |
</CueBlocks_SitemapPluginAwBlog>
|
7 |
</modules>
|
8 |
<global>
|
2 |
<config>
|
3 |
<modules>
|
4 |
<CueBlocks_SitemapPluginAwBlog>
|
5 |
+
<version>1.0.3</version>
|
6 |
</CueBlocks_SitemapPluginAwBlog>
|
7 |
</modules>
|
8 |
<global>
|
package.xml
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>CueBlocks_XMLSitemap_Plus_Plugin_AwBlog</name>
|
4 |
-
<version>1.0.
|
5 |
<stability>stable</stability>
|
6 |
<license uri="http://store.cueblocks.com/LICENSE_STORE.txt">EULA</license>
|
7 |
<channel>community</channel>
|
@@ -11,10 +11,10 @@
|
|
11 |
<notes>Bug Fix:
|
12 |

|
13 |
Fixed compatibility issue with latest version Sitemap Plus extension.</notes>
|
14 |
-
<authors><author><name>
|
15 |
-
<date>
|
16 |
-
<time>
|
17 |
-
<contents><target name="magecommunity"><dir name="CueBlocks"><dir name="SitemapPluginAwBlog"><dir name="Model"><dir name="Mysql4"><dir name="Processor"><dir name="Blog"><file name="Blog.php" hash="
|
18 |
<compatible/>
|
19 |
<dependencies><required><php><min>5.0.0</min><max>6.0.0</max></php></required></dependencies>
|
20 |
</package>
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>CueBlocks_XMLSitemap_Plus_Plugin_AwBlog</name>
|
4 |
+
<version>1.0.3</version>
|
5 |
<stability>stable</stability>
|
6 |
<license uri="http://store.cueblocks.com/LICENSE_STORE.txt">EULA</license>
|
7 |
<channel>community</channel>
|
11 |
<notes>Bug Fix:
|
12 |

|
13 |
Fixed compatibility issue with latest version Sitemap Plus extension.</notes>
|
14 |
+
<authors><author><name>CueBlocks</name><user>CueBlocks</user><email>magento@cueblocks.com</email></author></authors>
|
15 |
+
<date>2016-09-15</date>
|
16 |
+
<time>12:34:09</time>
|
17 |
+
<contents><target name="magecommunity"><dir name="CueBlocks"><dir name="SitemapPluginAwBlog"><dir name="Model"><dir name="Mysql4"><dir name="Processor"><dir name="Blog"><file name="Blog.php" hash="bfb0fd62916635b1df4fed773ab6c741"/></dir></dir></dir><file name="Observer.php" hash="ca385e1d13c4efc415efb233cb02b1b7"/><dir name="Processor"><dir name="Blog"><file name="Blog.php" hash="b4e5f712c117fafe2651b5a994989a55"/></dir></dir></dir><dir name="etc"><file name="config.xml" hash="5c63a07070347b8c50fe2d651e0f0e57"/><file name="system.xml" hash="677020f5fa44856ca404379134ee4fc8"/></dir></dir></dir></target><target name="mageetc"><dir><dir name="modules"><file name="CueBlocks_SitemapPluginAwBlog.xml" hash="034ba8ea5bb5a7a79c99389e250b33b5"/></dir></dir></target></contents>
|
18 |
<compatible/>
|
19 |
<dependencies><required><php><min>5.0.0</min><max>6.0.0</max></php></required></dependencies>
|
20 |
</package>
|