summaryrefslogtreecommitdiff
path: root/kolab.org/www/drupal-7.15/sites/all/modules/views
diff options
context:
space:
mode:
authorTorsten Grote <grote@kolabsys.com>2012-08-14 13:29:52 (GMT)
committerTorsten Grote <grote@kolabsys.com>2012-08-14 13:29:52 (GMT)
commit8a7a4f8e58df35a10fda833a9904eb8fd961a1ca (patch)
tree35e2f907372d637f76c0e3c3ac1c0f27f2dc1391 /kolab.org/www/drupal-7.15/sites/all/modules/views
parent146e20fc2d0941a6783641f26b3ea074dc03fc84 (diff)
downloadkolab.org-www-8a7a4f8e58df35a10fda833a9904eb8fd961a1ca.tar.gz
upgrade to drupal 7.15
Diffstat (limited to 'kolab.org/www/drupal-7.15/sites/all/modules/views')
-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/D7UPGRADE.txt2
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/LICENSE.txt339
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/README.txt19
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/css/ie/views-admin.ie7.css91
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/css/views-admin-rtl.css98
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/css/views-admin.advanced_help.css24
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/css/views-admin.bartik-rtl.css12
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/css/views-admin.bartik.css224
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/css/views-admin.contextual.css63
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/css/views-admin.css361
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/css/views-admin.ctools-rtl.css82
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/css/views-admin.ctools.css237
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/css/views-admin.garland-rtl.css13
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/css/views-admin.garland.css263
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/css/views-admin.seven-rtl.css43
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/css/views-admin.seven.css550
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/css/views-admin.theme-rtl.css208
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/css/views-admin.theme.css1056
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/css/views-rtl.css5
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/css/views.css42
-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/documentation-standards.txt5
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/drush/views.drush.inc495
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/handlers/views_handler_area.inc113
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/handlers/views_handler_area_result.inc93
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/handlers/views_handler_area_text.inc110
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/handlers/views_handler_area_view.inc82
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/handlers/views_handler_argument.inc1212
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/handlers/views_handler_argument_date.inc94
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/handlers/views_handler_argument_formula.inc57
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/handlers/views_handler_argument_group_by_numeric.inc24
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/handlers/views_handler_argument_many_to_one.inc179
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/handlers/views_handler_argument_null.inc61
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/handlers/views_handler_argument_numeric.inc115
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/handlers/views_handler_argument_string.inc281
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/handlers/views_handler_field.inc1505
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/handlers/views_handler_field_boolean.inc75
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/handlers/views_handler_field_contextual_links.inc87
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/handlers/views_handler_field_counter.inc45
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/handlers/views_handler_field_custom.inc50
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/handlers/views_handler_field_date.inc85
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/handlers/views_handler_field_entity.inc98
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/handlers/views_handler_field_machine_name.inc68
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/handlers/views_handler_field_markup.inc54
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/handlers/views_handler_field_math.inc78
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/handlers/views_handler_field_numeric.inc131
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/handlers/views_handler_field_prerender_list.inc153
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/handlers/views_handler_field_serialized.inc60
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/handlers/views_handler_field_time_interval.inc31
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/handlers/views_handler_field_url.inc38
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/handlers/views_handler_filter.inc680
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/handlers/views_handler_filter_boolean_operator.inc170
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/handlers/views_handler_filter_boolean_operator_string.inc29
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/handlers/views_handler_filter_date.inc150
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/handlers/views_handler_filter_equality.inc39
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/handlers/views_handler_filter_group_by_numeric.inc51
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/handlers/views_handler_filter_in_operator.inc417
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/handlers/views_handler_filter_many_to_one.inc120
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/handlers/views_handler_filter_numeric.inc317
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/handlers/views_handler_filter_string.inc330
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/handlers/views_handler_relationship.inc183
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/handlers/views_handler_relationship_groupwise_max.inc381
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/handlers/views_handler_sort.inc232
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/handlers/views_handler_sort_date.inc69
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/handlers/views_handler_sort_group_by_numeric.inc32
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/handlers/views_handler_sort_menu_hierarchy.inc19
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/handlers/views_handler_sort_random.inc17
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/help/about.html62
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/help/advanced-settings.html8
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/help/aggregation.html1
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/help/alter-exposed-filter.html31
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/help/analyze-theme.html24
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/help/api-default-views.html103
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/help/api-example.html179
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/help/api-forms.html92
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/help/api-handler-area.html45
-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.html256
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/help/api-upgrading.html224
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/help/api.html24
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/help/argument.html106
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/help/basic-settings.html20
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/help/demo-video.html5
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/help/display-attachment.html1
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/help/display-block.html11
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/help/display-default.html3
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/help/display-feed.html1
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/help/display-page.html7
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/help/display.html13
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/help/drush.html13
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/help/embed.html24
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/help/empty-text.html3
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/help/example-author-block.html77
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/help/example-filter-by-current-user.html46
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/help/example-recent-stories.html57
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/help/example-user-feed.html73
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/help/example-users-by-role.html47
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/help/exposed-form.html24
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/help/field.html27
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/help/filter.html20
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/help/get-total-rows.html16
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/help/getting-started.html23
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/help/group-by.html17
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/help/header.html3
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/help/images/node-term_node-term_data-large.pngbin0 -> 4141 bytes
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/help/images/node-term_node-term_data.pngbin0 -> 3457 bytes
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/help/images/overview-ui-large.pngbin0 -> 83826 bytes
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/help/images/overview-ui-small.pngbin0 -> 44890 bytes
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/help/images/style-breakdown-large.pngbin0 -> 47381 bytes
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/help/images/style-breakdown.pngbin0 -> 15182 bytes
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/help/images/views1-admin-large.pngbin0 -> 67878 bytes
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/help/images/views1-admin.pngbin0 -> 24372 bytes
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/help/images/views1-changeviewtype-large.pngbin0 -> 37394 bytes
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/help/images/views1-changeviewtype.pngbin0 -> 17456 bytes
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/help/images/views2-addaview-large.pngbin0 -> 46121 bytes
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/help/images/views2-addaview.pngbin0 -> 19262 bytes
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/help/images/views2-adddisplay-large.pngbin0 -> 43413 bytes
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/help/images/views2-adddisplay.pngbin0 -> 19976 bytes
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/help/images/views2-addfields-large.pngbin0 -> 29487 bytes
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/help/images/views2-addfields.pngbin0 -> 13043 bytes
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/help/images/views2-addfieldsajax-large.pngbin0 -> 26423 bytes
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/help/images/views2-addfieldsajax.pngbin0 -> 16005 bytes
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/help/images/views2-admin-large.pngbin0 -> 53418 bytes
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/help/images/views2-admin.pngbin0 -> 19994 bytes
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/help/images/views2-changedisplaystyle-large.pngbin0 -> 43090 bytes
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/help/images/views2-changedisplaystyle.pngbin0 -> 16163 bytes
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/help/images/views2-fieldspreview-large.pngbin0 -> 40484 bytes
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/help/images/views2-fieldspreview.pngbin0 -> 12480 bytes
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/help/images/views2-newview-large.pngbin0 -> 36263 bytes
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/help/images/views2-newview.pngbin0 -> 17308 bytes
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/help/images/views2-rearrangefields-large.pngbin0 -> 34183 bytes
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/help/images/views2-rearrangefields.pngbin0 -> 19129 bytes
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/help/images/views2-tablestyle-large.pngbin0 -> 38890 bytes
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/help/images/views2-tablestyle.pngbin0 -> 20917 bytes
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/help/images/views3-group-aggregation-types.pngbin0 -> 16742 bytes
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/help/images/views3-group-aggregation.pngbin0 -> 55825 bytes
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/help/images/views3-jump-style-menu.pngbin0 -> 40328 bytes
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/help/images/views3-semanticviews.pngbin0 -> 5611 bytes
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/help/menu.html21
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/help/misc-notes.html12
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/help/new.html131
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/help/other-help.html9
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/help/overrides.html6
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/help/path.html7
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/help/performance-views-vs-displays.html5
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/help/performance.html1
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/help/relationship-representative.html14
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/help/relationship.html17
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/help/reports.html3
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/help/select-multple-nids-contextual-filters.html28
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/help/semantic-views.html18
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/help/sort.html28
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/help/style-comment-rss.html1
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/help/style-fields.html16
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/help/style-grid.html22
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/help/style-grouping.html7
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/help/style-jump.html48
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/help/style-list.html20
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/help/style-node-rss.html1
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/help/style-node.html11
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/help/style-row.html11
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/help/style-rss.html5
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/help/style-settings.html3
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/help/style-summary-unformatted.html3
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/help/style-summary.html3
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/help/style-table.html13
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/help/style-unformatted.html1
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/help/style.html15
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/help/taxonomy-page-override.html41
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/help/theme-css.html76
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/help/top-pager.html18
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/help/ui-crashes.html25
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/help/updating-view3.html1
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/help/updating.html7
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/help/upgrading.html8
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/help/using-theme.html50
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/help/view-add.html19
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/help/view-settings.html5
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/help/view-type.html21
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/help/views.help.ini360
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/images/arrow-active.pngbin0 -> 313 bytes
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/images/close.pngbin0 -> 227 bytes
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/images/expanded-options.pngbin0 -> 228 bytes
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/images/loading-small.gifbin0 -> 2112 bytes
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/images/loading.gifbin0 -> 6733 bytes
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/images/overridden.gifbin0 -> 175 bytes
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/images/sprites.pngbin0 -> 1777 bytes
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/images/status-active.gifbin0 -> 2196 bytes
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/includes/admin.inc5291
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/includes/ajax.inc376
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/includes/analyze.inc121
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/includes/base.inc339
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/includes/cache.inc165
-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.inc1672
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/includes/plugins.inc567
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/includes/view.inc2525
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/js/ajax.js236
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/js/ajax_view.js137
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/js/base.js111
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/js/jquery.ui.dialog.patch.js27
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/js/views-admin.js987
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/js/views-contextual.js16
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/js/views-list.js21
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/modules/aggregator.views.inc415
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/modules/aggregator/views_handler_argument_aggregator_category_cid.inc21
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/modules/aggregator/views_handler_argument_aggregator_fid.inc21
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/modules/aggregator/views_handler_argument_aggregator_iid.inc25
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/modules/aggregator/views_handler_field_aggregator_category.inc55
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/modules/aggregator/views_handler_field_aggregator_title_link.inc50
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/modules/aggregator/views_handler_field_aggregator_xss.inc12
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/modules/aggregator/views_handler_filter_aggregator_category_cid.inc20
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/modules/aggregator/views_plugin_row_aggregator_rss.inc73
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/modules/book.views.inc123
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/modules/comment.views.inc648
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/modules/comment.views_default.inc283
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/modules/comment/views_handler_argument_comment_user_uid.inc56
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/modules/comment/views_handler_field_comment.inc67
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/modules/comment/views_handler_field_comment_depth.inc15
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/modules/comment/views_handler_field_comment_link.inc63
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/modules/comment/views_handler_field_comment_link_approve.inc31
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/modules/comment/views_handler_field_comment_link_delete.inc23
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/modules/comment/views_handler_field_comment_link_edit.inc46
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/modules/comment/views_handler_field_comment_link_reply.inc24
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/modules/comment/views_handler_field_comment_node_link.inc59
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/modules/comment/views_handler_field_comment_username.inc52
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/modules/comment/views_handler_field_last_comment_timestamp.inc23
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/modules/comment/views_handler_field_ncs_last_comment_name.inc49
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/modules/comment/views_handler_field_ncs_last_updated.inc13
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/modules/comment/views_handler_field_node_comment.inc21
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/modules/comment/views_handler_field_node_new_comments.inc110
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/modules/comment/views_handler_filter_comment_user_uid.inc24
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/modules/comment/views_handler_filter_ncs_last_updated.inc19
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/modules/comment/views_handler_filter_node_comment.inc16
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/modules/comment/views_handler_sort_comment_thread.inc20
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/modules/comment/views_handler_sort_ncs_last_comment_name.inc24
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/modules/comment/views_handler_sort_ncs_last_updated.inc13
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/modules/comment/views_plugin_row_comment_rss.inc151
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/modules/comment/views_plugin_row_comment_view.inc96
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/modules/contact.views.inc16
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/modules/contact/views_handler_field_contact_link.inc51
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/modules/field.views.inc429
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/modules/field/views_handler_argument_field_list.inc56
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/modules/field/views_handler_field_field.inc874
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/modules/field/views_handler_filter_field_list.inc13
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/modules/field/views_handler_relationship_entity_reverse.inc83
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/modules/file.views.inc81
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/modules/filter.views.inc41
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/modules/filter/views_handler_field_filter_format_name.inc30
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/modules/image.views.inc80
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/modules/locale.views.inc206
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/modules/locale/views_handler_argument_locale_group.inc35
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/modules/locale/views_handler_argument_locale_language.inc33
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/modules/locale/views_handler_field_locale_group.inc16
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/modules/locale/views_handler_field_locale_language.inc31
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/modules/locale/views_handler_field_locale_link_edit.inc55
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/modules/locale/views_handler_filter_locale_group.inc18
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/modules/locale/views_handler_filter_locale_language.inc21
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/modules/locale/views_handler_filter_locale_version.inc23
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/modules/node.views.inc753
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/modules/node.views_default.inc315
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/modules/node.views_template.inc132
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/modules/node/views_handler_argument_dates_various.inc179
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/modules/node/views_handler_argument_node_language.inc30
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/modules/node/views_handler_argument_node_nid.inc23
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/modules/node/views_handler_argument_node_type.inc33
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/modules/node/views_handler_argument_node_uid_revision.inc14
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/modules/node/views_handler_argument_node_vid.inc25
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/modules/node/views_handler_field_history_user_timestamp.inc76
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/modules/node/views_handler_field_node.inc79
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/modules/node/views_handler_field_node_link.inc42
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/modules/node/views_handler_field_node_link_delete.inc25
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/modules/node/views_handler_field_node_link_edit.inc25
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/modules/node/views_handler_field_node_path.inc47
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/modules/node/views_handler_field_node_revision.inc65
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/modules/node/views_handler_field_node_revision_link_delete.inc38
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/modules/node/views_handler_field_node_revision_link_revert.inc38
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/modules/node/views_handler_field_node_type.inc45
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/modules/node/views_handler_filter_history_user_timestamp.inc80
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/modules/node/views_handler_filter_node_access.inc34
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/modules/node/views_handler_filter_node_status.inc16
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/modules/node/views_handler_filter_node_type.inc19
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/modules/node/views_handler_filter_node_uid_revision.inc24
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/modules/node/views_plugin_argument_default_node.inc25
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/modules/node/views_plugin_argument_validate_node.inc133
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/modules/node/views_plugin_row_node_rss.inc166
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/modules/node/views_plugin_row_node_view.inc107
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/modules/poll.views.inc55
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/modules/profile.views.inc224
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/modules/profile/views_handler_field_profile_date.inc83
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/modules/profile/views_handler_field_profile_list.inc35
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/modules/profile/views_handler_filter_profile_selection.inc25
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/modules/search.views.inc211
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/modules/search.views_default.inc118
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/modules/search/views_handler_argument_search.inc95
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/modules/search/views_handler_field_search_score.inc76
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/modules/search/views_handler_filter_search.inc206
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/modules/search/views_handler_sort_search_score.inc27
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/modules/search/views_plugin_row_search_view.inc38
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/modules/statistics.views.inc271
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/modules/statistics.views_default.inc252
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/modules/statistics/views_handler_field_accesslog_path.inc52
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/modules/system.views.inc575
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/modules/system/views_handler_argument_file_fid.inc22
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/modules/system/views_handler_field_file.inc55
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/modules/system/views_handler_field_file_extension.inc14
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/modules/system/views_handler_field_file_filemime.inc33
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/modules/system/views_handler_field_file_status.inc12
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/modules/system/views_handler_field_file_uri.inc30
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/modules/system/views_handler_filter_file_status.inc13
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/modules/system/views_handler_filter_system_type.inc16
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/modules/taxonomy.views.inc511
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/modules/taxonomy.views_default.inc108
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/modules/taxonomy/views_handler_argument_taxonomy.inc24
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/modules/taxonomy/views_handler_argument_term_node_tid.inc43
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/modules/taxonomy/views_handler_argument_term_node_tid_depth.inc139
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/modules/taxonomy/views_handler_argument_term_node_tid_depth_modifier.inc59
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/modules/taxonomy/views_handler_argument_vocabulary_machine_name.inc21
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/modules/taxonomy/views_handler_argument_vocabulary_vid.inc21
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/modules/taxonomy/views_handler_field_taxonomy.inc80
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/modules/taxonomy/views_handler_field_term_link_edit.inc54
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/modules/taxonomy/views_handler_field_term_node_tid.inc142
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/modules/taxonomy/views_handler_filter_term_node_tid.inc349
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/modules/taxonomy/views_handler_filter_term_node_tid_depth.inc94
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/modules/taxonomy/views_handler_filter_vocabulary_machine_name.inc20
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/modules/taxonomy/views_handler_filter_vocabulary_vid.inc20
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/modules/taxonomy/views_handler_relationship_node_term_data.inc95
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/modules/taxonomy/views_plugin_argument_default_taxonomy_tid.inc150
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/modules/taxonomy/views_plugin_argument_validate_taxonomy_term.inc221
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/modules/translation.views.inc150
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/modules/translation/views_handler_argument_node_tnid.inc25
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/modules/translation/views_handler_field_node_language.inc32
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/modules/translation/views_handler_field_node_link_translate.inc23
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/modules/translation/views_handler_field_node_translation_link.inc43
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/modules/translation/views_handler_filter_node_language.inc20
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/modules/translation/views_handler_filter_node_tnid.inc39
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/modules/translation/views_handler_filter_node_tnid_child.inc16
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/modules/translation/views_handler_relationship_translation.inc98
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/modules/user.views.inc572
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/modules/user/views_handler_argument_user_uid.inc32
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/modules/user/views_handler_argument_users_roles_rid.inc17
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/modules/user/views_handler_field_user.inc50
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/modules/user/views_handler_field_user_language.inc31
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/modules/user/views_handler_field_user_link.inc52
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/modules/user/views_handler_field_user_link_cancel.inc27
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/modules/user/views_handler_field_user_link_edit.inc24
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/modules/user/views_handler_field_user_mail.inc38
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/modules/user/views_handler_field_user_name.inc77
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/modules/user/views_handler_field_user_permissions.inc62
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/modules/user/views_handler_field_user_picture.inc109
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/modules/user/views_handler_field_user_roles.inc49
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/modules/user/views_handler_filter_user_current.inc31
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/modules/user/views_handler_filter_user_name.inc145
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/modules/user/views_handler_filter_user_permissions.inc29
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/modules/user/views_handler_filter_user_roles.inc22
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/modules/user/views_plugin_argument_default_current_user.inc17
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/modules/user/views_plugin_argument_default_user.inc76
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/modules/user/views_plugin_argument_validate_user.inc135
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/modules/user/views_plugin_row_user_view.inc81
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/modules/views.views.inc105
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/plugins/export_ui/views_ui.class.php442
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/plugins/export_ui/views_ui.inc37
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/plugins/views_plugin_access.inc81
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/plugins/views_plugin_access_none.inc10
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/plugins/views_plugin_access_perm.inc55
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/plugins/views_plugin_access_role.inc59
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/plugins/views_plugin_argument_default.inc95
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/plugins/views_plugin_argument_default_fixed.inc43
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/plugins/views_plugin_argument_default_php.inc54
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/plugins/views_plugin_argument_default_raw.inc36
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/plugins/views_plugin_argument_validate.inc101
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/plugins/views_plugin_argument_validate_numeric.inc16
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/plugins/views_plugin_argument_validate_php.inc56
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/plugins/views_plugin_cache.inc300
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/plugins/views_plugin_cache_none.inc18
-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.inc2983
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/plugins/views_plugin_display_attachment.inc281
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/plugins/views_plugin_display_block.inc236
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/plugins/views_plugin_display_default.inc55
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/plugins/views_plugin_display_extender.inc54
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/plugins/views_plugin_display_feed.inc222
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/plugins/views_plugin_display_page.inc551
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/plugins/views_plugin_exposed_form.inc302
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/plugins/views_plugin_exposed_form_basic.inc6
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/plugins/views_plugin_exposed_form_input_required.inc89
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/plugins/views_plugin_localization.inc161
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/plugins/views_plugin_localization_core.inc109
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/plugins/views_plugin_localization_none.inc36
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/plugins/views_plugin_pager.inc221
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/plugins/views_plugin_pager_full.inc351
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/plugins/views_plugin_pager_mini.inc21
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/plugins/views_plugin_pager_none.inc70
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/plugins/views_plugin_pager_some.inc57
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/plugins/views_plugin_query.inc169
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/plugins/views_plugin_query_default.inc1547
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/plugins/views_plugin_row.inc147
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/plugins/views_plugin_row_fields.inc82
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/plugins/views_plugin_style.inc557
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/plugins/views_plugin_style_default.inc24
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/plugins/views_plugin_style_grid.inc61
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/plugins/views_plugin_style_jump_menu.inc149
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/plugins/views_plugin_style_list.inc52
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/plugins/views_plugin_style_rss.inc107
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/plugins/views_plugin_style_summary.inc75
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/plugins/views_plugin_style_summary_jump_menu.inc128
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/plugins/views_plugin_style_summary_unformatted.inc33
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/plugins/views_plugin_style_table.inc297
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/plugins/views_wizard/comment.inc44
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/plugins/views_wizard/file_managed.inc26
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/plugins/views_wizard/node.inc42
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/plugins/views_wizard/node_revision.inc43
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/plugins/views_wizard/taxonomy_term.inc30
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/plugins/views_wizard/users.inc35
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/plugins/views_wizard/views_ui_base_views_wizard.class.php911
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/plugins/views_wizard/views_ui_comment_views_wizard.class.php99
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/plugins/views_wizard/views_ui_file_managed_views_wizard.class.php32
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/plugins/views_wizard/views_ui_node_revision_views_wizard.class.php50
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/plugins/views_wizard/views_ui_node_views_wizard.class.php128
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/plugins/views_wizard/views_ui_taxonomy_term_views_wizard.class.php33
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/plugins/views_wizard/views_ui_users_views_wizard.class.php34
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/tests/comment/views_handler_argument_comment_user_uid.test101
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/tests/comment/views_handler_filter_comment_user_uid.test35
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/tests/handlers/views_handler_area_text.test47
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/tests/handlers/views_handler_argument_null.test64
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/tests/handlers/views_handler_field.test115
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/tests/handlers/views_handler_field_boolean.test68
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/tests/handlers/views_handler_field_counter.test62
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/tests/handlers/views_handler_field_custom.test39
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/tests/handlers/views_handler_field_date.test54
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/tests/handlers/views_handler_field_file_size.test57
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/tests/handlers/views_handler_field_math.test37
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/tests/handlers/views_handler_field_url.test52
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/tests/handlers/views_handler_field_xss.test53
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/tests/handlers/views_handler_filter_date.test185
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/tests/handlers/views_handler_filter_equality.test82
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/tests/handlers/views_handler_filter_in_operator.test89
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/tests/handlers/views_handler_filter_numeric.test215
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/tests/handlers/views_handler_filter_string.test409
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/tests/handlers/views_handler_sort.test116
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/tests/handlers/views_handler_sort_date.test193
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/tests/handlers/views_handler_sort_random.test84
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/tests/styles/views_plugin_style.test230
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/tests/styles/views_plugin_style_jump_menu.test135
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/tests/templates/views-view--frontpage.tpl.php84
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/tests/test_plugins/views_test_plugin_access_test_dynamic.inc18
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/tests/test_plugins/views_test_plugin_access_test_static.inc18
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/tests/user/views_handler_field_user_name.test92
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/tests/user/views_user.test140
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/tests/user/views_user_argument_default.test87
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/tests/user/views_user_argument_validate.test113
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/tests/views_access.test280
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/tests/views_analyze.test48
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/tests/views_argument_default.test107
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/tests/views_argument_validator.test98
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/tests/views_basic.test173
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/tests/views_cache.test145
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/tests/views_exposed_form.test97
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/tests/views_glossary.test57
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/tests/views_groupby.test315
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/tests/views_handlers.test128
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/tests/views_module.test156
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/tests/views_pager.test428
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/tests/views_plugin_localization_test.inc35
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/tests/views_query.test416
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/tests/views_test.info13
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/tests/views_test.install5
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/tests/views_test.module45
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/tests/views_test.views_default.inc145
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/tests/views_translatable.test185
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/tests/views_ui.test949
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/tests/views_upgrade.test274
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/tests/views_view.test285
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/theme/theme.inc1100
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/theme/views-exposed-form.tpl.php75
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/theme/views-more.tpl.php18
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/theme/views-ui-display-tab-bucket.tpl.php17
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/theme/views-ui-display-tab-setting.tpl.php15
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/theme/views-ui-edit-item.tpl.php45
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/theme/views-ui-edit-view.tpl.php45
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/theme/views-view-field.tpl.php22
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/theme/views-view-fields.tpl.php35
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/theme/views-view-grid.tpl.php27
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/theme/views-view-grouping.tpl.php22
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/theme/views-view-list.tpl.php20
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/theme/views-view-row-comment.tpl.php17
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/theme/views-view-row-rss.tpl.php14
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/theme/views-view-rss.tpl.php19
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/theme/views-view-summary-unformatted.tpl.php19
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/theme/views-view-summary.tpl.php19
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/theme/views-view-table.tpl.php46
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/theme/views-view-unformatted.tpl.php16
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/theme/views-view.tpl.php89
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/views.info303
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/views.install631
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/views.module2460
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/views.tokens.inc94
-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.module5
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/views_ui.info15
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/views_ui.module867
503 files changed, 70609 insertions, 0 deletions
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
new file mode 100644
index 0000000..744ea75
--- /dev/null
+++ b/kolab.org/www/drupal-7.15/sites/all/modules/views/CHANGELOG.txt
@@ -0,0 +1,397 @@
+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/D7UPGRADE.txt b/kolab.org/www/drupal-7.15/sites/all/modules/views/D7UPGRADE.txt
new file mode 100644
index 0000000..08d3a3b
--- /dev/null
+++ b/kolab.org/www/drupal-7.15/sites/all/modules/views/D7UPGRADE.txt
@@ -0,0 +1,2 @@
+Information about upgrading existing views from Drupal 6 to Drupal 7 is located
+in the module's advanced help under api upgrading.
diff --git a/kolab.org/www/drupal-7.15/sites/all/modules/views/LICENSE.txt b/kolab.org/www/drupal-7.15/sites/all/modules/views/LICENSE.txt
new file mode 100644
index 0000000..d159169
--- /dev/null
+++ b/kolab.org/www/drupal-7.15/sites/all/modules/views/LICENSE.txt
@@ -0,0 +1,339 @@
+ GNU GENERAL PUBLIC LICENSE
+ Version 2, June 1991
+
+ Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+ Preamble
+
+ The licenses for most software are designed to take away your
+freedom to share and change it. By contrast, the GNU General Public
+License is intended to guarantee your freedom to share and change free
+software--to make sure the software is free for all its users. This
+General Public License applies to most of the Free Software
+Foundation's software and to any other program whose authors commit to
+using it. (Some other Free Software Foundation software is covered by
+the GNU Lesser General Public License instead.) You can apply it to
+your programs, too.
+
+ When we speak of free software, we are referring to freedom, not
+price. Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+this service if you wish), that you receive source code or can get it
+if you want it, that you can change the software or use pieces of it
+in new free programs; and that you know you can do these things.
+
+ To protect your rights, we need to make restrictions that forbid
+anyone to deny you these rights or to ask you to surrender the rights.
+These restrictions translate to certain responsibilities for you if you
+distribute copies of the software, or if you modify it.
+
+ For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must give the recipients all the rights that
+you have. You must make sure that they, too, receive or can get the
+source code. And you must show them these terms so they know their
+rights.
+
+ We protect your rights with two steps: (1) copyright the software, and
+(2) offer you this license which gives you legal permission to copy,
+distribute and/or modify the software.
+
+ Also, for each author's protection and ours, we want to make certain
+that everyone understands that there is no warranty for this free
+software. If the software is modified by someone else and passed on, we
+want its recipients to know that what they have is not the original, so
+that any problems introduced by others will not reflect on the original
+authors' reputations.
+
+ Finally, any free program is threatened constantly by software
+patents. We wish to avoid the danger that redistributors of a free
+program will individually obtain patent licenses, in effect making the
+program proprietary. To prevent this, we have made it clear that any
+patent must be licensed for everyone's free use or not licensed at all.
+
+ The precise terms and conditions for copying, distribution and
+modification follow.
+
+ GNU GENERAL PUBLIC LICENSE
+ TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+ 0. This License applies to any program or other work which contains
+a notice placed by the copyright holder saying it may be distributed
+under the terms of this General Public License. The "Program", below,
+refers to any such program or work, and a "work based on the Program"
+means either the Program or any derivative work under copyright law:
+that is to say, a work containing the Program or a portion of it,
+either verbatim or with modifications and/or translated into another
+language. (Hereinafter, translation is included without limitation in
+the term "modification".) Each licensee is addressed as "you".
+
+Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope. The act of
+running the Program is not restricted, and the output from the Program
+is covered only if its contents constitute a work based on the
+Program (independent of having been made by running the Program).
+Whether that is true depends on what the Program does.
+
+ 1. You may copy and distribute verbatim copies of the Program's
+source code as you receive it, in any medium, provided that you
+conspicuously and appropriately publish on each copy an appropriate
+copyright notice and disclaimer of warranty; keep intact all the
+notices that refer to this License and to the absence of any warranty;
+and give any other recipients of the Program a copy of this License
+along with the Program.
+
+You may charge a fee for the physical act of transferring a copy, and
+you may at your option offer warranty protection in exchange for a fee.
+
+ 2. You may modify your copy or copies of the Program or any portion
+of it, thus forming a work based on the Program, and copy and
+distribute such modifications or work under the terms of Section 1
+above, provided that you also meet all of these conditions:
+
+ a) You must cause the modified files to carry prominent notices
+ stating that you changed the files and the date of any change.
+
+ b) You must cause any work that you distribute or publish, that in
+ whole or in part contains or is derived from the Program or any
+ part thereof, to be licensed as a whole at no charge to all third
+ parties under the terms of this License.
+
+ c) If the modified program normally reads commands interactively
+ when run, you must cause it, when started running for such
+ interactive use in the most ordinary way, to print or display an
+ announcement including an appropriate copyright notice and a
+ notice that there is no warranty (or else, saying that you provide
+ a warranty) and that users may redistribute the program under
+ these conditions, and telling the user how to view a copy of this
+ License. (Exception: if the Program itself is interactive but
+ does not normally print such an announcement, your work based on
+ the Program is not required to print an announcement.)
+
+These requirements apply to the modified work as a whole. If
+identifiable sections of that work are not derived from the Program,
+and can be reasonably considered independent and separate works in
+themselves, then this License, and its terms, do not apply to those
+sections when you distribute them as separate works. But when you
+distribute the same sections as part of a whole which is a work based
+on the Program, the distribution of the whole must be on the terms of
+this License, whose permissions for other licensees extend to the
+entire whole, and thus to each and every part regardless of who wrote it.
+
+Thus, it is not the intent of this section to claim rights or contest
+your rights to work written entirely by you; rather, the intent is to
+exercise the right to control the distribution of derivative or
+collective works based on the Program.
+
+In addition, mere aggregation of another work not based on the Program
+with the Program (or with a work based on the Program) on a volume of
+a storage or distribution medium does not bring the other work under
+the scope of this License.
+
+ 3. You may copy and distribute the Program (or a work based on it,
+under Section 2) in object code or executable form under the terms of
+Sections 1 and 2 above provided that you also do one of the following:
+
+ a) Accompany it with the complete corresponding machine-readable
+ source code, which must be distributed under the terms of Sections
+ 1 and 2 above on a medium customarily used for software interchange; or,
+
+ b) Accompany it with a written offer, valid for at least three
+ years, to give any third party, for a charge no more than your
+ cost of physically performing source distribution, a complete
+ machine-readable copy of the corresponding source code, to be
+ distributed under the terms of Sections 1 and 2 above on a medium
+ customarily used for software interchange; or,
+
+ c) Accompany it with the information you received as to the offer
+ to distribute corresponding source code. (This alternative is
+ allowed only for noncommercial distribution and only if you
+ received the program in object code or executable form with such
+ an offer, in accord with Subsection b above.)
+
+The source code for a work means the preferred form of the work for
+making modifications to it. For an executable work, complete source
+code means all the source code for all modules it contains, plus any
+associated interface definition files, plus the scripts used to
+control compilation and installation of the executable. However, as a
+special exception, the source code distributed need not include
+anything that is normally distributed (in either source or binary
+form) with the major components (compiler, kernel, and so on) of the
+operating system on which the executable runs, unless that component
+itself accompanies the executable.
+
+If distribution of executable or object code is made by offering
+access to copy from a designated place, then offering equivalent
+access to copy the source code from the same place counts as
+distribution of the source code, even though third parties are not
+compelled to copy the source along with the object code.
+
+ 4. You may not copy, modify, sublicense, or distribute the Program
+except as expressly provided under this License. Any attempt
+otherwise to copy, modify, sublicense or distribute the Program is
+void, and will automatically terminate your rights under this License.
+However, parties who have received copies, or rights, from you under
+this License will not have their licenses terminated so long as such
+parties remain in full compliance.
+
+ 5. You are not required to accept this License, since you have not
+signed it. However, nothing else grants you permission to modify or
+distribute the Program or its derivative works. These actions are
+prohibited by law if you do not accept this License. Therefore, by
+modifying or distributing the Program (or any work based on the
+Program), you indicate your acceptance of this License to do so, and
+all its terms and conditions for copying, distributing or modifying
+the Program or works based on it.
+
+ 6. Each time you redistribute the Program (or any work based on the
+Program), the recipient automatically receives a license from the
+original licensor to copy, distribute or modify the Program subject to
+these terms and conditions. You may not impose any further
+restrictions on the recipients' exercise of the rights granted herein.
+You are not responsible for enforcing compliance by third parties to
+this License.
+
+ 7. If, as a consequence of a court judgment or allegation of patent
+infringement or for any other reason (not limited to patent issues),
+conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License. If you cannot
+distribute so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you
+may not distribute the Program at all. For example, if a patent
+license would not permit royalty-free redistribution of the Program by
+all those who receive copies directly or indirectly through you, then
+the only way you could satisfy both it and this License would be to
+refrain entirely from distribution of the Program.
+
+If any portion of this section is held invalid or unenforceable under
+any particular circumstance, the balance of the section is intended to
+apply and the section as a whole is intended to apply in other
+circumstances.
+
+It is not the purpose of this section to induce you to infringe any
+patents or other property right claims or to contest validity of any
+such claims; this section has the sole purpose of protecting the
+integrity of the free software distribution system, which is
+implemented by public license practices. Many people have made
+generous contributions to the wide range of software distributed
+through that system in reliance on consistent application of that
+system; it is up to the author/donor to decide if he or she is willing
+to distribute software through any other system and a licensee cannot
+impose that choice.
+
+This section is intended to make thoroughly clear what is believed to
+be a consequence of the rest of this License.
+
+ 8. If the distribution and/or use of the Program is restricted in
+certain countries either by patents or by copyrighted interfaces, the
+original copyright holder who places the Program under this License
+may add an explicit geographical distribution limitation excluding
+those countries, so that distribution is permitted only in or among
+countries not thus excluded. In such case, this License incorporates
+the limitation as if written in the body of this License.
+
+ 9. The Free Software Foundation may publish revised and/or new versions
+of the General Public License from time to time. Such new versions will
+be similar in spirit to the present version, but may differ in detail to
+address new problems or concerns.
+
+Each version is given a distinguishing version number. If the Program
+specifies a version number of this License which applies to it and "any
+later version", you have the option of following the terms and conditions
+either of that version or of any later version published by the Free
+Software Foundation. If the Program does not specify a version number of
+this License, you may choose any version ever published by the Free Software
+Foundation.
+
+ 10. If you wish to incorporate parts of the Program into other free
+programs whose distribution conditions are different, write to the author
+to ask for permission. For software which is copyrighted by the Free
+Software Foundation, write to the Free Software Foundation; we sometimes
+make exceptions for this. Our decision will be guided by the two goals
+of preserving the free status of all derivatives of our free software and
+of promoting the sharing and reuse of software generally.
+
+ NO WARRANTY
+
+ 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
+FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
+OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
+PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
+OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
+TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
+PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
+REPAIR OR CORRECTION.
+
+ 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
+REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
+INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
+OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
+TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
+YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
+PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGES.
+
+ END OF TERMS AND CONDITIONS
+
+ How to Apply These Terms to Your New Programs
+
+ If you develop a new program, and you want it to be of the greatest
+possible use to the public, the best way to achieve this is to make it
+free software which everyone can redistribute and change under these terms.
+
+ To do so, attach the following notices to the program. It is safest
+to attach them to the start of each source file to most effectively
+convey the exclusion of warranty; and each file should have at least
+the "copyright" line and a pointer to where the full notice is found.
+
+ <one line to give the program's name and a brief idea of what it does.>
+ Copyright (C) <year> <name of author>
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License along
+ with this program; if not, write to the Free Software Foundation, Inc.,
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+Also add information on how to contact you by electronic and paper mail.
+
+If the program is interactive, make it output a short notice like this
+when it starts in an interactive mode:
+
+ Gnomovision version 69, Copyright (C) year name of author
+ Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
+ This is free software, and you are welcome to redistribute it
+ under certain conditions; type `show c' for details.
+
+The hypothetical commands `show w' and `show c' should show the appropriate
+parts of the General Public License. Of course, the commands you use may
+be called something other than `show w' and `show c'; they could even be
+mouse-clicks or menu items--whatever suits your program.
+
+You should also get your employer (if you work as a programmer) or your
+school, if any, to sign a "copyright disclaimer" for the program, if
+necessary. Here is a sample; alter the names:
+
+ Yoyodyne, Inc., hereby disclaims all copyright interest in the program
+ `Gnomovision' (which makes passes at compilers) written by James Hacker.
+
+ <signature of Ty Coon>, 1 April 1989
+ Ty Coon, President of Vice
+
+This General Public License does not permit incorporating your program into
+proprietary programs. If your program is a subroutine library, you may
+consider it more useful to permit linking proprietary applications with the
+library. If this is what you want to do, use the GNU Lesser General
+Public License instead of this License.
diff --git a/kolab.org/www/drupal-7.15/sites/all/modules/views/README.txt b/kolab.org/www/drupal-7.15/sites/all/modules/views/README.txt
new file mode 100644
index 0000000..8097eb4
--- /dev/null
+++ b/kolab.org/www/drupal-7.15/sites/all/modules/views/README.txt
@@ -0,0 +1,19 @@
+
+Welcome to Views 3. Please see the advanced help for more information.
+
+If you're having trouble installing this module, please ensure that your
+tar program is not flattening the directory tree, truncating filenames
+or losing files.
+
+Installing Views:
+
+Place the entirety of this directory in sites/all/modules/views
+You must also install the CTools module (http://www.drupal.org/project/ctools) to use Views.
+
+Navigate to administer >> build >> modules. Enable Views and Views UI.
+
+If you're new to Views, try the Simple Views module which can create some
+often used Views for you, this might save you some time.
+
+Here you can find many modules extending the functionality of Views:
+ http://drupal.org/taxonomy/term/89
diff --git a/kolab.org/www/drupal-7.15/sites/all/modules/views/css/ie/views-admin.ie7.css b/kolab.org/www/drupal-7.15/sites/all/modules/views/css/ie/views-admin.ie7.css
new file mode 100644
index 0000000..9a8852a
--- /dev/null
+++ b/kolab.org/www/drupal-7.15/sites/all/modules/views/css/ie/views-admin.ie7.css
@@ -0,0 +1,91 @@
+/**
+ * The query details collapsible divs are not visible in IE7 because has-layout
+ * is not being triggered. Trigger has-layout with height: 1%;
+ */
+.views-edit-view .collapsible > .fieldset-wrapper {
+ height: 1%;
+}
+
+/**
+ * The column width for the bucket containers in the query details section
+ * is not being calculated to 32% correctly. Give IE7 a slightly smaller
+ * width so that the three columns line up next to each other
+ */
+.views-edit-view .views-display-column {
+ width: 31.95%;
+}
+
+/**
+ * IE7 has no idea how large this container should be and it doesn't
+ * apply has-layout. Expand it's width to 100% and trigger has-layout.
+ */
+.views-edit-view .views-displays {
+ height: 1%;
+ width: 100%;
+}
+
+/**
+ * IE7 isn't positioning the span correctly as a display-inline element
+ */
+.views-edit-view .views-displays .icon {
+ display: block;
+ float: left;
+}
+
+.views-edit-view .views-displays .icon-add {
+ top: 2px;
+}
+
+/**
+ * The add display query dropdown needs a lot of help
+ */
+
+.views-edit-view .views-displays .tabs.secondary {
+ position: relative;
+ z-index: 100;
+}
+
+.views-edit-view .views-displays .secondary .open > a {
+ border-bottom: 1px solid #f1f1f1;
+}
+
+.views-edit-view .views-displays .secondary .action-list {
+ border-bottom: 1px solid #cbcbcb;
+ top: 30px;
+}
+
+.views-edit-view .views-displays .secondary input {
+ text-align: left;
+}
+
+/**
+ * IE7 does not interpret div > * correctly
+ */
+.page-admin-structure-views #content .views-ui-display-tab-bucket {
+ padding-left: 0;
+ padding-right: 0;
+ zoom: 1;
+}
+
+.page-admin-structure-views #content .views-display-column + .views-display-column {
+ margin-top: 0;
+}
+
+/**
+ * IE7 is interpreting a top margin of 18px from somewhere. remove it
+ */
+
+.page-admin-structure-views #content .views-display-setting {
+ margin-top: 0;
+}
+
+/**
+ * IE7 can't handle the + selector that indents form wrappers after a checkbox on the add page
+ * zoom is necessary to trigger has layout. !imporant is necessary because IE7 is precedent
+ * to the theme.css stylesheet, even though it is included before this file.
+ */
+
+.page-admin-structure-views #content .form-type-checkbox + .form-wrapper {
+ margin-left: 27px !important;
+ zoom: 1;
+}
diff --git a/kolab.org/www/drupal-7.15/sites/all/modules/views/css/views-admin-rtl.css b/kolab.org/www/drupal-7.15/sites/all/modules/views/css/views-admin-rtl.css
new file mode 100644
index 0000000..6d1e03a
--- /dev/null
+++ b/kolab.org/www/drupal-7.15/sites/all/modules/views/css/views-admin-rtl.css
@@ -0,0 +1,98 @@
+/**
+ * The .css file is intended to only contain positioning and size declarations
+ * For example: display, position, float, clear, and overflow.
+ */
+
+/* @group Inline lists */
+
+.horizontal > * {
+ float: right;
+}
+
+.horizontal.right {
+ float: left;
+}
+
+/* @end */
+
+/* @group Attachment details
+ *
+ * The attachment details section, its tabs for each section and the buttons
+ * to add a new section
+ */
+
+.form-actions {
+ float: left;
+}
+
+/* @end */
+
+/* @group Attachment details tabs
+ *
+ * The tabs that switch between sections
+ */
+
+.views-displays .secondary > li {
+ float: right;
+}
+
+/* @end */
+
+/* @group Attachment details new section button */
+
+.views-displays .secondary .action-list {
+ left: auto;
+ right: 0;
+}
+
+/* @end */
+
+/* @group Attachment details collapsible fieldset */
+
+.views-display-tab .fieldset-legend {
+ left: auto;
+ right: -5px;
+}
+
+/* @end */
+
+/* @group Attachment details actions
+ *
+ * Display the "Delete" and "Duplicate" buttons to the right.
+ */
+.views-display-tab .fieldset-wrapper > .views-ui-display-tab-bucket .actions {
+ left: 0;
+ right: auto;
+}
+
+/* @end */
+
+/* @group Attachment configuration columns */
+
+.views-display-columns > * {
+ float: right;
+ margin-left: 0;
+ margin-right: 1%;
+ padding-left: 0;
+ padding-right: 1%;
+}
+
+.views-display-columns > *:first-child {
+ margin-right: 0;
+ padding-right: 0;
+}
+
+/* @end */
+
+/* @group Settings forms */
+
+.views-dependent {
+ margin-right: 1.5em;
+}
+
+.views-display-setting .label,
+.views-display-setting .views-ajax-link {
+ float: right;
+}
+
+/* @end */
diff --git a/kolab.org/www/drupal-7.15/sites/all/modules/views/css/views-admin.advanced_help.css b/kolab.org/www/drupal-7.15/sites/all/modules/views/css/views-admin.advanced_help.css
new file mode 100644
index 0000000..71d9cb1
--- /dev/null
+++ b/kolab.org/www/drupal-7.15/sites/all/modules/views/css/views-admin.advanced_help.css
@@ -0,0 +1,24 @@
+/**
+ * The .advanced_help.css file is intended to contain styles that override declarations
+ * in the Advanced Help module.
+ */
+
+/**
+ * Adjust the advanced help icons
+ */
+.views-ui-display-tab-bucket .advanced-help-link {
+ padding: 0;
+ margin: 5px 3px 0px 6px; /* LTR */
+}
+
+.views-ui-display-tab-bucket .icon-text {
+ padding-left: 25px; /* LTR */
+}
+
+.views-ui-display-tab-bucket .icon-linked {
+ background-position: 6px -151px; /* LTR */
+}
+
+.views-ui-display-tab-bucket .icon-unlinked {
+ background-position: 6px -193px; /* LTR */
+}
diff --git a/kolab.org/www/drupal-7.15/sites/all/modules/views/css/views-admin.bartik-rtl.css b/kolab.org/www/drupal-7.15/sites/all/modules/views/css/views-admin.bartik-rtl.css
new file mode 100644
index 0000000..abf2a30
--- /dev/null
+++ b/kolab.org/www/drupal-7.15/sites/all/modules/views/css/views-admin.bartik-rtl.css
@@ -0,0 +1,12 @@
+/**
+ * The .bartik.css file is intended to contain styles that override declarations
+ * in the Bartik theme.
+ */
+
+ /* @group Lists */
+
+.views-display-top .secondary .action-list {
+ padding-right: 0;
+}
+
+/* @end */
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
new file mode 100644
index 0000000..1d22ddd
--- /dev/null
+++ b/kolab.org/www/drupal-7.15/sites/all/modules/views/css/views-admin.bartik.css
@@ -0,0 +1,224 @@
+/**
+ * The .bartik.css file is intended to contain styles that override declarations
+ * in the Bartik theme.
+ */
+
+/* @group Lists */
+
+.views-display-top .secondary .action-list {
+ padding-left: 0; /* LTR */
+}
+
+/* @end */
+
+/* @group Attachment details tabs
+ *
+ * The tabs that switch between sections
+ */
+
+.views-displays .region-content .secondary,
+.views-displays .region-content .secondary {
+ padding-bottom: 0;
+ padding-left: 0;
+}
+
+.views-displays .secondary a {
+ font-size: smaller;
+}
+
+.views-displays .secondary > li a {
+ -moz-border-radius: 5px;
+ -webkit-border-radius: 5px;
+ border-radius: 5px;
+}
+
+.views-displays .secondary > li.open a {
+ -moz-border-radius: 5px 5px 0 0;
+ -webkit-border-bottom-left-radius: 0;
+ -webkit-border-bottom-right-radius: 0;
+ -webkit-border-top-left-radius: 5px;
+ -webkit-border-top-right-radius: 5px;
+ border-radius: 5px 5px 0 0;
+}
+
+.views-displays .secondary .open > a:hover {
+ color: #0071B3;
+}
+
+.views-displays .secondary input.form-submit {
+ font-size: smaller;
+}
+
+/* @end */
+
+/* @group Modal dialog box
+ *
+ * The contents of the popup dialog on the views edit form.
+ */
+
+.views-filterable-options .even .form-type-checkbox {
+ background-color: #F9F9F9;
+}
+
+.views-ui-dialog .ui-dialog-titlebar-close,
+.views-ui-dialog #views-ajax-title,
+.views-ui-dialog .views-override,
+.views-ui-dialog .form-buttons {
+ background-color: #f6f6f6;
+}
+
+/* @end */
+
+/* @group CTools */
+
+/* @group Buttons */
+
+.ctools-button-processed {
+ background-image:
+ -moz-linear-gradient(
+ -90deg,
+ #ffffff 0px,
+ #f9f9f9 100%);
+ background-image:
+ -webkit-gradient(
+ linear,
+ left top,
+ left bottom,
+ color-stop(0.0, rgba(255, 255, 255, 1.0)),
+ color-stop(1.0, rgba(249, 249, 249, 1.0))
+ );
+ background-image:
+ -webkit-linear-gradient(
+ -90deg,
+ #ffffff 0px,
+ #f9f9f9 100%);
+ background-image:
+ linear-gradient(
+ -90deg,
+ #ffffff 0px,
+ #f9f9f9 100%);
+ -moz-border-radius: 5px;
+ -webkit-border-radius: 5px;
+ border-radius: 5px;
+ padding-bottom: 1px;
+ padding-top: 1px;
+}
+
+.ctools-button-processed:hover {
+ background-image:
+ -moz-linear-gradient(
+ -90deg,
+ #ffffff 0px,
+ #f1f1f1 100%);
+ background-image:
+ -webkit-gradient(
+ linear,
+ left top,
+ left bottom,
+ color-stop(0.0, rgba(255, 255, 255, 1.0)),
+ color-stop(1.0, rgba(241, 241, 241, 1.0))
+ );
+ background-image:
+ -webkit-linear-gradient(
+ -90deg,
+ #ffffff 0px,
+ #f1f1f1 100%);
+ background-image:
+ linear-gradient(
+ -90deg,
+ #ffffff 0px,
+ #f1f1f1 100%);
+}
+
+.ctools-button-processed li a,
+.views-ui-display-tab-actions .ctools-button-processed input {
+ padding-left: 9px;
+ padding-right: 9px;
+}
+
+.ctools-content ul.actions {
+ padding-bottom: 0;
+}
+
+.ctools-dropbutton-processed.open:hover {
+ background-image:
+ -moz-linear-gradient(
+ -90deg,
+ #ffffff 0px,
+ #f9f9f9 100%);
+ background-image:
+ -webkit-gradient(
+ linear,
+ left top,
+ left bottom,
+ color-stop(0.0, rgba(255, 255, 255, 1.0)),
+ color-stop(1.0, rgba(249, 249, 249, 1.0))
+ );
+ background-image:
+ -webkit-linear-gradient(
+ -90deg,
+ #ffffff 0px,
+ #f9f9f9 100%);
+ background-image:
+ linear-gradient(
+ -90deg,
+ #ffffff 0px,
+ #f9f9f9 100%);
+}
+
+.ctools-dropbutton-processed.open {
+ -moz-box-shadow: 1px 1px 2px rgba(0,0,0,0.25);
+ -webkit-box-shadow: 1px 1px 2px rgba(0,0,0,0.25);
+ box-shadow: 1px 1px 2px rgba(0,0,0,0.25);
+}
+
+.ctools-twisty {
+ top: 0.6667em;
+}
+
+.ctools-dropbutton-processed.open .ctools-twisty {
+ top: 0.3333em;
+}
+
+.ctools-dropbutton-processed li a,
+.views-ui-display-tab-actions .ctools-dropbutton-processed input {
+ padding-right: 7px;
+}
+
+.views-ui-display-tab-actions .ctools-button-processed input.form-submit {
+ margin-right: 0;
+ margin-top: 0;
+}
+
+/* @end */
+
+/* @group Collapsible */
+
+.ctools-toggle {
+ margin-top: 0.9em;
+}
+
+.ctools-toggle.ctools-toggle-collapsed {
+ margin-top: 0.72em;
+}
+
+.views-display-column > .ctools-toggle {
+ margin-top: 14px;
+}
+
+.views-display-column > .ctools-toggle.ctools-toggle-collapsed {
+ margin-top: 12px;
+}
+
+.views-ui-display-tab-actions .ctools-button input {
+ color: #0071B3;
+}
+
+.views-ui-display-tab-actions .ctools-button input:hover,
+.views-ui-display-tab-actions .ctools-button input:focus {
+ color: #018FE2;
+}
+
+/* @end */
+
+/* @end */
diff --git a/kolab.org/www/drupal-7.15/sites/all/modules/views/css/views-admin.contextual.css b/kolab.org/www/drupal-7.15/sites/all/modules/views/css/views-admin.contextual.css
new file mode 100644
index 0000000..502e949
--- /dev/null
+++ b/kolab.org/www/drupal-7.15/sites/all/modules/views/css/views-admin.contextual.css
@@ -0,0 +1,63 @@
+/**
+ * The .contextual.css file is intended to contain styles that override declarations
+ * in the Contextual module.
+ */
+
+/* @group Wrapper */
+
+#views-live-preview .contextual-links-region-active {
+ outline: medium none;
+}
+
+#views-live-preview div.contextual-links-wrapper {
+ right: auto;
+ top: auto;
+}
+
+html.js #views-live-preview div.contextual-links-wrapper {
+ display: inline;
+}
+
+/* @end */
+
+/* @group Trigger */
+
+#views-live-preview a.contextual-links-trigger {
+ display: block;
+}
+
+/* @end */
+
+/* @group List */
+
+div.contextual-links-wrapper ul.contextual-links {
+ -moz-border-radius: 0 4px 4px 4px;
+ -webkit-border-radius: 0 4px 4px 4px;
+ border-radius: 0 4px 4px 4px;
+ min-width: 10em;
+ padding: 6px 6px 9px 6px;
+ right: auto;
+}
+
+ul.contextual-links li a,
+ul.contextual-links li span {
+ padding-bottom: 0.25em;
+ padding-right: 0.1667em;
+ padding-top: 0.25em;
+}
+
+ul.contextual-links li span {
+ font-weight: bold;
+}
+
+ul.contextual-links li a {
+ color: #666666 !important;
+ margin: 0.25em 0;
+ padding-left: 1em;
+}
+
+ul.contextual-links li a:hover {
+ background-color: #badbec;
+}
+
+/* @end */
diff --git a/kolab.org/www/drupal-7.15/sites/all/modules/views/css/views-admin.css b/kolab.org/www/drupal-7.15/sites/all/modules/views/css/views-admin.css
new file mode 100644
index 0000000..7ce7088
--- /dev/null
+++ b/kolab.org/www/drupal-7.15/sites/all/modules/views/css/views-admin.css
@@ -0,0 +1,361 @@
+/**
+ * The .css file is intended to only contain positioning and size declarations
+ * For example: display, position, float, clear, and overflow.
+ */
+
+/* @group Resets */
+
+.views-admin ul,
+.views-admin menu,
+.views-admin dir {
+ padding-left: 0; /* LTR for IE */
+ /* padding-start is used so that RTL works out of the box */
+ -moz-padding-start: 0;
+ -webkit-padding-start: 0;
+ padding-start: 0;
+}
+
+.views-admin pre {
+ margin-bottom: 0;
+ margin-top: 0;
+ white-space: pre-wrap;
+}
+
+/* @end */
+
+/* @group Inline lists */
+
+.horizontal > * {
+ clear: none;
+ float: left; /* LTR */
+}
+
+.horizontal.right {
+ float: right;
+}
+
+.horizontal label {
+ position: absolute;
+}
+
+.horizontal .form-item > [class] {
+ margin-top: 25px;
+}
+
+.horizontal .form-item > [class] + [class] {
+ margin-top: 0;
+}
+
+/* @end */
+
+/* @group Columns */
+
+.views-left-25 {
+ float: left;
+ width: 25%;
+}
+
+.views-left-30 {
+ float: left;
+ width: 30%;
+}
+
+.views-left-40 {
+ float: left;
+ width: 40%;
+}
+
+.views-left-50 {
+ float: left;
+ width: 50%;
+}
+
+.views-left-75 {
+ float: left;
+ width: 75%;
+}
+
+.views-right-50 {
+ float: right;
+ width: 50%;
+}
+
+.views-right-60 {
+ float: right;
+ width: 60%;
+}
+
+.views-right-70 {
+ float: right;
+ width: 70%;
+}
+
+.views-group-box .form-item {
+ margin-left: 3px;
+ margin-right: 3px;
+}
+
+/* @end */
+
+/* @group Attachment details
+ *
+ * The attachment details section, its tabs for each section and the buttons
+ * to add a new section
+ */
+
+.form-edit .form-actions {
+ float: right; /* LTR */
+}
+
+.views-displays {
+ clear: both;
+}
+
+/* @end */
+
+/* @group Attachment details tabs
+ *
+ * The tabs that switch between sections
+ */
+ .views-displays .secondary {
+ border-bottom: 0 none;
+ margin: 0;
+ overflow: visible;
+ padding: 0;
+ }
+
+.views-displays .secondary > li {
+ border-right: 0 none;
+ display: inline-block;
+ float: left; /* LTR */
+ padding: 0;
+}
+
+.views-displays .secondary .open > a {
+ position: relative;
+ z-index: 51;
+}
+
+.views-displays .views-display-deleted-link {
+ text-decoration: line-through;
+}
+
+.views-display-deleted > fieldset > legend,
+.views-display-deleted .fieldset-wrapper > .views-ui-display-tab-bucket > *,
+.views-display-deleted .views-display-columns {
+ opacity: 0.25;
+}
+
+.views-display-disabled > fieldset > legend,
+.views-display-disabled .fieldset-wrapper > .views-ui-display-tab-bucket > *,
+.views-display-disabled .views-display-columns {
+ opacity: 0.5;
+}
+
+.views-display-tab .fieldset-wrapper > .views-ui-display-tab-bucket .actions {
+ opacity: 1.0;
+}
+/* @end */
+
+/* @group Attachment details new section button */
+
+.views-displays .secondary li.add {
+ position: relative;
+}
+
+.views-displays .secondary .action-list {
+ left: 0; /* LTR */
+ margin: 0;
+ position: absolute;
+ top: 23px;
+ z-index: 50;
+}
+
+.views-displays .secondary .action-list li {
+ display: block;
+}
+
+/* @end */
+
+/* @group Attachment details collapsible fieldset */
+
+.views-display-tab .fieldset-legend {
+ left: -5px; /* LTR */
+ position: relative;
+}
+
+.views-display-tab .fieldset-wrapper {
+ position: relative;
+}
+
+/* @end */
+
+/* @group Attachment details actions
+ *
+ * Display the "Delete" and "Duplicate" buttons to the right.
+ */
+.views-display-tab .fieldset-wrapper > .views-ui-display-tab-bucket .actions {
+ position: absolute;
+ right: 0; /* LTR */
+ top: -5px;
+}
+
+/* @end */
+
+/* @group Attachment configuration columns */
+
+.views-display-columns > * {
+ float: left; /* LTR */
+ margin-left: 1%; /* LTR */
+ padding-left: 1%; /* LTR */
+ width: 32%;
+}
+
+.views-display-columns > *:first-child {
+ margin-left: 0; /* LTR */
+ padding-left: 0; /* LTR */
+}
+
+/* @end */
+
+/* @group Modal dialog box */
+
+.views-ui-dialog {
+ /* We need this so the button is visible. */
+ overflow: visible;
+ position: fixed;
+}
+
+.views-ui-dialog .ui-dialog-titlebar-close {
+ border: 1px solid transparent;
+ display: block;
+ margin: 0;
+ padding: 0;
+ position: absolute;
+ right: 0;
+ top: 2px;
+ /* Make sure this is in front of the modal backdrop. */
+ z-index: 1002;
+}
+
+.views-ui-dialog .ui-dialog-titlebar {
+ padding: 0;
+ margin: 0;
+}
+
+.views-ui-dialog .ui-dialog-title {
+ display: none;
+}
+
+.views-ui-dialog #views-ajax-popup {
+ padding: 0;
+ overflow: hidden;
+}
+
+.views-ui-dialog #views-ajax-title,
+.views-ui-dialog #views-ajax-body {
+ margin: 0;
+ padding: 0;
+}
+
+.views-ui-dialog #views-ajax-popup {
+ overflow: hidden;
+}
+
+.views-ui-dialog .scroll {
+ max-height: 400px;
+ overflow: auto;
+}
+
+#views-filterable-options-controls {
+ display: none;
+}
+
+.views-ui-dialog #views-filterable-options-controls {
+ display: block;
+}
+
+/* Don't let the messages overwhelm the modal */
+.views-ui-dialog .views-messages {
+ max-height: 200px;
+ overflow: auto;
+}
+
+/* @end */
+
+/* @group Settings forms */
+
+.views-display-setting .label,
+.views-display-setting .views-ajax-link {
+ display: inline-block;
+ float: left; /* LTR */
+}
+
+/* @end */
+
+/* @group Filter Settings form */
+
+div.form-item-options-value-all {
+ display: none;
+}
+/* @end */
+
+/* @group Drupal overrides */
+
+/* The .progress-disabled class added to the form on submit floats the element
+ * left and causes the form width to shrink-wrap to the content. Setting the
+ * width to 100% prevents this.
+ */
+#views-ajax-body form {
+ width: 100%;
+}
+
+/* @end */
+
+
+
+/* @group Javascript dependent styling */
+
+.js-only {
+ display: none;
+}
+
+html.js .js-only {
+ display: inherit;
+}
+
+html.js span.js-only {
+ display: inline;
+}
+
+/* @end */
+
+/* @group AJAX throbber */
+
+/* Base Page */
+#views-ui-list-page .ajax-progress-throbber,
+.views-admin .ajax-progress-throbber {
+ /* Can't do center:50% middle: 50%, so approximate it for a typical window size. */
+ left: 49%;
+ position: fixed;
+ top: 48.5%;
+ z-index: 1000;
+}
+#views-ui-list-page .ajax-progress-throbber .message,
+.views-admin .ajax-progress-throbber .message {
+ display: none;
+}
+
+/* Modal */
+#views-ajax-popup .ajax-progress-throbber {
+ /* Can't do center:50% middle: 50%, so approximate it for a typical window size. */
+ left: 49%;
+ position: fixed;
+ top: 48.5%;
+ z-index: 1000;
+}
+#views-ajax-popup .ajax-progress-throbber .message {
+ display: none;
+}
+
+/* @end */
diff --git a/kolab.org/www/drupal-7.15/sites/all/modules/views/css/views-admin.ctools-rtl.css b/kolab.org/www/drupal-7.15/sites/all/modules/views/css/views-admin.ctools-rtl.css
new file mode 100644
index 0000000..338b2fb
--- /dev/null
+++ b/kolab.org/www/drupal-7.15/sites/all/modules/views/css/views-admin.ctools-rtl.css
@@ -0,0 +1,82 @@
+/* @group Buttons */
+
+.ctools-dropbutton .ctools-content {
+ border-left: 1px solid #e8e8e8;
+}
+
+.ctools-content ul.actions {
+ padding-left: auto;
+ padding-right: 0;
+}
+
+.ctools-dropbutton .ctools-link {
+ border-right: 1px solid #ffffff;
+}
+
+.ctools-dropbutton li {
+ padding-left: 9px;
+ padding-left: auto;
+}
+
+.views-display-top .ctools-button {
+ left: 12px;
+ right: auto;
+}
+
+.views-ui-display-tab-bucket .ctools-button {
+ left: 5px;
+ right: auto;
+}
+
+/* @end */
+
+/* @group Collapsible */
+
+.ctools-toggle {
+ float: right;
+ margin-left: 2px;
+ margin-right: 0;
+}
+
+.ctools-toggle.ctools-toggle-collapsed {
+ border-left: 0;
+ border-right: 4px solid;
+ border-left-color: transparent;
+ border-width: 5px 5px 5px 0;
+ margin-left: 5px;
+ margin-right: 2px;
+}
+
+.ctools-export-ui-row label {
+ float: right;
+}
+
+.views-display-column > .ctools-toggle {
+ margin-left: 3px;
+ margin-right: 6px;
+}
+.views-display-column > .ctools-toggle.ctools-toggle-collapsed {
+ margin-left: 5px;
+ margin-right: 9px;
+}
+
+/* @end */
+
+/* @group Dependent */
+
+.dependent-options {
+ margin-left: 0;
+ margin-right: 18px;
+}
+
+/* @end */
+
+/* @group Export */
+
+/* Override for filter button on the views list screen */
+#ctools-export-ui-list-form .form-submit {
+ margin-left: 0em;
+ margin-right: auto;
+}
+
+/* @end */
diff --git a/kolab.org/www/drupal-7.15/sites/all/modules/views/css/views-admin.ctools.css b/kolab.org/www/drupal-7.15/sites/all/modules/views/css/views-admin.ctools.css
new file mode 100644
index 0000000..52c8952
--- /dev/null
+++ b/kolab.org/www/drupal-7.15/sites/all/modules/views/css/views-admin.ctools.css
@@ -0,0 +1,237 @@
+/* @group Buttons */
+
+.ctools-button-processed {
+ background-color: #ffffff;
+ border-color: #cccccc;
+ font-size: 11px;
+ padding-bottom: 2px;
+ padding-top: 2px;
+}
+
+.ctools-button-processed,
+.ctools-button-processed input {
+ text-transform: lowercase;
+}
+
+.ctools-button-processed:hover {
+ border-color: #b8b8b8;
+}
+
+.ctools-button-processed:active {
+ border-color: #a0a0a0;
+}
+
+.ctools-button-processed .ctools-content {
+ padding-bottom: 0;
+ padding-top: 0;
+}
+
+.ctools-dropbutton-processed {
+ position: absolute;
+}
+
+.ctools-dropbutton-processed .ctools-content {
+ border-right: 1px solid #e8e8e8;
+}
+
+.ctools-dropbutton-processed .ctools-content ul {
+ margin: 0;
+ padding: 0;
+}
+
+.ctools-content ul.actions {
+ margin-top: 0;
+ margin-bottom: 0;
+ padding-left: 0;
+}
+
+.ctools-button-processed .ctools-content a {
+ background-image: none;
+ border: medium none;
+}
+
+.ctools-dropbutton-processed.open:hover {
+ border-color: #D0D0D0;
+}
+
+.ctools-dropbutton-processed.open {
+ z-index: 100;
+}
+
+.ctools-dropbutton-processed .ctools-link {
+ border-left: 1px solid #ffffff;
+}
+
+.ctools-dropbutton-processed.open .ctools-content {
+ padding-bottom: 4px;
+}
+
+.ctools-dropbutton-processed li a,
+.ctools-dropbutton-processed li input {
+ padding-right: 9px;
+}
+
+.ctools-dropbutton-processed.open li + li {
+ border-top: 1px solid #efefef;
+ margin-top: 4px;
+ padding-bottom: 0;
+ padding-top: 4px;
+}
+
+.ctools-twisty:focus {
+ outline: medium none;
+}
+
+.ctools-no-js .ctools-content ul {
+ margin-bottom: 0;
+ margin-top: 0;
+ padding-left: 0;
+}
+
+.views-display-top .ctools-button-processed {
+ font-size: 12px;
+ position: absolute;
+ right: 12px;
+ top: 7px;
+}
+
+.views-ui-display-tab-bucket .ctools-button-processed {
+ position: absolute;
+ right: 5px;
+ top: 4px;
+}
+
+.views-ui-display-tab-actions .ctools-button-processed li a,
+.views-ui-display-tab-actions .ctools-button-processed input {
+ background: none;
+ border: medium;
+ font-family: inherit;
+ font-size: 12px;
+ padding-bottom: 0;
+ padding-left: 12px;
+ padding-top: 0;
+ margin-bottom: 0;
+}
+
+.views-ui-display-tab-actions .ctools-button-processed input:hover {
+ background: none;
+}
+
+/* @end */
+
+/* @group Collapsible */
+
+.ctools-toggle {
+ border-bottom-color: transparent;
+ border-left-color: transparent;
+ border-right-color: transparent;
+ border-style: solid;
+ border-width: 5px 5px 0;
+ display: inline-block;
+ float: left;
+ height: 0;
+ margin-right: 2px;
+ margin-top: 0.4545em;
+ width: 0;
+}
+
+.ctools-toggle.ctools-toggle-collapsed {
+ border-bottom-color: transparent;
+ border-left: 4px solid;
+ border-right-color: transparent;
+ border-top-color: transparent;
+ border-width: 5px 0 5px 5px;
+ margin-left: 2px;
+ margin-right: 5px;
+ margin-top: 0.3333em;
+}
+
+.ctools-toggle:hover,
+.ctools-collapsible-handle:hover {
+ cursor: pointer;
+}
+
+.ctools-export-ui-row {
+ margin-bottom: 0;
+ padding-top: 0;
+}
+
+.ctools-export-ui-row label {
+ display: block;
+ float: left;
+ width: 55px;
+}
+
+.views-display-settings .ctools-toggle {
+ color: #000000;
+}
+
+.views-display-column > .ctools-toggle {
+ margin-left: 6px;
+ margin-right: 3px;
+ margin-top: 10px;
+}
+.views-display-column > .ctools-toggle.ctools-toggle-collapsed {
+ margin-left: 9px;
+ margin-right: 5px;
+ margin-top: 8px;
+}
+
+.views-display-column > .ctools-collapsible-handle {
+ border-color: #F3F3F3;
+ border-style: solid;
+ border-width: 1px 1px 0;
+ font-size: 13px;
+ font-weight: normal;
+ margin: 0;
+ padding: 6px 3px;
+}
+
+.views-display-column > .ctools-toggle.ctools-toggle-collapsed + .ctools-collapsible-handle {
+ border-width: 1px;
+}
+
+.views-display-column > .ctools-collapsible-content > .views-ui-display-tab-bucket:first-child {
+ border-top: medium none;
+}
+
+h2.ctools-collapsible-handle {
+ display: inline;
+ clear: both;
+}
+
+/* @end */
+
+/* @group Dependent */
+
+.dependent-options {
+ margin-left: 18px; /* LTR */
+}
+
+/* @end */
+
+/* @group Export */
+
+/* Override for filter button on the views list screen */
+#ctools-export-ui-list-form .form-submit {
+ margin-top: 0em !important;
+ margin-right: 0em;
+}
+
+.ctools-export-ui-row + .ctools-export-ui-row {
+ margin-top: 1em;
+}
+
+.ctools-export-ui-fourth-row input {
+ margin-top: 5px !important;
+}
+
+/* @end */
+
+/* @group Jump list */
+
+#views-live-preview .ctools-jump-menu-select{
+ max-width: 450px;
+}
+
+/* @end */
diff --git a/kolab.org/www/drupal-7.15/sites/all/modules/views/css/views-admin.garland-rtl.css b/kolab.org/www/drupal-7.15/sites/all/modules/views/css/views-admin.garland-rtl.css
new file mode 100644
index 0000000..9a8de6d
--- /dev/null
+++ b/kolab.org/www/drupal-7.15/sites/all/modules/views/css/views-admin.garland-rtl.css
@@ -0,0 +1,13 @@
+/**
+ * The .garland.css file is intended to contain styles that override declarations
+ * in the Garland theme.
+ */
+
+ /* @group Lists */
+
+.views-displays .secondary .action-list {
+ left: auto;
+ right: 1px;
+}
+
+ /* @end */
diff --git a/kolab.org/www/drupal-7.15/sites/all/modules/views/css/views-admin.garland.css b/kolab.org/www/drupal-7.15/sites/all/modules/views/css/views-admin.garland.css
new file mode 100644
index 0000000..cd9010a
--- /dev/null
+++ b/kolab.org/www/drupal-7.15/sites/all/modules/views/css/views-admin.garland.css
@@ -0,0 +1,263 @@
+/**
+ * The .garland.css file is intended to contain styles that override declarations
+ * in the Garland theme.
+ */
+
+/* @group Attachment details tabs
+ *
+ * The tabs that switch between sections
+ */
+
+.views-displays .region-content .secondary,
+.views-displays .region-content .secondary {
+ padding-bottom: 0;
+ padding-left: 0;
+}
+
+.views-displays .secondary .action-list {
+ left: 1px;
+ top: 20px;
+}
+
+.views-displays .secondary .action-list li,
+.views-displays .secondary a {
+ border-color: #e9e9e9;
+}
+
+.views-displays .secondary a {
+ font-size: 12px;
+ padding: 2px 7px;
+}
+
+.views-displays ul.secondary li a:hover,
+.views-displays ul.secondary li.active a {
+ border: 1px solid transparent;
+ padding: 2px 7px;
+}
+
+.views-displays .secondary > li a {
+ -moz-border-radius: 5px;
+ -webkit-border-radius: 5px;
+ border-radius: 5px;
+}
+
+.views-displays .secondary > li.open a {
+ background-image: none;
+ -moz-border-radius: 5px 5px 0 0;
+ -webkit-border-bottom-left-radius: 0;
+ -webkit-border-bottom-right-radius: 0;
+ -webkit-border-top-left-radius: 5px;
+ -webkit-border-top-right-radius: 5px;
+ border-radius: 5px 5px 0 0;
+}
+
+.views-displays .secondary .open > a:hover {
+ border-color: #e9e9e9 #e9e9e9 #f1f1f1 #e9e9e9;
+ border-width: 1px 1px 1px 1px;
+ color: #0071B3;
+}
+
+.views-displays .secondary input.form-submit {
+ font-size: 11px;
+}
+
+/* @end */
+
+/* @group Attachment buckets
+ *
+ * These are the individual "buckets," or boxes, inside the display settings area
+ */
+
+.views-ui-display-tab-bucket h3 {
+ font-weight: bold;
+}
+
+/* @end */
+
+/* @group Modal dialog box
+ *
+ * The contents of the popup dialog on the views edit form.
+ */
+
+.views-filterable-options .form-type-checkbox {
+ margin: 0;
+}
+
+.views-filterable-options .even .form-type-checkbox {
+ background-color: #F9F9F9;
+}
+
+.views-ui-dialog .ui-dialog-titlebar-close,
+.views-ui-dialog #views-ajax-title,
+.views-ui-dialog .views-override,
+.views-ui-dialog .form-buttons {
+ background-color: #f6f6f6;
+}
+
+/* @end */
+
+/* @group CTools */
+
+/* @group Buttons */
+
+.ctools-button-processed {
+ background-image:
+ -moz-linear-gradient(
+ -90deg,
+ #ffffff 0px,
+ #f9f9f9 100%);
+ background-image:
+ -webkit-gradient(
+ linear,
+ left top,
+ left bottom,
+ color-stop(0.0, rgba(255, 255, 255, 1.0)),
+ color-stop(1.0, rgba(249, 249, 249, 1.0))
+ );
+ background-image:
+ -webkit-linear-gradient(
+ -90deg,
+ #ffffff 0px,
+ #f9f9f9 100%);
+ background-image:
+ linear-gradient(
+ -90deg,
+ #ffffff 0px,
+ #f9f9f9 100%);
+ -moz-border-radius: 5px;
+ -webkit-border-radius: 5px;
+ border-radius: 5px;
+ padding-bottom: 1px;
+ padding-top: 1px;
+}
+
+.ctools-button-processed:hover {
+ background-image:
+ -moz-linear-gradient(
+ -90deg,
+ #ffffff 0px,
+ #f1f1f1 100%);
+ background-image:
+ -webkit-gradient(
+ linear,
+ left top,
+ left bottom,
+ color-stop(0.0, rgba(255, 255, 255, 1.0)),
+ color-stop(1.0, rgba(241, 241, 241, 1.0))
+ );
+ background-image:
+ -webkit-linear-gradient(
+ -90deg,
+ #ffffff 0px,
+ #f1f1f1 100%);
+ background-image:
+ linear-gradient(
+ -90deg,
+ #ffffff 0px,
+ #f1f1f1 100%);
+}
+
+.ctools-button-processed ol li,
+.ctools-button-processed ul li {
+ margin: 0;
+ padding-bottom: 0;
+}
+
+.views-ui-display-tab-actions .ctools-button-processed input {
+ margin-right: 0;
+}
+
+.ctools-content ul.actions {
+ padding-bottom: 0;
+}
+
+.ctools-dropbutton-processed.open:hover {
+ background-image:
+ -moz-linear-gradient(
+ -90deg,
+ #ffffff 0px,
+ #f9f9f9 100%);
+ background-image:
+ -webkit-gradient(
+ linear,
+ left top,
+ left bottom,
+ color-stop(0.0, rgba(255, 255, 255, 1.0)),
+ color-stop(1.0, rgba(249, 249, 249, 1.0))
+ );
+ background-image:
+ -webkit-linear-gradient(
+ -90deg,
+ #ffffff 0px,
+ #f9f9f9 100%);
+ background-image:
+ linear-gradient(
+ -90deg,
+ #ffffff 0px,
+ #f9f9f9 100%);
+}
+
+.ctools-dropbutton-processed.open {
+ -moz-box-shadow: 1px 1px 2px rgba(0,0,0,0.25);
+ -webkit-box-shadow: 1px 1px 2px rgba(0,0,0,0.25);
+ box-shadow: 1px 1px 2px rgba(0,0,0,0.25);
+}
+
+.ctools-twisty {
+ top: 0.6667em;
+}
+
+.ctools-dropbutton-processed.open .ctools-twisty {
+ top: 0.3333em;
+}
+
+/* @end */
+
+/* @group Dependent */
+
+.dependent-options,
+.form-checkboxes.dependent-options,
+.form-radios.dependent-options,
+.form-checkboxes .form-item.dependent-options,
+.form-radios .form-item.dependent-options {
+ margin-left: 25px;
+}
+
+/* @end */
+
+/* @group Collapsible */
+
+.ctools-toggle {
+ margin-top: 0.5em;
+}
+
+.ctools-toggle,
+.views-display-settings .ctools-toggle {
+ color: #494949;
+}
+
+.ctools-toggle.ctools-toggle-collapsed {
+ margin-top: 0.25em;
+}
+
+.views-display-column > .ctools-toggle {
+ margin-top: 14px;
+}
+
+.views-display-column > .ctools-toggle.ctools-toggle-collapsed {
+ margin-top: 12px;
+}
+
+.views-ui-display-tab-actions .ctools-button input {
+ color: #027AC6;
+ font-size: 12px;
+}
+
+.views-ui-display-tab-actions .ctools-button input:hover,
+.views-ui-display-tab-actions .ctools-button input:focus {
+ color: #0062A0;
+}
+
+/* @end */
+
+/* @end */
diff --git a/kolab.org/www/drupal-7.15/sites/all/modules/views/css/views-admin.seven-rtl.css b/kolab.org/www/drupal-7.15/sites/all/modules/views/css/views-admin.seven-rtl.css
new file mode 100644
index 0000000..abdd5aa
--- /dev/null
+++ b/kolab.org/www/drupal-7.15/sites/all/modules/views/css/views-admin.seven-rtl.css
@@ -0,0 +1,43 @@
+/**
+ * The .seven.css file is intended to contain styles that override declarations
+ * in the Seven admin theme.
+ */
+
+/* @group Forms */
+
+.views-admin .form-submit,
+.views-admin a.button {
+ margin-left: 0;
+}
+
+/* @end */
+
+/* @group Lists */
+
+.views-admin .links li {
+ padding-left: 0;
+}
+
+/* @end */
+
+/* @group Attachments */
+
+.views-displays .secondary {
+ text-align: right;
+}
+
+/* @end */
+
+/* @group Attachment details tabs */
+
+.views-display-top ul.secondary {
+ float: right;
+}
+
+.views-displays .secondary .action-list li:first-child {
+ -moz-border-radius: 7px 0 0 0;
+ -webkit-border-radius: 7px 0 0 0;
+ border-radius: 7px 0 0 0;
+}
+
+/* @end */
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
new file mode 100644
index 0000000..6ebdbf1
--- /dev/null
+++ b/kolab.org/www/drupal-7.15/sites/all/modules/views/css/views-admin.seven.css
@@ -0,0 +1,550 @@
+/**
+ * The .seven.css file is intended to contain styles that override declarations
+ * in the Seven admin theme.
+ */
+
+/* @group Content */
+
+.views-ui-display-tab-bucket h1,
+.views-ui-display-tab-bucket h2,
+.views-ui-display-tab-bucket h3,
+.views-ui-display-tab-bucket h4,
+.views-ui-display-tab-bucket h5 {
+ margin-bottom: 0;
+ margin-top: 0;
+}
+
+/* @end */
+
+/* @group Forms */
+
+.views-ui-dialog fieldset {
+ padding-top: 2.5em;
+}
+
+fieldset fieldset {
+ border: medium none;
+}
+
+/**
+ * Seven positions the legend absolutely, but does not have a way to ignore
+ * fieldsets without a legend so we make one up.
+ */
+fieldset.fieldset-no-legend {
+ padding-top: 0;
+}
+
+/**
+ * Being extra safe here and scoping this to the add view wizard form (where
+ * a layout problem occurs for the Display format fieldset if we don't fix its
+ * padding), but it's probably safe to just let it apply everywhere.
+ */
+#views-ui-add-form fieldset fieldset .fieldset-wrapper {
+ padding-left: 0;
+ padding-right: 0;
+}
+
+.views-display-tab fieldset {
+ padding: 0 12px;
+}
+
+.views-display-tab .fieldset-wrapper {
+ padding: 10px 12px 12px;
+}
+
+.views-display-tab fieldset.box-padding .fieldset-wrapper {
+ padding: 0;
+}
+
+.views-display-tab legend + .fieldset-wrapper {
+ padding-top: 2.5em;
+}
+
+.views-admin .form-item label.option,
+#views-ui-preview-form .form-item label.option {
+ font-size: 1em;
+}
+
+#views-ui-preview-form .form-submit {
+ margin-top: 3px;
+}
+
+.views-admin input.form-submit,
+.views-ui-dialog input.form-submit,
+.views-admin a.button,
+.views-ui-dialog a.button {
+ margin-bottom: 0;
+ margin-right: 0; /* LTR */
+ margin-top: 0;
+}
+
+/* Override for a button on the edit display screen */
+#edit-displays-preview-controls .form-submit {
+ display: inline-block;
+ margin-right: 1em;
+}
+
+/* Override for filter button on the views list screen */
+#ctools-export-ui-list-form .form-submit {
+ margin-bottom: 0;
+}
+
+#ctools-export-ui-list-form .ctools-export-ui-first-row .form-item {
+ margin-top: 3px;
+ margin-right: 5px; /* LTR */
+}
+
+.form-item,
+.form-item .form-item {
+ margin-bottom: 0;
+ margin-top: 9px;
+ padding-bottom: 0;
+ padding-top: 0;
+}
+
+.form-actions {
+ margin-bottom: 0;
+ margin-top: 0;
+}
+
+.form-item .form-item {
+ padding-bottom: 0;
+ padding-top: 0;
+}
+
+.form-radios > .form-item {
+ margin-top: 3px;
+}
+
+/* @group Dependent options
+ *
+ * Dependent options are identified in CTools dependent.js
+ */
+
+/* The .dependent-options.form-item is necessary to supercede the Seven .form-item
+ * reset declaration that sets the margin to zero.
+ */
+.dependent-options,
+.dependent-options.form-item,
+.form-item-options-expose-required,
+.form-item-options-expose-label {
+ margin-left: 1.5em;
+}
+
+.views-admin-dependent .form-item .form-item,
+.views-admin-dependent .form-type-checkboxes,
+.views-admin-dependent .form-type-radios,
+.views-admin-dependent .dependent-options,
+.views-admin-dependent .form-item .form-item,
+.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 {
+ margin-bottom: 6px;
+ margin-top: 6px;
+}
+
+.views-admin-dependent .form-type-radio,
+.views-admin-dependent .form-radios .form-item {
+ margin-bottom: 2px;
+ margin-top: 2px;
+}
+
+/* @end */
+
+/* @end */
+
+/* @group Lists */
+
+.views-admin ul.secondary,
+.views-admin .item-list ul {
+ margin: 0;
+ padding: 0;
+}
+
+.views-admin ul.secondary {
+ clear: none;
+}
+
+.views-displays ul.secondary li a,
+.views-displays ul.secondary li.active a,
+.views-displays ul.secondary li.active a.active {
+ padding: 2px 7px 3px;
+}
+
+.views-displays ul.secondary li.active a,
+.views-displays ul.secondary li.active a.active {
+ border: 1px solid transparent;
+}
+
+.views-admin .links li {
+ padding-right: 0; /* LTR */
+}
+
+.views-admin .button .links li {
+ padding-right: 12px; /* LTR */
+}
+
+.page-admin-structure-views #content ul.action-links {
+ padding-left: 0;
+ padding-right: 0;
+}
+
+.views-display-top ul.secondary {
+ background-color: transparent;
+ float: left
+}
+
+.views-display-top .secondary .action-list li {
+ float: none;
+ margin: 0;
+}
+
+/* @end */
+
+/* @group Buttons */
+
+.ctools-button-processed ul {
+ margin: 0;
+}
+
+/* Override for input elements that are themed like ctools-buttons */
+.ctools-button-processed input.form-submit:hover {
+ background-image: none;
+ color: #0074BD;
+ text-shadow: none;
+}
+
+.ctools-button-processed input.form-submit:active {
+ background: none;
+ border: medium none;
+ color: #0074BD;
+ text-shadow: none;
+}
+
+/* @end */
+
+/* @group Tables */
+
+table td,
+table th {
+ vertical-align: top;
+}
+
+/* @end */
+
+/* @group Attachment details */
+
+#edit-display-settings-title {
+ color: #008BCB;
+}
+
+/* @end */
+
+/* @group Attachment details tabs
+ *
+ * The tabs that switch between sections
+ */
+
+.views-displays .secondary {
+ text-align: left; /* LTR */
+}
+
+.views-displays .secondary > li:first-child {
+ padding-left: 0;
+}
+
+.views-admin .icon.add {
+ background-position: center 3px;
+}
+
+.views-displays .secondary a {
+ background-color: #f1f1f1;
+ -moz-border-radius: 7px;
+ -webkit-border-radius: 7px;
+ border-radius: 7px;
+ color: #008BCB;
+}
+
+.views-displays .secondary a:hover > .icon.add {
+ background-position: center -25px;
+}
+
+.views-displays .secondary .open > a {
+ -moz-border-radius: 7px 7px 0 0;
+ -webkit-border-radius: 7px 7px 0 0;
+ border-radius: 7px 7px 0 0;
+}
+
+.views-displays .secondary .open > a:hover {
+ background-color: #f1f1f1;
+ color: #008BCB;
+}
+
+.views-displays .secondary .action-list li:first-child {
+ -moz-border-radius: 0 7px 0 0;
+ -webkit-border-radius: 0 7px 0 0;
+ border-radius: 0 7px 0 0;
+}
+
+.views-displays .secondary .action-list li:last-child {
+ -moz-border-radius: 0 0 7px 7px;
+ -webkit-border-radius: 0 0 7px 7px;
+ border-radius: 0 0 7px 7px;
+}
+
+.views-displays .secondary .action-list input.form-submit {
+ -moz-border-radius: 0;
+ -webkit-border-radius: 0;
+ border-radius: 0;
+ color: #008BCB;
+}
+
+/* @end */
+
+/* @group Attachment buckets
+ *
+ * These are the individual "buckets," or boxes, inside the display settings area
+ */
+
+.views-ui-display-tab-bucket h3 {
+ font-size: 12px;
+ text-transform: uppercase;
+}
+
+.views-ui-display-tab-bucket .links {
+ padding: 2px 6px 4px;
+}
+
+.views-ui-display-tab-bucket .links li + li {
+ margin-left: 3px;
+}
+
+/* @end */
+
+/* @group Rearrange filter criteria */
+
+#views-ui-rearrange-filter-form .action-links {
+ margin: 0;
+ padding: 0;
+}
+
+#views-ui-rearrange-filter-form table {
+ border: medium none;
+}
+
+#views-ui-rearrange-filter-form [id^="views-row"] {
+ border: medium none;
+}
+
+#views-ui-rearrange-filter-form tr td:last-child {
+ border-right: medium none;
+}
+
+#views-ui-rearrange-filter-form .filter-group-operator-row {
+ border-left: 1px solid transparent !important;
+ border-right: 1px solid transparent !important;
+}
+
+#views-ui-rearrange-filter-form tr.drag td {
+ background-color: #FFEE77 !important;
+}
+
+#views-ui-rearrange-filter-form tr.drag-previous td {
+ background-color: #FFFFBB !important;
+}
+
+/* @end */
+
+/* @group Live preview elements */
+
+.views-query-info pre {
+ margin-bottom: 0;
+ margin-top: 0;
+}
+
+/* @group Query info table */
+
+.views-query-info table {
+ -moz-border-radius: 7px;
+ -webkit-border-radius: 7px;
+ border-radius: 7px;
+ -webkit-border-horizontal-spacing: 1px;
+ -webkit-border-vertical-spacing: 1px;
+}
+
+.views-query-info table tr td:last-child {
+ /* Fixes a Seven style that bleeds down into this table unnecessarily */
+ border-right: 0 none;
+}
+
+/* @end */
+
+/* @end */
+
+/* @group Add view */
+
+.form-item-page-create,
+.form-item-block-create {
+ margin-top: 13px;
+}
+
+/* @end */
+
+/* @group Modal dialog box
+ *
+ * The contents of the popup dialog on the views edit form.
+ */
+
+.views-ui-dialog .ui-dialog-titlebar-close {
+ -moz-box-shadow: none;
+ -webkit-box-shadow: none;
+ box-shadow: none;
+ border-color: #cccccc;
+ right: -27px;
+ top: -1px;
+}
+
+.views-ui-dialog fieldset.collapsible {
+ padding-top: 1.5em;
+}
+
+.views-ui-dialog fieldset.collapsed {
+ padding-top: 2.5em;
+}
+
+.filterable-option .form-item.form-type-checkbox {
+ /* This selector is aggressive because Seven's reset for .form-items is aggressive. */
+ padding-bottom: 4px;
+ padding-left: 4px;
+ padding-top: 4px;
+}
+
+/* @end */
+
+/* @group CTools */
+
+/* @group Buttons */
+
+.ctools-button-processed {
+ background-image:
+ -moz-linear-gradient(
+ -90deg,
+ #ffffff 0px,
+ #f9f9f9 100%);
+ background-image:
+ -webkit-gradient(
+ linear,
+ left top,
+ left bottom,
+ color-stop(0.0, rgba(255, 255, 255, 1.0)),
+ color-stop(1.0, rgba(249, 249, 249, 1.0))
+ );
+ background-image:
+ -webkit-linear-gradient(
+ -90deg,
+ #ffffff 0px,
+ #f9f9f9 100%);
+ background-image:
+ linear-gradient(
+ -90deg,
+ #ffffff 0px,
+ #f9f9f9 100%);
+ -moz-border-radius: 11px 11px 11px 11px;
+ -webkit-border-radius: 11px 11px 11px 11px;
+ border-radius: 11px 11px 11px 11px;
+}
+
+.ctools-button-processed:hover {
+ background-image:
+ -moz-linear-gradient(
+ -90deg,
+ #ffffff 0px,
+ #f1f1f1 100%);
+ background-image:
+ -webkit-gradient(
+ linear,
+ left top,
+ left bottom,
+ color-stop(0.0, rgba(255, 255, 255, 1.0)),
+ color-stop(1.0, rgba(241, 241, 241, 1.0))
+ );
+ background-image:
+ -webkit-linear-gradient(
+ -90deg,
+ #ffffff 0px,
+ #f1f1f1 100%);
+ background-image:
+ linear-gradient(
+ -90deg,
+ #ffffff 0px,
+ #f1f1f1 100%);
+}
+
+.ctools-dropbutton-processed.open:hover {
+ background-image:
+ -moz-linear-gradient(
+ -90deg,
+ #ffffff 0px,
+ #f9f9f9 100%);
+ background-image:
+ -webkit-gradient(
+ linear,
+ left top,
+ left bottom,
+ color-stop(0.0, rgba(255, 255, 255, 1.0)),
+ color-stop(1.0, rgba(249, 249, 249, 1.0))
+ );
+ background-image:
+ -webkit-linear-gradient(
+ -90deg,
+ #ffffff 0px,
+ #f9f9f9 100%);
+ background-image:
+ linear-gradient(
+ -90deg,
+ #ffffff 0px,
+ #f9f9f9 100%);
+}
+
+.ctools-dropbutton-processed.open {
+ -moz-box-shadow: 1px 1px 2px rgba(0,0,0,0.25);
+ -webkit-box-shadow: 1px 1px 2px rgba(0,0,0,0.25);
+ box-shadow: 1px 1px 2px rgba(0,0,0,0.25);
+}
+
+/* @end */
+
+/* @group Collapsible */
+
+.ctools-toggle {
+ margin-top: 0.6667em;
+}
+
+.ctools-toggle.ctools-toggle-collapsed {
+ margin-top: 0.5em;
+}
+
+.views-display-settings .ctools-toggle {
+ color: #008BCB;
+}
+
+.views-display-column > .ctools-toggle {
+ margin-top: 14px;
+}
+
+.views-display-column > .ctools-toggle.ctools-toggle-collapsed {
+ margin-top: 12px;
+}
+
+.views-display-column > .ctools-collapsible-handle {
+ color: #008BCB;
+}
+
+.views-ui-display-tab-actions .ctools-button-processed input {
+ color: #0074BD;
+}
+
+/* @end */
+
+/* @end */
diff --git a/kolab.org/www/drupal-7.15/sites/all/modules/views/css/views-admin.theme-rtl.css b/kolab.org/www/drupal-7.15/sites/all/modules/views/css/views-admin.theme-rtl.css
new file mode 100644
index 0000000..f966432
--- /dev/null
+++ b/kolab.org/www/drupal-7.15/sites/all/modules/views/css/views-admin.theme-rtl.css
@@ -0,0 +1,208 @@
+/**
+ * The .theme.css file is intended to contain presentation declarations including
+ * images, borders, colors, and fonts.
+ */
+
+/* @end */
+
+/* @group Icons */
+
+.actions a,
+.views-admin .icon,
+.views-admin .icon-text {
+ background-position: right top;
+}
+
+/* Targets any element with an icon -> text combo */
+.views-admin .icon-text {
+ padding-right: 19px;
+}
+
+.views-admin .icon-linked {
+ background-position: right -153px;
+}
+
+.views-admin .icon-unlinked {
+ background-position: right -195px;
+}
+
+.actions .views-button-add {
+ background-position: right -39px;
+}
+
+.actions .views-button-rearrange {
+ background-position: right -96px;
+}
+
+.actions .views-button-add:hover {
+ background-position: right -58px;
+}
+
+.actions .views-button-rearrange:hover {
+ background-position: right -115px;
+}
+
+.actions .views-button-add:active {
+ background-position: right -77px;
+}
+
+.actions .views-button-rearrange:active {
+ background-position: right -134px;
+}
+
+.views-displays .icon-add {
+ background-position: right -3px;
+}
+
+.views-displays .secondary a:hover > .icon-add {
+ background-position: right -21px;
+}
+
+.views-displays .secondary .open a:hover > .icon-add {
+ background-position: right -3px;
+}
+
+/* @end */
+
+/* @group Forms */
+
+.form-submit + .form-submit,
+.views-admin a.button + a.button {
+ margin-right: 1em;
+}
+
+.container-inline > * + *,
+.container-inline .fieldset-wrapper > * + * {
+ padding-left: 0;
+ padding-right: 4pt;
+}
+
+.views-admin .form-type-checkbox + .form-wrapper {
+ margin-right: 16px;
+}
+
+/* @end */
+
+/* @group Lists */
+
+.horizontal > * + * {
+ margin-right: 9px;
+ padding-right: 9px;
+}
+
+/* @end */
+
+/* @group Attachments */
+
+.views-displays .secondary {
+ padding: 6px 8px 8px;
+}
+
+.views-displays .views-display-top > ul > li + li {
+ margin-right: 3px;
+}
+
+.views-displays .views-extra-actions {
+ left: 10px;
+}
+
+/* @end */
+
+/* @group Attachment details tabs
+ *
+ * The tabs that switch between sections
+ */
+
+.views-displays .secondary .action-list li:first-child {
+ -moz-border-radius: 7px 0 0 0;
+ -webkit-border-top-left-radius: 7px;
+ -webkit-border-top-right-radius: 0;
+ border-radius: 7px 0 0 0;
+}
+
+/* @end */
+
+/* @group Attachment details collapsible fieldset
+ *
+ * The attachment details section is a collapsible fieldset, but should not
+ * have a border around it.
+ */
+
+.views-display-tab .fieldset-legend {
+ left: auto;
+ right: -5px;
+}
+
+/* @end */
+
+/* @group Auto preview
+ *
+ * The auto-preview checkbox line. This may have more stuff added to it.
+ */
+
+div.form-item-displays-live-preview {
+ text-align: left;
+}
+
+/* @end */
+
+/* @group Attachment buckets
+ *
+ * These are the individual "buckets," or boxes, inside the three columns in the
+ * attachment details section.
+ */
+
+.views-ui-display-tab-bucket .icon-text {
+ padding-right: 25px;
+}
+
+/* @end */
+
+/* @group Attachment bucket rows
+ *
+ * This is each row within one of the "boxes."
+ */
+
+.views-display-setting .label {
+ margin-left: 3pt;
+}
+
+/* @end */
+
+/* @group Modal dialog box
+ *
+ * The contents of the popup dialog on the views edit form.
+ */
+
+#views-filterable-options-controls .form-item {
+ margin-left: 2%;
+}
+
+.views-ui-dialog #views-progress-indicator {
+ left: 10px;
+ right: auto;
+}
+
+/* @end */
+
+/* @group Rearrange filters
+ *
+ * Styling for the form that allows views filters to be rearranged.
+ */
+.views-operator-label {
+ padding-right: 0.5em;
+}
+
+/* @end */
+
+/* @group Live preview elements */
+
+/* @group HTML list */
+
+#views-live-preview .view-content > .item-list > ul {
+ padding-right: 21px;
+}
+
+/* @end */
+
+/* @end */
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
new file mode 100644
index 0000000..df45cdf
--- /dev/null
+++ b/kolab.org/www/drupal-7.15/sites/all/modules/views/css/views-admin.theme.css
@@ -0,0 +1,1056 @@
+/**
+ * The .theme.css file is intended to contain presentation declarations including
+ * images, borders, colors, and fonts.
+ */
+
+/* @group Reset */
+
+.views-admin .links {
+ list-style: none outside none;
+ margin: 0;
+}
+
+.views-admin a:hover {
+ text-decoration: none;
+}
+
+/* @end */
+
+/* @group Layout */
+
+.box-padding {
+ padding-left: 12px;
+ padding-right: 12px;
+}
+
+.box-margin {
+ margin: 12px 12px 0 12px;
+}
+
+/* @end */
+
+/* @group Icons */
+
+.views-admin .icon {
+ height: 16px;
+ width: 16px;
+}
+
+.views-admin .icon,
+.views-admin .icon-text {
+ background-attachment: scroll;
+ background-image: url("../images/sprites.png");
+ background-position: left top; /* LTR */
+ background-repeat: no-repeat;
+}
+
+.views-admin a.icon {
+ background-image:
+ url("../images/sprites.png"),
+ -moz-linear-gradient(
+ -90deg,
+ #ffffff 0px,
+ #e8e8e8 100%);
+ background-image:
+ url("../images/sprites.png"),
+ -webkit-gradient(
+ linear,
+ left top,
+ left bottom,
+ color-stop(0.0, rgba(255, 255, 255, 1.0)),
+ color-stop(1.0, rgba(232, 232, 232, 1.0))
+ );
+ background-image:
+ url("../images/sprites.png"),
+ -webkit-linear-gradient(
+ -90deg,
+ #ffffff 0px,
+ #e8e8e8 100%);
+ background-repeat: no-repeat, repeat-y;
+ border: 1px solid #dddddd;
+ -moz-border-radius: 4px;
+ -webkit-border-radius: 4px;
+ border-radius: 4px;
+ -moz-box-shadow: 0 0 0 rgba(0,0,0,0.3333) inset;
+ -webkit-box-shadow: 0 0 0 rgba(0,0,0,0.3333) inset;
+ box-shadow: 0 0 0 rgba(0,0,0,0.3333) inset;
+}
+
+.views-admin a.icon:hover {
+ border-color: #d0d0d0;
+ -moz-box-shadow: 0 0 1px rgba(0,0,0,0.3333) inset;
+ -webkit-box-shadow: 0 0 1px rgba(0,0,0,0.3333) inset;
+ box-shadow: 0 0 1px rgba(0,0,0,0.3333) inset;
+}
+
+.views-admin a.icon:active {
+ border-color: #c0c0c0;
+}
+
+/**
+ * Targets a <span> element inside an <a> element.
+ * This assumes no visible text from the span.
+ */
+.views-admin span.icon {
+ display: inline-block;
+ float: left;
+ position: relative;
+}
+
+.views-admin .icon.compact {
+ display: block;
+ overflow: hidden;
+ text-indent: -9999px;
+}
+
+/* Targets any element with an icon -> text combo */
+.views-admin .icon-text {
+ padding-left: 19px; /* LTR */
+}
+
+.views-admin .icon.linked {
+ background-position: center -153px;
+}
+
+.views-admin .icon.unlinked {
+ background-position: center -195px;
+}
+
+.views-admin .icon.add {
+ background-position: center 3px;
+}
+
+.views-admin a.icon.add {
+ background-position: center 3px, left top;
+}
+
+.views-admin .icon.delete {
+ background-position: center -52px;
+}
+
+.views-admin a.icon.delete {
+ background-position: center -52px, left top;
+}
+
+.views-admin .icon.rearrange {
+ background-position: center -111px;
+}
+
+.views-admin a.icon.rearrange {
+ background-position: center -111px, left top;
+}
+
+.views-displays .secondary a:hover > .icon.add {
+ background-position: center -25px;
+}
+
+.views-displays .secondary .open a:hover > .icon.add {
+ background-position: center 3px;
+}
+
+/* @end */
+
+/* @group Forms */
+
+fieldset.box-padding {
+ border: none;
+}
+
+.views-admin fieldset fieldset {
+ margin-bottom: 0;
+}
+
+.form-item {
+ margin-top: 9px;
+ padding-bottom: 0;
+ padding-top: 0;
+}
+
+.form-type-checkbox {
+ margin-top: 6px;
+}
+
+input.form-checkbox,
+input.form-radio {
+ vertical-align: baseline;
+}
+
+.form-submit:not(.js-hide) + .form-submit,
+.views-admin a.button:not(.js-hide) + a.button {
+ margin-left: 1em; /* LTR */
+}
+
+.container-inline {
+ padding-top: 15px;
+}
+
+.container-inline > * + *,
+.container-inline .fieldset-wrapper > * + * {
+ padding-left: 4pt; /* LTR */
+}
+
+.views-admin fieldset fieldset.container-inline {
+ margin-bottom: 1em;
+ margin-top: 1em;
+ padding-top: 0;
+}
+
+.views-admin fieldset fieldset.container-inline > .fieldset-wrapper {
+ padding-bottom: 0;
+}
+
+/* Indent form elements so they're directly underneath the label of the checkbox that reveals them */
+.views-admin .form-type-checkbox + .form-wrapper {
+ margin-left: 16px; /* LTR */
+}
+
+/* Hide 'remove' checkboxes. */
+.views-remove-checkbox {
+ display: none;
+}
+
+/* sizes the labels of checkboxes and radio button to the height of the text */
+.views-admin .form-type-checkbox label,
+.views-admin .form-type-radio label {
+ line-height: 2;
+}
+
+/* @group Dependent options */
+
+.views-admin-dependent .form-item {
+ margin-bottom: 6px;
+ margin-top: 6px;
+}
+
+/* @end */
+
+/* @end */
+
+/* @group Lists */
+
+.horizontal > * + * {
+ margin-left: 9px; /* LTR */
+ padding-left: 9px; /* LTR */
+}
+
+.views-ui-view-title {
+ font-weight: bold;
+}
+
+/* @end */
+
+/* @group Messages */
+
+.view-changed {
+ margin-bottom: 21px;
+}
+
+/* @end */
+
+/* @group Headings */
+
+/* Intentionally targeting h1 */
+.views-admin h1.unit-title {
+ font-size: 15px;
+ line-height: 1.6154;
+ margin-bottom: 0;
+ margin-top: 18px;
+}
+
+/* @end */
+
+/* @group Tables */
+
+table td,
+table th {
+ vertical-align: top;
+}
+
+/* @end */
+
+/* @group List views */
+
+/* These header classes are ambiguous and should be scoped to th elements */
+
+th.views-ui-name {
+ width: 18%;
+}
+
+th.views-ui-description {
+ width: 26%;
+}
+
+th.views-ui-tag {
+ width: 8%;
+}
+
+th.views-ui-path {
+ width: auto;
+}
+
+th.views-ui-operations {
+ width: 24%;
+}
+
+/* @end */
+
+/* @group Add view */
+
+/**
+ * Drupal core forces AJAX triggering elements to float left when they are
+ * disabled due to AJAX processing. On the add view page, we have inline
+ * containers where we don't want that behavior; it causes the select dropdown
+ * which is triggered to jump to the left while the AJAX throbber is active.
+ *
+ * See also http://drupal.org/node/769936 (Drupal core issue); when that is
+ * fixed it may no longer be necessary to do this.
+ */
+.views-admin .container-inline .progress-disabled {
+ float: none;
+}
+
+/**
+ * I wish this didn't have to be so specific
+ */
+.form-item-description-enable + .form-item-description {
+ margin-top: 0;
+}
+
+.form-item-description-enable label {
+ font-weight: bold;
+}
+
+.form-item-page-create,
+.form-item-block-create {
+ margin-top: 13px;
+}
+
+.form-item-page-create label,
+.form-item-block-create label {
+ font-weight: bold;
+}
+
+/* This makes the form elements after the "Display Format" label flow underneath the label */
+.form-item-page-style-style-plugin > label,
+.form-item-block-style-style-plugin > label {
+ display: block;
+}
+
+.views-attachment .options-set label {
+ font-weight: normal;
+}
+
+/* @end */
+
+/* @group Rearrange filters
+ *
+ * Styling for the form that allows views filters to be rearranged.
+ */
+
+.group-populated {
+ display: none;
+}
+
+td.group-title {
+ font-weight: bold;
+}
+
+.views-ui-dialog td.group-title {
+ margin: 0;
+ padding: 0;
+}
+
+.views-ui-dialog td.group-title span {
+ display: block;
+ height: 1px;
+ overflow: hidden;
+}
+
+.group-message .form-submit,
+.views-remove-group-link,
+#views-add-group {
+ float: right;
+ clear: both;
+}
+
+.views-operator-label {
+ font-style: italic;
+ font-weight: bold;
+ padding-left: 0.5em; /* LTR */
+ text-transform: uppercase;
+}
+
+.exposed-description {
+ float: left;
+ padding-top: 3px;
+ padding-right: 10px;
+}
+
+/* This keeps the collapsible fieldsets of options from crashing into the bottom
+ * of the edit option columns. Because the edit option columns are floated, the collapsible
+ * fieldsets need to be floated as well so that the margin above the fieldset interacts with
+ * the float edit option columns.
+ */
+#edit-options .collapsible {
+ float: left;
+ width: 100%;
+}
+
+#edit-options-more {
+ clear: both;
+}
+
+/* @end */
+
+/* @group Attachments */
+
+.views-displays {
+ border: 1px solid #CCC;
+ padding-bottom: 36px;
+}
+
+.views-display-top {
+ background-color: #F9F9F9;
+ border-bottom: 1px solid #CCCCCC;
+ padding: 8px 8px 8px; /* LTR */
+ position: relative;
+}
+
+.views-display-top .secondary {
+ margin-right: 18em;
+}
+
+.views-display-top .secondary > li {
+ margin-right: 6px;
+ padding-left: 0;
+}
+
+.views-display-top .secondary > li:last-child {
+ margin-right: 0;
+}
+
+#views-display-extra-actions li {
+ padding: 3px 9px;
+}
+
+/* @end */
+
+/* @group Attachment details tabs
+ *
+ * The tabs that switch between sections
+ */
+
+.views-displays .secondary a {
+ border: 1px solid #cbcbcb;
+ display: inline-block;
+ font-size: small;
+ line-height: 1.3333;
+ padding: 3px 7px;
+}
+
+.views-displays .secondary a:focus {
+ outline: none;
+}
+
+.views-displays .secondary a:hover,
+.views-displays .secondary .active a {
+ background-color: #666666;
+ color: #ffffff;
+ border-bottom-width: 1px;
+}
+
+.views-displays .secondary .open > a {
+ background-color: #f1f1f1;
+ border-bottom: 1px solid transparent;
+ position: relative;
+}
+
+.views-displays .secondary .open > a:hover {
+ background-color: #f1f1f1;
+}
+
+.views-displays .secondary .action-list li {
+ background-color: #f1f1f1;
+ border-color: #cbcbcb;
+ border-style: solid;
+ border-width: 0 1px;
+ padding: 2px 9px;
+}
+
+.views-displays .secondary .action-list li:first-child {
+ border-width: 1px 1px 0;
+}
+
+.views-displays .secondary .action-list li.last {
+ border-width: 0 1px 1px;
+}
+
+.views-displays .secondary .action-list li:last-child {
+ border-width: 0 1px 1px;
+}
+
+.views-displays .secondary .action-list input.form-submit {
+ background: none repeat scroll 0 0 transparent;
+ border: medium none;
+ margin: 0;
+ padding: 0;
+}
+
+.views-displays .secondary .action-list li:hover {
+ background-color: #dddddd;
+}
+
+/* @end */
+
+/* @group Attachment details */
+
+#edit-display-settings-title {
+ font-size: 14px;
+ line-height: 1.5;
+ margin: 0;
+}
+
+#edit-display-settings-top {
+ padding-bottom: 4px;
+}
+
+#edit-display-settings-content {
+ margin-top: 12px;
+}
+
+#edit-display-settings-main {
+ margin-top: 15px;
+}
+
+/* @end */
+
+/* @group Attachment columns
+ *
+ * The columns that contain the option buckets e.g. Format and Basic Settings
+ */
+
+.views-display-column + .views-display-column {
+ margin-top: 0;
+ }
+
+ /* @end */
+
+/* @group Auto preview
+ *
+ * The auto-preview checkbox line.
+ */
+
+#views-ui-preview-form > div > div,
+#views-ui-preview-form > div > input {
+ float: left;
+}
+
+#views-ui-preview-form .form-type-checkbox {
+ margin-top: 2px;
+ margin-left: 2px;
+}
+
+#views-ui-preview-form .form-type-textfield {
+ margin-top: 5px;
+}
+
+#views-ui-preview-form .arguments-preview {
+ font-size: 1em;
+}
+
+#views-ui-preview-form .arguments-preview,
+#views-ui-preview-form .form-type-textfield {
+ margin-left: 14px;
+}
+
+#views-ui-preview-form .form-type-textfield label {
+ display: inline-block;
+ float: left;
+ font-weight: normal;
+ height: 6ex;
+ margin-right: 0.75em;
+}
+
+#views-ui-preview-form .form-type-textfield .description {
+ white-space: nowrap;
+}
+
+/* @end */
+
+/* @group Attachment buckets
+ *
+ * These are the individual "buckets," or boxes, inside the display settings area
+ */
+
+.views-ui-display-tab-bucket {
+ border: 1px solid #f3f3f3;
+ line-height: 20px;
+ margin: 0;
+ padding-top: 4px;
+}
+
+.views-ui-display-tab-bucket + .views-ui-display-tab-bucket {
+ border-top: medium none;
+}
+
+.views-ui-display-tab-bucket > h3,
+.views-ui-display-tab-bucket > .views-display-setting {
+ padding: 2px 6px 4px;
+}
+
+.views-ui-display-tab-bucket h3 {
+ font-size: small;
+ margin: 0;
+}
+
+.views-ui-display-tab-bucket .horizontal.actions {
+ margin-right: 6px;
+}
+
+.views-ui-display-tab-bucket .actions.horizontal li + li {
+ margin-left: 3px;
+ padding-left: 3px;
+}
+
+.views-ui-display-tab-bucket.access {
+ padding-top: 0;
+}
+
+.views-ui-display-tab-bucket.page-settings {
+ border-bottom: medium none;
+}
+
+.views-display-setting .views-ajax-link {
+ margin-left: 0.2083em;
+ margin-right: 0.2083em;
+}
+
+/* @end */
+
+/* @group Attachment bucket overridden
+ *
+ * Applies a overriden(italics) font style to overridden buckets.
+ * The better way to implement this would be to add the overridden class
+ * to the bucket header when the bucket is overridden and style it as a
+ * generic icon classed element. For the moment, we'll style the bucket
+ * header specifically with the overriden font style.
+ */
+
+.views-ui-display-tab-setting.overridden,
+.views-ui-display-tab-bucket.overridden > h3 {
+ font-style: italic;
+}
+
+/* @end */
+
+/* @group Attachment bucket drop button */
+
+.views-ui-display-tab-bucket {
+ position: relative;
+}
+
+/* @end */
+
+/* @group Attachment bucket rows
+ *
+ * This is each row within one of the "boxes."
+ */
+
+.views-ui-display-tab-bucket .views-display-setting {
+ color: #666666;
+ font-size: 12px;
+ padding-bottom: 2px;
+}
+
+.views-ui-display-tab-bucket .even {
+ background-color: #f9f9f9;
+}
+
+.views-ui-display-tab-bucket .views-group-text {
+ margin-top: 6px;
+ margin-bottom: 6px;
+}
+
+.views-display-setting .label {
+ margin-right: 3pt; /* LTR */
+}
+
+/* @end */
+
+/* @group Preview
+ *
+ * The preview controls and the preview pane
+ */
+
+#edit-displays-preview-controls .fieldset-wrapper > * {
+ float: left;
+}
+
+#edit-displays-preview-controls .fieldset-wrapper > .form-item {
+ margin-top: 0.3333em;
+}
+
+#edit-displays-preview-controls .form-submit {
+ display: inline-block;
+ margin-right: 1em;
+}
+
+#edit-displays-preview-controls .form-type-textfield {
+ margin-left: 1em;
+ position: relative;
+}
+
+#edit-displays-preview-controls .form-type-textfield label {
+ border-left: 1px solid #999;
+ padding-left: 1em;
+ position: absolute;
+}
+
+#edit-displays-preview-controls .form-type-textfield label:after {
+ content: ":";
+}
+
+#edit-displays-preview-controls .form-type-textfield label ~ * {
+ margin-left: 105px;
+}
+
+/* @end */
+
+/* @group Modal dialog box
+ *
+ * The contents of the popup dialog on the views edit form.
+ */
+
+.views-ui-dialog {
+ font-size: small;
+ padding: 0;
+}
+
+.views-ui-dialog .ui-dialog-titlebar-close {
+ background: url("../images/close.png") no-repeat scroll 6px 3px #F3F4EE;
+ border-color: #aaaaaa;
+ -moz-border-radius: 0 10px 12px 0;
+ -webkit-border-radius: 0 10px 12px 0;
+ border-radius: 0 10px 12px 0;
+ border-style: solid;
+ border-width: 1px 1px 1px 0;
+ -moz-box-shadow: 0 -2px 0 rgba(0, 0, 0, 0.1);
+ -webkit-box-shadow: 0 -2px 0 rgba(0, 0, 0, 0.1);
+ box-shadow: 0 -2px 0 rgba(0, 0, 0, 0.1);
+ height: 22px;
+ right: -28px;
+ top: 0;
+ width: 26px;
+}
+
+.views-ui-dialog .ui-dialog-titlebar-close span {
+ display: none;
+}
+
+.views-filterable-options .form-type-checkbox {
+ border: 1px solid #CCC;
+ padding: 5px 8px;
+ border-top: none;
+}
+
+.views-filterable-options {
+ border-top: 1px solid #CCC;
+}
+
+.views-filterable-options .even .form-type-checkbox {
+ background-color: #F3F4EE;
+}
+
+.filterable-option .form-item {
+ margin-bottom: 0;
+ margin-top: 0;
+}
+
+.views-filterable-options .form-type-checkbox .description {
+ margin-top: 0;
+ margin-bottom: 0;
+}
+
+#views-filterable-options-controls {
+ margin: 1em 0;
+}
+
+#views-filterable-options-controls .form-item {
+ width: 45%;
+ margin-right: 2%; /* LTR */
+}
+
+#views-filterable-options-controls input,
+#views-filterable-options-controls select {
+ width: 200px;
+}
+
+.views-ui-dialog .views-filterable-options {
+ margin-bottom: 10px;
+}
+
+.views-ui-dialog .views-add-form-selected.container-inline {
+ padding-top: 0;
+}
+
+.views-ui-dialog .views-add-form-selected.container-inline > div {
+ display: block;
+}
+
+.views-ui-dialog #edit-selected {
+ margin: 0;
+ padding: 6px 16px;
+}
+
+.views-ui-dialog #views-ajax-title,
+.views-ui-dialog .views-override {
+ background-color: #F3F4EE;
+}
+
+.views-ui-dialog .views-override {
+ padding: 0 13px 8px;
+}
+
+.views-ui-dialog .views-override > * {
+ margin: 0;
+}
+
+.views-ui-dialog #views-ajax-title {
+ font-size: 15px;
+ padding: 8px 13px;
+}
+
+.views-ui-dialog #views-progress-indicator {
+ font-size: 11px;
+ position: absolute;
+ right: 10px; /* LTR */
+ top: 8px;
+}
+
+.views-ui-dialog #views-progress-indicator:before {
+ content: "\003C\00A0";
+}
+
+.views-ui-dialog #views-progress-indicator:after {
+ content: "\00A0\003E";
+}
+
+.views-ui-dialog .scroll {
+ border: 1px solid #CCC;
+ border-width: 1px 0;
+ padding: 8px 13px;
+}
+
+.views-ui-dialog fieldset .item-list {
+ padding-left: 2em;
+}
+
+.views-ui-dialog .form-buttons {
+ background-color: #F3F4EE;
+ padding: 8px 13px;
+}
+.views-ui-dialog .form-buttons input {
+ margin-bottom: 0;
+ margin-right: 0;
+}
+
+/* @end */
+
+/* @group Configure filter criteria */
+
+/* @todo the width and border info could be moved into a more generic class */
+/* @todo Make this a class to be used anywhere there's node types? */
+.form-type-checkboxes #edit-options-value,
+.form-type-checkboxes #edit-options-validate-options-node-types {
+ border-color: #CCCCCC;
+ border-style: solid;
+ border-width: 1px;
+ max-height: 210px;
+ overflow: auto;
+ margin-top: 5px;
+ padding: 0 5px;
+ width: 190px;
+}
+
+/* @end */
+
+/* @group Rearrange filter criteria */
+
+#views-ui-rearrange-filter-form table {
+ border-collapse: collapse;
+}
+
+#views-ui-rearrange-filter-form tr td[rowspan] {
+ border-color: #CDCDCD;
+ border-style: solid;
+ border-width: 0 1px 1px 1px;
+}
+
+#views-ui-rearrange-filter-form tr[id^="views-row"] {
+ border-right: 1px solid #CDCDCD;
+}
+
+#views-ui-rearrange-filter-form tr[id^="views-row"].even td {
+ background-color: #F3F4ED;
+}
+
+#views-ui-rearrange-filter-form .views-group-title {
+ border-top: 1px solid #CDCDCD;
+}
+
+#views-ui-rearrange-filter-form .group-empty {
+ border-bottom: 1px solid #CDCDCD;
+}
+
+/* @end */
+
+/* @group Expose filter form items */
+
+.form-item-options-expose-required,
+.form-item-options-expose-label {
+ margin-bottom: 6px;
+ margin-left: 18px;
+ margin-top: 6px;
+}
+
+/* @end */
+
+/* @group Live preview elements */
+
+#views-preview-wrapper {
+ border: 1px solid #CCC;
+ border-top: 2px solid #CCC;
+ padding-bottom: 12px;
+ padding-top: 12px;
+}
+
+#views-ui-preview-form {
+ margin: 12px;
+}
+
+#views-live-preview {
+ margin: 0 12px;
+}
+
+#views-live-preview .views-query-info {
+ overflow: auto;
+}
+
+/* Intentionally targeting h1 */
+#views-live-preview h1.section-title {
+ color: #818181;
+ display: inline-block;
+ font-size: 13px;
+ font-weight: normal;
+ line-height: 1.6154;
+ margin-bottom: 0;
+ margin-top: 0;
+}
+
+#views-live-preview .view > * {
+ margin-top: 18px;
+}
+
+#views-live-preview .preview-section {
+ border: 1px dashed #DEDEDE;
+ margin: 0 -5px;
+ padding: 3px 5px;
+}
+
+#views-live-preview li.views-row + li.views-row {
+ margin-top: 18px;
+}
+
+/* The div.views-row is intentional and excludes li.views-row, for example */
+#views-live-preview div.views-row + div.views-row {
+ margin-top: 36px;
+}
+
+/* @group Query info table */
+
+.views-query-info table {
+ border-collapse: separate;
+ border-color: #dddddd;
+ border-spacing: 0;
+ margin: 10px 0;
+}
+
+.views-query-info table tr {
+ background-color: #f9f9f9;
+}
+
+.views-query-info table th,
+.views-query-info table td {
+ color: #666666;
+ padding: 4px 10px;
+}
+
+/* @end */
+
+/* @group Grid */
+
+#views-live-preview .views-view-grid th,
+#views-live-preview .views-view-grid td {
+ vertical-align: top;
+}
+
+/* @end */
+
+/* @group HTML list */
+
+#views-live-preview .view-content > .item-list > ul {
+ list-style-position: outside;
+ padding-left: 21px; /* LTR */
+}
+
+/* @end */
+
+/* @end */
+
+/* @group Add/edit argument form */
+
+#edit-options-default-action {
+ width: 300px;
+ float: left;
+}
+
+#edit-options-exception.collapsible {
+ float: right;
+ width: 250px;
+ margin-top: -2px;
+}
+
+/* @end */
+
+/* @group AJAX */
+
+/* Hide the drupal system throbber image */
+.ajax-progress .throbber {
+ display: none;
+}
+
+.ajax-progress-throbber {
+ background-color: #232323;
+ background-image: url("../images/loading-small.gif");
+ background-position: center center;
+ background-repeat: no-repeat;
+ -moz-border-radius: 7px;
+ -webkit-border-radius: 7px;
+ border-radius: 7px;
+ height: 24px;
+ opacity: .9;
+ padding: 4px;
+ width: 24px;
+}
+
+/* @end */
+
+/* @group Drupal
+ *
+ * Overrides to Drupal system CSS
+ */
+div.messages {
+ margin-bottom: 18px;
+}
+
+/* @end */
diff --git a/kolab.org/www/drupal-7.15/sites/all/modules/views/css/views-rtl.css b/kolab.org/www/drupal-7.15/sites/all/modules/views/css/views-rtl.css
new file mode 100644
index 0000000..f804639
--- /dev/null
+++ b/kolab.org/www/drupal-7.15/sites/all/modules/views/css/views-rtl.css
@@ -0,0 +1,5 @@
+
+.views-exposed-form .views-exposed-widget {
+ float: right; /* RTL */
+ padding: .5em 1em 0 0; /* RTL */
+}
diff --git a/kolab.org/www/drupal-7.15/sites/all/modules/views/css/views.css b/kolab.org/www/drupal-7.15/sites/all/modules/views/css/views.css
new file mode 100644
index 0000000..bf96f70
--- /dev/null
+++ b/kolab.org/www/drupal-7.15/sites/all/modules/views/css/views.css
@@ -0,0 +1,42 @@
+.views-exposed-form .views-exposed-widget {
+ float: left; /* LTR */
+ padding: .5em 1em 0 0; /* LTR */
+}
+
+.views-exposed-form .views-exposed-widget .form-submit {
+ margin-top: 1.6em;
+}
+
+.views-exposed-form .form-item,
+.views-exposed-form .form-submit {
+ margin-top: 0;
+ margin-bottom: 0;
+}
+
+.views-exposed-form label {
+ font-weight: bold;
+}
+
+.views-exposed-widgets {
+ margin-bottom: .5em;
+}
+
+/* table style column align */
+.views-align-left {
+ text-align: left;
+}
+.views-align-right {
+ text-align: right;
+}
+.views-align-center {
+ text-align: center;
+}
+
+/* Remove the border on tbody that system puts in */
+.views-view-grid tbody {
+ border-top: none;
+}
+
+.view .progress-disabled {
+ float: none;
+}
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
new file mode 100644
index 0000000..d99ecc4
--- /dev/null
+++ b/kolab.org/www/drupal-7.15/sites/all/modules/views/docs/views.api.php
@@ -0,0 +1,761 @@
+<?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/documentation-standards.txt b/kolab.org/www/drupal-7.15/sites/all/modules/views/documentation-standards.txt
new file mode 100644
index 0000000..6a9c592
--- /dev/null
+++ b/kolab.org/www/drupal-7.15/sites/all/modules/views/documentation-standards.txt
@@ -0,0 +1,5 @@
+- If the interface text is *bolded*, it got strong tags.
+- If it's a button they need to click, that's *bold* too.
+- If the text is not bolded (ex: links to click, options to check), it
+got /italicized/.
+- If it's user-entered text it got 'single quotes'.
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
new file mode 100644
index 0000000..4116d30
--- /dev/null
+++ b/kolab.org/www/drupal-7.15/sites/all/modules/views/drush/views.drush.inc
@@ -0,0 +1,495 @@
+<?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.
+ */
+
+/**
+ * Implement hook_drush_help().
+ */
+function views_drush_help($section) {
+ switch ($section) {
+ case 'drush:views-revert':
+ $help = dt('Reverts views in the drupal installation that have been overriden. ');
+ $help .= dt('If no view names are specified, you will be presented with a list of overridden views to choose from. ');
+ $help .= dt('To revert all views, do not specify any view names, and choose the option "All" from the options presented.');
+ return $help;
+ case 'drush:views-list':
+ return dt('Show a list of available views with information about them.');
+ case 'drush:views-enable':
+ return dt('Enable the specified views. Follow the command with a space delimited list of view names');
+ case 'drush:views-disable':
+ return dt('Disable the specified views. Follow the command with a space delimited list of view names');
+ }
+}
+
+/**
+ * Implement hook_drush_command().
+ */
+function views_drush_command() {
+ $items = array();
+
+ $items['views-revert'] = array(
+ 'callback' => 'views_revert_views',
+ 'drupal dependencies' => array('views'),
+ 'description' => 'Revert overridden views to their default state. Make sure to backup first.',
+ 'arguments' => array(
+ 'views' => 'A space delimited list of view names.',
+ ),
+ 'bootstrap' => DRUSH_BOOTSTRAP_DRUPAL_FULL,
+ 'aliases' => array('vr'),
+ 'examples' => array(
+ 'drush vr archive' => 'Reverts the "archive" view.',
+ 'drush rln archive frontpage' => 'Reverts the "archive" and "frontpage" view.',
+ 'drush vr' => 'Will present you with a list of overridden views to choose from, and an option to revert all overridden views.',
+ ),
+ );
+ $items['views-dev'] = array(
+ 'callback' => 'views_development_settings',
+ 'drupal dependencies' => array('views'),
+ 'description' => 'Setup the views settings to a more developer oriented value..',
+ 'bootstrap' => DRUSH_BOOTSTRAP_DRUPAL_FULL,
+ 'aliases' => array('vd'),
+ );
+
+ $items['views-list'] = array(
+ 'drupal dependencies' => array('views'),
+ 'description' => 'Get a list of all views in the system.',
+ 'bootstrap' => DRUSH_BOOTSTRAP_DRUPAL_FULL,
+ 'aliases' => array('vl'),
+ 'options' => array(
+ 'name' => 'String contained in view\'s name by which filter the results.',
+ 'tags' => 'A comma-separated list of views tags by which to filter the results.',
+ 'status' => 'Status of the views by which to filter the results. Choices: enabled, disabled.',
+ 'type' => 'Type of the views by which to filter the results. Choices: normal, default or overridden.',
+ ),
+ 'examples' => array(
+ 'drush vl' => 'Show a list of all available views.',
+ 'drush vl --name=blog' => 'Show a list of views which names contain "blog".',
+ 'drush vl --tags=tag1,tag2' => 'Show a list of views tagged with "tag1" or "tag2".',
+ 'drush vl --status=enabled' => 'Show a list of enabled views.',
+ 'drush vl --type=overridden' => 'Show a list of overridden views.',
+ ),
+ );
+ $items['views-analyze'] = array(
+ 'drupal dependencies' => array('views', 'views_ui'),
+ 'description' => 'Get a list of all Views analyze warnings',
+ 'bootstrap' => DRUSH_BOOTSTRAP_DRUPAL_FULL,
+ 'aliases' => array('va'),
+ );
+ $items['views-enable'] = array(
+ 'drupal dependencies' => array('views'),
+ 'description' => 'Enable the specified views.',
+ 'arguments' => array(
+ 'views' => 'A space delimited list of view names.',
+ ),
+ 'aliases' => array('ven'),
+ 'examples' => array(
+ 'drush ven frontpage taxonomy_term' => 'Enable the frontpage and taxonomy_term views.',
+ ),
+ );
+ $items['views-disable'] = array(
+ 'drupal dependencies' => array('views'),
+ 'description' => 'Disable the specified views.',
+ 'arguments' => array(
+ 'views' => 'A space delimited list of view names.',
+ ),
+ 'aliases' => array('vdis'),
+ 'examples' => array(
+ 'drush vdis frontpage taxonomy_term' => 'Disable the frontpage and taxonomy_term views.',
+ ),
+ );
+
+ return $items;
+}
+
+/**
+ * Callback function for views-revert command.
+ */
+function views_revert_views() {
+ $views = views_get_all_views();
+ $i = 0;
+ // The provided views names specified in the command.
+ $viewnames = _convert_csv_to_array(func_get_args());
+
+ // Find all overridden views.
+ foreach ($views as $view) {
+ if ($view->disabled) {
+ continue;
+ }
+ if ($view->type == dt('Overridden')) {
+ $overridden[$view->name] = $view->name;
+ }
+ }
+
+ // Return early if there are no overridden views in the system.
+ if (empty($overridden)) {
+ return drush_set_error(dt('There are no overridden views in the system.'));
+ }
+
+ // If the user specified in the command the views to be overridden.
+ if (!empty($viewnames)) {
+ foreach ($viewnames as $key => $viewname) {
+ $is_overridden = key_exists($viewname, $overridden);
+ // Check if the provided view name is in the system
+ if ($viewname && !key_exists($viewname, $views)) {
+ drush_set_error(dt("'@viewname' view is not present in the system.", array('@viewname' => $viewname)));
+ }
+ // Check if the provided view is overridden.
+ elseif (!$is_overridden) {
+ drush_set_error(dt("The view specified '@viewname' is not overridden.", array('@viewname' => $viewname)));
+ }
+ // If the view is overriden, revert it.
+ elseif ($is_overridden){
+ views_revert_view($views[$viewname]);
+ $i++;
+ }
+ // We should never get here but well...
+ else {
+ drush_set_error(dt("The view specified '@viewname' is not provided in code, and thus cannot be reverted.", array('@viewname' => $viewname)));
+ }
+ }
+ }
+
+ // The user did not specify any views in the command, prompt the user
+ else {
+ // list of choices for the user
+ $overridden['all'] = dt('Revert all overridden views'); // add a choice at the end
+ $choice = drush_choice($overridden, 'Enter a number to choose which view to revert.', '!key'); // prompt the user
+
+ if ($choice !== FALSE) {
+ // revert all views option
+ if ($choice == 'all') {
+ $i = views_revert_allviews($views);
+ }
+ // else the user specified a single view
+ else {
+ views_revert_view($views[$choice]);
+ $i++;
+ }
+ }
+
+ }
+
+ // final results output
+ if ($i == 0) {
+ drush_log(dt('No views were reverted.'), 'ok');
+ }
+ else {
+ drush_log(dt('Reverted a total of @count views.', array('@count' => $i)), 'ok');
+ }
+}
+
+/**
+ * Reverts all views
+ * @param $views
+ * All views in the system as provided by views_get_all_views().
+ */
+function views_revert_allviews($views) {
+ $i = 0;
+ foreach ($views as $view) {
+ if ($view->disabled) {
+ continue;
+ }
+
+ if ($view->type == t('Overridden')) {
+ views_revert_view($view);
+ $i++;
+ }
+ }
+ return $i;
+}
+
+/**
+ * Revert a specified view
+ * @param $view
+ * The view object to be reverted
+ *
+ * Checks on wether or not the view is overridden is handled in views_revert_views_revert()
+ * We perform a check here anyway in case someone somehow calls this function on their own...
+ */
+function views_revert_view($view) {
+ // check anyway just in case
+ if ($view->type == t('Overridden')) {
+ // Revert the view.
+ $view->delete();
+ // Clear its cache.
+ ctools_include('object-cache');
+ ctools_object_cache_clear('view', $view->name);
+ // Give feedback.
+ $message = dt("Reverted the view '@viewname'", array('@viewname' => $view->name));
+ drush_log($message, 'success');
+ // Reverted one more view.
+ }
+ else {
+ drush_set_error(dt("The view '@viewname' is not overridden.", array('@viewname' => $view->name)));
+ }
+}
+
+/**
+ * Change the settings to a more developer oriented value.
+ */
+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_button', TRUE);
+ variable_set('views_ui_show_preview_information', TRUE);
+ variable_set('views_ui_show_sql_query', TRUE);
+ variable_set('views_ui_show_performance_statistics', TRUE);
+ variable_set('views_show_additional_queries', TRUE);
+ variable_set('views_devel_output', TRUE);
+ variable_set('views_devel_region', 'message');
+ variable_set('views_ui_display_embed', TRUE);
+ $message = dt("Setup the new views settings.");
+ drush_log($message, 'success');
+}
+
+
+/**
+ * Callback function for views-list command.
+ */
+function drush_views_list() {
+ // Initialize stuf
+ $rows = array();
+ $disabled_views = array();
+ $enabled_views = array();
+ $overridden = 0;
+ $indb = 0;
+ $incode = 0;
+ $disabled = 0;
+ $total = 0;
+
+ $views = views_get_all_views();
+
+ // get the --name option
+ // TODO : take into account the case off a comma-separated list of names
+ $name = drush_get_option_list('name');
+ $with_name = !empty($name) ? TRUE : FALSE;
+
+ // get the --tags option
+ $tags = drush_get_option_list('tags');
+ $with_tags = !empty($tags) ? TRUE : FALSE;
+
+ // get the --status option
+ // store user input appart to reuse it after
+ $status_opt = drush_get_option_list('status');
+ // use the same logic than $view->disabled
+ if (in_array('disabled', $status_opt)) {
+ $status = TRUE;
+ $with_status = TRUE;
+ }
+ elseif (in_array('enabled', $status_opt)) {
+ $status = FALSE;
+ $with_status = TRUE;
+ }
+ else {
+ $status = NULL;
+ // wrong or empty --status option
+ $with_status = FALSE;
+ }
+
+ // get the --type option
+ $type = drush_get_option_list('type');
+ // use the same logic than $view->type
+ $with_type = FALSE;
+ if (in_array('normal', $type) || in_array('default', $type)|| in_array('overridden', $type)) {
+ $with_type = TRUE;
+ }
+
+ // set the table headers
+ $header = array(
+ dt('Machine name'),
+ dt('Description'),
+ dt('Type'),
+ dt('Status'),
+ dt('Tag'),
+ );
+
+ // setup a row for each view
+ foreach($views as $id => $view){
+ // if options were specified, check that first
+ // mismatch push the loop to the next view
+ if ($with_tags && !in_array($view->tag, $tags)) {
+ continue;
+ }
+ if ($with_status && !$view->disabled == $status) {
+ continue;
+ }
+ if ($with_type && strtolower($view->type) !== $type[0]) {
+ continue;
+ }
+ if ($with_name && !stristr($view->name, $name[0])) {
+ continue;
+ }
+
+ $row = array();
+ // each row entry should be in the same order as the header
+ $row[] = $view->name;
+ $row[] = $view->description;
+ $row[] = $view->type;
+ $row[] = $view->disabled ? dt('Disabled') : dt('Enabled');
+ $row[] = $view->tag;
+
+ // place the row in the appropiate array,
+ // so we can have disabled views at the bottom
+ if($view->disabled) {
+ $disabled_views[] = $row;
+ }
+ else{
+ $enabled_views[] = $row;
+ }
+ unset($row);
+
+ // gather some statistics
+ switch($view->type) {
+ case dt('Normal'):
+ $indb++;
+ break;
+
+ case dt('Overridden'):
+ $overridden++;
+ break;
+
+ case dt('Default'):
+ $incode++;
+ break;
+ }
+ $total++;
+ }
+
+ $disabled = count($disabled_views);
+
+ // sort alphabeticaly
+ asort($disabled_views);
+ asort($enabled_views);
+
+ // if options were used
+ $summary = "";
+ if ($with_name || $with_tags || $with_status || $with_type) {
+ $summary = "Views";
+
+ if ($with_name) {
+ $summary .= " named $name[0]";
+ }
+
+ if ($with_tags) {
+ $tags = implode(" or ", $tags);
+ $summary .= " tagged $tags";
+ }
+
+ if ($with_status) {
+ $status_opt = implode("", $status_opt);
+ $summary .= " which status is '$status_opt'";
+ }
+
+ if ($with_type) {
+ $type = ucfirst($type[0]);
+ $summary .= " of type '$type'";
+ }
+ }
+
+ if (!empty($summary)) {
+ drush_print($summary . "\n");
+ }
+
+ // print all rows as a table
+ if ($total > 0) {
+ $rows = array_merge($enabled_views, $disabled_views);
+ // put the headers as first row
+ array_unshift($rows, $header);
+
+ drush_print_table($rows, TRUE);
+ }
+
+ // print the statistics messages
+ drush_print(dt("A total of @total views were found in this Drupal installation:", array('@total' => $total)));
+ drush_print(dt(" @indb views reside only in the database", array('@indb' => $indb )));
+ drush_print(dt(" @over views are overridden", array('@over' => $overridden)));
+ drush_print(dt(" @incode views are in their default state", array('@incode' => $incode)));
+ drush_print(dt(" @dis views are disabled\n", array('@dis' => $disabled)));
+}
+
+function drush_views_analyze() {
+ views_include('analyze');
+ $messages_count = 0;
+ $total = 0;
+
+ foreach (views_get_all_views() as $view_name => $view) {
+ $total++;
+ if ($messages = views_analyze_view($view)) {
+ drush_print($view_name);
+ foreach ($messages as $message) {
+ $messages_count++;
+ drush_print($message['type'] .': '. $message['message'], 2);
+ }
+ }
+ }
+ drush_log(dt('A total of @total views were analyzed and @messages problems were found.', array('@total' => $total, '@messages' => $messages_count)), 'ok');
+}
+
+/**
+ * Enables views
+ */
+function drush_views_enable() {
+ $viewnames = _convert_csv_to_array(func_get_args());
+ // Return early if no view names were specified.
+ if (empty($viewnames)) {
+ return drush_set_error(dt('Please specify a space delimited list of view names to enable'));
+ }
+ _views_drush_changestatus($viewnames, FALSE);
+}
+
+/**
+ * Disables views
+ */
+function drush_views_disable() {
+ $viewnames = _convert_csv_to_array(func_get_args());
+ // Return early if no view names were specified.
+ if (empty($viewnames)) {
+ return drush_set_error(dt('Please specify a space delimited list of view names to disable'));
+ }
+ _views_drush_changestatus($viewnames, TRUE);
+}
+
+/*
+* Helper function to enable / disable views
+ * @param $viewnames: array of viewnames to process
+ * @param $status: TRUE to disable or FALSE to enable the view
+ */
+function _views_drush_changestatus($viewnames = array(), $status = NULL) {
+ if ($status !== NULL && !empty($viewnames)) {
+ $changed = FALSE;
+ $processed = $status ? dt('disabled') : dt('enabled');
+ $views_status = variable_get('views_defaults', array());
+
+ foreach ($viewnames as $key => $viewname) {
+ if ($views_status[$viewname] !== $status) {
+ $views_status[$viewname] = $status;
+ $changed = TRUE;
+ drush_log(dt("The view '!name' has been !processed", array('!name' => $viewname, '!processed' => $processed)), 'success');
+ }
+ else {
+ drush_set_error(dt("The view '!name' is already !processed", array('!name' => $viewname, '!processed' => $processed)));
+ }
+ }
+ // If we made changes to views status, save them and clear caches
+ if ($changed) {
+ 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');
+ }
+ }
+}
+
+/**
+ * Adds a cache clear option for views.
+ */
+function views_drush_cache_clear(&$types) {
+ $types['views'] = 'views_invalidate_cache';
+}
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
new file mode 100644
index 0000000..295e14d
--- /dev/null
+++ b/kolab.org/www/drupal-7.15/sites/all/modules/views/handlers/views_handler_area.inc
@@ -0,0 +1,113 @@
+<?php
+/**
+ * @file
+ * 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.
+ */
+
+class views_handler_area extends views_handler {
+ /**
+ * Get this field's label.
+ */
+ function label() {
+ if (!isset($this->options['label'])) {
+ return $this->ui_name();
+ }
+ return $this->options['label'];
+ }
+
+ function option_definition() {
+ $options = parent::option_definition();
+
+ $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);
+
+ return $options;
+ }
+
+ /**
+ * Provide extra data to the administration form
+ */
+ function admin_summary() {
+ return $this->label();
+ }
+
+ /**
+ * Default options form that provides the label widget that all fields
+ * should have.
+ */
+ function options_form(&$form, &$form_state) {
+ parent::options_form($form, $form_state);
+ $form['label'] = array(
+ '#type' => 'textfield',
+ '#title' => t('Label'),
+ '#default_value' => isset($this->options['label']) ? $this->options['label'] : '',
+ '#description' => t('The label for this area that will be displayed only administratively.'),
+ );
+
+ if ($form_state['type'] != 'empty') {
+ $form['empty'] = array(
+ '#type' => 'checkbox',
+ '#title' => t('Display even if view has no result'),
+ '#default_value' => isset($this->options['empty']) ? $this->options['empty'] : 0,
+ );
+ }
+ }
+
+ /**
+ * Don't run a query
+ */
+ function query() { }
+
+ /**
+ * Render the area
+ */
+ function render($empty = FALSE) {
+ return '';
+ }
+
+ /**
+ * Area handlers shouldn't have groupby.
+ */
+ function use_group_by() {
+ return FALSE;
+ }
+}
+
+/**
+ * A special handler to take the place of missing or broken handlers.
+ *
+ * @ingroup views_area_handlers
+ */
+class views_handler_area_broken extends views_handler_area {
+ function ui_name($short = FALSE) {
+ return t('Broken/missing handler');
+ }
+
+ function ensure_my_table() { /* No table to ensure! */ }
+ function query($group_by = FALSE) { /* No query to run */ }
+ function render($empty = FALSE) { return ''; }
+ function options_form(&$form, &$form_state) {
+ $form['markup'] = array(
+ '#prefix' => '<div class="form-item description">',
+ '#value' => t('The handler for this item is broken or missing and cannot be used. If a module provided the handler and was disabled, re-enabling the module may restore it. Otherwise, you should probably delete this item.'),
+ );
+ }
+
+ /**
+ * Determine if the handler is considered 'broken'
+ */
+ function broken() { return TRUE; }
+}
+
+/**
+ * @}
+ */
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
new file mode 100644
index 0000000..a52aa8c
--- /dev/null
+++ b/kolab.org/www/drupal-7.15/sites/all/modules/views/handlers/views_handler_area_result.inc
@@ -0,0 +1,93 @@
+<?php
+
+/**
+ * @file
+ * Contains views_handler_area_result handler.
+ */
+
+/**
+ * Views area handler to display some configurable result summary.
+ *
+ * @ingroup views_area_handlers Views' area handlers
+ */
+class views_handler_area_result extends views_handler_area {
+
+ function option_definition() {
+ $options = parent::option_definition();
+
+ $options['content'] = array(
+ 'default' => 'Displaying @start - @end of @total',
+ 'translatable' => TRUE,
+ );
+
+ return $options;
+ }
+
+ function options_form(&$form, &$form_state) {
+ parent::options_form($form, $form_state);
+ $variables = array(
+ 'items' => array(
+ '@start -- the initial record number in the set',
+ '@end -- the last record number in the set',
+ '@total -- the total records in the set',
+ '@name -- the human-readable name of the view',
+ '@per_page -- the number of items per page',
+ '@current_page -- the current page number',
+ '@page_count -- the total page count',
+ ),
+ );
+ $list = theme('item_list', $variables);
+ $form['content'] = array(
+ '#title' => t('Display'),
+ '#type' => 'textarea',
+ '#rows' => 3,
+ '#default_value' => $this->options['content'],
+ '#description' => t('You may use HTML code in this field. The following tokens are supported:') . $list,
+ );
+ }
+
+
+ /**
+ * Find out the information to render.
+ */
+ function render($empty = FALSE) {
+ // Must have options and does not work on summaries.
+ if (!isset($this->options['content']) || $this->view->plugin_name == 'default_summary') {
+ return;
+ }
+ $output = '';
+ $format = $this->options['content'];
+ // Calculate the page totals.
+ $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;
+ $name = check_plain($this->view->human_name);
+ if ($per_page === 0) {
+ $page_count = 1;
+ $start = 1;
+ $end = $total;
+ }
+ else {
+ $page_count = (int) ceil($total / $per_page);
+ $total_count = $current_page * $per_page;
+ if ($total_count > $total) {
+ $total_count = $total;
+ }
+ $start = ($current_page - 1) * $per_page + 1;
+ $end = $total_count;
+ }
+ // Get the search information.
+ $items = array('start', 'end', 'total', 'name', 'per_page', 'current_page', 'page_count');
+ $replacements = array();
+ foreach ($items as $item) {
+ $replacements["@$item"] = ${$item};
+ }
+ // Send the output.
+ if (!empty($total)) {
+ $output .= filter_xss_admin(str_replace(array_keys($replacements), array_values($replacements), $format));
+ }
+ 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
new file mode 100644
index 0000000..2b9adb3
--- /dev/null
+++ b/kolab.org/www/drupal-7.15/sites/all/modules/views/handlers/views_handler_area_text.inc
@@ -0,0 +1,110 @@
+<?php
+
+/**
+ * @file
+ * Contains views_handler_area_text handler.
+ */
+
+/**
+ * Views area text handler.
+ * @ingroup views_area_handlers 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);
+ return $options;
+ }
+
+ function options_form(&$form, &$form_state) {
+ parent::options_form($form, $form_state);
+
+ $form['content'] = array(
+ '#type' => 'text_format',
+ '#default_value' => $this->options['content'],
+ '#rows' => 6,
+ '#format' => isset($this->options['format']) ? $this->options['format'] : filter_default_format(),
+ '#wysiwyg' => FALSE,
+ );
+
+
+ $form['tokenize'] = array(
+ '#type' => 'checkbox',
+ '#title' => t('Use replacement tokens from the first row'),
+ '#default_value' => $this->options['tokenize'],
+ );
+
+ // Get a list of the available fields and arguments for token replacement.
+ $options = array();
+ foreach ($this->view->display_handler->get_handlers('field') as $field => $handler) {
+ $options[t('Fields')]["[$field]"] = $handler->ui_name();
+ }
+
+ $count = 0; // This lets us prepare the key as we want it printed.
+ foreach ($this->view->display_handler->get_handlers('argument') as $arg => $handler) {
+ $options[t('Arguments')]['%' . ++$count] = t('@argument title', array('@argument' => $handler->ui_name()));
+ $options[t('Arguments')]['!' . $count] = t('@argument input', array('@argument' => $handler->ui_name()));
+ }
+
+ 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>');
+ foreach (array_keys($options) as $type) {
+ if (!empty($options[$type])) {
+ $items = array();
+ foreach ($options[$type] as $key => $value) {
+ $items[] = $key . ' == ' . $value;
+ }
+ $output .= theme('item_list',
+ array(
+ 'items' => $items,
+ 'type' => $type
+ ));
+ }
+ }
+
+ $form['token_help'] = array(
+ '#type' => 'fieldset',
+ '#title' => t('Replacement patterns'),
+ '#collapsible' => TRUE,
+ '#collapsed' => TRUE,
+ '#value' => $output,
+ '#id' => 'edit-options-token-help',
+ '#dependency' => array(
+ 'edit-options-tokenize' => array(1),
+ ),
+ '#prefix' => '<div>',
+ '#suffix' => '</div>',
+ );
+ }
+ }
+
+ function options_submit(&$form, &$form_state) {
+ $form_state['values']['options']['format'] = $form_state['values']['options']['content']['format'];
+ $form_state['values']['options']['content'] = $form_state['values']['options']['content']['value'];
+ parent::options_submit($form, $form_state);
+ }
+
+ function render($empty = FALSE) {
+ $format = isset($this->options['format']) ? $this->options['format'] : filter_default_format();
+ if (!$empty || !empty($this->options['empty'])) {
+ return $this->render_textarea($this->options['content'], $format);
+ }
+ return '';
+ }
+
+ /**
+ * Render a text area, using the proper format.
+ */
+ function render_textarea($value, $format) {
+ if ($value) {
+ if ($this->options['tokenize']) {
+ $value = $this->view->style_plugin->tokenize_value($value, 0);
+ }
+ return check_markup($value, $format, '', FALSE);
+ }
+ }
+
+}
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
new file mode 100644
index 0000000..b8fad3f
--- /dev/null
+++ b/kolab.org/www/drupal-7.15/sites/all/modules/views/handlers/views_handler_area_view.inc
@@ -0,0 +1,82 @@
+<?php
+
+/**
+ * @file
+ * Contains views_handler_area_view handler.
+ */
+/**
+ * Views area handlers. Insert a view inside of an area.
+ *
+ * @ingroup views_area_handlers
+ */
+class views_handler_area_view extends views_handler_area {
+
+ function option_definition() {
+ $options = parent::option_definition();
+
+ $options['view_to_insert'] = array('default' => '');
+ $options['inherit_arguments'] = array('default' => FALSE, 'boolean' => TRUE);
+ return $options;
+ }
+
+ /**
+ * Default options form that provides the label widget that all fields
+ * should have.
+ */
+ function options_form(&$form, &$form_state) {
+ parent::options_form($form, $form_state);
+
+ $view_display = $this->view->name . ':' . $this->view->current_display;
+
+ $options = array('' => t('-Select-'));
+ $options += views_get_views_as_options(FALSE, 'all', $view_display);
+ $form['view_to_insert'] = array(
+ '#type' => 'select',
+ '#title' => t('View to insert'),
+ '#default_value' => $this->options['view_to_insert'],
+ '#description' => t('The view to insert into this area.'),
+ '#options' => $options,
+ );
+
+ $form['inherit_arguments'] = array(
+ '#type' => 'checkbox',
+ '#title' => t('Inherit contextual filters'),
+ '#default_value' => $this->options['inherit_arguments'],
+ '#description' => t('If checked, this view will receive the same contextual filters as its parent.'),
+ );
+ }
+
+ /**
+ * Render the area
+ */
+ function render($empty = FALSE) {
+ if (!empty($this->options['view_to_insert'])) {
+ list($view_name, $display_id) = explode(':', $this->options['view_to_insert']);
+
+ $view = views_get_view($view_name);
+ if (empty($view) || !$view->access($display_id)) {
+ return;
+ }
+ $view->set_display($display_id);
+
+ // Avoid recursion
+ $view->parent_views += $this->view->parent_views;
+ $view->parent_views[] = "$view_name:$display_id";
+
+ // Check if the view is part of the parent views of this view
+ $search = "$view_name:$display_id";
+ if (in_array($search, $this->view->parent_views)) {
+ drupal_set_message(t("Recursion detected in view @view display @display.", array('@view' => $view_name, '@display' => $display_id)), 'error');
+ }
+ else {
+ if (!empty($this->options['inherit_arguments']) && !empty($this->view->args)) {
+ return $view->preview($display_id, $this->view->args);
+ }
+ else {
+ return $view->preview($display_id);
+ }
+ }
+ }
+ return '';
+ }
+}
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
new file mode 100644
index 0000000..72c07e2
--- /dev/null
+++ b/kolab.org/www/drupal-7.15/sites/all/modules/views/handlers/views_handler_argument.inc
@@ -0,0 +1,1212 @@
+<?php
+
+/**
+ * @defgroup views_argument_handlers Handlers for arguments
+ * @{
+ */
+
+/**
+ * Base class for arguments.
+ *
+ * The basic argument works for very simple arguments such as nid and uid
+ *
+ * Definition terms for this handler:
+ * - name field: The field to use for the name to use in the summary, which is
+ * the displayed output. For example, for the node: nid argument,
+ * the argument itself is the nid, but node.title is displayed.
+ * - name table: The table to use for the name, should it not be in the same
+ * table as the argument.
+ * - empty field name: For arguments that can have no value, such as taxonomy
+ * which can have "no term", this is the string which
+ * will be displayed for this lack of value. Be sure to use
+ * t().
+ * - validate type: A little used string to allow an argument to restrict
+ * which validator is available to just one. Use the
+ * validator ID. This probably should not be used at all,
+ * and may disappear or change.
+ * - numeric: If set to TRUE this field is numeric and will use %d instead of
+ * %s in queries.
+ *
+ * @ingroup views_argument_handlers
+ */
+class views_handler_argument extends views_handler {
+ var $validator = NULL;
+ var $argument = NULL;
+ var $value = NULL;
+
+ /**
+ * The table to use for the name, should it not be in the same table as the argument.
+ * @var string
+ */
+ var $name_table;
+
+ /**
+ * The field to use for the name to use in the summary, which is
+ * the displayed output. For example, for the node: nid argument,
+ * the argument itself is the nid, but node.title is displayed.
+ * @var string
+ */
+ var $name_field;
+
+ /**
+ * Constructor
+ */
+ function construct() {
+ parent::construct();
+
+ if (!empty($this->definition['name field'])) {
+ $this->name_field = $this->definition['name field'];
+ }
+ if (!empty($this->definition['name table'])) {
+ $this->name_table = $this->definition['name table'];
+ }
+ }
+
+ function init(&$view, &$options) {
+ parent::init($view, $options);
+
+ // Compatibility: The new UI changed several settings.
+ if (!empty($options['wildcard']) && !isset($options['exception']['value'])) {
+ $this->options['exception']['value'] = $options['wildcard'];
+ }
+ if (!empty($options['wildcard_substitution']) && !isset($options['exception']['title'])) {
+ // Enable the checkbox if the title is filled in.
+ $this->options['exception']['title_enable'] = 1;
+ $this->options['exception']['title'] = $options['wildcard_substitution'];
+ }
+
+ if (!isset($options['summary']['format']) && !empty($options['style_plugin'])) {
+ $this->options['summary']['format'] = $options['style_plugin'];
+ }
+
+ 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';
+ $this->options['summary']['number_of_records'] = 0;
+ $this->options['summary_options'] = $options['style_options'];
+ }
+ elseif (!isset($options['summary']['sort_order']) && !empty($options['default_action']) && $options['default_action'] == 'summary desc') {
+ $this->options['default_action'] = 'summary';
+ $this->options['summary']['sort_order'] = 'desc';
+ $this->options['summary']['number_of_records'] = 0;
+ $this->options['summary_options'] = $options['style_options'];
+ }
+ elseif (!isset($options['summary']['sort_order']) && !empty($options['default_action']) && $options['default_action'] == 'summary asc by count') {
+ $this->options['default_action'] = 'summary';
+ $this->options['summary']['sort_order'] = 'asc';
+ $this->options['summary']['number_of_records'] = 1;
+ $this->options['summary_options'] = $options['style_options'];
+ }
+ elseif (!isset($options['summary']['sort_order']) && !empty($options['default_action']) && $options['default_action'] == 'summary desc by count') {
+ $this->options['default_action'] = 'summary';
+ $this->options['summary']['sort_order'] = 'desc';
+ $this->options['summary']['number_of_records'] = 1;
+ $this->options['summary_options'] = $options['style_options'];
+ }
+
+ if (!empty($options['title']) && !isset($options['title_enable'])) {
+ $this->options['title_enable'] = 1;
+ }
+ if (!empty($options['breadcrumb']) && !isset($options['breadcrumb_enable'])) {
+ $this->options['breadcrumb_enable'] = 1;
+ }
+
+ if (!empty($options['validate_type']) && !isset($options['validate']['type'])) {
+ $this->options['validate']['type'] = $options['validate_type'];
+ $this->options['specify_validation'] = 1;
+ }
+ if (!empty($options['validate_fail']) && !isset($options['validate']['fail'])) {
+ $this->options['validate']['fail'] = $options['validate_fail'];
+ $this->options['specify_validation'] = 1;
+ }
+ }
+
+ /**
+ * Give an argument the opportunity to modify the breadcrumb, if it wants.
+ * This only gets called on displays where a breadcrumb is actually used.
+ *
+ * The breadcrumb will be in the form of an array, with the keys being
+ * the path and the value being the already sanitized title of the path.
+ */
+ function set_breadcrumb(&$breadcrumb) { }
+
+ /**
+ * Determine if the argument can generate a breadcrumb
+ *
+ * @return TRUE/FALSE
+ */
+ function uses_breadcrumb() {
+ $info = $this->default_actions($this->options['default_action']);
+ return !empty($info['breadcrumb']);
+ }
+
+ function is_exception($arg = NULL) {
+ if (!isset($arg)) {
+ $arg = isset($this->argument) ? $this->argument : NULL;
+ }
+ return !empty($this->options['exception']['value']) && $this->options['exception']['value'] === $arg;
+ }
+
+ function exception_title() {
+ // If title overriding is off for the exception, return the normal title.
+ if (empty($this->options['exception']['title_enable'])) {
+ return $this->get_title();
+ }
+ return $this->options['exception']['title'];
+ }
+
+ /**
+ * Determine if the argument needs a style plugin.
+ *
+ * @return TRUE/FALSE
+ */
+ function needs_style_plugin() {
+ $info = $this->default_actions($this->options['default_action']);
+ $validate_info = $this->default_actions($this->options['validate']['fail']);
+ return !empty($info['style plugin']) || !empty($validate_info['style plugin']);
+ }
+
+ function option_definition() {
+ $options = parent::option_definition();
+
+ $options['default_action'] = array('default' => 'ignore');
+ $options['exception'] = array(
+ 'contains' => array(
+ 'value' => array('default' => 'all'),
+ 'title_enable' => array('default' => 0),
+ 'title' => array('default' => t('All'), 'translatable' => TRUE),
+ ),
+ );
+ $options['title_enable'] = array('default' => 0);
+ $options['title'] = array('default' => '', 'translatable' => TRUE);
+ $options['breadcrumb_enable'] = array('default' => 0);
+ $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['summary_options'] = array('default' => array(), 'export' => FALSE);
+ $options['summary'] = array(
+ 'contains' => array(
+ 'sort_order' => array('default' => 'asc'),
+ 'number_of_records' => array('default' => 0),
+ 'format' => array('default' => 'default_summary', 'export' => 'export_summary'),
+ ),
+ );
+ $options['specify_validation'] = array('default' => 0);
+ $options['validate'] = array(
+ 'contains' => array(
+ 'type' => array('default' => 'none', 'export' => 'export_validation'),
+ 'fail' => array('default' => 'not found'),
+ ),
+ );
+ $options['validate_options'] = array('default' => array(), 'export' => FALSE);
+
+ return $options;
+ }
+
+ function options_form(&$form, &$form_state) {
+ parent::options_form($form, $form_state);
+
+ $argument_text = $this->view->display_handler->get_argument_text();
+
+ $form['#pre_render'][] = 'views_ui_pre_render_move_argument_options';
+
+ $form['description'] = array(
+ '#markup' => $argument_text['description'],
+ '#theme_wrappers' => array('container'),
+ '#attributes' => array('class' => array('description')),
+ );
+
+ $form['no_argument'] = array(
+ '#type' => 'fieldset',
+ '#title' => $argument_text['filter value not present'],
+ );
+ // Everything in the fieldset is floated, so the last element needs to
+ // clear those floats.
+ $form['no_argument']['clearfix'] = array(
+ '#weight' => 1000,
+ '#markup' => '<div class="clearfix"></div>',
+ );
+ $form['default_action'] = array(
+ '#type' => 'radios',
+ '#process' => array('views_ui_process_container_radios'),
+ '#default_value' => $this->options['default_action'],
+ '#fieldset' => 'no_argument',
+ );
+
+ $form['exception'] = array(
+ '#type' => 'fieldset',
+ '#title' => t('Exceptions'),
+ '#collapsible' => TRUE,
+ '#collapsed' => TRUE,
+ '#fieldset' => 'no_argument',
+ );
+ $form['exception']['value'] = array(
+ '#type' => 'textfield',
+ '#title' => t('Exception value'),
+ '#size' => 20,
+ '#default_value' => $this->options['exception']['value'],
+ '#description' => t('If this value is received, the filter will be ignored; i.e, "all values"'),
+ );
+ $form['exception']['title_enable'] = array(
+ '#type' => 'checkbox',
+ '#title' => t('Override title'),
+ '#default_value' => $this->options['exception']['title_enable'],
+ );
+ $form['exception']['title'] = array(
+ '#type' => 'textfield',
+ '#title' => t('Override title'),
+ '#title_display' => 'invisible',
+ '#size' => 20,
+ '#default_value' => $this->options['exception']['title'],
+ '#description' => t('Override the view and other argument titles. Use "%1" for the first argument, "%2" for the second, etc.'),
+ '#dependency' => array(
+ 'edit-options-exception-title-enable' => array('1'),
+ ),
+ );
+
+ $options = array();
+ $defaults = $this->default_actions();
+ $validate_options = array();
+ foreach ($defaults as $id => $info) {
+ $options[$id] = $info['title'];
+ if (empty($info['default only'])) {
+ $validate_options[$id] = $info['title'];
+ }
+ if (!empty($info['form method'])) {
+ $this->{$info['form method']}($form, $form_state);
+ }
+ }
+ $form['default_action']['#options'] = $options;
+
+ $form['argument_present'] = array(
+ '#type' => 'fieldset',
+ '#title' => $argument_text['filter value present'],
+ );
+ $form['title_enable'] = array(
+ '#type' => 'checkbox',
+ '#title' => t('Override title'),
+ '#default_value' => $this->options['title_enable'],
+ '#fieldset' => 'argument_present',
+ );
+ $form['title'] = array(
+ '#type' => 'textfield',
+ '#title' => t('Provide title'),
+ '#title_display' => 'invisible',
+ '#default_value' => $this->options['title'],
+ '#description' => t('Override the view and other argument titles. Use "%1" for the first argument, "%2" for the second, etc.'),
+ '#dependency' => array(
+ 'edit-options-title-enable' => array('1'),
+ ),
+ '#fieldset' => 'argument_present',
+ );
+
+ $form['breadcrumb_enable'] = array(
+ '#type' => 'checkbox',
+ '#title' => t('Override breadcrumb'),
+ '#default_value' => $this->options['breadcrumb_enable'],
+ '#fieldset' => 'argument_present',
+ );
+ $form['breadcrumb'] = array(
+ '#type' => 'textfield',
+ '#title' => t('Provide breadcrumb'),
+ '#title_display' => 'invisible',
+ '#default_value' => $this->options['breadcrumb'],
+ '#description' => t('Enter a breadcrumb name you would like to use. See "Title" for percent substitutions.'),
+ '#dependency' => array(
+ 'edit-options-breadcrumb-enable' => array('1'),
+ ),
+ '#fieldset' => 'argument_present',
+ );
+
+ $form['specify_validation'] = array(
+ '#type' => 'checkbox',
+ '#title' => t('Specify validation criteria'),
+ '#default_value' => $this->options['specify_validation'],
+ '#fieldset' => 'argument_present',
+ );
+
+ $form['validate'] = array(
+ '#type' => 'container',
+ '#fieldset' => 'argument_present',
+ );
+ // @todo The mockup wanted to use "Validate using" here, but it doesn't
+ // work well with many options (they'd need to be changed as well)
+ $form['validate']['type'] = array(
+ '#type' => 'select',
+ '#title' => t('Validator'),
+ '#default_value' => $this->options['validate']['type'],
+ '#dependency' => array(
+ 'edit-options-specify-validation' => array('1'),
+ ),
+ );
+
+ $validate_types = array('none' => t('- Basic validation -'));
+ $plugins = views_fetch_plugin_data('argument validator');
+ foreach ($plugins as $id => $info) {
+ if (!empty($info['no ui'])) {
+ continue;
+ }
+
+ $valid = TRUE;
+ if (!empty($info['type'])) {
+ $valid = FALSE;
+ if (empty($this->definition['validate type'])) {
+ continue;
+ }
+ foreach ((array) $info['type'] as $type) {
+ if ($type == $this->definition['validate type']) {
+ $valid = TRUE;
+ break;
+ }
+ }
+ }
+
+ // If we decide this validator is ok, add it to the list.
+ if ($valid) {
+ $plugin = $this->get_plugin('argument validator', $id);
+ if ($plugin) {
+ if ($plugin->access() || $this->options['validate']['type'] == $id) {
+ $form['validate']['options'][$id] = array(
+ '#prefix' => '<div id="edit-options-validate-options-' . $id . '-wrapper">',
+ '#suffix' => '</div>',
+ '#type' => 'item',
+ '#input' => TRUE, // trick it into checking input to make #process run
+ '#dependency' => array(
+ 'edit-options-specify-validation' => array('1'),
+ 'edit-options-validate-type' => array($id),
+ ),
+ '#dependency_count' => 2,
+ '#id' => 'edit-options-validate-options-' . $id,
+ );
+ $plugin->options_form($form['validate']['options'][$id], $form_state);
+ $validate_types[$id] = $info['title'];
+ }
+ }
+ }
+ }
+
+ asort($validate_types);
+ $form['validate']['type']['#options'] = $validate_types;
+
+ $form['validate']['fail'] = array(
+ '#type' => 'select',
+ '#title' => t('Action to take if filter value does not validate'),
+ '#default_value' => $this->options['validate']['fail'],
+ '#options' => $validate_options,
+ '#dependency' => array(
+ 'edit-options-specify-validation' => array('1'),
+ ),
+ '#fieldset' => 'argument_present',
+ );
+ }
+
+ function options_validate(&$form, &$form_state) {
+ if (empty($form_state['values']['options'])) {
+ return;
+ }
+
+ // Let the plugins do validation.
+ $default_id = $form_state['values']['options']['default_argument_type'];
+ $plugin = $this->get_plugin('argument default', $default_id);
+ if ($plugin) {
+ $plugin->options_validate($form['argument_default'][$default_id], $form_state, $form_state['values']['options']['argument_default'][$default_id]);
+ }
+
+ // summary plugin
+ $summary_id = $form_state['values']['options']['summary']['format'];
+ $plugin = $this->get_plugin('style', $summary_id);
+ if ($plugin) {
+ $plugin->options_validate($form['summary']['options'][$summary_id], $form_state, $form_state['values']['options']['summary']['options'][$summary_id]);
+ }
+
+ $validate_id = $form_state['values']['options']['validate']['type'];
+ $plugin = $this->get_plugin('argument validator', $validate_id);
+ if ($plugin) {
+ $plugin->options_validate($form['validate']['options'][$default_id], $form_state, $form_state['values']['options']['validate']['options'][$validate_id]);
+ }
+
+ }
+
+ function options_submit(&$form, &$form_state) {
+ if (empty($form_state['values']['options'])) {
+ return;
+ }
+
+ // Let the plugins make submit modifications if necessary.
+ $default_id = $form_state['values']['options']['default_argument_type'];
+ $plugin = $this->get_plugin('argument default', $default_id);
+ if ($plugin) {
+ $options = &$form_state['values']['options']['argument_default'][$default_id];
+ $plugin->options_submit($form['argument_default'][$default_id], $form_state, $options);
+ // Copy the now submitted options to their final resting place so they get saved.
+ $form_state['values']['options']['default_argument_options'] = $options;
+ }
+
+ // summary plugin
+ $summary_id = $form_state['values']['options']['summary']['format'];
+ $plugin = $this->get_plugin('style', $summary_id);
+ if ($plugin) {
+ $options = &$form_state['values']['options']['summary']['options'][$summary_id];
+ $plugin->options_submit($form['summary']['options'][$summary_id], $form_state, $options);
+ // Copy the now submitted options to their final resting place so they get saved.
+ $form_state['values']['options']['summary_options'] = $options;
+ }
+
+ $validate_id = $form_state['values']['options']['validate']['type'];
+ $plugin = $this->get_plugin('argument validator', $validate_id);
+ if ($plugin) {
+ $options = &$form_state['values']['options']['validate']['options'][$validate_id];
+ $plugin->options_submit($form['validate']['options'][$validate_id], $form_state, $options);
+ // Copy the now submitted options to their final resting place so they get saved.
+ $form_state['values']['options']['validate_options'] = $options;
+ }
+
+ // Clear out the content of title if it's not enabled.
+ $options =& $form_state['values']['options'];
+ if (empty($options['title_enable'])) {
+ $options['title'] = '';
+ }
+ }
+
+ /**
+ * Provide a list of default behaviors for this argument if the argument
+ * is not present.
+ *
+ * Override this method to provide additional (or fewer) default behaviors.
+ */
+ function default_actions($which = NULL) {
+ $defaults = array(
+ 'ignore' => array(
+ 'title' => t('Display all results for the specified field'),
+ 'method' => 'default_ignore',
+ 'breadcrumb' => TRUE, // generate a breadcrumb to here
+ ),
+ 'default' => array(
+ 'title' => t('Provide default value'),
+ 'method' => 'default_default',
+ 'form method' => 'default_argument_form',
+ 'has default argument' => TRUE,
+ 'default only' => TRUE, // this can only be used for missing argument, not validation failure
+ 'breadcrumb' => TRUE, // generate a breadcrumb to here
+ ),
+ 'not found' => array(
+ 'title' => t('Hide view'),
+ 'method' => 'default_not_found',
+ 'hard fail' => TRUE, // This is a hard fail condition
+ ),
+ 'summary' => array(
+ 'title' => t('Display a summary'),
+ 'method' => 'default_summary',
+ 'form method' => 'default_summary_form',
+ 'style plugin' => TRUE,
+ 'breadcrumb' => TRUE, // generate a breadcrumb to here
+ ),
+ 'empty' => array(
+ 'title' => t('Display contents of "No results found"'),
+ 'method' => 'default_empty',
+ 'breadcrumb' => TRUE, // generate a breadcrumb to here
+ ),
+ );
+
+ if ($this->view->display_handler->has_path()) {
+ $defaults['not found']['title'] = t('Show "Page not found"');
+ }
+
+ if ($which) {
+ if (!empty($defaults[$which])) {
+ return $defaults[$which];
+ }
+ }
+ else {
+ return $defaults;
+ }
+ }
+
+ /**
+ * Provide a form for selecting the default argument when the
+ * default action is set to provide default argument.
+ */
+ function default_argument_form(&$form, &$form_state) {
+ $plugins = views_fetch_plugin_data('argument default');
+ $options = array();
+
+ $form['default_argument_skip_url'] = array(
+ '#type' => 'checkbox',
+ '#title' => t('Skip default argument for view URL'),
+ '#default_value' => $this->options['default_argument_skip_url'],
+ '#description' => t('Select whether to include this default argument when constructing the URL for this view. Skipping default arguments is useful e.g. in the case of feeds.')
+ );
+
+ $form['default_argument_type'] = array(
+ '#prefix' => '<div id="edit-options-default-argument-type-wrapper">',
+ '#suffix' => '</div>',
+ '#type' => 'select',
+ '#id' => 'edit-options-default-argument-type',
+ '#title' => t('Type'),
+ '#default_value' => $this->options['default_argument_type'],
+
+ '#dependency' => array('radio:options[default_action]' => array('default')),
+ // Views custom key, moves this element to the appropriate container
+ // under the radio button.
+ '#argument_option' => 'default',
+ );
+
+ foreach ($plugins as $id => $info) {
+ if (!empty($info['no ui'])) {
+ continue;
+ }
+ $plugin = $this->get_plugin('argument default', $id);
+ if ($plugin) {
+ if ($plugin->access() || $this->options['default_argument_type'] == $id) {
+ $form['argument_default']['#argument_option'] = 'default';
+ $form['argument_default'][$id] = array(
+ '#prefix' => '<div id="edit-options-argument-default-options-' . $id . '-wrapper">',
+ '#suffix' => '</div>',
+ '#id' => 'edit-options-argument-default-options-' . $id,
+ '#type' => 'item',
+ '#dependency' => array(
+ 'radio:options[default_action]' => array('default'),
+ 'edit-options-default-argument-type' => array($id)
+ ),
+ '#dependency_count' => 2,
+ );
+ $options[$id] = $info['title'];
+ $plugin->options_form($form['argument_default'][$id], $form_state);
+ }
+ }
+ }
+
+ asort($options);
+ $form['default_argument_type']['#options'] = $options;
+ }
+
+ /**
+ * Provide a form for selecting further summary options when the
+ * default action is set to display one.
+ */
+ function default_summary_form(&$form, &$form_state) {
+ $style_plugins = views_fetch_plugin_data('style');
+ $summary_plugins = array();
+ $format_options = array();
+ foreach ($style_plugins as $key => $plugin) {
+ if (isset($plugin['type']) && $plugin['type'] == 'summary') {
+ $summary_plugins[$key] = $plugin;
+ $format_options[$key] = $plugin['title'];
+ }
+ }
+
+ $form['summary'] = array(
+ // Views custom key, moves this element to the appropriate container
+ // under the radio button.
+ '#argument_option' => 'summary',
+ );
+ $form['summary']['sort_order'] = array(
+ '#type' => 'radios',
+ '#title' => t('Sort order'),
+ '#options' => array('asc' => t('Ascending'), 'desc' => t('Descending')),
+ '#default_value' => $this->options['summary']['sort_order'],
+ '#dependency' => array('radio:options[default_action]' => array('summary')),
+ );
+ $form['summary']['number_of_records'] = array(
+ '#type' => 'radios',
+ '#title' => t('Sort by'),
+ '#default_value' => $this->options['summary']['number_of_records'],
+ '#options' => array(
+ 0 => $this->get_sort_name(),
+ 1 => t('Number of records')
+ ),
+ '#dependency' => array('radio:options[default_action]' => array('summary')),
+ );
+
+ $form['summary']['format'] = array(
+ '#type' => 'radios',
+ '#title' => t('Format'),
+ '#options' => $format_options,
+ '#default_value' => $this->options['summary']['format'],
+ '#dependency' => array('radio:options[default_action]' => array('summary')),
+ );
+
+ foreach ($summary_plugins as $id => $info) {
+ if (empty($info['uses options'])) {
+ continue;
+ }
+ $plugin = $this->get_plugin('style', $id);
+ if ($plugin) {
+ $form['summary']['options'][$id] = array(
+ '#prefix' => '<div id="edit-options-summary-options-' . $id . '-wrapper">',
+ '#suffix' => '</div>',
+ '#id' => 'edit-options-summary-options-' . $id,
+ '#type' => 'item',
+ '#input' => TRUE, // trick it into checking input to make #process run
+ '#dependency' => array(
+ 'radio:options[default_action]' => array('summary'),
+ 'radio:options[summary][format]' => array($id),
+ ),
+ '#dependency_count' => 2,
+ );
+ $options[$id] = $info['title'];
+ $plugin->options_form($form['summary']['options'][$id], $form_state);
+ }
+ }
+ }
+
+ /**
+ * Handle the default action, which means our argument wasn't present.
+ *
+ * Override this method only with extreme care.
+ *
+ * @return
+ * A boolean value; if TRUE, continue building this view. If FALSE,
+ * building the view will be aborted here.
+ */
+ function default_action($info = NULL) {
+ if (!isset($info)) {
+ $info = $this->default_actions($this->options['default_action']);
+ }
+
+ if (!$info) {
+ return FALSE;
+ }
+
+ if (!empty($info['method args'])) {
+ return call_user_func_array(array(&$this, $info['method']), $info['method args']);
+ }
+ else {
+ return $this->{$info['method']}();
+ }
+ }
+
+ /**
+ * How to act if validation failes
+ */
+ function validate_fail() {
+ $info = $this->default_actions($this->options['validate']['fail']);
+ return $this->default_action($info);
+ }
+ /**
+ * Default action: ignore.
+ *
+ * If an argument was expected and was not given, in this case, simply
+ * ignore the argument entirely.
+ */
+ function default_ignore() {
+ return TRUE;
+ }
+
+ /**
+ * Default action: not found.
+ *
+ * If an argument was expected and was not given, in this case, report
+ * the view as 'not found' or hide it.
+ */
+ function default_not_found() {
+ // Set a failure condition and let the display manager handle it.
+ $this->view->build_info['fail'] = TRUE;
+ return FALSE;
+ }
+
+ /**
+ * Default action: empty
+ *
+ * If an argument was expected and was not given, in this case, display
+ * the view's empty text
+ */
+ function default_empty() {
+ // We return with no query; this will force the empty text.
+ $this->view->built = TRUE;
+ $this->view->executed = TRUE;
+ $this->view->result = array();
+ return FALSE;
+ }
+
+ /**
+ * This just returns true. The view argument builder will know where
+ * to find the argument from.
+ */
+ function default_default() {
+ return TRUE;
+ }
+
+ /**
+ * Determine if the argument is set to provide a default argument.
+ */
+ function has_default_argument() {
+ $info = $this->default_actions($this->options['default_action']);
+ return !empty($info['has default argument']);
+ }
+
+ /**
+ * Get a default argument, if available.
+ */
+ function get_default_argument() {
+ $plugin = $this->get_plugin('argument default');
+ if ($plugin) {
+ return $plugin->get_argument();
+ }
+ }
+
+ /**
+ * Process the summary arguments for display.
+ *
+ * For example, the validation plugin may want to alter an argument for use in
+ * the URL.
+ */
+ function process_summary_arguments(&$args) {
+ if ($this->options['validate']['type'] != 'none') {
+ if (isset($this->validator) || $this->validator = $this->get_plugin('argument validator')) {
+ $this->validator->process_summary_arguments($args);
+ }
+ }
+ }
+
+ /**
+ * Default action: summary.
+ *
+ * If an argument was expected and was not given, in this case, display
+ * a summary query.
+ */
+ function default_summary() {
+ $this->view->build_info['summary'] = TRUE;
+ $this->view->build_info['summary_level'] = $this->options['id'];
+
+ // Change the display style to the summary style for this
+ // argument.
+ $this->view->plugin_name = $this->options['summary']['format'];
+ $this->view->style_options = $this->options['summary_options'];
+
+ // Clear out the normal primary field and whatever else may have
+ // been added and let the summary do the work.
+ $this->query->clear_fields();
+ $this->summary_query();
+
+ $by = $this->options['summary']['number_of_records'] ? 'num_records' : NULL;
+ $this->summary_sort($this->options['summary']['sort_order'], $by);
+
+ // Summaries have their own sorting and fields, so tell the View not
+ // to build these.
+ $this->view->build_sort = $this->view->build_fields = FALSE;
+ return TRUE;
+ }
+
+ /**
+ * Build the info for the summary query.
+ *
+ * This must:
+ * - add_groupby: group on this field in order to create summaries.
+ * - add_field: add a 'num_nodes' field for the count. Usually it will
+ * be a count on $view->base_field
+ * - set_count_field: Reset the count field so we get the right paging.
+ *
+ * @return
+ * The alias used to get the number of records (count) for this entry.
+ */
+ function summary_query() {
+ $this->ensure_my_table();
+ // Add the field.
+ $this->base_alias = $this->query->add_field($this->table_alias, $this->real_field);
+
+ $this->summary_name_field();
+ return $this->summary_basics();
+ }
+
+ /**
+ * Add the name field, which is the field displayed in summary queries.
+ * This is often used when the argument is numeric.
+ */
+ function summary_name_field() {
+ // Add the 'name' field. For example, if this is a uid argument, the
+ // name field would be 'name' (i.e, the username).
+
+ if (isset($this->name_table)) {
+ // if the alias is different then we're probably added, not ensured,
+ // so look up the join and add it instead.
+ if ($this->table_alias != $this->name_table) {
+ $j = views_get_table_join($this->name_table, $this->table);
+ if ($j) {
+ $join = clone $j;
+ $join->left_table = $this->table_alias;
+ $this->name_table_alias = $this->query->add_table($this->name_table, $this->relationship, $join);
+ }
+ }
+ else {
+ $this->name_table_alias = $this->query->ensure_table($this->name_table, $this->relationship);
+ }
+ }
+ else {
+ $this->name_table_alias = $this->table_alias;
+ }
+
+ if (isset($this->name_field)) {
+ $this->name_alias = $this->query->add_field($this->name_table_alias, $this->name_field);
+ }
+ else {
+ $this->name_alias = $this->base_alias;
+ }
+ }
+
+ /**
+ * Some basic summary behavior that doesn't need to be repeated as much as
+ * code that goes into summary_query()
+ */
+ function summary_basics($count_field = TRUE) {
+ // Add the number of nodes counter
+ $distinct = ($this->view->display_handler->get_option('distinct') && empty($this->query->no_distinct));
+
+ $count_alias = $this->query->add_field($this->query->base_table, $this->query->base_field, 'num_records',
+ array('count' => TRUE, 'distinct' => $distinct));
+ $this->query->add_groupby($this->name_alias);
+
+ if ($count_field) {
+ $this->query->set_count_field($this->table_alias, $this->real_field);
+ }
+
+ $this->count_alias = $count_alias;
+ }
+
+ /**
+ * Sorts the summary based upon the user's selection. The base variant of
+ * this is usually adequte.
+ *
+ * @param $order
+ * The order selected in the UI.
+ */
+ function summary_sort($order, $by = NULL) {
+ $this->query->add_orderby(NULL, NULL, $order, (!empty($by) ? $by : $this->name_alias));
+ }
+
+ /**
+ * Provide the argument to use to link from the summary to the next level;
+ * this will be called once per row of a summary, and used as part of
+ * $view->get_url().
+ *
+ * @param $data
+ * The query results for the row.
+ */
+ function summary_argument($data) {
+ return $data->{$this->base_alias};
+ }
+
+ /**
+ * Provides the name to use for the summary. By default this is just
+ * the name field.
+ *
+ * @param $data
+ * The query results for the row.
+ */
+ function summary_name($data) {
+ $value = $data->{$this->name_alias};
+ if (empty($value) && !empty($this->definition['empty field name'])) {
+ $value = $this->definition['empty field name'];
+ }
+ return check_plain($value);
+ }
+
+ /**
+ * Set up the query for this argument.
+ *
+ * The argument sent may be found at $this->argument.
+ */
+ function query($group_by = FALSE) {
+ $this->ensure_my_table();
+ $this->query->add_where(0, "$this->table_alias.$this->real_field", $this->argument);
+ }
+
+ /**
+ * Get the title this argument will assign the view, given the argument.
+ *
+ * This usually needs to be overridden to provide a proper title.
+ */
+ function title() {
+ return check_plain($this->argument);
+ }
+
+ /**
+ * Called by the view object to get the title. This may be set by a
+ * validator so we don't necessarily call through to title().
+ */
+ function get_title() {
+ if (isset($this->validated_title)) {
+ return $this->validated_title;
+ }
+ else {
+ return $this->title();
+ }
+ }
+
+ /**
+ * Validate that this argument works. By default, all arguments are valid.
+ */
+ function validate_arg($arg) {
+ // By using % in URLs, arguments could be validated twice; this eases
+ // that pain.
+ if (isset($this->argument_validated)) {
+ return $this->argument_validated;
+ }
+
+ if ($this->is_exception($arg)) {
+ return $this->argument_validated = TRUE;
+ }
+
+ if ($this->options['validate']['type'] == 'none') {
+ return $this->argument_validated = $this->validate_argument_basic($arg);
+ }
+
+ $plugin = $this->get_plugin('argument validator');
+ if ($plugin) {
+ return $this->argument_validated = $plugin->validate_argument($arg);
+ }
+
+ // If the plugin isn't found, fall back to the basic validation path:
+ return $this->argument_validated = $this->validate_argument_basic($arg);
+ }
+
+ /**
+ * Called by the menu system to validate an argument.
+ *
+ * This checks to see if this is a 'soft fail', which means that if the
+ * argument fails to validate, but there is an action to take anyway,
+ * then validation cannot actually fail.
+ */
+ function validate_argument($arg) {
+ $validate_info = $this->default_actions($this->options['validate']['fail']);
+ if (empty($validate_info['hard fail'])) {
+ return TRUE;
+ }
+
+ $rc = $this->validate_arg($arg);
+
+ // If the validator has changed the validate fail condition to a
+ // soft fail, deal with that:
+ $validate_info = $this->default_actions($this->options['validate']['fail']);
+ if (empty($validate_info['hard fail'])) {
+ return TRUE;
+ }
+
+ return $rc;
+ }
+
+ /**
+ * Provide a basic argument validation.
+ *
+ * This can be overridden for more complex types; the basic
+ * validator only checks to see if the argument is not NULL
+ * or is numeric if the definition says it's numeric.
+ */
+ function validate_argument_basic($arg) {
+ if (!isset($arg) || $arg === '') {
+ return FALSE;
+ }
+
+ if (!empty($this->definition['numeric']) && !isset($this->options['break_phrase']) && !is_numeric($arg)) {
+ return FALSE;
+ }
+
+ return TRUE;
+ }
+
+ /**
+ * Set the input for this argument
+ *
+ * @return TRUE if it successfully validates; FALSE if it does not.
+ */
+ function set_argument($arg) {
+ $this->argument = $arg;
+ return $this->validate_arg($arg);
+ }
+
+ /**
+ * Get the value of this argument.
+ */
+ function get_value() {
+ // If we already processed this argument, we're done.
+ if (isset($this->argument)) {
+ return $this->argument;
+ }
+
+ // Otherwise, we have to pretend to process ourself to find the value.
+ $value = NULL;
+ // Find the position of this argument within the view.
+ $position = 0;
+ foreach ($this->view->argument as $id => $argument) {
+ if ($id == $this->options['id']) {
+ break;
+ }
+ $position++;
+ }
+
+ $arg = isset($this->view->args[$position]) ? $this->view->args[$position] : NULL;
+ $this->position = $position;
+
+ // Clone ourselves so that we don't break things when we're really
+ // processing the arguments.
+ $argument = clone $this;
+ if (!isset($arg) && $argument->has_default_argument()) {
+ $arg = $argument->get_default_argument();
+
+ // remember that this argument was computed, not passed on the URL.
+ $this->is_default = TRUE;
+ }
+ // Set the argument, which will also validate that the argument can be set.
+ if ($argument->set_argument($arg)) {
+ $value = $argument->argument;
+ }
+ unset($argument);
+ return $value;
+ }
+
+ /**
+ * Export handler for summary export.
+ *
+ * Arguments can have styles for the summary view. This special export
+ * handler makes sure this works properly.
+ */
+ function export_summary($indent, $prefix, $storage, $option, $definition, $parents) {
+ $output = '';
+ $name = $this->options['summary'][$option];
+ $options = $this->options['summary_options'];
+
+ $plugin = views_get_plugin('style', $name);
+ if ($plugin) {
+ $plugin->init($this->view, $this->view->display_handler->display, $options);
+ // Write which plugin to use.
+ $output .= $indent . $prefix . "['summary']['$option'] = '$name';\n";
+
+ // Pass off to the plugin to export itself.
+ $output .= $plugin->export_options($indent, $prefix . "['summary_options']");
+ }
+
+ return $output;
+ }
+
+ /**
+ * Export handler for validation export.
+ *
+ * Arguments use validation plugins. This special export handler makes sure
+ * this works properly.
+ */
+ function export_validation($indent, $prefix, $storage, $option, $definition, $parents) {
+ $output = '';
+ $name = $this->options['validate'][$option];
+ $options = $this->options['validate_options'];
+
+ $plugin = views_get_plugin('argument validator', $name);
+ if ($plugin) {
+ $plugin->init($this->view, $this->display, $options);
+ // Write which plugin to use.
+ $output .= $indent . $prefix . "['validate']['$option'] = '$name';\n";
+
+ // Pass off to the plugin to export itself.
+ $output .= $plugin->export_options($indent, $prefix . "['validate_options']");
+ }
+
+ return $output;
+ }
+
+ /**
+ * Generic plugin export handler.
+ *
+ * Since style and validation plugins have their own export handlers, this
+ * one is currently only used for default argument plugins.
+ */
+ function export_plugin($indent, $prefix, $storage, $option, $definition, $parents) {
+ $output = '';
+ if ($option == 'default_argument_type') {
+ $type = 'argument default';
+ $option_name = 'default_argument_options';
+ }
+
+ $plugin = $this->get_plugin($type);
+ $name = $this->options[$option];
+
+ if ($plugin) {
+ // Write which plugin to use.
+ $output .= $indent . $prefix . "['$option'] = '$name';\n";
+
+ // Pass off to the plugin to export itself.
+ $output .= $plugin->export_options($indent, $prefix . "['$option_name']");
+ }
+
+ return $output;
+ }
+
+ /**
+ * Get the display or row plugin, if it exists.
+ */
+ function get_plugin($type = 'argument default', $name = NULL) {
+ $options = array();
+ switch ($type) {
+ case 'argument default':
+ $plugin_name = $this->options['default_argument_type'];
+ $options_name = 'default_argument_options';
+ break;
+ case 'argument validator':
+ $plugin_name = $this->options['validate']['type'];
+ $options_name = 'validate_options';
+ break;
+ case 'style':
+ $plugin_name = $this->options['summary']['format'];
+ $options_name = 'summary_options';
+ }
+
+ if (!$name) {
+ $name = $plugin_name;
+ }
+
+ // we only fetch the options if we're fetching the plugin actually
+ // in use.
+ if ($name == $plugin_name) {
+ $options = $this->options[$options_name];
+ }
+
+ $plugin = views_get_plugin($type, $name);
+ if ($plugin) {
+ // Style plugins expects different parameters as argument related plugins.
+ if ($type == 'style') {
+ $plugin->init($this->view, $this->view->display_handler->display, $options);
+ }
+ else {
+ $plugin->init($this->view, $this, $options);
+ }
+ return $plugin;
+ }
+ }
+
+ /**
+ * Return a description of how the argument would normally be sorted.
+ *
+ * Subclasses should override this to specify what the default sort order of
+ * their argument is (e.g. alphabetical, numeric, date).
+ */
+ function get_sort_name() {
+ return t('Default sort', array(), array('context' => 'Sort order'));
+ }
+}
+
+/**
+ * A special handler to take the place of missing or broken handlers.
+ *
+ * @ingroup views_argument_handlers
+ */
+class views_handler_argument_broken extends views_handler_argument {
+ function ui_name($short = FALSE) {
+ return t('Broken/missing handler');
+ }
+
+ function ensure_my_table() { /* No table to ensure! */ }
+ function query($group_by = FALSE) { /* No query to run */ }
+ function options_form(&$form, &$form_state) {
+ $form['markup'] = array(
+ '#markup' => '<div class="form-item description">' . t('The handler for this item is broken or missing and cannot be used. If a module provided the handler and was disabled, re-enabling the module may restore it. Otherwise, you should probably delete this item.') . '</div>',
+ );
+ }
+
+ /**
+ * Determine if the handler is considered 'broken'
+ */
+ function broken() { return TRUE; }
+}
+
+/**
+ * @}
+ */
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
new file mode 100644
index 0000000..7ed4b03
--- /dev/null
+++ b/kolab.org/www/drupal-7.15/sites/all/modules/views/handlers/views_handler_argument_date.inc
@@ -0,0 +1,94 @@
+<?php
+/**
+ * Abstract argument handler for dates.
+ *
+ * Adds an option to set a default argument based on the current date.
+ *
+ * @param $arg_format
+ * The format string to use on the current time when
+ * creating a default date argument.
+ *
+ * Definitions terms:
+ * - 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
+ *
+ * @ingroup views_argument_handlers
+ */
+class views_handler_argument_date extends views_handler_argument_formula {
+ var $option_name = 'default_argument_date';
+ var $arg_format = 'Y-m-d';
+
+ /**
+ * Add an option to set the default value to the current date.
+ */
+ function default_argument_form(&$form, &$form_state) {
+ parent::default_argument_form($form, $form_state);
+ $form['default_argument_type']['#options'] += array('date' => t('Current date'));
+ $form['default_argument_type']['#options'] += array('node_created' => t("Current node's creation time"));
+ $form['default_argument_type']['#options'] += array('node_changed' => t("Current node's update time")); }
+
+ /**
+ * Set the empty argument value to the current date,
+ * formatted appropriately for this argument.
+ */
+ function get_default_argument($raw = FALSE) {
+ if (!$raw && $this->options['default_argument_type'] == 'date') {
+ return date($this->arg_format, REQUEST_TIME);
+ }
+ else if (!$raw && in_array($this->options['default_argument_type'], array('node_created', 'node_changed'))) {
+ foreach (range(1, 3) as $i) {
+ $node = menu_get_object('node', $i);
+ if (!empty($node)) {
+ continue;
+ }
+ }
+
+ if (arg(0) == 'node' && is_numeric(arg(1))) {
+ $node = node_load(arg(1));
+ }
+
+ if (empty($node)) {
+ return parent::get_default_argument();
+ }
+ elseif ($this->options['default_argument_type'] == 'node_created') {
+ return date($this->arg_format, $node->created);
+ }
+ elseif ($this->options['default_argument_type'] == 'node_changed') {
+ return date($this->arg_format, $node->changed);
+ }
+ }
+
+ return parent::get_default_argument($raw);
+ }
+
+ /**
+ * The date handler provides some default argument types, which aren't argument default plugins,
+ * so addapt the export mechanism.
+ */
+ function export_plugin($indent, $prefix, $storage, $option, $definition, $parents) {
+
+ // Only use a special behaviour for the special argument types, else just
+ // use the default behaviour.
+ if ($option == 'default_argument_type') {
+ $type = 'argument default';
+ $option_name = 'default_argument_options';
+
+ $plugin = $this->get_plugin($type);
+ $name = $this->options[$option];
+ if (in_array($name, array('date', 'node_created', 'node_changed'))) {
+
+ // Write which plugin to use.
+ $output = $indent . $prefix . "['$option'] = '$name';\n";
+ return $output;
+ }
+ }
+ return parent::export_plugin($indent, $prefix, $storage, $option, $definition, $parents);
+ }
+
+
+ function get_sort_name() {
+ return t('Date', array(), array('context' => 'Sort order'));
+ }
+}
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
new file mode 100644
index 0000000..c4287be
--- /dev/null
+++ b/kolab.org/www/drupal-7.15/sites/all/modules/views/handlers/views_handler_argument_formula.inc
@@ -0,0 +1,57 @@
+<?php
+/**
+ * Abstract argument handler for simple formulae.
+ *
+ * Child classes of this object should implement summary_argument, at least.
+ *
+ * Definition terms:
+ * - formula: The formula to use for this handler.
+ *
+ * @ingroup views_argument_handlers
+ */
+class views_handler_argument_formula extends views_handler_argument {
+ var $formula = NULL;
+ /**
+ * Constructor
+ */
+ function construct() {
+ parent::construct();
+
+ if (!empty($this->definition['formula'])) {
+ $this->formula = $this->definition['formula'];
+ }
+ }
+
+ function get_formula() {
+ return str_replace('***table***', $this->table_alias, $this->formula);
+ }
+
+ /**
+ * Build the summary query based on a formula
+ */
+ function summary_query() {
+ $this->ensure_my_table();
+ // Now that our table is secure, get our formula.
+ $formula = $this->get_formula();
+
+ // Add the field.
+ $this->base_alias = $this->name_alias = $this->query->add_field(NULL, $formula, $this->field);
+ $this->query->set_count_field(NULL, $formula, $this->field);
+
+ return $this->summary_basics(FALSE);
+ }
+
+ /**
+ * Build the query based upon the formula
+ */
+ function query($group_by = FALSE) {
+ $this->ensure_my_table();
+ // Now that our table is secure, get our formula.
+ $placeholder = $this->placeholder();
+ $formula = $this->get_formula() .' = ' . $placeholder;
+ $placeholders = array(
+ $placeholder => $this->argument,
+ );
+ $this->query->add_where(0, $formula, $placeholders, 'formula');
+ }
+}
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
new file mode 100644
index 0000000..2ecccaf
--- /dev/null
+++ b/kolab.org/www/drupal-7.15/sites/all/modules/views/handlers/views_handler_argument_group_by_numeric.inc
@@ -0,0 +1,24 @@
+<?php
+
+/**
+ * Simple handler for arguments using group by.
+ *
+ * @ingroup views_argument_handlers
+ */
+class views_handler_argument_group_by_numeric extends views_handler_argument {
+ function query($group_by = FALSE) {
+ $this->ensure_my_table();
+ $field = $this->get_field();
+ $placeholder = $this->placeholder();
+
+ $this->query->add_having_expression(0, "$field = $placeholder", array($placeholder => $this->argument));
+ }
+
+ function ui_name($short = FALSE) {
+ return $this->get_field(parent::ui_name($short));
+ }
+
+ function get_sort_name() {
+ return t('Numerical', array(), array('context' => 'Sort order'));
+ }
+}
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
new file mode 100644
index 0000000..1f5229e
--- /dev/null
+++ b/kolab.org/www/drupal-7.15/sites/all/modules/views/handlers/views_handler_argument_many_to_one.inc
@@ -0,0 +1,179 @@
+<?php
+/**
+ * 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
+ * reasonably common with this type of relationship.
+ * Definition terms:
+ * - numeric: If true, the field will be considered numeric. Probably should
+ * always be set TRUE as views_handler_argument_string has many to one
+ * capabilities.
+ * - zero is null: If true, a 0 will be handled as empty, so for example
+ * a default argument can be provided or a summary can be shown.
+ *
+ * @ingroup views_argument_handlers
+ */
+class views_handler_argument_many_to_one extends views_handler_argument {
+ function init(&$view, &$options) {
+ parent::init($view, $options);
+ $this->helper = new views_many_to_one_helper($this);
+
+ // Ensure defaults for these, during summaries and stuff:
+ $this->operator = 'or';
+ $this->value = array();
+ }
+
+ function option_definition() {
+ $options = parent::option_definition();
+
+ if (!empty($this->definition['numeric'])) {
+ $options['break_phrase'] = array('default' => FALSE);
+ }
+
+ $options['add_table'] = array('default' => FALSE);
+ $options['require_value'] = array('default' => FALSE);
+
+ if (isset($this->helper)) {
+ $this->helper->option_definition($options);
+ }
+ else {
+ $helper = new views_many_to_one_helper($this);
+ $helper->option_definition($options);
+ }
+
+ return $options;
+ }
+
+ function options_form(&$form, &$form_state) {
+ parent::options_form($form, $form_state);
+
+ // allow + for or, , for and
+ if (!empty($this->definition['numeric'])) {
+ $form['break_phrase'] = array(
+ '#type' => 'checkbox',
+ '#title' => t('Allow multiple values'),
+ '#description' => t('If selected, users can enter multiple values in the form of 1+2+3 (for OR) or 1,2,3 (for AND).'),
+ '#default_value' => !empty($this->options['break_phrase']),
+ '#fieldset' => 'more',
+ );
+ }
+
+ $form['add_table'] = array(
+ '#type' => 'checkbox',
+ '#title' => t('Allow multiple filter values to work together'),
+ '#description' => t('If selected, multiple instances of this filter can work together, as though multiple values were supplied to the same filter. This setting is not compatible with the "Reduce duplicates" setting.'),
+ '#default_value' => !empty($this->options['add_table']),
+ '#fieldset' => 'more',
+ );
+
+ $form['require_value'] = array(
+ '#type' => 'checkbox',
+ '#title' => t('Do not display items with no value in summary'),
+ '#default_value' => !empty($this->options['require_value']),
+ '#fieldset' => 'more',
+ );
+
+ $this->helper->options_form($form, $form_state);
+ }
+
+ /**
+ * Override ensure_my_table so we can control how this joins in.
+ * The operator actually has influence over joining.
+ */
+ function ensure_my_table() {
+ $this->helper->ensure_my_table();
+ }
+
+ function query($group_by = FALSE) {
+ $empty = FALSE;
+ if (isset($this->definition['zero is null']) && $this->definition['zero is null']) {
+ if (empty($this->argument)) {
+ $empty = TRUE;
+ }
+ }
+ else {
+ if (!isset($this->argument)) {
+ $empty = TRUE;
+ }
+ }
+ if ($empty) {
+ parent::ensure_my_table();
+ $this->query->add_where(0, "$this->table_alias.$this->real_field", NULL, 'IS NULL');
+ return;
+ }
+
+ if (!empty($this->options['break_phrase'])) {
+ views_break_phrase($this->argument, $this);
+ }
+ else {
+ $this->value = array($this->argument);
+ $this->operator = 'or';
+ }
+
+ $this->helper->add_filter();
+ }
+
+ function title() {
+ if (!$this->argument) {
+ return !empty($this->definition['empty field name']) ? $this->definition['empty field name'] : t('Uncategorized');
+ }
+
+ if (!empty($this->options['break_phrase'])) {
+ views_break_phrase($this->argument, $this);
+ }
+ else {
+ $this->value = array($this->argument);
+ $this->operator = 'or';
+ }
+
+ // @todo -- both of these should check definition for alternate keywords.
+
+ if (empty($this->value)) {
+ return !empty($this->definition['empty field name']) ? $this->definition['empty field name'] : t('Uncategorized');
+ }
+
+ if ($this->value === array(-1)) {
+ return !empty($this->definition['invalid input']) ? $this->definition['invalid input'] : t('Invalid input');
+ }
+
+ return implode($this->operator == 'or' ? ' + ' : ', ', $this->title_query());
+ }
+
+ function summary_query() {
+ $field = $this->table . '.' . $this->field;
+ $join = $this->get_join();
+
+ if (!empty($this->options['require_value'])) {
+ $join->type = 'INNER';
+ }
+
+ if (empty($this->options['add_table']) || empty($this->view->many_to_one_tables[$field])) {
+ $this->table_alias = $this->query->ensure_table($this->table, $this->relationship, $join);
+ }
+ else {
+ $this->table_alias = $this->helper->summary_join();
+ }
+
+ // Add the field.
+ $this->base_alias = $this->query->add_field($this->table_alias, $this->real_field);
+
+ $this->summary_name_field();
+
+ return $this->summary_basics();
+ }
+
+ function summary_argument($data) {
+ $value = $data->{$this->base_alias};
+ if (empty($value)) {
+ $value = 0;
+ }
+
+ return $value;
+ }
+
+ /**
+ * Override for specific title lookups.
+ */
+ function title_query() {
+ return $this->value;
+ }
+}
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
new file mode 100644
index 0000000..e4804dc
--- /dev/null
+++ b/kolab.org/www/drupal-7.15/sites/all/modules/views/handlers/views_handler_argument_null.inc
@@ -0,0 +1,61 @@
+<?php
+/**
+ * Argument handler that ignores the argument.
+ *
+ * @ingroup views_argument_handlers
+ */
+class views_handler_argument_null extends views_handler_argument {
+ function option_definition() {
+ $options = parent::option_definition();
+ $options['must_not_be'] = array('default' => FALSE);
+ return $options;
+ }
+
+ /**
+ * Override options_form() so that only the relevant options
+ * are displayed to the user.
+ */
+ function options_form(&$form, &$form_state) {
+ parent::options_form($form, $form_state);
+ $form['must_not_be'] = array(
+ '#type' => 'checkbox',
+ '#title' => t('Fail basic validation if any argument is given'),
+ '#default_value' => !empty($this->options['must_not_be']),
+ '#description' => t('By checking this field, you can use this to make sure views with more arguments than necessary fail validation.'),
+ '#fieldset' => 'more',
+ );
+
+ unset($form['exception']);
+ }
+
+ /**
+ * Override default_actions() to remove actions that don't
+ * make sense for a null argument.
+ */
+ function default_actions($which = NULL) {
+ if ($which) {
+ if (in_array($which, array('ignore', 'not found', 'empty', 'default'))) {
+ return parent::default_actions($which);
+ }
+ return;
+ }
+ $actions = parent::default_actions();
+ unset($actions['summary asc']);
+ unset($actions['summary desc']);
+ return $actions;
+ }
+
+ function validate_argument_basic($arg) {
+ if (!empty($this->options['must_not_be'])) {
+ return !isset($arg);
+ }
+
+ return parent::validate_argument_basic($arg);
+ }
+
+ /**
+ * Override the behavior of query() to prevent the query
+ * from being changed in any way.
+ */
+ function query($group_by = FALSE) {}
+}
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
new file mode 100644
index 0000000..5b91232
--- /dev/null
+++ b/kolab.org/www/drupal-7.15/sites/all/modules/views/handlers/views_handler_argument_numeric.inc
@@ -0,0 +1,115 @@
+<?php
+/**
+ * @file
+ * Contains the numeric argument handler.
+ */
+
+/**
+ * Basic argument handler for arguments that are numeric. Incorporates
+ * break_phrase.
+ *
+ * @ingroup views_argument_handlers
+ */
+class views_handler_argument_numeric extends views_handler_argument {
+ /**
+ * The operator used for the query: or|and.
+ * @var string
+ */
+ var $operator;
+
+ /**
+ * The actual value which is used for querying.
+ * @var array
+ */
+ var $value;
+
+ function option_definition() {
+ $options = parent::option_definition();
+
+ $options['break_phrase'] = array('default' => FALSE);
+ $options['not'] = array('default' => FALSE);
+
+ return $options;
+ }
+
+ function options_form(&$form, &$form_state) {
+ parent::options_form($form, $form_state);
+
+ // allow + for or, , for and
+ $form['break_phrase'] = array(
+ '#type' => 'checkbox',
+ '#title' => t('Allow multiple values'),
+ '#description' => t('If selected, users can enter multiple values in the form of 1+2+3 (for OR) or 1,2,3 (for AND).'),
+ '#default_value' => !empty($this->options['break_phrase']),
+ '#fieldset' => 'more',
+ );
+
+ $form['not'] = array(
+ '#type' => 'checkbox',
+ '#title' => t('Exclude'),
+ '#description' => t('If selected, the numbers entered for the filter will be excluded rather than limiting the view.'),
+ '#default_value' => !empty($this->options['not']),
+ '#fieldset' => 'more',
+ );
+ }
+
+ function title() {
+ if (!$this->argument) {
+ return !empty($this->definition['empty field name']) ? $this->definition['empty field name'] : t('Uncategorized');
+ }
+
+ if (!empty($this->options['break_phrase'])) {
+ views_break_phrase($this->argument, $this);
+ }
+ else {
+ $this->value = array($this->argument);
+ $this->operator = 'or';
+ }
+
+ if (empty($this->value)) {
+ return !empty($this->definition['empty field name']) ? $this->definition['empty field name'] : t('Uncategorized');
+ }
+
+ if ($this->value === array(-1)) {
+ return !empty($this->definition['invalid input']) ? $this->definition['invalid input'] : t('Invalid input');
+ }
+
+ return implode($this->operator == 'or' ? ' + ' : ', ', $this->title_query());
+ }
+
+ /**
+ * Override for specific title lookups.
+ * @return array
+ * Returns all titles, if it's just one title it's an array with one entry.
+ */
+ function title_query() {
+ return $this->value;
+ }
+
+ function query($group_by = FALSE) {
+ $this->ensure_my_table();
+
+ if (!empty($this->options['break_phrase'])) {
+ views_break_phrase($this->argument, $this);
+ }
+ else {
+ $this->value = array($this->argument);
+ }
+
+ $placeholder = $this->placeholder();
+ $null_check = empty($this->options['not']) ? '' : "OR $this->table_alias.$this->real_field IS NULL";
+
+ if (count($this->value) > 1) {
+ $operator = empty($this->options['not']) ? 'IN' : 'NOT IN';
+ $this->query->add_where_expression(0, "$this->table_alias.$this->real_field $operator($placeholder) $null_check", array($placeholder => $this->value));
+ }
+ else {
+ $operator = empty($this->options['not']) ? '=' : '!=';
+ $this->query->add_where_expression(0, "$this->table_alias.$this->real_field $operator $placeholder $null_check", array($placeholder => $this->argument));
+ }
+ }
+
+ function get_sort_name() {
+ return t('Numerical', array(), array('context' => 'Sort order'));
+ }
+}
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
new file mode 100644
index 0000000..45bdbab
--- /dev/null
+++ b/kolab.org/www/drupal-7.15/sites/all/modules/views/handlers/views_handler_argument_string.inc
@@ -0,0 +1,281 @@
+<?php
+
+/**
+ * Basic argument handler to implement string arguments that may have length
+ * limits.
+ *
+ * @ingroup views_argument_handlers
+ */
+class views_handler_argument_string extends views_handler_argument {
+ function init(&$view, &$options) {
+ parent::init($view, $options);
+ if (!empty($this->definition['many to one'])) {
+ $this->helper = new views_many_to_one_helper($this);
+
+ // Ensure defaults for these, during summaries and stuff:
+ $this->operator = 'or';
+ $this->value = array();
+ }
+ }
+
+ function option_definition() {
+ $options = parent::option_definition();
+
+ $options['glossary'] = array('default' => FALSE);
+ $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);
+
+ if (!empty($this->definition['many to one'])) {
+ $options['add_table'] = array('default' => FALSE);
+ $options['require_value'] = array('default' => FALSE);
+ }
+
+ return $options;
+ }
+
+ function options_form(&$form, &$form_state) {
+ parent::options_form($form, $form_state);
+
+ $form['glossary'] = array(
+ '#type' => 'checkbox',
+ '#title' => t('Glossary mode'),
+ '#description' => t('Glossary mode applies a limit to the number of characters used in the filter value, which allows the summary view to act as a glossary.'),
+ '#default_value' => $this->options['glossary'],
+ '#fieldset' => 'more',
+ );
+
+ $form['limit'] = array(
+ '#type' => 'textfield',
+ '#title' => t('Character limit'),
+ '#description' => t('How many characters of the filter value to filter against. If set to 1, all fields starting with the first letter in the filter value would be matched.'),
+ '#default_value' => $this->options['limit'],
+ '#dependency' => array('edit-options-glossary' => array(TRUE)),
+ '#fieldset' => 'more',
+ );
+
+ $form['case'] = array(
+ '#type' => 'select',
+ '#title' => t('Case'),
+ '#description' => t('When printing the title and summary, how to transform the case of the filter value.'),
+ '#options' => array(
+ 'none' => t('No transform'),
+ 'upper' => t('Upper case'),
+ 'lower' => t('Lower case'),
+ 'ucfirst' => t('Capitalize first letter'),
+ 'ucwords' => t('Capitalize each word'),
+ ),
+ '#default_value' => $this->options['case'],
+ '#fieldset' => 'more',
+ );
+
+ $form['path_case'] = array(
+ '#type' => 'select',
+ '#title' => t('Case in path'),
+ '#description' => t('When printing url paths, how to transform the case of the filter value. Do not use this unless with Postgres as it uses case sensitive comparisons.'),
+ '#options' => array(
+ 'none' => t('No transform'),
+ 'upper' => t('Upper case'),
+ 'lower' => t('Lower case'),
+ 'ucfirst' => t('Capitalize first letter'),
+ 'ucwords' => t('Capitalize each word'),
+ ),
+ '#default_value' => $this->options['path_case'],
+ '#fieldset' => 'more',
+ );
+
+ $form['transform_dash'] = array(
+ '#type' => 'checkbox',
+ '#title' => t('Transform spaces to dashes in URL'),
+ '#default_value' => $this->options['transform_dash'],
+ '#fieldset' => 'more',
+ );
+
+ if (!empty($this->definition['many to one'])) {
+ $form['add_table'] = array(
+ '#type' => 'checkbox',
+ '#title' => t('Allow multiple filter values to work together'),
+ '#description' => t('If selected, multiple instances of this filter can work together, as though multiple values were supplied to the same filter. This setting is not compatible with the "Reduce duplicates" setting.'),
+ '#default_value' => !empty($this->options['add_table']),
+ '#fieldset' => 'more',
+ );
+
+ $form['require_value'] = array(
+ '#type' => 'checkbox',
+ '#title' => t('Do not display items with no value in summary'),
+ '#default_value' => !empty($this->options['require_value']),
+ '#fieldset' => 'more',
+ );
+ }
+
+ // allow + for or, , for and
+ $form['break_phrase'] = array(
+ '#type' => 'checkbox',
+ '#title' => t('Allow multiple values'),
+ '#description' => t('If selected, users can enter multiple values in the form of 1+2+3 (for OR) or 1,2,3 (for AND).'),
+ '#default_value' => !empty($this->options['break_phrase']),
+ '#fieldset' => 'more',
+ );
+ }
+
+ /**
+ * 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();
+ }
+ else {
+ $this->table_alias = $this->helper->summary_join();
+ }
+
+ if (empty($this->options['glossary'])) {
+ // Add the field.
+ $this->base_alias = $this->query->add_field($this->table_alias, $this->real_field);
+ $this->query->set_count_field($this->table_alias, $this->real_field);
+ }
+ 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->query->set_count_field(NULL, $formula, $this->field, $this->field . '_truncated');
+ }
+
+ $this->summary_name_field();
+ return $this->summary_basics(FALSE);
+ }
+
+ /**
+ * Get the formula for this 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)";
+ }
+
+ /**
+ * Build the query based upon the formula
+ */
+ function query($group_by = FALSE) {
+ $argument = $this->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);
+ }
+ else {
+ $this->value = array($argument);
+ $this->operator = 'or';
+ }
+
+ if (!empty($this->definition['many to one'])) {
+ if (!empty($this->options['glossary'])) {
+ $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;
+ }
+
+ $this->ensure_my_table();
+ $formula = FALSE;
+ if (empty($this->options['glossary'])) {
+ $field = "$this->table_alias.$this->real_field";
+ }
+ else {
+ $formula = TRUE;
+ $field = $this->get_formula();
+ }
+
+ if (count($this->value) > 1) {
+ $operator = 'IN';
+ $argument = $this->value;
+ }
+ else {
+ $operator = '=';
+ }
+
+ if ($formula) {
+ $placeholder = $this->placeholder();
+ $placeholder_length = $this->placeholder_length;
+ if ($operator == 'IN') {
+ $field .= " IN($placeholder)";
+ }
+ else {
+ $field .= ' = ' . $placeholder;
+ }
+ $placeholders = array(
+ $placeholder_length => intval($this->options['limit']),
+ $placeholder => $argument,
+ );
+ $this->query->add_where_expression(0, $field, $placeholders);
+ }
+ else {
+ $this->query->add_where(0, $field, $argument, $operator);
+ }
+ }
+
+ function summary_argument($data) {
+ $value = $this->case_transform($data->{$this->base_alias}, 'path_case');
+ if (!empty($this->options['transform_dash'])) {
+ $value = strtr($value, ' ', '-');
+ }
+ return $value;
+ }
+
+ function get_sort_name() {
+ return t('Alphabetical', array(), array('context' => 'Sort order'));
+ }
+
+ function title() {
+ $this->argument = $this->case_transform($this->argument, $this->options['case']);
+ if (!empty($this->options['transform_dash'])) {
+ $this->argument = strtr($this->argument, '-', ' ');
+ }
+
+ if (!empty($this->options['break_phrase'])) {
+ views_break_phrase_string($this->argument, $this);
+ }
+ else {
+ $this->value = array($this->argument);
+ $this->operator = 'or';
+ }
+
+ if (empty($this->value)) {
+ return !empty($this->definition['empty field name']) ? $this->definition['empty field name'] : t('Uncategorized');
+ }
+
+ if ($this->value === array(-1)) {
+ return !empty($this->definition['invalid input']) ? $this->definition['invalid input'] : t('Invalid input');
+ }
+
+ return implode($this->operator == 'or' ? ' + ' : ', ', $this->title_query());
+ }
+
+ /**
+ * Override for specific title lookups.
+ */
+ function title_query() {
+ return drupal_map_assoc($this->value, 'check_plain');
+ }
+
+ function summary_name($data) {
+ return $this->case_transform(parent::summary_name($data), $this->options['case']);
+ }
+
+}
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
new file mode 100644
index 0000000..ff2c32d
--- /dev/null
+++ b/kolab.org/www/drupal-7.15/sites/all/modules/views/handlers/views_handler_field.inc
@@ -0,0 +1,1505 @@
+<?php
+/**
+ * @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.
+ * (If no render_item() is present).
+ */
+define('VIEWS_HANDLER_RENDER_TEXT_PHASE_SINGLE_ITEM', 0);
+
+/**
+ * Indicator of the render_text() method for rendering the whole element.
+ * (if no render_item() method is available).
+ */
+define('VIEWS_HANDLER_RENDER_TEXT_PHASE_COMPLETELY', 1);
+
+/**
+ * Indicator of the render_text() method for rendering the empty text.
+ */
+define('VIEWS_HANDLER_RENDER_TEXT_PHASE_EMPTY', 2);
+
+/**
+ * Base field handler that has no options and renders an unformatted field.
+ *
+ * Definition terms:
+ * - additional fields: An array of fields that should be added to the query
+ * for some purpose. The array is in the form of:
+ * array('identifier' => array('table' => tablename,
+ * 'field' => fieldname); as many fields as are necessary
+ * may be in this array.
+ * - click sortable: If TRUE, this field may be click sorted.
+ */
+class views_handler_field extends views_handler {
+ var $field_alias = 'unknown';
+ var $aliases = array();
+
+ /**
+ * @var array
+ * Stores additional fields which get's added to the query.
+ * The generated aliases are stored in $aliases.
+ */
+ var $additional_fields = array();
+
+ /**
+ * Construct a new field handler.
+ */
+ function construct() {
+ parent::construct();
+
+ $this->additional_fields = array();
+ if (!empty($this->definition['additional fields'])) {
+ $this->additional_fields = $this->definition['additional fields'];
+ }
+
+ if (!isset($this->options['exclude'])) {
+ $this->options['exclude'] = '';
+ }
+ }
+
+ /**
+ * Determine if this field can allow advanced rendering.
+ *
+ * Fields can set this to FALSE if they do not wish to allow
+ * token based rewriting or link-making.
+ */
+ function allow_advanced_render() {
+ return TRUE;
+ }
+
+ function init(&$view, &$options) {
+ parent::init($view, $options);
+ }
+
+ /**
+ * Called to add the field to a query.
+ */
+ function query() {
+ $this->ensure_my_table();
+ // Add the field.
+ $params = $this->options['group_type'] != 'group' ? array('function' => $this->options['group_type']) : array();
+ $this->field_alias = $this->query->add_field($this->table_alias, $this->real_field, NULL, $params);
+
+ $this->add_additional_fields();
+ }
+
+ /**
+ * Add 'additional' fields to the query.
+ *
+ * @param $fields
+ * An array of fields. The key is an identifier used to later find the
+ * field alias used. The value is either a string in which case it's
+ * assumed to be a field on this handler's table; or it's an array in the
+ * form of
+ * @code array('table' => $tablename, 'field' => $fieldname) @endcode
+ */
+ function add_additional_fields($fields = NULL) {
+ if (!isset($fields)) {
+ // notice check
+ if (empty($this->additional_fields)) {
+ return;
+ }
+ $fields = $this->additional_fields;
+ }
+
+ $group_params = array();
+ if ($this->options['group_type'] != 'group') {
+ $group_params = array(
+ 'function' => $this->options['group_type'],
+ );
+ }
+
+ if (!empty($fields) && is_array($fields)) {
+ foreach ($fields as $identifier => $info) {
+ if (is_array($info)) {
+ if (isset($info['table'])) {
+ $table_alias = $this->query->ensure_table($info['table'], $this->relationship);
+ }
+ else {
+ $table_alias = $this->table_alias;
+ }
+
+ if (empty($table_alias)) {
+ debug(t('Handler @handler tried to add additional_field @identifier but @table could not be added!', array('@handler' => $this->definition['handler'], '@identifier' => $identifier, '@table' => $info['table'])));
+ $this->aliases[$identifier] = 'broken';
+ continue;
+ }
+
+ $params = array();
+ if (!empty($info['params'])) {
+ $params = $info['params'];
+ }
+
+ $params += $group_params;
+ $this->aliases[$identifier] = $this->query->add_field($table_alias, $info['field'], NULL, $params);
+ }
+ else {
+ $this->aliases[$info] = $this->query->add_field($this->table_alias, $info, NULL, $group_params);
+ }
+ }
+ }
+ }
+
+ /**
+ * Called to determine what to tell the clicksorter.
+ */
+ function click_sort($order) {
+ if (isset($this->field_alias)) {
+ // Since fields should always have themselves already added, just
+ // add a sort on the field.
+ $params = $this->options['group_type'] != 'group' ? array('function' => $this->options['group_type']) : array();
+ $this->query->add_orderby(NULL, NULL, $order, $this->field_alias, $params);
+ }
+ }
+
+ /**
+ * Determine if this field is click sortable.
+ */
+ function click_sortable() {
+ return !empty($this->definition['click sortable']);
+ }
+
+ /**
+ * Get this field's label.
+ */
+ function label() {
+ if (!isset($this->options['label'])) {
+ return '';
+ }
+ return $this->options['label'];
+ }
+
+ /**
+ * Return an HTML element based upon the field's element type.
+ */
+ function element_type($none_supported = FALSE, $default_empty = FALSE, $inline = FALSE) {
+ if ($none_supported) {
+ if ($this->options['element_type'] === '0') {
+ return '';
+ }
+ }
+ if ($this->options['element_type']) {
+ return check_plain($this->options['element_type']);
+ }
+
+ if ($default_empty) {
+ return '';
+ }
+
+ if ($inline) {
+ return 'span';
+ }
+
+ if (isset($this->definition['element type'])) {
+ return $this->definition['element type'];
+ }
+
+ return 'span';
+ }
+
+ /**
+ * Return an HTML element for the label based upon the field's element type.
+ */
+ function element_label_type($none_supported = FALSE, $default_empty = FALSE) {
+ if ($none_supported) {
+ if ($this->options['element_label_type'] === '0') {
+ return '';
+ }
+ }
+ if ($this->options['element_label_type']) {
+ return check_plain($this->options['element_label_type']);
+ }
+
+ if ($default_empty) {
+ return '';
+ }
+
+ return 'span';
+ }
+
+ /**
+ * Return an HTML element for the wrapper based upon the field's element type.
+ */
+ function element_wrapper_type($none_supported = FALSE, $default_empty = FALSE) {
+ if ($none_supported) {
+ if ($this->options['element_wrapper_type'] === '0') {
+ return 0;
+ }
+ }
+ if ($this->options['element_wrapper_type']) {
+ return check_plain($this->options['element_wrapper_type']);
+ }
+
+ if ($default_empty) {
+ return '';
+ }
+
+ return 'div';
+ }
+
+ /**
+ * Provide a list of elements valid for field HTML.
+ *
+ * This function can be overridden by fields that want more or fewer
+ * elements available, though this seems like it would be an incredibly
+ * rare occurence.
+ */
+ function get_elements() {
+ static $elements = NULL;
+ if (!isset($elements)) {
+ $elements = variable_get('views_field_rewrite_elements', array(
+ '' => t('- Use default -'),
+ '0' => t('- None -'),
+ 'div' => 'DIV',
+ 'span' => 'SPAN',
+ 'h1' => 'H1',
+ 'h2' => 'H2',
+ 'h3' => 'H3',
+ 'h4' => 'H4',
+ 'h5' => 'H5',
+ 'h6' => 'H6',
+ 'p' => 'P',
+ 'strong' => 'STRONG',
+ 'em' => 'EM',
+ ));
+ }
+
+ return $elements;
+ }
+
+ /**
+ * Return the class of the field.
+ */
+ function element_classes($row_index = NULL) {
+ $classes = explode(' ', $this->options['element_class']);
+ foreach ($classes as &$class) {
+ $class = $this->tokenize_value($class, $row_index);
+ $class = views_clean_css_identifier($class);
+ }
+ return implode(' ', $classes);
+ }
+
+ /**
+ * Replace a value with tokens from the last field.
+ *
+ * This function actually figures out which field was last and uses its
+ * tokens so they will all be available.
+ */
+ function tokenize_value($value, $row_index = NULL) {
+ if (strpos($value, '[') !== FALSE || strpos($value, '!') !== FALSE || strpos($value, '%') !== FALSE) {
+ $fake_item = array(
+ 'alter_text' => TRUE,
+ 'text' => $value,
+ );
+
+ // Use isset() because empty() will trigger on 0 and 0 is
+ // the first row.
+ if (isset($row_index) && isset($this->view->style_plugin->render_tokens[$row_index])) {
+ $tokens = $this->view->style_plugin->render_tokens[$row_index];
+ }
+ else {
+ // Get tokens from the last field.
+ $last_field = end($this->view->field);
+ if (isset($last_field->last_tokens)) {
+ $tokens = $last_field->last_tokens;
+ }
+ else {
+ $tokens = $last_field->get_render_tokens($fake_item);
+ }
+ }
+
+ $value = strip_tags($this->render_altered($fake_item, $tokens));
+ if (!empty($this->options['alter']['trim_whitespace'])) {
+ $value = trim($value);
+ }
+ }
+
+ return $value;
+ }
+
+ /**
+ * Return the class of the field's label.
+ */
+ function element_label_classes($row_index = NULL) {
+ $classes = explode(' ', $this->options['element_label_class']);
+ foreach ($classes as &$class) {
+ $class = $this->tokenize_value($class, $row_index);
+ $class = views_clean_css_identifier($class);
+ }
+ return implode(' ', $classes);
+ }
+
+ /**
+ * Return the class of the field's wrapper.
+ */
+ function element_wrapper_classes($row_index = NULL) {
+ $classes = explode(' ', $this->options['element_wrapper_class']);
+ foreach ($classes as &$class) {
+ $class = $this->tokenize_value($class, $row_index);
+ $class = views_clean_css_identifier($class);
+ }
+ return implode(' ', $classes);
+ }
+
+ /**
+ * Get the value that's supposed to be rendered.
+ *
+ * This api exists so that other modules can easy set the values of the field
+ * without having the need to change the render method as well.
+ *
+ * @param $values
+ * An object containing all retrieved values.
+ * @param $field
+ * Optional name of the field where the value is stored.
+ */
+ function get_value($values, $field = NULL) {
+ $alias = isset($field) ? $this->aliases[$field] : $this->field_alias;
+ if (isset($values->{$alias})) {
+ return $values->{$alias};
+ }
+ }
+
+ function option_definition() {
+ $options = parent::option_definition();
+
+ $options['label'] = array('default' => $this->definition['title'], 'translatable' => TRUE);
+ $options['exclude'] = array('default' => FALSE, 'bool' => TRUE);
+ $options['alter'] = array(
+ 'contains' => array(
+ 'alter_text' => array('default' => FALSE),
+ '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),
+ 'path_case' => array('default' => 'none', 'translatable' => FALSE),
+ 'trim_whitespace' => array('default' => FALSE),
+ '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),
+ 'max_length' => array('default' => ''),
+ 'word_boundary' => array('default' => TRUE),
+ 'ellipsis' => array('default' => TRUE),
+ 'more_link' => array('default' => FALSE),
+ 'more_link_text' => array('default' => '', 'translatable' => TRUE),
+ 'more_link_path' => array('default' => ''),
+ 'strip_tags' => array('default' => FALSE),
+ 'trim' => array('default' => FALSE),
+ 'preserve_tags' => array('default' => ''),
+ 'html' => array('default' => FALSE),
+ ),
+ );
+ $options['element_type'] = array('default' => '');
+ $options['element_class'] = array('default' => '');
+
+ $options['element_label_type'] = array('default' => '');
+ $options['element_label_class'] = array('default' => '');
+ $options['element_label_colon'] = array('default' => TRUE);
+
+ $options['element_wrapper_type'] = array('default' => '');
+ $options['element_wrapper_class'] = array('default' => '');
+
+ $options['element_default_classes'] = array('default' => 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);
+
+ return $options;
+ }
+
+ /**
+ * Performs some cleanup tasks on the options array before saving it.
+ */
+ function options_submit(&$form, &$form_state) {
+ $options = &$form_state['values']['options'];
+ $types = array('element_type', 'element_label_type', 'element_wrapper_type');
+ $classes = array_combine(array('element_class', 'element_label_class', 'element_wrapper_class'), $types);
+
+ foreach ($types as $type) {
+ if (!$options[$type . '_enable']) {
+ $options[$type] = '';
+ }
+ }
+
+ foreach ($classes as $class => $type) {
+ if (!$options[$class . '_enable'] || !$options[$type . '_enable']) {
+ $options[$class] = '';
+ }
+ }
+
+ if (empty($options['custom_label'])) {
+ $options['label'] = '';
+ $options['element_label_colon'] = FALSE;
+ }
+ }
+
+ /**
+ * Default options form that provides the label widget that all fields
+ * should have.
+ */
+ function options_form(&$form, &$form_state) {
+ parent::options_form($form, $form_state);
+
+ $label = $this->label();
+ $form['custom_label'] = array(
+ '#type' => 'checkbox',
+ '#title' => t('Create a label'),
+ '#description' => t('Enable to create a label for this field.'),
+ '#default_value' => $label !== '',
+ '#weight' => -103,
+ );
+ $form['label'] = array(
+ '#type' => 'textfield',
+ '#title' => t('Label'),
+ '#default_value' => $label,
+ '#dependency' => array(
+ 'edit-options-custom-label' => array(1),
+ ),
+ '#weight' => -102,
+ );
+ $form['element_label_colon'] = array(
+ '#type' => 'checkbox',
+ '#title' => t('Place a colon after the label'),
+ '#default_value' => $this->options['element_label_colon'],
+ '#dependency' => array(
+ 'edit-options-custom-label' => array(1),
+ ),
+ '#weight' => -101,
+ );
+
+ $form['exclude'] = array(
+ '#type' => 'checkbox',
+ '#title' => t('Exclude from display'),
+ '#default_value' => $this->options['exclude'],
+ '#description' => t('Enable to load this field as hidden. Often used to group fields, or to use as token in another field.'),
+ '#weight' => -100,
+ );
+
+ $form['style_settings'] = array(
+ '#type' => 'fieldset',
+ '#title' => t('Style settings'),
+ '#collapsible' => TRUE,
+ '#collapsed' => TRUE,
+ '#weight' => 99,
+ );
+
+ $form['element_type_enable'] = array(
+ '#type' => 'checkbox',
+ '#title' => t('Customize field HTML'),
+ '#default_value' => !empty($this->options['element_type']) || (string) $this->options['element_type'] == '0' || !empty($this->options['element_class']) || (string) $this->options['element_class'] == '0',
+ '#fieldset' => 'style_settings',
+ );
+ $form['element_type'] = array(
+ '#title' => t('HTML element'),
+ '#options' => $this->get_elements(),
+ '#type' => 'select',
+ '#default_value' => $this->options['element_type'],
+ '#description' => t('Choose the HTML element to wrap around this field, e.g. H1, H2, etc.'),
+ '#dependency' => array(
+ 'edit-options-element-type-enable' => array(1),
+ ),
+ '#fieldset' => 'style_settings',
+ );
+
+ $form['element_class_enable'] = array(
+ '#type' => 'checkbox',
+ '#title' => t('Create a CSS class'),
+ '#dependency' => array(
+ 'edit-options-element-type-enable' => array(1),
+ ),
+ '#default_value' => !empty($this->options['element_class']) || (string) $this->options['element_class'] == '0',
+ '#fieldset' => 'style_settings',
+ );
+ $form['element_class'] = array(
+ '#title' => t('CSS class'),
+ '#description' => t('You may use token substitutions from the rewriting section in this class.'),
+ '#type' => 'textfield',
+ '#default_value' => $this->options['element_class'],
+ '#dependency' => array(
+ 'edit-options-element-class-enable' => array(1),
+ 'edit-options-element-type-enable' => array(1),
+ ),
+ '#dependency_count' => 2,
+ '#fieldset' => 'style_settings',
+ );
+
+ $form['element_label_type_enable'] = array(
+ '#type' => 'checkbox',
+ '#title' => t('Customize label HTML'),
+ '#default_value' => !empty($this->options['element_label_type']) || (string) $this->options['element_label_type'] == '0' || !empty($this->options['element_label_class']) || (string) $this->options['element_label_class'] == '0',
+ '#fieldset' => 'style_settings',
+ );
+ $form['element_label_type'] = array(
+ '#title' => t('Label HTML element'),
+ '#options' => $this->get_elements(FALSE),
+ '#type' => 'select',
+ '#default_value' => $this->options['element_label_type'],
+ '#description' => t('Choose the HTML element to wrap around this label, e.g. H1, H2, etc.'),
+ '#dependency' => array(
+ 'edit-options-element-label-type-enable' => array(1),
+ ),
+ '#fieldset' => 'style_settings',
+ );
+ $form['element_label_class_enable'] = array(
+ '#type' => 'checkbox',
+ '#title' => t('Create a CSS class'),
+ '#dependency' => array(
+ 'edit-options-element-label-type-enable' => array(1)
+ ),
+ '#default_value' => !empty($this->options['element_label_class']) || (string) $this->options['element_label_class'] == '0',
+ '#fieldset' => 'style_settings',
+ );
+ $form['element_label_class'] = array(
+ '#title' => t('CSS class'),
+ '#description' => t('You may use token substitutions from the rewriting section in this class.'),
+ '#type' => 'textfield',
+ '#default_value' => $this->options['element_label_class'],
+ '#dependency' => array(
+ 'edit-options-element-label-class-enable' => array(1),
+ 'edit-options-element-label-type-enable' => array(1),
+ ),
+ '#dependency_count' => 2,
+ '#fieldset' => 'style_settings',
+ );
+
+ $form['element_wrapper_type_enable'] = array(
+ '#type' => 'checkbox',
+ '#title' => t('Customize field and label wrapper HTML'),
+ '#default_value' => !empty($this->options['element_wrapper_type']) || (string) $this->options['element_wrapper_type'] == '0' || !empty($this->options['element_wrapper_class']) || (string) $this->options['element_wrapper_class'] == '0',
+ '#fieldset' => 'style_settings',
+ );
+ $form['element_wrapper_type'] = array(
+ '#title' => t('Wrapper HTML element'),
+ '#options' => $this->get_elements(FALSE),
+ '#type' => 'select',
+ '#default_value' => $this->options['element_wrapper_type'],
+ '#description' => t('Choose the HTML element to wrap around this field and label, e.g. H1, H2, etc. This may not be used if the field and label are not rendered together, such as with a table.'),
+ '#dependency' => array(
+ 'edit-options-element-wrapper-type-enable' => array(1),
+ ),
+ '#fieldset' => 'style_settings',
+ );
+
+ $form['element_wrapper_class_enable'] = array(
+ '#type' => 'checkbox',
+ '#title' => t('Create a CSS class'),
+ '#dependency' => array(
+ 'edit-options-element-wrapper-type-enable' => array(1),
+ ),
+ '#default_value' => !empty($this->options['element_wrapper_class']) || (string) $this->options['element_wrapper_class'] == '0',
+ '#fieldset' => 'style_settings',
+ );
+ $form['element_wrapper_class'] = array(
+ '#title' => t('CSS class'),
+ '#description' => t('You may use token substitutions from the rewriting section in this class.'),
+ '#type' => 'textfield',
+ '#default_value' => $this->options['element_wrapper_class'],
+ '#dependency' => array(
+ 'edit-options-element-wrapper-class-enable' => array(1),
+ 'edit-options-element-wrapper-type-enable' => array(1),
+ ),
+ '#dependency_count' => 2,
+ '#fieldset' => 'style_settings',
+ );
+
+ $form['element_default_classes'] = array(
+ '#type' => 'checkbox',
+ '#title' => t('Add default classes'),
+ '#default_value' => $this->options['element_default_classes'],
+ '#description' => t('Use default Views classes to identify the field, field label and field content.'),
+ '#fieldset' => 'style_settings',
+ );
+
+ $form['alter'] = array(
+ '#title' => t('Rewrite results'),
+ '#type' => 'fieldset',
+ '#collapsible' => TRUE,
+ '#collapsed' => TRUE,
+ '#weight' => 100,
+ );
+
+ if ($this->allow_advanced_render()) {
+ $form['alter']['#tree'] = TRUE;
+ $form['alter']['alter_text'] = array(
+ '#type' => 'checkbox',
+ '#title' => t('Rewrite the output of this field'),
+ '#description' => t('Enable to override the output of this field with custom text or replacement tokens.'),
+ '#default_value' => $this->options['alter']['alter_text'],
+ );
+
+ $form['alter']['text'] = array(
+ '#title' => t('Text'),
+ '#type' => 'textarea',
+ '#default_value' => $this->options['alter']['text'],
+ '#description' => t('The text to display for this field. You may include HTML. You may enter data from this view as per the "Replacement patterns" below.'),
+ '#dependency' => array(
+ 'edit-options-alter-alter-text' => array(1),
+ ),
+ );
+
+ $form['alter']['make_link'] = array(
+ '#type' => 'checkbox',
+ '#title' => t('Output this field as a link'),
+ '#description' => t('If checked, this field will be made into a link. The destination must be given below.'),
+ '#default_value' => $this->options['alter']['make_link'],
+ );
+ $form['alter']['path'] = array(
+ '#title' => t('Link path'),
+ '#type' => 'textfield',
+ '#default_value' => $this->options['alter']['path'],
+ '#description' => t('The Drupal path or absolute URL for this link. You may enter data from this view as per the "Replacement patterns" below.'),
+ '#dependency' => array(
+ 'edit-options-alter-make-link' => array(1),
+ ),
+ '#maxlength' => 255,
+ );
+ $form['alter']['absolute'] = array(
+ '#type' => 'checkbox',
+ '#title' => t('Use absolute path'),
+ '#default_value' => $this->options['alter']['absolute'],
+ '#dependency' => array(
+ 'edit-options-alter-make-link' => array(1),
+ ),
+ );
+ $form['alter']['replace_spaces'] = array(
+ '#type' => 'checkbox',
+ '#title' => t('Replace spaces with dashes'),
+ '#default_value' => $this->options['alter']['replace_spaces'],
+ '#dependency' => array(
+ 'edit-options-alter-make-link' => array(1)
+ ),
+ );
+ $form['alter']['external'] = array(
+ '#type' => 'checkbox',
+ '#title' => t('External server URL'),
+ '#default_value' => $this->options['alter']['external'],
+ '#description' => t("Links to an external server using a full URL: e.g. 'http://www.example.com' or 'www.example.com'."),
+ '#dependency' => array(
+ 'edit-options-alter-make-link' => array(1),
+ ),
+ );
+ $form['alter']['path_case'] = array(
+ '#type' => 'select',
+ '#title' => t('Transform the case'),
+ '#description' => t('When printing url paths, how to transform the case of the filter value.'),
+ '#dependency' => array(
+ 'edit-options-alter-make-link' => array(1),
+ ),
+ '#options' => array(
+ 'none' => t('No transform'),
+ 'upper' => t('Upper case'),
+ 'lower' => t('Lower case'),
+ 'ucfirst' => t('Capitalize first letter'),
+ 'ucwords' => t('Capitalize each word'),
+ ),
+ '#default_value' => $this->options['alter']['path_case'],
+ );
+ $form['alter']['link_class'] = array(
+ '#title' => t('Link class'),
+ '#type' => 'textfield',
+ '#default_value' => $this->options['alter']['link_class'],
+ '#description' => t('The CSS class to apply to the link.'),
+ '#dependency' => array(
+ 'edit-options-alter-make-link' => array(1),
+ ),
+ );
+ $form['alter']['alt'] = array(
+ '#title' => t('Title text'),
+ '#type' => 'textfield',
+ '#default_value' => $this->options['alter']['alt'],
+ '#description' => t('Text to place as "title" text which most browsers display as a tooltip when hovering over the link.'),
+ '#dependency' => array(
+ 'edit-options-alter-make-link' => array(1),
+ ),
+ );
+ $form['alter']['rel'] = array(
+ '#title' => t('Rel Text'),
+ '#type' => 'textfield',
+ '#default_value' => $this->options['alter']['rel'],
+ '#description' => t('Include Rel attribute for use in lightbox2 or other javascript utility.'),
+ '#dependency' => array(
+ 'edit-options-alter-make-link' => array(1),
+ ),
+ );
+ $form['alter']['prefix'] = array(
+ '#title' => t('Prefix text'),
+ '#type' => 'textfield',
+ '#default_value' => $this->options['alter']['prefix'],
+ '#description' => t('Any text to display before this link. You may include HTML.'),
+ '#dependency' => array(
+ 'edit-options-alter-make-link' => array(1),
+ ),
+ );
+ $form['alter']['suffix'] = array(
+ '#title' => t('Suffix text'),
+ '#type' => 'textfield',
+ '#default_value' => $this->options['alter']['suffix'],
+ '#description' => t('Any text to display after this link. You may include HTML.'),
+ '#dependency' => array(
+ 'edit-options-alter-make-link' => array(1),
+ ),
+ );
+ $form['alter']['target'] = array(
+ '#title' => t('Target'),
+ '#type' => 'textfield',
+ '#default_value' => $this->options['alter']['target'],
+ '#description' => t("Target of the link, such as _blank, _parent or an iframe's name. This field is rarely used."),
+ '#dependency' => array(
+ 'edit-options-alter-make-link' => array(1),
+ ),
+ );
+
+
+ // Get a list of the available fields and arguments for token replacement.
+ $options = array();
+ foreach ($this->view->display_handler->get_handlers('field') as $field => $handler) {
+ $options[t('Fields')]["[$field]"] = $handler->ui_name();
+ // We only use fields up to (and including) this one.
+ if ($field == $this->options['id']) {
+ break;
+ }
+ }
+ $count = 0; // This lets us prepare the key as we want it printed.
+ foreach ($this->view->display_handler->get_handlers('argument') as $arg => $handler) {
+ $options[t('Arguments')]['%' . ++$count] = t('@argument title', array('@argument' => $handler->ui_name()));
+ $options[t('Arguments')]['!' . $count] = t('@argument input', array('@argument' => $handler->ui_name()));
+ }
+
+ $this->document_self_tokens($options[t('Fields')]);
+
+ // Default text.
+ $output = t('<p>You must add some additional fields to this display before using this field. These fields may be marked as <em>Exclude from display</em> if you prefer. 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.</p>');
+ // 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>');
+ foreach (array_keys($options) as $type) {
+ if (!empty($options[$type])) {
+ $items = array();
+ foreach ($options[$type] as $key => $value) {
+ $items[] = $key . ' == ' . $value;
+ }
+ $output .= theme('item_list',
+ array(
+ 'items' => $items,
+ 'type' => $type
+ ));
+ }
+ }
+ }
+ // This construct uses 'hidden' and not markup because process doesn't
+ // run. It also has an extra div because the dependency wants to hide
+ // the parent in situations like this, so we need a second div to
+ // make this work.
+ $form['alter']['help'] = array(
+ '#type' => 'fieldset',
+ '#title' => t('Replacement patterns'),
+ '#collapsible' => TRUE,
+ '#collapsed' => TRUE,
+ '#value' => $output,
+ '#dependency' => array(
+ 'edit-options-alter-make-link' => array(1),
+ 'edit-options-alter-alter-text' => array(1),
+ 'edit-options-alter-more-link' => array(1),
+ ),
+ );
+
+ $form['alter']['trim'] = array(
+ '#type' => 'checkbox',
+ '#title' => t('Trim this field to a maximum length'),
+ '#description' => t('Enable to trim the field to a maximum length of characters'),
+ '#default_value' => $this->options['alter']['trim'],
+ );
+
+ $form['alter']['max_length'] = array(
+ '#title' => t('Maximum length'),
+ '#type' => 'textfield',
+ '#default_value' => $this->options['alter']['max_length'],
+ '#description' => t('The maximum number of characters this field can be.'),
+ '#dependency' => array(
+ 'edit-options-alter-trim' => array(1),
+ ),
+ );
+
+ $form['alter']['word_boundary'] = array(
+ '#type' => 'checkbox',
+ '#title' => t('Trim only on a word boundary'),
+ '#description' => t('If checked, this field be trimmed only on a word boundary. This is guaranteed to be the maximum characters stated or less. If there are no word boundaries this could trim a field to nothing.'),
+ '#default_value' => $this->options['alter']['word_boundary'],
+ '#dependency' => array(
+ 'edit-options-alter-trim' => array(1),
+ ),
+ );
+
+ $form['alter']['ellipsis'] = array(
+ '#type' => 'checkbox',
+ '#title' => t('Add an ellipsis'),
+ '#description' => t('If checked, a "..." will be added if a field was trimmed.'),
+ '#default_value' => $this->options['alter']['ellipsis'],
+ '#dependency' => array(
+ 'edit-options-alter-trim' => array(1),
+ ),
+ );
+
+ $form['alter']['more_link'] = array(
+ '#type' => 'checkbox',
+ '#title' => t('Add a read-more link if output is trimmed.'),
+ '#description' => t('If checked, a read-more link will be added at the end of the trimmed output'),
+ '#default_value' => $this->options['alter']['more_link'],
+ '#dependency' => array(
+ 'edit-options-alter-trim' => array(1),
+ ),
+ );
+
+ $form['alter']['more_link_text'] = array(
+ '#type' => 'textfield',
+ '#title' => t('More link text'),
+ '#default_value' => $this->options['alter']['more_link_text'],
+ '#description' => t('The text which will be displayed on the more link. You may enter data from this view as per the "Replacement patterns" above.'),
+ '#dependency_count' => 2,
+ '#dependency' => array(
+ 'edit-options-alter-trim' => array(1),
+ 'edit-options-alter-more-link' => array(1),
+ ),
+ );
+ $form['alter']['more_link_path'] = array(
+ '#type' => 'textfield',
+ '#title' => t('More link path'),
+ '#default_value' => $this->options['alter']['more_link_path'],
+ '#description' => t('The path which is used for the more link. You may enter data from this view as per the "Replacement patterns" above.'),
+ '#dependency_count' => 2,
+ '#dependency' => array(
+ 'edit-options-alter-trim' => array(1),
+ 'edit-options-alter-more-link' => array(1),
+ ),
+ );
+
+ $form['alter']['html'] = array(
+ '#type' => 'checkbox',
+ '#title' => t('Field can contain HTML'),
+ '#description' => t('If checked, HTML corrector will be run to ensure tags are properly closed after trimming.'),
+ '#default_value' => $this->options['alter']['html'],
+ '#dependency' => array(
+ 'edit-options-alter-trim' => array(1),
+ ),
+ );
+
+ $form['alter']['strip_tags'] = array(
+ '#type' => 'checkbox',
+ '#title' => t('Strip HTML tags'),
+ '#description' => t('If checked, all HTML tags will be stripped.'),
+ '#default_value' => $this->options['alter']['strip_tags'],
+ );
+
+ $form['alter']['preserve_tags'] = array(
+ '#type' => 'textfield',
+ '#title' => t('Preserve certain tags'),
+ '#description' => t('List the tags that need to be preserved during the stripping process. example &quot;&lt;p&gt; &lt;br&gt;&quot; which will preserve all p and br elements'),
+ '#default_value' => $this->options['alter']['preserve_tags'],
+ '#dependency' => array(
+ 'edit-options-alter-strip-tags' => array(1),
+ ),
+ );
+
+ $form['alter']['trim_whitespace'] = array(
+ '#type' => 'checkbox',
+ '#title' => t('Remove whitespace'),
+ '#description' => t('If checked, all whitespaces at the beginning and the end of the output will be removed.'),
+ '#default_value' => $this->options['alter']['trim_whitespace'],
+ );
+
+ $form['alter']['nl2br'] = array(
+ '#type' => 'checkbox',
+ '#title' => t('Convert newlines to HTML &lt;br&gt; tags'),
+ '#description' => t('If checked, all newlines chars (e.g. \n) are converted into HTML &lt;br&gt; tags.'),
+ '#default_value' => $this->options['alter']['nl2br'],
+ );
+ }
+
+ $form['empty_field_behavior'] = array(
+ '#type' => 'fieldset',
+ '#title' => t('No results behavior'),
+ '#collapsible' => TRUE,
+ '#collapsed' => TRUE,
+ '#weight' => 100,
+ );
+
+ $form['empty'] = array(
+ '#type' => 'textarea',
+ '#title' => t('No results text'),
+ '#default_value' => $this->options['empty'],
+ '#description' => t('Provide text to display if this field returns no results. You may include HTML. You may enter data from this view as per the "Replacement patterns" in the "Rewrite Results" section below.'),
+ '#fieldset' => 'empty_field_behavior',
+ );
+
+ $form['empty_zero'] = array(
+ '#type' => 'checkbox',
+ '#title' => t('Count the number 0 as empty'),
+ '#default_value' => $this->options['empty_zero'],
+ '#description' => t('Enable to display the "no results text" if the field contains the number 0.'),
+ '#fieldset' => 'empty_field_behavior',
+ );
+
+ $form['hide_empty'] = array(
+ '#type' => 'checkbox',
+ '#title' => t('Hide if empty'),
+ '#default_value' => $this->options['hide_empty'],
+ '#description' => t('Enable to hide this field if it is empty. Note that the field label or rewritten output may still be displayed. To hide labels, check the style or row style settings for empty fields. To hide rewritten content, check the "Hide rewriting if empty" checkbox.'),
+ '#fieldset' => 'empty_field_behavior',
+ );
+
+ $form['hide_alter_empty'] = array(
+ '#type' => 'checkbox',
+ '#title' => t('Hide rewriting if empty'),
+ '#default_value' => $this->options['hide_alter_empty'],
+ '#description' => t('Do not display rewritten content if this field is empty.'),
+ '#fieldset' => 'empty_field_behavior',
+ );
+ }
+
+ /**
+ * Provide extra data to the administration form
+ */
+ function admin_summary() {
+ return $this->label();
+ }
+
+ /**
+ * Run before any fields are rendered.
+ *
+ * This gives the handlers some time to set up before any handler has
+ * been rendered.
+ *
+ * @param $values
+ * An array of all objects returned from the query.
+ */
+ function pre_render(&$values) { }
+
+ /**
+ * Render the field.
+ *
+ * @param $values
+ * The values retrieved from the database.
+ */
+ function render($values) {
+ $value = $this->get_value($values);
+ return $this->sanitize_value($value);
+ }
+
+ /**
+ * Render a field using advanced settings.
+ *
+ * This renders a field normally, then decides if render-as-link and
+ * text-replacement rendering is necessary.
+ */
+ function advanced_render($values) {
+ if ($this->allow_advanced_render() && method_exists($this, 'render_item')) {
+ $raw_items = $this->get_items($values);
+ }
+ else {
+ $value = $this->render($values);
+ if (is_array($value)) {
+ $value = drupal_render($value);
+ }
+ $this->last_render = $value;
+ $this->original_value = $value;
+ }
+
+ if ($this->allow_advanced_render()) {
+ $tokens = NULL;
+ if (method_exists($this, 'render_item')) {
+ $items = array();
+ foreach ($raw_items as $count => $item) {
+ $value = $this->render_item($count, $item);
+ if (is_array($value)) {
+ $value = drupal_render($value);
+ }
+ $this->last_render = $value;
+ $this->original_value = $this->last_render;
+
+ $alter = $item + $this->options['alter'];
+ $alter['phase'] = VIEWS_HANDLER_RENDER_TEXT_PHASE_SINGLE_ITEM;
+ $items[] = $this->render_text($alter);
+ }
+
+ $value = $this->render_items($items);
+ }
+ else {
+ $alter = array('phase' => VIEWS_HANDLER_RENDER_TEXT_PHASE_COMPLETELY) + $this->options['alter'];
+ $value = $this->render_text($alter);
+ }
+
+ if (is_array($value)) {
+ $value = drupal_render($value);
+ }
+ // This happens here so that render_as_link can get the unaltered value of
+ // this field as a token rather than the altered value.
+ $this->last_render = $value;
+ }
+
+ if (empty($this->last_render)) {
+ if (($this->last_render !== 0 && $this->last_render !== '0') || !empty($this->options['empty_zero'])) {
+ $alter = $this->options['alter'];
+ $alter['alter_text'] = 1;
+ $alter['text'] = $this->options['empty'];
+ $alter['phase'] = VIEWS_HANDLER_RENDER_TEXT_PHASE_EMPTY;
+ $this->last_render = $this->render_text($alter);
+ }
+ }
+
+ return $this->last_render;
+ }
+
+ /**
+ * Perform an advanced text render for the item.
+ *
+ * This is separated out as some fields may render lists, and this allows
+ * each item to be handled individually.
+ */
+ function render_text($alter) {
+ $value = $this->last_render;
+
+ if (!empty($alter['alter_text']) && $alter['text'] !== '') {
+ $tokens = $this->get_render_tokens($alter);
+ $value = $this->render_altered($alter, $tokens);
+ }
+
+ if (!empty($this->options['alter']['trim_whitespace'])) {
+ $value = trim($value);
+ }
+
+ // Check if there should be no further rewrite for empty values.
+ $no_rewrite_for_empty = $this->options['hide_alter_empty'] && empty($this->original_value);
+
+ // 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'])) {
+ return '';
+ }
+ // Only in empty phase.
+ if ($alter['phase'] == VIEWS_HANDLER_RENDER_TEXT_PHASE_EMPTY && $no_rewrite_for_empty) {
+ // If we got here then $alter contains the value of "No results text"
+ // and so there is nothing left to do.
+ return $value;
+ }
+
+ if (!empty($alter['strip_tags'])) {
+ $value = strip_tags($value, $alter['preserve_tags']);
+ }
+
+ $suffix = '';
+ if (!empty($alter['trim']) && !empty($alter['max_length'])) {
+ $length = strlen($value);
+ $value = $this->render_trim_text($alter, $value);
+ if ($this->options['alter']['more_link'] && strlen($value) < $length) {
+ $tokens = $this->get_render_tokens($alter);
+ $more_link_text = $this->options['alter']['more_link_text'] ? $this->options['alter']['more_link_text'] : t('more');
+ $more_link_text = strtr(filter_xss_admin($more_link_text), $tokens);
+ $more_link_path = $this->options['alter']['more_link_path'];
+ $more_link_path = strip_tags(decode_entities(strtr($more_link_path, $tokens)));
+
+ // Take sure that paths which was runned through url() does work as well.
+ $base_path = base_path();
+ // Checks whether the path starts with the base_path.
+ if (strpos($more_link_path, $base_path) === 0) {
+ $more_link_path = drupal_substr($more_link_path, drupal_strlen($base_path));
+ }
+
+ $more_link = l($more_link_text, $more_link_path);
+
+ $suffix .= " " . $more_link;
+ }
+ }
+
+ if (!empty($alter['nl2br'])) {
+ $value = nl2br($value);
+ }
+ $this->last_render_text = $value;
+
+ if (!empty($alter['make_link']) && !empty($alter['path'])) {
+ if (!isset($tokens)) {
+ $tokens = $this->get_render_tokens($alter);
+ }
+ $value = $this->render_as_link($alter, $value, $tokens);
+ }
+
+ return $value . $suffix;
+ }
+
+ /**
+ * Render this field as altered text, from a fieldset set by the user.
+ */
+ function render_altered($alter, $tokens) {
+ // Filter this right away as our substitutions are already sanitized.
+ $value = filter_xss_admin($alter['text']);
+ $value = strtr($value, $tokens);
+
+ return $value;
+ }
+
+ /**
+ * Trim the field down to the specified length.
+ */
+ function render_trim_text($alter, $value) {
+ if (!empty($alter['strip_tags'])) {
+ // NOTE: It's possible that some external fields might override the
+ // element type so if someone from, say, CCK runs into a bug here,
+ // this may be why =)
+ $this->definition['element type'] = 'span';
+ }
+ return views_trim_text($alter, $value);
+ }
+
+ /**
+ * Render this field as a link, with the info from a fieldset set by
+ * the user.
+ */
+ function render_as_link($alter, $text, $tokens) {
+ $value = '';
+
+ if (!empty($alter['prefix'])) {
+ $value .= filter_xss_admin(strtr($alter['prefix'], $tokens));
+ }
+
+ $options = array(
+ 'html' => TRUE,
+ 'absolute' => !empty($alter['absolute']) ? TRUE : FALSE,
+ );
+
+ // $path will be run through check_url() by l() so we do not need to
+ // sanitize it ourselves.
+ $path = $alter['path'];
+
+ // strip_tags() removes <front>, so check whether its different to front.
+ if ($path != '<front>') {
+ // Use strip tags as there should never be HTML in the path.
+ // However, we need to preserve special characters like " that
+ // were removed by check_plain().
+ $path = strip_tags(decode_entities(strtr($path, $tokens)));
+
+ if (!empty($alter['path_case']) && $alter['path_case'] != 'none') {
+ $path = $this->case_transform($path, $this->options['alter']['path_case']);
+ }
+
+ if (!empty($alter['replace_spaces'])) {
+ $path = str_replace(' ', '-', $path);
+ }
+ }
+
+ // Parse the URL and move any query and fragment parameters out of the path.
+ $url = parse_url($path);
+
+ // Seriously malformed URLs may return FALSE or empty arrays.
+ if (empty($url)) {
+ return $text;
+ }
+
+ // If the path is empty do not build a link around the given text and return
+ // it as is.
+ // http://www.example.com URLs will not have a $url['path'], so check host as well.
+ if (empty($url['path']) && empty($url['host']) && empty($url['fragment'])) {
+ return $text;
+ }
+
+ // If no scheme is provided in the $path, assign the default 'http://'.
+ // This allows a url of 'www.example.com' to be converted to 'http://www.example.com'.
+ // Only do this on for external URLs.
+ if ($alter['external']){
+ if (!isset($url['scheme'])) {
+ // There is no scheme, add the default 'http://' to the $path.
+ $path = "http://$path";
+ // Reset the $url array to include the new scheme.
+ $url = parse_url($path);
+ }
+ }
+
+ if (isset($url['query'])) {
+ $path = strtr($path, array('?' . $url['query'] => ''));
+ $options['query'] = drupal_get_query_array($url['query']);
+ }
+ if (isset($url['fragment'])) {
+ $path = strtr($path, array('#' . $url['fragment'] => ''));
+ // If the path is empty we want to have a fragment for the current site.
+ if ($path == '') {
+ $options['external'] = TRUE;
+ }
+ $options['fragment'] = $url['fragment'];
+ }
+
+ $alt = strtr($alter['alt'], $tokens);
+ // Set the title attribute of the link only if it improves accessibility
+ if ($alt && $alt != $text) {
+ $options['attributes']['title'] = decode_entities($alt);
+ }
+
+ $class = strtr($alter['link_class'], $tokens);
+ if ($class) {
+ $options['attributes']['class'] = array($class);
+ }
+
+ if (!empty($alter['rel']) && $rel = strtr($alter['rel'], $tokens)) {
+ $options['attributes']['rel'] = $rel;
+ }
+
+ $target = check_plain(trim(strtr($alter['target'],$tokens)));
+ if (!empty($target)) {
+ $options['attributes']['target'] = $target;
+ }
+
+ // Allow the addition of arbitrary attributes to links. Additional attributes
+ // currently can only be altered in preprocessors and not within the UI.
+ if (isset($alter['link_attributes']) && is_array($alter['link_attributes'])) {
+ foreach ($alter['link_attributes'] as $key => $attribute) {
+ if (!isset($options['attributes'][$key])) {
+ $options['attributes'][$key] = strtr($attribute, $tokens);
+ }
+ }
+ }
+
+ // If the query and fragment were programatically assigned overwrite any
+ // parsed values.
+ if (isset($alter['query'])) {
+ // Convert the query to a string, perform token replacement, and then
+ // convert back to an array form for l().
+ $options['query'] = drupal_http_build_query($alter['query']);
+ $options['query'] = strtr($options['query'], $tokens);
+ $options['query'] = drupal_get_query_array($options['query']);
+ }
+ if (isset($alter['alias'])) {
+ // Alias is a boolean field, so no token.
+ $options['alias'] = $alter['alias'];
+ }
+ if (isset($alter['fragment'])) {
+ $options['fragment'] = strtr($alter['fragment'], $tokens);
+ }
+ if (isset($alter['language'])) {
+ $options['language'] = $alter['language'];
+ }
+
+ // If the url came from entity_uri(), pass along the required options.
+ if (isset($alter['entity'])) {
+ $options['entity'] = $alter['entity'];
+ }
+ if (isset($alter['entity_type'])) {
+ $options['entity_type'] = $alter['entity_type'];
+ }
+
+ $value .= l($text, $path, $options);
+
+ if (!empty($alter['suffix'])) {
+ $value .= filter_xss_admin(strtr($alter['suffix'], $tokens));
+ }
+
+ return $value;
+ }
+
+ /**
+ * Get the 'render' tokens to use for advanced rendering.
+ *
+ * This runs through all of the fields and arguments that
+ * are available and gets their values. This will then be
+ * used in one giant str_replace().
+ */
+ function get_render_tokens($item) {
+ $tokens = array();
+ if (!empty($this->view->build_info['substitutions'])) {
+ $tokens = $this->view->build_info['substitutions'];
+ }
+ $count = 0;
+ foreach ($this->view->display_handler->get_handlers('argument') as $arg => $handler) {
+ $token = '%' . ++$count;
+ if (!isset($tokens[$token])) {
+ $tokens[$token] = '';
+ }
+
+ // Use strip tags as there should never be HTML in the path.
+ // However, we need to preserve special characters like " that
+ // were removed by check_plain().
+ $tokens['!' . $count] = isset($this->view->args[$count - 1]) ? strip_tags(decode_entities($this->view->args[$count - 1])) : '';
+ }
+
+ // Now add replacements for our fields.
+ foreach ($this->view->display_handler->get_handlers('field') as $field => $handler) {
+ if (isset($handler->last_render)) {
+ $tokens["[$field]"] = $handler->last_render;
+ }
+ else {
+ $tokens["[$field]"] = '';
+ }
+ if (!empty($item)) {
+ $this->add_self_tokens($tokens, $item);
+ }
+
+ // We only use fields up to (and including) this one.
+ if ($field == $this->options['id']) {
+ break;
+ }
+ }
+
+ // 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;
+ }
+
+ /**
+ * Add any special tokens this field might use for itself.
+ *
+ * This method is intended to be overridden by items that generate
+ * fields as a list. For example, the field that displays all terms
+ * on a node might have tokens for the tid and the term.
+ *
+ * By convention, tokens should follow the format of [token-subtoken]
+ * where token is the field ID and subtoken is the field. If the
+ * field ID is terms, then the tokens might be [terms-tid] and [terms-name].
+ */
+ function add_self_tokens(&$tokens, $item) { }
+
+ /**
+ * Document any special tokens this field might use for itself.
+ *
+ * @see add_self_tokens() for details.
+ */
+ function document_self_tokens(&$tokens) { }
+
+ /**
+ * Call out to the theme() function, which probably just calls render() but
+ * allows sites to override output fairly easily.
+ */
+ function theme($values) {
+ return theme($this->theme_functions(),
+ array(
+ 'view' => $this->view,
+ 'field' => $this,
+ 'row' => $values
+ ));
+ }
+
+ function theme_functions() {
+ $themes = array();
+ $hook = 'views_view_field';
+
+ $display = $this->view->display[$this->view->current_display];
+
+ if (!empty($display)) {
+ $themes[] = $hook . '__' . $this->view->name . '__' . $display->id . '__' . $this->options['id'];
+ $themes[] = $hook . '__' . $this->view->name . '__' . $display->id;
+ $themes[] = $hook . '__' . $display->id . '__' . $this->options['id'];
+ $themes[] = $hook . '__' . $display->id;
+ if ($display->id != $display->display_plugin) {
+ $themes[] = $hook . '__' . $this->view->name . '__' . $display->display_plugin . '__' . $this->options['id'];
+ $themes[] = $hook . '__' . $this->view->name . '__' . $display->display_plugin;
+ $themes[] = $hook . '__' . $display->display_plugin . '__' . $this->options['id'];
+ $themes[] = $hook . '__' . $display->display_plugin;
+ }
+ }
+ $themes[] = $hook . '__' . $this->view->name . '__' . $this->options['id'];
+ $themes[] = $hook . '__' . $this->view->name;
+ $themes[] = $hook . '__' . $this->options['id'];
+ $themes[] = $hook;
+
+ return $themes;
+ }
+
+ function ui_name($short = FALSE) {
+ return $this->get_field(parent::ui_name($short));
+ }
+}
+
+/**
+ * A special handler to take the place of missing or broken handlers.
+ *
+ * @ingroup views_field_handlers
+ */
+class views_handler_field_broken extends views_handler_field {
+ function ui_name($short = FALSE) {
+ return t('Broken/missing handler');
+ }
+
+ function ensure_my_table() { /* No table to ensure! */ }
+ function query($group_by = FALSE) { /* No query to run */ }
+ function options_form(&$form, &$form_state) {
+ $form['markup'] = array(
+ '#markup' => '<div class="form-item description">' . t('The handler for this item is broken or missing and cannot be used. If a module provided the handler and was disabled, re-enabling the module may restore it. Otherwise, you should probably delete this item.') . '</div>',
+ );
+ }
+
+ /**
+ * Determine if the handler is considered 'broken'
+ */
+ function broken() { return TRUE; }
+}
+
+/**
+ * Render a numeric value as a size.
+ *
+ * @ingroup views_field_handlers
+ */
+class views_handler_field_file_size extends views_handler_field {
+ function option_definition() {
+ $options = parent::option_definition();
+
+ $options['file_size_display'] = array('default' => 'formatted');
+
+ return $options;
+ }
+
+ function options_form(&$form, &$form_state) {
+ parent::options_form($form, $form_state);
+ $form['file_size_display'] = array(
+ '#title' => t('File size display'),
+ '#type' => 'select',
+ '#options' => array(
+ 'formatted' => t('Formatted (in KB or MB)'),
+ 'bytes' => t('Raw bytes'),
+ ),
+ );
+ }
+
+ function render($values) {
+ $value = $this->get_value($values);
+ if ($value) {
+ switch ($this->options['file_size_display']) {
+ case 'bytes':
+ return $value;
+ case 'formatted':
+ default:
+ return format_size($value);
+ }
+ }
+ else {
+ return '';
+ }
+ }
+}
+
+/**
+ * A handler to run a field through simple XSS filtering.
+ *
+ * @ingroup views_field_handlers
+ */
+class views_handler_field_xss extends views_handler_field {
+ function render($values) {
+ $value = $this->get_value($values);
+ return $this->sanitize_value($value, 'xss');
+ }
+}
+
+/**
+ * @}
+ */
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
new file mode 100644
index 0000000..c388d4f
--- /dev/null
+++ b/kolab.org/www/drupal-7.15/sites/all/modules/views/handlers/views_handler_field_boolean.inc
@@ -0,0 +1,75 @@
+<?php
+
+/**
+ * A handler to provide proper displays for booleans.
+ *
+ * Allows for display of true/false, yes/no, on/off, enabled/disabled.
+ *
+ * Definition terms:
+ * - output formats: An array where the first entry is displayed on boolean true
+ * and the second is displayed on boolean false. An example for sticky is:
+ * @code
+ * 'output formats' => array(
+ * 'sticky' => array(t('Sticky'), ''),
+ * ),
+ * @endcode
+ *
+ * @ingroup views_field_handlers
+ */
+class views_handler_field_boolean extends views_handler_field {
+ function option_definition() {
+ $options = parent::option_definition();
+ $options['type'] = array('default' => 'yes-no');
+ $options['not'] = array('definition bool' => 'reverse');
+
+ return $options;
+ }
+
+ function init(&$view, &$options) {
+ parent::init($view, $options);
+
+ $default_formats = array(
+ 'yes-no' => array(t('Yes'), t('No')),
+ 'true-false' => array(t('True'), t('False')),
+ 'on-off' => array(t('On'), t('Off')),
+ 'enabled-disabled' => array(t('Enabled'), t('Disabled')),
+ 'unicode-yes-no' => array('✔', '✖'),
+ );
+ $output_formats = isset($this->definition['output formats']) ? $this->definition['output formats'] : array();
+ $this->formats = array_merge($default_formats, $output_formats);
+ }
+
+ function options_form(&$form, &$form_state) {
+ foreach ($this->formats as $key => $item) {
+ $options[$key] = implode('/', $item);
+ }
+
+ $form['type'] = array(
+ '#type' => 'select',
+ '#title' => t('Output format'),
+ '#options' => $options,
+ '#default_value' => $this->options['type'],
+ );
+ $form['not'] = array(
+ '#type' => 'checkbox',
+ '#title' => t('Reverse'),
+ '#description' => t('If checked, true will be displayed as false.'),
+ '#default_value' => $this->options['not'],
+ );
+ parent::options_form($form, $form_state);
+ }
+
+ function render($values) {
+ $value = $this->get_value($values);
+ if (!empty($this->options['not'])) {
+ $value = !$value;
+ }
+
+ if (isset($this->formats[$this->options['type']])) {
+ return $value ? $this->formats[$this->options['type']][0] : $this->formats[$this->options['type']][1];
+ }
+ else {
+ return $value ? $this->formats['yes-no'][0] : $this->formats['yes-no'][1];
+ }
+ }
+}
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
new file mode 100644
index 0000000..a55ac58
--- /dev/null
+++ b/kolab.org/www/drupal-7.15/sites/all/modules/views/handlers/views_handler_field_contextual_links.inc
@@ -0,0 +1,87 @@
+<?php
+
+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);
+
+ return $options;
+ }
+
+ function options_form(&$form, &$form_state) {
+ $all_fields = $this->view->display_handler->get_field_labels();
+ // Offer to include only those fields that follow this one.
+ $field_options = array_slice($all_fields, 0, array_search($this->options['id'], array_keys($all_fields)));
+ $form['fields'] = array(
+ '#type' => 'checkboxes',
+ '#title' => t('Fields'),
+ '#description' => t('Fields to be included as contextual links.'),
+ '#options' => $field_options,
+ '#default_value' => $this->options['fields'],
+ );
+ $form['destination'] = array(
+ '#type' => 'select',
+ '#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'],
+ );
+ }
+
+ function pre_render(&$values) {
+ // Add a row plugin css class for the contextual link.
+ $class = 'contextual-links-region';
+ if (!empty($this->view->style_plugin->options['row_class'])) {
+ $this->view->style_plugin->options['row_class'] .= " $class";
+ }
+ else {
+ $this->view->style_plugin->options['row_class'] = $class;
+ }
+ }
+
+ /**
+ * Render the contextual fields.
+ */
+ function render($values) {
+ $links = array();
+ foreach ($this->options['fields'] as $field) {
+ if (empty($this->view->field[$field]->last_render_text)) {
+ continue;
+ }
+ $title = $this->view->field[$field]->last_render_text;
+ $path = '';
+ if (!empty($this->view->field[$field]->options['alter']['path'])) {
+ $path = $this->view->field[$field]->options['alter']['path'];
+ }
+ if (!empty($title)) {
+ $links[$field] = array(
+ 'href' => $path,
+ 'title' => $title,
+ );
+ if (!empty($this->options['destination'])) {
+ $links[$field]['query'] = drupal_get_destination();
+ }
+ }
+ }
+ $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);
+ }
+
+ 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
new file mode 100644
index 0000000..d4e52fc
--- /dev/null
+++ b/kolab.org/www/drupal-7.15/sites/all/modules/views/handlers/views_handler_field_counter.inc
@@ -0,0 +1,45 @@
+<?php
+
+/**
+ * Field handler to show a counter of the current row.
+ *
+ * @ingroup views_field_handlers
+ */
+class views_handler_field_counter extends views_handler_field {
+ function option_definition() {
+ $options = parent::option_definition();
+ $options['counter_start'] = array('default' => 1);
+ return $options;
+ }
+
+ function options_form(&$form, &$form_state) {
+ $form['counter_start'] = array(
+ '#type' => 'textfield',
+ '#title' => t('Starting value'),
+ '#default_value' => $this->options['counter_start'],
+ '#description' => t('Specify the number the counter should start at.'),
+ '#size' => 2,
+ );
+
+ parent::options_form($form, $form_state);
+ }
+
+ function query() {
+ // do nothing -- to override the parent query.
+ }
+
+ function render($values) {
+ // Note: 1 is subtracted from the counter start value below because the
+ // counter value is incremented by 1 at the end of this function.
+ $count = is_numeric($this->options['counter_start']) ? $this->options['counter_start'] - 1 : 0;
+ $pager = $this->view->query->pager;
+ // Get the base count of the pager.
+ if ($pager->use_pager()) {
+ $count += ($pager->get_items_per_page() * $pager->get_current_page() + $pager->get_offset());
+ }
+ // Add the counter for the current site.
+ $count += $this->view->row_index + 1;
+
+ return $count;
+ }
+}
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
new file mode 100644
index 0000000..92b5d7c
--- /dev/null
+++ b/kolab.org/www/drupal-7.15/sites/all/modules/views/handlers/views_handler_field_custom.inc
@@ -0,0 +1,50 @@
+<?php
+
+/**
+ * A handler to provide a field that is completely custom by the administrator.
+ *
+ * @ingroup views_field_handlers
+ */
+class views_handler_field_custom extends views_handler_field {
+ function query() {
+ // do nothing -- to override the parent query.
+ }
+
+ function option_definition() {
+ $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);
+ return $options;
+ }
+
+ function options_form(&$form, &$form_state) {
+ parent::options_form($form, $form_state);
+
+ // Remove the checkbox
+ unset($form['alter']['alter_text']);
+ unset($form['alter']['text']['#dependency']);
+ unset($form['alter']['text']['#process']);
+ unset($form['alter']['help']['#dependency']);
+ unset($form['alter']['help']['#process']);
+ $form['#pre_render'][] = 'views_handler_field_custom_pre_render_move_text';
+ }
+
+ function render($values) {
+ // Return the text, so the code never thinks the value is empty.
+ return $this->options['alter']['text'];
+ }
+}
+
+/**
+ * Prerender function to move the textarea to the top.
+ */
+function views_handler_field_custom_pre_render_move_text($form) {
+ $form['text'] = $form['alter']['text'];
+ $form['help'] = $form['alter']['help'];
+ unset($form['alter']['text']);
+ unset($form['alter']['help']);
+
+ return $form;
+}
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
new file mode 100644
index 0000000..b122b66
--- /dev/null
+++ b/kolab.org/www/drupal-7.15/sites/all/modules/views/handlers/views_handler_field_date.inc
@@ -0,0 +1,85 @@
+<?php
+/**
+ * A handler to provide proper displays for dates.
+ *
+ * @ingroup views_field_handlers
+ */
+class views_handler_field_date extends views_handler_field {
+ function option_definition() {
+ $options = parent::option_definition();
+
+ $options['date_format'] = array('default' => 'small');
+ $options['custom_date_format'] = array('default' => '');
+
+ return $options;
+ }
+
+ function options_form(&$form, &$form_state) {
+
+ $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']);
+ }
+
+ $form['date_format'] = array(
+ '#type' => 'select',
+ '#title' => t('Date format'),
+ '#options' => $date_formats + array(
+ 'custom' => t('Custom'),
+ 'raw time ago' => t('Time ago'),
+ 'time ago' => t('Time ago (with "ago" appended)'),
+ 'raw time hence' => t('Time hence'),
+ 'time hence' => t('Time hence (with "hence" appended)'),
+ 'raw time span' => t('Time span (future dates have "-" prepended)'),
+ 'inverse time span' => t('Time span (past dates have "-" prepended)'),
+ 'time span' => t('Time span (with "ago/hence" appended)'),
+ ),
+ '#default_value' => isset($this->options['date_format']) ? $this->options['date_format'] : 'small',
+ );
+ $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.'),
+ '#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')),
+ );
+
+ parent::options_form($form, $form_state);
+ }
+
+ function render($values) {
+ $value = $this->get_value($values);
+ $format = $this->options['date_format'];
+ if (in_array($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'))) {
+ $custom_format = $this->options['custom_date_format'];
+ }
+
+ if ($value) {
+ $time_diff = REQUEST_TIME - $value; // will be positive for a datetime in the past (ago), and negative for a datetime in the future (hence)
+ switch ($format) {
+ case 'raw time ago':
+ return format_interval($time_diff, is_numeric($custom_format) ? $custom_format : 2);
+ case 'time ago':
+ return t('%time ago', array('%time' => format_interval($time_diff, is_numeric($custom_format) ? $custom_format : 2)));
+ case 'raw time hence':
+ return format_interval(-$time_diff, is_numeric($custom_format) ? $custom_format : 2);
+ case 'time hence':
+ return t('%time hence', array('%time' => format_interval(-$time_diff, is_numeric($custom_format) ? $custom_format : 2)));
+ case 'raw time span':
+ return ($time_diff < 0 ? '-' : '') . format_interval(abs($time_diff), is_numeric($custom_format) ? $custom_format : 2);
+ case 'inverse time span':
+ return ($time_diff > 0 ? '-' : '') . format_interval(abs($time_diff), is_numeric($custom_format) ? $custom_format : 2);
+ case 'time span':
+ 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);
+ default:
+ return format_date($value, $format);
+ }
+ }
+ }
+}
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
new file mode 100644
index 0000000..0e13b23
--- /dev/null
+++ b/kolab.org/www/drupal-7.15/sites/all/modules/views/handlers/views_handler_field_entity.inc
@@ -0,0 +1,98 @@
+<?php
+/**
+ * A handler to display data from entity objects.
+ *
+ * Fields based upon this handler work with all query-backends if the tables
+ * used by the query backend have an 'entity type' specified. In order to
+ * make fields based upon this handler automatically available to all compatible
+ * query backends, the views field can be defined in the table
+ * @code views_entity_{ENTITY_TYPE} @endcode.
+ *
+ * @ingroup views_field_handlers
+ */
+class views_handler_field_entity extends views_handler_field {
+
+ /**
+ * Stores the entity type which is loaded by this field.
+ */
+ public $entity_type;
+
+ /**
+ * Stores all entites which are in the result.
+ */
+ public $entities;
+
+ /**
+ * The base field of the entity type assosiated with this field.
+ */
+ public $base_field;
+
+ /**
+ * Initialize the entity type.
+ */
+ public function init(&$view, &$options) {
+ parent::init($view, $options);
+
+ // Initialize the entity-type used.
+ $table_data = views_fetch_data($this->table);
+ $this->entity_type = $table_data['table']['entity type'];
+ }
+
+ /**
+ * Overriden to add the field for the entity id.
+ */
+ function query() {
+ $this->table_alias = $base_table = $this->view->base_table;
+ $this->base_field = $this->view->base_field;
+
+ if (!empty($this->relationship)) {
+ foreach ($this->view->relationship as $relationship) {
+ if ($relationship->alias == $this->relationship) {
+ $base_table = $relationship->definition['base'];
+ $this->table_alias = $relationship->alias;
+
+ $table_data = views_fetch_data($base_table);
+ $this->base_field = empty($relationship->definition['base field']) ? $table_data['table']['base']['field'] : $relationship->definition['base field'];
+ }
+ }
+ }
+
+ // Add the field if the query back-end implements an add_field() method,
+ // just like the default back-end.
+ if (method_exists($this->query, 'add_field')) {
+ $this->field_alias = $this->query->add_field($this->table_alias, $this->base_field, '');
+ }
+
+ $this->add_additional_fields();
+ }
+
+ /**
+ * Load the entities for all rows that are about to be displayed.
+ */
+ function pre_render(&$values) {
+ if (!empty($values)) {
+ list($this->entity_type, $this->entities) = $this->query->get_result_entities($values, !empty($this->relationship) ? $this->relationship : NULL, $this->field_alias);
+ }
+ }
+
+ /**
+ * Overridden to return the entity object, or a certain property of the entity.
+ */
+ function get_value($values, $field = NULL) {
+ if (isset($this->entities[$this->view->row_index])) {
+ $entity = $this->entities[$this->view->row_index];
+ // Support to get a certain part of the entity.
+ if (isset($field) && isset($entity->{$field})) {
+ return $entity->{$field};
+ }
+ // Support to get a part of the values as the normal get_value.
+ elseif (isset($field) && isset($values->{$this->aliases[$field]})) {
+ return $values->{$this->aliases[$field]};
+ }
+ else {
+ return $entity;
+ }
+ }
+ return FALSE;
+ }
+}
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
new file mode 100644
index 0000000..96a0cf7
--- /dev/null
+++ b/kolab.org/www/drupal-7.15/sites/all/modules/views/handlers/views_handler_field_machine_name.inc
@@ -0,0 +1,68 @@
+<?php
+
+/**
+ * Field handler whichs allows to show machine name content as human name.
+ * @ingroup views_field_handlers
+ *
+ * Definition items:
+ * - options callback: The function to call in order to generate the value options. If omitted, the options 'Yes' and 'No' will be used.
+ * - options arguments: An array of arguments to pass to the options callback.
+ */
+class views_handler_field_machine_name extends views_handler_field {
+ /**
+ * @var array Stores the available options.
+ */
+ var $value_options;
+
+ function get_value_options() {
+ if (isset($this->value_options)) {
+ return;
+ }
+
+ if (isset($this->definition['options callback']) && is_callable($this->definition['options callback'])) {
+ if (isset($this->definition['options arguments']) && is_array($this->definition['options arguments'])) {
+ $this->value_options = call_user_func_array($this->definition['options callback'], $this->definition['options arguments']);
+ }
+ else {
+ $this->value_options = call_user_func($this->definition['options callback']);
+ }
+ }
+ else {
+ $this->value_options = array();
+ }
+ }
+
+ function option_definition() {
+ $options = parent::option_definition();
+ $options['machine_name'] = array('default' => FALSE);
+
+ return $options;
+ }
+
+ function options_form(&$form, &$form_state) {
+ parent::options_form($form, $form_state);
+
+ $form['machine_name'] = array(
+ '#title' => t('Output machine name'),
+ '#description' => t('Display field as machine name.'),
+ '#type' => 'checkbox',
+ '#default_value' => !empty($this->options['machine_name']),
+ );
+ }
+
+ function pre_render(&$values) {
+ $this->get_value_options();
+ }
+
+ function render($values) {
+ $value = $values->{$this->field_alias};
+ if (!empty($this->options['machine_name']) || !isset($this->value_options[$value])) {
+ $result = check_plain($value);
+ }
+ else {
+ $result = $this->value_options[$value];
+ }
+
+ return $result;
+ }
+}
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
new file mode 100644
index 0000000..10444d5
--- /dev/null
+++ b/kolab.org/www/drupal-7.15/sites/all/modules/views/handlers/views_handler_field_markup.inc
@@ -0,0 +1,54 @@
+<?php
+
+/**
+ * A handler to run a field through check_markup, using a companion
+ * format field.
+ *
+ * - format: (REQUIRED) Either a string format id to use for this field or an
+ * array('field' => {$field}) where $field is the field in this table
+ * used to control the format such as the 'format' field in the node,
+ * which goes with the 'body' field.
+ *
+ * @ingroup views_field_handlers
+ */
+class views_handler_field_markup extends views_handler_field {
+ /**
+ * Constructor; calls to base object constructor.
+ */
+ function construct() {
+ parent::construct();
+
+ $this->format = $this->definition['format'];
+
+ $this->additional_fields = array();
+ if (is_array($this->format)) {
+ $this->additional_fields['format'] = $this->format;
+ }
+ }
+
+ function render($values) {
+ $value = $this->get_value($values);
+ if (is_array($this->format)) {
+ $format = $this->get_value($values, 'format');
+ }
+ else {
+ $format = $this->format;
+ }
+ if ($value) {
+ $value = str_replace('<!--break-->', '', $value);
+ return check_markup($value, $format, '');
+ }
+ }
+
+ function element_type($none_supported = FALSE, $default_empty = FALSE, $inline = FALSE) {
+ if ($inline) {
+ return 'span';
+ }
+
+ if (isset($this->definition['element type'])) {
+ return $this->definition['element type'];
+ }
+
+ return 'div';
+ }
+}
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
new file mode 100644
index 0000000..9df9987
--- /dev/null
+++ b/kolab.org/www/drupal-7.15/sites/all/modules/views/handlers/views_handler_field_math.inc
@@ -0,0 +1,78 @@
+<?php
+/**
+ * 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.
+ *
+ * @ingroup views_field_handlers
+ */
+class views_handler_field_math extends views_handler_field_numeric {
+ function option_definition() {
+ $options = parent::option_definition();
+ $options['expression'] = array('default' => '');
+
+ return $options;
+ }
+
+ function options_form(&$form, &$form_state) {
+ $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).'),
+ '#default_value' => $this->options['expression'],
+ );
+
+ // Create a place for the help
+ $form['expression_help'] = array();
+ parent::options_form($form, $form_state);
+
+ // Then move the existing help:
+ $form['expression_help'] = $form['alter']['help'];
+ unset($form['expression_help']['#dependency']);
+ unset($form['alter']['help']);
+ }
+
+ function render($values) {
+ ctools_include('math-expr');
+ $tokens = array_map('floatval', $this->get_render_tokens(array()));
+ $value = strtr($this->options['expression'], $tokens);
+ $expressions = explode(';', $value);
+ $math = new ctools_math_expr;
+ foreach ($expressions as $expression) {
+ if ($expression !== '') {
+ $value = $math->evaluate($expression);
+ }
+ }
+
+ // The rest is directly from views_handler_field_numeric but because it
+ // does not allow the value to be passed in, it is copied.
+ if (!empty($this->options['set_precision'])) {
+ $value = number_format($value, $this->options['precision'], $this->options['decimal'], $this->options['separator']);
+ }
+ else {
+ $remainder = abs($value) - intval(abs($value));
+ $value = $value > 0 ? floor($value) : ceil($value);
+ $value = number_format($value, 0, '', $this->options['separator']);
+ if ($remainder) {
+ // The substr may not be locale safe.
+ $value .= $this->options['decimal'] . substr($remainder, 2);
+ }
+ }
+
+ // Check to see if hiding should happen before adding prefix and suffix.
+ if ($this->options['hide_empty'] && empty($value) && ($value !== 0 || $this->options['empty_zero'])) {
+ return '';
+ }
+
+ // Should we format as a plural.
+ if (!empty($this->options['format_plural']) && ($value != 0 || !$this->options['empty_zero'])) {
+ $value = format_plural($value, $this->options['format_plural_singular'], $this->options['format_plural_plural']);
+ }
+
+ return $this->sanitize_value($this->options['prefix'] . $value . $this->options['suffix']);
+ }
+
+ function query() { }
+}
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
new file mode 100644
index 0000000..5f7f450
--- /dev/null
+++ b/kolab.org/www/drupal-7.15/sites/all/modules/views/handlers/views_handler_field_numeric.inc
@@ -0,0 +1,131 @@
+<?php
+/**
+ * Render a field 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.
+ *
+ * @ingroup views_field_handlers
+ */
+class views_handler_field_numeric extends views_handler_field {
+ function option_definition() {
+ $options = parent::option_definition();
+
+ $options['set_precision'] = array('default' => FALSE);
+ $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_singular'] = array('default' => '1');
+ $options['format_plural_plural'] = array('default' => '@count');
+ $options['prefix'] = array('default' => '', 'translatable' => TRUE);
+ $options['suffix'] = array('default' => '', 'translatable' => TRUE);
+
+ return $options;
+ }
+
+ function options_form(&$form, &$form_state) {
+ if (!empty($this->definition['float'])) {
+ $form['set_precision'] = array(
+ '#type' => 'checkbox',
+ '#title' => t('Round'),
+ '#description' => t('If checked, the number will be rounded.'),
+ '#default_value' => $this->options['set_precision'],
+ );
+ $form['precision'] = array(
+ '#type' => 'textfield',
+ '#title' => t('Precision'),
+ '#default_value' => $this->options['precision'],
+ '#description' => t('Specify how many digits to print after the decimal point.'),
+ '#dependency' => array('edit-options-set-precision' => array(TRUE)),
+ '#size' => 2,
+ );
+ $form['decimal'] = array(
+ '#type' => 'textfield',
+ '#title' => t('Decimal point'),
+ '#default_value' => $this->options['decimal'],
+ '#description' => t('What single character to use as a decimal point.'),
+ '#size' => 2,
+ );
+ }
+ $form['separator'] = array(
+ '#type' => 'select',
+ '#title' => t('Thousands marker'),
+ '#options' => array(
+ '' => t('- None -'),
+ ',' => t('Comma'),
+ ' ' => t('Space'),
+ '.' => t('Decimal'),
+ '\'' => t('Apostrophe'),
+ ),
+ '#default_value' => $this->options['separator'],
+ '#description' => t('What single character to use as the thousands separator.'),
+ '#size' => 2,
+ );
+ $form['format_plural'] = array(
+ '#type' => 'checkbox',
+ '#title' => t('Format plural'),
+ '#description' => t('If checked, special handling will be used for plurality.'),
+ '#default_value' => $this->options['format_plural'],
+ );
+ $form['format_plural_singular'] = array(
+ '#type' => 'textfield',
+ '#title' => t('Singular form'),
+ '#default_value' => $this->options['format_plural_singular'],
+ '#description' => t('Text to use for the singular form.'),
+ '#dependency' => array('edit-options-format-plural' => array(TRUE)),
+ );
+ $form['format_plural_plural'] = array(
+ '#type' => 'textfield',
+ '#title' => t('Plural form'),
+ '#default_value' => $this->options['format_plural_plural'],
+ '#description' => t('Text to use for the plural form, @count will be replaced with the value.'),
+ '#dependency' => array('edit-options-format-plural' => array(TRUE)),
+ );
+ $form['prefix'] = array(
+ '#type' => 'textfield',
+ '#title' => t('Prefix'),
+ '#default_value' => $this->options['prefix'],
+ '#description' => t('Text to put before the number, such as currency symbol.'),
+ );
+ $form['suffix'] = array(
+ '#type' => 'textfield',
+ '#title' => t('Suffix'),
+ '#default_value' => $this->options['suffix'],
+ '#description' => t('Text to put after the number, such as currency symbol.'),
+ );
+
+ parent::options_form($form, $form_state);
+ }
+
+ function render($values) {
+ $value = $this->get_value($values);
+ if (!empty($this->options['set_precision'])) {
+ $value = number_format($value, $this->options['precision'], $this->options['decimal'], $this->options['separator']);
+ }
+ else {
+ $remainder = abs($value) - intval(abs($value));
+ $value = $value > 0 ? floor($value) : ceil($value);
+ $value = number_format($value, 0, '', $this->options['separator']);
+ if ($remainder) {
+ // The substr may not be locale safe.
+ $value .= $this->options['decimal'] . substr($remainder, 2);
+ }
+ }
+
+ // Check to see if hiding should happen before adding prefix and suffix.
+ if ($this->options['hide_empty'] && empty($value) && ($value !== 0 || $this->options['empty_zero'])) {
+ return '';
+ }
+
+ // Should we format as a plural.
+ if (!empty($this->options['format_plural'])) {
+ $value = format_plural($value, $this->options['format_plural_singular'], $this->options['format_plural_plural']);
+ }
+
+ return $this->sanitize_value($this->options['prefix'], 'xss')
+ . $this->sanitize_value($value)
+ . $this->sanitize_value($this->options['suffix'], 'xss');
+ }
+}
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
new file mode 100644
index 0000000..16b30b6
--- /dev/null
+++ b/kolab.org/www/drupal-7.15/sites/all/modules/views/handlers/views_handler_field_prerender_list.inc
@@ -0,0 +1,153 @@
+<?php
+
+/**
+ * Field handler to provide a list of items.
+ *
+ * The items are expected to be loaded by a child object during pre_render,
+ * and 'my field' is expected to be the pointer to the items in the list.
+ *
+ * Items to render should be in a list in $this->items
+ *
+ * @ingroup views_field_handlers
+ */
+class views_handler_field_prerender_list extends views_handler_field {
+ /**
+ * Stores all items which are used to render the items.
+ * It should be keyed first by the id of the base table, for example nid.
+ * The second key is the id of the thing which is displayed multiple times
+ * per row, for example the tid.
+ *
+ * @var array
+ */
+ var $items = array();
+
+ function option_definition() {
+ $options = parent::option_definition();
+
+ $options['type'] = array('default' => 'separator');
+ $options['separator'] = array('default' => ', ');
+
+ return $options;
+ }
+
+ function options_form(&$form, &$form_state) {
+ $form['type'] = array(
+ '#type' => 'radios',
+ '#title' => t('Display type'),
+ '#options' => array(
+ 'ul' => t('Unordered list'),
+ 'ol' => t('Ordered list'),
+ 'separator' => t('Simple separator'),
+ ),
+ '#default_value' => $this->options['type'],
+ );
+
+ $form['separator'] = array(
+ '#type' => 'textfield',
+ '#title' => t('Separator'),
+ '#default_value' => $this->options['separator'],
+ '#dependency' => array('radio:options[type]' => array('separator')),
+ );
+ parent::options_form($form, $form_state);
+ }
+
+ /**
+ * Render the field.
+ *
+ * This function is deprecated, but left in for older systems that have not
+ * yet or won't update their prerender list fields. If a render_item method
+ * exists, this will not get used by advanced_render.
+ */
+ function render($values) {
+ $field = $this->get_value($values);
+ if (!empty($this->items[$field])) {
+ if ($this->options['type'] == 'separator') {
+ return implode($this->sanitize_value($this->options['separator']), $this->items[$field]);
+ }
+ else {
+ return theme('item_list',
+ array(
+ 'items' => $this->items[$field],
+ 'title' => NULL,
+ 'type' => $this->options['type']
+ ));
+ }
+ }
+ }
+
+ /**
+ * Render all items in this field together.
+ *
+ * When using advanced render, each possible item in the list is rendered
+ * individually. Then the items are all pasted together.
+ */
+ function render_items($items) {
+ if (!empty($items)) {
+ if ($this->options['type'] == 'separator') {
+ return implode($this->sanitize_value($this->options['separator']), $items);
+ }
+ else {
+ return theme('item_list',
+ array(
+ 'items' => $items,
+ 'title' => NULL,
+ 'type' => $this->options['type']
+ ));
+ }
+ }
+ }
+
+ /**
+ * Return an array of items for the field.
+ *
+ * Items should be stored in the result array, if possible, as an array
+ * with 'value' as the actual displayable value of the item, plus
+ * any items that might be found in the 'alter' options array for
+ * creating links, such as 'path', 'fragment', 'query' etc, such a thing
+ * is to be made. Additionally, items that might be turned into tokens
+ * should also be in this array.
+ */
+ function get_items($values) {
+ // Only the parent get_value returns a single field.
+ $field = parent::get_value($values);
+ if (!empty($this->items[$field])) {
+ return $this->items[$field];
+ }
+
+ return array();
+ }
+
+ /**
+ * Get the value that's supposed to be rendered.
+ *
+ * @param $values
+ * An object containing all retrieved values.
+ * @param $field
+ * Optional name of the field where the value is stored.
+ * @param $raw
+ * Use the raw data and not the data defined in pre_render
+ */
+ function get_value($values, $field = NULL, $raw = FALSE) {
+ if ($raw) {
+ return parent::get_value($values, $field);
+ }
+ $item = $this->get_items($values);
+ $item = (array) $item;
+ if (isset($field) && isset($item[$field])) {
+ return $item[$field];
+ }
+ return $item;
+ }
+
+ /**
+ * Determine if advanced rendering is allowed.
+ *
+ * By default, advanced rendering will NOT be allowed if the class
+ * inheriting from this does not implement a 'render_items' method.
+ */
+ function allow_advanced_render() {
+ // Note that the advanced render bits also use the presence of
+ // this method to determine if it needs to render items as a list.
+ return method_exists($this, 'render_item');
+ }
+}
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
new file mode 100644
index 0000000..01dd0c0
--- /dev/null
+++ b/kolab.org/www/drupal-7.15/sites/all/modules/views/handlers/views_handler_field_serialized.inc
@@ -0,0 +1,60 @@
+<?php
+
+/**
+ * Field handler to show data of serialized fields.
+ *
+ * @ingroup views_field_handlers
+ */
+class views_handler_field_serialized extends views_handler_field {
+
+ function option_definition() {
+ $options = parent::option_definition();
+ $options['format'] = array('default' => 'unserialized');
+ $options['key'] = array('default' => '');
+ return $options;
+ }
+
+
+ function options_form(&$form, &$form_state) {
+ parent::options_form($form, $form_state);
+
+ $form['format'] = array(
+ '#type' => 'select',
+ '#title' => t('Display format'),
+ '#description' => t('How should the serialized data be displayed. You can choose a custom array/object key or a print_r on the full output.'),
+ '#options' => array(
+ 'unserialized' => t('Full data (unserialized)'),
+ 'serialized' => t('Full data (serialized)'),
+ 'key' => t('A certain key'),
+ ),
+ '#default_value' => $this->options['format'],
+ );
+ $form['key'] = array(
+ '#type' => 'textfield',
+ '#title' => t('Which key should be displayed'),
+ '#default_value' => $this->options['key'],
+ '#dependency' => array('edit-options-format' => array('key')),
+ );
+ }
+
+ function options_validate(&$form, &$form_state) {
+ // Require a key if the format is key.
+ if ($form_state['values']['options']['format'] == 'key' && $form_state['values']['options']['key'] == '') {
+ form_error($form['key'], t('You have to enter a key if you want to display a key of the data.'));
+ }
+ }
+
+ function render($values) {
+ $value = $values->{$this->field_alias};
+
+ if ($this->options['format'] == 'unserialized') {
+ return check_plain(print_r(unserialize($value), TRUE));
+ }
+ elseif ($this->options['format'] == 'key' && !empty($this->options['key'])) {
+ $value = (array) unserialize($value);
+ return check_plain($value[$this->options['key']]);
+ }
+
+ return $value;
+ }
+}
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
new file mode 100644
index 0000000..ca50885
--- /dev/null
+++ b/kolab.org/www/drupal-7.15/sites/all/modules/views/handlers/views_handler_field_time_interval.inc
@@ -0,0 +1,31 @@
+<?php
+/**
+ * A handler to provide proper displays for time intervals.
+ *
+ * @ingroup views_field_handlers
+ */
+class views_handler_field_time_interval extends views_handler_field {
+ function option_definition() {
+ $options = parent::option_definition();
+
+ $options['granularity'] = array('default' => 2);
+
+ return $options;
+ }
+
+ function options_form(&$form, &$form_state) {
+ parent::options_form($form, $form_state);
+
+ $form['granularity'] = array(
+ '#type' => 'textfield',
+ '#title' => t('Granularity'),
+ '#description' => t('How many different units to display in the string.'),
+ '#default_value' => $this->options['granularity'],
+ );
+ }
+
+ function render($values) {
+ $value = $values->{$this->field_alias};
+ return format_interval($value, isset($this->options['granularity']) ? $this->options['granularity'] : 2);
+ }
+}
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
new file mode 100644
index 0000000..2491f35
--- /dev/null
+++ b/kolab.org/www/drupal-7.15/sites/all/modules/views/handlers/views_handler_field_url.inc
@@ -0,0 +1,38 @@
+<?php
+
+/**
+ * Field handler to provide simple renderer that turns a URL into a clickable link.
+ *
+ * @ingroup views_field_handlers
+ */
+class views_handler_field_url extends views_handler_field {
+ function option_definition() {
+ $options = parent::option_definition();
+
+ $options['display_as_link'] = array('default' => TRUE);
+
+ return $options;
+ }
+
+ /**
+ * Provide link to the page being visited.
+ */
+ function options_form(&$form, &$form_state) {
+ $form['display_as_link'] = array(
+ '#title' => t('Display as link'),
+ '#type' => 'checkbox',
+ '#default_value' => !empty($this->options['display_as_link']),
+ );
+ parent::options_form($form, $form_state);
+ }
+
+ 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));
+ }
+ 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
new file mode 100644
index 0000000..b267976
--- /dev/null
+++ b/kolab.org/www/drupal-7.15/sites/all/modules/views/handlers/views_handler_filter.inc
@@ -0,0 +1,680 @@
+<?php
+/**
+ * @defgroup views_filter_handlers Views' filter handlers
+ * @{
+ * Handlers to tell Views how to filter queries.
+ *
+ * Definition items:
+ * - allow empty: If true, the 'IS NULL' and 'IS NOT NULL' operators become
+ * available as standard operators.
+ *
+ * Object flags:
+ * You can set some specific behavior by setting up the following flags on
+ * your custom class.
+ *
+ * - always_multiple:
+ * Disable the possibility to force a single value.
+ * - no_operator:
+ * Disable the possibility to use operators.
+ * - always_required:
+ * Disable the possibility to allow a exposed input to be optional.
+ */
+
+/**
+ * Base class for filters.
+ */
+class views_handler_filter extends views_handler {
+ /**
+ * Contains the actual value of the field,either configured in the views ui
+ * or entered in the exposed filters.
+ */
+ var $value = NULL;
+
+ /**
+ * Contains the operator which is used on the query.
+ */
+ var $operator = '=';
+
+ /**
+ * @var bool
+ * Disable the possibility to force a single value.
+ */
+ var $always_multiple = FALSE;
+
+ /**
+ * @var bool
+ * Disable the possibility to use operators.
+ */
+ var $no_operator = FALSE;
+
+ /**
+ * @var bool
+ * Disable the possibility to allow a exposed input to be optional.
+ */
+ var $always_required = FALSE;
+
+ /**
+ * Provide some extra help to get the operator/value easier to use.
+ *
+ * This likely has to be overridden by filters which are more complex
+ * than simple operator/value.
+ */
+ function init(&$view, &$options) {
+ parent::init($view, $options);
+
+ $this->operator = $this->options['operator'];
+ $this->value = $this->options['value'];
+
+ // Compatibility: The new UI changed several settings.
+ if (!empty($options['exposed']) && !empty($options['expose']['optional']) && !isset($options['expose']['required'])) {
+ $this->options['expose']['required'] = !$options['expose']['optional'];
+ }
+ if (!empty($options['exposed']) && !empty($options['expose']['single']) && !isset($options['expose']['multiple'])) {
+ $this->options['expose']['multiple'] = !$options['expose']['single'];
+ }
+ if (!empty($options['exposed']) && !empty($options['expose']['operator']) && !isset($options['expose']['operator_id'])) {
+ $this->options['expose']['operator_id'] = $options['expose']['operator_id'] = $options['expose']['operator'];
+ }
+
+ // 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.
+ if ($this->view->display_handler->get_option('relationships')) {
+ $this->definition['allow empty'] = TRUE;
+ }
+ }
+
+ function option_definition() {
+ $options = parent::option_definition();
+
+ $options['operator'] = array('default' => '=');
+ $options['value'] = array('default' => '');
+ $options['group'] = array('default' => '1');
+ $options['exposed'] = array('default' => FALSE);
+ $options['expose'] = array(
+ 'contains' => array(
+ 'operator_id' => array('default' => FALSE),
+ 'label' => array('default' => '', 'translatable' => TRUE),
+ 'use_operator' => array('default' => 0),
+ 'operator' => array('default' => ''),
+ 'identifier' => array('default' => ''),
+ 'required' => array('default' => 0),
+ 'remember' => array('default' => 0),
+ 'multiple' => array('default' => 0),
+ ),
+ );
+
+ return $options;
+ }
+
+ /**
+ * Display the filter on the administrative summary
+ */
+ function admin_summary() {
+ return check_plain((string) $this->operator) . ' ' . check_plain((string) $this->value);
+ }
+
+ /**
+ * Determine if a filter can be exposed.
+ */
+ function can_expose() { return TRUE; }
+
+ /**
+ * 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
+ * are called.
+ */
+ function options_form(&$form, &$form_state) {
+ parent::options_form($form, $form_state);
+ if ($this->can_expose()) {
+ $this->show_expose_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);
+ }
+ }
+
+ /**
+ * Simple validate handler
+ */
+ function options_validate(&$form, &$form_state) {
+ $this->operator_validate($form, $form_state);
+ $this->value_validate($form, $form_state);
+ if (!empty($this->options['exposed'])) {
+ $this->expose_validate($form, $form_state);
+ }
+ }
+
+ /**
+ * Simple submit 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);
+ if (!empty($this->options['exposed'])) {
+ $this->expose_submit($form, $form_state);
+ }
+ }
+
+ /**
+ * Shortcut to display the operator form.
+ */
+ function show_operator_form(&$form, &$form_state) {
+ $this->operator_form($form, $form_state);
+ $form['operator']['#prefix'] = '<div class="views-group-box views-left-30">';
+ $form['operator']['#suffix'] = '</div>';
+ }
+
+ /**
+ * Options form subform for setting the operator.
+ *
+ * This may be overridden by child classes, and it must
+ * define $form['operator'];
+ *
+ * @see options_form().
+ */
+ function operator_form(&$form, &$form_state) {
+ $options = $this->operator_options();
+ if (!empty($options)) {
+ $form['operator'] = array(
+ '#type' => count($options) < 10 ? 'radios' : 'select',
+ '#title' => t('Operator'),
+ '#default_value' => $this->operator,
+ '#options' => $options,
+ );
+ }
+ }
+
+ /**
+ * Provide a list of options for the default operator form.
+ * Should be overridden by classes that don't override operator_form
+ */
+ function operator_options() { return array(); }
+
+ /**
+ * Validate the operator form.
+ */
+ function operator_validate($form, &$form_state) { }
+
+ /**
+ * Perform any necessary changes to the form values prior to storage.
+ * There is no need for this function to actually store the data.
+ */
+ function operator_submit($form, &$form_state) { }
+
+ /**
+ * Shortcut to display the value form.
+ */
+ function show_value_form(&$form, &$form_state) {
+ $this->value_form($form, $form_state);
+ if (empty($this->no_operator)) {
+ $form['value']['#prefix'] = '<div class="views-group-box views-right-70">' . (isset($form['value']['#prefix']) ? $form['value']['#prefix'] : '');
+ $form['value']['#suffix'] = (isset($form['value']['#suffix']) ? $form['value']['#suffix'] : '') . '</div>';
+ }
+ }
+
+ /**
+ * Options form subform for setting options.
+ *
+ * This should be overridden by all child classes and it must
+ * define $form['value']
+ *
+ * @see options_form().
+ */
+ function value_form(&$form, &$form_state) { $form['value'] = array(); }
+
+ /**
+ * Validate the options form.
+ */
+ function value_validate($form, &$form_state) { }
+
+ /**
+ * Perform any necessary changes to the form values prior to storage.
+ * There is no need for this function to actually store the data.
+ */
+ function value_submit($form, &$form_state) { }
+
+ /**
+ * Shortcut to display the expose/hide button.
+ */
+ function show_expose_button(&$form, &$form_state) {
+ $form['expose_button'] = array(
+ '#prefix' => '<div class="views-expose clearfix">',
+ '#suffix' => '</div>',
+ // Should always come after the description and the relationship.
+ '#weight' => -200,
+ );
+
+ // Add a checkbox for JS users, which will have behavior attached to it
+ // so it can replace the button.
+ $form['expose_button']['checkbox'] = array(
+ '#theme_wrappers' => array('container'),
+ '#attributes' => array('class' => array('js-only')),
+ );
+ $form['expose_button']['checkbox']['checkbox'] = array(
+ '#title' => t('Expose this filter to visitors, to allow them to change it'),
+ '#type' => 'checkbox',
+ );
+
+ // Then add the button itself.
+ if (empty($this->options['exposed'])) {
+ $form['expose_button']['markup'] = array(
+ '#markup' => '<div class="description exposed-description">' . t('This filter is not exposed. Expose it to allow the users to change it.') . '</div>',
+ );
+ $form['expose_button']['button'] = array(
+ '#limit_validation_errors' => array(),
+ '#type' => 'submit',
+ '#value' => t('Expose filter'),
+ '#submit' => array('views_ui_config_item_form_expose'),
+ );
+ $form['expose_button']['checkbox']['checkbox']['#default_value'] = 0;
+ }
+ else {
+ $form['expose_button']['markup'] = array(
+ '#markup' => '<div class="description exposed-description">' . t('This filter is exposed. If you hide it, users will not be able to change it.') . '</div>',
+ );
+ $form['expose_button']['button'] = array(
+ '#limit_validation_errors' => array(),
+ '#type' => 'submit',
+ '#value' => t('Hide filter'),
+ '#submit' => array('views_ui_config_item_form_expose'),
+ );
+ $form['expose_button']['checkbox']['checkbox']['#default_value'] = 1;
+ }
+ }
+
+ /**
+ * Options form subform for exposed filter options.
+ *
+ * @see options_form().
+ */
+ function expose_form(&$form, &$form_state) {
+ $form['#theme'] = 'views_ui_expose_filter_form';
+ // #flatten will move everything from $form['expose'][$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['expose']['#flatten'] = TRUE;
+
+ if (empty($this->always_required)) {
+ $form['expose']['required'] = array(
+ '#type' => 'checkbox',
+ '#title' => t('Required'),
+ '#default_value' => $this->options['expose']['required'],
+ );
+ }
+ else {
+ $form['expose']['required'] = array(
+ '#type' => 'value',
+ '#value' => TRUE,
+ );
+ }
+ $form['expose']['label'] = array(
+ '#type' => 'textfield',
+ '#default_value' => $this->options['expose']['label'],
+ '#title' => t('Label'),
+ '#size' => 40,
+ );
+
+ if (!empty($form['operator']['#type'])) {
+ // Increase the width of the left (operator) column.
+ $form['operator']['#prefix'] = '<div class="views-group-box views-left-40">';
+ $form['operator']['#suffix'] = '</div>';
+ $form['value']['#prefix'] = '<div class="views-group-box views-right-60">';
+ $form['value']['#suffix'] = '</div>';
+
+ $form['expose']['use_operator'] = array(
+ '#type' => 'checkbox',
+ '#title' => t('Expose operator'),
+ '#description' => t('Allow the user to choose the operator.'),
+ '#default_value' => !empty($this->options['expose']['use_operator']),
+ );
+ $form['expose']['operator_id'] = array(
+ '#type' => 'textfield',
+ '#default_value' => $this->options['expose']['operator_id'],
+ '#title' => t('Operator identifier'),
+ '#size' => 40,
+ '#description' => t('This will appear in the URL after the ? to identify this operator.'),
+ '#dependency' => array(
+ 'edit-options-expose-use-operator' => array(1)
+ ),
+ '#fieldset' => 'more',
+ );
+ }
+ else {
+ $form['expose']['operator_id'] = array(
+ '#type' => 'value',
+ '#value' => '',
+ );
+ }
+
+ if (empty($this->always_multiple)) {
+ $form['expose']['multiple'] = array(
+ '#type' => 'checkbox',
+ '#title' => t('Allow multiple selections'),
+ '#description' => t('Enable to allow users to select multiple items.'),
+ '#default_value' => $this->options['expose']['multiple'],
+ );
+ }
+ $form['expose']['remember'] = array(
+ '#type' => 'checkbox',
+ '#title' => t('Remember the last selection'),
+ '#description' => t('Enable to remember the last selection made by the user.'),
+ '#default_value' => $this->options['expose']['remember'],
+ );
+
+ $form['expose']['identifier'] = array(
+ '#type' => 'textfield',
+ '#default_value' => $this->options['expose']['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',
+ );
+ }
+
+ /**
+ * Validate the options form.
+ */
+ function expose_validate($form, &$form_state) {
+ if (empty($form_state['values']['options']['expose']['identifier'])) {
+ form_error($form['expose']['identifier'], t('The identifier is required if the filter is exposed.'));
+ }
+
+ if (!empty($form_state['values']['options']['expose']['identifier']) && $form_state['values']['options']['expose']['identifier'] == 'value') {
+ form_error($form['expose']['identifier'], t('This identifier is not allowed.'));
+ }
+
+ if (!$this->view->display_handler->is_identifier_unique($form_state['id'], $form_state['values']['options']['expose']['identifier'])) {
+ form_error($form['expose']['identifier'], t('This identifier is used by another handler.'));
+ }
+ }
+
+ /**
+ * Provide default options for exposed filters.
+ */
+ function expose_options() {
+ $this->options['expose'] = array(
+ 'use_operator' => FALSE,
+ 'operator' => $this->options['id'] . '_op',
+ 'identifier' => $this->options['id'],
+ 'label' => $this->definition['title'],
+ 'remember' => FALSE,
+ 'multiple' => FALSE,
+ 'required' => FALSE,
+ );
+ }
+
+ /**
+ * Render our chunk of the exposed filter form when selecting
+ *
+ * You can override this if it doesn't do what you expect.
+ */
+ function exposed_form(&$form, &$form_state) {
+ if (empty($this->options['exposed'])) {
+ return;
+ }
+
+ // Build the exposed form, when its based on an operator.
+ if (!empty($this->options['expose']['use_operator']) && !empty($this->options['expose']['operator_id'])) {
+ $operator = $this->options['expose']['operator_id'];
+ $this->operator_form($form, $form_state);
+ $form[$operator] = $form['operator'];
+
+ if (isset($form[$operator]['#title'])) {
+ unset($form[$operator]['#title']);
+ }
+
+ $this->exposed_translate($form[$operator], 'operator');
+
+ unset($form['operator']);
+ }
+
+ // Build the form and set the value based on the identifier.
+ if (!empty($this->options['expose']['identifier'])) {
+ $value = $this->options['expose']['identifier'];
+ $this->value_form($form, $form_state);
+ $form[$value] = $form['value'];
+
+ if (isset($form[$value]['#title']) && !empty($form[$value]['#type']) && $form[$value]['#type'] != 'checkbox') {
+ unset($form[$value]['#title']);
+ }
+
+ $this->exposed_translate($form[$value], 'value');
+
+ if (!empty($form['#type']) && ($form['#type'] == 'checkboxes' || ($form['#type'] == 'select' && !empty($form['#multiple'])))) {
+ unset($form[$value]['#default_value']);
+ }
+
+ if (!empty($form['#type']) && $form['#type'] == 'select' && empty($form['#multiple'])) {
+ $form[$value]['#default_value'] = 'All';
+ }
+
+ if ($value != 'value') {
+ unset($form['value']);
+ }
+ }
+ }
+
+ /**
+ * Make some translations to a form item to make it more suitable to
+ * exposing.
+ */
+ function exposed_translate(&$form, $type) {
+ if (!isset($form['#type'])) {
+ return;
+ }
+
+ if ($form['#type'] == 'radios') {
+ $form['#type'] = 'select';
+ }
+ // Checkboxes don't work so well in exposed forms due to GET conversions.
+ if ($form['#type'] == 'checkboxes') {
+ if (empty($form['#no_convert']) || empty($this->options['expose']['multiple'])) {
+ $form['#type'] = 'select';
+ }
+ if (!empty($this->options['expose']['multiple'])) {
+ $form['#multiple'] = TRUE;
+ }
+ }
+ if (empty($this->options['expose']['multiple']) && isset($form['#multiple'])) {
+ unset($form['#multiple']);
+ $form['#size'] = NULL;
+ }
+
+ 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'];
+ $form['#default_value'] = 'All';
+ }
+
+ if (!empty($this->options['expose']['required'])) {
+ $form['#required'] = TRUE;
+ }
+ }
+
+ /**
+ * 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:
+ * - 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.
+ */
+ function exposed_info() {
+ if (empty($this->options['exposed'])) {
+ return;
+ }
+
+ return array(
+ 'operator' => $this->options['expose']['operator_id'],
+ 'value' => $this->options['expose']['identifier'],
+ 'label' => $this->options['expose']['label'],
+ );
+ }
+
+ /**
+ * Check to see if input from the exposed filters should change
+ * the behavior of this filter.
+ */
+ function accept_exposed_input($input) {
+ if (empty($this->options['exposed'])) {
+ return TRUE;
+ }
+
+
+ if (!empty($this->options['expose']['use_operator']) && !empty($this->options['expose']['operator_id']) && isset($input[$this->options['expose']['operator_id']])) {
+ $this->operator = $input[$this->options['expose']['operator_id']];
+ }
+
+ if (!empty($this->options['expose']['identifier'])) {
+ $value = $input[$this->options['expose']['identifier']];
+
+ // Various ways to check for the absence of non-required input.
+ if (empty($this->options['expose']['required'])) {
+ if (($this->operator == 'empty' || $this->operator == 'not empty') && $value === '') {
+ $value = ' ';
+ }
+
+ if ($this->operator != 'empty' && $this->operator != 'not empty') {
+ if ($value == 'All' || $value === array()) {
+ return FALSE;
+ }
+ }
+
+ if (!empty($this->always_multiple) && $value === '') {
+ return FALSE;
+ }
+ }
+
+
+ if (isset($value)) {
+ $this->value = $value;
+ if (empty($this->always_multiple) && empty($this->options['expose']['multiple'])) {
+ $this->value = array($value);
+ }
+ }
+ else {
+ return FALSE;
+ }
+ }
+
+ return TRUE;
+ }
+
+ function store_exposed_input($input, $status) {
+ if (empty($this->options['exposed']) || empty($this->options['expose']['identifier'])) {
+ return TRUE;
+ }
+
+ if (empty($this->options['expose']['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;
+
+ // shortcut test.
+ $operator = !empty($this->options['expose']['use_operator']) && !empty($this->options['expose']['operator_id']);
+
+ // false means that we got a setting that means to recuse ourselves,
+ // so we should erase whatever happened to be there.
+ if (!$status && isset($_SESSION['views'][$this->view->name][$display_id])) {
+ $session = &$_SESSION['views'][$this->view->name][$display_id];
+ if ($operator && isset($session[$this->options['expose']['operator_id']])) {
+ unset($session[$this->options['expose']['operator_id']]);
+ }
+
+ if (isset($session[$this->options['expose']['identifier']])) {
+ unset($session[$this->options['expose']['identifier']]);
+ }
+ }
+
+ if ($status) {
+ 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];
+
+ if ($operator && isset($input[$this->options['expose']['operator_id']])) {
+ $session[$this->options['expose']['operator_id']] = $input[$this->options['expose']['operator_id']];
+ }
+
+ $session[$this->options['expose']['identifier']] = $input[$this->options['expose']['identifier']];
+ }
+ }
+
+ /**
+ * Add this filter to the query.
+ *
+ * Due to the nature of fapi, the value and the operator have an unintended
+ * level of indirection. You will find them in $this->operator
+ * and $this->value respectively.
+ */
+ function query() {
+ $this->ensure_my_table();
+ $this->query->add_where($this->options['group'], "$this->table_alias.$this->real_field", $this->value, $this->operator);
+ }
+
+ /**
+ * Can this filter be used in OR groups?
+ *
+ * Some filters have complicated where clauses that cannot be easily used
+ * with OR groups. Some filters must also use HAVING which also makes
+ * them not groupable. These filters will end up in a special group
+ * if OR grouping is in use.
+ *
+ * @return bool
+ */
+ function can_group() {
+ return TRUE;
+ }
+}
+
+
+/**
+ * A special handler to take the place of missing or broken handlers.
+ *
+ * @ingroup views_filter_handlers
+ */
+class views_handler_filter_broken extends views_handler_filter {
+ function ui_name($short = FALSE) {
+ return t('Broken/missing handler');
+ }
+
+ function ensure_my_table() { /* No table to ensure! */ }
+ function query($group_by = FALSE) { /* No query to run */ }
+ function options_form(&$form, &$form_state) {
+ $form['markup'] = array(
+ '#markup' => '<div class="form-item description">' . t('The handler for this item is broken or missing and cannot be used. If a module provided the handler and was disabled, re-enabling the module may restore it. Otherwise, you should probably delete this item.') . '</div>',
+ );
+ }
+
+ /**
+ * Determine if the handler is considered 'broken'
+ */
+ function broken() { return TRUE; }
+}
+
+
+/**
+ * @}
+ */
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
new file mode 100644
index 0000000..f795b9f
--- /dev/null
+++ b/kolab.org/www/drupal-7.15/sites/all/modules/views/handlers/views_handler_filter_boolean_operator.inc
@@ -0,0 +1,170 @@
+<?php
+/**
+ * Simple filter to handle matching of boolean values
+ *
+ * Definition items:
+ * - label: (REQUIRED) The label for the checkbox.
+ * - type: For basic 'true false' types, an item can specify the following:
+ * - true-false: True/false (this is the default)
+ * - yes-no: Yes/No
+ * - on-off: On/Off
+ * - enabled-disabled: Enabled/Disabled
+ * - accept null: Treat a NULL value as false.
+ * - use equal: If you use this flag the query will use = 1 instead of <> 0.
+ * This might be helpful for performance reasons.
+ *
+ * @ingroup views_filter_handlers
+ */
+class views_handler_filter_boolean_operator extends views_handler_filter {
+ // exposed filter options
+ var $always_multiple = TRUE;
+ // Don't display empty space where the operator would be.
+ var $no_operator = TRUE;
+ // Whether to accept NULL as a false value or not
+ var $accept_null = FALSE;
+
+ function construct() {
+ $this->value_value = t('True');
+ if (isset($this->definition['label'])) {
+ $this->value_value = $this->definition['label'];
+ }
+ if (isset($this->definition['accept null'])) {
+ $this->accept_null = (bool) $this->definition['accept null'];
+ }
+ else if (isset($this->definition['accept_null'])) {
+ $this->accept_null = (bool) $this->definition['accept_null'];
+ }
+ $this->value_options = NULL;
+ parent::construct();
+ }
+
+ /**
+ * Return the possible options for this filter.
+ *
+ * Child classes should override this function to set the possible values
+ * for the filter. Since this is a boolean filter, the array should have
+ * two possible keys: 1 for "True" and 0 for "False", although the labels
+ * can be whatever makes sense for the filter. These values are used for
+ * configuring the filter, when the filter is exposed, and in the admin
+ * summary of the filter. Normally, this should be static data, but if it's
+ * dynamic for some reason, child classes should use a guard to reduce
+ * database hits as much as possible.
+ */
+ function get_value_options() {
+ if (isset($this->definition['type'])) {
+ if ($this->definition['type'] == 'yes-no') {
+ $this->value_options = array(1 => t('Yes'), 0 => t('No'));
+ }
+ if ($this->definition['type'] == 'on-off') {
+ $this->value_options = array(1 => t('On'), 0 => t('Off'));
+ }
+ if ($this->definition['type'] == 'enabled-disabled') {
+ $this->value_options = array(1 => t('Enabled'), 0 => t('Disabled'));
+ }
+ }
+
+ // Provide a fallback if the above didn't set anything.
+ if (!isset($this->value_options)) {
+ $this->value_options = array(1 => t('True'), 0 => t('False'));
+ }
+ }
+
+ function option_definition() {
+ $options = parent::option_definition();
+
+ $options['value']['default'] = FALSE;
+
+ return $options;
+ }
+
+ function operator_form(&$form, &$form_state) {
+ $form['operator'] = array();
+ }
+
+ function value_form(&$form, &$form_state) {
+ if (empty($this->value_options)) {
+ // Initialize the array of possible values for this filter.
+ $this->get_value_options();
+ }
+ if (!empty($form_state['exposed'])) {
+ // Exposed filter: use a select box to save space.
+ $filter_form_type = 'select';
+ }
+ else {
+ // Configuring a filter: use radios for clarity.
+ $filter_form_type = 'radios';
+ }
+ $form['value'] = array(
+ '#type' => $filter_form_type,
+ '#title' => $this->value_value,
+ '#options' => $this->value_options,
+ '#default_value' => $this->value,
+ );
+ if (!empty($this->options['exposed'])) {
+ $identifier = $this->options['expose']['identifier'];
+ if (!empty($form_state['exposed']) && !isset($form_state['input'][$identifier])) {
+ $form_state['input'][$identifier] = $this->value;
+ }
+ // If we're configuring an exposed filter, add an <Any> option.
+ if (empty($form_state['exposed']) || empty($this->options['expose']['required'])) {
+ $any_label = variable_get('views_exposed_filter_any_label', 'new_any') == 'old_any' ? '<Any>' : t('- Any -');
+ if ($form['value']['#type'] != 'select') {
+ $any_label = check_plain($any_label);
+ }
+ $form['value']['#options'] = array('All' => $any_label) + $form['value']['#options'];
+ }
+ }
+ }
+
+ function value_validate($form, &$form_state) {
+ if ($form_state['values']['options']['value'] == 'All' && !empty($form_state['values']['options']['expose']['required'])) {
+ form_set_error('value', t('You must select a value unless this is an non-required exposed filter.'));
+ }
+ }
+
+ function admin_summary() {
+ if (!empty($this->options['exposed'])) {
+ return t('exposed');
+ }
+ if (empty($this->value_options)) {
+ $this->get_value_options();
+ }
+ // Now that we have the valid options for this filter, just return the
+ // human-readable label based on the current value. The value_options
+ // array is keyed with either 0 or 1, so if the current value is not
+ // empty, use the label for 1, and if it's empty, use the label for 0.
+ return $this->value_options[!empty($this->value)];
+ }
+
+ function expose_options() {
+ parent::expose_options();
+ $this->options['expose']['operator_id'] = '';
+ $this->options['expose']['label'] = $this->value_value;
+ $this->options['expose']['required'] = TRUE;
+ }
+
+ function query() {
+ $this->ensure_my_table();
+ $field = "$this->table_alias.$this->real_field";
+
+ if (empty($this->value)) {
+ if ($this->accept_null) {
+ $or = db_or()
+ ->condition($field, 0, '=')
+ ->condition($field, NULL, 'IS NULL');
+ $this->query->add_where($this->options['group'], $or);
+ }
+ else {
+ $this->query->add_where($this->options['group'], $field, 0, '=');
+ }
+ }
+ else {
+ if (!empty($this->definition['use equal'])) {
+ $this->query->add_where($this->options['group'], $field, 1, '=');
+ }
+ else {
+ $this->query->add_where($this->options['group'], $field, 0, '<>');
+ }
+ }
+ }
+}
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
new file mode 100644
index 0000000..b27cae4
--- /dev/null
+++ b/kolab.org/www/drupal-7.15/sites/all/modules/views/handlers/views_handler_filter_boolean_operator_string.inc
@@ -0,0 +1,29 @@
+<?php
+/**
+ * Simple filter to handle matching of boolean values.
+ *
+ * This handler checks to see if a string field is empty (equal to '') or not.
+ * It is otherwise identical to the parent operator.
+ *
+ * Definition items:
+ * - label: (REQUIRED) The label for the checkbox.
+ *
+ * @ingroup views_filter_handlers
+ */
+class views_handler_filter_boolean_operator_string extends views_handler_filter_boolean_operator {
+ function query() {
+ $this->ensure_my_table();
+ $where = "$this->table_alias.$this->real_field ";
+
+ if (empty($this->value)) {
+ $where .= "= ''";
+ if ($this->accept_null) {
+ $where = '(' . $where . " OR $this->table_alias.$this->real_field IS NULL)";
+ }
+ }
+ else {
+ $where .= "<> ''";
+ }
+ $this->query->add_where($this->options['group'], $where);
+ }
+}
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
new file mode 100644
index 0000000..b89d003
--- /dev/null
+++ b/kolab.org/www/drupal-7.15/sites/all/modules/views/handlers/views_handler_filter_date.inc
@@ -0,0 +1,150 @@
+<?php
+
+/**
+ * Filter to handle dates stored as a timestamp.
+ *
+ * @ingroup views_filter_handlers
+ */
+class views_handler_filter_date extends views_handler_filter_numeric {
+ function option_definition() {
+ $options = parent::option_definition();
+
+ // value is already set up properly, we're just adding our new field to it.
+ $options['value']['contains']['type']['default'] = 'date';
+
+ return $options;
+ }
+
+ /**
+ * Add a type selector to the value form
+ */
+ function value_form(&$form, &$form_state) {
+ if (empty($form_state['exposed'])) {
+ $form['value']['type'] = array(
+ '#type' => 'radios',
+ '#title' => t('Value type'),
+ '#options' => array(
+ 'date' => t('A date in any machine readable format. CCYY-MM-DD HH:MM:SS is preferred.'),
+ 'offset' => t('An offset from the current time such as "!example1" or "!example2"', array('!example1' => '+1 day', '!example2' => '-2 hours -30 minutes')),
+ ),
+ '#default_value' => !empty($this->value['type']) ? $this->value['type'] : 'date',
+ );
+ }
+ parent::value_form($form, $form_state);
+ }
+
+ function options_validate(&$form, &$form_state) {
+ parent::options_validate($form, $form_state);
+
+ if (!empty($this->options['exposed']) && empty($form_state['values']['options']['expose']['required'])) {
+ // Who cares what the value is if it's exposed and non-required.
+ return;
+ }
+
+ $this->validate_valid_time($form['value'], $form_state['values']['options']['operator'], $form_state['values']['options']['value']);
+ }
+
+ function exposed_validate(&$form, &$form_state) {
+ if (empty($this->options['exposed'])) {
+ return;
+ }
+
+ if (empty($this->options['expose']['required'])) {
+ // Who cares what the value is if it's exposed and non-required.
+ return;
+ }
+
+ $value = &$form_state['values'][$this->options['expose']['identifier']];
+ if (!empty($this->options['expose']['use_operator']) && !empty($this->options['expose']['operator_id'])) {
+ $operator = $form_state['values'][$this->options['expose']['operator_id']];
+ }
+ else {
+ $operator = $this->operator;
+ }
+
+ $this->validate_valid_time($this->options['expose']['identifier'], $operator, $value);
+
+ }
+
+ /**
+ * Validate that the time values convert to something usable.
+ */
+ function validate_valid_time(&$form, $operator, $value) {
+ $operators = $this->operators();
+
+ if ($operators[$operator]['values'] == 1) {
+ $convert = strtotime($value['value']);
+ if (!empty($form['value']) && ($convert == -1 || $convert === FALSE)) {
+ form_error($form['value'], t('Invalid date format.'));
+ }
+ }
+ elseif ($operators[$operator]['values'] == 2) {
+ $min = strtotime($value['min']);
+ if ($min == -1 || $min === FALSE) {
+ form_error($form['min'], t('Invalid date format.'));
+ }
+ $max = strtotime($value['max']);
+ if ($max == -1 || $max === FALSE) {
+ form_error($form['max'], t('Invalid date format.'));
+ }
+ }
+ }
+
+ function accept_exposed_input($input) {
+ if (empty($this->options['exposed'])) {
+ return TRUE;
+ }
+
+ // Store this because it will get overwritten.
+ $type = $this->value['type'];
+ $rc = parent::accept_exposed_input($input);
+
+ // Don't filter if value(s) are empty.
+ $operators = $this->operators();
+ if (!empty($this->options['expose']['use_operator']) && !empty($this->options['expose']['operator_id'])) {
+ $operator = $input[$this->options['expose']['operator_id']];
+ }
+ else {
+ $operator = $this->operator;
+ }
+
+ if ($operators[$operator]['values'] == 1) {
+ if ($this->value['value'] == '') {
+ return FALSE;
+ }
+ }
+ else {
+ if ($this->value['min'] == '' || $this->value['max'] == '') {
+ return FALSE;
+ }
+ }
+
+ // restore what got overwritten by the parent.
+ $this->value['type'] = $type;
+ return $rc;
+ }
+
+ function op_between($field) {
+ $a = intval(strtotime($this->value['min'], 0));
+ $b = intval(strtotime($this->value['max'], 0));
+
+ if ($this->value['type'] == 'offset') {
+ $a = '***CURRENT_TIME***' . sprintf('%+d', $a); // keep sign
+ $b = '***CURRENT_TIME***' . sprintf('%+d', $b); // keep sign
+ }
+ // This is safe because we are manually scrubbing the values.
+ // It is necessary to do it this way because $a and $b are formulas when using an offset.
+ $operator = strtoupper($this->operator);
+ $this->query->add_where_expression($this->options['group'], "$field $operator $a AND $b");
+ }
+
+ function op_simple($field) {
+ $value = intval(strtotime($this->value['value'], 0));
+ if (!empty($this->value['type']) && $this->value['type'] == 'offset') {
+ $value = '***CURRENT_TIME***' . sprintf('%+d', $value); // keep sign
+ }
+ // This is safe because we are manually scrubbing the value.
+ // It is necessary to do it this way because $value is a formula when using an offset.
+ $this->query->add_where_expression($this->options['group'], "$field $this->operator $value");
+ }
+}
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
new file mode 100644
index 0000000..dfe2445
--- /dev/null
+++ b/kolab.org/www/drupal-7.15/sites/all/modules/views/handlers/views_handler_filter_equality.inc
@@ -0,0 +1,39 @@
+<?php
+/**
+ * Simple filter to handle equal to / not equal to filters
+ *
+ * @ingroup views_filter_handlers
+ */
+class views_handler_filter_equality extends views_handler_filter {
+ // exposed filter options
+ var $always_multiple = TRUE;
+
+ /**
+ * Provide simple equality operator
+ */
+ function operator_options() {
+ return array(
+ '=' => t('Is equal to'),
+ '!=' => t('Is not equal to'),
+ );
+ }
+
+ /**
+ * Provide a simple textfield for equality
+ */
+ function value_form(&$form, &$form_state) {
+ $form['value'] = array(
+ '#type' => 'textfield',
+ '#title' => t('Value'),
+ '#size' => 30,
+ '#default_value' => $this->value,
+ );
+
+ if (!empty($form_state['exposed'])) {
+ $identifier = $this->options['expose']['identifier'];
+ if (!isset($form_state['input'][$identifier])) {
+ $form_state['input'][$identifier] = $this->value;
+ }
+ }
+ }
+}
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
new file mode 100644
index 0000000..2332d39
--- /dev/null
+++ b/kolab.org/www/drupal-7.15/sites/all/modules/views/handlers/views_handler_filter_group_by_numeric.inc
@@ -0,0 +1,51 @@
+<?php
+
+/**
+ * Simple filter to handle greater than/less than filters
+ *
+ * @ingroup views_filter_handlers
+ */
+class views_handler_filter_group_by_numeric extends views_handler_filter_numeric {
+ function query() {
+ $this->ensure_my_table();
+ $field = $this->get_field();
+
+ $info = $this->operators();
+ if (!empty($info[$this->operator]['method'])) {
+ $this->{$info[$this->operator]['method']}($field);
+ }
+ }
+ function op_between($field) {
+ $placeholder_min = $this->placeholder();
+ $placeholder_max = $this->placeholder();
+ if ($this->operator == 'between') {
+ $this->query->add_having_expression($this->options['group'], "$field >= $placeholder_min", array($placeholder_min => $this->value['min']));
+ $this->query->add_having_expression($this->options['group'], "$field <= $placeholder_max", array($placeholder_max => $this->value['max']));
+ }
+ else {
+ $this->query->add_having_expression($this->options['group'], "$field <= $placeholder_min OR $field >= $placeholder_max", array($placeholder_min => $this->value['min'], $placeholder_max => $this->value['max']));
+ }
+ }
+
+ function op_simple($field) {
+ $placeholder = $this->placeholder();
+ $this->query->add_having_expression($this->options['group'], "$field $this->operator $placeholder", array($placeholder => $this->value['value']));
+ }
+
+ function op_empty($field) {
+ if ($this->operator == 'empty') {
+ $operator = "IS NULL";
+ }
+ else {
+ $operator = "IS NOT NULL";
+ }
+
+ $this->query->add_having_expression($this->options['group'], "$field $operator");
+ }
+
+ function ui_name($short = FALSE) {
+ return $this->get_field(parent::ui_name($short));
+ }
+
+ function can_group() { return FALSE; }
+}
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
new file mode 100644
index 0000000..8054542
--- /dev/null
+++ b/kolab.org/www/drupal-7.15/sites/all/modules/views/handlers/views_handler_filter_in_operator.inc
@@ -0,0 +1,417 @@
+<?php
+/**
+ * Simple filter to handle matching of multiple options selectable via checkboxes
+ *
+ * Definition items:
+ * - options callback: The function to call in order to generate the value options. If omitted, the options 'Yes' and 'No' will be used.
+ * - options arguments: An array of arguments to pass to the options callback.
+ *
+ * @ingroup views_filter_handlers
+ */
+class views_handler_filter_in_operator extends views_handler_filter {
+ var $value_form_type = 'checkboxes';
+
+ /**
+ * @var array
+ * Stores all operations which are available on the form.
+ */
+ var $value_options = NULL;
+
+ function construct() {
+ parent::construct();
+ $this->value_title = t('Options');
+ $this->value_options = NULL;
+ }
+
+ /**
+ * Child classes should be used to override this function and set the
+ * 'value options', unless 'options callback' is defined as a valid function
+ * or static public method to generate these values.
+ *
+ * This can use a guard to be used to reduce database hits as much as
+ * possible.
+ *
+ * @return
+ * Return the stored values in $this->value_options if someone expects it.
+ */
+ function get_value_options() {
+ if (isset($this->value_options)) {
+ return;
+ }
+
+ if (isset($this->definition['options callback']) && is_callable($this->definition['options callback'])) {
+ if (isset($this->definition['options arguments']) && is_array($this->definition['options arguments'])) {
+ $this->value_options = call_user_func_array($this->definition['options callback'], $this->definition['options arguments']);
+ }
+ else {
+ $this->value_options = call_user_func($this->definition['options callback']);
+ }
+ }
+ else {
+ $this->value_options = array(t('Yes'), t('No'));
+ }
+
+ return $this->value_options;
+ }
+
+ function expose_options() {
+ parent::expose_options();
+ $this->options['expose']['reduce'] = FALSE;
+ }
+
+ function expose_form(&$form, &$form_state) {
+ parent::expose_form($form, $form_state);
+ $form['expose']['reduce'] = array(
+ '#type' => 'checkbox',
+ '#title' => t('Limit list to selected items'),
+ '#description' => t('If checked, the only items presented to the user will be the ones selected here.'),
+ '#default_value' => !empty($this->options['expose']['reduce']), // safety
+ );
+ }
+
+ function option_definition() {
+ $options = parent::option_definition();
+
+ $options['operator']['default'] = 'in';
+ $options['value']['default'] = array();
+ $options['expose']['contains']['reduce'] = array('default' => FALSE);
+
+ return $options;
+ }
+
+ /**
+ * This kind of construct makes it relatively easy for a child class
+ * to add or remove functionality by overriding this function and
+ * adding/removing items from this array.
+ */
+ function operators() {
+ $operators = array(
+ 'in' => array(
+ 'title' => t('Is one of'),
+ 'short' => t('in'),
+ 'short_single' => t('='),
+ 'method' => 'op_simple',
+ 'values' => 1,
+ ),
+ 'not in' => array(
+ 'title' => t('Is not one of'),
+ 'short' => t('not in'),
+ 'short_single' => t('<>'),
+ 'method' => 'op_simple',
+ 'values' => 1,
+ ),
+ );
+ // if the definition allows for the empty operator, add it.
+ if (!empty($this->definition['allow empty'])) {
+ $operators += array(
+ 'empty' => array(
+ 'title' => t('Is empty (NULL)'),
+ 'method' => 'op_empty',
+ 'short' => t('empty'),
+ 'values' => 0,
+ ),
+ 'not empty' => array(
+ 'title' => t('Is not empty (NOT NULL)'),
+ 'method' => 'op_empty',
+ 'short' => t('not empty'),
+ 'values' => 0,
+ ),
+ );
+ }
+
+ return $operators;
+ }
+
+ /**
+ * Build strings from the operators() for 'select' options
+ */
+ function operator_options($which = 'title') {
+ $options = array();
+ foreach ($this->operators() as $id => $info) {
+ $options[$id] = $info[$which];
+ }
+
+ return $options;
+ }
+
+ function operator_values($values = 1) {
+ $options = array();
+ foreach ($this->operators() as $id => $info) {
+ if (isset($info['values']) && $info['values'] == $values) {
+ $options[] = $id;
+ }
+ }
+
+ return $options;
+ }
+
+ function value_form(&$form, &$form_state) {
+ $form['value'] = array();
+ $options = array();
+
+ if (empty($form_state['exposed'])) {
+ // Add a select all option to the value form.
+ $options = array('all' => t('Select all'));
+ }
+
+ $this->get_value_options();
+ $options += $this->value_options;
+ $default_value = (array) $this->value;
+
+ $which = 'all';
+ if (!empty($form['operator'])) {
+ $source = ($form['operator']['#type'] == 'radios') ? 'radio:options[operator]' : 'edit-options-operator';
+ }
+ if (!empty($form_state['exposed'])) {
+ $identifier = $this->options['expose']['identifier'];
+
+ if (empty($this->options['expose']['use_operator']) || empty($this->options['expose']['operator_id'])) {
+ // exposed and locked.
+ $which = in_array($this->operator, $this->operator_values(1)) ? 'value' : 'none';
+ }
+ else {
+ $source = 'edit-' . drupal_html_id($this->options['expose']['operator_id']);
+ }
+
+ if (!empty($this->options['expose']['reduce'])) {
+ $options = $this->reduce_value_options();
+
+ if (!empty($this->options['expose']['multiple']) && empty($this->options['expose']['required'])) {
+ $default_value = array();
+ }
+ }
+
+ if (empty($this->options['expose']['multiple'])) {
+ if (empty($this->options['expose']['required']) && (empty($default_value) || !empty($this->options['expose']['reduce']))) {
+ $default_value = 'All';
+ }
+ elseif (empty($default_value)) {
+ $keys = array_keys($options);
+ $default_value = array_shift($keys);
+ }
+ else {
+ $copy = $default_value;
+ $default_value = array_shift($copy);
+ }
+ }
+ }
+
+ if ($which == 'all' || $which == 'value') {
+ $form['value'] = array(
+ '#type' => $this->value_form_type,
+ '#title' => $this->value_title,
+ '#options' => $options,
+ '#default_value' => $default_value,
+ // These are only valid for 'select' type, but do no harm to checkboxes.
+ '#multiple' => TRUE,
+ '#size' => count($options) > 8 ? 8 : count($options),
+ );
+ if (!empty($form_state['exposed']) && !isset($form_state['input'][$identifier])) {
+ $form_state['input'][$identifier] = $default_value;
+ }
+
+ if ($which == 'all') {
+ if (empty($form_state['exposed']) && (in_array($this->value_form_type, array('checkbox', 'checkboxes', 'radios', 'select')))) {
+ $form['value']['#prefix'] = '<div id="edit-options-value-wrapper">';
+ $form['value']['#suffix'] = '</div>';
+ }
+ $form['value']['#dependency'] = array($source => $this->operator_values(1));
+ }
+ }
+ }
+
+ /**
+ * When using exposed filters, we may be required to reduce the set.
+ */
+ function reduce_value_options($input = NULL) {
+ if (!isset($input)) {
+ $input = $this->value_options;
+ }
+
+ // Because options may be an array of strings, or an array of mixed arrays
+ // and strings (optgroups) or an array of objects, we have to
+ // step through and handle each one individually.
+ $options = array();
+ foreach ($input as $id => $option) {
+ if (is_array($option)) {
+ $options[$id] = $this->reduce_value_options($option);
+ continue;
+ }
+ elseif (is_object($option)) {
+ $keys = array_keys($option->option);
+ $key = array_shift($keys);
+ if (isset($this->options['value'][$key])) {
+ $options[$id] = $option;
+ }
+ }
+ elseif (isset($this->options['value'][$id])) {
+ $options[$id] = $option;
+ }
+ }
+ return $options;
+ }
+
+ function accept_exposed_input($input) {
+ // A very special override because the All state for this type of
+ // filter could have a default:
+ if (empty($this->options['exposed'])) {
+ return TRUE;
+ }
+
+ // If this is non-multiple and non-required, then this filter will
+ // participate, but using the default settings, *if* 'limit is true.
+ if (empty($this->options['expose']['multiple']) && empty($this->options['expose']['required']) && !empty($this->options['expose']['limit'])) {
+ $identifier = $this->options['expose']['identifier'];
+ if ($input[$identifier] == 'All') {
+ return TRUE;
+ }
+ }
+
+ return parent::accept_exposed_input($input);
+ }
+
+ function value_submit($form, &$form_state) {
+ // Drupal's FAPI system automatically puts '0' in for any checkbox that
+ // was not set, and the key to the checkbox if it is set.
+ // Unfortunately, this means that if the key to that checkbox is 0,
+ // we are unable to tell if that checkbox was set or not.
+
+ // Luckily, the '#value' on the checkboxes form actually contains
+ // *only* a list of checkboxes that were set, and we can use that
+ // instead.
+
+ $form_state['values']['options']['value'] = $form['value']['#value'];
+ }
+
+ function admin_summary() {
+ if (!empty($this->options['exposed'])) {
+ return t('exposed');
+ }
+ $info = $this->operators();
+
+ $this->get_value_options();
+
+ if (!is_array($this->value)) {
+ return;
+ }
+
+ $operator = check_plain($info[$this->operator]['short']);
+ $values = '';
+ if (in_array($this->operator, $this->operator_values(1))) {
+ // Remove every element which is not known.
+ foreach ($this->value as $value) {
+ if (!isset($this->value_options[$value])) {
+ unset($this->value[$value]);
+ }
+ }
+ // Choose different kind of ouput for 0, a single and multiple values.
+ if (count($this->value) == 0) {
+ $values = t('Unknown');
+ }
+ else if (count($this->value) == 1) {
+ // If any, use the 'single' short name of the operator instead.
+ if (isset($info[$this->operator]['short_single'])) {
+ $operator = check_plain($info[$this->operator]['short_single']);
+ }
+
+ $keys = $this->value;
+ $value = array_shift($keys);
+ if (isset($this->value_options[$value])) {
+ $values = check_plain($this->value_options[$value]);
+ }
+ else {
+ $values = '';
+ }
+ }
+ else {
+ foreach ($this->value as $value) {
+ if ($values !== '') {
+ $values .= ', ';
+ }
+ if (drupal_strlen($values) > 8) {
+ $values .= '...';
+ break;
+ }
+ if (isset($this->value_options[$value])) {
+ $values .= check_plain($this->value_options[$value]);
+ }
+ }
+ }
+ }
+
+ return $operator . (($values !== '') ? ' ' . $values : '');
+ }
+
+ function query() {
+ $info = $this->operators();
+ if (!empty($info[$this->operator]['method'])) {
+ $this->{$info[$this->operator]['method']}();
+ }
+ }
+
+ function op_simple() {
+ if (empty($this->value)) {
+ return;
+ }
+ $this->ensure_my_table();
+
+ // We use array_values() because the checkboxes keep keys and that can cause
+ // array addition problems.
+ $this->query->add_where($this->options['group'], "$this->table_alias.$this->real_field", array_values($this->value), $this->operator);
+ }
+
+ function op_empty() {
+ $this->ensure_my_table();
+ if ($this->operator == 'empty') {
+ $operator = "IS NULL";
+ }
+ else {
+ $operator = "IS NOT NULL";
+ }
+
+ $this->query->add_where($this->options['group'], "$this->table_alias.$this->real_field", NULL, $operator);
+ }
+
+ function validate() {
+ $this->get_value_options();
+ $errors = array();
+
+ // If the operator is an operator which doesn't require a value, there is
+ // no need for additional validation.
+ if (in_array($this->operator, $this->operator_values(0))) {
+ return array();
+ }
+
+ if (!in_array($this->operator, $this->operator_values(1))) {
+ $errors[] = t('The operator is invalid on filter: @filter.', array('@filter' => $this->ui_name(TRUE)));
+ }
+ if (is_array($this->value)) {
+ if (!isset($this->value_options)) {
+ // Don't validate if there are none value options provided, for example for special handlers.
+ return $errors;
+ }
+ if ($this->options['exposed'] && !$this->options['expose']['required'] && empty($this->value)) {
+ // Don't validate if the field is exposed and no default value is provided.
+ return $errors;
+ }
+
+ // Some filter_in_operator usage uses optgroups forms, so flatten it.
+ $flat_options = form_options_flatten($this->value_options, TRUE);
+
+ // Remove every element which is not known.
+ foreach ($this->value as $value) {
+ if (!isset($flat_options[$value])) {
+ unset($this->value[$value]);
+ }
+ }
+ // Choose different kind of ouput for 0, a single and multiple values.
+ if (count($this->value) == 0) {
+ $errors[] = t('No valid values found on filter: @filter.', array('@filter' => $this->ui_name(TRUE)));
+ }
+ }
+ elseif (!empty($this->value) && ($this->operator == 'in' || $this->operator == 'not in')) {
+ $errors[] = t('The value @value is not an array for @operator on filter: @filter', array('@value' => views_var_export($this->value), '@operator' => $this->operator, '@filter' => $this->ui_name(TRUE)));
+ }
+ return $errors;
+ }
+}
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
new file mode 100644
index 0000000..c6d6d20
--- /dev/null
+++ b/kolab.org/www/drupal-7.15/sites/all/modules/views/handlers/views_handler_filter_many_to_one.inc
@@ -0,0 +1,120 @@
+<?php
+
+/**
+ * Complex filter to handle filtering for many to one relationships,
+ * such as terms (many terms per node) or roles (many roles per user).
+ *
+ * The construct method needs to be overridden to provide a list of options;
+ * alternately, the value_form and admin_summary methods need to be overriden
+ * to provide something that isn't just a select list.
+ *
+ * @ingroup views_filter_handlers
+ */
+class views_handler_filter_many_to_one extends views_handler_filter_in_operator {
+ /**
+ * @var views_many_to_one_helper
+ *
+ * Stores the Helper object which handles the many_to_one complexity.
+ */
+ var $helper = NULL;
+
+ function init(&$view, &$options) {
+ parent::init($view, $options);
+ $this->helper = new views_many_to_one_helper($this);
+ }
+
+ function option_definition() {
+ $options = parent::option_definition();
+
+ $options['operator']['default'] = 'or';
+ $options['value']['default'] = array();
+
+ if (isset($this->helper)) {
+ $this->helper->option_definition($options);
+ }
+ else {
+ $helper = new views_many_to_one_helper($this);
+ $helper->option_definition($options);
+ }
+
+ return $options;
+ }
+
+ function operators() {
+ $operators = array(
+ 'or' => array(
+ 'title' => t('Is one of'),
+ 'short' => t('or'),
+ 'short_single' => t('='),
+ 'method' => 'op_helper',
+ 'values' => 1,
+ 'ensure_my_table' => 'helper',
+ ),
+ 'and' => array(
+ 'title' => t('Is all of'),
+ 'short' => t('and'),
+ 'short_single' => t('='),
+ 'method' => 'op_helper',
+ 'values' => 1,
+ 'ensure_my_table' => 'helper',
+ ),
+ 'not' => array(
+ 'title' => t('Is none of'),
+ 'short' => t('not'),
+ 'short_single' => t('<>'),
+ 'method' => 'op_helper',
+ 'values' => 1,
+ 'ensure_my_table' => 'helper',
+ ),
+ );
+ // if the definition allows for the empty operator, add it.
+ if (!empty($this->definition['allow empty'])) {
+ $operators += array(
+ 'empty' => array(
+ 'title' => t('Is empty (NULL)'),
+ 'method' => 'op_empty',
+ 'short' => t('empty'),
+ 'values' => 0,
+ ),
+ 'not empty' => array(
+ 'title' => t('Is not empty (NOT NULL)'),
+ 'method' => 'op_empty',
+ 'short' => t('not empty'),
+ 'values' => 0,
+ ),
+ );
+ }
+
+ return $operators;
+ }
+
+ var $value_form_type = 'select';
+ function value_form(&$form, &$form_state) {
+ parent::value_form($form, $form_state);
+
+ if (empty($form_state['exposed'])) {
+ $this->helper->options_form($form, $form_state);
+ }
+ }
+
+ /**
+ * Override ensure_my_table so we can control how this joins in.
+ * The operator actually has influence over joining.
+ */
+ function ensure_my_table() {
+ // Defer to helper if the operator specifies it.
+ $info = $this->operators();
+ if (isset($info[$this->operator]['ensure_my_table']) && $info[$this->operator]['ensure_my_table'] == 'helper') {
+ return $this->helper->ensure_my_table();
+ }
+
+ return parent::ensure_my_table();
+ }
+
+ function op_helper() {
+ if (empty($this->value)) {
+ return;
+ }
+ $this->helper->add_filter();
+ }
+}
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
new file mode 100644
index 0000000..71d8b9e
--- /dev/null
+++ b/kolab.org/www/drupal-7.15/sites/all/modules/views/handlers/views_handler_filter_numeric.inc
@@ -0,0 +1,317 @@
+<?php
+
+/**
+ * Simple filter to handle greater than/less than filters
+ *
+ * @ingroup views_filter_handlers
+ */
+class views_handler_filter_numeric extends views_handler_filter {
+ var $always_multiple = TRUE;
+ function option_definition() {
+ $options = parent::option_definition();
+
+ $options['value'] = array(
+ 'contains' => array(
+ 'min' => array('default' => ''),
+ 'max' => array('default' => ''),
+ 'value' => array('default' => ''),
+ ),
+ );
+
+ return $options;
+ }
+
+ function operators() {
+ $operators = array(
+ '<' => array(
+ 'title' => t('Is less than'),
+ 'method' => 'op_simple',
+ 'short' => t('<'),
+ 'values' => 1,
+ ),
+ '<=' => array(
+ 'title' => t('Is less than or equal to'),
+ 'method' => 'op_simple',
+ 'short' => t('<='),
+ 'values' => 1,
+ ),
+ '=' => array(
+ 'title' => t('Is equal to'),
+ 'method' => 'op_simple',
+ 'short' => t('='),
+ 'values' => 1,
+ ),
+ '!=' => array(
+ 'title' => t('Is not equal to'),
+ 'method' => 'op_simple',
+ 'short' => t('!='),
+ 'values' => 1,
+ ),
+ '>=' => array(
+ 'title' => t('Is greater than or equal to'),
+ 'method' => 'op_simple',
+ 'short' => t('>='),
+ 'values' => 1,
+ ),
+ '>' => array(
+ 'title' => t('Is greater than'),
+ 'method' => 'op_simple',
+ 'short' => t('>'),
+ 'values' => 1,
+ ),
+ 'between' => array(
+ 'title' => t('Is between'),
+ 'method' => 'op_between',
+ 'short' => t('between'),
+ 'values' => 2,
+ ),
+ 'not between' => array(
+ 'title' => t('Is not between'),
+ 'method' => 'op_between',
+ 'short' => t('not between'),
+ 'values' => 2,
+ ),
+ );
+
+ // if the definition allows for the empty operator, add it.
+ if (!empty($this->definition['allow empty'])) {
+ $operators += array(
+ 'empty' => array(
+ 'title' => t('Is empty (NULL)'),
+ 'method' => 'op_empty',
+ 'short' => t('empty'),
+ 'values' => 0,
+ ),
+ 'not empty' => array(
+ 'title' => t('Is not empty (NOT NULL)'),
+ 'method' => 'op_empty',
+ 'short' => t('not empty'),
+ 'values' => 0,
+ ),
+ );
+ }
+
+ // Add regexp support for MySQL.
+ if (Database::getConnection()->databaseType() == 'mysql') {
+ $operators += array(
+ 'regular_expression' => array(
+ 'title' => t('Regular expression'),
+ 'short' => t('regex'),
+ 'method' => 'op_regex',
+ 'values' => 1,
+ ),
+ );
+ }
+
+ return $operators;
+ }
+
+ /**
+ * Provide a list of all the numeric operators
+ */
+ function operator_options($which = 'title') {
+ $options = array();
+ foreach ($this->operators() as $id => $info) {
+ $options[$id] = $info[$which];
+ }
+
+ return $options;
+ }
+
+ function operator_values($values = 1) {
+ $options = array();
+ foreach ($this->operators() as $id => $info) {
+ if ($info['values'] == $values) {
+ $options[] = $id;
+ }
+ }
+
+ return $options;
+ }
+ /**
+ * Provide a simple textfield for equality
+ */
+ function value_form(&$form, &$form_state) {
+ $form['value']['#tree'] = TRUE;
+
+ // We have to make some choices when creating this as an exposed
+ // filter form. For example, if the operator is locked and thus
+ // not rendered, we can't render dependencies; instead we only
+ // render the form items we need.
+ $which = 'all';
+ if (!empty($form['operator'])) {
+ $source = ($form['operator']['#type'] == 'radios') ? 'radio:options[operator]' : 'edit-options-operator';
+ }
+
+ if (!empty($form_state['exposed'])) {
+ $identifier = $this->options['expose']['identifier'];
+
+ if (empty($this->options['expose']['use_operator']) || empty($this->options['expose']['operator_id'])) {
+ // exposed and locked.
+ $which = in_array($this->operator, $this->operator_values(2)) ? 'minmax' : 'value';
+ }
+ else {
+ $source = 'edit-' . drupal_html_id($this->options['expose']['operator_id']);
+ }
+ }
+
+ if ($which == 'all') {
+ $form['value']['value'] = array(
+ '#type' => 'textfield',
+ '#title' => empty($form_state['exposed']) ? t('Value') : '',
+ '#size' => 30,
+ '#default_value' => $this->value['value'],
+ '#dependency' => array($source => $this->operator_values(1)),
+ );
+ if (!empty($form_state['exposed']) && !isset($form_state['input'][$identifier]['value'])) {
+ $form_state['input'][$identifier]['value'] = $this->value['value'];
+ }
+ }
+ elseif ($which == 'value') {
+ // When exposed we drop the value-value and just do value if
+ // the operator is locked.
+ $form['value'] = array(
+ '#type' => 'textfield',
+ '#title' => empty($form_state['exposed']) ? t('Value') : '',
+ '#size' => 30,
+ '#default_value' => $this->value['value'],
+ );
+ if (!empty($form_state['exposed']) && !isset($form_state['input'][$identifier])) {
+ $form_state['input'][$identifier] = $this->value['value'];
+ }
+ }
+
+ if ($which == 'all' || $which == 'minmax') {
+ $form['value']['min'] = array(
+ '#type' => 'textfield',
+ '#title' => empty($form_state['exposed']) ? t('Min') : '',
+ '#size' => 30,
+ '#default_value' => $this->value['min'],
+ );
+ $form['value']['max'] = array(
+ '#type' => 'textfield',
+ '#title' => empty($form_state['exposed']) ? t('And max') : t('And'),
+ '#size' => 30,
+ '#default_value' => $this->value['max'],
+ );
+ if ($which == 'all') {
+ $dependency = array(
+ '#dependency' => array($source => $this->operator_values(2)),
+ );
+ $form['value']['min'] += $dependency;
+ $form['value']['max'] += $dependency;
+ }
+ if (!empty($form_state['exposed']) && !isset($form_state['input'][$identifier]['min'])) {
+ $form_state['input'][$identifier]['min'] = $this->value['min'];
+ }
+ if (!empty($form_state['exposed']) && !isset($form_state['input'][$identifier]['max'])) {
+ $form_state['input'][$identifier]['max'] = $this->value['max'];
+ }
+
+ if (!isset($form['value'])) {
+ // Ensure there is something in the 'value'.
+ $form['value'] = array(
+ '#type' => 'value',
+ '#value' => NULL
+ );
+ }
+ }
+ }
+
+ function query() {
+ $this->ensure_my_table();
+ $field = "$this->table_alias.$this->real_field";
+
+ $info = $this->operators();
+ if (!empty($info[$this->operator]['method'])) {
+ $this->{$info[$this->operator]['method']}($field);
+ }
+ }
+
+ function op_between($field) {
+ if ($this->operator == 'between') {
+ $this->query->add_where($this->options['group'], $field, array($this->value['min'], $this->value['max']), 'BETWEEN');
+ }
+ else {
+ $this->query->add_where($this->options['group'], db_or()->condition($field, $this->value['min'], '<=')->condition($field, $this->value['max'], '>='));
+ }
+ }
+
+ function op_simple($field) {
+ $this->query->add_where($this->options['group'], $field, $this->value['value'], $this->operator);
+ }
+
+ function op_empty($field) {
+ if ($this->operator == 'empty') {
+ $operator = "IS NULL";
+ }
+ else {
+ $operator = "IS NOT NULL";
+ }
+
+ $this->query->add_where($this->options['group'], $field, NULL, $operator);
+ }
+
+ function op_regex($field) {
+ $this->query->add_where($this->options['group'], $field, $this->value, 'RLIKE');
+ }
+
+ function admin_summary() {
+ if (!empty($this->options['exposed'])) {
+ return t('exposed');
+ }
+
+ $options = $this->operator_options('short');
+ $output = check_plain($options[$this->operator]);
+ if (in_array($this->operator, $this->operator_values(2))) {
+ $output .= ' ' . t('@min and @max', array('@min' => $this->value['min'], '@max' => $this->value['max']));
+ }
+ elseif (in_array($this->operator, $this->operator_values(1))) {
+ $output .= ' ' . check_plain($this->value['value']);
+ }
+ return $output;
+ }
+
+ /**
+ * Do some minor translation of the exposed input
+ */
+ function accept_exposed_input($input) {
+ if (empty($this->options['exposed'])) {
+ return TRUE;
+ }
+
+ // rewrite the input value so that it's in the correct format so that
+ // the parent gets the right data.
+ if (!empty($this->options['expose']['identifier'])) {
+ $value = &$input[$this->options['expose']['identifier']];
+ if (!is_array($value)) {
+ $value = array(
+ 'value' => $value,
+ );
+ }
+ }
+
+ $rc = parent::accept_exposed_input($input);
+
+ if (empty($this->options['expose']['required'])) {
+ // We have to do some of our own checking for non-required filters.
+ $info = $this->operators();
+ if (!empty($info[$this->operator]['values'])) {
+ switch ($info[$this->operator]['values']) {
+ case 1:
+ if ($value['value'] === '') {
+ return FALSE;
+ }
+ break;
+ case 2:
+ if ($value['min'] === '' && $value['max'] === '') {
+ return FALSE;
+ }
+ break;
+ }
+ }
+ }
+
+ return $rc;
+ }
+}
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
new file mode 100644
index 0000000..eec7a07
--- /dev/null
+++ b/kolab.org/www/drupal-7.15/sites/all/modules/views/handlers/views_handler_filter_string.inc
@@ -0,0 +1,330 @@
+<?php
+
+/**
+ * Basic textfield filter to handle string filtering commands
+ * including equality, like, not like, etc.
+ *
+ * @ingroup views_filter_handlers
+ */
+class views_handler_filter_string extends views_handler_filter {
+ // exposed filter options
+ var $always_multiple = TRUE;
+
+ function option_definition() {
+ $options = parent::option_definition();
+
+ $options['expose']['contains']['required'] = array('default' => FALSE);
+
+ return $options;
+ }
+
+ /**
+ * This kind of construct makes it relatively easy for a child class
+ * to add or remove functionality by overriding this function and
+ * adding/removing items from this array.
+ */
+ function operators() {
+ $operators = array(
+ '=' => array(
+ 'title' => t('Is equal to'),
+ 'short' => t('='),
+ 'method' => 'op_equal',
+ 'values' => 1,
+ ),
+ '!=' => array(
+ 'title' => t('Is not equal to'),
+ 'short' => t('!='),
+ 'method' => 'op_equal',
+ 'values' => 1,
+ ),
+ 'contains' => array(
+ 'title' => t('Contains'),
+ 'short' => t('contains'),
+ 'method' => 'op_contains',
+ 'values' => 1,
+ ),
+ 'word' => array(
+ 'title' => t('Contains any word'),
+ 'short' => t('has word'),
+ 'method' => 'op_word',
+ 'values' => 1,
+ ),
+ 'allwords' => array(
+ 'title' => t('Contains all words'),
+ 'short' => t('has all'),
+ 'method' => 'op_word',
+ 'values' => 1,
+ ),
+ 'starts' => array(
+ 'title' => t('Starts with'),
+ 'short' => t('begins'),
+ 'method' => 'op_starts',
+ 'values' => 1,
+ ),
+ 'not_starts' => array(
+ 'title' => t('Does not start with'),
+ 'short' => t('not_begins'),
+ 'method' => 'op_not_starts',
+ 'values' => 1,
+ ),
+ 'ends' => array(
+ 'title' => t('Ends with'),
+ 'short' => t('ends'),
+ 'method' => 'op_ends',
+ 'values' => 1,
+ ),
+ 'not_ends' => array(
+ 'title' => t('Does not end with'),
+ 'short' => t('not_ends'),
+ 'method' => 'op_not_ends',
+ 'values' => 1,
+ ),
+ 'not' => array(
+ 'title' => t('Does not contain'),
+ 'short' => t('!has'),
+ 'method' => 'op_not',
+ 'values' => 1,
+ ),
+ 'shorterthan' => array(
+ 'title' => t('Length is shorter than'),
+ 'short' => t('shorter than'),
+ 'method' => 'op_shorter',
+ 'values' => 1,
+ ),
+ 'longerthan' => array(
+ 'title' => t('Length is longer than'),
+ 'short' => t('longer than'),
+ 'method' => 'op_longer',
+ 'values' => 1,
+ ),
+ );
+ // if the definition allows for the empty operator, add it.
+ if (!empty($this->definition['allow empty'])) {
+ $operators += array(
+ 'empty' => array(
+ 'title' => t('Is empty (NULL)'),
+ 'method' => 'op_empty',
+ 'short' => t('empty'),
+ 'values' => 0,
+ ),
+ 'not empty' => array(
+ 'title' => t('Is not empty (NOT NULL)'),
+ 'method' => 'op_empty',
+ 'short' => t('not empty'),
+ 'values' => 0,
+ ),
+ );
+ }
+ // Add regexp support for MySQL.
+ if (Database::getConnection()->databaseType() == 'mysql') {
+ $operators += array(
+ 'regular_expression' => array(
+ 'title' => t('Regular expression'),
+ 'short' => t('regex'),
+ 'method' => 'op_regex',
+ 'values' => 1,
+ ),
+ );
+ }
+
+ return $operators;
+ }
+
+ /**
+ * Build strings from the operators() for 'select' options
+ */
+ function operator_options($which = 'title') {
+ $options = array();
+ foreach ($this->operators() as $id => $info) {
+ $options[$id] = $info[$which];
+ }
+
+ return $options;
+ }
+
+ function admin_summary() {
+ if (!empty($this->options['exposed'])) {
+ return t('exposed');
+ }
+
+ $options = $this->operator_options('short');
+ $output = '';
+ if(!empty($options[$this->operator])) {
+ $output = check_plain($options[$this->operator]);
+ }
+ if (in_array($this->operator, $this->operator_values(1))) {
+ $output .= ' ' . check_plain($this->value);
+ }
+ return $output;
+ }
+
+ function operator_values($values = 1) {
+ $options = array();
+ foreach ($this->operators() as $id => $info) {
+ if (isset($info['values']) && $info['values'] == $values) {
+ $options[] = $id;
+ }
+ }
+
+ return $options;
+ }
+
+ /**
+ * Provide a simple textfield for equality
+ */
+ function value_form(&$form, &$form_state) {
+ // We have to make some choices when creating this as an exposed
+ // filter form. For example, if the operator is locked and thus
+ // not rendered, we can't render dependencies; instead we only
+ // render the form items we need.
+ $which = 'all';
+ if (!empty($form['operator'])) {
+ $source = ($form['operator']['#type'] == 'radios') ? 'radio:options[operator]' : 'edit-options-operator';
+ }
+ if (!empty($form_state['exposed'])) {
+ $identifier = $this->options['expose']['identifier'];
+
+ if (empty($this->options['expose']['use_operator']) || empty($this->options['expose']['operator_id'])) {
+ // exposed and locked.
+ $which = in_array($this->operator, $this->operator_values(1)) ? 'value' : 'none';
+ }
+ else {
+ $source = 'edit-' . drupal_html_id($this->options['expose']['operator_id']);
+ }
+ }
+
+ if ($which == 'all' || $which == 'value') {
+ $form['value'] = array(
+ '#type' => 'textfield',
+ '#title' => t('Value'),
+ '#size' => 30,
+ '#default_value' => $this->value,
+ );
+ if (!empty($form_state['exposed']) && !isset($form_state['input'][$identifier])) {
+ $form_state['input'][$identifier] = $this->value;
+ }
+
+ if ($which == 'all') {
+ $form['value'] += array(
+ '#dependency' => array($source => $this->operator_values(1)),
+ );
+ }
+ }
+
+ if (!isset($form['value'])) {
+ // Ensure there is something in the 'value'.
+ $form['value'] = array(
+ '#type' => 'value',
+ '#value' => NULL
+ );
+ }
+ }
+
+ function operator() {
+ return $this->operator == '=' ? 'LIKE' : 'NOT LIKE';
+ }
+
+ /**
+ * Add this filter to the query.
+ *
+ * Due to the nature of fapi, the value and the operator have an unintended
+ * level of indirection. You will find them in $this->operator
+ * and $this->value respectively.
+ */
+ function query() {
+ $this->ensure_my_table();
+ $field = "$this->table_alias.$this->real_field";
+
+ $info = $this->operators();
+ if (!empty($info[$this->operator]['method'])) {
+ $this->{$info[$this->operator]['method']}($field);
+ }
+ }
+
+ function op_equal($field) {
+ $this->query->add_where($this->options['group'], $field, $this->value, $this->operator());
+ }
+
+ function op_contains($field) {
+ $this->query->add_where($this->options['group'], $field, '%' . db_like($this->value) . '%', 'LIKE');
+ }
+
+ function op_word($field) {
+ $where = $this->operator == 'word' ? db_or() : db_and();
+
+ // Don't filter on empty strings.
+ if (empty($this->value)) {
+ return;
+ }
+
+ preg_match_all('/ (-?)("[^"]+"|[^" ]+)/i', ' ' . $this->value, $matches, PREG_SET_ORDER);
+ foreach ($matches as $match) {
+ $phrase = false;
+ // Strip off phrase quotes
+ if ($match[2]{0} == '"') {
+ $match[2] = substr($match[2], 1, -1);
+ $phrase = true;
+ }
+ $words = trim($match[2], ',?!();:-');
+ $words = $phrase ? array($words) : preg_split('/ /', $words, -1, PREG_SPLIT_NO_EMPTY);
+ foreach ($words as $word) {
+ $placeholder = $this->placeholder();
+ $where->condition($field, '%' . db_like(trim($word, " ,!?")) . '%', 'LIKE');
+ }
+ }
+
+ if (!$where) {
+ return;
+ }
+
+ // previously this was a call_user_func_array but that's unnecessary
+ // as views will unpack an array that is a single arg.
+ $this->query->add_where($this->options['group'], $where);
+ }
+
+ function op_starts($field) {
+ $this->query->add_where($this->options['group'], $field, db_like($this->value) . '%', 'LIKE');
+ }
+
+ function op_not_starts($field) {
+ $this->query->add_where($this->options['group'], $field, db_like($this->value) . '%', 'NOT LIKE');
+ }
+
+ function op_ends($field) {
+ $this->query->add_where($this->options['group'], $field, '%' . db_like($this->value), 'LIKE');
+ }
+
+ function op_not_ends($field) {
+ $this->query->add_where($this->options['group'], $field, '%' . db_like($this->value), 'NOT LIKE');
+ }
+
+ function op_not($field) {
+ $this->query->add_where($this->options['group'], $field, '%' . db_like($this->value) . '%', 'NOT LIKE');
+ }
+
+ function op_shorter($field) {
+ $placeholder = $this->placeholder();
+ $this->query->add_where_expression($this->options['group'], "LENGTH($field) < $placeholder", array($placeholder => $this->value));
+ }
+
+ function op_longer($field) {
+ $placeholder = $this->placeholder();
+ $this->query->add_where_expression($this->options['group'], "LENGTH($field) > $placeholder", array($placeholder => $this->value));
+ }
+
+ function op_regex($field) {
+ $this->query->add_where($this->options['group'], $field, $this->value, 'RLIKE');
+ }
+
+ function op_empty($field) {
+ if ($this->operator == 'empty') {
+ $operator = "IS NULL";
+ }
+ else {
+ $operator = "IS NOT NULL";
+ }
+
+ $this->query->add_where($this->options['group'], $field, NULL, $operator);
+ }
+
+}
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
new file mode 100644
index 0000000..18f21f8
--- /dev/null
+++ b/kolab.org/www/drupal-7.15/sites/all/modules/views/handlers/views_handler_relationship.inc
@@ -0,0 +1,183 @@
+<?php
+/**
+ * @file
+ * Views' relationship handlers.
+ */
+
+/**
+ * @defgroup views_relationship_handlers Views' relationship handlers
+ * @{
+ * Handlers to tell Views how to create alternate relationships.
+ */
+
+/**
+ * Simple relationship handler that allows a new version of the primary table
+ * to be linked in.
+ *
+ * The base relationship handler can only handle a single join. Some relationships
+ * are more complex and might require chains of joins; for those, you must
+ * utilize a custom relationship handler.
+ *
+ * Definition items:
+ * - base: The new base table this relationship will be adding. This does not
+ * have to be a declared base table, but if there are no tables that
+ * utilize this base table, it won't be very effective.
+ * - base field: The field to use in the relationship; if left out this will be
+ * assumed to be the primary field.
+ * - relationship table: The actual table this relationship operates against.
+ * This is analogous to using a 'table' override.
+ * - relationship field: The actual field this relationship operates against.
+ * This is analogous to using a 'real field' override.
+ * - 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.
+ */
+class views_handler_relationship extends views_handler {
+ /**
+ * Init handler to let relationships live on tables other than
+ * the table they operate on.
+ */
+ function init(&$view, &$options) {
+ parent::init($view, $options);
+ if (isset($this->definition['relationship table'])) {
+ $this->table = $this->definition['relationship table'];
+ }
+ if (isset($this->definition['relationship field'])) {
+ // Set both real_field and field so custom handler
+ // can rely on the old field value.
+ $this->real_field = $this->field = $this->definition['relationship field'];
+ }
+ }
+
+ /**
+ * Get this field's label.
+ */
+ function label() {
+ if (!isset($this->options['label'])) {
+ return $this->ui_name();
+ }
+ return $this->options['label'];
+ }
+
+ function option_definition() {
+ $options = parent::option_definition();
+
+
+ // Relationships definitions should define a default label, but if they aren't get another default value.
+ if (!empty($this->definition['label'])) {
+ $label = $this->definition['label'];
+ }
+ else {
+ $label = !empty($this->definition['field']) ? $this->definition['field'] : $this->definition['base field'];
+ }
+
+ $options['label'] = array('default' => $label, 'translatable' => TRUE);
+ $options['required'] = array('default' => FALSE);
+
+ return $options;
+ }
+
+ /**
+ * Default options form that provides the label widget that all fields
+ * should have.
+ */
+ function options_form(&$form, &$form_state) {
+ parent::options_form($form, $form_state);
+ $form['label'] = array(
+ '#type' => 'textfield',
+ '#title' => t('Identifier'),
+ '#default_value' => isset($this->options['label']) ? $this->options['label'] : '',
+ '#description' => t('Edit the administrative label displayed when referencing this relationship from filters, etc.'),
+ '#required' => TRUE,
+ );
+
+ $form['required'] = array(
+ '#type' => 'checkbox',
+ '#title' => t('Require this relationship'),
+ '#description' => t('Enable to hide items that do not contain this relationship'),
+ '#default_value' => !empty($this->options['required']),
+ );
+ }
+
+ /**
+ * Called to implement a relationship in a query.
+ */
+ function query() {
+ // Figure out what base table this relationship brings to the party.
+ $table_data = views_fetch_data($this->definition['base']);
+ $base_field = empty($this->definition['base field']) ? $table_data['table']['base']['field'] : $this->definition['base field'];
+
+ $this->ensure_my_table();
+
+ $def = $this->definition;
+ $def['table'] = $this->definition['base'];
+ $def['field'] = $base_field;
+ $def['left_table'] = $this->table_alias;
+ $def['left_field'] = $this->real_field;
+ if (!empty($this->options['required'])) {
+ $def['type'] = 'INNER';
+ }
+
+ if (!empty($this->definition['extra'])) {
+ $def['extra'] = $this->definition['extra'];
+ }
+
+ if (!empty($def['join_handler']) && class_exists($def['join_handler'])) {
+ $join = new $def['join_handler'];
+ }
+ else {
+ $join = new views_join();
+ }
+
+ $join->definition = $def;
+ $join->options = $this->options;
+ $join->construct();
+ $join->adjusted = TRUE;
+
+ // use a short alias for this:
+ $alias = $def['table'] . '_' . $this->table;
+
+ $this->alias = $this->query->add_relationship($alias, $join, $this->definition['base'], $this->relationship);
+
+ // Add access tags if the base table provide it.
+ if (empty($this->query->options['disable_sql_rewrite']) && isset($table_data['table']['base']['access query tag'])) {
+ $access_tag = $table_data['table']['base']['access query tag'];
+ $this->query->add_tag($access_tag);
+ }
+ }
+
+ /**
+ * You can't groupby a relationship.
+ */
+ function use_group_by() {
+ return FALSE;
+ }
+}
+
+/**
+ * A special handler to take the place of missing or broken handlers.
+ *
+ * @ingroup views_relationship_handlers
+ */
+class views_handler_relationship_broken extends views_handler_relationship {
+ function ui_name($short = FALSE) {
+ return t('Broken/missing handler');
+ }
+
+ function ensure_my_table() { /* No table to ensure! */ }
+ function query() { /* No query to run */ }
+ function options_form(&$form, &$form_state) {
+ $form['markup'] = array(
+ '#markup' => '<div class="form-item description">' . t('The handler for this item is broken or missing and cannot be used. If a module provided the handler and was disabled, re-enabling the module may restore it. Otherwise, you should probably delete this item.') . '</div>',
+ );
+ }
+
+ /**
+ * Determine if the handler is considered 'broken'
+ */
+ function broken() { return TRUE; }
+}
+
+/**
+ * @}
+ */
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
new file mode 100644
index 0000000..b027357
--- /dev/null
+++ b/kolab.org/www/drupal-7.15/sites/all/modules/views/handlers/views_handler_relationship_groupwise_max.inc
@@ -0,0 +1,381 @@
+<?php
+// $Id$
+/*
+ * @file
+ * Relationship for groupwise maximum handler.
+ */
+
+/**
+ * Relationship handler that allows a groupwise maximum of the linked in table.
+ * For a definition, see:
+ * http://dev.mysql.com/doc/refman/5.0/en/example-maximum-column-group-row.html
+ * In lay terms, instead of joining to get all matching records in the linked
+ * table, we get only one record, a 'representative record' picked according
+ * to a given criteria.
+ *
+ * Example:
+ * Suppose we have a term view that gives us the terms: Horse, Cat, Aardvark.
+ * We wish to show for each term the most recent node of that term.
+ * What we want is some kind of relationship from term to node.
+ * But a regular relationship will give us all the nodes for each term,
+ * giving the view multiple rows per term. What we want is just one
+ * representative node per term, the node that is the 'best' in some way:
+ * eg, the most recent, the most commented on, the first in alphabetical order.
+ *
+ * This handler gives us that kind of relationship from term to node.
+ * The method of choosing the 'best' implemented with a sort
+ * that the user selects in the relationship settings.
+ *
+ * So if we want our term view to show the most commented node for each term,
+ * add the relationship and in its options, pick the 'Comment count' sort.
+ *
+ * Relationship definition
+ * - 'outer field': The outer field to substitute into the correlated subquery.
+ * This must be the full field name, not the alias.
+ * Eg: 'term_data.tid'.
+ * - 'argument table',
+ * 'argument field': These options define a views argument that the subquery
+ * must add to itself to filter by the main view.
+ * Example: the main view shows terms, this handler is being used to get to
+ * the nodes base table. Your argument must be 'term_node', 'tid', as this
+ * is the argument that should be added to a node view to filter on terms.
+ *
+ * A note on performance:
+ * This relationship uses a correlated subquery, which is expensive.
+ * Subsequent versions of this handler could also implement the alternative way
+ * of doing this, with a join -- though this looks like it could be pretty messy
+ * to implement. This is also an expensive method, so providing both methods and
+ * allowing the user to choose which one works fastest for their data might be
+ * the best way.
+ * If your use of this relationship handler is likely to result in large
+ * data sets, you might want to consider storing statistics in a separate table,
+ * in the same way as node_comment_statistics.
+ *
+ * @ingroup views_relationship_handlers
+ */
+class views_handler_relationship_groupwise_max extends views_handler_relationship {
+
+ /**
+ * Defines default values for options.
+ */
+ function option_definition() {
+ $options = parent::option_definition();
+
+ $options['subquery_sort'] = array('default' => NULL);
+ // Descending more useful.
+ $options['subquery_order'] = array('default' => 'DESC');
+ $options['subquery_regenerate'] = array('default' => FALSE);
+ $options['subquery_view'] = array('default' => FALSE);
+ $options['subquery_namespace'] = array('default' => FALSE);
+
+ return $options;
+ }
+
+ /**
+ * Extends the relationship's basic options, allowing the user to pick
+ * a sort and an order for it.
+ */
+ function options_form(&$form, &$form_state) {
+ parent::options_form($form, $form_state);
+
+ // Get the sorts that apply to our base.
+ $sorts = views_fetch_fields($this->definition['base'], 'sort');
+ foreach ($sorts as $sort_id => $sort) {
+ $sort_options[$sort_id] = "$sort[group]: $sort[title]";
+ }
+ $base_table_data = views_fetch_data($this->definition['base']);
+
+ $form['subquery_sort'] = array(
+ '#type' => 'select',
+ '#title' => t('Representative sort criteria'),
+ // Provide the base field as sane default sort option.
+ '#default_value' => !empty($this->options['subquery_sort']) ? $this->options['subquery_sort'] : $this->definition['base'] . '.' . $base_table_data['table']['base']['field'],
+ '#options' => $sort_options,
+ '#description' => theme('advanced_help_topic', array('module' => 'views', 'topic' => 'relationship-representative')) .
+ t("The sort criteria is applied to the data brought in by the relationship to determine how a representative item is obtained for each row. For example, to show the most recent node for each user, pick 'Content: Updated date'."),
+ );
+
+ $form['subquery_order'] = array(
+ '#type' => 'radios',
+ '#title' => t('Representative sort order'),
+ '#description' => t("The ordering to use for the sort criteria selected above."),
+ '#options' => array('ASC' => t('Ascending'), 'DESC' => t('Descending')),
+ '#default_value' => $this->options['subquery_order'],
+ );
+
+ $form['subquery_namespace'] = array(
+ '#type' => 'textfield',
+ '#title' => t('Subquery namespace'),
+ '#description' => t('Advanced. Enter a namespace for the subquery used by this relationship.'),
+ '#default_value' => $this->options['subquery_namespace'],
+ );
+
+
+ // WIP: This stuff doens't work yet: namespacing issues.
+ // A list of suitable views to pick one as the subview.
+ $views = array('' => '<none>');
+ $all_views = views_get_all_views();
+ foreach ($all_views as $view) {
+ // Only get views that are suitable:
+ // - base must the base that our relationship joins towards
+ // - must have fields.
+ if ($view->base_table == $this->definition['base'] && !empty($view->display['default']->display_options['fields'])) {
+ // TODO: check the field is the correct sort?
+ // or let users hang themselves at this stage and check later?
+ if ($view->type == 'Default') {
+ $views[t('Default Views')][$view->name] = $view->name;
+ }
+ else {
+ $views[t('Existing Views')][$view->name] = $view->name;
+ }
+ }
+ }
+
+ $form['subquery_view'] = array(
+ '#type' => 'select',
+ '#title' => t('Representative view'),
+ '#default_value' => $this->options['subquery_view'],
+ '#options' => $views,
+ '#description' => t('Advanced. Use another view to generate the relationship subquery. This allows you to use filtering and more than one sort. If you pick a view here, the sort options above are ignored. Your view must have the ID of its base as its only field, and should have some kind of sorting.'),
+ );
+
+ $form['subquery_regenerate'] = array(
+ '#type' => 'checkbox',
+ '#title' => t('Generate subquery each time view is run.'),
+ '#default_value' => $this->options['subquery_regenerate'],
+ '#description' => t('Will re-generate the subquery for this relationship every time the view is run, instead of only when these options are saved. Use for testing if you are making changes elsewhere. WARNING: seriously impairs performance.'),
+ );
+ }
+
+ /**
+ * 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.
+ */
+ function get_temporary_view() {
+ views_include('view');
+ $view = new view();
+ $view->vid = 'new'; // @todo: what's this?
+ $view->base_table = $this->definition['base'];
+ $view->add_display('default');
+ return $view;
+ }
+
+ /**
+ * 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
+ * is run. This saves considerable time.
+ *
+ * @param $options
+ * An array of options:
+ * - subquery_sort: the id of a views sort.
+ * - subquery_order: either ASC or DESC.
+ * @return
+ * The subquery SQL string, ready for use in the main query.
+ */
+ function left_query($options) {
+ // Either load another view, or create one on the fly.
+ if ($options['subquery_view']) {
+ $temp_view = views_get_view($options['subquery_view']);
+ // Remove all fields from default display
+ unset($temp_view->display['default']->display_options['fields']);
+ }
+ else {
+ // Create a new view object on the fly, which we use to generate a query
+ // object and then get the SQL we need for the subquery.
+ $temp_view = $this->get_temporary_view();
+
+ // Add the sort from the options to the default display.
+ // This is broken, in that the sort order field also gets added as a
+ // select field. See http://drupal.org/node/844910.
+ // We work around this further down.
+ $sort = $options['subquery_sort'];
+ list($sort_table, $sort_field) = explode('.', $sort);
+ $sort_options = array('order' => $options['subquery_order']);
+ $temp_view->add_item('default', 'sort', $sort_table, $sort_field, $sort_options);
+ }
+
+ // Get the namespace string.
+ $temp_view->namespace = (!empty($options['subquery_namespace'])) ? '_'. $options['subquery_namespace'] : '_INNER';
+ $this->subquery_namespace = (!empty($options['subquery_namespace'])) ? '_'. $options['subquery_namespace'] : 'INNER';
+
+ // The value we add here does nothing, but doing this adds the right tables
+ // and puts in a WHERE clause with a placeholder we can grab later.
+ $temp_view->args[] = '**CORRELATED**';
+
+ // Add the base table ID field.
+ $views_data = views_fetch_data($this->definition['base']);
+ $base_field = $views_data['table']['base']['field'];
+ $temp_view->add_item('default', 'field', $this->definition['base'], $this->definition['field']);
+
+ // Add the correct argument for our relationship's base
+ // ie the 'how to get back to base' argument.
+ // The relationship definition tells us which one to use.
+ $temp_view->add_item(
+ 'default',
+ 'argument',
+ $this->definition['argument table'], // eg 'term_node',
+ $this->definition['argument field'] // eg 'tid'
+ );
+
+ // Build the view. The creates the query object and produces the query
+ // string but does not run any queries.
+ $temp_view->build();
+
+ // Now take the SelectQuery object the View has built and massage it
+ // somewhat so we can get the SQL query from it.
+ $subquery = $temp_view->build_info['query'];
+
+ // Workaround until http://drupal.org/node/844910 is fixed:
+ // Remove all fields from the SELECT except the base id.
+ $fields =& $subquery->getFields();
+ foreach (array_keys($fields) as $field_name) {
+ // The base id for this subquery is stored in our definition.
+ if ($field_name != $this->definition['field']) {
+ unset($fields[$field_name]);
+ }
+ }
+
+ // Make every alias in the subquery safe within the outer query by
+ // appending a namespace to it, '_inner' by default.
+ $tables =& $subquery->getTables();
+ foreach (array_keys($tables) as $table_name) {
+ $tables[$table_name]['alias'] .= $this->subquery_namespace;
+ // Namespace the join on every table.
+ if (isset($tables[$table_name]['condition'])) {
+ $tables[$table_name]['condition'] = $this->condition_namespace($tables[$table_name]['condition']);
+ }
+ }
+ // Namespace fields.
+ foreach (array_keys($fields) as $field_name) {
+ $fields[$field_name]['table'] .= $this->subquery_namespace;
+ $fields[$field_name]['alias'] .= $this->subquery_namespace;
+ }
+ // Namespace conditions.
+ $where =& $subquery->conditions();
+ $this->alter_subquery_condition($subquery, $where);
+ // Not sure why, but our sort order clause doesn't have a table.
+ // TODO: the call to add_item() above to add the sort handler is probably
+ // wrong -- needs attention from someone who understands it.
+ // In the meantime, this works, but with a leap of faith...
+ $orders =& $subquery->getOrderBy();
+ foreach ($orders as $order_key => $order) {
+ // But if we're using a whole view, we don't know what we have!
+ if ($options['subquery_view']) {
+ list($sort_table, $sort_field) = explode('.', $order_key);
+ }
+ $orders[$sort_table . $this->subquery_namespace . '.' . $sort_field] = $order;
+ unset($orders[$order_key]);
+ }
+
+ // The query we get doesn't include the LIMIT, so add it here.
+ $subquery->range(0, 1);
+
+ // Extract the SQL the temporary view built.
+ $subquery_sql = $subquery->__toString();
+
+ // Replace the placeholder with the outer, correlated field.
+ // Eg, change the placeholder ':users_uid' into the outer field 'users.uid'.
+ // We have to work directly with the SQL, because putting a name of a field
+ // into a SelectQuery that it does not recognize (because it's outer) just
+ // makes it treat it as a string.
+ $outer_placeholder = ':' . str_replace('.', '_', $this->definition['outer field']);
+ $subquery_sql = str_replace($outer_placeholder, $this->definition['outer field'], $subquery_sql);
+
+ return $subquery_sql;
+ }
+
+ /**
+ * Recursive helper to add a namespace to conditions.
+ *
+ * Similar to _views_query_tag_alter_condition().
+ *
+ * (Though why is the condition we get in a simple query 3 levels deep???)
+ */
+ function alter_subquery_condition(QueryAlterableInterface $query, &$conditions) {
+ foreach ($conditions as $condition_id => &$condition) {
+ // Skip the #conjunction element.
+ if (is_numeric($condition_id)) {
+ if (is_string($condition['field'])) {
+ $condition['field'] = $this->condition_namespace($condition['field']);
+ }
+ elseif (is_object($condition['field'])) {
+ $sub_conditions =& $condition['field']->conditions();
+ $this->alter_subquery_condition($query, $sub_conditions);
+ }
+ }
+ }
+ }
+
+ /**
+ * Helper function to namespace query pieces.
+ *
+ * Turns 'foo.bar' into 'foo_NAMESPACE.bar'.
+ */
+ function condition_namespace($string) {
+ return str_replace('.', $this->subquery_namespace . '.', $string);
+ }
+
+ /**
+ * Called to implement a relationship in a query.
+ * This is mostly a copy of our parent's query() except for this bit with
+ * the join class.
+ */
+ function query() {
+ // Figure out what base table this relationship brings to the party.
+ $table_data = views_fetch_data($this->definition['base']);
+ $base_field = empty($this->definition['base field']) ? $table_data['table']['base']['field'] : $this->definition['base field'];
+
+ $this->ensure_my_table();
+
+ $def = $this->definition;
+ $def['table'] = $this->definition['base'];
+ $def['field'] = $base_field;
+ $def['left_table'] = $this->table_alias;
+ $def['left_field'] = $this->field;
+ if (!empty($this->options['required'])) {
+ $def['type'] = 'INNER';
+ }
+
+ if ($this->options['subquery_regenerate']) {
+ // For testing only, regenerate the subquery each time.
+ $def['left_query'] = $this->left_query($this->options);
+ }
+ else {
+ // Get the stored subquery SQL string.
+ $def['left_query'] = $this->options['subquery_string'];
+ }
+
+ if (!empty($def['join_handler']) && class_exists($def['join_handler'])) {
+ $join = new $def['join_handler'];
+ }
+ else {
+ $join = new views_join_subquery();
+ }
+
+ $join->definition = $def;
+ $join->construct();
+ $join->adjusted = TRUE;
+
+ // use a short alias for this:
+ $alias = $def['table'] . '_' . $this->table;
+
+ $this->alias = $this->query->add_relationship($alias, $join, $this->definition['base'], $this->relationship);
+ }
+}
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
new file mode 100644
index 0000000..3587290
--- /dev/null
+++ b/kolab.org/www/drupal-7.15/sites/all/modules/views/handlers/views_handler_sort.inc
@@ -0,0 +1,232 @@
+<?php
+/**
+ * @defgroup views_sort_handlers Views' sort handlers
+ * @{
+ * Handlers to tell Views how to sort queries
+ */
+
+/**
+ * Base sort handler that has no options and performs a simple sort
+ */
+class views_handler_sort extends views_handler {
+
+ /**
+ * Determine if a sort can be exposed.
+ */
+ function can_expose() { return TRUE; }
+
+ /**
+ * Called to add the sort to a query.
+ */
+ function query() {
+ $this->ensure_my_table();
+ // Add the field.
+ $this->query->add_orderby($this->table_alias, $this->real_field, $this->options['order']);
+ }
+
+ function option_definition() {
+ $options = parent::option_definition();
+
+ $options['order'] = array('default' => 'ASC');
+ $options['exposed'] = array('default' => FALSE);
+ $options['expose'] = array(
+ 'contains' => array(
+ 'label' => array('default' => '', 'translatable' => TRUE),
+ ),
+ );
+ return $options;
+ }
+
+ /**
+ * Display whether or not the sort order is ascending or descending
+ */
+ function admin_summary() {
+ if (!empty($this->options['exposed'])) {
+ return t('Exposed');
+ }
+ switch ($this->options['order']) {
+ case 'ASC':
+ case 'asc':
+ default:
+ return t('asc');
+ break;
+ case 'DESC';
+ case 'desc';
+ return t('desc');
+ break;
+ }
+ }
+
+ /**
+ * Basic options for all sort criteria
+ */
+ function options_form(&$form, &$form_state) {
+ parent::options_form($form, $form_state);
+ if ($this->can_expose()) {
+ $this->show_expose_button($form, $form_state);
+ }
+ $form['op_val_start'] = array('#value' => '<div class="clearfix">');
+ $this->show_sort_form($form, $form_state);
+ $form['op_val_end'] = array('#value' => '</div>');
+ if ($this->can_expose()) {
+ $this->show_expose_form($form, $form_state);
+ }
+ }
+
+ /**
+ * Shortcut to display the expose/hide button.
+ */
+ function show_expose_button(&$form, &$form_state) {
+ $form['expose_button'] = array(
+ '#prefix' => '<div class="views-expose clearfix">',
+ '#suffix' => '</div>',
+ // Should always come first
+ '#weight' => -1000,
+ );
+
+ // Add a checkbox for JS users, which will have behavior attached to it
+ // so it can replace the button.
+ $form['expose_button']['checkbox'] = array(
+ '#theme_wrappers' => array('container'),
+ '#attributes' => array('class' => array('js-only')),
+ );
+ $form['expose_button']['checkbox']['checkbox'] = array(
+ '#title' => t('Expose this sort to visitors, to allow them to change it'),
+ '#type' => 'checkbox',
+ );
+
+ // Then add the button itself.
+ if (empty($this->options['exposed'])) {
+ $form['expose_button']['markup'] = array(
+ '#markup' => '<div class="description exposed-description" style="float: left; margin-right:10px">' . t('This sort is not exposed. Expose it to allow the users to change it.') . '</div>',
+ );
+ $form['expose_button']['button'] = array(
+ '#limit_validation_errors' => array(),
+ '#type' => 'submit',
+ '#value' => t('Expose sort'),
+ '#submit' => array('views_ui_config_item_form_expose'),
+ );
+ $form['expose_button']['checkbox']['checkbox']['#default_value'] = 0;
+ }
+ else {
+ $form['expose_button']['markup'] = array(
+ '#markup' => '<div class="description exposed-description">' . t('This sort is exposed. If you hide it, users will not be able to change it.') . '</div>',
+ );
+ $form['expose_button']['button'] = array(
+ '#limit_validation_errors' => array(),
+ '#type' => 'submit',
+ '#value' => t('Hide sort'),
+ '#submit' => array('views_ui_config_item_form_expose'),
+ );
+ $form['expose_button']['checkbox']['checkbox']['#default_value'] = 1;
+ }
+ }
+
+ /**
+ * Simple validate handler
+ */
+ function options_validate(&$form, &$form_state) {
+ $this->sort_validate($form, $form_state);
+ if (!empty($this->options['exposed'])) {
+ $this->expose_validate($form, $form_state);
+ }
+
+ }
+
+ /**
+ * Simple submit handler
+ */
+ function options_submit(&$form, &$form_state) {
+ unset($form_state['values']['expose_button']); // don't store this.
+ $this->sort_submit($form, $form_state);
+ if (!empty($this->options['exposed'])) {
+ $this->expose_submit($form, $form_state);
+ }
+ }
+
+ /**
+ * Shortcut to display the value form.
+ */
+ function show_sort_form(&$form, &$form_state) {
+ $options = $this->sort_options();
+ if (!empty($options)) {
+ $form['order'] = array(
+ '#type' => 'radios',
+ '#options' => $options,
+ '#default_value' => $this->options['order'],
+ );
+ }
+ }
+
+ function sort_validate(&$form, &$form_state) { }
+
+ function sort_submit(&$form, &$form_state) { }
+
+ /**
+ * Provide a list of options for the default sort form.
+ * Should be overridden by classes th