summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authoremkael <emkael@tlen.pl>2016-06-08 17:18:30 +0200
committeremkael <emkael@tlen.pl>2016-06-10 11:46:41 +0200
commit817d6fd42eb3ac0d1ee9a73fe5e5a4b1ec21da05 (patch)
treeedb25136792eb69669ac6d0c10ed7f03afb9b4b9 /lib
parent6ab01ff111f2aca0786f4fd45df25ea6ad9be1ca (diff)
* r87cdee4 from emkael/prado
Diffstat (limited to 'lib')
-rw-r--r--lib/prado/framework/I18N/TGlobalization.php7
-rw-r--r--lib/prado/framework/I18N/Translation.php2
-rw-r--r--lib/prado/framework/pradolite.php15
3 files changed, 19 insertions, 5 deletions
diff --git a/lib/prado/framework/I18N/TGlobalization.php b/lib/prado/framework/I18N/TGlobalization.php
index 41c89c1..2965ad1 100644
--- a/lib/prado/framework/I18N/TGlobalization.php
+++ b/lib/prado/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
}
}
-
diff --git a/lib/prado/framework/I18N/Translation.php b/lib/prado/framework/I18N/Translation.php
index 4e244a4..f22a68f 100644
--- a/lib/prado/framework/I18N/Translation.php
+++ b/lib/prado/framework/I18N/Translation.php
@@ -51,7 +51,7 @@ class Translation extends TComponent
$source->setCulture($app->getCulture());
- if(TPropertyValue::ensureBoolean($config['cache']))
+ if(isset($config['cache']))
$source->setCache(new MessageCache($config['cache']));
self::$formatters[$catalogue] = new MessageFormat($source, $app->getCharset());
diff --git a/lib/prado/framework/pradolite.php b/lib/prado/framework/pradolite.php
index 04ecec4..6b51484 100644
--- a/lib/prado/framework/pradolite.php
+++ b/lib/prado/framework/pradolite.php
@@ -1,7 +1,7 @@
<?php
/**
* File Name: pradolite.php
- * Last Update: 2016/05/08 19:49:20
+ * Last Update: 2016/06/08 16:06:00
* Generated By: buildscripts/phpbuilder/build.php
*
* This file is used in lieu of prado.php to boost PRADO application performance.
@@ -4518,6 +4518,13 @@ class TControl extends TApplicationComponent implements IRenderable, IBindable
else
return parent::__get($name);
}
+ public function __isset($name) {
+ if(isset($this->_rf[self::RF_NAMED_OBJECTS][$name])) {
+ return true;
+ } else {
+ return parent::__isset($name);
+ }
+ }
public function getHasAdapter()
{
return isset($this->_rf[self::RF_ADAPTER]);
@@ -10287,7 +10294,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']))
@@ -10297,6 +10304,10 @@ class TGlobalization extends TModule
$config['cache']);
chmod($config['cache'], PRADO_CHMOD); }
}
+ else
+ {
+ unset($config['cache']);
+ }
$this->_translation = $config;
}
public function getTranslationCatalogue()