Skip to content

Commit

Permalink
File names are not to be included in xx-XX.xml. They are present in
Browse files Browse the repository at this point in the history
install.xml
  • Loading branch information
infograf768 committed Aug 21, 2014
1 parent 3dc3425 commit dc9cb7e
Showing 1 changed file with 1 addition and 27 deletions.
28 changes: 1 addition & 27 deletions component/admin/models/language.php
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,6 @@ public function save($data = array())
$text .= '<metafile version="3.1" client="' . htmlspecialchars($client, ENT_COMPAT, 'UTF-8') . '">' . "\n";
$text .= "\t" . '<tag>' . htmlspecialchars($tag, ENT_COMPAT, 'UTF-8') . '</tag>' . "\n";
$text .= "\t" . '<name>' . htmlspecialchars($data['name'], ENT_COMPAT, 'UTF-8') . '</name>' . "\n";
$text .= "\t" . '<description>' . htmlspecialchars($data['description'], ENT_COMPAT, 'UTF-8') . '</description>' . "\n";
$text .= "\t" . '<version>' . htmlspecialchars($data['version'], ENT_COMPAT, 'UTF-8') . '</version>' . "\n";
$text .= "\t" . '<creationDate>' . htmlspecialchars($data['creationDate'], ENT_COMPAT, 'UTF-8') . '</creationDate>' . "\n";
$text .= "\t" . '<author>' . htmlspecialchars($data['author'], ENT_COMPAT, 'UTF-8') . '</author>' . "\n";
Expand Down Expand Up @@ -315,32 +314,7 @@ public function save($data = array())
}

$text .= "\t" . '<license>' . htmlspecialchars($data['license'], ENT_COMPAT, 'UTF-8') . '</license>' . "\n";

if ($tag == 'en-GB')
{
$text .= "\t" . '<files>' . "\n";
$xml = simplexml_load_file($path);

foreach ($xml->files->children() as $file)
{
$text .= "\t\t" . '<filename>' . $file . '</filename>' . "\n";
}

$text .= "\t" . '</files>' . "\n";
}
else
{
$text .= "\t" . '<files>' . "\n";
$xml = simplexml_load_file(constant('LOCALISEPATH_' . strtoupper($client)) . "/language/en-GB/en-GB.xml");

foreach ($xml->files->children() as $file)
{
$text .= "\t\t" . '<filename>' . str_replace('en-GB', $tag, $file) . '</filename>' . "\n";
}

$text .= "\t" . '</files>' . "\n";
}

$text .= "\t" . '<description>' . htmlspecialchars($data['description'], ENT_COMPAT, 'UTF-8') . '</description>' . "\n";
$text .= "\t" . '<metadata>' . "\n";
$text .= "\t\t" . '<name>' . htmlspecialchars($data['name'], ENT_COMPAT, 'UTF-8') . '</name>' . "\n";
$text .= "\t\t" . '<tag>' . htmlspecialchars($data['tag'], ENT_COMPAT, 'UTF-8') . '</tag>' . "\n";
Expand Down

0 comments on commit dc9cb7e

Please sign in to comment.