diff --git a/includes/common.inc b/includes/common.inc index dc8a942b81a..d15c9f7a582 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 = "$data"; - } - else { - $output = "$data"; - } - - return $output; -} - -function table($header, $rows) { - - $output = "\n"; - - /* - ** Emit the table header: - */ - - if (is_array($header)) { - $output .= " "; - foreach ($header as $cell) { - if (is_array($cell) && $cell["field"]) { - $cell = tablesort($cell, $header); - } - $output .= table_cell($cell, 1); - } - $output .= " \n"; - } - - /* - ** Emit the table rows: - */ - - if (is_array($rows)) { - foreach ($rows as $number => $row) { - if ($number % 2 == 1) { - $output .= " "; - } - else { - $output .= " "; - } - - foreach ($row as $cell) { - $output .= table_cell($cell, 0); - } - $output .= " \n"; - } - } - - $output .= "
\n"; - - return $output; -} - /** * Verify the syntax of the given e-mail address. Empty e-mail addresses * are allowed. See RFC 2822 for details. diff --git a/includes/theme.inc b/includes/theme.inc index 9eaa9e8bdd5..ae284d34dd6 100644 --- a/includes/theme.inc +++ b/includes/theme.inc @@ -122,6 +122,83 @@ function theme_node($node, $main) { return $output; } +function _theme_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 = "$data"; + } + else { + $output = "$data"; + } + + return $output; +} + + +/** + Returns themed table. + + @param $header + @param $rows + + @return a string contraining the \a node output. +**/ + +function theme_table($header, $rows) { + + $output = "\n"; + + /* + ** Emit the table header: + */ + + if (is_array($header)) { + $output .= " "; + foreach ($header as $cell) { + if (is_array($cell) && $cell["field"]) { + $cell = tablesort($cell, $header); + } + $output .= _theme_table_cell($cell, 1); + } + $output .= " \n"; + } + + /* + ** Emit the table rows: + */ + + if (is_array($rows)) { + foreach ($rows as $number => $row) { + if ($number % 2 == 1) { + $output .= " "; + } + else { + $output .= " "; + } + + foreach ($row as $cell) { + $output .= _theme_table_cell($cell, 0); + } + $output .= " \n"; + } + } + + $output .= "
\n"; + + return $output; +} + /** Returns themed box. diff --git a/modules/aggregator.module b/modules/aggregator.module index c44dbd5fcfc..5c8b0015810 100644 --- a/modules/aggregator.module +++ b/modules/aggregator.module @@ -522,7 +522,7 @@ function import_view() { while ($feed = db_fetch_object($result)) { $rows[] = array($feed->title, $feed->attributes, format_plural($feed->items, "1 item", "%count items"), ($feed->timestamp ? format_interval(time() - $feed->timestamp) ." ago" : "never"), ($feed->timestamp ? format_interval($feed->timestamp + $feed->refresh - time()) ." left" : "never"), l(t("edit feed"), "admin/node/syndication/news/edit/feed/$feed->fid"), l(t("remove items"), "admin/node/syndication/news/remove/$feed->fid"), l(t("update items"), "admin/node/syndication/news/update/$feed->fid")); } - $output .= table($header, $rows); + $output .= theme("table", $header, $rows); $result = db_query("SELECT * FROM {bundle} ORDER BY title"); @@ -533,7 +533,7 @@ function import_view() { while ($bundle = db_fetch_object($result)) { $rows[] = array($bundle->title, $bundle->attributes, l(t("edit bundle"), "admin/node/syndication/news/edit/bundle/$bundle->bid")); } - $output .= table($header, $rows); + $output .= theme("table", $header, $rows); return $output; } @@ -547,7 +547,7 @@ function import_tag() { $rows[] = array(array("data" => format_date($item->timestamp, "small"), "nowrap" => "nowrap", "valign" => "top"), array("data" => l($item->feed, "admin/node/syndication/news/edit/feed/$item->fid"), "valign" => "top"), "link\">$item->title". ($item->description ? "
$item->description" : "") ."
iid]\" value=\"". check_form($item->attributes) ."\" size=\"50\" />"); } - $output .= table($header, $rows); + $output .= theme("table", $header, $rows); $output .= "\n"; return form($output); diff --git a/modules/aggregator/aggregator.module b/modules/aggregator/aggregator.module index c44dbd5fcfc..5c8b0015810 100644 --- a/modules/aggregator/aggregator.module +++ b/modules/aggregator/aggregator.module @@ -522,7 +522,7 @@ function import_view() { while ($feed = db_fetch_object($result)) { $rows[] = array($feed->title, $feed->attributes, format_plural($feed->items, "1 item", "%count items"), ($feed->timestamp ? format_interval(time() - $feed->timestamp) ." ago" : "never"), ($feed->timestamp ? format_interval($feed->timestamp + $feed->refresh - time()) ." left" : "never"), l(t("edit feed"), "admin/node/syndication/news/edit/feed/$feed->fid"), l(t("remove items"), "admin/node/syndication/news/remove/$feed->fid"), l(t("update items"), "admin/node/syndication/news/update/$feed->fid")); } - $output .= table($header, $rows); + $output .= theme("table", $header, $rows); $result = db_query("SELECT * FROM {bundle} ORDER BY title"); @@ -533,7 +533,7 @@ function import_view() { while ($bundle = db_fetch_object($result)) { $rows[] = array($bundle->title, $bundle->attributes, l(t("edit bundle"), "admin/node/syndication/news/edit/bundle/$bundle->bid")); } - $output .= table($header, $rows); + $output .= theme("table", $header, $rows); return $output; } @@ -547,7 +547,7 @@ function import_tag() { $rows[] = array(array("data" => format_date($item->timestamp, "small"), "nowrap" => "nowrap", "valign" => "top"), array("data" => l($item->feed, "admin/node/syndication/news/edit/feed/$item->fid"), "valign" => "top"), "link\">$item->title". ($item->description ? "
$item->description" : "") ."
iid]\" value=\"". check_form($item->attributes) ."\" size=\"50\" />"); } - $output .= table($header, $rows); + $output .= theme("table", $header, $rows); $output .= "\n"; return form($output); diff --git a/modules/block.module b/modules/block.module index fdefa374143..bd78a3295db 100644 --- a/modules/block.module +++ b/modules/block.module @@ -164,7 +164,7 @@ function block_admin_display() { $rows[] = array($block["info"], array("data" => form_checkbox(NULL, $block["module"]."][".$block["delta"]."][status", 1, $block["status"]), "align" => "center"), array("data" => form_checkbox(NULL, $block["module"]."][".$block["delta"]."][custom", 1, $block["custom"]), "align" => "center"), form_weight(NULL, $block["module"]."][".$block["delta"]."][weight", $block["weight"]), form_radios(NULL, $block["module"]."][".$block["delta"]."][region", $block["region"], array(t("left"), t("right"))), form_textfield(NULL, $block["module"]."][".$block["delta"]."][path", $block["path"], 10, 255), $edit, $delete); } - $output = table($header, $rows); + $output = theme("table", $header, $rows); $output .= form_submit(t("Save blocks")); return form($output); diff --git a/modules/block/block.module b/modules/block/block.module index fdefa374143..bd78a3295db 100644 --- a/modules/block/block.module +++ b/modules/block/block.module @@ -164,7 +164,7 @@ function block_admin_display() { $rows[] = array($block["info"], array("data" => form_checkbox(NULL, $block["module"]."][".$block["delta"]."][status", 1, $block["status"]), "align" => "center"), array("data" => form_checkbox(NULL, $block["module"]."][".$block["delta"]."][custom", 1, $block["custom"]), "align" => "center"), form_weight(NULL, $block["module"]."][".$block["delta"]."][weight", $block["weight"]), form_radios(NULL, $block["module"]."][".$block["delta"]."][region", $block["region"], array(t("left"), t("right"))), form_textfield(NULL, $block["module"]."][".$block["delta"]."][path", $block["path"], 10, 255), $edit, $delete); } - $output = table($header, $rows); + $output = theme("table", $header, $rows); $output .= form_submit(t("Save blocks")); return form($output); diff --git a/modules/book.module b/modules/book.module index 5b94c60fe35..0a6f68a44a4 100644 --- a/modules/book.module +++ b/modules/book.module @@ -741,7 +741,7 @@ function book_admin_view($nid, $depth = 0) { $rows[] = book_admin_view_line($node); $rows = array_merge($rows, book_admin_view_book($nid)); - $output .= table($header, $rows); + $output .= theme("table", $header, $rows); $output .= form_submit(t("Save book pages")); return form($output); @@ -797,7 +797,7 @@ function book_admin_orphan() { $rows = array_merge($rows, book_admin_view_book($node->nid, $depth + 1)); } } - $output .= table($header, $rows); + $output .= theme("table", $header, $rows); } return $output; diff --git a/modules/book/book.module b/modules/book/book.module index 5b94c60fe35..0a6f68a44a4 100644 --- a/modules/book/book.module +++ b/modules/book/book.module @@ -741,7 +741,7 @@ function book_admin_view($nid, $depth = 0) { $rows[] = book_admin_view_line($node); $rows = array_merge($rows, book_admin_view_book($nid)); - $output .= table($header, $rows); + $output .= theme("table", $header, $rows); $output .= form_submit(t("Save book pages")); return form($output); @@ -797,7 +797,7 @@ function book_admin_orphan() { $rows = array_merge($rows, book_admin_view_book($node->nid, $depth + 1)); } } - $output .= table($header, $rows); + $output .= theme("table", $header, $rows); } return $output; diff --git a/modules/cloud.module b/modules/cloud.module index 0983dc84e40..31b5ebfb7cc 100644 --- a/modules/cloud.module +++ b/modules/cloud.module @@ -143,7 +143,7 @@ function cloud_display() { $rows[] = array("link\">$site->name", ($site->changed ? format_interval(time() - $site->changed) ." ago" : "never"), l(t("edit site"), "admin/node/syndication/cloud/edit/$site->sid"), l(t("update site"), "admin/node/syndication/cloud/update/$site->sid")); } - return table($header, $rows); + return theme("table", $header, $rows); } function cloud_list($limit = 10) { diff --git a/modules/comment.module b/modules/comment.module index b75d4c2cfd7..a0bcad6545b 100644 --- a/modules/comment.module +++ b/modules/comment.module @@ -939,7 +939,7 @@ function comment_node_link($node) { if ($rows) { $output = "

". t("Edit comments") ."

"; - $output .= table($header, $rows); + $output .= theme("table", $header, $rows); } return $output; @@ -1011,7 +1011,7 @@ function comment_admin_overview($status = 0) { $rows[] = array(array("data" => $pager, "colspan" => 6)); } - return table($header, $rows); + return theme("table", $header, $rows); } function comment_mod_matrix($edit) { @@ -1050,7 +1050,7 @@ function comment_mod_matrix($edit) { } $rows[] = $row; } - $output .= table($header, $rows); + $output .= theme("table", $header, $rows); $output .= "
". form_submit(t("Submit votes")); return form($output); @@ -1075,7 +1075,7 @@ function comment_mod_roles($edit) { $rows[] = array($role->name, array("data" => form_textfield(NULL, $role->rid, $start_values[$role->rid], 4, 3), "align" => "center")); } - $output .= table($header, $rows); + $output .= theme("table", $header, $rows); $output .= "
". form_submit(t("Save scores")); return form($output); @@ -1110,7 +1110,7 @@ function comment_mod_votes($edit) { while ($vote = db_fetch_object($result)) { $rows[] = array($vote->vote, array("data" => $vote->weight, "align" => "center"), array("data" => l(t("edit"), "admin/comment/moderation/votes/$vote->mid"), "align" => "center")); } - $output .= table($header, $rows); + $output .= theme("table", $header, $rows); if ($mid) { $vote = db_fetch_object(db_query("SELECT vote, weight FROM {moderation_votes} WHERE mid = %d", $mid)); @@ -1161,7 +1161,7 @@ function comment_mod_filters($edit) { while ($filter = db_fetch_object($result)) { $rows[] = array($filter->filter, array("data" => $filter->minimum, "align" => "center"), array("data" => l(t("edit"), "admin/comment/moderation/filters/$filter->fid"), "align" => "center")); } - $output .= table($header, $rows); + $output .= theme("table", $header, $rows); if ($fid) { $filter = db_fetch_object(db_query("SELECT filter, fid, minimum FROM {moderation_filters} WHERE fid = %d", $fid)); diff --git a/modules/comment/comment.module b/modules/comment/comment.module index b75d4c2cfd7..a0bcad6545b 100644 --- a/modules/comment/comment.module +++ b/modules/comment/comment.module @@ -939,7 +939,7 @@ function comment_node_link($node) { if ($rows) { $output = "

". t("Edit comments") ."

"; - $output .= table($header, $rows); + $output .= theme("table", $header, $rows); } return $output; @@ -1011,7 +1011,7 @@ function comment_admin_overview($status = 0) { $rows[] = array(array("data" => $pager, "colspan" => 6)); } - return table($header, $rows); + return theme("table", $header, $rows); } function comment_mod_matrix($edit) { @@ -1050,7 +1050,7 @@ function comment_mod_matrix($edit) { } $rows[] = $row; } - $output .= table($header, $rows); + $output .= theme("table", $header, $rows); $output .= "
". form_submit(t("Submit votes")); return form($output); @@ -1075,7 +1075,7 @@ function comment_mod_roles($edit) { $rows[] = array($role->name, array("data" => form_textfield(NULL, $role->rid, $start_values[$role->rid], 4, 3), "align" => "center")); } - $output .= table($header, $rows); + $output .= theme("table", $header, $rows); $output .= "
". form_submit(t("Save scores")); return form($output); @@ -1110,7 +1110,7 @@ function comment_mod_votes($edit) { while ($vote = db_fetch_object($result)) { $rows[] = array($vote->vote, array("data" => $vote->weight, "align" => "center"), array("data" => l(t("edit"), "admin/comment/moderation/votes/$vote->mid"), "align" => "center")); } - $output .= table($header, $rows); + $output .= theme("table", $header, $rows); if ($mid) { $vote = db_fetch_object(db_query("SELECT vote, weight FROM {moderation_votes} WHERE mid = %d", $mid)); @@ -1161,7 +1161,7 @@ function comment_mod_filters($edit) { while ($filter = db_fetch_object($result)) { $rows[] = array($filter->filter, array("data" => $filter->minimum, "align" => "center"), array("data" => l(t("edit"), "admin/comment/moderation/filters/$filter->fid"), "align" => "center")); } - $output .= table($header, $rows); + $output .= theme("table", $header, $rows); if ($fid) { $filter = db_fetch_object(db_query("SELECT filter, fid, minimum FROM {moderation_filters} WHERE fid = %d", $fid)); diff --git a/modules/forum.module b/modules/forum.module index e305d025cd6..34709d39b90 100644 --- a/modules/forum.module +++ b/modules/forum.module @@ -574,7 +574,7 @@ function theme_forum_list($forums, $parents, $tid) { } } - return table($header, $rows); + return theme("table", $header, $rows); } /** @@ -623,7 +623,7 @@ function theme_forum_topic_list($tid, $topics, $sortby, $forum_per_page, $offset $output = l(t("create new forum topic"), "node/add/forum/$tid") ."

"; } - $output .= table($forum_topic_list_header, $rows); + $output .= theme("table", $forum_topic_list_header, $rows); return $output; } diff --git a/modules/forum/forum.module b/modules/forum/forum.module index e305d025cd6..34709d39b90 100644 --- a/modules/forum/forum.module +++ b/modules/forum/forum.module @@ -574,7 +574,7 @@ function theme_forum_list($forums, $parents, $tid) { } } - return table($header, $rows); + return theme("table", $header, $rows); } /** @@ -623,7 +623,7 @@ function theme_forum_topic_list($tid, $topics, $sortby, $forum_per_page, $offset $output = l(t("create new forum topic"), "node/add/forum/$tid") ."

"; } - $output .= table($forum_topic_list_header, $rows); + $output .= theme("table", $forum_topic_list_header, $rows); return $output; } diff --git a/modules/import.module b/modules/import.module index c44dbd5fcfc..5c8b0015810 100644 --- a/modules/import.module +++ b/modules/import.module @@ -522,7 +522,7 @@ function import_view() { while ($feed = db_fetch_object($result)) { $rows[] = array($feed->title, $feed->attributes, format_plural($feed->items, "1 item", "%count items"), ($feed->timestamp ? format_interval(time() - $feed->timestamp) ." ago" : "never"), ($feed->timestamp ? format_interval($feed->timestamp + $feed->refresh - time()) ." left" : "never"), l(t("edit feed"), "admin/node/syndication/news/edit/feed/$feed->fid"), l(t("remove items"), "admin/node/syndication/news/remove/$feed->fid"), l(t("update items"), "admin/node/syndication/news/update/$feed->fid")); } - $output .= table($header, $rows); + $output .= theme("table", $header, $rows); $result = db_query("SELECT * FROM {bundle} ORDER BY title"); @@ -533,7 +533,7 @@ function import_view() { while ($bundle = db_fetch_object($result)) { $rows[] = array($bundle->title, $bundle->attributes, l(t("edit bundle"), "admin/node/syndication/news/edit/bundle/$bundle->bid")); } - $output .= table($header, $rows); + $output .= theme("table", $header, $rows); return $output; } @@ -547,7 +547,7 @@ function import_tag() { $rows[] = array(array("data" => format_date($item->timestamp, "small"), "nowrap" => "nowrap", "valign" => "top"), array("data" => l($item->feed, "admin/node/syndication/news/edit/feed/$item->fid"), "valign" => "top"), "link\">$item->title". ($item->description ? "
$item->description" : "") ."
iid]\" value=\"". check_form($item->attributes) ."\" size=\"50\" />"); } - $output .= table($header, $rows); + $output .= theme("table", $header, $rows); $output .= "\n"; return form($output); diff --git a/modules/locale.module b/modules/locale.module index 4b3812e828f..84b4669542d 100644 --- a/modules/locale.module +++ b/modules/locale.module @@ -229,7 +229,7 @@ function locale_seek() { $rows[] = array(array("data" => "$pager", "colspan" => "5")); } - $output .= table($header, $rows); + $output .= theme("table", $header, $rows); } diff --git a/modules/locale/locale.module b/modules/locale/locale.module index 4b3812e828f..84b4669542d 100644 --- a/modules/locale/locale.module +++ b/modules/locale/locale.module @@ -229,7 +229,7 @@ function locale_seek() { $rows[] = array(array("data" => "$pager", "colspan" => "5")); } - $output .= table($header, $rows); + $output .= theme("table", $header, $rows); } diff --git a/modules/node.module b/modules/node.module index 783d444cff7..a69e84b3a89 100644 --- a/modules/node.module +++ b/modules/node.module @@ -683,7 +683,7 @@ function node_admin_nodes() { } $output .= "

