summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorwei <>2006-12-03 22:44:38 +0000
committerwei <>2006-12-03 22:44:38 +0000
commitfdba32fd47c5511a8593f517c86a8ec3492ab46a (patch)
treebf4cfda9c5fab81d1d39bd2fcc6daf60bc9db1a1
parentc6290af5ce4d4f841f487284fe6d9dc405bd0757 (diff)
Fix #476
-rw-r--r--framework/I18N/core/MessageSource_XLIFF.php6
-rw-r--r--framework/Web/TAssetManager.php2
2 files changed, 6 insertions, 2 deletions
diff --git a/framework/I18N/core/MessageSource_XLIFF.php b/framework/I18N/core/MessageSource_XLIFF.php
index 79d4f38c..1f537932 100644
--- a/framework/I18N/core/MessageSource_XLIFF.php
+++ b/framework/I18N/core/MessageSource_XLIFF.php
@@ -287,7 +287,11 @@ class MessageSource_XLIFF extends MessageSource
$xpath = new DomXPath($dom);
$body = $xpath->query('//body')->item(0);
- $count = $xpath->query('//trans-unit')->length;
+ $lastNodes = $xpath->query('//trans-unit[last()]');
+ if(($last=$lastNodes->item(0))!==null)
+ $count = intval($last->getAttribute('id'));
+ else
+ $count = 0;
//for each message add it to the XML file using DOM
foreach($messages as $message)
diff --git a/framework/Web/TAssetManager.php b/framework/Web/TAssetManager.php
index 190ee5ac..b1a2b7fc 100644
--- a/framework/Web/TAssetManager.php
+++ b/framework/Web/TAssetManager.php
@@ -251,7 +251,7 @@ class TAssetManager extends TModule
* @param string the destination directory
* @todo a generic solution to ignore certain directories and files
*/
- protected function copyDirectory($src,$dst)
+ public function copyDirectory($src,$dst)
{
if(!is_dir($dst))
{