Skip to content

Commit

Permalink
Update to 1.8.2
Browse files Browse the repository at this point in the history
  • Loading branch information
denysdesign committed Feb 12, 2018
1 parent 9491ce8 commit 8be6fe1
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 22 deletions.
36 changes: 16 additions & 20 deletions jumobile.php
Original file line number Diff line number Diff line change
Expand Up @@ -113,28 +113,25 @@ public function onAfterRender()
}
}

if($this->devMode == '1' ||
($lib_md && $this->isMobile) ||
((!$lib_md && $browser->isMobile()) || false !== stripos($agent, 'mobile'))
if(($this->devMode == '1' ||
($lib_md && $this->isMobile) ||
((!$lib_md && $browser->isMobile()) || false !== stripos($agent, 'mobile'))) && $this->params->get('allowcache') == 1 && $enabled
)
{
if($this->params->get('allowcache') == 1 && $enabled)
$app->allowCache(true);
if($this->params->get('pragma') == 1)
{
$app->allowCache(true);
if($this->params->get('pragma') == 1)
{
$app->setHeader('Pragma', 'public', true);
}
$app->setHeader('Pragma', 'public', true);
}

if($this->params->get('cachecontrol') == 1)
{
$app->setHeader('Cache-Control', 'public', true);
}
if($this->params->get('cachecontrol') == 1)
{
$app->setHeader('Cache-Control', 'public', true);
}

if($this->params->get('expires') == 1)
{
$app->setHeader('Expires', gmdate('D, d M Y H:i:s', time() + $this->params->get('expirestime')) . ' GMT', true);
}
if($this->params->get('expires') == 1)
{
$app->setHeader('Expires', gmdate('D, d M Y H:i:s', time() + $this->params->get('expirestime')) . ' GMT', true);
}
}

Expand Down Expand Up @@ -326,9 +323,8 @@ private function get_ip()
$ipaddress = 'UNKNOWN';
}

$ips = explode(",", $ipaddress);
$ip = trim($ips[0]);
$ips = explode(',', $ipaddress);

return $ip;
return trim($ips[0]);
}
}
4 changes: 2 additions & 2 deletions jumobile.xml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<extension version="2.5" type="plugin" group="system" method="upgrade">
<name>PLG_SYSTEM_JUMOBILE</name>
<creationDate>21.01.2018</creationDate>
<creationDate>12.02.2018</creationDate>
<author>Denys Nosov</author>
<authorEmail>[email protected]</authorEmail>
<authorUrl>https://joomla-ua.org</authorUrl>
<version>1.8.1</version>
<version>1.8.2</version>
<license>http://www.gnu.org/copyleft/gpl.html GNU/GPL</license>
<copyright>(C) 2016-2018 Joomla! Ukraine. All rights reserved.</copyright>
<description>PLG_SYSTEM_JUMOBILE_XML_DESCRIPTION</description>
Expand Down

0 comments on commit 8be6fe1

Please sign in to comment.