From ecffb0bbb57b8863ec624a4bfd1c4fa1f067f38b Mon Sep 17 00:00:00 2001 From: Phil Davis Date: Wed, 2 Sep 2015 22:54:32 +0545 Subject: bootstrap www gh minor edits --- src/usr/local/www/guiconfig.inc | 30 ++++++++-------- src/usr/local/www/halt.php | 2 +- src/usr/local/www/head.inc | 78 ++++++++++++++++++++--------------------- 3 files changed, 55 insertions(+), 55 deletions(-) (limited to 'src/usr') diff --git a/src/usr/local/www/guiconfig.inc b/src/usr/local/www/guiconfig.inc index b214c0d..5bd0882 100644 --- a/src/usr/local/www/guiconfig.inc +++ b/src/usr/local/www/guiconfig.inc @@ -314,13 +314,13 @@ function verify_gzip_file($fname) { } } -function print_info_box_np($msg, $name="apply",$value="", $showapply=false, $class="alert-warning") { +function print_info_box_np($msg, $name="apply", $value="", $showapply=false, $class="alert-warning") { global $g; - if(strpos($class, "alert-") !== 0) + if (strpos($class, "alert-") !== 0) $class = 'alert-' . $class; - if(empty($value)) { + if (empty($value)) { $value = gettext("Apply changes"); } @@ -558,7 +558,7 @@ function gentitle($title) { } function genhtmltitle($title) { - if(!is_array($title)) + if (!is_array($title)) return '

' . $title . '

'; $heading = '

' . end($title) . '

'; @@ -625,19 +625,19 @@ function dump_clog_no_table($logfile, $tail, $withorig = true, $grepfor = "", $g $sor = isset($config['syslog']['reverse']) ? "-r" : ""; $logarr = ""; $grepline = " "; - if(is_array($grepfor)) + if (is_array($grepfor)) $grepline .= " | /usr/bin/egrep " . escapeshellarg(implode("|", $grepfor)); - if(is_array($grepinvert)) + if (is_array($grepinvert)) $grepline .= " | /usr/bin/egrep -v " . escapeshellarg(implode("|", $grepinvert)); if (is_dir($logfile)) { $logarr = array("File $logfile is a directory."); } elseif (file_exists($logfile) && filesize($logfile) == 0) { $logarr = array("Log file started."); } else { - if($config['system']['disablesyslogclog']) { + if ($config['system']['disablesyslogclog']) { exec("cat " . escapeshellarg($logfile) . "{$grepline} | /usr/bin/tail {$sor} -n " . escapeshellarg($tail), $logarr); } else { - if(isset($config['system']['usefifolog'])) + if (isset($config['system']['usefifolog'])) exec("/usr/sbin/fifolog_reader " . escapeshellarg($logfile) . "{$grepline} | /usr/bin/tail {$sor} -n " . escapeshellarg($tail), $logarr); else exec("/usr/local/sbin/clog " . escapeshellarg($logfile) . "{$grepline}| grep -v \"CLOG\" | grep -v \"\033\" | /usr/bin/tail {$sor} -n " . escapeshellarg($tail), $logarr); @@ -651,7 +651,7 @@ function dump_clog_no_table($logfile, $tail, $withorig = true, $grepfor = "", $g $logent = preg_split("/\s+/", $logent, 6); if ($withorig) { - if(isset($config['system']['usefifolog'])) { + if (isset($config['system']['usefifolog'])) { $entry_date_time = htmlspecialchars(date("F j, Y, g:i a","" . $logent[1] . "")); $entry_text = htmlspecialchars($logent[5]); } else { @@ -1075,18 +1075,18 @@ function display_top_tabs(& $tab_array, $no_drop_down = false, $type = 'pills') foreach ($tab_array as $ta) $tabcharcount = $tabcharcount + strlen($ta[0]); - if($no_drop_down == true) { + if ($no_drop_down == true) { $tabcharcount = 0; unset($tab_array_char_limit); } // If the character count of the tab names is > 670 // then show a select item dropdown menubox. - if($tabcharcount > $tab_array_char_limit): ?> + if ($tabcharcount > $tab_array_char_limit): ?> echo gettext("Currently viewing: "); echo "