summaryrefslogtreecommitdiff
path: root/kolab.org
diff options
context:
space:
mode:
Diffstat (limited to 'kolab.org')
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/ctools/bulk_export/bulk_export.info6
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/ctools/ctools.info6
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/ctools/ctools_access_ruleset/ctools_access_ruleset.info6
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/ctools/ctools_ajax_sample/ctools_ajax_sample.info6
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/ctools/ctools_custom_content/ctools_custom_content.info6
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/ctools/ctools_custom_content/ctools_custom_content.install2
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/ctools/ctools_plugin_example/ctools_plugin_example.info6
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/ctools/help/plugins-creating.html4
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/ctools/includes/context-task-handler.inc34
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/ctools/includes/context.inc2
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/ctools/includes/css.inc5
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/ctools/includes/export.inc7
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/ctools/includes/wizard.inc26
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/ctools/js/auto-submit.js9
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/ctools/js/modal.js5
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/ctools/page_manager/page_manager.info6
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/ctools/page_manager/page_manager.install2
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/ctools/page_manager/page_manager.module38
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/ctools/plugins/access/entity_field_value.inc22
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/ctools/plugins/content_types/block/block.inc70
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/ctools/plugins/content_types/entity_context/entity_field.inc2
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/ctools/plugins/content_types/node_form/node_form_author.inc2
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/ctools/plugins/content_types/node_form/node_form_publishing.inc2
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/ctools/plugins/content_types/term_context/term_description.inc2
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/ctools/stylizer/stylizer.info6
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/ctools/tests/context.test58
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/ctools/tests/css.test12
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/ctools/tests/ctools_export_test/ctools_export_test.info6
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/ctools/tests/ctools_plugin_test.info7
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/ctools/views_content/views_content.info6
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/ldap/CHANGELOG.txt7
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/ldap/ldap_authentication/LdapAuthenticationConf.class.php37
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/ldap/ldap_authentication/README.txt23
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/ldap/ldap_authentication/ldap_authentication.admin.inc2
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/ldap/ldap_authentication/ldap_authentication.inc35
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/ldap/ldap_authentication/ldap_authentication.info6
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/ldap/ldap_authentication/tests/LdapServerTestData.ldapauthen1.inc5
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/ldap/ldap_authorization/LdapAuthorizationConsumerConf.class.php21
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/ldap/ldap_authorization/ldap_authorization.inc3
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/ldap/ldap_authorization/ldap_authorization.info6
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/ldap/ldap_authorization/ldap_authorization_drupal_role/LdapAuthorizationConsumerRole.class.php72
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/ldap/ldap_authorization/ldap_authorization_drupal_role/ldap_authorization_drupal_role.info6
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/ldap/ldap_authorization/ldap_authorization_og/ldap_authorization_og.info6
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/ldap/ldap_authorization/tests/1197636/1197636.ldap_servers.test_data.inc2
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/ldap/ldap_authorization/tests/BasicTests/ldap_servers.inc14
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/ldap/ldap_authorization/tests/DeriveFromAttr/ldap_servers.inc15
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/ldap/ldap_authorization/tests/DeriveFromDN/ldap_servers.inc9
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/ldap/ldap_authorization/tests/Og/ldap_servers.inc14
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/ldap/ldap_authorization/tests/Other/ldap_servers.inc14
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/ldap/ldap_feeds/ldap_feeds.info6
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/ldap/ldap_help/ldap_help.info6
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/ldap/ldap_help/ldap_test_script/README.txt93
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/ldap/ldap_help/ldap_test_script/config.inc101
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/ldap/ldap_help/ldap_test_script/functions.inc186
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/ldap/ldap_help/ldap_test_script/test.php164
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/ldap/ldap_profile/ldap_profile.info6
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/ldap/ldap_profile/ldap_profile.module17
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/ldap/ldap_query/ldap_query.info6
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/ldap/ldap_servers/LdapServer.class.php1
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/ldap/ldap_servers/ldap_servers.api.php16
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/ldap/ldap_servers/ldap_servers.functions.inc61
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/ldap/ldap_servers/ldap_servers.info6
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/ldap/ldap_servers/ldap_servers.test_form.inc15
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/ldap/ldap_servers/tests/LdapServerTest.class.php14
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/ldap/ldap_sso/ldap_sso.info6
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/ldap/ldap_sso/ldap_sso.module5
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/ldap/ldap_views/ldap_views.info6
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/ldap/ldap_views/plugins/ldap_views_plugin_query_ldap.inc7
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/CHANGELOG.txt397
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/css/views-admin.bartik.css9
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/css/views-admin.seven.css6
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/css/views-admin.theme.css29
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/docs/views.api.php761
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/drush/views.drush.inc15
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/handlers/views_handler_area.inc24
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/handlers/views_handler_area_result.inc13
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/handlers/views_handler_area_text.inc14
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/handlers/views_handler_area_text_custom.inc56
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/handlers/views_handler_area_view.inc7
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/handlers/views_handler_argument.inc42
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/handlers/views_handler_argument_date.inc9
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/handlers/views_handler_argument_formula.inc6
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/handlers/views_handler_argument_group_by_numeric.inc5
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/handlers/views_handler_argument_many_to_one.inc12
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/handlers/views_handler_argument_null.inc8
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/handlers/views_handler_argument_numeric.inc7
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/handlers/views_handler_argument_string.inc33
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/handlers/views_handler_field.inc183
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/handlers/views_handler_field_boolean.inc5
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/handlers/views_handler_field_contextual_links.inc55
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/handlers/views_handler_field_counter.inc5
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/handlers/views_handler_field_custom.inc9
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/handlers/views_handler_field_date.inc26
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/handlers/views_handler_field_entity.inc6
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/handlers/views_handler_field_machine_name.inc7
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/handlers/views_handler_field_markup.inc5
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/handlers/views_handler_field_math.inc10
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/handlers/views_handler_field_numeric.inc10
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/handlers/views_handler_field_prerender_list.inc7
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/handlers/views_handler_field_serialized.inc5
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/handlers/views_handler_field_time_interval.inc6
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/handlers/views_handler_field_url.inc12
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/handlers/views_handler_filter.inc774
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/handlers/views_handler_filter_boolean_operator.inc9
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/handlers/views_handler_filter_boolean_operator_string.inc6
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/handlers/views_handler_filter_combine.inc137
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/handlers/views_handler_filter_date.inc33
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/handlers/views_handler_filter_entity_bundle.inc122
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/handlers/views_handler_filter_equality.inc6
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/handlers/views_handler_filter_group_by_numeric.inc5
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/handlers/views_handler_filter_in_operator.inc11
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/handlers/views_handler_filter_many_to_one.inc5
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/handlers/views_handler_filter_numeric.inc8
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/handlers/views_handler_filter_string.inc10
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/handlers/views_handler_relationship.inc7
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/handlers/views_handler_relationship_groupwise_max.inc39
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/handlers/views_handler_sort.inc16
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/handlers/views_handler_sort_date.inc5
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/handlers/views_handler_sort_group_by_numeric.inc6
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/handlers/views_handler_sort_menu_hierarchy.inc37
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/handlers/views_handler_sort_random.inc5
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/help/about.html4
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/help/advanced-settings.html43
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/help/advanced-style-settings.html30
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/help/api-forms.html4
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/help/api-handlers.html71
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/help/api-plugins.html114
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/help/api-tables.html32
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/help/api.html2
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/help/example-slideshow-thumb-pager.html54
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/help/filter.html15
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/help/group-by.html2
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/help/images/views3-views-all.pngbin0 -> 38583 bytes
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/help/misc-notes.html1
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/help/style-jump.html2
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/help/view-add.html14
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/help/views.help.ini13
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/includes/admin.inc278
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/includes/ajax.inc16
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/includes/analyze.inc1
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/includes/base.inc46
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/includes/cache.inc20
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/includes/form.inc7
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/includes/handlers.inc74
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/includes/plugins.inc23
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/includes/view.inc202
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/js/ajax.js3
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/js/ajax_view.js7
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/js/base.js3
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/js/jquery.ui.dialog.patch.js4
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/js/views-admin.js54
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/modules/aggregator.views.inc25
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/modules/aggregator/views_handler_argument_aggregator_category_cid.inc5
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/modules/aggregator/views_handler_argument_aggregator_fid.inc5
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/modules/aggregator/views_handler_argument_aggregator_iid.inc5
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/modules/aggregator/views_handler_field_aggregator_category.inc7
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/modules/aggregator/views_handler_field_aggregator_title_link.inc9
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/modules/aggregator/views_handler_field_aggregator_xss.inc6
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/modules/aggregator/views_handler_filter_aggregator_category_cid.inc6
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/modules/aggregator/views_plugin_row_aggregator_rss.inc1
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/modules/book.views.inc24
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/modules/book/views_plugin_argument_default_book_root.inc21
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/modules/comment.views.inc42
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/modules/comment/views_handler_argument_comment_user_uid.inc5
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/modules/comment/views_handler_field_comment.inc10
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/modules/comment/views_handler_field_comment_depth.inc6
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/modules/comment/views_handler_field_comment_link.inc8
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/modules/comment/views_handler_field_comment_link_approve.inc5
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/modules/comment/views_handler_field_comment_link_delete.inc6
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/modules/comment/views_handler_field_comment_link_edit.inc8
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/modules/comment/views_handler_field_comment_link_reply.inc5
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/modules/comment/views_handler_field_comment_node_link.inc9
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/modules/comment/views_handler_field_comment_username.inc8
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/modules/comment/views_handler_field_last_comment_timestamp.inc5
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/modules/comment/views_handler_field_ncs_last_comment_name.inc7
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/modules/comment/views_handler_field_ncs_last_updated.inc5
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/modules/comment/views_handler_field_node_comment.inc5
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/modules/comment/views_handler_field_node_new_comments.inc7
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/modules/comment/views_handler_filter_comment_user_uid.inc5
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/modules/comment/views_handler_filter_ncs_last_updated.inc8
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/modules/comment/views_handler_filter_node_comment.inc7
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/modules/comment/views_handler_sort_comment_thread.inc10
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/modules/comment/views_handler_sort_ncs_last_comment_name.inc6
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/modules/comment/views_handler_sort_ncs_last_updated.inc6
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/modules/comment/views_plugin_row_comment_rss.inc3
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/modules/comment/views_plugin_row_comment_view.inc3
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/modules/contact.views.inc11
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/modules/contact/views_handler_field_contact_link.inc6
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/modules/field.views.inc35
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/modules/field/views_handler_argument_field_list.inc14
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/modules/field/views_handler_argument_field_list_string.inc59
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/modules/field/views_handler_field_field.inc81
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/modules/field/views_handler_filter_field_list.inc21
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/modules/field/views_handler_relationship_entity_reverse.inc3
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/modules/file.views.inc14
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/modules/filter.views.inc14
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/modules/filter/views_handler_field_filter_format_name.inc6
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/modules/image.views.inc14
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/modules/locale.views.inc29
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/modules/locale/views_handler_argument_locale_group.inc5
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/modules/locale/views_handler_argument_locale_language.inc5
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/modules/locale/views_handler_field_locale_group.inc5
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/modules/locale/views_handler_field_locale_language.inc11
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/modules/locale/views_handler_field_locale_link_edit.inc5
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/modules/locale/views_handler_field_node_language.inc (renamed from kolab.org/www/drupal-7.15/sites/all/modules/views/modules/translation/views_handler_field_node_language.inc)7
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/modules/locale/views_handler_filter_locale_group.inc5
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/modules/locale/views_handler_filter_locale_language.inc5
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/modules/locale/views_handler_filter_locale_version.inc5
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/modules/locale/views_handler_filter_node_language.inc (renamed from kolab.org/www/drupal-7.15/sites/all/modules/views/modules/translation/views_handler_filter_node_language.inc)6
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/modules/node.views.inc58
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/modules/node.views_template.inc2
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/modules/node/views_handler_argument_dates_various.inc12
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/modules/node/views_handler_argument_node_language.inc6
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/modules/node/views_handler_argument_node_nid.inc1
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/modules/node/views_handler_argument_node_type.inc8
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/modules/node/views_handler_argument_node_uid_revision.inc6
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/modules/node/views_handler_argument_node_vid.inc3
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/modules/node/views_handler_field_history_user_timestamp.inc14
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/modules/node/views_handler_field_node.inc3
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/modules/node/views_handler_field_node_link.inc6
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/modules/node/views_handler_field_node_link_delete.inc6
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/modules/node/views_handler_field_node_link_edit.inc6
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/modules/node/views_handler_field_node_path.inc2
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/modules/node/views_handler_field_node_revision.inc8
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/modules/node/views_handler_field_node_revision_link.inc66
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/modules/node/views_handler_field_node_revision_link_delete.inc28
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/modules/node/views_handler_field_node_revision_link_revert.inc26
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/modules/node/views_handler_field_node_type.inc8
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/modules/node/views_handler_filter_history_user_timestamp.inc11
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/modules/node/views_handler_filter_node_access.inc6
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/modules/node/views_handler_filter_node_status.inc8
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/modules/node/views_handler_filter_node_type.inc9
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/modules/node/views_handler_filter_node_uid_revision.inc3
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/modules/node/views_plugin_argument_default_node.inc1
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/modules/node/views_plugin_argument_validate_node.inc4
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/modules/node/views_plugin_row_node_rss.inc14
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/modules/node/views_plugin_row_node_view.inc17
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/modules/poll.views.inc16
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/modules/profile.views.inc17
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/modules/profile/views_handler_field_profile_date.inc6
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/modules/profile/views_handler_field_profile_list.inc6
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/modules/profile/views_handler_filter_profile_selection.inc5
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/modules/search.views.inc19
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/modules/search/views_handler_argument_search.inc5
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/modules/search/views_handler_field_search_score.inc7
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/modules/search/views_handler_filter_search.inc8
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/modules/search/views_handler_sort_search_score.inc5
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/modules/search/views_plugin_row_search_view.inc5
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/modules/statistics.views.inc16
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/modules/statistics/views_handler_field_accesslog_path.inc8
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/modules/system.views.inc41
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/modules/system/views_handler_argument_file_fid.inc6
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/modules/system/views_handler_field_file.inc8
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/modules/system/views_handler_field_file_extension.inc5
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/modules/system/views_handler_field_file_filemime.inc7
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/modules/system/views_handler_field_file_status.inc6
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/modules/system/views_handler_field_file_uri.inc7
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/modules/system/views_handler_filter_file_status.inc6
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/modules/system/views_handler_filter_system_type.inc5
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/modules/taxonomy.views.inc55
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/modules/taxonomy/views_handler_argument_taxonomy.inc5
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/modules/taxonomy/views_handler_argument_term_node_tid.inc8
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/modules/taxonomy/views_handler_argument_term_node_tid_depth.inc12
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/modules/taxonomy/views_handler_argument_term_node_tid_depth_modifier.inc5
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/modules/taxonomy/views_handler_argument_vocabulary_machine_name.inc5
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/modules/taxonomy/views_handler_argument_vocabulary_vid.inc5
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/modules/taxonomy/views_handler_field_taxonomy.inc9
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/modules/taxonomy/views_handler_field_term_link_edit.inc5
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/modules/taxonomy/views_handler_field_term_node_tid.inc11
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/modules/taxonomy/views_handler_filter_term_node_tid.inc15
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/modules/taxonomy/views_handler_filter_term_node_tid_depth.inc6
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/modules/taxonomy/views_handler_filter_vocabulary_machine_name.inc5
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/modules/taxonomy/views_handler_filter_vocabulary_vid.inc5
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/modules/taxonomy/views_handler_relationship_node_term_data.inc8
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/modules/taxonomy/views_plugin_argument_default_taxonomy_tid.inc12
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/modules/taxonomy/views_plugin_argument_validate_taxonomy_term.inc3
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/modules/translation.views.inc33
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/modules/translation/views_handler_argument_node_tnid.inc1
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/modules/translation/views_handler_field_node_link_translate.inc6
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/modules/translation/views_handler_field_node_translation_link.inc6
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/modules/translation/views_handler_filter_node_tnid.inc6
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/modules/translation/views_handler_filter_node_tnid_child.inc6
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/modules/translation/views_handler_relationship_translation.inc5
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/modules/user.views.inc27
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/modules/user/views_handler_argument_user_uid.inc3
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/modules/user/views_handler_argument_users_roles_rid.inc6
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/modules/user/views_handler_field_user.inc7
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/modules/user/views_handler_field_user_language.inc14
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/modules/user/views_handler_field_user_link.inc6
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/modules/user/views_handler_field_user_link_cancel.inc6
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/modules/user/views_handler_field_user_link_edit.inc6
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/modules/user/views_handler_field_user_mail.inc6
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/modules/user/views_handler_field_user_name.inc10
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/modules/user/views_handler_field_user_permissions.inc6
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/modules/user/views_handler_field_user_picture.inc7
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/modules/user/views_handler_field_user_roles.inc12
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/modules/user/views_handler_filter_user_current.inc5
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/modules/user/views_handler_filter_user_name.inc21
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/modules/user/views_handler_filter_user_permissions.inc6
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/modules/user/views_handler_filter_user_roles.inc6
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/modules/user/views_plugin_argument_default_current_user.inc1
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/modules/user/views_plugin_argument_default_user.inc3
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/modules/user/views_plugin_argument_validate_user.inc9
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/modules/views.views.inc29
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/plugins/views_plugin_access.inc19
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/plugins/views_plugin_access_none.inc7
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/plugins/views_plugin_access_perm.inc9
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/plugins/views_plugin_access_role.inc7
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/plugins/views_plugin_argument_default.inc11
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/plugins/views_plugin_argument_default_fixed.inc3
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/plugins/views_plugin_argument_default_php.inc3
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/plugins/views_plugin_argument_default_raw.inc16
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/plugins/views_plugin_argument_validate.inc8
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/plugins/views_plugin_argument_validate_numeric.inc1
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/plugins/views_plugin_argument_validate_php.inc1
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/plugins/views_plugin_cache.inc65
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/plugins/views_plugin_cache_none.inc7
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/plugins/views_plugin_cache_time.inc59
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/plugins/views_plugin_display.inc150
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/plugins/views_plugin_display_attachment.inc9
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/plugins/views_plugin_display_block.inc43
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/plugins/views_plugin_display_default.inc2
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/plugins/views_plugin_display_embed.inc14
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/plugins/views_plugin_display_extender.inc14
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/plugins/views_plugin_display_feed.inc1
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/plugins/views_plugin_display_page.inc12
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/plugins/views_plugin_exposed_form.inc25
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/plugins/views_plugin_exposed_form_basic.inc9
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/plugins/views_plugin_exposed_form_input_required.inc11
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/plugins/views_plugin_localization.inc14
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/plugins/views_plugin_pager.inc19
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/plugins/views_plugin_pager_full.inc75
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/plugins/views_plugin_pager_mini.inc5
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/plugins/views_plugin_pager_none.inc5
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/plugins/views_plugin_pager_some.inc5
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/plugins/views_plugin_query.inc20
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/plugins/views_plugin_query_default.inc134
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/plugins/views_plugin_row.inc19
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/plugins/views_plugin_row_fields.inc8
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/plugins/views_plugin_row_rss_fields.inc180
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/plugins/views_plugin_style.inc55
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/plugins/views_plugin_style_default.inc1
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/plugins/views_plugin_style_grid.inc3
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/plugins/views_plugin_style_jump_menu.inc5
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/plugins/views_plugin_style_list.inc1
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/plugins/views_plugin_style_rss.inc16
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/plugins/views_plugin_style_summary.inc1
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/plugins/views_plugin_style_summary_jump_menu.inc7
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/plugins/views_plugin_style_summary_unformatted.inc3
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/plugins/views_plugin_style_table.inc7
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/plugins/views_wizard/views_ui_base_views_wizard.class.php18
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/plugins/views_wizard/views_ui_comment_views_wizard.class.php8
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/plugins/views_wizard/views_ui_file_managed_views_wizard.class.php8
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/plugins/views_wizard/views_ui_node_revision_views_wizard.class.php18
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/plugins/views_wizard/views_ui_node_views_wizard.class.php8
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/plugins/views_wizard/views_ui_taxonomy_term_views_wizard.class.php8
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/plugins/views_wizard/views_ui_users_views_wizard.class.php8
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/tests/comment/views_handler_argument_comment_user_uid.test7
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/tests/comment/views_handler_filter_comment_user_uid.test8
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/tests/field/views_fieldapi.test498
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/tests/handlers/views_handler_area_text.test5
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/tests/handlers/views_handler_argument_null.test8
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/tests/handlers/views_handler_argument_string.test96
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/tests/handlers/views_handler_field.test227
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/tests/handlers/views_handler_field_boolean.test8
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/tests/handlers/views_handler_field_counter.test10
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/tests/handlers/views_handler_field_custom.test8
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/tests/handlers/views_handler_field_date.test55
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/tests/handlers/views_handler_field_file_size.test7
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/tests/handlers/views_handler_field_math.test8
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/tests/handlers/views_handler_field_url.test8
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/tests/handlers/views_handler_field_xss.test7
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/tests/handlers/views_handler_filter_combine.test105
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/tests/handlers/views_handler_filter_date.test11
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/tests/handlers/views_handler_filter_equality.test91
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/tests/handlers/views_handler_filter_in_operator.test107
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/tests/handlers/views_handler_filter_numeric.test196
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/tests/handlers/views_handler_filter_string.test403
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/tests/handlers/views_handler_sort.test11
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/tests/handlers/views_handler_sort_date.test9
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/tests/handlers/views_handler_sort_random.test11
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/tests/plugins/views_plugin_display.test194
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/tests/styles/views_plugin_style.test48
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/tests/styles/views_plugin_style_jump_menu.test8
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/tests/styles/views_plugin_style_unformatted.test73
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/tests/taxonomy/views_handler_relationship_node_term_data.test122
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/tests/templates/views-view--frontpage.tpl.php5
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/tests/test_plugins/views_test_plugin_access_test_dynamic.inc10
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/tests/test_plugins/views_test_plugin_access_test_static.inc10
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/tests/user/views_handler_field_user_name.test8
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/tests/user/views_user.test5
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/tests/user/views_user_argument_default.test5
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/tests/user/views_user_argument_validate.test6
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/tests/views_access.test15
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/tests/views_analyze.test5
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/tests/views_argument_default.test32
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/tests/views_argument_validator.test8
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/tests/views_basic.test19
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/tests/views_cache.test119
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/tests/views_cache.test.css5
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/tests/views_cache.test.js5
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/tests/views_exposed_form.test83
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/tests/views_glossary.test7
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/tests/views_groupby.test13
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/tests/views_handlers.test44
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/tests/views_module.test11
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/tests/views_pager.test112
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/tests/views_plugin_localization_test.inc5
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/tests/views_query.test19
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/tests/views_test.info6
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/tests/views_test.install8
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/tests/views_test.module20
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/tests/views_test.views_default.inc79
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/tests/views_translatable.test25
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/tests/views_ui.test46
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/tests/views_upgrade.test9
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/tests/views_view.test9
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/theme/theme.inc114
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/theme/views-exposed-form.tpl.php9
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/theme/views-more.tpl.php5
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/theme/views-ui-display-tab-bucket.tpl.php2
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/theme/views-ui-display-tab-setting.tpl.php2
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/theme/views-ui-edit-item.tpl.php4
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/theme/views-ui-edit-view.tpl.php3
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/theme/views-view-field.tpl.php41
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/theme/views-view-fields.tpl.php3
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/theme/views-view-grid.tpl.php7
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/theme/views-view-grouping.tpl.php31
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/theme/views-view-list.tpl.php3
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/theme/views-view-row-comment.tpl.php3
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/theme/views-view-row-rss.tpl.php3
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/theme/views-view-rss.tpl.php3
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/theme/views-view-summary-unformatted.tpl.php5
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/theme/views-view-summary.tpl.php5
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/theme/views-view-table.tpl.php5
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/theme/views-view-unformatted.tpl.php5
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/theme/views-view.tpl.php5
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/views.api.php1107
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/views.info27
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/views.install6
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/views.module190
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/views3.doxy1252
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/views_export/views_export.module13
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/views_ui.info6
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/views_ui.module49
445 files changed, 10293 insertions, 4114 deletions
diff --git a/kolab.org/www/drupal-7.15/sites/all/modules/ctools/bulk_export/bulk_export.info b/kolab.org/www/drupal-7.15/sites/all/modules/ctools/bulk_export/bulk_export.info
index 790561c..6f57712 100644
--- a/kolab.org/www/drupal-7.15/sites/all/modules/ctools/bulk_export/bulk_export.info
+++ b/kolab.org/www/drupal-7.15/sites/all/modules/ctools/bulk_export/bulk_export.info
@@ -4,9 +4,9 @@ core = 7.x
dependencies[] = ctools
package = Chaos tool suite
-; Information added by drupal.org packaging script on 2012-08-08
-version = "7.x-1.1"
+; Information added by drupal.org packaging script on 2012-08-18
+version = "7.x-1.2"
core = "7.x"
project = "ctools"
-datestamp = "1344463011"
+datestamp = "1345319204"
diff --git a/kolab.org/www/drupal-7.15/sites/all/modules/ctools/ctools.info b/kolab.org/www/drupal-7.15/sites/all/modules/ctools/ctools.info
index 2ccf719..c3e56fb 100644
--- a/kolab.org/www/drupal-7.15/sites/all/modules/ctools/ctools.info
+++ b/kolab.org/www/drupal-7.15/sites/all/modules/ctools/ctools.info
@@ -6,9 +6,9 @@ files[] = includes/context.inc
files[] = includes/math-expr.inc
files[] = includes/stylizer.inc
-; Information added by drupal.org packaging script on 2012-08-08
-version = "7.x-1.1"
+; Information added by drupal.org packaging script on 2012-08-18
+version = "7.x-1.2"
core = "7.x"
project = "ctools"
-datestamp = "1344463011"
+datestamp = "1345319204"
diff --git a/kolab.org/www/drupal-7.15/sites/all/modules/ctools/ctools_access_ruleset/ctools_access_ruleset.info b/kolab.org/www/drupal-7.15/sites/all/modules/ctools/ctools_access_ruleset/ctools_access_ruleset.info
index 4562d7a..04c92c3 100644
--- a/kolab.org/www/drupal-7.15/sites/all/modules/ctools/ctools_access_ruleset/ctools_access_ruleset.info
+++ b/kolab.org/www/drupal-7.15/sites/all/modules/ctools/ctools_access_ruleset/ctools_access_ruleset.info
@@ -4,9 +4,9 @@ core = 7.x
package = Chaos tool suite
dependencies[] = ctools
-; Information added by drupal.org packaging script on 2012-08-08
-version = "7.x-1.1"
+; Information added by drupal.org packaging script on 2012-08-18
+version = "7.x-1.2"
core = "7.x"
project = "ctools"
-datestamp = "1344463011"
+datestamp = "1345319204"
diff --git a/kolab.org/www/drupal-7.15/sites/all/modules/ctools/ctools_ajax_sample/ctools_ajax_sample.info b/kolab.org/www/drupal-7.15/sites/all/modules/ctools/ctools_ajax_sample/ctools_ajax_sample.info
index 056083d..bbf708c 100644
--- a/kolab.org/www/drupal-7.15/sites/all/modules/ctools/ctools_ajax_sample/ctools_ajax_sample.info
+++ b/kolab.org/www/drupal-7.15/sites/all/modules/ctools/ctools_ajax_sample/ctools_ajax_sample.info
@@ -4,9 +4,9 @@ package = Chaos tool suite
dependencies[] = ctools
core = 7.x
-; Information added by drupal.org packaging script on 2012-08-08
-version = "7.x-1.1"
+; Information added by drupal.org packaging script on 2012-08-18
+version = "7.x-1.2"
core = "7.x"
project = "ctools"
-datestamp = "1344463011"
+datestamp = "1345319204"
diff --git a/kolab.org/www/drupal-7.15/sites/all/modules/ctools/ctools_custom_content/ctools_custom_content.info b/kolab.org/www/drupal-7.15/sites/all/modules/ctools/ctools_custom_content/ctools_custom_content.info
index 75a2a93..b56e3be 100644
--- a/kolab.org/www/drupal-7.15/sites/all/modules/ctools/ctools_custom_content/ctools_custom_content.info
+++ b/kolab.org/www/drupal-7.15/sites/all/modules/ctools/ctools_custom_content/ctools_custom_content.info
@@ -4,9 +4,9 @@ core = 7.x
package = Chaos tool suite
dependencies[] = ctools
-; Information added by drupal.org packaging script on 2012-08-08
-version = "7.x-1.1"
+; Information added by drupal.org packaging script on 2012-08-18
+version = "7.x-1.2"
core = "7.x"
project = "ctools"
-datestamp = "1344463011"
+datestamp = "1345319204"
diff --git a/kolab.org/www/drupal-7.15/sites/all/modules/ctools/ctools_custom_content/ctools_custom_content.install b/kolab.org/www/drupal-7.15/sites/all/modules/ctools/ctools_custom_content/ctools_custom_content.install
index 8348434..b4512f2 100644
--- a/kolab.org/www/drupal-7.15/sites/all/modules/ctools/ctools_custom_content/ctools_custom_content.install
+++ b/kolab.org/www/drupal-7.15/sites/all/modules/ctools/ctools_custom_content/ctools_custom_content.install
@@ -17,7 +17,7 @@ function ctools_custom_content_schema_1() {
'bulk export' => TRUE,
'primary key' => 'cid',
'api' => array(
- 'owner' => 'ctools',
+ 'owner' => 'ctools_custom_content',
'api' => 'ctools_content',
'minimum_version' => 1,
'current_version' => 1,
diff --git a/kolab.org/www/drupal-7.15/sites/all/modules/ctools/ctools_plugin_example/ctools_plugin_example.info b/kolab.org/www/drupal-7.15/sites/all/modules/ctools/ctools_plugin_example/ctools_plugin_example.info
index 3b11096..c9f12e7 100644
--- a/kolab.org/www/drupal-7.15/sites/all/modules/ctools/ctools_plugin_example/ctools_plugin_example.info
+++ b/kolab.org/www/drupal-7.15/sites/all/modules/ctools/ctools_plugin_example/ctools_plugin_example.info
@@ -7,9 +7,9 @@ dependencies[] = page_manager
dependencies[] = advanced_help
core = 7.x
-; Information added by drupal.org packaging script on 2012-08-08
-version = "7.x-1.1"
+; Information added by drupal.org packaging script on 2012-08-18
+version = "7.x-1.2"
core = "7.x"
project = "ctools"
-datestamp = "1344463011"
+datestamp = "1345319204"
diff --git a/kolab.org/www/drupal-7.15/sites/all/modules/ctools/help/plugins-creating.html b/kolab.org/www/drupal-7.15/sites/all/modules/ctools/help/plugins-creating.html
index 186bb74..29a9014 100644
--- a/kolab.org/www/drupal-7.15/sites/all/modules/ctools/help/plugins-creating.html
+++ b/kolab.org/www/drupal-7.15/sites/all/modules/ctools/help/plugins-creating.html
@@ -1,7 +1,7 @@
There are two primary pieces to using plugins. The first is getting the data, and the second is using the data.
<h2>Defining a plugin</h2>
-To define that you offer a plugin that modules can implement, you first must implement hook_ctools_plugin_type() to tell the plugin system about your plugin.
+To define that you offer a plugin that modules can implement, you first must implement hook_ctools_plugin_type() to tell the plugin system about your plugin.
<pre>
/**
@@ -49,7 +49,7 @@ The following information can be specified for each plugin type:
<dd><em>Defaults to:</em> <strong>FALSE</strong></dd>
<dd>If set to TRUE, the plugin type can automatically have 'child plugins' meaning each plugin can actually provide multiple plugins. This is mostly used for plugins that store some of their information in the database, such as views, blocks or exportable custom versions of plugins.</dd>
<dd>To implement, each plugin can have a 'get child' and 'get children' callback. Both of these should be implemented for performance reasons, since it is best to avoid getting all children if necessary, but if 'get child' is not implemented, it will fall back to 'get children' if it has to.</dd>
-<dd>Child plugins should be named parent:child, with the : being the separator, so that it knows which parent plugin to ask for teh child. The 'get children' method should at least return the parent plugin as part of the list, unless it wants the parent plugin itself to not be a choosable option, which is not unheard of. </dd>
+<dd>Child plugins should be named parent:child, with the : being the separator, so that it knows which parent plugin to ask for the child. The 'get children' method should at least return the parent plugin as part of the list, unless it wants the parent plugin itself to not be a choosable option, which is not unheard of. </dd>
<dd>'get children' arguments are ($plugin, $parent) and 'get child' arguments are ($plugin, $parent, $child).
</dl>
diff --git a/kolab.org/www/drupal-7.15/sites/all/modules/ctools/includes/context-task-handler.inc b/kolab.org/www/drupal-7.15/sites/all/modules/ctools/includes/context-task-handler.inc
index 10fd793..617f20e 100644
--- a/kolab.org/www/drupal-7.15/sites/all/modules/ctools/includes/context-task-handler.inc
+++ b/kolab.org/www/drupal-7.15/sites/all/modules/ctools/includes/context-task-handler.inc
@@ -100,6 +100,24 @@ function ctools_context_handler_render_handler($task, $subtask, $handler, $conte
return NULL;
}
+ if ($page) {
+ if ($subtask) {
+ $task_name = page_manager_make_task_name($task['name'], $subtask['name']);
+ }
+ else {
+ $task_name = $task['name'];
+ }
+
+ page_manager_get_current_page(array(
+ 'name' => $task_name,
+ 'task' => $task,
+ 'subtask' => $subtask,
+ 'contexts' => $contexts,
+ 'arguments' => $args,
+ 'handler' => $handler,
+ ));
+ }
+
$info = $function($handler, $contexts, $args);
if (!$info) {
return NULL;
@@ -119,22 +137,6 @@ function ctools_context_handler_render_handler($task, $subtask, $handler, $conte
return $info;
}
- if ($subtask) {
- $task_name = page_manager_make_task_name($task['name'], $subtask['name']);
- }
- else {
- $task_name = $task['name'];
- }
-
- page_manager_get_current_page(array(
- 'name' => $task_name,
- 'task' => $task,
- 'subtask' => $subtask,
- 'contexts' => $contexts,
- 'arguments' => $args,
- 'handler' => $handler,
- ));
-
if (!empty($info['response code']) && $info['response code'] != 200) {
switch ($info['response code']) {
case 403:
diff --git a/kolab.org/www/drupal-7.15/sites/all/modules/ctools/includes/context.inc b/kolab.org/www/drupal-7.15/sites/all/modules/ctools/includes/context.inc
index 720a6fc..5c7a4ce 100644
--- a/kolab.org/www/drupal-7.15/sites/all/modules/ctools/includes/context.inc
+++ b/kolab.org/www/drupal-7.15/sites/all/modules/ctools/includes/context.inc
@@ -633,7 +633,7 @@ function ctools_context_keyword_substitute($string, $keywords, $contexts, $conve
// Look for context matches we we only have to convert known matches.
$matches = array();
- if (preg_match_all('/%([a-zA-Z0-9%:_-]+)/us', $string, $matches)) {
+ if (preg_match_all('/%(%|[a-zA-Z0-9_-]+(?:\:[a-zA-Z0-9_-]+)?)/us', $string, $matches)) {
foreach ($matches[1] as $keyword) {
// Ignore anything it finds with %%.
if ($keyword[0] == '%') {
diff --git a/kolab.org/www/drupal-7.15/sites/all/modules/ctools/includes/css.inc b/kolab.org/www/drupal-7.15/sites/all/modules/ctools/includes/css.inc
index 8bc4c66..ee11d48 100644
--- a/kolab.org/www/drupal-7.15/sites/all/modules/ctools/includes/css.inc
+++ b/kolab.org/www/drupal-7.15/sites/all/modules/ctools/includes/css.inc
@@ -284,8 +284,9 @@ function ctools_css_disassemble($css) {
$disassembled_css = array();
// Remove comments.
$css = preg_replace("/\/\*(.*)?\*\//Usi", "", $css);
- // Split out each statement
- $statements = preg_split('/[;}]/', $css);
+ // Split out each statement. Match either a right curly brace or a semi-colon
+ // that precedes a left curly brace with no right curly brace separating them.
+ $statements = preg_split('/}|;(?=[^}]*{)/', $css);
// If we have any statements, parse them.
if (!empty($statements)) {
diff --git a/kolab.org/www/drupal-7.15/sites/all/modules/ctools/includes/export.inc b/kolab.org/www/drupal-7.15/sites/all/modules/ctools/includes/export.inc
index dfbe74b..0b2ef46 100644
--- a/kolab.org/www/drupal-7.15/sites/all/modules/ctools/includes/export.inc
+++ b/kolab.org/www/drupal-7.15/sites/all/modules/ctools/includes/export.inc
@@ -386,10 +386,15 @@ function ctools_export_crud_disable($table, $object) {
*/
function ctools_export_load_object($table, $type = 'all', $args = array()) {
$cache = &drupal_static(__FUNCTION__);
+ $cache_table_exists = &drupal_static(__FUNCTION__ . '_table_exists', array());
$cached_database = &drupal_static('ctools_export_load_object_all');
+ if (!array_key_exists($table, $cache_table_exists)) {
+ $cache_table_exists[$table] = db_table_exists($table);
+ }
+
$schema = ctools_export_get_schema($table);
- if (empty($schema) || !db_table_exists($table)) {
+ if (empty($schema) || !$cache_table_exists[$table]) {
return array();
}
diff --git a/kolab.org/www/drupal-7.15/sites/all/modules/ctools/includes/wizard.inc b/kolab.org/www/drupal-7.15/sites/all/modules/ctools/includes/wizard.inc
index 946ed0f..6f5d794 100644
--- a/kolab.org/www/drupal-7.15/sites/all/modules/ctools/includes/wizard.inc
+++ b/kolab.org/www/drupal-7.15/sites/all/modules/ctools/includes/wizard.inc
@@ -430,6 +430,12 @@ function ctools_wizard_submit(&$form, &$form_state) {
}
else if ($type == 'next') {
$form_state['redirect'] = ctools_wizard_get_path($form_state['form_info'], $form_state['clicked_button']['#next']);
+ if (!empty($_GET['destination'])) {
+ // We don't want drupal_goto redirect this request
+ // back. ctools_wizard_get_path ensures that the destination is
+ // carried over on subsequent pages.
+ unset($_GET['destination']);
+ }
}
else if (isset($form_state['form_info']['return path'])) {
$form_state['redirect'] = $form_state['form_info']['return path'];
@@ -449,11 +455,27 @@ function ctools_wizard_get_path($form_info, $step) {
foreach ($form_info['path'] as $id => $part) {
$form_info['path'][$id] = str_replace('%step', $step, $form_info['path'][$id]);
}
- return $form_info['path'];
+ $path = $form_info['path'];
}
else {
- return array(str_replace('%step', $step, $form_info['path']));
+ $path = array(str_replace('%step', $step, $form_info['path']));
+ }
+
+ // If destination is set, carry it over so it'll take effect when
+ // saving. The submit handler will unset destination to avoid drupal_goto
+ // redirecting us.
+ if (!empty($_GET['destination'])) {
+ // Ensure that options is an array.
+ if (!isset($path[1]) || !is_array($path[1])) {
+ $path[1] = array();
+ }
+ // Ensure that the query part of options is an array.
+ $path[1] += array('query' => array());
+ // Add the destination parameter, if not set already.
+ $path[1]['query'] += drupal_get_destination();
}
+
+ return $path;
}
/**
diff --git a/kolab.org/www/drupal-7.15/sites/all/modules/ctools/js/auto-submit.js b/kolab.org/www/drupal-7.15/sites/all/modules/ctools/js/auto-submit.js
index 59178c4..890dd1f 100644
--- a/kolab.org/www/drupal-7.15/sites/all/modules/ctools/js/auto-submit.js
+++ b/kolab.org/www/drupal-7.15/sites/all/modules/ctools/js/auto-submit.js
@@ -16,6 +16,12 @@
* '#attributes' => array('class' => array('ctools-auto-submit-full-form')),
* @endcode
*
+ * If you want to exclude a field from the ctool-auto-submit-full-form auto submission,
+ * add the class ctools-auto-submit-exclude to the form element. With FAPI, add:
+ * @code
+ * '#attributes' => array('class' => array('ctools-auto-submit-exclude')),
+ * @endcode
+ *
* Finally, you have to identify which button you want clicked for autosubmit.
* The behavior of this button will be honored if it's ajaxy or not:
* @code
@@ -39,7 +45,7 @@ Drupal.behaviors.CToolsAutoSubmit = {
// the change event bubbles so we only need to bind it to the outer form
$('form.ctools-auto-submit-full-form', context)
.add('.ctools-auto-submit', context)
- .filter('form, select, input:not(:text, :submit)')
+ .filter('form, select, input:not(:text, :submit, .ctools-auto-submit-exclude)')
.once('ctools-auto-submit')
.change(function (e) {
// don't trigger on text change for full-form
@@ -68,6 +74,7 @@ Drupal.behaviors.CToolsAutoSubmit = {
];
// Don't wait for change event on textfields
$('.ctools-auto-submit-full-form input:text, input:text.ctools-auto-submit', context)
+ .filter(':not(.ctools-auto-submit-exclude)')
.once('ctools-auto-submit', function () {
// each textinput element has his own timeout
var timeoutID = 0;
diff --git a/kolab.org/www/drupal-7.15/sites/all/modules/ctools/js/modal.js b/kolab.org/www/drupal-7.15/sites/all/modules/ctools/js/modal.js
index 1376d82..5b417d0 100644
--- a/kolab.org/www/drupal-7.15/sites/all/modules/ctools/js/modal.js
+++ b/kolab.org/www/drupal-7.15/sites/all/modules/ctools/js/modal.js
@@ -278,7 +278,10 @@
Drupal.CTools.Modal.show(Drupal.CTools.Modal.getSettings(ajax.element));
}
$('#modal-title').html(response.title);
- $('#modal-content').html(response.output);
+ // Simulate an actual page load by scrolling to the top after adding the
+ // content. This is helpful for allowing users to see error messages at the
+ // top of a form, etc.
+ $('#modal-content').html(response.output).scrollTop(0);
Drupal.attachBehaviors();
}
diff --git a/kolab.org/www/drupal-7.15/sites/all/modules/ctools/page_manager/page_manager.info b/kolab.org/www/drupal-7.15/sites/all/modules/ctools/page_manager/page_manager.info
index 780c115..d3e3588 100644
--- a/kolab.org/www/drupal-7.15/sites/all/modules/ctools/page_manager/page_manager.info
+++ b/kolab.org/www/drupal-7.15/sites/all/modules/ctools/page_manager/page_manager.info
@@ -4,9 +4,9 @@ core = 7.x
dependencies[] = ctools
package = Chaos tool suite
-; Information added by drupal.org packaging script on 2012-08-08
-version = "7.x-1.1"
+; Information added by drupal.org packaging script on 2012-08-18
+version = "7.x-1.2"
core = "7.x"
project = "ctools"
-datestamp = "1344463011"
+datestamp = "1345319204"
diff --git a/kolab.org/www/drupal-7.15/sites/all/modules/ctools/page_manager/page_manager.install b/kolab.org/www/drupal-7.15/sites/all/modules/ctools/page_manager/page_manager.install
index ad2781c..b170ce7 100644
--- a/kolab.org/www/drupal-7.15/sites/all/modules/ctools/page_manager/page_manager.install
+++ b/kolab.org/www/drupal-7.15/sites/all/modules/ctools/page_manager/page_manager.install
@@ -23,6 +23,8 @@ function page_manager_schema_1() {
'identifier' => 'handler',
'bulk export' => TRUE,
'export callback' => 'page_manager_export_task_handler',
+ 'load callback' => 'page_manager_export_task_handler_load',
+ 'delete callback' => 'page_manager_delete_task_handler',
'primary key' => 'did',
'api' => array(
'owner' => 'page_manager',
diff --git a/kolab.org/www/drupal-7.15/sites/all/modules/ctools/page_manager/page_manager.module b/kolab.org/www/drupal-7.15/sites/all/modules/ctools/page_manager/page_manager.module
index 6d6c199..62f6d27 100644
--- a/kolab.org/www/drupal-7.15/sites/all/modules/ctools/page_manager/page_manager.module
+++ b/kolab.org/www/drupal-7.15/sites/all/modules/ctools/page_manager/page_manager.module
@@ -696,6 +696,44 @@ function page_manager_export_task_handler($handler, $indent = '') {
}
/**
+ * Loads page manager handler for export.
+ *
+ * Callback to load page manager handler within ctools_export_crud_load().
+ *
+ * @param string $name
+ * The name of the handler to load.
+ *
+ * @return
+ * Loaded page manager handler object, extended with external properties.
+ */
+function page_manager_export_task_handler_load($name) {
+ $table = 'page_manager_handlers';
+ $schema = ctools_export_get_schema($table);
+ $export = $schema['export'];
+
+ $result = ctools_export_load_object($table, 'names', array($name));
+ if (isset($result[$name])) {
+ $handler = $result[$name];
+
+ // Weight is stored in additional table so that in-code task handlers
+ // don't need to get written to the database just because they have their
+ // weight changed. Therefore, handler could have no correspondent database
+ // entry. Revert will not be performed for this handler and the weight
+ // will not be reverted. To make possible revert of the weight field
+ // export_type must simulate that the handler is stored in the database.
+ $handler->export_type = EXPORT_IN_DATABASE;
+
+ // Also, page manager handler weight should be overriden with correspondent
+ // weight from page_manager_weights table, if there is one.
+ $result = db_query('SELECT weight FROM {page_manager_weights} WHERE name = (:names)', array(':names' => $handler->name))->fetchField();
+ if (is_numeric($result)) {
+ $handler->weight = $result;
+ }
+ return $handler;
+ }
+}
+
+/**
* Create a new task handler object.
*
* @param $plugin
diff --git a/kolab.org/www/drupal-7.15/sites/all/modules/ctools/plugins/access/entity_field_value.inc b/kolab.org/www/drupal-7.15/sites/all/modules/ctools/plugins/access/entity_field_value.inc
index 1fb1fe8..59b01fb 100644
--- a/kolab.org/www/drupal-7.15/sites/all/modules/ctools/plugins/access/entity_field_value.inc
+++ b/kolab.org/www/drupal-7.15/sites/all/modules/ctools/plugins/access/entity_field_value.inc
@@ -141,7 +141,13 @@ function ctools_entity_field_value_ctools_access_check($conf, $context, $plugin)
if ($field_items = field_get_items($entity_type, $context->data, $field_name)) {
$langcode = field_language($entity_type, $context->data, $field_name);
-
+ // Get field storage columns.
+ $instance = field_info_instance($entity_type, $field_name, $bundle_type);
+ $field = field_info_field_by_id($instance['field_id']);
+ $columns = array();
+ foreach ($field['columns'] as $column => $attributes) {
+ $columns[$column] = _field_sql_storage_columnname($field_name, $column);
+ }
foreach ($conf as $potential_field => $values) {
if ($field_name === $potential_field) {
@@ -152,8 +158,14 @@ function ctools_entity_field_value_ctools_access_check($conf, $context, $plugin)
// Check field value.
foreach ($field_items as $field_value) {
- if (in_array($field_value['value'], $conf_value_array)) {
- return TRUE;
+ foreach ($field_value as $field_column => $value) {
+ // Iterate through config values.
+ foreach ($conf_value_array as $conf_value) {
+ //
+ if ($value == $conf_value[$field_column]) {
+ return TRUE;
+ }
+ }
}
}
}
@@ -168,8 +180,8 @@ function _ctools_entity_field_value_ctools_access_get_conf_field_values($values,
}
$conf_values = array();
- foreach ($values[$langcode] as $value) {
- $conf_values[] = $value['value'];
+ foreach ($values[$langcode] as $delta => $value) {
+ $conf_values[$delta] = $value;
}
return $conf_values;
diff --git a/kolab.org/www/drupal-7.15/sites/all/modules/ctools/plugins/content_types/block/block.inc b/kolab.org/www/drupal-7.15/sites/all/modules/ctools/plugins/content_types/block/block.inc
index 866f72e..f5b0063 100644
--- a/kolab.org/www/drupal-7.15/sites/all/modules/ctools/plugins/content_types/block/block.inc
+++ b/kolab.org/www/drupal-7.15/sites/all/modules/ctools/plugins/content_types/block/block.inc
@@ -78,21 +78,72 @@ function _ctools_block_content_type_content_type($module, $delta, $block) {
}
/**
+ * Load block info from the database.
+ *
+ * This is copied from _block_load_blocks(). It doesn't use that
+ * function because _block_load_blocks sorts by region, and it
+ * doesn't cache its results anyway.
+ */
+function _ctools_block_load_blocks() {
+ $blocks = &drupal_static(__FUNCTION__, NULL);
+ if (!isset($blocks)) {
+ global $theme_key;
+
+ $query = db_select('block', 'b');
+ $result = $query
+ ->fields('b')
+ ->condition('b.theme', $theme_key)
+ ->orderBy('b.region')
+ ->orderBy('b.weight')
+ ->orderBy('b.module')
+ ->addTag('block_load')
+ ->addTag('translatable')
+ ->execute();
+
+ $block_info = $result->fetchAllAssoc('bid');
+ // Allow modules to modify the block list.
+ drupal_alter('block_list', $block_info);
+
+ $blocks = array();
+ foreach ($block_info as $block) {
+ $blocks["{$block->module}_{$block->delta}"] = $block;
+ }
+ }
+
+ return $blocks;
+}
+
+/**
+ * Fetch the stored info for a block.
+ *
+ * The primary reason to use this is so that modules which perform alters
+ * can have their alters make it to the block.
+ */
+function _ctools_get_block_info($module, $delta) {
+ $blocks = _ctools_block_load_blocks();
+
+ $key = $module . '_' . $delta;
+ if (isset($blocks[$key])) {
+ return $blocks[$key];
+ }
+}
+
+/**
* Output function for the 'block' content type. Outputs a block
* based on the module and delta supplied in the configuration.
*/
function ctools_block_content_type_render($subtype, $conf) {
list($module, $delta) = _ctools_block_get_module_delta($subtype, $conf);
- $info = new stdClass;
- $info->module = $module;
- $info->delta = $delta;
+ $info = _ctools_get_block_info($module, $delta);
$block = module_invoke($module, 'block_view', $delta);
- // Allow modules to modify the block before it is viewed, via either
- // hook_block_view_alter() or hook_block_view_MODULE_DELTA_alter().
- drupal_alter(array('block_view', "block_view_{$module}_{$delta}"), $block, $info);
- $block = (object) $block;
+ if (!empty($info)) {
+ // Allow modules to modify the block before it is viewed, via either
+ // hook_block_view_alter() or hook_block_view_MODULE_DELTA_alter().
+ drupal_alter(array('block_view', "block_view_{$module}_{$delta}"), $block, $info);
+ $block = (object) $block;
+ }
if (empty($block)) {
return;
@@ -101,7 +152,10 @@ function ctools_block_content_type_render($subtype, $conf) {
$block->module = $module;
$block->delta = $delta;
- if (isset($block->subject)) {
+ if ($module == 'block') {
+ $block->title = $info->title;
+ }
+ else if (isset($block->subject)) {
$block->title = $block->subject;
}
else {
diff --git a/kolab.org/www/drupal-7.15/sites/all/modules/ctools/plugins/content_types/entity_context/entity_field.inc b/kolab.org/www/drupal-7.15/sites/all/modules/ctools/plugins/content_types/entity_context/entity_field.inc
index fb3fad2..2da4044 100644
--- a/kolab.org/www/drupal-7.15/sites/all/modules/ctools/plugins/content_types/entity_context/entity_field.inc
+++ b/kolab.org/www/drupal-7.15/sites/all/modules/ctools/plugins/content_types/entity_context/entity_field.inc
@@ -154,7 +154,7 @@ function ctools_entity_field_content_type_render($subtype, $conf, $panel_args, $
$clone->{$field_name}[$language] = $all_values;
$field_output = field_view_field($entity_type, $clone, $field_name, $field_settings, $language);
- if (!empty($conf['override_title'])) {
+ if (!empty($field_output) && !empty($conf['override_title'])) {
$field_output['#title'] = filter_xss_admin($conf['override_title_text']);
}
diff --git a/kolab.org/www/drupal-7.15/sites/all/modules/ctools/plugins/content_types/node_form/node_form_author.inc b/kolab.org/www/drupal-7.15/sites/all/modules/ctools/plugins/content_types/node_form/node_form_author.inc
index 5cb6a34..350df40 100644
--- a/kolab.org/www/drupal-7.15/sites/all/modules/ctools/plugins/content_types/node_form/node_form_author.inc
+++ b/kolab.org/www/drupal-7.15/sites/all/modules/ctools/plugins/content_types/node_form/node_form_author.inc
@@ -43,7 +43,7 @@ function ctools_node_form_author_content_type_render($subtype, $conf, $panel_arg
}
function ctools_node_form_author_content_type_admin_title($subtype, $conf, $context) {
- return t('"@s" node form publishing options', array('@s' => $context->identifier));
+ return t('"@s" node form author information', array('@s' => $context->identifier));
}
function ctools_node_form_author_content_type_edit_form($form, &$form_state) {
diff --git a/kolab.org/www/drupal-7.15/sites/all/modules/ctools/plugins/content_types/node_form/node_form_publishing.inc b/kolab.org/www/drupal-7.15/sites/all/modules/ctools/plugins/content_types/node_form/node_form_publishing.inc
index 3f3cf25..e73cff2 100644
--- a/kolab.org/www/drupal-7.15/sites/all/modules/ctools/plugins/content_types/node_form/node_form_publishing.inc
+++ b/kolab.org/www/drupal-7.15/sites/all/modules/ctools/plugins/content_types/node_form/node_form_publishing.inc
@@ -45,7 +45,7 @@ function ctools_node_form_publishing_content_type_render($subtype, $conf, $panel
}
function ctools_node_form_publishing_content_type_admin_title($subtype, $conf, $context) {
- return t('"@s" node form author information', array('@s' => $context->identifier));
+ return t('"@s" node form publishing options', array('@s' => $context->identifier));
}
function ctools_node_form_publishing_content_type_edit_form($form, &$form_state) {
diff --git a/kolab.org/www/drupal-7.15/sites/all/modules/ctools/plugins/content_types/term_context/term_description.inc b/kolab.org/www/drupal-7.15/sites/all/modules/ctools/plugins/content_types/term_context/term_description.inc
index 35988e6..2b953ed 100644
--- a/kolab.org/www/drupal-7.15/sites/all/modules/ctools/plugins/content_types/term_context/term_description.inc
+++ b/kolab.org/www/drupal-7.15/sites/all/modules/ctools/plugins/content_types/term_context/term_description.inc
@@ -20,7 +20,7 @@ function ctools_term_description_content_type_render($subtype, $conf, $panel_arg
$block->title = $term->name;
if ($term) {
- $block->content = _filter_autop(filter_xss_admin($term->description));
+ $block->content = check_markup($term->description, $term->format, '', TRUE);
$block->delta = $term->tid;
if (user_access('administer taxonomy')) {
diff --git a/kolab.org/www/drupal-7.15/sites/all/modules/ctools/stylizer/stylizer.info b/kolab.org/www/drupal-7.15/sites/all/modules/ctools/stylizer/stylizer.info
index b407b95..9c7f117 100644
--- a/kolab.org/www/drupal-7.15/sites/all/modules/ctools/stylizer/stylizer.info
+++ b/kolab.org/www/drupal-7.15/sites/all/modules/ctools/stylizer/stylizer.info
@@ -5,9 +5,9 @@ package = Chaos tool suite
dependencies[] = ctools
dependencies[] = color
-; Information added by drupal.org packaging script on 2012-08-08
-version = "7.x-1.1"
+; Information added by drupal.org packaging script on 2012-08-18
+version = "7.x-1.2"
core = "7.x"
project = "ctools"
-datestamp = "1344463011"
+datestamp = "1345319204"
diff --git a/kolab.org/www/drupal-7.15/sites/all/modules/ctools/tests/context.test b/kolab.org/www/drupal-7.15/sites/all/modules/ctools/tests/context.test
new file mode 100644
index 0000000..b5f6fb1
--- /dev/null
+++ b/kolab.org/www/drupal-7.15/sites/all/modules/ctools/tests/context.test
@@ -0,0 +1,58 @@
+<?php
+
+class CtoolsContextKeywordsSubstitutionTestCase extends DrupalWebTestCase {
+ public static function getInfo() {
+ return array(
+ 'name' => 'Keywords substitution',
+ 'description' => 'Verify that keywords are properly replaced with data.',
+ 'group' => 'Chaos Tools Suite',
+ );
+ }
+
+ public function setUp() {
+ parent::setUp('ctools');
+
+ ctools_include('context');
+ }
+
+ public function testKeywordsSubstitution() {
+ // Create node context for substitution.
+ $node = $this->drupalCreateNode();
+ $context = ctools_context_create('node', $node);
+ $contexts = array('argument_1' => $context);
+
+ // Run tests on some edge cases.
+ $checks = array(
+ '%node:title' => array(
+ "{$node->title}",
+ t('Keyword and converter have been replaced.'),
+ ),
+ '%%node:title' => array(
+ "%node:title",
+ t('Keyword after escaped percent sign left untouched.'),
+ ),
+ '%node:title%node:nid' => array(
+ "{$node->title}{$node->nid}",
+ t('Multiple substitutions have been replaced.'),
+ ),
+ '%node:title:' => array(
+ "{$node->title}:",
+ t('Colon after keyword and converter left untouched.'),
+ ),
+ '%node:title%%' => array(
+ "{$node->title}%",
+ t('Escaped percent sign after keyword and converter left untouched.'),
+ ),
+ '%%%node:title' => array(
+ "%{$node->title}",
+ t('Keyword after escaped and unescaped percent sign has been replaced.'),
+ ),
+ );
+ foreach ($checks as $string => $expectations) {
+ list($expected_result, $message) = $expectations;
+ $actual_result = ctools_context_keyword_substitute($string, array(), $contexts);
+ $this->assertEqual($actual_result, $expected_result, $message);
+ }
+ }
+
+}
diff --git a/kolab.org/www/drupal-7.15/sites/all/modules/ctools/tests/css.test b/kolab.org/www/drupal-7.15/sites/all/modules/ctools/tests/css.test
index 039e975..4a5200c 100644
--- a/kolab.org/www/drupal-7.15/sites/all/modules/ctools/tests/css.test
+++ b/kolab.org/www/drupal-7.15/sites/all/modules/ctools/tests/css.test
@@ -65,5 +65,17 @@ class CtoolsCssTestCase extends DrupalWebTestCase {
$font_size = (strpos($filtered, 'font-size:12px;') !== FALSE);
$color = (strpos($filtered, 'color:blue') !== FALSE);
$this->assertTrue($font_size && $color, 'Multiple properties are merged.');
+
+ $css = '@import url("other.css");p {color: red;}';
+ $filtered = ctools_css_filter($css);
+ $other_css = (strpos($filtered, 'other.css') === FALSE);
+ $color = (strpos($filtered, 'color:red') !== FALSE);
+ $this->assertTrue($other_css && $color, 'CSS is properly sanitized.');
+
+ $css = ';p {color: red; font-size: 12px;}';
+ $filtered = ctools_css_filter($css);
+ $font_size = (strpos($filtered, 'font-size:12px;') !== FALSE);
+ $color = (strpos($filtered, 'color:red') !== FALSE);
+ $this->assertTrue($font_size && $color, 'Multiple properties are retained.');
}
}
diff --git a/kolab.org/www/drupal-7.15/sites/all/modules/ctools/tests/ctools_export_test/ctools_export_test.info b/kolab.org/www/drupal-7.15/sites/all/modules/ctools/tests/ctools_export_test/ctools_export_test.info
index 55bcba9..2d975c3 100644
--- a/kolab.org/www/drupal-7.15/sites/all/modules/ctools/tests/ctools_export_test/ctools_export_test.info
+++ b/kolab.org/www/drupal-7.15/sites/all/modules/ctools/tests/ctools_export_test/ctools_export_test.info
@@ -7,9 +7,9 @@ hidden = TRUE
files[] = ctools_export.test
-; Information added by drupal.org packaging script on 2012-08-08
-version = "7.x-1.1"
+; Information added by drupal.org packaging script on 2012-08-18
+version = "7.x-1.2"
core = "7.x"
project = "ctools"
-datestamp = "1344463011"
+datestamp = "1345319204"
diff --git a/kolab.org/www/drupal-7.15/sites/all/modules/ctools/tests/ctools_plugin_test.info b/kolab.org/www/drupal-7.15/sites/all/modules/ctools/tests/ctools_plugin_test.info
index cf4bf9c..6d5e9cd 100644
--- a/kolab.org/www/drupal-7.15/sites/all/modules/ctools/tests/ctools_plugin_test.info
+++ b/kolab.org/www/drupal-7.15/sites/all/modules/ctools/tests/ctools_plugin_test.info
@@ -6,11 +6,12 @@ dependencies[] = ctools
files[] = ctools.plugins.test
files[] = object_cache.test
files[] = css.test
+files[] = context.test
hidden = TRUE
-; Information added by drupal.org packaging script on 2012-08-08
-version = "7.x-1.1"
+; Information added by drupal.org packaging script on 2012-08-18
+version = "7.x-1.2"
core = "7.x"
project = "ctools"
-datestamp = "1344463011"
+datestamp = "1345319204"
diff --git a/kolab.org/www/drupal-7.15/sites/all/modules/ctools/views_content/views_content.info b/kolab.org/www/drupal-7.15/sites/all/modules/ctools/views_content/views_content.info
index 040ea0c..cd7ce44 100644
--- a/kolab.org/www/drupal-7.15/sites/all/modules/ctools/views_content/views_content.info
+++ b/kolab.org/www/drupal-7.15/sites/all/modules/ctools/views_content/views_content.info
@@ -9,9 +9,9 @@ files[] = plugins/views/views_content_plugin_display_ctools_context.inc
files[] = plugins/views/views_content_plugin_display_panel_pane.inc
files[] = plugins/views/views_content_plugin_style_ctools_context.inc
-; Information added by drupal.org packaging script on 2012-08-08
-version = "7.x-1.1"
+; Information added by drupal.org packaging script on 2012-08-18
+version = "7.x-1.2"
core = "7.x"
project = "ctools"
-datestamp = "1344463011"
+datestamp = "1345319204"
diff --git a/kolab.org/www/drupal-7.15/sites/all/modules/ldap/CHANGELOG.txt b/kolab.org/www/drupal-7.15/sites/all/modules/ldap/CHANGELOG.txt
index d14cd36..b6b18c6 100644
--- a/kolab.org/www/drupal-7.15/sites/all/modules/ldap/CHANGELOG.txt
+++ b/kolab.org/www/drupal-7.15/sites/all/modules/ldap/CHANGELOG.txt
@@ -1,4 +1,9 @@
-Issue #1632922 by brianV. Schema fix for ldap query.
+Fixed fake ldap server in simpltests to never filter on dn=*. See http://drupal.org/node/1066608
+Issue #1647950 by BobA. Patch by BobA. Ldap Profile issue.
+Issue #1650718 by alanrussian. Patch by alanrussian.
+Issue #1661644 by thesaunterer. Patch by by thesaunterer. Bad error message code throws warning.
+Issue #1623584 by alanrussian. Patch by alanrussian.
+Issue #1634930 by boran. Added hook alter to allow intervention in ldap authentication->allowUser method.
Changes in ldap_authorization.inc to make logic clearer and set array keys in authorization lowercase.
Fix for ldap servers caching issue when ctools enabled. noticed the bug when building simpletests. There is no issue for this.
Issue #1371452. Simpletest coverage for ldap servers add, update, delete and class property population.
diff --git a/kolab.org/www/drupal-7.15/sites/all/modules/ldap/ldap_authentication/LdapAuthenticationConf.class.php b/kolab.org/www/drupal-7.15/sites/all/modules/ldap/ldap_authentication/LdapAuthenticationConf.class.php
index 75d0c3a..e0e8983 100644
--- a/kolab.org/www/drupal-7.15/sites/all/modules/ldap/ldap_authentication/LdapAuthenticationConf.class.php
+++ b/kolab.org/www/drupal-7.15/sites/all/modules/ldap/ldap_authentication/LdapAuthenticationConf.class.php
@@ -12,7 +12,7 @@ class LdapAuthenticationConf {
// no need for LdapAuthenticationConf id as only one instance will exist per drupal install
public $sids = array(); // server configuration ids being used for authentication
- public $servers = array(); // ldap server object
+ public $enabledAuthenticationServers = array(); // ldap server object
public $inDatabase = FALSE;
public $authenticationMode = LDAP_AUTHENTICATION_MODE_DEFAULT;
public $loginUIUsernameTxt;
@@ -68,9 +68,13 @@ class LdapAuthenticationConf {
);
/** are any ldap servers that are enabled associated with ldap authentication **/
+ public function hasEnabledAuthenticationServers() {
+ return !(count($this->enabledAuthenticationServers) == 0);
+ }
public function enabled_servers() {
- return !(count(array_filter(array_values($this->sids))) == 0);
+ return $this->hasEnabledAuthenticationServers();
}
+
function __construct() {
$this->load();
}
@@ -85,12 +89,13 @@ class LdapAuthenticationConf {
$this->{$property} = $saved[$property];
}
}
- foreach ($this->sids as $sid => $is_enabled) {
- if ($is_enabled) {
- $this->servers[$sid] = ldap_servers_get_servers($sid, 'enabled', TRUE);
+
+ $enabled_ldap_servers = ldap_servers_get_servers(NULL, 'enabled');
+ foreach ($this->sids as $sid => $enabled) {
+ if ($enabled && isset($enabled_ldap_servers[$sid])) {
+ $this->enabledAuthenticationServers[$sid] = $enabled_ldap_servers[$sid];
}
}
-
}
else {
$this->inDatabase = FALSE;
@@ -131,12 +136,19 @@ class LdapAuthenticationConf {
*
* return boolean
*/
- public function allowUser($name, $ldap_user_entry) {
+ public function allowUser($name, $ldap_user_entry, $account_exists = NULL) {
/**
* do one of the exclude attribute pairs match
*/
$exclude = FALSE;
+
+ // if user does not already exists and deferring to user settings AND user settings only allow
+ $user_register = variable_get('user_register', USER_REGISTER_VISITORS_ADMINISTRATIVE_APPROVAL);
+ if (!$account_exists && $this->acctCreation == LDAP_AUTHENTICATION_ACCT_CREATION_USER_SETTINGS_FOR_LDAP && $user_register == USER_REGISTER_ADMINISTRATORS_ONLY) {
+ return FALSE;
+ }
+
foreach ($this->excludeIfTextInDn as $test) {
if (stripos($ldap_user_entry['dn'], $test) !== FALSE) {
return FALSE;// if a match, return FALSE;
@@ -163,7 +175,7 @@ class LdapAuthenticationConf {
else {
drupal_set_message(t(LDAP_AUTHENTICATION_DISABLED_FOR_BAD_CONF_MSG), 'warning');
$tokens = array('!ldap_authentication_config' => l(t('LDAP Authentication Configuration'), 'admin/config/people/ldap/authentication'));
- watchdog('warning', 'LDAP Authentication is configured to deny users based on php execution with php_eval function, but php module is not enabled. Please enable php module or remove php code at !ldap_authentication_config .', $tokens);
+ watchdog('ldap_authentication', 'LDAP Authentication is configured to deny users based on php execution with php_eval function, but php module is not enabled. Please enable php module or remove php code at !ldap_authentication_config .', $tokens);
return FALSE;
}
}
@@ -214,13 +226,20 @@ class LdapAuthenticationConf {
if (!$has_enabled_consumers) {
drupal_set_message(t(LDAP_AUTHENTICATION_DISABLED_FOR_BAD_CONF_MSG), 'warning');
$tokens = array('!ldap_consumer_config' => l(t('LDAP Authorization Configuration'), 'admin/config/people/ldap/authorization'));
- watchdog('warning', 'LDAP Authentication is configured to deny users without LDAP Authorization mappings, but 0 LDAP Authorization consumers are configured: !ldap_consumer_config .', $tokens);
+ watchdog('ldap_authentication', 'LDAP Authentication is configured to deny users without LDAP Authorization mappings, but 0 LDAP Authorization consumers are configured: !ldap_consumer_config .', $tokens);
return FALSE;
}
return FALSE;
}
+ // allow other modules to hook in and refuse if they like
+ $hook_result = TRUE;
+ drupal_alter('ldap_authentication_allowuser_results', $ldap_user_entry, $name, $hook_result);
+ if (!$hook_result) {
+ watchdog('ldap_authentication', "Authentication Allow User Result=refused for %name", array('%name' => $name), WATCHDOG_NOTICE);
+ return FALSE;
+ }
/**
* default to allowed
diff --git a/kolab.org/www/drupal-7.15/sites/all/modules/ldap/ldap_authentication/README.txt b/kolab.org/www/drupal-7.15/sites/all/modules/ldap/ldap_authentication/README.txt
index 4533a85..11f74f6 100644
--- a/kolab.org/www/drupal-7.15/sites/all/modules/ldap/ldap_authentication/README.txt
+++ b/kolab.org/www/drupal-7.15/sites/all/modules/ldap/ldap_authentication/README.txt
@@ -5,6 +5,10 @@
PHP to Test for Allowed LDAP Users
=======================================
+Remember:
+-- php module must be enabled (its one of the core drupal modules)
+-- code should not be enclosed in <?php ?>
+
Two variables are available:
(1) $_name - the username ldap server configuration has mapped user to such as "jdoe" etc. How this is derived is configured in ldap_servers module.
@@ -26,7 +30,7 @@ array(
Result should print 1 for allowed or 0 for disallowed. The function used to evaluate the code is php_eval() in php.module
---------------------------------
-Examples:
+Example 1:
//exclude users with guests.myuniversity.edu email address
@@ -37,4 +41,21 @@ else {
print 0;
}
+---------------------------------
+Example 2:
+
+// test behaviour of nobody excluded
+print 1;
+
+---------------------------------
+Example 3:
+
+// test behaviour of nobody excluded
+print 0;
+
+
+
+
+
+
diff --git a/kolab.org/www/drupal-7.15/sites/all/modules/ldap/ldap_authentication/ldap_authentication.admin.inc b/kolab.org/www/drupal-7.15/sites/all/modules/ldap/ldap_authentication/ldap_authentication.admin.inc
index eb60148..307aadf 100644
--- a/kolab.org/www/drupal-7.15/sites/all/modules/ldap/ldap_authentication/ldap_authentication.admin.inc
+++ b/kolab.org/www/drupal-7.15/sites/all/modules/ldap/ldap_authentication/ldap_authentication.admin.inc
@@ -45,7 +45,7 @@ function ldap_authentication_admin_form_submit($form, &$form_state) {
$auth_conf = new LdapAuthenticationConfAdmin();
$auth_conf->drupalFormSubmit($form_state['values']); // add form data to object and save or create
- if (!$auth_conf->enabled_servers()) {
+ if (!$auth_conf->hasEnabledAuthenticationServers()) {
drupal_set_message(t('No LDAP servers are enabled for authentication,
so no LDAP Authentication can take place. This essentially disables
LDAP Authentication.'), 'warning');
diff --git a/kolab.org/www/drupal-7.15/sites/all/modules/ldap/ldap_authentication/ldap_authentication.inc b/kolab.org/www/drupal-7.15/sites/all/modules/ldap/ldap_authentication/ldap_authentication.inc
index e97a69a..1f040a2 100644
--- a/kolab.org/www/drupal-7.15/sites/all/modules/ldap/ldap_authentication/ldap_authentication.inc
+++ b/kolab.org/www/drupal-7.15/sites/all/modules/ldap/ldap_authentication/ldap_authentication.inc
@@ -27,7 +27,7 @@ function _ldap_authentication_login_form_alter(&$form, &$form_state, $form_id) {
if (!$auth_conf = ldap_authentication_get_valid_conf()) {
return;
}
- elseif (!$auth_conf->enabled_servers()) {
+ if (!$auth_conf->hasEnabledAuthenticationServers()) {
return;
}
@@ -173,7 +173,7 @@ function _ldap_authentication_user_login_authenticate_validate(&$form_state) {
}
}
- if (!count($auth_conf->servers)) {
+ if (!count($auth_conf->enabledAuthenticationServers)) {
watchdog('ldap_authentication', 'No LDAP servers configured.', array(), WATCHDOG_ERROR);
form_set_error('name', 'Server Error: No LDAP servers configured.');
}
@@ -217,7 +217,7 @@ function _ldap_authentication_user_login_authenticate_validate(&$form_state) {
}
}
- foreach ($auth_conf->servers as $sid => $ldap_server) {
+ foreach ($auth_conf->enabledAuthenticationServers as $sid => $ldap_server) {
$watchdog_tokens['%sid'] = $sid;
$watchdog_tokens['%bind_method'] = $ldap_server->bind_method;
if ($detailed_watchdog_log) {
@@ -247,7 +247,7 @@ function _ldap_authentication_user_login_authenticate_validate(&$form_state) {
) {
$bind_success = ($ldap_server->bind() == LDAP_SUCCESS);
}
- elseif ($ldap_server->bind_method == LDAP_SERVERS_BIND_METHOD_ANON_USER) {
+ elseif ($ldap_server->bind_method == LDAP_SERVERS_BIND_METHOD_ANON) {
$bind_success = ($ldap_server->bind(NULL, NULL, TRUE) == LDAP_SUCCESS);
}
elseif ($sso_login) {
@@ -317,7 +317,7 @@ function _ldap_authentication_user_login_authenticate_validate(&$form_state) {
/**
* #4 CHECK ALLOWED AND EXCLUDED LIST AND PHP FOR ALLOWED USERS
*/
- $allow = $auth_conf->allowUser($authname, $ldap_user);
+ $allow = $auth_conf->allowUser($authname, $ldap_user, $account_exists);
if (!$allow) {
$authentication_result = LDAP_AUTHENTICATION_RESULT_FAIL_DISALLOWED;
break; // regardless of how many servers, disallowed user fails
@@ -359,7 +359,7 @@ function _ldap_authentication_user_login_authenticate_validate(&$form_state) {
$watchdog_tokens['%mail'] = $ldap_user['mail'];
}
if ($ldap_server->account_name_attr != '') {
- $accountname = $ldap_user['attr'][$ldap_server->account_name_attr][0];
+ $accountname = $ldap_user['attr'][ldap_server_massage_text($ldap_server->account_name_attr, 'attr_name', LDAP_SERVER_MASSAGE_QUERY_ARRAY)][0];
}
else {
$accountname = $authname;
@@ -445,10 +445,15 @@ function _ldap_authentication_user_login_authenticate_validate(&$form_state) {
* a little tweak to add user->data and mail etc as parameters would make it more useful
* for external authentication modules
*/
- ldap_server_module_load_include('inc', 'ldap_servers', 'ldap_servers.functions');
-
-
- $account = ldap_create_drupal_account($authname, $accountname, $ldap_user['mail'], $ldap_user['dn'], $sid);
+ ldap_server_module_load_include('inc', 'ldap_servers', 'ldap_servers.functions');
+
+ $status = 1;
+ $user_register = variable_get('user_register', USER_REGISTER_VISITORS_ADMINISTRATIVE_APPROVAL);
+ if ($auth_conf->acctCreation == LDAP_AUTHENTICATION_ACCT_CREATION_USER_SETTINGS_FOR_LDAP && $user_register == USER_REGISTER_VISITORS_ADMINISTRATIVE_APPROVAL) {
+ $status = 0; // if admin approval required, set status to 1.
+ }
+ $discard_edit = array();
+ $account = ldap_create_drupal_account($authname, $accountname, $ldap_user['mail'], $ldap_user['dn'], $sid, $status, $discard_edit);
if ($account === FALSE) {
// need to throw error that account was not created
}
@@ -458,8 +463,10 @@ function _ldap_authentication_user_login_authenticate_validate(&$form_state) {
else { // account already exists
if ($ldap_authentication_authmap == FALSE) { // LDAP_authen.AC.disallow.ldap.drupal
if ($auth_conf->loginConflictResolve == LDAP_AUTHENTICATION_CONFLICT_LOG) {
- $watchdog_tokens['%conflict_name'] = $account_with_same_email->name;
- watchdog('ldap_authentication', 'LDAP user with DN %dn has a naming conflict with a local drupal user %conflict_name', $watchdog_tokens, WATCHDOG_ERROR);
+ if ($account_with_same_email = user_load_by_mail($ldap_user['mail'])) {
+ $watchdog_tokens['%conflict_name'] = $account_with_same_email->name;
+ watchdog('ldap_authentication', 'LDAP user with DN %dn has a naming conflict with a local drupal user %conflict_name', $watchdog_tokens, WATCHDOG_ERROR);
+ }
drupal_set_message(t('Another user already exists in the system with the same login name. You should contact the system administrator in order to solve this conflict.'), 'error');
return FALSE;
}
@@ -482,8 +489,8 @@ function _ldap_authentication_user_login_authenticate_validate(&$form_state) {
watchdog('ldap_authentication', 'User e-mail for %username update from %old to %new failed because of system problems.', $watchdog_tokens, WATCHDOG_ERROR);
}
elseif ($auth_conf->emailUpdate == LDAP_AUTHENTICATION_EMAIL_UPDATE_ON_LDAP_CHANGE_ENABLE_NOTIFY ) {
- $message_tokens = array('@mail' => $ldap_user['mail']);
- drupal_set_message(t('Your e-mail has been updated to match your LDAP account (@mail).', $message_tokens), 'status');
+ $watchdog_tokens['@mail'] = $ldap_user['mail'];
+ drupal_set_message(t('Your e-mail has been updated to match your LDAP account (@mail).', $watchdog_tokens), 'status');
}
}
}
diff --git a/kolab.org/www/drupal-7.15/sites/all/modules/ldap/ldap_authentication/ldap_authentication.info b/kolab.org/www/drupal-7.15/sites/all/modules/ldap/ldap_authentication/ldap_authentication.info
index 76234bb..9035021 100644
--- a/kolab.org/www/drupal-7.15/sites/all/modules/ldap/ldap_authentication/ldap_authentication.info
+++ b/kolab.org/www/drupal-7.15/sites/all/modules/ldap/ldap_authentication/ldap_authentication.info
@@ -14,9 +14,9 @@ files[] = ldap_authentication.theme.inc
files[] = ldap_authentication.admin.inc
files[] = tests/ldap_authentication.test
-; Information added by drupal.org packaging script on 2012-06-14
-version = "7.x-1.0-beta11"
+; Information added by drupal.org packaging script on 2012-08-20
+version = "7.x-1.0-beta12"
core = "7.x"
project = "ldap"
-datestamp = "1339643179"
+datestamp = "1345503423"
diff --git a/kolab.org/www/drupal-7.15/sites/all/modules/ldap/ldap_authentication/tests/LdapServerTestData.ldapauthen1.inc b/kolab.org/www/drupal-7.15/sites/all/modules/ldap/ldap_authentication/tests/LdapServerTestData.ldapauthen1.inc
index ae56824..fc262c0 100644
--- a/kolab.org/www/drupal-7.15/sites/all/modules/ldap/ldap_authentication/tests/LdapServerTestData.ldapauthen1.inc
+++ b/kolab.org/www/drupal-7.15/sites/all/modules/ldap/ldap_authentication/tests/LdapServerTestData.ldapauthen1.inc
@@ -74,6 +74,7 @@ $test_data['servers']['ldapauthen1']['search_results']['member=cn=jkool,ou=guest
*/
$test_data['servers']['ldapauthen1']['users']['cn=jdoe,ou=campus accounts,dc=ad,dc=myuniversity,dc=edu']['attr'] = array(
'dn' => 'cn=jdoe,ou=campus accounts,dc=ad,dc=myuniversity,dc=edu',
+ 'distinguishedname' => array( 0 => 'cn=jdoe,ou=campus accounts,dc=ad,dc=myuniversity,dc=edu', 'count' => 1),
'mail' => array( 0 => 'jdoe@myuniversity.edu', 'count' => 1),
'sAMAccountName' => array( 0 => 'jdoe', 'count' => 1),
'password' => array( 0 => 'goodpwd', 'count' => 1),
@@ -82,6 +83,7 @@ $test_data['servers']['ldapauthen1']['users']['cn=jdoe,ou=campus accounts,dc=ad,
$test_data['servers']['ldapauthen1']['users']['cn=jkool,ou=guest accounts,dc=ad,dc=myuniversity,dc=edu']['attr'] = array(
'dn' => 'cn=jkool,ou=guest accounts,dc=ad,dc=myuniversity,dc=edu',
+ 'distinguishedname' => array( 0 => 'cn=jkool,ou=guest accounts,dc=ad,dc=myuniversity,dc=edu', 'count' => 1),
'mail' => array( 0 => 'jkool@guests.myuniversity.edu', 'count' => 1),
'sAMAccountName' => array( 0 => 'jkool', 'count' => 1),
'password' => array( 0 => 'goodpwd', 'count' => 1),
@@ -90,6 +92,7 @@ $test_data['servers']['ldapauthen1']['users']['cn=jkool,ou=guest accounts,dc=ad,
$test_data['servers']['ldapauthen1']['users']['cn=unkool,ou=lost,dc=ad,dc=myuniversity,dc=edu']['attr'] = array(
'dn' => 'cn=unkool,ou=lost,dc=ad,dc=myuniversity,dc=edu',
+ 'distinguishedname' => array( 0 => 'cn=unkool,ou=lost,dc=ad,dc=myuniversity,dc=edu', 'count' => 1),
'mail' => array( 0 => 'unkool@nowhere.myuniversity.edu', 'count' => 1),
'sAMAccountName' => array( 0 => 'jkool', 'count' => 1),
'password' => array( 0 => 'goodpwd', 'count' => 1),
@@ -98,6 +101,7 @@ $test_data['servers']['ldapauthen1']['users']['cn=unkool,ou=lost,dc=ad,dc=myuniv
$test_data['servers']['ldapauthen1']['users']['cn=verykool,ou=special guests,ou=guest accounts,dc=ad,dc=myuniversity,dc=edu']['attr'] = array(
'dn' => 'cn=verykool,ou=special guests,ou=guest accounts,dc=ad,dc=myuniversity,dc=edu',
+ 'distinguishedname' => array( 0 => 'cn=verykool,ou=special guests,ou=guest accounts,dc=ad,dc=myuniversity,dc=edu', 'count' => 1),
'mail' => array( 0 => 'verykool@myuniversity.edu', 'count' => 1),
'sAMAccountName' => array( 0 => 'verykool', 'count' => 1),
'password' => array( 0 => 'goodpwd', 'count' => 1),
@@ -114,6 +118,7 @@ $test_data['servers']['ldapauthen1']['users']['cn=verykool,ou=special guests,ou=
*/
$test_data['servers']['ldapauthen1']['users']['cn=service-account,dc=ad,dc=myuniversity,dc=edu']['attr'] = array(
'dn' => 'cn=service-account,dc=ad,dc=myuniversity,dc=edu',
+ 'distinguishedname' => array( 0 => 'cn=service-account,dc=ad,dc=myuniversity,dc=edu', 'count' => 1),
'mail' => array( 0 => 'service-account@myuniversity.edu', 'count' => 1),
'sAMAccountName' => array( 0 => 'service-account', 'count' => 1),
'memberOf' => array(
diff --git a/kolab.org/www/drupal-7.15/sites/all/modules/ldap/ldap_authorization/LdapAuthorizationConsumerConf.class.php b/kolab.org/www/drupal-7.15/sites/all/modules/ldap/ldap_authorization/LdapAuthorizationConsumerConf.class.php
index 5155981..fd59266 100644
--- a/kolab.org/www/drupal-7.15/sites/all/modules/ldap/ldap_authorization/LdapAuthorizationConsumerConf.class.php
+++ b/kolab.org/www/drupal-7.15/sites/all/modules/ldap/ldap_authorization/LdapAuthorizationConsumerConf.class.php
@@ -118,28 +118,27 @@ class LdapAuthorizationConsumerConf {
$this->sid = $consumer_conf->sid;
$this->consumerType = $consumer_conf->consumer_type;
- $this->numericConsumerConfId = $consumer_conf->numeric_consumer_conf_id;
+ $this->numericConsumerConfId = isset($consumer_conf->numeric_consumer_conf_id)? $consumer_conf->numeric_consumer_conf_id : NULL;
$this->status = ($consumer_conf->status) ? 1 : 0;
$this->onlyApplyToLdapAuthenticated = (bool)(@$consumer_conf->only_ldap_authenticated);
$this->deriveFromDn = (bool)(@$consumer_conf->derive_from_dn);
- $this->deriveFromDnAttr = $consumer_conf->derive_from_dn_attr;
+ $this->deriveFromDnAttr = isset($consumer_conf->derive_from_dn_attr) ? $consumer_conf->derive_from_dn_attr : NULL;
- $this->deriveFromAttr = (bool)($consumer_conf->derive_from_attr);
+ $this->deriveFromAttr = (bool)(@$consumer_conf->derive_from_attr);
$this->deriveFromAttrAttr = $this->linesToArray($consumer_conf->derive_from_attr_attr);
- $this->deriveFromAttrUseFirstAttr = (bool)($consumer_conf->derive_from_attr_use_first_attr);
- $this->deriveFromAttrNested = (bool)($consumer_conf->derive_from_attr_nested);
+ $this->deriveFromAttrUseFirstAttr = (bool)(@$consumer_conf->derive_from_attr_use_first_attr);
+ $this->deriveFromAttrNested = (bool)(@$consumer_conf->derive_from_attr_nested);
$this->deriveFromEntry = (bool)(@$consumer_conf->derive_from_entry);
$this->deriveFromEntryEntries = $this->linesToArray($consumer_conf->derive_from_entry_entries);
- $this->deriveFromEntryEntriesAttr = $consumer_conf->derive_from_entry_entries_attr;
-
+ $this->deriveFromEntryEntriesAttr = isset($consumer_conf->derive_from_entry_entries_attr) ? $consumer_conf->derive_from_entry_entries_attr : NULL;
$this->deriveFromEntryMembershipAttr = $consumer_conf->derive_from_entry_attr;
- $this->deriveFromEntryAttrMatchingUserAttr = $consumer_conf->derive_from_entry_user_ldap_attr;
- $this->deriveFromEntrySearchAll = (bool)($consumer_conf->derive_from_entry_search_all);
- $this->deriveFromEntryUseFirstAttr = (bool)($consumer_conf->derive_from_entry_use_first_attr);
- $this->deriveFromEntryNested = $consumer_conf->derive_from_entry_nested;
+ $this->deriveFromEntryAttrMatchingUserAttr = isset($consumer_conf->derive_from_entry_user_ldap_attr) ? $consumer_conf->derive_from_entry_user_ldap_attr : NULL;
+ $this->deriveFromEntrySearchAll = (bool)(@$consumer_conf->derive_from_entry_search_all);
+ $this->deriveFromEntryUseFirstAttr = (bool)(@$consumer_conf->derive_from_entry_use_first_attr);
+ $this->deriveFromEntryNested = isset($consumer_conf->derive_from_entry_nested) ? $consumer_conf->derive_from_entry_nested : NULL;
$this->mappings = $this->pipeListToArray($consumer_conf->mappings, FALSE);
$this->useMappingsAsFilter = (bool)(@$consumer_conf->use_filter);
diff --git a/kolab.org/www/drupal-7.15/sites/all/modules/ldap/ldap_authorization/ldap_authorization.inc b/kolab.org/www/drupal-7.15/sites/all/modules/ldap/ldap_authorization/ldap_authorization.inc
index 69b6a26..452bb1d 100644
--- a/kolab.org/www/drupal-7.15/sites/all/modules/ldap/ldap_authorization/ldap_authorization.inc
+++ b/kolab.org/www/drupal-7.15/sites/all/modules/ldap/ldap_authorization/ldap_authorization.inc
@@ -495,7 +495,7 @@ function _ldap_authorization_ldap_authorization_maps_alter(&$user, &$user_ldap_e
}
}
elseif (isset($user_ldap_entry[$consumer_conf->deriveFromEntryAttrMatchingUserAttr]) ||
- isset($user_ldap_entry['attr'][$consumer_conf->deriveFromEntryAttrMatchingUserAttr])) {
+ isset($user_ldap_entry['attr'][ldap_server_massage_text($consumer_conf->deriveFromEntryAttrMatchingUserAttr, 'attr_name', LDAP_SERVER_MASSAGE_QUERY_ARRAY)])) {
// $derive_from_entries_entries, $derive_from_entry_attr, $derive_from_entry_user_ldap_attr, $user_ldap_entry, $nested = FALSE
$derive_from_entry_authorizations = $ldap_server->deriveFromEntryGroups(
$consumer_conf->deriveFromEntryEntries,
@@ -505,6 +505,7 @@ function _ldap_authorization_ldap_authorization_maps_alter(&$user, &$user_ldap_e
$user_ldap_entry,
$consumer_conf->deriveFromEntryNested
);
+ // deriveFromEntryGroups($entries, $entries_attr
if (count($derive_from_entry_authorizations)) {
foreach ($derive_from_entry_authorizations as $i => $authorization) {
if ($consumer_conf->deriveFromEntryUseFirstAttr) {
diff --git a/kolab.org/www/drupal-7.15/sites/all/modules/ldap/ldap_authorization/ldap_authorization.info b/kolab.org/www/drupal-7.15/sites/all/modules/ldap/ldap_authorization/ldap_authorization.info
index 2f9addb..75bff56 100644
--- a/kolab.org/www/drupal-7.15/sites/all/modules/ldap/ldap_authorization/ldap_authorization.info
+++ b/kolab.org/www/drupal-7.15/sites/all/modules/ldap/ldap_authorization/ldap_authorization.info
@@ -23,9 +23,9 @@ files[] = tests/Og/Og.test
files[] = tests/Og/Og2.test
configure = admin/config/people/ldap/authorization
-; Information added by drupal.org packaging script on 2012-06-14
-version = "7.x-1.0-beta11"
+; Information added by drupal.org packaging script on 2012-08-20
+version = "7.x-1.0-beta12"
core = "7.x"
project = "ldap"
-datestamp = "1339643179"
+datestamp = "1345503423"
diff --git a/kolab.org/www/drupal-7.15/sites/all/modules/ldap/ldap_authorization/ldap_authorization_drupal_role/LdapAuthorizationConsumerRole.class.php b/kolab.org/www/drupal-7.15/sites/all/modules/ldap/ldap_authorization/ldap_authorization_drupal_role/LdapAuthorizationConsumerRole.class.php
index 102f749..f6fd40b 100644
--- a/kolab.org/www/drupal-7.15/sites/all/modules/ldap/ldap_authorization/ldap_authorization_drupal_role/LdapAuthorizationConsumerRole.class.php
+++ b/kolab.org/www/drupal-7.15/sites/all/modules/ldap/ldap_authorization/ldap_authorization_drupal_role/LdapAuthorizationConsumerRole.class.php
@@ -25,7 +25,7 @@ class LdapAuthorizationConsumerDrupalRole extends LdapAuthorizationConsumerAbstr
public $revokeLdapProvisionedDefault = TRUE;
public $regrantLdapProvisionedDefault = TRUE;
public $createContainersDefault = TRUE;
- public $drupalRolesByName = array();
+ private $drupalRolesByName = array();
/**
* Constructor Method
@@ -112,15 +112,15 @@ class LdapAuthorizationConsumerDrupalRole extends LdapAuthorizationConsumerAbstr
public function revokeSingleAuthorization(&$user, $role_name, &$user_auth_data) {
- $user_edit = array('roles' => array_diff($user->roles, array($this->drupalRolesByName[$role_name] => $role_name)));
+ $user_edit = array('roles' => array_diff($user->roles, array($this->getDrupalRoleByName($role_name) => $role_name)));
$account = user_load($user->uid);
$user = user_save($account, $user_edit);
- $result = ($user && !isset($user->roles[$this->drupalRolesByName[$role_name]]));
+ $result = ($user && !isset($user->roles[$this->getDrupalRoleByName($role_name)]));
if ($this->detailedWatchdogLog) {
watchdog('ldap_authorization', 'LdapAuthorizationConsumerDrupalRole.revokeSingleAuthorization()
revoked: rid=%rid, role_name=%role_name for username=%username, result=%result',
- array('%rid' => $this->drupalRolesByName[$role_name], '%role_name' => $role_name, '%username' => $user->name,
+ array('%rid' => $this->getDrupalRoleByName($role_name), '%role_name' => $role_name, '%username' => $user->name,
'%result' => $result), WATCHDOG_DEBUG);
}
@@ -133,19 +133,16 @@ class LdapAuthorizationConsumerDrupalRole extends LdapAuthorizationConsumerAbstr
*/
public function grantSingleAuthorization(&$user, $role_name, &$user_auth_data) {
- if (! isset($this->drupalRolesByName[$role_name])) {
+ if (is_null($this->getDrupalRoleByName($role_name))) {
watchdog('ldap_authorization', 'LdapAuthorizationConsumerDrupalRole.grantSingleAuthorization()
failed to grant %username the role %role_name because role does not exist',
array('%role_name' => $role_name, '%username' => $user->name),
WATCHDOG_ERROR);
return FALSE;
}
- debug($user->roles);
- $new_roles = $user->roles + array($this->drupalRolesByName[$role_name] => $role_name);
+ $new_roles = $user->roles + array($this->getDrupalRoleByName($role_name) => $role_name);
$user_edit = array('roles' => $new_roles);
- debug($new_roles);
- debug($user_edit);
if ($this->detailedWatchdogLog) {
watchdog('ldap_authorization', 'grantSingleAuthorization in drupal rold' . print_r($user, TRUE), array(), WATCHDOG_DEBUG);
}
@@ -157,7 +154,7 @@ class LdapAuthorizationConsumerDrupalRole extends LdapAuthorizationConsumerAbstr
if ($this->detailedWatchdogLog) {
watchdog('ldap_authorization', 'LdapAuthorizationConsumerDrupalRole.grantSingleAuthorization()
granted: rid=%rid, role_name=%role_name for username=%username, result=%result',
- array('%rid' => $this->drupalRolesByName[$role_name], '%role_name' => $role_name, '%username' => $user->name,
+ array('%rid' => $this->getDrupalRoleByName($role_name), '%role_name' => $role_name, '%username' => $user->name,
'%result' => $result), WATCHDOG_DEBUG);
}
@@ -171,40 +168,45 @@ class LdapAuthorizationConsumerDrupalRole extends LdapAuthorizationConsumerAbstr
public function validateAuthorizationMappingTarget($map_to, $form_values = NULL, $clear_cache = FALSE) {
$has_form_values = is_array($form_values);
- $message_type = NULL;
- $message_text = NULL;
- $normalized = $this->normalizeMappings(array($map_to));
- $tokens = array('!map_to' => $map_to);
- $pass = FALSE;
- if (is_array($normalized) && isset($normalized[0][1]) && $normalized[0][1] !== FALSE ) {
- $available_authorization_ids = $this->availableConsumerIDs($clear_cache);
+ $message_type = NULL;
+ $message_text = NULL;
+ $normalized = $this->normalizeMappings(array($map_to));
+ $tokens = array('!map_to' => $map_to);
+ $pass = FALSE;
+
+ if (is_array($normalized) && isset($normalized[0][1]) && $normalized[0][1] !== FALSE ) {
+ $available_authorization_ids = $this->availableConsumerIDs($clear_cache);
$available_authorization_ids = array_map('drupal_strtolower', $available_authorization_ids);
- // debug($available_authorization_ids); debug($normalized[0]);
- $pass = (in_array(drupal_strtolower($normalized[0]), $available_authorization_ids));
- }
+ $pass = (in_array(drupal_strtolower($normalized[0]), $available_authorization_ids));
+ }
- if (!$pass) {
- $message_text = '<code>"' . t('!map_to', $tokens) . '</code>" ' . t('does not map to any existing Drupal roles. ');
+ if (!$pass) {
+ $message_text = '<code>"' . t('!map_to', $tokens) . '</code>" ' . t('does not map to any existing Drupal roles. ');
if ($has_form_values) {
$create_consumers = (isset($form_values['synchronization_actions']['create_consumers']) && $form_values['synchronization_actions']['create_consumers']);
}
else {
$create_consumers = $this->consumerConf->create_consumers;
}
- if ($create_consumers && $this->allowConsumerObjectCreation) {
- $message_type = 'warning';
+ if ($create_consumers && $this->allowConsumerObjectCreation) {
+ $message_type = 'warning';
$message_text .= t('It will be created when needed. If "!map_to" is not intentional, please fix it', $tokens);
- }
- elseif (!$this->allowConsumerObjectCreation) {
- $message_type = 'error';
- $message_text .= t('Since automatic Drupal role creation is not possible with this module, an existing role must be mapped to.');
- }
- elseif (!$create_consumers) {
- $message_type = 'error';
- $message_text .= t('Since automatic Drupal role creation is disabled, an existing role must be mapped to. Either enable role creation or map to an existing role.');
- }
-
- }
+ }
+ elseif (!$this->allowConsumerObjectCreation) {
+ $message_type = 'error';
+ $message_text .= t('Since automatic Drupal role creation is not possible with this module, an existing role must be mapped to.');
+ }
+ elseif (!$create_consumers) {
+ $message_type = 'error';
+ $message_text .= t('Since automatic Drupal role creation is disabled, an existing role must be mapped to. Either enable role creation or map to an existing role.');
+ }
+ }
return array($message_type, $message_text);
}
+
+ private function getDrupalRoleByName($role_name) {
+ $role_name_lowercase = drupal_strtolower($role_name);
+
+ return (isset($this->drupalRolesByName[$role_name_lowercase]) ? $this->drupalRolesByName[$role_name_lowercase] : NULL);
+ }
}
diff --git a/kolab.org/www/drupal-7.15/sites/all/modules/ldap/ldap_authorization/ldap_authorization_drupal_role/ldap_authorization_drupal_role.info b/kolab.org/www/drupal-7.15/sites/all/modules/ldap/ldap_authorization/ldap_authorization_drupal_role/ldap_authorization_drupal_role.info
index 39c1848..29163f2 100644
--- a/kolab.org/www/drupal-7.15/sites/all/modules/ldap/ldap_authorization/ldap_authorization_drupal_role/ldap_authorization_drupal_role.info
+++ b/kolab.org/www/drupal-7.15/sites/all/modules/ldap/ldap_authorization/ldap_authorization_drupal_role/ldap_authorization_drupal_role.info
@@ -10,9 +10,9 @@ files[] = LdapAuthorizationConsumerRole.class.php
files[] = ldap_authorization_drupal_role.module
files[] = ldap_authorization_drupal_role.inc
-; Information added by drupal.org packaging script on 2012-06-14
-version = "7.x-1.0-beta11"
+; Information added by drupal.org packaging script on 2012-08-20
+version = "7.x-1.0-beta12"
core = "7.x"
project = "ldap"
-datestamp = "1339643179"
+datestamp = "1345503423"
diff --git a/kolab.org/www/drupal-7.15/sites/all/modules/ldap/ldap_authorization/ldap_authorization_og/ldap_authorization_og.info b/kolab.org/www/drupal-7.15/sites/all/modules/ldap/ldap_authorization/ldap_authorization_og/ldap_authorization_og.info
index b6434df..9b67c71 100644
--- a/kolab.org/www/drupal-7.15/sites/all/modules/ldap/ldap_authorization/ldap_authorization_og/ldap_authorization_og.info
+++ b/kolab.org/www/drupal-7.15/sites/all/modules/ldap/ldap_authorization/ldap_authorization_og/ldap_authorization_og.info
@@ -13,9 +13,9 @@ files[] = ldap_authorization_og.inc
core = "7.x"
-; Information added by drupal.org packaging script on 2012-06-14
-version = "7.x-1.0-beta11"
+; Information added by drupal.org packaging script on 2012-08-20
+version = "7.x-1.0-beta12"
core = "7.x"
project = "ldap"
-datestamp = "1339643179"
+datestamp = "1345503423"
diff --git a/kolab.org/www/drupal-7.15/sites/all/modules/ldap/ldap_authorization/tests/1197636/1197636.ldap_servers.test_data.inc b/kolab.org/www/drupal-7.15/sites/all/modules/ldap/ldap_authorization/tests/1197636/1197636.ldap_servers.test_data.inc
index 2a73919..b4d8064 100644
--- a/kolab.org/www/drupal-7.15/sites/all/modules/ldap/ldap_authorization/tests/1197636/1197636.ldap_servers.test_data.inc
+++ b/kolab.org/www/drupal-7.15/sites/all/modules/ldap/ldap_authorization/tests/1197636/1197636.ldap_servers.test_data.inc
@@ -45,6 +45,7 @@ $servers['fake_server1']['search_results']['member=cn=verykool,ou=special guests
*/
$servers['fake_server1']['users']['cn=verykool,ou=special guests,ou=guest accounts,dc=ad,dc=myuniversity,dc=edu']['attr'] = array(
'dn' => 'cn=verykool,ou=special guests,ou=guest accounts,dc=ad,dc=myuniversity,dc=edu',
+ 'distinguishedname' => array( 0 => 'cn=verykool,ou=special guests,ou=guest accounts,dc=ad,dc=myuniversity,dc=edu', 'count' => 1),
'mail' => array( 0 => 'verykool@myuniversity.edu', 'count' => 1),
'sAMAccountName' => array( 0 => 'verykool', 'count' => 1),
'password' => array( 0 => 'goodpwd', 'count' => 1),
@@ -59,6 +60,7 @@ $servers['fake_server1']['users']['cn=verykool,ou=special guests,ou=guest accoun
*/
$servers['fake_server1']['users']['cn=service-account,dc=ad,dc=myuniversity,dc=edu']['attr'] = array(
'dn' => 'cn=service-account,dc=ad,dc=myuniversity,dc=edu',
+ 'distinguishedname' => array( 0 => 'cn=service-account,dc=ad,dc=myuniversity,dc=edu', 'count' => 1),
'mail' => array( 0 => 'service-account@myuniversity.edu', 'count' => 1),
'sAMAccountName' => array( 0 => 'service-account', 'count' => 1),
'memberOf' => array(
diff --git a/kolab.org/www/drupal-7.15/sites/all/modules/ldap/ldap_authorization/tests/BasicTests/ldap_servers.inc b/kolab.org/www/drupal-7.15/sites/all/modules/ldap/ldap_authorization/tests/BasicTests/ldap_servers.inc
index fcc766f..71637de 100644
--- a/kolab.org/www/drupal-7.15/sites/all/modules/ldap/ldap_authorization/tests/BasicTests/ldap_servers.inc
+++ b/kolab.org/www/drupal-7.15/sites/all/modules/ldap/ldap_authorization/tests/BasicTests/ldap_servers.inc
@@ -50,6 +50,7 @@ $servers['ldapauthor1']['search_results']['(member=cn=jkool,ou=guest accounts,dc
*/
$servers['ldapauthor1']['users']['cn=jdoe,ou=campus accounts,dc=ad,dc=myuniversity,dc=edu']['attr'] = array(
'dn' => 'cn=jdoe,ou=campus accounts,dc=ad,dc=myuniversity,dc=edu',
+ 'distinguishedname' => array( 0 => 'cn=jdoe,ou=campus accounts,dc=ad,dc=myuniversity,dc=edu', 'count' => 1),
'mail' => array( 0 => 'jdoe@myuniversity.edu', 'count' => 1),
'sAMAccountName' => array( 0 => 'jdoe', 'count' => 1),
'password' => array( 0 => 'goodpwd', 'count' => 1),
@@ -58,6 +59,7 @@ $servers['ldapauthor1']['users']['cn=jdoe,ou=campus accounts,dc=ad,dc=myuniversi
$servers['ldapauthor1']['users']['cn=jkool,ou=guest accounts,dc=ad,dc=myuniversity,dc=edu']['attr'] = array(
'dn' => 'cn=jkool,ou=guest accounts,dc=ad,dc=myuniversity,dc=edu',
+ 'distinguishedname' => array( 0 => 'cn=jkool,ou=guest accounts,dc=ad,dc=myuniversity,dc=edu', 'count' => 1),
'mail' => array( 0 => 'jkool@guests.myuniversity.edu', 'count' => 1),
'mailcode' => array( 0 => '17', 'count' => 1),
'sAMAccountName' => array( 0 => 'jkool', 'count' => 1),
@@ -68,6 +70,7 @@ $servers['ldapauthor1']['users']['cn=jkool,ou=guest accounts,dc=ad,dc=myuniversi
// duplicate of previous with escaped commas in cn.
$servers['ldapauthor1']['users']['cn=Flintstone\, Wilma,ou=guest accounts,dc=ad,dc=myuniversity,dc=edu']['attr'] = array(
'dn' => 'cn=Flintstone\, Wilma,ou=guest accounts,dc=ad,dc=myuniversity,dc=edu',
+ 'distinguishedname' => array( 0 => 'cn=Flintstone\, Wilma,ou=guest accounts,dc=ad,dc=myuniversity,dc=edu', 'count' => 1),
'mail' => array( 0 => 'wilmaf@guests.myuniversity.edu', 'count' => 1),
'sAMAccountName' => array( 0 => 'wilmaf', 'count' => 1),
'password' => array( 0 => 'goodpwd', 'count' => 1),
@@ -81,6 +84,7 @@ $servers['ldapauthor1']['users']['cn=Flintstone\, Wilma,ou=guest accounts,dc=ad,
// duplicate of previous with quoted cn.
$servers['ldapauthor1']['users']['cn=Rubble\, Barney,ou=guest accounts,dc=ad,dc=myuniversity,dc=edu']['attr'] = array(
'dn' => 'cn=Rubble\, Barney,ou=guest accounts,dc=ad,dc=myuniversity,dc=edu',
+ 'distinguishedname' => array( 0 => 'cn=Rubble\, Barney,ou=guest accounts,dc=ad,dc=myuniversity,dc=edu', 'count' => 1),
'mail' => array( 0 => 'barneyr@guests.myuniversity.edu', 'count' => 1),
'sAMAccountName' => array( 0 => 'barneyr', 'count' => 1),
'password' => array( 0 => 'goodpwd', 'count' => 1),
@@ -94,6 +98,7 @@ $servers['ldapauthor1']['users']['cn=Rubble\, Barney,ou=guest accounts,dc=ad,dc=
$servers['ldapauthor1']['users']['cn=unkool,ou=lost,dc=ad,dc=myuniversity,dc=edu']['attr'] = array(
'dn' => 'cn=unkool,ou=lost,dc=ad,dc=myuniversity,dc=edu',
+ 'distinguishedname' => array( 0 => 'cn=unkool,ou=lost,dc=ad,dc=myuniversity,dc=edu', 'count' => 1),
'mail' => array( 0 => 'unkool@nowhere.myuniversity.edu', 'count' => 1),
'sAMAccountName' => array( 0 => 'jkool', 'count' => 1),
'password' => array( 0 => 'goodpwd', 'count' => 1),
@@ -102,6 +107,7 @@ $servers['ldapauthor1']['users']['cn=unkool,ou=lost,dc=ad,dc=myuniversity,dc=edu
$servers['ldapauthor1']['users']['cn=verykool,ou=special guests,ou=guest accounts,dc=ad,dc=myuniversity,dc=edu']['attr'] = array(
'dn' => 'cn=verykool,ou=special guests,ou=guest accounts,dc=ad,dc=myuniversity,dc=edu',
+ 'distinguishedname' => array( 0 => 'cn=verykool,ou=special guests,ou=guest accounts,dc=ad,dc=myuniversity,dc=edu', 'count' => 1),
'mail' => array( 0 => 'verykool@myuniversity.edu', 'count' => 1),
'sAMAccountName' => array( 0 => 'verykool', 'count' => 1),
'password' => array( 0 => 'goodpwd', 'count' => 1),
@@ -117,6 +123,7 @@ $servers['ldapauthor1']['users']['cn=verykool,ou=special guests,ou=guest account
$servers['ldapauthor1']['users']['cn=newkool,ou=special guests,ou=guest accounts,dc=ad,dc=myuniversity,dc=edu']['attr'] = array(
'dn' => 'cn=newkool,ou=special guests,ou=guest accounts,dc=ad,dc=myuniversity,dc=edu',
+ 'distinguishedname' => array( 0 => 'cn=newkool,ou=special guests,ou=guest accounts,dc=ad,dc=myuniversity,dc=edu', 'count' => 1),
'mail' => array( 0 => 'newkool@guests.myuniversity.edu', 'count' => 1),
'sAMAccountName' => array( 0 => 'newkool', 'count' => 1),
'password' => array( 0 => 'goodpwd', 'count' => 1),
@@ -125,6 +132,7 @@ $servers['ldapauthor1']['users']['cn=newkool,ou=special guests,ou=guest accounts
$servers['ldapauthor1']['users']['cn=joeprogrammer,ou=it,dc=ad,dc=myuniversity,dc=edu']['attr'] = array(
'dn' => 'cn=joeprogrammer,ou=it,dc=ad,dc=myuniversity,dc=edu',
+ 'distinguishedname' => array( 0 => 'cn=joeprogrammer,ou=it,dc=ad,dc=myuniversity,dc=edu', 'count' => 1),
'mail' => array( 0 => 'joeprogrammer@myuniversity.edu', 'count' => 1),
'sAMAccountName' => array( 0 => 'joeprogrammer', 'count' => 1),
'password' => array( 0 => 'goodpwd', 'count' => 1),
@@ -147,27 +155,32 @@ $servers['ldapauthor1']['users']['cn=joeprogrammer,ou=it,dc=ad,dc=myuniversity,d
*/
$servers['ldapauthor1']['groups']['cn=sysadmins,ou=it,dc=ad,dc=myuniversity,dc=edu']['attr'] = array(
'dn' => 'cn=sysadmins,ou=it,dc=ad,dc=myuniversity,dc=edu',
+ 'distinguishedname' => array( 0 => 'cn=sysadmins,ou=it,dc=ad,dc=myuniversity,dc=edu', 'count' => 1),
'memberOf' => array( 0 => 'cn=it,ou=it,dc=ad,dc=myuniversity,dc=edu', 'count' => 1),
);
$servers['ldapauthor1']['groups']['cn=developers,ou=it,dc=ad,dc=myuniversity,dc=edu']['attr'] = array(
'dn' => 'cn=developers,ou=it,dc=ad,dc=myuniversity,dc=edu',
+ 'distinguishedname' => array( 0 => 'cn=developers,ou=it,dc=ad,dc=myuniversity,dc=edu', 'count' => 1),
'memberOf' => array( 0 => 'cn=it,ou=it,dc=ad,dc=myuniversity,dc=edu', 'count' => 1),
);
$servers['ldapauthor1']['groups']['cn=it,ou=it,dc=ad,dc=myuniversity,dc=edu']['attr'] = array(
'dn' => 'cn=it,ou=it,dc=ad,dc=myuniversity,dc=edu',
+ 'distinguishedname' => array( 0 => 'cn=it,ou=it,dc=ad,dc=myuniversity,dc=edu', 'count' => 1),
'memberOf' => array( 0 => 'cn=staff,ou=people,dc=ad,dc=myuniversity,dc=edu', 'count' => 1),
'memberOf' => array( 0 => 'cn=sysadmins,ou=it,dc=ad,dc=myuniversity,dc=edu', 'count' => 1), // bogus recursion to test bogus recursion
);
$servers['ldapauthor1']['groups']['cn=staff,ou=people,dc=ad,dc=myuniversity,dc=edu']['attr'] = array(
'dn' => 'cn=staff,ou=people,dc=ad,dc=myuniversity,dc=edu',
+ 'distinguishedname' => array( 0 => 'cn=staff,ou=people,dc=ad,dc=myuniversity,dc=edu', 'count' => 1),
'memberOf' => array( 0 => 'cn=people,ou=it,dc=ad,dc=myuniversity,dc=edu', 'count' => 1),
);
$servers['ldapauthor1']['groups']['cn=people,ou=it,dc=ad,dc=myuniversity,dc=edu']['attr'] = array(
'dn' => 'cn=people,ou=it,dc=ad,dc=myuniversity,dc=edu',
+ 'distinguishedname' => array( 0 => 'cn=people,ou=it,dc=ad,dc=myuniversity,dc=edu', 'count' => 1),
'memberOf' => array('count' => 0),
);
@@ -188,6 +201,7 @@ $servers['ldapauthor1']['search_results']['(|((dn=cn=staff,ou=people,dc=ad,dc=my
*/
$servers['ldapauthor1']['users']['cn=service-account,dc=ad,dc=myuniversity,dc=edu']['attr'] = array(
'dn' => 'cn=service-account,dc=ad,dc=myuniversity,dc=edu',
+ 'distinguishedname' => array( 0 => 'cn=service-account,dc=ad,dc=myuniversity,dc=edu', 'count' => 1),
'mail' => array( 0 => 'service-account@myuniversity.edu', 'count' => 1),
'sAMAccountName' => array( 0 => 'service-account', 'count' => 1),
'memberOf' => array(
diff --git a/kolab.org/www/drupal-7.15/sites/all/modules/ldap/ldap_authorization/tests/DeriveFromAttr/ldap_servers.inc b/kolab.org/www/drupal-7.15/sites/all/modules/ldap/ldap_authorization/tests/DeriveFromAttr/ldap_servers.inc
index 4ebe5a6..1cc5578 100644
--- a/kolab.org/www/drupal-7.15/sites/all/modules/ldap/ldap_authorization/tests/DeriveFromAttr/ldap_servers.inc
+++ b/kolab.org/www/drupal-7.15/sites/all/modules/ldap/ldap_authorization/tests/DeriveFromAttr/ldap_servers.inc
@@ -50,6 +50,7 @@ $servers['ldapauthor1']['search_results']['(member=cn=jkool,ou=guest accounts,dc
*/
$servers['ldapauthor1']['users']['cn=jdoe,ou=campus accounts,dc=ad,dc=myuniversity,dc=edu']['attr'] = array(
'dn' => 'cn=jdoe,ou=campus accounts,dc=ad,dc=myuniversity,dc=edu',
+ 'distinguishedname' => array( 0 => 'cn=jdoe,ou=campus accounts,dc=ad,dc=myuniversity,dc=edu', 'count' => 1),
'mail' => array( 0 => 'jdoe@myuniversity.edu', 'count' => 1),
'sAMAccountName' => array( 0 => 'jdoe', 'count' => 1),
'password' => array( 0 => 'goodpwd', 'count' => 1),
@@ -58,6 +59,7 @@ $servers['ldapauthor1']['users']['cn=jdoe,ou=campus accounts,dc=ad,dc=myuniversi
$servers['ldapauthor1']['users']['cn=jkool,ou=guest accounts,dc=ad,dc=myuniversity,dc=edu']['attr'] = array(
'dn' => 'cn=jkool,ou=guest accounts,dc=ad,dc=myuniversity,dc=edu',
+ 'distinguishedname' => array( 0 => 'cn=jkool,ou=guest accounts,dc=ad,dc=myuniversity,dc=edu', 'count' => 1),
'mail' => array( 0 => 'jkool@guests.myuniversity.edu', 'count' => 1),
'mailcode' => array( 0 => '17', 'count' => 1),
'sAMAccountName' => array( 0 => 'jkool', 'count' => 1),
@@ -68,6 +70,7 @@ $servers['ldapauthor1']['users']['cn=jkool,ou=guest accounts,dc=ad,dc=myuniversi
// duplicate of previous with escaped commas in cn.
$servers['ldapauthor1']['users']['cn=Flintstone\, Wilma,ou=guest accounts,dc=ad,dc=myuniversity,dc=edu']['attr'] = array(
'dn' => 'cn=Flintstone\, Wilma,ou=guest accounts,dc=ad,dc=myuniversity,dc=edu',
+ 'distinguishedname' => array( 0 => 'cn=Flintstone\, Wilma,ou=guest accounts,dc=ad,dc=myuniversity,dc=edu', 'count' => 1),
'mail' => array( 0 => 'wilmaf@guests.myuniversity.edu', 'count' => 1),
'sAMAccountName' => array( 0 => 'wilmaf', 'count' => 1),
'password' => array( 0 => 'goodpwd', 'count' => 1),
@@ -81,6 +84,7 @@ $servers['ldapauthor1']['users']['cn=Flintstone\, Wilma,ou=guest accounts,dc=ad,
// duplicate of previous with quoted cn.
$servers['ldapauthor1']['users']['cn=Rubble\, Barney,ou=guest accounts,dc=ad,dc=myuniversity,dc=edu']['attr'] = array(
'dn' => 'cn=Rubble\, Barney,ou=guest accounts,dc=ad,dc=myuniversity,dc=edu',
+ 'distinguishedname' => array( 0 => 'cn=Rubble\, Barney,ou=guest accounts,dc=ad,dc=myuniversity,dc=edu', 'count' => 1),
'mail' => array( 0 => 'barneyr@guests.myuniversity.edu', 'count' => 1),
'sAMAccountName' => array( 0 => 'barneyr', 'count' => 1),
'password' => array( 0 => 'goodpwd', 'count' => 1),
@@ -94,6 +98,7 @@ $servers['ldapauthor1']['users']['cn=Rubble\, Barney,ou=guest accounts,dc=ad,dc=
$servers['ldapauthor1']['users']['cn=unkool,ou=lost,dc=ad,dc=myuniversity,dc=edu']['attr'] = array(
'dn' => 'cn=unkool,ou=lost,dc=ad,dc=myuniversity,dc=edu',
+ 'distinguishedname' => array( 0 => 'cn=unkool,ou=lost,dc=ad,dc=myuniversity,dc=edu', 'count' => 1),
'mail' => array( 0 => 'unkool@nowhere.myuniversity.edu', 'count' => 1),
'sAMAccountName' => array( 0 => 'jkool', 'count' => 1),
'password' => array( 0 => 'goodpwd', 'count' => 1),
@@ -102,6 +107,7 @@ $servers['ldapauthor1']['users']['cn=unkool,ou=lost,dc=ad,dc=myuniversity,dc=edu
$servers['ldapauthor1']['users']['cn=verykool,ou=special guests,ou=guest accounts,dc=ad,dc=myuniversity,dc=edu']['attr'] = array(
'dn' => 'cn=verykool,ou=special guests,ou=guest accounts,dc=ad,dc=myuniversity,dc=edu',
+ 'distinguishedname' => array( 0 => 'cn=verykool,ou=special guests,ou=guest accounts,dc=ad,dc=myuniversity,dc=edu', 'count' => 1),
'mail' => array( 0 => 'verykool@myuniversity.edu', 'count' => 1),
'sAMAccountName' => array( 0 => 'verykool', 'count' => 1),
'password' => array( 0 => 'goodpwd', 'count' => 1),
@@ -119,6 +125,7 @@ $servers['ldapauthor1']['users']['cn=verykool,ou=special guests,ou=guest account
$servers['ldapauthor1']['users']['cn=service-account,dc=ad,dc=myuniversity,dc=edu']['attr'] = array(
'dn' => 'cn=service-account,dc=ad,dc=myuniversity,dc=edu',
+ 'distinguishedname' => array( 0 => 'cn=service-account,dc=ad,dc=myuniversity,dc=edu', 'count' => 1),
'mail' => array( 0 => 'service-account@myuniversity.edu', 'count' => 1),
'sAMAccountName' => array( 0 => 'service-account', 'count' => 1),
'memberOf' => array(
@@ -132,6 +139,7 @@ $servers['ldapauthor1']['users']['cn=service-account,dc=ad,dc=myuniversity,dc=ed
$servers['ldapauthor1']['users']['cn=justin,ou=guest accounts,dc=ad,dc=myuniversity,dc=edu']['attr'] = array(
'dn' => 'cn=justin,ou=guest accounts,dc=ad,dc=myuniversity,dc=edu',
+ 'distinguishedname' => array( 0 => 'cn=justin,ou=guest accounts,dc=ad,dc=myuniversity,dc=edu', 'count' => 1),
'mail' => array( 0 => 'justin@myuniversity.edu', 'count' => 1),
'sAMAccountName' => array( 0 => 'justin', 'count' => 1),
'password' => array( 0 => 'goodpwd', 'count' => 1),
@@ -141,6 +149,7 @@ $servers['ldapauthor1']['users']['cn=justin,ou=guest accounts,dc=ad,dc=myunivers
$servers['ldapauthor1']['users']['cn=newkool,ou=special guests,ou=guest accounts,dc=ad,dc=myuniversity,dc=edu']['attr'] = array(
'dn' => 'cn=newkool,ou=special guests,ou=guest accounts,dc=ad,dc=myuniversity,dc=edu',
+ 'distinguishedname' => array( 0 => 'cn=newkool,ou=special guests,ou=guest accounts,dc=ad,dc=myuniversity,dc=edu', 'count' => 1),
'mail' => array( 0 => 'newkool@guests.myuniversity.edu', 'count' => 1),
'sAMAccountName' => array( 0 => 'newkool', 'count' => 1),
'password' => array( 0 => 'goodpwd', 'count' => 1),
@@ -149,6 +158,7 @@ $servers['ldapauthor1']['users']['cn=newkool,ou=special guests,ou=guest accounts
$servers['ldapauthor1']['users']['cn=joeprogrammer,ou=it,dc=ad,dc=myuniversity,dc=edu']['attr'] = array(
'dn' => 'cn=joeprogrammer,ou=it,dc=ad,dc=myuniversity,dc=edu',
+ 'distinguishedname' => array( 0 => 'cn=joeprogrammer,ou=it,dc=ad,dc=myuniversity,dc=edu', 'count' => 1),
'mail' => array( 0 => 'joeprogrammer@myuniversity.edu', 'count' => 1),
'sAMAccountName' => array( 0 => 'joeprogrammer', 'count' => 1),
'password' => array( 0 => 'goodpwd', 'count' => 1),
@@ -186,26 +196,31 @@ $servers['ldapauthor1']['users']['cn=joeprogrammer,ou=it,dc=ad,dc=myuniversity,d
*/
$servers['ldapauthor1']['groups']['cn=sysadmins,ou=it,dc=ad,dc=myuniversity,dc=edu']['attr'] = array(
'dn' => 'cn=sysadmins,ou=it,dc=ad,dc=myuniversity,dc=edu',
+ 'distinguishedname' => array( 0 => 'cn=sysadmins,ou=it,dc=ad,dc=myuniversity,dc=edu', 'count' => 1),
'memberOf' => array( 0 => 'cn=it,ou=it,dc=ad,dc=myuniversity,dc=edu', 'count' => 1),
);
$servers['ldapauthor1']['groups']['cn=developers,ou=it,dc=ad,dc=myuniversity,dc=edu']['attr'] = array(
'dn' => 'cn=developers,ou=it,dc=ad,dc=myuniversity,dc=edu',
+ 'distinguishedname' => array( 0 => 'cn=developers,ou=it,dc=ad,dc=myuniversity,dc=edu', 'count' => 1),
'memberOf' => array( 0 => 'cn=it,ou=it,dc=ad,dc=myuniversity,dc=edu', 'count' => 1),
);
$servers['ldapauthor1']['groups']['cn=it,ou=it,dc=ad,dc=myuniversity,dc=edu']['attr'] = array(
'dn' => 'cn=it,ou=it,dc=ad,dc=myuniversity,dc=edu',
+ 'distinguishedname' => array( 0 => 'cn=it,ou=it,dc=ad,dc=myuniversity,dc=edu', 'count' => 1),
'memberOf' => array( 0 => 'cn=staff,ou=people,dc=ad,dc=myuniversity,dc=edu', 'count' => 1),
'memberOf' => array( 0 => 'cn=sysadmins,ou=it,dc=ad,dc=myuniversity,dc=edu', 'count' => 1), // bogus recursion to test bogus recursion
);
$servers['ldapauthor1']['groups']['cn=staff,ou=people,dc=ad,dc=myuniversity,dc=edu']['attr'] = array(
'dn' => 'cn=staff,ou=people,dc=ad,dc=myuniversity,dc=edu',
+ 'distinguishedname' => array( 0 => 'cn=staff,ou=people,dc=ad,dc=myuniversity,dc=edu', 'count' => 1),
'memberOf' => array( 0 => 'cn=people,ou=it,dc=ad,dc=myuniversity,dc=edu', 'count' => 1),
);
$servers['ldapauthor1']['groups']['cn=people,ou=it,dc=ad,dc=myuniversity,dc=edu']['attr'] = array(
'dn' => 'cn=people,ou=it,dc=ad,dc=myuniversity,dc=edu',
+ 'distinguishedname' => array( 0 => 'cn=people,ou=it,dc=ad,dc=myuniversity,dc=edu', 'count' => 1),
'memberOf' => array('count' => 0),
);
diff --git a/kolab.org/www/drupal-7.15/sites/all/modules/ldap/ldap_authorization/tests/DeriveFromDN/ldap_servers.inc b/kolab.org/www/drupal-7.15/sites/all/modules/ldap/ldap_authorization/tests/DeriveFromDN/ldap_servers.inc
index 046345e..483b43a 100644
--- a/kolab.org/www/drupal-7.15/sites/all/modules/ldap/ldap_authorization/tests/DeriveFromDN/ldap_servers.inc
+++ b/kolab.org/www/drupal-7.15/sites/all/modules/ldap/ldap_authorization/tests/DeriveFromDN/ldap_servers.inc
@@ -50,6 +50,7 @@ $servers['ldapauthor1']['search_results']['(member=cn=jkool,ou=guest accounts,dc
*/
$servers['ldapauthor1']['users']['cn=jdoe,ou=campus accounts,dc=ad,dc=myuniversity,dc=edu']['attr'] = array(
'dn' => 'cn=jdoe,ou=campus accounts,dc=ad,dc=myuniversity,dc=edu',
+ 'distinguishedname' => array( 0 => 'cn=jdoe,ou=campus accounts,dc=ad,dc=myuniversity,dc=edu', 'count' => 1),
'mail' => array( 0 => 'jdoe@myuniversity.edu', 'count' => 1),
'sAMAccountName' => array( 0 => 'jdoe', 'count' => 1),
'password' => array( 0 => 'goodpwd', 'count' => 1),
@@ -58,6 +59,7 @@ $servers['ldapauthor1']['users']['cn=jdoe,ou=campus accounts,dc=ad,dc=myuniversi
$servers['ldapauthor1']['users']['cn=jkool,ou=guest accounts,dc=ad,dc=myuniversity,dc=edu']['attr'] = array(
'dn' => 'cn=jkool,ou=guest accounts,dc=ad,dc=myuniversity,dc=edu',
+ 'distinguishedname' => array( 0 => 'cn=jkool,ou=guest accounts,dc=ad,dc=myuniversity,dc=edu', 'count' => 1),
'mail' => array( 0 => 'jkool@guests.myuniversity.edu', 'count' => 1),
'mailcode' => array( 0 => '17', 'count' => 1),
'sAMAccountName' => array( 0 => 'jkool', 'count' => 1),
@@ -68,6 +70,7 @@ $servers['ldapauthor1']['users']['cn=jkool,ou=guest accounts,dc=ad,dc=myuniversi
// duplicate of previous with escaped commas in cn.
$servers['ldapauthor1']['users']['cn=Flintstone\, Wilma,ou=guest accounts,dc=ad,dc=myuniversity,dc=edu']['attr'] = array(
'dn' => 'cn=Flintstone\, Wilma,ou=guest accounts,dc=ad,dc=myuniversity,dc=edu',
+ 'distinguishedname' => array( 0 => 'cn=Flintstone\, Wilma,ou=guest accounts,dc=ad,dc=myuniversity,dc=edu', 'count' => 1),
'mail' => array( 0 => 'wilmaf@guests.myuniversity.edu', 'count' => 1),
'sAMAccountName' => array( 0 => 'wilmaf', 'count' => 1),
'password' => array( 0 => 'goodpwd', 'count' => 1),
@@ -81,6 +84,7 @@ $servers['ldapauthor1']['users']['cn=Flintstone\, Wilma,ou=guest accounts,dc=ad,
// duplicate of previous with quoted cn.
$servers['ldapauthor1']['users']['cn=Rubble\, Barney,ou=guest accounts,dc=ad,dc=myuniversity,dc=edu']['attr'] = array(
'dn' => 'cn=Rubble\, Barney,ou=guest accounts,dc=ad,dc=myuniversity,dc=edu',
+ 'distinguishedname' => array( 0 => 'cn=Rubble\, Barney,ou=guest accounts,dc=ad,dc=myuniversity,dc=edu', 'count' => 1),
'mail' => array( 0 => 'barneyr@guests.myuniversity.edu', 'count' => 1),
'sAMAccountName' => array( 0 => 'barneyr', 'count' => 1),
'password' => array( 0 => 'goodpwd', 'count' => 1),
@@ -94,6 +98,7 @@ $servers['ldapauthor1']['users']['cn=Rubble\, Barney,ou=guest accounts,dc=ad,dc=
$servers['ldapauthor1']['users']['cn=unkool,ou=lost,dc=ad,dc=myuniversity,dc=edu']['attr'] = array(
'dn' => 'cn=unkool,ou=lost,dc=ad,dc=myuniversity,dc=edu',
+ 'distinguishedname' => array( 0 => 'cn=unkool,ou=lost,dc=ad,dc=myuniversity,dc=edu', 'count' => 1),
'mail' => array( 0 => 'unkool@nowhere.myuniversity.edu', 'count' => 1),
'sAMAccountName' => array( 0 => 'jkool', 'count' => 1),
'password' => array( 0 => 'goodpwd', 'count' => 1),
@@ -102,6 +107,7 @@ $servers['ldapauthor1']['users']['cn=unkool,ou=lost,dc=ad,dc=myuniversity,dc=edu
$servers['ldapauthor1']['users']['cn=verykool,ou=special guests,ou=guest accounts,dc=ad,dc=myuniversity,dc=edu']['attr'] = array(
'dn' => 'cn=verykool,ou=special guests,ou=guest accounts,dc=ad,dc=myuniversity,dc=edu',
+ 'distinguishedname' => array( 0 => 'cn=verykool,ou=special guests,ou=guest accounts,dc=ad,dc=myuniversity,dc=edu', 'count' => 1),
'mail' => array( 0 => 'verykool@myuniversity.edu', 'count' => 1),
'sAMAccountName' => array( 0 => 'verykool', 'count' => 1),
'password' => array( 0 => 'goodpwd', 'count' => 1),
@@ -117,6 +123,7 @@ $servers['ldapauthor1']['users']['cn=verykool,ou=special guests,ou=guest account
$servers['ldapauthor1']['users']['cn=newkool,ou=special guests,ou=guest accounts,dc=ad,dc=myuniversity,dc=edu']['attr'] = array(
'dn' => 'cn=newkool,ou=special guests,ou=guest accounts,dc=ad,dc=myuniversity,dc=edu',
+ 'distinguishedname' => array( 0 => 'cn=newkool,ou=special guests,ou=guest accounts,dc=ad,dc=myuniversity,dc=edu', 'count' => 1),
'mail' => array( 0 => 'newkool@guests.myuniversity.edu', 'count' => 1),
'sAMAccountName' => array( 0 => 'newkool', 'count' => 1),
'password' => array( 0 => 'goodpwd', 'count' => 1),
@@ -125,6 +132,7 @@ $servers['ldapauthor1']['users']['cn=newkool,ou=special guests,ou=guest accounts
$servers['ldapauthor1']['users']['cn=joeprogrammer,ou=it,dc=ad,dc=myuniversity,dc=edu']['attr'] = array(
'dn' => 'cn=joeprogrammer,ou=it,dc=ad,dc=myuniversity,dc=edu',
+ 'distinguishedname' => array( 0 => 'cn=joeprogrammer,ou=it,dc=ad,dc=myuniversity,dc=edu', 'count' => 1),
'mail' => array( 0 => 'joeprogrammer@myuniversity.edu', 'count' => 1),
'sAMAccountName' => array( 0 => 'joeprogrammer', 'count' => 1),
'password' => array( 0 => 'goodpwd', 'count' => 1),
@@ -138,6 +146,7 @@ $servers['ldapauthor1']['users']['cn=joeprogrammer,ou=it,dc=ad,dc=myuniversity,d
*/
$servers['ldapauthor1']['users']['cn=service-account,dc=ad,dc=myuniversity,dc=edu']['attr'] = array(
'dn' => 'cn=service-account,dc=ad,dc=myuniversity,dc=edu',
+ 'distinguishedname' => array( 0 => 'cn=service-account,dc=ad,dc=myuniversity,dc=edu', 'count' => 1),
'mail' => array( 0 => 'service-account@myuniversity.edu', 'count' => 1),
'sAMAccountName' => array( 0 => 'service-account', 'count' => 1),
'memberOf' => array(
diff --git a/kolab.org/www/drupal-7.15/sites/all/modules/ldap/ldap_authorization/tests/Og/ldap_servers.inc b/kolab.org/www/drupal-7.15/sites/all/modules/ldap/ldap_authorization/tests/Og/ldap_servers.inc
index e4f20c1..19463f7 100644
--- a/kolab.org/www/drupal-7.15/sites/all/modules/ldap/ldap_authorization/tests/Og/ldap_servers.inc
+++ b/kolab.org/www/drupal-7.15/sites/all/modules/ldap/ldap_authorization/tests/Og/ldap_servers.inc
@@ -50,6 +50,7 @@ $servers['ldapauthor1']['search_results']['(member=cn=jkool,ou=guest accounts,dc
*/
$servers['ldapauthor1']['users']['cn=jdoe,ou=campus accounts,dc=ad,dc=myuniversity,dc=edu']['attr'] = array(
'dn' => 'cn=jdoe,ou=campus accounts,dc=ad,dc=myuniversity,dc=edu',
+ 'distinguishedname' => array( 0 => 'cn=jdoe,ou=campus accounts,dc=ad,dc=myuniversity,dc=edu'),
'mail' => array( 0 => 'jdoe@myuniversity.edu', 'count' => 1),
'sAMAccountName' => array( 0 => 'jdoe', 'count' => 1),
'password' => array( 0 => 'goodpwd', 'count' => 1),
@@ -58,6 +59,7 @@ $servers['ldapauthor1']['users']['cn=jdoe,ou=campus accounts,dc=ad,dc=myuniversi
$servers['ldapauthor1']['users']['cn=jkool,ou=guest accounts,dc=ad,dc=myuniversity,dc=edu']['attr'] = array(
'dn' => 'cn=jkool,ou=guest accounts,dc=ad,dc=myuniversity,dc=edu',
+ 'distinguishedname' => array( 0 => 'cn=jkool,ou=guest accounts,dc=ad,dc=myuniversity,dc=edu'),
'mail' => array( 0 => 'jkool@guests.myuniversity.edu', 'count' => 1),
'mailcode' => array( 0 => '17', 'count' => 1),
'sAMAccountName' => array( 0 => 'jkool', 'count' => 1),
@@ -68,6 +70,7 @@ $servers['ldapauthor1']['users']['cn=jkool,ou=guest accounts,dc=ad,dc=myuniversi
// duplicate of previous with escaped commas in cn.
$servers['ldapauthor1']['users']['cn=Flintstone\, Wilma,ou=guest accounts,dc=ad,dc=myuniversity,dc=edu']['attr'] = array(
'dn' => 'cn=Flintstone\, Wilma,ou=guest accounts,dc=ad,dc=myuniversity,dc=edu',
+ 'distinguishedname' => array( 0 => 'cn=Flintstone\, Wilma,ou=guest accounts,dc=ad,dc=myuniversity,dc=edu'),
'mail' => array( 0 => 'wilmaf@guests.myuniversity.edu', 'count' => 1),
'sAMAccountName' => array( 0 => 'wilmaf', 'count' => 1),
'password' => array( 0 => 'goodpwd', 'count' => 1),
@@ -81,6 +84,7 @@ $servers['ldapauthor1']['users']['cn=Flintstone\, Wilma,ou=guest accounts,dc=ad,
// duplicate of previous with quoted cn.
$servers['ldapauthor1']['users']['cn=Rubble\, Barney,ou=guest accounts,dc=ad,dc=myuniversity,dc=edu']['attr'] = array(
'dn' => 'cn=Rubble\, Barney,ou=guest accounts,dc=ad,dc=myuniversity,dc=edu',
+ 'distinguishedname' => array( 0 => 'cn=Rubble\, Barney,ou=guest accounts,dc=ad,dc=myuniversity,dc=edu'),
'mail' => array( 0 => 'barneyr@guests.myuniversity.edu', 'count' => 1),
'sAMAccountName' => array( 0 => 'barneyr', 'count' => 1),
'password' => array( 0 => 'goodpwd', 'count' => 1),
@@ -94,6 +98,7 @@ $servers['ldapauthor1']['users']['cn=Rubble\, Barney,ou=guest accounts,dc=ad,dc=
$servers['ldapauthor1']['users']['cn=unkool,ou=lost,dc=ad,dc=myuniversity,dc=edu']['attr'] = array(
'dn' => 'cn=unkool,ou=lost,dc=ad,dc=myuniversity,dc=edu',
+ 'distinguishedname' => array( 0 => 'cn=unkool,ou=lost,dc=ad,dc=myuniversity,dc=edu'),
'mail' => array( 0 => 'unkool@nowhere.myuniversity.edu', 'count' => 1),
'sAMAccountName' => array( 0 => 'jkool', 'count' => 1),
'password' => array( 0 => 'goodpwd', 'count' => 1),
@@ -102,6 +107,7 @@ $servers['ldapauthor1']['users']['cn=unkool,ou=lost,dc=ad,dc=myuniversity,dc=edu
$servers['ldapauthor1']['users']['cn=verykool,ou=special guests,ou=guest accounts,dc=ad,dc=myuniversity,dc=edu']['attr'] = array(
'dn' => 'cn=verykool,ou=special guests,ou=guest accounts,dc=ad,dc=myuniversity,dc=edu',
+ 'distinguishedname' => array( 0 => 'cn=verykool,ou=special guests,ou=guest accounts,dc=ad,dc=myuniversity,dc=edu'),
'mail' => array( 0 => 'verykool@myuniversity.edu', 'count' => 1),
'sAMAccountName' => array( 0 => 'verykool', 'count' => 1),
'password' => array( 0 => 'goodpwd', 'count' => 1),
@@ -117,6 +123,7 @@ $servers['ldapauthor1']['users']['cn=verykool,ou=special guests,ou=guest account
$servers['ldapauthor1']['users']['cn=newkool,ou=special guests,ou=guest accounts,dc=ad,dc=myuniversity,dc=edu']['attr'] = array(
'dn' => 'cn=newkool,ou=special guests,ou=guest accounts,dc=ad,dc=myuniversity,dc=edu',
+ 'distinguishedname' => array( 0 => 'cn=newkool,ou=special guests,ou=guest accounts,dc=ad,dc=myuniversity,dc=edu'),
'mail' => array( 0 => 'newkool@guests.myuniversity.edu', 'count' => 1),
'sAMAccountName' => array( 0 => 'newkool', 'count' => 1),
'password' => array( 0 => 'goodpwd', 'count' => 1),
@@ -125,6 +132,7 @@ $servers['ldapauthor1']['users']['cn=newkool,ou=special guests,ou=guest accounts
$servers['ldapauthor1']['users']['cn=joeprogrammer,ou=it,dc=ad,dc=myuniversity,dc=edu']['attr'] = array(
'dn' => 'cn=joeprogrammer,ou=it,dc=ad,dc=myuniversity,dc=edu',
+ 'distinguishedname' => array( 0 => 'cn=joeprogrammer,ou=it,dc=ad,dc=myuniversity,dc=edu'),
'mail' => array( 0 => 'joeprogrammer@myuniversity.edu', 'count' => 1),
'sAMAccountName' => array( 0 => 'joeprogrammer', 'count' => 1),
'password' => array( 0 => 'goodpwd', 'count' => 1),
@@ -147,27 +155,32 @@ $servers['ldapauthor1']['users']['cn=joeprogrammer,ou=it,dc=ad,dc=myuniversity,d
*/
$servers['ldapauthor1']['groups']['cn=sysadmins,ou=it,dc=ad,dc=myuniversity,dc=edu']['attr'] = array(
'dn' => 'cn=sysadmins,ou=it,dc=ad,dc=myuniversity,dc=edu',
+ 'distinguishedname' => array( 0 => 'cn=sysadmins,ou=it,dc=ad,dc=myuniversity,dc=edu'),
'memberOf' => array( 0 => 'cn=it,ou=it,dc=ad,dc=myuniversity,dc=edu', 'count' => 1),
);
$servers['ldapauthor1']['groups']['cn=developers,ou=it,dc=ad,dc=myuniversity,dc=edu']['attr'] = array(
'dn' => 'cn=developers,ou=it,dc=ad,dc=myuniversity,dc=edu',
+ 'distinguishedname' => array( 0 => 'cn=developers,ou=it,dc=ad,dc=myuniversity,dc=edu'),
'memberOf' => array( 0 => 'cn=it,ou=it,dc=ad,dc=myuniversity,dc=edu', 'count' => 1),
);
$servers['ldapauthor1']['groups']['cn=it,ou=it,dc=ad,dc=myuniversity,dc=edu']['attr'] = array(
'dn' => 'cn=it,ou=it,dc=ad,dc=myuniversity,dc=edu',
+ 'distinguishedname' => array( 0 => 'cn=it,ou=it,dc=ad,dc=myuniversity,dc=edu'),
'memberOf' => array( 0 => 'cn=staff,ou=people,dc=ad,dc=myuniversity,dc=edu', 'count' => 1),
'memberOf' => array( 0 => 'cn=sysadmins,ou=it,dc=ad,dc=myuniversity,dc=edu', 'count' => 1), // bogus recursion to test bogus recursion
);
$servers['ldapauthor1']['groups']['cn=staff,ou=people,dc=ad,dc=myuniversity,dc=edu']['attr'] = array(
'dn' => 'cn=staff,ou=people,dc=ad,dc=myuniversity,dc=edu',
+ 'distinguishedname' => array( 0 => 'cn=staff,ou=people,dc=ad,dc=myuniversity,dc=edu'),
'memberOf' => array( 0 => 'cn=people,ou=it,dc=ad,dc=myuniversity,dc=edu', 'count' => 1),
);
$servers['ldapauthor1']['groups']['cn=people,ou=it,dc=ad,dc=myuniversity,dc=edu']['attr'] = array(
'dn' => 'cn=people,ou=it,dc=ad,dc=myuniversity,dc=edu',
+ 'distinguishedname' => array( 0 => 'cn=people,ou=it,dc=ad,dc=myuniversity,dc=edu'),
'memberOf' => array('count' => 0),
);
@@ -227,6 +240,7 @@ $servers['ldapauthor1']['search_results']['(|((dn=cn=staff,ou=people,dc=ad,dc=my
*/
$servers['ldapauthor1']['users']['cn=service-account,dc=ad,dc=myuniversity,dc=edu']['attr'] = array(
'dn' => 'cn=service-account,dc=ad,dc=myuniversity,dc=edu',
+ 'distinguishedname' => array( 0 => 'cn=people,cn=groups,dc=ad,dc=myuniversity,dc=edu'),
'mail' => array( 0 => 'service-account@myuniversity.edu', 'count' => 1),
'sAMAccountName' => array( 0 => 'service-account', 'count' => 1),
'memberOf' => array(
diff --git a/kolab.org/www/drupal-7.15/sites/all/modules/ldap/ldap_authorization/tests/Other/ldap_servers.inc b/kolab.org/www/drupal-7.15/sites/all/modules/ldap/ldap_authorization/tests/Other/ldap_servers.inc
index e4f20c1..ac40759 100644
--- a/kolab.org/www/drupal-7.15/sites/all/modules/ldap/ldap_authorization/tests/Other/ldap_servers.inc
+++ b/kolab.org/www/drupal-7.15/sites/all/modules/ldap/ldap_authorization/tests/Other/ldap_servers.inc
@@ -50,6 +50,7 @@ $servers['ldapauthor1']['search_results']['(member=cn=jkool,ou=guest accounts,dc
*/
$servers['ldapauthor1']['users']['cn=jdoe,ou=campus accounts,dc=ad,dc=myuniversity,dc=edu']['attr'] = array(
'dn' => 'cn=jdoe,ou=campus accounts,dc=ad,dc=myuniversity,dc=edu',
+ 'distinguishedname' => array( 0 => 'cn=jdoe,ou=campus accounts,dc=ad,dc=myuniversity,dc=edu'),
'mail' => array( 0 => 'jdoe@myuniversity.edu', 'count' => 1),
'sAMAccountName' => array( 0 => 'jdoe', 'count' => 1),
'password' => array( 0 => 'goodpwd', 'count' => 1),
@@ -58,6 +59,7 @@ $servers['ldapauthor1']['users']['cn=jdoe,ou=campus accounts,dc=ad,dc=myuniversi
$servers['ldapauthor1']['users']['cn=jkool,ou=guest accounts,dc=ad,dc=myuniversity,dc=edu']['attr'] = array(
'dn' => 'cn=jkool,ou=guest accounts,dc=ad,dc=myuniversity,dc=edu',
+ 'distinguishedname' => array( 0 => 'cn=jkool,ou=guest accounts,dc=ad,dc=myuniversity,dc=edu'),
'mail' => array( 0 => 'jkool@guests.myuniversity.edu', 'count' => 1),
'mailcode' => array( 0 => '17', 'count' => 1),
'sAMAccountName' => array( 0 => 'jkool', 'count' => 1),
@@ -68,6 +70,7 @@ $servers['ldapauthor1']['users']['cn=jkool,ou=guest accounts,dc=ad,dc=myuniversi
// duplicate of previous with escaped commas in cn.
$servers['ldapauthor1']['users']['cn=Flintstone\, Wilma,ou=guest accounts,dc=ad,dc=myuniversity,dc=edu']['attr'] = array(
'dn' => 'cn=Flintstone\, Wilma,ou=guest accounts,dc=ad,dc=myuniversity,dc=edu',
+ 'distinguishedname' => array( 0 => 'cn=Flintstone\, Wilma,ou=guest accounts,dc=ad,dc=myuniversity,dc=edu'),
'mail' => array( 0 => 'wilmaf@guests.myuniversity.edu', 'count' => 1),
'sAMAccountName' => array( 0 => 'wilmaf', 'count' => 1),
'password' => array( 0 => 'goodpwd', 'count' => 1),
@@ -81,6 +84,7 @@ $servers['ldapauthor1']['users']['cn=Flintstone\, Wilma,ou=guest accounts,dc=ad,
// duplicate of previous with quoted cn.
$servers['ldapauthor1']['users']['cn=Rubble\, Barney,ou=guest accounts,dc=ad,dc=myuniversity,dc=edu']['attr'] = array(
'dn' => 'cn=Rubble\, Barney,ou=guest accounts,dc=ad,dc=myuniversity,dc=edu',
+ 'distinguishedname' => array( 0 => 'cn=Rubble\, Barney,ou=guest accounts,dc=ad,dc=myuniversity,dc=edu'),
'mail' => array( 0 => 'barneyr@guests.myuniversity.edu', 'count' => 1),
'sAMAccountName' => array( 0 => 'barneyr', 'count' => 1),
'password' => array( 0 => 'goodpwd', 'count' => 1),
@@ -94,6 +98,7 @@ $servers['ldapauthor1']['users']['cn=Rubble\, Barney,ou=guest accounts,dc=ad,dc=
$servers['ldapauthor1']['users']['cn=unkool,ou=lost,dc=ad,dc=myuniversity,dc=edu']['attr'] = array(
'dn' => 'cn=unkool,ou=lost,dc=ad,dc=myuniversity,dc=edu',
+ 'distinguishedname' => array( 0 => 'cn=unkool,ou=lost,dc=ad,dc=myuniversity,dc=edu'),
'mail' => array( 0 => 'unkool@nowhere.myuniversity.edu', 'count' => 1),
'sAMAccountName' => array( 0 => 'jkool', 'count' => 1),
'password' => array( 0 => 'goodpwd', 'count' => 1),
@@ -102,6 +107,7 @@ $servers['ldapauthor1']['users']['cn=unkool,ou=lost,dc=ad,dc=myuniversity,dc=edu
$servers['ldapauthor1']['users']['cn=verykool,ou=special guests,ou=guest accounts,dc=ad,dc=myuniversity,dc=edu']['attr'] = array(
'dn' => 'cn=verykool,ou=special guests,ou=guest accounts,dc=ad,dc=myuniversity,dc=edu',
+ 'distinguishedname' => array( 0 => 'cn=verykool,ou=special guests,ou=guest accounts,dc=ad,dc=myuniversity,dc=edu'),
'mail' => array( 0 => 'verykool@myuniversity.edu', 'count' => 1),
'sAMAccountName' => array( 0 => 'verykool', 'count' => 1),
'password' => array( 0 => 'goodpwd', 'count' => 1),
@@ -117,6 +123,7 @@ $servers['ldapauthor1']['users']['cn=verykool,ou=special guests,ou=guest account
$servers['ldapauthor1']['users']['cn=newkool,ou=special guests,ou=guest accounts,dc=ad,dc=myuniversity,dc=edu']['attr'] = array(
'dn' => 'cn=newkool,ou=special guests,ou=guest accounts,dc=ad,dc=myuniversity,dc=edu',
+ 'distinguishedname' => array( 0 => 'cn=newkool,ou=special guests,ou=guest accounts,dc=ad,dc=myuniversity,dc=edu'),
'mail' => array( 0 => 'newkool@guests.myuniversity.edu', 'count' => 1),
'sAMAccountName' => array( 0 => 'newkool', 'count' => 1),
'password' => array( 0 => 'goodpwd', 'count' => 1),
@@ -125,6 +132,7 @@ $servers['ldapauthor1']['users']['cn=newkool,ou=special guests,ou=guest accounts
$servers['ldapauthor1']['users']['cn=joeprogrammer,ou=it,dc=ad,dc=myuniversity,dc=edu']['attr'] = array(
'dn' => 'cn=joeprogrammer,ou=it,dc=ad,dc=myuniversity,dc=edu',
+ 'distinguishedname' => array( 0 => 'cn=joeprogrammer,ou=it,dc=ad,dc=myuniversity,dc=edu'),
'mail' => array( 0 => 'joeprogrammer@myuniversity.edu', 'count' => 1),
'sAMAccountName' => array( 0 => 'joeprogrammer', 'count' => 1),
'password' => array( 0 => 'goodpwd', 'count' => 1),
@@ -147,27 +155,32 @@ $servers['ldapauthor1']['users']['cn=joeprogrammer,ou=it,dc=ad,dc=myuniversity,d
*/
$servers['ldapauthor1']['groups']['cn=sysadmins,ou=it,dc=ad,dc=myuniversity,dc=edu']['attr'] = array(
'dn' => 'cn=sysadmins,ou=it,dc=ad,dc=myuniversity,dc=edu',
+ 'distinguishedname' => array( 0 => 'cn=sysadmins,ou=it,dc=ad,dc=myuniversity,dc=edu'),
'memberOf' => array( 0 => 'cn=it,ou=it,dc=ad,dc=myuniversity,dc=edu', 'count' => 1),
);
$servers['ldapauthor1']['groups']['cn=developers,ou=it,dc=ad,dc=myuniversity,dc=edu']['attr'] = array(
'dn' => 'cn=developers,ou=it,dc=ad,dc=myuniversity,dc=edu',
+ 'distinguishedname' => array( 0 => 'cn=developers,ou=it,dc=ad,dc=myuniversity,dc=edu'),
'memberOf' => array( 0 => 'cn=it,ou=it,dc=ad,dc=myuniversity,dc=edu', 'count' => 1),
);
$servers['ldapauthor1']['groups']['cn=it,ou=it,dc=ad,dc=myuniversity,dc=edu']['attr'] = array(
'dn' => 'cn=it,ou=it,dc=ad,dc=myuniversity,dc=edu',
+ 'distinguishedname' => array( 0 => 'cn=it,ou=it,dc=ad,dc=myuniversity,dc=edu'),
'memberOf' => array( 0 => 'cn=staff,ou=people,dc=ad,dc=myuniversity,dc=edu', 'count' => 1),
'memberOf' => array( 0 => 'cn=sysadmins,ou=it,dc=ad,dc=myuniversity,dc=edu', 'count' => 1), // bogus recursion to test bogus recursion
);
$servers['ldapauthor1']['groups']['cn=staff,ou=people,dc=ad,dc=myuniversity,dc=edu']['attr'] = array(
'dn' => 'cn=staff,ou=people,dc=ad,dc=myuniversity,dc=edu',
+ 'distinguishedname' => array( 0 => 'cn=staff,ou=people,dc=ad,dc=myuniversity,dc=edu'),
'memberOf' => array( 0 => 'cn=people,ou=it,dc=ad,dc=myuniversity,dc=edu', 'count' => 1),
);
$servers['ldapauthor1']['groups']['cn=people,ou=it,dc=ad,dc=myuniversity,dc=edu']['attr'] = array(
'dn' => 'cn=people,ou=it,dc=ad,dc=myuniversity,dc=edu',
+ 'distinguishedname' => array( 0 => 'cn=people,ou=it,dc=ad,dc=myuniversity,dc=edu'),
'memberOf' => array('count' => 0),
);
@@ -227,6 +240,7 @@ $servers['ldapauthor1']['search_results']['(|((dn=cn=staff,ou=people,dc=ad,dc=my
*/
$servers['ldapauthor1']['users']['cn=service-account,dc=ad,dc=myuniversity,dc=edu']['attr'] = array(
'dn' => 'cn=service-account,dc=ad,dc=myuniversity,dc=edu',
+ 'distinguishedname' => array( 0 => 'cn=service-account,dc=ad,dc=myuniversity,dc=edu'),
'mail' => array( 0 => 'service-account@myuniversity.edu', 'count' => 1),
'sAMAccountName' => array( 0 => 'service-account', 'count' => 1),
'memberOf' => array(
diff --git a/kolab.org/www/drupal-7.15/sites/all/modules/ldap/ldap_feeds/ldap_feeds.info b/kolab.org/www/drupal-7.15/sites/all/modules/ldap/ldap_feeds/ldap_feeds.info
index 80852cc..bac9ad3 100644
--- a/kolab.org/www/drupal-7.15/sites/all/modules/ldap/ldap_feeds/ldap_feeds.info
+++ b/kolab.org/www/drupal-7.15/sites/all/modules/ldap/ldap_feeds/ldap_feeds.info
@@ -12,9 +12,9 @@ configure = admin/structure/feeds
core = 7.x
php = 5.2
-; Information added by drupal.org packaging script on 2012-06-14
-version = "7.x-1.0-beta11"
+; Information added by drupal.org packaging script on 2012-08-20
+version = "7.x-1.0-beta12"
core = "7.x"
project = "ldap"
-datestamp = "1339643179"
+datestamp = "1345503423"
diff --git a/kolab.org/www/drupal-7.15/sites/all/modules/ldap/ldap_help/ldap_help.info b/kolab.org/www/drupal-7.15/sites/all/modules/ldap/ldap_help/ldap_help.info
index 134f3b2..1cef3ad 100644
--- a/kolab.org/www/drupal-7.15/sites/all/modules/ldap/ldap_help/ldap_help.info
+++ b/kolab.org/www/drupal-7.15/sites/all/modules/ldap/ldap_help/ldap_help.info
@@ -6,9 +6,9 @@ core = 7.x
dependencies[] = ldap_servers
-; Information added by drupal.org packaging script on 2012-06-14
-version = "7.x-1.0-beta11"
+; Information added by drupal.org packaging script on 2012-08-20
+version = "7.x-1.0-beta12"
core = "7.x"
project = "ldap"
-datestamp = "1339643179"
+datestamp = "1345503423"
diff --git a/kolab.org/www/drupal-7.15/sites/all/modules/ldap/ldap_help/ldap_test_script/README.txt b/kolab.org/www/drupal-7.15/sites/all/modules/ldap/ldap_help/ldap_test_script/README.txt
new file mode 100644
index 0000000..70b8c5b
--- /dev/null
+++ b/kolab.org/www/drupal-7.15/sites/all/modules/ldap/ldap_help/ldap_test_script/README.txt
@@ -0,0 +1,93 @@
+
+This script is intended to help separate LDAP Drupal module configuration and bugs from LDAP server, ldap php extension, and related connectivity and LDAP permissions issues. It uses the php ldap extension functions like ldap_connect(), ldap_search(), etc. rather than the Drupal LDAP module code.
+
+Watchout for the following:
+-- The test script does not depend on the Drupal LDAP module and should not be run within a web server context. -- Command line PHP with the LDAP Extension enabled are requirements.
+-- Often command line PHP will have a different php.ini configuration than the web server's php.ini. See http://php.net/manual/features.commandline.php
+
+Additional background on prerequisites and debugging Drupal LDAP module are available at:
+http://drupal.org/node/1023900
+http://drupal.org/node/1141764
+
+
+--------------------------------
+Running the Script
+--------------------------------
+
+1. Copy this directory (ldap_test_script) outside of web root.
+2. Edit config.inc to reflect your server configuration. The array is in the form:
+ $config['servers'][<server friendly name>][<server param>] = value
+ $config['servers'][<server friendly name>]['test_queries'][<query name>] = array of test query data
+ $config['servers'][<server friendly name>]['test_provisions'][<provision name>] = array of test provision data
+
+ in provisioning part of array:
+ 'delete_if_exists' TURE | FALSE indicates if the provisioned object should be deleted if it exists
+ 'find_filter' is the filter to find the object. eg. 'cn=jdoe', 'distinguishedname=...'
+ 'attr' is the array of attribute/values to provision. should not include 'dn'
+
+ such as:
+
+ array(
+ 'servers' => array(
+ 'default' => array(
+ 'server_address' => 'ad.mycollege.edu',
+ 'server_port' => 389,
+ 'server_tls' => FALSE,
+ 'server_bind_method' => LDAP_SERVERS_BIND_METHOD_SERVICE_ACCT,
+ 'server_base_dn' => 'ou=people,dc=ad,dc=mycollege,dc=edu',
+ 'server_bind_dn' => 'cn=ldap-service-account,ou=service accounts,dc=ad,dc=mycollege,dc=edu',
+ 'server_bind_pw' => 'password_here',
+ 'test_queries' => array(
+ 'user' => array(
+ 'filter' => 'cn=jbarclay',
+ 'show_attr' => array('dn','cn','displayname','sn','givenname','mail','samaccountname','email'),
+ ),
+ ),
+ 'test_provisions' => array(
+ 'simple_user' => array(
+ 'dn' => "cn=ed-drupal-user-17,ou=people,dc=ad,dc=mycollege,dc=edu",
+ 'delete_if_exists' => TRUE,
+ 'find_filter' => "distinguishedName=cn=ed-drupal-user-17,ou=people,dc=ad,dc=mycollege,dc=edu",
+ 'attr' => array(
+ "displayName" => "Drupal User",
+ "cn" => 'ed-drupal-user-17',
+ "samaccountname" => 'ed-drupal-user-17',
+ "objectclass" => array(
+ "top", "person", "organizationalPerson", "user",
+ ),
+ "description" => "test user",
+ 'mail' => 'ed-drupal-user-17@ad.mycollege.edu',
+ 'givenName' => 'Drupal',
+ 'sn' => 'User',
+ 'distinguishedName' => "cn=ed-drupal-user-17,ou=people,dc=ad,dc=mycollege,dc=edu",
+ ),
+ ),
+ 'simple_group' => array(
+ 'dn' => "cn=ed-drupal-group2,ou=groups,dc=ad,dc=mycollege,dc=edu",
+ 'delete_if_exists' => TRUE,
+ 'find_filter' => "distinguishedName=cn=ed-drupal-group2,ou=groups,dc=ad,dc=mycollege,dc=edu",
+ 'attr' => array(
+ "cn" => 'ed-drupal-group2',
+ "sAMAccountName" => 'ed-drupal-group2',
+ 'instanceType' => '4',
+ "objectClass" => array(
+ "top", "group",
+ ),
+ 'name' => 'ed-drupal-group2',
+ 'objectCategory' => 'CN=Group,CN=Schema,CN=Configuration,dc=mycollege,dc=edu',
+ 'distinguishedName' => "cn=ed-drupal-group2,ou=groups,dc=ad,dc=mycollege,dc=edu",
+ ),
+ ),
+ ),
+ );
+
+3. Comment out the die() statement near the top of config.php
+ That is:
+ die('Move this..
+ Becomes:
+ // die('Move this...
+
+4. From the ldap_test_script, type:
+ php test.php
+
+
diff --git a/kolab.org/www/drupal-7.15/sites/all/modules/ldap/ldap_help/ldap_test_script/config.inc b/kolab.org/www/drupal-7.15/sites/all/modules/ldap/ldap_help/ldap_test_script/config.inc
new file mode 100644
index 0000000..27754d8
--- /dev/null
+++ b/kolab.org/www/drupal-7.15/sites/all/modules/ldap/ldap_help/ldap_test_script/config.inc
@@ -0,0 +1,101 @@
+<?php
+
+die('Move this script outside of Drupal and uncomment the die statement in config.inc to run.'); // remove this line after moving out the scripts outside of drupal root.
+
+function ldap_help_config() {
+
+ // these variables are just for convenience, they can be hard coded directly into the $config array
+ $provision_root = 'ou=test,ou=drupal,dc=ad,dc=mycollege,dc=edu';
+ $query_root = 'dc=ad,dc=mycollege,dc=edu';
+ $user_root = 'ou=people,dc=mycollege,dc=edu';
+ $bind_user = 'cn=drupal-ldap,ou=service accounts,dc=ad,dc=mycollege,dc=edu';
+ $bind_pwd = 'password';
+ $server_address = 'ad.mycollege.edu';
+
+ $config = array(
+ 'servers' => array(
+ 'default test' => array(
+ 'server_address' => $server_address,
+ 'server_port' => 389,
+ 'server_tls' => FALSE,
+ 'server_bind_method' => LDAP_SERVERS_BIND_METHOD_SERVICE_ACCT, // LDAP_SERVERS_BIND_METHOD_SERVICE_ACCT OR LDAP_SERVERS_BIND_METHOD_ANON
+ 'server_base_dn' => $user_root,
+ 'server_bind_dn' => $bind_user,
+ 'server_bind_pw' => $bind_pwd,
+ 'test_queries' => array(
+ 'user' => array(
+ 'filter' => 'cn=jbarclay',
+ 'show_attr' => array('dn','cn','displayname','sn','givenname','mail','samaccountname','email'),
+ ),
+ ),
+ 'test_provisions' => array(),
+ ),
+ 'query test' => array(
+ 'server_address' => $server_address,
+ 'server_port' => 389,
+ 'server_tls' => FALSE,
+ 'server_bind_method' => LDAP_SERVERS_BIND_METHOD_SERVICE_ACCT, // LDAP_SERVERS_BIND_METHOD_SERVICE_ACCT OR LDAP_SERVERS_BIND_METHOD_ANON
+ 'server_base_dn' => $query_root,
+ 'server_bind_dn' => $bind_user,
+ 'server_bind_pw' => $bind_pwd,
+ 'test_queries' => array(
+ 'group' => array(
+ 'filter' => 'cn=ed-it-nag',
+ 'show_attr' => array('dn','cn','samaccountname'),
+ ),
+ ),
+ 'test_provisions' => array(),
+ ),
+ 'provision test' => array(
+ 'server_address' => $server_address,
+ 'server_port' => 389,
+ 'server_tls' => FALSE,
+ 'server_bind_method' => LDAP_SERVERS_BIND_METHOD_SERVICE_ACCT, // LDAP_SERVERS_BIND_METHOD_SERVICE_ACCT OR LDAP_SERVERS_BIND_METHOD_ANON
+ 'server_base_dn' => $provision_root,
+ 'server_bind_dn' => $bind_user,
+ 'server_bind_pw' => $bind_pwd,
+ 'test_queries' => array(),
+ 'test_provisions' => array(
+ 'simple_user' => array(
+ 'delete_if_exists' => TRUE,
+ 'find_filter' => "distinguishedName=cn=ed-drupal-user-17,$provision_root",
+ 'dn' => "cn=ed-drupal-user-17,$provision_root",
+ 'attr' => array(
+ "displayName" => "Drupal User",
+ "cn" => 'ed-drupal-user-17',
+ "samaccountname" => 'ed-drupal-user-17',
+ "objectclass" => array(
+ "top", "person", "organizationalPerson", "user",
+ ),
+ "description" => "test user",
+ 'mail' => 'ed-drupal-user-17@blah.com',
+ 'givenName' => 'Drupal',
+ 'sn' => 'User',
+ 'distinguishedName' => "cn=ed-drupal-user-17,$provision_root",
+ ),
+ ),
+ 'simple_group' => array(
+ 'delete_if_exists' => TRUE,
+ 'find_filter' => "distinguishedName=cn=ed-drupal-group2,$provision_root",
+ 'dn' => "cn=ed-drupal-group2,$provision_root",
+ 'attr' => array(
+ "cn" => 'ed-drupal-group2',
+ "sAMAccountName" => 'ed-drupal-group2',
+ 'instanceType' => '4',
+ "objectClass" => array(
+ "top", "group",
+ ),
+ 'name' => 'ed-drupal-group2',
+ 'distinguishedName' => "cn=ed-drupal-group2,$provision_root",
+ ),
+ ),
+ ),
+ ),
+ ),
+ );
+
+ return $config;
+
+}
+
+?> \ No newline at end of file
diff --git a/kolab.org/www/drupal-7.15/sites/all/modules/ldap/ldap_help/ldap_test_script/functions.inc b/kolab.org/www/drupal-7.15/sites/all/modules/ldap/ldap_help/ldap_test_script/functions.inc
new file mode 100644
index 0000000..5ea11c1
--- /dev/null
+++ b/kolab.org/www/drupal-7.15/sites/all/modules/ldap/ldap_help/ldap_test_script/functions.inc
@@ -0,0 +1,186 @@
+<?php
+
+error_reporting(E_ALL | E_STRICT);
+set_time_limit (0);
+ini_set("display_errors", 1);
+ini_set("max_execution_time", 0);
+
+define('LDAP_SERVERS_BIND_METHOD_SERVICE_ACCT', 1);
+define('LDAP_SERVERS_BIND_METHOD_ANON', 3);
+
+define('LDAP_FAIL', -1);
+
+define('LDAP_SUCCESS', 0x00);
+define('LDAP_OPERATIONS_ERROR', 0x01);
+define('LDAP_PROTOCOL_ERROR', 0x02);
+define('LDAP_TIMELIMIT_EXCEEDED', 0x03);
+define('LDAP_SIZELIMIT_EXCEEDED', 0x04);
+define('LDAP_COMPARE_FALSE', 0x05);
+define('LDAP_COMPARE_TRUE', 0x06);
+define('LDAP_AUTH_METHOD_NOT_SUPPORTED', 0x07);
+define('LDAP_STRONG_AUTH_REQUIRED', 0x08);
+//NotusedinLDAPv3);
+define('LDAP_PARTIAL_RESULTS', 0x09);
+
+//Next5newinLDAPv3);
+define('LDAP_REFERRAL', 0x0a);
+define('LDAP_ADMINLIMIT_EXCEEDED', 0x0b);
+define('LDAP_UNAVAILABLE_CRITICAL_EXTENSION', 0x0c);
+define('LDAP_CONFIDENTIALITY_REQUIRED', 0x0d);
+define('LDAP_SASL_BIND_INPROGRESS', 0x0e);
+
+define('LDAP_NO_SUCH_ATTRIBUTE', 0x10);
+define('LDAP_UNDEFINED_TYPE', 0x11);
+define('LDAP_INAPPROPRIATE_MATCHING', 0x12);
+define('LDAP_CONSTRAINT_VIOLATION', 0x13);
+define('LDAP_TYPE_OR_VALUE_EXISTS', 0x14);
+define('LDAP_INVALID_SYNTAX', 0x15);
+
+define('LDAP_NO_SUCH_OBJECT', 0x20);
+define('LDAP_ALIAS_PROBLEM', 0x21);
+define('LDAP_INVALID_DN_SYNTAX', 0x22);
+
+define('LDAP_IS_LEAF', 0x23);
+define('LDAP_ALIAS_DEREF_PROBLEM', 0x24);
+
+define('LDAP_INAPPROPRIATE_AUTH', 0x30);
+define('LDAP_INVALID_CREDENTIALS', 0x31);
+define('LDAP_INSUFFICIENT_ACCESS', 0x32);
+define('LDAP_BUSY', 0x33);
+define('LDAP_UNAVAILABLE', 0x34);
+define('LDAP_UNWILLING_TO_PERFORM', 0x35);
+define('LDAP_LOOP_DETECT', 0x36);
+
+define('LDAP_SORT_CONTROL_MISSING', 0x3C);
+define('LDAP_INDEX_RANGE_ERROR', 0x3D);
+
+define('LDAP_NAMING_VIOLATION', 0x40);
+define('LDAP_OBJECT_CLASS_VIOLATION', 0x41);
+define('LDAP_NOT_ALLOWED_ON_NONLEAF', 0x42);
+define('LDAP_NOT_ALLOWED_ON_RDN', 0x43);
+define('LDAP_ALREADY_EXISTS', 0x44);
+define('LDAP_NO_OBJECT_CLASS_MODS', 0x45);
+define('LDAP_RESULTS_TOO_LARGE', 0x46);
+//NexttwoforLDAPv3);
+define('LDAP_AFFECTS_MULTIPLE_DSAS', 0x47);
+define('LDAP_OTHER', 0x50);
+
+//UsedbysomeAPIs);
+define('LDAP_SERVER_DOWN', 0x51);
+define('LDAP_LOCAL_ERROR', 0x52);
+define('LDAP_ENCODING_ERROR', 0x53);
+define('LDAP_DECODING_ERROR', 0x54);
+define('LDAP_TIMEOUT', 0x55);
+define('LDAP_AUTH_UNKNOWN', 0x56);
+define('LDAP_FILTER_ERROR', 0x57);
+define('LDAP_USER_CANCELLED', 0x58);
+define('LDAP_PARAM_ERROR', 0x59);
+define('LDAP_NO_MEMORY', 0x5a);
+
+//PreliminaryLDAPv3codes);
+define('LDAP_CONNECT_ERROR', 0x5b);
+define('LDAP_NOT_SUPPORTED', 0x5c);
+define('LDAP_CONTROL_NOT_FOUND', 0x5d);
+define('LDAP_NO_RESULTS_RETURNED', 0x5e);
+define('LDAP_MORE_RESULTS_TO_RETURN', 0x5f);
+define('LDAP_CLIENT_LOOP', 0x60);
+define('LDAP_REFERRAL_LIMIT_EXCEEDED', 0x61);
+
+
+//error_reporting(E_ALL & ~E_NOTICE);
+
+define('LDAP_SCRIPTS_COMMAND_LINE_WARNING', "Warning: PHP from the command line may have different PHP versions, php.ini files, and security context than running in a webserver context. This may produce false test results since Drupal LDAP Modules are run in the web server context.");
+
+require_once('config.inc');
+
+function ldap_help_connect($address, $port, $tls, $test = FALSE) {
+
+ if ($test) {
+ $false_con = ldap_connect("fakehostname.sdfserewerdfsdf.com", 389); // test for ldap extensions that don't actually connect until bind
+ if (ldap_errno($false_con) == LDAP_SUCCESS) {
+ $con = ldap_connect($address, $port);
+ return array(LDAP_OTHER, "ldap_connect does not actually connect until bind with installed extension, so connect is not a valid test.", $con);
+ }
+ }
+
+ $con = ldap_connect($address, $port);
+
+ if (!$con || ldap_errno($con) != LDAP_SUCCESS) {
+ $err = ldap_errno($con) . ":" . ldap_error($con) . ":" . ldap_err2str(ldap_errno($con)) . "!";
+ return array(LDAP_CONNECT_ERROR, "LDAP Connect failure to $address : $port. $err");
+ }
+
+ // Use TLS if we are configured and able to.
+ if ($tls) {
+ ldap_get_option($con, LDAP_OPT_PROTOCOL_VERSION, $vers);
+ if ($vers == -1) {
+ return array(LDAP_PROTOCOL_ERROR, "Could not get LDAP protocol version.");
+ }
+ if ($vers != 3) {
+ return array(LDAP_CONNECT_ERROR, 'Could not start TLS, only supported by LDAP v3.');
+ }
+ elseif (!function_exists('ldap_start_tls')) {
+ return array(LDAP_CONNECT_ERROR, 'Could not start TLS. It does not seem to be supported by this PHP setup.');
+ }
+ elseif (!ldap_start_tls($con)) {
+ return array(LDAP_CONNECT_ERROR, "Could not start TLS. (Error ". ldap_errno($con) . ":" . ldap_error($con) . ").");
+ }
+ }
+
+ return array(LDAP_SUCCESS, "Successful Connection!", $con);
+}
+
+function ldap_help_show_error($con) {
+ return "\nLDAP Error Number: " . ldap_errno($con) . "\nLDAP Error Description: " . ldap_error($con);
+}
+
+function ldap_help_display($title, $value = NULL) {
+ if (is_array($value)) {
+ echo "\n" . $title;
+ foreach ($title as $subtitle => $subvalue) {
+ ldap_help_display($subtitle, $subvalue);
+ }
+ }
+ if (!$title && $value) {
+ echo "\n" . $value;
+ }
+ elseif ((int)$title === $title) {
+ echo "\n" . $value;
+ }
+ else {
+ echo "\n" . "$title: $value";
+ }
+
+}
+/**
+ * Disconnect (unbind) from an active LDAP server.
+ */
+function ldap_help_disconnect(&$con) {
+ if (!$con) {
+ // never bound or not currently bound, so no need to disconnect
+ }
+ else {
+ ldap_help_disconnect($con);
+ $con = NULL;
+ }
+}
+
+/** parse php modules from phpinfo */
+function ldap_help_parsePHPModules() {
+ ob_start();
+ phpinfo(INFO_MODULES);
+ $s = ob_get_contents();
+ ob_end_clean();
+ $matches = array();
+ preg_match_all("/(\nLDAP Support.*Vendor Version[^\n]*?).*$/iDsU", $s, $matches);
+ return isset($matches[1][0]) ? "\nphpinfo() LDAP Info:" . $matches[1][0] : '';
+}
+
+function ldap_help_encodePassword($password) {
+ $password="\"".$password."\"";
+ $encoded="";
+ for ($i=0; $i <strlen($password); $i++){ $encoded.="{$password{$i}}\000"; }
+ return $encoded;
+}
+
+?> \ No newline at end of file
diff --git a/kolab.org/www/drupal-7.15/sites/all/modules/ldap/ldap_help/ldap_test_script/test.php b/kolab.org/www/drupal-7.15/sites/all/modules/ldap/ldap_help/ldap_test_script/test.php
new file mode 100644
index 0000000..e03d555
--- /dev/null
+++ b/kolab.org/www/drupal-7.15/sites/all/modules/ldap/ldap_help/ldap_test_script/test.php
@@ -0,0 +1,164 @@
+<?php
+
+// see README.txt for instructions
+
+require_once('functions.inc');
+
+$config = ldap_help_config();
+
+ldap_help_display(NULL, "------------------------------------------\n");
+ldap_help_display(NULL, LDAP_SCRIPTS_COMMAND_LINE_WARNING . "\n");
+
+ldap_help_display(NULL, "------------------------------------------\nldap extension test\n------------------------------------------");
+ldap_help_display("PHP Version", phpversion());
+ldap_help_display('LDAP Extension Loaded', (extension_loaded('ldap')) ? 'yes' : 'no');
+ldap_help_display(NULL, ldap_help_parsePHPModules());
+
+if (!extension_loaded('ldap')) {
+ die('PHP LDAP extension not loaded. Can not run tests. Check your php.ini and make sure ldap extension is avaialable.');
+}
+
+foreach ($config['servers'] as $sid => $server) {
+
+ /**
+ * Test LDAP Connect
+ */
+ $results = ldap_help_connect($server['server_address'], $server['server_port'], $server['server_tls'], TRUE);
+ $test_name = "\"" . $sid . "\"";
+
+ ldap_help_display(NULL, "------------------------------------------\n$test_name connect\n------------------------------------------");
+ $tls = ($server['server_tls']) ? 'yes' : 'no';
+ ldap_help_display('tls', $tls);
+
+ $anon_bind = ($server['server_bind_method'] == LDAP_SERVERS_BIND_METHOD_ANON);
+ $anon_bind_text = ($anon_bind) ? 'yes' : 'no';
+ ldap_help_display('anonymous bind', $anon_bind_text);
+
+ ldap_help_display('connect result', $results[1]);
+ ldap_help_display('connect context', join("",array("server: ", $server['server_address'], ", port: ",$server['server_port'], ", tls= $tls")));
+ $con = FALSE;
+ if ($results[0] == LDAP_SUCCESS) {
+ $con = $results[2];
+ }
+ elseif ($results[0] == LDAP_OTHER) {
+ $con = $results[2];
+ }
+ else {
+ ldap_help_disconnect($con);
+ continue;
+ }
+
+ /**
+ * Test LDAP Bind
+ */
+
+ ldap_help_display(NULL, "------------------------------------------\n$test_name bind\n------------------------------------------");
+
+ if ($anon_bind) {
+ if (@!ldap_bind($con)) {
+ $results = array(ldap_errno($con), "LDAP anonymous bind error.". ldap_help_show_error($con));
+ }
+ }
+ else {
+ $bind_result = @ldap_bind($con, $server['server_bind_dn'], $server['server_bind_pw']);
+ if (!$bind_result) {
+ $results = array(ldap_errno($con), "LDAP bind failure for user " . $server['server_bind_dn']. "." . ldap_help_show_error($con));
+ }
+ else {
+ $results = array(LDAP_SUCCESS, "LDAP bind success.");
+ }
+ }
+
+ ldap_help_display('bind result', $results[1]);
+ ldap_help_display('bind dn', $server['server_bind_dn']);
+
+ if ($results[0] != LDAP_SUCCESS) {continue;}
+
+
+ /**
+ * Test LDAP Queries
+ */
+ foreach ($server['test_queries'] as $query_id => $query) {
+ ldap_help_display(NULL, "------------------------------------------\n$test_name query \"$query_id\" \n------------------------------------------");
+
+ $filter = $query['filter'];
+ ldap_help_display('search base_dn',$server['server_base_dn']);
+ ldap_help_display('search filter',$filter);
+ ldap_help_display('server_address',$server['server_address']);
+ ldap_help_display('server_port',$server['server_port']);
+ ldap_help_display('tls',$tls);
+
+ $query_result = @ldap_search($con, $server['server_base_dn'], $filter);
+ if (!$query_result) {
+ ldap_help_display(ldap_errno($con), "LDAP search failure for user $filter." . ldap_help_show_error($con));
+ }
+ else {// display results
+ $entries = ldap_get_entries($con, $query_result);
+ // print_r($entries);
+ ldap_help_display('search result');
+ if (is_array($entries)) {
+ $entry_count = $entries['count'];
+ if ($entry_count == 0) {
+ ldap_help_display('no entries found');
+ }
+ else {
+ for ($j=0; $j<$entry_count; $j++) {
+ $entry = $entries[$j];
+ $attr_count = $entry['count'];
+ ldap_help_display(NULL,"\nsearch results, entry[$j]:");
+ ldap_help_display(' dn[' .$j . ']',$entry['dn']);
+ for ($i=0; $i<$attr_count; $i++) {
+ $attr_name = $entry[$i];
+ if (in_array($attr_name, $query['show_attr'])) {
+ $values_count = $entry[$attr_name]['count'];
+ for ($k=0; $k<$values_count; $k++) {
+ ldap_help_display(' ' . $attr_name .'[' .$k . ']',$entry[$attr_name][$k]);
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+
+ /**
+ * Test LDAP Provisioning
+ */
+ foreach ($server['test_provisions'] as $provision_id => $provision) {
+ ldap_help_display(NULL, "------------------------------------------\n$test_name provision \"$provision_id\"\n------------------------------------------");
+
+ $dn = $provision['dn'];
+
+ ldap_help_display(NULL, "\nprovision, entry[$dn]:");
+ if ($provision['delete_if_exists']) {
+ $query_result = @ldap_search($con, $server['server_base_dn'], $provision['find_filter']);
+ if ($query_result) {
+ $entries = ldap_get_entries($con, $query_result);
+ if ($entries['count'] == 1) {
+ $result = @ldap_delete($con, $dn);
+ if ($result) {
+ ldap_help_display('deleted existing entry', $dn);
+ }
+ else {
+ ldap_help_display('failed to delete existing entry in provision', $dn);
+ continue;
+ }
+ }
+ else {
+ // no entry exists
+ }
+ }
+ }
+
+
+ $result = @ldap_add($con, $dn, $provision['attr']);
+ $show_result = $result ? 'success' : 'fail';
+ ldap_help_display('provision result', $show_result);
+ if (!$result) {
+ ldap_help_display('provision error', ldap_help_show_error($con));
+ }
+ }
+
+}
+
diff --git a/kolab.org/www/drupal-7.15/sites/all/modules/ldap/ldap_profile/ldap_profile.info b/kolab.org/www/drupal-7.15/sites/all/modules/ldap/ldap_profile/ldap_profile.info
index 6594151..3aae608 100644
--- a/kolab.org/www/drupal-7.15/sites/all/modules/ldap/ldap_profile/ldap_profile.info
+++ b/kolab.org/www/drupal-7.15/sites/all/modules/ldap/ldap_profile/ldap_profile.info
@@ -11,9 +11,9 @@ files[] = ldap_profile.admin.inc
files[] = LdapProfileConf.class.php
files[] = LdapProfileConfAdmin.class.php
-; Information added by drupal.org packaging script on 2012-06-14
-version = "7.x-1.0-beta11"
+; Information added by drupal.org packaging script on 2012-08-20
+version = "7.x-1.0-beta12"
core = "7.x"
project = "ldap"
-datestamp = "1339643179"
+datestamp = "1345503423"
diff --git a/kolab.org/www/drupal-7.15/sites/all/modules/ldap/ldap_profile/ldap_profile.module b/kolab.org/www/drupal-7.15/sites/all/modules/ldap/ldap_profile/ldap_profile.module
index 787463f..3b62fb7 100644
--- a/kolab.org/www/drupal-7.15/sites/all/modules/ldap/ldap_profile/ldap_profile.module
+++ b/kolab.org/www/drupal-7.15/sites/all/modules/ldap/ldap_profile/ldap_profile.module
@@ -83,16 +83,19 @@ function ldap_profile_user_login(&$edit, $account) {
module_load_include('functions.inc', 'ldap_servers');
+ if (!empty($account)) {
+ $ldapuser = ldap_servers_get_user_ldap_data($account);
+ if (!empty($ldapuser) && !empty($ldapuser['dn'])) {
+ $dn = $ldapuser['dn'];
+ }
+ }
+
if (is_array($account->data) && array_key_exists("ldap_authentication", $account->data)) {
$authdata = $account->data["ldap_authentication"];
if (array_key_exists('init', $authdata)) {
$authinit = $authdata['init'];
if (isset($servers[$authinit['sid']])) {
$server = $servers[$authinit['sid']];
- $ldapuser = TRUE;
- if (array_key_exists('dn', $authinit)) {
- $dn = $authinit['dn'];
- }
}
}
}
@@ -181,6 +184,12 @@ function ldap_profile_user_login(&$edit, $account) {
}
}
if (count($changes) > 0) {
+ // preload the previously created account as the original
+ // this is to prevent a cycling condition with entitycache.module
+ // which will continue until memory is exhausted
+ // the new field changes are treated as updates in this case
+ // (Do not reset the cache until after the changes are saved)
+ $account->original = user_load($account->uid, FALSE);
user_save($account, $changes);
}
diff --git a/kolab.org/www/drupal-7.15/sites/all/modules/ldap/ldap_query/ldap_query.info b/kolab.org/www/drupal-7.15/sites/all/modules/ldap/ldap_query/ldap_query.info
index fc4335c..c27d16e 100644
--- a/kolab.org/www/drupal-7.15/sites/all/modules/ldap/ldap_query/ldap_query.info
+++ b/kolab.org/www/drupal-7.15/sites/all/modules/ldap/ldap_query/ldap_query.info
@@ -17,9 +17,9 @@ files[] = tests/ldap_query.test
configure = admin/config/people/ldap/query
-; Information added by drupal.org packaging script on 2012-06-14
-version = "7.x-1.0-beta11"
+; Information added by drupal.org packaging script on 2012-08-20
+version = "7.x-1.0-beta12"
core = "7.x"
project = "ldap"
-datestamp = "1339643179"
+datestamp = "1345503423"
diff --git a/kolab.org/www/drupal-7.15/sites/all/modules/ldap/ldap_servers/LdapServer.class.php b/kolab.org/www/drupal-7.15/sites/all/modules/ldap/ldap_servers/LdapServer.class.php
index c4ecd10..f3ef1ff 100644
--- a/kolab.org/www/drupal-7.15/sites/all/modules/ldap/ldap_servers/LdapServer.class.php
+++ b/kolab.org/www/drupal-7.15/sites/all/modules/ldap/ldap_servers/LdapServer.class.php
@@ -367,6 +367,7 @@ class LdapServer {
$result = $this->ldapQuery($scope, $ldap_query_params);
if ($result && (ldap_count_entries($this->connection, $result) !== FALSE) ) {
$entries = ldap_get_entries($this->connection, $result);
+ drupal_alter('ldap_server_search_results', $entries, $ldap_query_params);
return (is_array($entries)) ? $entries : FALSE;
}
elseif ($this->ldapErrorNumber()) {
diff --git a/kolab.org/www/drupal-7.15/sites/all/modules/ldap/ldap_servers/ldap_servers.api.php b/kolab.org/www/drupal-7.15/sites/all/modules/ldap/ldap_servers/ldap_servers.api.php
new file mode 100644
index 0000000..0da6cd4
--- /dev/null
+++ b/kolab.org/www/drupal-7.15/sites/all/modules/ldap/ldap_servers/ldap_servers.api.php
@@ -0,0 +1,16 @@
+<?php
+/**
+ * Documentations of the module hooks
+ */
+
+
+/**
+ * Allow the results from the ldap search answer to be modified
+ * The query parameters are provided as context infomation
+ * (readonly)
+ *
+ */
+function hook_ldap_server_search_results_alter(&$entries, $ldap_query_params) {
+ // look for a specific part of the $results array
+ // and maybe change it
+}
diff --git a/kolab.org/www/drupal-7.15/sites/all/modules/ldap/ldap_servers/ldap_servers.functions.inc b/kolab.org/www/drupal-7.15/sites/all/modules/ldap/ldap_servers/ldap_servers.functions.inc
index 7fc57c9..8066847 100644
--- a/kolab.org/www/drupal-7.15/sites/all/modules/ldap/ldap_servers/ldap_servers.functions.inc
+++ b/kolab.org/www/drupal-7.15/sites/all/modules/ldap/ldap_servers/ldap_servers.functions.inc
@@ -20,13 +20,15 @@ function ldap_server_module_load_include($type, $module, $name = NULL) {
* as LDAP_CREATE_ACCOUNT_ALREADY_EXISTS, LDAP_CREATE_ERROR
*
*/
-function ldap_create_drupal_account($authname, $accountname, $mail, $dn, $sid, $edit = array()) {
+// $account = ldap_create_drupal_account($authname, $accountname, $ldap_user['mail'], $ldap_user['dn'], $sid, array(), $status);
+
+function ldap_create_drupal_account($authname, $accountname, $mail, $dn, $sid, $status, $edit) {
$edit['name'] = $accountname;
$edit['pass'] = user_password(20);
$edit['mail'] = $mail;
$edit['init'] = $mail;
- $edit['status'] = 1;
+ $edit['status'] = $status;
if (!isset($edit['signature'])) {
$edit['signature'] = '';
}
@@ -207,16 +209,10 @@ function ldap_server_tokenize_entry($ldap_entry, $token_keys = 'all', $pre = LDA
foreach ($dn_parts as $pair) {
list($attr_name, $attr_value) = explode('=', $pair);
$attr_value = ldap_pear_unescape_dn_value($attr_value);
- try {
- $attr_value = check_plain($attr_value);
- }
- catch (Exception $e) {
- if ($detailed_watchdog_log) {
- $watchdog_tokens = array('%attr_name' => $attr_name);
- watchdog('ldap_servers', 'skipped tokenization of attribute %attr_name because the value would not pass check_plain function.', $watchdog_tokens, WATCHDOG_DEBUG);
- }
- continue; // don't tokenize data that can't pass check_plain
+ if (!($attr_value = ldap_server_check_plain($attr_value, $attr_name))) {
+ continue;
}
+
if (!isset($parts_count[$attr_name])) {
$tokens[$pre . ldap_server_massage_text($attr_name, 'attr_name', LDAP_SERVER_MASSAGE_TOKEN_REPLACE) . $post] = $attr_value;
$parts_count[$attr_name] = 0;
@@ -237,18 +233,26 @@ function ldap_server_tokenize_entry($ldap_entry, $token_keys = 'all', $pre = LDA
foreach ($token_keys as $attr_name) {
$attr_value = $ldap_entry[$attr_name];
if (is_array($attr_value) && is_scalar($attr_value[0]) && $attr_value['count'] == 1) {
- $tokens[$pre . ldap_server_massage_text($attr_name, 'attr_name', LDAP_SERVER_MASSAGE_TOKEN_REPLACE) . $post] = check_plain($attr_value[0]);
- $tokens[$pre . ldap_server_massage_text($attr_name, 'attr_name', LDAP_SERVER_MASSAGE_TOKEN_REPLACE) . LDAP_SERVERS_TOKEN_DEL . '0' . $post] = check_plain($attr_value[0]);
- $tokens[$pre . ldap_server_massage_text($attr_name, 'attr_name', LDAP_SERVER_MASSAGE_TOKEN_REPLACE) . LDAP_SERVERS_TOKEN_DEL . 'last' . $post] = check_plain($attr_value[0]);
+ if ($value = ldap_server_check_plain($attr_value[0], $attr_name)) {
+ $tokens[$pre . ldap_server_massage_text($attr_name, 'attr_name', LDAP_SERVER_MASSAGE_TOKEN_REPLACE) . $post] = $value;
+ $tokens[$pre . ldap_server_massage_text($attr_name, 'attr_name', LDAP_SERVER_MASSAGE_TOKEN_REPLACE) . LDAP_SERVERS_TOKEN_DEL . '0' . $post] = $value;
+ $tokens[$pre . ldap_server_massage_text($attr_name, 'attr_name', LDAP_SERVER_MASSAGE_TOKEN_REPLACE) . LDAP_SERVERS_TOKEN_DEL . 'last' . $post] = $value;
+ }
}
elseif (is_array($attr_value) && $attr_value['count'] > 1) {
- $tokens[$pre . ldap_server_massage_text($attr_name, 'attr_name', LDAP_SERVER_MASSAGE_TOKEN_REPLACE) . LDAP_SERVERS_TOKEN_DEL . 'last' . $post] = check_plain($attr_value[$attr_value['count']-1]);
+ if ($value = ldap_server_check_plain($attr_value[$attr_value['count']-1], $attr_name)) {
+ $tokens[$pre . ldap_server_massage_text($attr_name, 'attr_name', LDAP_SERVER_MASSAGE_TOKEN_REPLACE) . LDAP_SERVERS_TOKEN_DEL . 'last' . $post] = $value;
+ }
for ($i=0; $i<$attr_value['count']; $i++) {
- $tokens[$pre . ldap_server_massage_text($attr_name, 'attr_name', LDAP_SERVER_MASSAGE_TOKEN_REPLACE) . LDAP_SERVERS_TOKEN_DEL . $i . $post] = check_plain($attr_value[$i]);
+ if ($value = ldap_server_check_plain($attr_value[$i], $attr_name)) {
+ $tokens[$pre . ldap_server_massage_text($attr_name, 'attr_name', LDAP_SERVER_MASSAGE_TOKEN_REPLACE) . LDAP_SERVERS_TOKEN_DEL . $i . $post] = $value;
+ }
}
}
elseif (is_scalar($attr_value)) {
- $tokens[$pre . ldap_server_massage_text($attr_name, 'attr_name', LDAP_SERVER_MASSAGE_TOKEN_REPLACE) . $post] = check_plain($attr_value);
+ if ($value = ldap_server_check_plain($attr_value, $attr_name)) {
+ $tokens[$pre . ldap_server_massage_text($attr_name, 'attr_name', LDAP_SERVER_MASSAGE_TOKEN_REPLACE) . $post] = $value;
+ }
}
}
}
@@ -272,16 +276,35 @@ function ldap_server_tokenize_entry($ldap_entry, $token_keys = 'all', $pre = LDA
else {
$value = $ldap_entry[$token_key][0];
}
- $tokens[$pre . ldap_server_massage_text($attr_name, 'attr_name', LDAP_SERVER_MASSAGE_TOKEN_REPLACE) . $post] = check_plain($value);
+ $value = ldap_server_check_plain($value, $token_key);
+ if ($value === FALSE) {
+ continue; // don't tokenize data that can't pass check_plain
+ }
+ $tokens[$pre . ldap_server_massage_text($attr_name, 'attr_name', LDAP_SERVER_MASSAGE_TOKEN_REPLACE) . $post] = $value;
}
}
// include the dn. it will not be handled correctly by previous loops
- $tokens[$pre . 'dn' . $post] = check_plain($ldap_entry['dn']);
+ $tokens[$pre . 'dn' . $post] = ldap_server_check_plain($ldap_entry['dn']);
return $tokens;
}
+
+function ldap_server_check_plain($text, $attr_name = 'attribute', $detailed_watchdog_log = FALSE) {
+
+ try {
+ $text = @check_plain($text);
+ }
+ catch (Exception $e) {
+ if ($detailed_watchdog_log) {
+ $watchdog_tokens = array('%attr_name' => $attr_name);
+ watchdog('ldap_servers', 'skipped tokenization of attribute %attr_name because the value would not pass check_plain function.', $watchdog_tokens, WATCHDOG_DEBUG);
+ }
+ $text = FALSE;
+ }
+ return $text;
+}
/**
* @param string $template in form [cn]@myuniversity.edu
* @return array of all tokens in the template such as array('cn')
diff --git a/kolab.org/www/drupal-7.15/sites/all/modules/ldap/ldap_servers/ldap_servers.info b/kolab.org/www/drupal-7.15/sites/all/modules/ldap/ldap_servers/ldap_servers.info
index 1746a05..56818f5 100644
--- a/kolab.org/www/drupal-7.15/sites/all/modules/ldap/ldap_servers/ldap_servers.info
+++ b/kolab.org/www/drupal-7.15/sites/all/modules/ldap/ldap_servers/ldap_servers.info
@@ -23,9 +23,9 @@ files[] = tests/ldap_servers.test
configure = admin/config/people/ldap/servers
-; Information added by drupal.org packaging script on 2012-06-14
-version = "7.x-1.0-beta11"
+; Information added by drupal.org packaging script on 2012-08-20
+version = "7.x-1.0-beta12"
core = "7.x"
project = "ldap"
-datestamp = "1339643179"
+datestamp = "1345503423"
diff --git a/kolab.org/www/drupal-7.15/sites/all/modules/ldap/ldap_servers/ldap_servers.test_form.inc b/kolab.org/www/drupal-7.15/sites/all/modules/ldap/ldap_servers/ldap_servers.test_form.inc
index f731349..439601a 100644
--- a/kolab.org/www/drupal-7.15/sites/all/modules/ldap/ldap_servers/ldap_servers.test_form.inc
+++ b/kolab.org/www/drupal-7.15/sites/all/modules/ldap/ldap_servers/ldap_servers.test_form.inc
@@ -78,12 +78,14 @@ function ldap_servers_test_form($form, &$form_state, $op = NULL, $sid = NULL) {
'#weight' => 100,
);
+
if (isset($_SESSION['ldap_server_test_data']) && count($_SESSION['ldap_server_test_data']) > 0) {
$form['#suffix'] = theme('ldap_server_ldap_entry_table',
array(
'entry' => $_SESSION['ldap_server_test_data']['LDAP Entry']['attr'],
'username' => $_SESSION['ldap_server_test_data']['username'],
));
+
if (function_exists('dpm')) {
$user_name = $_SESSION['ldap_server_test_data']['username'];
dpm("ldap full result array for: " . $user_name);
@@ -92,14 +94,17 @@ function ldap_servers_test_form($form, &$form_state, $op = NULL, $sid = NULL) {
$user = user_load_by_name($user_name);
dpm("drupal user object for: $user_name");
dpm($user);
- $user_entity = entity_load_single('user', $user->uid);
- dpm("drupal user entity for: $user_name");
- dpm($user_entity);
+ $user_entity = entity_load('user', array($user->uid));
+ if (count($user_entity) > 0) {
+ dpm("drupal user entity for: $user_name");
+ dpm($user_entity);
+ }
}
unset($_SESSION['ldap_server_test_data']);
}
+
return $form;
}
@@ -120,6 +125,7 @@ function ldap_servers_test_form_validate($form, &$form_state) {
* Submit hook for the LDAP server form.
*/
function ldap_servers_test_form_submit($form, &$form_state) {
+
$errors = FALSE;
$values = $form_state['values'];
$sid = $values['sid'];
@@ -186,9 +192,10 @@ function ldap_servers_test_form_submit($form, &$form_state) {
'LDAP Entry' => $ldap_user,
);
}
- $message = theme_item_list(array('items' => $results, 'title' => t('Result Messages'), 'type' => 'ul', 'attributes' => array()));
+ $message = ''; // theme_item_list(array('items' => $results, 'title' => t('Result Messages'), 'type' => 'ul', 'attributes' => array()));
drupal_set_message(t($message), ($has_errors) ? 'error' : 'status');
+
$form_state['redirect'] = LDAP_SERVERS_MENU_BASE_PATH . "/servers/test/$sid";
}
diff --git a/kolab.org/www/drupal-7.15/sites/all/modules/ldap/ldap_servers/tests/LdapServerTest.class.php b/kolab.org/www/drupal-7.15/sites/all/modules/ldap/ldap_servers/tests/LdapServerTest.class.php
index b7cb8b9..d3943df 100644
--- a/kolab.org/www/drupal-7.15/sites/all/modules/ldap/ldap_servers/tests/LdapServerTest.class.php
+++ b/kolab.org/www/drupal-7.15/sites/all/modules/ldap/ldap_servers/tests/LdapServerTest.class.php
@@ -134,7 +134,7 @@ class LdapServerTest extends LdapServer {
* An array of matching entries->attributes, or FALSE if the search is empty.
*/
function search($base_dn = NULL, $filter, $attributes = array(), $attrsonly = 0, $sizelimit = 0, $timelimit = 0, $deref = LDAP_DEREF_NEVER, $scope = LDAP_SCOPE_SUBTREE) {
-
+ //debug("feaux_server_filter=$filter");
$filter = trim(str_replace(array("\n", " "),array('',''), $filter)); // for test matching simplicity remove line breaks and tab spacing
// debug("filter=$filter");
// debug('search'); debug("base_dn: $base_dn"); debug("filter:<pre>$filter</pre>");
@@ -159,6 +159,9 @@ class LdapServerTest extends LdapServer {
$filter = strtolower(trim($filter,"()"));
list($filter_attribute, $filter_value) = explode('=', $filter);
+ if (strtolower($filter_attribute) == 'dn') { // don't allow filtering on dn. filters should use distinguishedName
+ continue;
+ }
// $filter_value = ldap_pear_unescape_filter_value($filter_value);
// need to perform feaux ldap search here with data in
$results = array();
@@ -171,11 +174,12 @@ class LdapServerTest extends LdapServer {
$user_data_lcase['attr'][drupal_strtolower($attr)] = $values;
}
- $dn = strtolower($dn);
+
// if not in basedn, skip
// eg. basedn ou=campus accounts,dc=ad,dc=myuniversity,dc=edu
// should be leftmost string in:
// cn=jdoe,ou=campus accounts,dc=ad,dc=myuniversity,dc=edu
+ $dn = strtolower($dn);
$pos = stripos($dn, $base_dn);
if ($pos === FALSE || strcasecmp($base_dn, substr($dn, 0, $pos + 1)) == FALSE) {
if ($my_debug2) {debug("dn=$dn not in base_dn=$base_dn");}
@@ -206,7 +210,7 @@ class LdapServerTest extends LdapServer {
// loop through all attributes, if any don't match continue
- $user_data_lcase['attr']['dn'] = $dn;
+ $user_data_lcase['attr']['distinguishedname'] = $dn;
if ($attributes) {
$selected_user_data = array();
foreach ($attributes as $i => $attr_name) {
@@ -246,8 +250,8 @@ class LdapServerTest extends LdapServer {
}
// loop through all attributes, if any don't match continue
- $group_data['attr']['dn'] = $dn;
- $group_data['distinguishedname'] = $dn;
+ // $group_data['attr']['distinguishedname'] = $dn;
+ // $group_data['distinguishedname'] = $dn;
if ($attributes) {
$selected_group_data = array();
diff --git a/kolab.org/www/drupal-7.15/sites/all/modules/ldap/ldap_sso/ldap_sso.info b/kolab.org/www/drupal-7.15/sites/all/modules/ldap/ldap_sso/ldap_sso.info
index 1c78090..30c6a09 100644
--- a/kolab.org/www/drupal-7.15/sites/all/modules/ldap/ldap_sso/ldap_sso.info
+++ b/kolab.org/www/drupal-7.15/sites/all/modules/ldap/ldap_sso/ldap_sso.info
@@ -6,9 +6,9 @@ dependencies[] = ldap_authentication
core = 7.x
configure = admin/config/people/ldap/authentication
-; Information added by drupal.org packaging script on 2012-06-14
-version = "7.x-1.0-beta11"
+; Information added by drupal.org packaging script on 2012-08-20
+version = "7.x-1.0-beta12"
core = "7.x"
project = "ldap"
-datestamp = "1339643179"
+datestamp = "1345503423"
diff --git a/kolab.org/www/drupal-7.15/sites/all/modules/ldap/ldap_sso/ldap_sso.module b/kolab.org/www/drupal-7.15/sites/all/modules/ldap/ldap_sso/ldap_sso.module
index 784daa9..73ca5ff 100644
--- a/kolab.org/www/drupal-7.15/sites/all/modules/ldap/ldap_sso/ldap_sso.module
+++ b/kolab.org/www/drupal-7.15/sites/all/modules/ldap/ldap_sso/ldap_sso.module
@@ -32,8 +32,9 @@ function ldap_sso_menu() {
function ldap_sso_user_logout($account) {
$auth_conf = ldap_authentication_get_valid_conf();
if ($auth_conf->seamlessLogin == 1) {
- setcookie("seamless_login", 'do not auto login', time() + (int)$auth_conf->cookieExpire, base_path(), "");
- $_SESSION['seamless_login'] = $_COOKIE['seamless_login'];
+ $cookie_string = 'do not auto login';
+ setcookie("seamless_login", $cookie_string, time() + (int)$auth_conf->cookieExpire, base_path(), "");
+ $_SESSION['seamless_login'] = $cookie_string;
}
}
diff --git a/kolab.org/www/drupal-7.15/sites/all/modules/ldap/ldap_views/ldap_views.info b/kolab.org/www/drupal-7.15/sites/all/modules/ldap/ldap_views/ldap_views.info
index d2de16c..02da628 100644
--- a/kolab.org/www/drupal-7.15/sites/all/modules/ldap/ldap_views/ldap_views.info
+++ b/kolab.org/www/drupal-7.15/sites/all/modules/ldap/ldap_views/ldap_views.info
@@ -21,9 +21,9 @@ files[] = handlers/ldap_views_handler_filter.inc
files[] = handlers/ldap_views_handler_filter_attribute.inc
files[] = handlers/ldap_views_handler_sort.inc
files[] = handlers/ldap_views_handler_sort_attribute.inc
-; Information added by drupal.org packaging script on 2012-06-14
-version = "7.x-1.0-beta11"
+; Information added by drupal.org packaging script on 2012-08-20
+version = "7.x-1.0-beta12"
core = "7.x"
project = "ldap"
-datestamp = "1339643179"
+datestamp = "1345503423"
diff --git a/kolab.org/www/drupal-7.15/sites/all/modules/ldap/ldap_views/plugins/ldap_views_plugin_query_ldap.inc b/kolab.org/www/drupal-7.15/sites/all/modules/ldap/ldap_views/plugins/ldap_views_plugin_query_ldap.inc
index 79ba017..8ea19b0 100644
--- a/kolab.org/www/drupal-7.15/sites/all/modules/ldap/ldap_views/plugins/ldap_views_plugin_query_ldap.inc
+++ b/kolab.org/www/drupal-7.15/sites/all/modules/ldap/ldap_views/plugins/ldap_views_plugin_query_ldap.inc
@@ -257,6 +257,9 @@ class ldap_views_plugin_query_ldap extends views_plugin_query {
$entry['jpegphoto'][0] = "<img src='data:image/jpeg;base64,".base64_encode($entry['jpegphoto'][0])."' alt='photo' />";
}
foreach ($view->field as $field) {
+ if (! isset($field_alias[$field->field_alias])) {
+ continue;
+ }
$alias = $field_alias[$field->field_alias];
if (is_array($entry) && array_key_exists($alias, $entry)) {
if (is_array($entry[$alias])) {
@@ -298,7 +301,6 @@ class ldap_views_plugin_query_ldap extends views_plugin_query {
}
}
$params[] = &$entries;
- call_user_func_array('array_multisort', $params);
// Some LDAP setups output a 'count' variable first in the array, which changes the array size;
// temporarily remove it, sort the arrays, and then put it back.
if (array_key_exists('count', $entries)) {
@@ -317,6 +319,9 @@ class ldap_views_plugin_query_ldap extends views_plugin_query {
$row = array();
$entry = &$entries[$offset + $i];
foreach ($view->field as $field) {
+ if (! isset($field_alias[$field->field_alias])) {
+ continue;
+ }
if (array_key_exists($field_alias[$field->field_alias], $entry)) {
$row[$field->field_alias] = $entry[$field_alias[$field->field_alias]];
}
diff --git a/kolab.org/www/drupal-7.15/sites/all/modules/views/CHANGELOG.txt b/kolab.org/www/drupal-7.15/sites/all/modules/views/CHANGELOG.txt
deleted file mode 100644
index 744ea75..0000000
--- a/kolab.org/www/drupal-7.15/sites/all/modules/views/CHANGELOG.txt
+++ /dev/null
@@ -1,397 +0,0 @@
-CHANGELOG for Views 3 for Drupal 7
-
-Views 3.x-7.x-dev
-=================
-#1017128 by bojanz, dereine: Add support to render a single delta.
-follow up by bojanz: Better description for the delta.
-#1017254 by dereine: Fix undefined property error in argument_string handler.
-#1007886 by dereine: Relationship-fields in field_field handler should use the table alias.
-#1018766 by bojanz: Fix click_sort for fieldapi fields.
-#1017128 by bojanz: Follow up: Hide field_field if field value is empty.
-#1018802 by dereine: Convert 'formula' add_where to add_where_expression.
-#1018766 by solotandem: Fix click_sort for fieldapi fields.
-#960648 by dereine: Addjust comment link to d7 changes.
-#997662 by das-peter: Saving a machine name of a display throws Notice "Undefined property new_id".
-#955464 by davereid: Fix notice in views_many_to_one_helper when $operator = 'and'.
-#1019438 by dereine: Fix "illegal choice" for unlimited fields.
-#1019506 by dereine: Fix the remove items element on the rearrange filter_group form.
-#1011004 by dereine: Add validation for query plugin option forms.
-#991202 by helmo: Add option to turn linebreaks into br tags in field rewriting.
-#1001302 by dagmar: Enable attachment displays to have more links.
-#1021784 by tim.plunkett: Extra space added in some classes erroneously.
-#862072 by jhedstrom: Allow argument validator to test if user has edit or delete access to a node.
-Fix fieldsets in field handler.
-#962564 by joshuajabbour: Allow link attributes to be rewritten (internally).
-#672864 by dboulet: cols- class incorrect on table, grid.
-#981872 by infojunkie: Option to hide attachments in summary views.
-#839810 by marcp: Get UID from URL argument default plugin should accept uids from Views pages.
-#1012584 by dereine: Allow filtering on term descriptions.
-#895046 by bojanz, dereine, merlinofchaos: Implement proper multiple field api handling and improve field api rendering in general.
-#1035168 by Ao: Fix strict warning in unread node filter.
-#1044916 by dagmar: Fix improper use of set_current_page member variable.
-#1016814 by eaton: string argument should support name_field.
-#1007376 by dereine: Jump menu was not correctly supporting offsets.
-#1018160 by zhangtaihao: unpack_translatable could infinitely recurse when options are arrays but not declared as such.
-#776830: Attachments and other displays lost "Items to display" controls.
-#747782 by dereine: Improve jump menu grouping.
-#1026014 by dereine and alex_b: Use more always should not ask for the count query to see if we need to show the more link.
-#1012596 by dereine: More inline documentation of class variables.
-#988680 by mikeytown2: Fix Views memory leak with attachments.
-#1023062 by mikejoconnor: Replace views_process_dependency with ctools_dependent_process again.
-#1023558 by mariusz.slonina: Add a user cancel account link.
-#1015960 by duellj: View js should use DOM element not jquery object.
-#1027552 by david_Rothstein: Fix Node: Has new content fatal error.
-#955464 by dereine: Fix many_to_one helper in the case of have no condition and operator = 'and'.
-#696550: Taxonomy validator should always set title when it successfully validates.
-#869172 by bendiy: Add an "external" parameter to field link rewriting so that external URLs can be formed properly even without a scheme.
-#935176 by benoit.borrel: Add "system" table to Views data.
-#839236: Fields named "buttons" would disappear from the rearrange UI due to conflict with the buttons on the form.
-#783514 by dereine: Allow breaking of strings with + and ,
-#1000760 by dereine: Prevent htmlspecialchars() error with string arguments.
-#1033494 by dereine: Fix filter by user picture: change used handler.
-#895046 by bojanz: Follow up of the multiple field handler. Fixes an issue with group-by and rename entity_api_classes.
-#1044250 by dereine: Fix notice in views_handler_filter_history_user_timestamp for disabled comment module.
-#1018872 by dereine: field_field handler shouldn't force to set base field in relationship.
-#1049586 by fgm: Fix strict error in field_field::init.
-#1049276 by david_Rothstein: Commit the 6.11 patch to d7.
-#1011226 by Chris Gillis, Sutharsan: Fix display of error messages in the views inteface.
-#1050962 by Sutharsan: Convert #value to #markup in validate methods.
-#1051034 by Manuel Garcia: Allow field wrapper class to take multiple classes.
-#957284 by dereine: Fix search filter to work with d7 version of search.module's api.
-#534452 by dereine: Remove non-functional "optional" setting on string filters.
-#1019826 by penguin25: Respect contact page access overrides when displaying contact link.
-#652684 by dereine: Search and replace error resulted in invalid function name in nid argument validator.
-#1008358: Updated for translation plugin to work properly with i18nviews.
-#1055378 by mfb: Fix rss_namespaces.
-#957284: by dereine: Followup for filter_search fix.
-#1063208 by dereine: Fix joins between some tables and file_usage.
-#1024586 by merlinofchaos, dereine: Provide a way to move old fields in views data. Additional move field-api data to it.
-#990554 by bojanz: Allow to show default values of fields.
-#1039460 by robertgarrigos: Rename drupal_set_content to drupal_add_region_content
-#1045908 by bfroehle: Fix type in api-upgrading.html
-#646456 by xslim: Add a workaround to run update.php
-#1055602 by dereine: Convert argument search to dbtng.
-#1039584 by dereine: Fix path of taxonomy path, function from d6
-#1019746 by Ralf: Check_plain role names.
-#1006482 by dereine: Fix filter: user posted or commented handler.
-#870960 by bojanz, dereine: Field label should derive from field Label, not field name.
-#1056824 by greggles: Rename the displayed permission from "access all views" to "bypass views access control".
-#1022052 bojanz, dereine: Don't add the field_info into the views data array
-#970162 by longwave: Add "time hence" options to date field format
-#1069100 by paranojik: remove legacy code from views_plugin_row_comment_view:pre_render().
-#741234 by voxpelli: Arguments should check for NULL along with empty string to find empty values.
-#1046170 by agentrickard, blackice2999, dereine: Execute preExecute before generate the countQuery to fix pagers with node_access.
-#1046170 (follow up) by agentrickard: Provide a better documentation for the problem.
-#1070112 by drunken_monkey: Fix notice in field_views_field_label.
-#978824 by dereine: Don't execute validation on config_item remove button.
-by dereine: Convert op_shorter/longer in filter_string to add_where_expression.
-#1046650 by dereine, damz: Don't delete views in the simpletest.
-#1022052 follow up by bojanz: Fix filter_list handler, by loading the field_info again.
-#1023794 by turek: Fix notice in many_to_one_helper.
-#1057810 by mariusz.slonina: Remove views_handler_field_user_link_delete and the views_data entry.
-#1075598 by paranojik: small fix for the single argument case.
-#1053164 by dereine: Support random sort for sqlite by using dbtng functionality.
-#1073862 by solotandem: Title of columns from field revision tables shouldn't have the name delta.
-#1042072 by das-peter: Fix notice in views_handler_field_field.
-#1078570 by duellj: Search filter doesn't work for attachments.
-#1068108 by boombatower: Allow row_class to contain multiple classes.
-#1078738 by dereine: Add a serialized data field handler and set users.data to it.
-#1051308 by dereine: Backport a test fix for views_handler_filter_date from d7v3ui.
-#1079496 by dereine: Fix renamed field names for list fields. This caused an additional filter, which didn't worked.
-#1080690 by dereine: Store the view object in the query object, so it can be used.
-#1080690 by dereine: Fix target/key for querying against sql databases. Therefore don't use db_select anymore.
-#1029534 by bojanz: Fix like for pgsql by using db_like correct.
-#1051308 by bojanz: Fix date filter handler behaviour with offsets.
-#1062506 by dereine: Misnamed parameter for creation of broken handlers.
-#1049998 by dereine: Fix jump_menu summary and some possible notices.
-#975400 by bojanz, dereine: Refactor field render() functions to accept $value.
-#975400 follow up by bojanz: Give field::sanitize_value more power and fix some issues with get_value.
-#1052896 by dereine: Fix summary css classes output.
-#1046674 by dereine: Rename build_mode to view_mode in row_node_view. This fixes some bugs with code using $node->view_mode.
-#1090682 by febbraro: view:load does not clear the cache correctly when reset.
-#1090682 by dereine: Write a simpletest for the reset parameter of view::load.
-#1054272 by dagmar: String filters are non optional anymore.
-#1086158 by dereine: Fix filter handler of list fields.
-#1079178 by Manuel Garcia: Provide a views revert drush command.
-#1097602 by bojanz: Don't run validation for Cancel button on views wizard.
-#1096292 by bojanz: Provide better default for exposed_sorts_label.
-#1097964 by dereine: Don't show contextual links when the contextual module is disabled.
-#1098006 by bojanz: Fix notice in summary style conversion code.
-by dereine: Move get_value and sanitize_value into views_handler to support it for area handlers.
-#1098334 by kannary, dereine: Remove merge leftover in views.help.ini.
-by dereine: Allow to expose sorts again.
-#1098168 by fubhy: HTML Wrapper checkboxes in style settings in default field handler showing weird behavior
-#1096366 by jamsilver: Role access plugin: Replacing array_unshift() with reset()
-#1096834 by dww: Allow importing views code that starts with '<?php'.
-#557160 by joachim: Move docs/docs.php to views.api.php to match the drupal standard of hook documentation.
-#1100052 by michielnugter: Fix strict warning of views_handler_argument::get_value.
-#1023456 by dereine: Fix many_to_one_helper condition buidling.
-#1100738 by bojanz: Extend upgrading docs to include info about argument changes and get_value/sanitize_value.
-#1100776 by bojanz: Fix call for get_value in field_user_language handler.
-
-Views 3.x-7.x-alpha1 (05-Jan-2011)
-==================================
-
-#914102 by torelad: Correct placeholder in views_date_sql_format.
-#931582 by bec: Provide integration of {file_usage} table.
-by dereine: Fix in_operator test.
-by dereine: Fix more testcases by adding $this->resetAll().
-#931886 by bojanz: Remove views_handler_filter_float because numeric handler + dbtng does everything.
-#932792 by bec: Extras for formatting {file_managed} fields.
-by dereine: Move file_* handlers to extra files.
-#934086 by dereine: Attach the contextual links library only once.
-#917402 by yhahn: Update taxonomy handlers for d7 changes.
-#930582 by berdir, Damz, dereine: Fix query substitutions for subqueries.
-#711860 by dereine: 00 entered in pager total fails.
-#889770 by tim.plunkett: Empty fields not always hidden based on row settings.
-#762484 by master-of-magic: Link to node status could be lost between rows.
-#908272 by jaydub: Fix incorrect length of view description form field.
-#772782 by mstrelan: Menu normal item menu should default to system default menu rather than "navigation".
-#571234 by dereine: Better handling of invalid exposed filters or other methods that cause a view to abort during the build process.
-#685554 by MyXelf: Illegal characters in View tag translated improperly when used in theming templates.
-#508832 by nick_vh: Documentation improvement on templates.
-#887220 by dereine: Fix fatal error when using GROUP BY.
-#930714 by brad.bulger: Add aggregator GUID field.
-#936828 by xjm: Empty field replacement not quite always working.
-#872000 by NaX: Comment edit field needs option to set destination so it can work like comment edit field.
-#799580 by dereine: api version of views exports should use views_api_version() not hardcoded number.
-#884440 by Amitaibu: Improve token encoding to eliminate double html entity encoding.
-#847930 by dereine: Reduce duplicates option not staying set.
-#865482 by dereine: RSS options form does not include override.
-#813422 by dereine and killes: Improved time-based caching expiration.
-#829550 by hefox: Better testing of batch form use by exposed filters.
-#570618 by dereine: Enforce denying access to disabled views more strongly.
-#667014 by dereine: Prevent notice with relationships and node row style if relationship has no endpoint node.
-#835934 by dereine: Provide relationship from files to users.
-#738172 by dereine: Fields rewritten to be links with just a fragment did not work.
-#694094 by Ian Ward: Allow more static caches to be resettable. (port by aspilicious)
-#811226 by dereine: Fix another notice in area text handler. (port by aspilicious)
-#917916 by MyXelf: break delimiter not removed from formatted output. (port by aspilicious)
-#918654 by Will White: numeric GROUP BY fields missing numeric format options.
-by dereine: Test for views_handler_filter_date.
-#785236 by e_log: Add aggregator field item id as a field.
-#366886 by Scott Reynolds: For "last comment time" if "count zero is empty" is set, use empty text for nodes with no comments.
-#611086 by dereine: add -url token to files that can fetch proper URLs with private filesystems.
-#635336 by dereine: Remove unused fields from views.
-#795270 by dereine: Remove unnecessary links to sections that will have no settings.
-#882800 by dereine: Move "Distinct" option to query settings.
-#755342 by jcmarco: Improve SQL date field handling.
-#338893 by dereine: Aggregator argument not always properly converted to title.
-#787184 introduce the long awaited "Update and Override" button.
-#718832 by dereine: Add file extension as a field available within the File group.
-#941974 by dereine: Use contextual links in the views ui when possible.
-#761102 by dereine: test: user default argument.
-by dereine: Fix notice in views_ui_add_page.
-#667950 by damZ, dereine: Port #dependency form elements to #states.
-Added missing file: modules/taxonomy/views_handler_filter_vocabulary_machine_name.inc
-#882800 by rszrama: Fix notice for options['distinct'].
-#950246 by ZoeN: Fix dbtng in views_handler_argument_aggregator_fid.
-#884730 by yched, bojanz, karenS, wundo: Add new UI for formatter settings options to the field settings config.
-by dereine: Add the dependeny ctools.
-#952576 by yhahn: Use JS_LIBRARY group for adding core library js files.
-#563020 by dereine: Replace views object cache with ctools object cache.
-#952636 by yhahn: Support string format identifiers in field_markup handler.
-#954030 by alweb: Fix title query in views_handler_argument_term_node_tid.
-#954784 by tekante: views_join class produces a SQL error when an array is in definition['extra']['value'].
-#962756 by bojanz: Field delta shows the placeholder instead of the field name.
-#667950 by merlinofchaos, bojanz and dereine: Revert the states patch and use ctools dependency instead.
-#960528 by dereine: Clicksort doesn't work for field names that contain special characters.
-by dereine: Document add_where for formula.
-by dereine: Fix notice in ajax.inc.
-#963382 by aidanlis: Fix typo in mathematical expression field help text.
-#807614 by dereine: Test filter_numeric.
-#928000 by mfer, dereine: form.js dependency missing.
-by dereine: Fix some notices.
-by dereine: Fix views_exposed_form test.
-by dereine: Move test files around.
-by dereine: Fix notice in group_by_numeric.
-by eporama: Add a test for views_plugin_argument_validate_user.
-#788950 by merlinofchaos, bojanz, dereine: Fixed ui when clicking override.
-#965432 by bojanz: Display column for single column fields, if that column is not "value".
-#965188 by Scott Reynolds: Remove comment.comment column, it does not exist in the database anymore.
-#969124 by brenk28: Fix notices in rss feeds related to readmore.
-#968286 by bojanz: Let field::render_as_link support entity url options.
-#967188 by Island Usurper: Fix exposed data submitted data.
-#954916 by becw: taxonomy term id from URL expects taxonomy objects in term fields, none present.
-#968372 by becw: "Taxonomy: Term" filter autocomplete broken.
-#971326 by dereine: Join fieldapi fields additional on deleted = 0.
-#713078 by achaux: Aggregator not properly using allowed tags from core.
-#428196 by dereine, funkmasterjones and tic2000: Allow specification of default sort order (asc or desc) per field in table style.
-#944680 by rvilar: Properly t() untranslated string.
-#881680 by brianV and longwave: Avoid unnecessary invoking of view objects for argument validation when no argument validation is necessary.
-#767244 by Magnus: Fix some untranslatable strings due to less than and greater than characters.
-#855280 by dereine: Exposed forms set "Input required" lose exposed sorts.
-#935388 by infojunkie: Add post_build and post_execute hooks similar to post_render.
-#973496 by das-peter: Don't use call-time-reference for comment_view.
-#938806 by jenlampton: Node: title field should link to node by default.
-#956654 by mdupont: Translation for "offset" field in dates needed work.
-#931390 by dww: Optimize boolean logic by using "= 1" rather than "<> 0" for faster queries.
-#567918 by iamjon: Improve documentation for token replacement.
-#881468 by longwave: Improve performance by static caching results of argument validation because menu likes to double validate things.
-#964266 by dereine: cache_expire() missing $type.
-#477984 by demeritcowboy, fatstar415, mike dodd, dagmar: Properly handle value for "empty" and "not empty" special operators.
-#768060 by EmmanueleQuinto, xjm, others: Make sure that render alter options do not accidentally get blown up for empty fields.
-#847724 by dereine: Allow jump menu "Summary" style to customize choose text, just like the regular summary style.
-#669636 by dereine and bojanz: Convert the rest of the field handlers that have link options to use the advanced render.
-#871578 by dereine: Comment "new" might not work right without a comment count field.
-#910864 by Bevan, dereine: exposed filter blocks should not be cached by core block caching.
-Remove unused/lost view::render_exposed_form.
-#776830: Fix pager settings on attachments and feeds.
-#835544 by iamjon: export broke if key contained an apostrophe.
-#941990 by master-of-magic: Link to node when using relationships could occasionally lose track and create bad links.
-#833790: Click sort could break on fields that were actually formulas.
-#963454 by dereine: Remove related terms data definitions.
-#976098 by dereine: Fix notice in field field handler render function.
-#626732 by dereine: Fix analyze ok-button and added a test for it.
-#338584 by superbaloo: Allow displays to be re-ordered in the UI.
-#502348: Move advanced rendering up the chain a little bit to allow for non-standard uses of fields, such as grouping, to use advanced rendering features.
-#943984 by Kars-T: Remove extraneous line of code.
-#751970 by dereine: View list form auto submit on change.
-#502348 followup.
-#977846 by dereine: Use ctools_process_dependency for table plugin. (follow up of #502348).
-#942106 by andypost: Fix converting from vid to vocabulary in taxonomy handlers.
-#870792 by bojanz: Options form needs to be re-rendered if it failed validation.
-#980628 by bojanz: Fix options-query in field::render_as_link.
-#979264 by pwolanin: Account for flipped comment status values in Drupal 7.
-#972864 by bec: Provide term relationship via taxonomy term reference fields.
-#979634 by linclark: Fix field grouping.
-#972934 by dereine: Fix Node: User posted or commented.
-by dereine: Preview shouldn't expect to have the sql plugin, always.
-#960596 by dereine: Argument in preview aren't escaped.
-#983166 by dereine: Rename $class to $classes in the table template file and write some updating documentation.
-#963372 by dereine: Add 'form_process_checkbox' to every checkbox which uses process 'ctools_dependent_process'.
-#979082 by dereine: Add 'form_process_select' to every select which uses process 'ctools_dependent_process'.
-#936196 by jmiccolis, yhahn, adrian, bojanz, dereine: Don't use entity_load for the fieldapi-field handler, but use real sql fields.
-by dereine: Fix notice in views_ui_preview().
-#965496 by ayalon: Update and Override broke validation of most views admin forms.
-#868990: Fix undefined call to $view->set_use_pager()
-#669636 followup by bojanz: Fix improper use of field_alias by row styles.
-#979046 by travist: Fix PHP 5.3 problem in views_access with no arguments.
-#978864 by linclark: Fix title bug with area handlers.
-#983460 by dereine: "Default sort" radio is in wrong column on table style settings.
-#783798 by dereine: GROUP BY can cause sort criteria to get incorrectly added to view.
-#357529 by nedjo, dddave, dagmar, dereine, yhahn, others: Implement plugin to handle translations of views configuration data.
-#983606 by jonathan1055: Breadcrumb disappears on bulk export results.
-#945034 by das-peter: Allow any kind of build_mode for node row style.
-#936196 by rszrama, das-peter, bojanz, dereine: Fix some bugs with the fieldapi field handler.
-#983272 by bojanz: Support click sorting for Field API fields.
-by dereine: Fix error in plugin_default_taxonomy_tid.
-#974542 by dereine: Use the same signature for pre_render in every handler.
-#988490 by dereine: Fix global view result counter.
-#740686 by dereine, dagmar: Integrate the functionality of Semantic Views (though it takes a significantly diffrent form).
-#988726 by yhahn: Use taxonomy_term_data 'format' column for description field.
-#988520 by dereine: Fix sql of date handler for offset.
-#952636 by yhahn, jmiccolis, dagmar, dereine: Support string format identifiers.
-#960810: Fixed merge error of semantic views patch.
-#769458 by anrikun: Fix double encoding of alt/title text on link rewriting.
-#318944 by dereine: Prevent warning in table view when user has no permission to view any fields.
-#416178 by dereine: Profile field checkboxes did not properly filter false values.
-#949526 by dereine: External database not used.
-#913688 by dereine: Fix feed icon path.
-#768802 by dereine: Allow sort by node language.
-#600742 by dagmar: Allow displays to be disabled.
-reported by swentel: Remove left over debugging dsm.
-#468484 by dereine: Filter by unread not relationship safe.
-#833790 redux by dereine: Make sure field actually exists.
-#607942 by dashton: Support "rel" attribute in link rewriting.
-#994014 by idflood: Add missing semicolon to node translation link handler.
-#909886: -Any- option shows up on boolean exposed filters even when not optional.
-#972934 by dereine: Fix sql of subquery of comment_user_uid argument handler.
-Follow up #607942, use ctools_dependent_process.
-#817360 by John Morahan: Have Analyze button warn if view has no access control.
-#898990 by dereine: Fix bad SQL generated on related terms relationship if no vocabularies selected.
-#833220 by dereine: Properly validate value on date filter.
-#910256 by dagmar: Add an - All - option to exposed items per page.
-#779668 by esteewhy: Fix not technically valid use of break statements.
-#909332 by dereine: Add col-first and col-last classes to grid style.
-#989092 by dereine: Semantic views integration broke grid view a little.
-#868972 by dereine: Add a "summary" attribute for accessibility on table and grid styles.
-#992174 by dereine: Add missing field handler aggregator_xss in the views.info file.
-by dereine: Fix fatal error in the field term_node_tid handler.
-#994856 by dereine: Replace views dependecy with ctools... again.
-by dereine: Replace _fake_instance in field field handler with a ctools helper function.
-#996634 by das-peter: Add missing rel to option_definition of the field handler.
-#610418 by joachim: Add handler descriptions to handler edit forms.
-#368687 by dereine: Allow a relationship from node revision to master node.
-#759082 by dereine: Prevent invalid argument warning with no relationships.
-#946368 by dereine: User argument default ignoring node author checkbox in some cases.
-#867636 by chromix: Give jump menu an option to set default value to current path.
-#997772 by dereine: Fix node_view_analyze by using dbtng and d7 role_permission database schema.
-#998278 by dereine: Update field.views.inc based on #986992.
-#998400 by das-peter: Use vocabulary in "term name converted to term id".
-#785036 by dereine and bojanz: Properly validate display IDs.
-#958312 by tim.plunkett: Exports could have extraneous whitespace when exported from other modules like features.
-#927270 by Cyberwolf: Allow the "options callback" for the in_operator filter handler to also have an "options argument" in the definition.
-#497936: Profile fields with dashes in their names cause bad queries.
-#608926 by Longwave: Remove unused theme("nodate") functionality.
-#993002 by alex_b, dereine: Fix notice in views_plugin_display_page.inc.
-#1000044 by pivica: Fix notice for element_type in some field handlers.
-#984390 by yhahn: Fix full pager variables.
-#972620 by dereine: Add an administrative title field for all handlers to make it more possible to distinguish similar fields from each other in the UI.
-#627378: Allow specifying that your module provides specialized views templates via hook_views_api.
-#627378 follow up: Remove debug calls.
-#1001442 by dboulet: Add classes/title text to contextual links.
-#999042 by bojanz: Remove the option to use the site mission for the RSS feed description, because drupal doesn't have this field anymore.
-#985602 by bblake, bojanz, dereine: Support slave server.
-by dereine: Fix views.info file.
-#987478 by bojanz: Let field field handler properly handle field language.
-#1002060 by troky: COMMENT_NODE_* constants have new names
-#996306 by alex_b: Respect 'edit terms in ' settings
-#987478 by bojanz: Fix some more edge cases in field field handler.
-#1003034 by das-peter: Use preg_slit instead of split.
-#905712 by dagmar: Add Published/Not published as text options to published field.
-#816354 by dereine: Provide a field to create administrative comments on displays.
-#1004596 by pillarsdotnet: Wrong usage of theme('image'...) in contact field handler.
-#1006088 by aspilicious: Remove unneeded files from .info file.
-#1005662 by troky: Change original hook to base hook in views hook_theme.
-#808016 by dereine: Clarify short/medium/long date formats.
-#829928 by gordon: Allow strip tags to get a list of tags to keep.
-#1004538 by ngmaloney, bojanz: Support timestamps before 1970 in views date sql.
-#522318 by dereine: Provide a "human readable" name for all Views.
-#1003112 by ralf: Add configure line to views_ui.info
-#118672: Allow an OR in filters by adding groups in the filter UI.
-by dereine: Add a test for field math, and fix the field math :)
-#1007036 by bojanz: Fix Node: Has new content filter.
-by dereine: Add a test for filter equality.
-by dereine: Add a test for field counter.
-#1007036 by dereine: Fix join condition for Node: Has new content filter.
-by dereine: Fix tests for detecting module template files.
-#1007730 by bojanz, merlinofchaos, dereine: Fix views_handler_filter_string, add tests and add a general placeholder method.
-#1006644 by bojanz, dereine: Allow field field handler to work with users.
-#759082 by dereine: Fix whitescreen due to incorrect relationship loop code.
-by dereine: Remove old comment about select::countQuery.
-#863478 by damz, dereine: Allow basic distinct support.
-#667950 by bec : Remove workaround for filter_numeric dependency.
-#1011266 by sime: Fix whitescreen due to changes in #759082.
-#1011220 by aspilicious: Auto-Generate View's Machine-Readable Name.
-#1001542 by mikeytown2: view::set_display() has wrong return code when it fails.
-#1011220 follow-up: Add missing point on machine_name.
-#722330 by dereine: Views should include core version for updates.
-#1008706 by dereine: Convert placeholders to new api.
-#807616 by damz, dereine: Remove views_handler_sort_formula and add a short entry in api-upgrading.html
-#873238 follow up by dereine: Remove adding cookie.js all the time. Ajax loading works now.
-#591302 by yhahn: Update ajax_view.js for ajax framework.
-#972638 by bojanz: Mini pager hasn't been ported.
-#1011334 by dereine: Exposed filters without input broke sql.
-#990088 by yhahn: Fix taxonomy integration by changing vid to nid for taxonomy_index.
-#1007466 by aspilicious, dereine: Provide a api function for adding complex queries: add_where_expression, add_having_condition.
-#1008170 by dereine: Fix views_handler_filter_groupby_numeric by using add_having_expression.
-#1013170 by das-peter: Fix broken view::preview which was broken on #1001542.
-#644008 by Cyberwolf and dereine: Allow access plugins access to arguments.
-#997424 by dereine: Use drupal_add_library instead of drupal_add_js where it's possible.
-#992704 by solotandem, bojanz, dereine: support to groupby entity_id.
-#970514 by moshe, dereine: Provide basic drush integration for views.
-#1015306 by dereine: Fix index in field_field.
-by solotandem: Make a better description for the group_type field in groupby form.
-#1015856 by solotandem: Eliminate PHP notices related to recent groupby changes.
-#1016058 by dereine: Fix string contain all words.
-#940316 by merlinofchaos: Allow to rescan template files from non-current themes.
-by mikejoconnor, dereine: Fix notice for exporting view->core.
-#1002744 by bojanz: Use entity_load for fieldapi field handlers.
-#957206 by dereine: Add missing views.info entry for aggregator iid argument handler.
-#1002744 by bojanz: Refactor views_field_field by renaming some variables/comments.
-by dereine: Bring vpr and views_debug back.
-#955464 by dereine: Fix glossary and many to one mode handler.
-#1016430 by bojanz: fix two small bugs in field_field handler.
-by dereine: Add $view->version to all default views.
-#1006176 by das-peter, bojanz: Add support for field based translation.
diff --git a/kolab.org/www/drupal-7.15/sites/all/modules/views/css/views-admin.bartik.css b/kolab.org/www/drupal-7.15/sites/all/modules/views/css/views-admin.bartik.css
index 1d22ddd..c6f0692 100644
--- a/kolab.org/www/drupal-7.15/sites/all/modules/views/css/views-admin.bartik.css
+++ b/kolab.org/www/drupal-7.15/sites/all/modules/views/css/views-admin.bartik.css
@@ -67,6 +67,15 @@
background-color: #f6f6f6;
}
+.views-ui-dialog a {
+ color: #0071b3;
+}
+
+.views-ui-dialog a:hover,
+.views-ui-dialog a:focus {
+ color: #018fe2;
+}
+
/* @end */
/* @group CTools */
diff --git a/kolab.org/www/drupal-7.15/sites/all/modules/views/css/views-admin.seven.css b/kolab.org/www/drupal-7.15/sites/all/modules/views/css/views-admin.seven.css
index 6ebdbf1..d58bb1b 100644
--- a/kolab.org/www/drupal-7.15/sites/all/modules/views/css/views-admin.seven.css
+++ b/kolab.org/www/drupal-7.15/sites/all/modules/views/css/views-admin.seven.css
@@ -127,7 +127,8 @@ fieldset.fieldset-no-legend {
.dependent-options,
.dependent-options.form-item,
.form-item-options-expose-required,
-.form-item-options-expose-label {
+.form-item-options-expose-label,
+.form-item-options-expose-description {
margin-left: 1.5em;
}
@@ -139,7 +140,8 @@ fieldset.fieldset-no-legend {
.views-admin-dependent .dependent-options .form-type-select,
.views-admin-dependent .dependent-options .form-type-textfield,
.form-item-options-expose-required,
-.form-item-options-expose-label {
+.form-item-options-expose-label,
+.form-item-options-expose-description {
margin-bottom: 6px;
margin-top: 6px;
}
diff --git a/kolab.org/www/drupal-7.15/sites/all/modules/views/css/views-admin.theme.css b/kolab.org/www/drupal-7.15/sites/all/modules/views/css/views-admin.theme.css
index df45cdf..8611783 100644
--- a/kolab.org/www/drupal-7.15/sites/all/modules/views/css/views-admin.theme.css
+++ b/kolab.org/www/drupal-7.15/sites/all/modules/views/css/views-admin.theme.css
@@ -380,6 +380,7 @@ td.group-title {
text-transform: uppercase;
}
+.grouped-description,
.exposed-description {
float: left;
padding-top: 3px;
@@ -433,6 +434,10 @@ td.group-title {
padding: 3px 9px;
}
+.views-display-top #views-display-top {
+ max-width: 180px;
+}
+
/* @end */
/* @group Attachment details tabs
@@ -440,6 +445,18 @@ td.group-title {
* The tabs that switch between sections
*/
+ul#views-display-menu-tabs {
+ margin-right: 200px;
+}
+
+ul#views-display-menu-tabs li {
+ margin-bottom: 5px;
+}
+
+ul#views-display-menu-tabs li.add ul.action-list li{
+ margin: 0;
+}
+
.views-displays .secondary a {
border: 1px solid #cbcbcb;
display: inline-block;
@@ -448,6 +465,15 @@ td.group-title {
padding: 3px 7px;
}
+/**
+ * Display a red border if the display doesn't validate.
+ */
+.views-displays ul.secondary li.active a.active.error,
+.views-displays .secondary a.error {
+ border: 2px solid #ED541D;
+ padding: 1px 6px;
+}
+
.views-displays .secondary a:focus {
outline: none;
}
@@ -907,7 +933,8 @@ td.group-title {
/* @group Expose filter form items */
.form-item-options-expose-required,
-.form-item-options-expose-label {
+.form-item-options-expose-label,
+.form-item-options-expose-description {
margin-bottom: 6px;
margin-left: 18px;
margin-top: 6px;
diff --git a/kolab.org/www/drupal-7.15/sites/all/modules/views/docs/views.api.php b/kolab.org/www/drupal-7.15/sites/all/modules/views/docs/views.api.php
deleted file mode 100644
index d99ecc4..0000000
--- a/kolab.org/www/drupal-7.15/sites/all/modules/views/docs/views.api.php
+++ /dev/null
@@ -1,761 +0,0 @@
-<?php
-/**
- * @file
- * This file contains no working PHP code; it exists to provide additional documentation
- * for doxygen as well as to document hooks in the standard Drupal manner.
- */
-
-/**
- * @mainpage Views 2 API Manual
- *
- * Much of this information is actually stored in the advanced help; please
- * check the API topic. This help will primarily be aimed at documenting
- * classes and function calls.
- *
- * An online version of the advanced help API documentation is available from:
- * @link http://views-help.doc.logrus.com/help/views/api @endlink
- *
- * Topics:
- * - @ref view_lifetime
- * - @ref views_hooks
- * - @ref views_handlers
- * - @ref views_plugins
- * - @ref views_templates
- */
-
-/**
- * @page view_lifetime The life of a view
- *
- * This page explains the basic cycle of a view and what processes happen.
- */
-
-/**
- * @page views_handlers About Views' handlers
- *
- * This page explains what views handlers are, how they're written, and what
- * the basic conventions are.
- *
- * - @ref views_field_handlers
- * - @ref views_sort_handlers
- * - @ref views_filter_handlers
- * - @ref views_argument_handlers
- * - @ref views_relationship_handlers
- */
-
-/**
- * @page views_plugins About Views' plugins
- *
- * This page explains what views plugins are, how they're written, and what
- * the basic conventions are.
- *
- * - @ref views_display_plugins
- * - @ref views_style_plugins
- * - @ref views_row_plugins
- */
-
-/**
- * @defgroup views_hooks Views' hooks
- * @{
- * Hooks that can be implemented by other modules in order to implement the
- * Views API.
- */
-
-/**
- * Describe table structure to Views.
- *
- * This hook should be placed in MODULENAME.views.inc and it will be auto-loaded.
- * MODULENAME.views.inc must be in the directory specified by the 'path' key
- * returned by MODULENAME_views_api(), or the same directory as the .module
- * file, if 'path' is unspecified.
- *
- * The full documentation for this hook is in the advanced help.
- * @link http://views-help.doc.logrus.com/help/views/api-tables @endlink
- */
-function hook_views_data() {
- // This example describes how to write hook_views_data() for the following
- // table:
- //
- // CREATE TABLE example_table (
- // nid INT(11) NOT NULL COMMENT 'Primary key; refers to {node}.nid.',
- // plain_text_field VARCHAR(32) COMMENT 'Just a plain text field.',
- // numeric_field INT(11) COMMENT 'Just a numeric field.',
- // boolean_field INT(1) COMMENT 'Just an on/off field.',
- // timestamp_field INT(8) COMMENT 'Just a timestamp field.',
- // PRIMARY KEY(nid)
- // );
-
- // The 'group' index will be used as a prefix in the UI for any of this
- // table's fields, sort criteria, etc. so it's easy to tell where they came
- // from.
- $data['example_table']['table']['group'] = t('Example table');
-
- // Define this as a base table. In reality this is not very useful for
- // this table, as it isn't really a distinct object of its own, but
- // it makes a good example.
- $data['example_table']['table']['base'] = array(
- 'field' => 'nid',
- 'title' => t('Example table'),
- 'help' => t("Example table contains example content and can be related to nodes."),
- 'weight' => -10,
- );
-
- // This table references the {node} table.
- // This creates an 'implicit' relationship to the node table, so that when 'Node'
- // is the base table, the fields are automatically available.
- $data['example_table']['table']['join'] = array(
- // Index this array by the table name to which this table refers.
- // 'left_field' is the primary key in the referenced table.
- // 'field' is the foreign key in this table.
- 'node' => array(
- 'left_field' => 'nid',
- 'field' => 'nid',
- ),
- );
-
- // Next, describe each of the individual fields in this table to Views. For
- // each field, you may define what field, sort, argument, and/or filter
- // handlers it supports. This will determine where in the Views interface you
- // may use the field.
-
- // Node ID field.
- $data['example_table']['nid'] = array(
- 'title' => t('Example content'),
- 'help' => t('Some example content that references a node.'),
- // Because this is a foreign key to the {node} table. This allows us to
- // have, when the view is configured with this relationship, all the fields
- // for the related node available.
- 'relationship' => array(
- 'base' => 'node',
- 'field' => 'nid',
- 'handler' => 'views_handler_relationship',
- 'label' => t('Example node'),
- ),
- );
-
- // Example plain text field.
- $data['example_table']['plain_text_field'] = array(
- 'title' => t('Plain text field'),
- 'help' => t('Just a plain text field.'),
- 'field' => array(
- 'handler' => 'views_handler_field',
- 'click sortable' => TRUE,
- ),
- 'sort' => array(
- 'handler' => 'views_handler_sort',
- ),
- 'filter' => array(
- 'handler' => 'views_handler_filter_string',
- ),
- 'argument' => array(
- 'handler' => 'views_handler_argument_string',
- ),
- );
-
- // Example numeric text field.
- $data['example_table']['numeric_field'] = array(
- 'title' => t('Numeric field'),
- 'help' => t('Just a numeric field.'),
- 'field' => array(
- 'handler' => 'views_handler_field_numeric',
- 'click sortable' => TRUE,
- ),
- 'filter' => array(
- 'handler' => 'views_handler_filter_numeric',
- ),
- 'sort' => array(
- 'handler' => 'views_handler_sort',
- ),
- );
-
- // Example boolean field.
- $data['example_table']['boolean_field'] = array(
- 'title' => t('Boolean field'),
- 'help' => t('Just an on/off field.'),
- 'field' => array(
- 'handler' => 'views_handler_field_boolean',
- 'click sortable' => TRUE,
- ),
- 'filter' => array(
- 'handler' => 'views_handler_filter_boolean_operator',
- 'label' => t('Published'),
- 'type' => 'yes-no',
- // use boolean_field = 1 instead of boolean_field <> 0 in WHERE statment
- 'use equal' => TRUE,
- ),
- 'sort' => array(
- 'handler' => 'views_handler_sort',
- ),
- );
-
- // Example timestamp field.
- $data['example_table']['timestamp_field'] = array(
- 'title' => t('Timestamp field'),
- 'help' => t('Just a timestamp field.'),
- 'field' => array(
- 'handler' => 'views_handler_field_date',
- 'click sortable' => TRUE,
- ),
- 'sort' => array(
- 'handler' => 'views_handler_sort_date',
- ),
- 'filter' => array(
- 'handler' => 'views_handler_filter_date',
- ),
- );
-
- return $data;
-}
-
-/**
- * Alter table structure.
- *
- * You can add/edit/remove to existing tables defined by hook_views_data().
- *
- * This hook should be placed in MODULENAME.views.inc and it will be auto-loaded.
- * MODULENAME.views.inc must be in the directory specified by the 'path' key
- * returned by MODULENAME_views_api(), or the same directory as the .module
- * file, if 'path' is unspecified.
- *
- * The full documentation for this hook is in the advanced help.
- * @link http://views-help.doc.logrus.com/help/views/api-tables @endlink
- */
-function hook_views_data_alter(&$data) {
- // This example alters the title of the node: nid field for the admin.
- $data['node']['nid']['title'] = t('Node-Nid');
-
- // This example adds a example field to the users table
- $data['users']['example_field'] = array(
- 'title' => t('Example field'),
- 'help' => t('Some examüple content that references a user'),
- 'handler' => 'hook_handlers_field_example_field',
- );
-
- // This example changes the handler of the node title field.
- // In this handler you could do stuff, like preview of the node, when clicking the node title.
-
- $data['node']['title']['handler'] = 'modulename_handlers_field_node_title';
-}
-
-
-/**
- * The full documentation for this hook is now in the advanced help.
- *
- * This hook should be placed in MODULENAME.views.inc and it will be auto-loaded.
- * MODULENAME.views.inc must be in the directory specified by the 'path' key
- * returned by MODULENAME_views_api(), or the same directory as the .module
- * file, if 'path' is unspecified.
- *
- * This is a stub list as a reminder that this needs to be doc'd and is not used
- * in views anywhere so might not be remembered when this is formally documented:
- * - style: 'even empty'
- */
-function hook_views_plugins() {
- // example code here
-}
-
-/**
- * Alter existing plugins data, defined by modules.
- */
-function hook_views_plugins_alter(&$plugins) {
- // Add apachesolr to the base of the node row plugin.
- $plugins['row']['node']['base'][] = 'apachesolr';
-}
-
-/**
- * Register View API information. This is required for your module to have
- * its include files loaded; for example, when implementing
- * hook_views_default_views().
- *
- * @return
- * An array with the following possible keys:
- * - api: (required) The version of the Views API the module implements.
- * - path: (optional) If includes are stored somewhere other than within
- * the root module directory, specify its path here.
- * - template path: (optional) A path where the module has stored it's views template files.
- * When you have specificed this key views automatically uses the template files for the views.
- * You can use the same naming conventions like for normal views template files.
- */
-function hook_views_api() {
- return array(
- 'api' => 3,
- 'path' => drupal_get_path('module', 'example') . '/includes/views',
- 'template path' => drupal_get_path('module', 'example') . 'themes',
- );
-}
-
-/**
- * This hook allows modules to provide their own views which can either be used
- * as-is or as a "starter" for users to build from.
- *
- * This hook should be placed in MODULENAME.views_default.inc and it will be
- * auto-loaded. MODULENAME.views_default.inc must be in the directory specified
- * by the 'path' key returned by MODULENAME_views_api(), or the same directory
- * as the .module file, if 'path' is unspecified.
- *
- * The $view->disabled boolean flag indicates whether the View should be
- * enabled or disabled by default.
- *
- * @return
- * An associative array containing the structures of views, as generated from
- * the Export tab, keyed by the view name. A best practice is to go through
- * and add t() to all title and label strings, with the exception of menu
- * strings.
- */
-function hook_views_default_views() {
- // Begin copy and paste of output from the Export tab of a view.
- $view = new view;
- $view->name = 'frontpage';
- $view->description = t('Emulates the default Drupal front page; you may set the default home page path to this view to make it your front page.');
- $view->tag = t('default');
- $view->base_table = 'node';
- $view->api_version = 2;
- $view->disabled = FALSE; // Edit this to true to make a default view disabled initially
- $view->display = array();
- $display = new views_display;
- $display->id = 'default';
- $display->display_title = t('Master');
- $display->display_plugin = 'default';
- $display->position = '1';
- $display->display_options = array (
- 'style_plugin' => 'default',
- 'style_options' =>
- array (
- ),
- 'row_plugin' => 'node',
- 'row_options' =>
- array (
- 'teaser' => 1,
- 'links' => 1,
- ),
- 'relationships' =>
- array (
- ),
- 'fields' =>
- array (
- ),
- 'sorts' =>
- array (
- 'sticky' =>
- array (
- 'id' => 'sticky',
- 'table' => 'node',
- 'field' => 'sticky',
- 'order' => 'ASC',
- ),
- 'created' =>
- array (
- 'id' => 'created',
- 'table' => 'node',
- 'field' => 'created',
- 'order' => 'ASC',
- 'relationship' => 'none',
- 'granularity' => 'second',
- ),
- ),
- 'arguments' =>
- array (
- ),
- 'filters' =>
- array (
- 'promote' =>
- array (
- 'id' => 'promote',
- 'table' => 'node',
- 'field' => 'promote',
- 'operator' => '=',
- 'value' => '1',
- 'group' => 0,
- 'exposed' => false,
- 'expose' =>
- array (
- 'operator' => false,
- 'label' => '',
- ),
- ),
- 'status' =>
- array (
- 'id' => 'status',
- 'table' => 'node',
- 'field' => 'status',
- 'operator' => '=',
- 'value' => '1',
- 'group' => 0,
- 'exposed' => false,
- 'expose' =>
- array (
- 'operator' => false,
- 'label' => '',
- ),
- ),
- ),
- 'items_per_page' => 10,
- 'use_pager' => '1',
- 'pager_element' => 0,
- 'title' => '',
- 'header' => '',
- 'header_format' => '1',
- 'footer' => '',
- 'footer_format' => '1',
- 'empty' => '',
- 'empty_format' => '1',
- );
- $view->display['default'] = $display;
- $display = new views_display;
- $display->id = 'page';
- $display->display_title = t('Page');
- $display->display_plugin = 'page';
- $display->position = '2';
- $display->display_options = array (
- 'defaults' =>
- array (
- 'access' => true,
- 'title' => true,
- 'header' => true,
- 'header_format' => true,
- 'header_empty' => true,
- 'footer' => true,
- 'footer_format' => true,
- 'footer_empty' => true,
- 'empty' => true,
- 'empty_format' => true,
- 'items_per_page' => true,
- 'offset' => true,
- 'use_pager' => true,
- 'pager_element' => true,
- 'link_display' => true,
- 'php_arg_code' => true,
- 'exposed_options' => true,
- 'style_plugin' => true,
- 'style_options' => true,
- 'row_plugin' => true,
- 'row_options' => true,
- 'relationships' => true,
- 'fields' => true,
- 'sorts' => true,
- 'arguments' => true,
- 'filters' => true,
- 'use_ajax' => true,
- 'distinct' => true,
- ),
- 'relationships' =>
- array (
- ),
- 'fields' =>
- array (
- ),
- 'sorts' =>
- array (
- ),
- 'arguments' =>
- array (
- ),
- 'filters' =>
- array (
- ),
- 'path' => 'frontpage',
- );
- $view->display['page'] = $display;
- $display = new views_display;
- $display->id = 'feed';
- $display->display_title = t('Feed');
- $display->display_plugin = 'feed';
- $display->position = '3';
- $display->display_options = array (
- 'defaults' =>
- array (
- 'access' => true,
- 'title' => false,
- 'header' => true,
- 'header_format' => true,
- 'header_empty' => true,
- 'footer' => true,
- 'footer_format' => true,
- 'footer_empty' => true,
- 'empty' => true,
- 'empty_format' => true,
- 'use_ajax' => true,
- 'items_per_page' => true,
- 'offset' => true,
- 'use_pager' => true,
- 'pager_element' => true,
- 'use_more' => true,
- 'distinct' => true,
- 'link_display' => true,
- 'php_arg_code' => true,
- 'exposed_options' => true,
- 'style_plugin' => false,
- 'style_options' => false,
- 'row_plugin' => false,
- 'row_options' => false,
- 'relationships' => true,
- 'fields' => true,
- 'sorts' => true,
- 'arguments' => true,
- 'filters' => true,
- ),
- 'relationships' =>
- array (
- ),
- 'fields' =>
- array (
- ),
- 'sorts' =>
- array (
- ),
- 'arguments' =>
- array (
- ),
- 'filters' =>
- array (
- ),
- 'displays' =>
- array (
- 'default' => 'default',
- 'page' => 'page',
- ),
- 'style_plugin' => 'rss',
- 'style_options' =>
- array (
- 'description' => '',
- ),
- 'row_plugin' => 'node_rss',
- 'row_options' =>
- array (
- 'item_length' => 'default',
- ),
- 'path' => 'rss.xml',
- 'title' => t('Front page feed'),
- );
- $view->display['feed'] = $display;
- // End copy and paste of Export tab output.
-
- // Add view to list of views to provide.
- $views[$view->name] = $view;
-
- // ...Repeat all of the above for each view the module should provide.
-
- // At the end, return array of default views.
- return $views;
-}
-
-/**
- * Alter default views defined by other modules.
- *
- * This hook is called right before all default views are cached to the
- * database. It takes a keyed array of views by reference.
- *
- * Example usage to add a field to a view:
- * @code
- * $handler =& $view->display['DISPLAY_ID']->handler;
- * // Add the user name field to the view.
- * $handler->display->display_options['fields']['name']['id'] = 'name';
- * $handler->display->display_options['fields']['name']['table'] = 'users';
- * $handler->display->display_options['fields']['name']['field'] = 'name';
- * $handler->display->display_options['fields']['name']['label'] = 'Author';
- * $handler->display->display_options['fields']['name']['link_to_user'] = 1;
- * @endcode
- */
-function hook_views_default_views_alter(&$views) {
- if (isset($views['taxonomy_term'])) {
- $views['taxonomy_term']->display['default']->display_options['title'] = 'Categories';
- }
-}
-
-/**
- * Stub hook documentation
- */
-function hook_views_query_substitutions() {
- // example code here
-}
-
-/**
- * This hook is called to get a list of placeholders and their substitutions,
- * used when preprocessing a View with form elements.
- */
-function hook_views_form_substitutions() {
- return array(
- '<!--views-form-example-substitutions-->' => 'Example Substitution',
- );
-}
-
-/**
- * Views form (View with form elements) validate handler.
- * Called for all steps ($form_state['step']) of the multistep form.
- */
-function hook_views_form_validate($form, &$form_state) {
- // example code here
-}
-
-/**
- * Views form (View with form elements) submit handler.
- * Called for all steps ($form_state['step']) of the multistep form.
- */
-function hook_views_form_submit($form, &$form_state) {
- // example code here
-}
-
-/**
- * This hook is called at the very beginning of views processing,
- * before anything is done.
- *
- * Adding output to the view can be accomplished by placing text on
- * $view->attachment_before and $view->attachment_after.
- */
-function hook_views_pre_view(&$view, &$display_id, &$args) {
- // example code here
-}
-
-/**
- * This hook is called right before the build process, but after displays
- * are attached and the display performs its pre_execute phase.
- *
- * Adding output to the view can be accomplished by placing text on
- * $view->attachment_before and $view->attachment_after.
- */
-function hook_views_pre_build(&$view) {
- // example code here
-}
-
-/**
- * This hook is called right after the build process. The query is
- * now fully built, but it has not yet been run through db_rewrite_sql.
- *
- * Adding output to the view can be accomplished by placing text on
- * $view->attachment_before and $view->attachment_after.
- */
-function hook_views_post_build(&$view) {
- // example code here
-}
-
-/**
- * This hook is called right before the execute process. The query is
- * now fully built, but it has not yet been run through db_rewrite_sql.
- *
- * Adding output to the view can be accomplished by placing text on
- * $view->attachment_before and $view->attachment_after.
- */
-function hook_views_pre_execute(&$view) {
- // example code here
-}
-
-/**
- * This hook is called right after the execute process. The query has
- * been executed, but the pre_render() phase has not yet happened for
- * handlers.
- *
- * Adding output to the view can be accomplished by placing text on
- * $view->attachment_before and $view->attachment_after. Altering the
- * content can be achieved by editing the items of $view->result.
- */
-function hook_views_post_execute(&$view) {
- // example code here
-}
-
-/**
- * This hook is called right before the render process. The query has
- * been executed, and the pre_render() phase has already happened for
- * handlers, so all data should be available.
- *
- * Adding output to the view can be accomplished by placing text on
- * $view->attachment_before and $view->attachment_after. Altering the
- * content can be achieved by editing the items of $view->result.
- *
- * This hook can be utilized by themes.
- */
-function hook_views_pre_render(&$view) {
- // example code here
-}
-
-/**
- * Post process any rendered data.
- *
- * This can be valuable to be able to cache a view and still have some level of
- * dynamic output. In an ideal world, the actual output will include HTML
- * comment based tokens, and then the post process can replace those tokens.
- *
- * Example usage. If it is known that the view is a node view and that the
- * primary field will be a nid, you can do something like this:
- *
- * <!--post-FIELD-NID-->
- *
- * And then in the post render, create an array with the text that should
- * go there:
- *
- * strtr($output, array('<!--post-FIELD-1-->', 'output for FIELD of nid 1');
- *
- * All of the cached result data will be available in $view->result, as well,
- * so all ids used in the query should be discoverable.
- *
- * This hook can be utilized by themes.
- */
-function hook_views_post_render(&$view, &$output, &$cache) {
-
-}
-
-/**
- * Stub hook documentation
- *
- * This hook should be placed in MODULENAME.views.inc and it will be auto-loaded.
- * MODULENAME.views.inc must be in the directory specified by the 'path' key
- * returned by MODULENAME_views_api(), or the same directory as the .module
- * file, if 'path' is unspecified.
- *
- */
-function hook_views_query_alter(&$view, &$query) {
- // example code here
-}
-
-/**
- * This hook should be placed in MODULENAME.views.inc and it will be auto-loaded.
- * MODULENAME.views.inc must be in the directory specified by the 'path' key
- * returned by MODULENAME_views_api(), or the same directory as the .module
- * file, if 'path' is unspecified.
- *
- * Alter the rows that appear with a view preview, which include query and
- * performance statistics. $rows is an associative array with two keys:
- * - query: An array of rows suitable for theme('table'), containing information
- * about the query and the display title and path.
- * - statistics: An array of rows suitable for theme('table'), containing
- * performance statistics.
- *
- * Warning: $view is not a reference in PHP4 and cannot be modified here. But it IS
- * a reference in PHP5, and can be modified. Please be careful with it.
- *
- * @see theme_table
- */
-function hook_views_preview_info_alter(&$rows, $view) {
- // example code here
-}
-
-/**
- * This hooks allows to alter the links at the top of the view edit form.
- * Some modules might want to add links there.
- *
- * @param $links
- * The links which will be displayed at the top of the view edit form.
- * @param view $view
- * The full view object which is currently changed.
- * @param $display_id
- * The current display id which is edited. For example that's 'default' or 'page_1'.
- */
-function hook_views_ui_display_top_links_alter(&$links, $view, $display_id) {
- // example code here
-}
-
-/**
- * This hook allows to alter the commands which are used on a views ajax
- * request.
- *
- * @param $commands
- * An array of ajax commands
- * @param $view view
- * The view which is requested.
- */
-function hook_views_ajax_data_alter(&$commands, $view) {
-}
-
-
-
-/**
- * @}
- */
diff --git a/kolab.org/www/drupal-7.15/sites/all/modules/views/drush/views.drush.inc b/kolab.org/www/drupal-7.15/sites/all/modules/views/drush/views.drush.inc
index 4116d30..dd8af1b 100644
--- a/kolab.org/www/drupal-7.15/sites/all/modules/views/drush/views.drush.inc
+++ b/kolab.org/www/drupal-7.15/sites/all/modules/views/drush/views.drush.inc
@@ -1,10 +1,11 @@
<?php
+
/**
* @file
* Drush integration of views.
*
- * * drush cache-clear views - Clears the views specific caches.
- * * views-revert - Drush command to revert views overridden in the system.
+ * drush cache-clear views - Clears the views specific caches.
+ * views-revert - Drush command to revert views overridden in the system.
*/
/**
@@ -50,7 +51,7 @@ function views_drush_command() {
$items['views-dev'] = array(
'callback' => 'views_development_settings',
'drupal dependencies' => array('views'),
- 'description' => 'Setup the views settings to a more developer oriented value..',
+ 'description' => 'Set the Views settings to more developer-oriented values.',
'bootstrap' => DRUSH_BOOTSTRAP_DRUPAL_FULL,
'aliases' => array('vd'),
);
@@ -236,6 +237,7 @@ function views_development_settings() {
variable_set('views_ui_show_listing_filters', TRUE);
variable_set('views_ui_show_master_display', TRUE);
variable_set('views_ui_show_advanced_column', TRUE);
+ variable_set('views_ui_always_live_preview', FALSE);
variable_set('views_ui_always_live_preview_button', TRUE);
variable_set('views_ui_show_preview_information', TRUE);
variable_set('views_ui_show_sql_query', TRUE);
@@ -455,8 +457,8 @@ function drush_views_disable() {
_views_drush_changestatus($viewnames, TRUE);
}
-/*
-* Helper function to enable / disable views
+/**
+ * Helper function to enable / disable views
* @param $viewnames: array of viewnames to process
* @param $status: TRUE to disable or FALSE to enable the view
*/
@@ -481,8 +483,7 @@ function _views_drush_changestatus($viewnames = array(), $status = NULL) {
variable_set('views_defaults', $views_status);
views_invalidate_cache();
drush_log(dt("Views cache was cleared"), 'ok');
- menu_rebuild();
- drush_log(dt("Menu cache was cleared"), 'ok');
+ drush_log(dt("Menu cache is set to be rebuilt on the next request."), 'ok');
}
}
}
diff --git a/kolab.org/www/drupal-7.15/sites/all/modules/views/handlers/views_handler_area.inc b/kolab.org/www/drupal-7.15/sites/all/modules/views/handlers/views_handler_area.inc
index 295e14d..9fed11c 100644
--- a/kolab.org/www/drupal-7.15/sites/all/modules/views/handlers/views_handler_area.inc
+++ b/kolab.org/www/drupal-7.15/sites/all/modules/views/handlers/views_handler_area.inc
@@ -1,17 +1,37 @@
<?php
+
/**
* @file
* Views area handlers.
*/
/**
- * @defgroup views_area_handlers Views' area handlers
+ * @defgroup views_area_handlers Views area handlers
* @{
* Handlers to tell Views what can display in header, footer
* and empty text in a view.
*/
+/**
+ * Base class for area handlers.
+ *
+ * @ingroup views_area_handlers
+ */
class views_handler_area extends views_handler {
+
+ /**
+ * Overrides views_handler::init().
+ *
+ * Make sure that no result area handlers are set to be shown when the result
+ * is empty.
+ */
+ function init(&$view, &$options) {
+ parent::init($view, $options);
+ if ($this->handler_type == 'empty') {
+ $this->options['empty'] = TRUE;
+ }
+ }
+
/**
* Get this field's label.
*/
@@ -28,7 +48,7 @@ class views_handler_area extends views_handler {
$this->definition['field'] = !empty($this->definition['field']) ? $this->definition['field'] : '';
$label = !empty($this->definition['label']) ? $this->definition['label'] : $this->definition['field'];
$options['label'] = array('default' => $label, 'translatable' => TRUE);
- $options['empty'] = array('default' => 0, 'bool' => TRUE);
+ $options['empty'] = array('default' => FALSE, 'bool' => TRUE);
return $options;
}
diff --git a/kolab.org/www/drupal-7.15/sites/all/modules/views/handlers/views_handler_area_result.inc b/kolab.org/www/drupal-7.15/sites/all/modules/views/handlers/views_handler_area_result.inc
index a52aa8c..86b1849 100644
--- a/kolab.org/www/drupal-7.15/sites/all/modules/views/handlers/views_handler_area_result.inc
+++ b/kolab.org/www/drupal-7.15/sites/all/modules/views/handlers/views_handler_area_result.inc
@@ -2,13 +2,13 @@
/**
* @file
- * Contains views_handler_area_result handler.
+ * Definition of views_handler_area_result.
*/
/**
* Views area handler to display some configurable result summary.
*
- * @ingroup views_area_handlers Views' area handlers
+ * @ingroup views_area_handlers
*/
class views_handler_area_result extends views_handler_area {
@@ -33,6 +33,7 @@ class views_handler_area_result extends views_handler_area {
'@name -- the human-readable name of the view',
'@per_page -- the number of items per page',
'@current_page -- the current page number',
+ '@current_record_count -- the current page record count',
'@page_count -- the total page count',
),
);
@@ -61,7 +62,9 @@ class views_handler_area_result extends views_handler_area {
$current_page = (int) $this->view->get_current_page() + 1;
$per_page = (int) $this->view->get_items_per_page();
$count = count($this->view->result);
- $total = $this->view->total_rows;
+ // @TODO: Maybe use a possible is views empty functionality.
+ // Not every view has total_rows set, use view->result instead.
+ $total = isset($this->view->total_rows) ? $this->view->total_rows : count($this->view->result);
$name = check_plain($this->view->human_name);
if ($per_page === 0) {
$page_count = 1;
@@ -77,8 +80,9 @@ class views_handler_area_result extends views_handler_area {
$start = ($current_page - 1) * $per_page + 1;
$end = $total_count;
}
+ $current_record_count = ($end - $start) + 1;
// Get the search information.
- $items = array('start', 'end', 'total', 'name', 'per_page', 'current_page', 'page_count');
+ $items = array('start', 'end', 'total', 'name', 'per_page', 'current_page', 'current_record_count', 'page_count');
$replacements = array();
foreach ($items as $item) {
$replacements["@$item"] = ${$item};
@@ -90,4 +94,3 @@ class views_handler_area_result extends views_handler_area {
return $output;
}
}
-
diff --git a/kolab.org/www/drupal-7.15/sites/all/modules/views/handlers/views_handler_area_text.inc b/kolab.org/www/drupal-7.15/sites/all/modules/views/handlers/views_handler_area_text.inc
index 2b9adb3..d772786 100644
--- a/kolab.org/www/drupal-7.15/sites/all/modules/views/handlers/views_handler_area_text.inc
+++ b/kolab.org/www/drupal-7.15/sites/all/modules/views/handlers/views_handler_area_text.inc
@@ -2,20 +2,21 @@
/**
* @file
- * Contains views_handler_area_text handler.
+ * Definition of views_handler_area_text.
*/
/**
* Views area text handler.
- * @ingroup views_area_handlers Views' area handlers
-*/
+ *
+ * @ingroup views_area_handlers
+ */
class views_handler_area_text extends views_handler_area {
function option_definition() {
$options = parent::option_definition();
$options['content'] = array('default' => '', 'translatable' => TRUE, 'format_key' => 'format');
$options['format'] = array('default' => NULL);
- $options['tokenize'] = array('default' => FALSE);
+ $options['tokenize'] = array('default' => FALSE, 'bool' => TRUE);
return $options;
}
@@ -30,7 +31,7 @@ class views_handler_area_text extends views_handler_area {
'#wysiwyg' => FALSE,
);
-
+ // @TODO: Refactor token handling into a base class.
$form['tokenize'] = array(
'#type' => 'checkbox',
'#title' => t('Use replacement tokens from the first row'),
@@ -50,7 +51,7 @@ class views_handler_area_text extends views_handler_area {
}
if (!empty($options)) {
- $output = '<p>' . t('The following tokens are available. If you would like to have the characters %5B and %5D please use the html entity codes \'%5B\' or \'%5D\' or they will get replaced with empty space.)' . '</p>');
+ $output = '<p>' . t('The following tokens are available. If you would like to have the characters \'[\' and \']\' please use the html entity codes \'%5B\' or \'%5D\' or they will get replaced with empty space.' . '</p>');
foreach (array_keys($options) as $type) {
if (!empty($options[$type])) {
$items = array();
@@ -106,5 +107,4 @@ class views_handler_area_text extends views_handler_area {
return check_markup($value, $format, '', FALSE);
}
}
-
}
diff --git a/kolab.org/www/drupal-7.15/sites/all/modules/views/handlers/views_handler_area_text_custom.inc b/kolab.org/www/drupal-7.15/sites/all/modules/views/handlers/views_handler_area_text_custom.inc
new file mode 100644
index 0000000..3627f0c
--- /dev/null
+++ b/kolab.org/www/drupal-7.15/sites/all/modules/views/handlers/views_handler_area_text_custom.inc
@@ -0,0 +1,56 @@
+<?php
+
+/**
+ * @file
+ * Definition of views_handler_area_text_custom.
+ */
+
+/**
+ * Views area text custom handler.
+ *
+ * @ingroup views_area_handlers
+ */
+class views_handler_area_text_custom extends views_handler_area_text {
+
+ function option_definition() {
+ $options = parent::option_definition();
+ unset($options['format']);
+ return $options;
+ }
+
+ function options_form(&$form, &$form_state) {
+ parent::options_form($form, $form_state);
+
+ // Alter the form element, to be a regular text area.
+ $form['content']['#type'] = 'textarea';
+ unset($form['content']['#format']);
+ unset($form['content']['#wysiwyg']);
+
+ // @TODO: Use the token refactored base class.
+ }
+
+ // Empty, so we don't inherit options_submit from the parent.
+ function options_submit(&$form, &$form_state) {
+ }
+
+ function render($empty = FALSE) {
+ if (!$empty || !empty($this->options['empty'])) {
+ return $this->render_textarea_custom($this->options['content']);
+ }
+
+ return '';
+ }
+
+ /**
+ * Render a text area with filter_xss_admin.
+ */
+ function render_textarea_custom($value) {
+ if ($value) {
+ if ($this->options['tokenize']) {
+ $value = $this->view->style_plugin->tokenize_value($value, 0);
+ }
+ return $this->sanitize_value($value, 'xss_admin');
+ }
+ }
+
+}
diff --git a/kolab.org/www/drupal-7.15/sites/all/modules/views/handlers/views_handler_area_view.inc b/kolab.org/www/drupal-7.15/sites/all/modules/views/handlers/views_handler_area_view.inc
index b8fad3f..45ea499 100644
--- a/kolab.org/www/drupal-7.15/sites/all/modules/views/handlers/views_handler_area_view.inc
+++ b/kolab.org/www/drupal-7.15/sites/all/modules/views/handlers/views_handler_area_view.inc
@@ -2,8 +2,9 @@
/**
* @file
- * Contains views_handler_area_view handler.
+ * Definition of views_handler_area_view.
*/
+
/**
* Views area handlers. Insert a view inside of an area.
*
@@ -15,7 +16,7 @@ class views_handler_area_view extends views_handler_area {
$options = parent::option_definition();
$options['view_to_insert'] = array('default' => '');
- $options['inherit_arguments'] = array('default' => FALSE, 'boolean' => TRUE);
+ $options['inherit_arguments'] = array('default' => FALSE, 'bool' => TRUE);
return $options;
}
@@ -29,7 +30,7 @@ class views_handler_area_view extends views_handler_area {
$view_display = $this->view->name . ':' . $this->view->current_display;
$options = array('' => t('-Select-'));
- $options += views_get_views_as_options(FALSE, 'all', $view_display);
+ $options += views_get_views_as_options(FALSE, 'all', $view_display, FALSE, TRUE);
$form['view_to_insert'] = array(
'#type' => 'select',
'#title' => t('View to insert'),
diff --git a/kolab.org/www/drupal-7.15/sites/all/modules/views/handlers/views_handler_argument.inc b/kolab.org/www/drupal-7.15/sites/all/modules/views/handlers/views_handler_argument.inc
index 72c07e2..42617e7 100644
--- a/kolab.org/www/drupal-7.15/sites/all/modules/views/handlers/views_handler_argument.inc
+++ b/kolab.org/www/drupal-7.15/sites/all/modules/views/handlers/views_handler_argument.inc
@@ -1,7 +1,13 @@
<?php
/**
- * @defgroup views_argument_handlers Handlers for arguments
+ * @file
+ * @todo.
+ */
+
+/**
+ * @defgroup views_argument_handlers Views argument handlers
+ * Handlers to tell Views how to contextually filter queries.
* @{
*/
@@ -79,6 +85,9 @@ class views_handler_argument extends views_handler {
$this->options['summary']['format'] = $options['style_plugin'];
}
+ // Setup default value.
+ $options['style_options'] = isset($options['style_options']) ? $options['style_options'] : array();
+
if (!isset($options['summary']['sort_order']) && !empty($options['default_action']) && $options['default_action'] == 'summary asc') {
$this->options['default_action'] = 'summary';
$this->options['summary']['sort_order'] = 'asc';
@@ -173,17 +182,17 @@ class views_handler_argument extends views_handler {
$options['exception'] = array(
'contains' => array(
'value' => array('default' => 'all'),
- 'title_enable' => array('default' => 0),
- 'title' => array('default' => t('All'), 'translatable' => TRUE),
+ 'title_enable' => array('default' => FALSE, 'bool' => TRUE),
+ 'title' => array('default' => 'All', 'translatable' => TRUE),
),
);
- $options['title_enable'] = array('default' => 0);
+ $options['title_enable'] = array('default' => FALSE, 'bool' => TRUE);
$options['title'] = array('default' => '', 'translatable' => TRUE);
- $options['breadcrumb_enable'] = array('default' => 0);
+ $options['breadcrumb_enable'] = array('default' => FALSE, 'bool' => TRUE);
$options['breadcrumb'] = array('default' => '', 'translatable' => TRUE);
$options['default_argument_type'] = array('default' => 'fixed', 'export' => 'export_plugin');
$options['default_argument_options'] = array('default' => array(), 'export' => FALSE);
- $options['default_argument_skip_url'] = array('default' => FALSE);
+ $options['default_argument_skip_url'] = array('default' => FALSE, 'bool' => TRUE);
$options['summary_options'] = array('default' => array(), 'export' => FALSE);
$options['summary'] = array(
'contains' => array(
@@ -192,7 +201,7 @@ class views_handler_argument extends views_handler {
'format' => array('default' => 'default_summary', 'export' => 'export_summary'),
),
);
- $options['specify_validation'] = array('default' => 0);
+ $options['specify_validation'] = array('default' => FALSE, 'bool' => TRUE);
$options['validate'] = array(
'contains' => array(
'type' => array('default' => 'none', 'export' => 'export_validation'),
@@ -371,6 +380,7 @@ class views_handler_argument extends views_handler {
'#prefix' => '<div id="edit-options-validate-options-' . $id . '-wrapper">',
'#suffix' => '</div>',
'#type' => 'item',
+ // Even if the plugin has no options add the key to the form_state.
'#input' => TRUE, // trick it into checking input to make #process run
'#dependency' => array(
'edit-options-specify-validation' => array('1'),
@@ -507,6 +517,11 @@ class views_handler_argument extends views_handler {
'method' => 'default_empty',
'breadcrumb' => TRUE, // generate a breadcrumb to here
),
+ 'access denied' => array(
+ 'title' => t('Display "Access Denied"'),
+ 'method' => 'default_access_denied',
+ 'breadcrumb' => FALSE, // generate a breadcrumb to here
+ ),
);
if ($this->view->display_handler->has_path()) {
@@ -565,6 +580,8 @@ class views_handler_argument extends views_handler {
'#suffix' => '</div>',
'#id' => 'edit-options-argument-default-options-' . $id,
'#type' => 'item',
+ // Even if the plugin has no options add the key to the form_state.
+ '#input' => TRUE,
'#dependency' => array(
'radio:options[default_action]' => array('default'),
'edit-options-default-argument-type' => array($id)
@@ -707,6 +724,17 @@ class views_handler_argument extends views_handler {
}
/**
+ * Default action: access denied.
+ *
+ * If an argument was expected and was not given, in this case, report
+ * the view as 'access denied'.
+ */
+ function default_access_denied() {
+ $this->view->build_info['denied'] = TRUE;
+ return FALSE;
+ }
+
+ /**
* Default action: empty
*
* If an argument was expected and was not given, in this case, display
diff --git a/kolab.org/www/drupal-7.15/sites/all/modules/views/handlers/views_handler_argument_date.inc b/kolab.org/www/drupal-7.15/sites/all/modules/views/handlers/views_handler_argument_date.inc
index 7ed4b03..6803c36 100644
--- a/kolab.org/www/drupal-7.15/sites/all/modules/views/handlers/views_handler_argument_date.inc
+++ b/kolab.org/www/drupal-7.15/sites/all/modules/views/handlers/views_handler_argument_date.inc
@@ -1,4 +1,10 @@
<?php
+
+/**
+ * @file
+ * Definition of views_handler_argument_date.
+ */
+
/**
* Abstract argument handler for dates.
*
@@ -12,7 +18,8 @@
* - many to one: If true, the "many to one" helper will be used.
* - invalid input: A string to give to the user for obviously invalid input.
* This is deprecated in favor of argument validators.
- * @see views_many_to_one_helper
+ *
+ * @see views_many_to_one_helper()
*
* @ingroup views_argument_handlers
*/
diff --git a/kolab.org/www/drupal-7.15/sites/all/modules/views/handlers/views_handler_argument_formula.inc b/kolab.org/www/drupal-7.15/sites/all/modules/views/handlers/views_handler_argument_formula.inc
index c4287be..76f5991 100644
--- a/kolab.org/www/drupal-7.15/sites/all/modules/views/handlers/views_handler_argument_formula.inc
+++ b/kolab.org/www/drupal-7.15/sites/all/modules/views/handlers/views_handler_argument_formula.inc
@@ -1,4 +1,10 @@
<?php
+
+/**
+ * @file
+ * Definition of views_handler_argument_formula.
+ */
+
/**
* Abstract argument handler for simple formulae.
*
diff --git a/kolab.org/www/drupal-7.15/sites/all/modules/views/handlers/views_handler_argument_group_by_numeric.inc b/kolab.org/www/drupal-7.15/sites/all/modules/views/handlers/views_handler_argument_group_by_numeric.inc
index 2ecccaf..aa522ea 100644
--- a/kolab.org/www/drupal-7.15/sites/all/modules/views/handlers/views_handler_argument_group_by_numeric.inc
+++ b/kolab.org/www/drupal-7.15/sites/all/modules/views/handlers/views_handler_argument_group_by_numeric.inc
@@ -1,6 +1,11 @@
<?php
/**
+ * @file
+ * Definition of views_handler_argument_group_by_numeric.
+ */
+
+/**
* Simple handler for arguments using group by.
*
* @ingroup views_argument_handlers
diff --git a/kolab.org/www/drupal-7.15/sites/all/modules/views/handlers/views_handler_argument_many_to_one.inc b/kolab.org/www/drupal-7.15/sites/all/modules/views/handlers/views_handler_argument_many_to_one.inc
index 1f5229e..3446760 100644
--- a/kolab.org/www/drupal-7.15/sites/all/modules/views/handlers/views_handler_argument_many_to_one.inc
+++ b/kolab.org/www/drupal-7.15/sites/all/modules/views/handlers/views_handler_argument_many_to_one.inc
@@ -1,4 +1,10 @@
<?php
+
+/**
+ * @file
+ * Definition of views_handler_argument_many_to_one.
+ */
+
/**
* An argument handler for use in fields that have a many to one relationship
* with the table(s) to the left. This adds a bunch of options that are
@@ -26,11 +32,11 @@ class views_handler_argument_many_to_one extends views_handler_argument {
$options = parent::option_definition();
if (!empty($this->definition['numeric'])) {
- $options['break_phrase'] = array('default' => FALSE);
+ $options['break_phrase'] = array('default' => FALSE, 'bool' => TRUE);
}
- $options['add_table'] = array('default' => FALSE);
- $options['require_value'] = array('default' => FALSE);
+ $options['add_table'] = array('default' => FALSE, 'bool' => TRUE);
+ $options['require_value'] = array('default' => FALSE, 'bool' => TRUE);
if (isset($this->helper)) {
$this->helper->option_definition($options);
diff --git a/kolab.org/www/drupal-7.15/sites/all/modules/views/handlers/views_handler_argument_null.inc b/kolab.org/www/drupal-7.15/sites/all/modules/views/handlers/views_handler_argument_null.inc
index e4804dc..5b42728 100644
--- a/kolab.org/www/drupal-7.15/sites/all/modules/views/handlers/views_handler_argument_null.inc
+++ b/kolab.org/www/drupal-7.15/sites/all/modules/views/handlers/views_handler_argument_null.inc
@@ -1,4 +1,10 @@
<?php
+
+/**
+ * @file
+ * Definition of views_handler_argument_null.
+ */
+
/**
* Argument handler that ignores the argument.
*
@@ -7,7 +13,7 @@
class views_handler_argument_null extends views_handler_argument {
function option_definition() {
$options = parent::option_definition();
- $options['must_not_be'] = array('default' => FALSE);
+ $options['must_not_be'] = array('default' => FALSE, 'bool' => TRUE);
return $options;
}
diff --git a/kolab.org/www/drupal-7.15/sites/all/modules/views/handlers/views_handler_argument_numeric.inc b/kolab.org/www/drupal-7.15/sites/all/modules/views/handlers/views_handler_argument_numeric.inc
index 5b91232..8f36b21 100644
--- a/kolab.org/www/drupal-7.15/sites/all/modules/views/handlers/views_handler_argument_numeric.inc
+++ b/kolab.org/www/drupal-7.15/sites/all/modules/views/handlers/views_handler_argument_numeric.inc
@@ -1,7 +1,8 @@
<?php
+
/**
* @file
- * Contains the numeric argument handler.
+ * Definition of views_handler_argument_numeric.
*/
/**
@@ -26,8 +27,8 @@ class views_handler_argument_numeric extends views_handler_argument {
function option_definition() {
$options = parent::option_definition();
- $options['break_phrase'] = array('default' => FALSE);
- $options['not'] = array('default' => FALSE);
+ $options['break_phrase'] = array('default' => FALSE, 'bool' => TRUE);
+ $options['not'] = array('default' => FALSE, 'bool' => TRUE);
return $options;
}
diff --git a/kolab.org/www/drupal-7.15/sites/all/modules/views/handlers/views_handler_argument_string.inc b/kolab.org/www/drupal-7.15/sites/all/modules/views/handlers/views_handler_argument_string.inc
index 45bdbab..dbb98fe 100644
--- a/kolab.org/www/drupal-7.15/sites/all/modules/views/handlers/views_handler_argument_string.inc
+++ b/kolab.org/www/drupal-7.15/sites/all/modules/views/handlers/views_handler_argument_string.inc
@@ -1,6 +1,11 @@
<?php
/**
+ * @file
+ * Definition of views_handler_argument_string.
+ */
+
+/**
* Basic argument handler to implement string arguments that may have length
* limits.
*
@@ -21,16 +26,16 @@ class views_handler_argument_string extends views_handler_argument {
function option_definition() {
$options = parent::option_definition();
- $options['glossary'] = array('default' => FALSE);
+ $options['glossary'] = array('default' => FALSE, 'bool' => TRUE);
$options['limit'] = array('default' => 0);
$options['case'] = array('default' => 'none');
$options['path_case'] = array('default' => 'none');
- $options['transform_dash'] = array('default' => FALSE);
- $options['break_phrase'] = array('default' => FALSE);
+ $options['transform_dash'] = array('default' => FALSE, 'bool' => TRUE);
+ $options['break_phrase'] = array('default' => FALSE, 'bool' => TRUE);
if (!empty($this->definition['many to one'])) {
- $options['add_table'] = array('default' => FALSE);
- $options['require_value'] = array('default' => FALSE);
+ $options['add_table'] = array('default' => FALSE, 'bool' => TRUE);
+ $options['require_value'] = array('default' => FALSE, 'bool' => TRUE);
}
return $options;
@@ -124,7 +129,6 @@ class views_handler_argument_string extends views_handler_argument {
* Build the summary query based on a string
*/
function summary_query() {
- $this->placeholder_length = $this->placeholder();
if (empty($this->definition['many to one'])) {
$this->ensure_my_table();
}
@@ -140,13 +144,7 @@ class views_handler_argument_string extends views_handler_argument {
else {
// Add the field.
$formula = $this->get_formula();
- $params = array(
- 'placeholders' => array(
- $this->placeholder_length => intval($this->options['limit']),
- ),
- );
-
- $this->base_alias = $this->query->add_field(NULL, $formula, $this->field . '_truncated', $params);
+ $this->base_alias = $this->query->add_field(NULL, $formula, $this->field . '_truncated');
$this->query->set_count_field(NULL, $formula, $this->field, $this->field . '_truncated');
}
@@ -160,7 +158,7 @@ class views_handler_argument_string extends views_handler_argument {
* $this->ensure_my_table() MUST have been called prior to this.
*/
function get_formula() {
- return "SUBSTRING($this->table_alias.$this->real_field, 1, $this->placeholder_length)";
+ return "SUBSTRING($this->table_alias.$this->real_field, 1, " . intval($this->options['limit']) . ")";
}
/**
@@ -171,7 +169,6 @@ class views_handler_argument_string extends views_handler_argument {
if (!empty($this->options['transform_dash'])) {
$argument = strtr($argument, '-', ' ');
}
- $this->placeholder_length = $this->placeholder();
if (!empty($this->options['break_phrase'])) {
views_break_phrase_string($argument, $this);
@@ -186,8 +183,6 @@ class views_handler_argument_string extends views_handler_argument {
$this->helper->formula = TRUE;
}
$this->helper->ensure_my_table();
-
- $this->helper->placeholders = array($this->placeholder_length => intval($this->options['limit']));
$this->helper->add_filter();
return;
}
@@ -212,7 +207,6 @@ class views_handler_argument_string extends views_handler_argument {
if ($formula) {
$placeholder = $this->placeholder();
- $placeholder_length = $this->placeholder_length;
if ($operator == 'IN') {
$field .= " IN($placeholder)";
}
@@ -220,7 +214,6 @@ class views_handler_argument_string extends views_handler_argument {
$field .= ' = ' . $placeholder;
}
$placeholders = array(
- $placeholder_length => intval($this->options['limit']),
$placeholder => $argument,
);
$this->query->add_where_expression(0, $field, $placeholders);
@@ -231,7 +224,7 @@ class views_handler_argument_string extends views_handler_argument {
}
function summary_argument($data) {
- $value = $this->case_transform($data->{$this->base_alias}, 'path_case');
+ $value = $this->case_transform($data->{$this->base_alias}, $this->options['path_case']);
if (!empty($this->options['transform_dash'])) {
$value = strtr($value, ' ', '-');
}
diff --git a/kolab.org/www/drupal-7.15/sites/all/modules/views/handlers/views_handler_field.inc b/kolab.org/www/drupal-7.15/sites/all/modules/views/handlers/views_handler_field.inc
index ff2c32d..c687575 100644
--- a/kolab.org/www/drupal-7.15/sites/all/modules/views/handlers/views_handler_field.inc
+++ b/kolab.org/www/drupal-7.15/sites/all/modules/views/handlers/views_handler_field.inc
@@ -1,13 +1,19 @@
<?php
+
+/**
+ * @file
+ * @todo.
+ */
+
/**
- * @defgroup views_field_handlers Views' field handlers
+ * @defgroup views_field_handlers Views field handlers
* @{
* Handlers to tell Views how to build and display fields.
*
*/
/**
- * Indicator of the render_text() mehtod for rendering a single item.
+ * Indicator of the render_text() method for rendering a single item.
* (If no render_item() is present).
*/
define('VIEWS_HANDLER_RENDER_TEXT_PHASE_SINGLE_ITEM', 0);
@@ -33,12 +39,21 @@ define('VIEWS_HANDLER_RENDER_TEXT_PHASE_EMPTY', 2);
* 'field' => fieldname); as many fields as are necessary
* may be in this array.
* - click sortable: If TRUE, this field may be click sorted.
+ *
+ * @ingroup views_field_handlers
*/
class views_handler_field extends views_handler {
var $field_alias = 'unknown';
var $aliases = array();
/**
+ * The field value prior to any rewriting.
+ *
+ * @var mixed
+ */
+ public $original_value = NULL;
+
+ /**
* @var array
* Stores additional fields which get's added to the query.
* The generated aliases are stored in $aliases.
@@ -363,6 +378,17 @@ class views_handler_field extends views_handler {
}
}
+ /**
+ * Determines if this field will be available as an option to group the result
+ * by in the style settings.
+ *
+ * @return bool
+ * TRUE if this field handler is groupable, otherwise FALSE.
+ */
+ function use_string_group_by() {
+ return TRUE;
+ }
+
function option_definition() {
$options = parent::option_definition();
@@ -370,32 +396,32 @@ class views_handler_field extends views_handler {
$options['exclude'] = array('default' => FALSE, 'bool' => TRUE);
$options['alter'] = array(
'contains' => array(
- 'alter_text' => array('default' => FALSE),
+ 'alter_text' => array('default' => FALSE, 'bool' => TRUE),
'text' => array('default' => '', 'translatable' => TRUE),
- 'make_link' => array('default' => FALSE),
- 'path' => array('default' => '', 'translatable' => TRUE),
- 'absolute' => array('default' => '', 'translatable' => FALSE),
- 'external' => array('default' => '', 'translatable' => FALSE),
- 'replace_spaces' => array('default' => '', 'translatable' => FALSE),
+ 'make_link' => array('default' => FALSE, 'bool' => TRUE),
+ 'path' => array('default' => ''),
+ 'absolute' => array('default' => FALSE, 'bool' => TRUE),
+ 'external' => array('default' => FALSE, 'bool' => TRUE),
+ 'replace_spaces' => array('default' => FALSE, 'bool' => TRUE),
'path_case' => array('default' => 'none', 'translatable' => FALSE),
- 'trim_whitespace' => array('default' => FALSE),
+ 'trim_whitespace' => array('default' => FALSE, 'bool' => TRUE),
'alt' => array('default' => '', 'translatable' => TRUE),
'rel' => array('default' => ''),
'link_class' => array('default' => ''),
'prefix' => array('default' => '', 'translatable' => TRUE),
'suffix' => array('default' => '', 'translatable' => TRUE),
'target' => array('default' => '', 'translatable' => TRUE),
- 'nl2br' => array('default' => FALSE),
+ 'nl2br' => array('default' => FALSE, 'bool' => TRUE),
'max_length' => array('default' => ''),
- 'word_boundary' => array('default' => TRUE),
- 'ellipsis' => array('default' => TRUE),
- 'more_link' => array('default' => FALSE),
+ 'word_boundary' => array('default' => TRUE, 'bool' => TRUE),
+ 'ellipsis' => array('default' => TRUE, 'bool' => TRUE),
+ 'more_link' => array('default' => FALSE, 'bool' => TRUE),
'more_link_text' => array('default' => '', 'translatable' => TRUE),
'more_link_path' => array('default' => ''),
- 'strip_tags' => array('default' => FALSE),
- 'trim' => array('default' => FALSE),
+ 'strip_tags' => array('default' => FALSE, 'bool' => TRUE),
+ 'trim' => array('default' => FALSE, 'bool' => TRUE),
'preserve_tags' => array('default' => ''),
- 'html' => array('default' => FALSE),
+ 'html' => array('default' => FALSE, 'bool' => TRUE),
),
);
$options['element_type'] = array('default' => '');
@@ -403,17 +429,17 @@ class views_handler_field extends views_handler {
$options['element_label_type'] = array('default' => '');
$options['element_label_class'] = array('default' => '');
- $options['element_label_colon'] = array('default' => TRUE);
+ $options['element_label_colon'] = array('default' => TRUE, 'bool' => TRUE);
$options['element_wrapper_type'] = array('default' => '');
$options['element_wrapper_class'] = array('default' => '');
- $options['element_default_classes'] = array('default' => TRUE);
+ $options['element_default_classes'] = array('default' => TRUE, 'bool' => TRUE);
$options['empty'] = array('default' => '', 'translatable' => TRUE);
- $options['hide_empty'] = array('default' => FALSE);
- $options['empty_zero'] = array('default' => FALSE);
- $options['hide_alter_empty'] = array('default' => TRUE);
+ $options['hide_empty'] = array('default' => FALSE, 'bool' => TRUE);
+ $options['empty_zero'] = array('default' => FALSE, 'bool' => TRUE);
+ $options['hide_alter_empty'] = array('default' => TRUE, 'bool' => TRUE);
return $options;
}
@@ -783,7 +809,7 @@ class views_handler_field extends views_handler {
// We have some options, so make a list.
if (!empty($options)) {
$output = t('<p>The following tokens are available for this field. Note that due to rendering order, you cannot use fields that come after this field; if you need a field not listed here, rearrange your fields.
-If you would like to have the characters %5B and %5D please use the html entity codes \'%5B\' or \'%5D\' or they will get replaced with empty space.</p>');
+If you would like to have the characters \'[\' and \']\' please use the html entity codes \'%5B\' or \'%5D\' or they will get replaced with empty space.</p>');
foreach (array_keys($options) as $type) {
if (!empty($options[$type])) {
$items = array();
@@ -1006,6 +1032,10 @@ If you would like to have the characters %5B and %5D please use the html entity
function advanced_render($values) {
if ($this->allow_advanced_render() && method_exists($this, 'render_item')) {
$raw_items = $this->get_items($values);
+ // If there are no items, set the original value to NULL.
+ if (empty($raw_items)) {
+ $this->original_value = NULL;
+ }
}
else {
$value = $this->render($values);
@@ -1049,7 +1079,7 @@ If you would like to have the characters %5B and %5D please use the html entity
}
if (empty($this->last_render)) {
- if (($this->last_render !== 0 && $this->last_render !== '0') || !empty($this->options['empty_zero'])) {
+ if ($this->is_value_empty($this->last_render, $this->options['empty_zero'], FALSE)) {
$alter = $this->options['alter'];
$alter['alter_text'] = 1;
$alter['text'] = $this->options['empty'];
@@ -1062,6 +1092,33 @@ If you would like to have the characters %5B and %5D please use the html entity
}
/**
+ * Checks if a field value is empty.
+ *
+ * @param $value
+ * The field value.
+ * @param bool $empty_zero
+ * Whether or not this field is configured to consider 0 as empty.
+ * @param bool $no_skip_empty
+ * Whether or not to use empty() to check the value.
+ *
+ * @return bool
+ * TRUE if the value is considered empty, FALSE otherwise.
+ */
+ function is_value_empty($value, $empty_zero, $no_skip_empty = TRUE) {
+ if (!isset($value)) {
+ $empty = TRUE;
+ }
+ else {
+ $empty = ($empty_zero || ($value !== 0 && $value !== '0'));
+ }
+
+ if ($no_skip_empty) {
+ $empty = empty($value) && $empty;
+ }
+ return $empty;
+ }
+
+ /**
* Perform an advanced text render for the item.
*
* This is separated out as some fields may render lists, and this allows
@@ -1080,15 +1137,14 @@ If you would like to have the characters %5B and %5D please use the html entity
}
// Check if there should be no further rewrite for empty values.
- $no_rewrite_for_empty = $this->options['hide_alter_empty'] && empty($this->original_value);
+ $no_rewrite_for_empty = $this->options['hide_alter_empty'] && $this->is_value_empty($this->original_value, $this->options['empty_zero']);
// Check whether the value is empty and return nothing, so the field isn't rendered.
// First check whether the field should be hidden if the value(hide_alter_empty = TRUE) /the rewrite is empty (hide_alter_empty = FALSE).
// For numeric values you can specify whether "0"/0 should be empty.
if ((($this->options['hide_empty'] && empty($value))
|| ($alter['phase'] != VIEWS_HANDLER_RENDER_TEXT_PHASE_EMPTY && $no_rewrite_for_empty))
- && (($value !== 0 && $value !== '0')
- || $this->options['empty_zero'])) {
+ && $this->is_value_empty($value, $this->options['empty_zero'], FALSE)) {
return '';
}
// Only in empty phase.
@@ -1120,7 +1176,7 @@ If you would like to have the characters %5B and %5D please use the html entity
$more_link_path = drupal_substr($more_link_path, drupal_strlen($base_path));
}
- $more_link = l($more_link_text, $more_link_path);
+ $more_link = l($more_link_text, $more_link_path, array('attributes' => array('class' => array('views-more-link'))));
$suffix .= " " . $more_link;
}
@@ -1230,7 +1286,15 @@ If you would like to have the characters %5B and %5D please use the html entity
if (isset($url['query'])) {
$path = strtr($path, array('?' . $url['query'] => ''));
- $options['query'] = drupal_get_query_array($url['query']);
+ $query = drupal_get_query_array($url['query']);
+ // Remove query parameters that were assigned a query string replacement
+ // token for which there is no value available.
+ foreach ($query as $param => $val) {
+ if ($val == '%' . $param) {
+ unset($query[$param]);
+ }
+ }
+ $options['query'] = $query;
}
if (isset($url['fragment'])) {
$path = strtr($path, array('#' . $url['fragment'] => ''));
@@ -1333,6 +1397,9 @@ If you would like to have the characters %5B and %5D please use the html entity
$tokens['!' . $count] = isset($this->view->args[$count - 1]) ? strip_tags(decode_entities($this->view->args[$count - 1])) : '';
}
+ // Get flattened set of tokens for any array depth in $_GET parameters.
+ $tokens += $this->get_token_values_recursive($_GET);
+
// Now add replacements for our fields.
foreach ($this->view->display_handler->get_handlers('field') as $field => $handler) {
if (isset($handler->last_render)) {
@@ -1354,6 +1421,64 @@ If you would like to have the characters %5B and %5D please use the html entity
// Store the tokens for the row so we can reference them later if necessary.
$this->view->style_plugin->render_tokens[$this->view->row_index] = $tokens;
$this->last_tokens = $tokens;
+
+ return $tokens;
+ }
+
+ /**
+ * Recursive function to add replacements for nested query string parameters.
+ *
+ * E.g. if you pass in the following array:
+ * array(
+ * 'foo' => array(
+ * 'a' => 'value',
+ * 'b' => 'value',
+ * ),
+ * 'bar' => array(
+ * 'a' => 'value',
+ * 'b' => array(
+ * 'c' => value,
+ * ),
+ * ),
+ * );
+ *
+ * Would yield the following array of tokens:
+ * array(
+ * '%foo_a' => 'value'
+ * '%foo_b' => 'value'
+ * '%bar_a' => 'value'
+ * '%bar_b_c' => 'value'
+ * );
+ *
+ * @param $array
+ * An array of values.
+ *
+ * @param $parent_keys
+ * An array of parent keys. This will represent the array depth.
+ *
+ * @return
+ * An array of available tokens, with nested keys representative of the array structure.
+ */
+ function get_token_values_recursive(array $array, array $parent_keys = array()) {
+ $tokens = array();
+
+ foreach ($array as $param => $val) {
+ if (is_array($val)) {
+ // Copy parent_keys array, so we don't afect other elements of this iteration.
+ $child_parent_keys = $parent_keys;
+ $child_parent_keys[] = $param;
+ // Get the child tokens.
+ $child_tokens = $this->get_token_values_recursive($val, $child_parent_keys);
+ // Add them to the current tokens array.
+ $tokens += $child_tokens;
+ }
+ else {
+ // Create a token key based on array element structure.
+ $token_string = !empty($parent_keys) ? implode('_', $parent_keys) . '_' . $param : $param;
+ $tokens['%' . $token_string] = strip_tags(decode_entities($val));
+ }
+ }
+
return $tokens;
}
@@ -1373,7 +1498,7 @@ If you would like to have the characters %5B and %5D please use the html entity
/**
* Document any special tokens this field might use for itself.
*
- * @see add_self_tokens() for details.
+ * @see add_self_tokens()
*/
function document_self_tokens(&$tokens) { }
diff --git a/kolab.org/www/drupal-7.15/sites/all/modules/views/handlers/views_handler_field_boolean.inc b/kolab.org/www/drupal-7.15/sites/all/modules/views/handlers/views_handler_field_boolean.inc
index c388d4f..13fff07 100644
--- a/kolab.org/www/drupal-7.15/sites/all/modules/views/handlers/views_handler_field_boolean.inc
+++ b/kolab.org/www/drupal-7.15/sites/all/modules/views/handlers/views_handler_field_boolean.inc
@@ -1,6 +1,11 @@
<?php
/**
+ * @file
+ * Definition of views_handler_field_boolean.
+ */
+
+/**
* A handler to provide proper displays for booleans.
*
* Allows for display of true/false, yes/no, on/off, enabled/disabled.
diff --git a/kolab.org/www/drupal-7.15/sites/all/modules/views/handlers/views_handler_field_contextual_links.inc b/kolab.org/www/drupal-7.15/sites/all/modules/views/handlers/views_handler_field_contextual_links.inc
index a55ac58..faeeedc 100644
--- a/kolab.org/www/drupal-7.15/sites/all/modules/views/handlers/views_handler_field_contextual_links.inc
+++ b/kolab.org/www/drupal-7.15/sites/all/modules/views/handlers/views_handler_field_contextual_links.inc
@@ -1,11 +1,21 @@
<?php
+/**
+ * @file
+ * Definition of views_handler_field_contextual_links.
+ */
+
+/**
+ * Provides a handler that adds contextual links.
+ *
+ * @ingroup views_field_handlers
+ */
class views_handler_field_contextual_links extends views_handler_field {
function option_definition() {
$options = parent::option_definition();
$options['fields'] = array('default' => array());
- $options['destination'] = array('default' => 1);
+ $options['destination'] = array('default' => TRUE, 'bool' => TRUE);
return $options;
}
@@ -22,13 +32,9 @@ class views_handler_field_contextual_links extends views_handler_field {
'#default_value' => $this->options['fields'],
);
$form['destination'] = array(
- '#type' => 'select',
+ '#type' => 'checkbox',
'#title' => t('Include destination'),
'#description' => t('Include a "destination" parameter in the link to return the user to the original view upon completing the contextual action.'),
- '#options' => array(
- '0' => t('No'),
- '1' => t('Yes'),
- ),
'#default_value' => $this->options['destination'],
);
}
@@ -50,7 +56,7 @@ class views_handler_field_contextual_links extends views_handler_field {
function render($values) {
$links = array();
foreach ($this->options['fields'] as $field) {
- if (empty($this->view->field[$field]->last_render_text)) {
+ if (empty($this->view->style_plugin->rendered_fields[$this->view->row_index][$field])) {
continue;
}
$title = $this->view->field[$field]->last_render_text;
@@ -58,7 +64,11 @@ class views_handler_field_contextual_links extends views_handler_field {
if (!empty($this->view->field[$field]->options['alter']['path'])) {
$path = $this->view->field[$field]->options['alter']['path'];
}
- if (!empty($title)) {
+ if (!empty($title) && !empty($path)) {
+ // Make sure that tokens are replaced for this paths as well.
+ $tokens = $this->get_render_tokens(array());
+ $path = strip_tags(decode_entities(strtr($path, $tokens)));
+
$links[$field] = array(
'href' => $path,
'title' => $title,
@@ -68,19 +78,24 @@ class views_handler_field_contextual_links extends views_handler_field {
}
}
}
- $build = array(
- '#prefix' => '<div class="contextual-links-wrapper">',
- '#suffix' => '</div>',
- '#theme' => 'links__contextual',
- '#links' => $links,
- '#attributes' => array('class' => array('contextual-links')),
- '#attached' => array(
- 'library' => array(array('contextual', 'contextual-links')),
- ),
- '#access' => user_access('access contextual links'),
- );
- return drupal_render($build);
+ if (!empty($links)) {
+ $build = array(
+ '#prefix' => '<div class="contextual-links-wrapper">',
+ '#suffix' => '</div>',
+ '#theme' => 'links__contextual',
+ '#links' => $links,
+ '#attributes' => array('class' => array('contextual-links')),
+ '#attached' => array(
+ 'library' => array(array('contextual', 'contextual-links')),
+ ),
+ '#access' => user_access('access contextual links'),
+ );
+ return drupal_render($build);
+ }
+ else {
+ return '';
+ }
}
function query() { }
diff --git a/kolab.org/www/drupal-7.15/sites/all/modules/views/handlers/views_handler_field_counter.inc b/kolab.org/www/drupal-7.15/sites/all/modules/views/handlers/views_handler_field_counter.inc
index d4e52fc..76213a6 100644
--- a/kolab.org/www/drupal-7.15/sites/all/modules/views/handlers/views_handler_field_counter.inc
+++ b/kolab.org/www/drupal-7.15/sites/all/modules/views/handlers/views_handler_field_counter.inc
@@ -1,6 +1,11 @@
<?php
/**
+ * @file
+ * Definition of views_handler_field_counter.
+ */
+
+/**
* Field handler to show a counter of the current row.
*
* @ingroup views_field_handlers
diff --git a/kolab.org/www/drupal-7.15/sites/all/modules/views/handlers/views_handler_field_custom.inc b/kolab.org/www/drupal-7.15/sites/all/modules/views/handlers/views_handler_field_custom.inc
index 92b5d7c..66586de 100644
--- a/kolab.org/www/drupal-7.15/sites/all/modules/views/handlers/views_handler_field_custom.inc
+++ b/kolab.org/www/drupal-7.15/sites/all/modules/views/handlers/views_handler_field_custom.inc
@@ -1,6 +1,11 @@
<?php
/**
+ * @file
+ * Definition of views_handler_field_custom.
+ */
+
+/**
* A handler to provide a field that is completely custom by the administrator.
*
* @ingroup views_field_handlers
@@ -14,8 +19,8 @@ class views_handler_field_custom extends views_handler_field {
$options = parent::option_definition();
// Override the alter text option to always alter the text.
- $options['alter']['contains']['alter_text'] = array('default' => TRUE);
- $options['hide_alter_empty'] = array('default' => FALSE);
+ $options['alter']['contains']['alter_text'] = array('default' => TRUE, 'bool' => TRUE);
+ $options['hide_alter_empty'] = array('default' => FALSE, 'bool' => TRUE);
return $options;
}
diff --git a/kolab.org/www/drupal-7.15/sites/all/modules/views/handlers/views_handler_field_date.inc b/kolab.org/www/drupal-7.15/sites/all/modules/views/handlers/views_handler_field_date.inc
index b122b66..8517f0b 100644
--- a/kolab.org/www/drupal-7.15/sites/all/modules/views/handlers/views_handler_field_date.inc
+++ b/kolab.org/www/drupal-7.15/sites/all/modules/views/handlers/views_handler_field_date.inc
@@ -1,4 +1,10 @@
<?php
+
+/**
+ * @file
+ * Definition of views_handler_field_date.
+ */
+
/**
* A handler to provide proper displays for dates.
*
@@ -10,6 +16,7 @@ class views_handler_field_date extends views_handler_field {
$options['date_format'] = array('default' => 'small');
$options['custom_date_format'] = array('default' => '');
+ $options['timezone'] = array('default' => '');
return $options;
}
@@ -19,7 +26,7 @@ class views_handler_field_date extends views_handler_field {
$date_formats = array();
$date_types = system_get_date_types();
foreach ($date_types as $key => $value) {
- $date_formats[$value['type']] = check_plain(t($value['title'] . ' format')) . ': ' . format_date(REQUEST_TIME, $value['type']);
+ $date_formats[$value['type']] = t('@date_format format', array('@date_format' => $value['title'])) . ': ' . format_date(REQUEST_TIME, $value['type']);
}
$form['date_format'] = array(
@@ -40,10 +47,18 @@ class views_handler_field_date extends views_handler_field {
$form['custom_date_format'] = array(
'#type' => 'textfield',
'#title' => t('Custom date format'),
- '#description' => t('If "Custom", see <a href="http://us.php.net/manual/en/function.date.php" target="_blank">the PHP docs</a> for date formats. Otherwise, enter the number of different time units to display, which defaults to 2.'),
+ '#description' => t('If "Custom", see the <a href="@url" target="_blank">PHP manual</a> for date formats. Otherwise, enter the number of different time units to display, which defaults to 2.', array('@url' => 'http://php.net/manual/function.date.php')),
'#default_value' => isset($this->options['custom_date_format']) ? $this->options['custom_date_format'] : '',
'#dependency' => array('edit-options-date-format' => array('custom', 'raw time ago', 'time ago', 'raw time hence', 'time hence', 'raw time span', 'time span', 'raw time span', 'inverse time span', 'time span')),
);
+ $form['timezone'] = array(
+ '#type' => 'select',
+ '#title' => t('Timezone'),
+ '#description' => t('Timezone to be used for date output.'),
+ '#options' => array('' => t('- Default site/user timezone -')) + system_time_zones(FALSE),
+ '#default_value' => $this->options['timezone'],
+ '#dependency' => array('edit-options-date-format' => array_merge(array('custom'), array_keys($date_formats))),
+ );
parent::options_form($form, $form_state);
}
@@ -56,6 +71,7 @@ class views_handler_field_date extends views_handler_field {
}
if ($value) {
+ $timezone = !empty($this->options['timezone']) ? $this->options['timezone'] : NULL;
$time_diff = REQUEST_TIME - $value; // will be positive for a datetime in the past (ago), and negative for a datetime in the future (hence)
switch ($format) {
case 'raw time ago':
@@ -74,11 +90,11 @@ class views_handler_field_date extends views_handler_field {
return t(($time_diff < 0 ? '%time hence' : '%time ago'), array('%time' => format_interval(abs($time_diff), is_numeric($custom_format) ? $custom_format : 2)));
case 'custom':
if ($custom_format == 'r') {
- return format_date($value, $format, $custom_format, null, 'en');
+ return format_date($value, $format, $custom_format, $timezone, 'en');
}
- return format_date($value, $format, $custom_format);
+ return format_date($value, $format, $custom_format, $timezone);
default:
- return format_date($value, $format);
+ return format_date($value, $format, '', $timezone);
}
}
}
diff --git a/kolab.org/www/drupal-7.15/sites/all/modules/views/handlers/views_handler_field_entity.inc b/kolab.org/www/drupal-7.15/sites/all/modules/views/handlers/views_handler_field_entity.inc
index 0e13b23..d8aaba4 100644
--- a/kolab.org/www/drupal-7.15/sites/all/modules/views/handlers/views_handler_field_entity.inc
+++ b/kolab.org/www/drupal-7.15/sites/all/modules/views/handlers/views_handler_field_entity.inc
@@ -1,4 +1,10 @@
<?php
+
+/**
+ * @file
+ * Definition of views_handler_field_entity.
+ */
+
/**
* A handler to display data from entity objects.
*
diff --git a/kolab.org/www/drupal-7.15/sites/all/modules/views/handlers/views_handler_field_machine_name.inc b/kolab.org/www/drupal-7.15/sites/all/modules/views/handlers/views_handler_field_machine_name.inc
index 96a0cf7..9f3587f 100644
--- a/kolab.org/www/drupal-7.15/sites/all/modules/views/handlers/views_handler_field_machine_name.inc
+++ b/kolab.org/www/drupal-7.15/sites/all/modules/views/handlers/views_handler_field_machine_name.inc
@@ -1,6 +1,11 @@
<?php
/**
+ * @file
+ * Definition of views_handler_field_machine_name.
+ */
+
+/**
* Field handler whichs allows to show machine name content as human name.
* @ingroup views_field_handlers
*
@@ -34,7 +39,7 @@ class views_handler_field_machine_name extends views_handler_field {
function option_definition() {
$options = parent::option_definition();
- $options['machine_name'] = array('default' => FALSE);
+ $options['machine_name'] = array('default' => FALSE, 'bool' => TRUE);
return $options;
}
diff --git a/kolab.org/www/drupal-7.15/sites/all/modules/views/handlers/views_handler_field_markup.inc b/kolab.org/www/drupal-7.15/sites/all/modules/views/handlers/views_handler_field_markup.inc
index 10444d5..b0f1cea 100644
--- a/kolab.org/www/drupal-7.15/sites/all/modules/views/handlers/views_handler_field_markup.inc
+++ b/kolab.org/www/drupal-7.15/sites/all/modules/views/handlers/views_handler_field_markup.inc
@@ -1,6 +1,11 @@
<?php
/**
+ * @file
+ * Definition of views_handler_field_markup.
+ */
+
+/**
* A handler to run a field through check_markup, using a companion
* format field.
*
diff --git a/kolab.org/www/drupal-7.15/sites/all/modules/views/handlers/views_handler_field_math.inc b/kolab.org/www/drupal-7.15/sites/all/modules/views/handlers/views_handler_field_math.inc
index 9df9987..08fba06 100644
--- a/kolab.org/www/drupal-7.15/sites/all/modules/views/handlers/views_handler_field_math.inc
+++ b/kolab.org/www/drupal-7.15/sites/all/modules/views/handlers/views_handler_field_math.inc
@@ -1,10 +1,16 @@
<?php
+
+/**
+ * @file
+ * Definition of views_handler_field_math.
+ */
+
/**
* Render a mathematical expression as a numeric value
*
* Definition terms:
* - float: If true this field contains a decimal value. If unset this field
- * will be assumed to be integer.
+ * will be assumed to be integer.
*
* @ingroup views_field_handlers
*/
@@ -20,7 +26,7 @@ class views_handler_field_math extends views_handler_field_numeric {
$form['expression'] = array(
'#type' => 'textarea',
'#title' => t('Expression'),
- '#description' => t('Enter mathematical expressions such as 2 + 2 or sqrt(5). You my assign variables and create mathematical functions and evaluate them. Use the ; to separate these. For example: f(x) = x + 2; f(2).'),
+ '#description' => t('Enter mathematical expressions such as 2 + 2 or sqrt(5). You may assign variables and create mathematical functions and evaluate them. Use the ; to separate these. For example: f(x) = x + 2; f(2).'),
'#default_value' => $this->options['expression'],
);
diff --git a/kolab.org/www/drupal-7.15/sites/all/modules/views/handlers/views_handler_field_numeric.inc b/kolab.org/www/drupal-7.15/sites/all/modules/views/handlers/views_handler_field_numeric.inc
index 5f7f450..d10d3d0 100644
--- a/kolab.org/www/drupal-7.15/sites/all/modules/views/handlers/views_handler_field_numeric.inc
+++ b/kolab.org/www/drupal-7.15/sites/all/modules/views/handlers/views_handler_field_numeric.inc
@@ -1,4 +1,10 @@
<?php
+
+/**
+ * @file
+ * Definition of views_handler_field_numeric.
+ */
+
/**
* Render a field as a numeric value
*
@@ -12,11 +18,11 @@ class views_handler_field_numeric extends views_handler_field {
function option_definition() {
$options = parent::option_definition();
- $options['set_precision'] = array('default' => FALSE);
+ $options['set_precision'] = array('default' => FALSE, 'bool' => TRUE);
$options['precision'] = array('default' => 0);
$options['decimal'] = array('default' => '.', 'translatable' => TRUE);
$options['separator'] = array('default' => ',', 'translatable' => TRUE);
- $options['format_plural'] = array('default' => FALSE);
+ $options['format_plural'] = array('default' => FALSE, 'bool' => TRUE);
$options['format_plural_singular'] = array('default' => '1');
$options['format_plural_plural'] = array('default' => '@count');
$options['prefix'] = array('default' => '', 'translatable' => TRUE);
diff --git a/kolab.org/www/drupal-7.15/sites/all/modules/views/handlers/views_handler_field_prerender_list.inc b/kolab.org/www/drupal-7.15/sites/all/modules/views/handlers/views_handler_field_prerender_list.inc
index 16b30b6..00a571a 100644
--- a/kolab.org/www/drupal-7.15/sites/all/modules/views/handlers/views_handler_field_prerender_list.inc
+++ b/kolab.org/www/drupal-7.15/sites/all/modules/views/handlers/views_handler_field_prerender_list.inc
@@ -1,6 +1,11 @@
<?php
/**
+ * @file
+ * Definition of views_handler_field_prerender_list.
+ */
+
+/**
* Field handler to provide a list of items.
*
* The items are expected to be loaded by a child object during pre_render,
@@ -84,7 +89,7 @@ class views_handler_field_prerender_list extends views_handler_field {
function render_items($items) {
if (!empty($items)) {
if ($this->options['type'] == 'separator') {
- return implode($this->sanitize_value($this->options['separator']), $items);
+ return implode($this->sanitize_value($this->options['separator'], 'xss_admin'), $items);
}
else {
return theme('item_list',
diff --git a/kolab.org/www/drupal-7.15/sites/all/modules/views/handlers/views_handler_field_serialized.inc b/kolab.org/www/drupal-7.15/sites/all/modules/views/handlers/views_handler_field_serialized.inc
index 01dd0c0..1579fce 100644
--- a/kolab.org/www/drupal-7.15/sites/all/modules/views/handlers/views_handler_field_serialized.inc
+++ b/kolab.org/www/drupal-7.15/sites/all/modules/views/handlers/views_handler_field_serialized.inc
@@ -1,6 +1,11 @@
<?php
/**
+ * @file
+ * Definition of views_handler_field_serialized.
+ */
+
+/**
* Field handler to show data of serialized fields.
*
* @ingroup views_field_handlers
diff --git a/kolab.org/www/drupal-7.15/sites/all/modules/views/handlers/views_handler_field_time_interval.inc b/kolab.org/www/drupal-7.15/sites/all/modules/views/handlers/views_handler_field_time_interval.inc
index ca50885..e6063af 100644
--- a/kolab.org/www/drupal-7.15/sites/all/modules/views/handlers/views_handler_field_time_interval.inc
+++ b/kolab.org/www/drupal-7.15/sites/all/modules/views/handlers/views_handler_field_time_interval.inc
@@ -1,4 +1,10 @@
<?php
+
+/**
+ * @file
+ * Definition of views_handler_field_time_interval.
+ */
+
/**
* A handler to provide proper displays for time intervals.
*
diff --git a/kolab.org/www/drupal-7.15/sites/all/modules/views/handlers/views_handler_field_url.inc b/kolab.org/www/drupal-7.15/sites/all/modules/views/handlers/views_handler_field_url.inc
index 2491f35..4a76548 100644
--- a/kolab.org/www/drupal-7.15/sites/all/modules/views/handlers/views_handler_field_url.inc
+++ b/kolab.org/www/drupal-7.15/sites/all/modules/views/handlers/views_handler_field_url.inc
@@ -1,6 +1,11 @@
<?php
/**
+ * @file
+ * Definition of views_handler_field_url.
+ */
+
+/**
* Field handler to provide simple renderer that turns a URL into a clickable link.
*
* @ingroup views_field_handlers
@@ -9,7 +14,7 @@ class views_handler_field_url extends views_handler_field {
function option_definition() {
$options = parent::option_definition();
- $options['display_as_link'] = array('default' => TRUE);
+ $options['display_as_link'] = array('default' => TRUE, 'bool' => TRUE);
return $options;
}
@@ -29,7 +34,10 @@ class views_handler_field_url extends views_handler_field {
function render($values) {
$value = $this->get_value($values);
if (!empty($this->options['display_as_link'])) {
- return l($this->sanitize_value($value), $value, array('html' => TRUE));
+ $this->options['alter']['make_link'] = TRUE;
+ $this->options['alter']['path'] = $value;
+ $text = !empty($this->options['text']) ? $this->sanitize_value($this->options['text']) : $this->sanitize_value($value, 'url');
+ return $text;
}
else {
return $this->sanitize_value($value, 'url');
diff --git a/kolab.org/www/drupal-7.15/sites/all/modules/views/handlers/views_handler_filter.inc b/kolab.org/www/drupal-7.15/sites/all/modules/views/handlers/views_handler_filter.inc
index b267976..f5db70f 100644
--- a/kolab.org/www/drupal-7.15/sites/all/modules/views/handlers/views_handler_filter.inc
+++ b/kolab.org/www/drupal-7.15/sites/all/modules/views/handlers/views_handler_filter.inc
@@ -1,6 +1,12 @@
<?php
+
/**
- * @defgroup views_filter_handlers Views' filter handlers
+ * @file
+ * @todo.
+ */
+
+/**
+ * @defgroup views_filter_handlers Views filter handlers
* @{
* Handlers to tell Views how to filter queries.
*
@@ -22,6 +28,8 @@
/**
* Base class for filters.
+ *
+ * @ingroup views_filter_handlers
*/
class views_handler_filter extends views_handler {
/**
@@ -36,6 +44,11 @@ class views_handler_filter extends views_handler {
var $operator = '=';
/**
+ * Contains the information of the selected item in a gruped filter.
+ */
+ var $group_info = NULL;
+
+ /**
* @var bool
* Disable the possibility to force a single value.
*/
@@ -64,6 +77,7 @@ class views_handler_filter extends views_handler {
$this->operator = $this->options['operator'];
$this->value = $this->options['value'];
+ $this->group_info = $this->options['group_info']['default_group'];
// Compatibility: The new UI changed several settings.
if (!empty($options['exposed']) && !empty($options['expose']['optional']) && !isset($options['expose']['required'])) {
@@ -76,6 +90,11 @@ class views_handler_filter extends views_handler {
$this->options['expose']['operator_id'] = $options['expose']['operator_id'] = $options['expose']['operator'];
}
+ if ($this->multiple_exposed_input()) {
+ $this->group_info = array_filter($options['group_info']['default_group_multiple']);
+ $this->options['expose']['multiple'] = TRUE;
+ }
+
// If there are relationships in the view, allow empty should be true
// so that we can do IS NULL checks on items. Not all filters respect
// allow empty, but string and numeric do and that covers enough.
@@ -90,17 +109,45 @@ class views_handler_filter extends views_handler {
$options['operator'] = array('default' => '=');
$options['value'] = array('default' => '');
$options['group'] = array('default' => '1');
- $options['exposed'] = array('default' => FALSE);
+ $options['exposed'] = array('default' => FALSE, 'bool' => TRUE);
$options['expose'] = array(
'contains' => array(
'operator_id' => array('default' => FALSE),
'label' => array('default' => '', 'translatable' => TRUE),
- 'use_operator' => array('default' => 0),
+ 'description' => array('default' => '', 'translatable' => TRUE),
+ 'use_operator' => array('default' => FALSE, 'bool' => TRUE),
'operator' => array('default' => ''),
'identifier' => array('default' => ''),
- 'required' => array('default' => 0),
+ 'required' => array('default' => FALSE, 'bool' => TRUE),
+ 'remember' => array('default' => FALSE, 'bool' => TRUE),
+ 'multiple' => array('default' => FALSE, 'bool' => TRUE),
+ 'remember_roles' => array('default' => array(
+ DRUPAL_AUTHENTICATED_RID => DRUPAL_AUTHENTICATED_RID,
+ )),
+ ),
+ );
+
+ // A group is a combination of a filter, an operator and a value
+ // operating like a single filter.
+ // Users can choose from a select box which group they want to apply.
+ // Views will filter the view according to the defined values.
+ // Because it acts as a standard filter, we have to define
+ // an identifier and other settings like the widget and the label.
+ // This settings are saved in another array to allow users to switch
+ // between a normal filter and a group of filters with a single click.
+ $options['is_grouped'] = array('default' => FALSE, 'bool' => TRUE);
+ $options['group_info'] = array(
+ 'contains' => array(
+ 'label' => array('default' => '', 'translatable' => TRUE),
+ 'description' => array('default' => '', 'translatable' => TRUE),
+ 'identifier' => array('default' => ''),
+ 'optional' => array('default' => TRUE, 'bool' => TRUE),
+ 'widget' => array('default' => 'select'),
+ 'multiple' => array('default' => FALSE, 'bool' => TRUE),
'remember' => array('default' => 0),
- 'multiple' => array('default' => 0),
+ 'default_group' => array('default' => 'All'),
+ 'default_group_multiple' => array('default' => array()),
+ 'group_items' => array('default' => array()),
),
);
@@ -120,6 +167,21 @@ class views_handler_filter extends views_handler {
function can_expose() { return TRUE; }
/**
+ * Determine if a filter can be converted into a group.
+ * Only exposed filters with operators available can be converted into groups.
+ */
+ function can_build_group() {
+ return $this->is_exposed() && (count($this->operator_options()) > 0);
+ }
+
+ /**
+ * Returns TRUE if the exposed filter works like a grouped filter.
+ */
+ function is_a_group() {
+ return $this->is_exposed() && !empty($this->options['is_grouped']);
+ }
+
+ /**
* Provide the basic form which calls through to subforms.
* If overridden, it is best to call through to the parent,
* or to at least make sure all of the functions in this form
@@ -130,19 +192,36 @@ class views_handler_filter extends views_handler {
if ($this->can_expose()) {
$this->show_expose_button($form, $form_state);
}
+ if ($this->can_build_group()) {
+ $this->show_build_group_button($form, $form_state);
+ }
$form['clear_markup_start'] = array(
'#markup' => '<div class="clearfix">',
);
- // Add the subform from operator_form().
- $this->show_operator_form($form, $form_state);
- // Add the subform from value_form().
- $this->show_value_form($form, $form_state);
- $form['clear_markup_end'] = array(
- '#markup' => '</div>',
- );
- if ($this->can_expose()) {
- // Add the subform from expose_form().
- $this->show_expose_form($form, $form_state);
+ if ($this->is_a_group()) {
+ if ($this->can_build_group()) {
+ $form['clear_markup_start'] = array(
+ '#markup' => '<div class="clearfix">',
+ );
+ // Render the build group form.
+ $this->show_build_group_form($form, $form_state);
+ $form['clear_markup_end'] = array(
+ '#markup' => '</div>',
+ );
+ }
+ }
+ else {
+ // Add the subform from operator_form().
+ $this->show_operator_form($form, $form_state);
+ // Add the subform from value_form().
+ $this->show_value_form($form, $form_state);
+ $form['clear_markup_end'] = array(
+ '#markup' => '</div>',
+ );
+ if ($this->can_expose()) {
+ // Add the subform from expose_form().
+ $this->show_expose_form($form, $form_state);
+ }
}
}
@@ -152,9 +231,12 @@ class views_handler_filter extends views_handler {
function options_validate(&$form, &$form_state) {
$this->operator_validate($form, $form_state);
$this->value_validate($form, $form_state);
- if (!empty($this->options['exposed'])) {
+ if (!empty($this->options['exposed']) && !$this->is_a_group()) {
$this->expose_validate($form, $form_state);
}
+ if ($this->is_a_group()) {
+ $this->build_group_validate($form, $form_state);
+ }
}
/**
@@ -162,11 +244,17 @@ class views_handler_filter extends views_handler {
*/
function options_submit(&$form, &$form_state) {
unset($form_state['values']['expose_button']); // don't store this.
- $this->operator_submit($form, $form_state);
- $this->value_submit($form, $form_state);
+ unset($form_state['values']['group_button']); // don't store this.
+ if (!$this->is_a_group()) {
+ $this->operator_submit($form, $form_state);
+ $this->value_submit($form, $form_state);
+ }
if (!empty($this->options['exposed'])) {
$this->expose_submit($form, $form_state);
}
+ if ($this->is_a_group()) {
+ $this->build_group_submit($form, $form_state);
+ }
}
/**
@@ -184,7 +272,7 @@ class views_handler_filter extends views_handler {
* This may be overridden by child classes, and it must
* define $form['operator'];
*
- * @see options_form().
+ * @see options_form()
*/
function operator_form(&$form, &$form_state) {
$options = $this->operator_options();
@@ -232,7 +320,7 @@ class views_handler_filter extends views_handler {
* This should be overridden by all child classes and it must
* define $form['value']
*
- * @see options_form().
+ * @see options_form()
*/
function value_form(&$form, &$form_state) { $form['value'] = array(); }
@@ -248,6 +336,78 @@ class views_handler_filter extends views_handler {
function value_submit($form, &$form_state) { }
/**
+ * Shortcut to display the exposed options form.
+ */
+ function show_build_group_form(&$form, &$form_state) {
+ if (empty($this->options['is_grouped'])) {
+ return;
+ }
+
+ $this->build_group_form($form, $form_state);
+
+ // When we click the expose button, we add new gadgets to the form but they
+ // have no data in $_POST so their defaults get wiped out. This prevents
+ // these defaults from getting wiped out. This setting will only be TRUE
+ // during a 2nd pass rerender.
+ if (!empty($form_state['force_build_group_options'])) {
+ foreach (element_children($form['group_info']) as $id) {
+ if (isset($form['group_info'][$id]['#default_value']) && !isset($form['group_info'][$id]['#value'])) {
+ $form['group_info'][$id]['#value'] = $form['group_info'][$id]['#default_value'];
+ }
+ }
+ }
+ }
+
+ /**
+ * Shortcut to display the build_group/hide button.
+ */
+ function show_build_group_button(&$form, &$form_state) {
+
+ $form['group_button'] = array(
+ '#prefix' => '<div class="views-grouped clearfix">',
+ '#suffix' => '</div>',
+ // Should always come after the description and the relationship.
+ '#weight' => -190,
+ );
+
+ $grouped_description = t('Grouped filters allow a choice between predefined operator|value pairs.');
+ $form['group_button']['radios'] = array(
+ '#theme_wrappers' => array('container'),
+ '#attributes' => array('class' => array('js-only')),
+ );
+ $form['group_button']['radios']['radios'] = array(
+ '#title' => t('Filter type to expose'),
+ '#description' => $grouped_description,
+ '#type' => 'radios',
+ '#options' => array(
+ t('Single filter'),
+ t('Grouped filters'),
+ ),
+ );
+
+ if (empty($this->options['is_grouped'])) {
+ $form['group_button']['markup'] = array(
+ '#markup' => '<div class="description grouped-description">' . $grouped_description . '</div>',
+ );
+ $form['group_button']['button'] = array(
+ '#limit_validation_errors' => array(),
+ '#type' => 'submit',
+ '#value' => t('Grouped filters'),
+ '#submit' => array('views_ui_config_item_form_build_group'),
+ );
+ $form['group_button']['radios']['radios']['#default_value'] = 0;
+ }
+ else {
+ $form['group_button']['button'] = array(
+ '#limit_validation_errors' => array(),
+ '#type' => 'submit',
+ '#value' => t('Single filter'),
+ '#submit' => array('views_ui_config_item_form_build_group'),
+ );
+ $form['group_button']['radios']['radios']['#default_value'] = 1;
+ }
+ }
+ /**
* Shortcut to display the expose/hide button.
*/
function show_expose_button(&$form, &$form_state) {
@@ -299,7 +459,7 @@ class views_handler_filter extends views_handler {
/**
* Options form subform for exposed filter options.
*
- * @see options_form().
+ * @see options_form()
*/
function expose_form(&$form, &$form_state) {
$form['#theme'] = 'views_ui_expose_filter_form';
@@ -330,6 +490,13 @@ class views_handler_filter extends views_handler {
'#size' => 40,
);
+ $form['expose']['description'] = array(
+ '#type' => 'textfield',
+ '#default_value' => $this->options['expose']['description'],
+ '#title' => t('Description'),
+ '#size' => 60,
+ );
+
if (!empty($form['operator']['#type'])) {
// Increase the width of the left (operator) column.
$form['operator']['#prefix'] = '<div class="views-group-box views-left-40">';
@@ -377,6 +544,18 @@ class views_handler_filter extends views_handler {
'#default_value' => $this->options['expose']['remember'],
);
+ $role_options = array_map('check_plain', user_roles());
+ $form['expose']['remember_roles'] = array(
+ '#type' => 'checkboxes',
+ '#title' => t('User roles'),
+ '#description' => t('Remember exposed selection only for the selected user role(s). If you select no roles, the exposed data will never be stored.'),
+ '#default_value' => $this->options['expose']['remember_roles'],
+ '#options' => $role_options,
+ '#dependency' => array(
+ 'edit-options-expose-remember' => array(1),
+ ),
+ );
+
$form['expose']['identifier'] = array(
'#type' => 'textfield',
'#default_value' => $this->options['expose']['identifier'],
@@ -404,6 +583,83 @@ class views_handler_filter extends views_handler {
}
}
+ /**
+ * Validate the build group options form.
+ */
+ function build_group_validate($form, &$form_state) {
+ if (!empty($form_state['values']['options']['group_info'])) {
+ if (empty($form_state['values']['options']['group_info']['identifier'])) {
+ form_error($form['group_info']['identifier'], t('The identifier is required if the filter is exposed.'));
+ }
+
+ if (!empty($form_state['values']['options']['group_info']['identifier']) && $form_state['values']['options']['group_info']['identifier'] == 'value') {
+ form_error($form['group_info']['identifier'], t('This identifier is not allowed.'));
+ }
+
+ if (!$this->view->display_handler->is_identifier_unique($form_state['id'], $form_state['values']['options']['group_info']['identifier'])) {
+ form_error($form['group_info']['identifier'], t('This identifier is used by another handler.'));
+ }
+ }
+
+ if (!empty($form_state['values']['options']['group_info']['group_items'])) {
+ foreach ($form_state['values']['options']['group_info']['group_items'] as $id => $group) {
+ if (empty($group['remove'])) {
+
+ // Check if the title is defined but value wasn't defined.
+ if (!empty($group['title'])) {
+ if ((!is_array($group['value']) && trim($group['value']) == "") ||
+ (is_array($group['value']) && count(array_filter($group['value'], '_views_array_filter_zero')) == 0)) {
+ form_error($form['group_info']['group_items'][$id]['value'],
+ t('The value is required if title for this item is defined.'));
+ }
+ }
+
+ // Check if the value is defined but title wasn't defined.
+ if ((!is_array($group['value']) && trim($group['value']) != "") ||
+ (is_array($group['value']) && count(array_filter($group['value'], '_views_array_filter_zero')) > 0)) {
+ if (empty($group['title'])) {
+ form_error($form['group_info']['group_items'][$id]['title'],
+ t('The title is required if value for this item is defined.'));
+ }
+ }
+ }
+ }
+ }
+ }
+
+ /**
+ * Save new group items, re-enumerates and remove groups marked to delete.
+ */
+ function build_group_submit($form, &$form_state) {
+ $groups = array();
+ uasort($form_state['values']['options']['group_info']['group_items'], 'drupal_sort_weight');
+ // Filter out removed items.
+
+ // Start from 1 to avoid problems with #default_value in the widget.
+ $new_id = 1;
+ $new_default = 'All';
+ foreach ($form_state['values']['options']['group_info']['group_items'] as $id => $group) {
+ if (empty($group['remove'])) {
+ // Don't store this.
+ unset($group['remove']);
+ unset($group['weight']);
+ $groups[$new_id] = $group;
+
+ if ($form_state['values']['options']['group_info']['default_group'] === $id) {
+ $new_default = $new_id;
+ }
+ }
+ $new_id++;
+ }
+ if ($new_default != 'All') {
+ $form_state['values']['options']['group_info']['default_group'] = $new_default;
+ }
+ $filter_default_multiple = array_filter($form_state['values']['options']['group_info']['default_group_multiple']);
+ $form_state['values']['options']['group_info']['default_group_multiple'] = $filter_default_multiple;
+
+ $form_state['values']['options']['group_info']['group_items'] = $groups;
+ }
+
/**
* Provide default options for exposed filters.
*/
@@ -413,12 +669,76 @@ class views_handler_filter extends views_handler {
'operator' => $this->options['id'] . '_op',
'identifier' => $this->options['id'],
'label' => $this->definition['title'],
+ 'description' => NULL,
'remember' => FALSE,
'multiple' => FALSE,
'required' => FALSE,
);
}
+ /**
+ * Provide default options for exposed filters.
+ */
+ function build_group_options() {
+ $this->options['group_info'] = array(
+ 'label' => $this->definition['title'],
+ 'description' => NULL,
+ 'identifier' => $this->options['id'],
+ 'optional' => TRUE,
+ 'widget' => 'select',
+ 'multiple' => FALSE,
+ 'remember' => FALSE,
+ 'default_group' => 'All',
+ 'default_group_multiple' => array(),
+ 'group_items' => array(),
+ );
+ }
+
+ /**
+ * Build a form containing a group of operator | values to apply as a
+ * single filter.
+ */
+ function group_form(&$form, &$form_state) {
+ if (!empty($this->options['group_info']['optional']) && !$this->multiple_exposed_input()) {
+
+ $old_any = $this->options['group_info']['widget'] == 'select' ? '<Any>' : '&lt;Any&gt;';
+ $any_label = variable_get('views_exposed_filter_any_label', 'new_any') == 'old_any' ? $old_any : t('- Any -');
+ $groups = array('All' => $any_label);
+ }
+ foreach ($this->options['group_info']['group_items'] as $id => $group) {
+ if (!empty($group['title'])) {
+ $groups[$id] = $id != 'All' ? t($group['title']) : $group['title'];
+ }
+ }
+
+ if (count($groups)) {
+ $value = $this->options['group_info']['identifier'];
+
+ $form[$value] = array(
+ '#type' => $this->options['group_info']['widget'],
+ '#default_value' => $this->group_info,
+ '#options' => $groups,
+ );
+ if (!empty($this->options['group_info']['multiple'])) {
+ if (count($groups) < 5) {
+ $form[$value]['#type'] = 'checkboxes';
+ }
+ else {
+ $form[$value]['#type'] = 'select';
+ $form[$value]['#size'] = 5;
+ $form[$value]['#multiple'] = TRUE;
+ }
+ unset($form[$value]['#default_value']);
+ if (empty($form_state['input'])) {
+ $form_state['input'][$value] = $this->group_info;
+ }
+ }
+
+ $this->options['expose']['label'] = '';
+ }
+ }
+
+
/**
* Render our chunk of the exposed filter form when selecting
*
@@ -471,6 +791,254 @@ class views_handler_filter extends views_handler {
}
/**
+ * Build the form to let users create the group of exposed filters.
+ * This form is displayed when users click on button 'Build group'
+ */
+ function build_group_form(&$form, &$form_state) {
+ if (empty($this->options['exposed']) || empty($this->options['is_grouped'])) {
+ return;
+ }
+ $form['#theme'] = 'views_ui_build_group_filter_form';
+
+ // #flatten will move everything from $form['group_info'][$key] to $form[$key]
+ // prior to rendering. That's why the pre_render for it needs to run first,
+ // so that when the next pre_render (the one for fieldsets) runs, it gets
+ // the flattened data.
+ array_unshift($form['#pre_render'], 'views_ui_pre_render_flatten_data');
+ $form['group_info']['#flatten'] = TRUE;
+
+ if (!empty($this->options['group_info']['identifier'])) {
+ $identifier = $this->options['group_info']['identifier'];
+ }
+ else {
+ $identifier = 'group_' . $this->options['expose']['identifier'];
+ }
+ $form['group_info']['identifier'] = array(
+ '#type' => 'textfield',
+ '#default_value' => $identifier,
+ '#title' => t('Filter identifier'),
+ '#size' => 40,
+ '#description' => t('This will appear in the URL after the ? to identify this filter. Cannot be blank.'),
+ '#fieldset' => 'more',
+ );
+ $form['group_info']['label'] = array(
+ '#type' => 'textfield',
+ '#default_value' => $this->options['group_info']['label'],
+ '#title' => t('Label'),
+ '#size' => 40,
+ );
+
+ $form['group_info']['optional'] = array(
+ '#type' => 'checkbox',
+ '#title' => t('Optional'),
+ '#description' => t('This exposed filter is optional and will have added options to allow it not to be set.'),
+ '#default_value' => $this->options['group_info']['optional'],
+ );
+ $form['group_info']['multiple'] = array(
+ '#type' => 'checkbox',
+ '#title' => t('Allow multiple selections'),
+ '#description' => t('Enable to allow users to select multiple items.'),
+ '#default_value' => $this->options['group_info']['multiple'],
+ );
+ $form['group_info']['widget'] = array(
+ '#type' => 'radios',
+ '#default_value' => $this->options['group_info']['widget'],
+ '#title' => t('Widget type'),
+ '#options' => array(
+ 'radios' => t('Radios'),
+ 'select' => t('Select'),
+ ),
+ '#description' => t('Select which kind of widget will be used to render the group of filters'),
+ );
+ $form['group_info']['remember'] = array(
+ '#type' => 'checkbox',
+ '#title' => t('Remember'),
+ '#description' => t('Remember the last setting the user gave this filter.'),
+ '#default_value' => $this->options['group_info']['remember'],
+ );
+
+ if (!empty($this->options['group_info']['identifier'])) {
+ $identifier = $this->options['group_info']['identifier'];
+ }
+ else {
+ $identifier = 'group_' . $this->options['expose']['identifier'];
+ }
+ $form['group_info']['identifier'] = array(
+ '#type' => 'textfield',
+ '#default_value' => $identifier,
+ '#title' => t('Filter identifier'),
+ '#size' => 40,
+ '#description' => t('This will appear in the URL after the ? to identify this filter. Cannot be blank.'),
+ '#fieldset' => 'more',
+ );
+ $form['group_info']['label'] = array(
+ '#type' => 'textfield',
+ '#default_value' => $this->options['group_info']['label'],
+ '#title' => t('Label'),
+ '#size' => 40,
+ );
+ $form['group_info']['description'] = array(
+ '#type' => 'textfield',
+ '#default_value' => $this->options['group_info']['description'],
+ '#title' => t('Description'),
+ '#size' => 60,
+ );
+ $form['group_info']['optional'] = array(
+ '#type' => 'checkbox',
+ '#title' => t('Optional'),
+ '#description' => t('This exposed filter is optional and will have added options to allow it not to be set.'),
+ '#default_value' => $this->options['group_info']['optional'],
+ );
+ $form['group_info']['widget'] = array(
+ '#type' => 'radios',
+ '#default_value' => $this->options['group_info']['widget'],
+ '#title' => t('Widget type'),
+ '#options' => array(
+ 'radios' => t('Radios'),
+ 'select' => t('Select'),
+ ),
+ '#description' => t('Select which kind of widget will be used to render the group of filters'),
+ );
+ $form['group_info']['remember'] = array(
+ '#type' => 'checkbox',
+ '#title' => t('Remember'),
+ '#description' => t('Remember the last setting the user gave this filter.'),
+ '#default_value' => $this->options['group_info']['remember'],
+ );
+
+ $groups = array('All' => '- Any -'); // The string '- Any -' will not be rendered see @theme_views_ui_build_group_filter_form
+
+ // Provide 3 options to start when we are in a new group.
+ if (count($this->options['group_info']['group_items']) == 0) {
+ $this->options['group_info']['group_items'] = array_fill(1, 3, array());
+ }
+
+ // After the general settings, comes a table with all the existent groups.
+ $default_weight = 0;
+ foreach ($this->options['group_info']['group_items'] as $item_id => $item) {
+ if (!empty($form_state['values']['options']['group_info']['group_items'][$item_id]['remove'])) {
+ continue;
+ }
+ // Each rows contains three widgets:
+ // a) The title, where users define how they identify a pair of operator | value
+ // b) The operator
+ // c) The value (or values) to use in the filter with the selected operator
+
+ // In each row, we have to display the operator form and the value from
+ // $row acts as a fake form to render each widget in a row.
+ $row = array();
+ $groups[$item_id] = '';
+ $this->operator_form($row, $form_state);
+ // Force the operator form to be a select box. Some handlers uses
+ // radios and they occupy a lot of space in a table row.
+ $row['operator']['#type'] = 'select';
+ $row['operator']['#title'] = '';
+ $this->value_form($row, $form_state);
+
+ // Fix the dependencies to update value forms when operators
+ // changes. This is needed because forms are inside a new form and
+ // their ids changes. Dependencies are used when operator changes
+ // from to 'Between', 'Not Between', etc, and two or more widgets
+ // are displayed.
+ $without_children = TRUE;
+ foreach (element_children($row['value']) as $children) {
+ if (isset($row['value'][$children]['#dependency']['edit-options-operator'])) {
+ $row['value'][$children]['#dependency']["edit-options-group-info-group-items-$item_id-operator"] = $row['value'][$children]['#dependency']['edit-options-operator'];
+ unset($row['value'][$children]['#dependency']['edit-options-operator']);
+ $row['value'][$children]['#title'] = '';
+
+ if (!empty($this->options['group_info']['group_items'][$item_id]['value'][$children])) {
+ $row['value'][$children]['#default_value'] = $this->options['group_info']['group_items'][$item_id]['value'][$children];
+ }
+ }
+ $without_children = FALSE;
+ }
+
+ if ($without_children) {
+ if (!empty($this->options['group_info']['group_items'][$item_id]['value'])) {
+ $row['value']['#default_value'] = $this->options['group_info']['group_items'][$item_id]['value'];
+ }
+ }
+
+ if (!empty($this->options['group_info']['group_items'][$item_id]['operator'])) {
+ $row['operator']['#default_value'] = $this->options['group_info']['group_items'][$item_id]['operator'];
+ }
+
+ $default_title = '';
+ if (!empty($this->options['group_info']['group_items'][$item_id]['title'])) {
+ $default_title = $this->options['group_info']['group_items'][$item_id]['title'];
+ }
+
+ // Per item group, we have a title that identifies it.
+ $form['group_info']['group_items'][$item_id] = array(
+ 'title' => array(
+ '#type' => 'textfield',
+ '#size' => 20,
+ '#default_value' => $default_title,
+ ),
+ 'operator' => $row['operator'],
+ 'value' => $row['value'],
+ 'remove' => array(
+ '#type' => 'checkbox',
+ '#id' => 'views-removed-' . $item_id,
+ '#attributes' => array('class' => array('views-remove-checkbox')),
+ '#default_value' => 0,
+ ),
+ 'weight' => array(
+ '#type' => 'weight',
+ '#delta' => 10,
+ '#default_value' => $default_weight++,
+ '#attributes' => array('class' => array('weight')),
+ ),
+ );
+ }
+ // From all groups, let chose which is the default.
+ $form['group_info']['default_group'] = array(
+ '#type' => 'radios',
+ '#options' => $groups,
+ '#default_value' => $this->options['group_info']['default_group'],
+ '#required' => TRUE,
+ '#attributes' => array(
+ 'class' => array('default-radios'),
+ )
+ );
+ // From all groups, let chose which is the default.
+ $form['group_info']['default_group_multiple'] = array(
+ '#type' => 'checkboxes',
+ '#options' => $groups,
+ '#default_value' => $this->options['group_info']['default_group_multiple'],
+ '#attributes' => array(
+ 'class' => array('default-checkboxes'),
+ )
+ );
+
+ $form['group_info']['add_group'] = array(
+ '#prefix' => '<div class="views-build-group clear-block">',
+ '#suffix' => '</div>',
+ '#type' => 'submit',
+ '#value' => t('Add another item'),
+ '#submit' => array('views_ui_config_item_form_add_group'),
+ );
+
+ $js = array();
+ $js['tableDrag']['views-filter-groups']['weight'][0] = array(
+ 'target' => 'weight',
+ 'source' => NULL,
+ 'relationship' => 'sibling',
+ 'action' => 'order',
+ 'hidden' => TRUE,
+ 'limit' => 0,
+ );
+ if (!empty($form_state['js settings']) && is_array($js)) {
+ $form_state['js settings'] = array_merge($form_state['js settings'], $js);
+ }
+ else {
+ $form_state['js settings'] = $js;
+ }
+ }
+
+
+ /**
* Make some translations to a form item to make it more suitable to
* exposing.
*/
@@ -496,6 +1064,11 @@ class views_handler_filter extends views_handler {
$form['#size'] = NULL;
}
+ // Cleanup in case the translated element's (radios or checkboxes) display value contains html.
+ if ($form['#type'] == 'select') {
+ $this->prepare_filter_select_options($form['#options']);
+ }
+
if ($type == 'value' && empty($this->always_required) && empty($this->options['expose']['required']) && $form['#type'] == 'select' && empty($form['#multiple'])) {
$any_label = variable_get('views_exposed_filter_any_label', 'new_any') == 'old_any' ? t('<Any>') : t('- Any -');
$form['#options'] = array('All' => $any_label) + $form['#options'];
@@ -507,28 +1080,168 @@ class views_handler_filter extends views_handler {
}
}
+
+
+ /**
+ * Sanitizes the HTML select element's options.
+ *
+ * The function is recursive to support optgroups.
+ */
+ function prepare_filter_select_options(&$options) {
+ foreach ($options as $value => $label) {
+ // Recurse for optgroups.
+ if (is_array($label)) {
+ $this->prepare_filter_select_options($options[$value]);
+ }
+ // FAPI has some special value to allow hierarchy.
+ // @see _form_options_flatten
+ elseif (is_object($label)) {
+ $this->prepare_filter_select_options($options[$value]->option);
+ }
+ else {
+ $options[$value] = strip_tags(decode_entities($label));
+ }
+ }
+ }
+
/**
* Tell the renderer about our exposed form. This only needs to be
* overridden for particularly complex forms. And maybe not even then.
*
* @return array|null
- * An array with the following keys:
+ * For standard exposed filters. An array with the following keys:
* - operator: The $form key of the operator. Set to NULL if no operator.
* - value: The $form key of the value. Set to NULL if no value.
* - label: The label to use for this piece.
+ * For grouped exposed filters. An array with the following keys:
+ * - value: The $form key of the value. Set to NULL if no value.
+ * - label: The label to use for this piece.
*/
function exposed_info() {
if (empty($this->options['exposed'])) {
return;
}
+ if ($this->is_a_group()) {
+ return array(
+ 'value' => $this->options['group_info']['identifier'],
+ 'label' => $this->options['group_info']['label'],
+ 'description' => $this->options['group_info']['description'],
+ );
+ }
+
return array(
'operator' => $this->options['expose']['operator_id'],
'value' => $this->options['expose']['identifier'],
'label' => $this->options['expose']['label'],
+ 'description' => $this->options['expose']['description'],
);
}
+ /*
+ * Transform the input from a grouped filter into a standard filter.
+ *
+ * When a filter is a group, find the set of operator and values
+ * that the choosed item represents, and inform views that a normal
+ * filter was submitted by telling the operator and the value selected.
+ *
+ * The param $selected_group_id is only passed when the filter uses the
+ * checkboxes widget, and this function will be called for each item
+ * choosed in the checkboxes.
+ */
+ function convert_exposed_input(&$input, $selected_group_id = NULL) {
+ if ($this->is_a_group()) {
+ // If it is already defined the selected group, use it. Only valid
+ // when the filter uses checkboxes for widget.
+ if (!empty($selected_group_id)) {
+ $selected_group = $selected_group_id;
+ }
+ else {
+ $selected_group = $input[$this->options['group_info']['identifier']];
+ }
+ if ($selected_group == 'All' && !empty($this->options['group_info']['optional'])) {
+ return NULL;
+ }
+ if ($selected_group != 'All' && empty($this->options['group_info']['group_items'][$selected_group])) {
+ return FALSE;
+ }
+ if (isset($selected_group) && isset($this->options['group_info']['group_items'][$selected_group])) {
+ $input[$this->options['expose']['operator']] = $this->options['group_info']['group_items'][$selected_group]['operator'];
+
+ // Value can be optional, For example for 'empty' and 'not empty' filters.
+ if (!empty($this->options['group_info']['group_items'][$selected_group]['value'])) {
+ $input[$this->options['expose']['identifier']] = $this->options['group_info']['group_items'][$selected_group]['value'];
+ }
+ $this->options['expose']['use_operator'] = TRUE;
+
+ $this->group_info = $input[$this->options['group_info']['identifier']];
+ return TRUE;
+ }
+ else {
+ return FALSE;
+ }
+ }
+ }
+
+ /**
+ * Returns the options available for a grouped filter that users checkboxes
+ * as widget, and therefore has to be applied several times, one per
+ * item selected.
+ */
+ function group_multiple_exposed_input(&$input) {
+ if (!empty($input[$this->options['group_info']['identifier']])) {
+ return array_filter($input[$this->options['group_info']['identifier']]);
+ }
+ return array();
+ }
+
+ /**
+ * Returns TRUE if users can select multiple groups items of a
+ * grouped exposed filter.
+ */
+ function multiple_exposed_input() {
+ return $this->is_a_group() && !empty($this->options['group_info']['multiple']);
+ }
+
+ /**
+ * If set to remember exposed input in the session, store it there.
+ * This function is similar to store_exposed_input but modified to
+ * work properly when the filter is a group.
+ */
+ function store_group_input($input, $status) {
+ if (!$this->is_a_group() || empty($this->options['group_info']['identifier'])) {
+ return TRUE;
+ }
+
+ if (empty($this->options['group_info']['remember'])) {
+ return;
+ }
+
+ // Figure out which display id is responsible for the filters, so we
+ // know where to look for session stored values.
+ $display_id = ($this->view->display_handler->is_defaulted('filters')) ? 'default' : $this->view->current_display;
+
+ // false means that we got a setting that means to recuse ourselves,
+ // so we should erase whatever happened to be there.
+ if ($status === FALSE && isset($_SESSION['views'][$this->view->name][$display_id])) {
+ $session = &$_SESSION['views'][$this->view->name][$display_id];
+
+ if (isset($session[$this->options['group_info']['identifier']])) {
+ unset($session[$this->options['group_info']['identifier']]);
+ }
+ }
+
+ if ($status !== FALSE) {
+ if (!isset($_SESSION['views'][$this->view->name][$display_id])) {
+ $_SESSION['views'][$this->view->name][$display_id] = array();
+ }
+
+ $session = &$_SESSION['views'][$this->view->name][$display_id];
+
+ $session[$this->options['group_info']['identifier']] = $input[$this->options['group_info']['identifier']];
+ }
+ }
+
/**
* Check to see if input from the exposed filters should change
* the behavior of this filter.
@@ -587,6 +1300,14 @@ class views_handler_filter extends views_handler {
return;
}
+ // Check if we store exposed value for current user.
+ global $user;
+ $allowed_rids = empty($this->options['expose']['remember_roles']) ? array() : array_filter($this->options['expose']['remember_roles']);
+ $intersect_rids = array_intersect_key($allowed_rids, $user->roles);
+ if (empty($intersect_rids)) {
+ return;
+ }
+
// Figure out which display id is responsible for the filters, so we
// know where to look for session stored values.
$display_id = ($this->view->display_handler->is_defaulted('filters')) ? 'default' : $this->view->current_display;
@@ -674,6 +1395,15 @@ class views_handler_filter_broken extends views_handler_filter {
function broken() { return TRUE; }
}
+/**
+ * Filter by no empty values, though allow to use "0".
+ * @param $var
+ * @return bool
+ */
+function _views_array_filter_zero($var) {
+ return trim($var) != "";
+}
+
/**
* @}
diff --git a/kolab.org/www/drupal-7.15/sites/all/modules/views/handlers/views_handler_filter_boolean_operator.inc b/kolab.org/www/drupal-7.15/sites/all/modules/views/handlers/views_handler_filter_boolean_operator.inc
index f795b9f..56365e1 100644
--- a/kolab.org/www/drupal-7.15/sites/all/modules/views/handlers/views_handler_filter_boolean_operator.inc
+++ b/kolab.org/www/drupal-7.15/sites/all/modules/views/handlers/views_handler_filter_boolean_operator.inc
@@ -1,4 +1,10 @@
<?php
+
+/**
+ * @file
+ * Definition of views_handler_filter_boolean_operator.
+ */
+
/**
* Simple filter to handle matching of boolean values
*
@@ -123,6 +129,9 @@ class views_handler_filter_boolean_operator extends views_handler_filter {
}
function admin_summary() {
+ if ($this->is_a_group()) {
+ return t('grouped');
+ }
if (!empty($this->options['exposed'])) {
return t('exposed');
}
diff --git a/kolab.org/www/drupal-7.15/sites/all/modules/views/handlers/views_handler_filter_boolean_operator_string.inc b/kolab.org/www/drupal-7.15/sites/all/modules/views/handlers/views_handler_filter_boolean_operator_string.inc
index b27cae4..b49dde9 100644
--- a/kolab.org/www/drupal-7.15/sites/all/modules/views/handlers/views_handler_filter_boolean_operator_string.inc
+++ b/kolab.org/www/drupal-7.15/sites/all/modules/views/handlers/views_handler_filter_boolean_operator_string.inc
@@ -1,4 +1,10 @@
<?php
+
+/**
+ * @file
+ * Definition of views_handler_filter_boolean_operator_string.
+ */
+
/**
* Simple filter to handle matching of boolean values.
*
diff --git a/kolab.org/www/drupal-7.15/sites/all/modules/views/handlers/views_handler_filter_combine.inc b/kolab.org/www/drupal-7.15/sites/all/modules/views/handlers/views_handler_filter_combine.inc
new file mode 100644
index 0000000..c9def53
--- /dev/null
+++ b/kolab.org/www/drupal-7.15/sites/all/modules/views/handlers/views_handler_filter_combine.inc
@@ -0,0 +1,137 @@
+<?php
+
+/**
+ * @file
+ * Definition of views_handler_filter_combine.
+ */
+
+/**
+ * Filter handler which allows to search on multiple fields.
+ *
+ * @ingroup views_field_handlers
+ */
+class views_handler_filter_combine extends views_handler_filter_string {
+ /**
+ * @var views_plugin_query_default
+ */
+ var $query;
+
+ function option_definition() {
+ $options = parent::option_definition();
+ $options['fields'] = array('default' => array());
+
+ return $options;
+ }
+
+ function options_form(&$form, &$form_state) {
+ parent::options_form($form, $form_state);
+ $this->view->init_style();
+
+ // Allow to choose all fields as possible
+ if ($this->view->style_plugin->uses_fields()) {
+ $options = array();
+ foreach ($this->view->display_handler->get_handlers('field') as $name => $field) {
+ $options[$name] = $field->ui_name(TRUE);
+ }
+ if ($options) {
+ $form['fields'] = array(
+ '#type' => 'select',
+ '#title' => t('Choose fields to combine for filtering'),
+ '#description' => t("This filter doesn't work for very special field handlers."),
+ '#multiple' => TRUE,
+ '#options' => $options,
+ '#default_value' => $this->options['fields'],
+ );
+ }
+ else {
+ form_set_error('', t('You have to add some fields to be able to use this filter.'));
+ }
+ }
+ }
+
+ function query() {
+ $this->view->_build('field');
+ $fields = array();
+ // Only add the fields if they have a proper field and table alias.
+ foreach ($this->options['fields'] as $id) {
+ $field = $this->view->field[$id];
+ // Always add the table of the selected fields to be sure a table alias exists.
+ $field->ensure_my_table();
+ if (!empty($field->field_alias) && !empty($field->field_alias)) {
+ $fields[] = "$field->table_alias.$field->real_field";
+ }
+ }
+ if ($fields) {
+ $count = count($fields);
+ $seperated_fields = array();
+ foreach ($fields as $key => $field) {
+ $seperated_fields[] = $field;
+ if ($key < $count-1) {
+ $seperated_fields[] = "' '";
+ }
+ }
+ $expression = implode(', ', $seperated_fields);
+ $expression = "CONCAT_WS(' ', $expression)";
+
+ $info = $this->operators();
+ if (!empty($info[$this->operator]['method'])) {
+ $this->{$info[$this->operator]['method']}($expression);
+ }
+ }
+ }
+
+ // By default things like op_equal uses add_where, that doesn't support
+ // complex expressions, so override all operators.
+
+ function op_equal($field) {
+ $placeholder = $this->placeholder();
+ $operator = $this->operator();
+ $this->query->add_where_expression($this->options['group'], "$field $operator $placeholder", array($placeholder => $this->value));
+ }
+
+ function op_contains($field) {
+ $placeholder = $this->placeholder();
+ $this->query->add_where_expression($this->options['group'], "$field LIKE $placeholder", array($placeholder => '%' . db_like($this->value) . '%'));
+ }
+
+ function op_starts($field) {
+ $placeholder = $this->placeholder();
+ $this->query->add_where_expression($this->options['group'], "$field LIKE $placeholder", array($placeholder => db_like($this->value) . '%'));
+ }
+
+ function op_not_starts($field) {
+ $placeholder = $this->placeholder();
+ $this->query->add_where_expression($this->options['group'], "$field NOT LIKE $placeholder", array($placeholder => db_like($this->value) . '%'));
+ }
+
+ function op_ends($field) {
+ $placeholder = $this->placeholder();
+ $this->query->add_where_expression($this->options['group'], "$field LIKE $placeholder", array($placeholder => '%' . db_like($this->value)));
+ }
+
+ function op_not_ends($field) {
+ $placeholder = $this->placeholder();
+ $this->query->add_where_expression($this->options['group'], "$field NOT LIKE $placeholder", array($placeholder => '%' . db_like($this->value)));
+ }
+
+ function op_not($field) {
+ $placeholder = $this->placeholder();
+ $this->query->add_where_expression($this->options['group'], "$field NOT LIKE $placeholder", array($placeholder => '%' . db_like($this->value) . '%'));
+ }
+
+ function op_regex($field) {
+ $placeholder = $this->placeholder();
+ $this->query->add_where_expression($this->options['group'], "$field RLIKE $placeholder", array($placeholder => $this->value));
+ }
+
+ function op_empty($field) {
+ if ($this->operator == 'empty') {
+ $operator = "IS NULL";
+ }
+ else {
+ $operator = "IS NOT NULL";
+ }
+
+ $this->query->add_where_expression($this->options['group'], "$field $operator");
+ }
+}
diff --git a/kolab.org/www/drupal-7.15/sites/all/modules/views/handlers/views_handler_filter_date.inc b/kolab.org/www/drupal-7.15/sites/all/modules/views/handlers/views_handler_filter_date.inc
index b89d003..4ef61b4 100644
--- a/kolab.org/www/drupal-7.15/sites/all/modules/views/handlers/views_handler_filter_date.inc
+++ b/kolab.org/www/drupal-7.15/sites/all/modules/views/handlers/views_handler_filter_date.inc
@@ -1,6 +1,11 @@
<?php
/**
+ * @file
+ * Definition of views_handler_filter_date.
+ */
+
+/**
* Filter to handle dates stored as a timestamp.
*
* @ingroup views_filter_handlers
@@ -90,6 +95,34 @@ class views_handler_filter_date extends views_handler_filter_numeric {
}
}
+ /**
+ * Validate the build group options form.
+ */
+ function build_group_validate($form, &$form_state) {
+ // Special case to validate grouped date filters, this is because the
+ // $group['value'] array contains the type of filter (date or offset)
+ // and therefore the number of items the comparission has to be done
+ // against 'one' instead of 'zero'.
+ foreach ($form_state['values']['options']['group_info']['group_items'] as $id => $group) {
+ if (empty($group['remove'])) {
+ // Check if the title is defined but value wasn't defined.
+ if (!empty($group['title'])) {
+ if ((!is_array($group['value']) && empty($group['value'])) || (is_array($group['value']) && count(array_filter($group['value'])) == 1)) {
+ form_error($form['group_info']['group_items'][$id]['value'], t('The value is required if title for this item is defined.'));
+ }
+ }
+
+ // Check if the value is defined but title wasn't defined.
+ if ((!is_array($group['value']) && !empty($group['value'])) || (is_array($group['value']) && count(array_filter($group['value'])) > 1)) {
+ if (empty($group['title'])) {
+ form_error($form['group_info']['group_items'][$id]['title'], t('The title is required if value for this item is defined.'));
+ }
+ }
+ }
+ }
+ }
+
+
function accept_exposed_input($input) {
if (empty($this->options['exposed'])) {
return TRUE;
diff --git a/kolab.org/www/drupal-7.15/sites/all/modules/views/handlers/views_handler_filter_entity_bundle.inc b/kolab.org/www/drupal-7.15/sites/all/modules/views/handlers/views_handler_filter_entity_bundle.inc
new file mode 100644
index 0000000..c46cd0b
--- /dev/null
+++ b/kolab.org/www/drupal-7.15/sites/all/modules/views/handlers/views_handler_filter_entity_bundle.inc
@@ -0,0 +1,122 @@
+<?php
+
+/**
+ * @file
+ * Definition of views_handler_filter_entity_bundle
+ */
+
+/**
+ * Filter class which allows to filter by certain bundles of an entity.
+ *
+ * This class provides workarounds for taxonomy and comment.
+ *
+ * @ingroup views_filter_handlers
+ */
+class views_handler_filter_entity_bundle extends views_handler_filter_in_operator {
+ /**
+ * Stores the entity type on which the filter filters.
+ *
+ * @var string
+ */
+ public $entity_type;
+
+ function init(&$view, &$options) {
+ parent::init($view, $options);
+
+ $this->get_entity_type();
+ }
+
+ /**
+ * Set and returns the entity_type.
+ *
+ * @return string
+ * The entity type on the filter.
+ */
+ function get_entity_type() {
+ if (!isset($this->entity_type)) {
+ $data = views_fetch_data($this->table);
+ if (isset($data['table']['entity type'])) {
+ $this->entity_type = $data['table']['entity type'];
+ }
+
+ // If the current filter is under a relationship you can't be sure that the
+ // entity type of the view is the entity type of the current filter
+ // For example a filter from a node author on a node view does have users as entity type.
+ if (!empty($this->options['relationship']) && $this->options['relationship'] != 'none') {
+ $relationships = $this->view->display_handler->get_option('relationships');
+ if (!empty($relationships[$this->options['relationship']])) {
+ $options = $relationships[$this->options['relationship']];
+ $data = views_fetch_data($options['table']);
+ $this->entity_type = $data['table']['entity type'];
+ }
+ }
+ }
+
+ return $this->entity_type;
+ }
+
+
+ function get_value_options() {
+ if (!isset($this->value_options)) {
+ $info = entity_get_info($this->entity_type);
+ $types = $info['bundles'];
+ $this->value_title = t('@entity types', array('@entity' => $info['label']));
+
+ $options = array();
+ foreach ($types as $type => $info) {
+ $options[$type] = t($info['label']);
+ }
+ asort($options);
+ $this->value_options = $options;
+ }
+ }
+
+ /**
+ * All entity types beside comment and taxonomy terms have a proper implement
+ * bundle, though these two need an additional join to node/vocab table
+ * to work as required.
+ */
+ function query() {
+ $this->ensure_my_table();
+
+ // Adjust the join for the comment case.
+ if ($this->entity_type == 'comment') {
+ $join = new views_join();
+ $def = array(
+ 'table' => 'node',
+ 'field' => 'nid',
+ 'left_table' => $this->table_alias,
+ 'left_field' => 'nid',
+ );
+ $join->definition = $def;
+ $join->construct();
+ $join->adjusted = TRUE;
+ $this->table_alias = $this->query->add_table('node', $this->relationship, $join);
+ $this->real_field = 'type';
+
+ // Replace the value to match the node type column.
+ foreach ($this->value as &$value) {
+ $value = str_replace('comment_node_', '', $value);
+ }
+ }
+ elseif ($this->entity_type == 'taxonomy_term') {
+ $join = new views_join();
+ $def = array(
+ 'table' => 'taxonomy_vocabulary',
+ 'field' => 'vid',
+ 'left_table' => $this->table_alias,
+ 'left_field' => 'vid',
+ );
+ $join->definition = $def;
+ $join->construct();
+ $join->adjusted = TRUE;
+ $this->table_alias = $this->query->add_table('taxonomy_vocabulary', $this->relationship, $join);
+ $this->real_field = 'machine_name';
+ }
+ else {
+ $entity_info = entity_get_info($this->entity_type);
+ $this->real_field = $entity_info['bundle keys']['bundle'];
+ }
+ parent::query();
+ }
+}
diff --git a/kolab.org/www/drupal-7.15/sites/all/modules/views/handlers/views_handler_filter_equality.inc b/kolab.org/www/drupal-7.15/sites/all/modules/views/handlers/views_handler_filter_equality.inc
index dfe2445..e045c7e 100644
--- a/kolab.org/www/drupal-7.15/sites/all/modules/views/handlers/views_handler_filter_equality.inc
+++ b/kolab.org/www/drupal-7.15/sites/all/modules/views/handlers/views_handler_filter_equality.inc
@@ -1,4 +1,10 @@
<?php
+
+/**
+ * @file
+ * Definition of views_handler_filter_equality.
+ */
+
/**
* Simple filter to handle equal to / not equal to filters
*
diff --git a/kolab.org/www/drupal-7.15/sites/all/modules/views/handlers/views_handler_filter_group_by_numeric.inc b/kolab.org/www/drupal-7.15/sites/all/modules/views/handlers/views_handler_filter_group_by_numeric.inc
index 2332d39..2b265be 100644
--- a/kolab.org/www/drupal-7.15/sites/all/modules/views/handlers/views_handler_filter_group_by_numeric.inc
+++ b/kolab.org/www/drupal-7.15/sites/all/modules/views/handlers/views_handler_filter_group_by_numeric.inc
@@ -1,6 +1,11 @@
<?php
/**
+ * @file
+ * Definition of views_handler_filter_group_by_numeric.
+ */
+
+/**
* Simple filter to handle greater than/less than filters
*
* @ingroup views_filter_handlers
diff --git a/kolab.org/www/drupal-7.15/sites/all/modules/views/handlers/views_handler_filter_in_operator.inc b/kolab.org/www/drupal-7.15/sites/all/modules/views/handlers/views_handler_filter_in_operator.inc
index 8054542..fc2700b 100644
--- a/kolab.org/www/drupal-7.15/sites/all/modules/views/handlers/views_handler_filter_in_operator.inc
+++ b/kolab.org/www/drupal-7.15/sites/all/modules/views/handlers/views_handler_filter_in_operator.inc
@@ -1,4 +1,10 @@
<?php
+
+/**
+ * @file
+ * Definition of views_handler_filter_in_operator.
+ */
+
/**
* Simple filter to handle matching of multiple options selectable via checkboxes
*
@@ -74,7 +80,7 @@ class views_handler_filter_in_operator extends views_handler_filter {
$options['operator']['default'] = 'in';
$options['value']['default'] = array();
- $options['expose']['contains']['reduce'] = array('default' => FALSE);
+ $options['expose']['contains']['reduce'] = array('default' => FALSE, 'bool' => TRUE);
return $options;
}
@@ -284,6 +290,9 @@ class views_handler_filter_in_operator extends views_handler_filter {
}
function admin_summary() {
+ if ($this->is_a_group()) {
+ return t('grouped');
+ }
if (!empty($this->options['exposed'])) {
return t('exposed');
}
diff --git a/kolab.org/www/drupal-7.15/sites/all/modules/views/handlers/views_handler_filter_many_to_one.inc b/kolab.org/www/drupal-7.15/sites/all/modules/views/handlers/views_handler_filter_many_to_one.inc
index c6d6d20..f384796 100644
--- a/kolab.org/www/drupal-7.15/sites/all/modules/views/handlers/views_handler_filter_many_to_one.inc
+++ b/kolab.org/www/drupal-7.15/sites/all/modules/views/handlers/views_handler_filter_many_to_one.inc
@@ -1,6 +1,11 @@
<?php
/**
+ * @file
+ * Definition of views_handler_filter_many_to_one.
+ */
+
+/**
* Complex filter to handle filtering for many to one relationships,
* such as terms (many terms per node) or roles (many roles per user).
*
diff --git a/kolab.org/www/drupal-7.15/sites/all/modules/views/handlers/views_handler_filter_numeric.inc b/kolab.org/www/drupal-7.15/sites/all/modules/views/handlers/views_handler_filter_numeric.inc
index 71d8b9e..982abd8 100644
--- a/kolab.org/www/drupal-7.15/sites/all/modules/views/handlers/views_handler_filter_numeric.inc
+++ b/kolab.org/www/drupal-7.15/sites/all/modules/views/handlers/views_handler_filter_numeric.inc
@@ -1,6 +1,11 @@
<?php
/**
+ * @file
+ * Definition of views_handler_filter_numeric.
+ */
+
+/**
* Simple filter to handle greater than/less than filters
*
* @ingroup views_filter_handlers
@@ -257,6 +262,9 @@ class views_handler_filter_numeric extends views_handler_filter {
}
function admin_summary() {
+ if ($this->is_a_group()) {
+ return t('grouped');
+ }
if (!empty($this->options['exposed'])) {
return t('exposed');
}
diff --git a/kolab.org/www/drupal-7.15/sites/all/modules/views/handlers/views_handler_filter_string.inc b/kolab.org/www/drupal-7.15/sites/all/modules/views/handlers/views_handler_filter_string.inc
index eec7a07..c50eff4 100644
--- a/kolab.org/www/drupal-7.15/sites/all/modules/views/handlers/views_handler_filter_string.inc
+++ b/kolab.org/www/drupal-7.15/sites/all/modules/views/handlers/views_handler_filter_string.inc
@@ -1,6 +1,11 @@
<?php
/**
+ * @file
+ * Definition of views_handler_filter_string.
+ */
+
+/**
* Basic textfield filter to handle string filtering commands
* including equality, like, not like, etc.
*
@@ -13,7 +18,7 @@ class views_handler_filter_string extends views_handler_filter {
function option_definition() {
$options = parent::option_definition();
- $options['expose']['contains']['required'] = array('default' => FALSE);
+ $options['expose']['contains']['required'] = array('default' => FALSE, 'bool' => TRUE);
return $options;
}
@@ -143,6 +148,9 @@ class views_handler_filter_string extends views_handler_filter {
}
function admin_summary() {
+ if ($this->is_a_group()) {
+ return t('grouped');
+ }
if (!empty($this->options['exposed'])) {
return t('exposed');
}
diff --git a/kolab.org/www/drupal-7.15/sites/all/modules/views/handlers/views_handler_relationship.inc b/kolab.org/www/drupal-7.15/sites/all/modules/views/handlers/views_handler_relationship.inc
index 18f21f8..695082b 100644
--- a/kolab.org/www/drupal-7.15/sites/all/modules/views/handlers/views_handler_relationship.inc
+++ b/kolab.org/www/drupal-7.15/sites/all/modules/views/handlers/views_handler_relationship.inc
@@ -1,11 +1,12 @@
<?php
+
/**
* @file
* Views' relationship handlers.
*/
/**
- * @defgroup views_relationship_handlers Views' relationship handlers
+ * @defgroup views_relationship_handlers Views relationship handlers
* @{
* Handlers to tell Views how to create alternate relationships.
*/
@@ -31,6 +32,8 @@
* - label: The default label to provide for this relationship, which is
* shown in parentheses next to any field/sort/filter/argument that uses
* the relationship.
+ *
+ * @ingroup views_relationship_handlers
*/
class views_handler_relationship extends views_handler {
/**
@@ -72,7 +75,7 @@ class views_handler_relationship extends views_handler {
}
$options['label'] = array('default' => $label, 'translatable' => TRUE);
- $options['required'] = array('default' => FALSE);
+ $options['required'] = array('default' => FALSE, 'bool' => TRUE);
return $options;
}
diff --git a/kolab.org/www/drupal-7.15/sites/all/modules/views/handlers/views_handler_relationship_groupwise_max.inc b/kolab.org/www/drupal-7.15/sites/all/modules/views/handlers/views_handler_relationship_groupwise_max.inc
index b027357..23198c6 100644
--- a/kolab.org/www/drupal-7.15/sites/all/modules/views/handlers/views_handler_relationship_groupwise_max.inc
+++ b/kolab.org/www/drupal-7.15/sites/all/modules/views/handlers/views_handler_relationship_groupwise_max.inc
@@ -1,6 +1,6 @@
<?php
-// $Id$
-/*
+
+/**
* @file
* Relationship for groupwise maximum handler.
*/
@@ -64,7 +64,7 @@ class views_handler_relationship_groupwise_max extends views_handler_relationshi
$options['subquery_sort'] = array('default' => NULL);
// Descending more useful.
$options['subquery_order'] = array('default' => 'DESC');
- $options['subquery_regenerate'] = array('default' => FALSE);
+ $options['subquery_regenerate'] = array('default' => FALSE, 'bool' => TRUE);
$options['subquery_view'] = array('default' => FALSE);
$options['subquery_namespace'] = array('default' => FALSE);
@@ -148,21 +148,6 @@ class views_handler_relationship_groupwise_max extends views_handler_relationshi
}
/**
- * Perform any necessary changes to the form values prior to storage.
- * There is no need for this function to actually store the data.
- *
- * Generate the subquery string when the user submits the options, and store
- * it. This saves the expense of generating it when the view is run.
- */
- function options_submit(&$form, &$form_state) {
- // Get the new user options from the form values.
- $new_options = $form_state['values']['options'];
- $subquery = $this->left_query($new_options);
- // Add the subquery string to the options we're about to store.
- $this->options['subquery_string'] = $subquery;
- }
-
- /**
* Helper function to create a pseudo view.
*
* We use this to obtain our subquery SQL.
@@ -177,6 +162,14 @@ class views_handler_relationship_groupwise_max extends views_handler_relationshi
}
/**
+ * When the form is submitted, take sure to clear the subquery string cache.
+ */
+ function options_form_submit(&$form, &$form_state) {
+ $cid = 'views_relationship_groupwise_max:' . $this->view->name . ':' . $this->view->current_display . ':' . $this->options['id'];
+ cache_clear_all($cid, 'cache_views_data');
+ }
+
+ /**
* Generate a subquery given the user options, as set in the options.
* These are passed in rather than picked up from the object because we
* generate the subquery when the options are saved, rather than when the view
@@ -359,7 +352,15 @@ class views_handler_relationship_groupwise_max extends views_handler_relationshi
}
else {
// Get the stored subquery SQL string.
- $def['left_query'] = $this->options['subquery_string'];
+ $cid = 'views_relationship_groupwise_max:' . $this->view->name . ':' . $this->view->current_display . ':' . $this->options['id'];
+ $cache = cache_get($cid, 'cache_views_data');
+ if (isset($cache->data)) {
+ $def['left_query'] = $cache->data;
+ }
+ else {
+ $def['left_query'] = $this->left_query($this->options);
+ cache_set($cid, $def['left_query'], 'cache_views_data');
+ }
}
if (!empty($def['join_handler']) && class_exists($def['join_handler'])) {
diff --git a/kolab.org/www/drupal-7.15/sites/all/modules/views/handlers/views_handler_sort.inc b/kolab.org/www/drupal-7.15/sites/all/modules/views/handlers/views_handler_sort.inc
index 3587290..99574e4 100644
--- a/kolab.org/www/drupal-7.15/sites/all/modules/views/handlers/views_handler_sort.inc
+++ b/kolab.org/www/drupal-7.15/sites/all/modules/views/handlers/views_handler_sort.inc
@@ -1,12 +1,20 @@
<?php
+
+/**
+ * @file
+ * @todo.
+ */
+
/**
- * @defgroup views_sort_handlers Views' sort handlers
+ * @defgroup views_sort_handlers Views sort handlers
* @{
- * Handlers to tell Views how to sort queries
+ * Handlers to tell Views how to sort queries.
*/
/**
- * Base sort handler that has no options and performs a simple sort
+ * Base sort handler that has no options and performs a simple sort.
+ *
+ * @ingroup views_sort_handlers
*/
class views_handler_sort extends views_handler {
@@ -28,7 +36,7 @@ class views_handler_sort extends views_handler {
$options = parent::option_definition();
$options['order'] = array('default' => 'ASC');
- $options['exposed'] = array('default' => FALSE);
+ $options['exposed'] = array('default' => FALSE, 'bool' => TRUE);
$options['expose'] = array(
'contains' => array(
'label' => array('default' => '', 'translatable' => TRUE),
diff --git a/kolab.org/www/drupal-7.15/sites/all/modules/views/handlers/views_handler_sort_date.inc b/kolab.org/www/drupal-7.15/sites/all/modules/views/handlers/views_handler_sort_date.inc
index 8101482..b37cc41 100644
--- a/kolab.org/www/drupal-7.15/sites/all/modules/views/handlers/views_handler_sort_date.inc
+++ b/kolab.org/www/drupal-7.15/sites/all/modules/views/handlers/views_handler_sort_date.inc
@@ -1,6 +1,11 @@
<?php
/**
+ * @file
+ * Definition of views_handler_sort_date.
+ */
+
+/**
* Basic sort handler for dates.
*
* This handler enables granularity, which is the ability to make dates
diff --git a/kolab.org/www/drupal-7.15/sites/all/modules/views/handlers/views_handler_sort_group_by_numeric.inc b/kolab.org/www/drupal-7.15/sites/all/modules/views/handlers/views_handler_sort_group_by_numeric.inc
index 1d1be41..4a521c1 100644
--- a/kolab.org/www/drupal-7.15/sites/all/modules/views/handlers/views_handler_sort_group_by_numeric.inc
+++ b/kolab.org/www/drupal-7.15/sites/all/modules/views/handlers/views_handler_sort_group_by_numeric.inc
@@ -1,4 +1,10 @@
<?php
+
+/**
+ * @file
+ * Definition of views_handler_sort_group_by_numeric.
+ */
+
/**
* Handler for GROUP BY on simple numeric fields.
*
diff --git a/kolab.org/www/drupal-7.15/sites/all/modules/views/handlers/views_handler_sort_menu_hierarchy.inc b/kolab.org/www/drupal-7.15/sites/all/modules/views/handlers/views_handler_sort_menu_hierarchy.inc
index 294b3c4..dacb1fe 100644
--- a/kolab.org/www/drupal-7.15/sites/all/modules/views/handlers/views_handler_sort_menu_hierarchy.inc
+++ b/kolab.org/www/drupal-7.15/sites/all/modules/views/handlers/views_handler_sort_menu_hierarchy.inc
@@ -1,18 +1,53 @@
<?php
/**
+ * @file
+ * Definition of views_handler_sort_menu_hierarchy.
+ */
+
+/**
* Sort in menu hierarchy order.
*
- * Given a field name of 'p' this produces an ORDER BY on p1, p2, ..., p9.
+ * Given a field name of 'p' this produces an ORDER BY on p1, p2, ..., p9;
+ * and optionally injects multiple joins to {menu_links} to sort by weight
+ * and title as well.
+ *
* This is only really useful for the {menu_links} table.
*
* @ingroup views_sort_handlers
*/
class views_handler_sort_menu_hierarchy extends views_handler_sort {
+ function option_definition() {
+ $options = parent::option_definition();
+ $options['sort_within_level'] = array('default' => FALSE);
+ return $options;
+ }
+
+ function options_form(&$form, &$form_state) {
+ parent::options_form($form, $form_state);
+ $form['sort_within_level'] = array(
+ '#type' => 'checkbox',
+ '#title' => t('Sort within each hierarchy level'),
+ '#description' => t('Enable this to sort the items within each level of the hierarchy by weight and title. Warning: this may produce a slow query.'),
+ '#default_value' => $this->options['sort_within_level'],
+ );
+ }
+
function query() {
$this->ensure_my_table();
$max_depth = isset($this->definition['max depth']) ? $this->definition['max depth'] : MENU_MAX_DEPTH;
for ($i = 1; $i <= $max_depth; ++$i) {
+ if ($this->options['sort_within_level']) {
+ $join = new views_join();
+ $join->construct('menu_links', $this->table_alias, $this->field . $i, 'mlid');
+ $menu_links = $this->query->add_table('menu_links', NULL, $join);
+ $this->query->add_orderby($menu_links, 'weight', $this->options['order']);
+ $this->query->add_orderby($menu_links, 'link_title', $this->options['order']);
+ }
+
+ // We need this even when also sorting by weight and title, to make sure
+ // that children of two parents with the same weight and title are
+ // correctly separated.
$this->query->add_orderby($this->table_alias, $this->field . $i, $this->options['order']);
}
}
diff --git a/kolab.org/www/drupal-7.15/sites/all/modules/views/handlers/views_handler_sort_random.inc b/kolab.org/www/drupal-7.15/sites/all/modules/views/handlers/views_handler_sort_random.inc
index 75f3153..eaaaf79 100644
--- a/kolab.org/www/drupal-7.15/sites/all/modules/views/handlers/views_handler_sort_random.inc
+++ b/kolab.org/www/drupal-7.15/sites/all/modules/views/handlers/views_handler_sort_random.inc
@@ -1,6 +1,11 @@
<?php
/**
+ * @file
+ * Definition of views_handler_sort_random.
+ */
+
+/**
* Handle a random sort.
*
* @ingroup views_sort_handlers
diff --git a/kolab.org/www/drupal-7.15/sites/all/modules/views/help/about.html b/kolab.org/www/drupal-7.15/sites/all/modules/views/help/about.html
index fd0a576..8ba77f8 100644
--- a/kolab.org/www/drupal-7.15/sites/all/modules/views/help/about.html
+++ b/kolab.org/www/drupal-7.15/sites/all/modules/views/help/about.html
@@ -1,6 +1,6 @@
-The views module allows administrators and site designers to create, manage, and display lists of content. Each list managed by the views module is known as a "view", and the output of a view is known as a "display". Displays are provided in either block or page form, and a single view may have multiple displays. Optional navigation aids, including a system path and menu item, can be set for each page-based display of a view. By default, views may be created that list content (a <em>Node</em> view type), content revisions (a <em>Node revisions</em> view type) or users (a <em>User</em> view type). A view may be restricted to members of specific user roles, and may be added, edited or deleted at the <a href="base_url:admin/structure/views">views administration page</a>.
+The views module allows administrators and site designers to create, manage, and display lists of content. Each list managed by the views module is known as a "view", and the output of a view is known as a "display". Displays are provided in either block or page form, and a single view may have multiple displays. Optional navigation aids, including a system path and menu item, can be set for each page-based display of a view. By default, views may be created that list content (a <em>Node</em> view type), content revisions (a <em>Node revisions</em> view type) or users (a <em>User</em> view type). A view may be restricted to members of specific user roles, and may be added, edited or deleted at the <a href="base_url:admin/structure/views">views administration page</a>.
-For more technical users and in terms views can be understood simple as a user interface to compose SQL-queries and to pull information (Content, Users, etc.) from the database and show it on a screen as desired.
+For more technical users, views can be understood as a user interface to compose SQL-queries and to pull information (Content, Users, etc.) from the database and show it on a screen as desired.
The "building block" design of the views system provides power and flexibility, allowing parameters to be specified only when needed. While an advanced view may use all of available parameters to create complex and highly interactive applications, a simple content listing may specify only a few options. All views rely on a conceptual framework that includes:
diff --git a/kolab.org/www/drupal-7.15/sites/all/modules/views/help/advanced-settings.html b/kolab.org/www/drupal-7.15/sites/all/modules/views/help/advanced-settings.html
index 23d05d4..6a16859 100644
--- a/kolab.org/www/drupal-7.15/sites/all/modules/views/help/advanced-settings.html
+++ b/kolab.org/www/drupal-7.15/sites/all/modules/views/help/advanced-settings.html
@@ -1,8 +1,43 @@
+In the category <strong>Other</strong> you have different options to set Advanced configurations in your View.
+
+<strong>Machine Name:</strong>
+You can change the default machine name of the view.
+
+<strong>Comment: No comment</strong>
+You can Use the comment option to write comments for your Views, the comments are only shown in the Views UI. Comment your Display for other Maintainer
+
<strong>Use AJAX: No</strong>
-If set, this view will use an AJAX mechanism for paging, table sorting and exposed filters. This prevents the entire page from refreshing. It is not recommended that you use this if this view is the main content of the page as it will prevent deep linking to specific pages, but it is very useful for side content.
-<strong>Distinct: No</strong>
-This will make the view display only distinct items. If there are multiple identical items, each will be displayed only once. You can use this to try and remove duplicates from a view, though it does not always work. Note that this can slow queries down, so use it with caution.
-<strong>Use grouping: No</strong>
+If set, this view will use an AJAX mechanism for paging, table sorting and exposed filters. This prevents the entire page from refreshing. It is not recommended that you use this if this view is the main content of the page as it will prevent deep linking to specific pages, but it is very useful for side content. Block displays require this setting to be ON if exposed filters are being used.
+
+<strong>Hide attachments in summary: No</strong>
+
+<strong>Use aggregation: No</strong>
All fields that are selected for grouping will be collapsed to one record per distinct value. Other fields which are selected for aggregation will have the function run on them. For example, you can group nodes on title and count the number of nids in order to get a list of duplicate titles.
+For more Information how aggregation work see the "Use Aggregation" Help Page
+
+<strong>Query settings: Settings</strong>
+
+Here can you set advanced Settings for the SQL Settings
+<ul>
+ <li><strong>Disable SQL rewriting</strong></li>
+
+ <li><strong>Distinct: No</strong></li>
+ This will make the view display only distinct items. If there are multiple identical items, each will be displayed only once. You can use this to try and remove duplicates from a view, though it does not always work. Note that this can slow queries down, so use it with caution.
+
+ <li><strong>Use Slave Server</strong></li>
+
+ <li><strong>Query Comment</strong></li>
+</ul>
+<strong>Field Language: Current user's language</strong>
+
<strong>Caching: None</strong>
You can choose a "Time-based" Caching if you want. With it you get the option to choose the length of time raw query results should be cached and "The length of time rendered HTML output should be cached."
+
+<strong>Link display: Page</strong>
+
+<strong>CSS class: None</strong>
+You can define some own CSS Classes for your View
+
+<strong>Theme: Information</strong>
+Clicking on the "Theme: Information" link provides you with a listing of all posiible theming files. The highlighted files are the ones Views is currently using. All other filenames are suggested templates.
+For more Information see the <a href="/help/views/analyze-theme" title="Theme Information" >"Theme information"</a> Page
diff --git a/kolab.org/www/drupal-7.15/sites/all/modules/views/help/advanced-style-settings.html b/kolab.org/www/drupal-7.15/sites/all/modules/views/help/advanced-style-settings.html
new file mode 100644
index 0000000..9c90c0f
--- /dev/null
+++ b/kolab.org/www/drupal-7.15/sites/all/modules/views/help/advanced-style-settings.html
@@ -0,0 +1,30 @@
+In Views 3 you can set Advanced Style Settings, they help you to insert markup of your own from the Views UI, so that you can fairly easily override the default markup without having to restyle via templates.
+
+
+<ul>
+<li> Customize field HTML</li>
+With Customize field HTML you can generate html tags around the field.
+
+<li>Customize label HTML</li>
+Here you can generate html tags around the label of a field.
+
+<li>Customize field and label wrapper HTML</li>
+Here you can generate html tags around the wrapper of the label and field
+</ul>
+
+<a href="path:images/views3-semanticviews.png"><img src="path:images/views3-semanticviews.png" /></a>
+
+Usage example
+
+In a view with a field:
+<ol>
+<li>Configure the field. (Click on the field.)</li>
+
+<li>In the modal that opens, scroll down to <strong>Style Settings</strong>.</li>
+
+<li>Choose one or more of the three <i>Customize</i> options. This will reveal a dropdown menu where you can choose from one or more HTML tags to use on that field and allow you to add a CSS class specific to that field should you desire.</li>
+
+<li>Decide if you want to keep the Views default classes. Unchecking this box means your markup is *it*.</li>
+</ol>
+
+In Views 2 you needed for Style Settings the <a href="http://drupal.org/project/semanticviews">Semantic Views</a> Modul, now the Semantic Views module has been mostly incorporated into Views 3.x. Semantic Views is still around for people who need it, though. For some details on how the original module is different from the Views implementation, please see <a href="http://drupal.org/node/1013876">this issue</a>.
diff --git a/kolab.org/www/drupal-7.15/sites/all/modules/views/help/api-forms.html b/kolab.org/www/drupal-7.15/sites/all/modules/views/help/api-forms.html
index f7f4ff6..2772909 100644
--- a/kolab.org/www/drupal-7.15/sites/all/modules/views/help/api-forms.html
+++ b/kolab.org/www/drupal-7.15/sites/all/modules/views/help/api-forms.html
@@ -76,8 +76,6 @@ Then, views_form would call form_example_confirmation($form, $form_state, $view,
<ul>
<li>template_preprocess_views_view()</li>
<li>views_form()</li>
-<li>views_form_validate()</li>
-<li>views_form_submit()</li>
<li>views_form_views_form()</li>
<li>views_form_views_form_validate()</li>
<li>views_form_views_form_submit()</li>
@@ -87,6 +85,4 @@ Then, views_form would call form_example_confirmation($form, $form_state, $view,
<h2>Hooks</h2>
<ul>
<li>hook_views_form_substitutions()</li>
-<li>hook_views_form_validate($form, &$form_state)</li>
-<li>hook_views_form_submit($form, &$form_state)</li>
</ul>
diff --git a/kolab.org/www/drupal-7.15/sites/all/modules/views/help/api-handlers.html b/kolab.org/www/drupal-7.15/sites/all/modules/views/help/api-handlers.html
deleted file mode 100644
index 9eca851..0000000
--- a/kolab.org/www/drupal-7.15/sites/all/modules/views/help/api-handlers.html
+++ /dev/null
@@ -1,71 +0,0 @@
-In Views, a handler is an object that is part of the view and is part of the query building flow.
-
-Handlers are objects; much of the time, the base handlers will work, but often you'll need to override the handler for something. One typical handler override will be views_handler_filter_operator_in which allows you to have a filter select from a list of options; you'll need to override this to provide your list.
-
-Handlers have two distint code flows; the UI flow and the view building flow.
-
-For the query flow:
-
-<dl>
-<dt>handler-&gt;construct()</dt>
-<dd>Create the initial handler; at this time it is not yet attached to a view. It is here that you can set basic defaults if needed, but there will be no knowledge of the environment yet.</dd>
-<dt>handler-&gt;set_definition()</dt>
-<dd>Set the data from hook_views_data() relevant to the handler.</dd>
-<dt>handler-&gt;init()</dt>
-<dd>Attach the handler to a view, and usually provides the options from the display.</dd>
-<dt>handler-&gt;pre_query()</dt>
-<dd>Run prior to the query() stage to do early processing.</dd>
-<dt>handler-&gt;query()</dt>
-<dd>Do the bulk of the work this handler needs to do to add itself to the query.</dd>
-</dl>
-
-Fields, being the only handlers concerned with output, also have an extended piece of the flow:
-<dl>
-<dt>handler-&gt;pre_render(&$values)</dt>
-<dd>Called prior to the actual rendering, this allows handlers to query for extra data; the entire resultset is available here, and this is where items that have "multiple values" per record can do their extra query for all of the records available. There are several examples of this at work in the code.</dd>
-<dt>handler-&gt;render()</dt>
-<dd>This does the actual work of rendering the field.</dd>
-</dl>
-
-Most handlers are just extensions of existing classes with a few tweaks that are specific to the field in question. For example:
-
-<pre>
-/**
- * Filter by node type
- *
- * @ingroup views_filter_handlers
- */
-class views_handler_filter_node_type extends views_handler_filter_in_operator {
- function get_value_options() {
- if (!isset($this-&gt;value_options)) {
- $this-&gt;value_title = t('Node type');
- $types = node_get_types();
- foreach ($types as $type =&gt; $info) {
- $options[$type] = $info-&gt;name;
- }
- $this-&gt;value_options = $options;
- }
- }
-}
-</pre>
-
-<i>views_handler_filter_in_operator</i> provides a simple mechanism to set the list used and the rest of the handler is perfectly fine for this.
-
-Handlers are stored in their own files and loaded on demand.
-Like all other module files, they must first be registered through the module's info file. For example:
-<pre>
-name = Example module
-description = "Gives an example of a module."
-core = 7.x
-files[] = example.module
-files[] = example.install
-
-; Views handlers
-files[] = includes/views/handlers/example_handler_argument_string.inc
-</pre>
-
-The best place to learn more about handlers and how they work is to explore <a href="http://views.doc.logrus.com">the views API site</a> and use existing handlers as a guide and a model. Understanding how views_handler and its child classes work is handy but you can do a lot just following these models. You can also explore the views module directory, particularly node.views.inc.
-
-Please note that while all handler names in views are prefixed with views_, you should use your own module's name to prefix your handler names in order to ensure namespace safety. Note that the basic pattern for handler naming goes like this:
-
-[module]_handler_[type]_[tablename]_[fieldname]. Sometimes table and fieldname are not appropriate, but something that resembles what the table/field would be can be used.
diff --git a/kolab.org/www/drupal-7.15/sites/all/modules/views/help/api-plugins.html b/kolab.org/www/drupal-7.15/sites/all/modules/views/help/api-plugins.html
deleted file mode 100644
index 4d1c120..0000000
--- a/kolab.org/www/drupal-7.15/sites/all/modules/views/help/api-plugins.html
+++ /dev/null
@@ -1,114 +0,0 @@
-In Views, a plugin is a bit like a handler, but plugins are not directly responsible for building the query. Instead, they are objects that are used to display the view or make other modifications.
-
-There are 10 types of plugins in Views:
-<dl>
-<dt>Display</dt>
-<dd>Display plugins are responsible for controlling <strong>where</strong> a view lives. Page and block are the most common displays, as well as the ubiquitous 'default' display which is likely what will be embedded.</dd>
-<dt>Style</dt>
-<dd>Style plugins control how a view is displayed. For the most part they are object wrappers around theme templates.
-<dt>Row style</dt>
-<dd>Row styles handle each individual record from a node.</dd>
-<dt>Argument default</dt>
-<dd>Argument default plugins allow pluggable ways of providing arguments for blocks. Views includes plugins to extract node and user IDs from the URL; additional plugins could be used for a wide variety of tasks.</dd>
-<dt>Argument validator</dt>
-<dd>Validator plugins can ensure arguments are valid, and even do transformations on the arguments.</dd>
-<dt>Access</dt>
-<dd>Access plugins are responsible for controlling access to the view.</dd>
-<dt>Query</dt>
-<dd>Query plugins generate and execute a query, it can be seen as a data backend. The default implementation
-is using sql.</dd>
-<dt>Cache</dt>
-<dd>Cache plugins control the storage and loading of caches. Currently they can do both result and render caching,
-but maybe one day cache the generated query</dd>
-<dt>Pager plugins</dt>
-<dd>Pager plugins take care of everything regarding pagers. From getting and setting the total amount of items
-to render the pager and setting the global pager arrays.</dd>
-<dt>Exposed form plugins</dt>
-<dd>Exposed form plugins are responsible for building, rendering and controlling exposed forms. They can expose new
-parts of the view to the user and more.</dd>
-<dt>Localization plugins</dt>
-<dd>Localization plugins take care how the view options are translated. There are example implementations
-for t(), none translation and i18n.</dd>
-</dl>
-
-Plugins are registered by implementing <strong>hook_views_plugins()</strong> in your modulename.views.inc file and returning an array of data.
-For examples please look at views_views_plugins() in views/includes/plugins.inc as it has examples
-for all of them.
-
-For example plugins please look at the one provided by views, too.
-
-Similar to handlers take sure that you added the plugin file to the module.info.
-
-The array will look something like this:
-<pre>
- return array(
- 'display' =&gt; array(
- // ... list of display plugins,
- ),
- 'style' =&gt; array(
- // ... list of style plugins,
- ),
- 'row' =&gt; array(
- // ... list of row style plugins,
- ),
- 'argument default' =&gt; array(
- // ... list of argument default plugins,
- ),
- 'argument validator' =&gt; array(
- // ... list of argument validator plugins,
- ),
- 'access' =&gt; array(
- // ... list of access plugins,
- ),
- 'query' =&gt; array(
- // ... list of query plugins,
- ),,
- 'cache' =&gt; array(
- // ... list of cache plugins,
- ),,
- 'pager' =&gt; array(
- // ... list of pager plugins,
- ),,
- 'exposed_form' =&gt; array(
- // ... list of exposed_form plugins,
- ),,
- 'localization' =&gt; array(
- // ... list of localization plugins,
- ),
- );
-</pre>
-
-Each plugin will be registered with an identifier for the plugin, plus a fairly lengthy list of items that can define how and where the plugin is used. Here is an example from Views core:
-
-<pre>
- 'node' =&gt; array(
- 'title' =&gt; t('Node'),
- 'help' =&gt; t('Display the node with standard node view.'),
- 'handler' =&gt; 'views_plugin_row_node_view',
- 'path' =&gt; drupal_get_path('module', 'views') . '/modules/node', // not necessary for most modules
- 'theme' =&gt; 'views_view_row_node',
- 'base' =&gt; array('node'), // only works with 'node' as base.
- 'uses options' =&gt; TRUE,
- 'type' =&gt; 'normal',
- ),
-</pre>
-
-Of particular interest is the <em>path</em> directive, which works a little differently from handler registration; each plugin must define its own path, rather than relying on a global info for the paths. For example:
-
-<pre>
- 'feed' =&gt; array(
- 'title' =&gt; t('Feed'),
- 'help' =&gt; t('Display the view as a feed, such as an RSS feed.'),
- 'handler' =&gt; 'views_plugin_display_feed',
- 'uses hook menu' =&gt; TRUE,
- 'use ajax' =&gt; FALSE,
- 'use pager' =&gt; FALSE,
- 'accept attachments' =&gt; FALSE,
- 'admin' =&gt; t('Feed'),
- 'help topic' =&gt; 'display-feed',
- ),
-</pre>
-
-Please be sure to prefix your plugin identifiers with your module name to ensure namespace safety; after all, two different modules could try to implement the 'grid2' plugin, and that would cause one plugin to completely fail.
-
-...TODO: Finish this document....
diff --git a/kolab.org/www/drupal-7.15/sites/all/modules/views/help/api-tables.html b/kolab.org/www/drupal-7.15/sites/all/modules/views/help/api-tables.html
index 47af4ab..cafbbab 100644
--- a/kolab.org/www/drupal-7.15/sites/all/modules/views/help/api-tables.html
+++ b/kolab.org/www/drupal-7.15/sites/all/modules/views/help/api-tables.html
@@ -1,15 +1,21 @@
-Tables are described to Views via hook_views_data(), which returns an array of table information, keyed by the name of the table. For example, if your module is describing three tables, 'foo', 'bar' and 'baz', your array will look like this:
-<pre>$data = array(
- 'foo' =&gt; array(
- // ...info here...
- ),
- 'bar' =&gt; array(
- // ...info here...
- ),
- 'baz' =&gt; array(
- // ...info here...
- ),
-);
+Tables are described to Views by implementing hook_views_data(). This should be placed in MODULENAME.views.inc and it will be autoloaded (see <a href="topic:views/api">Views' API</a>). The hook implementation should return an array of table information, keyed by the name of the table. For example, if your module is describing three tables, 'foo', 'bar' and 'baz', your hook will look like this:
+<pre> /**
+ * Implements hook_views_data().
+ */
+ function MODULENAME_views_data() {
+ $data = array(
+ 'foo' =&gt; array(
+ // ...info about the table named 'foo'...
+ ),
+ 'bar' =&gt; array(
+ // ...info about the table named 'bar'...
+ ),
+ 'baz' =&gt; array(
+ // ...info about the table named 'baz'...
+ ),
+ );
+ return $data;
+ }
</pre>
The key should be the actual database name of the table (not including prefix), but it can be an alias as long as the join information (explained later) contains the real name of the table.
@@ -230,7 +236,7 @@ The following items are allowed in the field definition:
<dt>sort</dt>
<dd>A handler definition for the "Sort criteria" section, which will be used to add an ORDER BY clause to the view. The definition is an array; the contents of the array are completely up to the handler, other than the 'handler' definition. If omitted, handler will default to 'views_handler_sort'.</dd>
<dt>relationship</dt>
-<dd>A handler definition for the "Field" section, which is a way to bring in new or alternative base tables in the view. The definition is an array; the contents of the array are completely up to the handler, other than the 'handler' definition. If omitted, handler will default to 'views_handler_relationship'. The basic relationship handler requires 'base' and 'base field' to be set; 'base' and 'base field' represent the "right" half of the join that will use this field as the left side.</dd>
+<dd>A handler definition for the "Field" section, which is a way to bring in new or alternative base tables in the view. The definition is an array; the contents of the array are completely up to the handler, other than the 'handler' definition. If omitted, handler will default to 'views_handler_relationship'. All relationships need the 'base' to be set. The basic relationship handler also requires 'base field' to be set. 'base' and 'base field' represent the "right" half of the join that will use this field as the left side.</dd>
<dt>argument</dt>
<dd>A handler definition for the "Field" section, which is method of accepting user input from the URL or some other source. The definition is an array; the contents of the array are completely up to the handler, other than the 'handler' definition. If omitted, handler will default to 'views_handler_argument'.</dd>
</dl>
diff --git a/kolab.org/www/drupal-7.15/sites/all/modules/views/help/api.html b/kolab.org/www/drupal-7.15/sites/all/modules/views/help/api.html
index 6337e8b..2b743a7 100644
--- a/kolab.org/www/drupal-7.15/sites/all/modules/views/help/api.html
+++ b/kolab.org/www/drupal-7.15/sites/all/modules/views/help/api.html
@@ -2,7 +2,7 @@ Views allows modules to describe their tables relationships to each other, as we
Views also allows modules to create new display types, style types, row styles, argument default handlers and argument validators via <strong>hook_views_handlers()</strong> and <strong>hook_views_plugins()</strong>.
-These hooks are kept in a file named MODULENAME.views.inc. This file is automatically included upon need, so there is no need to try and include this in hook_init or any other method of including .inc files. This file should store hook_views_data, hook_views_data_alter(), hook_views_plugins(), hook_views_handlers(), as well as any other hooks and subsidiary data that will only be used by your module when Views is active. All handlers and plugins provided by your module should be in separate .inc files.
+These hooks are kept in a file named MODULENAME.views.inc. This file is automatically included upon need, so there is no need to try and include this in hook_init or any other method of including .inc files. This file should store hook_views_data, hook_views_data_alter(), hook_views_plugins(), hook_views_handlers(), as well as any other hooks and subsidiary data that will only be used by your module when Views is active. All handlers and plugins provided by your module should be in separate .inc files, and must be referenced in your module's .info file with the files[] directive.
There are two similar files, MODULENAME.views_default.inc and MODULENAME.views_convert.inc which contain default views and views 1 to views 2 convert helpers, respectively.
diff --git a/kolab.org/www/drupal-7.15/sites/all/modules/views/help/example-slideshow-thumb-pager.html b/kolab.org/www/drupal-7.15/sites/all/modules/views/help/example-slideshow-thumb-pager.html
new file mode 100644
index 0000000..1c83984
--- /dev/null
+++ b/kolab.org/www/drupal-7.15/sites/all/modules/views/help/example-slideshow-thumb-pager.html
@@ -0,0 +1,54 @@
+<p>In this example you will create a views block that displays images in a slideshow using thumbnails of the images as a pager underneath the slideshow. This will demonstrate using <em>Views Slideshow </em>and <em>Image Styles</em> to display images.</p>
+
+<p>For this example, we are going to display a single image from each content item of the type &quot;Photos&quot;, which we assume you have already set up with an image field. We are also assuming that <em>Views Slideshow</em> and at least one plugin is installed and activated.</p>
+
+<h3>Creating the image styles</h3>
+
+<p>The first step is creating the right image styles to display the images from the node. We will create one for the slideshow image, and one for the pagers. Go to <a target="_blank" href="base_url:admin/structure/views/add">Image Styles</a> and create the following two styles:</p>
+
+<dl>
+ <dt>Style name</dt>
+ <dd>slideshow_image</dd>
+ <dt>Effects</dt>
+ <dd>Scale and crop: 600px wide, 400px high</dd>
+</dl>
+<dl>
+ <dt>Style name</dt>
+ <dd>slideshow_thumbnail</dd>
+ <dt>Effects</dt>
+ <dd>Scale and crop: 30px wide, 20px high</dd>
+</dl>
+
+<h3>Creating the View and block</h3>
+
+<p>The next step is creating a view for the slideshow. Because the block will show the images in content, this view is considered a "Content" view. Go to <a target="_blank" href="base_url:admin/structure/views/add">add new view</a>, enter the following properties, and click <strong>Next</strong>:</p>
+<dl>
+ <dt>View name</dt>
+ <dd>Photo Slideshow</dd>
+ <dt>Description</dt>
+ <dd>Slideshow of images from Photos.</dd>
+</dl>
+
+<p>Choose <strong>Show</strong> <em>Content</em> <strong>of type</strong> <em>Photos</em>. You can choose any way you wish to sort the content.</p>
+<p>Untick the box next to <strong>Create a page</strong> and tick the box next to <strong>Create a block</strong>. Enter a block title and choose Slideshow from the <strong>Display format</strong> select box. Select <em>fields</em> from the other select box. Leave the remaining settings as they are.</p>
+<p>Click on <strong>Continue &amp; edit</strong>.</p>
+
+<h3>Editing the view settings</h3>
+
+<p>Turn off the pager by clicking on <strong>Display a specified number of items</strong> in the middle column and selecting <strong>Display all items</strong> in the next screen, and applying the settings.</p>
+<p>Enter a Block name by clicking on <strong>None</strong> at the top of the middle column.</p>
+<p>Next, remove the <em>Content: Title</em> field from the fields list in the left column by blicking on <strong>rearrage</strong> under the arrow.</p>
+<p>Next we have to add the thumbnail image field. Click on <strong>Add</strong> under the fields section and select your image field from the list. In the next screen, turn off the label, select <em>Exclude from display</em> and select <em>slideshow_thumbnail</em> from the Image Style select box. Under MORE, enter <em>Thumbnail</em> under Administrative Title.</p>
+<p>Click on <strong>Apply (all displays)</strong>.</p>
+<p>Now we have to add the image field to display in the slideshow. Clcik on <strong>Add</strong> under the fields section and select your image field from the list. In the next screen, turn off the label and select <em>slideshow_image</em> from the Image Style select box. Under MORE, enter <em>Display Image</em> under Administrative Title.</p>
+<p>Click on <strong>Apply (all displays)</strong>.</p>
+
+<h3>Editing the slideshow settings</h3>
+
+<p>Click on <strong>Settings</strong> next to Format: Slideshow in the first column. In the screen that opens we can choose the options for our slideshow.</p>
+<p>For the purpose of this example, we will only add the thumbnails as a pager, and leave the remaining slideshow settings as they are. Select the tick box next to <em>Pager</em> under Bottom Widgets. Select <em>Fields</em> from the Pager Type select box. Select the tick box next to <em>Thumbnail</em>.</p>
+<p>Click on <strong>Apply (all displays)</strong>.</p>
+
+<h3>Saving &amp; testing the view</h3>
+<p>Click on <strong>Save</strong> to save the view.</p>
+<p>You can test the view by adding the block you have created to your theme.</p>
diff --git a/kolab.org/www/drupal-7.15/sites/all/modules/views/help/filter.html b/kolab.org/www/drupal-7.15/sites/all/modules/views/help/filter.html
index 752617f..cb84f8a 100644
--- a/kolab.org/www/drupal-7.15/sites/all/modules/views/help/filter.html
+++ b/kolab.org/www/drupal-7.15/sites/all/modules/views/help/filter.html
@@ -15,6 +15,21 @@ When you click the Rearrange Icon you can first rearrange your filters, easily d
When you want that the user to select their own filter, you can expose the filter. A selection box will show for the user and they will be able to select one item. After that the view will reload and only the selected item will be displayed. You can also choose to expose the selection to a block, see <a href="topic:views/exposed-form">here</a>.
+For exposed filters, you can create a grouped filter. When filters are in a group, each item of the group represents a set of operators and values. The following table illustrates how this feature works. The values of the first column of the table are displayed as options of a single select box:
+
+<table>
+<thead>
+<tr><th>What the user see</th><th>What views does</th></tr>
+</thead>
+<tbody>
+<tr><td>Is lower than 10</td><td><strong>Operator:</strong> Is Lower than. <strong>Value:</strong> 10</td></tr>
+<tr><td>Is between 10 and 20</td><td><strong>Operator:</strong> Is between. <strong>Value:</strong> 10 and 20</td></tr>
+<tr><td>Is greater than 20</td><td><strong>Operator:</strong> Is Greater. <strong>Value:</strong> 20</td></tr>
+</tbody>
+</table>
+
+<strong>Please note:</strong> When using grouped filters with the option: 'Enable to allow users to select multiple items' checked, you probably may want to to place the filter in a separated group and define the operator of the group as 'OR'. This may be neccesary because in order to use multiple times the same filter, all options have to be applied using the OR operator, if not, probably you will get nothing listed since usually items in a group are mutually exclusive.
+
Taxonomy filters have been significantly altered in Views 7.x-3.x. D7 significantly re-organized taxonomy, there was a lot of duplicate taxonomy related fields and filters. Some of them were removed to try and reduce confusion between them. Implicit relationships to taxonomy have been removed, in favor of explicit relationships. If the filters you can find don't do what you need, try adding either the related taxonomy terms relationship, or a relationship on the specific taxonomy field. That will give you the term specific filters.
You can override the complete filter section - see <a href="topic:views/overrides">here</a> for more information.
diff --git a/kolab.org/www/drupal-7.15/sites/all/modules/views/help/group-by.html b/kolab.org/www/drupal-7.15/sites/all/modules/views/help/group-by.html
index d90ed62..871fb53 100644
--- a/kolab.org/www/drupal-7.15/sites/all/modules/views/help/group-by.html
+++ b/kolab.org/www/drupal-7.15/sites/all/modules/views/help/group-by.html
@@ -6,7 +6,7 @@ This is another major new feature for Views that has been long requested. It inc
Grouping is available for sorts and filters. To use grouping, “Use grouping” must be enabled on a per-view basis in the Views UI. This is toggled in the Advanced settings box by clicking the link next to “Use grouping”. Once you activate this checkbox (be sure to read the notes in the UI!), functions for aggregating particular fields will become available. The gear icon that should be familiar to users with any amount of Views experience will now appear next to any sorted or filtered field with aggregation capabilities. Choosing that icon will open up the configuration for the aggregation functions. As an example, this could be used to count things like number of posts in a day, or number of published posts. This could also be used to sum the values of a row, instead of everything in the view.
-Setting only the "Use aggregation" turned on itself does nothing. It only gives the possibility to set Aggregation types.
+Setting only the "Use aggregation" turned on itself does nothing. It only gives the possibility to set Aggregation types.
<div class="help-box" style="text-align:center">
<a href="path:images/views3-group-aggregation-types.png"><img src="path:images/views3-group-aggregation-types.png" /></a>
diff --git a/kolab.org/www/drupal-7.15/sites/all/modules/views/help/images/views3-views-all.png b/kolab.org/www/drupal-7.15/sites/all/modules/views/help/images/views3-views-all.png
new file mode 100644
index 0000000..27ce88e
--- /dev/null
+++ b/kolab.org/www/drupal-7.15/sites/all/modules/views/help/images/views3-views-all.png
Binary files differ
diff --git a/kolab.org/www/drupal-7.15/sites/all/modules/views/help/misc-notes.html b/kolab.org/www/drupal-7.15/sites/all/modules/views/help/misc-notes.html
index a9d318f..8efc1f9 100644
--- a/kolab.org/www/drupal-7.15/sites/all/modules/views/help/misc-notes.html
+++ b/kolab.org/www/drupal-7.15/sites/all/modules/views/help/misc-notes.html
@@ -1,4 +1,3 @@
-<!-- $Id: $ -->
<h3>Image Assist &amp; ImageField Assist</h3>
Under certain conditions these modules can block access to the header input section of the admin.
They need to be disabled on certain views paths. To do this go to
diff --git a/kolab.org/www/drupal-7.15/sites/all/modules/views/help/style-jump.html b/kolab.org/www/drupal-7.15/sites/all/modules/views/help/style-jump.html
index d08e67f..dc8532f 100644
--- a/kolab.org/www/drupal-7.15/sites/all/modules/views/help/style-jump.html
+++ b/kolab.org/www/drupal-7.15/sites/all/modules/views/help/style-jump.html
@@ -1,6 +1,6 @@
With the <strong>jump menu</strong> style can you create selectbox menus for the content of your site.
-<a href="path:images/views3-jump-style-menu.png"><img src="path:images/views3-jump-style-menu.png" /></a>
+<a href="path:images/views3-jump-style-menu.png"><img src="path:images/views3-jump-style-menu.png" /></a>
The <strong>jump menu</strong> style will display each row of your view within a jump menu. This style requires that your view's <a href="topic:views/style-row">row style</a> is set to <a href="topic:views/style-fields">fields</a>.
diff --git a/kolab.org/www/drupal-7.15/sites/all/modules/views/help/view-add.html b/kolab.org/www/drupal-7.15/sites/all/modules/views/help/view-add.html
index 233d885..619d1b6 100644
--- a/kolab.org/www/drupal-7.15/sites/all/modules/views/help/view-add.html
+++ b/kolab.org/www/drupal-7.15/sites/all/modules/views/help/view-add.html
@@ -1,7 +1,13 @@
-When you want to create a new view you can enter the following information about it.
-First, you must enter a <strong>view name</strong>. This is the unique name of the view. It must contain only alphanumeric characters and underscores; it is used to identify the view internally and to generate unique theming template names for this view. If you are overriding a module provided view, the name must not be changed or a new view will be created instead of overriding.
-You can enter a <strong>description of the view</strong>. This description will appear on the Views administrative UI to tell you what the view is about.
-You can enter a <strong>view tag</strong>. It will be used help sort views on the administrative page.
+<p>When you want to create a new view navigate to <strong> Structure > Views </strong>. There you can see all the views specified. Fresh install has a few examples ready and you can choose "edit" to investigate how the is made. To create a new view press "Add new view".</p>
+
+<div class="help-box" style="text-align:center">
+<a href="path:images/views3-views-all.png"><img src="path:images/views3-views-all.png" /></a>
+<em>All the created Views</em>
+</div>
+
+<p>You can enter the following information about it.</p>
+<p> First, you must enter a <strong>view name</strong>. This is the unique name of the view. It must contain only alphanumeric characters and underscores; it is used to identify the view internally and to generate unique theming template names for this view. If you are overriding a module provided view, the name must not be changed or a new view will be created instead of overriding.</p>
+<p> You can enter a <strong>description of the view</strong>. This description will appear on the Views administrative UI to tell you what the view is about. You can enter a <strong>view tag</strong>. It will be used help sort views on the administrative page.</p>
You must choose a view type.
<dl>
<dt>Node</dt>
diff --git a/kolab.org/www/drupal-7.15/sites/all/modules/views/help/views.help.ini b/kolab.org/www/drupal-7.15/sites/all/modules/views/help/views.help.ini
index 4a249f5..bd2d457 100644
--- a/kolab.org/www/drupal-7.15/sites/all/modules/views/help/views.help.ini
+++ b/kolab.org/www/drupal-7.15/sites/all/modules/views/help/views.help.ini
@@ -34,11 +34,6 @@ parent = getting-started
weight = 40
-[example-bulk-export]
-title = "Create a module from bulk exported views"
-parent = getting-started
-weight = 50
-
[view-add]
title = "Add a View"
weight = -10
@@ -173,8 +168,8 @@ title = "Using CSS with Views"
parent = style-settings
weight = 20
-[semantic-views]
-title = "Semantic Views"
+[advanced-style-settings]
+title = "Advanced Style Settings"
parent = style-settings
[group-by]
@@ -358,3 +353,7 @@ weight = 218
[example-filter-by-current-user]
title = "Example to filter content by the current logged-in user"
weight = 219
+
+[example-slideshow-thumb-pager]
+title = "Example to create a slideshow with thumbnails as a pager underneath"
+weight = 220
diff --git a/kolab.org/www/drupal-7.15/sites/all/modules/views/includes/admin.inc b/kolab.org/www/drupal-7.15/sites/all/modules/views/includes/admin.inc
index 80aa592..ff4a99f 100644
--- a/kolab.org/www/drupal-7.15/sites/all/modules/views/includes/admin.inc
+++ b/kolab.org/www/drupal-7.15/sites/all/modules/views/includes/admin.inc
@@ -1,6 +1,7 @@
<?php
+
/**
- * @file admin.inc
+ * @file
* Provides the Views' administrative interface.
*/
@@ -399,11 +400,11 @@ function views_ui_add_form($form, &$form_state) {
/**
* Helper form element validator: integer.
*
- * @see _element_validate_integer_positive
- *
* The problem with this is that the function is private so it's not guaranteed
* that it might not be renamed/changed. In the future field.module or something else
* should provide a public validate function.
+ *
+ * @see _element_validate_integer_positive()
*/
function views_element_validate_integer($element, &$form_state) {
$value = $element['#value'];
@@ -713,9 +714,7 @@ function views_ui_add_form_save_submit($form, &$form_state) {
$form_state['redirect'] = 'admin/structure/views';
}
$view->save();
- menu_rebuild();
- cache_clear_all('*', 'cache_views', TRUE);
- cache_clear_all();
+
$form_state['redirect'] = 'admin/structure/views';
if (!empty($view->display['page'])) {
$display = $view->display['page'];
@@ -851,7 +850,7 @@ function views_ui_break_lock_confirm($form, &$form_state, $view) {
$form = array();
if (empty($view->locked)) {
- $form['#markup'] = t('There is no lock on view %view to break.', array('%name' => $view->name));
+ $form['message']['#markup'] = t('There is no lock on view %name to break.', array('%name' => $view->name));
return $form;
}
@@ -966,11 +965,13 @@ function views_ui_build_preview($view, $display_id, $render = TRUE) {
*
* @todo Rename to views_ui_edit_view_form(). See that function for the "old"
* version.
+ *
+ * @see views_ui_ajax_get_form()
*/
function views_ui_edit_form($form, &$form_state, $view, $display_id = NULL) {
// Do not allow the form to be cached, because $form_state['view'] can become
// stale between page requests.
- // @see views_ui_ajax_get_form() for how this affects #ajax.
+ // See views_ui_ajax_get_form() for how this affects #ajax.
// @todo To remove this and allow the form to be cacheable:
// - Change $form_state['view'] to $form_state['temporary']['view'].
// - Add a #process function to initialize $form_state['temporary']['view']
@@ -1459,7 +1460,7 @@ function views_ui_edit_form_submit_delay_destination($form, &$form_state) {
* having them as secondary local tasks isn't desired. The caller is responsible
* for setting the active tab's #active property to TRUE.
*
- * @param $view
+ * @param view $view
* The view which will be edited.
* @param $display_id
* The display_id which is edited on the current request.
@@ -1480,7 +1481,7 @@ function views_ui_edit_page_display_tabs($view, $display_id = NULL) {
if (!empty($display->deleted)) {
$tabs[$id]['#link']['localized_options']['attributes']['class'][] = 'views-display-deleted-link';
}
- if (empty($display->options['enabled'])) {
+ if (isset($display->display_options['enabled']) && !$display->display_options['enabled']) {
$tabs[$id]['#link']['localized_options']['attributes']['class'][] = 'views-display-disabled-link';
}
}
@@ -1490,6 +1491,18 @@ function views_ui_edit_page_display_tabs($view, $display_id = NULL) {
$tabs['default']['#access'] = FALSE;
}
+ // Mark the display tab as red to show validation errors.
+ $view->validate();
+ foreach ($view->display as $id => $display) {
+ if (!empty($view->display_errors[$id])) {
+ // Always show the tab.
+ $tabs[$id]['#access'] = TRUE;
+ // Add a class to mark the error and a title to make a hover tip.
+ $tabs[$id]['#link']['localized_options']['attributes']['class'][] = 'error';
+ $tabs[$id]['#link']['localized_options']['attributes']['title'] = t('This display has one or more validation errors; please review it.');
+ }
+ }
+
return $tabs;
}
@@ -1914,7 +1927,7 @@ function views_ui_pre_render_move_argument_options($form) {
* While doing that, create a container element underneath each option, which
* contains the settings related to that option.
*
- * @see form_process_radios
+ * @see form_process_radios()
*/
function views_ui_process_container_radios($element) {
if (count($element['#options']) > 0) {
@@ -1945,7 +1958,7 @@ function views_ui_process_container_radios($element) {
return $element;
}
-/*
+/**
* Import a view from cut & paste.
*/
function views_ui_import_page($form, &$form_state) {
@@ -1960,6 +1973,12 @@ function views_ui_import_page($form, &$form_state) {
'#title' => t('Replace an existing view if one exists with the same name'),
);
+ $form['bypass_validation'] = array(
+ '#type' => 'checkbox',
+ '#title' => t('Bypass view validation'),
+ '#description' => t('Bypass the validation of plugins and handlers when importing this view.'),
+ );
+
$form['view'] = array(
'#type' => 'textarea',
'#title' => t('Paste view code here'),
@@ -2030,38 +2049,42 @@ function views_ui_import_validate($form, &$form_state) {
$view->init_display();
$broken = FALSE;
- // Make sure that all plugins and handlers needed by this view actually exist.
- foreach ($view->display as $id => $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');
- $broken = TRUE;
- continue;
- }
- $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');
- $broken = TRUE;
- }
- elseif ($plugin->uses_row_plugin()) {
- $plugin = views_get_plugin('row', $display->handler->get_option('row_plugin'));
+ // Bypass the validation of view pluigns/handlers if option is checked.
+ 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) {
+ if (empty($display->handler) || !empty($display->handler->broken)) {
+ drupal_set_message(t('Display plugin @plugin is not available.', array('@plugin' => $display->display_plugin)), 'error');
+ $broken = TRUE;
+ continue;
+ }
+
+ $plugin = views_get_plugin('style', $display->handler->get_option('style_plugin'));
if (!$plugin) {
- drupal_set_message(t('Row plugin @plugin is not available.', array('@plugin' => $display->handler->get_option('row_plugin'))), 'error');
+ drupal_set_message(t('Style plugin @plugin is not available.', array('@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');
+ $broken = TRUE;
+ }
+ }
- foreach (views_object_types() as $type => $info) {
- $handlers = $display->handler->get_handlers($type);
- if ($handlers) {
- foreach ($handlers as $id => $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');
- $broken = TRUE;
+ foreach (views_object_types() as $type => $info) {
+ $handlers = $display->handler->get_handlers($type);
+ if ($handlers) {
+ foreach ($handlers as $id => $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');
+ $broken = TRUE;
+ }
}
}
}
@@ -2142,15 +2165,6 @@ function views_ui_edit_view_form_submit($form, &$form_state) {
$form_state['view']->save();
drupal_set_message(t('The view %name has been saved.', array('%name' => $form_state['view']->get_human_name())));
- // Make sure menu items get rebuilt as neces
- menu_rebuild();
-
- // Clear the views cache.
- cache_clear_all('*', 'cache_views');
-
- // Clear the page cache.
- cache_clear_all();
-
// Remove this view from cache so we can edit it properly.
ctools_object_cache_clear('view', $form_state['view']->name);
}
@@ -2309,14 +2323,18 @@ function views_ui_edit_form_get_bucket($type, $view, $display) {
continue;
}
- $field_name = $handler->ui_name(TRUE);
+ $field_name = check_plain($handler->ui_name(TRUE));
if (!empty($field['relationship']) && !empty($relationships[$field['relationship']])) {
$field_name = '(' . $relationships[$field['relationship']] . ') ' . $field_name;
}
- $description = $handler->admin_summary();
+ $description = filter_xss_admin($handler->admin_summary());
$link_text = $field_name . (empty($description) ? '' : " ($description)");
- $build['fields'][$id]['#link'] = l($link_text, "admin/structure/views/nojs/config-item/$view->name/$display->id/$type/$id", array('attributes' => array('class' => array('views-ajax-link')), 'html' => TRUE));
+ $link_attributes = array('class' => array('views-ajax-link'));
+ if (!empty($field['exclude'])) {
+ $link_attributes['class'][] = 'views-field-excluded';
+ }
+ $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?
@@ -2830,7 +2848,7 @@ function views_ui_build_form_url($form_state) {
* Add another form to the stack; clicking 'apply' will go to this form
* rather than closing the ajax popup.
*/
-function views_ui_add_form_to_stack($key, &$view, $display_id, $args, $top = FALSE) {
+function views_ui_add_form_to_stack($key, &$view, $display_id, $args, $top = FALSE, $rebuild_keys = FALSE) {
if (empty($view->stack)) {
$view->stack = array();
}
@@ -2860,6 +2878,11 @@ function views_ui_add_form_to_stack($key, &$view, $display_id, $args, $top = FAL
// Now that the previously $first slot is free, move the new form into it.
$view->stack[$first] = $stack;
ksort($view->stack);
+
+ // Start the keys from 0 again, if requested.
+ if ($rebuild_keys) {
+ $view->stack = array_values($view->stack);
+ }
}
}
@@ -3165,11 +3188,13 @@ function theme_views_ui_reorder_displays_form($vars) {
drupal_add_tabledrag('reorder-displays', 'order', 'sibling', 'weight');
$output = drupal_render($form['override']);
+ $output .= '<div class="scroll">';
$output .= theme('table',
array('header' => $header,
'rows' => $rows,
'attributes' => array('id' => 'reorder-displays'),
));
+ $output .= '</div>';
$output .= drupal_render_children($form);
return $output;
@@ -3486,10 +3511,12 @@ function theme_views_ui_expose_filter_form($variables) {
$output = drupal_render($form['form_description']);
$output .= drupal_render($form['expose_button']);
+ $output .= drupal_render($form['group_button']);
if (isset($form['required'])) {
$output .= drupal_render($form['required']);
}
$output .= drupal_render($form['label']);
+ $output .= drupal_render($form['description']);
$output .= drupal_render($form['operator']);
$output .= drupal_render($form['value']);
@@ -3515,6 +3542,78 @@ function theme_views_ui_expose_filter_form($variables) {
return $output;
}
+ /**
+ * Theme the build group filter form.
+ */
+function theme_views_ui_build_group_filter_form($variables) {
+ $form = $variables['form'];
+ $more = drupal_render($form['more']);
+
+ $output = drupal_render($form['form_description']);
+ $output .= drupal_render($form['expose_button']);
+ $output .= drupal_render($form['group_button']);
+ if (isset($form['required'])) {
+ $output .= drupal_render($form['required']);
+ }
+
+ $output .= drupal_render($form['operator']);
+ $output .= drupal_render($form['value']);
+
+ $output .= '<div class="views-left-40">';
+ $output .= drupal_render($form['optional']);
+ $output .= drupal_render($form['remember']);
+ $output .= '</div>';
+
+ $output .= '<div class="views-right-60">';
+ $output .= drupal_render($form['widget']);
+ $output .= drupal_render($form['label']);
+ $output .= drupal_render($form['description']);
+ $output .= '</div>';
+
+
+ $header = array(
+ t('Default'),
+ t('Weight'),
+ t('Label'),
+ t('Operator'),
+ t('Value'),
+ t('Operations'),
+ );
+
+ $form['default_group'] = form_process_radios($form['default_group']);
+ $form['default_group_multiple'] = form_process_checkboxes($form['default_group_multiple']);
+ $form['default_group']['All']['#title'] = '';
+
+ drupal_render($form['default_group_multiple']['All']); // Don't render
+ $rows[] = array(
+ drupal_render($form['default_group']['All']),
+ '',
+ array(
+ 'data' => variable_get('views_exposed_filter_any_label', 'new_any') == 'old_any' ? t('&lt;Any&gt;') : t('- Any -'),
+ 'colspan' => 4,
+ 'class' => array('class' => 'any-default-radios-row'),
+ ),
+ );
+
+ foreach (element_children($form['group_items']) as $group_id) {
+ $form['group_items'][$group_id]['value']['#title'] = '';
+ $data = array(
+ 'default' => drupal_render($form['default_group'][$group_id]) . drupal_render($form['default_group_multiple'][$group_id]),
+ 'weight' => drupal_render($form['group_items'][$group_id]['weight']),
+ 'title' => drupal_render($form['group_items'][$group_id]['title']),
+ 'operator' => drupal_render($form['group_items'][$group_id]['operator']),
+ 'value' => drupal_render($form['group_items'][$group_id]['value']),
+ 'remove' => drupal_render($form['group_items'][$group_id]['remove']) . l('<span>' . t('Remove') . '</span>', 'javascript:void()', array('attributes' => array('id' => 'views-remove-link-' . $group_id, 'class' => array('views-hidden', 'views-button-remove', 'views-groups-remove-link', 'views-remove-link'), 'alt' => t('Remove this item'), 'title' => t('Remove this item')), 'html' => true)),
+ );
+ $rows[] = array('data' => $data, 'id' => 'views-row-' . $group_id, 'class' => array('draggable'));
+ }
+ $table = theme('table', array('header' => $header, 'rows' => $rows, 'attributes' => array('class' => array('views-filter-groups'), 'id' => 'views-filter-groups'))) . drupal_render($form['add_group']);
+ drupal_add_tabledrag('views-filter-groups', 'order', 'sibling', 'weight');
+ $render_form = drupal_render_children($form);
+ return $output . $render_form . $table . $more;
+}
+
+
/**
* Submit handler for rearranging form
*/
@@ -4124,6 +4223,45 @@ function views_ui_add_item_form_submit($form, &$form_state) {
views_ui_cache_set($form_state['view']);
}
+/**
+ * Override handler for views_ui_edit_display_form
+ */
+function views_ui_config_item_form_build_group($form, &$form_state) {
+ $item = &$form_state['handler']->options;
+ // flip. If the filter was a group, set back to a standard filter.
+ $item['is_grouped'] = empty($item['is_grouped']);
+
+ // If necessary, set new defaults:
+ if ($item['is_grouped']) {
+ $form_state['handler']->build_group_options();
+ }
+
+ $form_state['view']->set_item($form_state['display_id'], $form_state['type'], $form_state['id'], $item);
+
+ views_ui_add_form_to_stack($form_state['form_key'], $form_state['view'], $form_state['display_id'], array($form_state['type'], $form_state['id']), TRUE, TRUE);
+
+ views_ui_cache_set($form_state['view']);
+ $form_state['rerender'] = TRUE;
+ $form_state['rebuild'] = TRUE;
+ $form_state['force_build_group_options'] = TRUE;
+}
+
+/**
+ * Add a new group to the exposed filter groups.
+ */
+function views_ui_config_item_form_add_group($form, &$form_state) {
+ $item =& $form_state['handler']->options;
+
+ // Add a new row.
+ $item['group_info']['group_items'][] = array();
+
+ $form_state['view']->set_item($form_state['display_id'], $form_state['type'], $form_state['id'], $item);
+
+ views_ui_cache_set($form_state['view']);
+ $form_state['rerender'] = TRUE;
+ $form_state['rebuild'] = TRUE;
+ $form_state['force_build_group_options'] = TRUE;
+}
/**
* Form to config_item items in the views UI.
@@ -4469,6 +4607,8 @@ function views_ui_config_item_form_expose($form, &$form_state) {
$form_state['view']->set_item($form_state['display_id'], $form_state['type'], $form_state['id'], $item);
+ views_ui_add_form_to_stack($form_state['form_key'], $form_state['view'], $form_state['display_id'], array($form_state['type'], $form_state['id']), TRUE, TRUE);
+
views_ui_cache_set($form_state['view']);
$form_state['rerender'] = TRUE;
$form_state['rebuild'] = TRUE;
@@ -4978,7 +5118,14 @@ function _views_sort_types($a, $b) {
/**
* Fetch a list of all fields available for a given base type.
*
- * @return
+ * @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.
+ * @param bool $grouping
+ * Should the result grouping by its 'group' label.
+ *
+ * @return array
* A keyed array of in the form of 'base_table' => 'Description'.
*/
function views_fetch_fields($base, $type, $grouping = FALSE) {
@@ -5240,7 +5387,7 @@ function views_ui_default_button($element, &$form_state, $form) {
*
* Therefore it builds up a table of each field which is used in any view.
*
- * @see field_ui_fields_list
+ * @see field_ui_fields_list()
*/
function views_ui_field_list() {
$views = views_get_all_views();
@@ -5289,3 +5436,26 @@ function views_ui_field_list() {
return $output;
}
+
+/**
+ * Lists all plugins and what enabled Views use them.
+ */
+function views_ui_plugin_list() {
+ $rows = views_plugin_list();
+ foreach ($rows as &$row) {
+ // Link each view name to the view itself.
+ foreach ($row['views'] as $row_name => $view) {
+ $row['views'][$row_name] = l($view, "admin/structure/views/view/$view");
+ }
+ $row['views'] = implode(', ', $row['views']);
+ }
+
+ // Sort rows by field name.
+ ksort($rows);
+ return array(
+ '#theme' => 'table',
+ '#header' => array(t('Type'), t('Name'), t('Provided by'), t('Used in')),
+ '#rows' => $rows,
+ '#empty' => t('There are no enabled views.'),
+ );
+}
diff --git a/kolab.org/www/drupal-7.15/sites/all/modules/views/includes/ajax.inc b/kolab.org/www/drupal-7.15/sites/all/modules/views/includes/ajax.inc
index 4e2ad38..39d8c6f 100644
--- a/kolab.org/www/drupal-7.15/sites/all/modules/views/includes/ajax.inc
+++ b/kolab.org/www/drupal-7.15/sites/all/modules/views/includes/ajax.inc
@@ -1,12 +1,14 @@
<?php
/**
- * @file ajax.inc
- *
+ * @file
* Handles the server side AJAX interactions of Views.
- *
- * @defgroup ajax Views ajax library
+ */
+
+/**
+ * @defgroup ajax Views AJAX library
* @{
+ * Handles the server side AJAX interactions of Views.
*/
/**
@@ -17,14 +19,12 @@ function views_ajax() {
$name = $_REQUEST['view_name'];
$display_id = $_REQUEST['view_display_id'];
$args = isset($_REQUEST['view_args']) && $_REQUEST['view_args'] !== '' ? explode('/', $_REQUEST['view_args']) : array();
- $path = isset($_REQUEST['view_path']) ? $_REQUEST['view_path'] : NULL;
+ $path = isset($_REQUEST['view_path']) ? rawurldecode($_REQUEST['view_path']) : NULL;
$dom_id = isset($_REQUEST['view_dom_id']) ? preg_replace('/[^a-zA-Z0-9_-]+/', '-', $_REQUEST['view_dom_id']) : NULL;
$pager_element = isset($_REQUEST['pager_element']) ? intval($_REQUEST['pager_element']) : NULL;
$commands = array();
- $arg = explode('/', $_REQUEST['view_path']);
-
// Remove all of this stuff from $_GET so it doesn't end up in pagers and tablesort URLs.
foreach (array('view_name', 'view_display_id', 'view_args', 'view_path', 'view_dom_id', 'pager_element', 'view_base_path', 'ajax_html_ids', 'ajax_page_state') as $key) {
if (isset($_GET[$key])) {
@@ -48,7 +48,7 @@ function views_ajax() {
// Add all $_POST data, because AJAX is always a post and many things,
// such as tablesorts, exposed filters and paging assume $_GET.
- $_GET += $_POST;
+ $_GET = $_POST + $_GET;
// Overwrite the destination.
// @see drupal_get_destination()
diff --git a/kolab.org/www/drupal-7.15/sites/all/modules/views/includes/analyze.inc b/kolab.org/www/drupal-7.15/sites/all/modules/views/includes/analyze.inc
index df7b743..68ee334 100644
--- a/kolab.org/www/drupal-7.15/sites/all/modules/views/includes/analyze.inc
+++ b/kolab.org/www/drupal-7.15/sites/all/modules/views/includes/analyze.inc
@@ -47,6 +47,7 @@ function views_analyze_format_result($view, $messages) {
$output = '';
foreach ($types as $type => $messages) {
+ $type .= ' messages';
$message = '';
if (count($messages) > 1) {
$message = theme('item_list', array('items' => $messages));
diff --git a/kolab.org/www/drupal-7.15/sites/all/modules/views/includes/base.inc b/kolab.org/www/drupal-7.15/sites/all/modules/views/includes/base.inc
index b5d09a4..0e2a407 100644
--- a/kolab.org/www/drupal-7.15/sites/all/modules/views/includes/base.inc
+++ b/kolab.org/www/drupal-7.15/sites/all/modules/views/includes/base.inc
@@ -1,12 +1,12 @@
<?php
+
/**
* @file
- *
* Provides the basic object definitions used by plugins and handlers.
*/
/**
- * Basic definition for many views objects
+ * Basic definition for many views objects.
*/
class views_object {
/**
@@ -33,17 +33,24 @@ class views_object {
* @code
* 'option_name' => array(
* - 'default' => default value,
- * - 'translatable' => TRUE/FALSE (wrap in t() on export if true),
- * - 'contains' => array of items this contains, with its own defaults, etc.
- * If contains is set, the default will be ignored and assumed to
- * be array()
- *
+ * - 'translatable' => (optional) TRUE/FALSE (wrap in t() on export if true),
+ * - 'contains' => (optional) array of items this contains, with its own
+ * defaults, etc. If contains is set, the default will be ignored and
+ * assumed to be array().
+ * - 'bool' => (optional) TRUE/FALSE Is the value a boolean value. This will
+ * change the export format to TRUE/FALSE instead of 1/0.
+ * - 'export' => (optional) FALSE or a callback for special export handling
+ * if necessary.
+ * - 'unpack_translatable' => (optional) callback for special handling for
+ * translating data within the option, if necessary.
* ),
- * @endcode
- * Each option may have any of the following functions:
- * - export_option_OPTIONNAME -- Special export handling if necessary.
- * - translate_option_OPTIONNAME -- Special handling for translating data
- * within the option, if necessary.
+ *
+ * @return array
+ * Returns the options of this handler/plugin.
+ *
+ * @see views_object::export_option()
+ * @see views_object::export_option_always()
+ * @see views_object::unpack_translatable()
*/
function option_definition() { return array(); }
@@ -56,6 +63,8 @@ class views_object {
/**
* Set default options on this object. Called by the constructor in a
* complex chain to deal with backward compatibility.
+ *
+ * @deprecated since views2
*/
function options(&$options) { }
@@ -251,6 +260,17 @@ class views_object {
}
/**
+ * Always exports the option, regardless of the default value.
+ */
+ function export_option_always($indent, $prefix, $storage, $option, $definition, $parents) {
+ // If there is no default, the option will always be exported.
+ unset($definition['default']);
+ // Unset our export method to prevent recursion.
+ unset($definition['export']);
+ return $this->export_option($indent, $prefix, $storage, $option, $definition, $parents);
+ }
+
+ /**
* Unpacks each handler to store translatable texts.
*/
function unpack_translatables(&$translatable, $parents = array()) {
@@ -326,7 +346,7 @@ class views_object {
$value = $options;
// Build source data and add to the array
$format = NULL;
- if (isset($definition['format_key']) && isset($storage[$definition['format_key']])) {
+ if (isset($definition['format_key']) && isset($options[$definition['format_key']])) {
$format = $options[$definition['format_key']];
}
$translatable[] = array(
diff --git a/kolab.org/www/drupal-7.15/sites/all/modules/views/includes/cache.inc b/kolab.org/www/drupal-7.15/sites/all/modules/views/includes/cache.inc
index b2fe7d8..c655c21 100644
--- a/kolab.org/www/drupal-7.15/sites/all/modules/views/includes/cache.inc
+++ b/kolab.org/www/drupal-7.15/sites/all/modules/views/includes/cache.inc
@@ -1,9 +1,8 @@
<?php
+
/**
- * @file cache.inc
- *
- * Functions to load Views' data so that it knows what is available to
- * build queries from.
+ * @file
+ * Load Views' data so that it knows what is available to build queries from.
*/
/**
@@ -14,8 +13,8 @@
* One example is views_get_handler.
*/
function _views_fetch_data($table = NULL, $move = TRUE, $reset = FALSE) {
- static $cache = NULL;
- static $recursion_protection = array();
+ $cache = &drupal_static(__FUNCTION__ . '_cache');
+ $recursion_protection = &drupal_static(__FUNCTION__ . '_recursion_protected');
if (!isset($cache) || $reset) {
$start = microtime(TRUE);
// NOTE: This happens whether we retrieve them from cache or otherwise.
@@ -146,16 +145,19 @@ function views_cache_set($cid, $data, $use_language = FALSE) {
*
* This is just a convenience wrapper around cache_get().
*
- * @param $cid
+ * @param int $cid
* The cache ID of the data to retrieve.
- * @param $use_language
+ * @param bool $use_language
* If TRUE, the data will be requested specific to the currently active language.
+ *
+ * @return stdClass|bool
+ * The cache or FALSE on failure.
*/
function views_cache_get($cid, $use_language = FALSE) {
global $language;
if (variable_get('views_skip_cache', FALSE)) {
- return 0;
+ return FALSE;
}
if ($use_language) {
$cid .= ':' . $language->language;
diff --git a/kolab.org/www/drupal-7.15/sites/all/modules/views/includes/form.inc b/kolab.org/www/drupal-7.15/sites/all/modules/views/includes/form.inc
deleted file mode 100644
index 9152ae9..0000000
--- a/kolab.org/www/drupal-7.15/sites/all/modules/views/includes/form.inc
+++ /dev/null
@@ -1,7 +0,0 @@
-<?php
-
-/**
- * @file form.inc
- * Views' replacements for Drupal's form functions.
- *
- */
diff --git a/kolab.org/www/drupal-7.15/sites/all/modules/views/includes/handlers.inc b/kolab.org/www/drupal-7.15/sites/all/modules/views/includes/handlers.inc
index 45a3a45..a79aa5c 100644
--- a/kolab.org/www/drupal-7.15/sites/all/modules/views/includes/handlers.inc
+++ b/kolab.org/www/drupal-7.15/sites/all/modules/views/includes/handlers.inc
@@ -1,6 +1,7 @@
<?php
+
/**
- * @file handlers.inc
+ * @file
* Defines the various handler objects to help build and display views.
*/
@@ -57,6 +58,7 @@ function _views_create_handler($definition, $type = 'handler', $handler_type = N
else {
$handler->is_plugin = TRUE;
$handler->plugin_type = $type;
+ $handler->plugin_name = $definition['name'];
}
// let the handler have something like a constructor.
@@ -313,12 +315,18 @@ class views_handler extends views_object {
* The value being rendered.
* @param $type
* The type of sanitization needed. If not provided, check_plain() is used.
+ *
+ * @return string
+ * Returns the safe value.
*/
function sanitize_value($value, $type = NULL) {
switch ($type) {
case 'xss':
$value = filter_xss($value);
break;
+ case 'xss_admin':
+ $value = filter_xss_admin($value);
+ break;
case 'url':
$value = check_url($value);
break;
@@ -556,11 +564,11 @@ class views_handler extends views_object {
}
}
- /**
- * Check whether current user has access to this handler.
- *
- * @return boolean
- */
+ /**
+ * Check whether current user has access to this handler.
+ *
+ * @return boolean
+ */
function access() {
if (isset($this->definition['access callback']) && function_exists($this->definition['access callback'])) {
if (isset($this->definition['access arguments']) && is_array($this->definition['access arguments'])) {
@@ -664,6 +672,18 @@ class views_handler extends views_object {
}
/**
+ * Returns TRUE if the exposed filter works like a grouped filter.
+ */
+ function is_a_group() { return FALSE; }
+
+ /**
+ * Define if the exposed input has to be submitted multiple times.
+ * This is TRUE when exposed filters grouped are using checkboxes as
+ * widgets.
+ */
+ function multiple_exposed_input() { return FALSE; }
+
+ /**
* Take input from exposed handlers and assign to this handler, if necessary.
*/
function accept_exposed_input($input) { return TRUE; }
@@ -736,7 +756,7 @@ class views_many_to_one_helper {
}
static function option_definition(&$options) {
- $options['reduce_duplicates'] = array('default' => FALSE);
+ $options['reduce_duplicates'] = array('default' => FALSE, 'bool' => TRUE);
}
function options_form(&$form, &$form_state) {
@@ -1030,7 +1050,7 @@ class views_many_to_one_helper {
}
}
-/*
+/**
* Break x,y,z and x+y+z into an array. Works for strings.
*
* @param $str
@@ -1062,12 +1082,17 @@ function views_break_phrase_string($str, &$handler = NULL) {
return $handler;
}
- if (preg_match('/^(\w+[+ ])+\w+$/', $str)) {
- // The '+' character in a query string may be parsed as ' '.
+ // Determine if the string has 'or' operators (plus signs) or 'and' operators
+ // (commas) and split the string accordingly. If we have an 'and' operator,
+ // spaces are treated as part of the word being split, but otherwise they are
+ // treated the same as a plus sign.
+ $or_wildcard = '[^\s+,]';
+ $and_wildcard = '[^+,]';
+ if (preg_match("/^({$or_wildcard}+[+ ])+{$or_wildcard}+$/", $str)) {
$handler->operator = 'or';
$handler->value = preg_split('/[+ ]/', $str);
}
- else if (preg_match('/^((\w|\s)+,)*(\w|\s)+$/', $str)) {
+ elseif (preg_match("/^({$and_wildcard}+,)*{$and_wildcard}+$/", $str)) {
$handler->operator = 'and';
$handler->value = explode(',', $str);
}
@@ -1085,7 +1110,8 @@ function views_break_phrase_string($str, &$handler = NULL) {
return $handler;
}
-/*
+
+/**
* Break x,y,z and x+y+z into an array. Numeric only.
*
* @param $str
@@ -1386,10 +1412,10 @@ function views_date_sql_extract($extract_type, $field, $field_type = 'int', $set
*/
/**
- * @defgroup views_join_handlers Views' join handlers
+ * @defgroup views_join_handlers Views join handlers
* @{
* Handlers to tell Views how to join tables together.
-
+ *
* Here is how you do complex joins:
*
* @code
@@ -1408,6 +1434,7 @@ function views_date_sql_extract($extract_type, $field, $field_type = 'int', $set
* }
* @endcode
*/
+
/**
* A function class to represent a join and create the SQL necessary
* to implement the join.
@@ -1425,9 +1452,9 @@ function views_date_sql_extract($extract_type, $field, $field_type = 'int', $set
* - type: either LEFT (default) or INNER
* - extra: An array of extra conditions on the join. Each condition is
* either a string that's directly added, or an array of items:
- * - - table: if not set, current table; if NULL, no table. This field can't
- * be set in the cached definition because it can't know aliases; this field
- * can only be used by realtime joins.
+ * - - table: If not set, current table; if NULL, no table. If you specify a
+ * table in cached definition, Views will try to load from an existing
+ * alias. If you use realtime joins, it works better.
* - - field: Field or formula
* in formulas we can reference the right table by using %alias
* @see SelectQueryInterface::addJoin()
@@ -1479,14 +1506,14 @@ class views_join {
/**
* Build the SQL for the join this object represents.
*
+ * When possible, try to use table alias instead of table names.
+ *
* @param $select_query
* An implementation of SelectQueryInterface.
* @param $table
* The base table to join.
* @param $view_query
* The source query, implementation of views_plugin_query.
- * @return
- *
*/
function build_join($select_query, $table, $view_query) {
if (empty($this->definition['table formula'])) {
@@ -1521,7 +1548,14 @@ class views_join {
$join_table = $table['alias'] . '.';
}
elseif (isset($info['table'])) {
- $join_table = $info['table'] . '.';
+ // If we're aware of a table alias for this table, use the table
+ // alias instead of the table name.
+ if (isset($left) && $left['table'] == $info['table']) {
+ $join_table = $left['alias'] . '.';
+ }
+ else {
+ $join_table = $info['table'] . '.';
+ }
}
// Convert a single-valued array of values to the single-value case,
diff --git a/kolab.org/www/drupal-7.15/sites/all/modules/views/includes/plugins.inc b/kolab.org/www/drupal-7.15/sites/all/modules/views/includes/plugins.inc
index 51d0e93..bf09573 100644
--- a/kolab.org/www/drupal-7.15/sites/all/modules/views/includes/plugins.inc
+++ b/kolab.org/www/drupal-7.15/sites/all/modules/views/includes/plugins.inc
@@ -1,15 +1,15 @@
<?php
+
/**
- * @file plugins.inc
+ * @file
* Built in plugins for Views output handling.
- *
*/
// @todo: Remove this once update.php can use the registry
views_include('base');
/**
- * Implements hook_views_plugins
+ * Implements hook_views_plugins().
*/
function views_views_plugins() {
$js_path = drupal_get_path('module', 'ctools') . '/js';
@@ -86,6 +86,7 @@ function views_views_plugins() {
'title' => t('Embed'),
'help' => t('Provide a display which can be embedded using the views api.'),
'handler' => 'views_plugin_display_embed',
+ 'theme' => 'views_view',
'uses hook menu' => FALSE,
'use ajax' => TRUE,
'use pager' => TRUE,
@@ -135,6 +136,7 @@ function views_views_plugins() {
'help' => t('Displays rows in a grid.'),
'handler' => 'views_plugin_style_grid',
'theme' => 'views_view_grid',
+ 'uses fields' => FALSE,
'uses row plugin' => TRUE,
'uses row class' => TRUE,
'uses options' => TRUE,
@@ -193,6 +195,16 @@ function views_views_plugins() {
'type' => 'normal',
'help topic' => 'style-row-fields',
),
+ 'rss_fields' => array(
+ 'title' => t('Fields'),
+ 'help' => t('Display fields as RSS items.'),
+ 'handler' => 'views_plugin_row_rss_fields',
+ 'theme' => 'views_view_row_rss',
+ 'uses fields' => TRUE,
+ 'uses options' => TRUE,
+ 'type' => 'feed',
+ 'help topic' => 'style-row-fields',
+ ),
),
'argument default' => array(
'parent' => array(
@@ -475,6 +487,11 @@ class views_plugin extends views_object {
var $plugin_type = NULL;
/**
+ * The plugin name of this plugin, for example table or full.
+ */
+ var $plugin_name = NULL;
+
+ /**
* Init will be called after construct, when the plugin is attached to a
* view and a display.
*/
diff --git a/kolab.org/www/drupal-7.15/sites/all/modules/views/includes/view.inc b/kolab.org/www/drupal-7.15/sites/all/modules/views/includes/view.inc
index 4848879..90dd3a2 100644
--- a/kolab.org/www/drupal-7.15/sites/all/modules/views/includes/view.inc
+++ b/kolab.org/www/drupal-7.15/sites/all/modules/views/includes/view.inc
@@ -1,11 +1,12 @@
<?php
+
/**
- * @file view.inc
+ * @file
* Provides the view object type and associated methods.
*/
/**
- * @defgroup views_objects Objects that represent a View or part of a view.
+ * @defgroup views_objects Objects that represent a View or part of a view
* @{
* These objects are the core of Views do the bulk of the direction and
* storing of data. All database activity is in these objects.
@@ -91,7 +92,13 @@ class view extends views_db_object {
var $use_ajax = FALSE;
- // Where the results of a query will go.
+ /**
+ * Where the results of a query will go.
+ *
+ * The array must use a numeric index starting at 0.
+ *
+ * @var array
+ */
var $result = array();
// May be used to override the current pager info.
@@ -122,7 +129,7 @@ class view extends views_db_object {
// Stores the next steps of form items to handle.
// It's an array of stack items, which contain the form id, the type of form,
// the view, the display and some additional arguments.
- // @see views_ui_add_form_to_stack().
+ // @see views_ui_add_form_to_stack()
// var $stack;
/**
@@ -300,24 +307,40 @@ class view extends views_db_object {
*/
function set_current_page($page) {
$this->current_page = $page;
+
+ // If the pager is already initialized, pass it through to the pager.
+ if (!empty($this->query->pager)) {
+ return $this->query->pager->set_current_page($page);
+ }
+
}
/**
* Get the current page from the pager.
*/
function get_current_page() {
+ // If the pager is already initialized, pass it through to the pager.
if (!empty($this->query->pager)) {
return $this->query->pager->get_current_page();
}
+
+ if (isset($this->current_page)) {
+ return $this->current_page;
+ }
}
/**
* Get the items per page from the pager.
*/
function get_items_per_page() {
+ // If the pager is already initialized, pass it through to the pager.
if (!empty($this->query->pager)) {
return $this->query->pager->get_items_per_page();
}
+
+ if (isset($this->items_per_page)) {
+ return $this->items_per_page;
+ }
}
/**
@@ -336,9 +359,14 @@ class view extends views_db_object {
* Get the pager offset from the pager.
*/
function get_offset() {
+ // If the pager is already initialized, pass it through to the pager.
if (!empty($this->query->pager)) {
return $this->query->pager->get_offset();
}
+
+ if (isset($this->offset)) {
+ return $this->offset;
+ }
}
/**
@@ -575,7 +603,7 @@ class view extends views_db_object {
foreach ($this->display_handler->get_option('relationships') as $id => $options) {
$options['table'] = views_move_table($options['table']);
$data = views_fetch_data($options['table'], FALSE);
- if (isset($data[$options['field']])) {
+ if (isset($data[$options['field']]['relationship']['base'])) {
$base_tables[$data[$options['field']]['relationship']['base']] = TRUE;
}
}
@@ -1035,27 +1063,53 @@ 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
+ * build the relationship and query information.
*/
function _build($key) {
$handlers = &$this->$key;
foreach ($handlers as $id => $data) {
+
if (!empty($handlers[$id]) && is_object($handlers[$id])) {
- // Give this handler access to the exposed filter input.
- if (!empty($this->exposed_data)) {
- $rc = $handlers[$id]->accept_exposed_input($this->exposed_data);
- $handlers[$id]->store_exposed_input($this->exposed_data, $rc);
- if (!$rc) {
- continue;
+ $multiple_exposed_input = array(0 => NULL);
+ if ($handlers[$id]->multiple_exposed_input()) {
+ $multiple_exposed_input = $handlers[$id]->group_multiple_exposed_input($this->exposed_data);
+ }
+ foreach ($multiple_exposed_input as $group_id) {
+ // Give this handler access to the exposed filter input.
+ if (!empty($this->exposed_data)) {
+ $converted = FALSE;
+ if ($handlers[$id]->is_a_group()) {
+ $converted = $handlers[$id]->convert_exposed_input($this->exposed_data, $group_id);
+ $handlers[$id]->store_group_input($this->exposed_data, $converted);
+ if (!$converted) {
+ continue;
+ }
+ }
+ $rc = $handlers[$id]->accept_exposed_input($this->exposed_data);
+ $handlers[$id]->store_exposed_input($this->exposed_data, $rc);
+ if (!$rc) {
+ continue;
+ }
}
+ $handlers[$id]->set_relationship();
+ $handlers[$id]->query($this->display_handler->use_group_by());
}
- $handlers[$id]->set_relationship();
- $handlers[$id]->query($this->display_handler->use_group_by());
}
}
}
/**
* Execute the view's query.
+ *
+ * @param string $display_id
+ * The machine name of the display, which should be executed.
+ *
+ * @return bool
+ * Return whether the executing was successful, for example an argument
+ * could stop the process.
*/
function execute($display_id = NULL) {
if (empty($this->built)) {
@@ -1096,6 +1150,9 @@ class view extends views_db_object {
}
else {
$this->query->execute($this);
+ // Enforce the array key rule as documented in
+ // views_plugin_query::execute().
+ $this->result = array_values($this->result);
$this->_post_execute();
if ($cache) {
$cache->cache_set('results');
@@ -1112,7 +1169,16 @@ class view extends views_db_object {
}
/**
- * Render this view for display.
+ * Render this view for a certain display.
+ *
+ * Note: You should better use just the preview function if you want to
+ * render a view.
+ *
+ * @param string $display_id
+ * The machine name of the display, which should be rendered.
+ *
+ * @return (string|NULL)
+ * Return the output of the rendered view or NULL if something failed in the process.
*/
function render($display_id = NULL) {
$this->execute($display_id);
@@ -1121,6 +1187,9 @@ class view extends views_db_object {
if (!empty($this->build_info['fail'])) {
return;
}
+ if (!empty($this->view->build_info['denied'])) {
+ return;
+ }
drupal_theme_initialize();
@@ -1172,7 +1241,13 @@ class view extends views_db_object {
$function($this);
}
- // Let the theme play too, because pre render is a very themey thing.
+ // Let the themes play too, because pre render is a very themey thing.
+ foreach ($GLOBALS['base_theme_info'] as $base) {
+ $function = $base->name . '_views_pre_render';
+ if (function_exists($function)) {
+ $function($this);
+ }
+ }
$function = $GLOBALS['theme'] . '_views_pre_render';
if (function_exists($function)) {
$function($this);
@@ -1196,7 +1271,13 @@ class view extends views_db_object {
$function($this, $this->display_handler->output, $cache);
}
- // Let the theme play too, because post render is a very themey thing.
+ // Let the themes play too, because post render is a very themey thing.
+ foreach ($GLOBALS['base_theme_info'] as $base) {
+ $function = $base->name . '_views_post_render';
+ if (function_exists($function)) {
+ $function($this);
+ }
+ }
$function = $GLOBALS['theme'] . '_views_post_render';
if (function_exists($function)) {
$function($this, $this->display_handler->output, $cache);
@@ -1211,7 +1292,19 @@ class view extends views_db_object {
}
/**
- * Render a specific field via the field ID and the row #.
+ * Render a specific field via the field ID and the row #
+ *
+ * Note: You might want to use views_plugin_style::render_fields as it
+ * caches the output for you.
+ *
+ * @param string $field
+ * The id of the field to be rendered.
+ *
+ * @param int $row
+ * The row number in the $view->result which is used for the rendering.
+ *
+ * @return string
+ * The rendered output of the field.
*/
function render_field($field, $row) {
if (isset($this->field[$field]) && isset($this->result[$row])) {
@@ -1291,6 +1384,9 @@ class view extends views_db_object {
$function($this, $display_id, $this->args);
}
+ // Allow hook_views_pre_view() to set the dom_id, then ensure it is set.
+ $this->dom_id = !empty($this->dom_id) ? $this->dom_id : md5($this->name . REQUEST_TIME . rand());
+
// Allow the display handler to set up for execution
$this->display_handler->pre_execute();
}
@@ -1571,7 +1667,7 @@ class view extends views_db_object {
$title = t('Home');
}
if ($title) {
- $breadcrumb[] = l($title, $path, array('html' => true));
+ $breadcrumb[] = l($title, $path, array('html' => TRUE));
}
}
@@ -1708,28 +1804,42 @@ class view extends views_db_object {
if ($this->vid == 'new') {
$this->vid = NULL;
}
+ // If there is no vid, check if a view with this machine name already exists.
+ elseif (empty($this->vid)) {
+ $vid = db_query("SELECT vid from {views_view} WHERE name = :name", array(':name' => $this->name))->fetchField();
+ $this->vid = $vid ? $vid : NULL;
+ }
- // If we have no vid or our vid is a string, this is a new view.
- if (!empty($this->vid)) {
- // remove existing table entries
- foreach ($this->db_objects() as $key) {
- db_delete('views_' . $key)
- ->condition('vid', $this->vid)
- ->execute();
+ $transaction = db_transaction();
+
+ 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
+ foreach ($this->db_objects() as $key) {
+ db_delete('views_' . $key)
+ ->condition('vid', $this->vid)
+ ->execute();
+ }
}
- }
- $this->save_row(!empty($this->vid) ? 'vid' : FALSE);
+ $this->save_row(!empty($this->vid) ? 'vid' : FALSE);
- // Save all of our subtables.
- foreach ($this->db_objects() as $key) {
- $this->_save_rows($key);
+ // Save all of our subtables.
+ foreach ($this->db_objects() as $key) {
+ $this->_save_rows($key);
+ }
+ }
+ catch (Exception $e) {
+ $transaction->rollback();
+ watchdog_exception('views', $e);
+ throw $e;
}
$this->save_locale_strings();
- cache_clear_all('views_urls', 'cache_views');
- cache_clear_all(); // clear the page cache as well.
+ // Clear caches.
+ views_invalidate_cache();
}
/**
@@ -1766,8 +1876,8 @@ class view extends views_db_object {
cache_clear_all('views_query:' . $this->name, 'cache_views');
if ($clear) {
- cache_clear_all(); // this clears the block and page caches only.
- menu_rebuild(); // force a menu rebuild when a view is deleted.
+ // Clear caches.
+ views_invalidate_cache();
}
}
@@ -1909,6 +2019,16 @@ class view extends views_db_object {
unset($this->$key);
}
}
+
+ // These keys are checked by the next init, so instead of unsetting them,
+ // just set the default values.
+ $keys = array('items_per_page', 'offset', 'current_page');
+ foreach ($keys as $key) {
+ if (isset($this->$key)) {
+ $this->$key = NULL;
+ }
+ }
+
$this->built = $this->executed = FALSE;
$this->build_info = array();
$this->attachment_before = '';
@@ -1925,6 +2045,7 @@ class view extends views_db_object {
$this->init_display();
$errors = array();
+ $this->display_errors = NULL;
$current_display = $this->current_display;
foreach ($this->display as $id => $display) {
@@ -1936,6 +2057,8 @@ class view extends views_db_object {
$result = $this->display[$id]->handler->validate();
if (!empty($result) && is_array($result)) {
$errors = array_merge($errors, $result);
+ // Mark this display as having validation errors.
+ $this->display_errors[$id] = TRUE;
}
}
}
@@ -1955,6 +2078,7 @@ class view extends views_db_object {
$this->localization_plugin = views_get_plugin('localization', views_get_localization_plugin());
if (empty($this->localization_plugin)) {
+ $this->localization_plugin = views_get_plugin('localization', 'none');
return FALSE;
}
@@ -1989,9 +2113,9 @@ class view extends views_db_object {
$this->process_locale_strings('delete');
}
- /**
- * Export localized strings.
- */
+ /**
+ * Export localized strings.
+ */
function export_locale_strings() {
$this->process_locale_strings('export');
}
@@ -2136,7 +2260,7 @@ class views_db_object {
}
$schema = drupal_get_schema($this->db_table);
- $output = $indent . '$' . $identifier . ' = new ' . get_class($this) . ";\n";
+ $output = $indent . '$' . $identifier . ' = new ' . get_class($this) . "();\n";
// Go through our schema and build correlations.
foreach ($schema['fields'] as $field => $info) {
if (!empty($info['no export'])) {
@@ -2152,7 +2276,7 @@ class views_db_object {
// serialized defaults must be set as serialized.
if (isset($info['serialize'])) {
- $this->$field = unserialize(db_decode_blob($this->$field));
+ $this->$field = unserialize($this->$field);
}
}
$value = $this->$field;
diff --git a/kolab.org/www/drupal-7.15/sites/all/modules/views/js/ajax.js b/kolab.org/www/drupal-7.15/sites/all/modules/views/js/ajax.js
index 097c44a..82b332f 100644
--- a/kolab.org/www/drupal-7.15/sites/all/modules/views/js/ajax.js
+++ b/kolab.org/www/drupal-7.15/sites/all/modules/views/js/ajax.js
@@ -1,6 +1,5 @@
/**
- * @file ajax_admin.js
- *
+ * @file
* Handles AJAX submission and response in Views UI.
*/
(function ($) {
diff --git a/kolab.org/www/drupal-7.15/sites/all/modules/views/js/ajax_view.js b/kolab.org/www/drupal-7.15/sites/all/modules/views/js/ajax_view.js
index a89d4aa..2a4012f 100644
--- a/kolab.org/www/drupal-7.15/sites/all/modules/views/js/ajax_view.js
+++ b/kolab.org/www/drupal-7.15/sites/all/modules/views/js/ajax_view.js
@@ -1,6 +1,5 @@
/**
- * @file ajaxView.js
- *
+ * @file
* Handles AJAX fetching of views, including filter submission and response.
*/
(function ($) {
@@ -12,13 +11,13 @@ Drupal.behaviors.ViewsAjaxView = {};
Drupal.behaviors.ViewsAjaxView.attach = function() {
if (Drupal.settings && Drupal.settings.views && Drupal.settings.views.ajaxViews) {
$.each(Drupal.settings.views.ajaxViews, function(i, settings) {
- // @todo: Figure out where to store the object.
- new Drupal.views.ajaxView(settings);
+ Drupal.views.instances[i] = new Drupal.views.ajaxView(settings);
});
}
};
Drupal.views = {};
+Drupal.views.instances = {};
/**
* Javascript object for a certain view.
diff --git a/kolab.org/www/drupal-7.15/sites/all/modules/views/js/base.js b/kolab.org/www/drupal-7.15/sites/all/modules/views/js/base.js
index 3cb649a..5855dce 100644
--- a/kolab.org/www/drupal-7.15/sites/all/modules/views/js/base.js
+++ b/kolab.org/www/drupal-7.15/sites/all/modules/views/js/base.js
@@ -1,6 +1,5 @@
/**
- * @file base.js
- *
+ * @file
* Some basic behaviors and utility functions for Views.
*/
(function ($) {
diff --git a/kolab.org/www/drupal-7.15/sites/all/modules/views/js/jquery.ui.dialog.patch.js b/kolab.org/www/drupal-7.15/sites/all/modules/views/js/jquery.ui.dialog.patch.js
index 52b2f12..d00e6ab 100644
--- a/kolab.org/www/drupal-7.15/sites/all/modules/views/js/jquery.ui.dialog.patch.js
+++ b/kolab.org/www/drupal-7.15/sites/all/modules/views/js/jquery.ui.dialog.patch.js
@@ -6,8 +6,8 @@
*
* @see http://bugs.jqueryui.com/ticket/4671
* @see https://bugs.webkit.org/show_bug.cgi?id=19033
- * @see /views_ui.module
- * @see /js/jquery.ui.dialog.min.js
+ * @see views_ui.module
+ * @see js/jquery.ui.dialog.min.js
*
* This javascript patch overwrites the $.ui.dialog.overlay.events object to remove
* the mousedown, mouseup and click events from the list of events that are bound
diff --git a/kolab.org/www/drupal-7.15/sites/all/modules/views/js/views-admin.js b/kolab.org/www/drupal-7.15/sites/all/modules/views/js/views-admin.js
index e2cd16f..1eb3897 100644
--- a/kolab.org/www/drupal-7.15/sites/all/modules/views/js/views-admin.js
+++ b/kolab.org/www/drupal-7.15/sites/all/modules/views/js/views-admin.js
@@ -1,3 +1,7 @@
+/**
+ * @file
+ * Some basic behaviors and utility functions for Views UI.
+ */
Drupal.viewsUi = {};
Drupal.behaviors.viewsUiEditView = {};
@@ -225,7 +229,7 @@ Drupal.behaviors.viewsUiRenderAddViewButton.attach = function (context, settings
if (!$menu.length) {
return;
}
- var $addDisplayDropdown = $('<li class="add"><a href="#"><span class="icon add"></span>Add</a><ul class="action-list" style="display:none;"></ul></li>');
+ var $addDisplayDropdown = $('<li class="add"><a href="#"><span class="icon add"></span>' + Drupal.t('Add') + '</a><ul class="action-list" style="display:none;"></ul></li>');
var $displayButtons = $menu.nextAll('input.add-display').detach();
$displayButtons.appendTo($addDisplayDropdown.find('.action-list')).wrap('<li>')
.parent().first().addClass('first').end().last().addClass('last');
@@ -772,6 +776,14 @@ Drupal.behaviors.viewsFilterConfigSelectAll.attach = function(context) {
$(this).attr('checked', checked);
});
});
+ // 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() {
+ if ($(this).is('checked') == 0) {
+ $('#edit-options-value-all').removeAttr('checked');
+ }
+ });
+ });
};
/**
@@ -815,7 +827,7 @@ Drupal.behaviors.viewsRemoveIconClass.attach = function (context, settings) {
$('.icon', $this).removeClass('icon');
$('.horizontal', $this).removeClass('horizontal');
});
-}
+};
/**
* Change "Expose filter" buttons into checkboxes.
@@ -823,7 +835,7 @@ Drupal.behaviors.viewsRemoveIconClass.attach = function (context, settings) {
Drupal.behaviors.viewsUiCheckboxify = {};
Drupal.behaviors.viewsUiCheckboxify.attach = function (context, settings) {
var $ = jQuery;
- var $buttons = $('#edit-options-expose-button-button').once('views-ui-checkboxify');
+ var $buttons = $('#edit-options-expose-button-button, #edit-options-group-button-button').once('views-ui-checkboxify');
var length = $buttons.length;
var i;
for (i = 0; i < length; i++) {
@@ -832,6 +844,33 @@ Drupal.behaviors.viewsUiCheckboxify.attach = function (context, settings) {
};
/**
+ * Change the default widget to select the default group according to the
+ * selected widget for the exposed group.
+ */
+Drupal.behaviors.viewsUiChangeDefaultWidget = {};
+Drupal.behaviors.viewsUiChangeDefaultWidget.attach = function (context, settings) {
+ var $ = jQuery;
+ function change_default_widget(multiple) {
+ if (multiple) {
+ $('input.default-radios').hide();
+ $('td.any-default-radios-row').parent().hide();
+ $('input.default-checkboxes').show();
+ }
+ else {
+ $('input.default-checkboxes').hide();
+ $('td.any-default-radios-row').parent().show();
+ $('input.default-radios').show();
+ }
+ }
+ // Update on widget change.
+ $('input[name="options[group_info][multiple]"]').change(function() {
+ change_default_widget($(this).attr("checked"));
+ });
+ // Update the first time the form is rendered.
+ $('input[name="options[group_info][multiple]"]').trigger('change');
+};
+
+/**
* Attaches an expose filter button to a checkbox that triggers its click event.
*
* @param button
@@ -840,13 +879,14 @@ Drupal.behaviors.viewsUiCheckboxify.attach = function (context, settings) {
Drupal.viewsUi.Checkboxifier = function (button) {
var $ = jQuery;
this.$button = $(button);
- this.$parent = this.$button.parent('div.views-expose');
- this.$checkbox = this.$parent.find('input:checkbox');
+ this.$parent = this.$button.parent('div.views-expose, div.views-grouped');
+ this.$input = this.$parent.find('input:checkbox, input:radio');
// Hide the button and its description.
this.$button.hide();
- this.$parent.find('.exposed-description').hide();
+ this.$parent.find('.exposed-description, .grouped-description').hide();
+
+ this.$input.click($.proxy(this, 'clickHandler'));
- this.$checkbox.click($.proxy(this, 'clickHandler'));
};
/**
diff --git a/kolab.org/www/drupal-7.15/sites/all/modules/views/modules/aggregator.views.inc b/kolab.org/www/drupal-7.15/sites/all/modules/views/modules/aggregator.views.inc
index 0ca9e33..0fcae2c 100644
--- a/kolab.org/www/drupal-7.15/sites/all/modules/views/modules/aggregator.views.inc
+++ b/kolab.org/www/drupal-7.15/sites/all/modules/views/modules/aggregator.views.inc
@@ -1,20 +1,14 @@
<?php
-/**
- * @file
- * Provide views data and handlers for aggregator.module
- */
/**
- * @defgroup views_aggregator_module aggregator.module handlers
- *
- * Includes the core 'aggregator_feed,' 'aggregator_category,' and 'aggregator_item'
- * tables.
+ * @file
+ * Provide views data and handlers for aggregator.module.
*
- * @{
+ * @ingroup views_module_handlers
*/
/**
- * Implements hook_views_data()
+ * Implements hook_views_data().
*/
function aggregator_views_data() {
// ----------------------------------------------------------------------
@@ -249,6 +243,9 @@ function aggregator_views_data() {
'filter' => array(
'handler' => 'views_handler_filter_string',
),
+ 'argument' => array(
+ 'handler' => 'views_handler_argument_string',
+ ),
);
// link
@@ -263,7 +260,6 @@ function aggregator_views_data() {
'sort' => array(
'handler' => 'views_handler_sort',
),
- // Information for accepting a title as a filter
'filter' => array(
'handler' => 'views_handler_filter_string',
),
@@ -281,7 +277,6 @@ function aggregator_views_data() {
'sort' => array(
'handler' => 'views_handler_sort_date',
),
- // Information for accepting a title as a filter
'filter' => array(
'handler' => 'views_handler_filter_date',
),
@@ -299,7 +294,6 @@ function aggregator_views_data() {
'handler' => 'views_handler_field_xss',
'click sortable' => FALSE,
),
- // Information for accepting a title as a filter
'filter' => array(
'handler' => 'views_handler_filter_string',
),
@@ -390,7 +384,7 @@ function aggregator_views_data() {
}
/**
- * Implements hook_views_plugins
+ * Implements hook_views_plugins().
*/
function aggregator_views_plugins() {
return array(
@@ -410,6 +404,3 @@ function aggregator_views_plugins() {
),
);
}
-/**
- * @}
- */
diff --git a/kolab.org/www/drupal-7.15/sites/all/modules/views/modules/aggregator/views_handler_argument_aggregator_category_cid.inc b/kolab.org/www/drupal-7.15/sites/all/modules/views/modules/aggregator/views_handler_argument_aggregator_category_cid.inc
index c67832c..92ae8b7 100644
--- a/kolab.org/www/drupal-7.15/sites/all/modules/views/modules/aggregator/views_handler_argument_aggregator_category_cid.inc
+++ b/kolab.org/www/drupal-7.15/sites/all/modules/views/modules/aggregator/views_handler_argument_aggregator_category_cid.inc
@@ -1,6 +1,11 @@
<?php
/**
+ * @file
+ * Definition of views_handler_argument_aggregator_category_cid.
+ */
+
+/**
* Argument handler to accept an aggregator category id.
*
* @ingroup views_argument_handlers
diff --git a/kolab.org/www/drupal-7.15/sites/all/modules/views/modules/aggregator/views_handler_argument_aggregator_fid.inc b/kolab.org/www/drupal-7.15/sites/all/modules/views/modules/aggregator/views_handler_argument_aggregator_fid.inc
index ed11288..4147626 100644
--- a/kolab.org/www/drupal-7.15/sites/all/modules/views/modules/aggregator/views_handler_argument_aggregator_fid.inc
+++ b/kolab.org/www/drupal-7.15/sites/all/modules/views/modules/aggregator/views_handler_argument_aggregator_fid.inc
@@ -1,6 +1,11 @@
<?php
/**
+ * @file
+ * Definition of views_handler_argument_aggregator_fid.
+ */
+
+/**
* Argument handler to accept an aggregator feed id.
*
* @ingroup views_argument_handlers
diff --git a/kolab.org/www/drupal-7.15/sites/all/modules/views/modules/aggregator/views_handler_argument_aggregator_iid.inc b/kolab.org/www/drupal-7.15/sites/all/modules/views/modules/aggregator/views_handler_argument_aggregator_iid.inc
index fe19ab6..d959b04 100644
--- a/kolab.org/www/drupal-7.15/sites/all/modules/views/modules/aggregator/views_handler_argument_aggregator_iid.inc
+++ b/kolab.org/www/drupal-7.15/sites/all/modules/views/modules/aggregator/views_handler_argument_aggregator_iid.inc
@@ -1,6 +1,11 @@
<?php
/**
+ * @file
+ * Definition of views_handler_argument_aggregator_iid.
+ */
+
+/**
* Argument handler to accept an aggregator item id.
*
* @ingroup views_argument_handlers
diff --git a/kolab.org/www/drupal-7.15/sites/all/modules/views/modules/aggregator/views_handler_field_aggregator_category.inc b/kolab.org/www/drupal-7.15/sites/all/modules/views/modules/aggregator/views_handler_field_aggregator_category.inc
index 0564810..99fffa1 100644
--- a/kolab.org/www/drupal-7.15/sites/all/modules/views/modules/aggregator/views_handler_field_aggregator_category.inc
+++ b/kolab.org/www/drupal-7.15/sites/all/modules/views/modules/aggregator/views_handler_field_aggregator_category.inc
@@ -1,6 +1,11 @@
<?php
/**
+ * @file
+ * Definition of views_handler_field_aggregator_category.
+ */
+
+/**
* Field handler to provide simple renderer that allows linking to aggregator
* category.
*
@@ -17,7 +22,7 @@ class views_handler_field_aggregator_category extends views_handler_field {
function option_definition() {
$options = parent::option_definition();
- $options['link_to_category'] = array('default' => FALSE);
+ $options['link_to_category'] = array('default' => FALSE, 'bool' => TRUE);
return $options;
}
diff --git a/kolab.org/www/drupal-7.15/sites/all/modules/views/modules/aggregator/views_handler_field_aggregator_title_link.inc b/kolab.org/www/drupal-7.15/sites/all/modules/views/modules/aggregator/views_handler_field_aggregator_title_link.inc
index d428f44..d8bf578 100644
--- a/kolab.org/www/drupal-7.15/sites/all/modules/views/modules/aggregator/views_handler_field_aggregator_title_link.inc
+++ b/kolab.org/www/drupal-7.15/sites/all/modules/views/modules/aggregator/views_handler_field_aggregator_title_link.inc
@@ -1,6 +1,11 @@
<?php
- /**
+/**
+ * @file
+ * Definition of views_handler_field_aggregator_title_link.
+ */
+
+/**
* Field handler that turns an item's title into a clickable link to the original
* source article.
*
@@ -15,7 +20,7 @@ class views_handler_field_aggregator_title_link extends views_handler_field {
function option_definition() {
$options = parent::option_definition();
- $options['display_as_link'] = array('default' => TRUE);
+ $options['display_as_link'] = array('default' => TRUE, 'bool' => TRUE);
return $options;
}
diff --git a/kolab.org/www/drupal-7.15/sites/all/modules/views/modules/aggregator/views_handler_field_aggregator_xss.inc b/kolab.org/www/drupal-7.15/sites/all/modules/views/modules/aggregator/views_handler_field_aggregator_xss.inc
index 0813e35..d39b101 100644
--- a/kolab.org/www/drupal-7.15/sites/all/modules/views/modules/aggregator/views_handler_field_aggregator_xss.inc
+++ b/kolab.org/www/drupal-7.15/sites/all/modules/views/modules/aggregator/views_handler_field_aggregator_xss.inc
@@ -1,4 +1,10 @@
<?php
+
+/**
+ * @file
+ * Definition of views_handler_field_aggregator_xss.
+ */
+
/**
* Filters htmls tags from item.
*
diff --git a/kolab.org/www/drupal-7.15/sites/all/modules/views/modules/aggregator/views_handler_filter_aggregator_category_cid.inc b/kolab.org/www/drupal-7.15/sites/all/modules/views/modules/aggregator/views_handler_filter_aggregator_category_cid.inc
index 27cf674..f9931c8 100644
--- a/kolab.org/www/drupal-7.15/sites/all/modules/views/modules/aggregator/views_handler_filter_aggregator_category_cid.inc
+++ b/kolab.org/www/drupal-7.15/sites/all/modules/views/modules/aggregator/views_handler_filter_aggregator_category_cid.inc
@@ -1,4 +1,10 @@
<?php
+
+/**
+ * @file
+ * Definition of views_handler_filter_aggregator_category_cid.
+ */
+
/**
* Filter by aggregator category cid
*
diff --git a/kolab.org/www/drupal-7.15/sites/all/modules/views/modules/aggregator/views_plugin_row_aggregator_rss.inc b/kolab.org/www/drupal-7.15/sites/all/modules/views/modules/aggregator/views_plugin_row_aggregator_rss.inc
index 35aadec..672952e 100644
--- a/kolab.org/www/drupal-7.15/sites/all/modules/views/modules/aggregator/views_plugin_row_aggregator_rss.inc
+++ b/kolab.org/www/drupal-7.15/sites/all/modules/views/modules/aggregator/views_plugin_row_aggregator_rss.inc
@@ -1,4 +1,5 @@
<?php
+
/**
* @file
* Contains the Aggregator Item RSS row style plugin.
diff --git a/kolab.org/www/drupal-7.15/sites/all/modules/views/modules/book.views.inc b/kolab.org/www/drupal-7.15/sites/all/modules/views/modules/book.views.inc
index 2b1a82a..15a2183 100644
--- a/kolab.org/www/drupal-7.15/sites/all/modules/views/modules/book.views.inc
+++ b/kolab.org/www/drupal-7.15/sites/all/modules/views/modules/book.views.inc
@@ -1,17 +1,14 @@
<?php
-/**
- * @file
- * Provide views data and handlers for book.module
- */
/**
- * @defgroup views_book_module book.module handlers
+ * @file
+ * Provide views data and handlers for book.module.
*
- * @{
+ * @ingroup views_module_handlers
*/
/**
- * Implements hook_views_data()
+ * Implements hook_views_data().
*/
function book_views_data() {
// ----------------------------------------------------------------------
@@ -119,5 +116,16 @@ function book_views_data() {
}
/**
- * @}
+ * Implements hook_views_plugins().
*/
+function book_views_plugins() {
+ return array(
+ 'module' => 'views',
+ 'argument default' => array(
+ 'book_root' => array(
+ 'title' => t('Book root from current node'),
+ 'handler' => 'views_plugin_argument_default_book_root'
+ ),
+ ),
+ );
+}
diff --git a/kolab.org/www/drupal-7.15/sites/all/modules/views/modules/book/views_plugin_argument_default_book_root.inc b/kolab.org/www/drupal-7.15/sites/all/modules/views/modules/book/views_plugin_argument_default_book_root.inc
new file mode 100644
index 0000000..1ce3046
--- /dev/null
+++ b/kolab.org/www/drupal-7.15/sites/all/modules/views/modules/book/views_plugin_argument_default_book_root.inc
@@ -0,0 +1,21 @@
+<?php
+/**
+ * @file
+ * Contains the book root from current node argument default plugin.
+ */
+
+/**
+ * Default argument plugin to get the current node's book root.
+ */
+class views_plugin_argument_default_book_root extends views_plugin_argument_default_node {
+ function get_argument() {
+ // Use the argument_default_node plugin to get the nid argument.
+ $nid = parent::get_argument();
+ if (!empty($nid)) {
+ $node = node_load($nid);
+ if (isset($node->book['bid'])) {
+ return $node->book['bid'];
+ }
+ }
+ }
+}
diff --git a/kolab.org/www/drupal-7.15/sites/all/modules/views/modules/comment.views.inc b/kolab.org/www/drupal-7.15/sites/all/modules/views/modules/comment.views.inc
index e22ccd5..65ef18c 100644
--- a/kolab.org/www/drupal-7.15/sites/all/modules/views/modules/comment.views.inc
+++ b/kolab.org/www/drupal-7.15/sites/all/modules/views/modules/comment.views.inc
@@ -1,18 +1,14 @@
<?php
-/**
- * @file
- * Provide views data and handlers for comment.module
- */
/**
- * @defgroup views_comment_module comment.module handlers
+ * @file
+ * Provide views data and handlers for comment.module.
*
- * Includes the tables 'comment' and 'node_comment_statistics'
- * @{
+ * @ingroup views_module_handlers
*/
/**
- * Implements hook_views_data()
+ * Implements hook_views_data().
*/
function comment_views_data() {
@@ -172,6 +168,28 @@ function comment_views_data() {
),
);
+
+ // Language field
+ if (module_exists('locale')) {
+ $data['comment']['language'] = array(
+ 'title' => t('Language'),
+ 'help' => t('The language the comment is in.'),
+ 'field' => array(
+ 'handler' => 'views_handler_field_locale_language',
+ 'click sortable' => TRUE,
+ ),
+ 'filter' => array(
+ 'handler' => 'views_handler_filter_locale_language',
+ ),
+ 'argument' => array(
+ 'handler' => 'views_handler_argument_locale_language',
+ ),
+ 'sort' => array(
+ 'handler' => 'views_handler_sort',
+ ),
+ );
+ }
+
$data['comments']['timestamp']['moved to'] = array('comment', 'changed');
// changed (when comment was last updated)
$data['comment']['changed'] = array(
@@ -505,7 +523,7 @@ function comment_views_data() {
'handler' => 'views_handler_argument_numeric',
),
'field' => array(
- 'handler' => 'views_handler_filter_user_name',
+ 'handler' => 'views_handler_field_numeric',
),
);
@@ -585,7 +603,7 @@ function comment_views_data_alter(&$data) {
}
/**
- * Implements hook_views_plugins
+ * Implements hook_views_plugins().
*/
function comment_views_plugins() {
return array(
@@ -642,7 +660,3 @@ function template_preprocess_views_view_row_comment(&$vars) {
}
$vars['comment'] = drupal_render($build);
}
-
-/**
- * @}
- */
diff --git a/kolab.org/www/drupal-7.15/sites/all/modules/views/modules/comment/views_handler_argument_comment_user_uid.inc b/kolab.org/www/drupal-7.15/sites/all/modules/views/modules/comment/views_handler_argument_comment_user_uid.inc
index 11144a9..d821f32 100644
--- a/kolab.org/www/drupal-7.15/sites/all/modules/views/modules/comment/views_handler_argument_comment_user_uid.inc
+++ b/kolab.org/www/drupal-7.15/sites/all/modules/views/modules/comment/views_handler_argument_comment_user_uid.inc
@@ -1,6 +1,11 @@
<?php
/**
+ * @file
+ * Definition of views_handler_argument_comment_user_uid.
+ */
+
+/**
* Argument handler to accept a user id to check for nodes that
* user posted or commented on.
*
diff --git a/kolab.org/www/drupal-7.15/sites/all/modules/views/modules/comment/views_handler_field_comment.inc b/kolab.org/www/drupal-7.15/sites/all/modules/views/modules/comment/views_handler_field_comment.inc
index b855b63..7ca3256 100644
--- a/kolab.org/www/drupal-7.15/sites/all/modules/views/modules/comment/views_handler_field_comment.inc
+++ b/kolab.org/www/drupal-7.15/sites/all/modules/views/modules/comment/views_handler_field_comment.inc
@@ -1,4 +1,10 @@
<?php
+
+/**
+ * @file
+ * Definition of views_handler_field_comment.
+ */
+
/**
* Field handler to allow linking to a comment.
*
@@ -18,8 +24,8 @@ class views_handler_field_comment extends views_handler_field {
function option_definition() {
$options = parent::option_definition();
- $options['link_to_comment'] = array('default' => TRUE);
- $options['link_to_node'] = array('default' => FALSE);
+ $options['link_to_comment'] = array('default' => TRUE, 'bool' => TRUE);
+ $options['link_to_node'] = array('default' => FALSE, 'bool' => TRUE);
return $options;
}
diff --git a/kolab.org/www/drupal-7.15/sites/all/modules/views/modules/comment/views_handler_field_comment_depth.inc b/kolab.org/www/drupal-7.15/sites/all/modules/views/modules/comment/views_handler_field_comment_depth.inc
index 8872a6a..4840a1e 100644
--- a/kolab.org/www/drupal-7.15/sites/all/modules/views/modules/comment/views_handler_field_comment_depth.inc
+++ b/kolab.org/www/drupal-7.15/sites/all/modules/views/modules/comment/views_handler_field_comment_depth.inc
@@ -1,4 +1,10 @@
<?php
+
+/**
+ * @file
+ * Definition of views_handler_field_comment_depth.
+ */
+
/**
* Field handler to display the depth of a comment.
*
diff --git a/kolab.org/www/drupal-7.15/sites/all/modules/views/modules/comment/views_handler_field_comment_link.inc b/kolab.org/www/drupal-7.15/sites/all/modules/views/modules/comment/views_handler_field_comment_link.inc
index e0e0ba7..162924e 100644
--- a/kolab.org/www/drupal-7.15/sites/all/modules/views/modules/comment/views_handler_field_comment_link.inc
+++ b/kolab.org/www/drupal-7.15/sites/all/modules/views/modules/comment/views_handler_field_comment_link.inc
@@ -1,4 +1,10 @@
<?php
+
+/**
+ * @file
+ * Definition of views_handler_field_comment_link.
+ */
+
/**
* Base field handler to present a link.
*
@@ -12,7 +18,7 @@ class views_handler_field_comment_link extends views_handler_field_entity {
function option_definition() {
$options = parent::option_definition();
$options['text'] = array('default' => '', 'translatable' => TRUE);
- $options['link_to_node'] = array('default' => FALSE);
+ $options['link_to_node'] = array('default' => FALSE, 'bool' => TRUE);
return $options;
}
diff --git a/kolab.org/www/drupal-7.15/sites/all/modules/views/modules/comment/views_handler_field_comment_link_approve.inc b/kolab.org/www/drupal-7.15/sites/all/modules/views/modules/comment/views_handler_field_comment_link_approve.inc
index 8063e20..0953d0c 100644
--- a/kolab.org/www/drupal-7.15/sites/all/modules/views/modules/comment/views_handler_field_comment_link_approve.inc
+++ b/kolab.org/www/drupal-7.15/sites/all/modules/views/modules/comment/views_handler_field_comment_link_approve.inc
@@ -1,6 +1,11 @@
<?php
+
/**
* @file
+ * Definition of views_handler_field_comment_link_approve.
+ */
+
+/**
* Provides a comment approve link.
*
* @ingroup views_field_handlers
diff --git a/kolab.org/www/drupal-7.15/sites/all/modules/views/modules/comment/views_handler_field_comment_link_delete.inc b/kolab.org/www/drupal-7.15/sites/all/modules/views/modules/comment/views_handler_field_comment_link_delete.inc
index b74661b..c55ac1c 100644
--- a/kolab.org/www/drupal-7.15/sites/all/modules/views/modules/comment/views_handler_field_comment_link_delete.inc
+++ b/kolab.org/www/drupal-7.15/sites/all/modules/views/modules/comment/views_handler_field_comment_link_delete.inc
@@ -1,4 +1,10 @@
<?php
+
+/**
+ * @file
+ * Definition of views_handler_field_comment_link_delete.
+ */
+
/**
* Field handler to present a link to delete a node.
*
diff --git a/kolab.org/www/drupal-7.15/sites/all/modules/views/modules/comment/views_handler_field_comment_link_edit.inc b/kolab.org/www/drupal-7.15/sites/all/modules/views/modules/comment/views_handler_field_comment_link_edit.inc
index ffd1f93..0b06c0e 100644
--- a/kolab.org/www/drupal-7.15/sites/all/modules/views/modules/comment/views_handler_field_comment_link_edit.inc
+++ b/kolab.org/www/drupal-7.15/sites/all/modules/views/modules/comment/views_handler_field_comment_link_edit.inc
@@ -1,4 +1,10 @@
<?php
+
+/**
+ * @file
+ * Definition of views_handler_field_comment_link_edit.
+ */
+
/**
* Field handler to present a link node edit.
*
@@ -7,7 +13,7 @@
class views_handler_field_comment_link_edit extends views_handler_field_comment_link {
function option_definition() {
$options = parent::option_definition();
- $options['destination'] = array('default' => FALSE);
+ $options['destination'] = array('default' => FALSE, 'bool' => TRUE);
return $options;
}
diff --git a/kolab.org/www/drupal-7.15/sites/all/modules/views/modules/comment/views_handler_field_comment_link_reply.inc b/kolab.org/www/drupal-7.15/sites/all/modules/views/modules/comment/views_handler_field_comment_link_reply.inc
index 1564164..47d0f17 100644
--- a/kolab.org/www/drupal-7.15/sites/all/modules/views/modules/comment/views_handler_field_comment_link_reply.inc
+++ b/kolab.org/www/drupal-7.15/sites/all/modules/views/modules/comment/views_handler_field_comment_link_reply.inc
@@ -1,6 +1,11 @@
<?php
/**
+ * @file
+ * Definition of views_handler_field_comment_link_reply.
+ */
+
+/**
* Field handler to present a link to delete a node.
*
* @ingroup views_field_handlers
diff --git a/kolab.org/www/drupal-7.15/sites/all/modules/views/modules/comment/views_handler_field_comment_node_link.inc b/kolab.org/www/drupal-7.15/sites/all/modules/views/modules/comment/views_handler_field_comment_node_link.inc
index 0e4f610..7feecfb 100644
--- a/kolab.org/www/drupal-7.15/sites/all/modules/views/modules/comment/views_handler_field_comment_node_link.inc
+++ b/kolab.org/www/drupal-7.15/sites/all/modules/views/modules/comment/views_handler_field_comment_node_link.inc
@@ -1,4 +1,10 @@
<?php
+
+/**
+ * @file
+ * Definition of views_handler_field_comment_node_link.
+ */
+
/**
* Handler for showing comment module's node link.
*
@@ -22,7 +28,7 @@ class views_handler_field_comment_node_link extends views_handler_field_entity {
function option_definition() {
$options = parent::option_definition();
- $options['teaser'] = array('default' => 0);
+ $options['teaser'] = array('default' => FALSE, 'bool' => TRUE);
return $options;
}
@@ -32,7 +38,6 @@ class views_handler_field_comment_node_link extends views_handler_field_entity {
'#title' => t('Show teaser-style link'),
'#default_value' => $this->options['teaser'],
'#description' => t('Show the comment link in the form used on standard node teasers, rather than the full node form.'),
- '#fieldset' => 'more',
);
parent::options_form($form, $form_state);
diff --git a/kolab.org/www/drupal-7.15/sites/all/modules/views/modules/comment/views_handler_field_comment_username.inc b/kolab.org/www/drupal-7.15/sites/all/modules/views/modules/comment/views_handler_field_comment_username.inc
index 6b6186e..887a74e 100644
--- a/kolab.org/www/drupal-7.15/sites/all/modules/views/modules/comment/views_handler_field_comment_username.inc
+++ b/kolab.org/www/drupal-7.15/sites/all/modules/views/modules/comment/views_handler_field_comment_username.inc
@@ -1,4 +1,10 @@
<?php
+
+/**
+ * @file
+ * Definition of views_handler_field_comment_username.
+ */
+
/**
* Field handler to allow linking to a user account or homepage.
*
@@ -16,7 +22,7 @@ class views_handler_field_comment_username extends views_handler_field {
function option_definition() {
$options = parent::option_definition();
- $options['link_to_user'] = array('default' => TRUE);
+ $options['link_to_user'] = array('default' => TRUE, 'bool' => TRUE);
return $options;
}
diff --git a/kolab.org/www/drupal-7.15/sites/all/modules/views/modules/comment/views_handler_field_last_comment_timestamp.inc b/kolab.org/www/drupal-7.15/sites/all/modules/views/modules/comment/views_handler_field_last_comment_timestamp.inc
index 2bfa970..e7cf8bd 100644
--- a/kolab.org/www/drupal-7.15/sites/all/modules/views/modules/comment/views_handler_field_last_comment_timestamp.inc
+++ b/kolab.org/www/drupal-7.15/sites/all/modules/views/modules/comment/views_handler_field_last_comment_timestamp.inc
@@ -1,6 +1,11 @@
<?php
/**
+ * @file
+ * Definition of views_handler_field_last_comment_timestamp.
+ */
+
+/**
* Field handler to display the timestamp of a comment with the count of comments.
*
* @ingroup views_field_handlers
diff --git a/kolab.org/www/drupal-7.15/sites/all/modules/views/modules/comment/views_handler_field_ncs_last_comment_name.inc b/kolab.org/www/drupal-7.15/sites/all/modules/views/modules/comment/views_handler_field_ncs_last_comment_name.inc
index 63f948f..c9c6885 100644
--- a/kolab.org/www/drupal-7.15/sites/all/modules/views/modules/comment/views_handler_field_ncs_last_comment_name.inc
+++ b/kolab.org/www/drupal-7.15/sites/all/modules/views/modules/comment/views_handler_field_ncs_last_comment_name.inc
@@ -1,6 +1,11 @@
<?php
/**
+ * @file
+ * Definition of views_handler_field_ncs_last_comment_name.
+ */
+
+/**
* Field handler to present the name of the last comment poster.
*
* @ingroup views_field_handlers
@@ -28,7 +33,7 @@ class views_handler_field_ncs_last_comment_name extends views_handler_field {
function option_definition() {
$options = parent::option_definition();
- $options['link_to_user'] = array('default' => TRUE);
+ $options['link_to_user'] = array('default' => TRUE, 'bool' => TRUE);
return $options;
}
diff --git a/kolab.org/www/drupal-7.15/sites/all/modules/views/modules/comment/views_handler_field_ncs_last_updated.inc b/kolab.org/www/drupal-7.15/sites/all/modules/views/modules/comment/views_handler_field_ncs_last_updated.inc
index 3950ffb..d1d7306 100644
--- a/kolab.org/www/drupal-7.15/sites/all/modules/views/modules/comment/views_handler_field_ncs_last_updated.inc
+++ b/kolab.org/www/drupal-7.15/sites/all/modules/views/modules/comment/views_handler_field_ncs_last_updated.inc
@@ -1,4 +1,9 @@
<?php
+
+/**
+ * @file
+ * Definition of views_handler_field_ncs_last_updated.
+ */
/**
* Field handler to display the newer of last comment / node updated.
*
diff --git a/kolab.org/www/drupal-7.15/sites/all/modules/views/modules/comment/views_handler_field_node_comment.inc b/kolab.org/www/drupal-7.15/sites/all/modules/views/modules/comment/views_handler_field_node_comment.inc
index 6892fed..d863c44 100644
--- a/kolab.org/www/drupal-7.15/sites/all/modules/views/modules/comment/views_handler_field_node_comment.inc
+++ b/kolab.org/www/drupal-7.15/sites/all/modules/views/modules/comment/views_handler_field_node_comment.inc
@@ -1,6 +1,11 @@
<?php
/**
+ * @file
+ * Definition of views_handler_field_node_comment.
+ */
+
+/**
* Display node comment status.
*
* @ingroup views_field_handlers
diff --git a/kolab.org/www/drupal-7.15/sites/all/modules/views/modules/comment/views_handler_field_node_new_comments.inc b/kolab.org/www/drupal-7.15/sites/all/modules/views/modules/comment/views_handler_field_node_new_comments.inc
index 0ecdfc6..70b0581 100644
--- a/kolab.org/www/drupal-7.15/sites/all/modules/views/modules/comment/views_handler_field_node_new_comments.inc
+++ b/kolab.org/www/drupal-7.15/sites/all/modules/views/modules/comment/views_handler_field_node_new_comments.inc
@@ -1,6 +1,11 @@
<?php
/**
+ * @file
+ * Definition of views_handler_field_node_new_comments.
+ */
+
+/**
* Field handler to display the number of new comments.
*
* @ingroup views_field_handlers
@@ -26,7 +31,7 @@ class views_handler_field_node_new_comments extends views_handler_field_numeric
function option_definition() {
$options = parent::option_definition();
- $options['link_to_comment'] = array('default' => TRUE);
+ $options['link_to_comment'] = array('default' => TRUE, 'bool' => TRUE);
return $options;
}
diff --git a/kolab.org/www/drupal-7.15/sites/all/modules/views/modules/comment/views_handler_filter_comment_user_uid.inc b/kolab.org/www/drupal-7.15/sites/all/modules/views/modules/comment/views_handler_filter_comment_user_uid.inc
index 4f9e711..e76ebb7 100644
--- a/kolab.org/www/drupal-7.15/sites/all/modules/views/modules/comment/views_handler_filter_comment_user_uid.inc
+++ b/kolab.org/www/drupal-7.15/sites/all/modules/views/modules/comment/views_handler_filter_comment_user_uid.inc
@@ -1,6 +1,11 @@
<?php
/**
+ * @file
+ * Definition of views_handler_filter_comment_user_uid.
+ */
+
+/**
* Filter handler to accept a user id to check for nodes that user posted or
* commented on.
*
diff --git a/kolab.org/www/drupal-7.15/sites/all/modules/views/modules/comment/views_handler_filter_ncs_last_updated.inc b/kolab.org/www/drupal-7.15/sites/all/modules/views/modules/comment/views_handler_filter_ncs_last_updated.inc
index 3818db9..2319edf 100644
--- a/kolab.org/www/drupal-7.15/sites/all/modules/views/modules/comment/views_handler_filter_ncs_last_updated.inc
+++ b/kolab.org/www/drupal-7.15/sites/all/modules/views/modules/comment/views_handler_filter_ncs_last_updated.inc
@@ -1,6 +1,12 @@
<?php
+
+/**
+ * @file
+ * Definition of views_handler_filter_ncs_last_updated.
+ */
+
/**
- * Filter handler for the newer of last comment / node updated
+ * Filter handler for the newer of last comment / node updated.
*
* @ingroup views_filter_handlers
*/
diff --git a/kolab.org/www/drupal-7.15/sites/all/modules/views/modules/comment/views_handler_filter_node_comment.inc b/kolab.org/www/drupal-7.15/sites/all/modules/views/modules/comment/views_handler_filter_node_comment.inc
index 659eaa6..befce10 100644
--- a/kolab.org/www/drupal-7.15/sites/all/modules/views/modules/comment/views_handler_filter_node_comment.inc
+++ b/kolab.org/www/drupal-7.15/sites/all/modules/views/modules/comment/views_handler_filter_node_comment.inc
@@ -1,7 +1,12 @@
<?php
/**
- * Filter based on comment node status
+ * @file
+ * Definition of views_handler_filter_node_comment.
+ */
+
+/**
+ * Filter based on comment node status.
*
* @ingroup views_filter_handlers
*/
diff --git a/kolab.org/www/drupal-7.15/sites/all/modules/views/modules/comment/views_handler_sort_comment_thread.inc b/kolab.org/www/drupal-7.15/sites/all/modules/views/modules/comment/views_handler_sort_comment_thread.inc
index e529b2a..e513a93 100644
--- a/kolab.org/www/drupal-7.15/sites/all/modules/views/modules/comment/views_handler_sort_comment_thread.inc
+++ b/kolab.org/www/drupal-7.15/sites/all/modules/views/modules/comment/views_handler_sort_comment_thread.inc
@@ -1,6 +1,14 @@
<?php
+
+/**
+ * @file
+ * Definition of views_handler_sort_comment_thread.
+ */
+
/**
- * Sort handler for ordering by thread
+ * Sort handler for ordering by thread.
+ *
+ * @ingroup views_sort_handlers
*/
class views_handler_sort_comment_thread extends views_handler_sort {
function query() {
diff --git a/kolab.org/www/drupal-7.15/sites/all/modules/views/modules/comment/views_handler_sort_ncs_last_comment_name.inc b/kolab.org/www/drupal-7.15/sites/all/modules/views/modules/comment/views_handler_sort_ncs_last_comment_name.inc
index 8eca177..613045a 100644
--- a/kolab.org/www/drupal-7.15/sites/all/modules/views/modules/comment/views_handler_sort_ncs_last_comment_name.inc
+++ b/kolab.org/www/drupal-7.15/sites/all/modules/views/modules/comment/views_handler_sort_ncs_last_comment_name.inc
@@ -1,4 +1,10 @@
<?php
+
+/**
+ * @file
+ * Definition of views_handler_sort_ncs_last_comment_name.
+ */
+
/**
* Sort handler to sort by last comment name which might be in 2 different
* fields.
diff --git a/kolab.org/www/drupal-7.15/sites/all/modules/views/modules/comment/views_handler_sort_ncs_last_updated.inc b/kolab.org/www/drupal-7.15/sites/all/modules/views/modules/comment/views_handler_sort_ncs_last_updated.inc
index 04b01a1..83f0f54 100644
--- a/kolab.org/www/drupal-7.15/sites/all/modules/views/modules/comment/views_handler_sort_ncs_last_updated.inc
+++ b/kolab.org/www/drupal-7.15/sites/all/modules/views/modules/comment/views_handler_sort_ncs_last_updated.inc
@@ -1,4 +1,10 @@
<?php
+
+/**
+ * @file
+ * Definition of views_handler_sort_ncs_last_updated.
+ */
+
/**
* Sort handler for the newer of last comment / node updated.
*
diff --git a/kolab.org/www/drupal-7.15/sites/all/modules/views/modules/comment/views_plugin_row_comment_rss.inc b/kolab.org/www/drupal-7.15/sites/all/modules/views/modules/comment/views_plugin_row_comment_rss.inc
index 7576bb5..d287b8e 100644
--- a/kolab.org/www/drupal-7.15/sites/all/modules/views/modules/comment/views_plugin_row_comment_rss.inc
+++ b/kolab.org/www/drupal-7.15/sites/all/modules/views/modules/comment/views_plugin_row_comment_rss.inc
@@ -1,4 +1,5 @@
<?php
+
/**
* @file
* Contains the comment RSS row style plugin.
@@ -15,7 +16,7 @@ class views_plugin_row_comment_rss extends views_plugin_row {
$options = parent::option_definition();
$options['item_length'] = array('default' => 'default');
- $options['links'] = FALSE;
+ $options['links'] = array('default' => FALSE, 'bool' => TRUE);
return $options;
}
diff --git a/kolab.org/www/drupal-7.15/sites/all/modules/views/modules/comment/views_plugin_row_comment_view.inc b/kolab.org/www/drupal-7.15/sites/all/modules/views/modules/comment/views_plugin_row_comment_view.inc
index 284fa5f..f78fa36 100644
--- a/kolab.org/www/drupal-7.15/sites/all/modules/views/modules/comment/views_plugin_row_comment_view.inc
+++ b/kolab.org/www/drupal-7.15/sites/all/modules/views/modules/comment/views_plugin_row_comment_view.inc
@@ -1,4 +1,5 @@
<?php
+
/**
* @file
* Contains the node RSS row style plugin.
@@ -27,7 +28,7 @@ class views_plugin_row_comment_view extends views_plugin_row {
function option_definition() {
$options = parent::option_definition();
- $options['links'] = array('default' => TRUE);
+ $options['links'] = array('default' => TRUE, 'bool' => TRUE);
$options['view_mode'] = array('default' => 'full');
return $options;
}
diff --git a/kolab.org/www/drupal-7.15/sites/all/modules/views/modules/contact.views.inc b/kolab.org/www/drupal-7.15/sites/all/modules/views/modules/contact.views.inc
index 85bcb94..412d824 100644
--- a/kolab.org/www/drupal-7.15/sites/all/modules/views/modules/contact.views.inc
+++ b/kolab.org/www/drupal-7.15/sites/all/modules/views/modules/contact.views.inc
@@ -1,10 +1,16 @@
<?php
+
/**
* @file
- * Provide views data and handlers for contact.module
+ * Provide views data and handlers for contact.module.
+ *
+ * @ingroup views_module_handlers
*/
-function contact_views_data() {
+/**
+ * Implements hook_views_data_alter().
+ */
+function contact_views_data_alter(&$data) {
$data['users']['contact'] = array(
'field' => array(
'title' => t('Link to contact page'),
@@ -12,5 +18,4 @@ function contact_views_data() {
'handler' => 'views_handler_field_contact_link',
),
);
- return $data;
}
diff --git a/kolab.org/www/drupal-7.15/sites/all/modules/views/modules/contact/views_handler_field_contact_link.inc b/kolab.org/www/drupal-7.15/sites/all/modules/views/modules/contact/views_handler_field_contact_link.inc
index 0a44f21..9d22f01 100644
--- a/kolab.org/www/drupal-7.15/sites/all/modules/views/modules/contact/views_handler_field_contact_link.inc
+++ b/kolab.org/www/drupal-7.15/sites/all/modules/views/modules/contact/views_handler_field_contact_link.inc
@@ -1,4 +1,10 @@
<?php
+
+/**
+ * @file
+ * Definition of views_handler_field_contact_link.
+ */
+
/**
* A field that links to the user contact page, if access is permitted.
*
diff --git a/kolab.org/www/drupal-7.15/sites/all/modules/views/modules/field.views.inc b/kolab.org/www/drupal-7.15/sites/all/modules/views/modules/field.views.inc
index dd4363f..fe1968b 100644
--- a/kolab.org/www/drupal-7.15/sites/all/modules/views/modules/field.views.inc
+++ b/kolab.org/www/drupal-7.15/sites/all/modules/views/modules/field.views.inc
@@ -2,17 +2,13 @@
/**
* @file
- * Provide Views data and handlers for field.module
- */
-
-/**
- * @defgroup views_field_module field.module handlers
+ * Provide Views data and handlers for field.module.
*
- * @{
+ * @ingroup views_module_handlers
*/
/**
- * Implements hook_views_data()
+ * Implements hook_views_data().
*
* Field modules can implement hook_field_views_data() to override
* the default behavior for adding fields.
@@ -41,7 +37,7 @@ function field_views_data() {
}
/**
- * Implements hook_views_data_alter()
+ * Implements hook_views_data_alter().
*
* Field modules can implement hook_field_views_data_views_data_alter() to
* alter the views data on a per field basis. This is weirdly named so as
@@ -342,7 +338,7 @@ function field_views_field_default_views_data($field) {
'handler' => $argument,
'additional fields' => $additional_fields,
'field_name' => $field['field_name'],
- 'empty field name' => t('<No value>'),
+ 'empty field name' => t('- No value -'),
);
$data[$table][$column_real_name]['filter'] = array(
'field' => $column_real_name,
@@ -381,7 +377,7 @@ function field_views_field_default_views_data($field) {
'table' => $table,
'handler' => 'views_handler_argument_numeric',
'additional fields' => $additional_fields,
- 'empty field name' => t('<No value>'),
+ 'empty field name' => t('- No value -'),
'field_name' => $field['field_name'],
);
$data[$table]['delta']['filter'] = array(
@@ -412,18 +408,19 @@ function field_views_field_default_views_data($field) {
function list_field_views_data($field) {
$data = field_views_field_default_views_data($field);
foreach ($data as $table_name => $table_data) {
- foreach ($table_data as $field => $field_data) {
- if (isset($field_data['filter']) && $field != 'delta') {
- $data[$table_name][$field]['filter']['handler'] = 'views_handler_filter_field_list';
+ foreach ($table_data as $field_name => $field_data) {
+ if (isset($field_data['filter']) && $field_name != 'delta') {
+ $data[$table_name][$field_name]['filter']['handler'] = 'views_handler_filter_field_list';
}
- if (isset($field_data['argument']) && $field != 'delta') {
- $data[$table_name][$field]['argument']['handler'] = 'views_handler_argument_field_list';
+ if (isset($field_data['argument']) && $field_name != 'delta') {
+ if ($field['type'] == 'list_text') {
+ $data[$table_name][$field_name]['argument']['handler'] = 'views_handler_argument_field_list_string';
+ }
+ else {
+ $data[$table_name][$field_name]['argument']['handler'] = 'views_handler_argument_field_list';
+ }
}
}
}
return $data;
}
-
-/**
- * @}
- */
diff --git a/kolab.org/www/drupal-7.15/sites/all/modules/views/modules/field/views_handler_argument_field_list.inc b/kolab.org/www/drupal-7.15/sites/all/modules/views/modules/field/views_handler_argument_field_list.inc
index f8f10e9..e0f7abe 100644
--- a/kolab.org/www/drupal-7.15/sites/all/modules/views/modules/field/views_handler_argument_field_list.inc
+++ b/kolab.org/www/drupal-7.15/sites/all/modules/views/modules/field/views_handler_argument_field_list.inc
@@ -1,18 +1,21 @@
<?php
+
/**
* @file
- * Contains views_handler_argument_field_list handler
+ * Definition of views_handler_argument_field_list.
*/
/**
- * Argument handler for list field to show the human readable name in the summary.
+ * Argument handler for list field to show the human readable name in the
+ * summary.
*
* @ingroup views_argument_handlers
*/
class views_handler_argument_field_list extends views_handler_argument_numeric {
/**
- * @var array
* Stores the allowed values of this field.
+ *
+ * @var array
*/
var $allowed_values = NULL;
@@ -24,7 +27,7 @@ class views_handler_argument_field_list extends views_handler_argument_numeric {
function option_definition() {
$options = parent::option_definition();
- $options['summary']['contains']['human'] = array('default' => FALSE);
+ $options['summary']['contains']['human'] = array('default' => FALSE, 'bool' => TRUE);
return $options;
}
@@ -35,7 +38,7 @@ class views_handler_argument_field_list extends views_handler_argument_numeric {
$form['summary']['human'] = array(
'#title' => t('Display list value as human readable'),
'#type' => 'checkbox',
- '#default_value' => $this->options['summary']['human'],#
+ '#default_value' => $this->options['summary']['human'],
'#dependency' => array('radio:options[default_action]' => array('summary')),
);
}
@@ -53,4 +56,3 @@ class views_handler_argument_field_list extends views_handler_argument_numeric {
}
}
}
-
diff --git a/kolab.org/www/drupal-7.15/sites/all/modules/views/modules/field/views_handler_argument_field_list_string.inc b/kolab.org/www/drupal-7.15/sites/all/modules/views/modules/field/views_handler_argument_field_list_string.inc
new file mode 100644
index 0000000..67a9f2d
--- /dev/null
+++ b/kolab.org/www/drupal-7.15/sites/all/modules/views/modules/field/views_handler_argument_field_list_string.inc
@@ -0,0 +1,59 @@
+<?php
+
+/**
+ * @file
+ * Definition of views_handler_argument_field_list_text.
+ */
+
+/**
+ * Argument handler for list field to show the human readable name in the
+ * summary.
+ *
+ * @ingroup views_argument_handlers
+ */
+class views_handler_argument_field_list_string extends views_handler_argument_string {
+ /**
+ * Stores the allowed values of this field.
+ *
+ * @var array
+ */
+ var $allowed_values = NULL;
+
+ function init(&$view, &$options) {
+ parent::init($view, $options);
+ $field = field_info_field($this->definition['field_name']);
+ $this->allowed_values = list_allowed_values($field);
+ }
+
+ function option_definition() {
+ $options = parent::option_definition();
+
+ $options['summary']['contains']['human'] = array('default' => FALSE, 'bool' => TRUE);
+
+ return $options;
+ }
+
+ function options_form(&$form, &$form_state) {
+ parent::options_form($form, $form_state);
+
+ $form['summary']['human'] = array(
+ '#title' => t('Display list value as human readable'),
+ '#type' => 'checkbox',
+ '#default_value' => $this->options['summary']['human'],
+ '#dependency' => array('radio:options[default_action]' => array('summary')),
+ );
+ }
+
+
+ function summary_name($data) {
+ $value = $data->{$this->name_alias};
+ // If the list element has a human readable name 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.
+ else {
+ return $this->case_transform(check_plain($value), $this->options['case']);
+ }
+ }
+}
diff --git a/kolab.org/www/drupal-7.15/sites/all/modules/views/modules/field/views_handler_field_field.inc b/kolab.org/www/drupal-7.15/sites/all/modules/views/modules/field/views_handler_field_field.inc
index 8e0b767..b50a0ae 100644
--- a/kolab.org/www/drupal-7.15/sites/all/modules/views/modules/field/views_handler_field_field.inc
+++ b/kolab.org/www/drupal-7.15/sites/all/modules/views/modules/field/views_handler_field_field.inc
@@ -1,6 +1,11 @@
<?php
/**
+ * @file
+ * Definition of views_handler_field_field.
+ */
+
+/**
* Helper function: Return an array of formatter options for a field type.
*
* Borrowed from field_ui.
@@ -28,19 +33,54 @@ function _field_view_formatter_options($field_type = NULL) {
}
/**
- * A field that displays fields.
+ * A field that displays fieldapi fields.
+ *
+ * @ingroup views_field_handlers
*/
class views_handler_field_field extends views_handler_field {
/**
* An array to store field renderable arrays for use by render_items.
+ *
+ * @var array
*/
public $items = array();
/**
- * Store the field informations.
+ * Store the field information.
+ *
+ * @var array
*/