". $filters[$filter][0] ."

"; - $output .= table($header, $rows); + $output .= theme("table", $header, $rows); return form($output); } @@ -724,14 +724,14 @@ function node_admin_settings($edit) { } } - $output .= table($header, $rows); + $output .= theme("table", $header, $rows); /* This is an idea for the future. foreach (module_list() as $name) { if (module_hook($name, "node")) { $node->type = $name; - // Create table() data: + // Create theme("table", ) data: $header = array_keys(node_invoke_nodeapi($node, "settings")); $cols = array(); foreach (node_invoke_nodeapi($node, "settings") as $setting) { @@ -739,7 +739,7 @@ function node_admin_settings($edit) { } $output .= "

". module_invoke($name, "node", "name") ."

"; - $output .= table($header, array($cols)); + $output .= theme("table", $header, array($cols)); $output .= "

"; } } @@ -763,7 +763,7 @@ function node_revision_overview($nid) { foreach ($node->revisions as $key => $revision) { $rows[] = array(t("revision #%r revised by %u on %d", array("%r" => $key, "%u" => format_name(user_load(array("uid" => $revision["uid"]))), "%d" => format_date($revision["timestamp"], "small"))) . ($revision["history"] ? "
". $revision["history"] ."" : ""), l(t("view"), "node/view/$node->nid", array(), "revision=$key"), l(t("rollback"), "node/rollback-revision/$node->nid/$key"), l(t("delete"), "node/delete-revision/$node->nid/$key")); } - $output .= table($header, $rows); + $output .= theme("table", $header, $rows); } } diff --git a/modules/node/node.module b/modules/node/node.module index 783d444cff7..a69e84b3a89 100644 --- a/modules/node/node.module +++ b/modules/node/node.module @@ -683,7 +683,7 @@ function node_admin_nodes() { } $output .= "

