Skip to content

Commit

Permalink
[D] Fix generating xml files | Update dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
vampy committed Apr 16, 2019
1 parent a363381 commit 3b4009c
Show file tree
Hide file tree
Showing 3 changed files with 43 additions and 38 deletions.
1 change: 1 addition & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
"ext-gettext": "*",
"ext-mbstring": "*",
"ext-simplexml": "*",
"ext-json": "*",
"ext-xml": "*",
"myclabs/php-enum": "^1.5",
"webmozart/assert": "^1.2",
Expand Down
69 changes: 35 additions & 34 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 7 additions & 4 deletions include/xmlWrite.php
Original file line number Diff line number Diff line change
Expand Up @@ -486,28 +486,31 @@ function generateAssetXML($download_location)

function writeNewsXML()
{
$news_xml = generateNewsXML(OLD_ASSETS_XML_LOCATION, OLD_NEWS_XML_LOCATION);
// Base is old
$news_xml = generateNewsXML(OLD_ASSETS_XML_LOCATION, OLD_NEWS_XML_PATH);

// Write new xml file
// Write new xml file
FileSystem::filePutContents(
NEWS_XML_PATH,
str_replace(OLD_DOWNLOAD_LOCATION, DOWNLOAD_LOCATION, $news_xml)
);


// Write old
return FileSystem::filePutContents(OLD_NEWS_XML_PATH, $news_xml);
}

function writeAssetXML()
{
// Base is old
$asset_xml = generateAssetXML(OLD_DOWNLOAD_LOCATION);

// Write new xml file
// Write new xml file
FileSystem::filePutContents(
ASSETS_XML_PATH,
str_replace(OLD_DOWNLOAD_LOCATION, DOWNLOAD_LOCATION, $asset_xml)
);

// Write old
return FileSystem::filePutContents(OLD_ASSETS_XML_PATH, $asset_xml);
}

Expand Down

0 comments on commit 3b4009c

Please sign in to comment.