From fab7a944a4c297f061d338a8626bff9a6e53a038 Mon Sep 17 00:00:00 2001 From: jim-p Date: Mon, 7 May 2012 11:55:22 -0400 Subject: Fix the name of this field/var to more accurately reflect what it does. --- config/systempatches/patches.inc | 4 ++-- config/systempatches/system_patches.php | 2 +- config/systempatches/system_patches_edit.php | 18 +++++++++--------- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/config/systempatches/patches.inc b/config/systempatches/patches.inc index 8dd78fd9..971b9da3 100644 --- a/config/systempatches/patches.inc +++ b/config/systempatches/patches.inc @@ -41,9 +41,9 @@ function patch_commit($patch, $action, $test=false) { $force = ($action == "revert") ? "-f" : "-t"; $direction = ($action == "revert") ? "--reverse" : "--forward"; $whitespace = $patch['ignorewhitespace'] ? "--ignore-whitespace" : ""; - $patchlevel = '-p' . $patch['patchlevel']; + $pathstrip = '-p' . $patch['pathstrip']; patch_write($patch); - $status = mwexec("{$patch_cmd} {$force} {$patchlevel} {$filename} {$check} {$direction} {$whitespace}", false); + $status = mwexec("{$patch_cmd} {$force} {$pathstrip} {$filename} {$check} {$direction} {$whitespace}", false); patch_erase($patch); if ($status == 0) return true; diff --git a/config/systempatches/system_patches.php b/config/systempatches/system_patches.php index 181db150..7086f0ca 100644 --- a/config/systempatches/system_patches.php +++ b/config/systempatches/system_patches.php @@ -259,7 +259,7 @@ foreach ($a_patches as $thispatch): - +

diff --git a/config/systempatches/system_patches_edit.php b/config/systempatches/system_patches_edit.php index 7983a081..dd9e1ce7 100644 --- a/config/systempatches/system_patches_edit.php +++ b/config/systempatches/system_patches_edit.php @@ -58,7 +58,7 @@ if (isset($id) && $a_patches[$id]) { $pconfig['descr'] = $a_patches[$id]['descr']; $pconfig['location'] = $a_patches[$id]['location']; $pconfig['patch'] = $a_patches[$id]['patch']; - $pconfig['patchlevel'] = $a_patches[$id]['patchlevel']; + $pconfig['pathstrip'] = $a_patches[$id]['pathstrip']; $pconfig['ignorewhitespace'] = isset($a_patches[$id]['ignorewhitespace']); $pconfig['autoapply'] = isset($a_patches[$id]['autoapply']); $pconfig['uniqid'] = $a_patches[$id]['uniqid']; @@ -86,8 +86,8 @@ if ($_POST) { if (!empty($_POST['location']) && !is_commit_id($_POST['location']) && !is_URL($_POST['location'])) { $input_errors[] = gettext("The supplied commit ID/URL appears to be invalid."); } - if (!is_numeric($_POST['patchlevel'])) { - $input_errors[] = gettext("Patch level must be numeric!"); + if (!is_numeric($_POST['pathstrip'])) { + $input_errors[] = gettext("Path Strip Count must be numeric!"); } if (!$input_errors) { @@ -98,10 +98,10 @@ if ($_POST) { if (!empty($_POST['patch'])) { $thispatch['patch'] = base64_encode($_POST['patch']); } - if (is_github_url($thispatch['location']) && ($_POST['patchlevel'] == 0)) - $thispatch['patchlevel'] = 1; + if (is_github_url($thispatch['location']) && ($_POST['pathstrip'] == 0)) + $thispatch['pathstrip'] = 1; else - $thispatch['patchlevel'] = $_POST['patchlevel']; + $thispatch['pathstrip'] = $_POST['pathstrip']; $thispatch['ignorewhitespace'] = isset($_POST['ignorewhitespace']); $thispatch['autoapply'] = isset($_POST['autoapply']); if (empty($_POST['uniqid'])) { @@ -163,11 +163,11 @@ include("fbegin.inc"); ?>
- + - - + -- cgit v1.2.3