com web/bugs: Remove unused functions: include/functions.php
| From: | Peter Kokot | Date: | Thu, 23 May 2019 01:00:42 +0000 |
| Subject: | com web/bugs: Remove unused functions: include/functions.php | ||
| Groups: | php.webmaster | ||
| Request: | Send a blank email to php-webmaster+get-28069@lists.php.net to get a copy of this message | ||
Commit: 95cdd55d51122c8ba26f6a9db7decfc1682a40cd
Author: Peter Kokot <peterkokot@gmail.com> Thu, 23 May 2019 03:00:42 +0200
Parents: 9531cd154db3a5e41b6e806226e9e371d2699f52
Branches: master
Link: http://git.php.net/?p=web/bugs.git;a=commitdiff;h=95cdd55d51122c8ba26f6a9db7decfc1682a40cd
Log:
Remove unused functions
- admin_table_static
- admin_table_dynamic
- inline_content_menu
Changed paths:
M include/functions.php
Diff:
diff --git a/include/functions.php b/include/functions.php
index fd3bbd7..a4e3a0c 100644
--- a/include/functions.php
+++ b/include/functions.php
@@ -1677,117 +1677,3 @@ function bugs_get_hash($passwd)
{
return hash_hmac('sha256', $passwd, getenv('USER_PWD_SALT'));
}
-
-
-/**
- * Inline content menu
- *
- * . The base_url is a prefix for the location, currently does not support
_SERVER['QUERY_STRING']
- * . The current_action is used to indicate which page is currently being displayed
- * . Menu items are in (action_name => Title) array pairs
- */
-function inline_content_menu($base_url, $current_action, array $menu)
-{
- if (!$menu) {
- return;
- }
-
- $buffer = '';
-
- foreach ($menu as $action => $title) {
- if ($current_action === $action) {
- $buffer .= sprintf('<strong>%s</strong> | ', $title);
- } else {
- $buffer .= sprintf('<a href="%s?action=%s">%s</a> | ',
$base_url, $action, $title);
- }
- }
-
- echo "<p>";
- echo rtrim($buffer, ' | ');
- echo "</p>\n";
-}
-
-function admin_table_static(array $header, array $rows)
-{
- if (!$header || !$rows || sizeof($header) != sizeof($rows[0])) {
- return;
- }
-
- echo "<table>\n";
- echo "<tr class=\"bug_header\">\n";
-
- foreach ($header as $name) {
- echo "<th>$name</th>\n";
- }
-
- echo "</tr>\n";
-
-
- foreach ($rows as $row) {
- $i = 0;
-
- echo "<tr>\n";
-
- foreach ($row as $value) {
- echo "<td class=\"bug_bg" . (int) !(!$i || !($i % 2)) .
"\">$value</td>\n";
-
- ++$i;
- }
-
- echo "</tr>\n";
- }
-
- echo "</table>\n";
-}
-
-function admin_table_dynamic(array $rows)
-{
- if (!$rows) {
- return;
- }
-
- $printed_header = false;
-
- echo "<table>\n";
-
- foreach ($rows as $row) {
- if (!$printed_header) {
- echo "<tr class=\"bug_header\">\n";
-
- foreach (array_keys($row) as $column) {
- echo "<th>$column</th>\n";
- }
-
- echo "</tr>\n";
-
- $printed_header = true;
- }
-
- $i = 0;
-
- echo "<tr>\n";
-
- foreach ($row as $column => $value) {
- echo "<td class=\"bug_bg" . (int) !(!$i || !($i % 2)) . "
tbl-row-$column\">$value</td>\n";
-
- ++$i;
- }
-
- echo "</tr>\n";
- }
-}
-
-function mailto_list(array $mails)
-{
- if(!$mails) {
- return;
- }
-
- $buffer = '';
-
- foreach ($mails as $mail) {
- $buffer .= sprintf('<a href="mailto:%1$s">%1$s</a>, ', $mail);
- }
-
- echo rtrim($buffer, ', ');
-}