From b8cb407da9feb95533c8384db6e5ad768a67774a Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Sun, 30 Mar 2014 14:57:12 +0200 Subject: [PATCH 1/2] [ticket/12326] Do not add deleted files to the list of changed files PHPBB3-12326 --- build/package.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/build/package.php b/build/package.php index 89f9d9a1ee..00693fbe57 100755 --- a/build/package.php +++ b/build/package.php @@ -139,6 +139,12 @@ if (sizeof($package->old_packages)) { 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 @@ -200,12 +206,6 @@ if (sizeof($package->old_packages)) { $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? From badb16e68e201c42d30d35abba28b47e026d0a81 Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Sun, 30 Mar 2014 15:02:46 +0200 Subject: [PATCH 2/2] [ticket/12326] Correctly format update/index.php and remove php closing tag PHPBB3-12326 --- build/package.php | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/build/package.php b/build/package.php index 00693fbe57..00930abe65 100755 --- a/build/package.php +++ b/build/package.php @@ -276,29 +276,23 @@ $update_info = array( 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);