aboutsummaryrefslogtreecommitdiffstats
path: root/config/systempatches
diff options
context:
space:
mode:
authorjim-p <jimp@pfsense.org>2012-05-07 11:55:22 -0400
committerjim-p <jimp@pfsense.org>2012-05-07 11:55:22 -0400
commitfab7a944a4c297f061d338a8626bff9a6e53a038 (patch)
tree0ed5a89860dc489ac71af16e3eca5819c02a439b /config/systempatches
parent86c4dc3d986c75c74df3d72fd081383589f480f8 (diff)
downloadpfsense-packages-fab7a944a4c297f061d338a8626bff9a6e53a038.tar.gz
pfsense-packages-fab7a944a4c297f061d338a8626bff9a6e53a038.tar.bz2
pfsense-packages-fab7a944a4c297f061d338a8626bff9a6e53a038.zip
Fix the name of this field/var to more accurately reflect what it does.
Diffstat (limited to 'config/systempatches')
-rw-r--r--config/systempatches/patches.inc4
-rw-r--r--config/systempatches/system_patches.php2
-rw-r--r--config/systempatches/system_patches_edit.php18
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):
</td>
</tr>
<tr><td></td><td colspan="6">
- <?php echo gettext("NOTE: Each patch is tested, and the appropriate action is shown. If neither 'Apply' or 'Revert' shows up, the patch cannot be used (check the patchlevel and whitespace options)."); ?>
+ <?php echo gettext("NOTE: Each patch is tested, and the appropriate action is shown. If neither 'Apply' or 'Revert' shows up, the patch cannot be used (check the pathstrip and whitespace options)."); ?>
<br/><br/>
<?php echo gettext("Use the 'Test' link to see if a patch can be applied or reverted. You can reorder patches so that higher patches apply later than lower patches."); ?>
</td><td></td></tr>
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"); ?>
<br> <span class="vexpl"><?=gettext("The contents of the patch. You can paste a patch here, or enter a URL/commit ID above, it can then be fetched into here automatically."); ?></span></td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncell"><?=gettext("Patch Level:"); ?></td>
+ <td width="22%" valign="top" class="vncell"><?=gettext("Path Strip Count:"); ?></td>
<td width="78%" class="vtable">
- <select name="patchlevel" class="formselect" id="patchlevel">
+ <select name="pathstrip" class="formselect" id="pathstrip">
<?php for ($i = 0; $i < 20; $i++): ?>
- <option value="<?=$i;?>" <?php if ($i == $pconfig['patchlevel']) echo "selected"; ?>><?=$i;?></option>
+ <option value="<?=$i;?>" <?php if ($i == $pconfig['pathstrip']) echo "selected"; ?>><?=$i;?></option>
<?php endfor; ?>
</select>
</td>