diff options
author | Dries Buytaert <dries@buytaert.net> | 2003-11-13 19:52:54 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2003-11-13 19:52:54 +0000 |
commit | 36bb57555c1be31a19db442db35befba3188633a (patch) | |
tree | 6574d74df4b72cfe71d07f1aff33acb4761756c7 /includes/common.inc | |
parent | e8de9721d83489a836f3d74f982f751d358fbc9e (diff) | |
download | brdo-36bb57555c1be31a19db442db35befba3188633a.tar.gz brdo-36bb57555c1be31a19db442db35befba3188633a.tar.bz2 |
- table(...) -> theme("table", ...)
Diffstat (limited to 'includes/common.inc')
-rw-r--r-- | includes/common.inc | 67 |
1 files changed, 0 insertions, 67 deletions
diff --git a/includes/common.inc b/includes/common.inc index dc8a942b8..d15c9f7a5 100644 --- a/includes/common.inc +++ b/includes/common.inc @@ -256,73 +256,6 @@ function drupal_specialchars($input, $quotes = ENT_NOQUOTES) { return htmlspecialchars($input, $quotes); } -function table_cell($cell, $header = 0) { - if (is_array($cell)) { - $data = $cell["data"]; - foreach ($cell as $key => $value) { - if ($key != "data") { - $attributes .= " $key=\"$value\""; - } - } - } - else { - $data = $cell; - } - - if ($header) { - $output = "<th$attributes>$data</th>"; - } - else { - $output = "<td$attributes>$data</td>"; - } - - return $output; -} - -function table($header, $rows) { - - $output = "<table>\n"; - - /* - ** Emit the table header: - */ - - if (is_array($header)) { - $output .= " <tr>"; - foreach ($header as $cell) { - if (is_array($cell) && $cell["field"]) { - $cell = tablesort($cell, $header); - } - $output .= table_cell($cell, 1); - } - $output .= " </tr>\n"; - } - - /* - ** Emit the table rows: - */ - - if (is_array($rows)) { - foreach ($rows as $number => $row) { - if ($number % 2 == 1) { - $output .= " <tr class=\"light\">"; - } - else { - $output .= " <tr class=\"dark\">"; - } - - foreach ($row as $cell) { - $output .= table_cell($cell, 0); - } - $output .= " </tr>\n"; - } - } - - $output .= "</table>\n"; - - return $output; -} - /** * Verify the syntax of the given e-mail address. Empty e-mail addresses * are allowed. See RFC 2822 for details. |