Skip to content

Commit

Permalink
Merge remote-tracking branch 'nickvergessen/ticket/12326' into develo…
Browse files Browse the repository at this point in the history
…p-ascraeus

* nickvergessen/ticket/12326:
  [ticket/12326] Correctly format update/index.php and remove php closing tag
  [ticket/12326] Do not add deleted files to the list of changed files
  • Loading branch information
imkingdavid committed Mar 30, 2014
2 parents 1a6dc6e + badb16e commit acb4d90
Showing 1 changed file with 11 additions and 17 deletions.
28 changes: 11 additions & 17 deletions build/package.php
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,12 @@
{
unset($file_contents['all'][$index]);
}

$source_filename = $package->locations['old_versions'] . $package->get('simple_name') . '/' . $file;
if (!file_exists($source_filename))
{
unset($file_contents['all'][$index]);
}
}

// First of all, fill the 'old' directory
Expand Down Expand Up @@ -200,12 +206,6 @@
{
$source_filename = $package->locations['old_versions'] . $package->get('simple_name') . '/' . $file;
$dest_filename = $dest_filename_dir . '/install/update/new/' . $file;

if (!file_exists($source_filename))
{
continue;
}

$filename = $file;

// Create Directories along the way?
Expand Down Expand Up @@ -276,29 +276,23 @@

if (sizeof($file_contents['all']))
{
$index_contents .= '\'files\' => array(\'' . implode("',\n\t'", $file_contents['all']) . '\'),
';
$index_contents .= "\t'files' => array(\n\t\t'" . implode("',\n\t\t'", $file_contents['all']) . "',\n\t),\n";
}
else
{
$index_contents .= '\'files\' => array(),
';
$index_contents .= "\t'files' => array(),\n";
}

if (sizeof($file_contents['binary']))
{
$index_contents .= '\'binary\' => array(\'' . implode("',\n\t'", $file_contents['binary']) . '\'),
';
$index_contents .= "\t'binary' => array(\n\t\t'" . implode("',\n\t\t'", $file_contents['binary']) . "',\n\t),\n";
}
else
{
$index_contents .= '\'binary\' => array(),
';
$index_contents .= "\t'binary' => array(),\n";
}

$index_contents .= ');
?' . '>';
$index_contents .= ");\n";

$fp = fopen($dest_filename_dir . '/install/update/index.php', 'wt');
fwrite($fp, $index_contents);
Expand Down

0 comments on commit acb4d90

Please sign in to comment.