Skip to content

Commit

Permalink
Update to 3.0.2
Browse files Browse the repository at this point in the history
  • Loading branch information
denysdesign committed Feb 12, 2018
1 parent 1ec4c1a commit 8ec9b60
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 15 deletions.
1 change: 0 additions & 1 deletion controller.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ public function display($cachable = false, $urlparams = false)
$app = JFactory::getApplication();
$params = $app->getParams();

$cachable = false;
if($params->get('cache_home', '0') == 1)
{
$cachable = true;
Expand Down
4 changes: 2 additions & 2 deletions home.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
<extension type="component" version="2.5" method="upgrade">
<name>home</name>
<author>Denys Nosov</author>
<creationDate>03.01.2018</creationDate>
<creationDate>12.02.2018</creationDate>
<copyright>(C) 2011-2018 Joomla! Ukraine. All rights reserved.</copyright>
<license>GNU General Public License version 2 or later</license>
<authorEmail>[email protected]</authorEmail>
<authorUrl>https://joomla-ua.org</authorUrl>
<version>3.0.1</version>
<version>3.0.2</version>
<description>Home - component for display modules and create Home Page</description>
<files>
<filename>controller.php</filename>
Expand Down
9 changes: 5 additions & 4 deletions router.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,10 @@
* @copyright (C) 2011-2018 by Denys D. Nosov (https://joomla-ua.org)
* @license GNU General Public License version 2 or later
*
**/
* @param $query
*
* @return array
*/

function homeBuildRoute(&$query)
{
Expand All @@ -23,13 +26,11 @@ function homeBuildRoute(&$query)
}

/**
* @param $segments
*
* @return array
*
* @since 3.0
*/
function homeParseRoute($segments)
function homeParseRoute()
{
$vars = array();

Expand Down
2 changes: 1 addition & 1 deletion views/home/tmpl/default.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@
echo '<h1>' . $params->get('page_title') . '</h1>';
}

echo HomeViewHome::LoadPositionForHome($home->mod_name_pref, $style = ($home->style ? $home->style : 'raw'));
echo HomeViewHome::LoadPositionForHome($home->mod_name_pref, $style = ($home->style ? : 'raw'));
13 changes: 6 additions & 7 deletions views/home/view.html.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ class HomeViewHome extends JViewLegacy
*
*
* @since 3.0
* @return bool|string
*/
public function display($tpl = null)
{
Expand Down Expand Up @@ -77,21 +78,19 @@ public function display($tpl = null)
if($pos)
{
JFactory::getApplication()->input->post->get('tmpl', 'none');
$html = HomeViewHome::LoadPositionForHome($pos, $style = 'raw');
$html = self::LoadPositionForHome($pos, $style = 'raw');
}
else
{

if(file_exists($layoutpath))
{
require($layoutpath);
require $layoutpath;

return true;
}
else
{
$html = JText::_("<strong>Template <span style=\"color: green;\">$template</span> do is not found!</strong><br />Please, upload new template to <em>components/com_home/views/home/tmpl</em> folder or select other template from back-end!");
}

$html = JText::_("<strong>Template <span style=\"color: green;\">$template</span> do is not found!</strong><br />Please, upload new template to <em>components/com_home/views/home/tmpl</em> folder or select other template from back-end!");

}

Expand All @@ -106,7 +105,7 @@ public function display($tpl = null)
*
* @since 3.0
*/
function LoadPositionForHome($position, $style = -2)
public function LoadPositionForHome($position, $style = -2)
{
$document = JFactory::getDocument();
$renderer = $document->loadRenderer('module');
Expand Down

0 comments on commit 8ec9b60

Please sign in to comment.