diff --git a/src/www/pkg.php b/src/www/pkg.php index f552f323f..4ccf28656 100755 --- a/src/www/pkg.php +++ b/src/www/pkg.php @@ -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); + } }); } } - //]]> @@ -263,26 +263,26 @@ if ($pkg['tabs'] <> "") { "") + 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 ""; } @@ -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 "\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 "\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 .= ""; } else { - if($startingnat > 1) + if($startingnat > 1) $final_footer .= ""; } $final_footer .= "<< Previous page"; - 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 .= "
"; echo "Filter by: "; $isfirst = true; for($char = 65; $char < 91; $char++) { - if(!$isfirst) + if(!$isfirst) echo " | "; echo "" . chr($char) . ""; $isfirst = false; @@ -292,15 +292,15 @@ if ($pkg['tabs'] <> "") { if($field['sortablefields']) { echo "Filter field: "; } - if($include_filtering_inputbox) + if($include_filtering_inputbox) echo "  Filter text: "; echo "
 
"; $tmppp++; @@ -486,7 +486,7 @@ if ($pkg['tabs'] <> "") { $final_footer .= " "; if(($i+1) < count($evaledvar)) $final_footer .= ""; - $final_footer .= "Next page >>"; + $final_footer .= "Next page >>"; $final_footer .= "
"; $i = count($evaledvar); break; diff --git a/src/www/pkg_edit.php b/src/www/pkg_edit.php index 52bae6d69..82bd35f43 100644 --- a/src/www/pkg_edit.php +++ b/src/www/pkg_edit.php @@ -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 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 //
- -
+ +
- -
- -
- - - -
- + +
+ + + + + +
+
"") { $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 '"; $advanced .= "\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 '
'; } ?> - + "") $savevalue = $pkg['savetext']; - /* If a package's XML has configured, then setup + /* If a package's XML has configured, then setup * the table rows for the fields that have 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 '
'; $adv_filed_count = 0; $advanced = " 
". gettext("Advanced features") . "
'; if(isset($pkga['advancedfield']) && isset($adv_filed_count)) $advanced .= $input; else - echo $input; + echo $input; } $size = ""; @@ -510,7 +510,7 @@ echo '
'; $advanced .= $input; $adv_filed_count++; } - else + else echo $input; } if($pkga['combinefields']=="begin"){ @@ -518,7 +518,7 @@ echo '
'; 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 '
'; $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 = "\n"; $input .= "
" . fixup_string($pkga['description']) . "\n"; if(isset($pkga['advancedfield']) && isset($adv_filed_count)) { @@ -873,7 +873,7 @@ echo '
'; $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 '
';
- +
add
@@ -907,36 +907,36 @@ echo ''; //typesel_change(); //]]> - + "; + if($pkga['typehint']) + echo " " . $pkga['typehint']; + #check combinefields options + if (isset($pkga['combinefields'])){ + $input=""; if ($pkga['combinefields']=="end") - $input.=""; - } - else{ + $input.=""; + } + else{ $input= ""; if($pkga['usecolspan2']) $input.= "
"; - } - 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; - + ?>   @@ -962,8 +962,8 @@ echo '';
-
-
+ +
@@ -1053,7 +1053,7 @@ function display_row($trc, $value, $fieldname, $type, $rowhelper, $size) { echo "\n"; } echo "\n"; - break; + break; } echo "\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); } diff --git a/src/www/pkg_mgr.php b/src/www/pkg_mgr.php index ad2c681b2..ed306c481 100644 --- a/src/www/pkg_mgr.php +++ b/src/www/pkg_mgr.php @@ -114,44 +114,44 @@ include("head.inc"); ?>
-
+
- + - +
- - - "" ? false : true, "pkg_mgr.php"); $tab_array[] = array(gettext("Installed Packages"), false, "pkg_mgr_installed.php"); display_top_tabs($tab_array); ?> - -
- -
- - + +
+ + $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"); - + } ?> - 0): ?> + 0): ?>
-
- +
+
- - - + + + - - + '.gettext("Category").''."\n"; ?> @@ -215,8 +215,8 @@ include("head.inc"); - - + + = 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)) ): ?> @@ -257,16 +257,16 @@ include("head.inc"); '.gettext($index['category']).''."\n"; - + if ($g['disablepackagehistory']) { print '
 
'."\n"; } else { print '\n"; } - + print "{$index['status']}
\n"; - + if ($g['disablepackagehistory']) echo"{$index['version']}"; else diff --git a/src/www/pkg_mgr_install.php b/src/www/pkg_mgr_install.php index 0adceeeb0..34fa181e8 100644 --- a/src/www/pkg_mgr_install.php +++ b/src/www/pkg_mgr_install.php @@ -4,7 +4,7 @@ pkg_mgr_install.php part of pfSense (https://www.pfsense.org) Copyright (C) 2004-2010 Scott Ullrich - 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) {
-
+
- + - +
- - + + - -
- -
-
+ +
+ +
+
- + ", ";", "&", "'", '"', '.', '/'), "", htmlspecialchars_decode($_GET['id'], ENT_QUOTES | ENT_HTML401)); @@ -169,14 +169,14 @@ if ($_POST) {
- +
5% Complete
- - + +
@@ -188,8 +188,8 @@ if ($_POST) {
- -
+ +
@@ -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) { ?> - \ No newline at end of file + diff --git a/src/www/pkg_mgr_installed.php b/src/www/pkg_mgr_installed.php index be9d83e4b..54d93a5d5 100644 --- a/src/www/pkg_mgr_installed.php +++ b/src/www/pkg_mgr_installed.php @@ -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"); - +
-
+
- + - +
- - - - -
- + +
+
@@ -132,22 +132,22 @@ include("head.inc"); $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"); } - + ?> - {$pkgver}"; else @@ -240,11 +240,11 @@ include("head.inc");
@@ -206,7 +206,7 @@ include("head.inc");
- +
- - + + diff --git a/src/www/pkg_mgr_settings.php b/src/www/pkg_mgr_settings.php index cc6b98164..3675b54a6 100644 --- a/src/www/pkg_mgr_settings.php +++ b/src/www/pkg_mgr_settings.php @@ -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)