mirror of
https://github.com/lucaspalomodevelop/core.git
synced 2026-03-16 01:24:38 +00:00
pkg: apply whitespace cleanups
This commit is contained in:
parent
c84c5817ff
commit
042cbf2c61
@ -77,17 +77,17 @@ $section = $pkg['menu'][0]['section'];
|
||||
$config_path = $pkg['configpath'];
|
||||
$title = $pkg['title'];
|
||||
|
||||
if($_REQUEST['startdisplayingat'])
|
||||
if($_REQUEST['startdisplayingat'])
|
||||
$startdisplayingat = $_REQUEST['startdisplayingat'];
|
||||
|
||||
if($_REQUEST['display_maximum_rows'])
|
||||
if($_REQUEST['display_maximum_rows'])
|
||||
if($_REQUEST['display_maximum_rows'])
|
||||
$display_maximum_rows = $_REQUEST['display_maximum_rows'];
|
||||
|
||||
$evaledvar = $config['installedpackages'][xml_safe_fieldname($pkg['name'])]['config'];
|
||||
|
||||
if ($_GET['act'] == "update") {
|
||||
|
||||
|
||||
if(is_array($config['installedpackages'][$pkg['name']]) && $pkg['name'] != "" && $_REQUEST['ids'] !=""){
|
||||
#get current values
|
||||
$current_values=$config['installedpackages'][$pkg['name']]['config'];
|
||||
@ -128,7 +128,7 @@ if ($_GET['act'] == "del") {
|
||||
if($pkg['custom_delete_php_command'] <> "") {
|
||||
if($pkg['custom_php_command_before_form'] <> "")
|
||||
eval($pkg['custom_php_command_before_form']);
|
||||
eval($pkg['custom_delete_php_command']);
|
||||
eval($pkg['custom_delete_php_command']);
|
||||
}
|
||||
header("Location: pkg.php?xml=" . $xml);
|
||||
exit;
|
||||
@ -173,11 +173,11 @@ include("head.inc");
|
||||
cursor: 'move',
|
||||
distance: 10,
|
||||
opacity: 0.8,
|
||||
helper: function(e,ui){
|
||||
ui.children().each(function(){
|
||||
jQuery(this).width(jQuery(this).width());
|
||||
helper: function(e,ui){
|
||||
ui.children().each(function(){
|
||||
jQuery(this).width(jQuery(this).width());
|
||||
});
|
||||
return ui;
|
||||
return ui;
|
||||
},
|
||||
});
|
||||
});
|
||||
@ -194,15 +194,15 @@ include("head.inc");
|
||||
jQuery('#savemsg').empty().html(strloading);
|
||||
},
|
||||
error: function(data){
|
||||
jQuery('#savemsg').empty().html('Error:' + data);
|
||||
},
|
||||
jQuery('#savemsg').empty().html('Error:' + data);
|
||||
},
|
||||
success: function(data){
|
||||
jQuery('#savemsg').empty().html(data);
|
||||
}
|
||||
jQuery('#savemsg').empty().html(data);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
<?php
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
//]]>
|
||||
@ -263,26 +263,26 @@ if ($pkg['tabs'] <> "") {
|
||||
<td class="tabcont">
|
||||
<table width="100%" border="0" cellpadding="6" cellspacing="0" summary="tabs">
|
||||
<?php
|
||||
/* Handle filtering bar A-Z */
|
||||
/* Handle filtering bar A-Z */
|
||||
$include_filtering_inputbox = false;
|
||||
$colspan = 0;
|
||||
if($pkg['adddeleteeditpagefields']['columnitem'] <> "")
|
||||
if($pkg['adddeleteeditpagefields']['columnitem'] <> "")
|
||||
foreach ($pkg['adddeleteeditpagefields']['columnitem'] as $column)
|
||||
$colspan++;
|
||||
if($pkg['fields']['field']) {
|
||||
// First find the sorting type field if it exists
|
||||
foreach($pkg['fields']['field'] as $field) {
|
||||
if($field['type'] == "sorting") {
|
||||
if(isset($field['include_filtering_inputbox']))
|
||||
if(isset($field['include_filtering_inputbox']))
|
||||
$include_filtering_inputbox = true;
|
||||
if($display_maximum_rows < 1)
|
||||
if($field['display_maximum_rows'])
|
||||
if($display_maximum_rows < 1)
|
||||
if($field['display_maximum_rows'])
|
||||
$display_maximum_rows = $field['display_maximum_rows'];
|
||||
echo "<tr><td class='listhdrr' colspan='$colspan' align='center'>";
|
||||
echo "Filter by: ";
|
||||
$isfirst = true;
|
||||
for($char = 65; $char < 91; $char++) {
|
||||
if(!$isfirst)
|
||||
if(!$isfirst)
|
||||
echo " | ";
|
||||
echo "<a href=\"#\" onclick=\"setFilter('" . chr($char) . "');\">" . chr($char) . "</a>";
|
||||
$isfirst = false;
|
||||
@ -292,15 +292,15 @@ if ($pkg['tabs'] <> "") {
|
||||
if($field['sortablefields']) {
|
||||
echo "Filter field: <select name='pkg_filter_type'>";
|
||||
foreach($field['sortablefields']['item'] as $si) {
|
||||
if($si['name'] == $_REQUEST['pkg_filter_type'])
|
||||
if($si['name'] == $_REQUEST['pkg_filter_type'])
|
||||
$SELECTED = "selected=\"selected\"";
|
||||
else
|
||||
else
|
||||
$SELECTED = "";
|
||||
echo "<option value='{$si['name']}' {$SELECTED}>{$si['name']}</option>";
|
||||
}
|
||||
echo "</select>";
|
||||
}
|
||||
if($include_filtering_inputbox)
|
||||
if($include_filtering_inputbox)
|
||||
echo " Filter text: <input id='pkg_filter' name='pkg_filter' value='" . $_REQUEST['pkg_filter'] . "' /> <input type='submit' value='Filter' />";
|
||||
echo "</td></tr><tr><td><font size='-3'> </font></td></tr>";
|
||||
}
|
||||
@ -321,7 +321,7 @@ if ($pkg['tabs'] <> "") {
|
||||
$tmpcount = 0;
|
||||
}
|
||||
if($tmppp == $startdisplayingat)
|
||||
break;
|
||||
break;
|
||||
$tmpcount++;
|
||||
$tmppp++;
|
||||
}
|
||||
@ -334,7 +334,7 @@ if ($pkg['tabs'] <> "") {
|
||||
for($x=0; $x<250; $x++) {
|
||||
if($x == $display_maximum_rows)
|
||||
$SELECTED = "selected=\"selected\"";
|
||||
else
|
||||
else
|
||||
$SELECTED = "";
|
||||
echo "<option value='$x' $SELECTED>$x</option>\n";
|
||||
$x=$x+4;
|
||||
@ -419,22 +419,22 @@ if ($pkg['tabs'] <> "") {
|
||||
#Check if columnitem has a type field declared
|
||||
if($column['type'] == "checkbox") {
|
||||
if($fieldname == "") {
|
||||
echo gettext("No");
|
||||
echo gettext("No");
|
||||
} else {
|
||||
echo gettext("Yes");
|
||||
echo gettext("Yes");
|
||||
}
|
||||
} else if ($column['type'] == "interface") {
|
||||
echo $column['prefix'] . $iflist[$fieldname] . $column['suffix'];
|
||||
} else {
|
||||
#Check if columnitem has an encoding field declared
|
||||
if ($column['encoding'] == "base64")
|
||||
#Check if columnitem has an encoding field declared
|
||||
if ($column['encoding'] == "base64")
|
||||
echo $column['prefix'] . base64_decode($fieldname) . $column['suffix'];
|
||||
#Check if there is a custom info to show when $fieldname is not empty
|
||||
else if($column['listmodeon'] && $fieldname != "")
|
||||
echo $column['prefix'] . gettext($column['listmodeon']). $column['suffix'];
|
||||
#Check if there is a custom info to show when $fieldname is empty
|
||||
else if($column['listmodeoff'] && $fieldname == "")
|
||||
echo $column['prefix'] .gettext($column['listmodeoff']). $column['suffix'];
|
||||
echo $column['prefix'] . gettext($column['listmodeon']). $column['suffix'];
|
||||
#Check if there is a custom info to show when $fieldname is empty
|
||||
else if($column['listmodeoff'] && $fieldname == "")
|
||||
echo $column['prefix'] .gettext($column['listmodeoff']). $column['suffix'];
|
||||
else
|
||||
echo $column['prefix'] . $fieldname ." ". $column['suffix'];
|
||||
}
|
||||
@ -461,7 +461,7 @@ if ($pkg['tabs'] <> "") {
|
||||
echo "</tr>\n";
|
||||
// Handle pagination and display_maximum_rows
|
||||
if($display_maximum_rows) {
|
||||
if($pagination_counter == ($display_maximum_rows-1) or
|
||||
if($pagination_counter == ($display_maximum_rows-1) or
|
||||
$i == (count($evaledvar)-1)) {
|
||||
$colcount = count($pkg['adddeleteeditpagefields']['columnitem']);
|
||||
$final_footer = "";
|
||||
@ -472,13 +472,13 @@ if ($pkg['tabs'] <> "") {
|
||||
if($startingat > -1) {
|
||||
$final_footer .= "<a href='pkg.php?xml=" . $_REQUEST['xml'] . "&startdisplayingat={$startingat}&display_maximum_rows={$display_maximum_rows}'>";
|
||||
} else {
|
||||
if($startingnat > 1)
|
||||
if($startingnat > 1)
|
||||
$final_footer .= "<a href='pkg.php?xml=" . $_REQUEST['xml'] . "&startdisplayingat=0&display_maximum_rows={$display_maximum_rows}'>";
|
||||
}
|
||||
$final_footer .= "<font size='2'><< Previous page</font></a>";
|
||||
if($tmppp + $display_maximum_rows > count($evaledvar))
|
||||
if($tmppp + $display_maximum_rows > count($evaledvar))
|
||||
$endingrecord = count($evaledvar);
|
||||
else
|
||||
else
|
||||
$endingrecord = $tmppp + $display_maximum_rows;
|
||||
$final_footer .= "</td><td align='center'>";
|
||||
$tmppp++;
|
||||
@ -486,7 +486,7 @@ if ($pkg['tabs'] <> "") {
|
||||
$final_footer .= "</font></td><td align='right'> ";
|
||||
if(($i+1) < count($evaledvar))
|
||||
$final_footer .= "<a href='pkg.php?xml=" . $_REQUEST['xml'] . "&startdisplayingat=" . ($startdisplayingat + $display_maximum_rows) . "&display_maximum_rows={$display_maximum_rows}'>";
|
||||
$final_footer .= "<font size='2'>Next page >></font></a>";
|
||||
$final_footer .= "<font size='2'>Next page >></font></a>";
|
||||
$final_footer .= "</td></tr></table></td></tr>";
|
||||
$i = count($evaledvar);
|
||||
break;
|
||||
|
||||
@ -113,7 +113,7 @@ if($config['installedpackages'] && !is_array($config['installedpackages'][xml_sa
|
||||
$config['installedpackages'][xml_safe_fieldname($pkg['name'])]['config'] = array();
|
||||
|
||||
// If the first entry in the array is an empty <config/> tag, kill it.
|
||||
if ($config['installedpackages'] && (count($config['installedpackages'][xml_safe_fieldname($pkg['name'])]['config']) > 0)
|
||||
if ($config['installedpackages'] && (count($config['installedpackages'][xml_safe_fieldname($pkg['name'])]['config']) > 0)
|
||||
&& ($config['installedpackages'][xml_safe_fieldname($pkg['name'])]['config'][0] == ""))
|
||||
array_shift($config['installedpackages'][xml_safe_fieldname($pkg['name'])]['config']);
|
||||
|
||||
@ -285,21 +285,21 @@ else
|
||||
//<![CDATA[
|
||||
//Everything inside it will load as soon as the DOM is loaded and before the page contents are loaded
|
||||
jQuery(document).ready(function() {
|
||||
|
||||
|
||||
//Sortable function
|
||||
jQuery('#mainarea table tbody').sortable({
|
||||
items: 'tr.sortable',
|
||||
cursor: 'move',
|
||||
distance: 10,
|
||||
opacity: 0.8,
|
||||
helper: function(e,ui){
|
||||
ui.children().each(function(){
|
||||
jQuery(this).width(jQuery(this).width());
|
||||
helper: function(e,ui){
|
||||
ui.children().each(function(){
|
||||
jQuery(this).width(jQuery(this).width());
|
||||
});
|
||||
return ui;
|
||||
return ui;
|
||||
},
|
||||
});
|
||||
|
||||
|
||||
//delete current line jQuery function
|
||||
jQuery('#maintable td .delete').live('click', function() {
|
||||
//do not remove first line
|
||||
@ -308,7 +308,7 @@ else
|
||||
return false;
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
//add new line jQuery function
|
||||
jQuery('#mainarea table .add').click(function() {
|
||||
//get table size and assign as new id
|
||||
@ -380,21 +380,21 @@ else
|
||||
<section class="page-content-main">
|
||||
|
||||
<div class="container-fluid">
|
||||
|
||||
<div class="row">
|
||||
|
||||
<div class="row">
|
||||
<?php if (!empty($input_errors)) print_input_errors($input_errors); ?>
|
||||
<?php if ($savemsg) print_info_box($savemsg); ?>
|
||||
|
||||
<section class="col-xs-12">
|
||||
|
||||
<div class="content-box">
|
||||
|
||||
<form name="iform" action="pkg_edit.php" method="post">
|
||||
<input type="hidden" name="xml" value="<?= htmlspecialchars($xml) ?>" />
|
||||
|
||||
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped table-sort">
|
||||
|
||||
<div class="content-box">
|
||||
|
||||
<form name="iform" action="pkg_edit.php" method="post">
|
||||
<input type="hidden" name="xml" value="<?= htmlspecialchars($xml) ?>" />
|
||||
|
||||
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped table-sort">
|
||||
<?php
|
||||
if ($pkg['tabs'] <> "") {
|
||||
$tab_array = array();
|
||||
@ -414,7 +414,7 @@ if ($pkg['tabs'] <> "") {
|
||||
if($tab['url'] <> "") $urltmp = $tab['url'];
|
||||
if($tab['xml'] <> "") $urltmp = "pkg_edit.php?xml=" . $tab['xml'];
|
||||
|
||||
$addresswithport = getenv("HTTP_HOST");
|
||||
$addresswithport = getenv("HTTP_HOST");
|
||||
$colonpos = strpos($addresswithport, ":");
|
||||
if ($colonpos !== False) {
|
||||
//my url is actually just the IP address of the pfsense box
|
||||
@ -430,7 +430,7 @@ if ($pkg['tabs'] <> "") {
|
||||
$active,
|
||||
$url
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
ksort($tab_array);
|
||||
foreach($tab_array as $tabid => $tab) {
|
||||
@ -443,12 +443,12 @@ echo '<tr><td>';
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
|
||||
<?php
|
||||
$cols = 0;
|
||||
$savevalue = gettext("Save");
|
||||
if($pkg['savetext'] <> "") $savevalue = $pkg['savetext'];
|
||||
/* If a package's XML has <advanced_options/> configured, then setup
|
||||
/* If a package's XML has <advanced_options/> configured, then setup
|
||||
* the table rows for the fields that have <advancedfield/> set.
|
||||
* These fields will be placed below other fields in a seprate area titled 'Advanced Features'.
|
||||
* These advanced fields are not normally configured and generally left to default to 'default settings'.
|
||||
@ -458,9 +458,9 @@ echo '<tr><td>';
|
||||
$adv_filed_count = 0;
|
||||
$advanced = "<td> </td>";
|
||||
$advanced .= "<tr><td colspan=\"2\" class=\"listtopic\">". gettext("Advanced features") . "<br /></td></tr>\n";
|
||||
}
|
||||
}
|
||||
foreach ($pkg['fields']['field'] as $pkga) {
|
||||
if ($pkga['type'] == "sorting")
|
||||
if ($pkga['type'] == "sorting")
|
||||
continue;
|
||||
|
||||
if ($pkga['type'] == "listtopic") {
|
||||
@ -480,7 +480,7 @@ echo '<tr><td>';
|
||||
if(isset($pkga['advancedfield']) && isset($adv_filed_count))
|
||||
$advanced .= $input;
|
||||
else
|
||||
echo $input;
|
||||
echo $input;
|
||||
}
|
||||
|
||||
$size = "";
|
||||
@ -510,7 +510,7 @@ echo '<tr><td>';
|
||||
$advanced .= $input;
|
||||
$adv_filed_count++;
|
||||
}
|
||||
else
|
||||
else
|
||||
echo $input;
|
||||
}
|
||||
if($pkga['combinefields']=="begin"){
|
||||
@ -518,7 +518,7 @@ echo '<tr><td>';
|
||||
if(isset($pkga['advancedfield']) && isset($adv_filed_count))
|
||||
$advanced .= $input;
|
||||
else
|
||||
echo $input;
|
||||
echo $input;
|
||||
}
|
||||
|
||||
$class=(isset($pkga['combinefields']) ? '' : 'class="vtable"');
|
||||
@ -688,7 +688,7 @@ echo '<tr><td>';
|
||||
$cols = " cols='{$pkga['cols']}' ";
|
||||
if (($pkga['encoding'] == 'base64') && !$get_from_post && !empty($value))
|
||||
$value = base64_decode($value);
|
||||
$wrap =($pkga['wrap'] == "off" ? 'wrap="off" style="white-space:nowrap;"' : '');
|
||||
$wrap =($pkga['wrap'] == "off" ? 'wrap="off" style="white-space:nowrap;"' : '');
|
||||
$input = "<textarea {$rows} {$cols} name='{$pkga['fieldname']}'{$wrap}>{$value}</textarea>\n";
|
||||
$input .= "<br />" . fixup_string($pkga['description']) . "\n";
|
||||
if(isset($pkga['advancedfield']) && isset($adv_filed_count)) {
|
||||
@ -873,7 +873,7 @@ echo '<tr><td>';
|
||||
$fieldname = $rowhelper['fieldname'];
|
||||
if($type == "option")
|
||||
$options = &$rowhelper['options']['option'];
|
||||
if($rowhelper['size'])
|
||||
if($rowhelper['size'])
|
||||
$size = $rowhelper['size'];
|
||||
else if ($pkga['size'])
|
||||
$size = $pkga['size'];
|
||||
@ -894,7 +894,7 @@ echo '<tr><td>';
|
||||
</tr>
|
||||
<tbody></tbody>
|
||||
</table>
|
||||
|
||||
|
||||
<!-- <br /><a onclick="javascript:addRowTo('maintable'); return false;" href="#"><img border="0" src="./themes/<?#= $g['theme']; ?>/images/icons/icon_plus.gif" alt="add" /></a>-->
|
||||
<br /><a class="add" href="#"><img border="0" src="./themes/<?= $g['theme']; ?>/images/icons/icon_plus.gif" alt="add" /></a>
|
||||
<br /><?php if($pkga['description'] != "") echo $pkga['description']; ?>
|
||||
@ -907,36 +907,36 @@ echo '<tr><td>';
|
||||
//typesel_change();
|
||||
//]]>
|
||||
</script>
|
||||
|
||||
|
||||
<?php
|
||||
break;
|
||||
}
|
||||
#check typehint value
|
||||
if($pkga['typehint'])
|
||||
echo " " . $pkga['typehint'];
|
||||
#check combinefields options
|
||||
if (isset($pkga['combinefields'])){
|
||||
$input="</td>";
|
||||
if($pkga['typehint'])
|
||||
echo " " . $pkga['typehint'];
|
||||
#check combinefields options
|
||||
if (isset($pkga['combinefields'])){
|
||||
$input="</td>";
|
||||
if ($pkga['combinefields']=="end")
|
||||
$input.="</table></td></tr>";
|
||||
}
|
||||
else{
|
||||
$input.="</table></td></tr>";
|
||||
}
|
||||
else{
|
||||
$input= "</td></tr>";
|
||||
if($pkga['usecolspan2'])
|
||||
$input.= "</tr><br />";
|
||||
}
|
||||
if(isset($pkga['advancedfield']) && isset($adv_filed_count))
|
||||
}
|
||||
if(isset($pkga['advancedfield']) && isset($adv_filed_count))
|
||||
$advanced .= "{$input}\n";
|
||||
else
|
||||
echo "{$input}\n";
|
||||
#increment counter
|
||||
$i++;
|
||||
}
|
||||
}
|
||||
|
||||
#print advanced settings if any after reading all fields
|
||||
#print advanced settings if any after reading all fields
|
||||
if (isset($advanced) && $adv_filed_count > 0)
|
||||
echo $advanced;
|
||||
|
||||
|
||||
?>
|
||||
<tr>
|
||||
<td> </td>
|
||||
@ -962,8 +962,8 @@ echo '<tr><td>';
|
||||
|
||||
</table>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</div>
|
||||
@ -1053,7 +1053,7 @@ function display_row($trc, $value, $fieldname, $type, $rowhelper, $size) {
|
||||
echo "<option value='{$source_value}'".($source_value == $value?" selected=\"selected\"":"").">{$source_name}</option>\n";
|
||||
}
|
||||
echo "</select>\n";
|
||||
break;
|
||||
break;
|
||||
}
|
||||
echo "</td>\n";
|
||||
}
|
||||
@ -1113,8 +1113,8 @@ function parse_package_templates() {
|
||||
ereg($rowhelperfield['fieldname'] . "_fieldvalue\[(.*)\]", $template_text, $sep);
|
||||
foreach ($sep as $se) $separator = $se;
|
||||
if($separator <> "") {
|
||||
$row_helper_data = ereg_replace(" ", $separator, $row_helper_data);
|
||||
$template_text = ereg_replace("\[{$separator}\]", "", $template_text);
|
||||
$row_helper_data = ereg_replace(" ", $separator, $row_helper_data);
|
||||
$template_text = ereg_replace("\[{$separator}\]", "", $template_text);
|
||||
}
|
||||
$template_text = str_replace($rowhelperfield['fieldname'] . "_fieldvalue", $row_helper_data, $template_text);
|
||||
}
|
||||
|
||||
@ -114,44 +114,44 @@ include("head.inc");
|
||||
?>
|
||||
|
||||
<section class="page-content-main">
|
||||
<div class="container-fluid">
|
||||
<div class="container-fluid">
|
||||
<div class="row">
|
||||
|
||||
|
||||
<?php
|
||||
/* Print package server mismatch warning. See https://redmine.pfsense.org/issues/484 */
|
||||
if (!verify_all_package_servers())
|
||||
print_info_box(package_server_mismatch_message());
|
||||
|
||||
|
||||
/* Print package server SSL warning. See https://redmine.pfsense.org/issues/484 */
|
||||
if (check_package_server_ssl() === false)
|
||||
print_info_box(package_server_ssl_failure_message());
|
||||
|
||||
|
||||
if ($savemsg)
|
||||
print_info_box($savemsg);
|
||||
?>
|
||||
|
||||
|
||||
<section class="col-xs-12">
|
||||
|
||||
|
||||
<?php
|
||||
|
||||
|
||||
<?php
|
||||
$version = rtrim(file_get_contents("/usr/local/etc/version"));
|
||||
|
||||
|
||||
$tab_array = array();
|
||||
$tab_array[] = array(gettext("Available Packages"), $requested_version <> "" ? false : true, "pkg_mgr.php");
|
||||
$tab_array[] = array(gettext("Installed Packages"), false, "pkg_mgr_installed.php");
|
||||
display_top_tabs($tab_array);
|
||||
?>
|
||||
|
||||
<div class="tab-content content-box col-xs-12">
|
||||
|
||||
<div class="container-fluid">
|
||||
|
||||
<?php
|
||||
|
||||
<div class="tab-content content-box col-xs-12">
|
||||
|
||||
<div class="container-fluid">
|
||||
|
||||
<?php
|
||||
$version = rtrim(file_get_contents("/usr/local/etc/version"));
|
||||
if($pkg_info) {
|
||||
$pkg_keys = array_keys($pkg_info);
|
||||
natcasesort($pkg_keys);
|
||||
|
||||
|
||||
//Check categories
|
||||
$categories=array();
|
||||
if(is_array($pkg_keys)) {
|
||||
@ -166,7 +166,7 @@ include("head.inc");
|
||||
$visible_categories=array();
|
||||
$categories_min_count=($g['pkg_categories_min_count'] ? $g['pkg_categories_min_count'] : 3);
|
||||
$categories_max_display=($g['pkg_categories_max_display'] ? $g['pkg_categories_max_display'] : 6);
|
||||
|
||||
|
||||
/* check selected category or define default category to show */
|
||||
if (isset($_REQUEST['category']))
|
||||
$menu_category = $_REQUEST['category'];
|
||||
@ -174,10 +174,10 @@ include("head.inc");
|
||||
$menu_category = $g['pkg_default_category'];
|
||||
else
|
||||
$menu_category = "All";
|
||||
|
||||
|
||||
$menu_category = (isset($_REQUEST['category']) ? $_REQUEST['category'] : "All");
|
||||
$show_category = ($menu_category == "Other" || $menu_category == "All");
|
||||
|
||||
|
||||
$tab_array[] = array(gettext("All"), $menu_category=="All" ? true : false, "pkg_mgr.php?category=All");
|
||||
foreach ($categories as $category => $c_count) {
|
||||
if ($c_count >= $categories_min_count && $cm_count <= $categories_max_display) {
|
||||
@ -187,26 +187,26 @@ include("head.inc");
|
||||
}
|
||||
}
|
||||
$tab_array[] = array(gettext("Other Categories"), $menu_category=="Other" ? true : false, "pkg_mgr.php?category=Other");
|
||||
|
||||
|
||||
}
|
||||
?>
|
||||
|
||||
<? if (count($categories) > 0): ?>
|
||||
<? if (count($categories) > 0): ?>
|
||||
<ul class="nav nav-pills" role="tablist"><? foreach ($tab_array as $tab): ?>
|
||||
<li role="presentation" <? if ($tab[1]):?>class="active"<? endif; ?>><a href="<?=$tab[2];?>"><?=$tab[0];?></a></li>
|
||||
<? endforeach; ?></ul><br />
|
||||
<? endif; ?>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped table-sort">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<thead>
|
||||
<tr>
|
||||
<th width="10%"><?=gettext("Name"); ?></th>
|
||||
<?php
|
||||
<th width="10%"><?=gettext("Name"); ?></th>
|
||||
<?php
|
||||
if ($show_category)
|
||||
print '<th width="18%">'.gettext("Category").'</th>'."\n";
|
||||
?>
|
||||
@ -215,8 +215,8 @@ include("head.inc");
|
||||
<th width="17"> </th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
|
||||
<tbody>
|
||||
|
||||
<?php
|
||||
if(!$pkg_info) {
|
||||
@ -227,10 +227,10 @@ include("head.inc");
|
||||
$index = &$pkg_info[$key];
|
||||
if(get_pkg_id($index['name']) >= 0 )
|
||||
continue;
|
||||
|
||||
|
||||
if (package_skip_tests($index,$requested_version))
|
||||
continue;
|
||||
|
||||
|
||||
/* get history/changelog git dir */
|
||||
$commit_dir=explode("/",$index['config_file']);
|
||||
$changeloglink = "https://github.com/pfsense/pfsense-packages/commits/master/config/";
|
||||
@ -238,7 +238,7 @@ include("head.inc");
|
||||
$changeloglink .= $commit_dir[(count($commit_dir)-1)];
|
||||
else
|
||||
$changeloglink .= $commit_dir[(count($commit_dir)-2)];
|
||||
|
||||
|
||||
/* Check package info link */
|
||||
if($index['pkginfolink']) {
|
||||
$pkginfolink = $index['pkginfolink'];
|
||||
@ -247,7 +247,7 @@ include("head.inc");
|
||||
$pkginfolink = "https://forum.pfsense.org/index.php/board,15.0.html";
|
||||
$pkginfo=gettext("No package info, check the forum");
|
||||
}
|
||||
|
||||
|
||||
if ($menu_category == "All" || $index['category'] == $menu_category || ($menu_category == "Other" && !in_array($index['category'],$visible_categories)) ):
|
||||
?>
|
||||
<tr valign="top" class="<?= $index['category'] ?>">
|
||||
@ -257,16 +257,16 @@ include("head.inc");
|
||||
<?php
|
||||
if ($show_category)
|
||||
print '<td class="listr">'.gettext($index['category']).'</td>'."\n";
|
||||
|
||||
|
||||
if ($g['disablepackagehistory']) {
|
||||
print '<td class="listr">'."\n";
|
||||
} else {
|
||||
print '<td class="listr" data-container="body" data-toggle="tooltip" data-placement="left" title="'.gettext("Click ").ucfirst($index['name']).gettext(" version to check its change log.").'" ';
|
||||
print ">\n";
|
||||
}
|
||||
|
||||
|
||||
print "{$index['status']} <br />\n";
|
||||
|
||||
|
||||
if ($g['disablepackagehistory'])
|
||||
echo"<a>{$index['version']}</a>";
|
||||
else
|
||||
|
||||
@ -4,7 +4,7 @@
|
||||
pkg_mgr_install.php
|
||||
part of pfSense (https://www.pfsense.org)
|
||||
Copyright (C) 2004-2010 Scott Ullrich <sullrich@gmail.com>
|
||||
Copyright (C) 2005 Colin Smith
|
||||
Copyright (C) 2005 Colin Smith
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
@ -91,21 +91,21 @@ if ($_POST) {
|
||||
<?php include("fbegin.inc"); ?>
|
||||
|
||||
<section class="page-content-main">
|
||||
<div class="container-fluid">
|
||||
<div class="container-fluid">
|
||||
<div class="row">
|
||||
|
||||
|
||||
<?php
|
||||
/* Print package server mismatch warning. See https://redmine.pfsense.org/issues/484 */
|
||||
if (!verify_all_package_servers())
|
||||
print_info_box(package_server_mismatch_message());
|
||||
|
||||
|
||||
/* Print package server SSL warning. See https://redmine.pfsense.org/issues/484 */
|
||||
if (check_package_server_ssl() === false)
|
||||
print_info_box(package_server_ssl_failure_message()); ?>
|
||||
|
||||
|
||||
<section class="col-xs-12">
|
||||
|
||||
|
||||
|
||||
|
||||
<?php
|
||||
$tab_array = array();
|
||||
$tab_array[] = array(gettext("Available packages"), false, "pkg_mgr.php");
|
||||
@ -113,15 +113,15 @@ if ($_POST) {
|
||||
$tab_array[] = array(gettext("Package Installer"), true, "");
|
||||
display_top_tabs($tab_array);
|
||||
?>
|
||||
|
||||
<div class="tab-content content-box col-xs-12">
|
||||
|
||||
<div class="container-fluid">
|
||||
<form action="pkg_mgr_install.php" method="post" name="iform">
|
||||
|
||||
<div class="tab-content content-box col-xs-12">
|
||||
|
||||
<div class="container-fluid">
|
||||
<form action="pkg_mgr_install.php" method="post" name="iform">
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped table-sort">
|
||||
|
||||
|
||||
|
||||
<?php if ((empty($_GET['mode']) && $_GET['id']) || (!empty($_GET['mode']) && (!empty($_GET['pkg']) || $_GET['mode'] == 'reinstallall') && ($_GET['mode'] != 'installedinfo' && $_GET['mode'] != 'showlog'))):
|
||||
if (empty($_GET['mode']) && $_GET['id']) {
|
||||
$pkgname = str_replace(array("<", ">", ";", "&", "'", '"', '.', '/'), "", htmlspecialchars_decode($_GET['id'], ENT_QUOTES | ENT_HTML401));
|
||||
@ -169,14 +169,14 @@ if ($_POST) {
|
||||
<?php endif; if (!empty($_POST['id']) || $_GET['mode'] == 'showlog' || ($_GET['mode'] == 'installedinfo' && !empty($_GET['pkg']))): ?>
|
||||
<tr>
|
||||
<td class="tabcont" align="center">
|
||||
|
||||
|
||||
<div class="progress">
|
||||
<div class="progress-bar" role="progressbar" aria-valuenow="60" aria-valuemin="0" aria-valuemax="100" style="width: 5%;">
|
||||
<span class="sr-only">5% Complete</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
<br />
|
||||
<!-- status box -->
|
||||
<textarea cols="80" rows="1" name="status" id="status" wrap="hard"><?=gettext("Beginning package installation.");?></textarea>
|
||||
@ -188,8 +188,8 @@ if ($_POST) {
|
||||
<?php endif; ?>
|
||||
</table>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
@ -289,7 +289,7 @@ if ($_GET) {
|
||||
$status_a = gettext(sprintf("Installation of %s completed.", $pkgid));
|
||||
update_status($status_a);
|
||||
$status = get_after_install_info($pkgid);
|
||||
if($status)
|
||||
if($status)
|
||||
$static_output .= "\n" . gettext("Installation completed.") . "\n{$pkgid} " . gettext("setup instructions") . ":\n{$status}";
|
||||
else
|
||||
$static_output .= "\n" . gettext("Installation completed. Please check to make sure that the package is configured from the respective menu then start the package.");
|
||||
@ -315,4 +315,4 @@ if ($_GET) {
|
||||
?>
|
||||
|
||||
|
||||
<?php include("foot.inc"); ?>
|
||||
<?php include("foot.inc"); ?>
|
||||
|
||||
@ -67,7 +67,7 @@ function domTT_title($title_msg, $return="echo"){
|
||||
if ($return =="echo")
|
||||
echo $title;
|
||||
else
|
||||
return $title;
|
||||
return $title;
|
||||
}
|
||||
}
|
||||
if(is_array($config['installedpackages']['package'])) {
|
||||
@ -90,25 +90,25 @@ include("head.inc");
|
||||
|
||||
<body>
|
||||
<?php include("fbegin.inc"); ?>
|
||||
|
||||
|
||||
|
||||
<section class="page-content-main">
|
||||
<div class="container-fluid">
|
||||
<div class="container-fluid">
|
||||
<div class="row">
|
||||
|
||||
|
||||
<?php
|
||||
/* Print package server mismatch warning. See https://redmine.pfsense.org/issues/484 */
|
||||
if (!verify_all_package_servers())
|
||||
print_info_box(package_server_mismatch_message());
|
||||
|
||||
|
||||
/* Print package server SSL warning. See https://redmine.pfsense.org/issues/484 */
|
||||
if (check_package_server_ssl() === false)
|
||||
print_info_box(package_server_ssl_failure_message()); ?>
|
||||
|
||||
|
||||
<section class="col-xs-12">
|
||||
|
||||
|
||||
<?php
|
||||
|
||||
|
||||
<?php
|
||||
$version = file_get_contents("/usr/local/etc/version");
|
||||
$tab_array = array();
|
||||
$tab_array[] = array(gettext("Available Packages"), false, "pkg_mgr.php");
|
||||
@ -118,9 +118,9 @@ include("head.inc");
|
||||
$tab_array[] = array(gettext("Installed Packages"), true, "pkg_mgr_installed.php");
|
||||
display_top_tabs($tab_array);
|
||||
?>
|
||||
|
||||
<div class="tab-content content-box col-xs-12">
|
||||
|
||||
|
||||
<div class="tab-content content-box col-xs-12">
|
||||
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped table-sort">
|
||||
<tr>
|
||||
@ -132,22 +132,22 @@ include("head.inc");
|
||||
</tr>
|
||||
<?php
|
||||
if(is_array($config['installedpackages']['package'])):
|
||||
|
||||
|
||||
$instpkgs = array();
|
||||
foreach($config['installedpackages']['package'] as $instpkg) {
|
||||
$instpkgs[] = $instpkg['name'];
|
||||
}
|
||||
natcasesort($instpkgs);
|
||||
|
||||
|
||||
foreach ($instpkgs as $index => $pkgname):
|
||||
|
||||
|
||||
$pkg = $config['installedpackages']['package'][$index];
|
||||
if(!$pkg['name'])
|
||||
continue;
|
||||
|
||||
|
||||
// get history/changelog git dir
|
||||
$commit_dir=explode("/",$pkg['config_file']);
|
||||
$changeloglink ="https://github.com/pfsense/pfsense-packages/commits/master/config/".$commit_dir[(count($commit_dir)-2)];
|
||||
$changeloglink ="https://github.com/pfsense/pfsense-packages/commits/master/config/".$commit_dir[(count($commit_dir)-2)];
|
||||
#check package version
|
||||
$latest_package = $currentvers[$pkg['name']]['version'];
|
||||
if ($latest_package) {
|
||||
@ -197,7 +197,7 @@ include("head.inc");
|
||||
$pkginfolink = "https://forum.pfsense.org/index.php/board,15.0.html";
|
||||
$pkginfo=gettext("No package info, check the forum");
|
||||
}
|
||||
|
||||
|
||||
?>
|
||||
<tr valign="top">
|
||||
<td class="listlr">
|
||||
@ -206,7 +206,7 @@ include("head.inc");
|
||||
<td class="listr">
|
||||
<?=$pkg['category'];?>
|
||||
</td>
|
||||
<?php
|
||||
<?php
|
||||
if (isset($g['disablepackagehistory']))
|
||||
echo "<td class='{$tdclass}'>{$pkgver}</td>";
|
||||
else
|
||||
@ -240,11 +240,11 @@ include("head.inc");
|
||||
<?php endif; ?>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<?php include("foot.inc"); ?>
|
||||
|
||||
<?php include("foot.inc"); ?>
|
||||
|
||||
@ -81,7 +81,7 @@ function enable_altpkgrepourl(enable_over) {
|
||||
|
||||
/* Print package server mismatch warning. See https://redmine.pfsense.org/issues/484 */
|
||||
if (!verify_all_package_servers())
|
||||
print_info_box(package_server_mismatch_message());
|
||||
print_info_box(package_server_mismatch_message());
|
||||
|
||||
/* Print package server SSL warning. See https://redmine.pfsense.org/issues/484 */
|
||||
if (check_package_server_ssl() === false)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user