From d71e7bbfad2f07f82df0c515608996d250fd4182 Mon Sep 17 00:00:00 2001 From: Bot Date: Mon, 2 Jan 2017 15:43:36 +0100 Subject: Formatting --- includes/sys_template.php | 34 ++++++++++++++++++---------------- 1 file changed, 18 insertions(+), 16 deletions(-) (limited to 'includes/sys_template.php') diff --git a/includes/sys_template.php b/includes/sys_template.php index 059d3169..b543ce9a 100644 --- a/includes/sys_template.php +++ b/includes/sys_template.php @@ -95,7 +95,7 @@ function toolbar_pills($items) * @param string $href * @param string $glyphicon * @param string $label - * @param bool $selected + * @param bool $selected * @return string */ function toolbar_item_link($href, $glyphicon, $label, $selected = false) @@ -158,18 +158,18 @@ function page_with_title($title, $elements) function table($columns, $rows_raw, $data = true) { // If only one column is given - if (! is_array($columns)) { - $rows = []; - foreach ($rows_raw as $row) { - $rows[] = [ - 'col' => $row - ]; - } - return render_table([ - 'col' => $columns - ], $rows, $data); - } - + if (!is_array($columns)) { + $rows = []; + foreach ($rows_raw as $row) { + $rows[] = [ + 'col' => $row + ]; + } + return render_table([ + 'col' => $columns + ], $rows, $data); + } + return render_table($columns, $rows_raw, $data); } @@ -182,7 +182,7 @@ function render_table($columns, $rows, $data = true) if (count($rows) == 0) { return info(_("No data found."), true); } - + $html = ''; $html .= ''; foreach ($columns as $key => $column) { @@ -255,7 +255,9 @@ function shorten($str, $length = 50) if (strlen($str) < $length) { return $str; } - return '' . substr($str, 0, $length - 3) . '...'; + return '' + . substr($str, 0, $length - 3) + . '...'; } function table_body($array) @@ -297,6 +299,6 @@ function ReplaceSmilies($neueckig) $neueckig = str_replace(";P", "", $neueckig); $neueckig = str_replace(";oP", "", $neueckig); $neueckig = str_replace("?)", "", $neueckig); - + return $neueckig; } -- cgit v1.2.3-54-g00ecf