diff options
Diffstat (limited to 'src/usr/local/www')
-rwxr-xr-x | src/usr/local/www/pkg.php | 8 | ||||
-rw-r--r-- | src/usr/local/www/pkg_edit.php | 95 | ||||
-rw-r--r-- | src/usr/local/www/pkg_mgr.php | 58 | ||||
-rw-r--r-- | src/usr/local/www/pkg_mgr_install.php | 52 | ||||
-rw-r--r-- | src/usr/local/www/pkg_mgr_installed.php | 14 |
5 files changed, 125 insertions, 102 deletions
diff --git a/src/usr/local/www/pkg.php b/src/usr/local/www/pkg.php index e318b52..96463ae 100755 --- a/src/usr/local/www/pkg.php +++ b/src/usr/local/www/pkg.php @@ -191,7 +191,7 @@ include("head.inc"); <script type="text/javascript"> //<![CDATA[ -events.push(function(){ +events.push(function() { function setFilter(filtertext) { jQuery('#pkg_filter').val(filtertext); document.pkgform.submit(); @@ -243,11 +243,13 @@ events.push(function(){ </script> <?php -if ($_GET['savemsg'] != "") +if ($_GET['savemsg'] != "") { $savemsg = htmlspecialchars($_GET['savemsg']); +} -if ($savemsg) +if ($savemsg) { print_info_box($savemsg, 'success'); +} ?> <form action="pkg.php" name="pkgform" method="get"> diff --git a/src/usr/local/www/pkg_edit.php b/src/usr/local/www/pkg_edit.php index 4333da9..c1ff4d4 100644 --- a/src/usr/local/www/pkg_edit.php +++ b/src/usr/local/www/pkg_edit.php @@ -129,8 +129,9 @@ if ($config['installedpackages'] && !is_array($config['installedpackages'][xml_s } // 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) - && ($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']); } @@ -293,7 +294,7 @@ function bootstrapTable($text) { $c = strpos($text, '>', $t); // And its closing bracket // Substitute everything inbetween with our new classes - if($t && $c && (($c - $t) < 200) ) { + if ($t && $c && (($c - $t) < 200)) { return(substr_replace($text, ' class="table table-striped table-hover table-condensed"', $t, ($c - $t))); } } @@ -381,7 +382,7 @@ function display_row($trc, $value, $fieldname, $type, $rowhelper, $description) foreach ($ifaces as $ifname => $iface) { $options[$ifname] = $iface; - if(in_array($ifname, $values)) { + if (in_array($ifname, $values)) { array_push($selected, $ifname); } } @@ -412,7 +413,7 @@ function display_row($trc, $value, $fieldname, $type, $rowhelper, $description) $source_value = ($rowhelper['source_value'] ? $opt[$rowhelper['source_value']] : $opt[$rowhelper['value']]); $options[$source_value] = $source_name; - if($source_value == $value) { + if ($source_value == $value) { array_push($selected, $value); } } @@ -517,7 +518,7 @@ function parse_package_templates() { //breadcrumb if ($pkg['title'] != "") { - if(!$only_edit) { + if (!$only_edit) { $pkg['title'] = $pkg['title'] . '/Edit'; } @@ -594,18 +595,20 @@ if ($pkg['custom_php_after_head_command']) { } else { include("head.inc"); } -if(isset($tab_array)) { +if (isset($tab_array)) { foreach ($tab_array as $tabid => $tab) { display_top_tabs($tab); //, $no_drop_down, $tabid); } } // Start of page display -if ($input_errors) +if ($input_errors) { print_input_errors($input_errors); +} -if ($savemsg) +if ($savemsg) { print_info_box($savemsg, 'success'); +} $cols = 0; $savevalue = gettext("Save"); @@ -658,8 +661,9 @@ foreach ($pkg['fields']['field'] as $pkga) { $advfield_count++; } else { - if(isset($section)) + if (isset($section)) { $form->add($section); + } $section = new Form_Section(strip_tags($pkga['name'])); } @@ -696,8 +700,9 @@ foreach ($pkg['fields']['field'] as $pkga) { // If we get here but have no $section, the package config file probably had no listtopic field // We can create a section with a generic name to fix that - if(!$section) + if (!$section) { $section = new Form_Section(gettext('General options')); + } switch ($pkga['type']) { // Create an input element. The format is slightly different depending on whether we are composing a group, @@ -770,10 +775,11 @@ foreach ($pkg['fields']['field'] as $pkga) { case "info": // If the info contains a table we should detect and Bootstrap it - if (strpos($pkga['description'], '<table') !== FALSE) + if (strpos($pkga['description'], '<table') !== FALSE) { $info = bootstrapTable($pkga['description']); - else + } else { $info = $pkga['description']; + } if (isset($pkga['advancedfield']) && isset($advfield_count)) { $advanced->addInput(new Form_StaticText( @@ -815,12 +821,13 @@ foreach ($pkg['fields']['field'] as $pkga) { } } - if (isset($pkga['advancedfield']) && isset($advfield_count)) + if (isset($pkga['advancedfield']) && isset($advfield_count)) { $function = $grouping ? $advanced->add:$advanced->addInput; - else + } else { $function = ($grouping) ? $section->add:$section->addInput; + } - if($grouping) { + if ($grouping) { $group->add(new Form_Select( $pkga['fieldname'], strip_tags($pkga['fielddescr']), @@ -878,11 +885,12 @@ foreach ($pkg['fields']['field'] as $pkga) { $source_value =($pkga['source_value'] ? $opt[$pkga['source_value']] : $opt[$pkga['value']]); $srcoptions[$source_value] = $source_name; - if(in_array($source_value, $items)) + if (in_array($source_value, $items)) { array_push($srcselected, $source_value); + } } - if($grouping) { + if ($grouping) { $group->add(new Form_Select( $pkga['fieldname'], strip_tags($pkga['fielddescr']), @@ -920,7 +928,7 @@ foreach ($pkg['fields']['field'] as $pkga) { } - if($grouping) { + if ($grouping) { $group->add(new Form_Select( $pkga['fieldname'], null, @@ -950,12 +958,13 @@ foreach ($pkg['fields']['field'] as $pkga) { // Create a checkbox element case "checkbox": $onchange = (isset($pkga['onchange']) ? "{$pkga['onchange']}" : ''); - if (isset($pkga['enablefields']) || isset($pkga['checkenablefields'])) + if (isset($pkga['enablefields']) || isset($pkga['checkenablefields'])) { $onclick = 'javascript:enablechange();'; - else + } else { $onclick = ''; + } - if($grouping) { + if ($grouping) { $group->add(new Form_Checkbox( $pkga['fieldname'], $pkga['fielddescr'], @@ -1061,7 +1070,7 @@ foreach ($pkg['fields']['field'] as $pkga) { } } - if(grouping) { + if (grouping) { $group->add(new Form_Input( $pkga['fieldname'], $pkga['fielddescr'], @@ -1178,7 +1187,7 @@ foreach ($pkg['fields']['field'] as $pkga) { $optionlist[$iface['ip']] = $iface['description']; } - if($grouping) { + if ($grouping) { $group->add(new Form_Select( $pkga['fieldname'], $pkga['fielddescr'], @@ -1210,7 +1219,7 @@ foreach ($pkg['fields']['field'] as $pkga) { // Create radio button case "radio": - if($grouping) { + if ($grouping) { $group->add(new Form_Checkbox( $pkga['fieldname'], $pkga['fielddescr'], @@ -1247,22 +1256,22 @@ foreach ($pkg['fields']['field'] as $pkga) { $pkga['fieldname'] ); - if(grouping) { + if (grouping) { $group->add(new Form_StaticText( null, $newbtn . '<br />' . '<div class="help-block">' . fixup_string($pkga['description']) . '</div>' )); } else { if (isset($pkga['advancedfield']) && isset($advfield_count)) { - $advanced->addInput(new Form_StaticText( - null, - $newbtn . '<br />' . '<div class="help-block">' . fixup_string($pkga['description']) . '</div>' - )); + $advanced->addInput(new Form_StaticText( + null, + $newbtn . '<br />' . '<div class="help-block">' . fixup_string($pkga['description']) . '</div>' + )); } else { - $section->addInput(new Form_StaticText( - null, - $newbtn . '<br />' . '<div class="help-block">' . fixup_string($pkga['description']) . '</div>' - )); + $section->addInput(new Form_StaticText( + null, + $newbtn . '<br />' . '<div class="help-block">' . fixup_string($pkga['description']) . '</div>' + )); } } @@ -1289,7 +1298,7 @@ foreach ($pkg['fields']['field'] as $pkga) { } } - if($grouping) { + if ($grouping) { $group->add(new Form_Select( $pkga['fieldname'], $pkga['fielddescr'], @@ -1350,7 +1359,7 @@ foreach ($pkg['fields']['field'] as $pkga) { } $type = $rowhelper['type']; - if ($type == "input" || $type == "password" || $type == "textarea" ) { + if ($type == "input" || $type == "password" || $type == "textarea") { if (($rowhelper['encoding'] == 'base64') && !$get_from_post && !empty($value)) { $value = base64_decode($value); } @@ -1397,10 +1406,11 @@ foreach ($pkg['fields']['field'] as $pkga) { null )); - if($advanced) + if ($advanced) { $advanced->add($group); - else + } else { $section->add($group); + } $grouping = false; } @@ -1419,7 +1429,7 @@ $form->addGlobal(new Form_Input( )); // If we created an advanced section, add it (and a button) to the form here -if(!empty($advanced)) { +if (!empty($advanced)) { $form->addGlobal(new Form_Button( 'showadv', 'Show advanced options' @@ -1441,7 +1451,7 @@ if ($pkg['custom_php_after_form_command']) { if ($pkg['fields']['field'] != "") { ?> <script type="text/javascript"> //<![CDATA[ - events.push(function(){ + events.push(function() { // Hide the advanced section var advanced_visible = false; @@ -1458,11 +1468,10 @@ if ($pkg['fields']['field'] != "") { ?> $("#showadv").click(function() { advanced_visible = !advanced_visible; - if(advanced_visible) { + if (advanced_visible) { $('.advancedoptions').show(); $("#showadv").prop('value', 'Hide advanced Options'); - } - else { + } else { $('.advancedoptions').hide(); $("#showadv").prop('value', 'Show advanced Options'); } diff --git a/src/usr/local/www/pkg_mgr.php b/src/usr/local/www/pkg_mgr.php index 7c94212..0e008e6 100644 --- a/src/usr/local/www/pkg_mgr.php +++ b/src/usr/local/www/pkg_mgr.php @@ -72,8 +72,8 @@ require_once("guiconfig.inc"); require_once("pkg-utils.inc"); /* if upgrade in progress, alert user */ -if(is_subsystem_dirty('packagelock')) { - $pgtitle = array(gettext("System"),gettext("Package Manager")); +if (is_subsystem_dirty('packagelock')) { + $pgtitle = array(gettext("System"), gettext("Package Manager")); include("head.inc"); print_info_box_np("Please wait while packages are reinstalled in the background."); include("foot.inc"); @@ -82,7 +82,7 @@ if(is_subsystem_dirty('packagelock')) { $pkg_info = get_pkg_info(); -$pgtitle = array(gettext("System"),gettext("Package Manager"),gettext("Available Packages")); +$pgtitle = array(gettext("System"), gettext("Package Manager"), gettext("Available Packages")); include("head.inc"); @@ -91,7 +91,7 @@ $tab_array[] = array(gettext("Available Packages"), true, "pkg_mgr.php"); $tab_array[] = array(gettext("Installed Packages"), false, "pkg_mgr_installed.php"); display_top_tabs($tab_array); -if($pkg_info) { +if ($pkg_info) { //Check categories $categories=array(); foreach ($pkg_info as $pkg_data) { @@ -108,32 +108,34 @@ if($pkg_info) { $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'])) + if (isset($_REQUEST['category'])) { $menu_category = $_REQUEST['category']; - else if (isset($g['pkg_default_category'])) + } else if (isset($g['pkg_default_category'])) { $menu_category = $g['pkg_default_category']; - else + } 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"); + $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) { - $tab_array[] = array(gettext($category) , $menu_category==$category ? true : false, "pkg_mgr.php?category={$category}"); + $tab_array[] = array(gettext($category) , $menu_category == $category ? true : false, "pkg_mgr.php?category={$category}"); $visible_categories[]=$category; $cm_count++; } } - $tab_array[] = array(gettext("Other Categories"), $menu_category=="Other" ? true : false, "pkg_mgr.php?category=Other"); + $tab_array[] = array(gettext("Other Categories"), $menu_category == "Other" ? true : false, "pkg_mgr.php?category=Other"); // if (count($categories) > 1) // display_top_tabs($tab_array); } -if(!$pkg_info || !is_array($pkg_info)):?> +if (!$pkg_info || !is_array($pkg_info)): +?> <div class="alert alert-warning"> <?=gettext("There are currently no packages available for installation.")?> </div> @@ -189,7 +191,7 @@ if(!$pkg_info || !is_array($pkg_info)):?> <tbody> <?php - foreach($pkg_info as $index): + foreach ($pkg_info as $index): if (isset($index['installed'])) { continue; } @@ -209,26 +211,32 @@ if(!$pkg_info || !is_array($pkg_info)):?> </td> <?php - if (!$g['disablepackagehistory']):?> + if (!$g['disablepackagehistory']): +?> <td> <?=htmlspecialchars($index['version'])?> </td> <?php -endif; + endif; ?> <td> <?=$index['desc']?> </td> <td> <a title="<?=gettext("Click to install")?>" href="pkg_mgr_install.php?id=<?=$index['name']?>" class="btn btn-success btn-sm">install</a> -<?php if(!$g['disablepackageinfo'] && $index['pkginfolink'] && $index['pkginfolink'] != $index['www']):?> +<?php + if (!$g['disablepackageinfo'] && $index['pkginfolink'] && $index['pkginfolink'] != $index['www']): +?> <a target="_blank" title="<?=gettext("View more information")?>" href="<?=htmlspecialchars($index['pkginfolink'])?>" class="btn btn-default btn-sm">info</a> -<?php endif;?> +<?php + endif; +?> </td> </tr> <?php endforeach; -endif;?> +endif; +?> </tbody> </table> </div> @@ -236,25 +244,25 @@ endif;?> <script type="text/javascript"> //<![CDATA[ -events.push(function(){ +events.push(function() { // Initial state & toggle icons of collapsed panel - $('.panel-heading a[data-toggle="collapse"]').each(function (idx, el){ + $('.panel-heading a[data-toggle="collapse"]').each(function (idx, el) { var body = $(el).parents('.panel').children('.panel-body') var isOpen = body.hasClass('in'); $(el).children('i').toggleClass('fa-plus-circle', !isOpen); $(el).children('i').toggleClass('fa-minus-circle', isOpen); - body.on('shown.bs.collapse', function(){ + body.on('shown.bs.collapse', function() { $(el).children('i').toggleClass('fa-minus-circle', true); $(el).children('i').toggleClass('fa-plus-circle', false); }); }); // Make these controls plain buttons - $("#btnsearch").prop('type' ,'button'); - $("#btnclear").prop('type' ,'button'); + $("#btnsearch").prop('type', 'button'); + $("#btnclear").prop('type', 'button'); // Search for a term in the package name and/or description $("#btnsearch").click(function() { @@ -268,8 +276,8 @@ events.push(function(){ descr = $tds.eq(2).text().trim().toLowerCase(); regexp = new RegExp(searchstr); - if(searchstr.length > 0) { - if( !(regexp.test(shortname) && (where != 1)) && !(regexp.test(descr) && (where != 0))) { + if (searchstr.length > 0) { + if (!(regexp.test(shortname) && (where != 1)) && !(regexp.test(descr) && (where != 0))) { $(this).hide(); } else { $(this).show(); @@ -293,7 +301,7 @@ events.push(function(){ // Hitting the enter key will do the same as clicking the search button $("#searchstr").on("keyup", function (event) { - if (event.keyCode==13) { + if (event.keyCode == 13) { $("#btnsearch").get(0).click(); } }); diff --git a/src/usr/local/www/pkg_mgr_install.php b/src/usr/local/www/pkg_mgr_install.php index 4ba5eda..daba104 100644 --- a/src/usr/local/www/pkg_mgr_install.php +++ b/src/usr/local/www/pkg_mgr_install.php @@ -228,7 +228,7 @@ if ($_POST) { case 'reinstallall': $headline = gettext("Reinstall all packages"); case 'reinstallpkg': - if($_GET['from'] && $_GET['from']) { + if ($_GET['from'] && $_GET['from']) { $headline = gettext("Upgrade package"); } else { $headline = gettext("Reinstall package"); @@ -244,7 +244,7 @@ if ($_POST) { } } -if($_GET && $_GET['id'] == "firmware") { +if ($_GET && $_GET['id'] == "firmware") { $firmwareupdate = true; $firmwareversion = get_system_pkg_version(); $headline = gettext("System update") ; @@ -252,12 +252,12 @@ if($_GET && $_GET['id'] == "firmware") { $tab_array = array(); -if($firmwareupdate) { - $pgtitle = array(gettext("System"),gettext("Update"), $headline); +if ($firmwareupdate) { + $pgtitle = array(gettext("System"), gettext("Update"), $headline); $tab_array[] = array(gettext("System Update"), true, ""); $tab_array[] = array(gettext("Update Settings"), false, "system_update_settings.php"); } else { - $pgtitle = array(gettext("System"),gettext("Package Manager"), $headline); + $pgtitle = array(gettext("System"), gettext("Package Manager"), $headline); $tab_array[] = array(gettext("Available Packages"), false, "pkg_mgr.php"); $tab_array[] = array(gettext("Installed Packages"), false, "pkg_mgr_installed.php"); $tab_array[] = array(gettext("Package Installer"), true, ""); @@ -266,8 +266,9 @@ if($firmwareupdate) { include("head.inc"); display_top_tabs($tab_array); -if ($input_errors) +if ($input_errors) { print_input_errors($input_errors); +} ?> <form action="pkg_mgr_install.php" method="post" class="form-horizontal"> @@ -342,7 +343,7 @@ if ($input_errors) </div> </div> <?php - if ($firmwareversion['version'] != $firmwareversion['installed_version'] ) { + if ($firmwareversion['version'] != $firmwareversion['installed_version']) { ?> <div class="form-group"> <label class="col-sm-2 control-label"> @@ -376,7 +377,7 @@ if ($input_errors) </div> <?php endif; -if($firmwareupdate && !$firmwareversion) { +if ($firmwareupdate && !$firmwareversion) { print_info_box(gettext("Unable to retrieve system versions"), danger); } @@ -408,7 +409,7 @@ if (!empty($_POST['id']) || $_POST['mode'] == "reinstallall"): <br /> <div class="panel panel-default"> <div class="panel-heading"> -<?php if($firmwareupdate) { +<?php if ($firmwareupdate) { ?> <h2 class="panel-title" id="status"><?=gettext("Updating system")?></h2> <?php } else { @@ -435,7 +436,7 @@ if ($_POST) { $pkgid = str_replace(array("<", ">", ";", "&", "'", '"', '.', '/'), "", htmlspecialchars_decode($_POST['id'], ENT_QUOTES | ENT_HTML401)); } -if ($_POST && ($_POST['completed'] != "true") ) { +if ($_POST && ($_POST['completed'] != "true")) { /* Write out configuration to create a backup prior to pkg install. */ write_config(gettext("Creating restore point before package installation.")); @@ -476,11 +477,11 @@ if ($_POST && ($_POST['completed'] != "true") ) { // $_POST['completed'] just means that we are refreshing the page to update any new menu items // that were installed if ($_POST && $_POST['completed'] == "true"): - if($pkgid == 'firmware'): + if ($pkgid == 'firmware'): ?> <script> //<![CDATA[ -events.push(function(){ +events.push(function() { time = "<?=$guitimeout?>"; startCountdown(); }); @@ -508,14 +509,15 @@ function setProgress(barName, percent, transition) { // Display a success banner function show_success() { $('#final').removeClass("alert-info").addClass("alert-success"); - if("<?=$_POST['mode']?>" != "reinstallall") { - if("<?=$pkgid?>" == "firmware") { + if ("<?=$_POST['mode']?>" != "reinstallall") { + if ("<?=$pkgid?>" == "firmware") { $('#final').html("<b>" + "System update" + " " + "<?=gettext(' successfully completed')?>"); } else { $('#final').html("<b>" + "<?=$pkgid?>" + " </b>" + "<?=$modetxt?>" + " " + "<?=gettext(' successfully completed')?>"); } - } else + } else { $('#final').html("<?=gettext('Reinstallation of all packages successfully completed')?>"); + } $('#final').show(); } @@ -523,22 +525,24 @@ function show_success() { // Display a failure banner function show_failure() { $('#final').addClass("alert-danger"); - if("<?=$_POST['mode']?>" != "reinstallall") + if ("<?=$_POST['mode']?>" != "reinstallall") { $('#final').html("<?=$pkgid?>" + " " + "<?=$modetxt?>" + " " + "<?=gettext(' failed!')?>"); - else + } else { $('#final').html("<?=gettext('Reinstallation of all packages failed')?>"); + } $('#final').show(); } // Ask the user to wait a bit function show_info() { $('#final').addClass("alert-info"); - if("<?=$_POST['mode']?>" != "reinstallall") + if ("<?=$_POST['mode']?>" != "reinstallall") { $('#final').html("Please wait while the " + "<?=$modetxt?>" + " of " + "<?=$pkgid?>" + " " + "completes." + "<br />" + "<?=gettext("(Some packages may take several minutes!)")?>"); - else + } else { $('#final').html("Please wait while the reinstallation of all packages completes." + "<br />" + "<?=gettext("(Some packages may take several minutes!)")?>"); + } $('#final').show(); } @@ -572,7 +576,7 @@ function getLogsStatus() { // Update the progress bar progress = 0; - if("<?=$progbar?>") { + if ("<?=$progbar?>") { if (json.data) { /* * XXX: There appears to be a bug in pkg that can cause "total" @@ -629,8 +633,8 @@ function checkonline() { } function startCountdown() { - setInterval(function(){ - if(time > 0) { + setInterval(function() { + if (time > 0) { $('#countdown').html(timeoutmsg + time + ' seconds.</h4>'); time--; } else { @@ -641,7 +645,7 @@ function startCountdown() { }, 1000); } -events.push(function(){ +events.push(function() { if ("<?=$start_polling?>") { setTimeout(getLogsStatus, 1000); show_info(); @@ -649,7 +653,7 @@ events.push(function(){ // If we are just re-drawing the page after a successful install/remove/reinstall, // we only meed to re-populate the progress indicator and the status banner - if ( "<?=$_POST['completed']?>" == "true") { + if ("<?=$_POST['completed']?>" == "true") { setProgress('progressbar', 100, false); show_success(); setTimeout(scrollToBottom, 200); diff --git a/src/usr/local/www/pkg_mgr_installed.php b/src/usr/local/www/pkg_mgr_installed.php index df0f98b..6fbc28f 100644 --- a/src/usr/local/www/pkg_mgr_installed.php +++ b/src/usr/local/www/pkg_mgr_installed.php @@ -77,7 +77,7 @@ if (is_subsystem_dirty('packagelock')) { $closehead = false; -$pgtitle = array(gettext("System"), gettext("Package Manager"),gettext("Installed Packages")); +$pgtitle = array(gettext("System"), gettext("Package Manager"), gettext("Installed Packages")); include("head.inc"); @@ -95,13 +95,13 @@ foreach ($package_list as $pkg) { $installed_packages[] = $pkg; } -if(empty($installed_packages)):?> +if (empty($installed_packages)):?> <div class="alert alert-warning"> <?=gettext("There are no packages currently installed.")?> </div> <?php else: ?> <div class="panel panel-default"> - <div class="panel-heading"><h2 class="panel-title"><?=gettext('Installed packages')?></h2></div> + <div class="panel-heading"><h2 class="panel-title"><?=gettext('Installed packages')?></h2></div> <div class="table-responsive"> <table class="table table-striped table-hover table-condensed"> <thead> @@ -117,7 +117,7 @@ if(empty($installed_packages)):?> <tbody> <?php foreach ($installed_packages as $pkg): - if(!$pkg['name']) { + if (!$pkg['name']) { continue; } @@ -158,7 +158,7 @@ if(empty($installed_packages)):?> ?> <tr> <td> -<?php if($upgradeavail) { ?> +<?php if ($upgradeavail) { ?> <a title="<?=$status?>" href="pkg_mgr_install.php?mode=reinstallpkg&pkg=<?=$pkg['name']?><?=$vergetstr?>" class="fa fa-refresh"></a> <?php } else if ($missing) { ?> <font color="red"><i title="<?=$status?>" class="fa fa-exclamation"></i></font> @@ -186,13 +186,13 @@ if(empty($installed_packages)):?> </td> <td> <a title="<?=gettext("Remove")?>" href="pkg_mgr_install.php?mode=delete&pkg=<?=$pkg['name']?>" class="fa fa-trash"></a> -<?php if($upgradeavail) { ?> +<?php if ($upgradeavail) { ?> <a title="<?=gettext("Update")?>" href="pkg_mgr_install.php?mode=reinstallpkg&pkg=<?=$pkg['name']?><?=$vergetstr?>" class="fa fa-refresh"></a> <?php } else { ?> <a title="<?=gettext("Reinstall")?>" href="pkg_mgr_install.php?mode=reinstallpkg&pkg=<?=$pkg['name']?>" class="fa fa-retweet"></a> <?php } ?> -<?php if(!isset($g['disablepackageinfo']) && $pkg['www'] != 'UNKNOWN'):?> +<?php if (!isset($g['disablepackageinfo']) && $pkg['www'] != 'UNKNOWN'):?> <a target="_blank" title="<?=gettext("View more information")?>" href="<?=htmlspecialchars($pkg['www'])?>" class="fa fa-info"></a> <?php endif; ?> </td> |