Skip to content

Commit fd5e5bc

Browse files
authored
Merge pull request #2 from landofcoder/upgrade-magento246
Upgrade magento246
2 parents 90a8df2 + 32761c6 commit fd5e5bc

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

87 files changed

+5493
-5386
lines changed

Block/Adminhtml/Post/Edit/Tab/Content.php

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -81,8 +81,6 @@ protected function _prepareForm()
8181
]
8282
);
8383

84-
85-
8684
$contentField = $fieldset->addField(
8785
'short_content',
8886
'editor',
@@ -101,10 +99,10 @@ protected function _prepareForm()
10199
);
102100

103101
$wysiwygConfig = $this->_wysiwygConfig->getConfig(['tab_id' => $this->getTabId().time()]);
104-
if (!$this->getData('is_valid') && !$this->getData('local_valid')) {
102+
/* if (!$this->getData('is_valid') && !$this->getData('local_valid')) {
105103
$wysiwygConfig['enabled'] = $wysiwygConfig['add_variables'] = $wysiwygConfig['add_widgets'] = $wysiwygConfig['add_images'] = 0;
106104
$wysiwygConfig['plugins'] = [];
107-
}
105+
} */
108106

109107
$contentField = $fieldset->addField(
110108
'content',

Block/Archive.php

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
11
<?php
22
/**
33
* Venustheme
4-
*
4+
*
55
* NOTICE OF LICENSE
6-
*
6+
*
77
* This source file is subject to the Venustheme.com license that is
88
* available through the world-wide-web at this URL:
99
* http://www.venustheme.com/license-agreement.html
10-
*
10+
*
1111
* DISCLAIMER
12-
*
12+
*
1313
* Do not edit or add to this file if you wish to upgrade this extension to newer
1414
* version in the future.
15-
*
15+
*
1616
* @category Venustheme
1717
* @package Ves_Blog
1818
* @copyright Copyright (c) 2016 Venustheme (http://www.venustheme.com/)
@@ -42,11 +42,11 @@ class Archive extends \Magento\Framework\View\Element\Template
4242
protected $_collection;
4343

4444
/**
45-
* @param \Magento\Framework\View\Element\Template\Context $context
46-
* @param \Magento\Framework\Registry $registry
47-
* @param \Ves\Blog\Model\Post $postFactory
48-
* @param \Ves\Blog\Helper\Data $blogHelper
49-
* @param array $data
45+
* @param \Magento\Framework\View\Element\Template\Context $context
46+
* @param \Magento\Framework\Registry $registry
47+
* @param \Ves\Blog\Model\Post $postFactory
48+
* @param \Ves\Blog\Helper\Data $blogHelper
49+
* @param array $data
5050
*/
5151
public function __construct(
5252
\Magento\Framework\View\Element\Template\Context $context,
@@ -55,7 +55,7 @@ public function __construct(
5555
\Ves\Blog\Helper\Data $blogHelper,
5656
\Magento\Framework\Url $url,
5757
array $data = []
58-
) {
58+
) {
5959
$this->_blogHelper = $blogHelper;
6060
$this->_coreRegistry = $registry;
6161
$this->_postFactory = $postFactory;
@@ -87,7 +87,7 @@ protected function _preparePostCollection()
8787
->addFieldToFilter('is_active',1)
8888
->addStoreFilter($store)
8989
->setCurPage(1);
90-
90+
9191
$this->_postCollection->getSelect()->group(
9292
'MONTH(main_table.creation_time)',
9393
'DESC'

Block/Archive/View.php

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
11
<?php
22
/**
33
* Venustheme
4-
*
4+
*
55
* NOTICE OF LICENSE
6-
*
6+
*
77
* This source file is subject to the Venustheme.com license that is
88
* available through the world-wide-web at this URL:
99
* http://www.venustheme.com/license-agreement.html
10-
*
10+
*
1111
* DISCLAIMER
12-
*
12+
*
1313
* Do not edit or add to this file if you wish to upgrade this extension to newer
1414
* version in the future.
15-
*
15+
*
1616
* @category Venustheme
1717
* @package Ves_Blog
1818
* @copyright Copyright (c) 2016 Venustheme (http://www.venustheme.com/)
@@ -43,19 +43,19 @@ class View extends \Magento\Framework\View\Element\Template
4343
protected $_collection;
4444

4545
/**
46-
* @param \Magento\Framework\View\Element\Template\Context $context
47-
* @param \Magento\Framework\Registry $registry
48-
* @param \Ves\Blog\Model\Post $postFactory
49-
* @param \Ves\Blog\Helper\Data $blogHelper
50-
* @param array $data
46+
* @param \Magento\Framework\View\Element\Template\Context $context
47+
* @param \Magento\Framework\Registry $registry
48+
* @param \Ves\Blog\Model\Post $postFactory
49+
* @param \Ves\Blog\Helper\Data $blogHelper
50+
* @param array $data
5151
*/
5252
public function __construct(
5353
\Magento\Framework\View\Element\Template\Context $context,
5454
\Magento\Framework\Registry $registry,
5555
\Ves\Blog\Model\Post $postFactory,
5656
\Ves\Blog\Helper\Data $blogHelper,
5757
array $data = []
58-
) {
58+
) {
5959
$this->_blogHelper = $blogHelper;
6060
$this->_coreRegistry = $registry;
6161
$this->_postFactory = $postFactory;
@@ -136,19 +136,19 @@ protected function _addBreadcrumbs()
136136
echo '<pre>';
137137
print_r($time);
138138
echo '</pre>';
139-
//die('test');
140-
139+
//die('test');
140+
141141
echo $this->formatDate($time[0] . '-' . $time[1] . '-01 00:00:00', \IntlDateFormatter::LONG) . '|999';
142142
143143
echo '<pre>';
144144
print_r(get_class_methods($this));
145145
echo '</pre>';
146-
die('test');
146+
die('test');
147147
*/
148148
if(isset($time[1]) && $time[1]) {
149-
$month = date("F", mktime(0, 0, 0, $time[1], 1, $time[0]));
149+
$month = date("F", mktime(0, 0, 0, $time[1], 1, $time[0]));
150150
}
151-
151+
152152

153153
$year = $time[0];
154154
$latest_page_title = $this->getConfig('blog_latest_page/page_title');
@@ -188,7 +188,7 @@ protected function _addBreadcrumbs()
188188
]
189189
);
190190
}
191-
191+
192192
}
193193
}
194194

@@ -214,7 +214,7 @@ public function getCollection(){
214214
* @return $this
215215
*/
216216
protected function _prepareLayout()
217-
{
217+
{
218218
$time = $this->getRequest()->getParam('date');
219219
$time = explode('-', $time);
220220
$month = "";
@@ -228,12 +228,12 @@ protected function _prepareLayout()
228228
} else {
229229
$page_title = __('Yearly Archives: %1', $year);
230230
}
231-
231+
232232
$this->_addBreadcrumbs();
233233
$this->pageConfig->addBodyClass('vesblog-page');
234234
$this->pageConfig->addBodyClass('ves-archiveblog');
235235
if($page_title){
236-
$this->pageConfig->getTitle()->set($page_title);
236+
$this->pageConfig->getTitle()->set($page_title);
237237
}
238238
return parent::_prepareLayout();
239239
}
@@ -254,12 +254,12 @@ public function getToolbarBlock()
254254
public function getPostsBlock()
255255
{
256256
$collection = $this->getCollection();
257-
$block = $this->_postsBlock;
257+
$block = $this->_postsBlock;
258258
$block->setData($this->getData())->setCollection($collection);
259259
$html = $block->toHtml();
260260
if ($html) {
261261
return $html;
262-
}
262+
}
263263
}
264264

265265
/**
@@ -303,7 +303,7 @@ protected function _beforeToHtml()
303303
if($month) {
304304
$postCollection->getSelect()->where('MONTH(creation_time) = ?', (int)$month);
305305
}
306-
306+
307307
$postCollection->getSelect()->order("post_id " . $orderby);
308308
$this->setCollection($postCollection);
309309
$toolbar = $this->getToolbarBlock();
@@ -315,4 +315,4 @@ protected function _beforeToHtml()
315315
}
316316
return parent::_beforeToHtml();
317317
}
318-
}
318+
}

Block/Author/View.php

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
11
<?php
22
/**
33
* Venustheme
4-
*
4+
*
55
* NOTICE OF LICENSE
6-
*
6+
*
77
* This source file is subject to the Venustheme.com license that is
88
* available through the world-wide-web at this URL:
99
* http://www.venustheme.com/license-agreement.html
10-
*
10+
*
1111
* DISCLAIMER
12-
*
12+
*
1313
* Do not edit or add to this file if you wish to upgrade this extension to newer
1414
* version in the future.
15-
*
15+
*
1616
* @category Venustheme
1717
* @package Ves_Blog
1818
* @copyright Copyright (c) 2016 Venustheme (http://www.venustheme.com/)
@@ -56,7 +56,7 @@ public function __construct(
5656
\Ves\Blog\Model\Post $postFactory,
5757
\Ves\Blog\Helper\Data $blogHelper,
5858
array $data = []
59-
) {
59+
) {
6060
$this->_blogHelper = $blogHelper;
6161
$this->_coreRegistry = $registry;
6262
$this->_postFactory = $postFactory;
@@ -159,7 +159,7 @@ protected function _addBreadcrumbs()
159159
* @return $this
160160
*/
161161
protected function _prepareLayout()
162-
{
162+
{
163163
$author = $this->getAuthor();
164164
$page_title = __('Author: ') . $author->getNickName();
165165
$this->_addBreadcrumbs();
@@ -171,13 +171,13 @@ protected function _prepareLayout()
171171

172172
$page_title = $author_page_title?$author_page_title:$page_title;
173173
if($page_title){
174-
$this->pageConfig->getTitle()->set($page_title);
174+
$this->pageConfig->getTitle()->set($page_title);
175175
}
176176
if($meta_keywords){
177-
$this->pageConfig->setKeywords($meta_keywords);
177+
$this->pageConfig->setKeywords($meta_keywords);
178178
}
179179
if($meta_description){
180-
$this->pageConfig->setDescription($meta_description);
180+
$this->pageConfig->setDescription($meta_description);
181181
}
182182
return parent::_prepareLayout();
183183
}
@@ -208,13 +208,13 @@ public function getToolbarBlock()
208208
public function getPostsBlock()
209209
{
210210
$collection = $this->getCollection();
211-
$block = $this->_postsBlock;
211+
$block = $this->_postsBlock;
212212

213213
$block->setData($this->getData())->setCollection($collection);
214214
$html = $block->toHtml();
215215
if ($html) {
216216
return $html;
217-
}
217+
}
218218
}
219219

220220
/**
@@ -230,7 +230,7 @@ protected function _beforeToHtml()
230230
$this->setData('show_toolbartop', $show_toolbartop);
231231
$this->setData('show_toolbarbottom', $show_toolbarbottom);
232232
$this->setData('layout_type', $layout_type);
233-
233+
234234
$postsStyles = $this->getConfig('blog_page/posts_styles');
235235
$postsStyles = $postsStyles?$postsStyles:'style1';
236236
$postsBlock = $this->getLayout()->getBlock('blog.posts.list');
@@ -263,4 +263,4 @@ protected function _beforeToHtml()
263263
}
264264
return parent::_beforeToHtml();
265265
}
266-
}
266+
}

Block/Authors/View.php

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
11
<?php
22
/**
33
* Venustheme
4-
*
4+
*
55
* NOTICE OF LICENSE
6-
*
6+
*
77
* This source file is subject to the Venustheme.com license that is
88
* available through the world-wide-web at this URL:
99
* http://www.venustheme.com/license-agreement.html
10-
*
10+
*
1111
* DISCLAIMER
12-
*
12+
*
1313
* Do not edit or add to this file if you wish to upgrade this extension to newer
1414
* version in the future.
15-
*
15+
*
1616
* @category Venustheme
1717
* @package Ves_Blog
1818
* @copyright Copyright (c) 2016 Venustheme (http://www.venustheme.com/)
@@ -55,7 +55,7 @@ public function __construct(
5555
\Ves\Blog\Model\Author $authorFactory,
5656
\Ves\Blog\Helper\Data $blogHelper,
5757
array $data = []
58-
) {
58+
) {
5959
$this->_blogHelper = $blogHelper;
6060
$this->_coreRegistry = $registry;
6161
$this->_authorFactory = $authorFactory;
@@ -138,7 +138,7 @@ protected function _addBreadcrumbs()
138138
* @return $this
139139
*/
140140
protected function _prepareLayout()
141-
{
141+
{
142142
$page_title = __('All Blog Authors');
143143
$this->_addBreadcrumbs();
144144
$this->pageConfig->addBodyClass('vesblog-page blogauthor-list');
@@ -147,13 +147,13 @@ protected function _prepareLayout()
147147
$meta_keywords = __("all blog authors");
148148

149149
if($page_title){
150-
$this->pageConfig->getTitle()->set($page_title);
150+
$this->pageConfig->getTitle()->set($page_title);
151151
}
152152
if($meta_keywords){
153-
$this->pageConfig->setKeywords($meta_keywords);
153+
$this->pageConfig->setKeywords($meta_keywords);
154154
}
155155
if($meta_description){
156-
$this->pageConfig->setDescription($meta_description);
156+
$this->pageConfig->setDescription($meta_description);
157157
}
158158
return parent::_prepareLayout();
159159
}
@@ -192,7 +192,7 @@ protected function _beforeToHtml()
192192
$show_toolbarbottom = $this->_blogHelper->getConfig("blog_page/show_toolbartop");
193193
$layout_type = $this->_blogHelper->getConfig("blog_page/layout_type");
194194
$show_posts_count = $this->_blogHelper->getConfig("other_settings/show_posts_count");
195-
195+
196196
$this->setData('show_toolbartop', $show_toolbartop);
197197
$this->setData('show_toolbarbottom', $show_toolbarbottom);
198198
$this->setData('layout_type', $layout_type);
@@ -224,4 +224,4 @@ protected function _beforeToHtml()
224224
}
225225
return parent::_beforeToHtml();
226226
}
227-
}
227+
}

0 commit comments

Comments
 (0)