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 16 Jun 2009 11:01:02 -0000 @@ -2,4 +2,220 @@ 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/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.338 diff -u -p -r1.338 views.module --- views.module 3 Jun 2009 00:01:00 -0000 1.338 +++ views.module 16 Jun 2009 11:01:02 -0000 @@ -20,29 +20,23 @@ 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", - ); + // Theme functions are discovered, but template paths must be specified. + $path = drupal_get_path('module', 'views') . '/theme'; // Our extra version of pager from pager.inc - $hooks['views_mini_pager'] = $base + 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), ); // 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), ); @@ -55,18 +64,12 @@ 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']); + $hooks[$def['theme']]['path'] = $path; } } if (isset($def['additional themes'])) { @@ -78,27 +81,28 @@ 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); + $hooks[$theme]['path'] = $path; } } } } } - $hooks['views_exposed_form'] = $base + array( + $hooks['views_exposed_form'] = array( 'template' => 'views-exposed-form', + 'path' => $path, 'pattern' => 'views_exposed_form__', 'arguments' => array('form' => NULL), ); - $hooks['views_more'] = $base + array( + $hooks['views_more'] = array( 'template' => 'views-more', + 'path' => $path, 'pattern' => 'views_more__', 'arguments' => array('more_url' => NULL, 'link_text' => 'more'), ); @@ -143,7 +147,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.'), + ), + ); } /** @@ -160,7 +173,6 @@ function views_menu() { 'access callback' => 'user_access', 'access arguments' => array('access content'), 'description' => 'Ajax callback for view loading.', - 'file' => 'includes/ajax.inc', 'type' => MENU_CALLBACK, ); // Path is not admin/build/views due to menu complications with the wildcards from @@ -169,7 +181,6 @@ function views_menu() { 'page callback' => 'views_ajax_autocomplete_user', 'access callback' => 'user_access', 'access arguments' => array('access content'), - 'file' => 'includes/ajax.inc', 'type' => MENU_CALLBACK, ); return $items; @@ -351,7 +362,7 @@ function views_block($op = 'list', $delt return $items; case 'view': - $start = views_microtime(); + $start = microtime(TRUE); // if this is 32, this should be an md5 hash. if (strlen($delta) == 32) { $hashes = variable_get('views_block_hashes', array()); @@ -383,7 +394,7 @@ function views_block($op = 'list', $delt if ($view = views_get_view($name)) { if ($view->access($display_id)) { $output = $view->execute_display($display_id); - vpr("Block $view->name execute time: " . (views_microtime() - $start) * 1000 . "ms"); + vpr("Block $view->name execute time: " . (microtime(TRUE) - $start) * 1000 . "ms"); $view->destroy(); return $output; } @@ -507,23 +518,7 @@ function &views_get_current_view() { * 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"; - } - } + module_load_include('inc', 'views', "includes/$file"); } /** @@ -534,12 +529,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; } } @@ -556,7 +547,7 @@ function views_add_css($file) { // and we don't want to generate duplicate cache files. // TODO: at some point investigate adding some files unconditionally and // allowing preprocess. - drupal_add_css(drupal_get_path('module', 'views') . "/css/$file.css", 'module', 'all', FALSE); + drupal_add_css(drupal_get_path('module', 'views') . "/css/$file.css", array('preprocess' => FALSE)); } /** @@ -576,43 +567,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 @@ -1054,35 +1008,18 @@ function views_exposed_form_cache($views * 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"; + require_once DRUPAL_ROOT . '/' . drupal_get_path('module', 'views') . "/theme/theme.inc"; return _views_theme_functions($hook, $view, $display); } /** - * Views' replacement for drupal_get_form so that we can do more with - * less. - * - * Items that can be set on the form_state include: - * - input: The source of input. If unset this will be $_POST. - * - no_redirect: Absolutely do not redirect the form even if instructed - * to do so. - * - rerender: If no_redirect is set and the form was successfully submitted, - * rerender the form. Otherwise it will just return. - * - */ -function drupal_build_form($form_id, &$form_state) { - views_include('form'); - return _drupal_build_form($form_id, $form_state); -} - -/** * Substitute current time; this works with cached queries. */ function views_views_query_substitutions($view) { global $language; return array( '***CURRENT_VERSION***' => VERSION, - '***CURRENT_TIME***' => time(), + '***CURRENT_TIME***' => REQUEST_TIME, '***CURRENT_LANGUAGE***' => $language->language, '***DEFAULT_LANGUAGE***' => language_default('language'), '***NO_LANGUAGE***' => '', @@ -1212,9 +1149,29 @@ function views_views_exportables($op = ' } /** - * Microtime helper function to return a float time value (php4 & php5 safe). + * Process callback to add dependency to form items. + * + * Usage: + * + * On any form item, add + * - @code '#process' => 'views_process_dependency' @endcode + * - @code '#dependency' => array('id-of-form-without-the-#' => array(list, of, values, that, make, this, gadget, visible)); @endcode */ -function views_microtime() { - list($usec, $sec) = explode(' ', microtime()); - return (float)$sec + (float)$usec; +function views_process_dependency($element, $edit, &$form_state, &$form) { + if (isset($element['#dependency'])) { + if (!isset($element['#dependency_count'])) { + $element['#dependency_count'] = 1; + } + if (!empty($form_state['ajax'])) { + $form_state['js settings']['viewsAjax']['formRelationships'][$element['#id']] = array('num' => $element['#dependency_count'], 'values' => $element['#dependency']); + } + else { + views_add_js('dependent'); + $options['viewsAjax']['formRelationships'][$element['#id']] = array('num' => $element['#dependency_count'], 'values' => $element['#dependency']); + drupal_add_js($options, 'setting'); + } + } + + return $element; } + 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 16 Jun 2009 11:01:02 -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 +core = 7.x dependencies[] = views +files[] = views_ui.module \ 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 16 Jun 2009 11:01:02 -0000 @@ -15,13 +15,12 @@ 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', @@ -165,7 +163,7 @@ function views_ui_help($path, $arg = '') */ function views_ui_theme() { $path = drupal_get_path('module', 'views'); - require_once "./$path/includes/admin.inc"; + require_once DRUPAL_ROOT . "/$path/includes/admin.inc"; return array( // edit a view @@ -186,7 +184,6 @@ function views_ui_theme() { ), 'views_ui_rearrange_form' => array( 'arguments' => array('form' => NULL), - 'file' => 'includes/admin.inc', ), // list views @@ -195,24 +192,20 @@ function views_ui_theme() { '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', ), ); } Index: handlers/views_handler_argument.inc =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/views/handlers/views_handler_argument.inc,v retrieving revision 1.8 diff -u -p -r1.8 views_handler_argument.inc --- handlers/views_handler_argument.inc 2 Jun 2009 19:38:33 -0000 1.8 +++ handlers/views_handler_argument.inc 16 Jun 2009 11:01:03 -0000 @@ -132,11 +132,11 @@ class views_handler_argument extends vie ); $form['clear_start'] = array( - '#value' => '
', + '#markup' => '
', ); $form['defaults_start'] = array( - '#value' => '
', + '#markup' => '
', ); $form['default_action'] = array( @@ -146,7 +146,7 @@ class views_handler_argument extends vie ); $form['defaults_stop'] = array( - '#value' => '
', + '#markup' => '
', ); $form['wildcard'] = array( @@ -169,7 +169,7 @@ class views_handler_argument extends vie ); $form['clear_stop'] = array( - '#value' => '
', + '#markup' => '
', ); $options = array(); @@ -188,7 +188,7 @@ class views_handler_argument extends vie $form['validate_options_div_prefix'] = array( '#id' => 'views-validator-options', - '#value' => '
' . t('Validator options') . '', + '#markup' => '
' . t('Validator options') . '', ); $form['validate_type'] = array( @@ -242,7 +242,7 @@ class views_handler_argument extends vie ); $form['validate_options_div_suffix'] = array( - '#value' => '
', + '#markup' => '
', ); } @@ -329,7 +329,7 @@ class views_handler_argument extends vie '#id' => 'edit-options-default-argument-type', '#title' => t('Default argument type'), '#default_value' => $this->options['default_argument_type'], - '#process' => array('expand_radios', 'views_process_dependency'), + '#process' => array('form_process_radios', 'views_process_dependency'), '#dependency' => array('radio:options[default_action]' => array('default')), ); @@ -346,7 +346,7 @@ class views_handler_argument extends vie } $form['default_options_div_suffix'] = array( - '#value' => '', + '#markup' => '', ); asort($options); @@ -512,7 +512,7 @@ class views_handler_argument extends vie if ($this->table_alias != $this->table) { $j = views_get_table_join($this->name_table, $this->table); if ($j) { - $join = drupal_clone($j); + $join = clone $j; $join->left_table = $this->table_alias; $this->name_table_alias = $this->query->add_table($this->name_table, $this->relationship, $join); } @@ -731,7 +731,7 @@ class views_handler_argument extends vie // Clone ourselves so that we don't break things when we're really // processing the arguments. - $argument = drupal_clone($this); + $argument = clone $this; if (!isset($arg) && $argument->has_default_argument()) { $arg = $argument->get_default_argument(); } @@ -758,8 +758,7 @@ class views_handler_argument_broken exte function query() { /* No query to run */ } function options_form(&$form, &$form_state) { $form['markup'] = array( - '#prefix' => '
', - '#value' => t('The handler for this item is broken or missing and cannot be used. If a module provided the handler and was disabled, re-enabling the module may restore it. Otherwise, you should probably delete this item.'), + '#markup' => '
' . t('The handler for this item is broken or missing and cannot be used. If a module provided the handler and was disabled, re-enabling the module may restore it. Otherwise, you should probably delete this item.') . '
', ); } Index: handlers/views_handler_argument_date.inc =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/views/handlers/views_handler_argument_date.inc,v retrieving revision 1.3 diff -u -p -r1.3 views_handler_argument_date.inc --- handlers/views_handler_argument_date.inc 24 Mar 2009 22:28:26 -0000 1.3 +++ handlers/views_handler_argument_date.inc 16 Jun 2009 11:01:03 -0000 @@ -36,7 +36,7 @@ class views_handler_argument_date extend */ function get_default_argument($raw = FALSE) { if (!$raw && $this->options['default_argument_type'] == 'date') { - return date($this->arg_format, time()); + return date($this->arg_format, REQUEST_TIME); } else if (!$raw) { foreach (range(1, 3) as $i) { Index: handlers/views_handler_field.inc =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/views/handlers/views_handler_field.inc,v retrieving revision 1.19 diff -u -p -r1.19 views_handler_field.inc --- handlers/views_handler_field.inc 3 Jun 2009 19:55:52 -0000 1.19 +++ handlers/views_handler_field.inc 16 Jun 2009 11:01:03 -0000 @@ -629,8 +629,7 @@ class views_handler_field_broken extends function query() { /* No query to run */ } function options_form(&$form, &$form_state) { $form['markup'] = array( - '#prefix' => '
', - '#value' => t('The handler for this item is broken or missing and cannot be used. If a module provided the handler and was disabled, re-enabling the module may restore it. Otherwise, you should probably delete this item.'), + '#markup' => '
' . t('The handler for this item is broken or missing and cannot be used. If a module provided the handler and was disabled, re-enabling the module may restore it. Otherwise, you should probably delete this item.') . '
', ); } Index: handlers/views_handler_field_date.inc =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/views/handlers/views_handler_field_date.inc,v retrieving revision 1.3 diff -u -p -r1.3 views_handler_field_date.inc --- handlers/views_handler_field_date.inc 2 Jun 2009 18:20:18 -0000 1.3 +++ handlers/views_handler_field_date.inc 16 Jun 2009 11:01:03 -0000 @@ -17,15 +17,14 @@ class views_handler_field_date extends v function options_form(&$form, &$form_state) { parent::options_form($form, $form_state); - $time = time(); $form['date_format'] = array( '#type' => 'select', '#title' => t('Date format'), '#options' => array( - 'small' => format_date($time, 'small'), - 'medium' => format_date($time, 'medium'), - 'large' => format_date($time, 'large'), + 'small' => format_date(REQUEST_TIME, 'small'), + 'medium' => format_date(REQUEST_TIME, 'medium'), + 'large' => format_date(REQUEST_TIME, 'large'), 'custom' => t('Custom'), 'raw time ago' => t('Time ago'), 'time ago' => t('Time ago (with "ago" appended)'), @@ -55,7 +54,7 @@ class views_handler_field_date extends v return theme('views_nodate'); } else { - $time_diff = time() - $value; // will be positive for a datetime in the past (ago), and negative for a datetime in the future (hence) + $time_diff = REQUEST_TIME - $value; // will be positive for a datetime in the past (ago), and negative for a datetime in the future (hence) switch ($format) { case 'raw time ago': return format_interval($time_diff, is_numeric($custom_format) ? $custom_format : 2); Index: handlers/views_handler_filter.inc =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/views/handlers/views_handler_filter.inc,v retrieving revision 1.9 diff -u -p -r1.9 views_handler_filter.inc --- handlers/views_handler_filter.inc 3 Jun 2009 00:05:05 -0000 1.9 +++ handlers/views_handler_filter.inc 16 Jun 2009 11:01:03 -0000 @@ -80,10 +80,10 @@ class views_handler_filter extends views if ($this->can_expose()) { $this->show_expose_button($form, $form_state); } - $form['op_val_start'] = array('#value' => '
'); + $form['op_val_start'] = array('#markup' => '
'); $this->show_operator_form($form, $form_state); $this->show_value_form($form, $form_state); - $form['op_val_end'] = array('#value' => '
'); + $form['op_val_end'] = array('#markup' => '
'); if ($this->can_expose()) { $this->show_expose_form($form, $form_state); } @@ -202,9 +202,7 @@ class views_handler_filter extends views '#submit' => array('views_ui_config_item_form_expose'), ); $form['expose_button']['markup'] = array( - '#prefix' => '
', - '#value' => t('This item is currently not exposed. If you expose it, users will be able to change the filter as they view it.'), - '#suffix' => '
', + '#markup' => '
' . t('This item is currently not exposed. If you expose it, users will be able to change the filter as they view it.') . '
', ); } else { @@ -214,9 +212,7 @@ class views_handler_filter extends views '#submit' => array('views_ui_config_item_form_expose'), ); $form['expose_button']['markup'] = array( - '#prefix' => '
', - '#value' => t('This item is currently exposed. If you hide it, users will not be able to change the filter as they view it.'), - '#suffix' => '
', + '#markup' => '
' . t('This item is currently exposed. If you hide it, users will not be able to change the filter as they view it.') . '
', ); } } @@ -259,23 +255,23 @@ class views_handler_filter extends views */ function expose_form(&$form, &$form_state) { $form['expose']['start_left'] = array( - '#value' => '
', + '#markup' => '
', ); $this->expose_form_left($form, $form_state); $form['expose']['end_left'] = array( - '#value' => '
', + '#markup' => '
', ); $form['expose']['start_checkboxes'] = array( - '#value' => '
', + '#markup' => '
', ); $this->expose_form_right($form, $form_state); $form['expose']['end_checkboxes'] = array( - '#value' => '
', + '#markup' => '
', ); } @@ -597,8 +593,7 @@ class views_handler_filter_broken extend function query() { /* No query to run */ } function options_form(&$form, &$form_state) { $form['markup'] = array( - '#prefix' => '
', - '#value' => t('The handler for this item is broken or missing and cannot be used. If a module provided the handler and was disabled, re-enabling the module may restore it. Otherwise, you should probably delete this item.'), + '#markup' => '
' . t('The handler for this item is broken or missing and cannot be used. If a module provided the handler and was disabled, re-enabling the module may restore it. Otherwise, you should probably delete this item.') . '
', ); } Index: handlers/views_handler_relationship.inc =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/views/handlers/views_handler_relationship.inc,v retrieving revision 1.3 diff -u -p -r1.3 views_handler_relationship.inc --- handlers/views_handler_relationship.inc 4 Jun 2009 20:09:26 -0000 1.3 +++ handlers/views_handler_relationship.inc 16 Jun 2009 11:01:04 -0000 @@ -137,8 +137,7 @@ class views_handler_relationship_broken function query() { /* No query to run */ } function options_form(&$form, &$form_state) { $form['markup'] = array( - '#prefix' => '
', - '#value' => t('The handler for this item is broken or missing and cannot be used. If a module provided the handler and was disabled, re-enabling the module may restore it. Otherwise, you should probably delete this item.'), + '#markup' => '
' . t('The handler for this item is broken or missing and cannot be used. If a module provided the handler and was disabled, re-enabling the module may restore it. Otherwise, you should probably delete this item.') . '
', ); } Index: handlers/views_handler_sort.inc =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/views/handlers/views_handler_sort.inc,v retrieving revision 1.1 diff -u -p -r1.1 views_handler_sort.inc --- handlers/views_handler_sort.inc 3 Sep 2008 19:21:28 -0000 1.1 +++ handlers/views_handler_sort.inc 16 Jun 2009 11:01:04 -0000 @@ -70,8 +70,7 @@ class views_handler_sort_broken extends function query() { /* No query to run */ } function options_form(&$form, &$form_state) { $form['markup'] = array( - '#prefix' => '
', - '#value' => t('The handler for this item is broken or missing and cannot be used. If a module provided the handler and was disabled, re-enabling the module may restore it. Otherwise, you should probably delete this item.'), + '#markup' => '
' . t('The handler for this item is broken or missing and cannot be used. If a module provided the handler and was disabled, re-enabling the module may restore it. Otherwise, you should probably delete this item.') . '
', ); } Index: help/api-handlers.html =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/views/help/api-handlers.html,v retrieving revision 1.4 diff -u -p -r1.4 api-handlers.html --- help/api-handlers.html 16 Sep 2008 19:26:26 -0000 1.4 +++ help/api-handlers.html 16 Jun 2009 11:01:04 -0000 @@ -52,15 +52,7 @@ class views_handler_filter_node_type ext Handlers are stored in their own files; for these files to be loaded by Views on demand, they must first be registered. Since Views core handlers are also loaded this way, it's imperative that your module also implement this pattern in order to prevent code crashes when your handler's parent class is not yet available. -To register handlers, you must implement hook_views_handlers(). This hook returns an array with two keys; the first key is info which contains the modulename (which is only necessary if you're registering handlers on behalf of another module, such as what Views does) and path, which is the search path to find the files. This path is only necessary if your files will not be stored in the same directory as the .module file. - -The other key is handlers which contains a full array of handlers and the information for each handler. The key to each handler array is the name of the handler class. It can contain: -
-
parent
-
The class that this handler extends. This is important to make sure that the parent class is included before your handler class. Without this, you may cause people's sites to crash in a difficult to recover state. Be sure you get this right!
-
file
-
The filename the handler is in. By default, this will be classname.inc -- however, you can have multiple similar handlers together in one file. However, because there is only one parent, please be sure that the parentage on these handlers matches! Otherwise you will run into whitescreens as not all parents will be loaded.
-
+To register handlers, you must implement hook_views_handlers(). This hook returns an array of handlers. Each element of the array is the name of a handler class. You can see examples of this function in any of the various module.views.inc files in the views modules directory. @@ -68,4 +60,4 @@ The best place to learn more about handl Please note that while all handler names in views are prefixed with views_, you should use your own module's name to prefix your handler names in order to ensure namespace safety. Note that the basic pattern for handler naming goes like this: -[module]_handler_[type]_[tablename]_[fieldname]. Sometimes table and fieldname are not appropriate, but something that resembles what the table/field would be can be used. \ No newline at end of file +[module]_handler_[type]_[tablename]_[fieldname]. Sometimes table and fieldname are not appropriate, but something that resembles what the table/field would be can be used. Index: help/api-plugins.html =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/views/help/api-plugins.html,v retrieving revision 1.7 diff -u -p -r1.7 api-plugins.html --- help/api-plugins.html 9 Jan 2009 16:47:07 -0000 1.7 +++ help/api-plugins.html 16 Jun 2009 11:01:04 -0000 @@ -58,14 +58,13 @@ Each plugin will be registered with an i ), -Of particular interest is the path directive, which works a little differently from handler registration; each plugin must define its own path, rather than relying on a global info for the paths. Also, there is an optional parent directive which is automatically filled in to be the base parent for the plugin type. Usually this is enough, but if your plugin derives from something other than the base, it must be filled in. For example: +Of particular interest is the path directive, which works a little differently from handler registration; each plugin must define its own path, rather than relying on a global info for the paths. For example: 'feed' => array( 'title' => t('Feed'), 'help' => t('Display the view as a feed, such as an RSS feed.'), 'handler' => 'views_plugin_display_feed', - 'parent' => 'page', // so it knows to load the page plugin .inc file 'uses hook menu' => TRUE, 'use ajax' => FALSE, 'use pager' => FALSE, @@ -75,6 +74,6 @@ Of particular interest is the path -Note that unlike handler registration, where parentage is referred to by object name, with plugins it is referred to by the unique plugin identifier. Please be sure to prefix your plugin identifiers with your module name to ensure namespace safety; after all, two different modules could try to implement the 'grid2' plugin, and that would cause one plugin to completely fail. +Please be sure to prefix your plugin identifiers with your module name to ensure namespace safety; after all, two different modules could try to implement the 'grid2' plugin, and that would cause one plugin to completely fail. ...TODO: Finish this document.... 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 16 Jun 2009 11:01:04 -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/admin.inc =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/views/includes/admin.inc,v retrieving revision 1.160 diff -u -p -r1.160 admin.inc --- includes/admin.inc 10 Jun 2009 22:01:31 -0000 1.160 +++ includes/admin.inc 16 Jun 2009 11:01:05 -0000 @@ -2889,7 +2889,7 @@ function views_fetch_fields($base, $type static $fields = array(); if (empty($fields)) { $data = views_fetch_data(); - $start = views_microtime(); + $start = microtime(TRUE); // This constructs this ginormous multi dimensional array to // collect the important data about fields. In the end, // the structure looks a bit like this (using nid as an example) @@ -2959,7 +2959,7 @@ function views_fetch_fields($base, $type } } } -// vsm('Views UI data build time: ' . (views_microtime() - $start) * 1000 . ' ms'); +// vsm('Views UI data build time: ' . (microtime(TRUE) - $start) * 1000 . ' ms'); } // If we have an array of base tables available, go through them Index: includes/cache.inc =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/views/includes/cache.inc,v retrieving revision 1.25 diff -u -p -r1.25 cache.inc --- includes/cache.inc 1 Jun 2009 23:33:37 -0000 1.25 +++ includes/cache.inc 16 Jun 2009 11:01:05 -0000 @@ -8,28 +8,13 @@ */ /** - * Load views files on behalf of modules. - */ -function _views_include_handlers() { - views_module_include('views.inc'); -} - -/** - * Load default views files on behalf of modules. - */ -function _views_include_default_views() { - views_module_include('views_default.inc'); -} - -/** * Fetch Views' data from the cache */ function _views_fetch_data($table = NULL) { static $cache = NULL; if (!isset($cache)) { - $start = views_microtime(); + $start = microtime(TRUE); // NOTE: This happens whether we retrieve them from cache or otherwise. - views_include_handlers(); $data = views_cache_get('views_data', TRUE); if (!empty($data->data)) { @@ -46,7 +31,7 @@ function _views_fetch_data($table = NULL views_cache_set('views_data', $cache, TRUE); } - vpr('Views data build time: ' . (views_microtime() - $start) * 1000 . ' ms'); + vpr('Views data build time: ' . (microtime(TRUE) - $start) * 1000 . ' ms'); } if (!$table) { @@ -66,12 +51,11 @@ function _views_fetch_data($table = NULL function _views_fetch_plugin_data($type = NULL, $plugin = NULL) { static $cache = NULL; if (!isset($cache)) { - $start = views_microtime(); - views_include_handlers(); - + $start = microtime(TRUE); + views_include('plugins');; $cache = views_discover_plugins(); - vpr('Views plugins build time: ' . (views_microtime() - $start) * 1000 . ' ms'); + vpr('Views plugins build time: ' . (microtime(TRUE) - $start) * 1000 . ' ms'); } if (!$type && !$plugin) { @@ -106,7 +90,6 @@ function _views_discover_default_views() $cache = $data->data; } else { - views_include_default_views(); $defaults = module_invoke_all('views_default_views'); $cache = array(); Index: includes/convert.inc =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/views/includes/convert.inc,v retrieving revision 1.15 diff -u -p -r1.15 convert.inc --- includes/convert.inc 2 Jun 2009 20:31:00 -0000 1.15 +++ includes/convert.inc 16 Jun 2009 11:01:06 -0000 @@ -122,9 +122,6 @@ function views_ui_delete1_confirm_submit * Convert a Views 1 view to a Views 2 view. */ function views1_import($imported) { - views_include_handlers(); - views_module_include('views_convert.inc'); - $view = views_new_view(); $view->name = $imported->name; Index: includes/handlers.inc =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/views/includes/handlers.inc,v retrieving revision 1.114 diff -u -p -r1.114 handlers.inc --- includes/handlers.inc 4 Jun 2009 20:20:45 -0000 1.114 +++ includes/handlers.inc 16 Jun 2009 11:01:06 -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) { @@ -107,11 +53,11 @@ function _views_prepare_handler($definit function views_fetch_handler_data($handler = NULL) { static $cache = NULL; if (!isset($cache)) { - $start = views_microtime(); + $start = microtime(TRUE); $cache = views_discover_handlers(); - vpr('Views handlers build time: ' . (views_microtime() - $start) * 1000 . ' ms'); + vpr('Views handlers build time: ' . (microtime(TRUE) - $start) * 1000 . ' ms'); } if (!$handler) { @@ -134,30 +80,16 @@ function views_discover_handlers() { $cache = array(); // Get handlers from all modules. foreach (module_implements('views_handlers') as $module) { - $function = $module . '_views_handlers'; - $result = $function(); + $result = module_invoke($module, 'views_handlers'); if (!is_array($result)) { continue; } - $module_dir = isset($result['info']['module']) ? $result['info']['module'] : $module; - $path = isset($result['info']['path']) ? $result['info']['path'] : drupal_get_path('module', $module_dir); - - foreach ($result['handlers'] as $handler => $def) { - if (!isset($def['module'])) { - $def['module'] = $module_dir; - } - if (!isset($def['path'])) { - $def['path'] = $path; - } - if (!isset($def['file'])) { - $def['file'] = "$handler.inc"; - } - if (!isset($def['handler'])) { - $def['handler'] = $handler; - } - // merge the new data in - $cache[$handler] = $def; + foreach ($result['handlers'] as $handler) { + $cache[$handler] = array( + 'module' => $module, + 'handler' => $handler, + ); } } return $cache; @@ -468,7 +400,7 @@ class views_handler extends views_object $join = views_get_table_join($this->table, $base_table); if ($join) { - return drupal_clone($join); + return clone $join; } } @@ -568,7 +500,7 @@ class views_many_to_one_helper { // Cycle through the joins. This isn't as error-safe as the normal // ensure_path logic. Perhaps it should be. - $r_join = drupal_clone($join); + $r_join = clone $join; while ($r_join->left_table != $base_table) { $r_join = views_get_table_join($r_join->left_table, $base_table); } @@ -1005,125 +937,50 @@ function views_date_sql_extract($extract */ function views_views_handlers() { return array( - 'info' => array( - 'path' => drupal_get_path('module', 'views') . '/handlers', - ), - 'handlers' => array( - // argument handlers - 'views_handler_argument' => array( - 'parent' => 'views_handler', - ), - 'views_handler_argument_numeric' => array( - 'parent' => 'views_handler_argument', - ), - 'views_handler_argument_formula' => array( - 'parent' => 'views_handler_argument', - ), - 'views_handler_argument_date' => array( - 'parent' => 'views_handler_argument_formula', - ), - 'views_handler_argument_string' => array( - 'parent' => 'views_handler_argument', - ), - 'views_handler_argument_many_to_one' => array( - 'parent' => 'views_handler_argument', - ), - 'views_handler_argument_null' => array( - 'parent' => 'views_handler_argument', - ), - - // field handlers - 'views_handler_field' => array( - 'parent' => 'views_handler', - ), - 'views_handler_field_date' => array( - 'parent' => 'views_handler_field', - ), - 'views_handler_field_boolean' => array( - 'parent' => 'views_handler_field', - ), - 'views_handler_field_markup' => array( - 'parent' => 'views_handler_field', - ), - 'views_handler_field_xss' => array( - 'parent' => 'views_handler_field', - 'file' => 'views_handler_field.inc', - ), - 'views_handler_field_url' => array( - 'parent' => 'views_handler_field', - ), - 'views_handler_field_file_size' => array( - 'parent' => 'views_handler_field', - 'file' => 'views_handler_field.inc', - ), - 'views_handler_field_prerender_list' => array( - 'parent' => 'views_handler_field', - ), - 'views_handler_field_numeric' => array( - 'parent' => 'views_handler_field', - ), - 'views_handler_field_custom' => array( - 'parent' => 'views_handler_field', - ), - 'views_handler_field_counter' => array( - 'parent' => 'views_handler_field', - ), - - // filter handlers - 'views_handler_filter' => array( - 'parent' => 'views_handler', - ), - 'views_handler_filter_equality' => array( - 'parent' => 'views_handler_filter', - ), - 'views_handler_filter_string' => array( - 'parent' => 'views_handler_filter', - ), - 'views_handler_filter_boolean_operator' => array( - 'parent' => 'views_handler_filter', - ), - 'views_handler_filter_boolean_operator_string' => array( - 'parent' => 'views_handler_filter_boolean_operator', - ), - 'views_handler_filter_in_operator' => array( - 'parent' => 'views_handler_filter', - ), - 'views_handler_filter_numeric' => array( - 'parent' => 'views_handler_filter', - ), - 'views_handler_filter_float' => array( - 'parent' => 'views_handler_filter_numeric', - ), - 'views_handler_filter_date' => array( - 'parent' => 'views_handler_filter_numeric', - ), - 'views_handler_filter_many_to_one' => array( - 'parent' => 'views_handler_filter_in_operator', - ), - - // relationship handlers - 'views_handler_relationship' => array( - 'parent' => 'views_handler', - ), - - - // sort handlers - 'views_handler_sort' => array( - 'parent' => 'views_handler', - ), - 'views_handler_sort_formula' => array( - 'parent' => 'views_handler_sort', - ), - 'views_handler_sort_date' => array( - 'parent' => 'views_handler_sort', - ), - 'views_handler_sort_menu_hierarchy' => array( - 'parent' => 'views_handler_sort', - ), - 'views_handler_sort_random' => array( - 'parent' => 'views_handler_sort', - ), - ), + // argument handlers + 'views_handler_argument', + 'views_handler_argument_numeric', + 'views_handler_argument_formula', + 'views_handler_argument_date', + 'views_handler_argument_string', + 'views_handler_argument_many_to_one', + 'views_handler_argument_null', + + // field handlers + 'views_handler_field', + 'views_handler_field_date', + 'views_handler_field_boolean', + 'views_handler_field_markup', + 'views_handler_field_xss', + 'views_handler_field_url', + 'views_handler_field_file_size', + 'views_handler_field_prerender_list', + 'views_handler_field_numeric', + 'views_handler_field_custom', + 'views_handler_field_counter', + + // filter handlers + 'views_handler_filter', + 'views_handler_filter_equality', + 'views_handler_filter_string', + 'views_handler_filter_boolean_operator', + 'views_handler_filter_boolean_operator_string', + 'views_handler_filter_in_operator', + 'views_handler_filter_numeric', + 'views_handler_filter_float', + 'views_handler_filter_date', + 'views_handler_filter_many_to_one', + + // relationship handlers + 'views_handler_relationship', + + + // sort handlers + 'views_handler_sort', + 'views_handler_sort_formula', + 'views_handler_sort_date', + 'views_handler_sort_menu_hierarchy', + 'views_handler_sort_random', ); } Index: includes/plugins.inc =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/views/includes/plugins.inc,v retrieving revision 1.154 diff -u -p -r1.154 plugins.inc --- includes/plugins.inc 2 Jun 2009 20:22:19 -0000 1.154 +++ includes/plugins.inc 16 Jun 2009 11:01:08 -0000 @@ -10,17 +10,11 @@ * Implementation of hook_views_plugins */ function views_views_plugins() { - $path = drupal_get_path('module', 'views') . '/js'; + $js_path = drupal_get_path('module', 'views') . '/js'; return array( - 'module' => 'views', // This just tells our themes are elsewhere. + // display, style, row, argument default, argument validator and access. 'display' => array( - 'parent' => array( - // this isn't really a display but is necessary so the file can - // be included. - 'no ui' => TRUE, - 'handler' => 'views_plugin_display', - 'parent' => '', - ), + // Default settings for all display plugins. 'default' => array( 'title' => t('Defaults'), 'help' => t('Default settings for this view.'), @@ -28,13 +22,13 @@ function views_views_plugins() { 'theme' => 'views_view', 'no ui' => TRUE, 'no remove' => TRUE, - 'js' => array('misc/collapse.js', 'misc/textarea.js', 'misc/tabledrag.js', 'misc/autocomplete.js', "$path/dependent.js"), + 'js' => array('misc/collapse.js', 'misc/textarea.js', 'misc/tabledrag.js', 'misc/autocomplete.js', "$js_path/dependent.js"), 'use ajax' => TRUE, 'use pager' => TRUE, 'use more' => TRUE, 'accept attachments' => TRUE, 'help topic' => 'display-default', ), 'page' => array( 'title' => t('Page'), 'help' => t('Display the view as a page, with a URL and menu links.'), @@ -68,11 +68,10 @@ function views_views_plugins() { 'use ajax' => TRUE, 'help topic' => 'display-attachment', ), 'feed' => array( 'title' => t('Feed'), 'help' => t('Display the view as a feed, such as an RSS feed.'), 'handler' => 'views_plugin_display_feed', - 'parent' => 'page', // so it knows to load the page plugin .inc file 'uses hook menu' => TRUE, 'use ajax' => FALSE, 'use pager' => FALSE, @@ -84,14 +84,8 @@ function views_views_plugins() { 'help topic' => 'display-feed', ), ), 'style' => array( - 'parent' => array( - // this isn't really a display but is necessary so the file can - // be included. - 'no ui' => TRUE, - 'handler' => 'views_plugin_style', - 'parent' => '', - ), + // Default settings for all style plugins. 'default' => array( 'title' => t('Unformatted'), 'help' => t('Displays rows one after another.'), @@ -140,16 +140,15 @@ function views_views_plugins() { 'uses options' => TRUE, 'help topic' => 'style-summary', ), 'unformatted_summary' => array( 'title' => t('Unformatted'), 'help' => t('Displays the summary unformatted, with option for one after another or inline.'), 'handler' => 'views_plugin_style_summary_unformatted', - 'parent' => 'default_summary', 'theme' => 'views_view_summary_unformatted', 'type' => 'summary', // only shows up as a summary style 'uses options' => TRUE, 'help topic' => 'style-summary-unformatted', ), 'rss' => array( 'title' => t('RSS Feed'), 'help' => t('Generates an RSS feed from a view.'), @@ -161,14 +161,7 @@ function views_views_plugins() { 'help topic' => 'style-rss', ), ), 'row' => array( - 'parent' => array( - // this isn't really a display but is necessary so the file can - // be included. - 'no ui' => TRUE, - 'handler' => 'views_plugin_row', - 'parent' => '', - ), 'fields' => array( 'title' => t('Fields'), 'help' => t('Displays the fields with an optional template.'), @@ -180,9 +180,7 @@ function views_views_plugins() { 'help topic' => 'style-row-fields', ), ), 'argument default' => array( - // This type of plugin does not conform to the standard and - // uses 'fixed' as the parent rather than having a separate parent. 'fixed' => array( 'title' => t('Fixed entry'), 'handler' => 'views_plugin_argument_default', @@ -190,15 +190,9 @@ function views_views_plugins() { 'php' => array( 'title' => t('PHP Code'), 'handler' => 'views_plugin_argument_default_php', - 'parent' => 'fixed', ), ), 'argument validator' => array( - 'parent' => array( - 'no ui' => TRUE, - 'handler' => 'views_plugin_argument_validate', - 'parent' => '', - ), 'php' => array( 'title' => t('PHP Code'), 'handler' => 'views_plugin_argument_validate_php', @@ -208,12 +208,7 @@ function views_views_plugins() { 'handler' => 'views_plugin_argument_validate_numeric', ), ), 'access' => array( - 'parent' => array( - 'no ui' => TRUE, - 'handler' => 'views_plugin_access', - 'parent' => '', - ), 'none' => array( 'title' => t('None'), 'help' => t('Will be available to all users.'), @@ -267,23 +254,12 @@ function views_discover_plugins() { $cache = array('display' => array(), 'style' => array(), 'row' => array(), 'argument default' => array(), 'argument validator' => array(), 'access' => array(), 'cache' => 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') { @@ -291,21 +267,6 @@ function views_discover_plugins() { } 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: includes/query.inc =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/views/includes/query.inc,v retrieving revision 1.45 diff -u -p -r1.45 query.inc --- includes/query.inc 2 Jun 2009 18:17:06 -0000 1.45 +++ includes/query.inc 16 Jun 2009 11:01:08 -0000 @@ -523,7 +523,7 @@ class views_query { // be the prior relationship. Unless it's a direct link. // Safety! Don't modify an original here. - $join = drupal_clone($join); + $join = clone $join; // Do we need to try to ensure a path? if ($join->left_table != $this->relationships[$relationship]['table'] && Index: includes/view.inc =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/views/includes/view.inc,v retrieving revision 1.159 diff -u -p -r1.159 view.inc --- includes/view.inc 4 Jun 2009 18:40:45 -0000 1.159 +++ includes/view.inc 16 Jun 2009 11:01:08 -0000 @@ -189,7 +189,7 @@ class view extends views_db_object { // has already been set; if it has, but $this->current_display is not // set, then something is dreadfully wrong. if (!empty($this->display[$id]->handler)) { - $this->display[$id] = drupal_clone($this->display[$id]); + $this->display[$id] = clone $this->display[$id]; unset($this->display[$id]->handler); } $this->display[$id]->handler = views_get_plugin('display', $this->display[$id]->display_plugin); @@ -551,7 +551,7 @@ class view extends views_db_object { // Attempt to load from cache. // @todo Load a build_info from cache. - $start = views_microtime(); + $start = microtime(TRUE); // If that fails, let's build! $this->build_info = array( 'query' => '', @@ -590,7 +590,7 @@ class view extends views_db_object { // Arguments can, in fact, cause this whole thing to abort. if (!$this->_build_arguments()) { - $this->build_time = views_microtime() - $start; + $this->build_time = microtime(TRUE) - $start; return $this->built; } @@ -634,7 +634,7 @@ class view extends views_db_object { $this->build_info['count_query'] = $this->query->query(TRUE); $this->build_info['query_args'] = $this->query->get_where_args(); $this->built = TRUE; - $this->build_time = views_microtime() - $start; + $this->build_time = microtime(TRUE) - $start; // Attach displays $this->attach_displays(); @@ -719,7 +719,7 @@ class view extends views_db_object { $external = TRUE; } - $start = views_microtime(); + $start = microtime(TRUE); if (!empty($this->pager['items_per_page'])) { // We no longer use pager_query() here because pager_query() does not // support an offset. This is fine as we don't actually need pager @@ -766,7 +766,7 @@ class view extends views_db_object { if (!empty($external)) { db_set_active(); } - $this->execute_time = views_microtime() - $start; + $this->execute_time = microtime(TRUE) - $start; } if ($cache) { $cache->cache_set('results'); @@ -787,7 +787,7 @@ class view extends views_db_object { return; } - $start = views_microtime(); + $start = microtime(TRUE); if (!empty($this->live_preview) && variable_get('views_show_additional_queries', FALSE)) { $this->start_query_capture(); } @@ -836,7 +836,7 @@ class view extends views_db_object { if (!empty($this->live_preview) && variable_get('views_show_additional_queries', FALSE)) { $this->end_query_capture(); } - $this->render_time = views_microtime() - $start; + $this->render_time = microtime(TRUE) - $start; return $this->display_handler->output; } @@ -1487,7 +1487,7 @@ class view extends views_db_object { // *were not cloned*. We must clone them ourselves. $displays = array(); foreach ($clone->display as $id => $display) { - $displays[$id] = drupal_clone($display); + $displays[$id] = clone $display; if (isset($displays[$id]->handler)) { unset($displays[$id]->handler); } Index: js/dependent.js =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/views/js/dependent.js,v retrieving revision 1.8 diff -u -p -r1.8 dependent.js --- js/dependent.js 2 Jun 2009 17:12:13 -0000 1.8 +++ js/dependent.js 16 Jun 2009 11:01:08 -0000 @@ -17,7 +17,7 @@ * - Checkboxes don't have their own id, so you need to add one in a div * around the checkboxes via #prefix and #suffix. You actually need to add TWO * divs because it's the parent that gets hidden. Also be sure to retain the - * 'expand_checkboxes' in the #process array, because the views process will + * 'form_process_checkboxes' in the #process array, because the views process will * override it. */ Index: modules/aggregator.views.inc =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/views/modules/aggregator.views.inc,v retrieving revision 1.3 diff -u -p -r1.3 aggregator.views.inc --- modules/aggregator.views.inc 2 Jun 2009 19:46:06 -0000 1.3 +++ modules/aggregator.views.inc 16 Jun 2009 11:01:08 -0000 @@ -330,31 +330,17 @@ function aggregator_views_data() { */ function aggregator_views_handlers() { return array( - 'info' => array( - 'path' => drupal_get_path('module', 'views') . '/modules/aggregator', - ), - 'handlers' => array( - // field handlers - 'views_handler_field_aggregator_title_link' => array( - 'parent' => 'views_handler_field', - ), - 'views_handler_field_aggregator_category' => array( - 'parent' => 'views_handler_field', - ), - // argument handlers - 'views_handler_argument_aggregator_fid' => array( - 'parent' => 'views_handler_argument_numeric', - ), - 'views_handler_argument_aggregator_category_cid' => array( - 'parent' => 'views_handler_argument_numeric', - ), + // field handlers + 'views_handler_field_aggregator_title_link', + 'views_handler_field_aggregator_category', - // filter handlers - 'views_handler_filter_aggregator_category_cid' => array( - 'parent' => 'views_handler_filter_in_operator', - ), - ), + // argument handlers + 'views_handler_argument_aggregator_fid', + 'views_handler_argument_aggregator_category_cid', + + // filter handlers + 'views_handler_filter_aggregator_category_cid', ); } @@ -364,13 +350,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 16 Jun 2009 11:01:08 -0000 @@ -154,7 +154,7 @@ function comment_views_data() { ), 'filter' => array( 'handler' => 'views_handler_filter_boolean_operator', - 'label' => t('Moderated'), + 'label' => t('Published'), 'type' => 'yes-no', ), 'sort' => array( @@ -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', @@ -427,74 +424,31 @@ function comment_views_plugins() { */ function comment_views_handlers() { return array( - 'info' => array( - 'path' => drupal_get_path('module', 'views') . '/modules/comment', - ), - 'handlers' => array( - 'views_handler_field_comment' => array( - 'parent' => 'views_handler_field', - ), - 'views_handler_field_comment_username' => array( - 'parent' => 'views_handler_field', - ), - 'views_handler_field_comment_depth' => array( - 'parent' => 'views_handler_field', - ), - 'views_handler_field_comment_link' => array( - 'parent' => 'views_handler_field', - ), - 'views_handler_field_comment_link_edit' => array( - 'parent' => 'views_handler_field_comment_link', - ), - 'views_handler_field_comment_link_delete' => array( - 'parent' => 'views_handler_field_comment_link', - ), - 'views_handler_field_comment_link_reply' => array( - 'parent' => 'views_handler_field_comment_link', - ), - 'views_handler_field_comment_node_link' => array( - 'parent' => 'views_handler_field', - ), - 'views_handler_field_ncs_last_comment_name' => array( - 'parent' => 'views_handler_field', - ), - 'views_handler_field_ncs_last_updated' => array( - 'parent' => 'views_handler_field_date', - ), - 'views_handler_field_node_new_comments' => array( - 'parent' => 'views_handler_field_numeric', - ), - 'views_handler_field_node_comment' => array( - 'parent' => 'views_handler_field', - ), - - // sort handlers - 'views_handler_sort_comment_thread' => array( - 'parent' => 'views_handler_sort', - ), - 'views_handler_sort_ncs_last_comment_name' => array( - 'parent' => 'views_handler_sort', - ), - 'views_handler_sort_ncs_last_updated' => array( - 'parent' => 'views_handler_sort_date', - ), + 'views_handler_field_comment', + 'views_handler_field_comment_username', + 'views_handler_field_comment_depth', + 'views_handler_field_comment_link', + 'views_handler_field_comment_link_edit', + 'views_handler_field_comment_link_delete', + 'views_handler_field_comment_link_reply', + 'views_handler_field_comment_node_link', + 'views_handler_field_ncs_last_comment_name', + 'views_handler_field_ncs_last_updated', + 'views_handler_field_node_new_comments', + 'views_handler_field_node_comment', + + // sort handlers + 'views_handler_sort_comment_thread', + 'views_handler_sort_ncs_last_comment_name', + 'views_handler_sort_ncs_last_updated', + + // filter handlers + 'views_handler_filter_ncs_last_updated', + 'views_handler_filter_node_comment', + 'views_handler_filter_comment_user_uid', - // filter handlers - 'views_handler_filter_ncs_last_updated' => array( - 'parent' => 'views_handler_filter_date', - ), - 'views_handler_filter_node_comment' => array( - 'parent' => 'views_handler_filter_in_operator', - ), - 'views_handler_filter_comment_user_uid' => array( - 'parent' => 'views_handler_filter_user_name', - ), - - // argument handlers - 'views_handler_argument_comment_user_uid' => array( - 'parent' => 'views_handler_argument', - ), - ), + // argument handlers + 'views_handler_argument_comment_user_uid', ); } Index: modules/comment.views_default.inc =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/views/modules/comment.views_default.inc,v retrieving revision 1.7 diff -u -p -r1.7 comment.views_default.inc --- modules/comment.views_default.inc 27 Jan 2009 20:24:09 -0000 1.7 +++ modules/comment.views_default.inc 16 Jun 2009 11:01:08 -0000 @@ -281,7 +281,7 @@ function comment_views_default_views() { 'table' => 'comments', 'field' => 'status', 'operator' => '=', - 'value' => 0, + 'value' => 1, 'group' => 0, 'exposed' => FALSE, 'expose' => array( Index: modules/locale.views.inc =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/views/modules/locale.views.inc,v retrieving revision 1.1 diff -u -p -r1.1 locale.views.inc --- modules/locale.views.inc 23 Feb 2009 22:20:04 -0000 1.1 +++ modules/locale.views.inc 16 Jun 2009 11:01:08 -0000 @@ -207,38 +207,19 @@ function locale_views_data() { */ function locale_views_handlers() { return array( - 'info' => array( - 'path' => drupal_get_path('module', 'views') . '/modules/locale', - ), - 'handlers' => array( - // Field handlers. - 'views_handler_field_locale_group' => array( - 'parent' => 'views_handler_field', - ), - 'views_handler_field_locale_language' => array( - 'parent' => 'views_handler_field', - ), - 'views_handler_field_locale_link_edit' => array( - 'parent' => 'views_handler_field', - ), - // Argument handlers. - 'views_handler_argument_locale_group' => array( - 'parent' => 'views_handler_argument', - ), - 'views_handler_argument_locale_language' => array( - 'parent' => 'views_handler_argument', - ), - // Filters. - 'views_handler_filter_locale_group' => array( - 'parent' => 'views_handler_filter_in_operator', - ), - 'views_handler_filter_locale_language' => array( - 'parent' => 'views_handler_filter_in_operator', - ), - 'views_handler_filter_locale_version' => array( - 'parent' => 'views_handler_filter_in_operator', - ), - ), + // Field handlers. + 'views_handler_field_locale_group', + 'views_handler_field_locale_language', + 'views_handler_field_locale_link_edit', + + // Argument handlers. + 'views_handler_argument_locale_group', + 'views_handler_argument_locale_language', + + // Filters. + 'views_handler_filter_locale_group', + 'views_handler_filter_locale_language', + 'views_handler_filter_locale_version', ); } Index: modules/node.views.inc =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/views/modules/node.views.inc,v retrieving revision 1.96 diff -u -p -r1.96 node.views.inc --- modules/node.views.inc 3 Jun 2009 02:16:48 -0000 1.96 +++ modules/node.views.inc 16 Jun 2009 11:01:08 -0000 @@ -64,7 +64,6 @@ function node_views_data() { // Information for accepting a nid as an argument 'argument' => array( 'handler' => 'views_handler_argument_node_nid', - 'parent' => 'views_handler_argument_numeric', // make sure parent is included 'name field' => 'title', // the field to display in the summary. 'numeric' => TRUE, 'validate type' => 'nid', @@ -446,13 +445,11 @@ function node_views_data() { 'help' => t('The revision ID of the node revision.'), // The help that appears on the UI, // Information for displaying the nid 'field' => array( -// 'handler' => 'views_handler_field', 'click sortable' => TRUE, ), // Information for accepting a nid as an argument 'argument' => array( 'handler' => 'views_handler_argument_node_vid', - 'parent' => 'views_handler_argument_numeric', // make sure parent is included 'click sortable' => TRUE, 'numeric' => TRUE, ), @@ -632,94 +629,33 @@ function node_views_data() { */ function node_views_handlers() { return array( - 'info' => array( - 'path' => drupal_get_path('module', 'views') . '/modules/node', - ), - 'handlers' => array( - // field handlers - 'views_handler_field_node' => array( - 'parent' => 'views_handler_field', - ), - 'views_handler_field_node_type' => array( - 'parent' => 'views_handler_field_node', - ), - 'views_handler_field_node_link' => array( - 'parent' => 'views_handler_field', - ), - 'views_handler_field_node_type' => array( - 'parent' => 'views_handler_field_node', - ), - 'views_handler_field_node_link_edit' => array( - 'parent' => 'views_handler_field_node_link', - ), - 'views_handler_field_node_link_delete' => array( - 'parent' => 'views_handler_field_node_link', - ), - 'views_handler_field_node_revision_link_revert' => array( - 'parent' => 'views_handler_field_node_link', - ), - 'views_handler_field_node_revision_link_delete' => array( - 'parent' => 'views_handler_field_node_link', - ), - 'views_handler_field_history_user_timestamp' => array( - 'parent' => 'views_handler_field_node', - ), - - // argument handlers - 'views_handler_argument_node_type' => array( - 'parent' => 'views_handler_argument', - ), - 'views_handler_argument_node_nid' => array( - 'parent' => 'views_handler_argument_numeric', - ), - 'views_handler_argument_node_vid' => array( - 'parent' => 'views_handler_argument_numeric', - ), - 'views_handler_argument_node_created_fulldate' => array( - // put several handlers in the same file - 'file' => 'views_handler_argument_dates_various.inc', - 'parent' => 'views_handler_argument_date', - ), - 'views_handler_argument_node_created_year' => array( - // put several handlers in the same file - 'file' => 'views_handler_argument_dates_various.inc', - 'parent' => 'views_handler_argument_date', - ), - 'views_handler_argument_node_created_year_month' => array( - // put several handlers in the same file - 'file' => 'views_handler_argument_dates_various.inc', - 'parent' => 'views_handler_argument_date', - ), - 'views_handler_argument_node_created_month' => array( - // put several handlers in the same file - 'file' => 'views_handler_argument_dates_various.inc', - 'parent' => 'views_handler_argument_date', - ), - 'views_handler_argument_node_created_day' => array( - // put several handlers in the same file - 'file' => 'views_handler_argument_dates_various.inc', - 'parent' => 'views_handler_argument_date', - ), - 'views_handler_argument_node_created_week' => array( - // put several handlers in the same file - 'file' => 'views_handler_argument_dates_various.inc', - 'parent' => 'views_handler_argument_date', - ), - - // filters - 'views_handler_filter_node_type' => array( - 'parent' => 'views_handler_filter_in_operator', - ), - 'views_handler_filter_history_user_timestamp' => array( - 'parent' => 'views_handler_filter', - ), - 'views_handler_filter_node_status' => array( - 'parent' => 'views_handler_filter', - ), - 'views_handler_filter_node_access' => array( - 'parent' => 'views_handler_filter', - ), - ), + // field handlers + 'views_handler_field_node', + 'views_handler_field_node_type', + 'views_handler_field_node_link', + 'views_handler_field_node_type', + 'views_handler_field_node_link_edit', + 'views_handler_field_node_link_delete', + 'views_handler_field_node_revision_link_revert', + 'views_handler_field_node_revision_link_delete', + 'views_handler_field_history_user_timestamp', + + // argument handlers + 'views_handler_argument_node_type', + 'views_handler_argument_node_nid', + 'views_handler_argument_node_vid', + 'views_handler_argument_node_created_fulldate', + 'views_handler_argument_node_created_year', + 'views_handler_argument_node_created_year_month', + 'views_handler_argument_node_created_month', + 'views_handler_argument_node_created_day', + 'views_handler_argument_node_created_week', + + // filters + 'views_handler_filter_node_type', + 'views_handler_filter_history_user_timestamp', + 'views_handler_filter_node_status', + 'views_handler_filter_node_access', ); } @@ -728,13 +664,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, @@ -745,7 +679,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, @@ -757,15 +690,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 + 'handler' => 'views_plugin_argument_default_node' ), ), ); Index: modules/profile.views.inc =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/views/modules/profile.views.inc,v retrieving revision 1.9 diff -u -p -r1.9 profile.views.inc --- modules/profile.views.inc 24 Sep 2008 21:21:21 -0000 1.9 +++ modules/profile.views.inc 16 Jun 2009 11:01:08 -0000 @@ -223,20 +223,9 @@ function profile_views_fetch_field($fiel */ function profile_views_handlers() { return array( - 'info' => array( - 'path' => drupal_get_path('module', 'views') . '/modules/profile', - ), - 'handlers' => array( - 'views_handler_field_profile_date' => array( - 'parent' => 'views_handler_field_date', - ), - 'views_handler_field_profile_list' => array( - 'parent' => 'views_handler_field_prerender_list', - ), - 'views_handler_filter_profile_selection' => array( - 'parent' => 'views_handler_filter_in_operator', - ), - ), + 'views_handler_field_profile_date', + 'views_handler_field_profile_list', + 'views_handler_filter_profile_selection', ); } 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 16 Jun 2009 11:01:08 -0000 @@ -137,20 +137,9 @@ function search_views_data() { */ function search_views_handlers() { return array( - 'info' => array( - 'path' => drupal_get_path('module', 'views') . '/modules/search', - ), - 'handlers' => array( - 'views_handler_field_search_score' => array( - 'parent' => 'views_handler_field_numeric', - ), - 'views_handler_sort_search_score' => array( - 'parent' => 'views_handler_sort', - ), - 'views_handler_filter_search' => array( - 'parent' => 'views_handler_filter', - ), - ), + 'views_handler_field_search_score', + 'views_handler_sort_search_score', + 'views_handler_filter_search', ); } @@ -161,13 +150,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/statistics.views.inc =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/views/modules/statistics.views.inc,v retrieving revision 1.9 diff -u -p -r1.9 statistics.views.inc --- modules/statistics.views.inc 28 Oct 2008 20:21:37 -0000 1.9 +++ modules/statistics.views.inc 16 Jun 2009 11:01:09 -0000 @@ -251,16 +251,7 @@ function statistics_views_data() { * views uses. */ function statistics_views_handlers() { - return array( - 'info' => array( - 'path' => drupal_get_path('module', 'views') . '/modules/statistics', - ), - 'handlers' => array( - 'views_handler_field_accesslog_path' => array( - 'parent' => 'views_handler_field', - ), - ), - ); + return array('views_handler_field_accesslog_path'); } /** Index: modules/system.views.inc =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/views/modules/system.views.inc,v retrieving revision 1.7 diff -u -p -r1.7 system.views.inc --- modules/system.views.inc 3 Sep 2008 19:21:29 -0000 1.7 +++ modules/system.views.inc 16 Jun 2009 11:01:09 -0000 @@ -179,23 +179,10 @@ function system_views_data() { */ function system_views_handlers() { return array( - 'info' => array( - 'path' => drupal_get_path('module', 'views') . '/modules/system', - ), - 'handlers' => array( - 'views_handler_field_file' => array( - 'parent' => 'views_handler_field', - ), - 'views_handler_field_file_status' => array( - 'parent' => 'views_handler_field', - ), - 'views_handler_filter_file_status' => array( - 'parent' => 'views_handler_filter_in_operator', - ), - 'views_handler_argument_file_fid' => array( - 'parent' => 'views_handler_argument', - ), - ), + 'views_handler_field_file', + 'views_handler_field_file_status', + 'views_handler_filter_file_status', + 'views_handler_argument_file_fid', ); } Index: modules/taxonomy.views.inc =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/views/modules/taxonomy.views.inc,v retrieving revision 1.54 diff -u -p -r1.54 taxonomy.views.inc --- modules/taxonomy.views.inc 5 Jun 2009 01:26:35 -0000 1.54 +++ modules/taxonomy.views.inc 16 Jun 2009 11:01:09 -0000 @@ -338,41 +338,15 @@ function taxonomy_views_data_alter(&$dat */ function taxonomy_views_handlers() { return array( - 'info' => array( - 'path' => drupal_get_path('module', 'views') . '/modules/taxonomy', - ), - 'handlers' => array( - 'views_handler_argument_term_node_tid_depth' => array( - 'parent' => 'views_handler_argument', - ), - 'views_handler_argument_term_node_tid_depth_modifier' => array( - 'parent' => 'views_handler_argument', - ), - 'views_handler_argument_taxonomy' => array( - 'parent' => 'views_handler_argument', - ), - 'views_handler_argument_vocabulary_vid' => array( - 'parent' => 'views_handler_argument', - ), - 'views_handler_argument_term_node_tid' => array( - 'parent' => 'views_handler_argument_many_to_one', - ), - 'views_handler_field_term_node_tid' => array( - 'parent' => 'views_handler_field_prerender_list', - ), - 'views_handler_field_taxonomy' => array( - 'parent' => 'views_handler_field', - ), - 'views_handler_filter_vocabulary_vid' => array( - 'parent' => 'views_handler_filter_in_operator', - ), - 'views_handler_filter_term_node_tid' => array( - 'parent' => 'views_handler_filter_many_to_one', - ), - 'views_handler_filter_term_node_tid_depth' => array( - 'parent' => 'views_handler_filter_term_node_tid', - ), - ), + 'views_handler_argument_term_node_tid_depth_modifier', + 'views_handler_argument_taxonomy', + 'views_handler_argument_vocabulary_vid', + 'views_handler_argument_term_node_tid', + 'views_handler_field_term_node_tid', + 'views_handler_field_taxonomy', + 'views_handler_filter_vocabulary_vid', + 'views_handler_filter_term_node_tid', + 'views_handler_filter_term_node_tid_depth', ); } @@ -381,12 +355,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/translation.views.inc =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/views/modules/translation.views.inc,v retrieving revision 1.8 diff -u -p -r1.8 translation.views.inc --- modules/translation.views.inc 7 Jan 2009 23:13:46 -0000 1.8 +++ modules/translation.views.inc 16 Jun 2009 11:01:09 -0000 @@ -57,7 +57,6 @@ function translation_views_data_alter(&$ ), 'argument' => array( 'handler' => 'views_handler_argument_node_tnid', - 'parent' => 'views_handler_argument_numeric', // make sure parent is included 'name field' => 'title', // the field to display in the summary. 'numeric' => TRUE, 'validate type' => 'tnid', @@ -139,36 +138,20 @@ function translation_views_data_alter(&$ */ function translation_views_handlers() { return array( - 'info' => array( - 'path' => drupal_get_path('module', 'views') . '/modules/translation', - ), - 'handlers' => array( - // field handlers - 'views_handler_field_node_language' => array( - 'parent' => 'views_handler_field_node', - ), - // argument handlers - 'views_handler_argument_node_language' => array( - 'parent' => 'views_handler_argument', - ), - 'views_handler_argument_node_tnid' => array( - 'parent' => 'views_handler_argument', - ), - // filters - 'views_handler_filter_node_language' => array( - 'parent' => 'views_handler_filter_in_operator', - ), - 'views_handler_filter_node_tnid' => array( - 'parent' => 'views_handler_filter', - ), - // relationships - 'views_handler_relationship_translation' => array( - 'parent' => 'views_handler_relationship', - ), - 'views_handler_filter_node_tnid_child' => array( - 'parent' => 'views_handler_filter', - ), + // field handlers + 'views_handler_field_node_language', + // argument handlers + 'views_handler_argument_node_language', + 'views_handler_argument_node_tnid', + + // filters + 'views_handler_filter_node_language', + 'views_handler_filter_node_tnid', + + // relationships + 'views_handler_relationship_translation', + 'views_handler_filter_node_tnid_child', ), ); } Index: modules/upload.views.inc =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/views/modules/upload.views.inc,v retrieving revision 1.15 diff -u -p -r1.15 upload.views.inc --- modules/upload.views.inc 24 Nov 2008 19:58:31 -0000 1.15 +++ modules/upload.views.inc 16 Jun 2009 11:01:09 -0000 @@ -142,20 +142,9 @@ function upload_views_data_alter(&$data) */ function upload_views_handlers() { return array( - 'info' => array( - 'path' => drupal_get_path('module', 'views') . '/modules/upload', - ), - 'handlers' => array( - 'views_handler_field_upload_fid' => array( - 'parent' => 'views_handler_field_prerender_list', - ), - 'views_handler_field_upload_description' => array( - 'parent' => 'views_handler_field_prerender_list', - ), - 'views_handler_filter_upload_fid' => array( - 'parent' => 'views_handler_filter_boolean_operator', - ), - ), + 'views_handler_field_upload_fid', + 'views_handler_field_upload_description', + 'views_handler_filter_upload_fid', ); } Index: modules/user.views.inc =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/views/modules/user.views.inc,v retrieving revision 1.57 diff -u -p -r1.57 user.views.inc --- modules/user.views.inc 2 Jun 2009 20:18:26 -0000 1.57 +++ modules/user.views.inc 16 Jun 2009 11:01:09 -0000 @@ -313,26 +313,20 @@ 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 ), ), 'argument validator' => array( 'user' => array( 'title' => t('User'), 'handler' => 'views_plugin_argument_validate_user', - 'path' => drupal_get_path('module', 'views') . '/modules/user', // not necessary for most modules ), ), ); @@ -344,53 +338,20 @@ function user_views_plugins() { */ function user_views_handlers() { return array( - 'info' => array( - 'path' => drupal_get_path('module', 'views') . '/modules/user', - ), - 'handlers' => array( - 'views_handler_argument_user_uid' => array( - 'parent' => 'views_handler_argument_numeric', - ), - 'views_handler_field_user' => array( - 'parent' => 'views_handler_field', - ), - 'views_handler_field_user_name' => array( - 'parent' => 'views_handler_field_user', - ), - 'views_handler_field_user_link' => array( - 'parent' => 'views_handler_field', - ), - 'views_handler_field_user_link_edit' => array( - 'parent' => 'views_handler_field_user_link', - ), - 'views_handler_field_user_link_delete' => array( - 'parent' => 'views_handler_field_user_link', - ), - 'views_handler_field_user_mail' => array( - 'parent' => 'views_handler_field_user', - ), - 'views_handler_field_user_language' => array( - 'parent' => 'views_handler_field_user', - ), - 'views_handler_field_user_picture' => array( - 'parent' => 'views_handler_field', - ), - 'views_handler_field_user_roles' => array( - 'parent' => 'views_handler_field_prerender_list', - ), - 'views_handler_filter_user_name' => array( - 'parent' => 'views_handler_filter_in_operator', - ), - 'views_handler_filter_user_current' => array( - 'parent' => 'views_handler_filter_boolean_operator', - ), - 'views_handler_filter_user_roles' => array( - 'parent' => 'views_handler_filter_many_to_one', - ), - 'views_handler_argument_users_roles_rid' => array( - 'parent' => 'views_handler_argument_many_to_one', - ), - ), + 'views_handler_argument_user_uid', + 'views_handler_field_user', + 'views_handler_field_user_name', + 'views_handler_field_user_link', + 'views_handler_field_user_link_edit', + 'views_handler_field_user_link_delete', + 'views_handler_field_user_mail', + 'views_handler_field_user_language', + 'views_handler_field_user_picture', + 'views_handler_field_user_roles', + 'views_handler_filter_user_name', + 'views_handler_filter_user_current', + 'views_handler_filter_user_roles', + 'views_handler_argument_users_roles_rid', ); } Index: modules/node/views_handler_filter_history_user_timestamp.inc =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/views/modules/node/views_handler_filter_history_user_timestamp.inc,v retrieving revision 1.2 diff -u -p -r1.2 views_handler_filter_history_user_timestamp.inc --- modules/node/views_handler_filter_history_user_timestamp.inc 2 Jun 2009 19:10:40 -0000 1.2 +++ modules/node/views_handler_filter_history_user_timestamp.inc 16 Jun 2009 11:01:09 -0000 @@ -45,7 +45,7 @@ class views_handler_filter_history_user_ // Hey, Drupal kills old history, so nodes that haven't been updated // since NODE_NEW_LIMIT are bzzzzzzzt outta here! - $limit = time() - NODE_NEW_LIMIT; + $limit = REQUEST_TIME - NODE_NEW_LIMIT; $this->ensure_my_table(); $field = "$this->table_alias.$this->real_field"; Index: modules/node/views_plugin_argument_validate_node.inc =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/views/modules/node/views_plugin_argument_validate_node.inc,v retrieving revision 1.2 diff -u -p -r1.2 views_plugin_argument_validate_node.inc --- modules/node/views_plugin_argument_validate_node.inc 10 Jun 2009 22:04:57 -0000 1.2 +++ modules/node/views_plugin_argument_validate_node.inc 16 Jun 2009 11:01:09 -0000 @@ -30,7 +30,7 @@ class views_plugin_argument_validate_nod '#options' => $options, '#default_value' => $arg, '#description' => t('If you wish to validate for specific node types, check them; if none are checked, all nodes will pass.'), - '#process' => array('expand_checkboxes', 'views_process_dependency'), + '#process' => array('form_process_checkboxes', 'views_process_dependency'), '#dependency' => array('edit-options-validate-type' => array($this->id)), ); Index: modules/node/views_plugin_row_node_rss.inc =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/views/modules/node/views_plugin_row_node_rss.inc,v retrieving revision 1.7 diff -u -p -r1.7 views_plugin_row_node_rss.inc --- modules/node/views_plugin_row_node_rss.inc 2 Jun 2009 20:14:43 -0000 1.7 +++ modules/node/views_plugin_row_node_rss.inc 16 Jun 2009 11:01:09 -0000 @@ -72,7 +72,7 @@ class views_plugin_row_node_rss extends } // Allow modules to change $node->teaser before viewing. - node_invoke_nodeapi($node, 'view', $teaser, FALSE); + module_invoke_all('node_view', $node, $teaser); } // Set the proper node part, then unset unused $node part so that a bad @@ -88,7 +88,7 @@ class views_plugin_row_node_rss extends } // Allow modules to modify the fully-built node. - node_invoke_nodeapi($node, 'alter', $teaser, FALSE); + module_invoke_all('node_alter', $node, $teaser, FALSE); $item = new stdClass(); $item->title = $node->title; Index: modules/taxonomy/views_handler_field_term_node_tid.inc =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/views/modules/taxonomy/views_handler_field_term_node_tid.inc,v retrieving revision 1.3 diff -u -p -r1.3 views_handler_field_term_node_tid.inc --- modules/taxonomy/views_handler_field_term_node_tid.inc 7 Apr 2009 22:02:40 -0000 1.3 +++ modules/taxonomy/views_handler_field_term_node_tid.inc 16 Jun 2009 11:01:09 -0000 @@ -55,7 +55,7 @@ class views_handler_field_term_node_tid '#title' => t('Vocabularies'), '#options' => $options, '#default_value' => $this->options['vids'], - '#process' => array('expand_checkboxes', 'views_process_dependency'), + '#process' => array('form_process_checkboxes', 'views_process_dependency'), '#dependency' => array('edit-options-limit' => array(TRUE)), ); } Index: modules/taxonomy/views_handler_filter_term_node_tid.inc =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/views/modules/taxonomy/views_handler_filter_term_node_tid.inc,v retrieving revision 1.8 diff -u -p -r1.8 views_handler_filter_term_node_tid.inc --- modules/taxonomy/views_handler_filter_term_node_tid.inc 7 Apr 2009 23:21:01 -0000 1.8 +++ modules/taxonomy/views_handler_filter_term_node_tid.inc 16 Jun 2009 11:01:09 -0000 @@ -44,7 +44,7 @@ class views_handler_filter_term_node_tid } $form['markup_start'] = array( - '#value' => '
', + '#markup' => '
', ); $form['type'] = array( @@ -63,7 +63,7 @@ class views_handler_filter_term_node_tid ); $form['markup_end'] = array( - '#value' => '
', + '#markup' => '
', ); } @@ -71,9 +71,7 @@ class views_handler_filter_term_node_tid $vocabulary = taxonomy_vocabulary_load($this->options['vid']); if (empty($vocabulary) && $this->options['limit']) { $form['markup'] = array( - '#prefix' => '
', - '#suffix' => '
', - '#value' => t('An invalid vocabulary is selected. Please change it in the options.'), + '#markup' => '
' . t('An invalid vocabulary is selected. Please change it in the options.') . '
', ); return; } Index: modules/taxonomy/views_plugin_argument_validate_taxonomy_term.inc =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/views/modules/taxonomy/views_plugin_argument_validate_taxonomy_term.inc,v retrieving revision 1.5 diff -u -p -r1.5 views_plugin_argument_validate_taxonomy_term.inc --- modules/taxonomy/views_plugin_argument_validate_taxonomy_term.inc 2 Jun 2009 18:36:36 -0000 1.5 +++ modules/taxonomy/views_plugin_argument_validate_taxonomy_term.inc 16 Jun 2009 11:01:10 -0000 @@ -24,7 +24,7 @@ class views_plugin_argument_validate_tax '#options' => $options, '#default_value' => isset($this->argument->options['validate_argument_vocabulary']) ? $this->argument->options['validate_argument_vocabulary'] : array(), '#description' => t('If you wish to validate for specific vocabularies, check them; if none are checked, all terms will pass.'), - '#process' => array('expand_checkboxes', 'views_process_dependency'), + '#process' => array('form_process_checkboxes', 'views_process_dependency'), '#dependency' => array('edit-options-validate-type' => array($this->id)), ); Index: modules/user/views_plugin_argument_validate_user.inc =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/views/modules/user/views_plugin_argument_validate_user.inc,v retrieving revision 1.2 diff -u -p -r1.2 views_plugin_argument_validate_user.inc --- modules/user/views_plugin_argument_validate_user.inc 17 Feb 2009 23:32:33 -0000 1.2 +++ modules/user/views_plugin_argument_validate_user.inc 16 Jun 2009 11:01:10 -0000 @@ -26,7 +26,7 @@ class views_plugin_argument_validate_use 'either' => t('Allow both numeric UIDs and string usernames'), ), '#default_value' => $this->argument->options['validate_user_argument_type'], - '#process' => array('expand_radios', 'views_process_dependency'), + '#process' => array('form_process_radios', 'views_process_dependency'), '#dependency' => array('edit-options-validate-type' => array($this->id)), '#prefix' => '
', '#suffix' => '
', @@ -48,7 +48,7 @@ class views_plugin_argument_validate_use '#options' => user_roles(TRUE), '#default_value' => $this->argument->options['validate_user_roles'], '#description' => t('If no roles are selected, users from any role will be allowed.'), - '#process' => array('expand_checkboxes', 'views_process_dependency'), + '#process' => array('form_process_checkboxes', 'views_process_dependency'), '#dependency' => array( 'edit-options-validate-type' => array($this->id), 'edit-options-validate-user-restrict-roles' => array(1), Index: plugins/views_plugin_display.inc =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/views/plugins/views_plugin_display.inc,v retrieving revision 1.24 diff -u -p -r1.24 views_plugin_display.inc --- plugins/views_plugin_display.inc 10 Jun 2009 22:01:31 -0000 1.24 +++ plugins/views_plugin_display.inc 16 Jun 2009 11:01:10 -0000 @@ -851,9 +851,7 @@ class views_plugin_display extends views case 'use_ajax': $form['#title'] .= t('Use AJAX when available to load this view'); $form['description'] = array( - '#prefix' => '
', - '#suffix' => '
', - '#value' => t('If set, this view will use an AJAX mechanism for paging, table sorting and exposed filters. This means the entire page will not refresh. It is not recommended that you use this if this view is the main content of the page as it will prevent deep linking to specific pages, but it is very useful for side content.'), + '#markup' => '
' . t('If set, this view will use an AJAX mechanism for paging, table sorting and exposed filters. This means the entire page will not refresh. It is not recommended that you use this if this view is the main content of the page as it will prevent deep linking to specific pages, but it is very useful for side content.') . '
', ); $form['use_ajax'] = array( '#type' => 'radios', @@ -933,9 +931,7 @@ class views_plugin_display extends views $access_plugin = views_fetch_plugin_data('access', $access['type']); if (!empty($access_plugin['uses options'])) { $form['markup'] = array( - '#prefix' => '
', - '#suffix' => '
', - '#value' => t('You may also adjust the !settings for the currently selected style by clicking on the icon.', array('!settings' => $this->option_link(t('settings'), 'access_options'))), + '#markup' => '
' . t('You may also adjust the !settings for the currently selected style by clicking on the icon.', array('!settings' => $this->option_link(t('settings'), 'access_options'))) . '
', ); } @@ -1054,9 +1050,7 @@ class views_plugin_display extends views $style_plugin = views_fetch_plugin_data('style', $this->get_option('style_plugin')); if (!empty($style_plugin['uses options'])) { $form['markup'] = array( - '#prefix' => '
', - '#suffix' => '
', - '#value' => t('You may also adjust the !settings for the currently selected style by clicking on the icon.', array('!settings' => $this->option_link(t('settings'), 'style_options'))), + '#markup' => '
' . t('You may also adjust the !settings for the currently selected style by clicking on the icon.', array('!settings' => $this->option_link(t('settings'), 'style_options'))) . '
', ); } @@ -1099,9 +1093,7 @@ class views_plugin_display extends views $row_plugin = views_fetch_plugin_data('row', $this->get_option('row_plugin')); if (!empty($row_plugin['uses options'])) { $form['markup'] = array( - '#prefix' => '
', - '#suffix' => '
', - '#value' => t('You may also adjust the !settings for the currently selected row style by clicking on the icon.', array('!settings' => $this->option_link(t('settings'), 'row_options'))), + '#markup' => '
' . t('You may also adjust the !settings for the currently selected row style by clicking on the icon.', array('!settings' => $this->option_link(t('settings'), 'row_options'))) . '
', ); } @@ -1180,9 +1172,7 @@ class views_plugin_display extends views } $form['important'] = array( - '#prefix' => '
', - '#suffix' => '
', - '#value' => '

' . t('This section lists all possible templates for the display plugin and for the style plugins, ordered roughly from the least specific to the most specific. The active template for each plugin -- which is the most specific template found on the system -- is highlighted in bold.') . '

', + '#markup' => '

' . t('This section lists all possible templates for the display plugin and for the style plugins, ordered roughly from the least specific to the most specific. The active template for each plugin -- which is the most specific template found on the system -- is highlighted in bold.') . '

', ); foreach (list_themes() as $key => $theme) { @@ -1206,9 +1196,7 @@ class views_plugin_display extends views ); $form['analysis'] = array( - '#prefix' => '
', - '#suffix' => '
', - '#value' => theme('item_list', $funcs), + '#markup' => '
' . theme('item_list', $funcs) . '
', ); $form['rescan_button'] = array( @@ -1221,9 +1209,7 @@ class views_plugin_display extends views '#submit' => array('views_ui_config_item_form_rescan'), ); $form['rescan_button']['markup'] = array( - '#prefix' => '
', - '#suffix' => '
', - '#value' => t("Important! When adding, removing, or renaming template files, it is necessary to make Drupal aware of the changes by making it rescan the files on your system. By clicking this button you clear Drupal's theme registry and thereby trigger this rescanning process. The highlighted templates above will then reflect the new state of your system."), + '#markup' => '
' . t("Important! When adding, removing, or renaming template files, it is necessary to make Drupal aware of the changes by making it rescan the files on your system. By clicking this button you clear Drupal's theme registry and thereby trigger this rescanning process. The highlighted templates above will then reflect the new state of your system.") . '
', ); $form_state['ok_button'] = TRUE; @@ -1248,9 +1234,7 @@ class views_plugin_display extends views } $form['analysis'] = array( - '#prefix' => '
', - '#suffix' => '
', - '#value' => $output, + '#markup' => '
' . $output . '
', ); $form_state['ok_button'] = TRUE; @@ -1277,9 +1261,7 @@ class views_plugin_display extends views } $form['analysis'] = array( - '#prefix' => '
', - '#suffix' => '
', - '#value' => $output, + '#markup' => '
' . $output . '
', ); $form_state['ok_button'] = TRUE; @@ -1306,9 +1288,7 @@ class views_plugin_display extends views } $form['analysis'] = array( - '#prefix' => '
', - '#suffix' => '
', - '#value' => $output, + '#markup' => '
' . $output . '
', ); $form_state['ok_button'] = TRUE; @@ -1324,9 +1304,7 @@ class views_plugin_display extends views $output .= '
' . check_plain(file_get_contents(drupal_get_path('module', 'views') . '/theme/views-view-field.tpl.php')) . '
'; $form['analysis'] = array( - '#prefix' => '
', - '#suffix' => '
', - '#value' => $output, + '#markup' => '
' . $output . '
', ); $form_state['ok_button'] = TRUE; break; @@ -1334,9 +1312,7 @@ class views_plugin_display extends views case 'exposed_block': $form['#title'] .= t('Put the exposed form in a block'); $form['description'] = array( - '#prefix' => '
', - '#suffix' => '
', - '#value' => t('If set, any exposed widgets will not appear with this view. Instead, a block will be made available to the Drupal block administration system, and the exposed form will appear there. Note that this block must be enabled manually, Views will not enable it for you.'), + '#markup' => '
' . t('If set, any exposed widgets will not appear with this view. Instead, a block will be made available to the Drupal block administration system, and the exposed form will appear there. Note that this block must be enabled manually, Views will not enable it for you.') . '
', ); $form['exposed_block'] = array( '#type' => 'radios', @@ -1571,9 +1547,7 @@ class views_plugin_display extends views '#submit' => array('views_ui_edit_display_form_override'), ); $form['override']['markup'] = array( - '#prefix' => '
', - '#value' => theme('advanced_help_topic', 'views', 'overrides') . t('Status: using default values.'), - '#suffix' => '
', + '#markup' => '
' . theme('advanced_help_topic', 'views', 'overrides') . t('Status: using default values.') . '
', ); $form_state['update_name'] = t('Update default display'); @@ -1585,9 +1559,7 @@ class views_plugin_display extends views '#submit' => array('views_ui_edit_display_form_override'), ); $form['override']['markup'] = array( - '#prefix' => '
', - '#value' => theme('advanced_help_topic', 'views', 'overrides') . t('Status: using overridden values.'), - '#suffix' => '
', + '#markup' => '
' . theme('advanced_help_topic', 'views', 'overrides') . t('Status: using overridden values.') . '
', ); $form_state['update_name'] = NULL; Index: plugins/views_plugin_display_page.inc =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/views/plugins/views_plugin_display_page.inc,v retrieving revision 1.7 diff -u -p -r1.7 views_plugin_display_page.inc --- plugins/views_plugin_display_page.inc 2 Jun 2009 20:37:15 -0000 1.7 +++ plugins/views_plugin_display_page.inc 16 Jun 2009 11:01:11 -0000 @@ -307,9 +307,7 @@ class views_plugin_display_page extends ); $form['menu']['name-warning'] = array( '#type' => 'markup', - '#prefix' => '
', - '#value' => t("Warning: Changing this item's menu will not work reliably in Drupal 6.4 or earlier. Please upgrade your copy of Drupal at !url.", array('!url' => l('drupal.org', 'http://drupal.org/project/Drupal+project'))), - '#suffix' => '
', + '#markup' => '
' . t("Warning: Changing this item's menu will not work reliably in Drupal 6.4 or earlier. Please upgrade your copy of Drupal at !url.", array('!url' => l('drupal.org', 'http://drupal.org/project/Drupal+project'))) . '
', '#process' => array('views_process_dependency'), '#dependency' => array('radio:menu[type]' => array('normal')), '#access' => version_compare(VERSION, '6.5', '<'), @@ -333,7 +331,7 @@ class views_plugin_display_page extends '#value' => $menu['name'], ); $form['menu']['markup'] = array( - '#value' => t('Menu selection requires the activation of menu module.'), + '#markup' => t('Menu selection requires the activation of menu module.'), ); } $form['menu']['weight'] = array( @@ -354,9 +352,7 @@ class views_plugin_display_page extends } $form['tab_markup'] = array( - '#prefix' => '
', - '#suffix' => '
', - '#value' => t('When providing a menu item as a tab, Drupal needs to know what the parent menu item of that tab will be. Sometimes the parent will already exist, but other times you will need to have one created. The path of a parent item will always be the same path with the last part left off. i.e, if the path to this view is foo/bar/baz, the parent path would be foo/bar.'), + '#markup' => '
' . t('When providing a menu item as a tab, Drupal needs to know what the parent menu item of that tab will be. Sometimes the parent will already exist, but other times you will need to have one created. The path of a parent item will always be the same path with the last part left off. i.e, if the path to this view is foo/bar/baz, the parent path would be foo/bar.') . '
', ); $form['tab_options'] = array( Index: plugins/views_plugin_style_table.inc =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/views/plugins/views_plugin_style_table.inc,v retrieving revision 1.5 diff -u -p -r1.5 views_plugin_style_table.inc --- plugins/views_plugin_style_table.inc 15 Oct 2008 22:25:36 -0000 1.5 +++ plugins/views_plugin_style_table.inc 16 Jun 2009 11:01:11 -0000 @@ -123,9 +123,7 @@ class views_plugin_style_table extends v $handlers = $this->display->handler->get_handlers('field'); if (empty($handlers)) { $form['error_markup'] = array( - '#value' => t('You need at least one field before you can configure your table settings'), - '#prefix' => '
', - '#suffix' => '
', + '#markup' => '
' . t('You need at least one field before you can configure your table settings') . '
', ); return; } @@ -218,7 +216,7 @@ class views_plugin_style_table extends v // markup for the field name $form['info'][$field]['name'] = array( - '#value' => $field_names[$field], + '#markup' => $field_names[$field], ); } @@ -232,9 +230,7 @@ class views_plugin_style_table extends v ); $form['description_markup'] = array( - '#prefix' => '
', - '#suffix' => '
', - '#value' => t('Place fields into columns; you may combine multiple fields into the same column. If you do, the separator in the column specified will be used to separate the fields. Check the sortable box to make that column click sortable, and check the default sort radio to determine which column will be sorted by default, if any. You may control column order and field labels in the fields section.'), + '#markup' => '
' . t('Place fields into columns; you may combine multiple fields into the same column. If you do, the separator in the column specified will be used to separate the fields. Check the sortable box to make that column click sortable, and check the default sort radio to determine which column will be sorted by default, if any. You may control column order and field labels in the fields section.') . '
', ); } } 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 16 Jun 2009 11:01:11 -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.6 diff -u -p -r1.6 views_export.module --- views_export/views_export.module 2 Jun 2009 19:36:25 -0000 1.6 +++ views_export/views_export.module 16 Jun 2009 11:01:11 -0000 @@ -28,7 +28,9 @@ function views_export_menu() { return $items; } - +/** + * Implementation of hook_theme(). + */ function views_export_theme() { return array( 'views_export_export_form' => array( @@ -41,7 +43,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.'), + ), + ); } /**