summaryrefslogtreecommitdiff
path: root/framework/I18N/core
diff options
context:
space:
mode:
authorwei <>2006-08-05 01:05:07 +0000
committerwei <>2006-08-05 01:05:07 +0000
commit7d868c13a401d13f8777c0db5626832ac3f3a952 (patch)
treea538d61f69fb59b2d59df67b14065cd08864f488 /framework/I18N/core
parent93c4193f4a3c315c7785bf5f9f522c955ef6fce7 (diff)
Fixed #318 and add chmod for each mkdir
Diffstat (limited to 'framework/I18N/core')
-rw-r--r--framework/I18N/core/MessageSource_XLIFF.php6
-rw-r--r--framework/I18N/core/MessageSource_gettext.php6
2 files changed, 10 insertions, 2 deletions
diff --git a/framework/I18N/core/MessageSource_XLIFF.php b/framework/I18N/core/MessageSource_XLIFF.php
index 2194ca41..15af971a 100644
--- a/framework/I18N/core/MessageSource_XLIFF.php
+++ b/framework/I18N/core/MessageSource_XLIFF.php
@@ -473,7 +473,11 @@ class MessageSource_XLIFF extends MessageSource
$variant = array_shift($variants);
$file = $this->getSource($variant);
$dir = dirname($file);
- if(!is_dir($dir)) @mkdir($dir);
+ if(!is_dir($dir))
+ {
+ @mkdir($dir);
+ @chmod($dir,0777);
+ }
if(!is_dir($dir))
throw new TException("Unable to create directory $dir");
file_put_contents($file, $this->getTemplate($catalogue));
diff --git a/framework/I18N/core/MessageSource_gettext.php b/framework/I18N/core/MessageSource_gettext.php
index 78fa5259..c92577d4 100644
--- a/framework/I18N/core/MessageSource_gettext.php
+++ b/framework/I18N/core/MessageSource_gettext.php
@@ -431,7 +431,11 @@ class MessageSource_gettext extends MessageSource
$po_file = $this->getPOFile($mo_file);
$dir = dirname($mo_file);
- if(!is_dir($dir)) @mkdir($dir);
+ if(!is_dir($dir))
+ {
+ @mkdir($dir);
+ @chmod($dir,0777);
+ }
if(!is_dir($dir))
throw new TException("Unable to create directory $dir");