summaryrefslogtreecommitdiff
path: root/framework/I18N/TGlobalization.php
diff options
context:
space:
mode:
authorctrlaltca <ctrlaltca@gmail.com>2016-06-15 21:32:16 +0200
committerGitHub <noreply@github.com>2016-06-15 21:32:16 +0200
commitf8799b189619993720c5e2689a83637e9eaa884f (patch)
tree9fc558eaa5a80bd7c45858d286ad48587e5e30a7 /framework/I18N/TGlobalization.php
parent2c49016d384559bdd304d37f85e7c696dd33fd9b (diff)
parent87cdee402bf6766a061fa926528c5bcc51957bbb (diff)
Merge pull request #599 from emkael/master
Allowing translation message cache to be initialized (and used)
Diffstat (limited to 'framework/I18N/TGlobalization.php')
-rw-r--r--framework/I18N/TGlobalization.php7
1 files changed, 5 insertions, 2 deletions
diff --git a/framework/I18N/TGlobalization.php b/framework/I18N/TGlobalization.php
index 41c89c19..2965ad1b 100644
--- a/framework/I18N/TGlobalization.php
+++ b/framework/I18N/TGlobalization.php
@@ -214,7 +214,7 @@ class TGlobalization extends TModule
throw new TConfigurationException("invalid source dir '{$config['source']}'");
}
}
- if($config['cache'])
+ if(isset($config['cache']) && TPropertyValue::ensureBoolean($config['cache']))
{
$config['cache'] = $this->getApplication()->getRunTimePath().'/i18n';
if(!is_dir($config['cache']))
@@ -225,6 +225,10 @@ class TGlobalization extends TModule
chmod($config['cache'], PRADO_CHMOD); //make it deletable
}
}
+ else
+ {
+ unset($config['cache']);
+ }
$this->_translation = $config;
}
@@ -294,4 +298,3 @@ class TGlobalization extends TModule
}
}
-