Skip to content

Commit

Permalink
Fix for skipping preview.xml.* and data.xml.* files in export
Browse files Browse the repository at this point in the history
  • Loading branch information
torinfo committed Apr 13, 2015
1 parent bd3bb41 commit 8b3d432
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions website_code/php/scorm/scorm_library.php
Original file line number Diff line number Diff line change
Expand Up @@ -436,18 +436,11 @@ function xerte_zip_files($fullArchive = false, $dir_path) {

_debug("Zipping up: " . $fullArchive);
while ($file = array_pop($file_array)) {
if (strpos($file[0], "data.xwd") === false || strpos($file[0], "data.xml") === false || strpos($file[0], "preview.xml") === false) {
if (strpos($file[0], "data.xwd") === false && strpos($file[0], "data.xml") === false && strpos($file[0], "preview.xml") === false) {
/* Check if this is a media file */
if (!$fullArchive) {
$skipfile = false;
// Skip extra copies
for ($i=1; $i<=10; $i++) {
if (strpos($file[0], "." . $i) !== false)
{
$skipfile = true;
break;
}
}
if (!$skipfile && strpos($file[0], ".json") !== false)
{
$skipfile = true;
Expand Down

0 comments on commit 8b3d432

Please sign in to comment.