Skip to content

Commit

Permalink
Now CACHE Create Instance will make the cache directory if missing wh…
Browse files Browse the repository at this point in the history
…en language or mobile is set to be bypassed

Needed incase instance is not dependant on language or if device is mobile.
  • Loading branch information
eSilverStrike committed May 3, 2018
1 parent ce4de25 commit 5f17075
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions system/classes/template.class.php
Expand Up @@ -2198,10 +2198,10 @@ function CACHE_create_instance($iid, $data, $bypass_lang = false, $bypass_mobile

if ($TEMPLATE_OPTIONS['cache_by_language'] || $TEMPLATE_OPTIONS['cache_for_mobile']) {
$directory = '';
if ($TEMPLATE_OPTIONS['cache_by_language']) {
if (!$bypass_lang && $TEMPLATE_OPTIONS['cache_by_language']) {
$directory = $_CONF['language'] . '/';
}
if ($TEMPLATE_OPTIONS['cache_for_mobile'] && $_DEVICE->is_mobile()) {
if (!$bypass_mobile && $TEMPLATE_OPTIONS['cache_for_mobile'] && $_DEVICE->is_mobile()) {
$directory .= 'mobile/';
}
if (!is_dir($TEMPLATE_OPTIONS['path_cache'] . $directory)) {
Expand Down

0 comments on commit 5f17075

Please sign in to comment.