diff options
Diffstat (limited to 'modules')
-rw-r--r-- | modules/aggregator/aggregator.module | 23 | ||||
-rw-r--r-- | modules/block/block.module | 11 | ||||
-rw-r--r-- | modules/book/book.module | 17 | ||||
-rw-r--r-- | modules/color/color.module | 10 | ||||
-rw-r--r-- | modules/comment/comment.module | 47 | ||||
-rw-r--r-- | modules/drupal/drupal.module | 11 | ||||
-rw-r--r-- | modules/filter/filter.module | 20 | ||||
-rw-r--r-- | modules/forum/forum.module | 23 | ||||
-rw-r--r-- | modules/menu/menu.module | 2 | ||||
-rw-r--r-- | modules/node/node.module | 33 | ||||
-rw-r--r-- | modules/poll/poll.module | 17 | ||||
-rw-r--r-- | modules/profile/profile.module | 13 | ||||
-rw-r--r-- | modules/search/search.module | 20 | ||||
-rw-r--r-- | modules/system/system.module | 42 | ||||
-rw-r--r-- | modules/taxonomy/taxonomy.module | 15 | ||||
-rw-r--r-- | modules/upload/upload.module | 17 | ||||
-rw-r--r-- | modules/user/user.module | 32 | ||||
-rw-r--r-- | modules/watchdog/watchdog.module | 11 |
18 files changed, 355 insertions, 9 deletions
diff --git a/modules/aggregator/aggregator.module b/modules/aggregator/aggregator.module index 230810bd6..e4ce0cc1f 100644 --- a/modules/aggregator/aggregator.module +++ b/modules/aggregator/aggregator.module @@ -26,6 +26,29 @@ function aggregator_help($section) { } /** + * Implementation of hook_theme() + */ +function aggregator_theme() { + return array( + 'aggregator_page_list' => array( + 'arguments' => array('form' => NULL), + ), + 'aggregator_feed' => array( + 'arguments' => array('feed' => NULL), + ), + 'aggregator_block_item' => array( + 'arguments' => array('item' => NULL, 'feed' => 0), + ), + 'aggregator_summary_item' => array( + 'arguments' => array('item' => NULL), + ), + 'aggregator_page_item' => array( + 'arguments' => array('item' => NULL), + ), + + ); + +/** * Implementation of hook_menu(). */ function aggregator_menu() { diff --git a/modules/block/block.module b/modules/block/block.module index a8d795e37..916a8dc6d 100644 --- a/modules/block/block.module +++ b/modules/block/block.module @@ -49,6 +49,17 @@ function block_help($section) { } /** + * Implementation of hook_theme() + */ +function block_theme() { + return array( + 'block_admin_display' => array( + 'arguments' => array('form' => NULL), + ), + ); +} + +/** * Implementation of hook_perm(). */ function block_perm() { diff --git a/modules/book/book.module b/modules/book/book.module index 53c353ded..5437ee5a9 100644 --- a/modules/book/book.module +++ b/modules/book/book.module @@ -20,6 +20,23 @@ function book_node_info() { } /** + * Implementation of hook_theme() + */ +function book_theme() { + return array( + 'book_navigation' => array( + 'arguments' => array('node' => NULL), + ), + 'book_export_html' => array( + 'arguments' => array('title' => NULL, 'content' => NULL), + ), + 'book_admin_table' => array( + 'arguments' => array('form' => NULL), + ), + ); +} + +/** * Implementation of hook_perm(). */ function book_perm() { diff --git a/modules/color/color.module b/modules/color/color.module index 6bd3801dd..9aabcea4b 100644 --- a/modules/color/color.module +++ b/modules/color/color.module @@ -2,6 +2,16 @@ // $Id$ /** + * Implementation of hook_theme() + */ +function color_theme() { + return array( + 'color_scheme_form' => array( + 'arguments' => array('form' => NULL), + ), + ); +} +/** * Implementation of hook_form_alter(). */ function color_form_alter(&$form, $form_id) { diff --git a/modules/comment/comment.module b/modules/comment/comment.module index e3b0a4e51..f9604ec34 100644 --- a/modules/comment/comment.module +++ b/modules/comment/comment.module @@ -140,6 +140,53 @@ function comment_help($section) { } } +/** + * Implementation of hook_theme() + */ +function comment_theme() { + return array( + 'comment_block' => array( + 'arguments' => array(), + ), + 'comment_admin_overview' => array( + 'arguments' => array('form' => NULL), + ), + 'comment_preview' => array( + 'arguments' => array('comment' => NULL, 'links' => array(), 'visible' => 1), + ), + 'comment_view' => array( + 'arguments' => array('comment' => NULL, 'links' => array(), 'visible' => 1), + ), + 'comment_controls' => array( + 'arguments' => array('form' => NULL), + ), + 'comment' => array( + 'arguments' => array('comment' => NULL, 'links' => array()), + ), + 'comment_folded' => array( + 'arguments' => array('comment' => NULL), + ), + 'comment_flat_collapsed' => array( + 'arguments' => array('comment' => NULL), + ), + 'comment_flat_expanded' => array( + 'arguments' => array('comment' => NULL), + ), + 'comment_thread_collapsed' => array( + 'arguments' => array('comment' => NULL), + ), + 'comment_thread_expanded' => array( + 'arguments' => array('comment' => NULL), + ), + 'comment_post_forbidden' => array( + 'arguments' => array('nid' => NULL), + ), + 'comment_wrapper' => array( + 'arguments' => array('content' => NULL), + ), + ); +} + function _comment_view_access($node, $cid) { return $node && $cid; } diff --git a/modules/drupal/drupal.module b/modules/drupal/drupal.module index 2eb7570d0..acdc64584 100644 --- a/modules/drupal/drupal.module +++ b/modules/drupal/drupal.module @@ -46,6 +46,17 @@ print drupal_client_page(); } } +/** + * Implementation of hook_theme() + */ +function drupal_theme() { + return array( + 'client_list' => array( + 'arguments' => array('clients' => NULL), + ), + ); +} + function drupal_sites_registry_settings() { // Check if all required fields are present if ((variable_get('site_name', 'Drupal') == 'Drupal') || (variable_get('site_name', 'Drupal') == '')) { diff --git a/modules/filter/filter.module b/modules/filter/filter.module index 65ad16d45..620aa6c3e 100644 --- a/modules/filter/filter.module +++ b/modules/filter/filter.module @@ -48,6 +48,26 @@ function filter_help($section) { } /** + * Implementation of hook_theme() + */ +function filter_theme() { + return array( + 'filter_admin_overview' => array( + 'arguments' => array('form' => NULL), + ), + 'filter_admin_order' => array( + 'arguments' => array('form' => NULL), + ), + 'filter_tips' => array( + 'arguments' => array('tips' => NULL, 'long' => FALSE, 'extra' => ''), + ), + 'filter_tips_more_info' => array( + 'arguments' => array(), + ), + ); +} + +/** * Implementation of hook_menu(). */ function filter_menu() { diff --git a/modules/forum/forum.module b/modules/forum/forum.module index dcb2f9f85..10d69901a 100644 --- a/modules/forum/forum.module +++ b/modules/forum/forum.module @@ -29,6 +29,29 @@ function forum_help($section) { } /** + * Implementation of hook_theme() + */ +function forum_theme() { + return array( + 'forum_display' => array( + 'arguments' => array('forums' => NULL, 'topics' => NULL, 'parents' => NULL, 'tid' => NULL, 'sortby' => NULL, 'forum_per_page' => NULL), + ), + 'forum_list' => array( + 'arguments' => array('forums' => NULL, 'parents' => NULL, 'tid' => NULL), + ), + 'forum_topic_list' => array( + 'arguments' => array('tid' => NULL, 'topics' => NULL, 'sortby' => NULL, 'forum_per_page' => NULL), + ), + 'forum_icon' => array( + 'arguments' => array('new_posts' => NULL, 'num_posts' => 0, 'comment_mode' => 0, 'sticky' => 0), + ), + 'forum_topic_navigation' => array( + 'arguments' => array('node' => NULL), + ), + ); +} + +/** * Implementation of hook_menu(). */ function forum_menu() { diff --git a/modules/menu/menu.module b/modules/menu/menu.module index b5661b77c..951ac2e21 100644 --- a/modules/menu/menu.module +++ b/modules/menu/menu.module @@ -187,7 +187,7 @@ function menu_overview() { } return theme('table', $header, $rows); } - + /** * Menu callback; enable/disable a menu item. * diff --git a/modules/node/node.module b/modules/node/node.module index 19cb9b232..92443f605 100644 --- a/modules/node/node.module +++ b/modules/node/node.module @@ -46,6 +46,38 @@ function node_help($section) { } /** + * Implementation of hook_theme() + */ +function node_theme() { + return array( + 'node_list' => array( + 'arguments' => array('items' => NULL, 'title' => NULL), + ), + 'node_search_admin' => array( + 'arguments' => array('form' => NULL), + ), + 'node_filter_form' => array( + 'arguments' => array('form' => NULL), + ), + 'node_filters' => array( + 'arguments' => array('form' => NULL), + ), + 'node_admin_nodes' => array( + 'arguments' => array('form' => NULL), + ), + 'node_form' => array( + 'arguments' => array('form' => NULL), + ), + 'node_preview' => array( + 'arguments' => array('node' => NULL), + ), + 'node_log_message' => array( + 'arguments' => array('log' => NULL), + ), + ); +} + +/** * Implementation of hook_cron(). */ function node_cron() { @@ -2349,7 +2381,6 @@ function node_revisions() { * Menu callback; Generate a listing of promoted nodes. */ function node_page_default() { - $result = pager_query(db_rewrite_sql('SELECT n.nid, n.sticky, n.created FROM {node} n WHERE n.promote = 1 AND n.status = 1 ORDER BY n.sticky DESC, n.created DESC'), variable_get('default_nodes_main', 10)); if (db_num_rows($result)) { diff --git a/modules/poll/poll.module b/modules/poll/poll.module index 0033f7734..f1e457c4c 100644 --- a/modules/poll/poll.module +++ b/modules/poll/poll.module @@ -21,6 +21,23 @@ function poll_help($section) { } /** + * Implementation of hook_theme() + */ +function poll_theme() { + return array( + 'poll_view_voting' => array( + 'arguments' => array('form' => NULL), + ), + 'poll_results' => array( + 'arguments' => array('title' => NULL, 'results' => NULL, 'votes' => NULL, 'links' => NULL, 'block' => NULL, 'nid' => NULL, 'vote' => NULL), + ), + 'poll_bar' => array( + 'arguments' => array('title' => NULL, 'percentage' => NULL, 'votes' => NULL, 'block' => NULL), + ), + ); +} + +/** * Implementation of hook_access(). */ function poll_access($op, $node) { diff --git a/modules/profile/profile.module b/modules/profile/profile.module index c486dda05..fd2a8c6ac 100644 --- a/modules/profile/profile.module +++ b/modules/profile/profile.module @@ -52,6 +52,19 @@ function profile_help($section) { } /** + * Implementation of hook_theme() + */ +function profile_theme() { + return array( + 'profile_block' => array( + 'arguments' => array('account' => NULL, 'fields' => array()), + ), + 'profile_listing' => array( + 'arguments' => array('account' => NULL, 'fields' => array()), + ), ); +} + +/** * Implementation of hook_menu(). */ function profile_menu() { diff --git a/modules/search/search.module b/modules/search/search.module index 9f5419f78..67971dc70 100644 --- a/modules/search/search.module +++ b/modules/search/search.module @@ -112,6 +112,26 @@ function search_help($section) { } /** + * Implementation of hook_theme() + */ +function search_theme() { + return array( + 'search_theme_form' => array( + 'arguments' => array('form' => NULL), + ), + 'search_block_form' => array( + 'arguments' => array('form' => NULL), + ), + 'search_item' => array( + 'arguments' => array('item' => NULL, 'type' => NULL), + ), + 'search_page' => array( + 'arguments' => array('results' => NULL, 'type' => NULL), + ), + ); +} + +/** * Implementation of hook_perm(). */ function search_perm() { diff --git a/modules/system/system.module b/modules/system/system.module index 02fc04681..d4266b62f 100644 --- a/modules/system/system.module +++ b/modules/system/system.module @@ -48,6 +48,37 @@ function system_help($section) { } } +function system_theme() { + return array_merge(drupal_common_themes(), array( + 'system_theme_select_form' => array( + 'arguments' => array('form' => NULL), + ), + 'system_themes_form' => array( + 'arguments' => array('form' => NULL), + ), + 'system_modules' => array( + 'arguments' => array('form' => NULL), + ), + 'system_modules_uninstall' => array( + 'arguments' => array('form' => NULL), + ), + 'status_report' => array( + 'arguments' => array('requirements' => NULL), + ), + 'admin_page' => array( + 'arguments' => array('blocks' => NULL), + ), + 'admin_block' => array( + 'arguments' => array('block' => NULL), + ), + 'admin_block_content' => array( + 'arguments' => array('content' => NULL), + ), + 'system_admin_by_module' => array( + 'arguments' => array('menu_items' => NULL), + ), + )); +} /** * Implementation of hook_perm(). */ @@ -150,7 +181,7 @@ function system_menu() { 'title' => t('Themes'), 'description' => t('Change which theme your site uses or allows users to set.'), 'page callback' => 'drupal_get_form', - 'page arguments' => array('system_themes'), + 'page arguments' => array('system_themes_form'), ); $items['admin/build/themes/select'] = array( 'title' => t('List'), @@ -1137,13 +1168,13 @@ function system_settings_form_submit($form_id, $form_values) { drupal_set_message(t('The configuration options have been saved.')); } - menu_rebuild(); + drupal_rebuild_theme_registry(); } /** * Menu callback; displays a listing of all themes. */ -function system_themes() { +function system_themes_form() { drupal_clear_css_cache(); $themes = system_theme_data(); @@ -1177,7 +1208,7 @@ function system_themes() { return $form; } -function theme_system_themes($form) { +function theme_system_themes_form($form) { foreach (element_children($form) as $key) { $row = array(); if (isset($form[$key]['description']) && is_array($form[$key]['description'])) { @@ -1199,7 +1230,7 @@ function theme_system_themes($form) { } -function system_themes_submit($form_id, $form_values) { +function system_themes_form_submit($form_id, $form_values) { db_query("UPDATE {system} SET status = 0 WHERE type = 'theme'"); @@ -1513,6 +1544,7 @@ function system_modules_submit($form_id, $form_values) { } if ($old_module_list != $current_module_list) { + drupal_rebuild_theme_registry(); menu_rebuild(); node_types_rebuild(); drupal_set_message(t('The configuration options have been saved.')); diff --git a/modules/taxonomy/taxonomy.module b/modules/taxonomy/taxonomy.module index c1b7b10fe..a895f9734 100644 --- a/modules/taxonomy/taxonomy.module +++ b/modules/taxonomy/taxonomy.module @@ -14,6 +14,17 @@ function taxonomy_perm() { } /** + * Implementation of hook_theme() + */ +function taxonomy_theme() { + return array( + 'taxonomy_term_select' => array( + 'arguments' => array('element' => NULL), + ), + ); +} + +/** * Implementation of hook_link(). * * This hook is extended with $type = 'taxonomy terms' to allow themes to @@ -1516,7 +1527,7 @@ function taxonomy_explode_tags($tags) { $tags[] = $tag; } } - + return $tags; } @@ -1537,5 +1548,5 @@ function taxonomy_implode_tags($tags, $vid = NULL) { $typed_tags[] = $term->name; } } - return implode(', ', $typed_tags); + return implode(', ', $typed_tags); } diff --git a/modules/upload/upload.module b/modules/upload/upload.module index e61fe9bcd..46de72dc1 100644 --- a/modules/upload/upload.module +++ b/modules/upload/upload.module @@ -23,6 +23,23 @@ function upload_help($section) { } /** + * Implementation of hook_theme() + */ +function upload_theme() { + return array( + 'upload_attachments' => array( + 'arguments' => array('files' => NULL), + ), + 'upload_form_current' => array( + 'arguments' => array('form' => NULL), + ), + 'upload_form_new' => array( + 'arguments' => array('form' => NULL), + ), + ); +} + +/** * Implementation of hook_perm(). */ function upload_perm() { diff --git a/modules/user/user.module b/modules/user/user.module index 5bce664a9..c3dbc1842 100644 --- a/modules/user/user.module +++ b/modules/user/user.module @@ -24,6 +24,38 @@ function user_module_invoke($type, &$array, &$user, $category = NULL) { } } +/** + * Implementation of hook_theme() + */ +function user_theme() { + return array( + 'user_picture' => array( + 'arguments' => array('account' => NULL), + ), + 'user_profile' => array( + 'arguments' => array('account' => NULL, 'fields' => NULL), + ), + 'user_list' => array( + 'arguments' => array('users' => NULL, 'title' => NULL), + ), + 'user_admin_perm' => array( + 'arguments' => array('form' => NULL), + ), + 'user_admin_new_role' => array( + 'arguments' => array('form' => NULL), + ), + 'user_admin_account' => array( + 'arguments' => array('form' => NULL), + ), + 'user_filter_form' => array( + 'arguments' => array('form' => NULL), + ), + 'user_filters' => array( + 'arguments' => array('form' => NULL), + ), + ); +} + function user_external_load($authname) { $result = db_query("SELECT uid FROM {authmap} WHERE authname = '%s'", $authname); diff --git a/modules/watchdog/watchdog.module b/modules/watchdog/watchdog.module index b1f112b45..10f580f8a 100644 --- a/modules/watchdog/watchdog.module +++ b/modules/watchdog/watchdog.module @@ -28,6 +28,17 @@ function watchdog_help($section) { } /** + * Implementation of hook_theme() + */ +function watchdog_theme() { + return array( + 'watchdog_form_overview' => array( + 'arguments' => array('form' => NULL), + ), + ); +} + +/** * Implementation of hook_menu(). */ function watchdog_menu() { |