svn: /web/doc-editor/trunk/php/ RepositoryManager.php
[email protected] (Yannick Torres)
| Newsgroups | php.doc.web |
|---|---|
| Message-ID | <[email protected]> |
yannick Sun, 14 Mar 2010 09:04:05 +0000
Revision: http://svn.php.net/viewvc?view=revision&revision=296164
Log:
Fix bug in translation.xml parsing. Spotted by Pedram from persian language
Changed paths:
U web/doc-editor/trunk/php/RepositoryManager.php
Modified: web/doc-editor/trunk/php/RepositoryManager.php
===================================================================
--- web/doc-editor/trunk/php/RepositoryManager.php 2010-03-14 06:20:32 UTC (rev 296163)
+++ web/doc-editor/trunk/php/RepositoryManager.php 2010-03-14 09:04:05 UTC (rev 296164)
@@ -927,18 +927,19 @@
foreach ($ExistingLanguage as $lang) {
$lang = $lang["code"];
+ $txml = false;
// Path to find translation.xml file, set default values,
// in case we can't find the translation file
$translation_xml = new File($lang, '/', 'translation.xml');
- if (file_exists($translation_xml->full_path)) {
+ if ( file_exists($translation_xml->full_path) ) {
// Else go on, and load in the file, replacing all
// space type chars with one space
$txml = preg_replace('/\\s+/', ' ', $translation_xml->read(true));
}
- if (isset($txml)) {
+ if ( $txml ) {
// Find all persons matching the pattern
$matches = array();
if (preg_match_all('!<person (.+)/\\s?>!U', $txml, $matches)) {