Index: views.info =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/views/views.info,v retrieving revision 1.7 diff -u -p -r1.7 views.info --- views.info 12 Aug 2007 06:52:14 -0000 1.7 +++ views.info 18 May 2009 15:54:58 -0000 @@ -2,4 +2,221 @@ name = Views description = Create customized lists and queries from your database. package = Views -core = 6.x +core = 7.x +files[] = views.module +; Handlers +files[] = handlers/views_handler_argument.inc +files[] = handlers/views_handler_argument_date.inc +files[] = handlers/views_handler_argument_formula.inc +files[] = handlers/views_handler_argument_many_to_one.inc +files[] = handlers/views_handler_argument_null.inc +files[] = handlers/views_handler_argument_numeric.inc +files[] = handlers/views_handler_argument_string.inc +files[] = handlers/views_handler_field.inc +files[] = handlers/views_handler_field_boolean.inc +files[] = handlers/views_handler_field_custom.inc +files[] = handlers/views_handler_field_date.inc +files[] = handlers/views_handler_field_markup.inc +files[] = handlers/views_handler_field_numeric.inc +files[] = handlers/views_handler_field_prerender_list.inc +files[] = handlers/views_handler_field_url.inc +files[] = handlers/views_handler_filter.inc +files[] = handlers/views_handler_filter_boolean_operator.inc +files[] = handlers/views_handler_filter_boolean_operator_string.inc +files[] = handlers/views_handler_filter_date.inc +files[] = handlers/views_handler_filter_equality.inc +files[] = handlers/views_handler_filter_in_operator.inc +files[] = handlers/views_handler_filter_many_to_one.inc +files[] = handlers/views_handler_filter_numeric.inc +files[] = handlers/views_handler_filter_string.inc +files[] = handlers/views_handler_relationship.inc +files[] = handlers/views_handler_sort.inc +files[] = handlers/views_handler_sort_date.inc +files[] = handlers/views_handler_sort_formula.inc +files[] = handlers/views_handler_sort_menu_hierarchy.inc +files[] = handlers/views_handler_sort_random.inc +; Includes +files[] = includes/admin.inc +files[] = includes/ajax.inc +files[] = includes/analyze.inc +files[] = includes/base.inc +files[] = includes/cache.inc +files[] = includes/convert.inc +files[] = includes/form.inc +files[] = includes/handlers.inc +files[] = includes/plugins.inc +files[] = includes/query.inc +files[] = includes/tabs.inc +files[] = includes/view.inc +; Modules +files[] = modules/aggregator.views.inc +files[] = modules/aggregator/views_handler_argument_aggregator_fid.inc +files[] = modules/aggregator/views_handler_field_aggregator_title_link.inc +files[] = modules/aggregator/views_plugin_row_aggregator_rss.inc +files[] = modules/book.views.inc +files[] = modules/comment.views.inc +files[] = modules/comment.views_convert.inc +files[] = modules/comment.views_default.inc +files[] = modules/comment/views_handler_argument_comment_user_uid.inc +files[] = modules/comment/views_handler_field_comment.inc +files[] = modules/comment/views_handler_field_comment_depth.inc +files[] = modules/comment/views_handler_field_comment_link.inc +files[] = modules/comment/views_handler_field_comment_link_delete.inc +files[] = modules/comment/views_handler_field_comment_link_edit.inc +files[] = modules/comment/views_handler_field_comment_link_reply.inc +files[] = modules/comment/views_handler_field_comment_username.inc +files[] = modules/comment/views_handler_field_ncs_last_comment_name.inc +files[] = modules/comment/views_handler_field_ncs_last_updated.inc +files[] = modules/comment/views_handler_field_node_comment.inc +files[] = modules/comment/views_handler_field_node_new_comments.inc +files[] = modules/comment/views_handler_filter_comment_user_uid.inc +files[] = modules/comment/views_handler_filter_ncs_last_updated.inc +files[] = modules/comment/views_handler_filter_node_comment.inc +files[] = modules/comment/views_handler_sort_comment_thread.inc +files[] = modules/comment/views_handler_sort_ncs_last_comment_name.inc +files[] = modules/comment/views_handler_sort_ncs_last_updated.inc +files[] = modules/comment/views_plugin_row_comment_rss.inc +files[] = modules/comment/views_plugin_row_comment_view.inc +files[] = modules/locale.views.inc +files[] = modules/locale/views_handler_argument_locale_group.inc +files[] = modules/locale/views_handler_argument_locale_language.inc +files[] = modules/locale/views_handler_field_locale_group.inc +files[] = modules/locale/views_handler_field_locale_language.inc +files[] = modules/locale/views_handler_field_locale_link_edit.inc +files[] = modules/locale/views_handler_filter_locale_group.inc +files[] = modules/locale/views_handler_filter_locale_language.inc +files[] = modules/locale/views_handler_filter_locale_version.inc +files[] = modules/node.views.inc +files[] = modules/node.views_convert.inc +files[] = modules/node.views_default.inc +files[] = modules/node/views_handler_argument_dates_various.inc +files[] = modules/node/views_handler_argument_node_language.inc +files[] = modules/node/views_handler_argument_node_nid.inc +files[] = modules/node/views_handler_argument_node_type.inc +files[] = modules/node/views_handler_argument_node_vid.inc +files[] = modules/node/views_handler_field_history_user_timestamp.inc +files[] = modules/node/views_handler_field_node.inc +files[] = modules/node/views_handler_field_node_link.inc +files[] = modules/node/views_handler_field_node_link_delete.inc +files[] = modules/node/views_handler_field_node_link_edit.inc +files[] = modules/node/views_handler_field_node_revision_link_delete.inc +files[] = modules/node/views_handler_field_node_revision_link_revert.inc +files[] = modules/node/views_handler_field_node_type.inc +files[] = modules/node/views_handler_filter_history_user_timestamp.inc +files[] = modules/node/views_handler_filter_node_status.inc +files[] = modules/node/views_handler_filter_node_type.inc +files[] = modules/node/views_plugin_argument_default_node.inc +files[] = modules/node/views_plugin_argument_validate_node.inc +files[] = modules/node/views_plugin_row_node_rss.inc +files[] = modules/node/views_plugin_row_node_view.inc +files[] = modules/poll.views.inc +files[] = modules/profile.views.inc +files[] = modules/profile/views_handler_field_profile_date.inc +files[] = modules/profile/views_handler_field_profile_list.inc +files[] = modules/profile/views_handler_filter_profile_selection.inc +files[] = modules/search.views.inc +files[] = modules/search.views_default.inc +files[] = modules/search/views_handler_field_search_score.inc +files[] = modules/search/views_handler_filter_search.inc +files[] = modules/search/views_handler_sort_search_score.inc +files[] = modules/search/views_plugin_row_search_view.inc +files[] = modules/statistics.views.inc +files[] = modules/statistics.views_default.inc +files[] = modules/statistics/views_handler_field_accesslog_path.inc +files[] = modules/system.views.inc +files[] = modules/system/views_handler_argument_file_fid.inc +files[] = modules/system/views_handler_field_file.inc +files[] = modules/system/views_handler_field_file_status.inc +files[] = modules/system/views_handler_filter_file_status.inc +files[] = modules/taxonomy.views.inc +files[] = modules/taxonomy.views_convert.inc +files[] = modules/taxonomy.views_default.inc +files[] = modules/taxonomy/views_handler_argument_taxonomy.inc +files[] = modules/taxonomy/views_handler_argument_term_node_tid.inc +files[] = modules/taxonomy/views_handler_argument_term_node_tid_depth.inc +files[] = modules/taxonomy/views_handler_argument_term_node_tid_depth_modifier.inc +files[] = modules/taxonomy/views_handler_argument_vocabulary_vid.inc +files[] = modules/taxonomy/views_handler_field_taxonomy.inc +files[] = modules/taxonomy/views_handler_field_term_node_tid.inc +files[] = modules/taxonomy/views_handler_filter_term_node_tid.inc +files[] = modules/taxonomy/views_handler_filter_vocabulary_vid.inc +files[] = modules/taxonomy/views_plugin_argument_validate_taxonomy_term.inc +files[] = modules/translation.views.inc +files[] = modules/translation/views_handler_argument_node_language.inc +files[] = modules/translation/views_handler_argument_node_tnid.inc +files[] = modules/translation/views_handler_field_node_language.inc +files[] = modules/translation/views_handler_field_node_translation_link.inc +files[] = modules/translation/views_handler_filter_node_language.inc +files[] = modules/translation/views_handler_filter_node_tnid.inc +files[] = modules/translation/views_handler_filter_node_tnid_child.inc +files[] = modules/translation/views_handler_relationship_translation.inc +files[] = modules/upload.views.inc +files[] = modules/upload.views_convert.inc +files[] = modules/upload/views_handler_field_upload_description.inc +files[] = modules/upload/views_handler_field_upload_fid.inc +files[] = modules/upload/views_handler_filter_upload_fid.inc +files[] = modules/user.views.inc +files[] = modules/user/views_handler_argument_user_uid.inc +files[] = modules/user/views_handler_argument_users_roles_rid.inc +files[] = modules/user/views_handler_field_user.inc +files[] = modules/user/views_handler_field_user_link.inc +files[] = modules/user/views_handler_field_user_link_delete.inc +files[] = modules/user/views_handler_field_user_link_edit.inc +files[] = modules/user/views_handler_field_user_mail.inc +files[] = modules/user/views_handler_field_user_name.inc +files[] = modules/user/views_handler_field_user_picture.inc +files[] = modules/user/views_handler_field_user_roles.inc +files[] = modules/user/views_handler_filter_user_current.inc +files[] = modules/user/views_handler_filter_user_name.inc +files[] = modules/user/views_handler_filter_user_roles.inc +files[] = modules/user/views_plugin_argument_default_current_user.inc +files[] = modules/user/views_plugin_argument_default_user.inc +files[] = modules/user/views_plugin_argument_validate_user.inc +files[] = modules/views.views.inc +; Plugins +files[] = plugins/views_plugin_access.inc +files[] = plugins/views_plugin_access_none.inc +files[] = plugins/views_plugin_access_perm.inc +files[] = plugins/views_plugin_access_role.inc +files[] = plugins/views_plugin_argument_default.inc +files[] = plugins/views_plugin_argument_default_php.inc +files[] = plugins/views_plugin_argument_validate.inc +files[] = plugins/views_plugin_argument_validate_numeric.inc +files[] = plugins/views_plugin_argument_validate_php.inc +files[] = plugins/views_plugin_display.inc +files[] = plugins/views_plugin_display_attachment.inc +files[] = plugins/views_plugin_display_block.inc +files[] = plugins/views_plugin_display_default.inc +files[] = plugins/views_plugin_display_feed.inc +files[] = plugins/views_plugin_display_page.inc +files[] = plugins/views_plugin_row.inc +files[] = plugins/views_plugin_row_fields.inc +files[] = plugins/views_plugin_style.inc +files[] = plugins/views_plugin_style_default.inc +files[] = plugins/views_plugin_style_grid.inc +files[] = plugins/views_plugin_style_list.inc +files[] = plugins/views_plugin_style_rss.inc +files[] = plugins/views_plugin_style_summary.inc +files[] = plugins/views_plugin_style_summary_unformatted.inc +files[] = plugins/views_plugin_style_table.inc +; Theme +files[] = theme/theme.inc +files[] = theme/views-exposed-form.tpl.php +files[] = theme/views-more.tpl.php +files[] = theme/views-ui-edit-item.tpl.php +files[] = theme/views-ui-edit-tab.tpl.php +files[] = theme/views-ui-edit-view.tpl.php +files[] = theme/views-ui-list-views.tpl.php +files[] = theme/views-view-field.tpl.php +files[] = theme/views-view-fields.tpl.php +files[] = theme/views-view-grid.tpl.php +files[] = theme/views-view-list.tpl.php +files[] = theme/views-view-row-comment.tpl.php +files[] = theme/views-view-row-node.tpl.php +files[] = theme/views-view-row-rss.tpl.php +files[] = theme/views-view-rss.tpl.php +files[] = theme/views-view-summary-unformatted.tpl.php +files[] = theme/views-view-summary.tpl.php +files[] = theme/views-view-table.tpl.php +files[] = theme/views-view-unformatted.tpl.php +files[] = theme/views-view.tpl.php Index: views.module =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/views/views.module,v retrieving revision 1.332 diff -u -p -r1.332 views.module --- views.module 8 Apr 2009 16:11:51 -0000 1.332 +++ views.module 18 May 2009 15:54:58 -0000 @@ -20,33 +20,40 @@ function views_api_version() { * Implementation of hook_theme(). Register views theming functions. */ function views_theme() { - $path = drupal_get_path('module', 'views'); - require_once "./$path/theme/theme.inc"; - - // Some quasi clever array merging here. - $base = array( - 'file' => 'theme.inc', - 'path' => "$path/theme", - ); - // Our extra version of pager from pager.inc - $hooks['views_mini_pager'] = $base + array( - 'arguments' => array('tags' => array(), 'limit' => 10, 'element' => 0, 'parameters' => array()), + $hooks['views_mini_pager'] = array( + 'arguments' => array( + 'tags' => array(), + 'limit' => 10, + 'element' => 0, + 'parameters' => array(), + ), 'pattern' => 'views_mini_pager__', ); $arguments = array( 'display' => array('view' => NULL), - 'style' => array('view' => NULL, 'options' => NULL, 'rows' => NULL, 'title' => NULL), - 'row' => array('view' => NULL, 'options' => NULL, 'row' => NULL, 'field_alias' => NULL), + 'style' => array( + 'view' => NULL, + 'options' => NULL, + 'rows' => NULL, + 'title' => NULL, + ), + 'row' => array( + 'view' => NULL, + 'options' => NULL, + 'row' => NULL, + 'field_alias' => NULL, + ), ); // Default view themes - $hooks['views_view_field'] = $base + array( + $hooks['views_view_field'] = array( 'pattern' => 'views_view_field__', 'arguments' => array('view' => NULL, 'field' => NULL, 'row' => NULL), ); + drupal_function_exists('views_fetch_plugin_data'); $plugins = views_fetch_plugin_data(); // Register theme functions for all style plugins @@ -55,17 +62,10 @@ function views_theme() { if (isset($def['theme'])) { $hooks[$def['theme']] = array( 'pattern' => $def['theme'] . '__', - 'file' => $def['theme file'], - 'path' => $def['theme path'], 'arguments' => $arguments[$type], ); - $include = './' . $def['theme path'] . '/' . $def['theme file']; - if (file_exists($include)) { - require_once $include; - } - - if (!function_exists('theme_' . $def['theme'])) { + if (!drupal_function_exists('theme_' . $def['theme'])) { $hooks[$def['theme']]['template'] = views_css_safe($def['theme']); } } @@ -78,12 +78,10 @@ function views_theme() { $hooks[$theme] = array( 'pattern' => $theme . '__', - 'file' => $def['theme file'], - 'path' => $def['theme path'], 'arguments' => $arguments[$theme_type], ); - if (!function_exists('theme_' . $theme)) { + if (!drupal_function_exists('theme_' . $theme)) { $hooks[$theme]['template'] = views_css_safe($theme); } } @@ -143,7 +141,16 @@ function views_preprocess_comment(&$vars * Implementation of hook_perm() */ function views_perm() { - return array('access all views', 'administer views'); + return array( + 'administer views' => array( + 'title' => t('Administer views'), + 'description' => t('Access the views administration pages.'), + ), + 'access all views' => array( + 'title' => t('Access all views'), + 'description' => t('Bypass access control when accessing views.'), + ), + ); } /** @@ -152,6 +159,7 @@ function views_perm() { function views_menu() { // Any event which causes a menu_rebuild could potentially mean that the // Views data is updated -- module changes, profile changes, etc. + drupal_function_exists('views_invalidate_cache'); views_invalidate_cache(); $items = array(); $items['views/ajax'] = array( @@ -180,6 +188,7 @@ function views_menu() { */ function views_menu_alter(&$callbacks) { $our_paths = array(); + drupal_function_exists('views_get_applicable_data'); $views = views_get_applicable_views('uses hook menu'); foreach ($views as $data) { list($view, $display_id) = $data; @@ -504,29 +513,6 @@ function &views_get_current_view() { // Include file helpers /** - * Include views .inc files as necessary. - */ -function views_include($file) { - static $used = array(); - if (!isset($used[$file])) { - require_once './' . drupal_get_path('module', 'views') . "/includes/$file.inc"; - } - - $used[$file] = TRUE; -} - -/** - * Load views files on behalf of modules. - */ -function views_module_include($file) { - foreach (views_get_module_apis() as $module => $info) { - if (file_exists("./$info[path]/$module.$file")) { - require_once "./$info[path]/$module.$file"; - } - } -} - -/** * Get a list of modules that support the current views API. */ function views_get_module_apis() { @@ -534,12 +520,8 @@ function views_get_module_apis() { if (!isset($cache)) { $cache = array(); foreach (module_implements('views_api') as $module) { - $function = $module . '_views_api'; - $info = $function(); + $info = module_invoke($module, 'views_api'); if (isset($info['api']) && $info['api'] == 2.000) { - if (!isset($info['path'])) { - $info['path'] = drupal_get_path('module', $module); - } $cache[$module] = $info; } } @@ -576,43 +558,6 @@ function views_add_js($file) { drupal_add_js(drupal_get_path('module', 'views') . "/js/$file.js"); } -/** - * Load views files on behalf of modules. - */ -function views_include_handlers() { - static $finished = FALSE; - // Ensure this only gets run once. - if ($finished) { - return; - } - - views_include('base'); - views_include('handlers'); - views_include('cache'); - views_include('plugins'); - _views_include_handlers(); - $finished = TRUE; -} - -/** - * Load default views files on behalf of modules. - */ -function views_include_default_views() { - static $finished = FALSE; - // Ensure this only gets run once. - if ($finished) { - return; - } - - // Default views hooks may be in the normal handler file, - // or in a separate views_default file at the discretion of - // the module author. - views_include_handlers(); - - _views_include_default_views(); - $finished = TRUE; -} - // ----------------------------------------------------------------------- // Views handler functions @@ -653,7 +598,7 @@ function views_get_handler($table, $fiel * Fetch Views' data from the cache */ function views_fetch_data($table = NULL) { - views_include('cache'); + drupal_function_exists('_views_fetch_data'); return _views_fetch_data($table); } @@ -1016,7 +961,7 @@ function views_exposed_form_submit(&$for * Build a list of theme function names for use most everywhere. */ function views_theme_functions($hook, $view, $display = NULL) { - require_once './' . drupal_get_path('module', 'views') . "/theme/theme.inc"; + drupal_function_exists('_views_theme_functions'); return _views_theme_functions($hook, $view, $display); } @@ -1033,7 +978,7 @@ function views_theme_functions($hook, $v * */ function drupal_build_form($form_id, &$form_state) { - views_include('form'); + drupal_function_exists('_drupal_build_form'); return _drupal_build_form($form_id, $form_state); } Index: views_ui.info =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/views/views_ui.info,v retrieving revision 1.10 diff -u -p -r1.10 views_ui.info --- views_ui.info 9 Jan 2008 00:05:08 -0000 1.10 +++ views_ui.info 18 May 2009 15:54:58 -0000 @@ -2,5 +2,6 @@ name = Views UI description = Administrative interface to views. Without this module, you cannot create or edit your views. package = Views -core = 6.x -dependencies[] = views +core = 7.x +files[] = views_ui.module +dependencies[] = views \ No newline at end of file Index: views_ui.module =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/views/views_ui.module,v retrieving revision 1.109 diff -u -p -r1.109 views_ui.module --- views_ui.module 30 Jan 2009 00:56:01 -0000 1.109 +++ views_ui.module 18 May 2009 15:54:59 -0000 @@ -15,13 +15,11 @@ function views_ui_menu() { $base = array( 'access callback' => 'user_access', 'access arguments' => array('administer views'), - 'file' => 'includes/admin.inc', ); $callback = $base + array('type' => MENU_CALLBACK); $convert = array('file' => 'includes/convert.inc') + $base; - $items['admin/build/views'] = $base + array( 'title' => 'Views', 'page callback' => 'views_ui_list_views', @@ -164,55 +162,43 @@ function views_ui_help($path, $arg = '') * Implementation of hook_theme() */ function views_ui_theme() { - $path = drupal_get_path('module', 'views'); - require_once "./$path/includes/admin.inc"; - return array( // edit a view 'views_ui_edit_view' => array( 'arguments' => array('view' => NULL), 'template' => 'views-ui-edit-view', - 'path' => "$path/theme", ), 'views_ui_edit_tab' => array( 'arguments' => array('view' => NULL, 'display' => NULL), 'template' => 'views-ui-edit-tab', - 'path' => "$path/theme", ), 'views_ui_edit_item' => array( 'arguments' => array('type' => NULL, 'view' => NULL, 'display' => NULL, 'no_fields' => FALSE), 'template' => 'views-ui-edit-item', - 'path' => "$path/theme", ), 'views_ui_rearrange_form' => array( 'arguments' => array('form' => NULL), - 'file' => 'includes/admin.inc', ), // list views 'views_ui_list_views' => array( 'template' => 'views-ui-list-views', - 'path' => "$path/theme", ), 'views_ui_list_views_form' => array( - 'file' => 'includes/admin.inc', 'arguments' => array('form' => NULL), ), // tab themes 'views_tabset' => array( 'arguments' => array('tabs' => NULL), - 'file' => 'includes/tabs.inc', ), 'views_tab' => array( 'arguments' => array('body' => NULL), - 'file' => 'includes/tabs.inc', ), // On behalf of a plugin 'views_ui_style_plugin_table' => array( 'arguments' => array('form' => NULL), - 'file' => 'includes/admin.inc', ), ); } @@ -222,8 +208,7 @@ function views_ui_theme() { * load it. */ function views_ui_cache_load($name) { - views_include('cache'); - views_include('view'); + drupal_function_exists('views_object_cache_get'); $view = views_object_cache_get('view', $name); if (empty($view)) { @@ -258,7 +243,6 @@ function views_ui_cache_set(&$view) { drupal_set_message(t('Changes cannot be made to a locked view.'), 'error'); return; } - views_include('cache'); $view->changed = TRUE; // let any future object know that this view has changed. // Unset handlers; we don't want to write these into the cache @@ -269,6 +253,8 @@ function views_ui_cache_set(&$view) { unset($view->display[$id]->handler); unset($view->display[$id]->default_display); } + + drupal_function_exists('views_object_cache_set'); views_object_cache_set('view', $view->name, $view); } Index: help/api.html =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/views/help/api.html,v retrieving revision 1.5 diff -u -p -r1.5 api.html --- help/api.html 31 Jan 2009 18:16:26 -0000 1.5 +++ help/api.html 18 May 2009 15:54:59 -0000 @@ -14,7 +14,7 @@ There are two similar files, MODULENAME.
api
This must appear; it should be the oldest API version that your module can work with. If Views is currently running an older version of the API, it will ignore your module's views integration. This is a good thing, as it will prevent code crashes, at the expense of your module's functionality disappearing.
-You may find the current Views API version by calling views_api_version() which is implemented at the top of views.module. This version numbering starts at 2.0. Every time changes are made to the Views handlers and plugins or other aspects of the Views API, the number will tick up (by either .001, .01 .1 or 1 depending upon how major the changes are). Note that views_api_version() was introduced in Views 2.0-rc2 and may not exist prior to that version. You may use function_exists() to test to see if this function is there. +You may find the current Views API version by calling views_api_version() which is implemented at the top of views.module. This version numbering starts at 2.0. Every time changes are made to the Views handlers and plugins or other aspects of the Views API, the number will tick up (by either .001, .01 .1 or 1 depending upon how major the changes are). Note that views_api_version() was introduced in Views 2.0-rc2 and may not exist prior to that version. You may use drupal_function_exists() to test to see if this function is there.
Often these versions are basically compatible with each other and Views won't care if your module implements 2.000, 2.001, 2.002, etc. Your module can request that it won't work with any version older than a given version, however. Views will determine, itself, if a newer version will work.
Index: includes/handlers.inc =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/views/includes/handlers.inc,v retrieving revision 1.109 diff -u -p -r1.109 handlers.inc --- includes/handlers.inc 10 Apr 2009 20:22:54 -0000 1.109 +++ includes/handlers.inc 18 May 2009 15:54:59 -0000 @@ -14,7 +14,8 @@ function _views_create_handler($definiti return; } - if (!class_exists($definition['handler']) && !views_include_handler($definition, $type)) { + // class_exists will automatically load the code file. + if (!class_exists($definition['handler'])) { return; } @@ -27,61 +28,6 @@ function _views_create_handler($definiti } /** - * Attempt to find the include file for a given handler from its definition. - * - * This will also attempt to include all parents, though we're maxing the - * parent chain to 10 to prevent infinite loops. - */ -function views_include_handler($definition, $type, $count = 0) { - // Do not proceed if the class already exists. - if (isset($definition['handler']) && class_exists($definition['handler'])) { - return TRUE; - } - - // simple infinite loop prevention. - if ($count > 10) { - vpr(t('Handler @handler include tried to loop infinitely!', array('@handler' => $definition['handler']))); - return FALSE; - } - - if (!isset($definition['path'])) { - if ($type == 'handler') { - $definition += views_fetch_handler_data($definition['handler']); - } - else { - $definition += views_fetch_plugin_data($type, $definition['handler']); - } - } - - if (!empty($definition['parent'])) { - if ($type == 'handler') { - $parent = views_fetch_handler_data($definition['parent']); - } - else { - $parent = views_fetch_plugin_data($type, $definition['parent']); - } - - if ($parent) { - $rc = views_include_handler($parent, $type, $count + 1); - // If the parent chain cannot be included, don't try; this will - // help alleviate problems with modules with cross dependencies. - if (!$rc) { - return FALSE; - } - } - } - - if (isset($definition['path']) && $definition['file']) { - $filename = './' . $definition['path'] . '/' . $definition['file']; - if (file_exists($filename)) { - require_once $filename; - } - } - - return class_exists($definition['handler']); -} - -/** * Prepare a handler's data by checking defaults and such. */ function _views_prepare_handler($definition, $data, $field) { Index: includes/plugins.inc =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/views/includes/plugins.inc,v retrieving revision 1.152 diff -u -p -r1.152 plugins.inc --- includes/plugins.inc 7 Jan 2009 23:31:12 -0000 1.152 +++ includes/plugins.inc 18 May 2009 15:54:59 -0000 @@ -12,7 +12,6 @@ function views_views_plugins() { $path = drupal_get_path('module', 'views') . '/js'; return array( - 'module' => 'views', // This just tells our themes are elsewhere. 'display' => array( 'parent' => array( // this isn't really a display but is necessary so the file can @@ -244,48 +243,24 @@ function views_views_plugins() { * @return Nested array of plugins, grouped by type. */ function views_discover_plugins() { - $cache = array('display' => array(), 'style' => array(), 'row' => array(), 'argument default' => array(), 'argument validator' => array(), 'access' => array()); + $cache = array( + 'display' => array(), + 'style' => array(), + 'row' => array(), + 'argument default' => array(), + 'argument validator' => array(), + 'access' => array() + ); + // Get plugins from all mdoules. foreach (module_implements('views_plugins') as $module) { - $function = $module . '_views_plugins'; - $result = $function(); + $result = module_invoke($module, 'views_plugins'; if (!is_array($result)) { continue; } - $module_dir = isset($result['module']) ? $result['module'] : $module; - // Setup automatic path/file finding for theme registration - if ($module_dir == 'views') { - $theme_path = drupal_get_path('module', $module_dir) . '/theme'; - $theme_file = 'theme.inc'; - $path = drupal_get_path('module', $module_dir) . '/plugins'; - } - else { - $theme_path = $path = drupal_get_path('module', $module_dir); - $theme_file = "$module.views.inc"; - } - foreach ($result as $type => $info) { - if ($type == 'module') { - continue; - } foreach ($info as $plugin => $def) { - $def['module'] = $module_dir; - if (!isset($def['theme path'])) { - $def['theme path'] = $theme_path; - } - if (!isset($def['theme file'])) { - $def['theme file'] = $theme_file; - } - if (!isset($def['path'])) { - $def['path'] = $path; - } - if (!isset($def['file'])) { - $def['file'] = $def['handler'] . '.inc'; - } - if (!isset($def['parent'])) { - $def['parent'] = 'parent'; - } // merge the new data in $cache[$type][$plugin] = $def; } Index: modules/aggregator.views.inc =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/views/modules/aggregator.views.inc,v retrieving revision 1.2 diff -u -p -r1.2 aggregator.views.inc --- modules/aggregator.views.inc 7 Apr 2009 23:07:31 -0000 1.2 +++ modules/aggregator.views.inc 18 May 2009 15:54:59 -0000 @@ -293,13 +293,11 @@ function aggregator_views_handlers() { */ function aggregator_views_plugins() { return array( - 'module' => 'views', // This just tells our themes are elsewhere. 'row' => array( 'aggregator_rss' => array( 'title' => t('Aggregator item'), 'help' => t('Display the aggregator item using the data from the original source.'), 'handler' => 'views_plugin_row_aggregator_rss', - 'path' => drupal_get_path('module', 'views') . '/modules/aggregator', // not necessary for most modules 'theme' => 'views_view_row_rss', 'base' => array('aggregator_item'), // only works with 'node' as base. 'uses options' => TRUE, Index: modules/comment.views.inc =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/views/modules/comment.views.inc,v retrieving revision 1.32 diff -u -p -r1.32 comment.views.inc --- modules/comment.views.inc 8 Apr 2009 06:38:41 -0000 1.32 +++ modules/comment.views.inc 18 May 2009 15:54:59 -0000 @@ -394,13 +394,11 @@ function comment_views_data_alter(&$data */ function comment_views_plugins() { return array( - 'module' => 'views', // This just tells views our themes are in Views. 'row' => array( 'comment' => array( 'title' => t('Comment'), 'help' => t('Display the comment with standard comment view.'), 'handler' => 'views_plugin_row_comment_view', - 'path' => drupal_get_path('module', 'views') . '/modules/comment', // not necessary for most modules 'theme' => 'views_view_row_comment', 'base' => array('comments'), // only works with 'comment' as base. 'uses options' => TRUE, @@ -411,7 +409,6 @@ function comment_views_plugins() { 'title' => t('Comment'), 'help' => t('Display the comment as RSS.'), 'handler' => 'views_plugin_row_comment_rss', - 'path' => drupal_get_path('module', 'views') . '/modules/comment', // not necessary for most modules 'theme' => 'views_view_row_rss', 'base' => array('comments'), // only works with 'comment' as base. 'type' => 'feed', Index: modules/node.views.inc =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/views/modules/node.views.inc,v retrieving revision 1.93 diff -u -p -r1.93 node.views.inc --- modules/node.views.inc 8 Apr 2009 20:54:57 -0000 1.93 +++ modules/node.views.inc 18 May 2009 15:55:00 -0000 @@ -614,13 +614,11 @@ function node_views_handlers() { */ function node_views_plugins() { return array( - 'module' => 'views', // This just tells our themes are elsewhere. 'row' => array( 'node' => array( 'title' => t('Node'), 'help' => t('Display the node with standard node view.'), 'handler' => 'views_plugin_row_node_view', - 'path' => drupal_get_path('module', 'views') . '/modules/node', // not necessary for most modules 'theme' => 'views_view_row_node', 'base' => array('node'), // only works with 'node' as base. 'uses options' => TRUE, @@ -631,7 +629,6 @@ function node_views_plugins() { 'title' => t('Node'), 'help' => t('Display the node with standard node view.'), 'handler' => 'views_plugin_row_node_rss', - 'path' => drupal_get_path('module', 'views') . '/modules/node', // not necessary for most modules 'theme' => 'views_view_row_rss', 'base' => array('node'), // only works with 'node' as base. 'uses options' => TRUE, @@ -643,14 +640,12 @@ function node_views_plugins() { 'node' => array( 'title' => t('Node'), 'handler' => 'views_plugin_argument_validate_node', - 'path' => drupal_get_path('module', 'views') . '/modules/node', // not necessary for most modules ), ), 'argument default' => array( 'node' => array( 'title' => t('Node ID from URL'), 'handler' => 'views_plugin_argument_default_node', - 'path' => drupal_get_path('module', 'views') . '/modules/node', // not necessary for most modules 'parent' => 'fixed', // so that the parent class is included ), ), Index: modules/search.views.inc =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/views/modules/search.views.inc,v retrieving revision 1.17 diff -u -p -r1.17 search.views.inc --- modules/search.views.inc 23 Feb 2009 23:30:38 -0000 1.17 +++ modules/search.views.inc 18 May 2009 15:55:00 -0000 @@ -161,13 +161,11 @@ function search_views_plugins() { return; // DISABLED. This currently doesn't work. return array( - 'module' => 'views', // This just tells our themes are elsewhere. 'row' => array( 'search' => array( 'title' => t('Search'), 'help' => t('Display the results with standard search view.'), 'handler' => 'views_plugin_row_search_view', - 'path' => drupal_get_path('module', 'views') . '/modules/search', // not necessary for most modules 'theme' => 'views_view_row_search', 'base' => array('node'), // only works with 'node' as base. 'type' => 'normal', Index: modules/taxonomy.views.inc =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/views/modules/taxonomy.views.inc,v retrieving revision 1.50 diff -u -p -r1.50 taxonomy.views.inc --- modules/taxonomy.views.inc 8 Jan 2009 00:36:02 -0000 1.50 +++ modules/taxonomy.views.inc 18 May 2009 15:55:00 -0000 @@ -370,12 +370,10 @@ function taxonomy_views_handlers() { */ function taxonomy_views_plugins() { return array( - 'module' => 'views', // This just tells our themes are elsewhere. 'argument validator' => array( 'taxonomy_term' => array( 'title' => t('Taxonomy term'), 'handler' => 'views_plugin_argument_validate_taxonomy_term', - 'path' => drupal_get_path('module', 'views') . '/modules/taxonomy', ), ), ); Index: modules/user.views.inc =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/views/modules/user.views.inc,v retrieving revision 1.56 diff -u -p -r1.56 user.views.inc --- modules/user.views.inc 6 Feb 2009 20:54:53 -0000 1.56 +++ modules/user.views.inc 18 May 2009 15:55:00 -0000 @@ -297,18 +297,15 @@ function user_views_data() { */ function user_views_plugins() { return array( - 'module' => 'views', // This just tells our themes are elsewhere. 'argument default' => array( 'user' => array( 'title' => t('User ID from URL'), 'handler' => 'views_plugin_argument_default_user', - 'path' => drupal_get_path('module', 'views') . '/modules/user', // not necessary for most modules 'parent' => 'fixed', // so that the parent class is included ), 'current_user' => array( 'title' => t('User ID from logged in user'), 'handler' => 'views_plugin_argument_default_current_user', - 'path' => drupal_get_path('module', 'views') . '/modules/user', // not necessary for most modules 'parent' => 'fixed', // so that the parent class is included ), ), @@ -316,7 +313,6 @@ function user_views_plugins() { 'user' => array( 'title' => t('User'), 'handler' => 'views_plugin_argument_validate_user', - 'path' => drupal_get_path('module', 'views') . '/modules/user', // not necessary for most modules ), ), ); Index: views_export/views_export.info =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/views/views_export/views_export.info,v retrieving revision 1.1 diff -u -p -r1.1 views_export.info --- views_export/views_export.info 12 Jun 2008 16:17:25 -0000 1.1 +++ views_export/views_export.info 18 May 2009 15:55:00 -0000 @@ -4,4 +4,5 @@ name = Views exporter description = Allows exporting multiple views at once. package = "Views" dependencies[] = views -core = 6.x +core = 7.x +files[] = views_export.module Index: views_export/views_export.module =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/views/views_export/views_export.module,v retrieving revision 1.4 diff -u -p -r1.4 views_export.module --- views_export/views_export.module 8 Apr 2009 16:11:51 -0000 1.4 +++ views_export/views_export.module 18 May 2009 15:55:00 -0000 @@ -41,7 +41,12 @@ function views_export_theme() { * Implementation of hook_perm(). */ function views_export_perm() { - return array('use views exporter'); + return array( + 'use views exporter' => array( + 'title' => t('Use Views exporter'), + 'description' => t('Use the Views exporter.'), + ), + ); } /**