". $filters[$filter][0] ."

"; - $output .= table($header, $rows); + $output .= theme("table", $header, $rows); return form($output); } @@ -724,14 +724,14 @@ function node_admin_settings($edit) { } } - $output .= table($header, $rows); + $output .= theme("table", $header, $rows); /* This is an idea for the future. foreach (module_list() as $name) { if (module_hook($name, "node")) { $node->type = $name; - // Create table() data: + // Create theme("table", ) data: $header = array_keys(node_invoke_nodeapi($node, "settings")); $cols = array(); foreach (node_invoke_nodeapi($node, "settings") as $setting) { @@ -739,7 +739,7 @@ function node_admin_settings($edit) { } $output .= "

". module_invoke($name, "node", "name") ."

"; - $output .= table($header, array($cols)); + $output .= theme("table", $header, array($cols)); $output .= "

"; } } @@ -763,7 +763,7 @@ function node_revision_overview($nid) { foreach ($node->revisions as $key => $revision) { $rows[] = array(t("revision #%r revised by %u on %d", array("%r" => $key, "%u" => format_name(user_load(array("uid" => $revision["uid"]))), "%d" => format_date($revision["timestamp"], "small"))) . ($revision["history"] ? "
". $revision["history"] ."" : ""), l(t("view"), "node/view/$node->nid", array(), "revision=$key"), l(t("rollback"), "node/rollback-revision/$node->nid/$key"), l(t("delete"), "node/delete-revision/$node->nid/$key")); } - $output .= table($header, $rows); + $output .= theme("table", $header, $rows); } } diff --git a/modules/path.module b/modules/path.module index 7b88f77aa80..9a8ea9ff083 100644 --- a/modules/path.module +++ b/modules/path.module @@ -212,7 +212,7 @@ function path_overview() { $rows[] = array(array("data" => t("No URL aliases available."), "colspan" => "4")); } - return table($header, $rows); + return theme("table", $header, $rows); } function path_load($pid) { diff --git a/modules/path/path.module b/modules/path/path.module index 7b88f77aa80..9a8ea9ff083 100644 --- a/modules/path/path.module +++ b/modules/path/path.module @@ -212,7 +212,7 @@ function path_overview() { $rows[] = array(array("data" => t("No URL aliases available."), "colspan" => "4")); } - return table($header, $rows); + return theme("table", $header, $rows); } function path_load($pid) { diff --git a/modules/profile.module b/modules/profile.module index 7325569c43e..63c9eda8e2b 100644 --- a/modules/profile.module +++ b/modules/profile.module @@ -72,7 +72,7 @@ function profile_settings() { $row[$i][] = form_checkbox("", "profile_register_fields][", $key, in_array($key, $profile_register_fields)); $i++; } - $output .= table($header, $row); + $output .= theme("table", $header, $row); $output .= form_textfield(t("Avatar image path"), "profile_avatar_path", variable_get("profile_avatar_path", "misc/avatars/"), 30, 255, t("Path for avatar directory; it must be writable and visible from the web.")); $output .= form_textfield(t("Avatar maximum dimensions"), "profile_avatar_dimensions", variable_get("profile_avatar_dimensions", "85x85"), 10, 10, t("Maximum dimensions for avatars.")); diff --git a/modules/profile/profile.module b/modules/profile/profile.module index 7325569c43e..63c9eda8e2b 100644 --- a/modules/profile/profile.module +++ b/modules/profile/profile.module @@ -72,7 +72,7 @@ function profile_settings() { $row[$i][] = form_checkbox("", "profile_register_fields][", $key, in_array($key, $profile_register_fields)); $i++; } - $output .= table($header, $row); + $output .= theme("table", $header, $row); $output .= form_textfield(t("Avatar image path"), "profile_avatar_path", variable_get("profile_avatar_path", "misc/avatars/"), 30, 255, t("Path for avatar directory; it must be writable and visible from the web.")); $output .= form_textfield(t("Avatar maximum dimensions"), "profile_avatar_dimensions", variable_get("profile_avatar_dimensions", "85x85"), 10, 10, t("Maximum dimensions for avatars.")); diff --git a/modules/statistics.module b/modules/statistics.module index f1f76a94449..1be70182b92 100644 --- a/modules/statistics.module +++ b/modules/statistics.module @@ -340,7 +340,7 @@ function statistics_admin_topnodes_table() { $rows[] = array(array("data" => $pager, "colspan" => 5)); } - return table($header, $rows); + return theme("table", $header, $rows); } @@ -399,7 +399,7 @@ function statistics_admin_accesslog_table($type, $id) { $rows[] = array(array("data" => $pager, "colspan" => 8)); } - return table($header, $rows); + return theme("table", $header, $rows); } function statistics_top_refer() { @@ -440,7 +440,7 @@ function statistics_top_refer() { $rows[] = array(array("data" => $pager, "colspan" => 3)); } - $output .= table($header, $rows); + $output .= theme("table", $header, $rows); return $output; diff --git a/modules/statistics/statistics.module b/modules/statistics/statistics.module index f1f76a94449..1be70182b92 100644 --- a/modules/statistics/statistics.module +++ b/modules/statistics/statistics.module @@ -340,7 +340,7 @@ function statistics_admin_topnodes_table() { $rows[] = array(array("data" => $pager, "colspan" => 5)); } - return table($header, $rows); + return theme("table", $header, $rows); } @@ -399,7 +399,7 @@ function statistics_admin_accesslog_table($type, $id) { $rows[] = array(array("data" => $pager, "colspan" => 8)); } - return table($header, $rows); + return theme("table", $header, $rows); } function statistics_top_refer() { @@ -440,7 +440,7 @@ function statistics_top_refer() { $rows[] = array(array("data" => $pager, "colspan" => 3)); } - $output .= table($header, $rows); + $output .= theme("table", $header, $rows); return $output; diff --git a/modules/system.module b/modules/system.module index 88c74db7385..c67722ad2f4 100644 --- a/modules/system.module +++ b/modules/system.module @@ -313,7 +313,7 @@ function system_listing($type, $directory, $required = array()) { $rows[] = array($info->name, $info->description, array("data" => (in_array($filename, $required) ? form_hidden("status][$filename", 1) . t("required") : form_checkbox("", "status][$filename", 1, $file->status)), "align" => "center")); } - $output = table($header, $rows); + $output = theme("table", $header, $rows); // If we're doing themes, stick the default one here... if ($type == "theme") { diff --git a/modules/system/system.module b/modules/system/system.module index 88c74db7385..c67722ad2f4 100644 --- a/modules/system/system.module +++ b/modules/system/system.module @@ -313,7 +313,7 @@ function system_listing($type, $directory, $required = array()) { $rows[] = array($info->name, $info->description, array("data" => (in_array($filename, $required) ? form_hidden("status][$filename", 1) . t("required") : form_checkbox("", "status][$filename", 1, $file->status)), "align" => "center")); } - $output = table($header, $rows); + $output = theme("table", $header, $rows); // If we're doing themes, stick the default one here... if ($type == "theme") { diff --git a/modules/taxonomy.module b/modules/taxonomy.module index 281b8d2f0ea..08b78610538 100644 --- a/modules/taxonomy.module +++ b/modules/taxonomy.module @@ -289,7 +289,7 @@ function taxonomy_overview() { } } - return table($header, $rows); + return theme("table", $header, $rows); } function taxonomy_form($vocabulary_id, $value = 0) { diff --git a/modules/taxonomy/taxonomy.module b/modules/taxonomy/taxonomy.module index 281b8d2f0ea..08b78610538 100644 --- a/modules/taxonomy/taxonomy.module +++ b/modules/taxonomy/taxonomy.module @@ -289,7 +289,7 @@ function taxonomy_overview() { } } - return table($header, $rows); + return theme("table", $header, $rows); } function taxonomy_form($vocabulary_id, $value = 0) { diff --git a/modules/title.module b/modules/title.module index a2fdd0b9d2d..9650ceeb56b 100644 --- a/modules/title.module +++ b/modules/title.module @@ -46,7 +46,7 @@ function title_page() { } $output = "
"; - $output .= table($header, $rows); + $output .= theme("table", $header, $rows); $output .= "
"; print theme("header"); diff --git a/modules/tracker.module b/modules/tracker.module index fcde4f1f66a..094967458d9 100644 --- a/modules/tracker.module +++ b/modules/tracker.module @@ -84,7 +84,7 @@ function tracker_posts($id = 0) { } $output = "
"; - $output .= table($header, $rows); + $output .= theme("table", $header, $rows); $output .= "
"; return $output; diff --git a/modules/tracker/tracker.module b/modules/tracker/tracker.module index fcde4f1f66a..094967458d9 100644 --- a/modules/tracker/tracker.module +++ b/modules/tracker/tracker.module @@ -84,7 +84,7 @@ function tracker_posts($id = 0) { } $output = "
"; - $output .= table($header, $rows); + $output .= theme("table", $header, $rows); $output .= "
"; return $output; diff --git a/modules/user.module b/modules/user.module index ab9cf143145..7a218635bcb 100644 --- a/modules/user.module +++ b/modules/user.module @@ -1244,7 +1244,7 @@ function user_admin_access($edit = array()) { $options = array ("1" => t("Allow"), "0" => t("Deny")); $rows[] = array(form_radios(NUll, "status", $edit["status"], $options), form_textfield(NULL, "mask", $edit["mask"], 32, 64), form_submit(t("Add rule"))); - $output .= table($header, $rows); + $output .= theme("table", $header, $rows); $output .= "

%: ". t("Matches any number of characters, even zero characters") .".
_: ". t("Matches exactly one character.") ."

"; @@ -1326,7 +1326,7 @@ function user_admin_perm($edit = array()) { unset($row); } - $output = table($header, $rows); + $output = theme("table", $header, $rows); $output .= form_submit(t("Save permissions")); return form($output); @@ -1378,7 +1378,7 @@ function user_admin_role($edit = array()) { } $rows[] = array("", ""); - $output = table($header, $rows); + $output = theme("table", $header, $rows); $output = form($output); } @@ -1506,7 +1506,7 @@ function user_admin_account() { if (!empty($pager)) { $rows[] = array(array("data" => $pager, "colspan" => 6)); } - return table($header, $rows); + return theme("table", $header, $rows); } function user_role_init() { diff --git a/modules/user/user.module b/modules/user/user.module index ab9cf143145..7a218635bcb 100644 --- a/modules/user/user.module +++ b/modules/user/user.module @@ -1244,7 +1244,7 @@ function user_admin_access($edit = array()) { $options = array ("1" => t("Allow"), "0" => t("Deny")); $rows[] = array(form_radios(NUll, "status", $edit["status"], $options), form_textfield(NULL, "mask", $edit["mask"], 32, 64), form_submit(t("Add rule"))); - $output .= table($header, $rows); + $output .= theme("table", $header, $rows); $output .= "

%: ". t("Matches any number of characters, even zero characters") .".
_: ". t("Matches exactly one character.") ."

"; @@ -1326,7 +1326,7 @@ function user_admin_perm($edit = array()) { unset($row); } - $output = table($header, $rows); + $output = theme("table", $header, $rows); $output .= form_submit(t("Save permissions")); return form($output); @@ -1378,7 +1378,7 @@ function user_admin_role($edit = array()) { } $rows[] = array("", ""); - $output = table($header, $rows); + $output = theme("table", $header, $rows); $output = form($output); } @@ -1506,7 +1506,7 @@ function user_admin_account() { if (!empty($pager)) { $rows[] = array(array("data" => $pager, "colspan" => 6)); } - return table($header, $rows); + return theme("table", $header, $rows); } function user_role_init() { diff --git a/modules/watchdog.module b/modules/watchdog.module index b6037f5f608..f97464a161d 100644 --- a/modules/watchdog.module +++ b/modules/watchdog.module @@ -105,7 +105,7 @@ function watchdog_overview($type) { if (!empty($pager)) { $rows[] = array(array("data" => $pager, "colspan" => "5")); } - return table($header, $rows); + return theme("table", $header, $rows); } function watchdog_view($id) { diff --git a/modules/watchdog/watchdog.module b/modules/watchdog/watchdog.module index b6037f5f608..f97464a161d 100644 --- a/modules/watchdog/watchdog.module +++ b/modules/watchdog/watchdog.module @@ -105,7 +105,7 @@ function watchdog_overview($type) { if (!empty($pager)) { $rows[] = array(array("data" => $pager, "colspan" => "5")); } - return table($header, $rows); + return theme("table", $header, $rows); } function watchdog_view($id) {