From 13df912654fdc4d5f6db4b553f24b866131f89f2 Mon Sep 17 00:00:00 2001 From: Mauricio Dinarte Date: Tue, 3 Jun 2025 10:37:00 -0600 Subject: [PATCH] Update Drupal 7 dependencies --- drupal7/web/.gitlab-ci.yml | 40 +++-- drupal7/web/.htaccess | 7 + drupal7/web/CHANGELOG.txt | 15 ++ drupal7/web/includes/ajax.inc | 2 +- drupal7/web/includes/bootstrap.inc | 55 ++++++- drupal7/web/includes/common.inc | 44 +++++- drupal7/web/includes/database/mysql/query.inc | 16 ++ drupal7/web/includes/database/pgsql/query.inc | 10 +- drupal7/web/includes/database/prefetch.inc | 9 ++ drupal7/web/includes/database/query.inc | 9 ++ .../web/includes/database/sqlite/database.inc | 3 + drupal7/web/includes/errors.inc | 31 +++- drupal7/web/includes/file.inc | 2 +- drupal7/web/includes/mail.inc | 2 +- drupal7/web/includes/unicode.inc | 3 + drupal7/web/includes/updater.inc | 3 - drupal7/web/includes/utility.inc | 3 +- .../web/modules/aggregator/aggregator.info | 6 +- .../aggregator/tests/aggregator_test.info | 6 +- .../announcements_feed.info | 6 +- .../tests/announce_feed_test.info | 6 +- drupal7/web/modules/block/block.info | 6 +- .../web/modules/block/tests/block_test.info | 6 +- .../block_test_theme/block_test_theme.info | 6 +- drupal7/web/modules/blog/blog.info | 6 +- drupal7/web/modules/book/book.info | 6 +- drupal7/web/modules/color/color.info | 6 +- drupal7/web/modules/comment/comment.info | 6 +- .../comment/tests/comment_hook_test.info | 6 +- drupal7/web/modules/contact/contact.info | 6 +- .../web/modules/contextual/contextual.info | 6 +- drupal7/web/modules/dashboard/dashboard.info | 6 +- drupal7/web/modules/dblog/dblog.info | 6 +- drupal7/web/modules/dblog/dblog.test | 26 ++- drupal7/web/modules/field/field.info | 6 +- .../field_sql_storage/field_sql_storage.info | 6 +- .../web/modules/field/modules/list/list.info | 6 +- .../field/modules/list/tests/list_test.info | 6 +- .../modules/field/modules/number/number.info | 6 +- .../field/modules/options/options.info | 6 +- .../web/modules/field/modules/text/text.info | 6 +- .../web/modules/field/modules/text/text.test | 9 ++ .../web/modules/field/tests/field_test.info | 6 +- .../field/tests/field_test_schema_alter.info | 6 +- drupal7/web/modules/field_ui/field_ui.info | 6 +- drupal7/web/modules/file/file.info | 6 +- .../modules/file/tests/file_module_test.info | 6 +- drupal7/web/modules/filter/filter.info | 6 +- drupal7/web/modules/filter/filter.module | 20 +++ drupal7/web/modules/filter/filter.test | 33 ++++ drupal7/web/modules/forum/forum.info | 6 +- drupal7/web/modules/help/help.info | 6 +- drupal7/web/modules/image/image.info | 6 +- .../image/tests/image_module_styles_test.info | 6 +- .../image/tests/image_module_test.info | 6 +- drupal7/web/modules/locale/locale.info | 6 +- .../web/modules/locale/tests/locale_test.info | 6 +- drupal7/web/modules/menu/menu.info | 6 +- drupal7/web/modules/node/node.admin.inc | 7 +- drupal7/web/modules/node/node.info | 6 +- .../modules/node/tests/node_access_test.info | 6 +- drupal7/web/modules/node/tests/node_test.info | 6 +- .../node/tests/node_test_exception.info | 6 +- drupal7/web/modules/openid/openid.info | 6 +- .../web/modules/openid/tests/openid_test.info | 6 +- drupal7/web/modules/overlay/overlay-parent.js | 4 +- drupal7/web/modules/overlay/overlay.info | 6 +- drupal7/web/modules/path/path.info | 6 +- drupal7/web/modules/path/path.module | 1 + drupal7/web/modules/php/php.info | 6 +- drupal7/web/modules/poll/poll.info | 6 +- drupal7/web/modules/profile/profile.info | 6 +- drupal7/web/modules/rdf/rdf.info | 6 +- drupal7/web/modules/rdf/tests/rdf_test.info | 6 +- drupal7/web/modules/search/search.info | 6 +- .../search/tests/search_embedded_form.info | 6 +- .../search/tests/search_extra_type.info | 6 +- .../search/tests/search_node_tags.info | 6 +- drupal7/web/modules/shortcut/shortcut.info | 6 +- .../simpletest/drupal_web_test_case.php | 25 ++- .../web/modules/simpletest/simpletest.info | 6 +- .../modules/simpletest/simpletest.pages.inc | 2 +- .../simpletest/tests/actions_loop_test.info | 6 +- .../web/modules/simpletest/tests/ajax.test | 12 ++ .../simpletest/tests/ajax_forms_test.info | 6 +- .../modules/simpletest/tests/ajax_test.info | 6 +- .../modules/simpletest/tests/batch_test.info | 6 +- .../modules/simpletest/tests/boot_test_1.info | 6 +- .../modules/simpletest/tests/boot_test_2.info | 6 +- .../modules/simpletest/tests/bootstrap.test | 59 +++++++ .../web/modules/simpletest/tests/cache.test | 14 -- .../modules/simpletest/tests/common_test.info | 6 +- .../tests/common_test_cron_helper.info | 6 +- .../simpletest/tests/database_test.info | 6 +- .../drupal_autoload_test.info | 6 +- ...drupal_system_listing_compatible_test.info | 6 +- ...upal_system_listing_incompatible_test.info | 6 +- .../simpletest/tests/entity_cache_test.info | 6 +- .../tests/entity_cache_test_dependency.info | 6 +- .../modules/simpletest/tests/entity_crud.test | 29 ++++ .../tests/entity_crud_hook_test.info | 6 +- .../tests/entity_crud_hook_test.module | 10 ++ .../tests/entity_query_access_test.info | 6 +- .../web/modules/simpletest/tests/error.test | 12 ++ .../modules/simpletest/tests/error_test.info | 6 +- .../web/modules/simpletest/tests/file.test | 19 +++ .../modules/simpletest/tests/file_test.info | 6 +- .../modules/simpletest/tests/filter_test.info | 6 +- .../web/modules/simpletest/tests/form.test | 103 ++++++++++++ .../modules/simpletest/tests/form_test.info | 6 +- .../modules/simpletest/tests/image_test.info | 6 +- .../modules/simpletest/tests/menu_test.info | 6 +- .../modules/simpletest/tests/module_test.info | 6 +- .../modules/simpletest/tests/password.test | 1 + .../modules/simpletest/tests/path_test.info | 6 +- .../tests/psr_0_test/psr_0_test.info | 6 +- .../tests/psr_4_test/psr_4_test.info | 6 +- .../simpletest/tests/requirements1_test.info | 6 +- .../simpletest/tests/requirements2_test.info | 6 +- .../web/modules/simpletest/tests/session.test | 6 +- .../simpletest/tests/session_test.info | 6 +- .../simpletest/tests/system_admin_test.info | 6 +- .../tests/system_dependencies_test.info | 6 +- ...atible_core_version_dependencies_test.info | 6 +- ...system_incompatible_core_version_test.info | 6 +- ...ible_module_version_dependencies_test.info | 6 +- ...stem_incompatible_module_version_test.info | 6 +- .../tests/system_null_version_test.info | 6 +- .../tests/system_project_namespace_test.info | 6 +- .../system_requires_null_version_test.info | 6 +- .../modules/simpletest/tests/system_test.info | 6 +- .../simpletest/tests/taxonomy_nodes_test.info | 6 +- .../simpletest/tests/taxonomy_test.info | 6 +- .../modules/simpletest/tests/theme_test.info | 6 +- .../themes/test_basetheme/test_basetheme.info | 6 +- .../themes/test_subtheme/test_subtheme.info | 6 +- .../tests/themes/test_theme/test_theme.info | 6 +- .../test_theme_nyan_cat.info | 6 +- .../web/modules/simpletest/tests/unicode.test | 4 +- .../simpletest/tests/update_script_test.info | 6 +- .../simpletest/tests/update_test_1.info | 6 +- .../simpletest/tests/update_test_2.info | 6 +- .../simpletest/tests/update_test_3.info | 6 +- .../simpletest/tests/url_alter_test.info | 6 +- .../modules/simpletest/tests/xmlrpc_test.info | 6 +- .../web/modules/statistics/statistics.info | 6 +- drupal7/web/modules/syslog/syslog.info | 6 +- drupal7/web/modules/system/system.admin.inc | 6 + drupal7/web/modules/system/system.info | 6 +- drupal7/web/modules/system/system.install | 28 ++++ drupal7/web/modules/system/system.mail.inc | 13 +- drupal7/web/modules/system/system.module | 13 ++ drupal7/web/modules/system/system.tar.inc | 16 +- drupal7/web/modules/system/system.test | 15 ++ .../modules/system/tests/cron_queue_test.info | 6 +- .../system/tests/system_cron_test.info | 6 +- drupal7/web/modules/taxonomy/taxonomy.info | 6 +- drupal7/web/modules/toolbar/toolbar.info | 6 +- drupal7/web/modules/tracker/tracker.info | 6 +- .../translation/tests/translation_test.info | 6 +- .../web/modules/translation/translation.info | 6 +- .../modules/trigger/tests/trigger_test.info | 6 +- drupal7/web/modules/trigger/trigger.info | 6 +- .../modules/update/tests/aaa_update_test.info | 6 +- .../modules/update/tests/bbb_update_test.info | 6 +- .../modules/update/tests/ccc_update_test.info | 6 +- .../update_test_admintheme.info | 6 +- .../update_test_basetheme.info | 6 +- .../update_test_subtheme.info | 6 +- .../web/modules/update/tests/update_test.info | 6 +- drupal7/web/modules/update/update.info | 6 +- .../tests/anonymous_user_unblock_test.info | 6 +- .../tests/user_email_validation_test.info | 6 +- .../modules/user/tests/user_flood_test.info | 6 +- .../modules/user/tests/user_form_test.info | 6 +- .../modules/user/tests/user_session_test.info | 6 +- drupal7/web/modules/user/user.api.php | 6 +- drupal7/web/modules/user/user.info | 6 +- drupal7/web/modules/user/user.module | 20 ++- drupal7/web/modules/user/user.test | 39 ++++- drupal7/web/profiles/minimal/minimal.info | 6 +- drupal7/web/profiles/standard/standard.info | 6 +- ...drupal_system_listing_compatible_test.info | 6 +- ...upal_system_listing_incompatible_test.info | 6 +- drupal7/web/profiles/testing/testing.info | 6 +- .../all/modules/contrib/entity/.gitlab-ci.yml | 38 +++++ .../contrib/entity/entity.features.inc | 3 + .../all/modules/contrib/entity/entity.info | 6 +- .../modules/contrib/entity/entity.info.inc | 5 + .../all/modules/contrib/entity/entity.test | 12 +- .../modules/contrib/entity/entity_token.info | 6 +- .../contrib/entity/includes/entity.inc | 1 + .../contrib/entity/includes/entity.ui.inc | 1 + .../contrib/entity/tests/entity_feature.info | 6 +- .../contrib/entity/tests/entity_test.info | 6 +- .../entity/tests/entity_test_i18n.info | 6 +- .../all/modules/contrib/views/.gitlab-ci.yml | 111 +++++++++++++ .../contrib/views/css/views-admin.theme.css | 2 +- .../contrib/views/drush/views.drush.inc | 7 +- .../handlers/views_handler_area_result.inc | 8 +- .../handlers/views_handler_area_text.inc | 2 +- .../handlers/views_handler_area_view.inc | 2 +- .../handlers/views_handler_argument_date.inc | 4 - .../views_handler_argument_formula.inc | 4 +- .../views_handler_argument_many_to_one.inc | 5 +- .../views_handler_argument_numeric.inc | 6 +- .../views_handler_argument_string.inc | 4 +- .../views/handlers/views_handler_field.inc | 20 +-- .../handlers/views_handler_field_date.inc | 4 +- .../views_handler_field_machine_name.inc | 5 +- .../handlers/views_handler_field_math.inc | 4 +- .../handlers/views_handler_field_numeric.inc | 2 + .../views_handler_field_prerender_list.inc | 2 +- .../views_handler_filter_boolean_operator.inc | 2 +- .../views_handler_filter_entity_bundle.inc | 1 + .../views_handler_filter_group_by_numeric.inc | 2 +- .../views_handler_filter_in_operator.inc | 4 +- .../views_handler_filter_many_to_one.inc | 2 +- .../handlers/views_handler_filter_numeric.inc | 22 +-- .../handlers/views_handler_filter_string.inc | 5 +- .../handlers/views_handler_relationship.inc | 1 - ...ews_handler_relationship_groupwise_max.inc | 9 +- .../views/handlers/views_handler_sort.inc | 4 +- .../modules/contrib/views/includes/admin.inc | 136 +++++++--------- .../modules/contrib/views/includes/ajax.inc | 4 +- .../contrib/views/includes/analyze.inc | 2 +- .../modules/contrib/views/includes/base.inc | 4 +- .../modules/contrib/views/includes/cache.inc | 2 +- .../contrib/views/includes/handlers.inc | 44 +++--- .../contrib/views/includes/plugins.inc | 9 +- .../modules/contrib/views/includes/view.inc | 75 ++++----- .../all/modules/contrib/views/js/ajax.js | 12 +- .../all/modules/contrib/views/js/ajax_view.js | 12 +- .../all/modules/contrib/views/js/base.js | 4 +- .../views/js/jquery.ui.dialog.patch.js | 2 +- .../modules/contrib/views/js/views-admin.js | 42 ++--- .../modules/contrib/views/js/views-list.js | 6 +- .../views/modules/aggregator.views.inc | 36 ++--- .../views_handler_argument_aggregator_iid.inc | 1 - ...iews_handler_field_aggregator_category.inc | 2 +- ...handler_filter_aggregator_category_cid.inc | 2 +- .../contrib/views/modules/book.views.inc | 2 +- .../contrib/views/modules/comment.views.inc | 7 +- .../views_handler_field_comment_node_link.inc | 1 - .../views_handler_field_comment_username.inc | 2 +- ...ws_handler_field_ncs_last_comment_name.inc | 2 +- .../views_handler_field_node_comment.inc | 2 + .../comment/views_plugin_row_comment_rss.inc | 21 +-- .../comment/views_plugin_row_comment_view.inc | 4 +- .../views_handler_field_contact_link.inc | 1 - .../contrib/views/modules/field.views.inc | 31 ++-- .../views_handler_argument_field_list.inc | 4 +- ...ews_handler_argument_field_list_string.inc | 4 +- .../field/views_handler_field_field.inc | 4 +- .../contrib/views/modules/file.views.inc | 2 +- .../contrib/views/modules/image.views.inc | 2 +- .../contrib/views/modules/locale.views.inc | 4 +- .../views_handler_filter_locale_language.inc | 2 +- .../views_handler_filter_node_language.inc | 2 +- .../views_handler_sort_node_language.inc | 2 +- .../contrib/views/modules/node.views.inc | 46 +++--- .../views_handler_argument_dates_various.inc | 10 +- ...iews_handler_filter_node_version_count.inc | 7 - .../views_plugin_argument_validate_node.inc | 3 +- .../contrib/views/modules/poll.views.inc | 2 +- .../contrib/views/modules/profile.views.inc | 7 +- .../views_handler_field_profile_date.inc | 4 +- .../contrib/views/modules/search.views.inc | 6 +- .../search/views_handler_argument_search.inc | 3 +- .../search/views_handler_filter_search.inc | 4 +- .../views/modules/statistics.views.inc | 4 +- .../contrib/views/modules/system.views.inc | 8 +- .../views_handler_argument_file_fid.inc | 1 + .../views_handler_field_file_filemime.inc | 6 +- .../contrib/views/modules/taxonomy.views.inc | 18 +-- ...dler_argument_term_node_tid_depth_join.inc | 1 - .../views_handler_field_term_link_edit.inc | 4 +- .../views_handler_filter_term_node_tid.inc | 9 +- ...andler_filter_term_node_tid_depth_join.inc | 1 - ...s_plugin_argument_default_taxonomy_tid.inc | 6 +- ...plugin_argument_validate_taxonomy_term.inc | 2 +- ...iews_handler_field_node_link_translate.inc | 4 +- ...views_handler_relationship_translation.inc | 2 +- .../contrib/views/modules/user.views.inc | 50 +++--- .../user/views_handler_argument_user_uid.inc | 2 +- .../views_handler_field_user_permissions.inc | 5 +- .../user/views_handler_field_user_roles.inc | 10 +- .../user/views_handler_filter_user_name.inc | 4 +- .../user/views_plugin_row_user_view.inc | 4 +- .../plugins/export_ui/views_ui.class.php | 30 ++-- .../views/plugins/views_plugin_access.inc | 2 +- .../plugins/views_plugin_access_perm.inc | 1 - .../views_plugin_argument_default_php.inc | 3 - .../views_plugin_argument_validate.inc | 2 +- .../views_plugin_argument_validate_php.inc | 4 - .../views/plugins/views_plugin_cache.inc | 4 +- .../views/plugins/views_plugin_display.inc | 28 ++-- .../views_plugin_display_attachment.inc | 4 +- .../plugins/views_plugin_display_block.inc | 2 +- .../plugins/views_plugin_display_extender.inc | 2 +- .../plugins/views_plugin_display_feed.inc | 6 +- .../plugins/views_plugin_display_page.inc | 24 +-- .../plugins/views_plugin_exposed_form.inc | 28 ++-- ...ews_plugin_exposed_form_input_required.inc | 2 +- .../plugins/views_plugin_localization.inc | 2 +- .../views_plugin_localization_core.inc | 1 - .../views/plugins/views_plugin_pager.inc | 6 +- .../views/plugins/views_plugin_query.inc | 4 +- .../plugins/views_plugin_query_default.inc | 50 +++--- .../views/plugins/views_plugin_row.inc | 2 +- .../views/plugins/views_plugin_style.inc | 42 +++-- .../plugins/views_plugin_style_jump_menu.inc | 8 - .../plugins/views_plugin_style_table.inc | 25 +-- .../plugins/views_wizard/node_revision.inc | 2 +- .../views_ui_base_views_wizard.class.php | 55 +++++-- .../views_ui_comment_views_wizard.class.php | 17 +- ...ews_ui_file_managed_views_wizard.class.php | 3 + ...ws_ui_node_revision_views_wizard.class.php | 3 + .../views_ui_node_views_wizard.class.php | 14 +- ...ws_ui_taxonomy_term_views_wizard.class.php | 3 + .../views_ui_users_views_wizard.class.php | 3 + ...ews_handler_argument_comment_user_uid.test | 15 +- ...views_handler_filter_comment_user_uid.test | 6 +- .../views/tests/field/views_fieldapi.test | 40 ++++- .../handlers/views_handler_area_text.test | 9 +- .../handlers/views_handler_argument_null.test | 16 +- .../handlers/views_handler_field_boolean.test | 19 ++- .../handlers/views_handler_field_counter.test | 15 +- .../handlers/views_handler_field_custom.test | 12 +- .../handlers/views_handler_field_date.test | 4 +- .../views_handler_field_file_extension.test | 14 +- .../views_handler_field_file_size.test | 17 +- .../handlers/views_handler_field_math.test | 12 +- .../handlers/views_handler_field_url.test | 12 +- .../handlers/views_handler_field_xss.test | 17 +- .../views_handler_filter_combine.test | 12 +- .../handlers/views_handler_filter_date.test | 21 ++- .../views_handler_filter_equality.test | 29 +++- .../views_handler_filter_in_operator.test | 25 ++- .../views_handler_filter_numeric.test | 51 ++++-- .../handlers/views_handler_filter_string.test | 148 ++++++++++++++---- .../handlers/views_handler_manytoone.test | 2 +- .../tests/handlers/views_handler_sort.test | 4 + .../handlers/views_handler_sort_date.test | 7 + .../views/tests/handlers/views_handlers.test | 7 +- .../node/views_node_revision_relations.test | 7 +- .../tests/plugins/views_plugin_display.test | 10 +- .../tests/styles/views_plugin_style.test | 15 +- .../tests/styles/views_plugin_style_base.test | 2 +- .../styles/views_plugin_style_jump_menu.test | 8 +- .../styles/views_plugin_style_mapping.test | 6 + .../views_plugin_style_unformatted.test | 5 +- ...s_handler_relationship_node_term_data.test | 16 +- .../user/views_handler_field_user_name.test | 22 ++- .../contrib/views/tests/user/views_user.test | 8 +- .../user/views_user_argument_default.test | 2 +- .../user/views_user_argument_validate.test | 36 +++-- .../contrib/views/tests/views_access.test | 68 +++++--- .../contrib/views/tests/views_ajax.test | 4 + .../contrib/views/tests/views_analyze.test | 8 +- .../views/tests/views_argument_default.test | 16 +- .../views/tests/views_argument_validator.test | 30 +++- .../contrib/views/tests/views_basic.test | 4 + .../contrib/views/tests/views_cache.test | 10 +- .../contrib/views/tests/views_clone.test | 2 +- .../views/tests/views_exposed_form.test | 2 +- .../contrib/views/tests/views_glossary.test | 1 - .../contrib/views/tests/views_groupby.test | 45 +++--- .../views/tests/views_handler_filter.test | 5 +- .../contrib/views/tests/views_handlers.test | 29 ++-- .../contrib/views/tests/views_module.test | 27 ++-- .../contrib/views/tests/views_pager.test | 14 +- .../contrib/views/tests/views_query.test | 7 +- .../contrib/views/tests/views_test.info | 6 +- .../contrib/views/tests/views_test.module | 6 + .../views/tests/views_translatable.test | 13 +- .../modules/contrib/views/tests/views_ui.test | 77 ++++++--- .../contrib/views/tests/views_upgrade.test | 4 +- .../contrib/views/tests/views_view.test | 12 +- .../all/modules/contrib/views/theme/theme.inc | 87 +++++----- .../views/theme/views-view-fields.tpl.php | 2 +- .../all/modules/contrib/views/views.api.php | 19 ++- .../all/modules/contrib/views/views.info | 8 +- .../all/modules/contrib/views/views.install | 43 ++++- .../all/modules/contrib/views/views.module | 84 ++++++++-- .../all/modules/contrib/views/views_ui.info | 6 +- .../all/modules/contrib/views/views_ui.module | 5 +- drupal7/web/themes/bartik/bartik.info | 6 +- drupal7/web/themes/garland/garland.info | 6 +- drupal7/web/themes/seven/seven.info | 6 +- drupal7/web/themes/stark/stark.info | 6 +- 391 files changed, 2900 insertions(+), 1502 deletions(-) create mode 100644 drupal7/web/sites/all/modules/contrib/entity/.gitlab-ci.yml create mode 100644 drupal7/web/sites/all/modules/contrib/views/.gitlab-ci.yml diff --git a/drupal7/web/.gitlab-ci.yml b/drupal7/web/.gitlab-ci.yml index e1503e4..da509c4 100644 --- a/drupal7/web/.gitlab-ci.yml +++ b/drupal7/web/.gitlab-ci.yml @@ -10,23 +10,35 @@ ################ ################ -# Includes +# Workflow # -# Additional configuration can be provided through includes. -# One advantage of include files is that if they are updated upstream, the -# changes affect all pipelines using that include. +# Define conditions for when the pipeline will run. +# For example: +# * On commit +# * On merge request +# * On manual trigger +# * etc. +# https://docs.gitlab.com/ee/ci/jobs/job_control.html#specify-when-jobs-run-with-rules # -# Includes can be overriden by re-declaring anything provided in an include, -# here in gitlab-ci.yml -# https://docs.gitlab.com/ee/ci/yaml/includes.html#override-included-configuration-values +# Pipelines can also be configured to run on a schedule,though they still must meet the conditions defined in Workflow and Rules. This can be used, for example, to do nightly regression testing: +# https://gitlab.com/help/ci/pipelines/schedules ################ -include: - - project: $_GITLAB_TEMPLATES_REPO - ref: $_GITLAB_TEMPLATES_REF - file: - - '/includes/include.drupalci.variables.yml' - - '/includes/include.drupalci.workflows.yml' +workflow: + rules: + # These 3 rules from https://gitlab.com/gitlab-org/gitlab/-/blob/master/lib/gitlab/ci/templates/Workflows/MergeRequest-Pipelines.gitlab-ci.yml + # Run on merge requests + - if: $CI_PIPELINE_SOURCE == 'merge_request_event' + # Run when called from an upstream pipeline https://docs.gitlab.com/ee/ci/pipelines/downstream_pipelines.html?tab=Multi-project+pipeline#use-rules-to-control-downstream-pipeline-jobs + - if: $CI_PIPELINE_SOURCE == 'pipeline' + # Run on commits. + - if: $CI_PIPELINE_SOURCE == "push" && $CI_PROJECT_ROOT_NAMESPACE == "project" + # The last rule above blocks manual and scheduled pipelines on non-default branch. The rule below allows them: + - if: $CI_PIPELINE_SOURCE == "schedule" && $CI_PROJECT_ROOT_NAMESPACE == "project" + # Run if triggered from Web using 'Run Pipelines' + - if: $CI_PIPELINE_SOURCE == "web" + # Run if triggered from WebIDE + - if: $CI_PIPELINE_SOURCE == "webide" ################ # Variables @@ -42,9 +54,11 @@ include: ################ variables: + _CONFIG_DOCKERHUB_ROOT: "drupalci" _TARGET_PHP: "8.1" CONCURRENCY: 15 GIT_DEPTH: "3" + COMPOSER_ALLOW_SUPERUSER: 1 ################ # Stages diff --git a/drupal7/web/.htaccess b/drupal7/web/.htaccess index 7dd1d14..7cf5756 100644 --- a/drupal7/web/.htaccess +++ b/drupal7/web/.htaccess @@ -149,6 +149,13 @@ DirectoryIndex index.php index.html index.htm # Various header fixes. + # Disable content sniffing for all responses, since it's an attack vector. + # This header is also set in drupal_deliver_html_page(), which depending on + # Apache configuration might get placed in the 'onsuccess' table. To prevent + # header duplication, unset that one prior to setting in the 'always' table. + # See "To circumvent this limitation..." in + # https://httpd.apache.org/docs/current/mod/mod_headers.html. + Header onsuccess unset X-Content-Type-Options # Disable content sniffing, since it's an attack vector. Header always set X-Content-Type-Options nosniff # Disable Proxy header, since it's an attack vector. diff --git a/drupal7/web/CHANGELOG.txt b/drupal7/web/CHANGELOG.txt index 73c7f8f..2cf701b 100644 --- a/drupal7/web/CHANGELOG.txt +++ b/drupal7/web/CHANGELOG.txt @@ -1,3 +1,18 @@ +Drupal 7.103, 2024-12-04 +------------------------ +- So Long, and Thanks for All the Fish + +Drupal 7.102, 2024-11-20 +------------------------ +- Fixed security issues: + - SA-CORE-2024-005 + - SA-CORE-2024-008 + +Drupal 7.101, 2024-06-05 +------------------------ +- Various security improvements +- Various bug fixes, optimizations and improvements + Drupal 7.100, 2024-03-06 ------------------------ - Security improvements diff --git a/drupal7/web/includes/ajax.inc b/drupal7/web/includes/ajax.inc index db53e31..b511ad3 100644 --- a/drupal7/web/includes/ajax.inc +++ b/drupal7/web/includes/ajax.inc @@ -323,7 +323,7 @@ function ajax_render($commands = array()) { function ajax_get_form() { $form_state = form_state_defaults(); - $form_build_id = $_POST['form_build_id']; + $form_build_id = (isset($_POST['form_build_id']) ? $_POST['form_build_id'] : ''); // Get the form from the cache. $form = form_get_cache($form_build_id, $form_state); diff --git a/drupal7/web/includes/bootstrap.inc b/drupal7/web/includes/bootstrap.inc index 7a0169a..5d9a59a 100644 --- a/drupal7/web/includes/bootstrap.inc +++ b/drupal7/web/includes/bootstrap.inc @@ -8,7 +8,7 @@ /** * The current system version. */ -define('VERSION', '7.100'); +define('VERSION', '7.103'); /** * Core API compatibility. @@ -729,8 +729,8 @@ function drupal_environment_initialize() { /** * Validates that a hostname (for example $_SERVER['HTTP_HOST']) is safe. * - * @return - * TRUE if only containing valid characters, or FALSE otherwise. + * @return bool + * TRUE if it only contains valid characters, FALSE otherwise. */ function drupal_valid_http_host($host) { // Limit the length of the host name to 1000 bytes to prevent DoS attacks with @@ -807,8 +807,8 @@ function drupal_settings_initialize() { // Otherwise use $base_url as session name, without the protocol // to use the same session identifiers across HTTP and HTTPS. list( , $session_name) = explode('://', $base_url, 2); - // HTTP_HOST can be modified by a visitor, but we already sanitized it - // in drupal_settings_initialize(). + // HTTP_HOST can be modified by a visitor, but we already sanitized it in + // drupal_environment_initialize(). if (!empty($_SERVER['HTTP_HOST'])) { $cookie_domain = _drupal_get_cookie_domain($_SERVER['HTTP_HOST']); } @@ -2285,7 +2285,8 @@ function drupal_block_denied($ip) { * The number of random bytes to fetch and base64 encode. * * @return string - * The base64 encoded result will have a length of up to 4 * $byte_count. + * A base-64 encoded string, with + replaced with -, / with _ and any = + * padding characters removed. */ function drupal_random_key($byte_count = 32) { return drupal_base64_encode(drupal_random_bytes($byte_count)); @@ -2718,6 +2719,18 @@ function _drupal_bootstrap_configuration() { // Initialize the configuration, including variables from settings.php. drupal_settings_initialize(); + // Check trusted HTTP Host headers to protect against header attacks. + if (PHP_SAPI !== 'cli') { + $host_patterns = variable_get('trusted_host_patterns', array()); + if (!empty($host_patterns)) { + if (!drupal_check_trusted_hosts($_SERVER['HTTP_HOST'], $host_patterns)) { + header($_SERVER['SERVER_PROTOCOL'] . ' 400 Bad Request'); + print 'The provided host name is not valid for this server.'; + exit; + } + } + } + // Sanitize unsafe keys from the request. DrupalRequestSanitizer::sanitize(); } @@ -3947,6 +3960,36 @@ function drupal_clear_opcode_cache($filepath) { } } +/** + * Checks trusted HTTP Host headers to protect against header injection attacks. + * + * @param string|null $host + * The host name. + * @param array $host_patterns + * The array of trusted host patterns. + * + * @return bool + * TRUE if the host is trusted, FALSE otherwise. + */ +function drupal_check_trusted_hosts($host, array $host_patterns) { + if (!empty($host) && !empty($host_patterns)) { + // Trim and remove the port number from host; host is lowercase as per + // RFC 952/2181. + $host = strtolower(preg_replace('/:\d+$/', '', trim($host))); + + foreach ($host_patterns as $pattern) { + $pattern = sprintf('{%s}i', $pattern); + if (preg_match($pattern, $host)) { + return TRUE; + } + } + + return FALSE; + } + + return TRUE; +} + /** * Drupal's wrapper around PHP's setcookie() function. * diff --git a/drupal7/web/includes/common.inc b/drupal7/web/includes/common.inc index 2648c72..c19ed98 100644 --- a/drupal7/web/includes/common.inc +++ b/drupal7/web/includes/common.inc @@ -2967,7 +2967,11 @@ function drupal_set_time_limit($time_limit) { * The path to the requested item or an empty string if the item is not found. */ function drupal_get_path($type, $name) { - return dirname(drupal_get_filename($type, $name)); + if ($filename = drupal_get_filename($type, $name)) { + return dirname($filename); + } + + return ""; } /** @@ -5544,8 +5548,27 @@ function drupal_cron_run() { DrupalQueue::get($queue_name)->createQueue(); } + $module_previous = ''; + + // If detailed logging isn't enabled, don't log individual execution times. + $time_logging_enabled = variable_get('cron_detailed_logging', DRUPAL_CRON_DETAILED_LOGGING); + // Iterate through the modules calling their cron handlers (if any): foreach (module_implements('cron') as $module) { + if ($time_logging_enabled) { + if (!$module_previous) { + watchdog('cron', 'Starting execution of @module_cron().', array('@module' => $module)); + } + else { + watchdog('cron', 'Starting execution of @module_cron(), execution of @module_previous_cron() took @time.', array( + '@module' => $module, + '@module_previous' => $module_previous, + '@time' => timer_read('cron_' . $module_previous) . 'ms', + )); + } + timer_start('cron_' . $module); + } + // Do not let an exception thrown by one module disturb another. try { module_invoke($module, 'cron'); @@ -5553,6 +5576,20 @@ function drupal_cron_run() { catch (Exception $e) { watchdog_exception('cron', $e); } + + if ($time_logging_enabled) { + timer_stop('cron_' . $module); + $module_previous = $module; + } + } + + if ($time_logging_enabled) { + if ($module_previous) { + watchdog('cron', 'Execution of @module_previous_cron() took @time.', array( + '@module_previous' => $module_previous, + '@time' => timer_read('cron_' . $module_previous) . 'ms', + )); + } } // Record cron time. @@ -8212,7 +8249,10 @@ function entity_get_controller($entity_type) { $controllers = &drupal_static(__FUNCTION__, array()); if (!isset($controllers[$entity_type])) { $type_info = entity_get_info($entity_type); - $class = $type_info['controller class']; + // Explicitly fail for malformed entities missing a valid controller class. + if (!isset($type_info['controller class']) || !class_exists($class = $type_info['controller class'])) { + throw new EntityMalformedException(t('Missing or non-existent controller class on entity of type @entity_type.', array('@entity_type' => $entity_type))); + } $controllers[$entity_type] = new $class($entity_type); } return $controllers[$entity_type]; diff --git a/drupal7/web/includes/database/mysql/query.inc b/drupal7/web/includes/database/mysql/query.inc index 3f0bcb7..525b895 100644 --- a/drupal7/web/includes/database/mysql/query.inc +++ b/drupal7/web/includes/database/mysql/query.inc @@ -63,6 +63,14 @@ class InsertQuery_mysql extends InsertQuery { $max_placeholder = 0; $values = array(); + if (!is_array($this->insertValues)) { + if (version_compare(PHP_VERSION, '7.4', '>=')) { + throw new UnexpectedValueException(); + } + else { + drupal_trigger_fatal_error('Unexpected Value'); + } + } if (count($this->insertValues)) { foreach ($this->insertValues as $insert_values) { $placeholders = array(); @@ -96,6 +104,14 @@ class TruncateQuery_mysql extends TruncateQuery { } class UpdateQuery_mysql extends UpdateQuery { public function __toString() { if (method_exists($this->connection, 'escapeField')) { + if (!is_array($this->fields)) { + if (version_compare(PHP_VERSION, '7.4', '>=')) { + throw new UnexpectedValueException(); + } + else { + drupal_trigger_fatal_error('Unexpected Value'); + } + } $escapedFields = array(); foreach ($this->fields as $field => $data) { $field = $this->connection->escapeField($field); diff --git a/drupal7/web/includes/database/pgsql/query.inc b/drupal7/web/includes/database/pgsql/query.inc index e2d587d..5731e55 100644 --- a/drupal7/web/includes/database/pgsql/query.inc +++ b/drupal7/web/includes/database/pgsql/query.inc @@ -120,7 +120,15 @@ class InsertQuery_pgsql extends InsertQuery { $max_placeholder = 0; $values = array(); - if (count($this->insertValues)) { + if (!is_array($this->insertValues)) { + if (version_compare(PHP_VERSION, '7.4', '>=')) { + throw new UnexpectedValueException(); + } + else { + drupal_trigger_fatal_error('Unexpected Value'); + } + } + if (count($this->insertValues)) { foreach ($this->insertValues as $insert_values) { $placeholders = array(); diff --git a/drupal7/web/includes/database/prefetch.inc b/drupal7/web/includes/database/prefetch.inc index 2a0bd55..d995268 100644 --- a/drupal7/web/includes/database/prefetch.inc +++ b/drupal7/web/includes/database/prefetch.inc @@ -293,6 +293,15 @@ class DatabaseStatementPrefetch implements Iterator, DatabaseStatementInterface $class_name = $this->fetchOptions['class']; } if (count($this->fetchOptions['constructor_args'])) { + // Verify the current db connection to avoid this code being called + // in an inappropriate context. + $db_connection_options = Database::getConnection()->getConnectionOptions(); + $defaults = array('sqlite', 'oracle'); + $extras = variable_get('database_statement_prefetch_valid_db_drivers', array()); + $valid_db_drivers = array_merge($defaults, $extras); + if (!in_array($db_connection_options['driver'], $valid_db_drivers)) { + throw new BadMethodCallException(); + } $reflector = new ReflectionClass($class_name); $result = $reflector->newInstanceArgs($this->fetchOptions['constructor_args']); } diff --git a/drupal7/web/includes/database/query.inc b/drupal7/web/includes/database/query.inc index 1c33ab4..5a6642a 100644 --- a/drupal7/web/includes/database/query.inc +++ b/drupal7/web/includes/database/query.inc @@ -1190,6 +1190,15 @@ class UpdateQuery extends Query implements QueryConditionInterface { * The prepared statement. */ public function __toString() { + if (!is_array($this->expressionFields) || !is_array($this->fields)) { + if (version_compare(PHP_VERSION, '7.4', '>=')) { + throw new UnexpectedValueException(); + } + else { + drupal_trigger_fatal_error('Unexpected Value'); + } + } + // Create a sanitized comment string to prepend to the query. $comments = $this->connection->makeComment($this->comments); diff --git a/drupal7/web/includes/database/sqlite/database.inc b/drupal7/web/includes/database/sqlite/database.inc index 2cf83cc..27a16f0 100644 --- a/drupal7/web/includes/database/sqlite/database.inc +++ b/drupal7/web/includes/database/sqlite/database.inc @@ -134,6 +134,9 @@ class DatabaseConnection_sqlite extends DatabaseConnection { */ public function __destruct() { if ($this->tableDropped && !empty($this->attachedDatabases)) { + if (!is_array($this->attachedDatabases)) { + throw new UnexpectedValueException(); + } foreach ($this->attachedDatabases as $prefix) { // Check if the database is now empty, ignore the internal SQLite tables. try { diff --git a/drupal7/web/includes/errors.inc b/drupal7/web/includes/errors.inc index 4b1f028..ececd89 100644 --- a/drupal7/web/includes/errors.inc +++ b/drupal7/web/includes/errors.inc @@ -216,7 +216,7 @@ function _drupal_log_error($error, $fatal = FALSE) { if ($fatal) { // When called from CLI, simply output a plain text message. print html_entity_decode(strip_tags(t('%type: !message in %function (line %line of %file).', $error))). "\n"; - exit; + exit(1); } } @@ -224,7 +224,7 @@ function _drupal_log_error($error, $fatal = FALSE) { if ($fatal) { if (error_displayable($error)) { // When called from JavaScript, simply output the error message. - print t('%type: !message in %function (line %line of %file).', $error); + print t('%type: !message in %function (line %line of %file).', _drupal_strip_error_file_path($error)); } exit; } @@ -242,7 +242,7 @@ function _drupal_log_error($error, $fatal = FALSE) { $class = 'status'; } - drupal_set_message(t('%type: !message in %function (line %line of %file).', $error), $class); + drupal_set_message(t('%type: !message in %function (line %line of %file).', _drupal_strip_error_file_path($error)), $class); } if ($fatal) { @@ -291,3 +291,28 @@ function _drupal_get_last_caller($backtrace) { } return $call; } + +/** + * Strip full path information from error details. + * + * @param $error + * An array with the following keys: %type, !message, %function, %file, %line + * and severity_level. + * + * @return + * An array with the same keys as the $error param but with full paths + * stripped from the %file element + */ +function _drupal_strip_error_file_path($error) { + if (!empty($error['%file'])) { + if (($drupal_root_position = strpos($error['%file'], DRUPAL_ROOT)) === 0) { + $root_length = strlen(DRUPAL_ROOT); + $error['%file'] = substr($error['%file'], $root_length + 1); + } + elseif ($drupal_root_position !== FALSE) { + // As a fallback, make sure DRUPAL_ROOT's value is not in the path. + $error['%file'] = str_replace(DRUPAL_ROOT, 'DRUPAL_ROOT', $error['%file']); + } + } + return $error; +} diff --git a/drupal7/web/includes/file.inc b/drupal7/web/includes/file.inc index 250747e..5b12af4 100644 --- a/drupal7/web/includes/file.inc +++ b/drupal7/web/includes/file.inc @@ -2082,7 +2082,7 @@ function file_download() { $target = implode('/', $args); $uri = $scheme . '://' . $target; $uri = file_uri_normalize_dot_segments($uri); - if (file_stream_wrapper_valid_scheme($scheme) && file_exists($uri)) { + if (file_stream_wrapper_valid_scheme($scheme) && is_file($uri)) { $headers = file_download_headers($uri); if (count($headers)) { file_transfer($uri, $headers); diff --git a/drupal7/web/includes/mail.inc b/drupal7/web/includes/mail.inc index a97c788..0da9209 100644 --- a/drupal7/web/includes/mail.inc +++ b/drupal7/web/includes/mail.inc @@ -624,7 +624,7 @@ function drupal_mail_format_display_name($string) { */ function _drupal_wrap_mail_line(&$line, $key, $values) { // Use soft-breaks only for purely quoted or unindented text. - $line = wordwrap($line, 77 - $values['length'], $values['soft'] ? " \n" : "\n"); + $line = wordwrap($line, 77 - $values['length'], $values['soft'] ? " \n" : "\n"); // Break really long words at the maximum width allowed. $line = wordwrap($line, 996 - $values['length'], $values['soft'] ? " \n" : "\n", TRUE); } diff --git a/drupal7/web/includes/unicode.inc b/drupal7/web/includes/unicode.inc index f41eb8f..14f9251 100644 --- a/drupal7/web/includes/unicode.inc +++ b/drupal7/web/includes/unicode.inc @@ -478,6 +478,9 @@ function decode_entities($text) { */ function drupal_strlen($text) { global $multibyte; + if (is_null($text)) { + return 0; + } if ($multibyte == UNICODE_MULTIBYTE) { return mb_strlen($text); } diff --git a/drupal7/web/includes/updater.inc b/drupal7/web/includes/updater.inc index d86e3b6..749cd94 100644 --- a/drupal7/web/includes/updater.inc +++ b/drupal7/web/includes/updater.inc @@ -245,9 +245,6 @@ class Updater { // Make sure the installation parent directory exists and is writable. $this->prepareInstallDirectory($filetransfer, $args['install_dir']); - // Note: If the project is installed in sites/all, it will not be - // deleted. It will be installed in sites/default as that will override - // the sites/all reference and not break other sites which are using it. if (is_dir($args['install_dir'] . '/' . $this->name)) { // Remove the existing installed file. $filetransfer->removeDirectory($args['install_dir'] . '/' . $this->name); diff --git a/drupal7/web/includes/utility.inc b/drupal7/web/includes/utility.inc index f651fd6..5c2365e 100644 --- a/drupal7/web/includes/utility.inc +++ b/drupal7/web/includes/utility.inc @@ -26,7 +26,7 @@ function drupal_var_export($var, $prefix = '') { // Don't export keys if the array is non associative. $export_keys = array_values($var) != $var; foreach ($var as $key => $value) { - $output .= ' ' . ($export_keys ? drupal_var_export($key) . ' => ' : '') . drupal_var_export($value, ' ', FALSE) . ",\n"; + $output .= ' ' . ($export_keys ? drupal_var_export($key) . ' => ' : '') . drupal_var_export($value, ' ') . ",\n"; } $output .= ')'; } @@ -35,7 +35,6 @@ function drupal_var_export($var, $prefix = '') { $output = $var ? 'TRUE' : 'FALSE'; } elseif (is_string($var)) { - $line_safe_var = str_replace("\n", '\n', $var); if (strpos($var, "\n") !== FALSE || strpos($var, "'") !== FALSE) { // If the string contains a line break or a single quote, use the // double quote export mode. Encode backslash and double quotes and diff --git a/drupal7/web/modules/aggregator/aggregator.info b/drupal7/web/modules/aggregator/aggregator.info index bbba98b..16b456d 100644 --- a/drupal7/web/modules/aggregator/aggregator.info +++ b/drupal7/web/modules/aggregator/aggregator.info @@ -7,7 +7,7 @@ files[] = aggregator.test configure = admin/config/services/aggregator/settings stylesheets[all][] = aggregator.css -; Information added by Drupal.org packaging script on 2024-03-06 -version = "7.100" +; Information added by Drupal.org packaging script on 2024-12-04 +version = "7.103" project = "drupal" -datestamp = "1709734591" +datestamp = "1733324608" diff --git a/drupal7/web/modules/aggregator/tests/aggregator_test.info b/drupal7/web/modules/aggregator/tests/aggregator_test.info index 177f697..bbe31ae 100644 --- a/drupal7/web/modules/aggregator/tests/aggregator_test.info +++ b/drupal7/web/modules/aggregator/tests/aggregator_test.info @@ -5,7 +5,7 @@ version = VERSION core = 7.x hidden = TRUE -; Information added by Drupal.org packaging script on 2024-03-06 -version = "7.100" +; Information added by Drupal.org packaging script on 2024-12-04 +version = "7.103" project = "drupal" -datestamp = "1709734591" +datestamp = "1733324608" diff --git a/drupal7/web/modules/announcements_feed/announcements_feed.info b/drupal7/web/modules/announcements_feed/announcements_feed.info index bda3efe..daed719 100644 --- a/drupal7/web/modules/announcements_feed/announcements_feed.info +++ b/drupal7/web/modules/announcements_feed/announcements_feed.info @@ -5,7 +5,7 @@ version = VERSION core = 7.x files[] = tests/announce_feed_test.test -; Information added by Drupal.org packaging script on 2024-03-06 -version = "7.100" +; Information added by Drupal.org packaging script on 2024-12-04 +version = "7.103" project = "drupal" -datestamp = "1709734591" +datestamp = "1733324608" diff --git a/drupal7/web/modules/announcements_feed/tests/announce_feed_test.info b/drupal7/web/modules/announcements_feed/tests/announce_feed_test.info index 6b6e03d..252ba32 100644 --- a/drupal7/web/modules/announcements_feed/tests/announce_feed_test.info +++ b/drupal7/web/modules/announcements_feed/tests/announce_feed_test.info @@ -4,7 +4,7 @@ package = Testing core = 7.x hidden = TRUE -; Information added by Drupal.org packaging script on 2024-03-06 -version = "7.100" +; Information added by Drupal.org packaging script on 2024-12-04 +version = "7.103" project = "drupal" -datestamp = "1709734591" +datestamp = "1733324608" diff --git a/drupal7/web/modules/block/block.info b/drupal7/web/modules/block/block.info index 50197d3..53b03cb 100644 --- a/drupal7/web/modules/block/block.info +++ b/drupal7/web/modules/block/block.info @@ -6,7 +6,7 @@ core = 7.x files[] = block.test configure = admin/structure/block -; Information added by Drupal.org packaging script on 2024-03-06 -version = "7.100" +; Information added by Drupal.org packaging script on 2024-12-04 +version = "7.103" project = "drupal" -datestamp = "1709734591" +datestamp = "1733324608" diff --git a/drupal7/web/modules/block/tests/block_test.info b/drupal7/web/modules/block/tests/block_test.info index 4c771df..b4f6f94 100644 --- a/drupal7/web/modules/block/tests/block_test.info +++ b/drupal7/web/modules/block/tests/block_test.info @@ -5,7 +5,7 @@ version = VERSION core = 7.x hidden = TRUE -; Information added by Drupal.org packaging script on 2024-03-06 -version = "7.100" +; Information added by Drupal.org packaging script on 2024-12-04 +version = "7.103" project = "drupal" -datestamp = "1709734591" +datestamp = "1733324608" diff --git a/drupal7/web/modules/block/tests/themes/block_test_theme/block_test_theme.info b/drupal7/web/modules/block/tests/themes/block_test_theme/block_test_theme.info index 32d1623..0dad7bd 100644 --- a/drupal7/web/modules/block/tests/themes/block_test_theme/block_test_theme.info +++ b/drupal7/web/modules/block/tests/themes/block_test_theme/block_test_theme.info @@ -13,7 +13,7 @@ regions[footer] = Footer regions[highlighted] = Highlighted regions[help] = Help -; Information added by Drupal.org packaging script on 2024-03-06 -version = "7.100" +; Information added by Drupal.org packaging script on 2024-12-04 +version = "7.103" project = "drupal" -datestamp = "1709734591" +datestamp = "1733324608" diff --git a/drupal7/web/modules/blog/blog.info b/drupal7/web/modules/blog/blog.info index 490f4d9..1aacd1a 100644 --- a/drupal7/web/modules/blog/blog.info +++ b/drupal7/web/modules/blog/blog.info @@ -5,7 +5,7 @@ version = VERSION core = 7.x files[] = blog.test -; Information added by Drupal.org packaging script on 2024-03-06 -version = "7.100" +; Information added by Drupal.org packaging script on 2024-12-04 +version = "7.103" project = "drupal" -datestamp = "1709734591" +datestamp = "1733324608" diff --git a/drupal7/web/modules/book/book.info b/drupal7/web/modules/book/book.info index 86ebab4..e88763e 100644 --- a/drupal7/web/modules/book/book.info +++ b/drupal7/web/modules/book/book.info @@ -7,7 +7,7 @@ files[] = book.test configure = admin/content/book/settings stylesheets[all][] = book.css -; Information added by Drupal.org packaging script on 2024-03-06 -version = "7.100" +; Information added by Drupal.org packaging script on 2024-12-04 +version = "7.103" project = "drupal" -datestamp = "1709734591" +datestamp = "1733324608" diff --git a/drupal7/web/modules/color/color.info b/drupal7/web/modules/color/color.info index 421a497..ff5fbb1 100644 --- a/drupal7/web/modules/color/color.info +++ b/drupal7/web/modules/color/color.info @@ -5,7 +5,7 @@ version = VERSION core = 7.x files[] = color.test -; Information added by Drupal.org packaging script on 2024-03-06 -version = "7.100" +; Information added by Drupal.org packaging script on 2024-12-04 +version = "7.103" project = "drupal" -datestamp = "1709734591" +datestamp = "1733324608" diff --git a/drupal7/web/modules/comment/comment.info b/drupal7/web/modules/comment/comment.info index 0c0e322..5ee4c47 100644 --- a/drupal7/web/modules/comment/comment.info +++ b/drupal7/web/modules/comment/comment.info @@ -9,7 +9,7 @@ files[] = comment.test configure = admin/content/comment stylesheets[all][] = comment.css -; Information added by Drupal.org packaging script on 2024-03-06 -version = "7.100" +; Information added by Drupal.org packaging script on 2024-12-04 +version = "7.103" project = "drupal" -datestamp = "1709734591" +datestamp = "1733324608" diff --git a/drupal7/web/modules/comment/tests/comment_hook_test.info b/drupal7/web/modules/comment/tests/comment_hook_test.info index 1976fca..983d274 100644 --- a/drupal7/web/modules/comment/tests/comment_hook_test.info +++ b/drupal7/web/modules/comment/tests/comment_hook_test.info @@ -5,7 +5,7 @@ package = Testing version = VERSION hidden = TRUE -; Information added by Drupal.org packaging script on 2024-03-06 -version = "7.100" +; Information added by Drupal.org packaging script on 2024-12-04 +version = "7.103" project = "drupal" -datestamp = "1709734591" +datestamp = "1733324608" diff --git a/drupal7/web/modules/contact/contact.info b/drupal7/web/modules/contact/contact.info index 2063565..9484ea1 100644 --- a/drupal7/web/modules/contact/contact.info +++ b/drupal7/web/modules/contact/contact.info @@ -6,7 +6,7 @@ core = 7.x files[] = contact.test configure = admin/structure/contact -; Information added by Drupal.org packaging script on 2024-03-06 -version = "7.100" +; Information added by Drupal.org packaging script on 2024-12-04 +version = "7.103" project = "drupal" -datestamp = "1709734591" +datestamp = "1733324608" diff --git a/drupal7/web/modules/contextual/contextual.info b/drupal7/web/modules/contextual/contextual.info index 049121f..737d404 100644 --- a/drupal7/web/modules/contextual/contextual.info +++ b/drupal7/web/modules/contextual/contextual.info @@ -5,7 +5,7 @@ version = VERSION core = 7.x files[] = contextual.test -; Information added by Drupal.org packaging script on 2024-03-06 -version = "7.100" +; Information added by Drupal.org packaging script on 2024-12-04 +version = "7.103" project = "drupal" -datestamp = "1709734591" +datestamp = "1733324608" diff --git a/drupal7/web/modules/dashboard/dashboard.info b/drupal7/web/modules/dashboard/dashboard.info index 8c48c09..82b3f96 100644 --- a/drupal7/web/modules/dashboard/dashboard.info +++ b/drupal7/web/modules/dashboard/dashboard.info @@ -7,7 +7,7 @@ files[] = dashboard.test dependencies[] = block configure = admin/dashboard/customize -; Information added by Drupal.org packaging script on 2024-03-06 -version = "7.100" +; Information added by Drupal.org packaging script on 2024-12-04 +version = "7.103" project = "drupal" -datestamp = "1709734591" +datestamp = "1733324608" diff --git a/drupal7/web/modules/dblog/dblog.info b/drupal7/web/modules/dblog/dblog.info index 9e5265a..748c3b9 100644 --- a/drupal7/web/modules/dblog/dblog.info +++ b/drupal7/web/modules/dblog/dblog.info @@ -5,7 +5,7 @@ version = VERSION core = 7.x files[] = dblog.test -; Information added by Drupal.org packaging script on 2024-03-06 -version = "7.100" +; Information added by Drupal.org packaging script on 2024-12-04 +version = "7.103" project = "drupal" -datestamp = "1709734591" +datestamp = "1733324608" diff --git a/drupal7/web/modules/dblog/dblog.test b/drupal7/web/modules/dblog/dblog.test index 9c26665..c7e5367 100644 --- a/drupal7/web/modules/dblog/dblog.test +++ b/drupal7/web/modules/dblog/dblog.test @@ -128,12 +128,30 @@ class DBLogTestCase extends DrupalWebTestCase { $count = db_query('SELECT COUNT(wid) FROM {watchdog}')->fetchField(); $this->assertTrue($count > $row_limit, format_string('Dblog row count of @count exceeds row limit of @limit', array('@count' => $count, '@limit' => $row_limit))); + // Get last ID to compare against; log entries get deleted, so we can't + // reliably add the number of newly created log entries to the current count + // to measure number of log entries created by cron. + $last_id = db_query('SELECT MAX(wid) FROM {watchdog}')->fetchField(); + // Run a cron job. $this->cronRun(); - // Verify that the database log row count equals the row limit plus one - // because cron adds a record after it runs. - $count = db_query('SELECT COUNT(wid) FROM {watchdog}')->fetchField(); - $this->assertTrue($count == $row_limit + 1, format_string('Dblog row count of @count equals row limit of @limit plus one', array('@count' => $count, '@limit' => $row_limit))); + + // Get last ID after cron was run. + $current_id = db_query('SELECT MAX(wid) FROM {watchdog}')->fetchField(); + + // Only one final "cron is finished" message should be logged. + $this->assertEqual($current_id - $last_id, 1, format_string('Cron added @count of @expected new log entries', array('@count' => $current_id - $last_id, '@expected' => 1))); + + // Test enabling of detailed cron logging. + // Get the number of enabled modules. Cron adds a log entry for each module. + $module_count = count(module_implements('cron')); + variable_set('cron_detailed_logging', 1); + $last_id = db_query('SELECT MAX(wid) FROM {watchdog}')->fetchField(); + $this->cronRun(); + $current_id = db_query('SELECT MAX(wid) FROM {watchdog}')->fetchField(); + + // The number of log entries created. + $this->assertEqual($current_id - $last_id, $module_count + 2, format_string('Cron added @count of @expected new log entries', array('@count' => $current_id - $last_id, '@expected' => $module_count + 2))); } /** diff --git a/drupal7/web/modules/field/field.info b/drupal7/web/modules/field/field.info index 7e1253c..cb66da7 100644 --- a/drupal7/web/modules/field/field.info +++ b/drupal7/web/modules/field/field.info @@ -11,7 +11,7 @@ dependencies[] = field_sql_storage required = TRUE stylesheets[all][] = theme/field.css -; Information added by Drupal.org packaging script on 2024-03-06 -version = "7.100" +; Information added by Drupal.org packaging script on 2024-12-04 +version = "7.103" project = "drupal" -datestamp = "1709734591" +datestamp = "1733324608" diff --git a/drupal7/web/modules/field/modules/field_sql_storage/field_sql_storage.info b/drupal7/web/modules/field/modules/field_sql_storage/field_sql_storage.info index 7bc3110..6662d1c 100644 --- a/drupal7/web/modules/field/modules/field_sql_storage/field_sql_storage.info +++ b/drupal7/web/modules/field/modules/field_sql_storage/field_sql_storage.info @@ -7,7 +7,7 @@ dependencies[] = field files[] = field_sql_storage.test required = TRUE -; Information added by Drupal.org packaging script on 2024-03-06 -version = "7.100" +; Information added by Drupal.org packaging script on 2024-12-04 +version = "7.103" project = "drupal" -datestamp = "1709734591" +datestamp = "1733324608" diff --git a/drupal7/web/modules/field/modules/list/list.info b/drupal7/web/modules/field/modules/list/list.info index 1e1a507..e884236 100644 --- a/drupal7/web/modules/field/modules/list/list.info +++ b/drupal7/web/modules/field/modules/list/list.info @@ -7,7 +7,7 @@ dependencies[] = field dependencies[] = options files[] = tests/list.test -; Information added by Drupal.org packaging script on 2024-03-06 -version = "7.100" +; Information added by Drupal.org packaging script on 2024-12-04 +version = "7.103" project = "drupal" -datestamp = "1709734591" +datestamp = "1733324608" diff --git a/drupal7/web/modules/field/modules/list/tests/list_test.info b/drupal7/web/modules/field/modules/list/tests/list_test.info index 06abb01..c08d4a2 100644 --- a/drupal7/web/modules/field/modules/list/tests/list_test.info +++ b/drupal7/web/modules/field/modules/list/tests/list_test.info @@ -5,7 +5,7 @@ package = Testing version = VERSION hidden = TRUE -; Information added by Drupal.org packaging script on 2024-03-06 -version = "7.100" +; Information added by Drupal.org packaging script on 2024-12-04 +version = "7.103" project = "drupal" -datestamp = "1709734591" +datestamp = "1733324608" diff --git a/drupal7/web/modules/field/modules/number/number.info b/drupal7/web/modules/field/modules/number/number.info index 81bacf2..955adac 100644 --- a/drupal7/web/modules/field/modules/number/number.info +++ b/drupal7/web/modules/field/modules/number/number.info @@ -6,7 +6,7 @@ core = 7.x dependencies[] = field files[] = number.test -; Information added by Drupal.org packaging script on 2024-03-06 -version = "7.100" +; Information added by Drupal.org packaging script on 2024-12-04 +version = "7.103" project = "drupal" -datestamp = "1709734591" +datestamp = "1733324608" diff --git a/drupal7/web/modules/field/modules/options/options.info b/drupal7/web/modules/field/modules/options/options.info index 3ab8339..8ca0256 100644 --- a/drupal7/web/modules/field/modules/options/options.info +++ b/drupal7/web/modules/field/modules/options/options.info @@ -6,7 +6,7 @@ core = 7.x dependencies[] = field files[] = options.test -; Information added by Drupal.org packaging script on 2024-03-06 -version = "7.100" +; Information added by Drupal.org packaging script on 2024-12-04 +version = "7.103" project = "drupal" -datestamp = "1709734591" +datestamp = "1733324608" diff --git a/drupal7/web/modules/field/modules/text/text.info b/drupal7/web/modules/field/modules/text/text.info index 8e164f3..80e793c 100644 --- a/drupal7/web/modules/field/modules/text/text.info +++ b/drupal7/web/modules/field/modules/text/text.info @@ -7,7 +7,7 @@ dependencies[] = field files[] = text.test required = TRUE -; Information added by Drupal.org packaging script on 2024-03-06 -version = "7.100" +; Information added by Drupal.org packaging script on 2024-12-04 +version = "7.103" project = "drupal" -datestamp = "1709734591" +datestamp = "1733324608" diff --git a/drupal7/web/modules/field/modules/text/text.test b/drupal7/web/modules/field/modules/text/text.test index 3da56f0..2303cb1 100644 --- a/drupal7/web/modules/field/modules/text/text.test +++ b/drupal7/web/modules/field/modules/text/text.test @@ -377,6 +377,15 @@ class TextSummaryTestCase extends DrupalWebTestCase { // Test text_summary() for different sizes. for ($i = 0; $i <= 37; $i++) { $this->callTextSummary($text, $expected[$i], NULL, $i); + + // libxml2 library changed parsing behavior on version 2.9.14. Skip + // specific edge-case testing for all further versions. + // @see https://gitlab.gnome.org/GNOME/libxml2/-/issues/474 + // @see https://www.drupal.org/project/drupal/issues/3397882 + if ($i == 1 && defined('LIBXML_VERSION') && LIBXML_VERSION >= 20914) { + continue; + } + $this->callTextSummary($text, $expected_lb[$i], 'plain_text', $i); $this->callTextSummary($text, $expected_lb[$i], 'filtered_html', $i); } diff --git a/drupal7/web/modules/field/tests/field_test.info b/drupal7/web/modules/field/tests/field_test.info index 1e5281d..2430d7d 100644 --- a/drupal7/web/modules/field/tests/field_test.info +++ b/drupal7/web/modules/field/tests/field_test.info @@ -6,7 +6,7 @@ files[] = field_test.entity.inc version = VERSION hidden = TRUE -; Information added by Drupal.org packaging script on 2024-03-06 -version = "7.100" +; Information added by Drupal.org packaging script on 2024-12-04 +version = "7.103" project = "drupal" -datestamp = "1709734591" +datestamp = "1733324608" diff --git a/drupal7/web/modules/field/tests/field_test_schema_alter.info b/drupal7/web/modules/field/tests/field_test_schema_alter.info index 30300cf..7fae99c 100644 --- a/drupal7/web/modules/field/tests/field_test_schema_alter.info +++ b/drupal7/web/modules/field/tests/field_test_schema_alter.info @@ -5,7 +5,7 @@ package = Testing version = VERSION hidden = TRUE -; Information added by Drupal.org packaging script on 2024-03-06 -version = "7.100" +; Information added by Drupal.org packaging script on 2024-12-04 +version = "7.103" project = "drupal" -datestamp = "1709734591" +datestamp = "1733324608" diff --git a/drupal7/web/modules/field_ui/field_ui.info b/drupal7/web/modules/field_ui/field_ui.info index b9e2ff1..4b284ee 100644 --- a/drupal7/web/modules/field_ui/field_ui.info +++ b/drupal7/web/modules/field_ui/field_ui.info @@ -6,7 +6,7 @@ core = 7.x dependencies[] = field files[] = field_ui.test -; Information added by Drupal.org packaging script on 2024-03-06 -version = "7.100" +; Information added by Drupal.org packaging script on 2024-12-04 +version = "7.103" project = "drupal" -datestamp = "1709734591" +datestamp = "1733324608" diff --git a/drupal7/web/modules/file/file.info b/drupal7/web/modules/file/file.info index e6eabed..4777dc9 100644 --- a/drupal7/web/modules/file/file.info +++ b/drupal7/web/modules/file/file.info @@ -6,7 +6,7 @@ core = 7.x dependencies[] = field files[] = tests/file.test -; Information added by Drupal.org packaging script on 2024-03-06 -version = "7.100" +; Information added by Drupal.org packaging script on 2024-12-04 +version = "7.103" project = "drupal" -datestamp = "1709734591" +datestamp = "1733324608" diff --git a/drupal7/web/modules/file/tests/file_module_test.info b/drupal7/web/modules/file/tests/file_module_test.info index ec01fbe..cfc5250 100644 --- a/drupal7/web/modules/file/tests/file_module_test.info +++ b/drupal7/web/modules/file/tests/file_module_test.info @@ -5,7 +5,7 @@ version = VERSION core = 7.x hidden = TRUE -; Information added by Drupal.org packaging script on 2024-03-06 -version = "7.100" +; Information added by Drupal.org packaging script on 2024-12-04 +version = "7.103" project = "drupal" -datestamp = "1709734591" +datestamp = "1733324608" diff --git a/drupal7/web/modules/filter/filter.info b/drupal7/web/modules/filter/filter.info index d47116a..7325980 100644 --- a/drupal7/web/modules/filter/filter.info +++ b/drupal7/web/modules/filter/filter.info @@ -7,7 +7,7 @@ files[] = filter.test required = TRUE configure = admin/config/content/formats -; Information added by Drupal.org packaging script on 2024-03-06 -version = "7.100" +; Information added by Drupal.org packaging script on 2024-12-04 +version = "7.103" project = "drupal" -datestamp = "1709734591" +datestamp = "1733324608" diff --git a/drupal7/web/modules/filter/filter.module b/drupal7/web/modules/filter/filter.module index 7c8b2b8..103d066 100644 --- a/drupal7/web/modules/filter/filter.module +++ b/drupal7/web/modules/filter/filter.module @@ -1515,14 +1515,26 @@ function _filter_url($text, $filter) { // re-split after each task, since all injected HTML tags must be correctly // protected before the next task. foreach ($tasks as $task => $pattern) { + // Store the current text in case any of the preg_* functions fail. + $saved_text = $text; + // HTML comments need to be handled separately, as they may contain HTML // markup, especially a '>'. Therefore, remove all comment contents and add // them back later. _filter_url_escape_comments('', TRUE); $text = preg_replace_callback('``s', '_filter_url_escape_comments', $text); + if (preg_last_error()) { + $text = $saved_text; + continue 1; + } // Split at all tags; ensures that no tags or attributes are processed. $chunks = preg_split('/(<.+?>)/is', $text, -1, PREG_SPLIT_DELIM_CAPTURE); + if (preg_last_error()) { + $text = $saved_text; + continue 1; + } + // PHP ensures that the array consists of alternating delimiters and // literals, and begins and ends with a literal (inserting NULL as // required). Therefore, the first chunk is always text: @@ -1539,6 +1551,10 @@ function _filter_url($text, $filter) { // If there is a match, inject a link into this chunk via the callback // function contained in $task. $chunks[$i] = preg_replace_callback($pattern, $task, $chunks[$i]); + if (preg_last_error()) { + $text = $saved_text; + continue 2; + } } // Text chunk is done, so next chunk must be a tag. $chunk_type = 'tag'; @@ -1566,6 +1582,10 @@ function _filter_url($text, $filter) { // Revert back to the original comment contents _filter_url_escape_comments('', FALSE); $text = preg_replace_callback('``', '_filter_url_escape_comments', $text); + if (preg_last_error()) { + $text = $saved_text; + continue 1; + } } return $text; diff --git a/drupal7/web/modules/filter/filter.test b/drupal7/web/modules/filter/filter.test index 2af3103..9f7c3f5 100644 --- a/drupal7/web/modules/filter/filter.test +++ b/drupal7/web/modules/filter/filter.test @@ -1637,6 +1637,7 @@ www.example.com with a newline in comments --> * comments. * - Empty HTML tags (BR, IMG). * - Mix of absolute and partial URLs, and e-mail addresses in one content. + * - Input that exceeds PCRE backtracking limit. */ function testUrlFilterContent() { // Setup dummy filter object. @@ -1650,6 +1651,16 @@ www.example.com with a newline in comments --> $expected = file_get_contents($path . '/filter.url-output.txt'); $result = _filter_url($input, $filter); $this->assertIdentical($result, $expected, 'Complex HTML document was correctly processed.'); + + // Case of a small and simple HTML document. + $input = $expected = '

www.test.com

'; + $result = $this->filterUrlWithPcreErrors($input, $filter); + $this->assertIdentical($expected, $result, 'Simple HTML document was left intact when PCRE errors occurred.'); + + // Case of a complex HTML document. + $input = $expected = file_get_contents($path . '/filter.url-input.txt'); + $result = $this->filterUrlWithPcreErrors($input, $filter); + $this->assertIdentical($expected, $result, 'Complex HTML document was left intact when PCRE errors occurred.'); } /** @@ -1890,6 +1901,28 @@ body {color:red} function assertNoNormalized($haystack, $needle, $message = '', $group = 'Other') { return $this->assertTrue(strpos(strtolower(decode_entities($haystack)), $needle) === FALSE, $message, $group); } + + /** + * Calls filter_url with pcre.backtrack_limit set to 1. + * + * When PCRE errors occur, _filter_url() returns the input text unchanged. + * + * @param $input + * Text to pass on to _filter_url(). + * @param $filter + * Filter to pass on to _filter_url(). + * @return + * The processed $input. + */ + protected function filterUrlWithPcreErrors($input, $filter) { + $pcre_backtrack_limit = ini_get('pcre.backtrack_limit'); + // Setting this limit to the smallest possible value should cause PCRE + // errors and break the various preg_* functions used by _filter_url(). + ini_set('pcre.backtrack_limit', 1); + $result = _filter_url($input, $filter); + ini_set('pcre.backtrack_limit', $pcre_backtrack_limit); + return $result; + } } /** diff --git a/drupal7/web/modules/forum/forum.info b/drupal7/web/modules/forum/forum.info index 57b7963..83e4ecf 100644 --- a/drupal7/web/modules/forum/forum.info +++ b/drupal7/web/modules/forum/forum.info @@ -9,7 +9,7 @@ files[] = forum.test configure = admin/structure/forum stylesheets[all][] = forum.css -; Information added by Drupal.org packaging script on 2024-03-06 -version = "7.100" +; Information added by Drupal.org packaging script on 2024-12-04 +version = "7.103" project = "drupal" -datestamp = "1709734591" +datestamp = "1733324608" diff --git a/drupal7/web/modules/help/help.info b/drupal7/web/modules/help/help.info index cfbade8..0ec2798 100644 --- a/drupal7/web/modules/help/help.info +++ b/drupal7/web/modules/help/help.info @@ -5,7 +5,7 @@ version = VERSION core = 7.x files[] = help.test -; Information added by Drupal.org packaging script on 2024-03-06 -version = "7.100" +; Information added by Drupal.org packaging script on 2024-12-04 +version = "7.103" project = "drupal" -datestamp = "1709734591" +datestamp = "1733324608" diff --git a/drupal7/web/modules/image/image.info b/drupal7/web/modules/image/image.info index ac7acb7..dfefe02 100644 --- a/drupal7/web/modules/image/image.info +++ b/drupal7/web/modules/image/image.info @@ -7,7 +7,7 @@ dependencies[] = file files[] = image.test configure = admin/config/media/image-styles -; Information added by Drupal.org packaging script on 2024-03-06 -version = "7.100" +; Information added by Drupal.org packaging script on 2024-12-04 +version = "7.103" project = "drupal" -datestamp = "1709734591" +datestamp = "1733324608" diff --git a/drupal7/web/modules/image/tests/image_module_styles_test.info b/drupal7/web/modules/image/tests/image_module_styles_test.info index edf013d..ef88779 100644 --- a/drupal7/web/modules/image/tests/image_module_styles_test.info +++ b/drupal7/web/modules/image/tests/image_module_styles_test.info @@ -7,7 +7,7 @@ files[] = image_module_styles_test.module dependencies[] = image_module_test hidden = TRUE -; Information added by Drupal.org packaging script on 2024-03-06 -version = "7.100" +; Information added by Drupal.org packaging script on 2024-12-04 +version = "7.103" project = "drupal" -datestamp = "1709734591" +datestamp = "1733324608" diff --git a/drupal7/web/modules/image/tests/image_module_test.info b/drupal7/web/modules/image/tests/image_module_test.info index 7268cd9..c1e6ce8 100644 --- a/drupal7/web/modules/image/tests/image_module_test.info +++ b/drupal7/web/modules/image/tests/image_module_test.info @@ -6,7 +6,7 @@ core = 7.x files[] = image_module_test.module hidden = TRUE -; Information added by Drupal.org packaging script on 2024-03-06 -version = "7.100" +; Information added by Drupal.org packaging script on 2024-12-04 +version = "7.103" project = "drupal" -datestamp = "1709734591" +datestamp = "1733324608" diff --git a/drupal7/web/modules/locale/locale.info b/drupal7/web/modules/locale/locale.info index 0ec6e2e..7603837 100644 --- a/drupal7/web/modules/locale/locale.info +++ b/drupal7/web/modules/locale/locale.info @@ -6,7 +6,7 @@ core = 7.x files[] = locale.test configure = admin/config/regional/language -; Information added by Drupal.org packaging script on 2024-03-06 -version = "7.100" +; Information added by Drupal.org packaging script on 2024-12-04 +version = "7.103" project = "drupal" -datestamp = "1709734591" +datestamp = "1733324608" diff --git a/drupal7/web/modules/locale/tests/locale_test.info b/drupal7/web/modules/locale/tests/locale_test.info index 04eaadb..809486b 100644 --- a/drupal7/web/modules/locale/tests/locale_test.info +++ b/drupal7/web/modules/locale/tests/locale_test.info @@ -5,7 +5,7 @@ package = Testing version = VERSION hidden = TRUE -; Information added by Drupal.org packaging script on 2024-03-06 -version = "7.100" +; Information added by Drupal.org packaging script on 2024-12-04 +version = "7.103" project = "drupal" -datestamp = "1709734591" +datestamp = "1733324608" diff --git a/drupal7/web/modules/menu/menu.info b/drupal7/web/modules/menu/menu.info index 18074b0..4319881 100644 --- a/drupal7/web/modules/menu/menu.info +++ b/drupal7/web/modules/menu/menu.info @@ -6,7 +6,7 @@ core = 7.x files[] = menu.test configure = admin/structure/menu -; Information added by Drupal.org packaging script on 2024-03-06 -version = "7.100" +; Information added by Drupal.org packaging script on 2024-12-04 +version = "7.103" project = "drupal" -datestamp = "1709734591" +datestamp = "1733324608" diff --git a/drupal7/web/modules/node/node.admin.inc b/drupal7/web/modules/node/node.admin.inc index eead4ea..69b4939 100644 --- a/drupal7/web/modules/node/node.admin.inc +++ b/drupal7/web/modules/node/node.admin.inc @@ -165,12 +165,7 @@ function node_filter_form() { ); foreach ($session as $filter) { list($type, $value) = $filter; - if ($type == 'term') { - // Load term name from DB rather than search and parse options array. - $value = module_invoke('taxonomy', 'term_load', $value); - $value = $value->name; - } - elseif ($type == 'language') { + if ($type == 'language') { $value = $value == LANGUAGE_NONE ? t('Language neutral') : module_invoke('locale', 'language_name', $value); } else { diff --git a/drupal7/web/modules/node/node.info b/drupal7/web/modules/node/node.info index f423e71..32eab4c 100644 --- a/drupal7/web/modules/node/node.info +++ b/drupal7/web/modules/node/node.info @@ -9,7 +9,7 @@ required = TRUE configure = admin/structure/types stylesheets[all][] = node.css -; Information added by Drupal.org packaging script on 2024-03-06 -version = "7.100" +; Information added by Drupal.org packaging script on 2024-12-04 +version = "7.103" project = "drupal" -datestamp = "1709734591" +datestamp = "1733324608" diff --git a/drupal7/web/modules/node/tests/node_access_test.info b/drupal7/web/modules/node/tests/node_access_test.info index 64f017f..018caad 100644 --- a/drupal7/web/modules/node/tests/node_access_test.info +++ b/drupal7/web/modules/node/tests/node_access_test.info @@ -5,7 +5,7 @@ version = VERSION core = 7.x hidden = TRUE -; Information added by Drupal.org packaging script on 2024-03-06 -version = "7.100" +; Information added by Drupal.org packaging script on 2024-12-04 +version = "7.103" project = "drupal" -datestamp = "1709734591" +datestamp = "1733324608" diff --git a/drupal7/web/modules/node/tests/node_test.info b/drupal7/web/modules/node/tests/node_test.info index acb59ad..bbccaa8 100644 --- a/drupal7/web/modules/node/tests/node_test.info +++ b/drupal7/web/modules/node/tests/node_test.info @@ -5,7 +5,7 @@ version = VERSION core = 7.x hidden = TRUE -; Information added by Drupal.org packaging script on 2024-03-06 -version = "7.100" +; Information added by Drupal.org packaging script on 2024-12-04 +version = "7.103" project = "drupal" -datestamp = "1709734591" +datestamp = "1733324608" diff --git a/drupal7/web/modules/node/tests/node_test_exception.info b/drupal7/web/modules/node/tests/node_test_exception.info index 4178df4..9953ec6 100644 --- a/drupal7/web/modules/node/tests/node_test_exception.info +++ b/drupal7/web/modules/node/tests/node_test_exception.info @@ -5,7 +5,7 @@ version = VERSION core = 7.x hidden = TRUE -; Information added by Drupal.org packaging script on 2024-03-06 -version = "7.100" +; Information added by Drupal.org packaging script on 2024-12-04 +version = "7.103" project = "drupal" -datestamp = "1709734591" +datestamp = "1733324608" diff --git a/drupal7/web/modules/openid/openid.info b/drupal7/web/modules/openid/openid.info index 10f66f8..d22acfb 100644 --- a/drupal7/web/modules/openid/openid.info +++ b/drupal7/web/modules/openid/openid.info @@ -5,7 +5,7 @@ package = Core core = 7.x files[] = openid.test -; Information added by Drupal.org packaging script on 2024-03-06 -version = "7.100" +; Information added by Drupal.org packaging script on 2024-12-04 +version = "7.103" project = "drupal" -datestamp = "1709734591" +datestamp = "1733324608" diff --git a/drupal7/web/modules/openid/tests/openid_test.info b/drupal7/web/modules/openid/tests/openid_test.info index 0921aa9..479948b 100644 --- a/drupal7/web/modules/openid/tests/openid_test.info +++ b/drupal7/web/modules/openid/tests/openid_test.info @@ -6,7 +6,7 @@ core = 7.x dependencies[] = openid hidden = TRUE -; Information added by Drupal.org packaging script on 2024-03-06 -version = "7.100" +; Information added by Drupal.org packaging script on 2024-12-04 +version = "7.103" project = "drupal" -datestamp = "1709734591" +datestamp = "1733324608" diff --git a/drupal7/web/modules/overlay/overlay-parent.js b/drupal7/web/modules/overlay/overlay-parent.js index efb2637..0d41fad 100644 --- a/drupal7/web/modules/overlay/overlay-parent.js +++ b/drupal7/web/modules/overlay/overlay-parent.js @@ -229,7 +229,7 @@ Drupal.overlay.destroy = function () { */ Drupal.overlay.redirect = function (url) { // Create a native Link object, so we can use its object methods. - var link = $(url.link(url)).get(0); + var link = $("").attr("href", url).get(0); // If the link is already open, force the hashchange event to simulate reload. if (window.location.href == link.href) { @@ -865,7 +865,7 @@ Drupal.overlay.resetActiveClass = function(activePath) { Drupal.overlay.getPath = function (link, ignorePathFromQueryString) { if (typeof link == 'string') { // Create a native Link object, so we can use its object methods. - link = $(link.link(link)).get(0); + link = $("").attr("href", link).get(0); } var path = link.pathname; diff --git a/drupal7/web/modules/overlay/overlay.info b/drupal7/web/modules/overlay/overlay.info index f9d6c2e..e42bdc0 100644 --- a/drupal7/web/modules/overlay/overlay.info +++ b/drupal7/web/modules/overlay/overlay.info @@ -4,7 +4,7 @@ package = Core version = VERSION core = 7.x -; Information added by Drupal.org packaging script on 2024-03-06 -version = "7.100" +; Information added by Drupal.org packaging script on 2024-12-04 +version = "7.103" project = "drupal" -datestamp = "1709734591" +datestamp = "1733324608" diff --git a/drupal7/web/modules/path/path.info b/drupal7/web/modules/path/path.info index 6676109..ca94aad 100644 --- a/drupal7/web/modules/path/path.info +++ b/drupal7/web/modules/path/path.info @@ -6,7 +6,7 @@ core = 7.x files[] = path.test configure = admin/config/search/path -; Information added by Drupal.org packaging script on 2024-03-06 -version = "7.100" +; Information added by Drupal.org packaging script on 2024-12-04 +version = "7.103" project = "drupal" -datestamp = "1709734591" +datestamp = "1733324608" diff --git a/drupal7/web/modules/path/path.module b/drupal7/web/modules/path/path.module index 4614b0f..35a8fa5 100644 --- a/drupal7/web/modules/path/path.module +++ b/drupal7/web/modules/path/path.module @@ -41,6 +41,7 @@ function path_permission() { return array( 'administer url aliases' => array( 'title' => t('Administer URL aliases'), + 'restrict access' => TRUE, ), 'create url aliases' => array( 'title' => t('Create and edit URL aliases'), diff --git a/drupal7/web/modules/php/php.info b/drupal7/web/modules/php/php.info index e6dafe1..079f26b 100644 --- a/drupal7/web/modules/php/php.info +++ b/drupal7/web/modules/php/php.info @@ -5,7 +5,7 @@ version = VERSION core = 7.x files[] = php.test -; Information added by Drupal.org packaging script on 2024-03-06 -version = "7.100" +; Information added by Drupal.org packaging script on 2024-12-04 +version = "7.103" project = "drupal" -datestamp = "1709734591" +datestamp = "1733324608" diff --git a/drupal7/web/modules/poll/poll.info b/drupal7/web/modules/poll/poll.info index af92ab1..a97a116 100644 --- a/drupal7/web/modules/poll/poll.info +++ b/drupal7/web/modules/poll/poll.info @@ -6,7 +6,7 @@ core = 7.x files[] = poll.test stylesheets[all][] = poll.css -; Information added by Drupal.org packaging script on 2024-03-06 -version = "7.100" +; Information added by Drupal.org packaging script on 2024-12-04 +version = "7.103" project = "drupal" -datestamp = "1709734591" +datestamp = "1733324608" diff --git a/drupal7/web/modules/profile/profile.info b/drupal7/web/modules/profile/profile.info index f12b776..54a3c48 100644 --- a/drupal7/web/modules/profile/profile.info +++ b/drupal7/web/modules/profile/profile.info @@ -11,7 +11,7 @@ configure = admin/config/people/profile ; See user_system_info_alter(). hidden = TRUE -; Information added by Drupal.org packaging script on 2024-03-06 -version = "7.100" +; Information added by Drupal.org packaging script on 2024-12-04 +version = "7.103" project = "drupal" -datestamp = "1709734591" +datestamp = "1733324608" diff --git a/drupal7/web/modules/rdf/rdf.info b/drupal7/web/modules/rdf/rdf.info index 1d4dbc8..6b2b028 100644 --- a/drupal7/web/modules/rdf/rdf.info +++ b/drupal7/web/modules/rdf/rdf.info @@ -5,7 +5,7 @@ version = VERSION core = 7.x files[] = rdf.test -; Information added by Drupal.org packaging script on 2024-03-06 -version = "7.100" +; Information added by Drupal.org packaging script on 2024-12-04 +version = "7.103" project = "drupal" -datestamp = "1709734591" +datestamp = "1733324608" diff --git a/drupal7/web/modules/rdf/tests/rdf_test.info b/drupal7/web/modules/rdf/tests/rdf_test.info index d36cb75..03ec49f 100644 --- a/drupal7/web/modules/rdf/tests/rdf_test.info +++ b/drupal7/web/modules/rdf/tests/rdf_test.info @@ -6,7 +6,7 @@ core = 7.x hidden = TRUE dependencies[] = blog -; Information added by Drupal.org packaging script on 2024-03-06 -version = "7.100" +; Information added by Drupal.org packaging script on 2024-12-04 +version = "7.103" project = "drupal" -datestamp = "1709734591" +datestamp = "1733324608" diff --git a/drupal7/web/modules/search/search.info b/drupal7/web/modules/search/search.info index 62a6d87..c15aa79 100644 --- a/drupal7/web/modules/search/search.info +++ b/drupal7/web/modules/search/search.info @@ -8,7 +8,7 @@ files[] = search.test configure = admin/config/search/settings stylesheets[all][] = search.css -; Information added by Drupal.org packaging script on 2024-03-06 -version = "7.100" +; Information added by Drupal.org packaging script on 2024-12-04 +version = "7.103" project = "drupal" -datestamp = "1709734591" +datestamp = "1733324608" diff --git a/drupal7/web/modules/search/tests/search_embedded_form.info b/drupal7/web/modules/search/tests/search_embedded_form.info index 5c2c65e..f7df883 100644 --- a/drupal7/web/modules/search/tests/search_embedded_form.info +++ b/drupal7/web/modules/search/tests/search_embedded_form.info @@ -5,7 +5,7 @@ version = VERSION core = 7.x hidden = TRUE -; Information added by Drupal.org packaging script on 2024-03-06 -version = "7.100" +; Information added by Drupal.org packaging script on 2024-12-04 +version = "7.103" project = "drupal" -datestamp = "1709734591" +datestamp = "1733324608" diff --git a/drupal7/web/modules/search/tests/search_extra_type.info b/drupal7/web/modules/search/tests/search_extra_type.info index 5eb387b..af22512 100644 --- a/drupal7/web/modules/search/tests/search_extra_type.info +++ b/drupal7/web/modules/search/tests/search_extra_type.info @@ -5,7 +5,7 @@ version = VERSION core = 7.x hidden = TRUE -; Information added by Drupal.org packaging script on 2024-03-06 -version = "7.100" +; Information added by Drupal.org packaging script on 2024-12-04 +version = "7.103" project = "drupal" -datestamp = "1709734591" +datestamp = "1733324608" diff --git a/drupal7/web/modules/search/tests/search_node_tags.info b/drupal7/web/modules/search/tests/search_node_tags.info index ffdf6f9..4010a85 100644 --- a/drupal7/web/modules/search/tests/search_node_tags.info +++ b/drupal7/web/modules/search/tests/search_node_tags.info @@ -5,7 +5,7 @@ version = VERSION core = 7.x hidden = TRUE -; Information added by Drupal.org packaging script on 2024-03-06 -version = "7.100" +; Information added by Drupal.org packaging script on 2024-12-04 +version = "7.103" project = "drupal" -datestamp = "1709734591" +datestamp = "1733324608" diff --git a/drupal7/web/modules/shortcut/shortcut.info b/drupal7/web/modules/shortcut/shortcut.info index e502fc1..907ecc6 100644 --- a/drupal7/web/modules/shortcut/shortcut.info +++ b/drupal7/web/modules/shortcut/shortcut.info @@ -6,7 +6,7 @@ core = 7.x files[] = shortcut.test configure = admin/config/user-interface/shortcut -; Information added by Drupal.org packaging script on 2024-03-06 -version = "7.100" +; Information added by Drupal.org packaging script on 2024-12-04 +version = "7.103" project = "drupal" -datestamp = "1709734591" +datestamp = "1733324608" diff --git a/drupal7/web/modules/simpletest/drupal_web_test_case.php b/drupal7/web/modules/simpletest/drupal_web_test_case.php index 08b8dfe..1c7129b 100644 --- a/drupal7/web/modules/simpletest/drupal_web_test_case.php +++ b/drupal7/web/modules/simpletest/drupal_web_test_case.php @@ -560,23 +560,22 @@ abstract class DrupalTestCase { 'function' => $class . '->' . $method . '()', ); $completion_check_id = DrupalTestCase::insertAssert($this->testId, $class, FALSE, t('The test did not complete due to a fatal error.'), 'Completion check', $caller); - $this->setUp(); - if ($this->setup) { - try { + try { + $this->setUp(); + if ($this->setup) { $this->$method(); - // Finish up. + $this->tearDown(); } - catch (Throwable $e) { - $this->exceptionHandler($e); + else { + $this->fail(t("The test cannot be executed because it has not been set up properly.")); } - catch (Exception $e) { - // Cater for older PHP versions. - $this->exceptionHandler($e); - } - $this->tearDown(); } - else { - $this->fail(t("The test cannot be executed because it has not been set up properly.")); + catch (Throwable $e) { + $this->exceptionHandler($e); + } + catch (Exception $e) { + // Cater for older PHP versions. + $this->exceptionHandler($e); } // Remove the completion check record. DrupalTestCase::deleteAssert($completion_check_id); diff --git a/drupal7/web/modules/simpletest/simpletest.info b/drupal7/web/modules/simpletest/simpletest.info index b8a3ed3..e5dbbd3 100644 --- a/drupal7/web/modules/simpletest/simpletest.info +++ b/drupal7/web/modules/simpletest/simpletest.info @@ -58,7 +58,7 @@ files[] = tests/upgrade/update.trigger.test files[] = tests/upgrade/update.field.test files[] = tests/upgrade/update.user.test -; Information added by Drupal.org packaging script on 2024-03-06 -version = "7.100" +; Information added by Drupal.org packaging script on 2024-12-04 +version = "7.103" project = "drupal" -datestamp = "1709734591" +datestamp = "1733324608" diff --git a/drupal7/web/modules/simpletest/simpletest.pages.inc b/drupal7/web/modules/simpletest/simpletest.pages.inc index 3127459..c6f6a07 100644 --- a/drupal7/web/modules/simpletest/simpletest.pages.inc +++ b/drupal7/web/modules/simpletest/simpletest.pages.inc @@ -443,7 +443,7 @@ function simpletest_settings_form($form, &$form_state) { $form['general']['simpletest_clear_results'] = array( '#type' => 'checkbox', '#title' => t('Clear results after each complete test suite run'), - '#description' => t('By default SimpleTest will clear the results after they have been viewed on the results page, but in some cases it may be useful to leave the results in the database. The results can then be viewed at admin/config/development/testing/[test_id]. The test ID can be found in the database, simpletest table, or kept track of when viewing the results the first time. Additionally, some modules may provide more analysis or features that require this setting to be disabled.'), + '#description' => t('By default SimpleTest will clear the results after they have been viewed on the results page, but in some cases it may be useful to leave the results in the database. The results can then be viewed at admin/config/development/testing/results/[test_id]. The test ID can be found in the database, simpletest table, or kept track of when viewing the results the first time. Additionally, some modules may provide more analysis or features that require this setting to be disabled.'), '#default_value' => variable_get('simpletest_clear_results', TRUE), ); $form['general']['simpletest_verbose'] = array( diff --git a/drupal7/web/modules/simpletest/tests/actions_loop_test.info b/drupal7/web/modules/simpletest/tests/actions_loop_test.info index 233b128..057a7fc 100644 --- a/drupal7/web/modules/simpletest/tests/actions_loop_test.info +++ b/drupal7/web/modules/simpletest/tests/actions_loop_test.info @@ -5,7 +5,7 @@ version = VERSION core = 7.x hidden = TRUE -; Information added by Drupal.org packaging script on 2024-03-06 -version = "7.100" +; Information added by Drupal.org packaging script on 2024-12-04 +version = "7.103" project = "drupal" -datestamp = "1709734591" +datestamp = "1733324608" diff --git a/drupal7/web/modules/simpletest/tests/ajax.test b/drupal7/web/modules/simpletest/tests/ajax.test index d271e04..c79babc 100644 --- a/drupal7/web/modules/simpletest/tests/ajax.test +++ b/drupal7/web/modules/simpletest/tests/ajax.test @@ -618,4 +618,16 @@ class AJAXElementValidation extends AJAXTestCase { $this->assertNoText(t('Error message'), "No error message in resultant JSON"); $this->assertText('ajax_forms_test_validation_form_callback invoked', 'The correct callback was invoked'); } + + /** + * Try to open default Ajax callback without passing required data. + */ + function testAJAXPathWithoutData() { + $this->drupalGet('system/ajax'); + $query_parameters = array( + ':type' => 'php', + ':severity' => WATCHDOG_WARNING, + ); + $this->assertEqual(db_query('SELECT COUNT(*) FROM {watchdog} WHERE type = :type AND severity = :severity', $query_parameters)->fetchField(), 0, 'No warning message appears in the logs.'); + } } diff --git a/drupal7/web/modules/simpletest/tests/ajax_forms_test.info b/drupal7/web/modules/simpletest/tests/ajax_forms_test.info index e247ec4..c78e346 100644 --- a/drupal7/web/modules/simpletest/tests/ajax_forms_test.info +++ b/drupal7/web/modules/simpletest/tests/ajax_forms_test.info @@ -5,7 +5,7 @@ package = Testing version = VERSION hidden = TRUE -; Information added by Drupal.org packaging script on 2024-03-06 -version = "7.100" +; Information added by Drupal.org packaging script on 2024-12-04 +version = "7.103" project = "drupal" -datestamp = "1709734591" +datestamp = "1733324608" diff --git a/drupal7/web/modules/simpletest/tests/ajax_test.info b/drupal7/web/modules/simpletest/tests/ajax_test.info index 574fd80..7901336 100644 --- a/drupal7/web/modules/simpletest/tests/ajax_test.info +++ b/drupal7/web/modules/simpletest/tests/ajax_test.info @@ -5,7 +5,7 @@ version = VERSION core = 7.x hidden = TRUE -; Information added by Drupal.org packaging script on 2024-03-06 -version = "7.100" +; Information added by Drupal.org packaging script on 2024-12-04 +version = "7.103" project = "drupal" -datestamp = "1709734591" +datestamp = "1733324608" diff --git a/drupal7/web/modules/simpletest/tests/batch_test.info b/drupal7/web/modules/simpletest/tests/batch_test.info index 54b7455..49b5949 100644 --- a/drupal7/web/modules/simpletest/tests/batch_test.info +++ b/drupal7/web/modules/simpletest/tests/batch_test.info @@ -5,7 +5,7 @@ version = VERSION core = 7.x hidden = TRUE -; Information added by Drupal.org packaging script on 2024-03-06 -version = "7.100" +; Information added by Drupal.org packaging script on 2024-12-04 +version = "7.103" project = "drupal" -datestamp = "1709734591" +datestamp = "1733324608" diff --git a/drupal7/web/modules/simpletest/tests/boot_test_1.info b/drupal7/web/modules/simpletest/tests/boot_test_1.info index a1a2805..1f4c810 100644 --- a/drupal7/web/modules/simpletest/tests/boot_test_1.info +++ b/drupal7/web/modules/simpletest/tests/boot_test_1.info @@ -5,7 +5,7 @@ package = Testing version = VERSION hidden = TRUE -; Information added by Drupal.org packaging script on 2024-03-06 -version = "7.100" +; Information added by Drupal.org packaging script on 2024-12-04 +version = "7.103" project = "drupal" -datestamp = "1709734591" +datestamp = "1733324608" diff --git a/drupal7/web/modules/simpletest/tests/boot_test_2.info b/drupal7/web/modules/simpletest/tests/boot_test_2.info index 826b740..df5e01d 100644 --- a/drupal7/web/modules/simpletest/tests/boot_test_2.info +++ b/drupal7/web/modules/simpletest/tests/boot_test_2.info @@ -5,7 +5,7 @@ package = Testing version = VERSION hidden = TRUE -; Information added by Drupal.org packaging script on 2024-03-06 -version = "7.100" +; Information added by Drupal.org packaging script on 2024-12-04 +version = "7.103" project = "drupal" -datestamp = "1709734591" +datestamp = "1733324608" diff --git a/drupal7/web/modules/simpletest/tests/bootstrap.test b/drupal7/web/modules/simpletest/tests/bootstrap.test index a332955..5d846f6 100644 --- a/drupal7/web/modules/simpletest/tests/bootstrap.test +++ b/drupal7/web/modules/simpletest/tests/bootstrap.test @@ -963,3 +963,62 @@ class BootstrapDrupalCacheArrayTestCase extends DrupalWebTestCase { $this->assertTrue(is_string($payload2) && (strpos($payload2, 'phpinfo') !== FALSE), 'DrupalCacheArray persisted data to cache_form.'); } } + +/** + * Test the trusted HTTP host configuration. + */ +class BootstrapTrustedHostsTestCase extends DrupalUnitTestCase { + + public static function getInfo() { + return array( + 'name' => 'Trusted HTTP host test', + 'description' => 'Tests the trusted_host_patterns configuration.', + 'group' => 'Bootstrap', + ); + } + + /** + * Tests hostname validation. + * + * @see drupal_check_trusted_hosts() + */ + function testTrustedHosts() { + $trusted_host_patterns = array( + '^example\.com$', + '^.+\.example\.com$', + '^example\.org', + '^.+\.example\.org', + ); + + foreach ($this->providerTestTrustedHosts() as $data) { + $test = array_combine(array('host', 'message', 'expected'), $data); + $valid_host = drupal_check_trusted_hosts($test['host'], $trusted_host_patterns); + $this->assertEqual($test['expected'], $valid_host, $test['message']); + } + } + + /** + * Provides test data for testTrustedHosts(). + */ + public function providerTestTrustedHosts() { + $data = array(); + + // Tests canonical URL. + $data[] = array('www.example.com', 'canonical URL is trusted', TRUE); + + // Tests missing hostname for HTTP/1.0 compatability where the Host + // header is optional. + $data[] = array(NULL, 'empty Host is valid', TRUE); + + // Tests the additional patterns from the settings. + $data[] = array('example.com', 'host from settings is trusted', TRUE); + $data[] = array('subdomain.example.com', 'host from settings is trusted', TRUE); + $data[] = array('www.example.org', 'host from settings is trusted', TRUE); + $data[] = array('example.org', 'host from settings is trusted', TRUE); + + // Tests mismatch. + $data[] = array('www.blackhat.com', 'unspecified host is untrusted', FALSE); + + return $data; + } +} diff --git a/drupal7/web/modules/simpletest/tests/cache.test b/drupal7/web/modules/simpletest/tests/cache.test index b42de36..3edc671 100644 --- a/drupal7/web/modules/simpletest/tests/cache.test +++ b/drupal7/web/modules/simpletest/tests/cache.test @@ -303,20 +303,6 @@ class CacheClearCase extends CacheTestCase { $this->assertTrue($this->checkCacheExists('test_cid_clear3', $this->default_value), 'Entry was not cleared from the cache'); - - // Set the cache clear threshold to 2 to confirm that the full bin is cleared - // when the threshold is exceeded. - variable_set('cache_clear_threshold', 2); - cache_set('test_cid_clear1', $this->default_value, $this->default_bin); - cache_set('test_cid_clear2', $this->default_value, $this->default_bin); - $this->assertTrue($this->checkCacheExists('test_cid_clear1', $this->default_value) - && $this->checkCacheExists('test_cid_clear2', $this->default_value), - 'Two cache entries were created.'); - cache_clear_all(array('test_cid_clear1', 'test_cid_clear2', 'test_cid_clear3'), $this->default_bin); - $this->assertFalse($this->checkCacheExists('test_cid_clear1', $this->default_value) - || $this->checkCacheExists('test_cid_clear2', $this->default_value) - || $this->checkCacheExists('test_cid_clear3', $this->default_value), - 'All cache entries removed when the array exceeded the cache clear threshold.'); } /** diff --git a/drupal7/web/modules/simpletest/tests/common_test.info b/drupal7/web/modules/simpletest/tests/common_test.info index 16f4d07..828196a 100644 --- a/drupal7/web/modules/simpletest/tests/common_test.info +++ b/drupal7/web/modules/simpletest/tests/common_test.info @@ -7,7 +7,7 @@ stylesheets[all][] = common_test.css stylesheets[print][] = common_test.print.css hidden = TRUE -; Information added by Drupal.org packaging script on 2024-03-06 -version = "7.100" +; Information added by Drupal.org packaging script on 2024-12-04 +version = "7.103" project = "drupal" -datestamp = "1709734591" +datestamp = "1733324608" diff --git a/drupal7/web/modules/simpletest/tests/common_test_cron_helper.info b/drupal7/web/modules/simpletest/tests/common_test_cron_helper.info index ae2de34..5190ebb 100644 --- a/drupal7/web/modules/simpletest/tests/common_test_cron_helper.info +++ b/drupal7/web/modules/simpletest/tests/common_test_cron_helper.info @@ -5,7 +5,7 @@ version = VERSION core = 7.x hidden = TRUE -; Information added by Drupal.org packaging script on 2024-03-06 -version = "7.100" +; Information added by Drupal.org packaging script on 2024-12-04 +version = "7.103" project = "drupal" -datestamp = "1709734591" +datestamp = "1733324608" diff --git a/drupal7/web/modules/simpletest/tests/database_test.info b/drupal7/web/modules/simpletest/tests/database_test.info index 0799608..07386e7 100644 --- a/drupal7/web/modules/simpletest/tests/database_test.info +++ b/drupal7/web/modules/simpletest/tests/database_test.info @@ -5,7 +5,7 @@ package = Testing version = VERSION hidden = TRUE -; Information added by Drupal.org packaging script on 2024-03-06 -version = "7.100" +; Information added by Drupal.org packaging script on 2024-12-04 +version = "7.103" project = "drupal" -datestamp = "1709734591" +datestamp = "1733324608" diff --git a/drupal7/web/modules/simpletest/tests/drupal_autoload_test/drupal_autoload_test.info b/drupal7/web/modules/simpletest/tests/drupal_autoload_test/drupal_autoload_test.info index 2f2edd3..5bff622 100644 --- a/drupal7/web/modules/simpletest/tests/drupal_autoload_test/drupal_autoload_test.info +++ b/drupal7/web/modules/simpletest/tests/drupal_autoload_test/drupal_autoload_test.info @@ -7,7 +7,7 @@ version = VERSION core = 7.x hidden = TRUE -; Information added by Drupal.org packaging script on 2024-03-06 -version = "7.100" +; Information added by Drupal.org packaging script on 2024-12-04 +version = "7.103" project = "drupal" -datestamp = "1709734591" +datestamp = "1733324608" diff --git a/drupal7/web/modules/simpletest/tests/drupal_system_listing_compatible_test/drupal_system_listing_compatible_test.info b/drupal7/web/modules/simpletest/tests/drupal_system_listing_compatible_test/drupal_system_listing_compatible_test.info index fa1c2c8..b0b008d 100644 --- a/drupal7/web/modules/simpletest/tests/drupal_system_listing_compatible_test/drupal_system_listing_compatible_test.info +++ b/drupal7/web/modules/simpletest/tests/drupal_system_listing_compatible_test/drupal_system_listing_compatible_test.info @@ -5,7 +5,7 @@ version = VERSION core = 7.x hidden = TRUE -; Information added by Drupal.org packaging script on 2024-03-06 -version = "7.100" +; Information added by Drupal.org packaging script on 2024-12-04 +version = "7.103" project = "drupal" -datestamp = "1709734591" +datestamp = "1733324608" diff --git a/drupal7/web/modules/simpletest/tests/drupal_system_listing_incompatible_test/drupal_system_listing_incompatible_test.info b/drupal7/web/modules/simpletest/tests/drupal_system_listing_incompatible_test/drupal_system_listing_incompatible_test.info index 6f3141f..1d147c7 100644 --- a/drupal7/web/modules/simpletest/tests/drupal_system_listing_incompatible_test/drupal_system_listing_incompatible_test.info +++ b/drupal7/web/modules/simpletest/tests/drupal_system_listing_incompatible_test/drupal_system_listing_incompatible_test.info @@ -5,7 +5,7 @@ version = VERSION core = 7.x hidden = TRUE -; Information added by Drupal.org packaging script on 2024-03-06 -version = "7.100" +; Information added by Drupal.org packaging script on 2024-12-04 +version = "7.103" project = "drupal" -datestamp = "1709734591" +datestamp = "1733324608" diff --git a/drupal7/web/modules/simpletest/tests/entity_cache_test.info b/drupal7/web/modules/simpletest/tests/entity_cache_test.info index 074e7ee..af5b1f5 100644 --- a/drupal7/web/modules/simpletest/tests/entity_cache_test.info +++ b/drupal7/web/modules/simpletest/tests/entity_cache_test.info @@ -6,7 +6,7 @@ core = 7.x dependencies[] = entity_cache_test_dependency hidden = TRUE -; Information added by Drupal.org packaging script on 2024-03-06 -version = "7.100" +; Information added by Drupal.org packaging script on 2024-12-04 +version = "7.103" project = "drupal" -datestamp = "1709734591" +datestamp = "1733324608" diff --git a/drupal7/web/modules/simpletest/tests/entity_cache_test_dependency.info b/drupal7/web/modules/simpletest/tests/entity_cache_test_dependency.info index 35cdbf2..4bbb37e 100644 --- a/drupal7/web/modules/simpletest/tests/entity_cache_test_dependency.info +++ b/drupal7/web/modules/simpletest/tests/entity_cache_test_dependency.info @@ -5,7 +5,7 @@ version = VERSION core = 7.x hidden = TRUE -; Information added by Drupal.org packaging script on 2024-03-06 -version = "7.100" +; Information added by Drupal.org packaging script on 2024-12-04 +version = "7.103" project = "drupal" -datestamp = "1709734591" +datestamp = "1733324608" diff --git a/drupal7/web/modules/simpletest/tests/entity_crud.test b/drupal7/web/modules/simpletest/tests/entity_crud.test index c7d6650..3159161 100644 --- a/drupal7/web/modules/simpletest/tests/entity_crud.test +++ b/drupal7/web/modules/simpletest/tests/entity_crud.test @@ -58,4 +58,33 @@ class EntityLoadTestCase extends DrupalWebTestCase { $nodes_loaded = entity_load('node', array('1.', '2')); $this->assertEqual(count($nodes_loaded), 1); } + + /** + * Tests the controller class loading functionality on non-existing entity + * types and on entities without valid controller class. + */ + public function testEntityLoadInvalidControllerClass() { + // Ensure that loading a non-existing entity type will throw an + // EntityMalformedException. + try { + entity_load('test', array('1')); + $this->fail(t('Cannot load a controller class on non-existing entity type.')); + } + catch (EntityMalformedException $e) { + $this->pass(t('Cannot load a controller class on non-existing entity type.')); + } + + // Ensure that loading an entity without valid controller class will throw + // an EntityMalformedException. + module_enable(array('entity_crud_hook_test')); + variable_set('entity_crud_hook_test_alter_controller_class', TRUE); + try { + entity_load('node', array('1')); + $this->fail(t('Cannot load a missing or non-existent controller class.')); + } + catch (EntityMalformedException $e) { + $this->pass(t('Cannot load a missing or non-existent controller class.')); + } + variable_set('entity_crud_hook_test_alter_controller_class', FALSE); + } } diff --git a/drupal7/web/modules/simpletest/tests/entity_crud_hook_test.info b/drupal7/web/modules/simpletest/tests/entity_crud_hook_test.info index ebf7349..7b6c2d0 100644 --- a/drupal7/web/modules/simpletest/tests/entity_crud_hook_test.info +++ b/drupal7/web/modules/simpletest/tests/entity_crud_hook_test.info @@ -5,7 +5,7 @@ package = Testing version = VERSION hidden = TRUE -; Information added by Drupal.org packaging script on 2024-03-06 -version = "7.100" +; Information added by Drupal.org packaging script on 2024-12-04 +version = "7.103" project = "drupal" -datestamp = "1709734591" +datestamp = "1733324608" diff --git a/drupal7/web/modules/simpletest/tests/entity_crud_hook_test.module b/drupal7/web/modules/simpletest/tests/entity_crud_hook_test.module index d25dff1..eebebc8 100644 --- a/drupal7/web/modules/simpletest/tests/entity_crud_hook_test.module +++ b/drupal7/web/modules/simpletest/tests/entity_crud_hook_test.module @@ -249,3 +249,13 @@ function entity_crud_hook_test_taxonomy_vocabulary_delete() { function entity_crud_hook_test_user_delete() { $_SESSION['entity_crud_hook_test'][] = (__FUNCTION__ . ' called'); } + +/** + * Implements hook_entity_info_alter(). + */ +function entity_crud_hook_test_entity_info_alter(&$entity_info) { + if (variable_get('entity_crud_hook_test_alter_controller_class', FALSE)) { + // Set the controller class for nodes to NULL. + $entity_info['node']['controller class'] = NULL; + } +} diff --git a/drupal7/web/modules/simpletest/tests/entity_query_access_test.info b/drupal7/web/modules/simpletest/tests/entity_query_access_test.info index 26b3176..887aa8b 100644 --- a/drupal7/web/modules/simpletest/tests/entity_query_access_test.info +++ b/drupal7/web/modules/simpletest/tests/entity_query_access_test.info @@ -5,7 +5,7 @@ version = VERSION core = 7.x hidden = TRUE -; Information added by Drupal.org packaging script on 2024-03-06 -version = "7.100" +; Information added by Drupal.org packaging script on 2024-12-04 +version = "7.103" project = "drupal" -datestamp = "1709734591" +datestamp = "1733324608" diff --git a/drupal7/web/modules/simpletest/tests/error.test b/drupal7/web/modules/simpletest/tests/error.test index 5b56d52..1a6c293 100644 --- a/drupal7/web/modules/simpletest/tests/error.test +++ b/drupal7/web/modules/simpletest/tests/error.test @@ -103,6 +103,15 @@ class DrupalErrorHandlerTestCase extends DrupalWebTestCase { function assertErrorMessage(array $error) { $message = t('%type: !message in %function (line ', $error); $this->assertRaw($message, format_string('Found error message: !message.', array('!message' => $message))); + + // Also check that no full path from the error is displayed. + $this->assertNoRaw($error['%file'], format_string('Full path from error not displayed: %file.', array('%file' => $error['%file']))); + + // Check that the path was displayed with the DRUPAL_ROOT hidden. + $root_length = strlen(DRUPAL_ROOT); + $stripped_path = substr($error['%file'], $root_length + 1); + $sanitized_path = t('of %path)', array('%path' => $stripped_path)); + $this->assertRaw($sanitized_path, 'Path in error message was sanitized.'); } /** @@ -111,5 +120,8 @@ class DrupalErrorHandlerTestCase extends DrupalWebTestCase { function assertNoErrorMessage(array $error) { $message = t('%type: !message in %function (line ', $error); $this->assertNoRaw($message, format_string('Did not find error message: !message.', array('!message' => $message))); + + // Also check that no full path from the error is displayed. + $this->assertNoRaw($error['%file'], format_string('Full path from error not displayed: %file.', array('%file' => $error['%file']))); } } diff --git a/drupal7/web/modules/simpletest/tests/error_test.info b/drupal7/web/modules/simpletest/tests/error_test.info index 9ac95ee..4b4da45 100644 --- a/drupal7/web/modules/simpletest/tests/error_test.info +++ b/drupal7/web/modules/simpletest/tests/error_test.info @@ -5,7 +5,7 @@ version = VERSION core = 7.x hidden = TRUE -; Information added by Drupal.org packaging script on 2024-03-06 -version = "7.100" +; Information added by Drupal.org packaging script on 2024-12-04 +version = "7.103" project = "drupal" -datestamp = "1709734591" +datestamp = "1733324608" diff --git a/drupal7/web/modules/simpletest/tests/file.test b/drupal7/web/modules/simpletest/tests/file.test index 8121b80..80d1dd3 100644 --- a/drupal7/web/modules/simpletest/tests/file.test +++ b/drupal7/web/modules/simpletest/tests/file.test @@ -2616,11 +2616,16 @@ class FileDownloadTest extends FileTestCase { $url = file_create_url($file->uri); // Set file_test access header to allow the download. + file_test_reset(); file_test_set_return('download', array('x-foo' => 'Bar')); $this->drupalGet($url); $headers = $this->drupalGetHeaders(); $this->assertEqual($headers['x-foo'], 'Bar', 'Found header set by file_test module on private download.'); $this->assertResponse(200, 'Correctly allowed access to a file when file_test provides headers.'); + // Ensure hook_file_download is fired correctly. + $hooks_results = file_test_get_all_calls(); + $file_uri = !empty($hooks_results['download']) ? reset($hooks_results['download'][0]) : ''; + $this->assertEqual($file->uri, $file_uri); // Test that the file transferred correctly. $this->assertEqual($contents, $this->content, 'Contents of the file are correct.'); @@ -2631,9 +2636,23 @@ class FileDownloadTest extends FileTestCase { $this->assertResponse(403, 'Correctly denied access to a file when file_test sets the header to -1.'); // Try non-existent file. + file_test_reset(); $url = file_create_url('private://' . $this->randomName()); $this->drupalHead($url); $this->assertResponse(404, 'Correctly returned 404 response for a non-existent file.'); + // Assert that hook_file_download is not called. + $hooks_results = file_test_get_all_calls(); + $hook_download_results = isset($hooks_results['download']) ? $hooks_results['download'] : NULL; + $this->assertEqual(array(), $hook_download_results); + + // Try requesting the private file url without a file specified. + file_test_reset(); + $this->drupalGet('system/files'); + $this->assertResponse(404, 'Correctly returned 404 response for a private file url without a file specified.'); + // Assert that hook_file_download is not called. + $hooks_results = file_test_get_all_calls(); + $hook_download_results = isset($hooks_results['download']) ? $hooks_results['download'] : NULL; + $this->assertEqual(array(), $hook_download_results); } /** diff --git a/drupal7/web/modules/simpletest/tests/file_test.info b/drupal7/web/modules/simpletest/tests/file_test.info index c90409d..f1dee61 100644 --- a/drupal7/web/modules/simpletest/tests/file_test.info +++ b/drupal7/web/modules/simpletest/tests/file_test.info @@ -6,7 +6,7 @@ core = 7.x files[] = file_test.module hidden = TRUE -; Information added by Drupal.org packaging script on 2024-03-06 -version = "7.100" +; Information added by Drupal.org packaging script on 2024-12-04 +version = "7.103" project = "drupal" -datestamp = "1709734591" +datestamp = "1733324608" diff --git a/drupal7/web/modules/simpletest/tests/filter_test.info b/drupal7/web/modules/simpletest/tests/filter_test.info index 2368bea..91e88a0 100644 --- a/drupal7/web/modules/simpletest/tests/filter_test.info +++ b/drupal7/web/modules/simpletest/tests/filter_test.info @@ -5,7 +5,7 @@ version = VERSION core = 7.x hidden = TRUE -; Information added by Drupal.org packaging script on 2024-03-06 -version = "7.100" +; Information added by Drupal.org packaging script on 2024-12-04 +version = "7.103" project = "drupal" -datestamp = "1709734591" +datestamp = "1733324608" diff --git a/drupal7/web/modules/simpletest/tests/form.test b/drupal7/web/modules/simpletest/tests/form.test index c8197fb..396a526 100644 --- a/drupal7/web/modules/simpletest/tests/form.test +++ b/drupal7/web/modules/simpletest/tests/form.test @@ -768,6 +768,109 @@ class FormValidationTestCase extends DrupalWebTestCase { } } +/** + * Tests validation of additional Form API properties. + * + * Limited to maxlength validation at present. + */ +class FormsElementsValidationTestCase extends DrupalWebTestCase { + public static function getInfo() { + return array( + 'name' => 'Form element validation - misc', + 'description' => 'Tests miscellaneous form element validation mechanisms.', + 'group' => 'Form API', + ); + } + + function setUp() { + parent::setUp('form_test'); + } + + /** + * Tests #maxlength validation. + */ + public function testMaxlengthValidation() { + $max_length = 5; + // The field types that support #maxlength. + $form = array( + 'textfield' => array( + '#type' => 'textfield', + '#title' => 'Textfield', + '#required' => FALSE, + '#maxlength' => $max_length, + ), + 'password' => array( + '#type' => 'password', + '#title' => 'Password', + '#maxlength' => $max_length, + ), + ); + + $edit = array( + 'textfield' => $this->randomString($max_length + 1), + 'password' => $this->randomString($max_length + 1), + ); + list($processed_form, $form_state, $errors) = $this->formSubmitHelper($form, $edit); + $this->assertFalse(empty($errors), 'Form with overly long inputs returned errors.'); + $this->assertTrue(isset($errors['textfield']) && strpos($errors['textfield'], 'cannot be longer than') !== FALSE, 'Long input error in textfield.'); + $this->assertTrue(isset($errors['password']) && strpos($errors['password'], 'cannot be longer than') !== FALSE, 'Long input error in password.'); + + // This test for NULL inputs cannot be performed using the drupalPost() method. + $edit['textfield'] = NULL; + $edit['password'] = NULL; + list($processed_form, $form_state, $errors) = $this->formSubmitHelper($form, $edit); + $this->assertTrue(empty($errors), 'Form with NULL inputs did not return errors.'); + + $edit['textfield'] = $this->randomString($max_length); + $edit['password'] = $this->randomString($max_length); + list($processed_form, $form_state, $errors) = $this->formSubmitHelper($form, $edit); + $this->assertTrue(empty($errors), 'Form with maxlength inputs did not return errors.'); + + } + + /** + * Helper function for the option check test to submit a form while collecting errors. + * + * Copied from FormsElementsTableSelectFunctionalTest. + * + * @param $form_element + * A form element to test. + * @param $edit + * An array containing post data. + * + * @return + * An array containing the processed form, the form_state and any errors. + */ + private function formSubmitHelper($form, $edit) { + $form_id = $this->randomName(); + $form_state = form_state_defaults(); + + $form['op'] = array('#type' => 'submit', '#value' => t('Submit')); + + $form_state['input'] = $edit; + $form_state['input']['form_id'] = $form_id; + + // The form token CSRF protection should not interfere with this test, + // so we bypass it by marking this test form as programmed. + $form_state['programmed'] = TRUE; + + drupal_prepare_form($form_id, $form, $form_state); + + drupal_process_form($form_id, $form, $form_state); + + $errors = form_get_errors(); + + // Clear errors and messages. + drupal_get_messages(); + form_clear_error(); + + // Return the processed form together with form_state and errors + // to allow the caller lowlevel access to the form. + return array($form, $form_state, $errors); + } + +} + /** * Test form element labels, required markers and associated output. */ diff --git a/drupal7/web/modules/simpletest/tests/form_test.info b/drupal7/web/modules/simpletest/tests/form_test.info index 7f3cd45..5009b4f 100644 --- a/drupal7/web/modules/simpletest/tests/form_test.info +++ b/drupal7/web/modules/simpletest/tests/form_test.info @@ -5,7 +5,7 @@ version = VERSION core = 7.x hidden = TRUE -; Information added by Drupal.org packaging script on 2024-03-06 -version = "7.100" +; Information added by Drupal.org packaging script on 2024-12-04 +version = "7.103" project = "drupal" -datestamp = "1709734591" +datestamp = "1733324608" diff --git a/drupal7/web/modules/simpletest/tests/image_test.info b/drupal7/web/modules/simpletest/tests/image_test.info index a95732f..2b6ffde 100644 --- a/drupal7/web/modules/simpletest/tests/image_test.info +++ b/drupal7/web/modules/simpletest/tests/image_test.info @@ -5,7 +5,7 @@ version = VERSION core = 7.x hidden = TRUE -; Information added by Drupal.org packaging script on 2024-03-06 -version = "7.100" +; Information added by Drupal.org packaging script on 2024-12-04 +version = "7.103" project = "drupal" -datestamp = "1709734591" +datestamp = "1733324608" diff --git a/drupal7/web/modules/simpletest/tests/menu_test.info b/drupal7/web/modules/simpletest/tests/menu_test.info index 1c3d30a..6036a22 100644 --- a/drupal7/web/modules/simpletest/tests/menu_test.info +++ b/drupal7/web/modules/simpletest/tests/menu_test.info @@ -5,7 +5,7 @@ version = VERSION core = 7.x hidden = TRUE -; Information added by Drupal.org packaging script on 2024-03-06 -version = "7.100" +; Information added by Drupal.org packaging script on 2024-12-04 +version = "7.103" project = "drupal" -datestamp = "1709734591" +datestamp = "1733324608" diff --git a/drupal7/web/modules/simpletest/tests/module_test.info b/drupal7/web/modules/simpletest/tests/module_test.info index eaf08d8..2b53961 100644 --- a/drupal7/web/modules/simpletest/tests/module_test.info +++ b/drupal7/web/modules/simpletest/tests/module_test.info @@ -5,7 +5,7 @@ version = VERSION core = 7.x hidden = TRUE -; Information added by Drupal.org packaging script on 2024-03-06 -version = "7.100" +; Information added by Drupal.org packaging script on 2024-12-04 +version = "7.103" project = "drupal" -datestamp = "1709734591" +datestamp = "1733324608" diff --git a/drupal7/web/modules/simpletest/tests/password.test b/drupal7/web/modules/simpletest/tests/password.test index 7105f3b..489b191 100644 --- a/drupal7/web/modules/simpletest/tests/password.test +++ b/drupal7/web/modules/simpletest/tests/password.test @@ -73,6 +73,7 @@ class PasswordHashingTest extends DrupalWebTestCase { $result = user_hash_password($password); $this->assertFalse(empty($result), '510 byte long password is allowed.'); $password .= 'xx'; + $result = user_hash_password($password); $this->assertFalse(empty($result), '512 byte long password is allowed.'); $password = str_repeat('€', 171); $result = user_hash_password($password); diff --git a/drupal7/web/modules/simpletest/tests/path_test.info b/drupal7/web/modules/simpletest/tests/path_test.info index 8ba73cc..c216a31 100644 --- a/drupal7/web/modules/simpletest/tests/path_test.info +++ b/drupal7/web/modules/simpletest/tests/path_test.info @@ -5,7 +5,7 @@ version = VERSION core = 7.x hidden = TRUE -; Information added by Drupal.org packaging script on 2024-03-06 -version = "7.100" +; Information added by Drupal.org packaging script on 2024-12-04 +version = "7.103" project = "drupal" -datestamp = "1709734591" +datestamp = "1733324608" diff --git a/drupal7/web/modules/simpletest/tests/psr_0_test/psr_0_test.info b/drupal7/web/modules/simpletest/tests/psr_0_test/psr_0_test.info index 8e3b328..88bf7c7 100644 --- a/drupal7/web/modules/simpletest/tests/psr_0_test/psr_0_test.info +++ b/drupal7/web/modules/simpletest/tests/psr_0_test/psr_0_test.info @@ -5,7 +5,7 @@ core = 7.x hidden = TRUE package = Testing -; Information added by Drupal.org packaging script on 2024-03-06 -version = "7.100" +; Information added by Drupal.org packaging script on 2024-12-04 +version = "7.103" project = "drupal" -datestamp = "1709734591" +datestamp = "1733324608" diff --git a/drupal7/web/modules/simpletest/tests/psr_4_test/psr_4_test.info b/drupal7/web/modules/simpletest/tests/psr_4_test/psr_4_test.info index 1070149..3ee3f1d 100644 --- a/drupal7/web/modules/simpletest/tests/psr_4_test/psr_4_test.info +++ b/drupal7/web/modules/simpletest/tests/psr_4_test/psr_4_test.info @@ -5,7 +5,7 @@ core = 7.x hidden = TRUE package = Testing -; Information added by Drupal.org packaging script on 2024-03-06 -version = "7.100" +; Information added by Drupal.org packaging script on 2024-12-04 +version = "7.103" project = "drupal" -datestamp = "1709734591" +datestamp = "1733324608" diff --git a/drupal7/web/modules/simpletest/tests/requirements1_test.info b/drupal7/web/modules/simpletest/tests/requirements1_test.info index a28270e..540299c 100644 --- a/drupal7/web/modules/simpletest/tests/requirements1_test.info +++ b/drupal7/web/modules/simpletest/tests/requirements1_test.info @@ -5,7 +5,7 @@ version = VERSION core = 7.x hidden = TRUE -; Information added by Drupal.org packaging script on 2024-03-06 -version = "7.100" +; Information added by Drupal.org packaging script on 2024-12-04 +version = "7.103" project = "drupal" -datestamp = "1709734591" +datestamp = "1733324608" diff --git a/drupal7/web/modules/simpletest/tests/requirements2_test.info b/drupal7/web/modules/simpletest/tests/requirements2_test.info index 91f1ea0..a402e20 100644 --- a/drupal7/web/modules/simpletest/tests/requirements2_test.info +++ b/drupal7/web/modules/simpletest/tests/requirements2_test.info @@ -7,7 +7,7 @@ version = VERSION core = 7.x hidden = TRUE -; Information added by Drupal.org packaging script on 2024-03-06 -version = "7.100" +; Information added by Drupal.org packaging script on 2024-12-04 +version = "7.103" project = "drupal" -datestamp = "1709734591" +datestamp = "1733324608" diff --git a/drupal7/web/modules/simpletest/tests/session.test b/drupal7/web/modules/simpletest/tests/session.test index 7b0a502..3ef6905 100644 --- a/drupal7/web/modules/simpletest/tests/session.test +++ b/drupal7/web/modules/simpletest/tests/session.test @@ -779,8 +779,10 @@ class SessionHttpsTestCase extends DrupalWebTestCase { $form[0]['action'] = $this->httpsUrl('user'); $this->drupalPost(NULL, $edit, t('Log in')); - // Make the secure session cookie blank. - curl_setopt($this->curlHandle, CURLOPT_COOKIE, "$secure_session_name="); + // Make the secure session cookie blank. Closing the curl handler will stop + // the previous session ID from persisting. + $this->curlClose(); + $this->additionalCurlOptions[CURLOPT_COOKIE] = rawurlencode($secure_session_name) . '=;'; $this->drupalGet($this->httpsUrl('user')); $this->assertNoText($admin_user->name, 'User is not logged in as admin'); $this->assertNoText($standard_user->name, "The user's own name is not displayed because the invalid session cookie has logged them out."); diff --git a/drupal7/web/modules/simpletest/tests/session_test.info b/drupal7/web/modules/simpletest/tests/session_test.info index 1c9cca4..d3cdbe6 100644 --- a/drupal7/web/modules/simpletest/tests/session_test.info +++ b/drupal7/web/modules/simpletest/tests/session_test.info @@ -5,7 +5,7 @@ version = VERSION core = 7.x hidden = TRUE -; Information added by Drupal.org packaging script on 2024-03-06 -version = "7.100" +; Information added by Drupal.org packaging script on 2024-12-04 +version = "7.103" project = "drupal" -datestamp = "1709734591" +datestamp = "1733324608" diff --git a/drupal7/web/modules/simpletest/tests/system_admin_test.info b/drupal7/web/modules/simpletest/tests/system_admin_test.info index a79c66b..ab8b1c5 100644 --- a/drupal7/web/modules/simpletest/tests/system_admin_test.info +++ b/drupal7/web/modules/simpletest/tests/system_admin_test.info @@ -6,7 +6,7 @@ core = 7.x hidden = FALSE configure = config/broken -; Information added by Drupal.org packaging script on 2024-03-06 -version = "7.100" +; Information added by Drupal.org packaging script on 2024-12-04 +version = "7.103" project = "drupal" -datestamp = "1709734591" +datestamp = "1733324608" diff --git a/drupal7/web/modules/simpletest/tests/system_dependencies_test.info b/drupal7/web/modules/simpletest/tests/system_dependencies_test.info index a8aadae..c752af4 100644 --- a/drupal7/web/modules/simpletest/tests/system_dependencies_test.info +++ b/drupal7/web/modules/simpletest/tests/system_dependencies_test.info @@ -6,7 +6,7 @@ core = 7.x hidden = TRUE dependencies[] = _missing_dependency -; Information added by Drupal.org packaging script on 2024-03-06 -version = "7.100" +; Information added by Drupal.org packaging script on 2024-12-04 +version = "7.103" project = "drupal" -datestamp = "1709734591" +datestamp = "1733324608" diff --git a/drupal7/web/modules/simpletest/tests/system_incompatible_core_version_dependencies_test.info b/drupal7/web/modules/simpletest/tests/system_incompatible_core_version_dependencies_test.info index 234a989..6399a8d 100644 --- a/drupal7/web/modules/simpletest/tests/system_incompatible_core_version_dependencies_test.info +++ b/drupal7/web/modules/simpletest/tests/system_incompatible_core_version_dependencies_test.info @@ -6,7 +6,7 @@ core = 7.x hidden = TRUE dependencies[] = system_incompatible_core_version_test -; Information added by Drupal.org packaging script on 2024-03-06 -version = "7.100" +; Information added by Drupal.org packaging script on 2024-12-04 +version = "7.103" project = "drupal" -datestamp = "1709734591" +datestamp = "1733324608" diff --git a/drupal7/web/modules/simpletest/tests/system_incompatible_core_version_test.info b/drupal7/web/modules/simpletest/tests/system_incompatible_core_version_test.info index cd50cc9..1249eae 100644 --- a/drupal7/web/modules/simpletest/tests/system_incompatible_core_version_test.info +++ b/drupal7/web/modules/simpletest/tests/system_incompatible_core_version_test.info @@ -5,7 +5,7 @@ version = VERSION core = 5.x hidden = TRUE -; Information added by Drupal.org packaging script on 2024-03-06 -version = "7.100" +; Information added by Drupal.org packaging script on 2024-12-04 +version = "7.103" project = "drupal" -datestamp = "1709734591" +datestamp = "1733324608" diff --git a/drupal7/web/modules/simpletest/tests/system_incompatible_module_version_dependencies_test.info b/drupal7/web/modules/simpletest/tests/system_incompatible_module_version_dependencies_test.info index 2f95bda..1676d6f 100644 --- a/drupal7/web/modules/simpletest/tests/system_incompatible_module_version_dependencies_test.info +++ b/drupal7/web/modules/simpletest/tests/system_incompatible_module_version_dependencies_test.info @@ -7,7 +7,7 @@ hidden = TRUE ; system_incompatible_module_version_test declares version 1.0 dependencies[] = system_incompatible_module_version_test (>2.0) -; Information added by Drupal.org packaging script on 2024-03-06 -version = "7.100" +; Information added by Drupal.org packaging script on 2024-12-04 +version = "7.103" project = "drupal" -datestamp = "1709734591" +datestamp = "1733324608" diff --git a/drupal7/web/modules/simpletest/tests/system_incompatible_module_version_test.info b/drupal7/web/modules/simpletest/tests/system_incompatible_module_version_test.info index 40cddd3..2934db5 100644 --- a/drupal7/web/modules/simpletest/tests/system_incompatible_module_version_test.info +++ b/drupal7/web/modules/simpletest/tests/system_incompatible_module_version_test.info @@ -5,7 +5,7 @@ version = 1.0 core = 7.x hidden = TRUE -; Information added by Drupal.org packaging script on 2024-03-06 -version = "7.100" +; Information added by Drupal.org packaging script on 2024-12-04 +version = "7.103" project = "drupal" -datestamp = "1709734591" +datestamp = "1733324608" diff --git a/drupal7/web/modules/simpletest/tests/system_null_version_test.info b/drupal7/web/modules/simpletest/tests/system_null_version_test.info index 7d6d47b..3da869c 100644 --- a/drupal7/web/modules/simpletest/tests/system_null_version_test.info +++ b/drupal7/web/modules/simpletest/tests/system_null_version_test.info @@ -4,7 +4,7 @@ package = Only For Testing core = 7.x hidden = FALSE -; Information added by Drupal.org packaging script on 2024-03-06 -version = "7.100" +; Information added by Drupal.org packaging script on 2024-12-04 +version = "7.103" project = "drupal" -datestamp = "1709734591" +datestamp = "1733324608" diff --git a/drupal7/web/modules/simpletest/tests/system_project_namespace_test.info b/drupal7/web/modules/simpletest/tests/system_project_namespace_test.info index 751a078..82a6d31 100644 --- a/drupal7/web/modules/simpletest/tests/system_project_namespace_test.info +++ b/drupal7/web/modules/simpletest/tests/system_project_namespace_test.info @@ -6,7 +6,7 @@ core = 7.x hidden = TRUE dependencies[] = drupal:filter -; Information added by Drupal.org packaging script on 2024-03-06 -version = "7.100" +; Information added by Drupal.org packaging script on 2024-12-04 +version = "7.103" project = "drupal" -datestamp = "1709734591" +datestamp = "1733324608" diff --git a/drupal7/web/modules/simpletest/tests/system_requires_null_version_test.info b/drupal7/web/modules/simpletest/tests/system_requires_null_version_test.info index 62bb270..ea83a32 100644 --- a/drupal7/web/modules/simpletest/tests/system_requires_null_version_test.info +++ b/drupal7/web/modules/simpletest/tests/system_requires_null_version_test.info @@ -6,7 +6,7 @@ version = VERSION hidden = FALSE dependencies[] = system_null_version_test -; Information added by Drupal.org packaging script on 2024-03-06 -version = "7.100" +; Information added by Drupal.org packaging script on 2024-12-04 +version = "7.103" project = "drupal" -datestamp = "1709734591" +datestamp = "1733324608" diff --git a/drupal7/web/modules/simpletest/tests/system_test.info b/drupal7/web/modules/simpletest/tests/system_test.info index 9b7e28d..b06d5a2 100644 --- a/drupal7/web/modules/simpletest/tests/system_test.info +++ b/drupal7/web/modules/simpletest/tests/system_test.info @@ -6,7 +6,7 @@ core = 7.x files[] = system_test.module hidden = TRUE -; Information added by Drupal.org packaging script on 2024-03-06 -version = "7.100" +; Information added by Drupal.org packaging script on 2024-12-04 +version = "7.103" project = "drupal" -datestamp = "1709734591" +datestamp = "1733324608" diff --git a/drupal7/web/modules/simpletest/tests/taxonomy_nodes_test.info b/drupal7/web/modules/simpletest/tests/taxonomy_nodes_test.info index 3f6de66..5a64a08 100644 --- a/drupal7/web/modules/simpletest/tests/taxonomy_nodes_test.info +++ b/drupal7/web/modules/simpletest/tests/taxonomy_nodes_test.info @@ -5,7 +5,7 @@ version = VERSION core = 7.x hidden = TRUE -; Information added by Drupal.org packaging script on 2024-03-06 -version = "7.100" +; Information added by Drupal.org packaging script on 2024-12-04 +version = "7.103" project = "drupal" -datestamp = "1709734591" +datestamp = "1733324608" diff --git a/drupal7/web/modules/simpletest/tests/taxonomy_test.info b/drupal7/web/modules/simpletest/tests/taxonomy_test.info index 3785043..1cdb6e1 100644 --- a/drupal7/web/modules/simpletest/tests/taxonomy_test.info +++ b/drupal7/web/modules/simpletest/tests/taxonomy_test.info @@ -6,7 +6,7 @@ core = 7.x hidden = TRUE dependencies[] = taxonomy -; Information added by Drupal.org packaging script on 2024-03-06 -version = "7.100" +; Information added by Drupal.org packaging script on 2024-12-04 +version = "7.103" project = "drupal" -datestamp = "1709734591" +datestamp = "1733324608" diff --git a/drupal7/web/modules/simpletest/tests/theme_test.info b/drupal7/web/modules/simpletest/tests/theme_test.info index 9d09183..5aec25a 100644 --- a/drupal7/web/modules/simpletest/tests/theme_test.info +++ b/drupal7/web/modules/simpletest/tests/theme_test.info @@ -5,7 +5,7 @@ version = VERSION core = 7.x hidden = TRUE -; Information added by Drupal.org packaging script on 2024-03-06 -version = "7.100" +; Information added by Drupal.org packaging script on 2024-12-04 +version = "7.103" project = "drupal" -datestamp = "1709734591" +datestamp = "1733324608" diff --git a/drupal7/web/modules/simpletest/tests/themes/test_basetheme/test_basetheme.info b/drupal7/web/modules/simpletest/tests/themes/test_basetheme/test_basetheme.info index a6668e5..6745dfc 100644 --- a/drupal7/web/modules/simpletest/tests/themes/test_basetheme/test_basetheme.info +++ b/drupal7/web/modules/simpletest/tests/themes/test_basetheme/test_basetheme.info @@ -6,7 +6,7 @@ hidden = TRUE settings[basetheme_only] = base theme value settings[subtheme_override] = base theme value -; Information added by Drupal.org packaging script on 2024-03-06 -version = "7.100" +; Information added by Drupal.org packaging script on 2024-12-04 +version = "7.103" project = "drupal" -datestamp = "1709734591" +datestamp = "1733324608" diff --git a/drupal7/web/modules/simpletest/tests/themes/test_subtheme/test_subtheme.info b/drupal7/web/modules/simpletest/tests/themes/test_subtheme/test_subtheme.info index 7d87ae6..c768549 100644 --- a/drupal7/web/modules/simpletest/tests/themes/test_subtheme/test_subtheme.info +++ b/drupal7/web/modules/simpletest/tests/themes/test_subtheme/test_subtheme.info @@ -6,7 +6,7 @@ hidden = TRUE settings[subtheme_override] = subtheme value -; Information added by Drupal.org packaging script on 2024-03-06 -version = "7.100" +; Information added by Drupal.org packaging script on 2024-12-04 +version = "7.103" project = "drupal" -datestamp = "1709734591" +datestamp = "1733324608" diff --git a/drupal7/web/modules/simpletest/tests/themes/test_theme/test_theme.info b/drupal7/web/modules/simpletest/tests/themes/test_theme/test_theme.info index ed3e60f..cfeafdd 100644 --- a/drupal7/web/modules/simpletest/tests/themes/test_theme/test_theme.info +++ b/drupal7/web/modules/simpletest/tests/themes/test_theme/test_theme.info @@ -17,7 +17,7 @@ stylesheets[all][] = system.base.css settings[theme_test_setting] = default value -; Information added by Drupal.org packaging script on 2024-03-06 -version = "7.100" +; Information added by Drupal.org packaging script on 2024-12-04 +version = "7.103" project = "drupal" -datestamp = "1709734591" +datestamp = "1733324608" diff --git a/drupal7/web/modules/simpletest/tests/themes/test_theme_nyan_cat/test_theme_nyan_cat.info b/drupal7/web/modules/simpletest/tests/themes/test_theme_nyan_cat/test_theme_nyan_cat.info index 8126fbd..6c6f45f 100644 --- a/drupal7/web/modules/simpletest/tests/themes/test_theme_nyan_cat/test_theme_nyan_cat.info +++ b/drupal7/web/modules/simpletest/tests/themes/test_theme_nyan_cat/test_theme_nyan_cat.info @@ -4,7 +4,7 @@ core = 7.x hidden = TRUE engine = nyan_cat -; Information added by Drupal.org packaging script on 2024-03-06 -version = "7.100" +; Information added by Drupal.org packaging script on 2024-12-04 +version = "7.103" project = "drupal" -datestamp = "1709734591" +datestamp = "1733324608" diff --git a/drupal7/web/modules/simpletest/tests/unicode.test b/drupal7/web/modules/simpletest/tests/unicode.test index bd96553..d0e631d 100644 --- a/drupal7/web/modules/simpletest/tests/unicode.test +++ b/drupal7/web/modules/simpletest/tests/unicode.test @@ -118,10 +118,12 @@ class UnicodeUnitTest extends DrupalUnitTestCase { $testcase = array( 'tHe QUIcK bRoWn' => 15, 'ÜBER-åwesome' => 12, + 'NULL' => 0, ); foreach ($testcase as $input => $output) { - $this->assertEqual(drupal_strlen($input), $output, format_string('%input length is %output', array('%input' => $input, '%output' => $output))); + $tested_value = ($input === 'NULL' ? NULL : $input); + $this->assertEqual(drupal_strlen($tested_value), $output, format_string('%input length is %output', array('%input' => $input, '%output' => $output))); } } diff --git a/drupal7/web/modules/simpletest/tests/update_script_test.info b/drupal7/web/modules/simpletest/tests/update_script_test.info index c139ae0..d0dfff7 100644 --- a/drupal7/web/modules/simpletest/tests/update_script_test.info +++ b/drupal7/web/modules/simpletest/tests/update_script_test.info @@ -5,7 +5,7 @@ version = VERSION core = 7.x hidden = TRUE -; Information added by Drupal.org packaging script on 2024-03-06 -version = "7.100" +; Information added by Drupal.org packaging script on 2024-12-04 +version = "7.103" project = "drupal" -datestamp = "1709734591" +datestamp = "1733324608" diff --git a/drupal7/web/modules/simpletest/tests/update_test_1.info b/drupal7/web/modules/simpletest/tests/update_test_1.info index 016c81f..b8c1f0e 100644 --- a/drupal7/web/modules/simpletest/tests/update_test_1.info +++ b/drupal7/web/modules/simpletest/tests/update_test_1.info @@ -5,7 +5,7 @@ version = VERSION core = 7.x hidden = TRUE -; Information added by Drupal.org packaging script on 2024-03-06 -version = "7.100" +; Information added by Drupal.org packaging script on 2024-12-04 +version = "7.103" project = "drupal" -datestamp = "1709734591" +datestamp = "1733324608" diff --git a/drupal7/web/modules/simpletest/tests/update_test_2.info b/drupal7/web/modules/simpletest/tests/update_test_2.info index 016c81f..b8c1f0e 100644 --- a/drupal7/web/modules/simpletest/tests/update_test_2.info +++ b/drupal7/web/modules/simpletest/tests/update_test_2.info @@ -5,7 +5,7 @@ version = VERSION core = 7.x hidden = TRUE -; Information added by Drupal.org packaging script on 2024-03-06 -version = "7.100" +; Information added by Drupal.org packaging script on 2024-12-04 +version = "7.103" project = "drupal" -datestamp = "1709734591" +datestamp = "1733324608" diff --git a/drupal7/web/modules/simpletest/tests/update_test_3.info b/drupal7/web/modules/simpletest/tests/update_test_3.info index 016c81f..b8c1f0e 100644 --- a/drupal7/web/modules/simpletest/tests/update_test_3.info +++ b/drupal7/web/modules/simpletest/tests/update_test_3.info @@ -5,7 +5,7 @@ version = VERSION core = 7.x hidden = TRUE -; Information added by Drupal.org packaging script on 2024-03-06 -version = "7.100" +; Information added by Drupal.org packaging script on 2024-12-04 +version = "7.103" project = "drupal" -datestamp = "1709734591" +datestamp = "1733324608" diff --git a/drupal7/web/modules/simpletest/tests/url_alter_test.info b/drupal7/web/modules/simpletest/tests/url_alter_test.info index 9f40b1a..058459a 100644 --- a/drupal7/web/modules/simpletest/tests/url_alter_test.info +++ b/drupal7/web/modules/simpletest/tests/url_alter_test.info @@ -5,7 +5,7 @@ package = Testing version = VERSION hidden = TRUE -; Information added by Drupal.org packaging script on 2024-03-06 -version = "7.100" +; Information added by Drupal.org packaging script on 2024-12-04 +version = "7.103" project = "drupal" -datestamp = "1709734591" +datestamp = "1733324608" diff --git a/drupal7/web/modules/simpletest/tests/xmlrpc_test.info b/drupal7/web/modules/simpletest/tests/xmlrpc_test.info index da63545..c08a4e2 100644 --- a/drupal7/web/modules/simpletest/tests/xmlrpc_test.info +++ b/drupal7/web/modules/simpletest/tests/xmlrpc_test.info @@ -5,7 +5,7 @@ version = VERSION core = 7.x hidden = TRUE -; Information added by Drupal.org packaging script on 2024-03-06 -version = "7.100" +; Information added by Drupal.org packaging script on 2024-12-04 +version = "7.103" project = "drupal" -datestamp = "1709734591" +datestamp = "1733324608" diff --git a/drupal7/web/modules/statistics/statistics.info b/drupal7/web/modules/statistics/statistics.info index d46b2b6..eaad1f3 100644 --- a/drupal7/web/modules/statistics/statistics.info +++ b/drupal7/web/modules/statistics/statistics.info @@ -6,7 +6,7 @@ core = 7.x files[] = statistics.test configure = admin/config/system/statistics -; Information added by Drupal.org packaging script on 2024-03-06 -version = "7.100" +; Information added by Drupal.org packaging script on 2024-12-04 +version = "7.103" project = "drupal" -datestamp = "1709734591" +datestamp = "1733324608" diff --git a/drupal7/web/modules/syslog/syslog.info b/drupal7/web/modules/syslog/syslog.info index c21f347..67c596a 100644 --- a/drupal7/web/modules/syslog/syslog.info +++ b/drupal7/web/modules/syslog/syslog.info @@ -6,7 +6,7 @@ core = 7.x files[] = syslog.test configure = admin/config/development/logging -; Information added by Drupal.org packaging script on 2024-03-06 -version = "7.100" +; Information added by Drupal.org packaging script on 2024-12-04 +version = "7.103" project = "drupal" -datestamp = "1709734591" +datestamp = "1733324608" diff --git a/drupal7/web/modules/system/system.admin.inc b/drupal7/web/modules/system/system.admin.inc index 664e21a..9ddecc2 100644 --- a/drupal7/web/modules/system/system.admin.inc +++ b/drupal7/web/modules/system/system.admin.inc @@ -1645,6 +1645,12 @@ function system_cron_settings() { '#default_value' => variable_get('cron_safe_threshold', DRUPAL_CRON_DEFAULT_THRESHOLD), '#options' => array(0 => t('Never')) + drupal_map_assoc(array(3600, 10800, 21600, 43200, 86400, 604800), 'format_interval'), ); + $form['cron']['cron_detailed_logging'] = array( + '#type' => 'checkbox', + '#title' => t('Detailed cron logging'), + '#default_value' => variable_get('cron_detailed_logging', DRUPAL_CRON_DETAILED_LOGGING), + '#description' => t('Run times of individual cron jobs will be written to watchdog'), + ); return system_settings_form($form); } diff --git a/drupal7/web/modules/system/system.info b/drupal7/web/modules/system/system.info index 01732b7..f55b778 100644 --- a/drupal7/web/modules/system/system.info +++ b/drupal7/web/modules/system/system.info @@ -12,7 +12,7 @@ files[] = system.test required = TRUE configure = admin/config/system -; Information added by Drupal.org packaging script on 2024-03-06 -version = "7.100" +; Information added by Drupal.org packaging script on 2024-12-04 +version = "7.103" project = "drupal" -datestamp = "1709734591" +datestamp = "1733324608" diff --git a/drupal7/web/modules/system/system.install b/drupal7/web/modules/system/system.install index da49373..4e92f96 100644 --- a/drupal7/web/modules/system/system.install +++ b/drupal7/web/modules/system/system.install @@ -567,6 +567,27 @@ function system_requirements($phase) { } } + // See if trusted hostnames have been configured, and warn the user if they + // are not set. + if ($phase == 'runtime') { + $trusted_host_patterns = variable_get('trusted_host_patterns', array()); + if (empty($trusted_host_patterns)) { + $requirements['trusted_host_patterns'] = array( + 'title' => $t('Trusted Host Settings'), + 'value' => $t('Not enabled'), + 'description' => $t('The trusted_host_patterns setting is not configured in settings.php. This can lead to security vulnerabilities. It is highly recommended that you configure this. See Protecting against HTTP HOST Header attacks for more information.', array('@url' => 'https://www.drupal.org/node/1992030')), + 'severity' => REQUIREMENT_ERROR, + ); + } + else { + $requirements['trusted_host_patterns'] = array( + 'title' => $t('Trusted Host Settings'), + 'value' => $t('Enabled'), + 'description' => $t('The trusted_host_patterns setting is set to allow %trusted_host_patterns', array('%trusted_host_patterns' => implode(', ', $trusted_host_patterns))), + ); + } + } + return $requirements; } @@ -3420,6 +3441,13 @@ function system_update_7087() { } } +/** + * Clear caches as registry has been altered. + */ +function system_update_7088() { + // Empty update to clear caches. +} + /** * @} End of "defgroup updates-7.x-extra". * The next series of updates should start at 8000. diff --git a/drupal7/web/modules/system/system.mail.inc b/drupal7/web/modules/system/system.mail.inc index 246fc57..364cf02 100644 --- a/drupal7/web/modules/system/system.mail.inc +++ b/drupal7/web/modules/system/system.mail.inc @@ -21,10 +21,8 @@ class DefaultMailSystem implements MailSystemInterface { public function format(array $message) { // Join the body array into one string. $message['body'] = implode("\n\n", $message['body']); - // Convert any HTML to plain-text. + // Convert any HTML to plain-text and wrap the mail body for sending. $message['body'] = drupal_html_to_text($message['body']); - // Wrap the mail body for sending. - $message['body'] = drupal_wrap_mail($message['body']); return $message; } @@ -64,7 +62,14 @@ class DefaultMailSystem implements MailSystemInterface { $mail_body = preg_replace('@\r?\n@', $line_endings, $message['body']); // For headers, PHP's API suggests that we use CRLF normally, // but some MTAs incorrectly replace LF with CRLF. See #234403. - $mail_headers = join("\n", $mimeheaders); + $headers_line_endings = variable_get('mail_headers_line_endings', "\n"); + if (defined('PHP_VERSION_ID') && PHP_VERSION_ID >= 80000 ) { + // PHP 8+ requires headers to be separated by CRLF, see: + // - https://bugs.php.net/bug.php?id=81158 + // - https://github.com/php/php-src/commit/6983ae751cd301886c966b84367fc7aaa1273b2d#diff-c6922cd89f6f75912eb377833ca1eddb7dd41de088be821024b8a0e340fed3df + $headers_line_endings = variable_get('mail_headers_line_endings', "\r\n"); + } + $mail_headers = join($headers_line_endings, $mimeheaders); // We suppress warnings and notices from mail() because of issues on some // hosts. The return value of this method will still indicate whether mail diff --git a/drupal7/web/modules/system/system.module b/drupal7/web/modules/system/system.module index dc6ccfe..4986aa5 100644 --- a/drupal7/web/modules/system/system.module +++ b/drupal7/web/modules/system/system.module @@ -15,6 +15,11 @@ define('DRUPAL_MAXIMUM_TEMP_FILE_AGE', 21600); */ define('DRUPAL_CRON_DEFAULT_THRESHOLD', 10800); +/** + * Detailed cron logging disabled by default. + */ +define('DRUPAL_CRON_DETAILED_LOGGING', 0); + /** * New users will be set to the default time zone at registration. */ @@ -4134,3 +4139,11 @@ function system_file_download($uri) { } } } + +/** + * Implements hook_registry_files_alter + */ +function system_registry_files_alter(&$files, $modules) { + // Database drivers that use DatabaseStatementPrefetch must include this file. + unset($files['includes/database/prefetch.inc']); +} diff --git a/drupal7/web/modules/system/system.tar.inc b/drupal7/web/modules/system/system.tar.inc index fd012e6..700e8a3 100644 --- a/drupal7/web/modules/system/system.tar.inc +++ b/drupal7/web/modules/system/system.tar.inc @@ -341,7 +341,7 @@ class Archive_Tar * single string with names separated by a single * blank space. * - * @return true on success, false on error. + * @return bool true on success, false on error. * @see createModify() */ public function create($p_filelist) @@ -361,7 +361,7 @@ class Archive_Tar * single string with names separated by a single * blank space. * - * @return true on success, false on error. + * @return bool true on success, false on error. * @see createModify() * @access public */ @@ -504,7 +504,7 @@ class Archive_Tar * each element in the list, when * relevant. * - * @return true on success, false on error. + * @return bool true on success, false on error. */ public function addModify($p_filelist, $p_add_dir, $p_remove_dir = '') { @@ -557,7 +557,7 @@ class Archive_Tar * gid => the group ID of the file * (default = 0 = root) * - * @return true on success, false on error. + * @return bool true on success, false on error. */ public function addString($p_filename, $p_string, $p_datetime = false, $p_params = array()) { @@ -683,7 +683,7 @@ class Archive_Tar * @param boolean $p_preserve Preserve user/group ownership of files * @param boolean $p_symlinks Allow symlinks. * - * @return true on success, false on error. + * @return bool true on success, false on error. * @see extractModify() */ public function extractList($p_filelist, $p_path = '', $p_remove_path = '', $p_preserve = false, $p_symlinks = true) @@ -721,7 +721,7 @@ class Archive_Tar * list of parameters, in the format attribute code + attribute values : * $arch->setAttribute(ARCHIVE_TAR_ATT_SEPARATOR, ','); * - * @return true on success, false on error. + * @return bool true on success, false on error. */ public function setAttribute() { @@ -2178,7 +2178,7 @@ class Archive_Tar if ($v_extract_file) { if ($v_header['typeflag'] == "5") { if (!@file_exists($v_header['filename'])) { - if (!@mkdir($v_header['filename'], 0777)) { + if (!@mkdir($v_header['filename'], 0775)) { $this->_error( 'Unable to create directory {' . $v_header['filename'] . '}' @@ -2511,7 +2511,7 @@ class Archive_Tar return false; } - if (!@mkdir($p_dir, 0777)) { + if (!@mkdir($p_dir, 0775)) { $this->_error("Unable to create directory '$p_dir'"); return false; } diff --git a/drupal7/web/modules/system/system.test b/drupal7/web/modules/system/system.test index 518892d..312b90a 100644 --- a/drupal7/web/modules/system/system.test +++ b/drupal7/web/modules/system/system.test @@ -2937,6 +2937,21 @@ class SystemAdminTestCase extends DrupalWebTestCase { $this->drupalGet(''); $this->assertTrue($this->cookies['Drupal.visitor.admin_compact_mode']['value'], 'Compact mode persists on new requests.'); } + + /** + * Test Trusted Host Settings message on the status report page. + */ + function testTrustedHostSettingsMessage() { + $this->drupalGet('admin/reports/status'); + $this->assertText('The trusted_host_patterns setting is not configured in settings.php.'); + $this->assertNoText('The trusted_host_patterns setting is set to allow'); + + variable_set('trusted_host_patterns', array('a_trusted_pattern', 'another_trusted_pattern')); + $this->drupalGet('admin/reports/status'); + $this->assertNoText('The trusted_host_patterns setting is not configured in settings.php.'); + $this->assertText('The trusted_host_patterns setting is set to allow a_trusted_pattern, another_trusted_pattern'); + } + } /** diff --git a/drupal7/web/modules/system/tests/cron_queue_test.info b/drupal7/web/modules/system/tests/cron_queue_test.info index f02f197..e940feb 100644 --- a/drupal7/web/modules/system/tests/cron_queue_test.info +++ b/drupal7/web/modules/system/tests/cron_queue_test.info @@ -5,7 +5,7 @@ version = VERSION core = 7.x hidden = TRUE -; Information added by Drupal.org packaging script on 2024-03-06 -version = "7.100" +; Information added by Drupal.org packaging script on 2024-12-04 +version = "7.103" project = "drupal" -datestamp = "1709734591" +datestamp = "1733324608" diff --git a/drupal7/web/modules/system/tests/system_cron_test.info b/drupal7/web/modules/system/tests/system_cron_test.info index 025f9be..c23e5e7 100644 --- a/drupal7/web/modules/system/tests/system_cron_test.info +++ b/drupal7/web/modules/system/tests/system_cron_test.info @@ -5,7 +5,7 @@ version = VERSION core = 7.x hidden = TRUE -; Information added by Drupal.org packaging script on 2024-03-06 -version = "7.100" +; Information added by Drupal.org packaging script on 2024-12-04 +version = "7.103" project = "drupal" -datestamp = "1709734591" +datestamp = "1733324608" diff --git a/drupal7/web/modules/taxonomy/taxonomy.info b/drupal7/web/modules/taxonomy/taxonomy.info index 63598f0..b5174b3 100644 --- a/drupal7/web/modules/taxonomy/taxonomy.info +++ b/drupal7/web/modules/taxonomy/taxonomy.info @@ -8,7 +8,7 @@ files[] = taxonomy.module files[] = taxonomy.test configure = admin/structure/taxonomy -; Information added by Drupal.org packaging script on 2024-03-06 -version = "7.100" +; Information added by Drupal.org packaging script on 2024-12-04 +version = "7.103" project = "drupal" -datestamp = "1709734591" +datestamp = "1733324608" diff --git a/drupal7/web/modules/toolbar/toolbar.info b/drupal7/web/modules/toolbar/toolbar.info index b1206cb..329aa41 100644 --- a/drupal7/web/modules/toolbar/toolbar.info +++ b/drupal7/web/modules/toolbar/toolbar.info @@ -5,7 +5,7 @@ package = Core version = VERSION files[] = toolbar.test -; Information added by Drupal.org packaging script on 2024-03-06 -version = "7.100" +; Information added by Drupal.org packaging script on 2024-12-04 +version = "7.103" project = "drupal" -datestamp = "1709734591" +datestamp = "1733324608" diff --git a/drupal7/web/modules/tracker/tracker.info b/drupal7/web/modules/tracker/tracker.info index ba1bbc8..edc0ab8 100644 --- a/drupal7/web/modules/tracker/tracker.info +++ b/drupal7/web/modules/tracker/tracker.info @@ -6,7 +6,7 @@ version = VERSION core = 7.x files[] = tracker.test -; Information added by Drupal.org packaging script on 2024-03-06 -version = "7.100" +; Information added by Drupal.org packaging script on 2024-12-04 +version = "7.103" project = "drupal" -datestamp = "1709734591" +datestamp = "1733324608" diff --git a/drupal7/web/modules/translation/tests/translation_test.info b/drupal7/web/modules/translation/tests/translation_test.info index da8992c..cbffc89 100644 --- a/drupal7/web/modules/translation/tests/translation_test.info +++ b/drupal7/web/modules/translation/tests/translation_test.info @@ -5,7 +5,7 @@ package = Testing version = VERSION hidden = TRUE -; Information added by Drupal.org packaging script on 2024-03-06 -version = "7.100" +; Information added by Drupal.org packaging script on 2024-12-04 +version = "7.103" project = "drupal" -datestamp = "1709734591" +datestamp = "1733324608" diff --git a/drupal7/web/modules/translation/translation.info b/drupal7/web/modules/translation/translation.info index c1606fc..10abb41 100644 --- a/drupal7/web/modules/translation/translation.info +++ b/drupal7/web/modules/translation/translation.info @@ -6,7 +6,7 @@ version = VERSION core = 7.x files[] = translation.test -; Information added by Drupal.org packaging script on 2024-03-06 -version = "7.100" +; Information added by Drupal.org packaging script on 2024-12-04 +version = "7.103" project = "drupal" -datestamp = "1709734591" +datestamp = "1733324608" diff --git a/drupal7/web/modules/trigger/tests/trigger_test.info b/drupal7/web/modules/trigger/tests/trigger_test.info index 691fe64..0cf90b3 100644 --- a/drupal7/web/modules/trigger/tests/trigger_test.info +++ b/drupal7/web/modules/trigger/tests/trigger_test.info @@ -4,7 +4,7 @@ package = Testing core = 7.x hidden = TRUE -; Information added by Drupal.org packaging script on 2024-03-06 -version = "7.100" +; Information added by Drupal.org packaging script on 2024-12-04 +version = "7.103" project = "drupal" -datestamp = "1709734591" +datestamp = "1733324608" diff --git a/drupal7/web/modules/trigger/trigger.info b/drupal7/web/modules/trigger/trigger.info index 2df90b3..c25e207 100644 --- a/drupal7/web/modules/trigger/trigger.info +++ b/drupal7/web/modules/trigger/trigger.info @@ -6,7 +6,7 @@ core = 7.x files[] = trigger.test configure = admin/structure/trigger -; Information added by Drupal.org packaging script on 2024-03-06 -version = "7.100" +; Information added by Drupal.org packaging script on 2024-12-04 +version = "7.103" project = "drupal" -datestamp = "1709734591" +datestamp = "1733324608" diff --git a/drupal7/web/modules/update/tests/aaa_update_test.info b/drupal7/web/modules/update/tests/aaa_update_test.info index bbb7eae..930d0f0 100644 --- a/drupal7/web/modules/update/tests/aaa_update_test.info +++ b/drupal7/web/modules/update/tests/aaa_update_test.info @@ -4,7 +4,7 @@ package = Testing core = 7.x hidden = TRUE -; Information added by Drupal.org packaging script on 2024-03-06 -version = "7.100" +; Information added by Drupal.org packaging script on 2024-12-04 +version = "7.103" project = "drupal" -datestamp = "1709734591" +datestamp = "1733324608" diff --git a/drupal7/web/modules/update/tests/bbb_update_test.info b/drupal7/web/modules/update/tests/bbb_update_test.info index 57981a6..82c797b 100644 --- a/drupal7/web/modules/update/tests/bbb_update_test.info +++ b/drupal7/web/modules/update/tests/bbb_update_test.info @@ -4,7 +4,7 @@ package = Testing core = 7.x hidden = TRUE -; Information added by Drupal.org packaging script on 2024-03-06 -version = "7.100" +; Information added by Drupal.org packaging script on 2024-12-04 +version = "7.103" project = "drupal" -datestamp = "1709734591" +datestamp = "1733324608" diff --git a/drupal7/web/modules/update/tests/ccc_update_test.info b/drupal7/web/modules/update/tests/ccc_update_test.info index b3c9517..22247a9 100644 --- a/drupal7/web/modules/update/tests/ccc_update_test.info +++ b/drupal7/web/modules/update/tests/ccc_update_test.info @@ -4,7 +4,7 @@ package = Testing core = 7.x hidden = TRUE -; Information added by Drupal.org packaging script on 2024-03-06 -version = "7.100" +; Information added by Drupal.org packaging script on 2024-12-04 +version = "7.103" project = "drupal" -datestamp = "1709734591" +datestamp = "1733324608" diff --git a/drupal7/web/modules/update/tests/themes/update_test_admintheme/update_test_admintheme.info b/drupal7/web/modules/update/tests/themes/update_test_admintheme/update_test_admintheme.info index e27b1b9..87f4f64 100644 --- a/drupal7/web/modules/update/tests/themes/update_test_admintheme/update_test_admintheme.info +++ b/drupal7/web/modules/update/tests/themes/update_test_admintheme/update_test_admintheme.info @@ -3,7 +3,7 @@ description = Test theme which is used as admin theme. core = 7.x hidden = TRUE -; Information added by Drupal.org packaging script on 2024-03-06 -version = "7.100" +; Information added by Drupal.org packaging script on 2024-12-04 +version = "7.103" project = "drupal" -datestamp = "1709734591" +datestamp = "1733324608" diff --git a/drupal7/web/modules/update/tests/themes/update_test_basetheme/update_test_basetheme.info b/drupal7/web/modules/update/tests/themes/update_test_basetheme/update_test_basetheme.info index 128cd11..df0a777 100644 --- a/drupal7/web/modules/update/tests/themes/update_test_basetheme/update_test_basetheme.info +++ b/drupal7/web/modules/update/tests/themes/update_test_basetheme/update_test_basetheme.info @@ -3,7 +3,7 @@ description = Test theme which acts as a base theme for other test subthemes. core = 7.x hidden = TRUE -; Information added by Drupal.org packaging script on 2024-03-06 -version = "7.100" +; Information added by Drupal.org packaging script on 2024-12-04 +version = "7.103" project = "drupal" -datestamp = "1709734591" +datestamp = "1733324608" diff --git a/drupal7/web/modules/update/tests/themes/update_test_subtheme/update_test_subtheme.info b/drupal7/web/modules/update/tests/themes/update_test_subtheme/update_test_subtheme.info index adab0d9..b387e9d 100644 --- a/drupal7/web/modules/update/tests/themes/update_test_subtheme/update_test_subtheme.info +++ b/drupal7/web/modules/update/tests/themes/update_test_subtheme/update_test_subtheme.info @@ -4,7 +4,7 @@ core = 7.x base theme = update_test_basetheme hidden = TRUE -; Information added by Drupal.org packaging script on 2024-03-06 -version = "7.100" +; Information added by Drupal.org packaging script on 2024-12-04 +version = "7.103" project = "drupal" -datestamp = "1709734591" +datestamp = "1733324608" diff --git a/drupal7/web/modules/update/tests/update_test.info b/drupal7/web/modules/update/tests/update_test.info index 749830b..1a26422 100644 --- a/drupal7/web/modules/update/tests/update_test.info +++ b/drupal7/web/modules/update/tests/update_test.info @@ -5,7 +5,7 @@ version = VERSION core = 7.x hidden = TRUE -; Information added by Drupal.org packaging script on 2024-03-06 -version = "7.100" +; Information added by Drupal.org packaging script on 2024-12-04 +version = "7.103" project = "drupal" -datestamp = "1709734591" +datestamp = "1733324608" diff --git a/drupal7/web/modules/update/update.info b/drupal7/web/modules/update/update.info index e35e723..9ea3ce0 100644 --- a/drupal7/web/modules/update/update.info +++ b/drupal7/web/modules/update/update.info @@ -6,7 +6,7 @@ core = 7.x files[] = update.test configure = admin/reports/updates/settings -; Information added by Drupal.org packaging script on 2024-03-06 -version = "7.100" +; Information added by Drupal.org packaging script on 2024-12-04 +version = "7.103" project = "drupal" -datestamp = "1709734591" +datestamp = "1733324608" diff --git a/drupal7/web/modules/user/tests/anonymous_user_unblock_test.info b/drupal7/web/modules/user/tests/anonymous_user_unblock_test.info index 074a62c..e4f1e9f 100644 --- a/drupal7/web/modules/user/tests/anonymous_user_unblock_test.info +++ b/drupal7/web/modules/user/tests/anonymous_user_unblock_test.info @@ -5,7 +5,7 @@ version = VERSION core = 7.x hidden = TRUE -; Information added by Drupal.org packaging script on 2024-03-06 -version = "7.100" +; Information added by Drupal.org packaging script on 2024-12-04 +version = "7.103" project = "drupal" -datestamp = "1709734591" +datestamp = "1733324608" diff --git a/drupal7/web/modules/user/tests/user_email_validation_test.info b/drupal7/web/modules/user/tests/user_email_validation_test.info index 8a611d0..a16e518 100644 --- a/drupal7/web/modules/user/tests/user_email_validation_test.info +++ b/drupal7/web/modules/user/tests/user_email_validation_test.info @@ -5,7 +5,7 @@ version = VERSION core = 7.x hidden = TRUE -; Information added by Drupal.org packaging script on 2024-03-06 -version = "7.100" +; Information added by Drupal.org packaging script on 2024-12-04 +version = "7.103" project = "drupal" -datestamp = "1709734591" +datestamp = "1733324608" diff --git a/drupal7/web/modules/user/tests/user_flood_test.info b/drupal7/web/modules/user/tests/user_flood_test.info index 499ec3d..684c4bf 100644 --- a/drupal7/web/modules/user/tests/user_flood_test.info +++ b/drupal7/web/modules/user/tests/user_flood_test.info @@ -5,7 +5,7 @@ version = VERSION core = 7.x hidden = TRUE -; Information added by Drupal.org packaging script on 2024-03-06 -version = "7.100" +; Information added by Drupal.org packaging script on 2024-12-04 +version = "7.103" project = "drupal" -datestamp = "1709734591" +datestamp = "1733324608" diff --git a/drupal7/web/modules/user/tests/user_form_test.info b/drupal7/web/modules/user/tests/user_form_test.info index 1ab5c3e..ab916b1 100644 --- a/drupal7/web/modules/user/tests/user_form_test.info +++ b/drupal7/web/modules/user/tests/user_form_test.info @@ -5,7 +5,7 @@ version = VERSION core = 7.x hidden = TRUE -; Information added by Drupal.org packaging script on 2024-03-06 -version = "7.100" +; Information added by Drupal.org packaging script on 2024-12-04 +version = "7.103" project = "drupal" -datestamp = "1709734591" +datestamp = "1733324608" diff --git a/drupal7/web/modules/user/tests/user_session_test.info b/drupal7/web/modules/user/tests/user_session_test.info index 8b0db5e..e367d31 100644 --- a/drupal7/web/modules/user/tests/user_session_test.info +++ b/drupal7/web/modules/user/tests/user_session_test.info @@ -5,7 +5,7 @@ version = VERSION core = 7.x hidden = TRUE -; Information added by Drupal.org packaging script on 2024-03-06 -version = "7.100" +; Information added by Drupal.org packaging script on 2024-12-04 +version = "7.103" project = "drupal" -datestamp = "1709734591" +datestamp = "1733324608" diff --git a/drupal7/web/modules/user/user.api.php b/drupal7/web/modules/user/user.api.php index b9dc95f..65d460f 100644 --- a/drupal7/web/modules/user/user.api.php +++ b/drupal7/web/modules/user/user.api.php @@ -302,12 +302,12 @@ function hook_user_update(&$edit, $account, $category) { /** * The user just logged in. * - * @param $edit - * The array of form values submitted by the user. + * @param $form_state + * A keyed array containing the current state of the login form. * @param $account * The user object on which the operation was just performed. */ -function hook_user_login(&$edit, $account) { +function hook_user_login(&$form_state, $account) { // If the user has a NULL time zone, notify them to set a time zone. if (!$account->timezone && variable_get('configurable_timezones', 1) && variable_get('empty_timezone_message', 0)) { drupal_set_message(t('Configure your account time zone setting.', array('@user-edit' => url("user/$account->uid/edit", array('query' => drupal_get_destination(), 'fragment' => 'edit-timezone'))))); diff --git a/drupal7/web/modules/user/user.info b/drupal7/web/modules/user/user.info index be50a26..99c6002 100644 --- a/drupal7/web/modules/user/user.info +++ b/drupal7/web/modules/user/user.info @@ -9,7 +9,7 @@ required = TRUE configure = admin/config/people stylesheets[all][] = user.css -; Information added by Drupal.org packaging script on 2024-03-06 -version = "7.100" +; Information added by Drupal.org packaging script on 2024-12-04 +version = "7.103" project = "drupal" -datestamp = "1709734591" +datestamp = "1733324608" diff --git a/drupal7/web/modules/user/user.module b/drupal7/web/modules/user/user.module index 145fc48..9103f5e 100644 --- a/drupal7/web/modules/user/user.module +++ b/drupal7/web/modules/user/user.module @@ -1283,7 +1283,12 @@ function user_account_form_validate($form, &$form_state) { elseif ((bool) db_select('users')->fields('users', array('uid'))->condition('uid', $account->uid, '<>')->condition('mail', db_like($form_state['values']['mail']), 'LIKE')->range(0, 1)->execute()->fetchField()) { // Format error message dependent on whether the user is logged in or not. if ($GLOBALS['user']->uid) { - form_set_error('mail', t('The e-mail address %email is already taken.', array('%email' => $form_state['values']['mail']))); + // Do not fail the validation if user has not changed e-mail address. + // This means that multiple accounts with the same e-mail address exist + // and the logged-in user is one of them. + if ((isset($account->mail) && $account->mail != $mail) || !isset($account->mail)) { + form_set_error('mail', t('The e-mail address %email is already taken.', array('%email' => $form_state['values']['mail']))); + } } else { form_set_error('mail', t('The e-mail address %email is already registered. Have you forgotten your password?', array('%email' => $form_state['values']['mail'], '@password' => url('user/password')))); @@ -2312,12 +2317,12 @@ function user_authenticate($name, $password) { * The function records a watchdog message about the new session, saves the * login timestamp, calls hook_user_login(), and generates a new session. * - * @param array $edit - * The array of form values submitted by the user. + * @param array $form_state + * A keyed array containing the current state of the login form. * * @see hook_user_login() */ -function user_login_finalize(&$edit = array()) { +function user_login_finalize(&$form_state = array()) { global $user; watchdog('user', 'Session opened for %name.', array('%name' => $user->name)); // Update the user table timestamp noting user has logged in. @@ -2329,11 +2334,12 @@ function user_login_finalize(&$edit = array()) { ->execute(); // Regenerate the session ID to prevent against session fixation attacks. - // This is called before hook_user in case one of those functions fails - // or incorrectly does a redirect which would leave the old session in place. + // This is called before hook_user_login() in case one of those functions + // fails or incorrectly does a redirect which would leave the old session in + // place. drupal_session_regenerate(); - user_module_invoke('login', $edit, $user); + user_module_invoke('login', $form_state, $user); } /** diff --git a/drupal7/web/modules/user/user.test b/drupal7/web/modules/user/user.test index f3e1002..aad1f57 100644 --- a/drupal7/web/modules/user/user.test +++ b/drupal7/web/modules/user/user.test @@ -144,10 +144,7 @@ class UserRegistrationTestCase extends DrupalWebTestCase { variable_set('configurable_timezones', 1); variable_set('date_default_timezone', 'Europe/Brussels'); - // Check that the account information fieldset's options are not displayed - // is a fieldset if there is not more than one fieldset in the form. $this->drupalGet('user/register'); - $this->assertNoRaw('
Account information', 'Account settings fieldset was hidden.'); $edit = array(); $edit['name'] = $name = $this->randomName(); @@ -2343,6 +2340,42 @@ class UserEditTestCase extends DrupalWebTestCase { $this->drupalLogin($user1); $this->drupalLogout(); } + + /** + * Tests that the user can edit the account when another user with the same + * e-mail address exists. + */ + public function testUserEditDuplicateEmail() { + // Create two regular users. + $user1 = $this->drupalCreateUser(array('change own username')); + $user2 = $this->drupalCreateUser(array('change own username')); + + // Change the e-mail address of the user2 to have the same e-mail address + // as the user1. + db_update('users') + ->fields(array('mail' => $user1->mail)) + ->condition('uid', $user2->uid) + ->execute(); + + $this->drupalLogin($user2); + $edit['name'] = $user2->name; + $this->drupalPost("user/" . $user2->uid . "/edit", $edit, t('Save')); + $this->assertRaw(t("The changes have been saved.")); + $this->drupalLogout(); + + // Change the e-mail address of the user2 to have the same e-mail address + // as the user1, except that the first letter will be uppercase. + db_update('users') + ->fields(array('mail' => ucfirst($user1->mail))) + ->condition('uid', $user2->uid) + ->execute(); + + $this->drupalLogin($user2); + $edit['name'] = $user2->name; + $this->drupalPost("user/" . $user2->uid . "/edit", $edit, t('Save')); + $this->assertRaw(t("The changes have been saved.")); + $this->drupalLogout(); + } } /** diff --git a/drupal7/web/profiles/minimal/minimal.info b/drupal7/web/profiles/minimal/minimal.info index 6c51c44..5bc8fe7 100644 --- a/drupal7/web/profiles/minimal/minimal.info +++ b/drupal7/web/profiles/minimal/minimal.info @@ -5,7 +5,7 @@ core = 7.x dependencies[] = block dependencies[] = dblog -; Information added by Drupal.org packaging script on 2024-03-06 -version = "7.100" +; Information added by Drupal.org packaging script on 2024-12-04 +version = "7.103" project = "drupal" -datestamp = "1709734591" +datestamp = "1733324608" diff --git a/drupal7/web/profiles/standard/standard.info b/drupal7/web/profiles/standard/standard.info index 387ada8..8db0e1e 100644 --- a/drupal7/web/profiles/standard/standard.info +++ b/drupal7/web/profiles/standard/standard.info @@ -24,7 +24,7 @@ dependencies[] = field_ui dependencies[] = file dependencies[] = rdf -; Information added by Drupal.org packaging script on 2024-03-06 -version = "7.100" +; Information added by Drupal.org packaging script on 2024-12-04 +version = "7.103" project = "drupal" -datestamp = "1709734591" +datestamp = "1733324608" diff --git a/drupal7/web/profiles/testing/modules/drupal_system_listing_compatible_test/drupal_system_listing_compatible_test.info b/drupal7/web/profiles/testing/modules/drupal_system_listing_compatible_test/drupal_system_listing_compatible_test.info index 2ed6d1f..62810be 100644 --- a/drupal7/web/profiles/testing/modules/drupal_system_listing_compatible_test/drupal_system_listing_compatible_test.info +++ b/drupal7/web/profiles/testing/modules/drupal_system_listing_compatible_test/drupal_system_listing_compatible_test.info @@ -6,7 +6,7 @@ core = 7.x hidden = TRUE files[] = drupal_system_listing_compatible_test.test -; Information added by Drupal.org packaging script on 2024-03-06 -version = "7.100" +; Information added by Drupal.org packaging script on 2024-12-04 +version = "7.103" project = "drupal" -datestamp = "1709734591" +datestamp = "1733324608" diff --git a/drupal7/web/profiles/testing/modules/drupal_system_listing_incompatible_test/drupal_system_listing_incompatible_test.info b/drupal7/web/profiles/testing/modules/drupal_system_listing_incompatible_test/drupal_system_listing_incompatible_test.info index a965068..4c11d79 100644 --- a/drupal7/web/profiles/testing/modules/drupal_system_listing_incompatible_test/drupal_system_listing_incompatible_test.info +++ b/drupal7/web/profiles/testing/modules/drupal_system_listing_incompatible_test/drupal_system_listing_incompatible_test.info @@ -8,7 +8,7 @@ version = VERSION core = 6.x hidden = TRUE -; Information added by Drupal.org packaging script on 2024-03-06 -version = "7.100" +; Information added by Drupal.org packaging script on 2024-12-04 +version = "7.103" project = "drupal" -datestamp = "1709734591" +datestamp = "1733324608" diff --git a/drupal7/web/profiles/testing/testing.info b/drupal7/web/profiles/testing/testing.info index f7b801b..985fb8c 100644 --- a/drupal7/web/profiles/testing/testing.info +++ b/drupal7/web/profiles/testing/testing.info @@ -4,7 +4,7 @@ version = VERSION core = 7.x hidden = TRUE -; Information added by Drupal.org packaging script on 2024-03-06 -version = "7.100" +; Information added by Drupal.org packaging script on 2024-12-04 +version = "7.103" project = "drupal" -datestamp = "1709734591" +datestamp = "1733324608" diff --git a/drupal7/web/sites/all/modules/contrib/entity/.gitlab-ci.yml b/drupal7/web/sites/all/modules/contrib/entity/.gitlab-ci.yml new file mode 100644 index 0000000..80f892c --- /dev/null +++ b/drupal7/web/sites/all/modules/contrib/entity/.gitlab-ci.yml @@ -0,0 +1,38 @@ +################ +# GitLabCI template for Drupal projects. +# +# This template is designed to give any Contrib maintainer everything they need to test, without requiring modification. +# It is also designed to keep up to date with Core Development automatically through the use of include files that can be centrally maintained. +# As long as you include the project, ref and three files below, any future updates added by the Drupal Association will be used in your +# pipelines automatically. However, you can modify this template if you have additional needs for your project. +# The full documentation is on https://project.pages.drupalcode.org/gitlab_templates/ +################ + +# For information on alternative values for 'ref' see https://project.pages.drupalcode.org/gitlab_templates/info/templates-version/ +# To test a Drupal 7 project, change the first include filename from .main.yml to .main-d7.yml +include: + - project: $_GITLAB_TEMPLATES_REPO + ref: $_GITLAB_TEMPLATES_REF + file: + - "/includes/include.drupalci.main-d7.yml" + - "/includes/include.drupalci.variables.yml" + - "/includes/include.drupalci.workflows.yml" + +################ +# Pipeline configuration variables are defined with default values and descriptions in the file +# https://git.drupalcode.org/project/gitlab_templates/-/blob/main/includes/include.drupalci.variables.yml +# Uncomment the lines below if you want to override any of the variables. The following is just an example. +################ +# variables: +# SKIP_ESLINT: '1' +# OPT_IN_TEST_NEXT_MAJOR: '1' +# _CURL_TEMPLATES_REF: 'main' + + +variables: + _D7_DRUPAL_TEST_DEPENDENCIES: "i18n variable rules" + _SHOW_ENVIRONMENT_VARIABLES: 1 + _PHPUNIT_CONCURRENT: 1 + OPT_IN_TEST_CURRENT: 1 + _TARGET_PHP: 7.4 + OPT_IN_TEST_MAX_PHP: 1 diff --git a/drupal7/web/sites/all/modules/contrib/entity/entity.features.inc b/drupal7/web/sites/all/modules/contrib/entity/entity.features.inc index ef8a9d6..2d8fbd4 100644 --- a/drupal7/web/sites/all/modules/contrib/entity/entity.features.inc +++ b/drupal7/web/sites/all/modules/contrib/entity/entity.features.inc @@ -30,6 +30,9 @@ function entity_features_get_controller($type) { class EntityDefaultFeaturesController { protected $type, $info; + protected $statusKey; + protected $moduleKey; + protected $bundleKey; public function __construct($type) { $this->type = $type; diff --git a/drupal7/web/sites/all/modules/contrib/entity/entity.info b/drupal7/web/sites/all/modules/contrib/entity/entity.info index 7db124a..01db513 100644 --- a/drupal7/web/sites/all/modules/contrib/entity/entity.info +++ b/drupal7/web/sites/all/modules/contrib/entity/entity.info @@ -33,8 +33,8 @@ files[] = views/handlers/entity_views_handler_relationship_by_bundle.inc files[] = views/handlers/entity_views_handler_relationship.inc files[] = views/plugins/entity_views_plugin_row_entity_view.inc -; Information added by Drupal.org packaging script on 2021-11-20 -version = "7.x-1.10" +; Information added by Drupal.org packaging script on 2024-07-14 +version = "7.x-1.11" core = "7.x" project = "entity" -datestamp = "1637434458" +datestamp = "1720924769" diff --git a/drupal7/web/sites/all/modules/contrib/entity/entity.info.inc b/drupal7/web/sites/all/modules/contrib/entity/entity.info.inc index 8847a58..8ec4ee7 100644 --- a/drupal7/web/sites/all/modules/contrib/entity/entity.info.inc +++ b/drupal7/web/sites/all/modules/contrib/entity/entity.info.inc @@ -220,6 +220,11 @@ class EntityDefaultExtraFieldsController implements EntityExtraFieldsControllerI */ protected $entityInfo; + /** + * @var array + */ + protected $propertyInfo; + /** * Constructor. */ diff --git a/drupal7/web/sites/all/modules/contrib/entity/entity.test b/drupal7/web/sites/all/modules/contrib/entity/entity.test index dbd60d3..1744c0c 100644 --- a/drupal7/web/sites/all/modules/contrib/entity/entity.test +++ b/drupal7/web/sites/all/modules/contrib/entity/entity.test @@ -9,6 +9,14 @@ * Common parent class containing common helpers. */ abstract class EntityWebTestCase extends DrupalWebTestCase { + protected $admin_user; + protected $taxonomy_vocabulary; + protected $user; + protected $node; + protected $instance; + protected $field_id; + protected $field; + protected $field_name; /** * Creates a new vocabulary. @@ -541,6 +549,8 @@ class EntityAPIRulesIntegrationTestCase extends EntityWebTestCase { * Tests comments with node access. */ class EntityAPICommentNodeAccessTestCase extends CommentHelperCase { + protected $accessUser; + protected $noAccessUser; public static function getInfo() { return array( @@ -604,7 +614,7 @@ class EntityAPIi18nItegrationTestCase extends EntityWebTestCase { } protected function setUp() { - parent::setUp('entity_test_i18n'); + parent::setUp('entity', 'entity_test', 'entity_test_i18n', 'i18n', 'variable', 'i18n_string', 'locale'); $this->admin_user = $this->drupalCreateUser(array('bypass node access', 'administer nodes', 'administer languages', 'administer content types', 'administer blocks', 'access administration pages')); $this->drupalLogin($this->admin_user); $this->addLanguage('de'); diff --git a/drupal7/web/sites/all/modules/contrib/entity/entity_token.info b/drupal7/web/sites/all/modules/contrib/entity/entity_token.info index 1979555..6325e77 100644 --- a/drupal7/web/sites/all/modules/contrib/entity/entity_token.info +++ b/drupal7/web/sites/all/modules/contrib/entity/entity_token.info @@ -5,8 +5,8 @@ core = 7.x files[] = entity_token.tokens.inc -; Information added by Drupal.org packaging script on 2021-11-20 -version = "7.x-1.10" +; Information added by Drupal.org packaging script on 2024-07-14 +version = "7.x-1.11" core = "7.x" project = "entity" -datestamp = "1637434458" +datestamp = "1720924769" diff --git a/drupal7/web/sites/all/modules/contrib/entity/includes/entity.inc b/drupal7/web/sites/all/modules/contrib/entity/includes/entity.inc index 605646f..d4128d8 100644 --- a/drupal7/web/sites/all/modules/contrib/entity/includes/entity.inc +++ b/drupal7/web/sites/all/modules/contrib/entity/includes/entity.inc @@ -188,6 +188,7 @@ interface EntityInterface { * public $count = 0; * @endcode */ +#[\AllowDynamicProperties] class Entity implements EntityInterface { protected $entityType; diff --git a/drupal7/web/sites/all/modules/contrib/entity/includes/entity.ui.inc b/drupal7/web/sites/all/modules/contrib/entity/includes/entity.ui.inc index 924ff13..3a9fa87 100644 --- a/drupal7/web/sites/all/modules/contrib/entity/includes/entity.ui.inc +++ b/drupal7/web/sites/all/modules/contrib/entity/includes/entity.ui.inc @@ -16,6 +16,7 @@ class EntityDefaultUIController { protected $entityType; protected $entityInfo, $path; protected $id_count; + protected $statusKey; /** * Defines the number of entries to show per page in overview table. diff --git a/drupal7/web/sites/all/modules/contrib/entity/tests/entity_feature.info b/drupal7/web/sites/all/modules/contrib/entity/tests/entity_feature.info index 8e8bdab..d57babc 100644 --- a/drupal7/web/sites/all/modules/contrib/entity/tests/entity_feature.info +++ b/drupal7/web/sites/all/modules/contrib/entity/tests/entity_feature.info @@ -6,8 +6,8 @@ hidden = TRUE files[] = entity_feature.module -; Information added by Drupal.org packaging script on 2021-11-20 -version = "7.x-1.10" +; Information added by Drupal.org packaging script on 2024-07-14 +version = "7.x-1.11" core = "7.x" project = "entity" -datestamp = "1637434458" +datestamp = "1720924769" diff --git a/drupal7/web/sites/all/modules/contrib/entity/tests/entity_test.info b/drupal7/web/sites/all/modules/contrib/entity/tests/entity_test.info index c98d844..3e8e4f3 100644 --- a/drupal7/web/sites/all/modules/contrib/entity/tests/entity_test.info +++ b/drupal7/web/sites/all/modules/contrib/entity/tests/entity_test.info @@ -7,8 +7,8 @@ hidden = TRUE files[] = entity_test.module files[] = entity_test.install -; Information added by Drupal.org packaging script on 2021-11-20 -version = "7.x-1.10" +; Information added by Drupal.org packaging script on 2024-07-14 +version = "7.x-1.11" core = "7.x" project = "entity" -datestamp = "1637434458" +datestamp = "1720924769" diff --git a/drupal7/web/sites/all/modules/contrib/entity/tests/entity_test_i18n.info b/drupal7/web/sites/all/modules/contrib/entity/tests/entity_test_i18n.info index 82dc2eb..4c17367 100644 --- a/drupal7/web/sites/all/modules/contrib/entity/tests/entity_test_i18n.info +++ b/drupal7/web/sites/all/modules/contrib/entity/tests/entity_test_i18n.info @@ -6,8 +6,8 @@ dependencies[] = i18n:i18n_string core = 7.x hidden = TRUE -; Information added by Drupal.org packaging script on 2021-11-20 -version = "7.x-1.10" +; Information added by Drupal.org packaging script on 2024-07-14 +version = "7.x-1.11" core = "7.x" project = "entity" -datestamp = "1637434458" +datestamp = "1720924769" diff --git a/drupal7/web/sites/all/modules/contrib/views/.gitlab-ci.yml b/drupal7/web/sites/all/modules/contrib/views/.gitlab-ci.yml new file mode 100644 index 0000000..9e42838 --- /dev/null +++ b/drupal7/web/sites/all/modules/contrib/views/.gitlab-ci.yml @@ -0,0 +1,111 @@ +################ +# DrupalCI GitLabCI template +# +# Gitlab-ci.yml to replicate DrupalCI testing for Contrib +# +# With thanks to: +# * The GitLab Acceleration Initiative participants +# * DrupalSpoons +################ + +################ +# Guidelines +# +# This template is designed to give any Contrib maintainer everything they need to test, without requiring modification. It is also designed to keep up to date with Core Development automatically through the use of include files that can be centrally maintained. +# +# However, you can modify this template if you have additional needs for your project. +################ + +################ +# Includes +# +# Additional configuration can be provided through includes. +# One advantage of include files is that if they are updated upstream, the changes affect all pipelines using that include. +# +# Includes can be overridden by re-declaring anything provided in an include, here in gitlab-ci.yml +# https://docs.gitlab.com/ee/ci/yaml/includes.html#override-included-configuration-values +################ + +include: + ################ + # DrupalCI includes: + # As long as you include this, any future includes added by the Drupal Association will be accessible to your pipelines automatically. + # View these include files at https://git.drupalcode.org/project/gitlab_templates/ + ################ + - project: $_GITLAB_TEMPLATES_REPO + # "ref" value can be: + # - Recommended (default) - `ref: $_GITLAB_TEMPLATES_REF` - The Drupal Association will update this value to the recommended tag for contrib. + # - Latest - `ref: main` - Get the latest additions and bug fixes as they are merged into the templates. + # - Minor or Major latests - `ref: 1.x-latest` or `ref: 1.0.x-latest` - Get the latest additions within a minor (mostly bugfixes) or major (bugs and new features). + # - Fixed tag - `ref: 1.0.1` - Set the value to a known tag. This will not get any updates. + ref: $_GITLAB_TEMPLATES_REF + file: + # - '/includes/include.drupalci.main.yml' + # EXPERIMENTAL: For Drupal 7, remove the above line and uncomment the below. + - '/includes/include.drupalci.main-d7.yml' + - '/includes/include.drupalci.variables.yml' + - '/includes/include.drupalci.workflows.yml' + +################ +# Pipeline configuration variables +# +# These are the variables provided to the Run Pipeline form that a user may want to override. +# +# Docs at https://git.drupalcode.org/project/gitlab_templates/-/blob/1.0.x/includes/include.drupalci.variables.yml +################ +variables: + # Ignore some coder tests because Views is older than the coding standards: + # * Drupal.NamingConventions.ValidFunctionNam + # * Drupal.NamingConventions.ValidClassName + # Disable these for compatibility with PHP 5: + # * Drupal.Commenting.DocCommentLongArraySyntax + # * SlevomatCodingStandard.ControlStructures.RequireNullCoalesceOperator + # * SlevomatCodingStandard.PHP.ShortList + _PHPCS_EXTRA: "--exclude=Drupal.NamingConventions.ValidFunctionName,Drupal.NamingConventions.ValidClassName,Drupal.Commenting.DocCommentLongArraySyntax,SlevomatCodingStandard.ControlStructures.RequireNullCoalesceOperator,SlevomatCodingStandard.PHP.ShortList" + + +################################################################################### +# +# * +# /( +# ((((, +# /((((((( +# ((((((((((* +# ,((((((((((((((( +# ,((((((((((((((((((( +# ((((((((((((((((((((((((* +# *((((((((((((((((((((((((((((( +# ((((((((((((((((((((((((((((((((((* +# *(((((((((((((((((( .(((((((((((((((((( +# ((((((((((((((((((. /(((((((((((((((((* +# /((((((((((((((((( .(((((((((((((((((, +# ,(((((((((((((((((( (((((((((((((((((( +# .(((((((((((((((((((( .((((((((((((((((( +# ((((((((((((((((((((((( ((((((((((((((((/ +# (((((((((((((((((((((((((((/ ,(((((((((((((((* +# .((((((((((((((/ /(((((((((((((. ,((((((((((((((( +# *(((((((((((((( ,(((((((((((((/ *((((((((((((((. +# ((((((((((((((, /(((((((((((((. ((((((((((((((, +# (((((((((((((/ ,(((((((((((((* ,(((((((((((((, +# *((((((((((((( .((((((((((((((( ,((((((((((((( +# ((((((((((((/ /((((((((((((((((((. ,((((((((((((/ +# ((((((((((((( *(((((((((((((((((((((((* *(((((((((((( +# ((((((((((((( ,(((((((((((((..((((((((((((( *(((((((((((( +# ((((((((((((, /((((((((((((* /((((((((((((/ (((((((((((( +# ((((((((((((( /((((((((((((/ (((((((((((((* (((((((((((( +# (((((((((((((/ /(((((((((((( ,((((((((((((, *(((((((((((( +# (((((((((((((( *(((((((((((/ *((((((((((((. ((((((((((((/ +# *((((((((((((((((((((((((((, /((((((((((((((((((((((((( +# ((((((((((((((((((((((((( ((((((((((((((((((((((((, +# .(((((((((((((((((((((((/ ,((((((((((((((((((((((( +# ((((((((((((((((((((((/ ,(((((((((((((((((((((/ +# *((((((((((((((((((((( (((((((((((((((((((((, +# ,(((((((((((((((((((((, ((((((((((((((((((((/ +# ,(((((((((((((((((((((* /(((((((((((((((((((( +# ((((((((((((((((((((((, ,/((((((((((((((((((((, +# ,((((((((((((((((((((((((((((((((((((((((((((((((((( +# .((((((((((((((((((((((((((((((((((((((((((((( +# .((((((((((((((((((((((((((((((((((((,. +# .,(((((((((((((((((((((((((. +# +################################################################################### \ No newline at end of file diff --git a/drupal7/web/sites/all/modules/contrib/views/css/views-admin.theme.css b/drupal7/web/sites/all/modules/contrib/views/css/views-admin.theme.css index d92a47e..8d3ec14 100644 --- a/drupal7/web/sites/all/modules/contrib/views/css/views-admin.theme.css +++ b/drupal7/web/sites/all/modules/contrib/views/css/views-admin.theme.css @@ -883,7 +883,7 @@ ul#views-display-menu-tabs li.add ul.action-list li { /* @group Configure filter criteria */ -/* @todo the width and border info could be moved into a more generic class */ +/* @todo The width and border info could be moved into a more generic class. */ /* @todo Make this a class to be used anywhere there's node types? */ .form-type-checkboxes #edit-options-value, .form-type-checkboxes #edit-options-validate-options-node-types { diff --git a/drupal7/web/sites/all/modules/contrib/views/drush/views.drush.inc b/drupal7/web/sites/all/modules/contrib/views/drush/views.drush.inc index a3954b8..af2cff3 100644 --- a/drupal7/web/sites/all/modules/contrib/views/drush/views.drush.inc +++ b/drupal7/web/sites/all/modules/contrib/views/drush/views.drush.inc @@ -147,7 +147,7 @@ function views_revert_views() { // If the user specified a list of views on the CLI, revert those. elseif (!empty($viewnames)) { - foreach ($viewnames as $key => $viewname) { + foreach ($viewnames as $viewname) { $is_overridden = array_key_exists($viewname, $overridden); // Check if the provided view name is in the system. @@ -273,7 +273,6 @@ function views_development_settings() { drush_log($message, 'success'); } - /** * Callback function for views-list command. */ @@ -334,7 +333,7 @@ function drush_views_list() { ); // Setup a row for each view. - foreach ($views as $id => $view) { + foreach ($views as $view) { // If options were specified, check that first mismatch push the loop to // the next view. if ($with_tags && !in_array($view->tag, $tags)) { @@ -496,7 +495,7 @@ function _views_drush_changestatus($viewnames = array(), $status = NULL) { $processed = $status ? dt('disabled') : dt('enabled'); $views_status = variable_get('views_defaults', array()); - foreach ($viewnames as $key => $viewname) { + foreach ($viewnames as $viewname) { if ($views_status[$viewname] !== $status) { $views_status[$viewname] = $status; $changed = TRUE; diff --git a/drupal7/web/sites/all/modules/contrib/views/handlers/views_handler_area_result.inc b/drupal7/web/sites/all/modules/contrib/views/handlers/views_handler_area_result.inc index 3b18e20..d8da7ef 100644 --- a/drupal7/web/sites/all/modules/contrib/views/handlers/views_handler_area_result.inc +++ b/drupal7/web/sites/all/modules/contrib/views/handlers/views_handler_area_result.inc @@ -76,7 +76,7 @@ class views_handler_area_result extends views_handler_area { '@per_page', '@current_page', '@current_record_count', - '@page_count' + '@page_count', )), '#dependency' => array('edit-options-format-plural' => array(TRUE)), ); @@ -135,12 +135,12 @@ class views_handler_area_result extends views_handler_area { ); $replacements = array(); foreach ($items as $item) { - $replacements["@$item"] = ${$item}; + $replacements["@$item"] = $$item; } - // If the format_plural option is selected, + // If the format_plural option is selected.. if ( !empty($this->options['format_plural']) - // and the format_plural_count token is not "@end": + // And the format_plural_count token is not "@end": && $replacements[$this->options['format_plural_count']] != 1 ) { $format = $this->options['format_plural_plural']; diff --git a/drupal7/web/sites/all/modules/contrib/views/handlers/views_handler_area_text.inc b/drupal7/web/sites/all/modules/contrib/views/handlers/views_handler_area_text.inc index cad4a59..9f092f6 100644 --- a/drupal7/web/sites/all/modules/contrib/views/handlers/views_handler_area_text.inc +++ b/drupal7/web/sites/all/modules/contrib/views/handlers/views_handler_area_text.inc @@ -61,7 +61,7 @@ class views_handler_area_text extends views_handler_area { $count = 0; // This lets us prepare the key as we want it printed. - foreach ($this->view->display_handler->get_handlers('argument') as $arg => $handler) { + foreach ($this->view->display_handler->get_handlers('argument') as $handler) { $options[t('Arguments')]['%' . ++$count] = t('@argument title', array('@argument' => $handler->ui_name())); $options[t('Arguments')]['!' . $count] = t('@argument input', array('@argument' => $handler->ui_name())); } diff --git a/drupal7/web/sites/all/modules/contrib/views/handlers/views_handler_area_view.inc b/drupal7/web/sites/all/modules/contrib/views/handlers/views_handler_area_view.inc index 2e93135..6152622 100644 --- a/drupal7/web/sites/all/modules/contrib/views/handlers/views_handler_area_view.inc +++ b/drupal7/web/sites/all/modules/contrib/views/handlers/views_handler_area_view.inc @@ -67,7 +67,7 @@ class views_handler_area_view extends views_handler_area { /** * Loads the used view for rendering. * - * @return \view|NULL + * @return \view|null * The loaded view or NULL, in case the view was not loadable / recursion * got detected / access got denied. */ diff --git a/drupal7/web/sites/all/modules/contrib/views/handlers/views_handler_argument_date.inc b/drupal7/web/sites/all/modules/contrib/views/handlers/views_handler_argument_date.inc index 5501e00..3bb7245 100644 --- a/drupal7/web/sites/all/modules/contrib/views/handlers/views_handler_argument_date.inc +++ b/drupal7/web/sites/all/modules/contrib/views/handlers/views_handler_argument_date.inc @@ -93,10 +93,6 @@ class views_handler_argument_date extends views_handler_argument_formula { // Only use a special behaviour for the special argument types, else just // use the default behaviour. if ($option == 'default_argument_type') { - $type = 'argument default'; - $option_name = 'default_argument_options'; - - $plugin = $this->get_plugin($type); $name = $this->options[$option]; if (in_array($name, array('date', 'node_created', 'node_changed'))) { diff --git a/drupal7/web/sites/all/modules/contrib/views/handlers/views_handler_argument_formula.inc b/drupal7/web/sites/all/modules/contrib/views/handlers/views_handler_argument_formula.inc index 56ae976..304abd6 100644 --- a/drupal7/web/sites/all/modules/contrib/views/handlers/views_handler_argument_formula.inc +++ b/drupal7/web/sites/all/modules/contrib/views/handlers/views_handler_argument_formula.inc @@ -41,7 +41,7 @@ class views_handler_argument_formula extends views_handler_argument { } /** - * Build the summary query based on a formula + * Build the summary query based on a formula. */ public function summary_query() { $this->ensure_my_table(); @@ -56,7 +56,7 @@ class views_handler_argument_formula extends views_handler_argument { } /** - * Build the query based upon the formula + * Build the query based upon the formula. */ public function query($group_by = FALSE) { $this->ensure_my_table(); diff --git a/drupal7/web/sites/all/modules/contrib/views/handlers/views_handler_argument_many_to_one.inc b/drupal7/web/sites/all/modules/contrib/views/handlers/views_handler_argument_many_to_one.inc index ce581f7..937f085 100644 --- a/drupal7/web/sites/all/modules/contrib/views/handlers/views_handler_argument_many_to_one.inc +++ b/drupal7/web/sites/all/modules/contrib/views/handlers/views_handler_argument_many_to_one.inc @@ -65,7 +65,7 @@ class views_handler_argument_many_to_one extends views_handler_argument { public function options_form(&$form, &$form_state) { parent::options_form($form, $form_state); - // allow + for or, , for and + // Allow + for or, , for and. if (!empty($this->definition['numeric'])) { $form['break_phrase'] = array( '#type' => 'checkbox', @@ -150,8 +150,7 @@ class views_handler_argument_many_to_one extends views_handler_argument { $this->operator = 'or'; } - // @todo -- both of these should check definition for alternate keywords. - + // @todo Both of these should check definition for alternate keywords. if (empty($this->value)) { return !empty($this->definition['empty field name']) ? $this->definition['empty field name'] : t('Uncategorized'); } diff --git a/drupal7/web/sites/all/modules/contrib/views/handlers/views_handler_argument_numeric.inc b/drupal7/web/sites/all/modules/contrib/views/handlers/views_handler_argument_numeric.inc index c0e2e2b..bdabe54 100644 --- a/drupal7/web/sites/all/modules/contrib/views/handlers/views_handler_argument_numeric.inc +++ b/drupal7/web/sites/all/modules/contrib/views/handlers/views_handler_argument_numeric.inc @@ -16,12 +16,14 @@ class views_handler_argument_numeric extends views_handler_argument { /** * The operator used for the query: or|and. + * * @var string */ public $operator; /** * The actual value which is used for querying. + * * @var array */ public $value; @@ -44,7 +46,7 @@ class views_handler_argument_numeric extends views_handler_argument { public function options_form(&$form, &$form_state) { parent::options_form($form, $form_state); - // allow + for or, , for and + // Allow + for or, , for and. $form['break_phrase'] = array( '#type' => 'checkbox', '#title' => t('Allow multiple values'), @@ -93,7 +95,7 @@ class views_handler_argument_numeric extends views_handler_argument { * Override for specific title lookups. * * @return array - * Returns all titles, if it's just one title it's an array with one entry. + * Returns all titles, if it's just one title it's an array with one entry. */ public function title_query() { return $this->value; diff --git a/drupal7/web/sites/all/modules/contrib/views/handlers/views_handler_argument_string.inc b/drupal7/web/sites/all/modules/contrib/views/handlers/views_handler_argument_string.inc index c4c02a4..25cc72c 100644 --- a/drupal7/web/sites/all/modules/contrib/views/handlers/views_handler_argument_string.inc +++ b/drupal7/web/sites/all/modules/contrib/views/handlers/views_handler_argument_string.inc @@ -125,7 +125,7 @@ class views_handler_argument_string extends views_handler_argument { ); } - // allow + for or, , for and + // Allow + for or, , for and. $form['break_phrase'] = array( '#type' => 'checkbox', '#title' => t('Allow multiple values'), @@ -179,7 +179,7 @@ class views_handler_argument_string extends views_handler_argument { } /** - * Build the query based upon the formula + * Build the query based upon the formula. */ public function query($group_by = FALSE) { $argument = $this->argument; diff --git a/drupal7/web/sites/all/modules/contrib/views/handlers/views_handler_field.inc b/drupal7/web/sites/all/modules/contrib/views/handlers/views_handler_field.inc index 98deb98..97ba185 100644 --- a/drupal7/web/sites/all/modules/contrib/views/handlers/views_handler_field.inc +++ b/drupal7/web/sites/all/modules/contrib/views/handlers/views_handler_field.inc @@ -21,7 +21,7 @@ define('VIEWS_HANDLER_RENDER_TEXT_PHASE_SINGLE_ITEM', 0); /** * Indicator of the render_text() method for rendering the whole element. * - * if no render_item() method is available. + * If no render_item() method is available. */ define('VIEWS_HANDLER_RENDER_TEXT_PHASE_COMPLETELY', 1); @@ -76,7 +76,7 @@ class views_handler_field extends views_handler { /** * Keeps track of the last render index. * - * @var int|NULL + * @var int|null */ protected $last_render_index = NULL; @@ -323,6 +323,7 @@ class views_handler_field extends views_handler { $class = $this->tokenize_value($class, $row_index); $class = views_clean_css_identifier($class); } + unset($class); return implode(' ', $classes); } @@ -372,6 +373,7 @@ class views_handler_field extends views_handler { $class = $this->tokenize_value($class, $row_index); $class = views_clean_css_identifier($class); } + unset($class); return implode(' ', $classes); } @@ -384,6 +386,7 @@ class views_handler_field extends views_handler { $class = $this->tokenize_value($class, $row_index); $class = views_clean_css_identifier($class); } + unset($class); return implode(' ', $classes); } @@ -760,7 +763,7 @@ class views_handler_field extends views_handler { '#description' => t('Space-separated list of characters to remove from the URL path'), '#default_value' => $this->options['alter']['unwanted_characters'], '#dependency' => array( - 'edit-options-alter-make-link' => array(1) + 'edit-options-alter-make-link' => array(1), ), '#maxlength' => 255, ); @@ -835,7 +838,6 @@ class views_handler_field extends views_handler { ), ); - // Get a list of the available fields and arguments for token replacement. $options = array(); foreach ($this->view->display_handler->get_handlers('field') as $field => $handler) { @@ -847,7 +849,7 @@ class views_handler_field extends views_handler { } // This lets us prepare the key as we want it printed. $count = 0; - foreach ($this->view->display_handler->get_handlers('argument') as $arg => $handler) { + foreach ($this->view->display_handler->get_handlers('argument') as $handler) { $options[t('Arguments')]['%' . ++$count] = t('@argument title', array('@argument' => $handler->ui_name())); $options[t('Arguments')]['!' . $count] = t('@argument input', array('@argument' => $handler->ui_name())); } @@ -1045,7 +1047,7 @@ If you would like to have the characters \'[\' and \']\' please use the html ent } /** - * Provide extra data to the administration form + * Provide extra data to the administration form. */ public function admin_summary() { return $this->label(); @@ -1103,7 +1105,6 @@ If you would like to have the characters \'[\' and \']\' please use the html ent } if ($this->allow_advanced_render()) { - $tokens = NULL; if (method_exists($this, 'render_item')) { $items = array(); foreach ($raw_items as $count => $item) { @@ -1381,7 +1382,7 @@ If you would like to have the characters \'[\' and \']\' please use the html ent } $alt = strtr($alter['alt'], $tokens); - // Set the title attribute of the link only if it improves accessibility + // Set the title attribute of the link only if it improves accessibility. if ($alt && $alt != $text) { $options['attributes']['title'] = decode_entities($alt); } @@ -1460,7 +1461,7 @@ If you would like to have the characters \'[\' and \']\' please use the html ent $tokens = $this->view->build_info['substitutions']; } $count = 0; - foreach ($this->view->display_handler->get_handlers('argument') as $arg => $handler) { + foreach ($this->view->display_handler->get_handlers('argument') as $handler) { $token = '%' . ++$count; if (!isset($tokens[$token])) { $tokens[$token] = ''; @@ -1721,6 +1722,7 @@ class views_handler_field_file_size extends views_handler_field { switch ($this->options['file_size_display']) { case 'bytes': return $value; + case 'formatted': default: return format_size($value); diff --git a/drupal7/web/sites/all/modules/contrib/views/handlers/views_handler_field_date.inc b/drupal7/web/sites/all/modules/contrib/views/handlers/views_handler_field_date.inc index f23c2e5..0875965 100644 --- a/drupal7/web/sites/all/modules/contrib/views/handlers/views_handler_field_date.inc +++ b/drupal7/web/sites/all/modules/contrib/views/handlers/views_handler_field_date.inc @@ -36,7 +36,7 @@ class views_handler_field_date extends views_handler_field { public function options_form(&$form, &$form_state) { $date_formats = array(); $date_types = system_get_date_types(); - foreach ($date_types as $key => $value) { + foreach ($date_types as $value) { $date_formats[$value['type']] = t('@date_format format', array('@date_format' => $value['title'])) . ': ' . format_date(REQUEST_TIME, $value['type']); } @@ -94,7 +94,9 @@ class views_handler_field_date extends views_handler_field { // correct left margin to the element's wrapper. '#dependency' => array( // This condition is handled by form API's states. + // @code // 'edit-options-date-format' => array('today time ago'), + // @endcode 'edit-options-second-date-format' => array('custom'), ), ); diff --git a/drupal7/web/sites/all/modules/contrib/views/handlers/views_handler_field_machine_name.inc b/drupal7/web/sites/all/modules/contrib/views/handlers/views_handler_field_machine_name.inc index 500102c..a02f8ed 100644 --- a/drupal7/web/sites/all/modules/contrib/views/handlers/views_handler_field_machine_name.inc +++ b/drupal7/web/sites/all/modules/contrib/views/handlers/views_handler_field_machine_name.inc @@ -7,6 +7,7 @@ /** * Field handler whichs allows to show machine name content as human name. + * * @ingroup views_field_handlers * * Definition items: @@ -17,7 +18,9 @@ class views_handler_field_machine_name extends views_handler_field { /** - * @var array Stores the available options. + * Stores the available options. + * + * @var array */ public $value_options; diff --git a/drupal7/web/sites/all/modules/contrib/views/handlers/views_handler_field_math.inc b/drupal7/web/sites/all/modules/contrib/views/handlers/views_handler_field_math.inc index f20536c..9ca92b7 100644 --- a/drupal7/web/sites/all/modules/contrib/views/handlers/views_handler_field_math.inc +++ b/drupal7/web/sites/all/modules/contrib/views/handlers/views_handler_field_math.inc @@ -6,7 +6,7 @@ */ /** - * Render a mathematical expression as a numeric value + * Render a mathematical expression as a numeric value. * * Definition terms: * - float: If true this field contains a decimal value. If unset this field @@ -55,7 +55,7 @@ class views_handler_field_math extends views_handler_field_numeric { $tokens = array_map('floatval', $this->get_render_tokens(array())); $value = strtr($this->options['expression'], $tokens); $expressions = explode(';', $value); - $math = new ctools_math_expr; + $math = new ctools_math_expr(); foreach ($expressions as $expression) { if ($expression !== '') { $value = $math->evaluate($expression); diff --git a/drupal7/web/sites/all/modules/contrib/views/handlers/views_handler_field_numeric.inc b/drupal7/web/sites/all/modules/contrib/views/handlers/views_handler_field_numeric.inc index 3deea55..e8e9c06 100644 --- a/drupal7/web/sites/all/modules/contrib/views/handlers/views_handler_field_numeric.inc +++ b/drupal7/web/sites/all/modules/contrib/views/handlers/views_handler_field_numeric.inc @@ -132,6 +132,8 @@ class views_handler_field_numeric extends views_handler_field { $value = number_format($value, $this->options['precision'], $this->options['decimal'], $this->options['separator']); } else { + // Only accept numerical values. + $value = isset($value) && is_numeric($value) ? $value : 0; $point_position = strpos($value, '.'); $remainder = ($point_position === FALSE) ? '' : substr($value, $point_position + 1); $value = $value > 0 ? floor((float) $value) : ceil((float) $value); diff --git a/drupal7/web/sites/all/modules/contrib/views/handlers/views_handler_field_prerender_list.inc b/drupal7/web/sites/all/modules/contrib/views/handlers/views_handler_field_prerender_list.inc index 360abb4..4805d95 100644 --- a/drupal7/web/sites/all/modules/contrib/views/handlers/views_handler_field_prerender_list.inc +++ b/drupal7/web/sites/all/modules/contrib/views/handlers/views_handler_field_prerender_list.inc @@ -142,7 +142,7 @@ class views_handler_field_prerender_list extends views_handler_field { * @param string $field * Optional name of the field where the value is stored. * @param bool $raw - * Use the raw data and not the data defined in pre_render + * Use the raw data and not the data defined in pre_render. */ public function get_value($values, $field = NULL, $raw = FALSE) { if ($raw) { diff --git a/drupal7/web/sites/all/modules/contrib/views/handlers/views_handler_filter_boolean_operator.inc b/drupal7/web/sites/all/modules/contrib/views/handlers/views_handler_filter_boolean_operator.inc index 1b1791a..42c5acb 100644 --- a/drupal7/web/sites/all/modules/contrib/views/handlers/views_handler_filter_boolean_operator.inc +++ b/drupal7/web/sites/all/modules/contrib/views/handlers/views_handler_filter_boolean_operator.inc @@ -6,7 +6,7 @@ */ /** - * Simple filter to handle matching of boolean values + * Simple filter to handle matching of boolean values. * * Definition items: * - label: (REQUIRED) The label for the checkbox. diff --git a/drupal7/web/sites/all/modules/contrib/views/handlers/views_handler_filter_entity_bundle.inc b/drupal7/web/sites/all/modules/contrib/views/handlers/views_handler_filter_entity_bundle.inc index 92cf8b4..9885d3e 100644 --- a/drupal7/web/sites/all/modules/contrib/views/handlers/views_handler_filter_entity_bundle.inc +++ b/drupal7/web/sites/all/modules/contrib/views/handlers/views_handler_filter_entity_bundle.inc @@ -105,6 +105,7 @@ class views_handler_filter_entity_bundle extends views_handler_filter_in_operato foreach ($this->value as &$value) { $value = str_replace('comment_node_', '', $value); } + unset($value); } elseif ($this->entity_type == 'taxonomy_term') { $join = new views_join(); diff --git a/drupal7/web/sites/all/modules/contrib/views/handlers/views_handler_filter_group_by_numeric.inc b/drupal7/web/sites/all/modules/contrib/views/handlers/views_handler_filter_group_by_numeric.inc index 173228d..37bc05e 100644 --- a/drupal7/web/sites/all/modules/contrib/views/handlers/views_handler_filter_group_by_numeric.inc +++ b/drupal7/web/sites/all/modules/contrib/views/handlers/views_handler_filter_group_by_numeric.inc @@ -6,7 +6,7 @@ */ /** - * Simple filter to handle greater than/less than filters + * Simple filter to handle greater than/less than filters. * * @ingroup views_filter_handlers */ diff --git a/drupal7/web/sites/all/modules/contrib/views/handlers/views_handler_filter_in_operator.inc b/drupal7/web/sites/all/modules/contrib/views/handlers/views_handler_filter_in_operator.inc index b7a450a..234542b 100644 --- a/drupal7/web/sites/all/modules/contrib/views/handlers/views_handler_filter_in_operator.inc +++ b/drupal7/web/sites/all/modules/contrib/views/handlers/views_handler_filter_in_operator.inc @@ -126,7 +126,7 @@ class views_handler_filter_in_operator extends views_handler_filter { 'values' => 1, ), ); - // if the definition allows for the empty operator, add it. + // If the definition allows for the empty operator, add it. if (!empty($this->definition['allow empty'])) { $operators += array( 'empty' => array( @@ -312,11 +312,9 @@ class views_handler_filter_in_operator extends views_handler_filter { // was not set, and the key to the checkbox if it is set. // Unfortunately, this means that if the key to that checkbox is 0, // we are unable to tell if that checkbox was set or not. - // Luckily, the '#value' on the checkboxes form actually contains // *only* a list of checkboxes that were set, and we can use that // instead. - $form_state['values']['options']['value'] = $form['value']['#value']; } diff --git a/drupal7/web/sites/all/modules/contrib/views/handlers/views_handler_filter_many_to_one.inc b/drupal7/web/sites/all/modules/contrib/views/handlers/views_handler_filter_many_to_one.inc index c14af20..58c663c 100644 --- a/drupal7/web/sites/all/modules/contrib/views/handlers/views_handler_filter_many_to_one.inc +++ b/drupal7/web/sites/all/modules/contrib/views/handlers/views_handler_filter_many_to_one.inc @@ -88,7 +88,7 @@ class views_handler_filter_many_to_one extends views_handler_filter_in_operator 'ensure_my_table' => 'helper', ), ); - // if the definition allows for the empty operator, add it. + // If the definition allows for the empty operator, add it. if (!empty($this->definition['allow empty'])) { $operators += array( 'empty' => array( diff --git a/drupal7/web/sites/all/modules/contrib/views/handlers/views_handler_filter_numeric.inc b/drupal7/web/sites/all/modules/contrib/views/handlers/views_handler_filter_numeric.inc index 95d23d6..e185720 100644 --- a/drupal7/web/sites/all/modules/contrib/views/handlers/views_handler_filter_numeric.inc +++ b/drupal7/web/sites/all/modules/contrib/views/handlers/views_handler_filter_numeric.inc @@ -6,7 +6,7 @@ */ /** - * Simple filter to handle greater than/less than filters + * Simple filter to handle greater than/less than filters. * * @ingroup views_filter_handlers */ @@ -89,7 +89,7 @@ class views_handler_filter_numeric extends views_handler_filter { ), ); - // if the definition allows for the empty operator, add it. + // If the definition allows for the empty operator, add it. if (!empty($this->definition['allow empty'])) { $operators += array( 'empty' => array( @@ -129,7 +129,7 @@ class views_handler_filter_numeric extends views_handler_filter { } /** - * Provide a list of all the numeric operators + * Provide a list of all the numeric operators. */ public function operator_options($which = 'title') { $options = array(); @@ -155,7 +155,7 @@ class views_handler_filter_numeric extends views_handler_filter { } /** - * Provide a simple textfield for equality + * Provide a simple textfield for equality. */ public function value_form(&$form, &$form_state) { $form['value']['#tree'] = TRUE; @@ -178,14 +178,14 @@ class views_handler_filter_numeric extends views_handler_filter { $operator_values_with_2_values = $this->operator_values(2); if ($limit_operators) { // If limit operators is enabled, check that at least one operator - // with two values is enabled to display the min max widgets + // with two values is enabled to display the min max widgets. foreach ($operator_values_with_2_values as $operator) { if (isset($this->options['expose']['available_operators'][$operator])) { $use_minmax = TRUE; break; } } - // the same for operators with one value + // The same for operators with one value. foreach ($operator_values_with_1_values as $operator) { if (isset($this->options['expose']['available_operators'][$operator])) { $use_value = TRUE; @@ -199,7 +199,7 @@ class views_handler_filter_numeric extends views_handler_filter { $identifier = $this->options['expose']['identifier']; if (empty($this->options['expose']['use_operator']) || empty($this->options['expose']['operator_id'])) { - // exposed and locked. + // Exposed and locked. $which = in_array($this->operator, $operator_values_with_2_values) ? 'minmax' : 'value'; } else { @@ -274,7 +274,7 @@ class views_handler_filter_numeric extends views_handler_filter { // Ensure there is something in the 'value'. $form['value'] = array( '#type' => 'value', - '#value' => NULL + '#value' => NULL, ); } } @@ -393,16 +393,16 @@ class views_handler_filter_numeric extends views_handler_filter { if (empty($this->options['expose']['required'])) { // We have to do some of our own checking for non-required filters. $info = $this->operators(); - if (!empty($info[$this->operator]['values'])) { + if (!empty($info[$this->operator]['values']) && is_array($value)) { switch ($info[$this->operator]['values']) { case 1: - if ($value['value'] === '') { + if (array_key_exists('value', $value) && $value['value'] === '') { return FALSE; } break; case 2: - if ($value['min'] === '' && $value['max'] === '') { + if (array_key_exists('min', $value) && $value['min'] === '' && array_key_exists('max', $value) && $value['max'] === '') { return FALSE; } break; diff --git a/drupal7/web/sites/all/modules/contrib/views/handlers/views_handler_filter_string.inc b/drupal7/web/sites/all/modules/contrib/views/handlers/views_handler_filter_string.inc index 8d2f734..9f25bbd 100644 --- a/drupal7/web/sites/all/modules/contrib/views/handlers/views_handler_filter_string.inc +++ b/drupal7/web/sites/all/modules/contrib/views/handlers/views_handler_filter_string.inc @@ -210,7 +210,7 @@ class views_handler_filter_string extends views_handler_filter { $identifier = $this->options['expose']['identifier']; if (empty($this->options['expose']['use_operator']) || empty($this->options['expose']['operator_id'])) { - // exposed and locked. + // Exposed and locked. $which = in_array($this->operator, $this->operator_values(1)) ? 'value' : 'none'; } else { @@ -299,7 +299,7 @@ class views_handler_filter_string extends views_handler_filter { preg_match_all('/ (-?)("[^"]+"|[^" ]+)/i', ' ' . $this->value, $matches, PREG_SET_ORDER); foreach ($matches as $match) { $phrase = FALSE; - // Strip off phrase quotes + // Strip off phrase quotes. if ($match[2][0] == '"') { $match[2] = substr($match[2], 1, -1); $phrase = TRUE; @@ -307,7 +307,6 @@ class views_handler_filter_string extends views_handler_filter { $words = trim($match[2], ',?!();:-'); $words = $phrase ? array($words) : preg_split('/ /', $words, -1, PREG_SPLIT_NO_EMPTY); foreach ($words as $word) { - $placeholder = $this->placeholder(); $where->condition($field, '%' . db_like(trim($word, " ,!?")) . '%', 'LIKE'); } } diff --git a/drupal7/web/sites/all/modules/contrib/views/handlers/views_handler_relationship.inc b/drupal7/web/sites/all/modules/contrib/views/handlers/views_handler_relationship.inc index d20217c..58d98b4 100644 --- a/drupal7/web/sites/all/modules/contrib/views/handlers/views_handler_relationship.inc +++ b/drupal7/web/sites/all/modules/contrib/views/handlers/views_handler_relationship.inc @@ -67,7 +67,6 @@ class views_handler_relationship extends views_handler { public function option_definition() { $options = parent::option_definition(); - // Relationships definitions should define a default label, but if they // aren't get another default value. if (!empty($this->definition['label'])) { diff --git a/drupal7/web/sites/all/modules/contrib/views/handlers/views_handler_relationship_groupwise_max.inc b/drupal7/web/sites/all/modules/contrib/views/handlers/views_handler_relationship_groupwise_max.inc index 5b172d2..5747d67 100644 --- a/drupal7/web/sites/all/modules/contrib/views/handlers/views_handler_relationship_groupwise_max.inc +++ b/drupal7/web/sites/all/modules/contrib/views/handlers/views_handler_relationship_groupwise_max.inc @@ -183,7 +183,7 @@ class views_handler_relationship_groupwise_max extends views_handler_relationshi * - subquery_order: either ASC or DESC. * * @return string - * The subquery SQL string, ready for use in the main query. + * The subquery SQL string, ready for use in the main query. */ public function left_query($options) { // Either load another view, or create one on the fly. @@ -212,8 +212,6 @@ class views_handler_relationship_groupwise_max extends views_handler_relationshi $temp_view->args[] = '**CORRELATED**'; // Add the base table ID field. - $views_data = views_fetch_data($this->definition['base']); - $base_field = $views_data['table']['base']['field']; $temp_view->add_item('default', 'field', $this->definition['base'], $this->definition['field']); // Add the correct argument for our relationship's base ie the "how to get @@ -222,7 +220,7 @@ class views_handler_relationship_groupwise_max extends views_handler_relationshi $temp_view->add_item( 'default', 'argument', - // For example, 'term_node', + // For example, 'term_node'. $this->definition['argument table'], // For example, 'tid'. $this->definition['argument field'] @@ -332,6 +330,7 @@ class views_handler_relationship_groupwise_max extends views_handler_relationshi } } } + unset($condition); } /** @@ -382,7 +381,7 @@ class views_handler_relationship_groupwise_max extends views_handler_relationshi } if (!empty($def['join_handler']) && class_exists($def['join_handler'])) { - $join = new $def['join_handler']; + $join = new $def['join_handler'](); } else { $join = new views_join_subquery(); diff --git a/drupal7/web/sites/all/modules/contrib/views/handlers/views_handler_sort.inc b/drupal7/web/sites/all/modules/contrib/views/handlers/views_handler_sort.inc index 1b17e79..b1cb8ec 100644 --- a/drupal7/web/sites/all/modules/contrib/views/handlers/views_handler_sort.inc +++ b/drupal7/web/sites/all/modules/contrib/views/handlers/views_handler_sort.inc @@ -51,7 +51,7 @@ class views_handler_sort extends views_handler { } /** - * Display whether or not the sort order is ascending or descending + * Display whether or not the sort order is ascending or descending. */ public function admin_summary() { if (!empty($this->options['exposed'])) { @@ -70,7 +70,7 @@ class views_handler_sort extends views_handler { } /** - * Basic options for all sort criteria + * Basic options for all sort criteria. */ public function options_form(&$form, &$form_state) { parent::options_form($form, $form_state); diff --git a/drupal7/web/sites/all/modules/contrib/views/includes/admin.inc b/drupal7/web/sites/all/modules/contrib/views/includes/admin.inc index 8788f2b..b83a5b8 100644 --- a/drupal7/web/sites/all/modules/contrib/views/includes/admin.inc +++ b/drupal7/web/sites/all/modules/contrib/views/includes/admin.inc @@ -822,7 +822,7 @@ function views_ui_taxonomy_autocomplete_validate($element, &$form_state) { /** * Theme function; returns basic administrative information about a view. * - * TODO: template + preprocess. + * @todo Template + preprocess. */ function theme_views_ui_view_info($variables) { $view = $variables['view']; @@ -1107,7 +1107,7 @@ function views_ui_edit_form($form, &$form_state, $view, $display_id = NULL) { $form['displays'] = array( '#prefix' => '

' . t('Displays') . "

\n" - . '
', + . '
', '#suffix' => '
', ); @@ -1518,9 +1518,9 @@ function views_ui_edit_form_submit_delay_destination($form, &$form_state) { * for setting the active tab's #active property to TRUE. * * @param view $view - * The view which will be edited. + * The view which will be edited. * @param string $display_id - * The display_id which is edited on the current request. + * The display_id which is edited on the current request. */ function views_ui_edit_page_display_tabs(view $view, $display_id = NULL) { $tabs = array(); @@ -1586,8 +1586,7 @@ function views_ui_get_display_tab($view, $display_id) { // If the plugin doesn't exist, display an error message instead of an edit // page. if (empty($display->handler)) { - $title = isset($display->display_title) ? $display->display_title : t('Invalid'); - // @todo: Improved UX for the case where a plugin is missing. + // @todo Improved UX for the case where a plugin is missing. $build['#markup'] = t("Error: Display @display refers to a plugin named '@plugin', but that plugin is not available.", array('@display' => $display->id, '@plugin' => $display->display_plugin)); } // Build the content of the edit page. @@ -1627,7 +1626,7 @@ function views_ui_get_display_tab_details($view, $display) { $is_deletable = empty($plugin['no remove']); // The master display cannot be cloned. $is_default = $display->id == 'default'; - // @todo: Figure out why get_option doesn't work here. + // @todo Figure out why get_option doesn't work here. $is_enabled = $display->handler->get_option('enabled'); if (!$is_display_deleted && $is_deletable && !$is_default) { @@ -1642,7 +1641,7 @@ function views_ui_get_display_tab_details($view, $display) { } // Display warning if argument handler has exception overriding validation. - foreach ($display->handler->get_handlers('argument') as $arg => $handler) { + foreach ($display->handler->get_handlers('argument') as $handler) { if (!empty($handler->options['exception']['value']) && $handler->options['specify_validation'] && !empty($handler->options['validate_options'])) { $build['message']['validation_warning'] = array( '#theme_wrappers' => array('container'), @@ -1925,7 +1924,7 @@ function views_ui_edit_form_get_build_from_option($id, $option, $view, $display) } /** - * + * */ function template_preprocess_views_ui_display_tab_setting(&$variables) { static $zebra = 0; @@ -1954,7 +1953,7 @@ function template_preprocess_views_ui_display_tab_setting(&$variables) { } /** - * + * */ function template_preprocess_views_ui_display_tab_bucket(&$variables) { $element = $variables['element']; @@ -2196,11 +2195,11 @@ function views_ui_import_validate($form, &$form_state) { if (!$form_state['values']['bypass_validation']) { // Make sure that all plugins and handlers needed by this view actually // exist. - foreach ($view->display as $id => $display) { + foreach ($view->display as $display) { if (empty($display->handler) || !empty($display->handler->broken)) { drupal_set_message(t('Display plugin @plugin is not available.', array( - '@plugin' => $display->display_plugin, - )), 'error'); + '@plugin' => $display->display_plugin, + )), 'error'); $broken = TRUE; continue; } @@ -2208,16 +2207,16 @@ function views_ui_import_validate($form, &$form_state) { $plugin = views_get_plugin('style', $display->handler->get_option('style_plugin')); if (!$plugin) { drupal_set_message(t('Style plugin @plugin is not available.', array( - '@plugin' => $display->handler->get_option('style_plugin'), - )), 'error'); + '@plugin' => $display->handler->get_option('style_plugin'), + )), 'error'); $broken = TRUE; } elseif ($plugin->uses_row_plugin()) { $plugin = views_get_plugin('row', $display->handler->get_option('row_plugin')); if (!$plugin) { drupal_set_message(t('Row plugin @plugin is not available.', array( - '@plugin' => $display->handler->get_option('row_plugin'), - )), 'error'); + '@plugin' => $display->handler->get_option('row_plugin'), + )), 'error'); $broken = TRUE; } } @@ -2225,13 +2224,13 @@ function views_ui_import_validate($form, &$form_state) { foreach (views_object_types() as $type => $info) { $handlers = $display->handler->get_handlers($type); if ($handlers) { - foreach ($handlers as $id => $handler) { + foreach ($handlers as $handler) { if ($handler->broken()) { drupal_set_message(t('@type handler @table.@field is not available.', array( - '@type' => $info['stitle'], - '@table' => $handler->table, - '@field' => $handler->field, - )), 'error'); + '@type' => $info['stitle'], + '@table' => $handler->table, + '@field' => $handler->field, + )), 'error'); $broken = TRUE; } } @@ -2392,7 +2391,7 @@ function views_ui_edit_form_get_bucket($type, $view, $display) { $class = 'icon compact rearrange'; } - // Create an array of actions to pass to theme_links + // Create an array of actions to pass to theme_links. $actions = array(); $count_handlers = count($display->handler->get_handlers($type)); $actions['add'] = array( @@ -2439,7 +2438,7 @@ function views_ui_edit_form_get_bucket($type, $view, $display) { if (!isset($relationships)) { // Get relationship labels. $relationships = array(); - // @todo: get_handlers() + // @todo get_handlers() $handlers = $display->handler->get_option('relationships'); if ($handlers) { foreach ($handlers as $id => $info) { @@ -2492,7 +2491,7 @@ function views_ui_edit_form_get_bucket($type, $view, $display) { $build['fields'][$id]['#link'] = l($link_text, "admin/structure/views/nojs/config-item/$view->name/$display->id/$type/$id", array('attributes' => $link_attributes, 'html' => TRUE)); $build['fields'][$id]['#class'][] = drupal_clean_css_identifier($display->id . '-' . $type . '-' . $id); if (!empty($view->changed_sections[$display->id . '-' . $type . '-' . $id])) { - // @todo: #changed is no longer being used? + // @todo #changed is no longer being used? $build['fields'][$id]['#changed'] = TRUE; } @@ -2587,7 +2586,7 @@ function views_ui_add_microweights(&$build) { * a hidden op operator because the forms plugin doesn't seem to properly * provide which button was clicked. * - * TODO: Is the hidden op operator still here somewhere, or is that part of the + * @todo Is the hidden op operator still here somewhere, or is that part of the * docblock outdated? */ function views_ui_standard_form_buttons(&$form, &$form_state, $form_id, $name = NULL, $third = NULL, $submit = NULL) { @@ -2799,7 +2798,7 @@ function views_ui_standard_display_dropdown(&$form, &$form_state, $section) { $current_display = $view->display[$display_id]; // Add the "2 of 3" progress indicator. - // @todo: Move this to a separate function if it's needed on any forms that + // @todo Move this to a separate function if it's needed on any forms that // don't have the display dropdown. if ($form_progress = views_ui_get_form_progress($view)) { $form['progress']['#markup'] = '
' . t('@current of @total', array('@current' => $form_progress['current'], '@total' => $form_progress['total'])) . '
'; @@ -2838,7 +2837,7 @@ function views_ui_standard_display_dropdown(&$form, &$form_state, $section) { $form['override']['dropdown'] = array( '#type' => 'select', '#title' => t('For'), - // @todo: Translators may need more context than this. + // @todo Translators may need more context than this. '#options' => $display_dropdown, ); if ($current_display->handler->is_defaulted($section)) { @@ -2865,7 +2864,6 @@ function views_ui_standard_display_dropdown(&$form, &$form_state, $section) { function views_ui_get_form_progress($view) { $progress = FALSE; if (!empty($view->stack)) { - $stack = $view->stack; // The forms on the stack have integer keys that don't change as the forms // are completed, so we can see which ones are still left. $keys = array_keys($view->stack); @@ -2882,9 +2880,9 @@ function views_ui_get_form_progress($view) { return $progress; } - -// -------------------------------------------------------------------------- -// Various subforms for editing the pieces of a view. +/** + * Various subforms for editing the pieces of a view. + */ function views_ui_ajax_forms($key = NULL) { $forms = array( 'display' => array( @@ -2960,13 +2958,9 @@ function views_ui_build_identifier($key, $view, $display_id, $args) { $form = views_ui_ajax_forms($key); // Automatically remove the single-form cache if it exists and // does not match the key. - $identifier = implode('-', array($key, $view->name, $display_id)); - - foreach ($form['args'] as $id) { - $arg = (!empty($args)) ? array_shift($args) : NULL; - $identifier .= '-' . $arg; - } - return $identifier; + $base_parts = array($key, $view->name, $display_id); + $args = isset($form['args']) ? $form['args'] : array(); + return implode('-', array_merge($base_parts, $args)); } /** @@ -3074,7 +3068,7 @@ function views_ui_ajax_form($js, $key, $view, $display_id = '') { views_include('ajax'); $form_state = views_ui_build_form_state($js, $key, $view, $display_id, $args); - // check to see if this is the top form of the stack. If it is, pop + // Check to see if this is the top form of the stack. If it is, pop // it off; if it isn't, the user clicked somewhere else and the stack is // now irrelevant. if (!empty($view->stack)) { @@ -3090,13 +3084,6 @@ function views_ui_ajax_form($js, $key, $view, $display_id = '') { } } - // Automatically remove the form cache if it is set and the key does - // not match. This way navigating away from the form without hitting - // update will work. - if (isset($view->form_cache) && $view->form_cache['key'] != $key) { - unset($view->form_cache); - } - // With the below logic, we may end up rendering a form twice (or two forms // each sharing the same element ids), potentially resulting in // drupal_add_js() being called twice to add the same setting. drupal_get_js() @@ -3108,7 +3095,6 @@ function views_ui_ajax_form($js, $key, $view, $display_id = '') { $output = views_ajax_form_wrapper($form_state['form_id'], $form_state); if ($form_state['submitted'] && empty($form_state['rerender'])) { // Sometimes we need to re-generate the form for multi-step type operations. - $object = NULL; if (!empty($view->stack)) { $drupal_add_js = $drupal_add_js_original; $stack = $view->stack; @@ -3273,7 +3259,7 @@ function _views_position_sort($display1, $display2) { */ function views_ui_reorder_displays_form_submit($form, &$form_state) { foreach ($form_state['input'] as $display => $info) { - // add each value that is a field with a weight to our list, but only if + // Add each value that is a field with a weight to our list, but only if // it has had its 'removed' checkbox checked. if (is_array($info) && isset($info['weight']) && empty($info['removed'])) { $order[$display] = $info['weight']; @@ -3336,8 +3322,10 @@ function theme_views_ui_reorder_displays_form($vars) { 'id' => 'display-remove-link-' . $key, 'class' => array('views-button-remove display-remove-link'), 'alt' => t('Remove this display'), - 'title' => t('Remove this display')), - 'html' => TRUE)); + 'title' => t('Remove this display'), + ), + 'html' => TRUE, + )); } else { $row[] = ''; @@ -3431,7 +3419,6 @@ function views_ui_edit_details_form_submit($form, &$form_state) { function views_ui_edit_display_form($form, &$form_state) { $view = &$form_state['view']; $display_id = $form_state['display_id']; - $section = $form_state['section']; if (!$view->set_display($display_id)) { views_ajax_error(t('Invalid display id @display', array('@display' => $display_id))); @@ -3490,7 +3477,7 @@ function views_ui_edit_display_form_submit($form, &$form_state) { /** * Override handler for views_ui_edit_display_form. * - * @todo: Not currently used. Remove unless we implement an override toggle. + * @todo Not currently used. Remove unless we implement an override toggle. */ function views_ui_edit_display_form_override($form, &$form_state) { $display = &$form_state['view']->display[$form_state['display_id']]; @@ -3541,9 +3528,6 @@ function views_ui_config_type_form($form, &$form_state) { * Submit handler for type configuration form. */ function views_ui_config_type_form_submit($form, &$form_state) { - $types = views_object_types(); - $display = &$form_state['view']->display[$form_state['display_id']]; - // Store in cache. views_ui_cache_set($form_state['view']); } @@ -3584,17 +3568,6 @@ function views_ui_rearrange_form($form, &$form_state) { } } - // Filters can now be grouped so we do a little bit extra. - $groups = array(); - $grouping = FALSE; - if ($type == 'filter') { - $group_info = $view->display_handler->get_option('filter_groups'); - if (!empty($group_info['groups']) && count($group_info['groups']) > 1) { - $grouping = TRUE; - $groups = array(0 => array()); - } - } - foreach ($display->handler->get_option($types[$type]['plural']) as $id => $field) { $form['fields'][$id] = array('#tree' => TRUE); $form['fields'][$id]['weight'] = array( @@ -3785,7 +3758,6 @@ function theme_views_ui_build_group_filter_form($variables) { return $output . $render_form . $table . $more; } - /** * Submit handler for rearranging form. */ @@ -3798,7 +3770,7 @@ function views_ui_rearrange_form_submit($form, &$form_state) { // Make an array with the weights. foreach ($form_state['values'] as $field => $info) { - // add each value that is a field with a weight to our list, but only if + // Add each value that is a field with a weight to our list, but only if // it has had its 'removed' checkbox checked. if (is_array($info) && isset($info['weight']) && empty($info['removed'])) { $order[$field] = $info['weight']; @@ -3903,7 +3875,7 @@ function views_ui_rearrange_filter_form($form, &$form_state) { ); $form['remove_groups'][$id] = array(); - // to prevent a notice. + // To prevent a notice. if ($id != 1) { $form['remove_groups'][$id] = array( '#type' => 'submit', @@ -4102,7 +4074,6 @@ function views_ui_rearrange_filter_form_submit($form, &$form_state) { else { $old_fields = $display->handler->get_option($types[$form_state['type']]['plural']); } - $count = 0; $groups = $form_state['values']['filter_groups']; // Whatever button was clicked, re-calculate field information. @@ -4110,7 +4081,7 @@ function views_ui_rearrange_filter_form_submit($form, &$form_state) { // Make an array with the weights. foreach ($form_state['values']['filters'] as $field => $info) { - // add each value that is a field with a weight to our list, but only if + // Add each value that is a field with a weight to our list, but only if // it has had its 'removed' checkbox checked. if (is_array($info) && empty($info['removed'])) { if (isset($info['weight'])) { @@ -4182,6 +4153,7 @@ function views_ui_rearrange_filter_form_submit($form, &$form_state) { foreach ($new_fields as &$new_field) { $new_field['group'] = $mapping[$new_field['group']]; } + unset($new_field); // Write the changed handler values. $display->handler->set_option($types[$form_state['type']]['plural'], $new_fields); @@ -4621,7 +4593,7 @@ function views_ui_config_item_form_submit_temporary($form, &$form_state) { // Store the item back on the view. $form_state['view']->temporary_options[$type][$form_state['id']] = $handler->options; - // @todo: Figure out whether views_ui_ajax_form is perhaps the better place + // @todo Figure out whether views_ui_ajax_form is perhaps the better place // to fix the issue. views_ui_ajax_form() drops the current form from the // stack, even if it's an #ajax. So add the item back to the top of the stack. views_ui_add_form_to_stack($form_state['form_key'], $form_state['view'], $form_state['display_id'], array($type, $item['id']), TRUE); @@ -4734,7 +4706,6 @@ function views_ui_config_item_group_form($type, &$form_state) { function views_ui_config_item_group_form_submit($form, &$form_state) { $item =& $form_state['handler']->options; $type = $form_state['type']; - $id = $form_state['id']; $handler = views_get_handler($item['table'], $item['field'], $type); $handler->init($form_state['view'], $item); @@ -5235,8 +5206,9 @@ function views_ui_autocomplete_tag($string = '') { drupal_json_output($matches); } -// ------------------------------------------------------------------ -// Get information from the Views data. +/** + * Get information from the Views data. + */ function _views_weight_sort($a, $b) { if ($a['weight'] != $b['weight']) { return $a['weight'] < $b['weight'] ? -1 : 1; @@ -5251,13 +5223,12 @@ function _views_weight_sort($a, $b) { /** * Fetch a list of all base tables available. * - * @return + * @return array * A keyed array of in the form of 'base_table' => 'Description'. */ function views_fetch_base_tables() { static $base_tables = array(); if (empty($base_tables)) { - $weights = array(); $tables = array(); $data = views_fetch_data(); foreach ($data as $table => $info) { @@ -5298,7 +5269,7 @@ function _views_sort_types($a, $b) { /** * Fetch a list of all fields available for a given base type. * - * @param (array|string) $base + * @param array|string $base * A list or a single base_table, for example node. * @param string $type * The handler type, for example field or filter. @@ -5334,7 +5305,7 @@ function views_fetch_fields($base, $type, $grouping = FALSE) { foreach ($table_data as $field => $info) { // Collect table data from this table. if ($field == 'table') { - // calculate what tables this table can join to. + // Calculate what tables this table can join to. if (!empty($info['join'])) { $bases = array_keys($info['join']); } @@ -5415,7 +5386,6 @@ function views_fetch_fields($base, $type, $grouping = FALSE) { return array(); } - /** * Theme the form for the table style plugin. */ @@ -5521,7 +5491,7 @@ function views_ui_add_template_page() { ); $rows = array(); - foreach ($templates as $name => $template) { + foreach ($templates as $template) { $rows[] = array( array('data' => check_plain($template->get_human_name())), array('data' => check_plain($template->description)), @@ -5606,7 +5576,6 @@ function views_ui_field_list() { $header = array(t('Field name'), t('Used in')); $rows = array(); foreach ($fields as $field_name => $views) { - $rows[$field_name]['data'][0] = check_plain($field_name); foreach ($views as $view) { $rows[$field_name]['data'][1][] = l($view, "admin/structure/views/view/$view"); @@ -5638,6 +5607,7 @@ function views_ui_plugin_list() { } $row['views'] = implode(', ', $row['views']); } + unset($row); // Sort rows by field name. ksort($rows); diff --git a/drupal7/web/sites/all/modules/contrib/views/includes/ajax.inc b/drupal7/web/sites/all/modules/contrib/views/includes/ajax.inc index 3b4dc9a..8d55e34 100644 --- a/drupal7/web/sites/all/modules/contrib/views/includes/ajax.inc +++ b/drupal7/web/sites/all/modules/contrib/views/includes/ajax.inc @@ -302,7 +302,6 @@ function views_ajax_form_wrapper($form_id, &$form_state) { return $output; } - /** * Page callback for views user autocomplete. */ @@ -357,7 +356,6 @@ function views_ajax_autocomplete_taxonomy($vid, $tags_typed = '') { $tags_typed = drupal_explode_tags($tags_typed); $tag_last = drupal_strtolower(array_pop($tags_typed)); - $matches = array(); if ($tag_last != '') { $query = db_select('taxonomy_term_data', 't'); @@ -380,7 +378,7 @@ function views_ajax_autocomplete_taxonomy($vid, $tags_typed = '') { $prefix = count($tags_typed) ? drupal_implode_tags($tags_typed) . ', ' : ''; $term_matches = array(); - foreach ($tags_return as $tid => $name) { + foreach ($tags_return as $name) { $n = $name; // Term names containing commas or quotes must be wrapped in quotes. if (strpos($name, ',') !== FALSE || strpos($name, '"') !== FALSE) { diff --git a/drupal7/web/sites/all/modules/contrib/views/includes/analyze.inc b/drupal7/web/sites/all/modules/contrib/views/includes/analyze.inc index 9409389..8006500 100644 --- a/drupal7/web/sites/all/modules/contrib/views/includes/analyze.inc +++ b/drupal7/web/sites/all/modules/contrib/views/includes/analyze.inc @@ -106,7 +106,7 @@ function views_ui_views_analyze($view) { // You can give a page display the same path as an alias existing in the // system, so the alias will not work anymore. Report this to the user, // because they probably wanted something else. - foreach ($view->display as $id => $display) { + foreach ($view->display as $display) { if (empty($display->handler)) { continue; } diff --git a/drupal7/web/sites/all/modules/contrib/views/includes/base.inc b/drupal7/web/sites/all/modules/contrib/views/includes/base.inc index b2a39c3..7e6c7d2 100644 --- a/drupal7/web/sites/all/modules/contrib/views/includes/base.inc +++ b/drupal7/web/sites/all/modules/contrib/views/includes/base.inc @@ -69,7 +69,7 @@ class views_object { * @see hook_views_plugin_option_definition_alter() * @see hook_views_handler_option_definition_alter() */ - function altered_option_definition() { + public function altered_option_definition() { $definition = $this->option_definition(); if (!empty($this->is_plugin)) { // Trigger hook_views_plugin_option_definition_alter(). @@ -154,7 +154,7 @@ class views_object { if (empty($localization_keys) && isset($this->localization_keys)) { $localization_keys = $this->localization_keys; } - // but plugins don't because there isn't a common init() these days. + // But plugins don't because there isn't a common init() these days. elseif (!empty($this->is_plugin) && empty($localization_keys)) { if ($this->plugin_type != 'display') { $localization_keys = array($this->view->current_display); diff --git a/drupal7/web/sites/all/modules/contrib/views/includes/cache.inc b/drupal7/web/sites/all/modules/contrib/views/includes/cache.inc index 6ef36df..dcbe50a 100644 --- a/drupal7/web/sites/all/modules/contrib/views/includes/cache.inc +++ b/drupal7/web/sites/all/modules/contrib/views/includes/cache.inc @@ -56,7 +56,7 @@ function _views_fetch_data($table = NULL, $move = TRUE, $reset = FALSE) { if (isset($cache[$table]['moved to']) && $move) { $moved_table = $cache[$table]['moved to']; if (!empty($recursion_protection[$table])) { - // recursion detected! + // Recursion detected! return NULL; } $recursion_protection[$table] = TRUE; diff --git a/drupal7/web/sites/all/modules/contrib/views/includes/handlers.inc b/drupal7/web/sites/all/modules/contrib/views/includes/handlers.inc index 99eb593..379ffe4 100644 --- a/drupal7/web/sites/all/modules/contrib/views/includes/handlers.inc +++ b/drupal7/web/sites/all/modules/contrib/views/includes/handlers.inc @@ -9,7 +9,9 @@ * Instantiate and construct a new handler. */ function _views_create_handler($definition, $type = 'handler', $handler_type = NULL) { - // debug('Instantiating handler ' . $definition['handler']); + // @code + // debug('Instantiating handler ' . $definition['handler']); + // @endcode if (empty($definition['handler'])) { vpr('_views_create_handler - type: @type - failed: handler has not been provided.', array('@type' => isset($handler_type) ? ($type . '(handler type: ' . $handler_type . ')') : $type) @@ -44,10 +46,10 @@ function _views_create_handler($definition, $type = 'handler', $handler_type = N } if (!empty($definition['override handler'])) { - $handler = new $definition['override handler']; + $handler = new $definition['override handler'](); } else { - $handler = new $definition['handler']; + $handler = new $definition['handler'](); } $handler->set_definition($definition); @@ -61,7 +63,7 @@ function _views_create_handler($definition, $type = 'handler', $handler_type = N $handler->plugin_name = $definition['name']; } - // let the handler have something like a constructor. + // Let the handler have something like a constructor. $handler->construct(); return $handler; @@ -95,7 +97,7 @@ function views_get_table_join($table, $base_table) { if (isset($data['table']['join'][$base_table])) { $h = $data['table']['join'][$base_table]; if (!empty($h['handler']) && class_exists($h['handler'])) { - $handler = new $h['handler']; + $handler = new $h['handler'](); } else { $handler = new views_join(); @@ -355,16 +357,16 @@ class views_handler extends views_object { * Transform a string by a certain method. * * @param string $string - * The input you want to transform. + * The input you want to transform. * @param array $option - * How do you want to transform it, possible values: + * How do you want to transform it, possible values: * - upper: Uppercase the string. * - lower: lowercase the string. * - ucfirst: Make the first char uppercase. * - ucwords: Make each word in the string uppercase. * * @return string - * The transformed string. + * The transformed string. */ public function case_transform($string, $option) { global $multibyte; @@ -753,7 +755,7 @@ class views_handler extends views_object { * as adding an 'extra'. */ public function get_join() { - // get the join from this table that links back to the base table. + // Get the join from this table that links back to the base table. // Determine the primary table to seek. if (empty($this->query->relationships[$this->relationship])) { $base_table = $this->query->base_table; @@ -830,7 +832,7 @@ class views_many_to_one_helper { /** * {@inheritdoc} */ - static function option_definition(&$options) { + public static function option_definition(&$options) { $options['reduce_duplicates'] = array('default' => FALSE, 'bool' => TRUE); } @@ -851,7 +853,7 @@ class views_many_to_one_helper { * Provide an option to use a formula. * * If it wants us to do this, it must set $helper->formula = TRUE and - * implement handler->get_formula();. + * implement handler->get_formula(). */ public function get_field() { if (!empty($this->formula)) { @@ -1007,7 +1009,6 @@ class views_many_to_one_helper { // Case 2: it's anything but an 'or'. // We do one join per selected value. - // Clone the join for each table: $this->handler->table_aliases = array(); $values = $this->handler->operator === 'not' ? array($this->handler->value) : $this->handler->value; @@ -1036,7 +1037,7 @@ class views_many_to_one_helper { $this->handler->view->many_to_one_aliases[$field][$value] = $this->handler->table . '_value_' . ($this->handler->view->many_to_one_count[$this->handler->table]++); $alias = $this->handler->table_aliases[$value] = $this->add_table($join, $this->handler->view->many_to_one_aliases[$field][$value]); - // and set table_alias to the first of these. + // And set table_alias to the first of these. if (empty($this->handler->table_alias)) { $this->handler->table_alias = $alias; } @@ -1087,7 +1088,7 @@ class views_many_to_one_helper { if (is_array($value) && count($value) > 1) { $operator = 'IN'; } - else { + else { $value = is_array($value) ? array_pop($value) : $value; $operator = '='; } @@ -1199,8 +1200,8 @@ function views_break_phrase_string($str, &$handler = NULL) { * @param object $handler * The handler object to use as a base. If not specified one will be created. * - * @return $handler - * The new handler object. + * @return object + * The new handler object, presumed to be a \stdClass. */ function views_break_phrase($str, &$handler = NULL) { if (!$handler) { @@ -1246,6 +1247,7 @@ function views_break_phrase($str, &$handler = NULL) { // -------------------------------------------------------------------------- // Date helper functions. + /** * Figure out what timezone we're in; needed for some date manipulations. */ @@ -1284,7 +1286,7 @@ function views_get_timezone() { * @param string $field * The real table and field name, like 'tablename.fieldname'. * @param string $field_type - * The type of date field, 'int' or 'datetime'. + * The type of date field, 'int' or 'datetime'. * @param string $set_offset * The name of a field that holds the timezone offset or a fixed timezone * offset value. If not provided, the normal Drupal timezone handling @@ -1468,7 +1470,7 @@ function views_date_sql_extract($extract_type, $field, $field_type = 'int', $set $db_type = Database::getConnection()->databaseType(); $field = views_date_sql_field($field, $field_type, $set_offset); - // Note there is no space after FROM to avoid db_rewrite problems + // Note there is no space after FROM to avoid db_rewrite problems. // @see http://drupal.org/node/79904. switch ($extract_type) { case('DATE'): @@ -1667,7 +1669,6 @@ class views_join { $extras = array(); foreach ($this->extra as $info) { if (is_array($info)) { - $extra = ''; // Figure out the table name. Remember, only use aliases provided if // at all possible. $join_table = ''; @@ -1736,13 +1737,14 @@ class views_join { $select_query->addJoin($this->type, $right_table, $table['alias'], $condition, $arguments); } + } /** * Join handler for relationships that join with a subquery as the left field. * * For example: - * LEFT JOIN node node_term_data ON ([YOUR SUBQUERY HERE]) = node_term_data.nid + * LEFT JOIN node node_term_data ON ([YOUR SUBQUERY HERE]) = node_term_data.nid. * * 'join' definition: * Same as views_join class above, except: @@ -1795,7 +1797,6 @@ class views_join_subquery extends views_join { $extras = array(); foreach ($this->extra as $info) { if (is_array($info)) { - $extra = ''; // Figure out the table name. Remember, only use aliases provided if // at all possible. $join_table = ''; @@ -1840,6 +1841,7 @@ class views_join_subquery extends views_join { $select_query->addJoin($this->type, $right_table, $table['alias'], $condition, $arguments); } + } /** diff --git a/drupal7/web/sites/all/modules/contrib/views/includes/plugins.inc b/drupal7/web/sites/all/modules/contrib/views/includes/plugins.inc index 8308e01..e1adb32 100644 --- a/drupal7/web/sites/all/modules/contrib/views/includes/plugins.inc +++ b/drupal7/web/sites/all/modules/contrib/views/includes/plugins.inc @@ -161,7 +161,7 @@ function views_views_plugins() { 'handler' => 'views_plugin_style_summary', 'theme' => 'views_view_summary', 'type' => 'summary', - // only shows up as a summary style. + // Only shows up as a summary style. 'uses options' => TRUE, 'help topic' => 'style-summary', ), @@ -171,7 +171,7 @@ function views_views_plugins() { 'handler' => 'views_plugin_style_summary_unformatted', 'theme' => 'views_view_summary_unformatted', 'type' => 'summary', - // only shows up as a summary style. + // Only shows up as a summary style. 'uses options' => TRUE, 'help topic' => 'style-summary-unformatted', ), @@ -384,7 +384,7 @@ function views_views_plugins() { 'handler' => 'views_plugin_style_summary_jump_menu', 'theme' => 'views_view_summary_jump_menu', 'type' => 'summary', - // only shows up as a summary style. + // Only shows up as a summary style. 'uses options' => TRUE, 'help topic' => 'style-summary-jump-menu', ); @@ -455,7 +455,7 @@ function views_discover_plugins() { // Set the internal name to be able to read it out later. $def['name'] = $plugin; - // merge the new data in. + // Merge the new data in. $cache[$type][$plugin] = $def; } } @@ -569,6 +569,7 @@ class views_plugin extends views_object { public function summary_title() { return t('Settings'); } + /** * Return the human readable name of the display. * diff --git a/drupal7/web/sites/all/modules/contrib/views/includes/view.inc b/drupal7/web/sites/all/modules/contrib/views/includes/view.inc index 976805e..f27d207 100644 --- a/drupal7/web/sites/all/modules/contrib/views/includes/view.inc +++ b/drupal7/web/sites/all/modules/contrib/views/includes/view.inc @@ -42,7 +42,7 @@ class view extends views_db_object { /** * The id of the view, which is used only for views in the database. * - * @var number + * @var int */ public $vid; @@ -134,29 +134,43 @@ class view extends views_db_object { */ public $result = array(); - // May be used to override the current pager info. + /** + * May be used to override the current pager info. + */ public $current_page = NULL; public $items_per_page = NULL; public $offset = NULL; public $total_rows = NULL; - // Places to put attached renderings. + /** + * Places to put attached renderings. + */ public $attachment_before = ''; public $attachment_after = ''; - // Exposed widget input. + /** + * Exposed widget input. + */ public $exposed_data = array(); public $exposed_input = array(); - // Exposed widget input directly from the $form_state['values']. + /** + * Exposed widget input directly from the $form_state['values']. + */ public $exposed_raw_input = array(); - // Used to store views that were previously running if we recurse. + /** + * Used to store views that were previously running if we recurse. + */ public $old_view = array(); - // To avoid recursion in views embedded into areas. + /** + * To avoid recursion in views embedded into areas. + */ public $parent_views = array(); - // Is the current stored view runned as an attachment to another view. + /** + * Is the current stored view runned as an attachment to another view. + */ public $is_attachment = NULL; // Stores the next steps of form items to handle. @@ -331,7 +345,7 @@ class view extends views_db_object { * Returns the complete list of dependent objects in a view, for the purpose * of initialization and loading/saving to/from the database. */ - static function db_objects() { + public static function db_objects() { return array('display'); } @@ -638,7 +652,7 @@ class view extends views_db_object { // For each relationship we have, make sure we mark the base it provides as // available. - foreach ($this->display_handler->get_option('relationships') as $id => $options) { + foreach ($this->display_handler->get_option('relationships') as $options) { $options['table'] = views_move_table($options['table']); $data = views_fetch_data($options['table'], FALSE); if (isset($data[$options['field']]['relationship']['base'])) { @@ -821,7 +835,7 @@ class view extends views_db_object { return TRUE; } - // build arguments. + // Build arguments. $position = -1; // Create a title for use in the breadcrumb trail. @@ -854,7 +868,7 @@ class view extends views_db_object { if (isset($arg) || $argument->has_default_argument()) { if (!isset($arg)) { $arg = $argument->get_default_argument(); - // make sure default args get put back. + // Make sure default args get put back. if (isset($arg)) { $this->args[$position] = $arg; } @@ -905,7 +919,7 @@ class view extends views_db_object { $breadcrumb_args[] = $arg; } else { - // determine default condition and handle. + // Determine default condition and handle. $status = $argument->default_action(); break; } @@ -914,7 +928,7 @@ class view extends views_db_object { unset($argument); } - // set the title in the build info. + // Set the title in the build info. if (!empty($title)) { $this->build_info['title'] = $title; } @@ -932,7 +946,7 @@ class view extends views_db_object { if (!empty($this->query)) { $class = get_class($this->query); if ($class && $class != 'stdClass') { - // return if query is already initialized. + // Return if query is already initialized. return TRUE; } } @@ -1070,7 +1084,7 @@ class view extends views_db_object { if ($this->style_plugin->build_sort()) { $this->_build('sort'); } - // allow the plugin to build second sorts as well. + // Allow the plugin to build second sorts as well. $this->style_plugin->build_sort_post(); } @@ -1122,13 +1136,12 @@ class view extends views_db_object { * Internal method to build an individual set of handlers. * * @param string $key - * The type of handlers (filter etc.) which should be iterated over to + * The type of handlers (filter etc.) which should be iterated over to * build the relationship and query information. */ public function _build($key) { $handlers = &$this->$key; foreach ($handlers as $id => $data) { - if (!empty($handlers[$id]) && is_object($handlers[$id])) { $multiple_exposed_input = array(0 => NULL); if ($handlers[$id]->multiple_exposed_input()) { @@ -1460,7 +1473,7 @@ class view extends views_db_object { * Unset the current view, mostly. */ public function post_execute() { - // unset current view so we can be properly destructed later on. + // Unset current view so we can be properly destructed later on. // Return the previous value in case we're an attachment. if ($this->old_view) { $old_view = array_pop($this->old_view); @@ -1648,7 +1661,7 @@ class view extends views_db_object { // Exclude arguments that were computed, not passed on the URL. $position = 0; if (!empty($this->argument)) { - foreach ($this->argument as $argument_id => $argument) { + foreach ($this->argument as $argument) { if (!empty($argument->options['default_argument_skip_url'])) { unset($args[$position]); } @@ -1814,7 +1827,7 @@ class view extends views_db_object { * views::load(), that would be very slow. Buiding the views externally from * unified queries is much faster. */ - static function load_views() { + public static function load_views() { $result = db_query("SELECT DISTINCT v.* FROM {views_view} v"); $views = array(); @@ -1885,7 +1898,7 @@ class view extends views_db_object { try { // If we have no vid or our vid is a string, this is a new view. if (!empty($this->vid)) { - // remove existing table entries. + // Remove existing table entries. foreach ($this->db_objects() as $key) { db_delete('views_' . $key) ->condition('vid', $this->vid) @@ -1919,11 +1932,11 @@ class view extends views_db_object { /** * Save a row to the database for the given key. * - * i.e. one of the keys from view::db_objects(). + * I.e. one of the keys from view::db_objects(). */ public function _save_rows($key) { $count = 0; - foreach ($this->$key as $position => $object) { + foreach ($this->$key as $object) { $object->position = ++$count; $object->vid = $this->vid; $object->save_row(); @@ -1998,7 +2011,7 @@ class view extends views_db_object { } /** - * Make a copy of this view with IDs, handlers sanitized + * Make a copy of this view with IDs, handlers sanitized. * * I'd call this clone() but it's reserved. */ @@ -2019,7 +2032,7 @@ class view extends views_db_object { * This will completely wipe a view clean so it can be considered fresh. * * @return view - * The cloned view. + * The cloned view. */ public function clone_view() { $clone = clone $this; @@ -2539,15 +2552,6 @@ class views_db_object { 'field' => $field, ) + $options; - if (!empty($types[$type]['type'])) { - $handler_type = $types[$type]['type']; - } - else { - $handler_type = $type; - } - - $handler = views_get_handler($table, $field, $handler_type); - $fields[$id] = $new_item; $this->display[$display_id]->handler->set_option($types[$type]['plural'], $fields); @@ -2646,6 +2650,7 @@ class views_display extends views_db_object { public $display_options; public $db_table = 'views_display'; + public function __construct($init = TRUE) { parent::init($init); } diff --git a/drupal7/web/sites/all/modules/contrib/views/js/ajax.js b/drupal7/web/sites/all/modules/contrib/views/js/ajax.js index 105465e..799413d 100644 --- a/drupal7/web/sites/all/modules/contrib/views/js/ajax.js +++ b/drupal7/web/sites/all/modules/contrib/views/js/ajax.js @@ -17,14 +17,14 @@ // We need to do this for both .click() and .mousedown() since JavaScript // code might trigger either behavior. var $submit_buttons = $('input[type=submit], button', ajax_body); - $submit_buttons.click(function(event) { + $submit_buttons.click(function (event) { this.form.clk = this; }); - $submit_buttons.mousedown(function(event) { + $submit_buttons.mousedown(function (event) { this.form.clk = this; }); - $('form', ajax_body).once('views-ajax-submit-processed').each(function() { + $('form', ajax_body).once('views-ajax-submit-processed').each(function () { var element_settings = { 'url': response.url, 'event': 'submit', @@ -107,7 +107,7 @@ */ Drupal.behaviors.livePreview = { attach: function (context) { - $('input#edit-displays-live-preview', context).once('views-ajax-processed').click(function() { + $('input#edit-displays-live-preview', context).once('views-ajax-processed').click(function () { if ($(this).is(':checked')) { $('#preview-submit').click(); } @@ -120,7 +120,7 @@ */ Drupal.behaviors.syncPreviewDisplay = { attach: function (context) { - $("#views-tabset a").once('views-ajax-processed').click(function() { + $("#views-tabset a").once('views-ajax-processed').click(function () { var href = $(this).attr('href'); // Cut of #views-tabset. var display_id = href.substr(11); @@ -189,7 +189,7 @@ // @todo Revisit this after fixing Views UI to display a Preview outside // of the main Edit form. $('div#views-live-preview input[type=submit]') - .once('views-ajax-processed').each(function(event) { + .once('views-ajax-processed').each(function (event) { $(this).click(function () { this.form.clk = this; return true; diff --git a/drupal7/web/sites/all/modules/contrib/views/js/ajax_view.js b/drupal7/web/sites/all/modules/contrib/views/js/ajax_view.js index 98ec546..b7286ad 100644 --- a/drupal7/web/sites/all/modules/contrib/views/js/ajax_view.js +++ b/drupal7/web/sites/all/modules/contrib/views/js/ajax_view.js @@ -8,9 +8,9 @@ * Attaches the AJAX behavior to exposed filter forms and key views links. */ Drupal.behaviors.ViewsAjaxView = {}; - Drupal.behaviors.ViewsAjaxView.attach = function() { + Drupal.behaviors.ViewsAjaxView.attach = function () { if (Drupal.settings && Drupal.settings.views && Drupal.settings.views.ajaxViews) { - $.each(Drupal.settings.views.ajaxViews, function(i, settings) { + $.each(Drupal.settings.views.ajaxViews, function (i, settings) { Drupal.views.instances[i] = new Drupal.views.ajaxView(settings); }); } @@ -22,7 +22,7 @@ /** * JavaScript object for a certain view. */ - Drupal.views.ajaxView = function(settings) { + Drupal.views.ajaxView = function (settings) { var selector = '.view-dom-id-' + settings.view_dom_id; this.$view = $(selector); @@ -91,7 +91,7 @@ }); }; - Drupal.views.ajaxView.prototype.attachExposedFormAjax = function() { + Drupal.views.ajaxView.prototype.attachExposedFormAjax = function () { var button = $('input[type=submit], button[type=submit], input[type=image]', this.$exposed_form); button = button[0]; @@ -108,7 +108,7 @@ /** * Attach the ajax behavior to each link. */ - Drupal.views.ajaxView.prototype.attachPagerAjax = function() { + Drupal.views.ajaxView.prototype.attachPagerAjax = function () { this.$view.find('ul.pager > li > a, ol.pager > li > a, th.views-field a, .attachment .views-summary a') .each(jQuery.proxy(this.attachPagerLinkAjax, this)); }; @@ -116,7 +116,7 @@ /** * Attach the ajax behavior to a single link. */ - Drupal.views.ajaxView.prototype.attachPagerLinkAjax = function(id, link) { + Drupal.views.ajaxView.prototype.attachPagerLinkAjax = function (id, link) { var $link = $(link); var viewData = {}; var href = $link.attr('href'); diff --git a/drupal7/web/sites/all/modules/contrib/views/js/base.js b/drupal7/web/sites/all/modules/contrib/views/js/base.js index 92d57a9..69fa9ab 100644 --- a/drupal7/web/sites/all/modules/contrib/views/js/base.js +++ b/drupal7/web/sites/all/modules/contrib/views/js/base.js @@ -17,7 +17,7 @@ }); } - $('a.views-remove-link').once('views-processed').click(function(event) { + $('a.views-remove-link').once('views-processed').click(function (event) { var id = $(this).attr('id').replace('views-remove-link-', ''); $('#views-row-' + id).hide(); $('#views-removed-' + id).get(0).checked = true; @@ -27,7 +27,7 @@ // (checking in the hidden checkbox and hiding out the row). $('a.display-remove-link') .addClass('display-processed') - .click(function() { + .click(function () { var id = $(this).attr('id').replace('display-remove-link-', ''); $('#display-row-' + id).hide(); $('#display-removed-' + id).get(0).checked = true; diff --git a/drupal7/web/sites/all/modules/contrib/views/js/jquery.ui.dialog.patch.js b/drupal7/web/sites/all/modules/contrib/views/js/jquery.ui.dialog.patch.js index 0b099ce..a99770c 100644 --- a/drupal7/web/sites/all/modules/contrib/views/js/jquery.ui.dialog.patch.js +++ b/drupal7/web/sites/all/modules/contrib/views/js/jquery.ui.dialog.patch.js @@ -24,7 +24,7 @@ (function ($, undefined) { if ($.ui && $.ui.dialog && $.ui.dialog.overlay) { $.ui.dialog.overlay.events = $.map('focus,keydown,keypress'.split(','), - function(event) { + function (event) { return event + '.dialog-overlay'; }).join(' '); } diff --git a/drupal7/web/sites/all/modules/contrib/views/js/views-admin.js b/drupal7/web/sites/all/modules/contrib/views/js/views-admin.js index 661017e..0df462d 100644 --- a/drupal7/web/sites/all/modules/contrib/views/js/views-admin.js +++ b/drupal7/web/sites/all/modules/contrib/views/js/views-admin.js @@ -102,8 +102,12 @@ Drupal.viewsUi.FormFieldFiller = function ($target, exclude, replace, suffix) { // one bound version of an object method, whereas we need one version per // object instance. var self = this; - this.populate = function () {return self._populate.call(self);}; - this.unbind = function () {return self._unbind.call(self);}; + this.populate = function () { + return self._populate.call(self); + }; + this.unbind = function () { + return self._unbind.call(self); + }; this.bind(); // Object constructor; no return value. @@ -167,7 +171,7 @@ Drupal.behaviors.addItemForm.attach = function (context) { } } -Drupal.viewsUi.addItemForm = function($form) { +Drupal.viewsUi.addItemForm = function ($form) { this.$form = $form; this.$form.find('.views-filterable-options :checkbox').click(jQuery.proxy(this.handleCheck, this)); // Find the wrapper of the displayed text. @@ -208,7 +212,7 @@ Drupal.viewsUi.addItemForm.prototype.handleCheck = function (event) { /** * Refresh the display of the checked items. */ -Drupal.viewsUi.addItemForm.prototype.refreshCheckedItems = function() { +Drupal.viewsUi.addItemForm.prototype.refreshCheckedItems = function () { // Perhaps we should precache the text div, too. this.$selected_div.find('.views-selected-options').html(Drupal.checkPlain(this.checkedItems.join(', '))); Drupal.viewsUi.resizeModal('', true); @@ -310,7 +314,7 @@ Drupal.viewsUi.OptionsSearch = function ($form) { // Restripe on initial loading. this.handleKeyup(); // Trap the ENTER key in the search box so that it doesn't submit the form. - this.$searchBox.keypress(function(event) { + this.$searchBox.keypress(function (event) { if (event.which == 13) { event.preventDefault(); } @@ -764,23 +768,23 @@ Drupal.behaviors.viewsFilterConfigSelectAll = {}; /** * Add a select all checkbox, which checks each checkbox at once. */ -Drupal.behaviors.viewsFilterConfigSelectAll.attach = function(context) { +Drupal.behaviors.viewsFilterConfigSelectAll.attach = function (context) { var $ = jQuery; // Show the select all checkbox. - $('#views-ui-config-item-form div.form-item-options-value-all', context).once(function() { + $('#views-ui-config-item-form div.form-item-options-value-all', context).once(function () { $(this).show(); }) .find('input[type=checkbox]') - .click(function() { + .click(function () { var checked = $(this).is(':checked'); // Update all checkbox beside the select all checkbox. - $(this).parents('.form-checkboxes').find('input[type=checkbox]').each(function() { + $(this).parents('.form-checkboxes').find('input[type=checkbox]').each(function () { $(this).get(0).checked = true; }); }); // Uncheck the select all checkbox if any of the others are unchecked. - $('#views-ui-config-item-form div.form-type-checkbox').not($('.form-item-options-value-all')).find('input[type=checkbox]').each(function() { - $(this).click(function() { + $('#views-ui-config-item-form div.form-type-checkbox').not($('.form-item-options-value-all')).find('input[type=checkbox]').each(function () { + $(this).click(function () { if ($(this).is('checked') == 0 && $('#edit-options-value-all').length) { $('#edit-options-value-all').get(0).checked = false; } @@ -796,8 +800,8 @@ Drupal.behaviors.viewsFilterConfigSelectAll.attach = function(context) { Drupal.behaviors.viewsImplicitFormSubmission = {}; Drupal.behaviors.viewsImplicitFormSubmission.attach = function (context, settings) { var $ = jQuery; - $(':text, :password, :radio, :checkbox', context).once('viewsImplicitFormSubmission', function() { - $(this).keypress(function(event) { + $(':text, :password, :radio, :checkbox', context).once('viewsImplicitFormSubmission', function () { + $(this).keypress(function (event) { if (event.which == 13) { var formId = this.form.id; if (formId && settings.viewsImplicitFormSubmission && settings.viewsImplicitFormSubmission[formId] && settings.viewsImplicitFormSubmission[formId].defaultButton) { @@ -865,7 +869,7 @@ Drupal.behaviors.viewsUiChangeDefaultWidget.attach = function (context, settings } } // Update on widget change. - $('input[name="options[group_info][multiple]"]').change(function() { + $('input[name="options[group_info][multiple]"]').change(function () { change_default_widget($(this).get(0).checked); }); // Update the first time the form is rendered. @@ -905,18 +909,18 @@ Drupal.viewsUi.Checkboxifier.prototype.clickHandler = function (e) { Drupal.behaviors.viewsUiOverrideSelect = {}; Drupal.behaviors.viewsUiOverrideSelect.attach = function (context, settings) { var $ = jQuery; - $('#edit-override-dropdown', context).once('views-ui-override-button-text', function() { + $('#edit-override-dropdown', context).once('views-ui-override-button-text', function () { // Closures! :( var $submit = $('#edit-submit', context); var old_value = $submit.val(); $submit.once('views-ui-override-button-text') - .bind('mouseup', function() { + .bind('mouseup', function () { $(this).val(old_value); return true; }); - $(this).bind('change', function() { + $(this).bind('change', function () { if ($(this).val() == 'default') { $submit.val(Drupal.t('Apply (all displays)')); } @@ -968,7 +972,7 @@ Drupal.viewsUi.resizeModal = function (e, no_shrink) { scrollHeight += parseInt($scroll.css('padding-top')); scrollHeight += parseInt($scroll.css('padding-bottom')); - $scroll.children().each(function() { + $scroll.children().each(function () { var w = $(this).innerWidth(); if (w > width) { width = w; @@ -1023,7 +1027,7 @@ Drupal.viewsUi.resizeModal = function (e, no_shrink) { }; -jQuery(function() { +jQuery(function () { jQuery(window).bind('resize', Drupal.viewsUi.resizeModal); jQuery(window).bind('scroll', Drupal.viewsUi.resizeModal); }); diff --git a/drupal7/web/sites/all/modules/contrib/views/js/views-list.js b/drupal7/web/sites/all/modules/contrib/views/js/views-list.js index d7a274d..b5b050e 100644 --- a/drupal7/web/sites/all/modules/contrib/views/js/views-list.js +++ b/drupal7/web/sites/all/modules/contrib/views/js/views-list.js @@ -6,13 +6,13 @@ Drupal.behaviors.viewsUIList = { attach: function (context) { - $('#ctools-export-ui-list-items thead a').once('views-ajax-processed').each(function() { - $(this).click(function() { + $('#ctools-export-ui-list-items thead a').once('views-ajax-processed').each(function () { + $(this).click(function () { var query = $.deparam.querystring(this.href); $('#ctools-export-ui-list-form select[name=order]').val(query['order']); $('#ctools-export-ui-list-form select[name=sort]').val(query['sort']); $('#ctools-export-ui-list-form input.ctools-auto-submit-click').trigger('click'); - return false; + return FALSE; }); }); } diff --git a/drupal7/web/sites/all/modules/contrib/views/modules/aggregator.views.inc b/drupal7/web/sites/all/modules/contrib/views/modules/aggregator.views.inc index 54f2a40..c7083c7 100644 --- a/drupal7/web/sites/all/modules/contrib/views/modules/aggregator.views.inc +++ b/drupal7/web/sites/all/modules/contrib/views/modules/aggregator.views.inc @@ -15,7 +15,7 @@ function aggregator_views_data() { // Main Aggregator Item base table. // Define the base group of this table. Fields that don't have a group // defined will go into this field by default. - $data['aggregator_item']['table']['group'] = t('Aggregator'); + $data['aggregator_item']['table']['group'] = t('Aggregator'); // Advertise this table as a possible base table. $data['aggregator_item']['table']['base'] = array( @@ -28,9 +28,9 @@ function aggregator_views_data() { // Fields // Item ID / 'iid'. $data['aggregator_item']['iid'] = array( - // The item it appears as on the UI, + // The item it appears as on the UI. 'title' => t('Item ID'), - // The help that appears on the UI, + // The help that appears on the UI. 'help' => t('The unique ID of the aggregator item.'), // Information for displaying the iid. 'field' => array( @@ -56,7 +56,7 @@ function aggregator_views_data() { // Title. $data['aggregator_item']['title'] = array( - // The item it appears as on the UI, + // The item it appears as on the UI. 'title' => t('Title'), 'help' => t('The title of the aggregator item.'), // Information for displaying a title as a field. @@ -76,7 +76,7 @@ function aggregator_views_data() { // Link. $data['aggregator_item']['link'] = array( - // The item it appears as on the UI, + // The item it appears as on the UI. 'title' => t('Link'), 'help' => t('The link to the original source URL of the item.'), 'field' => array( @@ -94,7 +94,7 @@ function aggregator_views_data() { // Author. $data['aggregator_item']['author'] = array( - // The item it appears as on the UI, + // The item it appears as on the UI. 'title' => t('Author'), 'help' => t('The author of the original imported item.'), // Information for displaying a title as a field. @@ -116,7 +116,7 @@ function aggregator_views_data() { // 'guid'. $data['aggregator_item']['guid'] = array( - // The item it appears as on the UI, + // The item it appears as on the UI. 'title' => t('GUID'), 'help' => t('The guid of the original imported item.'), // Information for displaying a title as a field. @@ -138,7 +138,7 @@ function aggregator_views_data() { // Feed body. $data['aggregator_item']['description'] = array( - // The item it appears as on the UI, + // The item it appears as on the UI. 'title' => t('Body'), 'help' => t('The actual content of the imported item.'), // Information for displaying a title as a field. @@ -154,7 +154,7 @@ function aggregator_views_data() { // Item timestamp. $data['aggregator_item']['timestamp'] = array( - // The item it appears as on the UI, + // The item it appears as on the UI. 'title' => t('Timestamp'), 'help' => t('The date the original feed item was posted. (With some feeds, this will be the date it was imported.)'), // Information for displaying a title as a field. @@ -176,7 +176,7 @@ function aggregator_views_data() { // ---------------------------------------------------------------------- // Aggregator feed table. - $data['aggregator_feed']['table']['group'] = t('Aggregator feed'); + $data['aggregator_feed']['table']['group'] = t('Aggregator feed'); // Explain how this table joins to others. $data['aggregator_feed']['table']['join'] = array( @@ -188,9 +188,9 @@ function aggregator_views_data() { // Feed ID / 'fid'. $data['aggregator_feed']['fid'] = array( - // The item it appears as on the UI, + // The item it appears as on the UI. 'title' => t('Feed ID'), - // The help that appears on the UI, + // The help that appears on the UI. 'help' => t('The unique ID of the aggregator feed.'), // Information for displaying the fid. 'field' => array( @@ -216,9 +216,9 @@ function aggregator_views_data() { // Title. $data['aggregator_feed']['title'] = array( - // The item it appears as on the UI, + // The item it appears as on the UI. 'title' => t('Title'), - // The help that appears on the UI, + // The help that appears on the UI. 'help' => t('The title of the aggregator feed.'), // Information for displaying a title as a field. 'field' => array( @@ -240,7 +240,7 @@ function aggregator_views_data() { // Link. $data['aggregator_feed']['link'] = array( - // The item it appears as on the UI, + // The item it appears as on the UI. 'title' => t('Link'), 'help' => t('The link to the source URL of the feed.'), // Information for displaying a title as a field. @@ -258,7 +258,7 @@ function aggregator_views_data() { // Feed last updated. $data['aggregator_feed']['checked'] = array( - // The item it appears as on the UI, + // The item it appears as on the UI. 'title' => t('Last checked'), 'help' => t('The date the feed was last checked for new content.'), // Information for displaying a title as a field. @@ -279,7 +279,7 @@ function aggregator_views_data() { // Feed description. $data['aggregator_feed']['description'] = array( - // The item it appears as on the UI, + // The item it appears as on the UI. 'title' => t('Description'), 'help' => t('The description of the aggregator feed.'), // Information for displaying a title as a field. @@ -294,7 +294,7 @@ function aggregator_views_data() { // Feed last updated. $data['aggregator_feed']['modified'] = array( - // The item it appears as on the UI, + // The item it appears as on the UI. 'title' => t('Last modified'), 'help' => t('The date of the most recent new content on the feed.'), // Information for displaying a title as a field. diff --git a/drupal7/web/sites/all/modules/contrib/views/modules/aggregator/views_handler_argument_aggregator_iid.inc b/drupal7/web/sites/all/modules/contrib/views/modules/aggregator/views_handler_argument_aggregator_iid.inc index edae517..9290e93 100644 --- a/drupal7/web/sites/all/modules/contrib/views/modules/aggregator/views_handler_argument_aggregator_iid.inc +++ b/drupal7/web/sites/all/modules/contrib/views/modules/aggregator/views_handler_argument_aggregator_iid.inc @@ -17,7 +17,6 @@ class views_handler_argument_aggregator_iid extends views_handler_argument_numer */ public function title_query() { $titles = array(); - $placeholders = implode(', ', array_fill(0, sizeof($this->value), '%d')); $result = db_select('aggregator_item', 'ai') ->condition('iid', $this->value, 'IN') diff --git a/drupal7/web/sites/all/modules/contrib/views/modules/aggregator/views_handler_field_aggregator_category.inc b/drupal7/web/sites/all/modules/contrib/views/modules/aggregator/views_handler_field_aggregator_category.inc index 0630d0d..59e639f 100644 --- a/drupal7/web/sites/all/modules/contrib/views/modules/aggregator/views_handler_field_aggregator_category.inc +++ b/drupal7/web/sites/all/modules/contrib/views/modules/aggregator/views_handler_field_aggregator_category.inc @@ -31,7 +31,7 @@ class views_handler_field_aggregator_category extends views_handler_field { } /** - * Provide link to category option + * Provide link to category option. */ public function options_form(&$form, &$form_state) { $form['link_to_category'] = array( diff --git a/drupal7/web/sites/all/modules/contrib/views/modules/aggregator/views_handler_filter_aggregator_category_cid.inc b/drupal7/web/sites/all/modules/contrib/views/modules/aggregator/views_handler_filter_aggregator_category_cid.inc index a8757a9..701fcd9 100644 --- a/drupal7/web/sites/all/modules/contrib/views/modules/aggregator/views_handler_filter_aggregator_category_cid.inc +++ b/drupal7/web/sites/all/modules/contrib/views/modules/aggregator/views_handler_filter_aggregator_category_cid.inc @@ -6,7 +6,7 @@ */ /** - * Filter by aggregator category cid + * Filter by aggregator category cid. * * @ingroup views_filter_handlers */ diff --git a/drupal7/web/sites/all/modules/contrib/views/modules/book.views.inc b/drupal7/web/sites/all/modules/contrib/views/modules/book.views.inc index 87d5be6..2e9986a 100644 --- a/drupal7/web/sites/all/modules/contrib/views/modules/book.views.inc +++ b/drupal7/web/sites/all/modules/contrib/views/modules/book.views.inc @@ -13,7 +13,7 @@ function book_views_data() { // ---------------------------------------------------------------------- // 'book' table. - $data['book']['table']['group'] = t('Book'); + $data['book']['table']['group'] = t('Book'); $data['book']['table']['join'] = array( 'node' => array( 'left_field' => 'nid', diff --git a/drupal7/web/sites/all/modules/contrib/views/modules/comment.views.inc b/drupal7/web/sites/all/modules/contrib/views/modules/comment.views.inc index 5cde8bc..1b5863d 100644 --- a/drupal7/web/sites/all/modules/contrib/views/modules/comment.views.inc +++ b/drupal7/web/sites/all/modules/contrib/views/modules/comment.views.inc @@ -16,7 +16,7 @@ function comment_views_data() { $data['comment']['comment']['field']['moved to'] = array('field_data_comment_body', 'comment_body'); // Define the base group of this table. Fields that don't have a group // defined will go into this field by default. - $data['comment']['table']['group'] = t('Comment'); + $data['comment']['table']['group'] = t('Comment'); $data['comment']['table']['base'] = array( 'field' => 'cid', @@ -460,7 +460,7 @@ function comment_views_data() { // ---------------------------------------------------------------------- // 'node_comment_statistics' table. // Define the group. - $data['node_comment_statistics']['table']['group'] = t('Content'); + $data['node_comment_statistics']['table']['group'] = t('Content'); // Joins. $data['node_comment_statistics']['table']['join'] = array( @@ -705,11 +705,12 @@ function template_preprocess_views_view_row_comment(&$vars) { // array; there is no way to avoid building them in the first place. // @see comment_build_content() if (empty($options['links'])) { - foreach ($build as $cid => &$comment_build) { + foreach ($build as &$comment_build) { if (isset($comment_build['links'])) { unset($comment_build['links']); } } + unset($comment_build); } $vars['comment'] = drupal_render($build); } diff --git a/drupal7/web/sites/all/modules/contrib/views/modules/comment/views_handler_field_comment_node_link.inc b/drupal7/web/sites/all/modules/contrib/views/modules/comment/views_handler_field_comment_node_link.inc index 0e5ab6d..b62f5c8 100644 --- a/drupal7/web/sites/all/modules/contrib/views/modules/comment/views_handler_field_comment_node_link.inc +++ b/drupal7/web/sites/all/modules/contrib/views/modules/comment/views_handler_field_comment_node_link.inc @@ -76,7 +76,6 @@ class views_handler_field_comment_node_link extends views_handler_field_entity { // drupal_alter('link', $links, $node); // Might this have unexpected consequences if these hooks expect items in // $node that we don't have? - // Only render the links, if they are defined. return !empty($node->content['links']['comment']) ? drupal_render($node->content['links']['comment']) : ''; } diff --git a/drupal7/web/sites/all/modules/contrib/views/modules/comment/views_handler_field_comment_username.inc b/drupal7/web/sites/all/modules/contrib/views/modules/comment/views_handler_field_comment_username.inc index 7198d26..2d90840 100644 --- a/drupal7/web/sites/all/modules/contrib/views/modules/comment/views_handler_field_comment_username.inc +++ b/drupal7/web/sites/all/modules/contrib/views/modules/comment/views_handler_field_comment_username.inc @@ -53,7 +53,7 @@ class views_handler_field_comment_username extends views_handler_field { $account->homepage = $this->get_value($values, 'homepage'); return theme('username', array( - 'account' => $account + 'account' => $account, )); } else { diff --git a/drupal7/web/sites/all/modules/contrib/views/modules/comment/views_handler_field_ncs_last_comment_name.inc b/drupal7/web/sites/all/modules/contrib/views/modules/comment/views_handler_field_ncs_last_comment_name.inc index f38d3eb..af9e4e1 100644 --- a/drupal7/web/sites/all/modules/contrib/views/modules/comment/views_handler_field_ncs_last_comment_name.inc +++ b/drupal7/web/sites/all/modules/contrib/views/modules/comment/views_handler_field_ncs_last_comment_name.inc @@ -55,7 +55,7 @@ class views_handler_field_ncs_last_comment_name extends views_handler_field { $account->name = $this->get_value($values); $account->uid = $values->{$this->uid}; return theme('username', array( - 'account' => $account + 'account' => $account, )); } else { diff --git a/drupal7/web/sites/all/modules/contrib/views/modules/comment/views_handler_field_node_comment.inc b/drupal7/web/sites/all/modules/contrib/views/modules/comment/views_handler_field_node_comment.inc index c76adbf..a7bf264 100644 --- a/drupal7/web/sites/all/modules/contrib/views/modules/comment/views_handler_field_node_comment.inc +++ b/drupal7/web/sites/all/modules/contrib/views/modules/comment/views_handler_field_node_comment.inc @@ -21,8 +21,10 @@ class views_handler_field_node_comment extends views_handler_field { case COMMENT_NODE_HIDDEN: default: return t('Hidden'); + case COMMENT_NODE_CLOSED: return t('Closed'); + case COMMENT_NODE_OPEN: return t('Open'); } diff --git a/drupal7/web/sites/all/modules/contrib/views/modules/comment/views_plugin_row_comment_rss.inc b/drupal7/web/sites/all/modules/contrib/views/modules/comment/views_plugin_row_comment_rss.inc index 33b6a40..9988f3f 100644 --- a/drupal7/web/sites/all/modules/contrib/views/modules/comment/views_plugin_row_comment_rss.inc +++ b/drupal7/web/sites/all/modules/contrib/views/modules/comment/views_plugin_row_comment_rss.inc @@ -13,16 +13,16 @@ class views_plugin_row_comment_rss extends views_plugin_row { /** * {@inheritdoc} */ - public $base_table = 'comment'; + public $base_table = 'comment'; - /** - * {@inheritdoc} - */ - public $base_field = 'cid'; + /** + * {@inheritdoc} + */ + public $base_field = 'cid'; - /** - * {@inheritdoc} - */ + /** + * {@inheritdoc} + */ public function option_definition() { $options = parent::option_definition(); @@ -67,12 +67,13 @@ class views_plugin_row_comment_rss extends views_plugin_row { $comment->depth = count(explode('.', $comment->thread)) - 1; $nids[] = $comment->nid; } + unset($comment); $this->nodes = node_load_multiple($nids); } /** - * Return the main options, which are shown in the summary title + * Return the main options, which are shown in the summary title. * * @see views_plugin_row_node_rss::options_form_summary_options() * @todo Maybe provide a views_plugin_row_rss_entity and reuse this method @@ -164,7 +165,7 @@ class views_plugin_row_comment_rss extends views_plugin_row { return theme($this->theme_functions(), array( 'view' => $this->view, 'options' => $this->options, - 'row' => $item + 'row' => $item, )); } diff --git a/drupal7/web/sites/all/modules/contrib/views/modules/comment/views_plugin_row_comment_view.inc b/drupal7/web/sites/all/modules/contrib/views/modules/comment/views_plugin_row_comment_view.inc index 3895e9c..3b54710 100644 --- a/drupal7/web/sites/all/modules/contrib/views/modules/comment/views_plugin_row_comment_view.inc +++ b/drupal7/web/sites/all/modules/contrib/views/modules/comment/views_plugin_row_comment_view.inc @@ -59,7 +59,7 @@ class views_plugin_row_comment_view extends views_plugin_row { '#options' => $options, '#title' => t('View mode'), '#default_value' => $this->options['view_mode'], - ); + ); $form['links'] = array( '#type' => 'checkbox', @@ -81,7 +81,7 @@ class views_plugin_row_comment_view extends views_plugin_row { } if (empty($options)) { $options = array( - 'full' => t('Full content') + 'full' => t('Full content'), ); } diff --git a/drupal7/web/sites/all/modules/contrib/views/modules/contact/views_handler_field_contact_link.inc b/drupal7/web/sites/all/modules/contrib/views/modules/contact/views_handler_field_contact_link.inc index c8db429..5614d35 100644 --- a/drupal7/web/sites/all/modules/contrib/views/modules/contact/views_handler_field_contact_link.inc +++ b/drupal7/web/sites/all/modules/contrib/views/modules/contact/views_handler_field_contact_link.inc @@ -36,7 +36,6 @@ class views_handler_field_contact_link extends views_handler_field_user_link { * {@inheritdoc} */ public function render_link($data, $values) { - global $user; $uid = $this->get_value($values, 'uid'); if (empty($uid)) { diff --git a/drupal7/web/sites/all/modules/contrib/views/modules/field.views.inc b/drupal7/web/sites/all/modules/contrib/views/modules/field.views.inc index af33a78..2daea6d 100644 --- a/drupal7/web/sites/all/modules/contrib/views/modules/field.views.inc +++ b/drupal7/web/sites/all/modules/contrib/views/modules/field.views.inc @@ -118,40 +118,40 @@ function field_views_field_default_views_data($field) { $group_name = count($field['bundles']) > 1 ? $translations['field'] : NULL; // Build the relationships between the field table and the entity tables. - foreach ($field['bundles'] as $entity => $bundles) { - $entity_info = entity_get_info($entity); + foreach ($field['bundles'] as $entity_type => $bundles) { + $entity_info = entity_get_info($entity_type); if (empty($entity_info)) { watchdog('views', 'Field %field_name refers to nonexistent entity type %type. You might want to remove this broken field instance. See documentation.', - array('%field_name' => $field['field_name'], '%type' => $entity), + array('%field_name' => $field['field_name'], '%type' => $entity_type), WATCHDOG_WARNING ); continue; } - $groups[$entity] = $entity_info['label']; + $groups[$entity_type] = $entity_info['label']; // Override Node to Content. - if ($groups[$entity] == $translations['node']) { - $groups[$entity] = $translations['content']; + if ($groups[$entity_type] == $translations['node']) { + $groups[$entity_type] = $translations['content']; } // If only one bundle use this as the default name. if (empty($group_name)) { - $group_name = $groups[$entity]; + $group_name = $groups[$entity_type]; } - $entity_tables[$entity_info['base table']] = $entity; - $current_tables[$entity] = $entity_info['base table']; + $entity_tables[$entity_info['base table']] = $entity_type; + $current_tables[$entity_type] = $entity_info['base table']; if (isset($entity_info['revision table'])) { - $entity_tables[$entity_info['revision table']] = $entity; - $revision_tables[$entity] = $entity_info['revision table']; + $entity_tables[$entity_info['revision table']] = $entity_type; + $revision_tables[$entity_type] = $entity_info['revision table']; } $data[$current_table]['table']['join'][$entity_info['base table']] = array( 'left_field' => $entity_info['entity keys']['id'], 'field' => 'entity_id', 'extra' => array( - array('field' => 'entity_type', 'value' => $entity), + array('field' => 'entity_type', 'value' => $entity_type), array('field' => 'deleted', 'value' => 0, 'numeric' => TRUE), ), ); @@ -161,7 +161,7 @@ function field_views_field_default_views_data($field) { 'left_field' => $entity_info['entity keys']['revision'], 'field' => 'revision_id', 'extra' => array( - array('field' => 'entity_type', 'value' => $entity), + array('field' => 'entity_type', 'value' => $entity_type), array('field' => 'deleted', 'value' => 0, 'numeric' => TRUE), ), ); @@ -170,7 +170,10 @@ function field_views_field_default_views_data($field) { } foreach ($bundles as $bundle) { - $bundles_names[] = t('@entity:@bundle', array('@entity' => $entity, '@bundle' => $bundle)); + $bundles_names[] = t( + '@entity:@bundle', + array('@entity' => $entity_type, '@bundle' => $bundle) + ); } } diff --git a/drupal7/web/sites/all/modules/contrib/views/modules/field/views_handler_argument_field_list.inc b/drupal7/web/sites/all/modules/contrib/views/modules/field/views_handler_argument_field_list.inc index 5ae0d43..b2a1074 100644 --- a/drupal7/web/sites/all/modules/contrib/views/modules/field/views_handler_argument_field_list.inc +++ b/drupal7/web/sites/all/modules/contrib/views/modules/field/views_handler_argument_field_list.inc @@ -58,11 +58,11 @@ class views_handler_argument_field_list extends views_handler_argument_numeric { */ public function summary_name($data) { $value = $data->{$this->name_alias}; - // If the list element has a human readable name show it, + // If the list element has a human readable name then show it. if (isset($this->allowed_values[$value]) && !empty($this->options['summary']['human'])) { return field_filter_xss($this->allowed_values[$value]); } - // Else fallback to the key. + // Otherwise, fallback to the key. else { return check_plain($value); } diff --git a/drupal7/web/sites/all/modules/contrib/views/modules/field/views_handler_argument_field_list_string.inc b/drupal7/web/sites/all/modules/contrib/views/modules/field/views_handler_argument_field_list_string.inc index fae7094..e1ca289 100644 --- a/drupal7/web/sites/all/modules/contrib/views/modules/field/views_handler_argument_field_list_string.inc +++ b/drupal7/web/sites/all/modules/contrib/views/modules/field/views_handler_argument_field_list_string.inc @@ -59,11 +59,11 @@ class views_handler_argument_field_list_string extends views_handler_argument_st */ public function summary_name($data) { $value = $data->{$this->name_alias}; - // If the list element has a human readable name show it, + // If the list element has a human readable name then show it. if (isset($this->allowed_values[$value]) && !empty($this->options['summary']['human'])) { return $this->case_transform(field_filter_xss($this->allowed_values[$value]), $this->options['case']); } - // Else fallback to the key. + // Otherwise, fallback to the key. else { return $this->case_transform(check_plain($value), $this->options['case']); } diff --git a/drupal7/web/sites/all/modules/contrib/views/modules/field/views_handler_field_field.inc b/drupal7/web/sites/all/modules/contrib/views/modules/field/views_handler_field_field.inc index da31604..434810f 100644 --- a/drupal7/web/sites/all/modules/contrib/views/modules/field/views_handler_field_field.inc +++ b/drupal7/web/sites/all/modules/contrib/views/modules/field/views_handler_field_field.inc @@ -340,7 +340,7 @@ class views_handler_field_field extends views_handler_field { public function option_definition() { $options = parent::option_definition(); - // option_definition runs before init/construct, so no $this->field_info + // option_definition runs before init/construct, so no $this->field_info. $field = field_info_field($this->definition['field_name']); $field_type = field_info_field_types($field['type']); $column_names = array_keys($field['columns']); @@ -656,7 +656,6 @@ class views_handler_field_field extends views_handler_field { if (!empty($values)) { // Divide the entity ids by entity type, so they can be loaded in bulk. $entities_by_type = array(); - $revisions_by_type = array(); foreach ($values as $key => $object) { if (isset($this->aliases['entity_type']) && isset($object->{$this->aliases['entity_type']}) && isset($object->{$this->field_alias}) && !isset($values[$key]->_field_data[$this->field_alias])) { $entity_type = $object->{$this->aliases['entity_type']}; @@ -710,6 +709,7 @@ class views_handler_field_field extends views_handler_field { foreach ($values as $row_id => &$value) { $value->{'field_' . $this->options['id']} = $this->set_items($value, $row_id); } + unset($value); } } diff --git a/drupal7/web/sites/all/modules/contrib/views/modules/file.views.inc b/drupal7/web/sites/all/modules/contrib/views/modules/file.views.inc index 8556938..36f5ee7 100644 --- a/drupal7/web/sites/all/modules/contrib/views/modules/file.views.inc +++ b/drupal7/web/sites/all/modules/contrib/views/modules/file.views.inc @@ -41,7 +41,7 @@ function file_field_views_data_views_data_alter(&$data, $field) { $entity_info = entity_get_info($entity_type); $pseudo_field_name = 'reverse_' . $field['field_name'] . '_' . $entity_type; - list($label, $all_labels) = field_views_field_label($field['field_name']); + list($label) = field_views_field_label($field['field_name']); $entity = $entity_info['label']; if ($entity == t('Node')) { $entity = t('Content'); diff --git a/drupal7/web/sites/all/modules/contrib/views/modules/image.views.inc b/drupal7/web/sites/all/modules/contrib/views/modules/image.views.inc index 482ec10..69b1d6b 100644 --- a/drupal7/web/sites/all/modules/contrib/views/modules/image.views.inc +++ b/drupal7/web/sites/all/modules/contrib/views/modules/image.views.inc @@ -41,7 +41,7 @@ function image_field_views_data_views_data_alter(&$data, $field) { if (isset($entity_info)) { $pseudo_field_name = 'reverse_' . $field['field_name'] . '_' . $entity_type; - list($label, $all_labels) = field_views_field_label($field['field_name']); + list($label) = field_views_field_label($field['field_name']); $entity = $entity_info['label']; if ($entity == t('Node')) { $entity = t('Content'); diff --git a/drupal7/web/sites/all/modules/contrib/views/modules/locale.views.inc b/drupal7/web/sites/all/modules/contrib/views/modules/locale.views.inc index 3577e8c..6d50140 100644 --- a/drupal7/web/sites/all/modules/contrib/views/modules/locale.views.inc +++ b/drupal7/web/sites/all/modules/contrib/views/modules/locale.views.inc @@ -13,7 +13,7 @@ function locale_views_data() { // Basic table information. // Define the base group of this table. - $data['locales_source']['table']['group'] = t('Locale source'); + $data['locales_source']['table']['group'] = t('Locale source'); // Advertise this table as a possible base table. $data['locales_source']['table']['base'] = array( @@ -123,7 +123,7 @@ function locale_views_data() { // 'locales_target' table. // Define the base group of this table. Fields that don't have a group // defined will go into this field by default. - $data['locales_target']['table']['group'] = t('Locale target'); + $data['locales_target']['table']['group'] = t('Locale target'); // Join information. $data['locales_target']['table']['join'] = array( diff --git a/drupal7/web/sites/all/modules/contrib/views/modules/locale/views_handler_filter_locale_language.inc b/drupal7/web/sites/all/modules/contrib/views/modules/locale/views_handler_filter_locale_language.inc index 92d4bd8..e9c82b4 100644 --- a/drupal7/web/sites/all/modules/contrib/views/modules/locale/views_handler_filter_locale_language.inc +++ b/drupal7/web/sites/all/modules/contrib/views/modules/locale/views_handler_filter_locale_language.inc @@ -21,7 +21,7 @@ class views_handler_filter_locale_language extends views_handler_filter_in_opera $languages = array( '***CURRENT_LANGUAGE***' => t("Current user's language"), '***DEFAULT_LANGUAGE***' => t("Default site language"), - LANGUAGE_NONE => t('No language') + LANGUAGE_NONE => t('No language'), ); $languages = array_merge($languages, views_language_list()); $this->value_options = $languages; diff --git a/drupal7/web/sites/all/modules/contrib/views/modules/locale/views_handler_filter_node_language.inc b/drupal7/web/sites/all/modules/contrib/views/modules/locale/views_handler_filter_node_language.inc index ba6b670..cca099c 100644 --- a/drupal7/web/sites/all/modules/contrib/views/modules/locale/views_handler_filter_node_language.inc +++ b/drupal7/web/sites/all/modules/contrib/views/modules/locale/views_handler_filter_node_language.inc @@ -21,7 +21,7 @@ class views_handler_filter_node_language extends views_handler_filter_in_operato $languages = array( '***CURRENT_LANGUAGE***' => t("Current user's language"), '***DEFAULT_LANGUAGE***' => t("Default site language"), - LANGUAGE_NONE => t('No language') + LANGUAGE_NONE => t('No language'), ); $languages = array_merge($languages, views_language_list()); $this->value_options = $languages; diff --git a/drupal7/web/sites/all/modules/contrib/views/modules/locale/views_handler_sort_node_language.inc b/drupal7/web/sites/all/modules/contrib/views/modules/locale/views_handler_sort_node_language.inc index fa446a8..f75d0d3 100644 --- a/drupal7/web/sites/all/modules/contrib/views/modules/locale/views_handler_sort_node_language.inc +++ b/drupal7/web/sites/all/modules/contrib/views/modules/locale/views_handler_sort_node_language.inc @@ -44,7 +44,7 @@ class views_handler_sort_node_language extends views_handler_sort { $system_langcode = str_replace(array( '***CURRENT_LANGUAGE***', '***DEFAULT_LANGUAGE***', - ), + ), array( $language_content->language, $default_language, diff --git a/drupal7/web/sites/all/modules/contrib/views/modules/node.views.inc b/drupal7/web/sites/all/modules/contrib/views/modules/node.views.inc index 2eb351d..b8220ba 100644 --- a/drupal7/web/sites/all/modules/contrib/views/modules/node.views.inc +++ b/drupal7/web/sites/all/modules/contrib/views/modules/node.views.inc @@ -40,9 +40,9 @@ function node_views_data() { // 'node' table -- fields. // Node ID / 'nid'. $data['node']['nid'] = array( - // The item it appears as on the UI, + // The item it appears as on the UI. 'title' => t('Nid'), - // The help that appears on the UI, + // The help that appears on the UI. 'help' => t('The node ID.'), // Information for displaying the nid. 'field' => array( @@ -70,9 +70,9 @@ function node_views_data() { // Title. // This definition has more items in it than it needs to as an example. $data['node']['title'] = array( - // The item it appears as on the UI, + // The item it appears as on the UI. 'title' => t('Title'), - // The help that appears on the UI, + // The help that appears on the UI. 'help' => t('The content title.'), // Information for displaying a title as a field. 'field' => array( @@ -98,9 +98,9 @@ function node_views_data() { // Created field. $data['node']['created'] = array( - // The item it appears as on the UI, + // The item it appears as on the UI. 'title' => t('Post date'), - // The help that appears on the UI, + // The help that appears on the UI. 'help' => t('The date the content was posted.'), 'field' => array( 'handler' => 'views_handler_field_date', @@ -116,9 +116,9 @@ function node_views_data() { // Changed field. $data['node']['changed'] = array( - // The item it appears as on the UI, + // The item it appears as on the UI. 'title' => t('Updated date'), - // The help that appears on the UI, + // The help that appears on the UI. 'help' => t('The date the content was last updated.'), 'field' => array( 'handler' => 'views_handler_field_date', @@ -134,9 +134,9 @@ function node_views_data() { // Content type. $data['node']['type'] = array( - // The item it appears as on the UI, + // The item it appears as on the UI. 'title' => t('Type'), - // The help that appears on the UI, + // The help that appears on the UI. 'help' => t('The content type (for example, "blog entry", "forum post", "story", etc).'), 'field' => array( 'handler' => 'views_handler_field_node_type', @@ -210,9 +210,9 @@ function node_views_data() { // Sticky. $data['node']['sticky'] = array( - // The item it appears as on the UI, + // The item it appears as on the UI. 'title' => t('Sticky status'), - // The help that appears on the UI, + // The help that appears on the UI. 'help' => t('Whether or not the content is sticky.'), // Information for displaying a title as a field. 'field' => array( @@ -441,7 +441,7 @@ function node_views_data() { $data['node_revisions']['moved to'] = 'node_revision'; $data['node_revision']['table']['entity type'] = 'node'; $data['node_revision']['table']['revision'] = TRUE; - $data['node_revision']['table']['group'] = t('Content revision'); + $data['node_revision']['table']['group'] = t('Content revision'); // Support the conversion of the field body. $data['node_revisions']['body']['moved to'] = array('field_revision_data', 'body-revision_id'); @@ -549,9 +549,9 @@ function node_views_data() { // Title. $data['node_revision']['title'] = array( - // The item it appears as on the UI, + // The item it appears as on the UI. 'title' => t('Title'), - // The help that appears on the UI, + // The help that appears on the UI. 'help' => t('The content title.'), // Information for displaying a title as a field. 'field' => array( @@ -573,9 +573,9 @@ function node_views_data() { // Log field. $data['node_revision']['log'] = array( - // The item it appears as on the UI, + // The item it appears as on the UI. 'title' => t('Log message'), - // The help that appears on the UI, + // The help that appears on the UI. 'help' => t('The log message entered when the revision was created.'), // Information for displaying a title as a field. 'field' => array( @@ -588,9 +588,9 @@ function node_views_data() { // Revision timestamp / 'changed' field. $data['node_revision']['timestamp'] = array( - // The item it appears as on the UI, + // The item it appears as on the UI. 'title' => t('Updated date'), - // The help that appears on the UI, + // The help that appears on the UI. 'help' => t('The date the node was last updated.'), 'field' => array( 'handler' => 'views_handler_field_date', @@ -632,7 +632,7 @@ function node_views_data() { // Node access table. // Define the base group of this table. Fields that don't have a group // defined will go into this field by default. - $data['node_access']['table']['group'] = t('Content access'); + $data['node_access']['table']['group'] = t('Content access'); // For other base tables, explain how we join. $data['node_access']['table']['join'] = array( @@ -658,7 +658,7 @@ function node_views_data() { // it so that we can later add the real table for other purposes if we need // it. $data['history_user']['moved to'] = 'history'; - $data['history']['table']['group'] = t('Content'); + $data['history']['table']['group'] = t('Content'); // Explain how this table joins to others. $data['history']['table']['join'] = array( @@ -775,7 +775,7 @@ function node_views_analyze($view) { $ret = array(); // Check for something other than the default display. if ($view->base_table == 'node') { - foreach ($view->display as $id => $display) { + foreach ($view->display as $display) { if (empty($display->handler)) { continue; } @@ -809,7 +809,7 @@ function node_views_analyze($view) { } } } - foreach ($view->display as $id => $display) { + foreach ($view->display as $display) { if ($display->display_plugin == 'page') { if ($display->handler->get_option('path') == 'node/%') { $ret[] = views_ui_analysis(t('Display %display has set node/% as path. This will not produce what you want. If you want to have multiple versions of the node view, use panels.', array('%display' => $display->display_title)), 'warning'); diff --git a/drupal7/web/sites/all/modules/contrib/views/modules/node/views_handler_argument_dates_various.inc b/drupal7/web/sites/all/modules/contrib/views/modules/node/views_handler_argument_dates_various.inc index d80efb5..42550c6 100644 --- a/drupal7/web/sites/all/modules/contrib/views/modules/node/views_handler_argument_dates_various.inc +++ b/drupal7/web/sites/all/modules/contrib/views/modules/node/views_handler_argument_dates_various.inc @@ -72,7 +72,7 @@ class views_handler_argument_node_created_year_month extends views_handler_argum } /** - * Provide a link to the next level of the view + * Provide a link to the next level of the view. */ public function summary_name($data) { $created = $data->{$this->name_alias}; @@ -80,7 +80,7 @@ class views_handler_argument_node_created_year_month extends views_handler_argum } /** - * Provide a link to the next level of the view + * Provide a link to the next level of the view. */ public function title() { $timestamp = strtotime($this->argument . "15" . " 00:00:00 UTC"); @@ -107,15 +107,15 @@ class views_handler_argument_node_created_month extends views_handler_argument_d } /** - * Provide a link to the next level of the view + * Provide a link to the next level of the view. */ public function summary_name($data) { $month = str_pad($data->{$this->name_alias}, 2, '0', STR_PAD_LEFT); - return format_date(strtotime("2005" . $month . "15" . " 00:00:00 UTC" ), 'custom', $this->format, 'UTC'); + return format_date(strtotime("2005" . $month . "15" . " 00:00:00 UTC"), 'custom', $this->format, 'UTC'); } /** - * Provide a link to the next level of the view + * Provide a link to the next level of the view. */ public function title() { $month = str_pad($this->argument, 2, '0', STR_PAD_LEFT); diff --git a/drupal7/web/sites/all/modules/contrib/views/modules/node/views_handler_filter_node_version_count.inc b/drupal7/web/sites/all/modules/contrib/views/modules/node/views_handler_filter_node_version_count.inc index 3fb7314..016e6e5 100644 --- a/drupal7/web/sites/all/modules/contrib/views/modules/node/views_handler_filter_node_version_count.inc +++ b/drupal7/web/sites/all/modules/contrib/views/modules/node/views_handler_filter_node_version_count.inc @@ -35,13 +35,6 @@ class views_handler_filter_node_version_count extends views_handler_filter_numer * {@inheritdoc} */ public function op_empty($field) { - if ($this->operator == 'empty') { - $operator = "IS NULL"; - } - else { - $operator = "IS NOT NULL"; - } - $this->query->add_where_expression($this->options['group'], '(SELECT COUNT(vid) FROM {node_revision} WHERE nid = {' . $this->table_alias . '}.nid) ' . $this->operator); } diff --git a/drupal7/web/sites/all/modules/contrib/views/modules/node/views_plugin_argument_validate_node.inc b/drupal7/web/sites/all/modules/contrib/views/modules/node/views_plugin_argument_validate_node.inc index 5fedbab..a9a39c5 100644 --- a/drupal7/web/sites/all/modules/contrib/views/modules/node/views_plugin_argument_validate_node.inc +++ b/drupal7/web/sites/all/modules/contrib/views/modules/node/views_plugin_argument_validate_node.inc @@ -116,7 +116,8 @@ class views_plugin_argument_validate_node extends views_plugin_argument_validate } return isset($types[$node->type]); - break; + + break; case 'nids': $nids = new stdClass(); diff --git a/drupal7/web/sites/all/modules/contrib/views/modules/poll.views.inc b/drupal7/web/sites/all/modules/contrib/views/modules/poll.views.inc index 58f3b66..3c02db1 100644 --- a/drupal7/web/sites/all/modules/contrib/views/modules/poll.views.inc +++ b/drupal7/web/sites/all/modules/contrib/views/modules/poll.views.inc @@ -12,7 +12,7 @@ */ function poll_views_data() { // Basic table information. - $data['poll']['table']['group'] = t('Poll'); + $data['poll']['table']['group'] = t('Poll'); // Join to 'node' as a base table. $data['poll']['table']['join'] = array( diff --git a/drupal7/web/sites/all/modules/contrib/views/modules/profile.views.inc b/drupal7/web/sites/all/modules/contrib/views/modules/profile.views.inc index 96fa227..baaa250 100644 --- a/drupal7/web/sites/all/modules/contrib/views/modules/profile.views.inc +++ b/drupal7/web/sites/all/modules/contrib/views/modules/profile.views.inc @@ -14,7 +14,7 @@ function profile_views_data() { $data['profile_values']['moved to'] = 'profile_value'; // Define the base group of this table. Fields that don't have a group // defined will go into this field by default. - $data['profile_value']['table']['group'] = t('Profile'); + $data['profile_value']['table']['group'] = t('Profile'); $data['profile_value']['table']['join'] = array( 'node' => array( @@ -72,13 +72,13 @@ function profile_views_get_fields() { foreach ($results as $row) { if (!empty($row->options)) { if (!in_array(substr($row->options, 0, 2), array('a:', 'b:', 'i:', 'f:', 'o:', 's:'))) { - // unserialized fields default version. + // Unserialized fields default version. $options = $row->options; unset($row->options); $row->options = $options; } else { - // serialized fields or modified version. + // Serialized fields or modified version. $row->options = unserialize($row->options); } } @@ -88,7 +88,6 @@ function profile_views_get_fields() { return $fields; } - /** * Add profile fields to view table. */ diff --git a/drupal7/web/sites/all/modules/contrib/views/modules/profile/views_handler_field_profile_date.inc b/drupal7/web/sites/all/modules/contrib/views/modules/profile/views_handler_field_profile_date.inc index 89b099e..845bcb8 100644 --- a/drupal7/web/sites/all/modules/contrib/views/modules/profile/views_handler_field_profile_date.inc +++ b/drupal7/web/sites/all/modules/contrib/views/modules/profile/views_handler_field_profile_date.inc @@ -20,7 +20,7 @@ class views_handler_field_profile_date extends views_handler_field_date { */ public function options_form(&$form, &$form_state) { parent::options_form($form, $form_state); - // we can't do "time ago" so remove it from the form. + // We can't do "time ago" so remove it from the form. unset($form['date_format']['#options']['time ago']); } @@ -76,7 +76,7 @@ class views_handler_field_profile_date extends views_handler_field_date { 'Y' => $value['year'], 'y' => substr($value['year'], 2, 2), - // kill time stuff. + // Kill time stuff. 'a' => NULL, 'A' => NULL, 'g' => NULL, diff --git a/drupal7/web/sites/all/modules/contrib/views/modules/search.views.inc b/drupal7/web/sites/all/modules/contrib/views/modules/search.views.inc index 09aad14..593cf45 100644 --- a/drupal7/web/sites/all/modules/contrib/views/modules/search.views.inc +++ b/drupal7/web/sites/all/modules/contrib/views/modules/search.views.inc @@ -14,7 +14,7 @@ function search_views_data() { // Basic table information. // Define the base group of this table. Fields that don't have a group // defined will go into this field by default. - $data['search_index']['table']['group'] = t('Search'); + $data['search_index']['table']['group'] = t('Search'); // For other base tables, explain how we join. $data['search_index']['table']['join'] = array( @@ -111,9 +111,9 @@ function search_views_data() { // Search filter. $data['search_index']['keys'] = array( - // The item it appears as on the UI, + // The item it appears as on the UI. 'title' => t('Search Terms'), - // The help that appears on the UI, + // The help that appears on the UI. 'help' => t('The terms to search for.'), // Information for searching terms using the full search syntax. 'filter' => array( diff --git a/drupal7/web/sites/all/modules/contrib/views/modules/search/views_handler_argument_search.inc b/drupal7/web/sites/all/modules/contrib/views/modules/search/views_handler_argument_search.inc index 1c2d8f6..536c6c1 100644 --- a/drupal7/web/sites/all/modules/contrib/views/modules/search/views_handler_argument_search.inc +++ b/drupal7/web/sites/all/modules/contrib/views/modules/search/views_handler_argument_search.inc @@ -16,7 +16,7 @@ class views_handler_argument_search extends views_handler_argument { * Take sure that parseSearchExpression is runned and everything is set up. * * @param string $input - * The search phrase which was input by the user. + * The search phrase which was input by the user. */ public function query_parse_search_expression($input) { if (!isset($this->search_query)) { @@ -78,6 +78,7 @@ class views_handler_argument_search extends views_handler_argument { $this->search_query->condition_replace_string('d.', "$search_dataset.", $condition); } } + unset($condition); $search_conditions =& $search_condition->conditions(); $search_conditions = array_merge($search_conditions, $condition_conditions); } diff --git a/drupal7/web/sites/all/modules/contrib/views/modules/search/views_handler_filter_search.inc b/drupal7/web/sites/all/modules/contrib/views/modules/search/views_handler_filter_search.inc index 178858b..24ed974 100644 --- a/drupal7/web/sites/all/modules/contrib/views/modules/search/views_handler_filter_search.inc +++ b/drupal7/web/sites/all/modules/contrib/views/modules/search/views_handler_filter_search.inc @@ -105,7 +105,7 @@ class views_handler_filter_search extends views_handler_filter { * Make sure that parseSearchExpression is run and everything is set up. * * @param string $input - * The search phrase which was input by the user. + * The search phrase which was input by the user. */ public function query_parse_search_expression($input) { if (!isset($this->search_query)) { @@ -177,6 +177,7 @@ class views_handler_filter_search extends views_handler_filter { $this->search_query->condition_replace_string('d.', "$search_dataset.", $condition); } } + unset($condition); $search_conditions =& $search_condition->conditions(); $search_conditions = array_merge($search_conditions, $condition_conditions); } @@ -253,6 +254,7 @@ class viewsSearchQuery extends SearchQuery { $this->condition_replace_string($search, $replace, $subcondition); } } + unset($subcondition); } else { $condition['field'] = str_replace($search, $replace, $condition['field']); diff --git a/drupal7/web/sites/all/modules/contrib/views/modules/statistics.views.inc b/drupal7/web/sites/all/modules/contrib/views/modules/statistics.views.inc index 3fe0a28..0facd68 100644 --- a/drupal7/web/sites/all/modules/contrib/views/modules/statistics.views.inc +++ b/drupal7/web/sites/all/modules/contrib/views/modules/statistics.views.inc @@ -14,7 +14,7 @@ function statistics_views_data() { // Basic table information. // ---------------------------------------------------------------- // 'node_counter' table. - $data['node_counter']['table']['group'] = t('Content statistics'); + $data['node_counter']['table']['group'] = t('Content statistics'); // Joins to the node table. $data['node_counter']['table']['join'] = array( @@ -77,7 +77,7 @@ function statistics_views_data() { // ---------------------------------------------------------------- // 'accesslog' table. - $data['accesslog']['table']['group'] = t('Access log'); + $data['accesslog']['table']['group'] = t('Access log'); // Advertise this table as a possible base table. $data['accesslog']['table']['base'] = array( diff --git a/drupal7/web/sites/all/modules/contrib/views/modules/system.views.inc b/drupal7/web/sites/all/modules/contrib/views/modules/system.views.inc index 058463b..5de9bcb 100644 --- a/drupal7/web/sites/all/modules/contrib/views/modules/system.views.inc +++ b/drupal7/web/sites/all/modules/contrib/views/modules/system.views.inc @@ -16,7 +16,7 @@ function system_views_data() { // ---------------------------------------------------------------------- // 'file_managed' table. $data['files']['moved to'] = 'file_managed'; - $data['file_managed']['table']['group'] = t('File'); + $data['file_managed']['table']['group'] = t('File'); // Advertise this table as a possible base table. $data['file_managed']['table']['base'] = array( @@ -40,7 +40,7 @@ function system_views_data() { 'argument' => array( 'handler' => 'views_handler_argument_file_fid', 'name field' => 'filename', - // the field to display in the summary. + // The field to display in the summary. 'numeric' => TRUE, ), 'filter' => array( @@ -181,7 +181,7 @@ function system_views_data() { // ---------------------------------------------------------------------- // file_usage table. - $data['file_usage']['table']['group'] = t('File Usage'); + $data['file_usage']['table']['group'] = t('File Usage'); // Provide field-type-things to several base tables; on the core files table // ("file_managed") so that we can create relationships from files to @@ -471,7 +471,7 @@ function system_views_data() { // ---------------------------------------------------------------------- // System table. - $data['system']['table']['group'] = t('System'); + $data['system']['table']['group'] = t('System'); // Advertise this table as a possible base table. $data['system']['table']['base'] = array( diff --git a/drupal7/web/sites/all/modules/contrib/views/modules/system/views_handler_argument_file_fid.inc b/drupal7/web/sites/all/modules/contrib/views/modules/system/views_handler_argument_file_fid.inc index 15860dc..3bc7911 100644 --- a/drupal7/web/sites/all/modules/contrib/views/modules/system/views_handler_argument_file_fid.inc +++ b/drupal7/web/sites/all/modules/contrib/views/modules/system/views_handler_argument_file_fid.inc @@ -24,6 +24,7 @@ class views_handler_argument_file_fid extends views_handler_argument_numeric { foreach ($titles as &$title) { $title = check_plain($title); } + unset($title); return $titles; } diff --git a/drupal7/web/sites/all/modules/contrib/views/modules/system/views_handler_field_file_filemime.inc b/drupal7/web/sites/all/modules/contrib/views/modules/system/views_handler_field_file_filemime.inc index 9648d0f..46282a9 100644 --- a/drupal7/web/sites/all/modules/contrib/views/modules/system/views_handler_field_file_filemime.inc +++ b/drupal7/web/sites/all/modules/contrib/views/modules/system/views_handler_field_file_filemime.inc @@ -33,9 +33,9 @@ class views_handler_field_file_filemime extends views_handler_field_file { parent::options_form($form, $form_state); } - /** - * {@inheritdoc} - */ + /** + * {@inheritdoc} + */ public function render($values) { $data = $values->{$this->field_alias}; if (!empty($this->options['filemime_image']) && $data !== NULL && $data !== '') { diff --git a/drupal7/web/sites/all/modules/contrib/views/modules/taxonomy.views.inc b/drupal7/web/sites/all/modules/contrib/views/modules/taxonomy.views.inc index 99c3b71..544cb7a 100644 --- a/drupal7/web/sites/all/modules/contrib/views/modules/taxonomy.views.inc +++ b/drupal7/web/sites/all/modules/contrib/views/modules/taxonomy.views.inc @@ -16,7 +16,7 @@ function taxonomy_views_data() { // ---------------------------------------------------------------------- // 'taxonomy_vocabulary' table. $data['vocabulary']['moved to'] = 'taxonomy_vocabulary'; - $data['taxonomy_vocabulary']['table']['group'] = t('Taxonomy vocabulary'); + $data['taxonomy_vocabulary']['table']['group'] = t('Taxonomy vocabulary'); $data['taxonomy_vocabulary']['table']['entity type'] = 'taxonomy_vocabulary'; $data['taxonomy_vocabulary']['table']['join'] = array( // Vocabulary links to taxonomy_term_data directly via vid. @@ -36,7 +36,7 @@ function taxonomy_views_data() { // Vocabulary name. $data['taxonomy_vocabulary']['name'] = array( - // The item it appears as on the UI, + // The item it appears as on the UI. 'title' => t('Name'), 'field' => array( 'help' => t('Name of the vocabulary a term is a member of. This will be the vocabulary that whichever term the "Taxonomy: Term" field is; and can similarly cause duplicates.'), @@ -49,7 +49,7 @@ function taxonomy_views_data() { ), ); $data['taxonomy_vocabulary']['machine_name'] = array( - // The item it appears as on the UI, + // The item it appears as on the UI. 'title' => t('Machine name'), 'field' => array( 'help' => t('Machine-Name of the vocabulary a term is a member of. This will be the vocabulary that whichever term the "Taxonomy: Term" field is; and can similarly cause duplicates.'), @@ -66,7 +66,7 @@ function taxonomy_views_data() { ), ); $data['taxonomy_vocabulary']['vid'] = array( - // The item it appears as on the UI, + // The item it appears as on the UI. 'title' => t('Vocabulary ID'), 'help' => t('The taxonomy vocabulary ID'), 'field' => array( @@ -82,7 +82,7 @@ function taxonomy_views_data() { ), ); $data['taxonomy_vocabulary']['description'] = array( - // The item it appears as on the UI, + // The item it appears as on the UI. 'title' => t('Description'), 'help' => t('The taxonomy vocabulary description'), 'field' => array( @@ -111,7 +111,7 @@ function taxonomy_views_data() { // ---------------------------------------------------------------------- // 'taxonomy_term_data' table. $data['term_data']['moved to'] = 'taxonomy_term_data'; - $data['taxonomy_term_data']['table']['group'] = t('Taxonomy term'); + $data['taxonomy_term_data']['table']['group'] = t('Taxonomy term'); $data['taxonomy_term_data']['table']['base'] = array( 'field' => 'tid', 'title' => t('Term'), @@ -268,7 +268,7 @@ function taxonomy_views_data() { // ---------------------------------------------------------------------- // 'taxonomy_index' table. $data['term_node']['moved to'] = 'taxonomy_index'; - $data['taxonomy_index']['table']['group'] = t('Taxonomy term'); + $data['taxonomy_index']['table']['group'] = t('Taxonomy term'); $data['taxonomy_index']['table']['join'] = array( 'taxonomy_term_data' => array( @@ -325,7 +325,7 @@ function taxonomy_views_data() { // ---------------------------------------------------------------------- // 'term_hierarchy' table. - $data['taxonomy_term_hierarchy']['table']['group'] = t('Taxonomy term'); + $data['taxonomy_term_hierarchy']['table']['group'] = t('Taxonomy term'); $data['term_hierarchy']['moved to'] = 'taxonomy_term_hierarchy'; $data['taxonomy_term_hierarchy']['table']['join'] = array( @@ -467,7 +467,7 @@ function taxonomy_field_views_data_views_data_alter(&$data, $field) { $entity_info = entity_get_info($entity_type); $pseudo_field_name = 'reverse_' . $field['field_name'] . '_' . $entity_type; - list($label, $all_labels) = field_views_field_label($field['field_name']); + list($label) = field_views_field_label($field['field_name']); $entity = $entity_info['label']; if ($entity == t('Node')) { $entity = t('Content'); diff --git a/drupal7/web/sites/all/modules/contrib/views/modules/taxonomy/views_handler_argument_term_node_tid_depth_join.inc b/drupal7/web/sites/all/modules/contrib/views/modules/taxonomy/views_handler_argument_term_node_tid_depth_join.inc index 607b9ea..8bfdd16 100644 --- a/drupal7/web/sites/all/modules/contrib/views/modules/taxonomy/views_handler_argument_term_node_tid_depth_join.inc +++ b/drupal7/web/sites/all/modules/contrib/views/modules/taxonomy/views_handler_argument_term_node_tid_depth_join.inc @@ -187,7 +187,6 @@ class views_handler_argument_term_node_tid_depth_join extends views_handler_argu 'operator' => $operator, ), ); - $taxonomy_index_alias = $this->query->add_relationship('taxonomy_index', $join, 'node'); // Distinct is required to prevent duplicate rows. $this->query->distinct = TRUE; diff --git a/drupal7/web/sites/all/modules/contrib/views/modules/taxonomy/views_handler_field_term_link_edit.inc b/drupal7/web/sites/all/modules/contrib/views/modules/taxonomy/views_handler_field_term_link_edit.inc index a026d3e..0ec296e 100644 --- a/drupal7/web/sites/all/modules/contrib/views/modules/taxonomy/views_handler_field_term_link_edit.inc +++ b/drupal7/web/sites/all/modules/contrib/views/modules/taxonomy/views_handler_field_term_link_edit.inc @@ -59,7 +59,7 @@ class views_handler_field_term_link_edit extends views_handler_field { /** * {@inheritdoc} */ - function render($values) { + public function render($values) { $value = $this->get_value($values, 'tid'); return $this->render_link($this->sanitize_value($value), $values); } @@ -67,7 +67,7 @@ class views_handler_field_term_link_edit extends views_handler_field { /** * {@inheritdoc} */ - function render_link($data, $values) { + public function render_link($data, $values) { // Mock a term object for taxonomy_term_edit_access(). Use machine name and // vid to ensure compatibility with vid based and machine name based // access checks. See http://drupal.org/node/995156 diff --git a/drupal7/web/sites/all/modules/contrib/views/modules/taxonomy/views_handler_filter_term_node_tid.inc b/drupal7/web/sites/all/modules/contrib/views/modules/taxonomy/views_handler_filter_term_node_tid.inc index 3909e21..d8b5de5 100644 --- a/drupal7/web/sites/all/modules/contrib/views/modules/taxonomy/views_handler_filter_term_node_tid.inc +++ b/drupal7/web/sites/all/modules/contrib/views/modules/taxonomy/views_handler_filter_term_node_tid.inc @@ -245,9 +245,8 @@ class views_handler_filter_term_node_tid extends views_handler_filter_many_to_on } } - if (empty($form_state['exposed'])) { - // Retain the helper option + // Retain the helper option. $this->helper->options_form($form, $form_state); // Show help text if not exposed to end users. @@ -288,7 +287,7 @@ class views_handler_filter_term_node_tid extends views_handler_filter_many_to_on } // If view is an attachment and is inheriting exposed filters, then assume - // exposed input has already been validated + // exposed input has already been validated. if (!empty($this->view->is_attachment) && $this->view->display_handler->uses_exposed()) { $this->validated_exposed_input = (array) $this->view->exposed_raw_input[$this->options['expose']['identifier']]; } @@ -401,7 +400,7 @@ class views_handler_filter_term_node_tid extends views_handler_filter_many_to_on * {@inheritdoc} */ public function value_submit($form, &$form_state) { - // prevent array_filter from messing up our arrays in parent submit. + // Prevent array_filter from messing up our arrays in parent submit. } /** @@ -423,7 +422,7 @@ class views_handler_filter_term_node_tid extends views_handler_filter_many_to_on * {@inheritdoc} */ public function admin_summary() { - // set up $this->value_options for the parent summary + // Set up $this->value_options for the parent summary. $this->value_options = array(); if ($this->value) { diff --git a/drupal7/web/sites/all/modules/contrib/views/modules/taxonomy/views_handler_filter_term_node_tid_depth_join.inc b/drupal7/web/sites/all/modules/contrib/views/modules/taxonomy/views_handler_filter_term_node_tid_depth_join.inc index 043db99..10df3de 100644 --- a/drupal7/web/sites/all/modules/contrib/views/modules/taxonomy/views_handler_filter_term_node_tid_depth_join.inc +++ b/drupal7/web/sites/all/modules/contrib/views/modules/taxonomy/views_handler_filter_term_node_tid_depth_join.inc @@ -153,7 +153,6 @@ class views_handler_filter_term_node_tid_depth_join extends views_handler_filter 'operator' => $operator, ), ); - $taxonomy_index_alias = $this->query->add_relationship('taxonomy_index', $join, 'node'); } } diff --git a/drupal7/web/sites/all/modules/contrib/views/modules/taxonomy/views_plugin_argument_default_taxonomy_tid.inc b/drupal7/web/sites/all/modules/contrib/views/modules/taxonomy/views_plugin_argument_default_taxonomy_tid.inc index 27a484b..8c22319 100644 --- a/drupal7/web/sites/all/modules/contrib/views/modules/taxonomy/views_plugin_argument_default_taxonomy_tid.inc +++ b/drupal7/web/sites/all/modules/contrib/views/modules/taxonomy/views_plugin_argument_default_taxonomy_tid.inc @@ -60,7 +60,7 @@ class views_plugin_argument_default_taxonomy_tid extends views_plugin_argument_d $form['limit'] = array( '#type' => 'checkbox', '#title' => t('Limit terms by vocabulary'), - '#default_value'=> $this->options['limit'], + '#default_value' => $this->options['limit'], '#process' => array('form_process_checkbox', 'ctools_dependent_process'), '#dependency' => array( 'edit-options-argument-default-taxonomy-tid-node' => array(1), @@ -90,7 +90,7 @@ class views_plugin_argument_default_taxonomy_tid extends views_plugin_argument_d $form['anyall'] = array( '#type' => 'radios', '#title' => t('Multiple-value handling'), - '#default_value'=> $this->options['anyall'], + '#default_value' => $this->options['anyall'], '#process' => array('form_process_radios', 'ctools_dependent_process'), '#options' => array( ',' => t('Filter to items that share all terms'), @@ -145,7 +145,7 @@ class views_plugin_argument_default_taxonomy_tid extends views_plugin_argument_d } if (!empty($this->options['limit'])) { $tids = array(); - // filter by vocabulary + // Filter by vocabulary. foreach ($taxonomy as $tid => $vocab) { if (!empty($this->options['vocabularies'][$vocab])) { $tids[] = $tid; diff --git a/drupal7/web/sites/all/modules/contrib/views/modules/taxonomy/views_plugin_argument_validate_taxonomy_term.inc b/drupal7/web/sites/all/modules/contrib/views/modules/taxonomy/views_plugin_argument_validate_taxonomy_term.inc index 7e7f2c1..2f9546b 100644 --- a/drupal7/web/sites/all/modules/contrib/views/modules/taxonomy/views_plugin_argument_validate_taxonomy_term.inc +++ b/drupal7/web/sites/all/modules/contrib/views/modules/taxonomy/views_plugin_argument_validate_taxonomy_term.inc @@ -155,7 +155,7 @@ class views_plugin_argument_validate_taxonomy_term extends views_plugin_argument } } - // if unverified tids left - verify them and cache results. + // If unverified tids left - verify them and cache results. if (count($test)) { $query = db_select('taxonomy_term_data', 'td'); $query->addTag('taxonomy_term_access'); diff --git a/drupal7/web/sites/all/modules/contrib/views/modules/translation/views_handler_field_node_link_translate.inc b/drupal7/web/sites/all/modules/contrib/views/modules/translation/views_handler_field_node_link_translate.inc index 257c3b8..e9332a6 100644 --- a/drupal7/web/sites/all/modules/contrib/views/modules/translation/views_handler_field_node_link_translate.inc +++ b/drupal7/web/sites/all/modules/contrib/views/modules/translation/views_handler_field_node_link_translate.inc @@ -16,10 +16,10 @@ class views_handler_field_node_link_translate extends views_handler_field_node_l * {@inheritdoc} */ public function render_link($data, $values) { - // ensure user has access to edit this node. + // Ensure user has access to edit this node. $node = $this->get_value($values); $node->status = 1; - // unpublished nodes ignore access control. + // Unpublished nodes ignore access control. if ($node->language == LANGUAGE_NONE || !translation_supported_type($node->type) || !node_access('view', $node) || !user_access('translate content')) { return; } diff --git a/drupal7/web/sites/all/modules/contrib/views/modules/translation/views_handler_relationship_translation.inc b/drupal7/web/sites/all/modules/contrib/views/modules/translation/views_handler_relationship_translation.inc index 88f373c..059deef 100644 --- a/drupal7/web/sites/all/modules/contrib/views/modules/translation/views_handler_relationship_translation.inc +++ b/drupal7/web/sites/all/modules/contrib/views/modules/translation/views_handler_relationship_translation.inc @@ -91,7 +91,7 @@ class views_handler_relationship_translation extends views_handler_relationship } if (!empty($def['join_handler']) && class_exists($def['join_handler'])) { - $join = new $def['join_handler']; + $join = new $def['join_handler'](); } else { $join = new views_join(); diff --git a/drupal7/web/sites/all/modules/contrib/views/modules/user.views.inc b/drupal7/web/sites/all/modules/contrib/views/modules/user.views.inc index d0c9773..cc79e59 100644 --- a/drupal7/web/sites/all/modules/contrib/views/modules/user.views.inc +++ b/drupal7/web/sites/all/modules/contrib/views/modules/user.views.inc @@ -15,7 +15,7 @@ function user_views_data() { // 'users' table. // Define the base group of this table. Fields that don't have a group // defined will go into this field by default. - $data['users']['table']['group'] = t('User'); + $data['users']['table']['group'] = t('User'); $data['users']['table']['base'] = array( 'field' => 'uid', @@ -42,9 +42,9 @@ function user_views_data() { // User ID / 'uid'. $data['users']['uid'] = array( - // The item it appears as on the UI, + // The item it appears as on the UI. 'title' => t('Uid'), - // The help that appears on the UI, + // The help that appears on the UI. 'help' => t('The user ID'), 'field' => array( 'handler' => 'views_handler_field_user', @@ -125,9 +125,9 @@ function user_views_data() { // User name. $data['users']['name'] = array( - // The item it appears as on the UI, + // The item it appears as on the UI. 'title' => t('Name'), - // The help that appears on the UI, + // The help that appears on the UI. 'help' => t('The user or author name.'), 'field' => array( 'handler' => 'views_handler_field_user_name', @@ -149,9 +149,9 @@ function user_views_data() { // Email address. // Note that this field implements field level access control. $data['users']['mail'] = array( - // The item it appears as on the UI, + // The item it appears as on the UI. 'title' => t('E-mail'), - // The help that appears on the UI, + // The help that appears on the UI. 'help' => t('E-mail address for a given user. This field is normally not shown to users, so be cautious when using it.'), 'field' => array( 'handler' => 'views_handler_field_user_mail', @@ -170,7 +170,7 @@ function user_views_data() { // Language. $data['users']['language'] = array( - // The item it appears as on the UI, + // The item it appears as on the UI. 'title' => t('Language'), 'help' => t('Language of the user'), 'field' => array( @@ -191,9 +191,9 @@ function user_views_data() { // Picture. $data['users']['picture_fid']['moved to'] = array('users', 'picture'); $data['users']['picture'] = array( - // The item it appears as on the UI, + // The item it appears as on the UI. 'title' => t('Picture'), - // The help that appears on the UI, + // The help that appears on the UI. 'help' => t("The user's picture, if allowed."), // Information for displaying the uid. 'field' => array( @@ -221,9 +221,9 @@ function user_views_data() { // Created field. $data['users']['created'] = array( - // The item it appears as on the UI, + // The item it appears as on the UI. 'title' => t('Created date'), - // The help that appears on the UI, + // The help that appears on the UI. 'help' => t('The date the user was created.'), 'field' => array( 'handler' => 'views_handler_field_date', @@ -296,9 +296,9 @@ function user_views_data() { if (db_field_exists('users', 'changed')) { // Changed field. $data['users']['changed'] = array( - // The item it appears as on the UI, + // The item it appears as on the UI. 'title' => t('Changed date'), - // The help that appears on the UI, + // The help that appears on the UI. 'help' => t('The date the user was changed.'), 'field' => array( 'handler' => 'views_handler_field_date', @@ -315,9 +315,9 @@ function user_views_data() { // Access field. $data['users']['access'] = array( - // The item it appears as on the UI, + // The item it appears as on the UI. 'title' => t('Last access'), - // The help that appears on the UI, + // The help that appears on the UI. 'help' => t("The user's last access date."), 'field' => array( 'handler' => 'views_handler_field_date', @@ -333,9 +333,9 @@ function user_views_data() { // Login field. $data['users']['login'] = array( - // The item it appears as on the UI, + // The item it appears as on the UI. 'title' => t('Last login'), - // The help that appears on the UI, + // The help that appears on the UI. 'help' => t("The user's last login date."), 'field' => array( 'handler' => 'views_handler_field_date', @@ -351,9 +351,9 @@ function user_views_data() { // Active status. $data['users']['status'] = array( - // The item it appears as on the UI, + // The item it appears as on the UI. 'title' => t('Active status'), - // The help that appears on the UI, + // The help that appears on the UI. 'help' => t('Whether a user is active or blocked.'), // Information for displaying a title as a field. 'field' => array( @@ -375,9 +375,9 @@ function user_views_data() { // Log field. $data['users']['signature'] = array( - // The item it appears as on the UI, + // The item it appears as on the UI. 'title' => t('Signature'), - // The help that appears on the UI, + // The help that appears on the UI. 'help' => t("The user's signature."), // Information for displaying a title as a field. 'field' => array( @@ -415,7 +415,7 @@ function user_views_data() { // ---------------------------------------------------------------------- // 'users_roles' table. - $data['users_roles']['table']['group'] = t('User'); + $data['users_roles']['table']['group'] = t('User'); // Explain how this table joins to others. $data['users_roles']['table']['join'] = array( @@ -487,7 +487,7 @@ function user_views_data() { ); // 'permission' table. - $data['role_permission']['table']['group'] = t('User'); + $data['role_permission']['table']['group'] = t('User'); $data['role_permission']['table']['join'] = array( // Directly links to users table. 'users' => array( @@ -511,7 +511,7 @@ function user_views_data() { // ---------------------------------------------------------------------- // 'authmap' table. - $data['authmap']['table']['group'] = t('User'); + $data['authmap']['table']['group'] = t('User'); $data['authmap']['table']['join'] = array( // Directly links to users table. 'users' => array( diff --git a/drupal7/web/sites/all/modules/contrib/views/modules/user/views_handler_argument_user_uid.inc b/drupal7/web/sites/all/modules/contrib/views/modules/user/views_handler_argument_user_uid.inc index 8cf20d9..73ab1f5 100644 --- a/drupal7/web/sites/all/modules/contrib/views/modules/user/views_handler_argument_user_uid.inc +++ b/drupal7/web/sites/all/modules/contrib/views/modules/user/views_handler_argument_user_uid.inc @@ -16,7 +16,7 @@ class views_handler_argument_user_uid extends views_handler_argument_numeric { * Override the behavior of title(). Get the name of the user. * * @return array - * A list of usernames. + * A list of usernames. */ public function title_query() { if (!$this->argument) { diff --git a/drupal7/web/sites/all/modules/contrib/views/modules/user/views_handler_field_user_permissions.inc b/drupal7/web/sites/all/modules/contrib/views/modules/user/views_handler_field_user_permissions.inc index 1bf2934..28f112c 100644 --- a/drupal7/web/sites/all/modules/contrib/views/modules/user/views_handler_field_user_permissions.inc +++ b/drupal7/web/sites/all/modules/contrib/views/modules/user/views_handler_field_user_permissions.inc @@ -70,17 +70,20 @@ class views_handler_field_user_permissions extends views_handler_field_prerender /** * */ + // @code // function document_self_tokens(&$tokens) { // $tokens['[' . $this->options['id'] . '-role' . ']'] = t('The name of the role.'); // $tokens['[' . $this->options['id'] . '-rid' . ']'] = t('The role ID of the role.'); // } + // @endcode /** * */ + // @code // function add_self_tokens(&$tokens, $item) { // $tokens['[' . $this->options['id'] . '-role' . ']'] = $item['role']; // $tokens['[' . $this->options['id'] . '-rid' . ']'] = $item['rid']; // } - + // @endcode } diff --git a/drupal7/web/sites/all/modules/contrib/views/modules/user/views_handler_field_user_roles.inc b/drupal7/web/sites/all/modules/contrib/views/modules/user/views_handler_field_user_roles.inc index 8d9eb32..6794ddc 100644 --- a/drupal7/web/sites/all/modules/contrib/views/modules/user/views_handler_field_user_roles.inc +++ b/drupal7/web/sites/all/modules/contrib/views/modules/user/views_handler_field_user_roles.inc @@ -20,14 +20,20 @@ class views_handler_field_user_roles extends views_handler_field_prerender_list $this->additional_fields['uid'] = array('table' => 'users', 'field' => 'uid'); } - function option_definition() { + /** + * + */ + public function option_definition() { $options = parent::option_definition(); $options['display_roles'] = array('default' => array()); return $options; } - function options_form(&$form, &$form_state) { + /** + * + */ + public function options_form(&$form, &$form_state) { $roles = user_roles(TRUE); unset($roles[DRUPAL_AUTHENTICATED_RID]); if (!empty($roles)) { diff --git a/drupal7/web/sites/all/modules/contrib/views/modules/user/views_handler_filter_user_name.inc b/drupal7/web/sites/all/modules/contrib/views/modules/user/views_handler_filter_user_name.inc index d89f461..8f2abd4 100644 --- a/drupal7/web/sites/all/modules/contrib/views/modules/user/views_handler_filter_user_name.inc +++ b/drupal7/web/sites/all/modules/contrib/views/modules/user/views_handler_filter_user_name.inc @@ -121,9 +121,7 @@ class views_handler_filter_user_name extends views_handler_filter_in_operator { */ public function validate_user_strings(&$form, $values) { $uids = array(); - $placeholders = array(); $args = array(); - $results = array(); foreach ($values as $value) { if (strtolower($value) == 'anonymous') { $uids[] = 0; @@ -131,7 +129,6 @@ class views_handler_filter_user_name extends views_handler_filter_in_operator { else { $missing[strtolower($value)] = TRUE; $args[] = $value; - $placeholders[] = "'%s'"; } } @@ -139,6 +136,7 @@ class views_handler_filter_user_name extends views_handler_filter_in_operator { return $uids; } + $missing = array(); $result = db_query("SELECT * FROM {users} WHERE name IN (:names)", array(':names' => $args)); foreach ($result as $account) { unset($missing[strtolower($account->name)]); diff --git a/drupal7/web/sites/all/modules/contrib/views/modules/user/views_plugin_row_user_view.inc b/drupal7/web/sites/all/modules/contrib/views/modules/user/views_plugin_row_user_view.inc index 3ce818a..632d0e6 100644 --- a/drupal7/web/sites/all/modules/contrib/views/modules/user/views_plugin_row_user_view.inc +++ b/drupal7/web/sites/all/modules/contrib/views/modules/user/views_plugin_row_user_view.inc @@ -22,7 +22,9 @@ class views_plugin_row_user_view extends views_plugin_row { */ public $base_field = 'uid'; - // Store the users to be used for pre_render. + /** + * Store the users to be used for pre_render. + */ public $users = array(); /** diff --git a/drupal7/web/sites/all/modules/contrib/views/plugins/export_ui/views_ui.class.php b/drupal7/web/sites/all/modules/contrib/views/plugins/export_ui/views_ui.class.php index e993633..46ad825 100644 --- a/drupal7/web/sites/all/modules/contrib/views/plugins/export_ui/views_ui.class.php +++ b/drupal7/web/sites/all/modules/contrib/views/plugins/export_ui/views_ui.class.php @@ -16,7 +16,7 @@ class views_ui extends ctools_export_ui { /** * */ - function init($plugin) { + public function init($plugin) { // We modify the plugin info here so that we take the defaults and twiddle, // rather than completely override them. // Reset the edit path to match what we're really using. @@ -50,7 +50,7 @@ class views_ui extends ctools_export_ui { /** * */ - function hook_menu(&$items) { + public function hook_menu(&$items) { // We are using our own 'edit' still, rather than having edit on this // object (maybe in the future) so unset the edit callbacks. Store this so // we can put them back as sometimes they're needed again laster. @@ -70,14 +70,14 @@ class views_ui extends ctools_export_ui { /** * */ - function load_item($item_name) { + public function load_item($item_name) { return views_ui_cache_load($item_name); } /** * */ - function list_form(&$form, &$form_state) { + public function list_form(&$form, &$form_state) { $row_class = 'container-inline'; if (!variable_get('views_ui_show_listing_filters', FALSE)) { $row_class .= " element-invisible"; @@ -139,7 +139,7 @@ class views_ui extends ctools_export_ui { $tags = array(); if (isset($form_state['object']->items)) { - foreach ($form_state['object']->items as $name => $view) { + foreach ($form_state['object']->items as $view) { if (!empty($view->tag)) { $view_tags = drupal_explode_tags($view->tag); foreach ($view_tags as $tag) { @@ -177,7 +177,7 @@ class views_ui extends ctools_export_ui { /** * */ - function list_filter($form_state, $view) { + public function list_filter($form_state, $view) { // Don't filter by tags if all is set up. if ($form_state['values']['tag'] != 'all') { // If none is selected check whether the view has a tag. @@ -207,7 +207,7 @@ class views_ui extends ctools_export_ui { /** * */ - function list_sort_options() { + public function list_sort_options() { return array( 'disabled' => t('Enabled, name'), 'name' => t('Name'), @@ -220,7 +220,7 @@ class views_ui extends ctools_export_ui { /** * */ - function list_build_row($view, &$form_state, $operations) { + public function list_build_row($view, &$form_state, $operations) { if (!empty($view->human_name)) { $title = $view->human_name; } @@ -311,7 +311,7 @@ class views_ui extends ctools_export_ui { /** * */ - function list_render(&$form_state) { + public function list_render(&$form_state) { views_include('admin'); views_ui_add_admin_css(); if (empty($_REQUEST['js'])) { @@ -323,8 +323,6 @@ class views_ui extends ctools_export_ui { $this->active = $form_state['values']['order']; $this->order = $form_state['values']['sort']; - $query = tablesort_get_query_parameters(); - $header = array( $this->tablesort_link(t('View name'), 'name', 'views-ui-name'), array('data' => t('Description'), 'class' => array('views-ui-description')), @@ -345,7 +343,7 @@ class views_ui extends ctools_export_ui { /** * */ - function tablesort_link($label, $field, $class) { + public function tablesort_link($label, $field, $class) { $title = t('sort by @s', array('@s' => $label)); $initial = 'asc'; @@ -372,7 +370,7 @@ class views_ui extends ctools_export_ui { /** * */ - function clone_page($js, $input, $item, $step = NULL) { + public function clone_page($js, $input, $item, $step = NULL) { $args = func_get_args(); drupal_set_title($this->get_page_title('clone', $item)); @@ -410,7 +408,7 @@ class views_ui extends ctools_export_ui { /** * */ - function add_template_page($js, $input, $name, $step = NULL) { + public function add_template_page($js, $input, $name, $step = NULL) { $templates = views_get_all_templates(); if (empty($templates[$name])) { @@ -436,7 +434,7 @@ class views_ui extends ctools_export_ui { /** * */ - function set_item_state($state, $js, $input, $item) { + public function set_item_state($state, $js, $input, $item) { ctools_export_set_object_status($item, $state); menu_rebuild(); @@ -451,7 +449,7 @@ class views_ui extends ctools_export_ui { /** * */ - function list_page($js, $input) { + public function list_page($js, $input) { // Remove filters values from session if filters are hidden. if (!variable_get('views_ui_show_listing_filters', FALSE) && isset($_SESSION['ctools_export_ui'][$this->plugin['name']])) { unset($_SESSION['ctools_export_ui'][$this->plugin['name']]); diff --git a/drupal7/web/sites/all/modules/contrib/views/plugins/views_plugin_access.inc b/drupal7/web/sites/all/modules/contrib/views/plugins/views_plugin_access.inc index 0a47d7c..f7d4937 100644 --- a/drupal7/web/sites/all/modules/contrib/views/plugins/views_plugin_access.inc +++ b/drupal7/web/sites/all/modules/contrib/views/plugins/views_plugin_access.inc @@ -8,7 +8,7 @@ /** * @defgroup views_access_plugins Views access plugins * @{ - * @todo. + * @todo . * * @see hook_views_plugins() */ diff --git a/drupal7/web/sites/all/modules/contrib/views/plugins/views_plugin_access_perm.inc b/drupal7/web/sites/all/modules/contrib/views/plugins/views_plugin_access_perm.inc index 4c39309..05fdf64 100644 --- a/drupal7/web/sites/all/modules/contrib/views/plugins/views_plugin_access_perm.inc +++ b/drupal7/web/sites/all/modules/contrib/views/plugins/views_plugin_access_perm.inc @@ -38,7 +38,6 @@ class views_plugin_access_perm extends views_plugin_access { return t($this->options['perm']); } - /** * {@inheritdoc} */ diff --git a/drupal7/web/sites/all/modules/contrib/views/plugins/views_plugin_argument_default_php.inc b/drupal7/web/sites/all/modules/contrib/views/plugins/views_plugin_argument_default_php.inc index 9ae8600..dd557ad 100644 --- a/drupal7/web/sites/all/modules/contrib/views/plugins/views_plugin_argument_default_php.inc +++ b/drupal7/web/sites/all/modules/contrib/views/plugins/views_plugin_argument_default_php.inc @@ -59,9 +59,6 @@ class views_plugin_argument_default_php extends views_plugin_argument_default { * {@inheritdoc} */ public function get_argument() { - // set up variables to make it easier to reference during the argument. - $view = &$this->view; - $argument = &$this->argument; ob_start(); $result = eval($this->options['code']); ob_end_clean(); diff --git a/drupal7/web/sites/all/modules/contrib/views/plugins/views_plugin_argument_validate.inc b/drupal7/web/sites/all/modules/contrib/views/plugins/views_plugin_argument_validate.inc index 19aebc7..67624c4 100644 --- a/drupal7/web/sites/all/modules/contrib/views/plugins/views_plugin_argument_validate.inc +++ b/drupal7/web/sites/all/modules/contrib/views/plugins/views_plugin_argument_validate.inc @@ -49,7 +49,7 @@ class views_plugin_argument_validate extends views_plugin { } /** - * Provide the default form form for submitting options + * Provide the default form form for submitting options. */ public function options_submit(&$form, &$form_state, &$options = array()) { } diff --git a/drupal7/web/sites/all/modules/contrib/views/plugins/views_plugin_argument_validate_php.inc b/drupal7/web/sites/all/modules/contrib/views/plugins/views_plugin_argument_validate_php.inc index 1d6a137..773790d 100644 --- a/drupal7/web/sites/all/modules/contrib/views/plugins/views_plugin_argument_validate_php.inc +++ b/drupal7/web/sites/all/modules/contrib/views/plugins/views_plugin_argument_validate_php.inc @@ -58,10 +58,6 @@ class views_plugin_argument_validate_php extends views_plugin_argument_validate * {@inheritdoc} */ public function validate_argument($argument) { - // set up variables to make it easier to reference during the argument. - $view = &$this->view; - $handler = &$this->argument; - ob_start(); $result = eval($this->options['code']); ob_end_clean(); diff --git a/drupal7/web/sites/all/modules/contrib/views/plugins/views_plugin_cache.inc b/drupal7/web/sites/all/modules/contrib/views/plugins/views_plugin_cache.inc index e4b29be..7cc9018 100644 --- a/drupal7/web/sites/all/modules/contrib/views/plugins/views_plugin_cache.inc +++ b/drupal7/web/sites/all/modules/contrib/views/plugins/views_plugin_cache.inc @@ -8,7 +8,7 @@ /** * @defgroup views_cache_plugins Views cache plugins * @{ - * @todo. + * @todo . * * @see hook_views_plugins() */ @@ -338,7 +338,7 @@ class views_plugin_cache extends views_plugin { $key_data += array( 'roles' => array_keys($user->roles), 'super-user' => $user->uid == 1, - // special caching for super user. + // Special caching for super user. 'language' => $GLOBALS['language']->language, 'language_content' => $GLOBALS['language_content']->language, 'base_url' => $GLOBALS['base_url'], diff --git a/drupal7/web/sites/all/modules/contrib/views/plugins/views_plugin_display.inc b/drupal7/web/sites/all/modules/contrib/views/plugins/views_plugin_display.inc index 250c967..9b1ae9c 100644 --- a/drupal7/web/sites/all/modules/contrib/views/plugins/views_plugin_display.inc +++ b/drupal7/web/sites/all/modules/contrib/views/plugins/views_plugin_display.inc @@ -235,6 +235,7 @@ class views_plugin_display extends views_plugin { $filter['group'] = 1; } } + unset($filter); $this->set_option('filters', $filters); $changed = TRUE; } @@ -305,9 +306,9 @@ class views_plugin_display extends views_plugin { public function uses_exposed() { if (!isset($this->has_exposed)) { foreach ($this->handlers as $type => $value) { - foreach ($this->view->$type as $id => $handler) { + foreach ($this->view->$type as $handler) { if ($handler->can_expose() && $handler->is_exposed()) { - // one is all we need; if we find it, return true. + // One is all we need; if we find it, return true. $this->has_exposed = TRUE; return TRUE; } @@ -411,7 +412,7 @@ class views_plugin_display extends views_plugin { return FALSE; } if (!empty($this->view->argument) && $this->get_option('hide_attachment_summary')) { - foreach ($this->view->argument as $argument_id => $argument) { + foreach ($this->view->argument as $argument) { if ($argument->needs_style_plugin() && empty($argument->argument_validated)) { return FALSE; } @@ -939,7 +940,7 @@ class views_plugin_display extends views_plugin { * @param string $name * The name of the plugin defined in hook_views_plugins. * - * @return views_plugin|FALSE + * @return views_plugin|false * FALSE if no plugin, otherwise the requested instance of a plugin. */ public function get_plugin($type = 'style', $name = NULL) { @@ -1185,7 +1186,7 @@ class views_plugin_display extends views_plugin { $tokens = $this->view->build_info['substitutions']; } $count = 0; - foreach ($this->view->display_handler->get_handlers('argument') as $arg => $handler) { + while ($this->view->display_handler->get_handlers('argument')) { $token = '%' . ++$count; if (!isset($tokens[$token])) { $tokens[$token] = ''; @@ -1284,8 +1285,6 @@ class views_plugin_display extends views_plugin { $style_summary = empty($style_plugin['title']) ? t('Missing style plugin') : $style_plugin_instance->summary_title(); $style_title = empty($style_plugin['title']) ? t('Missing style plugin') : $style_plugin_instance->plugin_title(); - $style = ''; - $options['style_plugin'] = array( 'category' => 'format', 'title' => t('Format'), @@ -1402,7 +1401,6 @@ class views_plugin_display extends views_plugin { ); $languages = array_merge($languages, views_language_list()); - $field_language = array(); $options['field_language'] = array( 'category' => 'other', 'title' => t('Field Language'), @@ -1795,7 +1793,7 @@ class views_plugin_display extends views_plugin { $entities = entity_get_info(); $entity_tables = array(); $has_translation_handlers = FALSE; - foreach ($entities as $type => $entity_info) { + foreach ($entities as $entity_info) { $entity_tables[] = $entity_info['base table']; if (!empty($entity_info['translation'])) { @@ -1917,7 +1915,7 @@ class views_plugin_display extends views_plugin { $options = array(); // This lets us prepare the key as we want it printed. $count = 0; - foreach ($this->view->display_handler->get_handlers('argument') as $arg => $handler) { + foreach ($this->view->display_handler->get_handlers('argument') as $handler) { $options[t('Arguments')]['%' . ++$count] = t('@argument title', array('@argument' => $handler->ui_name())); $options[t('Arguments')]['!' . $count] = t('@argument input', array('@argument' => $handler->ui_name())); } @@ -2330,7 +2328,6 @@ class views_plugin_display extends views_plugin { $registry = $this->theme_registry; $extension = $this->theme_extension; - $output = ''; $picked = FALSE; foreach ($themes as $theme) { $template = strtr($theme, '_', '-') . $extension; @@ -3122,7 +3119,6 @@ class views_plugin_display extends views_plugin { $output = ''; $style_plugin = $this->get_plugin(); if ($option == 'style_plugin') { - $type = 'style'; $options_field = 'style_options'; $plugin = $style_plugin; } @@ -3131,7 +3127,6 @@ class views_plugin_display extends views_plugin { return; } - $type = 'row'; $options_field = 'row_options'; $plugin = $this->get_plugin('row'); // If the style plugin doesn't use row plugins, don't even bother. @@ -3183,11 +3178,8 @@ class views_plugin_display extends views_plugin { * */ public function unpack_style($indent, $prefix, $storage, $option, $definition, $parents) { - $output = ''; $style_plugin = $this->get_plugin(); if ($option == 'style_plugin') { - $type = 'style'; - $options_field = 'style_options'; $plugin = $style_plugin; } else { @@ -3195,8 +3187,6 @@ class views_plugin_display extends views_plugin { return; } - $type = 'row'; - $options_field = 'row_options'; $plugin = $this->get_plugin('row'); // If the style plugin doesn't use row plugins, don't even bother. } @@ -3238,7 +3228,7 @@ class views_plugin_display extends views_plugin { $type = $option; } $types = views_object_types(); - foreach ($storage[$option] as $id => $info) { + foreach ($storage[$option] as $info) { if (!empty($types[$type]['type'])) { $handler_type = $types[$type]['type']; } diff --git a/drupal7/web/sites/all/modules/contrib/views/plugins/views_plugin_display_attachment.inc b/drupal7/web/sites/all/modules/contrib/views/plugins/views_plugin_display_attachment.inc index 8f525ab..5650654 100644 --- a/drupal7/web/sites/all/modules/contrib/views/plugins/views_plugin_display_attachment.inc +++ b/drupal7/web/sites/all/modules/contrib/views/plugins/views_plugin_display_attachment.inc @@ -20,7 +20,7 @@ class views_plugin_display_attachment extends views_plugin_display { /** * {@inheritdoc} */ - public function option_definition () { + public function option_definition() { $options = parent::option_definition(); $options['show_title'] = array('default' => FALSE, 'bool' => TRUE); @@ -158,6 +158,7 @@ class views_plugin_display_attachment extends views_plugin_display { '#default_value' => $this->get_option('show_title'), ); break; + case 'show_title_empty': $form['#title'] .= t('Title'); $form['show_title_empty'] = array( @@ -167,6 +168,7 @@ class views_plugin_display_attachment extends views_plugin_display { '#default_value' => $this->get_option('show_title_empty'), ); break; + case 'inherit_arguments': $form['#title'] .= t('Inherit contextual filters'); $form['inherit_arguments'] = array( diff --git a/drupal7/web/sites/all/modules/contrib/views/plugins/views_plugin_display_block.inc b/drupal7/web/sites/all/modules/contrib/views/plugins/views_plugin_display_block.inc index 93fe86f..9f5c641 100644 --- a/drupal7/web/sites/all/modules/contrib/views/plugins/views_plugin_display_block.inc +++ b/drupal7/web/sites/all/modules/contrib/views/plugins/views_plugin_display_block.inc @@ -241,7 +241,7 @@ class views_plugin_display_block extends views_plugin_display { if (strlen($delta) >= 32) { $delta = md5($delta); } - if (db_table_exists('block') && $bid = db_query("SELECT bid FROM {block} WHERE module = 'views' AND delta = :delta", array(':delta' => $delta))->fetchField()) { + if (db_table_exists('block') && db_query("SELECT bid FROM {block} WHERE module = 'views' AND delta = :delta", array(':delta' => $delta))->fetchField()) { db_update('block') ->fields(array( 'cache' => $cache_setting, diff --git a/drupal7/web/sites/all/modules/contrib/views/plugins/views_plugin_display_extender.inc b/drupal7/web/sites/all/modules/contrib/views/plugins/views_plugin_display_extender.inc index 05cafd5..419d30b 100644 --- a/drupal7/web/sites/all/modules/contrib/views/plugins/views_plugin_display_extender.inc +++ b/drupal7/web/sites/all/modules/contrib/views/plugins/views_plugin_display_extender.inc @@ -6,7 +6,7 @@ */ /** - * @todo. + * @todo . * * @ingroup views_display_plugins */ diff --git a/drupal7/web/sites/all/modules/contrib/views/plugins/views_plugin_display_feed.inc b/drupal7/web/sites/all/modules/contrib/views/plugins/views_plugin_display_feed.inc index 682bb37..f2fee39 100644 --- a/drupal7/web/sites/all/modules/contrib/views/plugins/views_plugin_display_feed.inc +++ b/drupal7/web/sites/all/modules/contrib/views/plugins/views_plugin_display_feed.inc @@ -83,7 +83,7 @@ class views_plugin_display_feed extends views_plugin_display_page { * {@inheritdoc} */ public function defaultable_sections($section = NULL) { - if (in_array($section, array('style_options', 'style_plugin', 'row_options', 'row_plugin',))) { + if (in_array($section, array('style_options', 'style_plugin', 'row_options', 'row_plugin'))) { return FALSE; } @@ -109,7 +109,7 @@ class views_plugin_display_feed extends views_plugin_display_page { // Overrides for standard stuff. $options['style_plugin']['default'] = 'rss'; - $options['style_options']['default'] = array('description' => ''); + $options['style_options']['default'] = array('description' => ''); $options['sitename_title']['default'] = FALSE; $options['row_plugin']['default'] = ''; $options['defaults']['default']['style_plugin'] = FALSE; @@ -245,7 +245,7 @@ class views_plugin_display_feed extends views_plugin_display_page { $clone->build_title(); $plugin->attach_to($display_id, $this->get_path(), $clone->get_title()); - // Clean up + // Clean up. $clone->destroy(); unset($clone); } diff --git a/drupal7/web/sites/all/modules/contrib/views/plugins/views_plugin_display_page.inc b/drupal7/web/sites/all/modules/contrib/views/plugins/views_plugin_display_page.inc index 81f35e0..095606d 100644 --- a/drupal7/web/sites/all/modules/contrib/views/plugins/views_plugin_display_page.inc +++ b/drupal7/web/sites/all/modules/contrib/views/plugins/views_plugin_display_page.inc @@ -44,7 +44,7 @@ class views_plugin_display_page extends views_plugin_display { 'name' => array('default' => variable_get('menu_default_node_menu', 'navigation')), 'context' => array('default' => ''), 'context_only_inline' => array('default' => FALSE), - ), + ), ); $options['tab_options'] = array( 'contains' => array( @@ -54,7 +54,7 @@ class views_plugin_display_page extends views_plugin_display { 'description' => array('default' => '', 'translatable' => FALSE), 'weight' => array('default' => 0), 'name' => array('default' => 'navigation'), - ), + ), ); return $options; @@ -66,8 +66,7 @@ class views_plugin_display_page extends views_plugin_display { public function execute_hook_menu($callbacks) { $items = array(); // Replace % with the link to our standard views argument loader - // views_arg_load -- which lives in views.module - + // views_arg_load -- which lives in views.module. $bits = explode('/', $this->get_option('path')); $page_arguments = array($this->view->name, $this->display->id); $this->view->init_handlers(); @@ -124,13 +123,13 @@ class views_plugin_display_page extends views_plugin_display { if ($path) { $items[$path] = array( - // default views page entry + // Default views page entry. 'page callback' => 'views_page', 'page arguments' => $page_arguments, // Default access check (per display) 'access callback' => 'views_access', 'access arguments' => $access_arguments, - // Identify URL embedded arguments and correlate them to a handler + // Identify URL embedded arguments and correlate them to a handler. 'load arguments' => array($this->view->name, $this->display->id, '%index'), // Make sure the menu router knows where views_page is. 'module' => 'views', @@ -157,7 +156,7 @@ class views_plugin_display_page extends views_plugin_display { case 'normal': $items[$path]['type'] = MENU_NORMAL_ITEM; - // Insert item into the proper menu + // Insert item into the proper menu. $items[$path]['menu_name'] = $menu['name']; break; @@ -168,6 +167,7 @@ class views_plugin_display_page extends views_plugin_display { case 'default tab': $items[$path]['type'] = MENU_DEFAULT_LOCAL_TASK; break; + case 'local action': $items[$path]['type'] = MENU_LOCAL_ACTION; break; @@ -188,18 +188,18 @@ class views_plugin_display_page extends views_plugin_display { // Remove the last piece. $bit = array_pop($bits); - // we can't do this if they tried to make the last path bit variable. + // We can't do this if they tried to make the last path bit variable. // @todo We can validate this. if ($bit != '%views_arg' && !empty($bits)) { $default_path = implode('/', $bits); $items[$default_path] = array( - // default views page entry + // Default views page entry. 'page callback' => 'views_page', 'page arguments' => $page_arguments, // Default access check (per display) 'access callback' => 'views_access', 'access arguments' => $access_arguments, - // Identify URL embedded arguments and correlate them to a handler + // Identify URL embedded arguments and correlate them to a handler. 'load arguments' => array($this->view->name, $this->display->id, '%index'), 'title' => $tab_options['title'], 'description' => $tab_options['description'], @@ -250,7 +250,6 @@ class views_plugin_display_page extends views_plugin_display { $this->view->get_breadcrumb(TRUE); - // And now render the view. $render = $this->view->render(); @@ -315,6 +314,7 @@ class views_plugin_display_page extends views_plugin_display { case 'default tab': $menu_str = t('Tab: @title', array('@title' => $menu['title'])); break; + case 'local action': $menu_str = t('Local action: @title', array('@title' => $menu['title'])); } @@ -350,7 +350,7 @@ class views_plugin_display_page extends views_plugin_display { '#default_value' => $this->get_option('path'), '#field_prefix' => '' . url(NULL, array('absolute' => TRUE)) . (variable_get('clean_url', 0) ? '' : '?q='), '#field_suffix' => '‎', - '#attributes' => array('dir'=>'ltr'), + '#attributes' => array('dir' => 'ltr'), '#maxlength' => 255, ); break; diff --git a/drupal7/web/sites/all/modules/contrib/views/plugins/views_plugin_exposed_form.inc b/drupal7/web/sites/all/modules/contrib/views/plugins/views_plugin_exposed_form.inc index e2cf21d..17b2d24 100644 --- a/drupal7/web/sites/all/modules/contrib/views/plugins/views_plugin_exposed_form.inc +++ b/drupal7/web/sites/all/modules/contrib/views/plugins/views_plugin_exposed_form.inc @@ -67,7 +67,7 @@ class views_plugin_exposed_form extends views_plugin { '#required' => TRUE, ); - $form['reset_button'] = array ( + $form['reset_button'] = array( '#type' => 'checkbox', '#title' => t('Include reset button'), '#description' => t('If checked the exposed form will provide a button to reset all the applied exposed filters'), @@ -75,13 +75,13 @@ class views_plugin_exposed_form extends views_plugin { ); $form['reset_button_label'] = array( - '#type' => 'textfield', + '#type' => 'textfield', '#title' => t('Reset button label'), '#description' => t('Text to display in the reset button of the exposed form.'), '#default_value' => $this->options['reset_button_label'], '#required' => TRUE, '#dependency' => array( - 'edit-exposed-form-options-reset-button' => array(1) + 'edit-exposed-form-options-reset-button' => array(1), ), ); @@ -240,7 +240,7 @@ class views_plugin_exposed_form extends views_plugin { } $form['submit']['#value'] = $this->options['submit_button']; - // Check if there is exposed sorts for this view + // Check if there is exposed sorts for this view. $exposed_sorts = array(); foreach ($this->view->sort as $id => $handler) { if ($handler->can_expose() && $handler->is_exposed()) { @@ -306,7 +306,6 @@ class views_plugin_exposed_form extends views_plugin { $form_state['pager_plugin'] = $pager; } - // Apply autosubmit values. if (!empty($this->options['autosubmit'])) { $form = array_merge_recursive($form, array('#attributes' => array('class' => array('ctools-auto-submit-full-form')))); @@ -330,15 +329,15 @@ class views_plugin_exposed_form extends views_plugin { } /** - * This function is executed when exposed form is submited. - * - * @param array $form - * Nested array of form elements that comprise the form. - * @param array $form_state - * A keyed array containing the current state of the form. - * @param array $exclude - * Nested array of keys to exclude of insert into $view->exposed_raw_input. - */ + * This function is executed when exposed form is submited. + * + * @param array $form + * Nested array of form elements that comprise the form. + * @param array $form_state + * A keyed array containing the current state of the form. + * @param array $exclude + * Nested array of keys to exclude of insert into $view->exposed_raw_input. + */ public function exposed_form_submit(&$form, &$form_state, &$exclude) { if (!empty($form_state['values']['op']) && $form_state['values']['op'] == $this->options['reset_button_label']) { $this->reset_form($form, $form_state); @@ -354,7 +353,6 @@ class views_plugin_exposed_form extends views_plugin { */ public function reset_form(&$form, &$form_state) { // _SESSION is not defined for users who are not logged in. - // If filters are not overridden, store the 'remember' settings on the // default display. If they are, store them on this display. This way, // multiple displays in the same view can share the same filters and diff --git a/drupal7/web/sites/all/modules/contrib/views/plugins/views_plugin_exposed_form_input_required.inc b/drupal7/web/sites/all/modules/contrib/views/plugins/views_plugin_exposed_form_input_required.inc index 93a3bc3..9f8fbed 100644 --- a/drupal7/web/sites/all/modules/contrib/views/plugins/views_plugin_exposed_form_input_required.inc +++ b/drupal7/web/sites/all/modules/contrib/views/plugins/views_plugin_exposed_form_input_required.inc @@ -56,7 +56,7 @@ class views_plugin_exposed_form_input_required extends views_plugin_exposed_form if (!isset($cache)) { $view = $this->view; if (is_array($view->filter) && count($view->filter)) { - foreach ($view->filter as $filter_id => $filter) { + foreach ($view->filter as $filter) { if ($filter->is_exposed()) { $identifier = $filter->options['expose']['identifier']; if (isset($view->exposed_input[$identifier])) { diff --git a/drupal7/web/sites/all/modules/contrib/views/plugins/views_plugin_localization.inc b/drupal7/web/sites/all/modules/contrib/views/plugins/views_plugin_localization.inc index f572a8d..aeb1670 100644 --- a/drupal7/web/sites/all/modules/contrib/views/plugins/views_plugin_localization.inc +++ b/drupal7/web/sites/all/modules/contrib/views/plugins/views_plugin_localization.inc @@ -8,7 +8,7 @@ /** * @defgroup views_localization_plugins Views localization plugins * @{ - * @todo. + * @todo . * * @see hook_views_plugins() */ diff --git a/drupal7/web/sites/all/modules/contrib/views/plugins/views_plugin_localization_core.inc b/drupal7/web/sites/all/modules/contrib/views/plugins/views_plugin_localization_core.inc index 92feb2d..dd73a47 100644 --- a/drupal7/web/sites/all/modules/contrib/views/plugins/views_plugin_localization_core.inc +++ b/drupal7/web/sites/all/modules/contrib/views/plugins/views_plugin_localization_core.inc @@ -45,7 +45,6 @@ class views_plugin_localization_core extends views_plugin_localization { // in order to trigger an update. // @todo add test for number of languages. if ($language->language == 'en') { - $changed = TRUE; $languages = language_list(); $cached_language = $language; unset($languages['en']); diff --git a/drupal7/web/sites/all/modules/contrib/views/plugins/views_plugin_pager.inc b/drupal7/web/sites/all/modules/contrib/views/plugins/views_plugin_pager.inc index 0217f4d..3be3233 100644 --- a/drupal7/web/sites/all/modules/contrib/views/plugins/views_plugin_pager.inc +++ b/drupal7/web/sites/all/modules/contrib/views/plugins/views_plugin_pager.inc @@ -8,7 +8,7 @@ /** * @defgroup views_pager_plugins Views pager plugins * @{ - * @todo. + * @todo . * * @see hook_views_plugins() */ @@ -150,7 +150,7 @@ class views_plugin_pager extends views_plugin { /** * Determine if a pager needs a count query. * - * If a pager needs a count query, a simple query + * If a pager needs a count query, a simple query. */ public function use_count_query() { return TRUE; @@ -178,7 +178,7 @@ class views_plugin_pager extends views_plugin { } /** - * Modify the query for paging + * Modify the query for paging. * * This is called during the build phase and can directly modify the query. */ diff --git a/drupal7/web/sites/all/modules/contrib/views/plugins/views_plugin_query.inc b/drupal7/web/sites/all/modules/contrib/views/plugins/views_plugin_query.inc index fe45793..539d2a7 100644 --- a/drupal7/web/sites/all/modules/contrib/views/plugins/views_plugin_query.inc +++ b/drupal7/web/sites/all/modules/contrib/views/plugins/views_plugin_query.inc @@ -135,7 +135,7 @@ class views_plugin_query extends views_plugin { } /** - * Set an OFFSET on the query, specifying a number of results to skip + * Set an OFFSET on the query, specifying a number of results to skip. */ public function set_offset($offset) { $this->offset = $offset; @@ -174,7 +174,7 @@ class views_plugin_query extends views_plugin { $group = empty($groups) ? 1 : max(array_keys($groups)) + 1; } - // Create an empty group + // Create an empty group. if (empty($groups[$group])) { $groups[$group] = array('conditions' => array(), 'args' => array()); } diff --git a/drupal7/web/sites/all/modules/contrib/views/plugins/views_plugin_query_default.inc b/drupal7/web/sites/all/modules/contrib/views/plugins/views_plugin_query_default.inc index e05eba9..06ff495 100644 --- a/drupal7/web/sites/all/modules/contrib/views/plugins/views_plugin_query_default.inc +++ b/drupal7/web/sites/all/modules/contrib/views/plugins/views_plugin_query_default.inc @@ -92,13 +92,13 @@ class views_plugin_query_default extends views_plugin_query { public $pager = NULL; /** - * An array mapping table aliases and field names to field aliases. - */ + * An array mapping table aliases and field names to field aliases. + */ public $field_aliases = array(); /** - * Query tags which will be passed over to the dbtng query object. - */ + * Query tags which will be passed over to the dbtng query object. + */ public $tags = array(); /** @@ -153,8 +153,7 @@ class views_plugin_query_default extends views_plugin_query { // 'field' => $base_field, // 'alias' => $base_field, // ); - // } - + // }. $this->count_field = array( 'table' => $base_table, 'field' => $base_field, @@ -263,8 +262,8 @@ class views_plugin_query_default extends views_plugin_query { '#type' => 'checkbox', '#default_value' => $disable_rewrite, '#suffix' => '
' - . t('WARNING: Disabling access checks means that %access_tag security is disabled. This may allow users to see data they should not be able to see if your view is misconfigured. Please use this option only if you understand and accept this security risk.', array('%access_tag' => $access_tag)) - . '
', + . t('WARNING: Disabling access checks means that %access_tag security is disabled. This may allow users to see data they should not be able to see if your view is misconfigured. Please use this option only if you understand and accept this security risk.', array('%access_tag' => $access_tag)) + . '
', ); } } @@ -306,10 +305,16 @@ class views_plugin_query_default extends views_plugin_query { * Special submit handling. */ public function options_submit(&$form, &$form_state) { + parent::options_submit($form, $form_state); + $element = array('#parents' => array('query', 'options', 'query_tags')); - $value = explode(',', drupal_array_get_nested_value($form_state['values'], $element['#parents'])); - $value = array_filter(array_map('trim', $value)); - form_set_value($element, $value, $form_state); + $query_tags = drupal_array_get_nested_value($form_state['values'], $element['#parents']); + // Check if we need to convert query tags string into an array. + if (!is_array($query_tags)) { + $value = explode(',', $query_tags); + $value = array_filter(array_map('trim', $value)); + form_set_value($element, $value, $form_state); + } } /** @@ -877,8 +882,8 @@ class views_plugin_query_default extends views_plugin_query { * an array = otherwise. If $field is a string you have to use 'formula' * here. * - * The $field, $value and $operator arguments can also be passed in with a - * single DatabaseCondition object, like this: + * The $field, $value and $operator arguments can also be passed in with a + * single DatabaseCondition object, like this: * * @code * $this->query->add_where( @@ -1007,7 +1012,7 @@ class views_plugin_query_default extends views_plugin_query { * group does not yet exist it will be created as an AND group. * @param string $snippet * The snippet to check. This can be either a column or a complex - * expression like "COUNT(table.field) > 3" + * expression like "COUNT(table.field) > 3". * @param array $args * An associative array of arguments. * @@ -1144,10 +1149,9 @@ class views_plugin_query_default extends views_plugin_query { $filter_group = $this->group_operator == 'OR' ? db_or() : db_and(); foreach ($this->$where as $group => $info) { - if (!empty($info['conditions'])) { $sub_group = $info['type'] == 'OR' ? db_or() : db_and(); - foreach ($info['conditions'] as $key => $clause) { + foreach ($info['conditions'] as $clause) { // DBTNG doesn't support to add the same subquery twice to the main // query and the count query, so clone the subquery to have two // instances of the same object. @@ -1237,7 +1241,9 @@ class views_plugin_query_default extends views_plugin_query { elseif ($this->distinct && !in_array($fieldname, $this->groupby)) { // d7cx: This code was there, apparently needed for PostgreSQL + // @code // $string = db_driver() == 'pgsql' ? "FIRST($string)" : $string; + // @endcode if (Database::getConnection()->databaseType() == 'pgsql' && !in_array($string, $non_aggregates)) { $non_aggregates[] = $string; } @@ -1320,7 +1326,7 @@ class views_plugin_query_default extends views_plugin_query { if (!empty($this->options['slave'])) { $target = 'slave'; - // Set the replica target if the replica option is set. + // Set the replica target if the replica option is set. } // Go ahead and build the query. db_select doesn't support to specify the @@ -1339,9 +1345,6 @@ class views_plugin_query_default extends views_plugin_query { $query->distinct(); } - $joins = $where = $having = $orderby = $groupby = ''; - $fields = $distinct = array(); - // Add all the tables to the query via joins. We assume all LEFT joins. foreach ($this->table_queue as $table) { if (is_object($table['join'])) { @@ -1350,7 +1353,6 @@ class views_plugin_query_default extends views_plugin_query { } $this->has_aggregate = FALSE; - $non_aggregates = array(); list($non_aggregates) = $this->compile_fields($fields_array, $query); @@ -1423,10 +1425,10 @@ class views_plugin_query_default extends views_plugin_query { */ public function get_where_args() { $args = array(); - foreach ($this->where as $group => $where) { + foreach ($this->where as $where) { $args = array_merge($args, $where['args']); } - foreach ($this->having as $group => $having) { + foreach ($this->having as $having) { $args = array_merge($args, $having['args']); } return $args; @@ -1472,7 +1474,6 @@ class views_plugin_query_default extends views_plugin_query { */ public function execute(&$view) { // Whether this query will run against an external database. - $external = FALSE; $query = $view->build_info['query']; $count_query = $view->build_info['count_query']; @@ -1488,7 +1489,6 @@ class views_plugin_query_default extends views_plugin_query { } } - $items = array(); if ($query) { $additional_arguments = module_invoke_all('views_query_substitutions', $view); diff --git a/drupal7/web/sites/all/modules/contrib/views/plugins/views_plugin_row.inc b/drupal7/web/sites/all/modules/contrib/views/plugins/views_plugin_row.inc index 833a675..51e30a0 100644 --- a/drupal7/web/sites/all/modules/contrib/views/plugins/views_plugin_row.inc +++ b/drupal7/web/sites/all/modules/contrib/views/plugins/views_plugin_row.inc @@ -29,7 +29,7 @@ class views_plugin_row extends views_plugin { $this->view = &$view; $this->display = &$display; - // Overlay incoming options on top of defaults + // Overlay incoming options on top of defaults. $this->unpack_options($this->options, isset($options) ? $options : $display->handler->get_option('row_options')); } diff --git a/drupal7/web/sites/all/modules/contrib/views/plugins/views_plugin_style.inc b/drupal7/web/sites/all/modules/contrib/views/plugins/views_plugin_style.inc index 36a81f2..1028c49 100644 --- a/drupal7/web/sites/all/modules/contrib/views/plugins/views_plugin_style.inc +++ b/drupal7/web/sites/all/modules/contrib/views/plugins/views_plugin_style.inc @@ -49,7 +49,7 @@ class views_plugin_style extends views_plugin { $this->view = &$view; $this->display = &$display; - // Overlay incoming options on top of defaults + // Overlay incoming options on top of defaults. $this->unpack_options($this->options, isset($options) ? $options : $display->handler->get_option('style_options')); if ($this->uses_row_plugin() && $display->handler->get_option('row_plugin')) { @@ -143,10 +143,11 @@ class views_plugin_style extends views_plugin { $classes = explode(' ', $class); } - // Convert whatever the result is to a nice clean class name + // Convert whatever the result is to a nice clean class name. foreach ($classes as &$class) { $class = drupal_clean_css_identifier($class); } + unset($class); return implode(' ', $classes); } } @@ -159,11 +160,6 @@ class views_plugin_style extends views_plugin { $value = ''; } if (strpos($value, '[') !== FALSE || strpos($value, '!') !== FALSE || strpos($value, '%') !== FALSE) { - $fake_item = array( - 'alter_text' => TRUE, - 'text' => $value, - ); - // Row tokens might be empty, for example for node row style. $tokens = isset($this->row_tokens[$row_index]) ? $this->row_tokens[$row_index] : array(); if (!empty($this->view->build_info['substitutions'])) { @@ -247,7 +243,7 @@ class views_plugin_style extends views_plugin { '#description' => t('If enabled the rendered output of the grouping field is used to group the rows.'), '#dependency' => array( 'edit-style-options-grouping-' . $i . '-field' => array_keys($field_labels), - ) + ), ); $form['grouping'][$i]['rendered_strip'] = array( '#type' => 'checkbox', @@ -256,7 +252,7 @@ class views_plugin_style extends views_plugin { '#description' => t('Some modules add HTML to the rendered output and prevent the rows from grouping correctly. Stripping the HTML tags should correct this.'), '#dependency' => array( 'edit-style-options-grouping-' . $i . '-field' => array_keys($field_labels), - ) + ), ); } } @@ -387,7 +383,8 @@ class views_plugin_style extends views_plugin { 'grouping' => $this->options['grouping'][$level], 'grouping_level' => $level, 'rows' => $set['rows'], - 'title' => $set['group']) + 'title' => $set['group'], + ) ); } // Render as a record set. @@ -405,7 +402,8 @@ class views_plugin_style extends views_plugin { 'options' => $this->options, 'grouping_level' => $level, 'rows' => $set['rows'], - 'title' => $set['group']) + 'title' => $set['group'], + ) ); } } @@ -461,7 +459,7 @@ class views_plugin_style extends views_plugin { $groupings = array(array('field' => $groupings, 'rendered' => $rendered)); } - // Make sure fields are rendered + // Make sure fields are rendered. $this->render_fields($this->view->result); $sets = array(); if ($groupings) { @@ -487,7 +485,7 @@ class views_plugin_style extends views_plugin { if ($rendered) { $grouping = $group_content; if ($rendered_strip) { - $group_content = $grouping = strip_tags(htmlspecialchars_decode((string) $group_content)); + $group_content = $grouping = strip_tags(htmlspecialchars_decode((string) $group_content, ENT_COMPAT)); } } else { @@ -542,7 +540,7 @@ class views_plugin_style extends views_plugin { * Render all of the fields for a given style and store them on the object. * * @param array $result - * The result array from $view->result + * The result array from $view->result. */ public function render_fields($result) { if (!$this->uses_fields()) { @@ -578,7 +576,7 @@ class views_plugin_style extends views_plugin { * @param int $index * The index count of the row. * @param string $field - * The id of the field. + * The id of the field. */ public function get_field($index, $field) { if (!isset($this->rendered_fields)) { @@ -591,13 +589,13 @@ class views_plugin_style extends views_plugin { } /** - * Get the raw field value. - * - * @param int $index - * The index count of the row. - * @param string $field - * The id of the field. - */ + * Get the raw field value. + * + * @param int $index + * The index count of the row. + * @param string $field + * The id of the field. + */ public function get_field_value($index, $field) { $this->view->row_index = $index; $value = $this->view->field[$field]->get_value($this->view->result[$index]); diff --git a/drupal7/web/sites/all/modules/contrib/views/plugins/views_plugin_style_jump_menu.inc b/drupal7/web/sites/all/modules/contrib/views/plugins/views_plugin_style_jump_menu.inc index f997d2b..4839f6e 100644 --- a/drupal7/web/sites/all/modules/contrib/views/plugins/views_plugin_style_jump_menu.inc +++ b/drupal7/web/sites/all/modules/contrib/views/plugins/views_plugin_style_jump_menu.inc @@ -173,12 +173,4 @@ class views_plugin_style_jump_menu extends views_plugin_style { return $form; } - /** - * - */ - public function render_set($title, $records) { - $options = array(); - $fields = $this->rendered_fields; - } - } diff --git a/drupal7/web/sites/all/modules/contrib/views/plugins/views_plugin_style_table.inc b/drupal7/web/sites/all/modules/contrib/views/plugins/views_plugin_style_table.inc index 5467920..0926ca9 100644 --- a/drupal7/web/sites/all/modules/contrib/views/plugins/views_plugin_style_table.inc +++ b/drupal7/web/sites/all/modules/contrib/views/plugins/views_plugin_style_table.inc @@ -14,12 +14,14 @@ class views_plugin_style_table extends views_plugin_style { /** * Contains the current active sort column. + * * @var string */ public $active; /** * Contains the current active sort order, either desc or asc. + * * @var string */ public $order; @@ -45,7 +47,7 @@ class views_plugin_style_table extends views_plugin_style { } /** - * Determine if we should provide sorting based upon $_GET inputs + * Determine if we should provide sorting based upon $_GET inputs. * * @return bool */ @@ -64,11 +66,11 @@ class views_plugin_style_table extends views_plugin_style { } /** - * Add our actual sort criteria + * Add our actual sort criteria. */ public function build_sort_post() { if (!isset($_GET['order'])) { - // check for a 'default' clicksort. If there isn't one, exit gracefully. + // Check for a 'default' clicksort. If there isn't one, exit gracefully. if (empty($this->options['default'])) { return; } @@ -125,7 +127,7 @@ class views_plugin_style_table extends views_plugin_style { * display has listed due to access control or other changes. * * @return array - * An array of all the sanitized columns. + * An array of all the sanitized columns. */ public function sanitize_columns($columns, $fields = NULL) { $sanitized = array(); @@ -146,7 +148,7 @@ class views_plugin_style_table extends views_plugin_style { } // If the field is the column, mark it so, or the column - // it's set to is a column, that's ok + // it's set to is a column, that's ok. if ($field == $column || $columns[$column] == $column && !empty($sanitized[$column])) { $sanitized[$field] = $column; } @@ -199,7 +201,7 @@ class views_plugin_style_table extends views_plugin_style { '#default_value' => $this->options['summary'], '#maxlength' => 255, ); - + $form['class'] = array( '#type' => 'textfield', '#title' => t('CSS classes'), @@ -229,7 +231,7 @@ class views_plugin_style_table extends views_plugin_style { foreach ($columns as $field => $column) { $safe = str_replace(array('][', '_', ' '), '-', $field); - // the $id of the column for dependency checking. + // The $id of the column for dependency checking. $id = 'edit-style-options-columns-' . $safe; $form['columns'][$field] = array( @@ -257,7 +259,7 @@ class views_plugin_style_table extends views_plugin_style { '#return_value' => $field, '#parents' => array('style_options', 'default'), '#id' => $radio_id, - // because 'radio' doesn't fully support '#id' =( + // Because 'radio' doesn't fully support '#id' =(. '#attributes' => array('id' => $radio_id), '#default_value' => $default, '#dependency' => array($id => array($field)), @@ -271,7 +273,7 @@ class views_plugin_style_table extends views_plugin_style { 'views-align-left' => t('Left'), 'views-align-center' => t('Center'), 'views-align-right' => t('Right'), - ), + ), '#dependency' => array($id => array($field)), ); $form['info'][$field]['separator'] = array( @@ -286,13 +288,13 @@ class views_plugin_style_table extends views_plugin_style { '#dependency' => array($id => array($field)), ); - // markup for the field name + // Markup for the field name. $form['info'][$field]['name'] = array( '#markup' => $field_names[$field], ); } - // Provide a radio for no default sort + // Provide a radio for no default sort. $form['default'][-1] = array( '#type' => 'radio', '#return_value' => -1, @@ -319,4 +321,5 @@ class views_plugin_style_table extends views_plugin_style { public function even_empty() { return parent::even_empty() || !empty($this->options['empty_table']); } + } diff --git a/drupal7/web/sites/all/modules/contrib/views/plugins/views_wizard/node_revision.inc b/drupal7/web/sites/all/modules/contrib/views/plugins/views_wizard/node_revision.inc index 3a9ea64..f7c9ddf 100644 --- a/drupal7/web/sites/all/modules/contrib/views/plugins/views_wizard/node_revision.inc +++ b/drupal7/web/sites/all/modules/contrib/views/plugins/views_wizard/node_revision.inc @@ -17,8 +17,8 @@ $plugin = array( 'filters' => array( 'status' => array( 'value' => '1', + // @todo Unclear if this should be "node" or "node_revision". 'table' => 'node', -// @todo - unclear if this should be node or node_revision 'field' => 'status', ), ), diff --git a/drupal7/web/sites/all/modules/contrib/views/plugins/views_wizard/views_ui_base_views_wizard.class.php b/drupal7/web/sites/all/modules/contrib/views/plugins/views_wizard/views_ui_base_views_wizard.class.php index 6a5484d..b0d4024 100644 --- a/drupal7/web/sites/all/modules/contrib/views/plugins/views_wizard/views_ui_base_views_wizard.class.php +++ b/drupal7/web/sites/all/modules/contrib/views/plugins/views_wizard/views_ui_base_views_wizard.class.php @@ -13,19 +13,19 @@ interface ViewsWizardInterface { /** * Constructor. */ - function __construct($plugin); + public function __construct($plugin); /** * For AJAX callbacks to build other elements in the "show" form. */ - function build_form($form, &$form_state); + public function build_form($form, &$form_state); /** * Validate form and values. * * @return an array of form errors. */ - function validate($form, &$form_state); + public function validate($form, &$form_state); /** * Create a new View from form values. @@ -34,7 +34,7 @@ interface ViewsWizardInterface { * * @throws ViewsWizardException in the event of a problem. */ - function create_view($form, &$form_state); + public function create_view($form, &$form_state); } @@ -60,7 +60,7 @@ class ViewsUiBaseViewsWizard implements ViewsWizardInterface { 'group' => 1, ); - function __construct($plugin) { + public function __construct($plugin) { $this->base_table = $plugin['base_table']; $default = $this->filter_defaults; @@ -82,7 +82,10 @@ class ViewsUiBaseViewsWizard implements ViewsWizardInterface { } } - function build_form($form, &$form_state) { + /** + * + */ + public function build_form($form, &$form_state) { $style_options = views_fetch_plugin_names('style', 'normal', array($this->base_table)); $feed_row_options = views_fetch_plugin_names('row', 'feed', array($this->base_table)); $path_prefix = url(NULL, array('absolute' => TRUE)) . (variable_get('clean_url', 0) ? '' : '?q='); @@ -333,7 +336,6 @@ class ViewsUiBaseViewsWizard implements ViewsWizardInterface { * Per default use fields with base field. */ protected function row_style_options($type) { - $data = views_fetch_data($this->base_table); // Get all available row plugins by default. $options = views_fetch_plugin_names('row', 'normal', array($this->base_table)); return $options; @@ -468,6 +470,9 @@ class ViewsUiBaseViewsWizard implements ViewsWizardInterface { } } + /** + * + */ protected function instantiate_view($form, &$form_state) { // Build the basic view properties. $view = views_new_view(); @@ -554,6 +559,7 @@ class ViewsUiBaseViewsWizard implements ViewsWizardInterface { $field['id'] = view::generate_item_id($field['id'], $display_options['default']['fields']); $display_options['default']['fields'][$field['id']] = $field; } + unset($field); $path_fields_added = TRUE; } @@ -574,6 +580,7 @@ class ViewsUiBaseViewsWizard implements ViewsWizardInterface { } } } + unset($options); } /** @@ -638,6 +645,7 @@ class ViewsUiBaseViewsWizard implements ViewsWizardInterface { $field = $data['table']['base']['defaults']['field']; } else { + // The field name identified here is used later on. foreach ($data as $field => $field_data) { if (isset($field_data['field']['handler'])) { break; @@ -653,6 +661,9 @@ class ViewsUiBaseViewsWizard implements ViewsWizardInterface { return $display_options; } + /** + * + */ protected function default_display_filters($form, $form_state) { $filters = array(); @@ -669,6 +680,9 @@ class ViewsUiBaseViewsWizard implements ViewsWizardInterface { return $filters; } + /** + * + */ protected function default_display_filters_user($form, $form_state) { $filters = array(); @@ -734,6 +748,9 @@ class ViewsUiBaseViewsWizard implements ViewsWizardInterface { return $filters; } + /** + * + */ protected function default_display_sorts($form, $form_state) { $sorts = array(); @@ -750,6 +767,9 @@ class ViewsUiBaseViewsWizard implements ViewsWizardInterface { return $sorts; } + /** + * + */ protected function default_display_sorts_user($form, $form_state) { $sorts = array(); @@ -779,6 +799,9 @@ class ViewsUiBaseViewsWizard implements ViewsWizardInterface { return $sorts; } + /** + * + */ protected function page_display_options($form, $form_state) { $display_options = array(); $page = $form_state['values']['page']; @@ -805,6 +828,9 @@ class ViewsUiBaseViewsWizard implements ViewsWizardInterface { return $display_options; } + /** + * + */ protected function block_display_options($form, $form_state) { $display_options = array(); $block = $form_state['values']['block']; @@ -816,6 +842,9 @@ class ViewsUiBaseViewsWizard implements ViewsWizardInterface { return $display_options; } + /** + * + */ protected function page_feed_display_options($form, $form_state) { $display_options = array(); $display_options['pager']['type'] = 'some'; @@ -846,7 +875,7 @@ class ViewsUiBaseViewsWizard implements ViewsWizardInterface { * The display which the options will be applied to. The default display * will actually be assigned the options (and this display will inherit * them) when possible. - * @param object$default_display + * @param object $default_display * The default display, which will store the options when possible. */ protected function set_default_options($options, $display, $default_display) { @@ -899,6 +928,9 @@ class ViewsUiBaseViewsWizard implements ViewsWizardInterface { } } + /** + * + */ protected function retrieve_validated_view($form, $form_state, $unset = TRUE) { $key = hash('sha256', serialize($form_state['values'])); $view = (isset($this->validated_views[$key]) ? $this->validated_views[$key] : NULL); @@ -908,6 +940,9 @@ class ViewsUiBaseViewsWizard implements ViewsWizardInterface { return $view; } + /** + * + */ protected function set_validated_view($form, $form_state, $view) { $key = hash('sha256', serialize($form_state['values'])); $this->validated_views[$key] = $view; @@ -916,7 +951,7 @@ class ViewsUiBaseViewsWizard implements ViewsWizardInterface { /** * Instantiates a view and validates values. */ - function validate($form, &$form_state) { + public function validate($form, &$form_state) { $view = $this->instantiate_view($form, $form_state); $errors = $view->validate(); if (!is_array($errors) || empty($errors)) { @@ -931,7 +966,7 @@ class ViewsUiBaseViewsWizard implements ViewsWizardInterface { * * @throws ViewsWizardException if the values have not been validated. */ - function create_view($form, &$form_state) { + public function create_view($form, &$form_state) { $view = $this->retrieve_validated_view($form, $form_state); if (empty($view)) { throw new ViewsWizardException(t('Attempted to create_view with values that have not been validated')); diff --git a/drupal7/web/sites/all/modules/contrib/views/plugins/views_wizard/views_ui_comment_views_wizard.class.php b/drupal7/web/sites/all/modules/contrib/views/plugins/views_wizard/views_ui_comment_views_wizard.class.php index 4b68e98..bf691f9 100644 --- a/drupal7/web/sites/all/modules/contrib/views/plugins/views_wizard/views_ui_comment_views_wizard.class.php +++ b/drupal7/web/sites/all/modules/contrib/views/plugins/views_wizard/views_ui_comment_views_wizard.class.php @@ -10,6 +10,9 @@ */ class ViewsUiCommentViewsWizard extends ViewsUiBaseViewsWizard { + /** + * + */ protected function row_style_options($type) { $options = array(); $options['comment'] = t('comments'); @@ -17,6 +20,9 @@ class ViewsUiCommentViewsWizard extends ViewsUiBaseViewsWizard { return $options; } + /** + * + */ protected function build_form_style(&$form, &$form_state, $type) { parent::build_form_style($form, $form_state, $type); $style_form =& $form['displays'][$type]['options']['style']; @@ -42,6 +48,9 @@ class ViewsUiCommentViewsWizard extends ViewsUiBaseViewsWizard { } } + /** + * + */ protected function page_display_options($form, $form_state) { $display_options = parent::page_display_options($form, $form_state); $row_plugin = isset($form_state['values']['page']['style']['row_plugin']) ? $form_state['values']['page']['style']['row_plugin'] : NULL; @@ -50,6 +59,9 @@ class ViewsUiCommentViewsWizard extends ViewsUiBaseViewsWizard { return $display_options; } + /** + * + */ protected function block_display_options($form, $form_state) { $display_options = parent::block_display_options($form, $form_state); $row_plugin = isset($form_state['values']['block']['style']['row_plugin']) ? $form_state['values']['block']['style']['row_plugin'] : NULL; @@ -61,7 +73,7 @@ class ViewsUiCommentViewsWizard extends ViewsUiBaseViewsWizard { /** * Set the row style and row style plugins to the display_options. */ - protected function display_options_row(&$display_options, $row_plugin, $row_options) { + protected function display_options_row(&$display_options, $row_plugin, $row_options) { switch ($row_plugin) { case 'comment': $display_options['row_plugin'] = 'comment'; @@ -70,6 +82,9 @@ class ViewsUiCommentViewsWizard extends ViewsUiBaseViewsWizard { } } + /** + * + */ protected function default_display_options($form, $form_state) { $display_options = parent::default_display_options($form, $form_state); diff --git a/drupal7/web/sites/all/modules/contrib/views/plugins/views_wizard/views_ui_file_managed_views_wizard.class.php b/drupal7/web/sites/all/modules/contrib/views/plugins/views_wizard/views_ui_file_managed_views_wizard.class.php index 12435cb..d761840 100644 --- a/drupal7/web/sites/all/modules/contrib/views/plugins/views_wizard/views_ui_file_managed_views_wizard.class.php +++ b/drupal7/web/sites/all/modules/contrib/views/plugins/views_wizard/views_ui_file_managed_views_wizard.class.php @@ -10,6 +10,9 @@ */ class ViewsUiFileManagedViewsWizard extends ViewsUiBaseViewsWizard { + /** + * + */ protected function default_display_options($form, $form_state) { $display_options = parent::default_display_options($form, $form_state); diff --git a/drupal7/web/sites/all/modules/contrib/views/plugins/views_wizard/views_ui_node_revision_views_wizard.class.php b/drupal7/web/sites/all/modules/contrib/views/plugins/views_wizard/views_ui_node_revision_views_wizard.class.php index 49d52e0..ee465e8 100644 --- a/drupal7/web/sites/all/modules/contrib/views/plugins/views_wizard/views_ui_node_revision_views_wizard.class.php +++ b/drupal7/web/sites/all/modules/contrib/views/plugins/views_wizard/views_ui_node_revision_views_wizard.class.php @@ -20,6 +20,9 @@ class ViewsUiNodeRevisionViewsWizard extends ViewsUiNodeViewsWizard { return $options; } + /** + * + */ protected function default_display_options($form, $form_state) { $display_options = parent::default_display_options($form, $form_state); diff --git a/drupal7/web/sites/all/modules/contrib/views/plugins/views_wizard/views_ui_node_views_wizard.class.php b/drupal7/web/sites/all/modules/contrib/views/plugins/views_wizard/views_ui_node_views_wizard.class.php index ffdd7d1..dc62527 100644 --- a/drupal7/web/sites/all/modules/contrib/views/plugins/views_wizard/views_ui_node_views_wizard.class.php +++ b/drupal7/web/sites/all/modules/contrib/views/plugins/views_wizard/views_ui_node_views_wizard.class.php @@ -10,6 +10,9 @@ */ class ViewsUiNodeViewsWizard extends ViewsUiBaseViewsWizard { + /** + * + */ protected function row_style_options($type) { $options = array(); $options['teasers'] = t('teasers'); @@ -20,6 +23,9 @@ class ViewsUiNodeViewsWizard extends ViewsUiBaseViewsWizard { return $options; } + /** + * + */ protected function build_form_style(&$form, &$form_state, $type) { parent::build_form_style($form, $form_state, $type); $style_form =& $form['displays'][$type]['options']['style']; @@ -91,6 +97,9 @@ class ViewsUiNodeViewsWizard extends ViewsUiBaseViewsWizard { return $display_options; } + /** + * + */ protected function page_display_options($form, $form_state) { $display_options = parent::page_display_options($form, $form_state); $row_plugin = isset($form_state['values']['page']['style']['row_plugin']) ? $form_state['values']['page']['style']['row_plugin'] : NULL; @@ -99,6 +108,9 @@ class ViewsUiNodeViewsWizard extends ViewsUiBaseViewsWizard { return $display_options; } + /** + * + */ protected function block_display_options($form, $form_state) { $display_options = parent::block_display_options($form, $form_state); $row_plugin = isset($form_state['values']['block']['style']['row_plugin']) ? $form_state['values']['block']['style']['row_plugin'] : NULL; @@ -110,7 +122,7 @@ class ViewsUiNodeViewsWizard extends ViewsUiBaseViewsWizard { /** * Set the row style and row style plugins to the display_options. */ - protected function display_options_row(&$display_options, $row_plugin, $row_options) { + protected function display_options_row(&$display_options, $row_plugin, $row_options) { switch ($row_plugin) { case 'full_posts': $display_options['row_plugin'] = 'node'; diff --git a/drupal7/web/sites/all/modules/contrib/views/plugins/views_wizard/views_ui_taxonomy_term_views_wizard.class.php b/drupal7/web/sites/all/modules/contrib/views/plugins/views_wizard/views_ui_taxonomy_term_views_wizard.class.php index b73156e..5ba02b0 100644 --- a/drupal7/web/sites/all/modules/contrib/views/plugins/views_wizard/views_ui_taxonomy_term_views_wizard.class.php +++ b/drupal7/web/sites/all/modules/contrib/views/plugins/views_wizard/views_ui_taxonomy_term_views_wizard.class.php @@ -10,6 +10,9 @@ */ class ViewsUiTaxonomyTermViewsWizard extends ViewsUiBaseViewsWizard { + /** + * + */ protected function default_display_options($form, $form_state) { $display_options = parent::default_display_options($form, $form_state); diff --git a/drupal7/web/sites/all/modules/contrib/views/plugins/views_wizard/views_ui_users_views_wizard.class.php b/drupal7/web/sites/all/modules/contrib/views/plugins/views_wizard/views_ui_users_views_wizard.class.php index c20c89e..718ac63 100644 --- a/drupal7/web/sites/all/modules/contrib/views/plugins/views_wizard/views_ui_users_views_wizard.class.php +++ b/drupal7/web/sites/all/modules/contrib/views/plugins/views_wizard/views_ui_users_views_wizard.class.php @@ -10,6 +10,9 @@ */ class ViewsUiUsersViewsWizard extends ViewsUiBaseViewsWizard { + /** + * + */ protected function default_display_options($form, $form_state) { $display_options = parent::default_display_options($form, $form_state); diff --git a/drupal7/web/sites/all/modules/contrib/views/tests/comment/views_handler_argument_comment_user_uid.test b/drupal7/web/sites/all/modules/contrib/views/tests/comment/views_handler_argument_comment_user_uid.test index f6cc296..dc278e6 100644 --- a/drupal7/web/sites/all/modules/contrib/views/tests/comment/views_handler_argument_comment_user_uid.test +++ b/drupal7/web/sites/all/modules/contrib/views/tests/comment/views_handler_argument_comment_user_uid.test @@ -10,6 +10,9 @@ */ class viewsHandlerArgumentCommentUserUidTest extends ViewsSqlTest { + /** + * + */ public static function getInfo() { return array( 'name' => 'Tests handler argument_comment_user_uid', @@ -26,7 +29,7 @@ class viewsHandlerArgumentCommentUserUidTest extends ViewsSqlTest { * @param array $comment * Comment to save. */ - function postComment($node, $comment = array()) { + public function postComment($node, $comment = array()) { $comment += array( 'uid' => $this->loggedInUser->uid, 'nid' => $node->nid, @@ -54,7 +57,10 @@ class viewsHandlerArgumentCommentUserUidTest extends ViewsSqlTest { $this->postComment($this->node_user_commented); } - function testCommentUserUidTest() { + /** + * + */ + public function testCommentUserUidTest() { $view = $this->view_comment_user_uid(); $this->executeView($view, array($this->account->uid)); @@ -71,7 +77,10 @@ class viewsHandlerArgumentCommentUserUidTest extends ViewsSqlTest { $this->assertIdenticalResultset($view, $resultset, $this->column_map); } - function view_comment_user_uid() { + /** + * + */ + public function view_comment_user_uid() { $view = new view(); $view->name = 'test_comment_user_uid'; $view->description = ''; diff --git a/drupal7/web/sites/all/modules/contrib/views/tests/comment/views_handler_filter_comment_user_uid.test b/drupal7/web/sites/all/modules/contrib/views/tests/comment/views_handler_filter_comment_user_uid.test index 4093317..e3f5680 100644 --- a/drupal7/web/sites/all/modules/contrib/views/tests/comment/views_handler_filter_comment_user_uid.test +++ b/drupal7/web/sites/all/modules/contrib/views/tests/comment/views_handler_filter_comment_user_uid.test @@ -11,6 +11,10 @@ * The actual stuff is done in the parent class. */ class viewsHandlerFilterCommentUserUidTest extends viewsHandlerArgumentCommentUserUidTest { + + /** + * + */ public static function getInfo() { return array( 'name' => 'Tests handler filter_comment_user_uid', @@ -23,7 +27,7 @@ class viewsHandlerFilterCommentUserUidTest extends viewsHandlerArgumentCommentUs * Override the view from the argument test case to remove the argument and * add filter with the uid as the value. */ - function view_comment_user_uid() { + public function view_comment_user_uid() { $view = parent::view_comment_user_uid(); // Remove the argument. $view->set_item('default', 'argument', 'uid_touch', NULL); diff --git a/drupal7/web/sites/all/modules/contrib/views/tests/field/views_fieldapi.test b/drupal7/web/sites/all/modules/contrib/views/tests/field/views_fieldapi.test index 6c4afd2..2d1924c 100644 --- a/drupal7/web/sites/all/modules/contrib/views/tests/field/views_fieldapi.test +++ b/drupal7/web/sites/all/modules/contrib/views/tests/field/views_fieldapi.test @@ -47,13 +47,13 @@ class ViewsFieldApiTestHelper extends ViewsSqlTest { } // Create a user assigned to that role. - $edit = array(); + $edit = array(); $edit['name'] = $this->randomName(); $edit['mail'] = $edit['name'] . '@example.com'; $edit['roles'] = array($rid => $rid); $edit['pass'] = user_password(); $edit['status'] = 1; - $edit += $extra_edit; + $edit += $extra_edit; $account = user_save(drupal_anonymous_user(), $edit); @@ -67,7 +67,10 @@ class ViewsFieldApiTestHelper extends ViewsSqlTest { return $account; } - function setUpFields($amount = 3) { + /** + * + */ + public function setUpFields($amount = 3) { // Create three fields. $field_names = array(); for ($i = 0; $i < $amount; $i++) { @@ -79,7 +82,10 @@ class ViewsFieldApiTestHelper extends ViewsSqlTest { return $field_names; } - function setUpInstances($bundle = 'page') { + /** + * + */ + public function setUpInstances($bundle = 'page') { foreach ($this->fields as $key => $field) { $instance = array( 'field_name' => $field['field_name'], @@ -93,7 +99,7 @@ class ViewsFieldApiTestHelper extends ViewsSqlTest { /** * Clear all views caches and static caches which are required for the patch. */ - function clearViewsCaches() { + public function clearViewsCaches() { // Reset views data cache. drupal_static_reset('_views_fetch_data_cache'); drupal_static_reset('_views_fetch_data_recursion_protected'); @@ -109,8 +115,11 @@ class viewsFieldApiDataTest extends ViewsFieldApiTestHelper { /** * Stores the fields for this test case. */ - var $fields; + public $fields; + /** + * + */ public static function getInfo() { return array( 'name' => 'Fieldapi: Views Data', @@ -186,7 +195,7 @@ class viewsFieldApiDataTest extends ViewsFieldApiTestHelper { * * We check data structure for both node and node revision tables. */ - function testViewsData() { + public function testViewsData() { $data = views_fetch_data(); // Check the table and the joins of the first field. @@ -280,6 +289,9 @@ class viewsFieldApiDataTest extends ViewsFieldApiTestHelper { class viewsHandlerFieldFieldTest extends ViewsFieldApiTestHelper { public $nodes; + /** + * + */ public static function getInfo() { return array( 'name' => 'Fieldapi: Field handler', @@ -325,12 +337,18 @@ class viewsHandlerFieldFieldTest extends ViewsFieldApiTestHelper { } } + /** + * + */ public function testFieldRender() { $this->_testSimpleFieldRender(); $this->_testFormatterSimpleFieldRender(); $this->_testMultipleFieldRender(); } + /** + * + */ public function _testSimpleFieldRender() { $view = $this->getFieldView(); $this->executeView($view); @@ -365,6 +383,9 @@ class viewsHandlerFieldFieldTest extends ViewsFieldApiTestHelper { } } + /** + * + */ public function _testMultipleFieldRender() { $view = $this->getFieldView(); @@ -468,6 +489,9 @@ class viewsHandlerFieldFieldTest extends ViewsFieldApiTestHelper { } } + /** + * + */ protected function getFieldView() { $view = new view(); $view->name = 'view_fieldapi'; @@ -492,7 +516,7 @@ class viewsHandlerFieldFieldTest extends ViewsFieldApiTestHelper { $handler->display->display_options['fields']['nid']['id'] = 'nid'; $handler->display->display_options['fields']['nid']['table'] = 'node'; $handler->display->display_options['fields']['nid']['field'] = 'nid'; - foreach ($this->fields as $key => $field) { + foreach ($this->fields as $field) { $handler->display->display_options['fields'][$field['field_name']]['id'] = $field['field_name']; $handler->display->display_options['fields'][$field['field_name']]['table'] = 'field_data_' . $field['field_name']; $handler->display->display_options['fields'][$field['field_name']]['field'] = $field['field_name']; diff --git a/drupal7/web/sites/all/modules/contrib/views/tests/handlers/views_handler_area_text.test b/drupal7/web/sites/all/modules/contrib/views/tests/handlers/views_handler_area_text.test index c5ebe81..3a7909b 100644 --- a/drupal7/web/sites/all/modules/contrib/views/tests/handlers/views_handler_area_text.test +++ b/drupal7/web/sites/all/modules/contrib/views/tests/handlers/views_handler_area_text.test @@ -11,6 +11,10 @@ * @see views_handler_area_text */ class ViewsHandlerAreaTextTest extends ViewsSqlTest { + + /** + * + */ public static function getInfo() { return array( 'name' => 'Area: Text', @@ -19,10 +23,13 @@ class ViewsHandlerAreaTextTest extends ViewsSqlTest { ); } + /** + * + */ public function testAreaText() { $view = $this->getBasicView(); - // add a text header. + // Add a text header. $string = $this->randomName(); $view->display['default']->handler->override_option('header', array( 'area' => array( diff --git a/drupal7/web/sites/all/modules/contrib/views/tests/handlers/views_handler_argument_null.test b/drupal7/web/sites/all/modules/contrib/views/tests/handlers/views_handler_argument_null.test index 95db4df..43e767d 100644 --- a/drupal7/web/sites/all/modules/contrib/views/tests/handlers/views_handler_argument_null.test +++ b/drupal7/web/sites/all/modules/contrib/views/tests/handlers/views_handler_argument_null.test @@ -9,6 +9,10 @@ * Tests the core views_handler_argument_null handler. */ class ViewsHandlerArgumentNullTest extends ViewsSqlTest { + + /** + * + */ public static function getInfo() { return array( 'name' => 'Argument: Null', @@ -17,19 +21,24 @@ class ViewsHandlerArgumentNullTest extends ViewsSqlTest { ); } - function viewsData() { + /** + * + */ + public function viewsData() { $data = parent::viewsData(); $data['views_test']['id']['argument']['handler'] = 'views_handler_argument_null'; return $data; } + /** + * + */ public function testAreaText() { // Test validation. $view = $this->getBasicView(); // Add a null argument. - $string = $this->randomString(); $view->display['default']->handler->override_option('arguments', array( 'null' => array( 'id' => 'null', @@ -43,7 +52,7 @@ class ViewsHandlerArgumentNullTest extends ViewsSqlTest { // Make sure that the argument is not validated yet. unset($view->argument['null']->argument_validated); $this->assertTrue($view->argument['null']->validate_arg(26)); - // test must_not_be option. + // Test must_not_be option. unset($view->argument['null']->argument_validated); $view->argument['null']->options['must_not_be'] = TRUE; $this->assertFalse($view->argument['null']->validate_arg(26), 'must_not_be returns FALSE, if there is an argument'); @@ -54,7 +63,6 @@ class ViewsHandlerArgumentNullTest extends ViewsSqlTest { $view = $this->getBasicView(); // Add a argument, which has null as handler. - $string = $this->randomString(); $view->display['default']->handler->override_option('arguments', array( 'id' => array( 'id' => 'id', diff --git a/drupal7/web/sites/all/modules/contrib/views/tests/handlers/views_handler_field_boolean.test b/drupal7/web/sites/all/modules/contrib/views/tests/handlers/views_handler_field_boolean.test index 38eb38c..e1e5239 100644 --- a/drupal7/web/sites/all/modules/contrib/views/tests/handlers/views_handler_field_boolean.test +++ b/drupal7/web/sites/all/modules/contrib/views/tests/handlers/views_handler_field_boolean.test @@ -9,6 +9,10 @@ * Tests the core views_handler_field_boolean handler. */ class ViewsHandlerFieldBooleanTest extends ViewsSqlTest { + + /** + * + */ public static function getInfo() { return array( 'name' => 'Field: Boolean', @@ -17,7 +21,10 @@ class ViewsHandlerFieldBooleanTest extends ViewsSqlTest { ); } - function dataSet() { + /** + * + */ + public function dataSet() { // Use default dataset but remove the age from john and paul. $data = parent::dataSet(); $data[0]['age'] = 0; @@ -25,12 +32,18 @@ class ViewsHandlerFieldBooleanTest extends ViewsSqlTest { return $data; } - function viewsData() { + /** + * + */ + public function viewsData() { $data = parent::viewsData(); $data['views_test']['age']['field']['handler'] = 'views_handler_field_boolean'; return $data; } + /** + * + */ public function testFieldBoolean() { $view = $this->getBasicView(); @@ -61,7 +74,7 @@ class ViewsHandlerFieldBooleanTest extends ViewsSqlTest { $this->assertEqual(t('False'), $view->field['age']->advanced_render($view->result[0])); $this->assertEqual(t('True'), $view->field['age']->advanced_render($view->result[1])); - // test awesome unicode. + // Test awesome unicode. $view->field['age']->options['type'] = 'unicode-yes-no'; $this->assertEqual('✖', $view->field['age']->advanced_render($view->result[0])); $this->assertEqual('✔', $view->field['age']->advanced_render($view->result[1])); diff --git a/drupal7/web/sites/all/modules/contrib/views/tests/handlers/views_handler_field_counter.test b/drupal7/web/sites/all/modules/contrib/views/tests/handlers/views_handler_field_counter.test index 9a4766a..47353e5 100644 --- a/drupal7/web/sites/all/modules/contrib/views/tests/handlers/views_handler_field_counter.test +++ b/drupal7/web/sites/all/modules/contrib/views/tests/handlers/views_handler_field_counter.test @@ -9,6 +9,10 @@ * Tests the views_handler_field_counter handler. */ class ViewsHandlerFilterCounterTest extends ViewsSqlTest { + + /** + * + */ public static function getInfo() { return array( 'name' => 'Field: Counter', @@ -17,7 +21,10 @@ class ViewsHandlerFilterCounterTest extends ViewsSqlTest { ); } - function testSimple() { + /** + * + */ + public function testSimple() { $view = $this->getBasicView(); $view->display['default']->handler->override_option('fields', array( 'counter' => array( @@ -64,8 +71,10 @@ class ViewsHandlerFilterCounterTest extends ViewsSqlTest { $this->assertEqual(2 + $rand_start, $view->style_plugin->rendered_fields[2]['counter']); } - // @todo Write tests for pager. - function testPager() { + /** + * @todo Write tests for pager. + */ + public function testPager() { } } diff --git a/drupal7/web/sites/all/modules/contrib/views/tests/handlers/views_handler_field_custom.test b/drupal7/web/sites/all/modules/contrib/views/tests/handlers/views_handler_field_custom.test index b8f8a08..eec335c 100644 --- a/drupal7/web/sites/all/modules/contrib/views/tests/handlers/views_handler_field_custom.test +++ b/drupal7/web/sites/all/modules/contrib/views/tests/handlers/views_handler_field_custom.test @@ -9,6 +9,10 @@ * Tests the core views_handler_field_custom handler. */ class ViewsHandlerFieldCustomTest extends ViewsSqlTest { + + /** + * + */ public static function getInfo() { return array( 'name' => 'Field: Custom', @@ -17,12 +21,18 @@ class ViewsHandlerFieldCustomTest extends ViewsSqlTest { ); } - function viewsData() { + /** + * + */ + public function viewsData() { $data = parent::viewsData(); $data['views_test']['name']['field']['handler'] = 'views_handler_field_custom'; return $data; } + /** + * + */ public function testFieldCustom() { $view = $this->getBasicView(); diff --git a/drupal7/web/sites/all/modules/contrib/views/tests/handlers/views_handler_field_date.test b/drupal7/web/sites/all/modules/contrib/views/tests/handlers/views_handler_field_date.test index 54cbf0e..cca1654 100644 --- a/drupal7/web/sites/all/modules/contrib/views/tests/handlers/views_handler_field_date.test +++ b/drupal7/web/sites/all/modules/contrib/views/tests/handlers/views_handler_field_date.test @@ -24,7 +24,7 @@ class ViewsHandlerFieldDateTest extends ViewsSqlTest { /** * */ - function viewsData() { + public function viewsData() { $data = parent::viewsData(); $data['views_test']['created']['field']['handler'] = 'views_handler_field_date'; return $data; @@ -42,7 +42,7 @@ class ViewsHandlerFieldDateTest extends ViewsSqlTest { 'table' => 'views_test', 'field' => 'created', 'relationship' => 'none', - // c is iso 8601 date format. + // Use the ISO-8601 date format. // @see http://php.net/manual/en/function.date.php 'custom_date_format' => 'c', 'second_date_format' => 'custom', diff --git a/drupal7/web/sites/all/modules/contrib/views/tests/handlers/views_handler_field_file_extension.test b/drupal7/web/sites/all/modules/contrib/views/tests/handlers/views_handler_field_file_extension.test index ddc12f9..f8688dd 100644 --- a/drupal7/web/sites/all/modules/contrib/views/tests/handlers/views_handler_field_file_extension.test +++ b/drupal7/web/sites/all/modules/contrib/views/tests/handlers/views_handler_field_file_extension.test @@ -9,6 +9,10 @@ * Tests the views_handler_field_file_extension handler. */ class ViewsHandlerFileExtensionTest extends ViewsSqlTest { + + /** + * + */ public static function getInfo() { return array( 'name' => 'Field: File extension', @@ -17,7 +21,10 @@ class ViewsHandlerFileExtensionTest extends ViewsSqlTest { ); } - function dataSet() { + /** + * + */ + public function dataSet() { $data = parent::dataSet(); $data[0]['name'] = 'file.png'; $data[1]['name'] = 'file.tar'; @@ -27,7 +34,10 @@ class ViewsHandlerFileExtensionTest extends ViewsSqlTest { return $data; } - function viewsData() { + /** + * + */ + public function viewsData() { $data = parent::viewsData(); $data['views_test']['name']['field']['handler'] = 'views_handler_field_file_extension'; $data['views_test']['name']['real field'] = 'name'; diff --git a/drupal7/web/sites/all/modules/contrib/views/tests/handlers/views_handler_field_file_size.test b/drupal7/web/sites/all/modules/contrib/views/tests/handlers/views_handler_field_file_size.test index a8828c7..9105f5c 100644 --- a/drupal7/web/sites/all/modules/contrib/views/tests/handlers/views_handler_field_file_size.test +++ b/drupal7/web/sites/all/modules/contrib/views/tests/handlers/views_handler_field_file_size.test @@ -11,6 +11,10 @@ * @see CommonXssUnitTest */ class ViewsHandlerTestFileSize extends ViewsSqlTest { + + /** + * + */ public static function getInfo() { return array( 'name' => 'Field: file_size', @@ -19,7 +23,10 @@ class ViewsHandlerTestFileSize extends ViewsSqlTest { ); } - function dataSet() { + /** + * + */ + public function dataSet() { $data = parent::dataSet(); $data[0]['age'] = 0; $data[1]['age'] = 10; @@ -29,13 +36,19 @@ class ViewsHandlerTestFileSize extends ViewsSqlTest { return $data; } - function viewsData() { + /** + * + */ + public function viewsData() { $data = parent::viewsData(); $data['views_test']['age']['field']['handler'] = 'views_handler_field_file_size'; return $data; } + /** + * + */ public function testFieldFileSize() { $view = $this->getBasicView(); diff --git a/drupal7/web/sites/all/modules/contrib/views/tests/handlers/views_handler_field_math.test b/drupal7/web/sites/all/modules/contrib/views/tests/handlers/views_handler_field_math.test index cd39528..a057327 100644 --- a/drupal7/web/sites/all/modules/contrib/views/tests/handlers/views_handler_field_math.test +++ b/drupal7/web/sites/all/modules/contrib/views/tests/handlers/views_handler_field_math.test @@ -9,6 +9,10 @@ * Tests the core views_handler_field_math handler. */ class ViewsHandlerFieldMath extends ViewsSqlTest { + + /** + * + */ public static function getInfo() { return array( 'name' => 'Field: Math', @@ -17,11 +21,17 @@ class ViewsHandlerFieldMath extends ViewsSqlTest { ); } - function viewsData() { + /** + * + */ + public function viewsData() { $data = parent::viewsData(); return $data; } + /** + * + */ public function testFieldCustom() { $view = $this->getBasicView(); diff --git a/drupal7/web/sites/all/modules/contrib/views/tests/handlers/views_handler_field_url.test b/drupal7/web/sites/all/modules/contrib/views/tests/handlers/views_handler_field_url.test index ad6f71d..fb80f7d 100644 --- a/drupal7/web/sites/all/modules/contrib/views/tests/handlers/views_handler_field_url.test +++ b/drupal7/web/sites/all/modules/contrib/views/tests/handlers/views_handler_field_url.test @@ -9,6 +9,10 @@ * Tests the core views_handler_field_url handler. */ class ViewsHandlerFieldUrlTest extends ViewsSqlTest { + + /** + * + */ public static function getInfo() { return array( 'name' => 'Field: Url', @@ -17,12 +21,18 @@ class ViewsHandlerFieldUrlTest extends ViewsSqlTest { ); } - function viewsData() { + /** + * + */ + public function viewsData() { $data = parent::viewsData(); $data['views_test']['name']['field']['handler'] = 'views_handler_field_url'; return $data; } + /** + * + */ public function testFieldUrl() { $view = $this->getBasicView(); diff --git a/drupal7/web/sites/all/modules/contrib/views/tests/handlers/views_handler_field_xss.test b/drupal7/web/sites/all/modules/contrib/views/tests/handlers/views_handler_field_xss.test index 37bb2f2..79aa077 100644 --- a/drupal7/web/sites/all/modules/contrib/views/tests/handlers/views_handler_field_xss.test +++ b/drupal7/web/sites/all/modules/contrib/views/tests/handlers/views_handler_field_xss.test @@ -11,6 +11,10 @@ * @see CommonXssUnitTest */ class ViewsHandlerTestXss extends ViewsSqlTest { + + /** + * + */ public static function getInfo() { return array( 'name' => 'Field: Xss', @@ -19,7 +23,10 @@ class ViewsHandlerTestXss extends ViewsSqlTest { ); } - function dataHelper() { + /** + * + */ + public function dataHelper() { $map = array( 'John' => 'John', "Foo\xC0barbaz" => '', @@ -29,13 +36,19 @@ class ViewsHandlerTestXss extends ViewsSqlTest { return $map; } - function viewsData() { + /** + * + */ + public function viewsData() { $data = parent::viewsData(); $data['views_test']['name']['field']['handler'] = 'views_handler_field_xss'; return $data; } + /** + * + */ public function testFieldXss() { $view = $this->getBasicView(); diff --git a/drupal7/web/sites/all/modules/contrib/views/tests/handlers/views_handler_filter_combine.test b/drupal7/web/sites/all/modules/contrib/views/tests/handlers/views_handler_filter_combine.test index d81b456..c338dbd 100644 --- a/drupal7/web/sites/all/modules/contrib/views/tests/handlers/views_handler_filter_combine.test +++ b/drupal7/web/sites/all/modules/contrib/views/tests/handlers/views_handler_filter_combine.test @@ -9,8 +9,11 @@ * Tests the combine filter handler. */ class ViewsHandlerFilterCombineTest extends ViewsSqlTest { - var $column_map = array(); + public $column_map = array(); + /** + * + */ public static function getInfo() { return array( 'name' => 'Filter: Combine', @@ -31,9 +34,11 @@ class ViewsHandlerFilterCombineTest extends ViewsSqlTest { ); } + /** + * + */ protected function getBasicView() { $view = parent::getBasicView(); - $fields = $view->display['default']->handler->options['fields']; $view->display['default']->display_options['fields']['job'] = array( 'id' => 'job', 'table' => 'views_test', @@ -43,6 +48,9 @@ class ViewsHandlerFilterCombineTest extends ViewsSqlTest { return $view; } + /** + * + */ public function testFilterCombineContains() { $view = $this->getBasicView(); diff --git a/drupal7/web/sites/all/modules/contrib/views/tests/handlers/views_handler_filter_date.test b/drupal7/web/sites/all/modules/contrib/views/tests/handlers/views_handler_filter_date.test index 5e8f34b..5d15d8d 100644 --- a/drupal7/web/sites/all/modules/contrib/views/tests/handlers/views_handler_filter_date.test +++ b/drupal7/web/sites/all/modules/contrib/views/tests/handlers/views_handler_filter_date.test @@ -9,6 +9,10 @@ * Tests the core views_handler_filter_date handler. */ class ViewsHandlerFilterDateTest extends ViewsSqlTest { + + /** + * + */ public static function getInfo() { return array( 'name' => 'Filter: Date', @@ -39,7 +43,7 @@ class ViewsHandlerFilterDateTest extends ViewsSqlTest { /** * Test the general offset functionality. */ - function testOffset() { + public function testOffset() { $view = $this->views_test_offset(); // Test offset for simple operator. $view->set_display('default'); @@ -100,11 +104,10 @@ class ViewsHandlerFilterDateTest extends ViewsSqlTest { $view->destroy(); } - /** * Tests the filter operator between/not between. */ - function testBetween() { + public function testBetween() { // Test between with min and max. $view = $this->views_test_between(); $view->set_display('default'); @@ -168,7 +171,7 @@ class ViewsHandlerFilterDateTest extends ViewsSqlTest { /** * Make sure the validation callbacks works. */ - function testUiValidation() { + public function testUiValidation() { $view = $this->views_test_between(); $view->save(); @@ -185,7 +188,10 @@ class ViewsHandlerFilterDateTest extends ViewsSqlTest { $this->assertText(t('Invalid date format.'), 'Make sure that validation is runned and the invalidate date format is identified.'); } - function views_test_between() { + /** + * + */ + public function views_test_between() { $view = new view(); $view->name = 'test_filter_date_between'; $view->description = ''; @@ -218,7 +224,10 @@ class ViewsHandlerFilterDateTest extends ViewsSqlTest { return $view; } - function views_test_offset() { + /** + * + */ + public function views_test_offset() { $view = $this->views_test_between(); return $view; } diff --git a/drupal7/web/sites/all/modules/contrib/views/tests/handlers/views_handler_filter_equality.test b/drupal7/web/sites/all/modules/contrib/views/tests/handlers/views_handler_filter_equality.test index 1c3abd6..4da4761 100644 --- a/drupal7/web/sites/all/modules/contrib/views/tests/handlers/views_handler_filter_equality.test +++ b/drupal7/web/sites/all/modules/contrib/views/tests/handlers/views_handler_filter_equality.test @@ -9,6 +9,10 @@ * Tests the core views_handler_filter_equality handler. */ class ViewsHandlerFilterEqualityTest extends ViewsSqlTest { + + /** + * + */ public static function getInfo() { return array( 'name' => 'Filter: Equality', @@ -28,14 +32,20 @@ class ViewsHandlerFilterEqualityTest extends ViewsSqlTest { ); } - function viewsData() { + /** + * + */ + public function viewsData() { $data = parent::viewsData(); $data['views_test']['name']['filter']['handler'] = 'views_handler_filter_equality'; return $data; } - function testEqual() { + /** + * + */ + public function testEqual() { $view = $this->getBasicView(); // Change the filtering. @@ -59,6 +69,9 @@ class ViewsHandlerFilterEqualityTest extends ViewsSqlTest { $this->assertIdenticalResultset($view, $resultset, $this->column_map); } + /** + * + */ public function testEqualGroupedExposed() { $filters = $this->getGroupedExposedFilters(); $view = $this->getBasicPageView(); @@ -77,7 +90,10 @@ class ViewsHandlerFilterEqualityTest extends ViewsSqlTest { $this->assertIdenticalResultset($view, $resultset, $this->column_map); } - function testNotEqual() { + /** + * + */ + public function testNotEqual() { $view = $this->getBasicView(); // Change the filtering. @@ -110,6 +126,9 @@ class ViewsHandlerFilterEqualityTest extends ViewsSqlTest { $this->assertIdenticalResultset($view, $resultset, $this->column_map); } + /** + * + */ public function testEqualGroupedNotExposed() { $filters = $this->getGroupedExposedFilters(); $view = $this->getBasicPageView(); @@ -137,7 +156,9 @@ class ViewsHandlerFilterEqualityTest extends ViewsSqlTest { $this->assertIdenticalResultset($view, $resultset, $this->column_map); } - + /** + * + */ protected function getGroupedExposedFilters() { $filters = array( 'name' => array( diff --git a/drupal7/web/sites/all/modules/contrib/views/tests/handlers/views_handler_filter_in_operator.test b/drupal7/web/sites/all/modules/contrib/views/tests/handlers/views_handler_filter_in_operator.test index 3a20f8c..12379b9 100644 --- a/drupal7/web/sites/all/modules/contrib/views/tests/handlers/views_handler_filter_in_operator.test +++ b/drupal7/web/sites/all/modules/contrib/views/tests/handlers/views_handler_filter_in_operator.test @@ -9,6 +9,10 @@ * Tests the core views_handler_filter_in_operator handler. */ class ViewsHandlerFilterInOperator extends ViewsSqlTest { + + /** + * + */ public static function getInfo() { return array( 'name' => 'Filter: in_operator', @@ -17,13 +21,19 @@ class ViewsHandlerFilterInOperator extends ViewsSqlTest { ); } - function viewsData() { + /** + * + */ + public function viewsData() { $data = parent::viewsData(); $data['views_test']['age']['filter']['handler'] = 'views_handler_filter_in_operator'; return $data; } + /** + * + */ public function testFilterInOperatorSimple() { $view = $this->getBasicView(); @@ -95,11 +105,14 @@ class ViewsHandlerFilterInOperator extends ViewsSqlTest { )); } + /** + * + */ public function testFilterInOperatorGroupedExposedSimple() { $filters = $this->getGroupedExposedFilters(); $view = $this->getBasicPageView(); - // Filter: Age, Operator: in, Value: 26, 30 + // Filter: Age, Operator: in, Value: 26, 30. $filters['age']['group_info']['default_group'] = 1; $view->set_display('page_1'); $view->display['page_1']->handler->override_option('filters', $filters); @@ -124,11 +137,14 @@ class ViewsHandlerFilterInOperator extends ViewsSqlTest { )); } + /** + * + */ public function testFilterNotInOperatorGroupedExposedSimple() { $filters = $this->getGroupedExposedFilters(); $view = $this->getBasicPageView(); - // Filter: Age, Operator: in, Value: 26, 30 + // Filter: Age, Operator: in, Value: 26, 30. $filters['age']['group_info']['default_group'] = 2; $view->set_display('page_1'); $view->display['page_1']->handler->override_option('filters', $filters); @@ -157,6 +173,9 @@ class ViewsHandlerFilterInOperator extends ViewsSqlTest { )); } + /** + * + */ protected function getGroupedExposedFilters() { $filters = array( 'age' => array( diff --git a/drupal7/web/sites/all/modules/contrib/views/tests/handlers/views_handler_filter_numeric.test b/drupal7/web/sites/all/modules/contrib/views/tests/handlers/views_handler_filter_numeric.test index 6faf9d1..d45feed 100644 --- a/drupal7/web/sites/all/modules/contrib/views/tests/handlers/views_handler_filter_numeric.test +++ b/drupal7/web/sites/all/modules/contrib/views/tests/handlers/views_handler_filter_numeric.test @@ -9,8 +9,11 @@ * Tests the numeric filter handler. */ class ViewsHandlerFilterNumericTest extends ViewsSqlTest { - var $column_map = array(); + public $column_map = array(); + /** + * + */ public static function getInfo() { return array( 'name' => 'Filter: Numeric', @@ -28,7 +31,7 @@ class ViewsHandlerFilterNumericTest extends ViewsSqlTest { 'name' => 'Charles', 'age' => NULL, 'job' => 'Bassist', - 'created' => gmmktime(6, 30, 10, 1, 1, 2001), + 'created' => gmmktime(6, 30, 10, 1, 1, 2001), ); return $data_set; } @@ -55,7 +58,10 @@ class ViewsHandlerFilterNumericTest extends ViewsSqlTest { ); } - function viewsData() { + /** + * + */ + public function viewsData() { $data = parent::viewsData(); $data['views_test']['age']['filter']['allow empty'] = TRUE; $data['views_test']['id']['filter']['allow empty'] = FALSE; @@ -63,6 +69,9 @@ class ViewsHandlerFilterNumericTest extends ViewsSqlTest { return $data; } + /** + * + */ public function testFilterNumericSimple() { $view = $this->getBasicView(); @@ -88,11 +97,14 @@ class ViewsHandlerFilterNumericTest extends ViewsSqlTest { $this->assertIdenticalResultset($view, $resultset, $this->column_map); } + /** + * + */ public function testFilterNumericExposedGroupedSimple() { $filters = $this->getGroupedExposedFilters(); $view = $this->getBasicPageView(); - // Filter: Age, Operator: =, Value: 28 + // Filter: Age, Operator: =, Value: 28. $filters['age']['group_info']['default_group'] = 1; $view->set_display('page_1'); $view->display['page_1']->handler->override_option('filters', $filters); @@ -107,6 +119,9 @@ class ViewsHandlerFilterNumericTest extends ViewsSqlTest { $this->assertIdenticalResultset($view, $resultset, $this->column_map); } + /** + * + */ public function testFilterNumericBetween() { $view = $this->getBasicView(); @@ -179,11 +194,14 @@ class ViewsHandlerFilterNumericTest extends ViewsSqlTest { $this->assertIdenticalResultset($view, $resultset, $this->column_map); } + /** + * + */ public function testFilterNumericExposedGroupedBetween() { $filters = $this->getGroupedExposedFilters(); $view = $this->getBasicPageView(); - // Filter: Age, Operator: between, Value: 26 and 29 + // Filter: Age, Operator: between, Value: 26 and 29. $filters['age']['group_info']['default_group'] = 2; $view->set_display('page_1'); $view->display['page_1']->handler->override_option('filters', $filters); @@ -206,11 +224,14 @@ class ViewsHandlerFilterNumericTest extends ViewsSqlTest { $this->assertIdenticalResultset($view, $resultset, $this->column_map); } + /** + * + */ public function testFilterNumericExposedGroupedNotBetween() { $filters = $this->getGroupedExposedFilters(); $view = $this->getBasicPageView(); - // Filter: Age, Operator: not between, Value: 26 and 29 + // Filter: Age, Operator: not between, Value: 26 and 29. $filters['age']['group_info']['default_group'] = 3; $view->set_display('page_1'); $view->display['page_1']->handler->override_option('filters', $filters); @@ -233,7 +254,9 @@ class ViewsHandlerFilterNumericTest extends ViewsSqlTest { $this->assertIdenticalResultset($view, $resultset, $this->column_map); } - + /** + * + */ public function testFilterNumericEmpty() { $view = $this->getBasicView(); @@ -297,7 +320,9 @@ class ViewsHandlerFilterNumericTest extends ViewsSqlTest { $this->assertIdenticalResultset($view, $resultset, $this->column_map); } - + /** + * + */ public function testFilterNumericExposedGroupedEmpty() { $filters = $this->getGroupedExposedFilters(); $view = $this->getBasicPageView(); @@ -317,6 +342,9 @@ class ViewsHandlerFilterNumericTest extends ViewsSqlTest { $this->assertIdenticalResultset($view, $resultset, $this->column_map); } + /** + * + */ public function testFilterNumericExposedGroupedNotEmpty() { $filters = $this->getGroupedExposedFilters(); $view = $this->getBasicPageView(); @@ -368,7 +396,6 @@ class ViewsHandlerFilterNumericTest extends ViewsSqlTest { $view->display['default']->handler->override_option('filters', $filters); - $this->executeView($view); $form = array(); @@ -617,6 +644,9 @@ class ViewsHandlerFilterNumericTest extends ViewsSqlTest { $this->assertIdenticalResultset($view, $resultset, $this->column_map, 'Identical result set for ' . $operator . ' with leftover values from previous operation.'); } + /** + * + */ public function testAllowEmpty() { $view = $this->getBasicView(); @@ -647,6 +677,9 @@ class ViewsHandlerFilterNumericTest extends ViewsSqlTest { $this->assertTrue(isset($age_operators['not empty'])); } + /** + * + */ protected function getGroupedExposedFilters() { $filters = array( 'age' => array( diff --git a/drupal7/web/sites/all/modules/contrib/views/tests/handlers/views_handler_filter_string.test b/drupal7/web/sites/all/modules/contrib/views/tests/handlers/views_handler_filter_string.test index e255156..24dbf6c 100644 --- a/drupal7/web/sites/all/modules/contrib/views/tests/handlers/views_handler_filter_string.test +++ b/drupal7/web/sites/all/modules/contrib/views/tests/handlers/views_handler_filter_string.test @@ -9,8 +9,11 @@ * Tests the core views_handler_filter_string handler. */ class ViewsHandlerFilterStringTest extends ViewsSqlTest { - var $column_map = array(); + public $column_map = array(); + /** + * + */ public static function getInfo() { return array( 'name' => 'Filter: String', @@ -30,7 +33,10 @@ class ViewsHandlerFilterStringTest extends ViewsSqlTest { ); } - function viewsData() { + /** + * + */ + public function viewsData() { $data = parent::viewsData(); $data['views_test']['name']['filter']['allow empty'] = TRUE; $data['views_test']['job']['filter']['allow empty'] = FALSE; @@ -39,6 +45,9 @@ class ViewsHandlerFilterStringTest extends ViewsSqlTest { return $data; } + /** + * + */ protected function schemaDefinition() { $schema = parent::schemaDefinition(); $schema['views_test']['fields']['description'] = array( @@ -65,6 +74,9 @@ class ViewsHandlerFilterStringTest extends ViewsSqlTest { return $dataset; } + /** + * + */ protected function getBasicView() { $view = parent::getBasicView(); $view->display['default']->options['fields']['description'] = array( @@ -76,7 +88,10 @@ class ViewsHandlerFilterStringTest extends ViewsSqlTest { return $view; } - function testFilterStringEqual() { + /** + * + */ + public function testFilterStringEqual() { $view = $this->getBasicView(); // Change the filtering. @@ -100,7 +115,10 @@ class ViewsHandlerFilterStringTest extends ViewsSqlTest { $this->assertIdenticalResultset($view, $resultset, $this->column_map); } - function testFilterStringGroupedExposedEqual() { + /** + * + */ + public function testFilterStringGroupedExposedEqual() { $filters = $this->getGroupedExposedFilters(); $view = $this->getBasicPageView(); @@ -120,7 +138,10 @@ class ViewsHandlerFilterStringTest extends ViewsSqlTest { $this->assertIdenticalResultset($view, $resultset, $this->column_map); } - function testFilterStringNotEqual() { + /** + * + */ + public function testFilterStringNotEqual() { $view = $this->getBasicView(); // Change the filtering. @@ -153,7 +174,10 @@ class ViewsHandlerFilterStringTest extends ViewsSqlTest { $this->assertIdenticalResultset($view, $resultset, $this->column_map); } - function testFilterStringGroupedExposedNotEqual() { + /** + * + */ + public function testFilterStringGroupedExposedNotEqual() { $filters = $this->getGroupedExposedFilters(); $view = $this->getBasicPageView(); @@ -183,7 +207,10 @@ class ViewsHandlerFilterStringTest extends ViewsSqlTest { $this->assertIdenticalResultset($view, $resultset, $this->column_map); } - function testFilterStringContains() { + /** + * + */ + public function testFilterStringContains() { $view = $this->getBasicView(); // Change the filtering. @@ -207,8 +234,10 @@ class ViewsHandlerFilterStringTest extends ViewsSqlTest { $this->assertIdenticalResultset($view, $resultset, $this->column_map); } - - function testFilterStringGroupedExposedContains() { + /** + * + */ + public function testFilterStringGroupedExposedContains() { $filters = $this->getGroupedExposedFilters(); $view = $this->getBasicPageView(); @@ -228,8 +257,10 @@ class ViewsHandlerFilterStringTest extends ViewsSqlTest { $this->assertIdenticalResultset($view, $resultset, $this->column_map); } - - function testFilterStringWord() { + /** + * + */ + public function testFilterStringWord() { $view = $this->getBasicView(); // Change the filtering. @@ -279,8 +310,10 @@ class ViewsHandlerFilterStringTest extends ViewsSqlTest { $this->assertIdenticalResultset($view, $resultset, $this->column_map); } - - function testFilterStringGroupedExposedWord() { + /** + * + */ + public function testFilterStringGroupedExposedWord() { $filters = $this->getGroupedExposedFilters(); $view = $this->getBasicPageView(); @@ -320,7 +353,10 @@ class ViewsHandlerFilterStringTest extends ViewsSqlTest { $this->assertIdenticalResultset($view, $resultset, $this->column_map); } - function testFilterStringStarts() { + /** + * + */ + public function testFilterStringStarts() { $view = $this->getBasicView(); // Change the filtering. @@ -344,7 +380,10 @@ class ViewsHandlerFilterStringTest extends ViewsSqlTest { $this->assertIdenticalResultset($view, $resultset, $this->column_map); } - function testFilterStringGroupedExposedStarts() { + /** + * + */ + public function testFilterStringGroupedExposedStarts() { $filters = $this->getGroupedExposedFilters(); $view = $this->getBasicPageView(); @@ -363,7 +402,10 @@ class ViewsHandlerFilterStringTest extends ViewsSqlTest { $this->assertIdenticalResultset($view, $resultset, $this->column_map); } - function testFilterStringNotStarts() { + /** + * + */ + public function testFilterStringNotStarts() { $view = $this->getBasicView(); // Change the filtering. @@ -394,7 +436,10 @@ class ViewsHandlerFilterStringTest extends ViewsSqlTest { $this->assertIdenticalResultset($view, $resultset, $this->column_map); } - function testFilterStringGroupedExposedNotStarts() { + /** + * + */ + public function testFilterStringGroupedExposedNotStarts() { $filters = $this->getGroupedExposedFilters(); $view = $this->getBasicPageView(); @@ -420,7 +465,10 @@ class ViewsHandlerFilterStringTest extends ViewsSqlTest { $this->assertIdenticalResultset($view, $resultset, $this->column_map); } - function testFilterStringEnds() { + /** + * + */ + public function testFilterStringEnds() { $view = $this->getBasicView(); // Change the filtering. @@ -447,7 +495,10 @@ class ViewsHandlerFilterStringTest extends ViewsSqlTest { $this->assertIdenticalResultset($view, $resultset, $this->column_map); } - function testFilterStringGroupedExposedEnds() { + /** + * + */ + public function testFilterStringGroupedExposedEnds() { $filters = $this->getGroupedExposedFilters(); $view = $this->getBasicPageView(); @@ -469,7 +520,10 @@ class ViewsHandlerFilterStringTest extends ViewsSqlTest { $this->assertIdenticalResultset($view, $resultset, $this->column_map); } - function testFilterStringNotEnds() { + /** + * + */ + public function testFilterStringNotEnds() { $view = $this->getBasicView(); // Change the filtering. @@ -497,7 +551,10 @@ class ViewsHandlerFilterStringTest extends ViewsSqlTest { $this->assertIdenticalResultset($view, $resultset, $this->column_map); } - function testFilterStringGroupedExposedNotEnds() { + /** + * + */ + public function testFilterStringGroupedExposedNotEnds() { $filters = $this->getGroupedExposedFilters(); $view = $this->getBasicPageView(); @@ -520,7 +577,10 @@ class ViewsHandlerFilterStringTest extends ViewsSqlTest { $this->assertIdenticalResultset($view, $resultset, $this->column_map); } - function testFilterStringNot() { + /** + * + */ + public function testFilterStringNot() { $view = $this->getBasicView(); // Change the filtering. @@ -548,8 +608,10 @@ class ViewsHandlerFilterStringTest extends ViewsSqlTest { $this->assertIdenticalResultset($view, $resultset, $this->column_map); } - - function testFilterStringGroupedExposedNot() { + /** + * + */ + public function testFilterStringGroupedExposedNot() { $filters = $this->getGroupedExposedFilters(); $view = $this->getBasicPageView(); @@ -573,7 +635,10 @@ class ViewsHandlerFilterStringTest extends ViewsSqlTest { } - function testFilterStringShorter() { + /** + * + */ + public function testFilterStringShorter() { $view = $this->getBasicView(); // Change the filtering. @@ -600,11 +665,14 @@ class ViewsHandlerFilterStringTest extends ViewsSqlTest { $this->assertIdenticalResultset($view, $resultset, $this->column_map); } - function testFilterStringGroupedExposedShorter() { + /** + * + */ + public function testFilterStringGroupedExposedShorter() { $filters = $this->getGroupedExposedFilters(); $view = $this->getBasicPageView(); - // Filter: Name, Operator: shorterthan, Value: 5 + // Filter: Name, Operator: shorterthan, Value: 5. $filters['name']['group_info']['default_group'] = 4; $view->set_display('page_1'); $view->display['page_1']->handler->override_option('filters', $filters); @@ -621,7 +689,10 @@ class ViewsHandlerFilterStringTest extends ViewsSqlTest { $this->assertIdenticalResultset($view, $resultset, $this->column_map); } - function testFilterStringLonger() { + /** + * + */ + public function testFilterStringLonger() { $view = $this->getBasicView(); // Change the filtering. @@ -645,11 +716,14 @@ class ViewsHandlerFilterStringTest extends ViewsSqlTest { $this->assertIdenticalResultset($view, $resultset, $this->column_map); } - function testFilterStringGroupedExposedLonger() { + /** + * + */ + public function testFilterStringGroupedExposedLonger() { $filters = $this->getGroupedExposedFilters(); $view = $this->getBasicPageView(); - // Filter: Name, Operator: longerthan, Value: 4 + // Filter: Name, Operator: longerthan, Value: 4. $filters['name']['group_info']['default_group'] = 5; $view->set_display('page_1'); $view->display['page_1']->handler->override_option('filters', $filters); @@ -663,8 +737,10 @@ class ViewsHandlerFilterStringTest extends ViewsSqlTest { $this->assertIdenticalResultset($view, $resultset, $this->column_map); } - - function testFilterStringEmpty() { + /** + * + */ + public function testFilterStringEmpty() { $view = $this->getBasicView(); // Change the filtering. @@ -687,7 +763,10 @@ class ViewsHandlerFilterStringTest extends ViewsSqlTest { $this->assertIdenticalResultset($view, $resultset, $this->column_map); } - function testFilterStringGroupedExposedEmpty() { + /** + * + */ + public function testFilterStringGroupedExposedEmpty() { $filters = $this->getGroupedExposedFilters(); $view = $this->getBasicPageView(); @@ -705,6 +784,9 @@ class ViewsHandlerFilterStringTest extends ViewsSqlTest { $this->assertIdenticalResultset($view, $resultset, $this->column_map); } + /** + * + */ protected function getGroupedExposedFilters() { $filters = array( 'name' => array( diff --git a/drupal7/web/sites/all/modules/contrib/views/tests/handlers/views_handler_manytoone.test b/drupal7/web/sites/all/modules/contrib/views/tests/handlers/views_handler_manytoone.test index e9c612e..2404831 100644 --- a/drupal7/web/sites/all/modules/contrib/views/tests/handlers/views_handler_manytoone.test +++ b/drupal7/web/sites/all/modules/contrib/views/tests/handlers/views_handler_manytoone.test @@ -546,7 +546,7 @@ class ViewsHandlerManyToOneTest extends ViewsSqlTest { $result4 = ($nid === (int) $this->nodes[2]->nid); $this->assertTrue($result1 && $result2 && $result3 && $result4, 'Option 4: View result has correct node ID.'); - // @todo: Fix and uncomment in issue #3045168. + // @todo Fix and uncomment in issue #3045168. // Option 5: Is all of 1 and 2. // @code // $view = $this->getTermIdExposedGroupedOptionsTestView(); diff --git a/drupal7/web/sites/all/modules/contrib/views/tests/handlers/views_handler_sort.test b/drupal7/web/sites/all/modules/contrib/views/tests/handlers/views_handler_sort.test index 35708c1..d645a49 100644 --- a/drupal7/web/sites/all/modules/contrib/views/tests/handlers/views_handler_sort.test +++ b/drupal7/web/sites/all/modules/contrib/views/tests/handlers/views_handler_sort.test @@ -9,6 +9,10 @@ * Tests for core views_handler_sort handler. */ class ViewsHandlerSortTest extends ViewsSqlTest { + + /** + * + */ public static function getInfo() { return array( 'name' => 'Sort: generic', diff --git a/drupal7/web/sites/all/modules/contrib/views/tests/handlers/views_handler_sort_date.test b/drupal7/web/sites/all/modules/contrib/views/tests/handlers/views_handler_sort_date.test index 4a8c4ca..25b8525 100644 --- a/drupal7/web/sites/all/modules/contrib/views/tests/handlers/views_handler_sort_date.test +++ b/drupal7/web/sites/all/modules/contrib/views/tests/handlers/views_handler_sort_date.test @@ -9,6 +9,10 @@ * Tests for core views_handler_sort_date handler. */ class ViewsHandlerSortDateTest extends ViewsSqlTest { + + /** + * + */ public static function getInfo() { return array( 'name' => 'Sort: date', @@ -17,6 +21,9 @@ class ViewsHandlerSortDateTest extends ViewsSqlTest { ); } + /** + * + */ protected function expectedResultSet($granularity, $reverse = TRUE) { $expected = array(); if (!$reverse) { diff --git a/drupal7/web/sites/all/modules/contrib/views/tests/handlers/views_handlers.test b/drupal7/web/sites/all/modules/contrib/views/tests/handlers/views_handlers.test index 6f010ac..73a024e 100644 --- a/drupal7/web/sites/all/modules/contrib/views/tests/handlers/views_handlers.test +++ b/drupal7/web/sites/all/modules/contrib/views/tests/handlers/views_handlers.test @@ -12,6 +12,9 @@ */ class ViewsHandlerTest extends ViewsSqlTest { + /** + * + */ public static function getInfo() { return array( 'name' => 'Handlers', @@ -42,7 +45,7 @@ class ViewsHandlerTest extends ViewsSqlTest { public function testHandlerAccess() { $view = $this->getBasicView(); - // add a test area. + // Add a test area. $view->display['default']->handler->override_option('header', array( 'test_access' => array( 'id' => 'test_access', @@ -61,7 +64,7 @@ class ViewsHandlerTest extends ViewsSqlTest { $view = $this->getBasicView(); - // add a test area. + // Add a test area. $view->display['default']->handler->override_option('header', array( 'test_access' => array( 'id' => 'test_access', diff --git a/drupal7/web/sites/all/modules/contrib/views/tests/node/views_node_revision_relations.test b/drupal7/web/sites/all/modules/contrib/views/tests/node/views_node_revision_relations.test index e3a50c0..37557a2 100644 --- a/drupal7/web/sites/all/modules/contrib/views/tests/node/views_node_revision_relations.test +++ b/drupal7/web/sites/all/modules/contrib/views/tests/node/views_node_revision_relations.test @@ -10,6 +10,9 @@ */ class ViewsNodeRevisionRelationsTestCase extends ViewsSqlTest { + /** + * + */ public static function getInfo() { return array( 'name' => 'Tests basic node_revision integration', @@ -66,7 +69,7 @@ class ViewsNodeRevisionRelationsTestCase extends ViewsSqlTest { /** * Test view with default join on node.nid. */ - function test_view_node_revision_nid() { + public function test_view_node_revision_nid() { $view = new view(); $view->name = 'test_node_revision_nid'; $view->description = ''; @@ -122,7 +125,7 @@ class ViewsNodeRevisionRelationsTestCase extends ViewsSqlTest { /** * Test view with default join on node.vid. */ - function test_view_node_revision_vid() { + public function test_view_node_revision_vid() { $view = new view(); $view->name = 'test_node_revision_vid'; $view->description = ''; diff --git a/drupal7/web/sites/all/modules/contrib/views/tests/plugins/views_plugin_display.test b/drupal7/web/sites/all/modules/contrib/views/tests/plugins/views_plugin_display.test index 7efb2e7..7c50c60 100644 --- a/drupal7/web/sites/all/modules/contrib/views/tests/plugins/views_plugin_display.test +++ b/drupal7/web/sites/all/modules/contrib/views/tests/plugins/views_plugin_display.test @@ -24,11 +24,11 @@ class ViewsPluginDisplayTestCase extends ViewsSqlTest { /** * Tests the overriding of filter_groups. */ - function testFilterGroupsOverriding() { + public function testFilterGroupsOverriding() { $view = $this->viewFilterGroupsUpdating(); $view->init_display(); - // mark is as overridden, yes FALSE, means overridden. + // Mark is as overridden, yes FALSE, means overridden. $view->display['page']->handler->set_override('filter_groups', FALSE); $this->assertFalse($view->display['page']->handler->is_defaulted('filter_groups'), "Take sure that 'filter_groups' is marked as overridden."); $this->assertFalse($view->display['page']->handler->is_defaulted('filters'), "Take sure that 'filters'' is marked as overridden."); @@ -41,7 +41,7 @@ class ViewsPluginDisplayTestCase extends ViewsSqlTest { * * @return view */ - function viewFilterGroupsOverriding() { + public function viewFilterGroupsOverriding() { $view = new view(); $view->name = 'test_filter_group_override'; $view->description = ''; @@ -93,7 +93,7 @@ class ViewsPluginDisplayTestCase extends ViewsSqlTest { * @see http://drupal.org/node/1259608 * @see views_plugin_display::init() */ - function testFilterGroupsUpdating() { + public function testFilterGroupsUpdating() { $view = $this->viewFilterGroupsUpdating(); $view->init_display(); @@ -108,7 +108,7 @@ class ViewsPluginDisplayTestCase extends ViewsSqlTest { * * @return view */ - function viewFilterGroupsUpdating() { + public function viewFilterGroupsUpdating() { $view = new view(); $view->name = 'test_filter_groups'; $view->description = ''; diff --git a/drupal7/web/sites/all/modules/contrib/views/tests/styles/views_plugin_style.test b/drupal7/web/sites/all/modules/contrib/views/tests/styles/views_plugin_style.test index 89d2816..096d3d2 100644 --- a/drupal7/web/sites/all/modules/contrib/views/tests/styles/views_plugin_style.test +++ b/drupal7/web/sites/all/modules/contrib/views/tests/styles/views_plugin_style.test @@ -9,6 +9,10 @@ * Tests some general style plugin related functionality. */ class ViewsPluginStyleTestCase extends ViewsPluginStyleTestBase { + + /** + * + */ public static function getInfo() { return array( 'name' => 'Styles', @@ -20,7 +24,7 @@ class ViewsPluginStyleTestCase extends ViewsPluginStyleTestBase { /** * Tests the grouping legacy features of styles. */ - function testGroupingLegacy() { + public function testGroupingLegacy() { $view = $this->getBasicView(); // Setup grouping by the job. $view->init_display(); @@ -110,7 +114,10 @@ class ViewsPluginStyleTestCase extends ViewsPluginStyleTestBase { $this->assertEqual($sets_new_value, $expected, t('The style plugins should proper group the results with grouping by the value.')); } - function testGrouping() { + /** + * + */ + public function testGrouping() { $this->_testGrouping(FALSE); $this->_testGrouping(TRUE); } @@ -118,7 +125,7 @@ class ViewsPluginStyleTestCase extends ViewsPluginStyleTestBase { /** * Tests the grouping features of styles. */ - function _testGrouping($stripped = FALSE) { + public function _testGrouping($stripped = FALSE) { $view = $this->getBasicView(); // Setup grouping by the job and the age field. $view->init_display(); @@ -240,7 +247,7 @@ class ViewsPluginStyleTestCase extends ViewsPluginStyleTestBase { /** * Tests custom css classes. */ - function testCustomRowClasses() { + public function testCustomRowClasses() { $view = $this->getBasicView(); // Setup some random css class. diff --git a/drupal7/web/sites/all/modules/contrib/views/tests/styles/views_plugin_style_base.test b/drupal7/web/sites/all/modules/contrib/views/tests/styles/views_plugin_style_base.test index 514077d..23f5922 100644 --- a/drupal7/web/sites/all/modules/contrib/views/tests/styles/views_plugin_style_base.test +++ b/drupal7/web/sites/all/modules/contrib/views/tests/styles/views_plugin_style_base.test @@ -20,7 +20,7 @@ abstract class ViewsPluginStyleTestBase extends ViewsSqlTest { /** * Stores a view output in the elements. */ - function storeViewPreview($output) { + public function storeViewPreview($output) { $htmlDom = new DOMDocument(); @$htmlDom->loadHTML($output); if ($htmlDom) { diff --git a/drupal7/web/sites/all/modules/contrib/views/tests/styles/views_plugin_style_jump_menu.test b/drupal7/web/sites/all/modules/contrib/views/tests/styles/views_plugin_style_jump_menu.test index 3be7858..b45a86c 100644 --- a/drupal7/web/sites/all/modules/contrib/views/tests/styles/views_plugin_style_jump_menu.test +++ b/drupal7/web/sites/all/modules/contrib/views/tests/styles/views_plugin_style_jump_menu.test @@ -15,7 +15,7 @@ class viewsPluginStyleJumpMenuTest extends ViewsSqlTest { * * @var array */ - var $nodes; + public $nodes; /** * @@ -46,7 +46,7 @@ class viewsPluginStyleJumpMenuTest extends ViewsSqlTest { /** * Tests jump menues with more then one same path but maybe differnet titles. */ - function testDuplicatePaths() { + public function testDuplicatePaths() { $view = $this->getJumpMenuView(); $view->set_display(); $view->init_handlers(); @@ -74,7 +74,7 @@ class viewsPluginStyleJumpMenuTest extends ViewsSqlTest { /** * */ - function getJumpMenuView() { + public function getJumpMenuView() { $view = new view(); $view->name = 'test_jump_menu'; $view->description = ''; @@ -146,7 +146,7 @@ class viewsPluginStyleJumpMenuTest extends ViewsSqlTest { $handler->display->display_options['sorts']['created']['id'] = 'created'; $handler->display->display_options['sorts']['created']['table'] = 'node'; $handler->display->display_options['sorts']['created']['field'] = 'created'; - $handler->display->display_options['sorts']['created']['order'] = 'DESC'; + $handler->display->display_options['sorts']['created']['order'] = 'ASC'; /* Filter criterion: Content: Published */ $handler->display->display_options['filters']['status']['id'] = 'status'; $handler->display->display_options['filters']['status']['table'] = 'node'; diff --git a/drupal7/web/sites/all/modules/contrib/views/tests/styles/views_plugin_style_mapping.test b/drupal7/web/sites/all/modules/contrib/views/tests/styles/views_plugin_style_mapping.test index 57ffefd..8244203 100644 --- a/drupal7/web/sites/all/modules/contrib/views/tests/styles/views_plugin_style_mapping.test +++ b/drupal7/web/sites/all/modules/contrib/views/tests/styles/views_plugin_style_mapping.test @@ -10,6 +10,9 @@ */ class ViewsPluginStyleMappingTest extends ViewsPluginStyleTestBase { + /** + * + */ public static function getInfo() { return array( 'name' => 'Style: Mapping', @@ -28,6 +31,9 @@ class ViewsPluginStyleMappingTest extends ViewsPluginStyleTestBase { views_fetch_plugin_data(NULL, NULL, TRUE); } + /** + * + */ protected function viewsPlugins() { return array( 'style' => array( diff --git a/drupal7/web/sites/all/modules/contrib/views/tests/styles/views_plugin_style_unformatted.test b/drupal7/web/sites/all/modules/contrib/views/tests/styles/views_plugin_style_unformatted.test index eb5cc99..b984992 100644 --- a/drupal7/web/sites/all/modules/contrib/views/tests/styles/views_plugin_style_unformatted.test +++ b/drupal7/web/sites/all/modules/contrib/views/tests/styles/views_plugin_style_unformatted.test @@ -10,6 +10,9 @@ */ class ViewsPluginStyleUnformattedTestCase extends ViewsPluginStyleTestBase { + /** + * + */ public static function getInfo() { return array( 'name' => 'Style: unformatted', @@ -21,7 +24,7 @@ class ViewsPluginStyleUnformattedTestCase extends ViewsPluginStyleTestBase { /** * Take sure that the default css classes works as expected. */ - function testDefaultRowClasses() { + public function testDefaultRowClasses() { $view = $this->getBasicView(); $rendered_output = $view->preview(); $this->storeViewPreview($rendered_output); diff --git a/drupal7/web/sites/all/modules/contrib/views/tests/taxonomy/views_handler_relationship_node_term_data.test b/drupal7/web/sites/all/modules/contrib/views/tests/taxonomy/views_handler_relationship_node_term_data.test index 954a3cb..f2e6d64 100644 --- a/drupal7/web/sites/all/modules/contrib/views/tests/taxonomy/views_handler_relationship_node_term_data.test +++ b/drupal7/web/sites/all/modules/contrib/views/tests/taxonomy/views_handler_relationship_node_term_data.test @@ -9,6 +9,10 @@ * Tests the relationship_node_term_data handler. */ class ViewsHandlerRelationshipNodeTermDataTest extends ViewsSqlTest { + + /** + * + */ public static function getInfo() { return array( 'name' => 'Tests handler relationship_node_term_data', @@ -20,7 +24,7 @@ class ViewsHandlerRelationshipNodeTermDataTest extends ViewsSqlTest { /** * Returns a new term with random properties in vocabulary $vid. */ - function createTerm($vocabulary) { + public function createTerm($vocabulary) { $term = new stdClass(); $term->name = $this->randomName(); $term->description = $this->randomName(); @@ -50,7 +54,10 @@ class ViewsHandlerRelationshipNodeTermDataTest extends ViewsSqlTest { $this->node = $this->drupalCreateNode($node); } - function testViewsHandlerRelationshipNodeTermData() { + /** + * + */ + public function testViewsHandlerRelationshipNodeTermData() { $view = $this->view_taxonomy_node_term_data(); $this->executeView($view, array($this->term_1->tid, $this->term_2->tid)); @@ -64,7 +71,10 @@ class ViewsHandlerRelationshipNodeTermDataTest extends ViewsSqlTest { $this->assertIdenticalResultset($view, $resultset, $this->column_map); } - function view_taxonomy_node_term_data() { + /** + * + */ + public function view_taxonomy_node_term_data() { $view = new view(); $view->name = 'test_taxonomy_node_term_data'; $view->description = ''; diff --git a/drupal7/web/sites/all/modules/contrib/views/tests/user/views_handler_field_user_name.test b/drupal7/web/sites/all/modules/contrib/views/tests/user/views_handler_field_user_name.test index 73a8ac1..daa9497 100644 --- a/drupal7/web/sites/all/modules/contrib/views/tests/user/views_handler_field_user_name.test +++ b/drupal7/web/sites/all/modules/contrib/views/tests/user/views_handler_field_user_name.test @@ -11,6 +11,10 @@ * @see views_handler_field_user_name */ class viewsHandlerFieldUserNameTest extends ViewsSqlTest { + + /** + * + */ public static function getInfo() { return array( 'name' => 'Tests user: name field', @@ -19,7 +23,10 @@ class viewsHandlerFieldUserNameTest extends ViewsSqlTest { ); } - function testUserName() { + /** + * + */ + public function testUserName() { $view = $this->view_user_name(); $view->init_display(); $this->executeView($view); @@ -68,7 +75,10 @@ class viewsHandlerFieldUserNameTest extends ViewsSqlTest { $this->assertTrue(strpos($render, $username) !== FALSE, 'If link to user is checked the username should be part of the output.'); } - function view_user_name() { + /** + * + */ + public function view_user_name() { $view = new view(); $view->name = 'test_views_handler_field_user_name'; $view->description = ''; @@ -110,8 +120,11 @@ class viewsHandlerFieldUserNameTest extends ViewsSqlTest { return $view; } - function view_raw_user_name() { - $view = new view; + /** + * + */ + public function view_raw_user_name() { + $view = new view(); $view->name = 'test_views_handler_field_user_name'; $view->description = ''; $view->tag = 'default'; @@ -152,4 +165,5 @@ class viewsHandlerFieldUserNameTest extends ViewsSqlTest { return $view; } + } diff --git a/drupal7/web/sites/all/modules/contrib/views/tests/user/views_user.test b/drupal7/web/sites/all/modules/contrib/views/tests/user/views_user.test index 8f917aa..793ddc3 100644 --- a/drupal7/web/sites/all/modules/contrib/views/tests/user/views_user.test +++ b/drupal7/web/sites/all/modules/contrib/views/tests/user/views_user.test @@ -13,12 +13,12 @@ class ViewsUserTestCase extends ViewsSqlTest { /** * */ - var $users = array(); + public $users = array(); /** * */ - var $nodes = array(); + public $nodes = array(); /** * @@ -46,7 +46,7 @@ class ViewsUserTestCase extends ViewsSqlTest { /** * Add a view which has no explicit relationship to the author. * - * @todo: Remove the following comment once the relationship is required. + * @todo Remove the following comment once the relationship is required. * One day a view will require the relationship so it should still work */ public function testRelationship() { @@ -67,7 +67,7 @@ class ViewsUserTestCase extends ViewsSqlTest { /** * */ - function test_view_user_relationship() { + public function test_view_user_relationship() { $view = new view(); $view->name = 'test_user_relationship'; $view->description = ''; diff --git a/drupal7/web/sites/all/modules/contrib/views/tests/user/views_user_argument_default.test b/drupal7/web/sites/all/modules/contrib/views/tests/user/views_user_argument_default.test index 2888193..0ecf465 100644 --- a/drupal7/web/sites/all/modules/contrib/views/tests/user/views_user_argument_default.test +++ b/drupal7/web/sites/all/modules/contrib/views/tests/user/views_user_argument_default.test @@ -51,7 +51,7 @@ class ViewsUserArgumentDefault extends ViewsSqlTest { /** * */ - function view_plugin_argument_default_current_user() { + public function view_plugin_argument_default_current_user() { $view = new view(); $view->name = 'test_plugin_argument_default_current_user'; $view->description = ''; diff --git a/drupal7/web/sites/all/modules/contrib/views/tests/user/views_user_argument_validate.test b/drupal7/web/sites/all/modules/contrib/views/tests/user/views_user_argument_validate.test index 78c24fa..cad839f 100644 --- a/drupal7/web/sites/all/modules/contrib/views/tests/user/views_user_argument_validate.test +++ b/drupal7/web/sites/all/modules/contrib/views/tests/user/views_user_argument_validate.test @@ -9,6 +9,10 @@ * Tests views user argument argument handler. */ class ViewsUserArgumentValidate extends ViewsSqlTest { + + /** + * + */ public static function getInfo() { return array( 'name' => 'Tests user argument validator', @@ -27,9 +31,12 @@ class ViewsUserArgumentValidate extends ViewsSqlTest { $this->account = $this->drupalCreateUser(); } - function testArgumentValidateUserUid() { + /** + * + */ + public function testArgumentValidateUserUid() { $account = $this->account; - // test 'uid' case. + // Test 'uid' case. $view = $this->view_argument_validate_user('uid'); $view->set_display('default'); $view->pre_execute(); @@ -37,7 +44,7 @@ class ViewsUserArgumentValidate extends ViewsSqlTest { $this->assertTrue($view->argument['null']->validate_arg($account->uid)); // Reset safed argument validation. $view->argument['null']->argument_validated = NULL; - // Fail for a string variable since type is 'uid' + // Fail for a string variable since type is 'uid'. $this->assertFalse($view->argument['null']->validate_arg($account->name)); // Reset safed argument validation. $view->argument['null']->argument_validated = NULL; @@ -45,9 +52,12 @@ class ViewsUserArgumentValidate extends ViewsSqlTest { $this->assertFalse($view->argument['null']->validate_arg(32)); } - function testArgumentValidateUserName() { + /** + * + */ + public function testArgumentValidateUserName() { $account = $this->account; - // test 'name' case. + // Test 'name' case. $view = $this->view_argument_validate_user('name'); $view->set_display('default'); $view->pre_execute(); @@ -55,7 +65,7 @@ class ViewsUserArgumentValidate extends ViewsSqlTest { $this->assertTrue($view->argument['null']->validate_arg($account->name)); // Reset safed argument validation. $view->argument['null']->argument_validated = NULL; - // Fail for a uid variable since type is 'name' + // Fail for a uid variable since type is 'name'. $this->assertFalse($view->argument['null']->validate_arg($account->uid)); // Reset safed argument validation. $view->argument['null']->argument_validated = NULL; @@ -63,9 +73,12 @@ class ViewsUserArgumentValidate extends ViewsSqlTest { $this->assertFalse($view->argument['null']->validate_arg($this->randomName())); } - function testArgumentValidateUserEither() { + /** + * + */ + public function testArgumentValidateUserEither() { $account = $this->account; - // test 'either' case. + // Test 'either' case. $view = $this->view_argument_validate_user('either'); $view->set_display('default'); $view->pre_execute(); @@ -73,7 +86,7 @@ class ViewsUserArgumentValidate extends ViewsSqlTest { $this->assertTrue($view->argument['null']->validate_arg($account->name)); // Reset safed argument validation. $view->argument['null']->argument_validated = NULL; - // Fail for a uid variable since type is 'name' + // Fail for a uid variable since type is 'name'. $this->assertTrue($view->argument['null']->validate_arg($account->uid)); // Reset safed argument validation. $view->argument['null']->argument_validated = NULL; @@ -85,7 +98,10 @@ class ViewsUserArgumentValidate extends ViewsSqlTest { $this->assertFalse($view->argument['null']->validate_arg(32)); } - function view_argument_validate_user($argtype) { + /** + * + */ + public function view_argument_validate_user($argtype) { $view = new view(); $view->name = 'view_argument_validate_user'; $view->description = ''; diff --git a/drupal7/web/sites/all/modules/contrib/views/tests/views_access.test b/drupal7/web/sites/all/modules/contrib/views/tests/views_access.test index 6622290..66018d7 100644 --- a/drupal7/web/sites/all/modules/contrib/views/tests/views_access.test +++ b/drupal7/web/sites/all/modules/contrib/views/tests/views_access.test @@ -10,11 +10,15 @@ */ #[\AllowDynamicProperties] class ViewsAccessTest extends ViewsSqlTest { + + /** + * + */ public static function getInfo() { return array( 'name' => 'Access', 'description' => 'Tests pluggable access for views.', - 'group' => 'Views Plugins' + 'group' => 'Views Plugins', ); } @@ -35,9 +39,12 @@ class ViewsAccessTest extends ViewsSqlTest { views_fetch_plugin_data(NULL, NULL, TRUE); } - function viewsPlugins() { + /** + * + */ + public function viewsPlugins() { $plugins = array( - 'access' => array( + 'access' => array( 'test_static' => array( 'title' => t('Static test access plugin'), 'help' => t('Provides a static test access plugin.'), @@ -59,7 +66,7 @@ class ViewsAccessTest extends ViewsSqlTest { /** * Tests none access plugin. */ - function testAccessNone() { + public function testAccessNone() { $view = $this->view_access_none(); $view->set_display('default'); @@ -72,11 +79,10 @@ class ViewsAccessTest extends ViewsSqlTest { /** * Tests perm access plugin. */ - function testAccessPerm() { + public function testAccessPerm() { $view = $this->view_access_perm(); $view->set_display('default'); - $access_plugin = $view->display_handler->get_plugin('access'); $this->assertTrue($view->display_handler->access($this->admin_user), t('Admin-Account should be able to access the view everytime')); $this->assertFalse($view->display_handler->access($this->web_user)); @@ -86,11 +92,10 @@ class ViewsAccessTest extends ViewsSqlTest { /** * Tests role access plugin. */ - function testAccessRole() { + public function testAccessRole() { $view = $this->view_access_role(); $view->set_display('default'); - $access_plugin = $view->display_handler->get_plugin('access'); $this->assertTrue($view->display_handler->access($this->admin_user), t('Admin-Account should be able to access the view everytime')); $this->assertFalse($view->display_handler->access($this->web_user)); @@ -104,7 +109,7 @@ class ViewsAccessTest extends ViewsSqlTest { /** * Tests static access check. */ - function testStaticAccessPlugin() { + public function testStaticAccessPlugin() { $view = $this->view_access_static(); $view->set_display('default'); @@ -117,13 +122,13 @@ class ViewsAccessTest extends ViewsSqlTest { // FALSE comes from hook_menu caching. $expected_hook_menu = array( - 'views_test_test_static_access_callback', array(FALSE) + 'views_test_test_static_access_callback', array(FALSE), ); $hook_menu = $view->execute_hook_menu('page_1'); $this->assertEqual($expected_hook_menu, $hook_menu['test_access_static']['access arguments'][0]); $expected_hook_menu = array( - 'views_test_test_static_access_callback', array(TRUE) + 'views_test_test_static_access_callback', array(TRUE), ); $this->assertTrue(views_access($expected_hook_menu)); } @@ -131,7 +136,7 @@ class ViewsAccessTest extends ViewsSqlTest { /** * Tests dynamic access plugin. */ - function testDynamicAccessPlugin() { + public function testDynamicAccessPlugin() { $view = $this->view_access_dynamic(); $argument1 = $this->randomName(); $argument2 = $this->randomName(); @@ -151,13 +156,13 @@ class ViewsAccessTest extends ViewsSqlTest { // FALSE comes from hook_menu caching. $expected_hook_menu = array( - 'views_test_test_dynamic_access_callback', array(FALSE, 1, 2) + 'views_test_test_dynamic_access_callback', array(FALSE, 1, 2), ); $hook_menu = $view->execute_hook_menu('page_1'); $this->assertEqual($expected_hook_menu, $hook_menu['test_access_dynamic']['access arguments'][0]); $expected_hook_menu = array( - 'views_test_test_dynamic_access_callback', array(TRUE, 1, 2) + 'views_test_test_dynamic_access_callback', array(TRUE, 1, 2), ); $this->assertTrue(views_access($expected_hook_menu, $argument1, $argument2)); } @@ -182,8 +187,11 @@ class ViewsAccessTest extends ViewsSqlTest { $this->assertTrue(views_access(TRUE)); } - function view_access_none() { - $view = new view; + /** + * + */ + public function view_access_none() { + $view = new view(); $view->name = 'test_access_none'; $view->description = ''; $view->tag = ''; @@ -205,8 +213,11 @@ class ViewsAccessTest extends ViewsSqlTest { return $view; } - function view_access_perm() { - $view = new view; + /** + * + */ + public function view_access_perm() { + $view = new view(); $view->name = 'test_access_perm'; $view->description = ''; $view->tag = ''; @@ -229,8 +240,11 @@ class ViewsAccessTest extends ViewsSqlTest { return $view; } - function view_access_role() { - $view = new view; + /** + * + */ + public function view_access_role() { + $view = new view(); $view->name = 'test_access_role'; $view->description = ''; $view->tag = ''; @@ -255,8 +269,11 @@ class ViewsAccessTest extends ViewsSqlTest { return $view; } - function view_access_dynamic() { - $view = new view; + /** + * + */ + public function view_access_dynamic() { + $view = new view(); $view->name = 'test_access_dynamic'; $view->description = ''; $view->tag = ''; @@ -281,8 +298,11 @@ class ViewsAccessTest extends ViewsSqlTest { return $view; } - function view_access_static() { - $view = new view; + /** + * + */ + public function view_access_static() { + $view = new view(); $view->name = 'test_access_static'; $view->description = ''; $view->tag = ''; diff --git a/drupal7/web/sites/all/modules/contrib/views/tests/views_ajax.test b/drupal7/web/sites/all/modules/contrib/views/tests/views_ajax.test index 6395044..52d83db 100644 --- a/drupal7/web/sites/all/modules/contrib/views/tests/views_ajax.test +++ b/drupal7/web/sites/all/modules/contrib/views/tests/views_ajax.test @@ -9,6 +9,10 @@ * Tests views ajax display. */ class ViewsAjaxTest extends ViewsSqlTest { + + /** + * + */ public static function getInfo() { return array( 'name' => 'Ajax', diff --git a/drupal7/web/sites/all/modules/contrib/views/tests/views_analyze.test b/drupal7/web/sites/all/modules/contrib/views/tests/views_analyze.test index 02ea2d5..ef23d7e 100644 --- a/drupal7/web/sites/all/modules/contrib/views/tests/views_analyze.test +++ b/drupal7/web/sites/all/modules/contrib/views/tests/views_analyze.test @@ -9,6 +9,10 @@ * Tests the views analyze system. */ class ViewsAnalyzeTest extends ViewsSqlTest { + + /** + * + */ public static function getInfo() { return array( 'name' => 'Views Analyze', @@ -28,14 +32,14 @@ class ViewsAnalyzeTest extends ViewsSqlTest { views_get_all_views(TRUE); menu_rebuild(); - // Add an admin user will full rights; + // Add an admin user will full rights. $this->admin = $this->drupalCreateUser(array('administer views')); } /** * Tests that analyze works in general. */ - function testAnalyzeBasic() { + public function testAnalyzeBasic() { $this->drupalLogin($this->admin); // Enable the frontpage view and click the analyse button. $view = views_get_view('frontpage'); diff --git a/drupal7/web/sites/all/modules/contrib/views/tests/views_argument_default.test b/drupal7/web/sites/all/modules/contrib/views/tests/views_argument_default.test index 7dea380..86a99dc 100644 --- a/drupal7/web/sites/all/modules/contrib/views/tests/views_argument_default.test +++ b/drupal7/web/sites/all/modules/contrib/views/tests/views_argument_default.test @@ -10,6 +10,9 @@ */ class ViewsArgumentDefaultTest extends ViewsSqlTest { + /** + * + */ public static function getInfo() { return array( 'name' => 'Argument_default', @@ -30,7 +33,7 @@ class ViewsArgumentDefaultTest extends ViewsSqlTest { /** * Tests the use of a default argument plugin that provides no options. */ - function testArgumentDefaultNoOptions() { + public function testArgumentDefaultNoOptions() { module_enable(array('views_ui', 'views_test')); $admin_user = $this->drupalCreateUser(array('administer views', 'administer site configuration')); $this->drupalLogin($admin_user); @@ -55,7 +58,7 @@ class ViewsArgumentDefaultTest extends ViewsSqlTest { /** * Tests fixed default argument. */ - function testArgumentDefaultFixed() { + public function testArgumentDefaultFixed() { $view = $this->view_argument_default_fixed(); $view->set_display('default'); @@ -79,18 +82,21 @@ class ViewsArgumentDefaultTest extends ViewsSqlTest { /** * @todo Test php default argument. */ - function testArgumentDefaultPhp() { + public function testArgumentDefaultPhp() { } /** * @todo Test node default argument. */ - function testArgumentDefaultNode() { + public function testArgumentDefaultNode() { } - function view_argument_default_fixed() { + /** + * + */ + public function view_argument_default_fixed() { $view = new view(); $view->name = 'test_argument_default_fixed'; $view->description = ''; diff --git a/drupal7/web/sites/all/modules/contrib/views/tests/views_argument_validator.test b/drupal7/web/sites/all/modules/contrib/views/tests/views_argument_validator.test index 6927584..4f93ea4 100644 --- a/drupal7/web/sites/all/modules/contrib/views/tests/views_argument_validator.test +++ b/drupal7/web/sites/all/modules/contrib/views/tests/views_argument_validator.test @@ -9,6 +9,10 @@ * Tests Views argument validators. */ class ViewsArgumentValidatorTest extends ViewsSqlTest { + + /** + * + */ public static function getInfo() { return array( 'name' => 'Argument validator', @@ -17,7 +21,10 @@ class ViewsArgumentValidatorTest extends ViewsSqlTest { ); } - function testArgumentValidatePhp() { + /** + * + */ + public function testArgumentValidatePhp() { $string = $this->randomName(); $view = $this->view_test_argument_validate_php($string); $view->set_display('default'); @@ -29,7 +36,10 @@ class ViewsArgumentValidatorTest extends ViewsSqlTest { $this->assertFalse($view->argument['null']->validate_arg($this->randomName())); } - function testArgumentValidateNumeric() { + /** + * + */ + public function testArgumentValidateNumeric() { $view = $this->view_argument_validate_numeric(); $view->set_display('default'); $view->pre_execute(); @@ -43,7 +53,7 @@ class ViewsArgumentValidatorTest extends ViewsSqlTest { /** * Make sure argument validation works properly. */ - function testArgumentValidatePhpFailure() { + public function testArgumentValidatePhpFailure() { $view = $this->view_test_argument_validate_php_failure(); $view->save(); $this->drupalGet('test-php-failure'); @@ -57,7 +67,10 @@ class ViewsArgumentValidatorTest extends ViewsSqlTest { $this->assertResponse(403); } - function view_test_argument_validate_php($string) { + /** + * + */ + public function view_test_argument_validate_php($string) { $code = 'return $argument == \'' . $string . '\';'; $view = new view(); $view->name = 'view_argument_validate_php'; @@ -90,7 +103,10 @@ class ViewsArgumentValidatorTest extends ViewsSqlTest { return $view; } - function view_argument_validate_numeric() { + /** + * + */ + public function view_argument_validate_numeric() { $view = new view(); $view->name = 'view_argument_validate_numeric'; $view->description = ''; @@ -124,10 +140,10 @@ class ViewsArgumentValidatorTest extends ViewsSqlTest { /** * * - * @return view $view + * @return view * The required view object. */ - function view_test_argument_validate_php_failure() { + public function view_test_argument_validate_php_failure() { $view = new view(); $view->name = 'view_argument_validate_php_failure'; $view->description = ''; diff --git a/drupal7/web/sites/all/modules/contrib/views/tests/views_basic.test b/drupal7/web/sites/all/modules/contrib/views/tests/views_basic.test index 5d590f9..e88ba4a 100644 --- a/drupal7/web/sites/all/modules/contrib/views/tests/views_basic.test +++ b/drupal7/web/sites/all/modules/contrib/views/tests/views_basic.test @@ -11,6 +11,10 @@ * */ class ViewsBasicTest extends ViewsSqlTest { + + /** + * + */ public static function getInfo() { return array( 'name' => 'Basic query test', diff --git a/drupal7/web/sites/all/modules/contrib/views/tests/views_cache.test b/drupal7/web/sites/all/modules/contrib/views/tests/views_cache.test index cb1fdfb..079f5bc 100644 --- a/drupal7/web/sites/all/modules/contrib/views/tests/views_cache.test +++ b/drupal7/web/sites/all/modules/contrib/views/tests/views_cache.test @@ -79,7 +79,7 @@ class ViewsCacheTest extends ViewsSqlTest { * * @see views_plugin_cache_time */ - function testTimeCaching() { + public function testTimeCaching() { // Create a basic result which just 2 results. $view = $this->getBasicView(); $view->set_display(); @@ -120,7 +120,7 @@ class ViewsCacheTest extends ViewsSqlTest { * * @see views_plugin_cache_time */ - function testNoneCaching() { + public function testNoneCaching() { // Create a basic result which just 2 results. $view = $this->getBasicView(); $view->set_display(); @@ -156,7 +156,7 @@ class ViewsCacheTest extends ViewsSqlTest { /** * Tests css/js storage and restoring mechanism. */ - function testHeaderStorage() { + public function testHeaderStorage() { // Create a view with output caching enabled. Some hook_views_pre_render in // views_test.module adds the test css/js file, so they should be added to // the css/js storage. @@ -215,7 +215,7 @@ class ViewsCacheTest extends ViewsSqlTest { /** * Check that HTTP headers are cached for views. */ - function testHttpHeadersCaching() { + public function testHttpHeadersCaching() { // Create a few nodes to appear in RSS feed. for ($i = 0; $i < 5; $i++) { $this->drupalCreateNode(); @@ -250,7 +250,7 @@ class ViewsCacheTest extends ViewsSqlTest { * * Make sure the output is different. */ - function testExposedFilterSameResultsCaching() { + public function testExposedFilterSameResultsCaching() { // Create the view with time-based cache with hour lifetimes and add exposed // filter to it with "Starts with" operator. $view = $this->getBasicView(); diff --git a/drupal7/web/sites/all/modules/contrib/views/tests/views_clone.test b/drupal7/web/sites/all/modules/contrib/views/tests/views_clone.test index 44ba3cf..6b832fe 100644 --- a/drupal7/web/sites/all/modules/contrib/views/tests/views_clone.test +++ b/drupal7/web/sites/all/modules/contrib/views/tests/views_clone.test @@ -59,7 +59,7 @@ class ViewsCloneTest extends ViewsSqlTest { )); // Execute view to be cloned. - $result = $view->execute(); + $view->execute(); // To make sure that we are properly testing removal of all properties, we // first need to assert that they are actually present in the original view. diff --git a/drupal7/web/sites/all/modules/contrib/views/tests/views_exposed_form.test b/drupal7/web/sites/all/modules/contrib/views/tests/views_exposed_form.test index d0a87fa..7e95c4a 100644 --- a/drupal7/web/sites/all/modules/contrib/views/tests/views_exposed_form.test +++ b/drupal7/web/sites/all/modules/contrib/views/tests/views_exposed_form.test @@ -99,7 +99,7 @@ class ViewsExposedFormTest extends ViewsSqlTest { /** * Tests the admin interface of exposed filter and sort items. */ - function testExposedAdminUi() { + public function testExposedAdminUi() { $admin_user = $this->drupalCreateUser(array('administer views', 'administer site configuration')); $this->drupalLogin($admin_user); menu_rebuild(); diff --git a/drupal7/web/sites/all/modules/contrib/views/tests/views_glossary.test b/drupal7/web/sites/all/modules/contrib/views/tests/views_glossary.test index 2d4131e..22854bc 100644 --- a/drupal7/web/sites/all/modules/contrib/views/tests/views_glossary.test +++ b/drupal7/web/sites/all/modules/contrib/views/tests/views_glossary.test @@ -114,7 +114,6 @@ class ViewsGlossaryTestCase extends ViewsSqlTest { $arguments['title']['break_phrase'] = TRUE; $view->display_handler->set_option('arguments', $arguments); $this->executeView($view, array('d+p')); - $expected_result_count = $nodes_per_character['d'] + $nodes_per_character['p']; $result_count = isset($view->result) && is_array($view->result) ? count($view->result) : 0; $this->assertIdentical($result_count, 3, 'View has 3 results.'); $nid = isset($view->result[0]->nid) ? $view->result[0]->nid : '0'; diff --git a/drupal7/web/sites/all/modules/contrib/views/tests/views_groupby.test b/drupal7/web/sites/all/modules/contrib/views/tests/views_groupby.test index 2c873ad..68bec7c 100644 --- a/drupal7/web/sites/all/modules/contrib/views/tests/views_groupby.test +++ b/drupal7/web/sites/all/modules/contrib/views/tests/views_groupby.test @@ -21,9 +21,11 @@ class ViewsQueryGroupByTest extends ViewsSqlTest { ); } - // tests ambiguous group by column error (postgresql) + /** + * Tests ambiguous group by column error (postgresql) + */ public function testAggregateAmbiguity() { - // Create 4 nodes of type1 + // Create 4 nodes of type1. $type1 = $this->drupalCreateContentType(); $node_1 = array( @@ -35,11 +37,14 @@ class ViewsQueryGroupByTest extends ViewsSqlTest { $this->drupalCreateNode($node_1); $view = $this->viewsAggregateAmbiguityView(); - $output = $view->execute_display(); + $view->execute_display(); $this->assertEqual(count($view->result), 1, 'Make sure there are no ambiguity problems with the group by operation.'); } + /** + * + */ public function viewsAggregateAmbiguityView() { $view = new view(); $view->name = 'aggregate_ambiguity'; @@ -97,7 +102,6 @@ class ViewsQueryGroupByTest extends ViewsSqlTest { $handler->display->display_options['arguments']['type']['default_argument_type'] = 'fixed'; $handler->display->display_options['arguments']['type']['summary']['format'] = 'default_summary'; - return $view; } @@ -105,7 +109,7 @@ class ViewsQueryGroupByTest extends ViewsSqlTest { * Tests aggregate count feature. */ public function testAggregateCount() { - // Create 2 nodes of type1 and 3 nodes of type2 + // Create 2 nodes of type1 and 3 nodes of type2. $type1 = $this->drupalCreateContentType(); $type2 = $this->drupalCreateContentType(); @@ -125,7 +129,7 @@ class ViewsQueryGroupByTest extends ViewsSqlTest { $this->drupalCreateNode($node_2); $view = $this->viewsAggregateCountView(); - $output = $view->execute_display(); + $view->execute_display(); $this->assertEqual(count($view->result), 2, 'Make sure the count of items is right.'); @@ -142,14 +146,14 @@ class ViewsQueryGroupByTest extends ViewsSqlTest { /** * */ - // public function testAggregateSum() { - // } + // Public function testAggregateSum() { + // }. /** * */ public function viewsAggregateCountView() { - $view = new view; + $view = new view(); $view->name = 'aggregate_count'; $view->description = ''; $view->tag = ''; @@ -202,8 +206,8 @@ class ViewsQueryGroupByTest extends ViewsSqlTest { * @param array|null $values * (optional) Expected values. */ - function GroupByTestHelper($group_by = NULL, $values = NULL) { - // Create 4 nodes of type1 and 3 nodes of type2 + public function GroupByTestHelper($group_by = NULL, $values = NULL) { + // Create 4 nodes of type1 and 3 nodes of type2. $type1 = $this->drupalCreateContentType(); $type2 = $this->drupalCreateContentType(); @@ -224,7 +228,7 @@ class ViewsQueryGroupByTest extends ViewsSqlTest { $this->drupalCreateNode($node_2); $view = $this->viewsGroupByViewHelper($group_by); - $output = $view->execute_display(); + $view->execute_display(); $this->assertEqual(count($view->result), 2, 'Make sure the count of items is right.'); @@ -253,8 +257,8 @@ class ViewsQueryGroupByTest extends ViewsSqlTest { /** * */ - function viewsGroupByViewHelper($group_by = NULL) { - $view = new view; + public function viewsGroupByViewHelper($group_by = NULL) { + $view = new view(); $view->name = 'group_by_count'; $view->description = ''; $view->tag = ''; @@ -359,8 +363,7 @@ class ViewsQueryGroupByTest extends ViewsSqlTest { */ public function testGroupByCountOnlyFilters() { // Check if GROUP BY and HAVING are included when a view - // Doesn't display SUM, COUNT, MAX... functions in SELECT statment - + // Doesn't display SUM, COUNT, MAX... functions in SELECT statment. $type1 = $this->drupalCreateContentType(); $node_1 = array( @@ -371,7 +374,7 @@ class ViewsQueryGroupByTest extends ViewsSqlTest { } $view = $this->viewsGroupByCountViewOnlyFilters(); - $output = $view->execute_display(); + $view->execute_display(); $this->assertTrue(strpos($view->build_info['query'], 'GROUP BY'), t('Make sure that GROUP BY is in the query')); $this->assertTrue(strpos($view->build_info['query'], 'HAVING'), t('Make sure that HAVING is in the query')); @@ -380,8 +383,8 @@ class ViewsQueryGroupByTest extends ViewsSqlTest { /** * */ - function viewsGroupByCountViewOnlyFilters() { - $view = new view; + public function viewsGroupByCountViewOnlyFilters() { + $view = new view(); $view->name = 'group_by_in_filters'; $view->description = ''; $view->tag = ''; @@ -460,9 +463,9 @@ class ViewsUiGroupbyTestCase extends DrupalWebTestCase { /** * Tests whether basic saving works. * - * @todo: this should check the change of the settings as well. + * @todo This should check the change of the settings as well. */ - function testGroupBySave() { + public function testGroupBySave() { $this->drupalGet('admin/structure/views/view/test_views_groupby_save/edit'); $edit = array( diff --git a/drupal7/web/sites/all/modules/contrib/views/tests/views_handler_filter.test b/drupal7/web/sites/all/modules/contrib/views/tests/views_handler_filter.test index 69fdb82..3e7e2ee 100644 --- a/drupal7/web/sites/all/modules/contrib/views/tests/views_handler_filter.test +++ b/drupal7/web/sites/all/modules/contrib/views/tests/views_handler_filter.test @@ -53,11 +53,10 @@ class ViewsHandlerFilterTest extends ViewsSqlTest { /** * Tests "is all of" of filter operation. */ - function testFilterInOperatorUi() { + public function testFilterInOperatorUi() { $term = $this->drupalCreateTerm(1); - $node1 = $this->drupalCreateNode(array('type' => 'article','field_tags_tid' => $term->tid, 'created' => REQUEST_TIME)); - $node2 = $this->drupalCreateNode(array('type' => 'article', 'created' => REQUEST_TIME + 1)); + $node1 = $this->drupalCreateNode(array('type' => 'article', 'field_tags_tid' => $term->tid, 'created' => REQUEST_TIME)); $user2 = $this->drupalCreateUser(array('access content')); // $this->drupalLogin($this->drupalCreateUser(array('administer users')); $this->drupalLogin($this->drupalCreateUser(array('administer users', 'access administration pages', 'administer site configuration', 'administer nodes', 'bypass node access'))); diff --git a/drupal7/web/sites/all/modules/contrib/views/tests/views_handlers.test b/drupal7/web/sites/all/modules/contrib/views/tests/views_handlers.test index ee19d19..eff1776 100644 --- a/drupal7/web/sites/all/modules/contrib/views/tests/views_handlers.test +++ b/drupal7/web/sites/all/modules/contrib/views/tests/views_handlers.test @@ -9,6 +9,10 @@ * Tests abstract handlers of views. */ class ViewsHandlersTest extends ViewsSqlTest { + + /** + * + */ public static function getInfo() { return array( 'name' => 'Handlers test', @@ -17,7 +21,10 @@ class ViewsHandlersTest extends ViewsSqlTest { ); } - function testFilterInOperatorUi() { + /** + * + */ + public function testFilterInOperatorUi() { $admin_user = $this->drupalCreateUser(array('administer views', 'administer site configuration')); $this->drupalLogin($admin_user); menu_rebuild(); @@ -37,19 +44,19 @@ class ViewsHandlersTest extends ViewsSqlTest { /** * Tests views_break_phrase_string function. */ - function test_views_break_phrase_string() { + public function test_views_break_phrase_string() { $empty_stdclass = new stdClass(); $empty_stdclass->operator = 'or'; $empty_stdclass->value = array(); $null = NULL; - // check defaults. + // Check defaults. $this->assertEqual($empty_stdclass, views_break_phrase_string('', $null)); $handler = views_get_handler('node', 'title', 'argument'); $this->assertEqual($handler, views_break_phrase_string('', $handler)); - // test ors. + // Test ors. $handler = views_break_phrase_string('word1 word2+word'); $this->assertEqualValue(array('word1', 'word2', 'word'), $handler); $this->assertEqual('or', $handler->operator); @@ -66,7 +73,7 @@ class ViewsHandlersTest extends ViewsSqlTest { $this->assertEqualValue(array('wõrd1', 'wõrd2', 'wõrd'), $handler); $this->assertEqual('or', $handler->operator); - // test ands. + // Test ands. $handler = views_break_phrase_string('word1,word2,word'); $this->assertEqualValue(array('word1', 'word2', 'word'), $handler); $this->assertEqual('and', $handler->operator); @@ -83,7 +90,7 @@ class ViewsHandlersTest extends ViewsSqlTest { $this->assertEqualValue(array('wõrd1', 'wõrd2', 'wõrd'), $handler); $this->assertEqual('and', $handler->operator); - // test a single word. + // Test a single word. $handler = views_break_phrase_string('word'); $this->assertEqualValue(array('word'), $handler); $this->assertEqual('and', $handler->operator); @@ -92,23 +99,23 @@ class ViewsHandlersTest extends ViewsSqlTest { /** * Tests views_break_phrase function. */ - function test_views_break_phrase() { + public function test_views_break_phrase() { $empty_stdclass = new stdClass(); $empty_stdclass->operator = 'or'; $empty_stdclass->value = array(); $null = NULL; - // check defaults. + // Check defaults. $this->assertEqual($empty_stdclass, views_break_phrase('', $null)); $handler = views_get_handler('node', 'title', 'argument'); $this->assertEqual($handler, views_break_phrase('', $handler)); - // Generate three random numbers which can be used below; + // Generate three random numbers which can be used below. $n1 = rand(0, 100); $n2 = rand(0, 100); $n3 = rand(0, 100); - // test ors. + // Test ORs. $this->assertEqualValue(array($n1, $n2, $n3), views_break_phrase("$n1 $n2+$n3", $handler)); $this->assertEqual('or', $handler->operator); $this->assertEqualValue(array($n1, $n2, $n3), views_break_phrase("$n1+$n2+$n3", $handler)); @@ -118,7 +125,7 @@ class ViewsHandlersTest extends ViewsSqlTest { $this->assertEqualValue(array($n1, $n2, $n3), views_break_phrase("$n1 $n2++$n3", $handler)); $this->assertEqual('or', $handler->operator); - // test ands. + // Test ANDs. $this->assertEqualValue(array($n1, $n2, $n3), views_break_phrase("$n1,$n2,$n3", $handler)); $this->assertEqual('and', $handler->operator); $this->assertEqualValue(array($n1, $n2, $n3), views_break_phrase("$n1,,$n2,$n3", $handler)); diff --git a/drupal7/web/sites/all/modules/contrib/views/tests/views_module.test b/drupal7/web/sites/all/modules/contrib/views/tests/views_module.test index cfa93ab..b561c79 100644 --- a/drupal7/web/sites/all/modules/contrib/views/tests/views_module.test +++ b/drupal7/web/sites/all/modules/contrib/views/tests/views_module.test @@ -9,6 +9,10 @@ * Tests basic functions from the Views module. */ class ViewsModuleTest extends ViewsSqlTest { + + /** + * + */ public static function getInfo() { return array( 'name' => 'Tests views.module', @@ -26,6 +30,9 @@ class ViewsModuleTest extends ViewsSqlTest { drupal_theme_rebuild(); } + /** + * {@inheritdoc} + */ public function viewsData() { $data = parent::viewsData(); $data['views_test_previous'] = array(); @@ -39,7 +46,10 @@ class ViewsModuleTest extends ViewsSqlTest { return $data; } - public function test_views_trim_text() { + /** + * Tests views_trim_text(). + */ + public function testViewsTrimText() { // Test unicode, @see http://drupal.org/node/513396#comment-2839416 $text = array( 'Tuy nhiên, những hi vọng', @@ -71,7 +81,7 @@ class ViewsModuleTest extends ViewsSqlTest { $this->assertEqual($result_text, $expect[$key]); } - // Test also word_boundary + // Test also word_boundary. $alter['word_boundary'] = TRUE; $expect = array( 'Tuy nhiên', @@ -93,10 +103,10 @@ class ViewsModuleTest extends ViewsSqlTest { /** * Tests the dynamic includes of templates via module feature. */ - function testModuleTemplates() { + public function testViewsThemeModuleTemplates() { $views_status = variable_get('views_defaults', array()); $views_status['frontpage'] = FALSE; - // false is enabled. + // False is enabled. variable_set('views_defaults', $views_status); $existing = array(); @@ -108,9 +118,9 @@ class ViewsModuleTest extends ViewsSqlTest { } /** - * Tests the views_get_handler method. + * Tests views_get_handler(). */ - function testviews_get_handler() { + public function testViewsGetHandler() { $types = array('field', 'area', 'filter'); foreach ($types as $type) { $handler = views_get_handler($this->randomName(), $this->randomName(), $type); @@ -158,8 +168,7 @@ class ViewsModuleTest extends ViewsSqlTest { /** * Tests views_fetch_data(). */ - function testFetchData() { - + public function testViewsFetchData() { // Make sure we start with a empty cache. $this->resetStaticViewsDataCache(); cache_clear_all('*', 'cache_views', TRUE); @@ -226,7 +235,7 @@ class ViewsModuleTest extends ViewsSqlTest { /** * Ensure that a certain handler is a instance of a certain table/field. */ - function assertInstanceHandler($handler, $table, $field, $id) { + protected function assertInstanceHandler($handler, $table, $field, $id) { $table_data = views_fetch_data($table); $field_data = $table_data[$field][$id]; diff --git a/drupal7/web/sites/all/modules/contrib/views/tests/views_pager.test b/drupal7/web/sites/all/modules/contrib/views/tests/views_pager.test index ac7658e..6b501b1 100644 --- a/drupal7/web/sites/all/modules/contrib/views/tests/views_pager.test +++ b/drupal7/web/sites/all/modules/contrib/views/tests/views_pager.test @@ -296,14 +296,14 @@ class ViewsPagerTest extends ViewsSqlTest { $this->executeView($view); $this->assertEqual(count($view->result), 3, 'Make sure that only a certain count of items is returned'); - // Test items per page = 0 + // Test items per page = 0. $view = $this->viewPagerFullZeroItemsPerPage(); $view->set_display('default'); $this->executeView($view); $this->assertEqual(count($view->result), 11, 'All items are return'); - // @todo test number of pages. + // @todo Test number of pages. // Test items per page = 0. $view->destroy(); @@ -328,7 +328,7 @@ class ViewsPagerTest extends ViewsSqlTest { /** * */ - function viewPagerFullZeroItemsPerPage() { + public function viewPagerFullZeroItemsPerPage() { $view = new view(); $view->name = 'view_pager_full_zero_items_per_page'; $view->description = ''; @@ -371,7 +371,7 @@ class ViewsPagerTest extends ViewsSqlTest { /** * */ - function viewsPagerFull() { + public function viewsPagerFull() { $view = new view(); $view->name = 'test_pager_full'; $view->description = ''; @@ -400,7 +400,7 @@ class ViewsPagerTest extends ViewsSqlTest { /** * */ - function viewsPagerFullFields() { + public function viewsPagerFullFields() { $view = new view(); $view->name = 'test_pager_full'; $view->description = ''; @@ -459,7 +459,7 @@ class ViewsPagerTest extends ViewsSqlTest { $view->set_display('default'); $this->executeView($view); $view->use_ajax = TRUE; - // force the value again here. + // Force the value again here. $view->query->pager = NULL; $output = $view->render(); $this->assertEqual(preg_match('/
    /', $output), 0, t('The pager is not rendered.')); @@ -468,7 +468,7 @@ class ViewsPagerTest extends ViewsSqlTest { /** * Test the api functions on the view object. */ - function testPagerApi() { + public function testPagerApi() { $view = $this->viewsPagerFull(); // On the first round don't initialize the pager. $this->assertEqual($view->get_items_per_page(), NULL, 'If the pager is not initialized and no manual override there is no items per page.'); diff --git a/drupal7/web/sites/all/modules/contrib/views/tests/views_query.test b/drupal7/web/sites/all/modules/contrib/views/tests/views_query.test index dffa723..cd1d74d 100644 --- a/drupal7/web/sites/all/modules/contrib/views/tests/views_query.test +++ b/drupal7/web/sites/all/modules/contrib/views/tests/views_query.test @@ -228,7 +228,7 @@ abstract class ViewsSqlTest extends ViewsTestCase { * * @todo Convert existing setUp functions. */ - function enableViewsUi() { + public function enableViewsUi() { module_enable(array('views_ui')); // @todo Figure out why it's required to clear the cache here. views_module_include('views_default', TRUE); @@ -260,7 +260,8 @@ abstract class ViewsSqlTest extends ViewsTestCase { 'type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, - 'default' => 0), + 'default' => 0, + ), 'job' => array( 'description' => "The person's job", 'type' => 'varchar', @@ -505,7 +506,7 @@ abstract class ViewsSqlTest extends ViewsTestCase { // cache. drupal_static_reset('views_exposed_form_cache'); - $display = $view->new_display('page', 'Page', 'page_1'); + $view->new_display('page', 'Page', 'page_1'); return $view; } diff --git a/drupal7/web/sites/all/modules/contrib/views/tests/views_test.info b/drupal7/web/sites/all/modules/contrib/views/tests/views_test.info index d988b93..7b8f526 100644 --- a/drupal7/web/sites/all/modules/contrib/views/tests/views_test.info +++ b/drupal7/web/sites/all/modules/contrib/views/tests/views_test.info @@ -5,8 +5,8 @@ core = 7.x dependencies[] = views hidden = TRUE -; Information added by Drupal.org packaging script on 2023-03-13 -version = "7.x-3.29" +; Information added by Drupal.org packaging script on 2025-03-13 +version = "7.x-3.30" core = "7.x" project = "views" -datestamp = "1678722019" +datestamp = "1741861463" diff --git a/drupal7/web/sites/all/modules/contrib/views/tests/views_test.module b/drupal7/web/sites/all/modules/contrib/views/tests/views_test.module index caa87b9..50f1b13 100644 --- a/drupal7/web/sites/all/modules/contrib/views/tests/views_test.module +++ b/drupal7/web/sites/all/modules/contrib/views/tests/views_test.module @@ -45,10 +45,16 @@ function views_test_views_plugins() { return variable_get('views_test_views_plugins', array()); } +/** + * + */ function views_test_test_static_access_callback($access) { return $access; } +/** + * + */ function views_test_test_dynamic_access_callback($access, $argument1, $argument2) { return $access && $argument1 == variable_get('test_dynamic_access_argument1', NULL) && $argument2 == variable_get('test_dynamic_access_argument2', NULL); } diff --git a/drupal7/web/sites/all/modules/contrib/views/tests/views_translatable.test b/drupal7/web/sites/all/modules/contrib/views/tests/views_translatable.test index 7e68acc..fbdc1e6 100644 --- a/drupal7/web/sites/all/modules/contrib/views/tests/views_translatable.test +++ b/drupal7/web/sites/all/modules/contrib/views/tests/views_translatable.test @@ -9,8 +9,11 @@ * Tests Views pluggable translations. */ class ViewsTranslatableTest extends ViewsSqlTest { - var $strings; + public $strings; + /** + * + */ public static function getInfo() { return array( 'name' => 'Views Translatable Test', @@ -66,6 +69,9 @@ class ViewsTranslatableTest extends ViewsSqlTest { $this->assertEqual(sort($expected_strings), sort($result_strings), 'Make sure that the localization plugin got every translatable string.'); } + /** + * + */ public function testUi() { // Make sure that the string is not translated in the UI. $view = $this->view_unpack_translatable(); @@ -103,7 +109,7 @@ class ViewsTranslatableTest extends ViewsSqlTest { $view->init_display(); // Don't run translation. We just want to get the right keys. - foreach ($view->display as $display_id => $display) { + foreach ($view->display as $display) { $translatables = array(); $display->handler->unpack_translatables($translatables); @@ -146,6 +152,9 @@ class ViewsTranslatableTest extends ViewsSqlTest { } } + /** + * + */ public function view_unpack_translatable() { $view = new view(); $view->name = 'view_unpack_translatable'; diff --git a/drupal7/web/sites/all/modules/contrib/views/tests/views_ui.test b/drupal7/web/sites/all/modules/contrib/views/tests/views_ui.test index 81a662c..5174c8e 100644 --- a/drupal7/web/sites/all/modules/contrib/views/tests/views_ui.test +++ b/drupal7/web/sites/all/modules/contrib/views/tests/views_ui.test @@ -43,7 +43,7 @@ class ViewsUIWizardBasicTestCase extends ViewsUIWizardHelper { /** * */ - function testViewsWizardAndListing() { + public function testViewsWizardAndListing() { // Check if we can access the main views admin page. $this->drupalGet('admin/structure/views'); $this->assertText(t('Add new view')); @@ -180,7 +180,7 @@ class ViewsUIWizardDefaultViewsTestCase extends ViewsUIWizardHelper { /** * Tests default views. */ - function testDefaultViews() { + public function testDefaultViews() { // Make sure the front page view starts off as disabled (does not appear on // the listing page). $edit_href = 'admin/structure/views/view/frontpage/edit'; @@ -253,7 +253,7 @@ class ViewsUIWizardDefaultViewsTestCase extends ViewsUIWizardHelper { * The page content that results from clicking on the link, or FALSE on * failure. Failure also results in a failed assertion. */ - function clickViewsOperationLink($label, $unique_href_part) { + public function clickViewsOperationLink($label, $unique_href_part) { $links = $this->xpath('//a[normalize-space(text())=:label]', array(':label' => $label)); foreach ($links as $link_index => $link) { $position = strpos($link['href'], $unique_href_part); @@ -373,7 +373,7 @@ class ViewsUIWizardTaggedWithTestCase extends ViewsUIWizardHelper { /** * Tests the "tagged with" functionality. */ - function testTaggedWith() { + public function testTaggedWith() { // In this test we will only create nodes that have an instance of the tag // field. $node_add_path = 'node/add/' . $this->node_type_with_tags->type; @@ -437,7 +437,7 @@ class ViewsUIWizardTaggedWithTestCase extends ViewsUIWizardHelper { /** * Test the "tagged with" form element only shows for node types that support it. */ - function testTaggedWithByNodeType() { + public function testTaggedWithByNodeType() { // The tagging field is associated with one of our node types only. So the // "tagged with" form element on the view wizard should appear on the form // by default (when the wizard is configured to display all content) and @@ -487,7 +487,7 @@ class ViewsUIWizardSortingTestCase extends ViewsUIWizardHelper { /** * Tests the sorting functionality. */ - function testSorting() { + public function testSorting() { // Create nodes, each with a different creation time so that we can do a // meaningful sort. $node1 = $this->drupalCreateNode(array('created' => REQUEST_TIME)); @@ -562,7 +562,7 @@ class ViewsUIWizardItemsPerPageTestCase extends ViewsUIWizardHelper { /** * Tests the number of items per page. */ - function testItemsPerPage() { + public function testItemsPerPage() { // Create articles, each with a different creation time so that we can do a // meaningful sort. $node1 = $this->drupalCreateNode(array('type' => 'article', 'created' => REQUEST_TIME)); @@ -652,7 +652,7 @@ class ViewsUIWizardMenuTestCase extends ViewsUIWizardHelper { /** * Tests the menu functionality. */ - function testMenus() { + public function testMenus() { // Create a view with a page display and a menu link in the Main Menu. $view = array(); $view['human_name'] = $this->randomName(16); @@ -705,7 +705,7 @@ class ViewsUIWizardJumpMenuTestCase extends ViewsUIWizardHelper { /** * Tests the jump menu style plugin. */ - function testJumpMenus() { + public function testJumpMenus() { // We'll run this test for several different base tables that appear in the // wizard. $base_table_methods = array( @@ -770,7 +770,7 @@ class ViewsUIWizardJumpMenuTestCase extends ViewsUIWizardHelper { /** * Helper function to create a node and return its expected path. */ - function createNodeAndGetPath() { + public function createNodeAndGetPath() { $node = $this->drupalCreateNode(); return entity_uri('node', $node); } @@ -778,7 +778,7 @@ class ViewsUIWizardJumpMenuTestCase extends ViewsUIWizardHelper { /** * Helper function to create a user and return its expected path. */ - function createUserAndGetPath() { + public function createUserAndGetPath() { $account = $this->drupalCreateUser(); return entity_uri('user', $account); } @@ -786,7 +786,7 @@ class ViewsUIWizardJumpMenuTestCase extends ViewsUIWizardHelper { /** * Helper function to create a comment and return its expected path. */ - function createCommentAndGetPath() { + public function createCommentAndGetPath() { $node = $this->drupalCreateNode(); $comment = (object) array( 'cid' => NULL, @@ -805,7 +805,7 @@ class ViewsUIWizardJumpMenuTestCase extends ViewsUIWizardHelper { /** * Helper function to create a taxonomy term and return its expected path. */ - function createTaxonomyTermAndGetPath() { + public function createTaxonomyTermAndGetPath() { $vocabulary = new stdClass(); $vocabulary->name = $this->randomName(); $vocabulary->machine_name = drupal_strtolower($this->randomName()); @@ -822,7 +822,7 @@ class ViewsUIWizardJumpMenuTestCase extends ViewsUIWizardHelper { /** * Helper function to create a file and return its expected path. */ - function createFileAndGetPath() { + public function createFileAndGetPath() { $file = (object) array( 'uid' => 1, 'filename' => 'views-ui-jump-menu-test.txt', @@ -839,7 +839,7 @@ class ViewsUIWizardJumpMenuTestCase extends ViewsUIWizardHelper { /** * Helper function to create a node revision and return its expected path. */ - function createNodeRevisionAndGetPath() { + public function createNodeRevisionAndGetPath() { // The node needs at least two revisions in order for Drupal to allow // access to the revision path. $settings = array('revision' => TRUE); @@ -870,7 +870,7 @@ class ViewsUIWizardOverrideDisplaysTestCase extends ViewsUIWizardHelper { /** * Tests that displays can be overridden via the UI. */ - function testOverrideDisplays() { + public function testOverrideDisplays() { // Create a basic view that shows all content, with a page and a block // display. $view['human_name'] = $this->randomName(16); @@ -931,7 +931,7 @@ class ViewsUIWizardOverrideDisplaysTestCase extends ViewsUIWizardHelper { /** * Tests that the wizard correctly sets up default and overridden displays. */ - function testWizardMixedDefaultOverriddenDisplays() { + public function testWizardMixedDefaultOverriddenDisplays() { // Create a basic view with a page, block, and feed. Give the page and feed // identical titles, but give the block a different one, so we expect the // page and feed to inherit their titles from the default display, but the @@ -1014,7 +1014,7 @@ class ViewsUIWizardOverrideDisplaysTestCase extends ViewsUIWizardHelper { /** * Tests that the revert to all displays select-option works as expected. */ - function testRevertAllDisplays() { + public function testRevertAllDisplays() { // Create a basic view with a page, block. Because there is both a title on // page and block we expect the title on the block be overriden. $view['human_name'] = $this->randomName(16); @@ -1038,3 +1038,44 @@ class ViewsUIWizardOverrideDisplaysTestCase extends ViewsUIWizardHelper { } } + +/** + * Test the ability of the views query settings. + */ +class ViewsUIQuerySettingsTestCase extends ViewsUIWizardHelper { + + /** + * + */ + public static function getInfo() { + return array( + 'name' => 'Views UI query settings functionality', + 'description' => 'Test the ability of the views query settings', + 'group' => 'Views UI', + ); + } + + /** + * Tests that displays can be overridden via the UI. + */ + public function testOverrideQuerySettings() { + // Create a basic view that shows all content, with a page display. + $view['human_name'] = $this->randomName(16); + $view['name'] = strtolower($this->randomName(16)); + $view['page[create]'] = 1; + $view['page[title]'] = $this->randomName(16); + $view['page[path]'] = $this->randomName(16); + $this->drupalPost('admin/structure/views/add', $view, t('Save & exit')); + + // Check override display option in the Query Settings. + $edit = array(); + $edit['override[dropdown]'] = 'page'; + $this->drupalPost("admin/structure/views/nojs/display/{$view['name']}/page/query", $edit, t('Apply')); + $this->assertResponse(200); + + // Save the view. + $this->drupalPost("admin/structure/views/view/{$view['name']}/edit/page", array(), t('Save')); + $this->assertText($view['page[title]']); + } + +} diff --git a/drupal7/web/sites/all/modules/contrib/views/tests/views_upgrade.test b/drupal7/web/sites/all/modules/contrib/views/tests/views_upgrade.test index 0b3c17f..7f5b7a7 100644 --- a/drupal7/web/sites/all/modules/contrib/views/tests/views_upgrade.test +++ b/drupal7/web/sites/all/modules/contrib/views/tests/views_upgrade.test @@ -38,7 +38,7 @@ class ViewsUpgradeTestCase extends ViewsSqlTest { /** * */ - function viewsData() { + public function viewsData() { $data = parent::viewsData(); $data['views_test']['old_field_1']['moved to'] = array('views_test', 'id'); $data['views_test']['old_field_2']['field']['moved to'] = array('views_test', 'name'); @@ -55,7 +55,7 @@ class ViewsUpgradeTestCase extends ViewsSqlTest { /** * */ - function debugField($field) { + public function debugField($field) { $keys = array('id', 'table', 'field', 'actual_field', 'original_field', 'real_field'); $info = array(); foreach ($keys as $key) { diff --git a/drupal7/web/sites/all/modules/contrib/views/tests/views_view.test b/drupal7/web/sites/all/modules/contrib/views/tests/views_view.test index 489864a..ee18f99 100644 --- a/drupal7/web/sites/all/modules/contrib/views/tests/views_view.test +++ b/drupal7/web/sites/all/modules/contrib/views/tests/views_view.test @@ -24,7 +24,7 @@ class ViewsViewTest extends ViewsSqlTest { /** * Ensure that every kind of heavy objects are removed by the destructor. */ - function testDestroy() { + public function testDestroy() { $view = $this->view_test_destroy(); $view->preview(); @@ -46,7 +46,7 @@ class ViewsViewTest extends ViewsSqlTest { * @param object $view * The view to destroy. */ - function assertViewDestroy($view) { + public function assertViewDestroy($view) { $this->assertFalse(isset($view->display['default']->handler), 'Make sure all displays are destroyed.'); $this->assertFalse(isset($view->display['attachment_1']->handler), 'Make sure all displays are destroyed.'); @@ -71,7 +71,7 @@ class ViewsViewTest extends ViewsSqlTest { /** * Test deleting a view. */ - function testDelete() { + public function testDelete() { // Delete a database view. $view = $this->view_test_delete(); $view->save(); @@ -88,7 +88,7 @@ class ViewsViewTest extends ViewsSqlTest { /** * Test validation. */ - function testValidate() { + public function testValidate() { // Test a view with multiple displays. // Validating a view shouldn't change the active display. // @todo Create an extra validation view. @@ -111,7 +111,7 @@ class ViewsViewTest extends ViewsSqlTest { * Includes: * filters, fields, arguments, relationships, sorts, areas and attachments. */ - function view_test_destroy() { + public function view_test_destroy() { $view = new view(); $view->name = 'test_destroy'; $view->description = ''; @@ -277,7 +277,7 @@ class ViewsViewTest extends ViewsSqlTest { /** * Creates a test view. */ - function view_test_delete() { + public function view_test_delete() { $view = new view(); $view->name = 'test_view_delete'; $view->description = ''; diff --git a/drupal7/web/sites/all/modules/contrib/views/theme/theme.inc b/drupal7/web/sites/all/modules/contrib/views/theme/theme.inc index cd4a7ce..a1fe247 100644 --- a/drupal7/web/sites/all/modules/contrib/views/theme/theme.inc +++ b/drupal7/web/sites/all/modules/contrib/views/theme/theme.inc @@ -42,11 +42,9 @@ function _views_theme_functions($hook, $view, $display = NULL) { * Preprocess the primary theme implementation for a view. */ function template_preprocess_views_view(&$vars) { - global $base_path; - $view = $vars['view']; - $vars['rows'] = (!empty($view->result) || $view->style_plugin->even_empty()) ? $view->style_plugin->render($view->result) : ''; + $vars['rows'] = (!empty($view->result) || $view->style_plugin->even_empty()) ? $view->style_plugin->render($view->result) : ''; $vars['css_name'] = drupal_clean_css_identifier($view->name); $vars['name'] = $view->name; @@ -75,11 +73,11 @@ function template_preprocess_views_view(&$vars) { $vars['empty'] = $view->display_handler->render_area('empty', $empty); } - $vars['exposed'] = !empty($view->exposed_widgets) ? $view->exposed_widgets : ''; - $vars['more'] = $view->display_handler->render_more_link(); - $vars['feed_icon'] = !empty($view->feed_icon) ? $view->feed_icon : ''; + $vars['exposed'] = !empty($view->exposed_widgets) ? $view->exposed_widgets : ''; + $vars['more'] = $view->display_handler->render_more_link(); + $vars['feed_icon'] = !empty($view->feed_icon) ? $view->feed_icon : ''; - $vars['pager'] = ''; + $vars['pager'] = ''; // @todo Figure out whether this belongs into views_ui_preprocess_views_view. // Render title for the admin preview. @@ -87,7 +85,7 @@ function template_preprocess_views_view(&$vars) { if ($view->display_handler->render_pager()) { $exposed_input = $view->get_exposed_input(); - $vars['pager'] = $view->query->render_pager($exposed_input); + $vars['pager'] = $view->query->render_pager($exposed_input); } $vars['attachment_before'] = !empty($view->attachment_before) ? $view->attachment_before : ''; @@ -129,9 +127,11 @@ function template_preprocess_views_view(&$vars) { 'view_args' => check_plain(implode('/', $view->args)), 'view_path' => check_plain($_GET['q']), // Pass through URL to ensure we get e.g. language prefixes. + // @code // 'view_base_path' => isset($view->display['page']) ? // substr(url($view->display['page']->display_options['path']), // strlen($base_path)) : '', + // @endcode 'view_base_path' => $view->get_path(), 'view_dom_id' => $vars['dom_id'], // To fit multiple views on a page, the programmer may have @@ -322,7 +322,6 @@ function template_preprocess_views_view_fields(&$vars) { * Display a single views grouping. */ function theme_views_view_grouping($vars) { - $view = $vars['view']; $title = $vars['title']; $content = $vars['content']; @@ -350,9 +349,6 @@ function template_preprocess_views_view_grouping(&$vars) { * @endcode */ function theme_views_view_field($vars) { - $view = $vars['view']; - $field = $vars['field']; - $row = $vars['row']; return $vars['output']; } @@ -371,8 +367,8 @@ function template_preprocess_views_view_field(&$vars) { * Preprocess theme function to print a single record from a row, with fields. */ function template_preprocess_views_view_summary(&$vars) { - $view = $vars['view']; - $argument = $view->argument[$view->build_info['summary_level']]; + $view = $vars['view']; + $argument = $view->argument[$view->build_info['summary_level']]; $vars['row_classes'] = array(); $url_options = array(); @@ -423,8 +419,8 @@ function template_preprocess_views_view_summary(&$vars) { * Template preprocess theme function to print summary basically unformatted. */ function template_preprocess_views_view_summary_unformatted(&$vars) { - $view = $vars['view']; - $argument = $view->argument[$view->build_info['summary_level']]; + $view = $vars['view']; + $argument = $view->argument[$view->build_info['summary_level']]; $vars['row_classes'] = array(); $url_options = array(); @@ -477,29 +473,29 @@ function template_preprocess_views_view_summary_unformatted(&$vars) { * Display a view as a table style. */ function template_preprocess_views_view_table(&$vars) { - $view = $vars['view']; + $view = $vars['view']; // We need the raw data for this grouping, which is passed in as // $vars['rows']. However, the template also needs to use for the rendered // fields. We therefore swap the raw data out to a new variable and reset // $vars['rows'] so that it can get rebuilt. Store rows so that they may be // used by further preprocess functions. - $result = $vars['result'] = $vars['rows']; - $vars['rows'] = array(); + $result = $vars['result'] = $vars['rows']; + $vars['rows'] = array(); $vars['field_classes'] = array(); - $vars['header'] = array(); + $vars['header'] = array(); $vars['classes_array'] = array(); - $options = $view->style_plugin->options; - $handler = $view->style_plugin; - + $options = $view->style_plugin->options; + $handler = $view->style_plugin; + if (!empty($handler->options['class'])) { $classes = explode(' ', $handler->options['class']); $classes = array_map('views_clean_css_identifier', $classes); if (!empty($classes)) { // Trim empty class entries. - foreach ($classes as $key => $class) { + foreach ($classes as $class) { if (!empty($class)) { $vars['classes_array'][] = $class; } @@ -507,17 +503,16 @@ function template_preprocess_views_view_table(&$vars) { } } - $default_row_class = isset($options['default_row_class']) ? $options['default_row_class'] : TRUE; $row_class_special = isset($options['row_class_special']) ? $options['row_class_special'] : TRUE; - $fields = &$view->field; - $columns = $handler->sanitize_columns($options['columns'], $fields); + $fields = &$view->field; + $columns = $handler->sanitize_columns($options['columns'], $fields); - $active = !empty($handler->active) ? $handler->active : ''; - $order = !empty($handler->order) ? $handler->order : 'asc'; + $active = !empty($handler->active) ? $handler->active : ''; + $order = !empty($handler->order) ? $handler->order : 'asc'; - $query = tablesort_get_query_parameters(); - $query += $view->get_exposed_input(); + $query = tablesort_get_query_parameters(); + $query += $view->get_exposed_input(); // Fields must be rendered in order as of Views 2.3, so we will pre-render // everything. @@ -636,14 +631,15 @@ function template_preprocess_views_view_table(&$vars) { // field is not empty. if (!empty($options['info'][$field]['empty_column'])) { $empty = TRUE; - foreach ($vars['rows'] as $num => $columns) { + foreach ($vars['rows'] as $columns) { $empty &= empty($columns[$column]); } if ($empty) { - foreach ($vars['rows'] as $num => &$column_items) { + foreach ($vars['rows'] as &$column_items) { unset($column_items[$column]); unset($vars['header'][$column]); } + unset($column_items); } } } @@ -701,14 +697,13 @@ function template_preprocess_views_view_table(&$vars) { * Display a view as a grid style. */ function template_preprocess_views_view_grid(&$vars) { - $view = $vars['view']; - $result = $view->result; - $options = $view->style_plugin->options; - $handler = $view->style_plugin; + $view = $vars['view']; + $options = $view->style_plugin->options; + $handler = $view->style_plugin; $default_row_class = isset($options['default_row_class']) ? $options['default_row_class'] : TRUE; $row_class_special = isset($options['row_class_special']) ? $options['row_class_special'] : TRUE; - $columns = $options['columns']; + $columns = $options['columns']; $rows = array(); $row_indexes = array(); @@ -872,7 +867,7 @@ function template_preprocess_views_view_unformatted(&$vars) { * Display the view as an HTML list element. */ function template_preprocess_views_view_list(&$vars) { - $handler = $vars['view']->style_plugin; + $handler = $vars['view']->style_plugin; $class = explode(' ', $handler->options['class']); $class = array_map('views_clean_css_identifier', $class); @@ -901,14 +896,12 @@ function template_preprocess_views_view_list(&$vars) { * Preprocess an RSS feed. */ function template_preprocess_views_view_rss(&$vars) { - global $base_url; global $language; - $view = &$vars['view']; - $options = &$vars['options']; - $items = &$vars['rows']; + $view = &$vars['view']; + $items = &$vars['rows']; - $style = &$view->style_plugin; + $style = &$view->style_plugin; // The RSS 2.0 "spec" doesn't indicate HTML can be used in the description. // We strip all HTML tags, but need to prevent double encoding from properly @@ -965,9 +958,7 @@ function template_preprocess_views_view_rss(&$vars) { * Default theme function for all RSS rows. */ function template_preprocess_views_view_row_rss(&$vars) { - $view = &$vars['view']; - $options = &$vars['options']; - $item = &$vars['row']; + $item = &$vars['row']; $vars['title'] = check_plain($item->title); $vars['link'] = check_url($item->link); @@ -1077,7 +1068,7 @@ function theme_views_form_views_form($variables) { } /** - * theme function for a mini pager. + * Theme function for a mini pager. */ function theme_views_mini_pager($vars) { global $pager_page_array, $pager_total; diff --git a/drupal7/web/sites/all/modules/contrib/views/theme/views-view-fields.tpl.php b/drupal7/web/sites/all/modules/contrib/views/theme/views-view-fields.tpl.php index ae3a4c6..fa03fe5 100644 --- a/drupal7/web/sites/all/modules/contrib/views/theme/views-view-fields.tpl.php +++ b/drupal7/web/sites/all/modules/contrib/views/theme/views-view-fields.tpl.php @@ -24,7 +24,7 @@ * @ingroup views_templates */ ?> - $field): ?> + separator)): ?> separator; ?> diff --git a/drupal7/web/sites/all/modules/contrib/views/views.api.php b/drupal7/web/sites/all/modules/contrib/views/views.api.php index 04ec32f..1d0be8a 100644 --- a/drupal7/web/sites/all/modules/contrib/views/views.api.php +++ b/drupal7/web/sites/all/modules/contrib/views/views.api.php @@ -26,7 +26,7 @@ * @{ * This page explains the basic cycle of a view and what processes happen. * - * @todo. + * @todo . * @} */ @@ -434,7 +434,7 @@ function hook_views_data() { 'label' => t('Published'), // This setting is used by the boolean filter handler, as possible option. 'type' => 'yes-no', - // use boolean_field = 1 instead of boolean_field <> 0 in WHERE statement. + // Use boolean_field = 1 instead of boolean_field <> 0 in WHERE statement. 'use equal' => TRUE, ), 'sort' => array( @@ -595,7 +595,7 @@ function hook_field_views_data_alter(&$result, $field, $module) { function hook_field_views_data_views_data_alter(&$data, $field) { $field_name = $field['field_name']; $data_key = 'field_data_' . $field_name; - // Views data for this field is in $data[$data_key] + // Views data for this field is in $data[$data_key]. } /** @@ -739,9 +739,9 @@ function hook_views_plugins_alter(&$plugins) { * modules. * * @param array $options - * The option definitions to be altered. + * The option definitions to be altered. * @param $plugin - * A views object of the plugin where the default options are defined. + * A views object of the plugin where the default options are defined. * * @see views_object::option_definition() * @see hook_views_handler_option_definition_alter() @@ -767,9 +767,9 @@ function hook_views_plugin_option_definition_alter(&$options, $plugin) { * modules. * * @param array $options - * The option definitions to be altered. + * The option definitions to be altered. * @param $handler - * A views object of the handler where the default options are defined. + * A views object of the handler where the default options are defined. * * @see views_handler::option_definition() * @see hook_views_plugin_option_definition_alter() @@ -1182,7 +1182,9 @@ function hook_views_query_alter(&$view, &$query) { ); } } + unset($condition); } + unset($condition_group); } } @@ -1262,7 +1264,7 @@ function hook_views_ui_ajax_forms_alter(&$forms) { // would contain $form_state['type'] and $form_state['id']. // The urls that would call this form would be (both nojs and ajax versions): // admin/structure/views/nojs/categorise-item//// - // admin/structure/views/ajax/categorise-item//// + // admin/structure/views/ajax/categorise-item////. $forms['categorise-item'] = array( 'form_id' => 'mymodule_views_categorize_fields_form', 'args' => array('type', 'id'), @@ -1293,6 +1295,7 @@ function hook_views_ajax_data_alter(&$commands, $view) { $command['command'] .= 'myScrollTop'; } } + unset($command); } /** diff --git a/drupal7/web/sites/all/modules/contrib/views/views.info b/drupal7/web/sites/all/modules/contrib/views/views.info index a0d236b..dc5374f 100644 --- a/drupal7/web/sites/all/modules/contrib/views/views.info +++ b/drupal7/web/sites/all/modules/contrib/views/views.info @@ -6,7 +6,9 @@ core = 7.x ; Always available CSS stylesheets[all][] = css/views.css +; THe Views system has only one dependency, everything else is built into core. dependencies[] = ctools + ; Handlers files[] = handlers/views_handler_area.inc files[] = handlers/views_handler_area_messages.inc @@ -330,8 +332,8 @@ files[] = tests/views_clone.test files[] = tests/views_view.test files[] = tests/views_ui.test -; Information added by Drupal.org packaging script on 2023-03-13 -version = "7.x-3.29" +; Information added by Drupal.org packaging script on 2025-03-13 +version = "7.x-3.30" core = "7.x" project = "views" -datestamp = "1678722019" +datestamp = "1741861463" diff --git a/drupal7/web/sites/all/modules/contrib/views/views.install b/drupal7/web/sites/all/modules/contrib/views/views.install index 92c7abc..883ed5f 100644 --- a/drupal7/web/sites/all/modules/contrib/views/views.install +++ b/drupal7/web/sites/all/modules/contrib/views/views.install @@ -102,9 +102,9 @@ function views_schema_6000() { 'current_version' => '3.0', ), 'object' => 'view', - // the callback to load the displays. + // The callback to load the displays. 'subrecords callback' => 'views_load_display_records', - // the variable that holds enabled/disabled status. + // The variable that holds enabled/disabled status. 'status' => 'views_defaults', // CRUD callbacks. 'create callback' => 'views_new_view', @@ -149,7 +149,7 @@ function views_schema_6000() { 'base_table' => array( 'type' => 'varchar', 'length' => '32', - // Updated to '64' in views_schema_6005() + // Updated to '64' in views_schema_6005() 'default' => '', 'not null' => TRUE, 'description' => 'What table this view is based on, such as node, user, comment, or term.', @@ -204,7 +204,7 @@ function views_schema_6000() { 'description' => 'The order in which this display is loaded.', ), 'display_options' => array( - // Type corrected in update 6009 + // Type corrected in update 6009. 'type' => 'blob', 'description' => 'A serialized array of options for this display; it contains options that are generally only pertinent to that display plugin type.', 'serialize' => TRUE, @@ -244,7 +244,7 @@ function views_schema_6000() { ), 'data' => array( 'type' => 'blob', - // Updated to 'text' (with size => 'big') in views_schema_6004() + // Updated to 'text' (with size => 'big') in views_schema_6004() 'description' => 'Serialized data being stored.', 'serialize' => TRUE, ), @@ -311,6 +311,10 @@ function views_schema_6003() { unset($schema['views_view']['unique key']); return $schema; } + +/** + * + */ function views_update_6003() { db_add_unique_key('views_view', 'name', array('name')); } @@ -325,6 +329,10 @@ function views_schema_6004() { $schema['views_object_cache']['fields']['data']['size'] = 'big'; return $schema; } + +/** + * + */ function views_update_6004() { $new_field = array( 'type' => 'text', @@ -347,6 +355,10 @@ function views_schema_6005() { $schema['views_view']['fields']['base_table']['length'] = 64; return $schema; } + +/** + * + */ function views_update_6005() { $new_field = array( 'type' => 'varchar', @@ -368,6 +380,10 @@ function views_schema_6006() { $schema['cache_views_data']['fields']['serialized']['default'] = 1; return $schema; } + +/** + * + */ function views_update_6006() { $table = drupal_get_schema_unprocessed('system', 'cache'); $table['description'] = 'Cache table for views to store pre-rendered queries, results, and display output.'; @@ -420,6 +436,9 @@ function views_schema_6009() { return $schema; } +/** + * + */ function views_update_6009() { $schema = views_schema_6009(); @@ -497,7 +516,6 @@ function views_update_6012() { ->fields(array('cache' => DRUPAL_NO_CACHE)); } - /** * Add a human readable name. */ @@ -512,6 +530,9 @@ function views_schema_6013() { return $schema; } +/** + * + */ function views_update_6013() { // Check because D6 installs may already have added this. if (!db_field_exists('views_view', 'human_name')) { @@ -527,6 +548,9 @@ function views_update_6013() { } } +/** + * + */ function views_schema_6014() { $schema = views_schema(__FUNCTION__); $schema['views_view']['fields']['core'] = array( @@ -599,9 +623,13 @@ function views_update_7001() { } } +/** + * + */ function views_schema_7300() { return views_schema_6013(); } + /** * Make sure the human_name field is added to the views_view table. * @@ -615,6 +643,9 @@ function views_update_7300() { views_update_6013(); } +/** + * + */ function views_schema_7301() { $schema = views_schema(__FUNCTION__); $schema['views_view']['fields']['name']['length'] = 128; diff --git a/drupal7/web/sites/all/modules/contrib/views/views.module b/drupal7/web/sites/all/modules/contrib/views/views.module index b62e439..d28303e 100644 --- a/drupal7/web/sites/all/modules/contrib/views/views.module +++ b/drupal7/web/sites/all/modules/contrib/views/views.module @@ -153,7 +153,7 @@ function views_theme($existing, $type, $theme, $path) { // Register theme functions for all style plugins. foreach ($plugins as $type => $info) { - foreach ($info as $plugin => $def) { + foreach ($info as $def) { if (isset($def['theme']) && (!isset($def['register theme']) || !empty($def['register theme']))) { $hooks[$def['theme']] = array( 'pattern' => $def['theme'] . '__', @@ -310,7 +310,7 @@ function views_plugin_list() { $plugin_data = views_fetch_plugin_data(); $plugins = array(); foreach (views_get_enabled_views() as $view) { - foreach ($view->display as $display_id => $display) { + foreach ($view->display as $display) { foreach ($plugin_data as $type => $info) { if ($type == 'display' && isset($display->display_plugin)) { $name = $display->display_plugin; @@ -702,7 +702,7 @@ function views_block_info() { } $view->init_display(); - foreach ($view->display as $display_id => $display) { + foreach ($view->display as $display) { if (isset($display->handler) && !empty($display->handler->definition['uses hook block'])) { $result = $display->handler->execute_hook_block_list(); @@ -825,7 +825,7 @@ function views_block_view($delta) { // This indicates it's a special one. if (substr($delta, 0, 1) == '-') { - list($nothing, $type, $name, $display_id) = explode('-', $delta); + list(, $type, $name, $display_id) = explode('-', $delta); // Put the - back on. $type = '-' . $type; if ($view = views_get_view($name)) { @@ -1861,7 +1861,7 @@ function views_debug($message, $placeholders = array()) { } elseif ($devel_region == 'drupal_debug') { $output = empty($output) ? t($message, $placeholders) : $output; - dd($output); + drupal_debug($output); } else { $output = empty($output) ? t($message, $placeholders) : $output; @@ -1890,6 +1890,9 @@ function vsm($message) { } } +/** + * + */ function views_trace() { $message = ''; foreach (debug_backtrace() as $item) { @@ -1901,10 +1904,16 @@ function views_trace() { return $message; } +/** + * + */ function vsm_trace() { vsm(views_trace()); } +/** + * + */ function vpr_trace() { dpr(views_trace()); } @@ -1982,8 +1991,7 @@ function views_form_views_form($form, &$form_state, $view, $output) { ); $substitutions = array(); - foreach ($view->field as $field_name => $field) { - $form_element_name = $field_name; + foreach ($view->field as $form_element_name => $field) { if (method_exists($field, 'form_element_name')) { $form_element_name = $field->form_element_name(); } @@ -2059,7 +2067,7 @@ function views_form_views_form_validate($form, &$form_state) { $view = $form_state['build_info']['args'][0]; // Call the validation method on every field handler that has it. - foreach ($view->field as $field_name => $field) { + foreach ($view->field as $field) { if (method_exists($field, 'views_form_validate')) { $field->views_form_validate($form, $form_state); } @@ -2067,7 +2075,7 @@ function views_form_views_form_validate($form, &$form_state) { // Call the validate method on every area handler that has it. foreach (array('header', 'footer') as $area) { - foreach ($view->{$area} as $area_name => $area_handler) { + foreach ($view->{$area} as $area_handler) { if (method_exists($area_handler, 'views_form_validate')) { $area_handler->views_form_validate($form, $form_state); } @@ -2085,7 +2093,7 @@ function views_form_views_form_submit($form, &$form_state) { $view = $form_state['build_info']['args'][0]; // Call the submit method on every field handler that has it. - foreach ($view->field as $field_name => $field) { + foreach ($view->field as $field) { if (method_exists($field, 'views_form_submit')) { $field->views_form_submit($form, $form_state); } @@ -2093,7 +2101,7 @@ function views_form_views_form_submit($form, &$form_state) { // Call the submit method on every area handler that has it. foreach (array('header', 'footer') as $area) { - foreach ($view->{$area} as $area_name => $area_handler) { + foreach ($view->{$area} as $area_handler) { if (method_exists($area_handler, 'views_form_submit')) { $area_handler->views_form_submit($form, $form_state); } @@ -2438,6 +2446,7 @@ function _views_query_tag_alter_condition(QueryAlterableInterface $query, &$cond } } } + unset($condition); } /** @@ -2600,12 +2609,15 @@ function views_var_export($var, $prefix = '', $init = TRUE) { * * @see drupal_clean_css_identifier() */ -function views_clean_css_identifier($identifier, $filter = array( - ' ' => '-', - '/' => '-', - '[' => '-', - ']' => '', -)) { +function views_clean_css_identifier( + $identifier, + $filter = array( + ' ' => '-', + '/' => '-', + '[' => '-', + ']' => '', + ) +) { // By default, we filter using Drupal's coding standards. $identifier = strtr($identifier, $filter); @@ -2770,172 +2782,210 @@ function views_admin_menu_cache_info() { } if (!function_exists('aggregator_views_api')) { + /** * Provide Views integration for the Aggregator module. */ function aggregator_views_api() { return views_views_api(); } + } if (!function_exists('book_views_api')) { + /** * Provide Views integration for the Book module. */ function book_views_api() { return views_views_api(); } + } if (!function_exists('comment_views_api')) { + /** * Provide Views integration for the Comment module. */ function comment_views_api() { return views_views_api(); } + } if (!function_exists('field_views_api')) { + /** * Provide Views integration for the Field module. */ function field_views_api() { return views_views_api(); } + } if (!function_exists('file_views_api')) { + /** * Provide Views integration for the File module. */ function file_views_api() { return views_views_api(); } + } if (!function_exists('filter_views_api')) { + /** * Provide Views integration for the Filter module. */ function filter_views_api() { return views_views_api(); } + } if (!function_exists('image_views_api')) { + /** * Provide Views integration for the Image module. */ function image_views_api() { return views_views_api(); } + } if (!function_exists('locale_views_api')) { + /** * Provide Views integration for the Locale module. */ function locale_views_api() { return views_views_api(); } + } if (!function_exists('node_views_api')) { + /** * Provide Views integration for the Node module. */ function node_views_api() { return views_views_api(); } + } if (!function_exists('poll_views_api')) { + /** * Provide Views integration for the Poll module. */ function poll_views_api() { return views_views_api(); } + } if (!function_exists('profile_views_api')) { + /** * Provide Views integration for the Profile module. */ function profile_views_api() { return views_views_api(); } + } if (!function_exists('search_views_api')) { + /** * Provide Views integration for the Search module. */ function search_views_api() { return views_views_api(); } + } if (!function_exists('statistics_views_api')) { + /** * Provide Views integration for the Statistics module. */ function statistics_views_api() { return views_views_api(); } + } if (!function_exists('system_views_api')) { + /** * Provide Views integration for the System module. */ function system_views_api() { return views_views_api(); } + } if (!function_exists('tracker_views_api')) { + /** * Provide Views integration for the Tracker module. */ function tracker_views_api() { return views_views_api(); } + } if (!function_exists('taxonomy_views_api')) { + /** * Provide Views integration for the Taxonomy module. */ function taxonomy_views_api() { return views_views_api(); } + } if (!function_exists('translation_views_api')) { + /** * Provide Views integration for the Translation module. */ function translation_views_api() { return views_views_api(); } + } if (!function_exists('user_views_api')) { + /** * Provide Views integration for the User module. */ function user_views_api() { return views_views_api(); } + } if (!function_exists('contact_views_api')) { + /** * Provide Views integration for the Contact module. */ function contact_views_api() { return views_views_api(); } + } diff --git a/drupal7/web/sites/all/modules/contrib/views/views_ui.info b/drupal7/web/sites/all/modules/contrib/views/views_ui.info index 3adf44a..ef9cf56 100644 --- a/drupal7/web/sites/all/modules/contrib/views/views_ui.info +++ b/drupal7/web/sites/all/modules/contrib/views/views_ui.info @@ -8,8 +8,8 @@ dependencies[] = views files[] = views_ui.module files[] = plugins/views_wizard/views_ui_base_views_wizard.class.php -; Information added by Drupal.org packaging script on 2023-03-13 -version = "7.x-3.29" +; Information added by Drupal.org packaging script on 2025-03-13 +version = "7.x-3.30" core = "7.x" project = "views" -datestamp = "1678722019" +datestamp = "1741861463" diff --git a/drupal7/web/sites/all/modules/contrib/views/views_ui.module b/drupal7/web/sites/all/modules/contrib/views/views_ui.module index d58797a..5668c8b 100644 --- a/drupal7/web/sites/all/modules/contrib/views/views_ui.module +++ b/drupal7/web/sites/all/modules/contrib/views/views_ui.module @@ -610,7 +610,7 @@ function views_ui_ctools_plugin_directory($module, $plugin) { function views_ui_get_wizard($wizard_type) { ctools_include('plugins'); $wizard = ctools_get_plugins('views_ui', 'views_wizard', $wizard_type); - // @todo - handle this via an alter hook instead. + // @todo Handle this via an alter hook instead. if (!$wizard) { // Must be a base table using the default wizard plugin. $base_tables = views_fetch_base_tables(); @@ -643,7 +643,7 @@ function views_ui_get_wizards() { $base_tables = views_fetch_base_tables(); $default_wizard = views_ui_views_wizard_defaults(); // Find base tables with no wizard. - // @todo - handle this via an alter hook for plugins? + // @todo Handle this via an alter hook for plugins? foreach ($base_tables as $table => $info) { if (!isset($wizard_tables[$table])) { $wizard = $default_wizard; @@ -721,6 +721,7 @@ function views_ui_views_plugins_alter(&$plugins) { 'argument properties' => array('name'), ); } + unset($display); } /** diff --git a/drupal7/web/themes/bartik/bartik.info b/drupal7/web/themes/bartik/bartik.info index 97f6391..5a1ecbf 100644 --- a/drupal7/web/themes/bartik/bartik.info +++ b/drupal7/web/themes/bartik/bartik.info @@ -34,7 +34,7 @@ regions[footer] = Footer settings[shortcut_module_link] = 0 -; Information added by Drupal.org packaging script on 2024-03-06 -version = "7.100" +; Information added by Drupal.org packaging script on 2024-12-04 +version = "7.103" project = "drupal" -datestamp = "1709734591" +datestamp = "1733324608" diff --git a/drupal7/web/themes/garland/garland.info b/drupal7/web/themes/garland/garland.info index 399f3e7..033d002 100644 --- a/drupal7/web/themes/garland/garland.info +++ b/drupal7/web/themes/garland/garland.info @@ -7,7 +7,7 @@ stylesheets[all][] = style.css stylesheets[print][] = print.css settings[garland_width] = fluid -; Information added by Drupal.org packaging script on 2024-03-06 -version = "7.100" +; Information added by Drupal.org packaging script on 2024-12-04 +version = "7.103" project = "drupal" -datestamp = "1709734591" +datestamp = "1733324608" diff --git a/drupal7/web/themes/seven/seven.info b/drupal7/web/themes/seven/seven.info index 75338fc..7671dbb 100644 --- a/drupal7/web/themes/seven/seven.info +++ b/drupal7/web/themes/seven/seven.info @@ -13,7 +13,7 @@ regions[page_bottom] = Page bottom regions[sidebar_first] = First sidebar regions_hidden[] = sidebar_first -; Information added by Drupal.org packaging script on 2024-03-06 -version = "7.100" +; Information added by Drupal.org packaging script on 2024-12-04 +version = "7.103" project = "drupal" -datestamp = "1709734591" +datestamp = "1733324608" diff --git a/drupal7/web/themes/stark/stark.info b/drupal7/web/themes/stark/stark.info index 21cd5ab..c555729 100644 --- a/drupal7/web/themes/stark/stark.info +++ b/drupal7/web/themes/stark/stark.info @@ -5,7 +5,7 @@ version = VERSION core = 7.x stylesheets[all][] = layout.css -; Information added by Drupal.org packaging script on 2024-03-06 -version = "7.100" +; Information added by Drupal.org packaging script on 2024-12-04 +version = "7.103" project = "drupal" -datestamp = "1709734591" +datestamp = "1733324608"