From b69ca04f50ffd538239342f3bfd1e77ffc6156c0 Mon Sep 17 00:00:00 2001 From: xue <> Date: Sun, 3 Dec 2006 23:16:40 +0000 Subject: Merge from 3.0 branch till 1550. --- framework/I18N/core/MessageSource_XLIFF.php | 6 +++++- framework/Web/TUrlMapping.php | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) (limited to 'framework') 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/TUrlMapping.php b/framework/Web/TUrlMapping.php index 69af7f2f..33f01340 100644 --- a/framework/Web/TUrlMapping.php +++ b/framework/Web/TUrlMapping.php @@ -171,7 +171,7 @@ class TUrlMapping extends TUrlManager return $params; } } - return array(); + return parent::parseUrl(); } /** -- cgit v1.2.3