summaryrefslogtreecommitdiff
path: root/framework/I18N/core
diff options
context:
space:
mode:
Diffstat (limited to 'framework/I18N/core')
-rw-r--r--framework/I18N/core/Gettext/MO.php1
-rw-r--r--framework/I18N/core/Gettext/PO.php1
-rw-r--r--framework/I18N/core/MessageSource_XLIFF.php7
-rw-r--r--framework/I18N/core/MessageSource_gettext.php6
4 files changed, 13 insertions, 2 deletions
diff --git a/framework/I18N/core/Gettext/MO.php b/framework/I18N/core/Gettext/MO.php
index 5ee0057f..9f2d5799 100644
--- a/framework/I18N/core/Gettext/MO.php
+++ b/framework/I18N/core/Gettext/MO.php
@@ -349,6 +349,7 @@ class TGettext_MO extends TGettext
// done
@flock($this->_handle, LOCK_UN);
@fclose($this->_handle);
+ chmod($file,0777);
return true;
}
}
diff --git a/framework/I18N/core/Gettext/PO.php b/framework/I18N/core/Gettext/PO.php
index 015747a0..3a5fda04 100644
--- a/framework/I18N/core/Gettext/PO.php
+++ b/framework/I18N/core/Gettext/PO.php
@@ -154,6 +154,7 @@ class TGettext_PO extends TGettext
//done
@flock($fh, LOCK_UN);
@fclose($fh);
+ chmod($file,0777);
return true;
}
}
diff --git a/framework/I18N/core/MessageSource_XLIFF.php b/framework/I18N/core/MessageSource_XLIFF.php
index 2194ca41..7f2f27c5 100644
--- a/framework/I18N/core/MessageSource_XLIFF.php
+++ b/framework/I18N/core/MessageSource_XLIFF.php
@@ -473,10 +473,15 @@ 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));
+ chmod($file, 0777);
return array($variant, $file);
}
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");