summaryrefslogtreecommitdiff
path: root/kolab.org/www/drupal-7.18/sites/all/modules/views
diff options
context:
space:
mode:
Diffstat (limited to 'kolab.org/www/drupal-7.18/sites/all/modules/views')
-rw-r--r--kolab.org/www/drupal-7.18/sites/all/modules/views/css/views-admin.ctools.css5
-rw-r--r--kolab.org/www/drupal-7.18/sites/all/modules/views/handlers/views_handler_area_text.inc2
-rw-r--r--kolab.org/www/drupal-7.18/sites/all/modules/views/handlers/views_handler_field.inc6
-rw-r--r--kolab.org/www/drupal-7.18/sites/all/modules/views/handlers/views_handler_field_boolean.inc34
-rw-r--r--kolab.org/www/drupal-7.18/sites/all/modules/views/handlers/views_handler_filter_combine.inc51
-rw-r--r--kolab.org/www/drupal-7.18/sites/all/modules/views/handlers/views_handler_filter_numeric.inc2
-rw-r--r--kolab.org/www/drupal-7.18/sites/all/modules/views/includes/admin.inc18
-rw-r--r--kolab.org/www/drupal-7.18/sites/all/modules/views/includes/base.inc4
-rw-r--r--kolab.org/www/drupal-7.18/sites/all/modules/views/includes/cache.inc98
-rw-r--r--kolab.org/www/drupal-7.18/sites/all/modules/views/includes/handlers.inc9
-rw-r--r--kolab.org/www/drupal-7.18/sites/all/modules/views/includes/view.inc12
-rw-r--r--kolab.org/www/drupal-7.18/sites/all/modules/views/js/ajax_view.js2
-rw-r--r--kolab.org/www/drupal-7.18/sites/all/modules/views/js/views-admin.js7
-rw-r--r--kolab.org/www/drupal-7.18/sites/all/modules/views/modules/aggregator/views_handler_argument_aggregator_iid.inc4
-rw-r--r--kolab.org/www/drupal-7.18/sites/all/modules/views/modules/field.views.inc78
-rw-r--r--kolab.org/www/drupal-7.18/sites/all/modules/views/modules/node.views.inc45
-rw-r--r--kolab.org/www/drupal-7.18/sites/all/modules/views/modules/node/views_handler_field_node_revision.inc5
-rw-r--r--kolab.org/www/drupal-7.18/sites/all/modules/views/modules/node/views_handler_filter_node_access.inc2
-rw-r--r--kolab.org/www/drupal-7.18/sites/all/modules/views/modules/search/views_handler_filter_search.inc30
-rw-r--r--kolab.org/www/drupal-7.18/sites/all/modules/views/modules/taxonomy/views_handler_field_term_link_edit.inc23
-rw-r--r--kolab.org/www/drupal-7.18/sites/all/modules/views/modules/taxonomy/views_plugin_argument_validate_taxonomy_term.inc13
-rw-r--r--kolab.org/www/drupal-7.18/sites/all/modules/views/modules/tracker.views.inc183
-rw-r--r--kolab.org/www/drupal-7.18/sites/all/modules/views/modules/tracker/views_handler_argument_tracker_comment_user_uid.inc26
-rw-r--r--kolab.org/www/drupal-7.18/sites/all/modules/views/modules/tracker/views_handler_filter_tracker_boolean_operator.inc31
-rw-r--r--kolab.org/www/drupal-7.18/sites/all/modules/views/modules/tracker/views_handler_filter_tracker_comment_user_uid.inc23
-rw-r--r--kolab.org/www/drupal-7.18/sites/all/modules/views/plugins/export_ui/views_ui.class.php5
-rw-r--r--kolab.org/www/drupal-7.18/sites/all/modules/views/plugins/views_plugin_display.inc6
-rw-r--r--kolab.org/www/drupal-7.18/sites/all/modules/views/plugins/views_plugin_display_feed.inc1
-rw-r--r--kolab.org/www/drupal-7.18/sites/all/modules/views/plugins/views_plugin_display_page.inc24
-rw-r--r--kolab.org/www/drupal-7.18/sites/all/modules/views/plugins/views_plugin_exposed_form.inc25
-rw-r--r--kolab.org/www/drupal-7.18/sites/all/modules/views/plugins/views_plugin_pager_mini.inc48
-rw-r--r--kolab.org/www/drupal-7.18/sites/all/modules/views/plugins/views_plugin_query_default.inc2
-rw-r--r--kolab.org/www/drupal-7.18/sites/all/modules/views/plugins/views_plugin_style_grid.inc10
-rw-r--r--kolab.org/www/drupal-7.18/sites/all/modules/views/plugins/views_plugin_style_jump_menu.inc17
-rw-r--r--kolab.org/www/drupal-7.18/sites/all/modules/views/plugins/views_plugin_style_mapping.inc125
-rw-r--r--kolab.org/www/drupal-7.18/sites/all/modules/views/plugins/views_plugin_style_summary_jump_menu.inc17
-rw-r--r--kolab.org/www/drupal-7.18/sites/all/modules/views/plugins/views_plugin_style_table.inc11
-rw-r--r--kolab.org/www/drupal-7.18/sites/all/modules/views/tests/field/views_fieldapi.test12
-rw-r--r--kolab.org/www/drupal-7.18/sites/all/modules/views/tests/handlers/views_handler_field_boolean.test34
-rw-r--r--kolab.org/www/drupal-7.18/sites/all/modules/views/tests/node/views_node_revision_relations.test177
-rw-r--r--kolab.org/www/drupal-7.18/sites/all/modules/views/tests/styles/views_plugin_style.test16
-rw-r--r--kolab.org/www/drupal-7.18/sites/all/modules/views/tests/styles/views_plugin_style_base.test33
-rw-r--r--kolab.org/www/drupal-7.18/sites/all/modules/views/tests/styles/views_plugin_style_jump_menu.test8
-rw-r--r--kolab.org/www/drupal-7.18/sites/all/modules/views/tests/styles/views_plugin_style_mapping.test144
-rw-r--r--kolab.org/www/drupal-7.18/sites/all/modules/views/tests/styles/views_plugin_style_unformatted.test22
-rw-r--r--kolab.org/www/drupal-7.18/sites/all/modules/views/tests/test_plugins/views_test_plugin_style_test_mapping.inc52
-rw-r--r--kolab.org/www/drupal-7.18/sites/all/modules/views/tests/views_test.info6
-rw-r--r--kolab.org/www/drupal-7.18/sites/all/modules/views/tests/views_test.module56
-rw-r--r--kolab.org/www/drupal-7.18/sites/all/modules/views/tests/views_translatable.test23
-rw-r--r--kolab.org/www/drupal-7.18/sites/all/modules/views/theme/theme.inc29
-rw-r--r--kolab.org/www/drupal-7.18/sites/all/modules/views/theme/views-view-grid.tpl.php4
-rw-r--r--kolab.org/www/drupal-7.18/sites/all/modules/views/theme/views-view-table.tpl.php5
-rw-r--r--kolab.org/www/drupal-7.18/sites/all/modules/views/theme/views-view-unformatted.tpl.php2
-rw-r--r--kolab.org/www/drupal-7.18/sites/all/modules/views/views.api.php14
-rw-r--r--kolab.org/www/drupal-7.18/sites/all/modules/views/views.info14
-rw-r--r--kolab.org/www/drupal-7.18/sites/all/modules/views/views.module10
-rw-r--r--kolab.org/www/drupal-7.18/sites/all/modules/views/views_ui.info6
-rw-r--r--kolab.org/www/drupal-7.18/sites/all/modules/views/views_ui.module3
58 files changed, 1476 insertions, 198 deletions
diff --git a/kolab.org/www/drupal-7.18/sites/all/modules/views/css/views-admin.ctools.css b/kolab.org/www/drupal-7.18/sites/all/modules/views/css/views-admin.ctools.css
index 52c8952..b1f0e29 100644
--- a/kolab.org/www/drupal-7.18/sites/all/modules/views/css/views-admin.ctools.css
+++ b/kolab.org/www/drupal-7.18/sites/all/modules/views/css/views-admin.ctools.css
@@ -8,11 +8,6 @@
padding-top: 2px;
}
-.ctools-button-processed,
-.ctools-button-processed input {
- text-transform: lowercase;
-}
-
.ctools-button-processed:hover {
border-color: #b8b8b8;
}
diff --git a/kolab.org/www/drupal-7.18/sites/all/modules/views/handlers/views_handler_area_text.inc b/kolab.org/www/drupal-7.18/sites/all/modules/views/handlers/views_handler_area_text.inc
index d772786..edb282f 100644
--- a/kolab.org/www/drupal-7.18/sites/all/modules/views/handlers/views_handler_area_text.inc
+++ b/kolab.org/www/drupal-7.18/sites/all/modules/views/handlers/views_handler_area_text.inc
@@ -56,7 +56,7 @@ class views_handler_area_text extends views_handler_area {
if (!empty($options[$type])) {
$items = array();
foreach ($options[$type] as $key => $value) {
- $items[] = $key . ' == ' . $value;
+ $items[] = $key . ' == ' . check_plain($value);
}
$output .= theme('item_list',
array(
diff --git a/kolab.org/www/drupal-7.18/sites/all/modules/views/handlers/views_handler_field.inc b/kolab.org/www/drupal-7.18/sites/all/modules/views/handlers/views_handler_field.inc
index c687575..65210d9 100644
--- a/kolab.org/www/drupal-7.18/sites/all/modules/views/handlers/views_handler_field.inc
+++ b/kolab.org/www/drupal-7.18/sites/all/modules/views/handlers/views_handler_field.inc
@@ -410,7 +410,7 @@ class views_handler_field extends views_handler {
'link_class' => array('default' => ''),
'prefix' => array('default' => '', 'translatable' => TRUE),
'suffix' => array('default' => '', 'translatable' => TRUE),
- 'target' => array('default' => '', 'translatable' => TRUE),
+ 'target' => array('default' => ''),
'nl2br' => array('default' => FALSE, 'bool' => TRUE),
'max_length' => array('default' => ''),
'word_boundary' => array('default' => TRUE, 'bool' => TRUE),
@@ -814,7 +814,7 @@ If you would like to have the characters \'[\' and \']\' please use the html ent
if (!empty($options[$type])) {
$items = array();
foreach ($options[$type] as $key => $value) {
- $items[] = $key . ' == ' . $value;
+ $items[] = $key . ' == ' . check_plain($value);
}
$output .= theme('item_list',
array(
@@ -965,7 +965,7 @@ If you would like to have the characters \'[\' and \']\' please use the html ent
'#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.'),
+ '#description' => t('Provide text to display if this field contains an empty result. 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',
);
diff --git a/kolab.org/www/drupal-7.18/sites/all/modules/views/handlers/views_handler_field_boolean.inc b/kolab.org/www/drupal-7.18/sites/all/modules/views/handlers/views_handler_field_boolean.inc
index 13fff07..8acfb32 100644
--- a/kolab.org/www/drupal-7.18/sites/all/modules/views/handlers/views_handler_field_boolean.inc
+++ b/kolab.org/www/drupal-7.18/sites/all/modules/views/handlers/views_handler_field_boolean.inc
@@ -25,6 +25,8 @@ class views_handler_field_boolean extends views_handler_field {
function option_definition() {
$options = parent::option_definition();
$options['type'] = array('default' => 'yes-no');
+ $options['type_custom_true'] = array('default' => '', 'translatable' => TRUE);
+ $options['type_custom_false'] = array('default' => '', 'translatable' => TRUE);
$options['not'] = array('definition bool' => 'reverse');
return $options;
@@ -38,10 +40,12 @@ class views_handler_field_boolean extends views_handler_field {
'true-false' => array(t('True'), t('False')),
'on-off' => array(t('On'), t('Off')),
'enabled-disabled' => array(t('Enabled'), t('Disabled')),
+ 'boolean' => array(1, 0),
'unicode-yes-no' => array('✔', '✖'),
);
$output_formats = isset($this->definition['output formats']) ? $this->definition['output formats'] : array();
- $this->formats = array_merge($default_formats, $output_formats);
+ $custom_format = array('custom' => array(t('Custom')));
+ $this->formats = array_merge($default_formats, $output_formats, $custom_format);
}
function options_form(&$form, &$form_state) {
@@ -55,6 +59,29 @@ class views_handler_field_boolean extends views_handler_field {
'#options' => $options,
'#default_value' => $this->options['type'],
);
+
+ $form['type_custom_true'] = array(
+ '#type' => 'textfield',
+ '#title' => t('Custom output for TRUE'),
+ '#default_value' => $this->options['type_custom_true'],
+ '#states' => array(
+ 'visible' => array(
+ 'select[name="options[type]"]' => array('value' => 'custom'),
+ ),
+ ),
+ );
+
+ $form['type_custom_false'] = array(
+ '#type' => 'textfield',
+ '#title' => t('Custom output for FALSE'),
+ '#default_value' => $this->options['type_custom_false'],
+ '#states' => array(
+ 'visible' => array(
+ 'select[name="options[type]"]' => array('value' => 'custom'),
+ ),
+ ),
+ );
+
$form['not'] = array(
'#type' => 'checkbox',
'#title' => t('Reverse'),
@@ -70,7 +97,10 @@ class views_handler_field_boolean extends views_handler_field {
$value = !$value;
}
- if (isset($this->formats[$this->options['type']])) {
+ if ($this->options['type'] == 'custom') {
+ return $value ? filter_xss_admin($this->options['type_custom_true']) : filter_xss_admin($this->options['type_custom_false']);
+ }
+ else if (isset($this->formats[$this->options['type']])) {
return $value ? $this->formats[$this->options['type']][0] : $this->formats[$this->options['type']][1];
}
else {
diff --git a/kolab.org/www/drupal-7.18/sites/all/modules/views/handlers/views_handler_filter_combine.inc b/kolab.org/www/drupal-7.18/sites/all/modules/views/handlers/views_handler_filter_combine.inc
index c9def53..915924b 100644
--- a/kolab.org/www/drupal-7.18/sites/all/modules/views/handlers/views_handler_filter_combine.inc
+++ b/kolab.org/www/drupal-7.18/sites/all/modules/views/handlers/views_handler_filter_combine.inc
@@ -14,7 +14,7 @@ class views_handler_filter_combine extends views_handler_filter_string {
/**
* @var views_plugin_query_default
*/
- var $query;
+ public $query;
function option_definition() {
$options = parent::option_definition();
@@ -27,7 +27,7 @@ class views_handler_filter_combine extends views_handler_filter_string {
parent::options_form($form, $form_state);
$this->view->init_style();
- // Allow to choose all fields as possible
+ // Allow to choose all fields as possible.
if ($this->view->style_plugin->uses_fields()) {
$options = array();
foreach ($this->view->display_handler->get_handlers('field') as $name => $field) {
@@ -55,7 +55,8 @@ class views_handler_filter_combine extends views_handler_filter_string {
// Only add the fields if they have a proper field and table alias.
foreach ($this->options['fields'] as $id) {
$field = $this->view->field[$id];
- // Always add the table of the selected fields to be sure a table alias exists.
+ // Always add the table of the selected fields to be sure a table alias
+ // exists.
$field->ensure_my_table();
if (!empty($field->field_alias) && !empty($field->field_alias)) {
$fields[] = "$field->table_alias.$field->real_field";
@@ -63,14 +64,14 @@ class views_handler_filter_combine extends views_handler_filter_string {
}
if ($fields) {
$count = count($fields);
- $seperated_fields = array();
+ $separated_fields = array();
foreach ($fields as $key => $field) {
- $seperated_fields[] = $field;
- if ($key < $count-1) {
- $seperated_fields[] = "' '";
+ $separated_fields[] = $field;
+ if ($key < $count - 1) {
+ $separated_fields[] = "' '";
}
}
- $expression = implode(', ', $seperated_fields);
+ $expression = implode(', ', $separated_fields);
$expression = "CONCAT_WS(' ', $expression)";
$info = $this->operators();
@@ -82,7 +83,6 @@ class views_handler_filter_combine extends views_handler_filter_string {
// By default things like op_equal uses add_where, that doesn't support
// complex expressions, so override all operators.
-
function op_equal($field) {
$placeholder = $this->placeholder();
$operator = $this->operator();
@@ -94,6 +94,39 @@ class views_handler_filter_combine extends views_handler_filter_string {
$this->query->add_where_expression($this->options['group'], "$field LIKE $placeholder", array($placeholder => '%' . db_like($this->value) . '%'));
}
+ 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);
+ $placeholder = $this->placeholder();
+ foreach ($words as $word) {
+ $where->where($field . " LIKE $placeholder", array($placeholder => '%' . db_like(trim($word, " ,!?")) . '%'));
+ }
+ }
+
+ 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) {
$placeholder = $this->placeholder();
$this->query->add_where_expression($this->options['group'], "$field LIKE $placeholder", array($placeholder => db_like($this->value) . '%'));
diff --git a/kolab.org/www/drupal-7.18/sites/all/modules/views/handlers/views_handler_filter_numeric.inc b/kolab.org/www/drupal-7.18/sites/all/modules/views/handlers/views_handler_filter_numeric.inc
index 982abd8..03384f6 100644
--- a/kolab.org/www/drupal-7.18/sites/all/modules/views/handlers/views_handler_filter_numeric.inc
+++ b/kolab.org/www/drupal-7.18/sites/all/modules/views/handlers/views_handler_filter_numeric.inc
@@ -258,7 +258,7 @@ class views_handler_filter_numeric extends views_handler_filter {
}
function op_regex($field) {
- $this->query->add_where($this->options['group'], $field, $this->value, 'RLIKE');
+ $this->query->add_where($this->options['group'], $field, $this->value['value'], 'RLIKE');
}
function admin_summary() {
diff --git a/kolab.org/www/drupal-7.18/sites/all/modules/views/includes/admin.inc b/kolab.org/www/drupal-7.18/sites/all/modules/views/includes/admin.inc
index ff4a99f..160a61a 100644
--- a/kolab.org/www/drupal-7.18/sites/all/modules/views/includes/admin.inc
+++ b/kolab.org/www/drupal-7.18/sites/all/modules/views/includes/admin.inc
@@ -91,10 +91,10 @@ function views_ui_check_advanced_help() {
$filename = db_query_range("SELECT filename FROM {system} WHERE type = 'module' AND name = 'advanced_help'", 0, 1)
->fetchField();
if ($filename && file_exists($filename)) {
- drupal_set_message(t('If you <a href="@modules">enable the advanced help module</a>, Views will provide more and better help. <a href="@hide">Hide this message.</a>', array('@modules' => url('admin/modules'),'@hide' => url('admin/structure/views/settings'))));
+ drupal_set_message(t('If you <a href="@modules">enable the advanced help module</a>, Views will provide more and better help. <a href="@hide">You can disable this message at the Views settings page.</a>', array('@modules' => url('admin/modules'),'@hide' => url('admin/structure/views/settings'))));
}
else {
- drupal_set_message(t('If you install the advanced help module from !href, Views will provide more and better help. <a href="@hide">Hide this message.</a>', array('!href' => l('http://drupal.org/project/advanced_help', 'http://drupal.org/project/advanced_help'), '@hide' => url('admin/structure/views/settings'))));
+ drupal_set_message(t('If you install the advanced help module from !href, Views will provide more and better help. <a href="@hide">You can disable this message at the Views settings page.</a>', array('!href' => l('http://drupal.org/project/advanced_help', 'http://drupal.org/project/advanced_help'), '@hide' => url('admin/structure/views/settings'))));
}
}
}
@@ -835,10 +835,10 @@ function theme_views_ui_view_info($variables) {
}
$output = '';
- $output .= '<div class="views-ui-view-title">' . $title . "</div>\n";
+ $output .= '<div class="views-ui-view-title">' . check_plain($title) . "</div>\n";
$output .= '<div class="views-ui-view-displays">' . $displays . "</div>\n";
$output .= '<div class="views-ui-view-storage">' . $type . "</div>\n";
- $output .= '<div class="views-ui-view-base">' . t('Type') . ': ' . $variables['base']. "</div>\n";
+ $output .= '<div class="views-ui-view-base">' . t('Type') . ': ' . check_plain($variables['base']). "</div>\n";
return $output;
}
@@ -3038,7 +3038,7 @@ function views_ui_reorder_displays_form($form, &$form_state) {
foreach ($view->display as $display) {
$form[$display->id] = array(
- 'title' => array('#markup' => $display->display_title),
+ 'title' => array('#markup' => check_plain($display->display_title)),
'weight' => array(
'#type' => 'weight',
'#value' => $display->position,
@@ -4122,8 +4122,8 @@ function views_ui_add_item_form($form, &$form_state) {
$zebra_class = ($zebra % 2) ? 'odd' : 'even';
$form['options']['name'][$key] = array(
'#type' => 'checkbox',
- '#title' => t('!group: !field', array('!group' => $option['group'], '!field' => $option['title'])),
- '#description' => $option['help'],
+ '#title' => t('!group: !field', array('!group' => check_plain($option['group']), '!field' => check_plain($option['title']))),
+ '#description' => filter_xss_admin($option['help']),
'#return_value' => $key,
'#prefix' => "<div class='$zebra_class filterable-option'>",
'#suffix' => '</div>',
@@ -5047,7 +5047,7 @@ function views_ui_autocomplete_tag($string = '') {
$views = views_get_all_views();
foreach ($views as $view) {
if (!empty($view->tag) && strpos($view->tag, $string) === 0) {
- $matches[$view->tag] = $view->tag;
+ $matches[$view->tag] = check_plain($view->tag);
if (count($matches) >= 10) {
break;
}
@@ -5267,7 +5267,7 @@ function theme_views_ui_style_plugin_table($variables) {
$rows = array();
foreach (element_children($form['columns']) as $id) {
$row = array();
- $row[] = drupal_render($form['info'][$id]['name']);
+ $row[] = check_plain(drupal_render($form['info'][$id]['name']));
$row[] = drupal_render($form['columns'][$id]);
$row[] = drupal_render($form['info'][$id]['align']);
$row[] = drupal_render($form['info'][$id]['separator']);
diff --git a/kolab.org/www/drupal-7.18/sites/all/modules/views/includes/base.inc b/kolab.org/www/drupal-7.18/sites/all/modules/views/includes/base.inc
index 0e2a407..217bbec 100644
--- a/kolab.org/www/drupal-7.18/sites/all/modules/views/includes/base.inc
+++ b/kolab.org/www/drupal-7.18/sites/all/modules/views/includes/base.inc
@@ -346,8 +346,8 @@ class views_object {
$value = $options;
// Build source data and add to the array
$format = NULL;
- if (isset($definition['format_key']) && isset($options[$definition['format_key']])) {
- $format = $options[$definition['format_key']];
+ if (isset($definition['format_key']) && isset($storage[$definition['format_key']])) {
+ $format = $storage[$definition['format_key']];
}
$translatable[] = array(
'value' => $value,
diff --git a/kolab.org/www/drupal-7.18/sites/all/modules/views/includes/cache.inc b/kolab.org/www/drupal-7.18/sites/all/modules/views/includes/cache.inc
index c655c21..59c1733 100644
--- a/kolab.org/www/drupal-7.18/sites/all/modules/views/includes/cache.inc
+++ b/kolab.org/www/drupal-7.18/sites/all/modules/views/includes/cache.inc
@@ -15,54 +15,82 @@
function _views_fetch_data($table = NULL, $move = TRUE, $reset = FALSE) {
$cache = &drupal_static(__FUNCTION__ . '_cache');
$recursion_protection = &drupal_static(__FUNCTION__ . '_recursion_protected');
- if (!isset($cache) || $reset) {
- $start = microtime(TRUE);
- // NOTE: This happens whether we retrieve them from cache or otherwise.
-
- $data = views_cache_get('views_data', TRUE);
- if (!empty($data->data)) {
- $cache = $data->data;
+ $fully_loaded = &drupal_static(__FUNCTION__ . '_fully_loaded');
+ if ($reset) {
+ $cache = NULL;
+ $fully_loaded = FALSE;
+ }
+ if ($table) {
+ if (!isset($cache[$table])) {
+ $cid = 'views_data:' . $table;
+ $data = views_cache_get($cid, TRUE);
+ if (!empty($data->data)) {
+ $cache[$table] = $data->data;
+ }
+ else {
+ if (!$fully_loaded) {
+ // No cache entry, rebuild.
+ $cache = _views_fetch_data_build();
+ $fully_loaded = TRUE;
+ }
+ }
}
-
- if (empty($cache)) {
- views_include_handlers();
- $cache = module_invoke_all('views_data');
- foreach (module_implements('views_data_alter') as $module) {
- $function = $module . '_views_data_alter';
- $function($cache);
+ if (isset($cache[$table])) {
+ if (isset($cache[$table]['moved to']) && $move) {
+ $moved_table = $cache[$table]['moved to'];
+ if (!empty($recursion_protection[$table])) {
+ // recursion detected!
+ return NULL;
+ }
+ $recursion_protection[$table] = TRUE;
+ $data = _views_fetch_data($moved_table);
+ $recursion_protection = array();
+ return $data;
}
- _views_data_process_entity_types($cache);
-
- views_cache_set('views_data', $cache, TRUE);
+ return $cache[$table];
}
}
+ else {
+ if (!$fully_loaded) {
+ $data = views_cache_get('views_data', TRUE);
+ if (!empty($data->data)) {
+ $cache = $data->data;
+ }
- if (!$table) {
- return $cache;
- }
- if (isset($cache[$table])) {
- // Support old views_data entries conversion.
- if (isset($cache[$table]['moved to']) && $move) {
- $moved_table = $cache[$table]['moved to'];
- if (!empty($recursion_protection[$table])) {
- // recursion detected!
- return NULL;
+ if (empty($cache)) {
+ $cache = _views_fetch_data_build();
}
- $recursion_protection[$table] = TRUE;
- $data = _views_fetch_data($moved_table);
- $recursion_protection = array();
- return $data;
- }
- else {
- return $cache[$table];
+ $fully_loaded = TRUE;
}
+ return $cache;
}
-
// Return an empty array if there is no match.
return array();
}
/**
+ * Build and set the views data cache if empty.
+ */
+function _views_fetch_data_build() {
+ views_include_handlers();
+ $cache = module_invoke_all('views_data');
+ foreach (module_implements('views_data_alter') as $module) {
+ $function = $module . '_views_data_alter';
+ $function($cache);
+ }
+ _views_data_process_entity_types($cache);
+
+ // Keep a record with all data.
+ views_cache_set('views_data', $cache, TRUE);
+ // Save data in seperate cache entries.
+ foreach ($cache as $key => $data) {
+ $cid = 'views_data:' . $key;
+ views_cache_set($cid, $data, TRUE);
+ }
+ return $cache;
+}
+
+/**
* Links tables having an 'entity type' specified to the respective generic entity-type tables.
*/
function _views_data_process_entity_types(&$data) {
diff --git a/kolab.org/www/drupal-7.18/sites/all/modules/views/includes/handlers.inc b/kolab.org/www/drupal-7.18/sites/all/modules/views/includes/handlers.inc
index a79aa5c..2a33d5d 100644
--- a/kolab.org/www/drupal-7.18/sites/all/modules/views/includes/handlers.inc
+++ b/kolab.org/www/drupal-7.18/sites/all/modules/views/includes/handlers.inc
@@ -751,6 +751,13 @@ class views_handler extends views_object {
*
*/
class views_many_to_one_helper {
+ /**
+ * Contains possible existing placeholders used by the query.
+ *
+ * @var array
+ */
+ public $placeholders = array();
+
function views_many_to_one_helper(&$handler) {
$this->handler = &$handler;
}
@@ -1423,7 +1430,7 @@ function views_date_sql_extract($extract_type, $field, $field_type = 'int', $set
* // PHP 4 doesn't call constructors of the base class automatically from a
* // constructor of a derived class. It is your responsibility to propagate
* // the call to constructors upstream where appropriate.
- * function construct($table, $left_table, $left_field, $field, $extra = array(), $type = 'LEFT') {
+ * function construct($table = NULL, $left_table = NULL, $left_field = NULL, $field = NULL, $extra = array(), $type = 'LEFT') {
* parent::construct($table, $left_table, $left_field, $field, $extra, $type);
* }
*
diff --git a/kolab.org/www/drupal-7.18/sites/all/modules/views/includes/view.inc b/kolab.org/www/drupal-7.18/sites/all/modules/views/includes/view.inc
index 90dd3a2..d8c0c1f 100644
--- a/kolab.org/www/drupal-7.18/sites/all/modules/views/includes/view.inc
+++ b/kolab.org/www/drupal-7.18/sites/all/modules/views/includes/view.inc
@@ -960,8 +960,16 @@ class view extends views_db_object {
if ($this->display_handler->uses_exposed()) {
$exposed_form = $this->display_handler->get_plugin('exposed_form');
+ // (1) Record the errors before rendering the exposed form widgets.
+ $errors_before = form_set_error();
$this->exposed_widgets = $exposed_form->render_exposed_form();
- if (form_set_error() || !empty($this->build_info['abort'])) {
+ // (2) Record the errors after rendering the exposed form widgets.
+ $errors_after = form_set_error();
+ // Find out if the validation of any of the elements in the exposed form
+ // has failed by comparing (1) and (2) above. Don't mess with the view
+ // otherwise.
+ $exposed_errors = count($errors_after) > count($errors_before);
+ if ($exposed_errors || !empty($this->build_info['abort'])) {
$this->built = TRUE;
// Don't execute the query, but rendering will still be executed to display the empty text.
$this->executed = TRUE;
@@ -1258,6 +1266,7 @@ class view extends views_db_object {
$cache->cache_set('output');
}
}
+ $this->render_time = microtime(TRUE) - $start;
$exposed_form->post_render($this->display_handler->output);
@@ -1286,7 +1295,6 @@ class view extends views_db_object {
if (!empty($this->live_preview) && variable_get('views_show_additional_queries', FALSE)) {
$this->end_query_capture();
}
- $this->render_time = microtime(TRUE) - $start;
return $this->display_handler->output;
}
diff --git a/kolab.org/www/drupal-7.18/sites/all/modules/views/js/ajax_view.js b/kolab.org/www/drupal-7.18/sites/all/modules/views/js/ajax_view.js
index 2a4012f..e3bc821 100644
--- a/kolab.org/www/drupal-7.18/sites/all/modules/views/js/ajax_view.js
+++ b/kolab.org/www/drupal-7.18/sites/all/modules/views/js/ajax_view.js
@@ -69,7 +69,7 @@ Drupal.views.ajaxView = function(settings) {
};
Drupal.views.ajaxView.prototype.attachExposedFormAjax = function() {
- var button = $('input[type=submit], input[type=image]', this.$exposed_form);
+ var button = $('input[type=submit], button[type=submit], input[type=image]', this.$exposed_form);
button = button[0];
this.exposedFormAjax = new Drupal.ajax($(button).attr('id'), button, this.element_settings);
diff --git a/kolab.org/www/drupal-7.18/sites/all/modules/views/js/views-admin.js b/kolab.org/www/drupal-7.18/sites/all/modules/views/js/views-admin.js
index 1eb3897..2b4ccf3 100644
--- a/kolab.org/www/drupal-7.18/sites/all/modules/views/js/views-admin.js
+++ b/kolab.org/www/drupal-7.18/sites/all/modules/views/js/views-admin.js
@@ -209,7 +209,7 @@ Drupal.viewsUi.addItemForm.prototype.handleCheck = function (event) {
*/
Drupal.viewsUi.addItemForm.prototype.refreshCheckedItems = function() {
// Perhaps we should precache the text div, too.
- this.$selected_div.find('.views-selected-options').html(this.checkedItems.join(', '));
+ this.$selected_div.find('.views-selected-options').html(Drupal.checkPlain(this.checkedItems.join(', ')));
Drupal.viewsUi.resizeModal('', true);
}
@@ -255,10 +255,11 @@ Drupal.behaviors.viewsUiRenderAddViewButton.attach = function (context, settings
// away from the item. We use mouseleave instead of mouseout because
// the user is going to trigger mouseout when she moves from the trigger
// link to the sub menu items.
- // We use the live binder because the open class on this item will be
+ //
+ // We use the 'li.add' selector because the open class on this item will be
// toggled on and off and we want the handler to take effect in the cases
// that the class is present, but not when it isn't.
- $('li.add', $menu).live('mouseleave', function (event) {
+ $menu.delegate('li.add', 'mouseleave', function (event) {
var $this = $(this);
var $trigger = $this.children('a[href="#"]');
if ($this.children('.action-list').is(':visible')) {
diff --git a/kolab.org/www/drupal-7.18/sites/all/modules/views/modules/aggregator/views_handler_argument_aggregator_iid.inc b/kolab.org/www/drupal-7.18/sites/all/modules/views/modules/aggregator/views_handler_argument_aggregator_iid.inc
index d959b04..4c7824e 100644
--- a/kolab.org/www/drupal-7.18/sites/all/modules/views/modules/aggregator/views_handler_argument_aggregator_iid.inc
+++ b/kolab.org/www/drupal-7.18/sites/all/modules/views/modules/aggregator/views_handler_argument_aggregator_iid.inc
@@ -18,9 +18,9 @@ class views_handler_argument_aggregator_iid extends views_handler_argument_numer
$titles = array();
$placeholders = implode(', ', array_fill(0, sizeof($this->value), '%d'));
- $result = db_select('aggregator_item')
+ $result = db_select('aggregator_item', 'ai')
->condition('iid', $this->value, 'IN')
- ->fields(array('title'))
+ ->fields('ai', array('title'))
->execute();
foreach ($result as $term) {
$titles[] = check_plain($term->title);
diff --git a/kolab.org/www/drupal-7.18/sites/all/modules/views/modules/field.views.inc b/kolab.org/www/drupal-7.18/sites/all/modules/views/modules/field.views.inc
index fe1968b..873153e 100644
--- a/kolab.org/www/drupal-7.18/sites/all/modules/views/modules/field.views.inc
+++ b/kolab.org/www/drupal-7.18/sites/all/modules/views/modules/field.views.inc
@@ -396,6 +396,84 @@ function field_views_field_default_views_data($field) {
'field_name' => $field['field_name'],
);
}
+
+ // Expose additional language column for translatable fields.
+ if (!empty($field['translatable'])) {
+ $title_language = t('@label (!name:language)', array('@label' => $label, '!name' => $field['field_name']));
+ $title_short_language = t('@label:language', array('@label' => $label));
+
+ $data[$table]['language'] = array(
+ 'group' => $group,
+ 'title' => $title_language,
+ 'title short' => $title_short_language,
+ 'help' => t('Language - Appears in: @bundles.', array('@bundles' => implode(', ', $bundles_names))),
+ );
+ $data[$table]['language']['field'] = array(
+ 'handler' => 'views_handler_field_locale_language',
+ );
+ $data[$table]['language']['argument'] = array(
+ 'field' => 'language',
+ 'table' => $table,
+ 'handler' => 'views_handler_argument_locale_language',
+ 'additional fields' => $additional_fields,
+ 'empty field name' => t('<No value>'),
+ 'field_name' => $field['field_name'],
+ );
+ $data[$table]['language']['filter'] = array(
+ 'field' => 'language',
+ 'table' => $table,
+ 'handler' => 'views_handler_filter_locale_language',
+ 'additional fields' => $additional_fields,
+ 'field_name' => $field['field_name'],
+ 'allow empty' => TRUE,
+ );
+ $data[$table]['language']['sort'] = array(
+ 'field' => 'language',
+ 'table' => $table,
+ 'handler' => 'views_handler_sort',
+ 'additional fields' => $additional_fields,
+ 'field_name' => $field['field_name'],
+ );
+ }
+
+ // Expose additional language column for translatable fields.
+ if (!empty($field['translatable'])) {
+ $title_language = t('@label (!name:language)', array('@label' => $label, '!name' => $field['field_name']));
+ $title_short_language = t('@label:language', array('@label' => $label));
+
+ $data[$table]['language'] = array(
+ 'group' => $group,
+ 'title' => $title_language,
+ 'title short' => $title_short_language,
+ 'help' => t('Language - Appears in: @bundles.', array('@bundles' => implode(', ', $bundles_names))),
+ );
+ $data[$table]['language']['field'] = array(
+ 'handler' => 'views_handler_field_locale_language',
+ );
+ $data[$table]['language']['argument'] = array(
+ 'field' => 'language',
+ 'table' => $table,
+ 'handler' => 'views_handler_argument_locale_language',
+ 'additional fields' => $additional_fields,
+ 'empty field name' => t('<No value>'),
+ 'field_name' => $field['field_name'],
+ );
+ $data[$table]['language']['filter'] = array(
+ 'field' => 'language',
+ 'table' => $table,
+ 'handler' => 'views_handler_filter_locale_language',
+ 'additional fields' => $additional_fields,
+ 'field_name' => $field['field_name'],
+ 'allow empty' => TRUE,
+ );
+ $data[$table]['language']['sort'] = array(
+ 'field' => 'language',
+ 'table' => $table,
+ 'handler' => 'views_handler_sort',
+ 'additional fields' => $additional_fields,
+ 'field_name' => $field['field_name'],
+ );
+ }
}
}
diff --git a/kolab.org/www/drupal-7.18/sites/all/modules/views/modules/node.views.inc b/kolab.org/www/drupal-7.18/sites/all/modules/views/modules/node.views.inc
index ebba3d3..71a1023 100644
--- a/kolab.org/www/drupal-7.18/sites/all/modules/views/modules/node.views.inc
+++ b/kolab.org/www/drupal-7.18/sites/all/modules/views/modules/node.views.inc
@@ -439,7 +439,7 @@ function node_views_data() {
$data['node_revision']['table']['default_relationship'] = array(
'node' => array(
'table' => 'node',
- 'field' => 'vid',
+ 'field' => 'nid',
),
);
@@ -456,24 +456,57 @@ function node_views_data() {
);
// nid
+ $data['node_revision']['nid'] = array(
+ 'title' => t('Nid'),
+ // The help that appears on the UI.
+ 'help' => t('The revision NID of the content revision.'),
+ // Information for displaying the nid.
+ 'field' => array(
+ 'click sortable' => TRUE,
+ ),
+ // Information for accepting a nid as an argument.
+ 'argument' => array(
+ 'handler' => 'views_handler_argument_node_nid',
+ 'click sortable' => TRUE,
+ 'numeric' => TRUE,
+ ),
+ // Information for accepting a nid as a filter.
+ 'filter' => array(
+ 'handler' => 'views_handler_filter_numeric',
+ ),
+ // Information for sorting on a nid.
+ 'sort' => array(
+ 'handler' => 'views_handler_sort',
+ ),
+ 'relationship' => array(
+ 'handler' => 'views_handler_relationship',
+ 'base' => 'node',
+ 'base field' => 'nid',
+ 'title' => t('Content'),
+ 'label' => t('Get the actual content from a content revision.'),
+ ),
+ );
+
+ // vid
$data['node_revision']['vid'] = array(
'title' => t('Vid'),
- 'help' => t('The revision ID of the content revision.'), // The help that appears on the UI,
- // Information for displaying the nid
+ // The help that appears on the UI.
+ 'help' => t('The revision ID of the content revision.'),
+ // Information for displaying the vid.
'field' => array(
'click sortable' => TRUE,
),
- // Information for accepting a nid as an argument
+ // Information for accepting a vid as an argument.
'argument' => array(
'handler' => 'views_handler_argument_node_vid',
'click sortable' => TRUE,
'numeric' => TRUE,
),
- // Information for accepting a nid as a filter
+ // Information for accepting a vid as a filter.
'filter' => array(
'handler' => 'views_handler_filter_numeric',
),
- // Information for sorting on a nid.
+ // Information for sorting on a vid.
'sort' => array(
'handler' => 'views_handler_sort',
),
diff --git a/kolab.org/www/drupal-7.18/sites/all/modules/views/modules/node/views_handler_field_node_revision.inc b/kolab.org/www/drupal-7.18/sites/all/modules/views/modules/node/views_handler_field_node_revision.inc
index c04693a..d29b070 100644
--- a/kolab.org/www/drupal-7.18/sites/all/modules/views/modules/node/views_handler_field_node_revision.inc
+++ b/kolab.org/www/drupal-7.18/sites/all/modules/views/modules/node/views_handler_field_node_revision.inc
@@ -54,7 +54,10 @@ class views_handler_field_node_revision extends views_handler_field_node {
$this->options['alter']['make_link'] = TRUE;
$nid = $this->get_value($values, 'nid');
$vid = $this->get_value($values, 'vid');
- $this->options['alter']['path'] = "node/" . $nid . '/revisions/' . $vid . '/view';
+ $this->options['alter']['path'] = 'node/' . $nid;
+ if ($nid != $vid) {
+ $this->options['alter']['path'] .= "/revisions/$vid/view";
+ }
if (module_exists('translation')) {
$language = $this->get_value($values, 'language');
$languages = language_list();
diff --git a/kolab.org/www/drupal-7.18/sites/all/modules/views/modules/node/views_handler_filter_node_access.inc b/kolab.org/www/drupal-7.18/sites/all/modules/views/modules/node/views_handler_filter_node_access.inc
index a9ee85c..a29b13f 100644
--- a/kolab.org/www/drupal-7.18/sites/all/modules/views/modules/node/views_handler_filter_node_access.inc
+++ b/kolab.org/www/drupal-7.18/sites/all/modules/views/modules/node/views_handler_filter_node_access.inc
@@ -21,7 +21,7 @@ class views_handler_filter_node_access extends views_handler_filter {
* See _node_access_where_sql() for a non-views query based implementation.
*/
function query() {
- if (!user_access('administer nodes')) {
+ if (!user_access('administer nodes') && module_implements('node_grants')) {
$table = $this->ensure_my_table();
$grants = db_or();
foreach (node_access_grants('view') as $realm => $gids) {
diff --git a/kolab.org/www/drupal-7.18/sites/all/modules/views/modules/search/views_handler_filter_search.inc b/kolab.org/www/drupal-7.18/sites/all/modules/views/modules/search/views_handler_filter_search.inc
index 7430494..16515a7 100644
--- a/kolab.org/www/drupal-7.18/sites/all/modules/views/modules/search/views_handler_filter_search.inc
+++ b/kolab.org/www/drupal-7.18/sites/all/modules/views/modules/search/views_handler_filter_search.inc
@@ -29,11 +29,29 @@ class views_handler_filter_search extends views_handler_filter {
$options = parent::option_definition();
$options['operator']['default'] = 'optional';
+ $options['remove_score'] = array('default' => FALSE, 'bool' => TRUE);
return $options;
}
/**
+ * Overrides views_handler_filter::options_form().
+ *
+ * Add an option to remove search scores from the query.
+ */
+ function options_form(&$form, &$form_state) {
+ parent::options_form($form, $form_state);
+
+ $form['remove_score'] = array(
+ '#type' => 'checkbox',
+ '#title' => t('Remove search score'),
+ '#description' => t('Check this box to remove the search score from the query. This can help reduce help reduce duplicate search results when using this filter.'),
+ '#default_value' => $this->options['remove_score'],
+ );
+ }
+
+
+ /**
* Provide simple equality operator
*/
function operator_form(&$form, &$form_state) {
@@ -126,12 +144,14 @@ class views_handler_filter_search extends views_handler_filter {
$search_condition = db_and();
- // Create a new join to relate the 'serach_total' table to our current 'search_index' table.
- $join = new views_join;
- $join->construct('search_total', $search_index, 'word', 'word');
- $search_total = $this->query->add_relationship('search_total', $join, $search_index);
+ if (!$this->options['remove_score']) {
+ // Create a new join to relate the 'serach_total' table to our current 'search_index' table.
+ $join = new views_join;
+ $join->construct('search_total', $search_index, 'word', 'word');
+ $search_total = $this->query->add_relationship('search_total', $join, $search_index);
- $this->search_score = $this->query->add_field('', "SUM($search_index.score * $search_total.count)", 'score', array('aggregate' => TRUE));
+ $this->search_score = $this->query->add_field('', "SUM($search_index.score * $search_total.count)", 'score', array('aggregate' => TRUE));
+ }
if (empty($this->query->relationships[$this->relationship])) {
$base_table = $this->query->base_table;
diff --git a/kolab.org/www/drupal-7.18/sites/all/modules/views/modules/taxonomy/views_handler_field_term_link_edit.inc b/kolab.org/www/drupal-7.18/sites/all/modules/views/modules/taxonomy/views_handler_field_term_link_edit.inc
index 75ab0f8..2efb4a6 100644
--- a/kolab.org/www/drupal-7.18/sites/all/modules/views/modules/taxonomy/views_handler_field_term_link_edit.inc
+++ b/kolab.org/www/drupal-7.18/sites/all/modules/views/modules/taxonomy/views_handler_field_term_link_edit.inc
@@ -44,16 +44,19 @@ class views_handler_field_term_link_edit extends views_handler_field {
}
function render($values) {
- // Mock a term object for taxonomy_term_edit_access(). Use machine name and
- // vid to ensure compatibility with vid based and machine name based
- // access checks. See http://drupal.org/node/995156
- $term = new stdClass();
- $term->vid = $values->{$this->aliases['vid']};
- $term->vocabulary_machine_name = $values->{$this->aliases['vocabulary_machine_name']};
- if (taxonomy_term_edit_access($term)) {
- $text = !empty($this->options['text']) ? $this->options['text'] : t('edit');
- $tid = $this->get_value($values, 'tid');
- return l($text, 'taxonomy/term/'. $tid . '/edit', array('query' => drupal_get_destination()));
+ // Check there is an actual value, as on a relationship there may not be.
+ if ($tid = $this->get_value($values, 'tid')) {
+ // Mock a term object for taxonomy_term_edit_access(). Use machine name and
+ // vid to ensure compatibility with vid based and machine name based
+ // access checks. See http://drupal.org/node/995156
+ $term = new stdClass();
+ $term->vid = $values->{$this->aliases['vid']};
+ $term->vocabulary_machine_name = $values->{$this->aliases['vocabulary_machine_name']};
+ if (taxonomy_term_edit_access($term)) {
+ $text = !empty($this->options['text']) ? $this->options['text'] : t('edit');
+ $tid = $this->get_value($values, 'tid');
+ return l($text, 'taxonomy/term/'. $tid . '/edit', array('query' => drupal_get_destination()));
+ }
}
}
}
diff --git a/kolab.org/www/drupal-7.18/sites/all/modules/views/modules/taxonomy/views_plugin_argument_validate_taxonomy_term.inc b/kolab.org/www/drupal-7.18/sites/all/modules/views/modules/taxonomy/views_plugin_argument_validate_taxonomy_term.inc
index 3a88199..435db0d 100644
--- a/kolab.org/www/drupal-7.18/sites/all/modules/views/modules/taxonomy/views_plugin_argument_validate_taxonomy_term.inc
+++ b/kolab.org/www/drupal-7.18/sites/all/modules/views/modules/taxonomy/views_plugin_argument_validate_taxonomy_term.inc
@@ -96,15 +96,15 @@ class views_plugin_argument_validate_taxonomy_term extends views_plugin_argument
$query = db_select('taxonomy_term_data', 'td');
$query->leftJoin('taxonomy_vocabulary', 'tv', 'td.vid = tv.vid');
$query->fields('td');
- $query->fields('tv', array('machine_name'));
$query->condition('td.tid', $argument);
$query->addTag('term_access');
$term = $query->execute()->fetchObject();
if (!$term) {
return FALSE;
}
- $this->argument->validated_title = check_plain($term->name);
- return empty($vocabularies) || !empty($vocabularies[$term->machine_name]);
+ $term = taxonomy_term_load($term->tid);
+ $this->argument->validated_title = check_plain(entity_label('taxonomy_term', $term));
+ return empty($vocabularies) || !empty($vocabularies[$term->vocabulary_machine_name]);
case 'tids':
// An empty argument is not a term so doesn't pass.
@@ -151,8 +151,8 @@ class views_plugin_argument_validate_taxonomy_term extends views_plugin_argument
$validated_cache[$term->tid] = FALSE;
return FALSE;
}
-
- $titles[] = $validated_cache[$term->tid] = check_plain($term->name);
+ $term = taxonomy_term_load($term->tid);
+ $titles[] = $validated_cache[$term->tid] = check_plain(entity_label('taxonomy_term', $term));
unset($test[$term->tid]);
}
}
@@ -185,7 +185,8 @@ class views_plugin_argument_validate_taxonomy_term extends views_plugin_argument
if ($type == 'convert') {
$this->argument->argument = $term->tid;
}
- $this->argument->validated_title = check_plain($term->name);
+ $term = taxonomy_term_load($term->tid);
+ $this->argument->validated_title = check_plain(entity_label('taxonomy_term', $term));
return TRUE;
}
return FALSE;
diff --git a/kolab.org/www/drupal-7.18/sites/all/modules/views/modules/tracker.views.inc b/kolab.org/www/drupal-7.18/sites/all/modules/views/modules/tracker.views.inc
new file mode 100644
index 0000000..ee14589
--- /dev/null
+++ b/kolab.org/www/drupal-7.18/sites/all/modules/views/modules/tracker.views.inc
@@ -0,0 +1,183 @@
+<?php
+
+/**
+ * @file
+ * Provide views data and handlers for tracker.module.
+ *
+ * @ingroup views_module_handlers
+ */
+/**
+ * Implementation of hook_views_data().
+ */
+function tracker_views_data() {
+ $data = array();
+
+ $data['tracker_node']['table']['group'] = t('Tracker');
+ $data['tracker_node']['table']['join'] = array(
+ 'node' => array(
+ 'type' => 'INNER',
+ 'left_field' => 'nid',
+ 'field' => 'nid',
+ ),
+ );
+ $data['tracker_node']['nid'] = array(
+ 'title' => t('Nid'),
+ 'help' => t('The node ID of the node.'),
+ 'field' => array(
+ 'handler' => 'views_handler_field_node',
+ 'click sortable' => TRUE,
+ ),
+ 'argument' => array(
+ 'handler' => 'views_handler_argument_node_nid',
+ 'name field' => 'title',
+ 'numeric' => TRUE,
+ 'validate type' => 'nid',
+ ),
+ 'filter' => array(
+ 'handler' => 'views_handler_filter_numeric',
+ ),
+ 'sort' => array(
+ 'handler' => 'views_handler_sort',
+ ),
+ );
+ $data['tracker_node']['changed'] = array(
+ 'title' => t('Updated date'),
+ 'help' => t('The date the node was last updated.'),
+ 'field' => array(
+ 'handler' => 'views_handler_field_date',
+ 'click sortable' => TRUE,
+ ),
+ 'sort' => array(
+ 'handler' => 'views_handler_sort_date',
+ ),
+ 'filter' => array(
+ 'handler' => 'views_handler_filter_date',
+ ),
+ );
+ $data['tracker_node']['published'] = array(
+ 'title' => t('Published'),
+ 'help' => t('Whether or not the node is published.'),
+ 'field' => array(
+ 'handler' => 'views_handler_field_boolean',
+ 'click sortable' => TRUE,
+ ),
+ 'filter' => array(
+ 'handler' => 'views_handler_filter_tracker_boolean_operator',
+ 'label' => t('Published'),
+ 'type' => 'yes-no',
+ ),
+ 'sort' => array(
+ 'handler' => 'views_handler_sort',
+ ),
+ );
+
+ $data['tracker_user']['table']['group'] = t('Tracker - User');
+ $data['tracker_user']['table']['join'] = array(
+ 'node' => array(
+ 'type' => 'INNER',
+ 'left_field' => 'nid',
+ 'field' => 'nid',
+ ),
+ 'user' => array(
+ 'type' => 'INNER',
+ 'left_field' => 'uid',
+ 'field' => 'uid',
+ ),
+ );
+ $data['tracker_user']['nid'] = array(
+ 'title' => t('Nid'),
+ 'help' => t('The node ID of the node a user created or commented on. You must use an argument or filter on UID or you will get misleading results using this field.'),
+ 'field' => array(
+ 'handler' => 'views_handler_field_node',
+ 'click sortable' => TRUE,
+ ),
+ 'argument' => array(
+ 'handler' => 'views_handler_argument_node_nid',
+ 'name field' => 'title',
+ 'numeric' => TRUE,
+ 'validate type' => 'nid',
+ ),
+ 'filter' => array(
+ 'handler' => 'views_handler_filter_numeric',
+ ),
+ 'sort' => array(
+ 'handler' => 'views_handler_sort',
+ ),
+ );
+ $data['tracker_user']['uid'] = array(
+ 'title' => t('Uid'),
+ 'help' => t('The user ID of a user who touched the node (either created or commented on it).'),
+ 'field' => array(
+ 'handler' => 'views_handler_field_user',
+ 'click sortable' => TRUE,
+ ),
+ 'argument' => array(
+ 'handler' => 'views_handler_argument_user_uid',
+ 'name field' => 'name',
+ ),
+ 'filter' => array(
+ 'title' => t('Name'),
+ 'handler' => 'views_handler_filter_user_name',
+ ),
+ 'sort' => array(
+ 'handler' => 'views_handler_sort',
+ ),
+ );
+ $data['tracker_user']['changed'] = array(
+ 'title' => t('Updated date'),
+ 'help' => t('The date the node was last updated or commented on. You must use an argument or filter on UID or you will get misleading results using this 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',
+ ),
+ );
+ $data['tracker_user']['published'] = array(
+ 'title' => t('Published'),
+ 'help' => t('Whether or not the node is published. You must use an argument or filter on UID or you will get misleading results using this field.'),
+ 'field' => array(
+ 'handler' => 'views_handler_field_boolean',
+ 'click sortable' => TRUE,
+ ),
+ 'filter' => array(
+ 'handler' => 'views_handler_filter_tracker_boolean_operator',
+ 'label' => t('Published'),
+ 'type' => 'yes-no',
+ ),
+ 'sort' => array(
+ 'handler' => 'views_handler_sort',
+ ),
+ );
+
+ return $data;
+}
+
+/**
+ * Implementation of hook_views_data_alter().
+ */
+function tracker_views_data_alter(&$data) {
+ // Provide additional uid_touch handlers which are handled by tracker
+ $data['node']['uid_touch_tracker'] = array(
+ 'group' => t('Tracker - User'),
+ 'title' => t('User posted or commented'),
+ 'help' => t('Display nodes only if a user posted the node or commented on the node.'),
+ 'argument' => array(
+ 'field' => 'uid',
+ 'name table' => 'users',
+ 'name field' => 'name',
+ 'handler' => 'views_handler_argument_tracker_comment_user_uid',
+ 'no group by' => TRUE,
+ ),
+ 'filter' => array(
+ 'field' => 'uid',
+ 'name table' => 'users',
+ 'name field' => 'name',
+ 'handler' => 'views_handler_filter_tracker_comment_user_uid'
+ ),
+ );
+}
diff --git a/kolab.org/www/drupal-7.18/sites/all/modules/views/modules/tracker/views_handler_argument_tracker_comment_user_uid.inc b/kolab.org/www/drupal-7.18/sites/all/modules/views/modules/tracker/views_handler_argument_tracker_comment_user_uid.inc
new file mode 100644
index 0000000..e614482
--- /dev/null
+++ b/kolab.org/www/drupal-7.18/sites/all/modules/views/modules/tracker/views_handler_argument_tracker_comment_user_uid.inc
@@ -0,0 +1,26 @@
+<?php
+
+/**
+ * @file
+ * Contains views_handler_argument_tracker_comment_user_uid
+ */
+
+/**
+ * UID argument to check for nodes that user posted or commented on.
+ *
+ * @ingroup views_argument_handlers
+ */
+class views_handler_argument_tracker_comment_user_uid extends views_handler_argument_comment_user_uid {
+
+ /**
+ * Overrides views_handler_argument_comment_user_uid::query().
+ */
+ function query($group_by = FALSE) {
+ // Because this handler thinks it's an argument for a field on the {node}
+ // table, we need to make sure {tracker_user} is JOINed and use its alias
+ // for the WHERE clause.
+ $tracker_user_alias = $this->query->ensure_table('tracker_user');
+ $this->query->add_where(0, "$tracker_user_alias.uid", $this->argument);
+ }
+
+}
diff --git a/kolab.org/www/drupal-7.18/sites/all/modules/views/modules/tracker/views_handler_filter_tracker_boolean_operator.inc b/kolab.org/www/drupal-7.18/sites/all/modules/views/modules/tracker/views_handler_filter_tracker_boolean_operator.inc
new file mode 100644
index 0000000..455e824
--- /dev/null
+++ b/kolab.org/www/drupal-7.18/sites/all/modules/views/modules/tracker/views_handler_filter_tracker_boolean_operator.inc
@@ -0,0 +1,31 @@
+<?php
+
+/**
+ * @file
+ * Contains views_handler_filter_tracker_boolean_operator
+ */
+
+ /**
+ * Filter handler for boolean values to use = 1 instead of <> 0.
+ */
+class views_handler_filter_tracker_boolean_operator extends views_handler_filter_boolean_operator {
+
+ /**
+ * Overrides views_handler_filter_boolean_operator::query().
+ */
+ function query() {
+ $this->ensure_my_table();
+ $where = "$this->table_alias.$this->real_field ";
+ if (empty($this->value)) {
+ $where .= '= 0';
+ if ($this->accept_null) {
+ $where = '(' . $where . " OR $this->table_alias.$this->real_field IS NULL)";
+ }
+ }
+ else {
+ $where .= '= 1';
+ }
+ $this->query->add_where_expression($this->options['group'], $where);
+ }
+
+}
diff --git a/kolab.org/www/drupal-7.18/sites/all/modules/views/modules/tracker/views_handler_filter_tracker_comment_user_uid.inc b/kolab.org/www/drupal-7.18/sites/all/modules/views/modules/tracker/views_handler_filter_tracker_comment_user_uid.inc
new file mode 100644
index 0000000..da6f65b
--- /dev/null
+++ b/kolab.org/www/drupal-7.18/sites/all/modules/views/modules/tracker/views_handler_filter_tracker_comment_user_uid.inc
@@ -0,0 +1,23 @@
+<?php
+/**
+ * @file
+ * Contains views_handler_filter_tracker_comment_user_uid
+ */
+
+/**
+ * UID filter to check for nodes that user posted or commented on.
+ */
+class views_handler_filter_tracker_comment_user_uid extends views_handler_filter_comment_user_uid {
+
+ /**
+ * Overrides views_handler_filter_comment_user_uid::query()
+ */
+ function query() {
+ // Because this handler thinks it's an argument for a field on the {node}
+ // table, we need to make sure {tracker_user} is JOINed and use its alias
+ // for the WHERE clause.
+ $tracker_user_alias = $this->query->ensure_table('tracker_user');
+ $this->query->add_where(0, "$tracker_user_alias.uid", $this->value);
+ }
+
+}
diff --git a/kolab.org/www/drupal-7.18/sites/all/modules/views/plugins/export_ui/views_ui.class.php b/kolab.org/www/drupal-7.18/sites/all/modules/views/plugins/export_ui/views_ui.class.php
index 22b65cb..9d80138 100644
--- a/kolab.org/www/drupal-7.18/sites/all/modules/views/plugins/export_ui/views_ui.class.php
+++ b/kolab.org/www/drupal-7.18/sites/all/modules/views/plugins/export_ui/views_ui.class.php
@@ -376,6 +376,11 @@ class views_ui extends ctools_export_ui {
}
function list_page($js, $input) {
+ // Remove filters values from session if filters are hidden.
+ if (!variable_get('views_ui_show_listing_filters', FALSE) && isset($_SESSION['ctools_export_ui'][$this->plugin['name']])) {
+ unset($_SESSION['ctools_export_ui'][$this->plugin['name']]);
+ }
+
// wrap output in a div for CSS
$output = parent::list_page($js, $input);
if (is_string($output)) {
diff --git a/kolab.org/www/drupal-7.18/sites/all/modules/views/plugins/views_plugin_display.inc b/kolab.org/www/drupal-7.18/sites/all/modules/views/plugins/views_plugin_display.inc
index 6be3dcc..75a32c5 100644
--- a/kolab.org/www/drupal-7.18/sites/all/modules/views/plugins/views_plugin_display.inc
+++ b/kolab.org/www/drupal-7.18/sites/all/modules/views/plugins/views_plugin_display.inc
@@ -476,7 +476,7 @@ class views_plugin_display extends views_plugin {
'display_description' => FALSE,
'use_ajax' => TRUE,
'hide_attachment_summary' => TRUE,
- 'hide_admin_links' => FALSE,
+ 'hide_admin_links' => TRUE,
'pager' => TRUE,
'pager_options' => TRUE,
'use_more' => TRUE,
@@ -783,6 +783,10 @@ class views_plugin_display extends views_plugin {
if ($display_id && !empty($this->view->display[$display_id]) && is_object($this->view->display[$display_id]->handler)) {
return $this->view->display[$display_id]->handler->get_path();
}
+
+ if ($this->get_option('link_display') == 'custom_url' && $link_url = $this->get_option('link_url')) {
+ return $link_url;
+ }
}
function get_url() {
diff --git a/kolab.org/www/drupal-7.18/sites/all/modules/views/plugins/views_plugin_display_feed.inc b/kolab.org/www/drupal-7.18/sites/all/modules/views/plugins/views_plugin_display_feed.inc
index 37d0ae4..bfd220c 100644
--- a/kolab.org/www/drupal-7.18/sites/all/modules/views/plugins/views_plugin_display_feed.inc
+++ b/kolab.org/www/drupal-7.18/sites/all/modules/views/plugins/views_plugin_display_feed.inc
@@ -139,7 +139,6 @@ class views_plugin_display_feed extends views_plugin_display_page {
* Provide the default form for setting options.
*/
function options_form(&$form, &$form_state) {
- parent::options_form($form, $form_state);
// It is very important to call the parent function here.
parent::options_form($form, $form_state);
diff --git a/kolab.org/www/drupal-7.18/sites/all/modules/views/plugins/views_plugin_display_page.inc b/kolab.org/www/drupal-7.18/sites/all/modules/views/plugins/views_plugin_display_page.inc
index cd7fe37..7ca4bf7 100644
--- a/kolab.org/www/drupal-7.18/sites/all/modules/views/plugins/views_plugin_display_page.inc
+++ b/kolab.org/www/drupal-7.18/sites/all/modules/views/plugins/views_plugin_display_page.inc
@@ -30,6 +30,7 @@ class views_plugin_display_page extends views_plugin_display {
'weight' => array('default' => 0),
'name' => array('default' => variable_get('menu_default_node_menu', 'navigation')),
'context' => array('default' => ''),
+ 'context_only_inline' => array('default' => FALSE),
),
);
$options['tab_options'] = array(
@@ -153,7 +154,7 @@ class views_plugin_display_page extends views_plugin_display {
// Add context for contextual links.
// @see menu_contextual_links()
if (!empty($menu['context'])) {
- $items[$path]['context'] = MENU_CONTEXT_INLINE;
+ $items[$path]['context'] = !empty($menu['context_only_inline']) ? MENU_CONTEXT_INLINE : (MENU_CONTEXT_PAGE | MENU_CONTEXT_INLINE);
}
// If this is a 'default' tab, check to see if we have to create teh
@@ -251,9 +252,12 @@ class views_plugin_display_page extends views_plugin_display {
),
);
- $path = strip_tags('/' . $this->get_option('path'));
+ $path = strip_tags($this->get_option('path'));
if (empty($path)) {
- $path = t('None');
+ $path = t('No path is set');
+ }
+ else {
+ $path = '/' . $path;
}
$options['path'] = array(
@@ -297,7 +301,6 @@ class views_plugin_display_page extends views_plugin_display {
* Provide the default form for setting options.
*/
function options_form(&$form, &$form_state) {
- parent::options_form($form, $form_state);
// It is very important to call the parent function here:
parent::options_form($form, $form_state);
@@ -384,12 +387,23 @@ class views_plugin_display_page extends views_plugin_display {
);
$form['menu']['context'] = array(
'#title' => t('Context'),
- '#suffix' => '</div>',
'#type' => 'checkbox',
'#default_value' => !empty($menu['context']),
'#description' => t('Displays the link in contextual links'),
'#dependency' => array('radio:menu[type]' => array('tab')),
);
+ $form['menu']['context_only_inline'] = array(
+ '#title' => t('Hide menu tab'),
+ '#suffix' => '</div>',
+ '#type' => 'checkbox',
+ '#default_value' => !empty($menu['context_only_inline']),
+ '#description' => t('Only display menu item entry in contextual links. Menu tab should not be displayed.'),
+ '#dependency' => array(
+ 'radio:menu[type]' => array('tab'),
+ 'edit-menu-context' => array(1),
+ ),
+ '#dependency_count' => 2,
+ );
break;
case 'tab_options':
$form['#title'] .= t('Default tab options');
diff --git a/kolab.org/www/drupal-7.18/sites/all/modules/views/plugins/views_plugin_exposed_form.inc b/kolab.org/www/drupal-7.18/sites/all/modules/views/plugins/views_plugin_exposed_form.inc
index 833f44b..343eee8 100644
--- a/kolab.org/www/drupal-7.18/sites/all/modules/views/plugins/views_plugin_exposed_form.inc
+++ b/kolab.org/www/drupal-7.18/sites/all/modules/views/plugins/views_plugin_exposed_form.inc
@@ -41,6 +41,7 @@ class views_plugin_exposed_form extends views_plugin {
$options['reset_button'] = array('default' => FALSE, 'bool' => TRUE);
$options['reset_button_label'] = array('default' => 'Reset', 'translatable' => TRUE);
$options['exposed_sorts_label'] = array('default' => 'Sort by', 'translatable' => TRUE);
+ $options['expose_sort_order'] = array('default' => TRUE, 'bool' => TRUE);
$options['sort_asc_label'] = array('default' => 'Asc', 'translatable' => TRUE);
$options['sort_desc_label'] = array('default' => 'Desc', 'translatable' => TRUE);
$options['autosubmit'] = array('default' => FALSE, 'bool' => TRUE);
@@ -84,12 +85,20 @@ class views_plugin_exposed_form extends views_plugin {
'#required' => TRUE,
);
+ $form['expose_sort_order'] = array(
+ '#type' => 'checkbox',
+ '#title' => t('Expose sort order'),
+ '#description' => t('Allow the user to choose the sort order. If sort order is not exposed, the sort criteria settings for each sort will determine its order.'),
+ '#default_value' => $this->options['expose_sort_order'],
+ );
+
$form['sort_asc_label'] = array(
'#type' => 'textfield',
'#title' => t('Ascending'),
'#description' => t('Text to use when exposed sort is ordered ascending.'),
'#default_value' => $this->options['sort_asc_label'],
'#required' => TRUE,
+ '#dependency' => array('edit-exposed-form-options-expose-sort-order' => array(TRUE)),
);
$form['sort_desc_label'] = array(
@@ -98,6 +107,7 @@ class views_plugin_exposed_form extends views_plugin {
'#description' => t('Text to use when exposed sort is ordered descending.'),
'#default_value' => $this->options['sort_desc_label'],
'#required' => TRUE,
+ '#dependency' => array('edit-exposed-form-options-expose-sort-order' => array(TRUE)),
);
$form['autosubmit'] = array(
@@ -231,12 +241,14 @@ class views_plugin_exposed_form extends views_plugin {
$form_state['input']['sort_by'] = array_shift($keys);
}
- $form['sort_order'] = array(
- '#type' => 'select',
- '#options' => $sort_order,
- '#title' => t('Order'),
- '#default_value' => $default_sort_order,
- );
+ if ($this->options['expose_sort_order']) {
+ $form['sort_order'] = array(
+ '#type' => 'select',
+ '#options' => $sort_order,
+ '#title' => t('Order'),
+ '#default_value' => $default_sort_order,
+ );
+ }
$form['submit']['#weight'] = 10;
if (isset($form['reset'])) {
$form['reset']['#weight'] = 10;
@@ -312,6 +324,7 @@ class views_plugin_exposed_form extends views_plugin {
$this->view->exposed_data = array();
}
+ $form_state['redirect'] = current_path();
$form_state['values'] = array();
}
}
diff --git a/kolab.org/www/drupal-7.18/sites/all/modules/views/plugins/views_plugin_pager_mini.inc b/kolab.org/www/drupal-7.18/sites/all/modules/views/plugins/views_plugin_pager_mini.inc
index 2daea99..bec48c8 100644
--- a/kolab.org/www/drupal-7.18/sites/all/modules/views/plugins/views_plugin_pager_mini.inc
+++ b/kolab.org/www/drupal-7.18/sites/all/modules/views/plugins/views_plugin_pager_mini.inc
@@ -6,7 +6,7 @@
*/
/**
- * The plugin to handle full pager.
+ * The plugin to handle mini pager.
*
* @ingroup views_pager_plugins
*/
@@ -18,9 +18,53 @@ class views_plugin_pager_mini extends views_plugin_pager_full {
return format_plural($this->options['items_per_page'], 'Mini pager, @count item', 'Mini pager, @count items', array('@count' => $this->options['items_per_page']));
}
+ /**
+ * Overrides views_plugin_pager_full::option_definition().
+ *
+ * Overrides the full pager options form by deleting unused settings.
+ */
+ function option_definition() {
+ $options = parent::option_definition();
+
+ unset($options['quantity']);
+ unset($options['tags']['first']);
+ unset($options['tags']['last']);
+ $options['tags']['previous']['default'] = '‹‹';
+ $options['tags']['next']['default'] = '››';
+
+ return $options;
+ }
+
+ /**
+ * Overrides views_plugin_pager_full::options_form().
+ *
+ * Overrides the full pager options form by deleting unused settings.
+ */
+ function options_form(&$form, &$form_state) {
+ parent::options_form($form, $form_state);
+ unset($form['quantity']);
+ unset($form['tags']['first']);
+ unset($form['tags']['last']);
+ }
+
+ /**
+ * Overrides views_plugin_pager_full::render().
+ *
+ * Overrides the full pager renderer by changing the theme function
+ * and leaving out variables that are not used in the mini pager.
+ */
function render($input) {
$pager_theme = views_theme_functions('views_mini_pager', $this->view, $this->display);
+ // The 1, 3 index are correct.
+ // @see theme_pager().
+ $tags = array(
+ 1 => $this->options['tags']['previous'],
+ 3 => $this->options['tags']['next'],
+ );
return theme($pager_theme, array(
- 'parameters' => $input, 'element' => $this->options['id']));
+ 'tags' => $tags,
+ 'element' => $this->options['id'],
+ 'parameters' => $input,
+ ));
}
}
diff --git a/kolab.org/www/drupal-7.18/sites/all/modules/views/plugins/views_plugin_query_default.inc b/kolab.org/www/drupal-7.18/sites/all/modules/views/plugins/views_plugin_query_default.inc
index c6c7649..030c5ea 100644
--- a/kolab.org/www/drupal-7.18/sites/all/modules/views/plugins/views_plugin_query_default.inc
+++ b/kolab.org/www/drupal-7.18/sites/all/modules/views/plugins/views_plugin_query_default.inc
@@ -1578,7 +1578,7 @@ class views_plugin_query_default extends views_plugin_query {
),
),
'stddev_pop' => array(
- 'title' => t('Standard derivation'),
+ 'title' => t('Standard deviation'),
'method' => 'views_query_default_aggregation_method_simple',
'handler' => array(
'argument' => 'views_handler_argument_group_by_numeric',
diff --git a/kolab.org/www/drupal-7.18/sites/all/modules/views/plugins/views_plugin_style_grid.inc b/kolab.org/www/drupal-7.18/sites/all/modules/views/plugins/views_plugin_style_grid.inc
index 9be7ee1..a2e4375 100644
--- a/kolab.org/www/drupal-7.18/sites/all/modules/views/plugins/views_plugin_style_grid.inc
+++ b/kolab.org/www/drupal-7.18/sites/all/modules/views/plugins/views_plugin_style_grid.inc
@@ -21,6 +21,7 @@ class views_plugin_style_grid extends views_plugin_style {
$options['alignment'] = array('default' => 'horizontal');
$options['fill_single_line'] = array('default' => TRUE, 'bool' => TRUE);
$options['summary'] = array('default' => '');
+ $options['caption'] = array('default' => '');
return $options;
}
@@ -52,10 +53,17 @@ class views_plugin_style_grid extends views_plugin_style {
'#default_value' => !empty($this->options['fill_single_line']),
);
+ $form['caption'] = array(
+ '#type' => 'textfield',
+ '#title' => t('Short description of table'),
+ '#description' => t('Include a caption for better accessibility of your table.'),
+ '#default_value' => $this->options['caption'],
+ );
+
$form['summary'] = array(
'#type' => 'textfield',
'#title' => t('Table summary'),
- '#description' => t('This value will be displayed as table-summary attribute in the html. Set this for better accessiblity of your site.'),
+ '#description' => t('This value will be displayed as table-summary attribute in the html. Use this to give a summary of complex tables.'),
'#default_value' => $this->options['summary'],
);
}
diff --git a/kolab.org/www/drupal-7.18/sites/all/modules/views/plugins/views_plugin_style_jump_menu.inc b/kolab.org/www/drupal-7.18/sites/all/modules/views/plugins/views_plugin_style_jump_menu.inc
index f571f62..16b0aef 100644
--- a/kolab.org/www/drupal-7.18/sites/all/modules/views/plugins/views_plugin_style_jump_menu.inc
+++ b/kolab.org/www/drupal-7.18/sites/all/modules/views/plugins/views_plugin_style_jump_menu.inc
@@ -17,7 +17,9 @@ class views_plugin_style_jump_menu extends views_plugin_style {
$options['hide'] = array('default' => FALSE, 'bool' => TRUE);
$options['path'] = array('default' => '');
$options['text'] = array('default' => 'Go', 'translatable' => TRUE);
+ $options['label'] = array('default' => '', 'translatable' => TRUE);
$options['choose'] = array('default' => '- Choose -', 'translatable' => TRUE);
+ $options['inline'] = array('default' => TRUE, 'bool' => TRUE);
$options['default_value'] = array('default' => FALSE, 'bool' => TRUE);
return $options;
@@ -68,6 +70,13 @@ class views_plugin_style_jump_menu extends views_plugin_style {
'#default_value' => $this->options['text'],
);
+ $form['label'] = array(
+ '#type' => 'textfield',
+ '#title' => t('Selector label'),
+ '#default_value' => $this->options['label'],
+ '#description' => t('The text that will appear as the the label of the selector element. If blank no label tag will be used.'),
+ );
+
$form['choose'] = array(
'#type' => 'textfield',
'#title' => t('Choose text'),
@@ -75,6 +84,12 @@ class views_plugin_style_jump_menu extends views_plugin_style {
'#description' => t('The text that will appear as the selected option in the jump menu.'),
);
+ $form['inline'] = array(
+ '#type' => 'checkbox',
+ '#title' => t('Set this field to display inline'),
+ '#default_value' => !empty($this->options['inline']),
+ );
+
$form['default_value'] = array(
'#type' => 'checkbox',
'#title' => t('Select the current contextual filter value'),
@@ -135,7 +150,9 @@ class views_plugin_style_jump_menu extends views_plugin_style {
$settings = array(
'hide' => $this->options['hide'],
'button' => $this->options['text'],
+ 'title' => $this->options['label'],
'choose' => $this->options['choose'],
+ 'inline' => $this->options['inline'],
'default_value' => $default_value,
);
diff --git a/kolab.org/www/drupal-7.18/sites/all/modules/views/plugins/views_plugin_style_mapping.inc b/kolab.org/www/drupal-7.18/sites/all/modules/views/plugins/views_plugin_style_mapping.inc
new file mode 100644
index 0000000..fb60a03
--- /dev/null
+++ b/kolab.org/www/drupal-7.18/sites/all/modules/views/plugins/views_plugin_style_mapping.inc
@@ -0,0 +1,125 @@
+<?php
+
+/**
+ * @file
+ * Definition of views_plugin_style_mapping.
+ */
+
+/**
+ * Allows fields to be mapped to specific use cases.
+ */
+abstract class views_plugin_style_mapping extends views_plugin_style {
+
+ /**
+ * Builds the list of field mappings.
+ *
+ * @return array
+ * An associative array, keyed by the field name, containing the following
+ * key-value pairs:
+ * - #title: The human-readable label for this field.
+ * - #default_value: The default value for this field. If not provided, an
+ * empty string will be used.
+ * - #description: A description of this field.
+ * - #required: Whether this field is required.
+ * - #filter: (optional) A method on the plugin to filter field options.
+ * - #toggle: (optional) If this select should be toggled by a checkbox.
+ */
+ abstract protected function define_mapping();
+
+ /**
+ * Overrides views_plugin_style::option_definition().
+ */
+ function option_definition() {
+ $options = parent::option_definition();
+
+ // Parse the mapping and add a default for each.
+ foreach ($this->define_mapping() as $key => $value) {
+ $default = !empty($value['#multiple']) ? array() : '';
+ $options['mapping']['contains'][$key] = array(
+ 'default' => isset($value['#default_value']) ? $value['#default_value'] : $default,
+ );
+ if (!empty($value['#toggle'])) {
+ $options['mapping']['contains']["toggle_$key"] = array(
+ 'default' => FALSE,
+ 'bool' => TRUE,
+ );
+ }
+ }
+
+ return $options;
+ }
+
+ /**
+ * Overrides views_plugin_style::options_form().
+ */
+ function options_form(&$form, &$form_state) {
+ parent::options_form($form, $form_state);
+
+ // Get the mapping.
+ $mapping = $this->define_mapping();
+
+ // Restrict the list of defaults to the mapping, in case they have changed.
+ $options = array_intersect_key($this->options['mapping'], $mapping);
+
+ // Get the labels of the fields added to this display.
+ $field_labels = $this->display->handler->get_field_labels();
+
+ // Provide some default values.
+ $defaults = array(
+ '#type' => 'select',
+ '#required' => FALSE,
+ '#multiple' => FALSE,
+ );
+
+ // For each mapping, add a select element to the form.
+ foreach ($options as $key => $value) {
+ // If the field is optional, add a 'None' value to the top of the options.
+ $field_options = array();
+ $required = !empty($mapping[$key]['#required']);
+ if (!$required && empty($mapping[$key]['#multiple'])) {
+ $field_options = array('' => t('- None -'));
+ }
+ $field_options += $field_labels;
+
+ // Optionally filter the available fields.
+ if (isset($mapping[$key]['#filter'])) {
+ $this->view->init_handlers();
+ $this::$mapping[$key]['#filter']($field_options);
+ unset($mapping[$key]['#filter']);
+ }
+
+ // These values must always be set.
+ $overrides = array(
+ '#options' => $field_options,
+ '#default_value' => $options[$key],
+ );
+
+ // Optionally allow the select to be toggleable.
+ if (!empty($mapping[$key]['#toggle'])) {
+ $form['mapping']["toggle_$key"] = array(
+ '#type' => 'checkbox',
+ '#title' => t('Use a custom %field_name', array('%field_name' => strtolower($mapping[$key]['#title']))),
+ '#default_value' => $this->options['mapping']["toggle_$key"],
+ );
+ $overrides['#states']['visible'][':input[name="style_options[mapping][' . "toggle_$key" . ']"]'] = array('checked' => TRUE);
+ }
+
+ $form['mapping'][$key] = $overrides + $mapping[$key] + $defaults;
+ }
+ }
+
+ /**
+ * Overrides views_plugin_style::render().
+ *
+ * Provides the mapping definition as an available variable.
+ */
+ function render() {
+ return theme($this->theme_functions(), array(
+ 'view' => $this->view,
+ 'options' => $this->options,
+ 'rows' => $this->view->result,
+ 'mapping' => $this->define_mapping(),
+ ));
+ }
+
+}
diff --git a/kolab.org/www/drupal-7.18/sites/all/modules/views/plugins/views_plugin_style_summary_jump_menu.inc b/kolab.org/www/drupal-7.18/sites/all/modules/views/plugins/views_plugin_style_summary_jump_menu.inc
index 5b02163..a16a84b 100644
--- a/kolab.org/www/drupal-7.18/sites/all/modules/views/plugins/views_plugin_style_summary_jump_menu.inc
+++ b/kolab.org/www/drupal-7.18/sites/all/modules/views/plugins/views_plugin_style_summary_jump_menu.inc
@@ -18,7 +18,9 @@ class views_plugin_style_summary_jump_menu extends views_plugin_style {
$options['count'] = array('default' => TRUE, 'bool' => TRUE);
$options['hide'] = array('default' => FALSE, 'bool' => TRUE);
$options['text'] = array('default' => 'Go', 'translatable' => TRUE);
+ $options['label'] = array('default' => '', 'translatable' => TRUE);
$options['choose'] = array('default' => '- Choose -', 'translatable' => TRUE);
+ $options['inline'] = array('default' => TRUE, 'bool' => TRUE);
$options['default_value'] = array('default' => FALSE, 'bool' => TRUE);
return $options;
@@ -63,6 +65,13 @@ class views_plugin_style_summary_jump_menu extends views_plugin_style {
'#default_value' => $this->options['text'],
);
+ $form['label'] = array(
+ '#type' => 'textfield',
+ '#title' => t('Selector label'),
+ '#default_value' => $this->options['label'],
+ '#description' => t('The text that will appear as the the label of the selector element. If blank no label tag will be used.'),
+ );
+
$form['choose'] = array(
'#type' => 'textfield',
'#title' => t('Choose text'),
@@ -70,6 +79,12 @@ class views_plugin_style_summary_jump_menu extends views_plugin_style {
'#description' => t('The text that will appear as the selected option in the jump menu.'),
);
+ $form['inline'] = array(
+ '#type' => 'checkbox',
+ '#title' => t('Set this field to display inline'),
+ '#default_value' => !empty($this->options['inline']),
+ );
+
$form['default_value'] = array(
'#type' => 'checkbox',
'#title' => t('Select the current contextual filter value'),
@@ -119,7 +134,9 @@ class views_plugin_style_summary_jump_menu extends views_plugin_style {
$settings = array(
'hide' => $this->options['hide'],
'button' => $this->options['text'],
+ 'title' => $this->options['label'],
'choose' => $this->options['choose'],
+ 'inline' => $this->options['inline'],
'default_value' => $default_value,
);
diff --git a/kolab.org/www/drupal-7.18/sites/all/modules/views/plugins/views_plugin_style_table.inc b/kolab.org/www/drupal-7.18/sites/all/modules/views/plugins/views_plugin_style_table.inc
index 98919ab..45ed976 100644
--- a/kolab.org/www/drupal-7.18/sites/all/modules/views/plugins/views_plugin_style_table.inc
+++ b/kolab.org/www/drupal-7.18/sites/all/modules/views/plugins/views_plugin_style_table.inc
@@ -33,6 +33,7 @@ class views_plugin_style_table extends views_plugin_style {
$options['override'] = array('default' => TRUE, 'bool' => TRUE);
$options['sticky'] = array('default' => FALSE, 'bool' => TRUE);
$options['order'] = array('default' => 'asc');
+ $options['caption'] = array('default' => '', 'translatable' => TRUE);
$options['summary'] = array('default' => '', 'translatable' => TRUE);
$options['empty_table'] = array('default' => FALSE, 'bool' => TRUE);
@@ -179,10 +180,18 @@ class views_plugin_style_table extends views_plugin_style {
'#description' => t('(Sticky header effects will not be active for preview below, only on live output.)'),
);
+ $form['caption'] = array(
+ '#type' => 'textfield',
+ '#title' => t('Short description of table'),
+ '#description' => t('Include a caption for better accessibility of your table.'),
+ '#default_value' => $this->options['caption'],
+ '#maxlength' => 255,
+ );
+
$form['summary'] = array(
'#type' => 'textfield',
'#title' => t('Table summary'),
- '#description' => t('This value will be displayed as table-summary attribute in the html. Set this for better accessiblity of your site.'),
+ '#description' => t('This value will be displayed as table-summary attribute in the html. Use this to give a summary of complex tables.'),
'#default_value' => $this->options['summary'],
'#maxlength' => 255,
);
diff --git a/kolab.org/www/drupal-7.18/sites/all/modules/views/tests/field/views_fieldapi.test b/kolab.org/www/drupal-7.18/sites/all/modules/views/tests/field/views_fieldapi.test
index c5393b5..da4c27b 100644
--- a/kolab.org/www/drupal-7.18/sites/all/modules/views/tests/field/views_fieldapi.test
+++ b/kolab.org/www/drupal-7.18/sites/all/modules/views/tests/field/views_fieldapi.test
@@ -88,10 +88,9 @@ class ViewsFieldApiTestHelper extends ViewsSqlTest {
*/
function clearViewsCaches() {
// Reset views data cache.
- $cache = &drupal_static('_views_fetch_data' . '_cache');
- $recursion_protection = &drupal_static('_views_fetch_data' . '_recursion_protected');
- $cache = NULL;
- $recursion_protection = NULL;
+ drupal_static_reset('_views_fetch_data_cache');
+ drupal_static_reset('_views_fetch_data_recursion_protected');
+ drupal_static_reset('_views_fetch_data_fully_loaded');
}
}
@@ -169,10 +168,7 @@ class viewsFieldApiDataTest extends ViewsFieldApiTestHelper {
}
// Reset views data cache.
- $cache = &drupal_static('_views_fetch_data' . '_cache');
- $recursion_protection = &drupal_static('_views_fetch_data' . '_recursion_protected');
- $cache = NULL;
- $recursion_protection = NULL;
+ $this->clearViewsCaches();
}
/**
diff --git a/kolab.org/www/drupal-7.18/sites/all/modules/views/tests/handlers/views_handler_field_boolean.test b/kolab.org/www/drupal-7.18/sites/all/modules/views/tests/handlers/views_handler_field_boolean.test
index 92ec7a5..286b942 100644
--- a/kolab.org/www/drupal-7.18/sites/all/modules/views/tests/handlers/views_handler_field_boolean.test
+++ b/kolab.org/www/drupal-7.18/sites/all/modules/views/tests/handlers/views_handler_field_boolean.test
@@ -66,11 +66,43 @@ class ViewsHandlerFieldBooleanTest extends ViewsSqlTest {
$this->assertEqual('✖', $view->field['age']->advanced_render($view->result[0]));
$this->assertEqual('✔', $view->field['age']->advanced_render($view->result[1]));
- // Set a custom output format.
+ // Set a custom output format programmatically.
$view->field['age']->formats['test'] = array(t('Test-True'), t('Test-False'));
$view->field['age']->options['type'] = 'test';
$this->assertEqual(t('Test-False'), $view->field['age']->advanced_render($view->result[0]));
$this->assertEqual(t('Test-True'), $view->field['age']->advanced_render($view->result[1]));
+ // Set a custom output format through the UI using plain-text inputs.
+ $view->field['age']->options['type'] = 'custom';
+ $values = array(
+ 'false' => 'Nay',
+ 'true' => 'Yay',
+ );
+ $view->field['age']->options['type_custom_false'] = $values['false'];
+ $view->field['age']->options['type_custom_true'] = $values['true'];
+ $this->assertEqual($values['false'], $view->field['age']->advanced_render($view->result[0]));
+ $this->assertEqual($values['true'], $view->field['age']->advanced_render($view->result[1]));
+
+ // Set a custom output format through the UI using valid HTML inputs.
+ $view->field['age']->options['type'] = 'custom';
+ $values = array(
+ 'false' => '<div class="bar">Nay</div>',
+ 'true' => '<div class="foo">Yay</div>',
+ );
+ $view->field['age']->options['type_custom_false'] = $values['false'];
+ $view->field['age']->options['type_custom_true'] = $values['true'];
+ $this->assertEqual($values['false'], $view->field['age']->advanced_render($view->result[0]));
+ $this->assertEqual($values['true'], $view->field['age']->advanced_render($view->result[1]));
+
+ // Set a custom output format through the UI using unsafe inputs.
+ $view->field['age']->options['type'] = 'custom';
+ $values = array(
+ 'false' => '<script>alert("Nay");</script>',
+ 'true' => '<script>alert("Yay");</script>',
+ );
+ $view->field['age']->options['type_custom_false'] = $values['false'];
+ $view->field['age']->options['type_custom_true'] = $values['true'];
+ $this->assertNotEqual($values['false'], $view->field['age']->advanced_render($view->result[0]));
+ $this->assertNotEqual($values['true'], $view->field['age']->advanced_render($view->result[1]));
}
}
diff --git a/kolab.org/www/drupal-7.18/sites/all/modules/views/tests/node/views_node_revision_relations.test b/kolab.org/www/drupal-7.18/sites/all/modules/views/tests/node/views_node_revision_relations.test
new file mode 100644
index 0000000..6b38396
--- /dev/null
+++ b/kolab.org/www/drupal-7.18/sites/all/modules/views/tests/node/views_node_revision_relations.test
@@ -0,0 +1,177 @@
+<?php
+
+/**
+ * @file
+ * Definition of ViewsNodeRevisionRelationsTestCase.
+ */
+
+/**
+ * Tests basic node_revision table integration into views.
+ */
+class ViewsNodeRevisionRelationsTestCase extends ViewsSqlTest {
+
+ public static function getInfo() {
+ return array(
+ 'name' => 'Tests basic node_revision integration',
+ 'description' => 'Tests the integration of node_revision table of node module',
+ 'group' => 'Views Modules',
+ );
+ }
+
+ /**
+ * Create a node with revision and rest result count for both views.
+ */
+ public function testNodeRevisionRelationship() {
+ $node = $this->drupalCreateNode();
+ // Create revision of the node.
+ $node_revision = clone $node;
+ $node_revision->revision = 1;
+ node_save($node_revision);
+ $column_map = array(
+ 'vid' => 'vid',
+ 'node_revision_nid' => 'node_revision_nid',
+ 'node_node_revision_nid' => 'node_node_revision_nid',
+ );
+
+ // Here should be two rows.
+ $view_nid = $this->test_view_node_revision_nid();
+ $this->executeView($view_nid, array($node->nid));
+ $resultset_nid = array(
+ array(
+ 'vid' => '1',
+ 'node_revision_nid' => '1',
+ 'node_node_revision_nid' => '1',
+ ),
+ array(
+ 'vid' => '2',
+ 'node_revision_nid' => '1',
+ 'node_node_revision_nid' => '1',
+ ),
+ );
+ $this->assertIdenticalResultset($view_nid, $resultset_nid, $column_map);
+
+ // There should be only one row with active revision 2.
+ $view_vid = $this->test_view_node_revision_vid();
+ $this->executeView($view_vid, array($node->nid));
+ $resultset_vid = array(
+ array(
+ 'vid' => '2',
+ 'node_revision_nid' => '1',
+ 'node_node_revision_nid' => '1',
+ ),
+ );
+ $this->assertIdenticalResultset($view_vid, $resultset_vid, $column_map);
+ }
+
+ /**
+ * Test view with default join on node.nid.
+ */
+ function test_view_node_revision_nid() {
+ $view = new view();
+ $view->name = 'test_node_revision_nid';
+ $view->description = '';
+ $view->tag = '';
+ $view->base_table = 'node_revision';
+ $view->human_name = 'Test node revision nid';
+ $view->core = 7;
+ $view->api_version = '3.0';
+ $view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */
+
+ /* Display: Master */
+ $handler = $view->new_display('default', 'Master', 'default');
+ $handler->display->display_options['use_more_always'] = FALSE;
+ $handler->display->display_options['access']['type'] = 'perm';
+ $handler->display->display_options['access']['perm'] = 'view revisions';
+ $handler->display->display_options['cache']['type'] = 'none';
+ $handler->display->display_options['query']['type'] = 'views_query';
+ $handler->display->display_options['exposed_form']['type'] = 'basic';
+ $handler->display->display_options['pager']['type'] = 'full';
+ $handler->display->display_options['style_plugin'] = 'default';
+ $handler->display->display_options['row_plugin'] = 'fields';
+ /* Relationship: Content revision: Content */
+ $handler->display->display_options['relationships']['nid']['id'] = 'nid';
+ $handler->display->display_options['relationships']['nid']['table'] = 'node_revision';
+ $handler->display->display_options['relationships']['nid']['field'] = 'nid';
+ $handler->display->display_options['relationships']['nid']['label'] = 'NID';
+ $handler->display->display_options['relationships']['nid']['required'] = TRUE;
+ /* Field: Content revision: Vid */
+ $handler->display->display_options['fields']['vid']['id'] = 'vid';
+ $handler->display->display_options['fields']['vid']['table'] = 'node_revision';
+ $handler->display->display_options['fields']['vid']['field'] = 'vid';
+ /* Field: Content revision: Nid */
+ $handler->display->display_options['fields']['nid_1']['id'] = 'nid_1';
+ $handler->display->display_options['fields']['nid_1']['table'] = 'node_revision';
+ $handler->display->display_options['fields']['nid_1']['field'] = 'nid';
+ /* Field: Content: Nid */
+ $handler->display->display_options['fields']['nid']['id'] = 'nid';
+ $handler->display->display_options['fields']['nid']['table'] = 'node';
+ $handler->display->display_options['fields']['nid']['field'] = 'nid';
+ $handler->display->display_options['fields']['nid']['relationship'] = 'nid';
+ /* Contextual filter: Content revision: Nid */
+ $handler->display->display_options['arguments']['nid']['id'] = 'nid';
+ $handler->display->display_options['arguments']['nid']['table'] = 'node_revision';
+ $handler->display->display_options['arguments']['nid']['field'] = 'nid';
+ $handler->display->display_options['arguments']['nid']['default_argument_type'] = 'fixed';
+ $handler->display->display_options['arguments']['nid']['summary']['number_of_records'] = '0';
+ $handler->display->display_options['arguments']['nid']['summary']['format'] = 'default_summary';
+ $handler->display->display_options['arguments']['nid']['summary_options']['items_per_page'] = '25';
+
+ return $view;
+ }
+
+ /**
+ * Test view with default join on node.vid.
+ */
+ function test_view_node_revision_vid() {
+ $view = new view();
+ $view->name = 'test_node_revision_vid';
+ $view->description = '';
+ $view->tag = '';
+ $view->base_table = 'node_revision';
+ $view->human_name = 'Test node revision vid';
+ $view->core = 7;
+ $view->api_version = '3.0';
+ $view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */
+
+ /* Display: Master */
+ $handler = $view->new_display('default', 'Master', 'default');
+ $handler->display->display_options['use_more_always'] = FALSE;
+ $handler->display->display_options['access']['type'] = 'perm';
+ $handler->display->display_options['access']['perm'] = 'view revisions';
+ $handler->display->display_options['cache']['type'] = 'none';
+ $handler->display->display_options['query']['type'] = 'views_query';
+ $handler->display->display_options['exposed_form']['type'] = 'basic';
+ $handler->display->display_options['pager']['type'] = 'full';
+ $handler->display->display_options['style_plugin'] = 'default';
+ $handler->display->display_options['row_plugin'] = 'fields';
+ /* Relationship: Content revision: Content */
+ $handler->display->display_options['relationships']['vid']['id'] = 'vid';
+ $handler->display->display_options['relationships']['vid']['table'] = 'node_revision';
+ $handler->display->display_options['relationships']['vid']['field'] = 'vid';
+ $handler->display->display_options['relationships']['vid']['label'] = 'VID';
+ $handler->display->display_options['relationships']['vid']['required'] = TRUE;
+ /* Field: Content revision: Vid */
+ $handler->display->display_options['fields']['vid']['id'] = 'vid';
+ $handler->display->display_options['fields']['vid']['table'] = 'node_revision';
+ $handler->display->display_options['fields']['vid']['field'] = 'vid';
+ /* Field: Content revision: Nid */
+ $handler->display->display_options['fields']['nid_1']['id'] = 'nid_1';
+ $handler->display->display_options['fields']['nid_1']['table'] = 'node_revision';
+ $handler->display->display_options['fields']['nid_1']['field'] = 'nid';
+ /* Field: Content: Nid */
+ $handler->display->display_options['fields']['nid']['id'] = 'nid';
+ $handler->display->display_options['fields']['nid']['table'] = 'node';
+ $handler->display->display_options['fields']['nid']['field'] = 'nid';
+ $handler->display->display_options['fields']['nid']['relationship'] = 'vid';
+ /* Contextual filter: Content revision: Nid */
+ $handler->display->display_options['arguments']['nid']['id'] = 'nid';
+ $handler->display->display_options['arguments']['nid']['table'] = 'node_revision';
+ $handler->display->display_options['arguments']['nid']['field'] = 'nid';
+ $handler->display->display_options['arguments']['nid']['default_argument_type'] = 'fixed';
+ $handler->display->display_options['arguments']['nid']['summary']['number_of_records'] = '0';
+ $handler->display->display_options['arguments']['nid']['summary']['format'] = 'default_summary';
+ $handler->display->display_options['arguments']['nid']['summary_options']['items_per_page'] = '25';
+
+ return $view;
+ }
+}
diff --git a/kolab.org/www/drupal-7.18/sites/all/modules/views/tests/styles/views_plugin_style.test b/kolab.org/www/drupal-7.18/sites/all/modules/views/tests/styles/views_plugin_style.test
index 87f5b7d..dfc5413 100644
--- a/kolab.org/www/drupal-7.18/sites/all/modules/views/tests/styles/views_plugin_style.test
+++ b/kolab.org/www/drupal-7.18/sites/all/modules/views/tests/styles/views_plugin_style.test
@@ -8,7 +8,7 @@
/**
* Tests some general style plugin related functionality.
*/
-class ViewsPluginStyleTestCase extends ViewsSqlTest {
+class ViewsPluginStyleTestCase extends ViewsPluginStyleTestBase {
public static function getInfo() {
return array(
'name' => 'Styles',
@@ -232,20 +232,6 @@ class ViewsPluginStyleTestCase extends ViewsSqlTest {
}
}
-
- /**
- * Stores a view output in the elements.
- */
- function storeViewPreview($output) {
- $htmlDom = new DOMDocument();
- @$htmlDom->loadHTML($output);
- if ($htmlDom) {
- // It's much easier to work with simplexml than DOM, luckily enough
- // we can just simply import our DOM tree.
- $this->elements = simplexml_import_dom($htmlDom);
- }
- }
-
/**
* Tests custom css classes.
*/
diff --git a/kolab.org/www/drupal-7.18/sites/all/modules/views/tests/styles/views_plugin_style_base.test b/kolab.org/www/drupal-7.18/sites/all/modules/views/tests/styles/views_plugin_style_base.test
new file mode 100644
index 0000000..514077d
--- /dev/null
+++ b/kolab.org/www/drupal-7.18/sites/all/modules/views/tests/styles/views_plugin_style_base.test
@@ -0,0 +1,33 @@
+<?php
+
+/**
+ * @file
+ * Definition of ViewsPluginStyleTestBase.
+ */
+
+/**
+ * Provides a base foundation for testing style plugins.
+ */
+abstract class ViewsPluginStyleTestBase extends ViewsSqlTest {
+
+ /**
+ * Stores the SimpleXML representation of the output.
+ *
+ * @var SimpleXMLElement
+ */
+ protected $elements;
+
+ /**
+ * Stores a view output in the elements.
+ */
+ function storeViewPreview($output) {
+ $htmlDom = new DOMDocument();
+ @$htmlDom->loadHTML($output);
+ if ($htmlDom) {
+ // It's much easier to work with simplexml than DOM, luckily enough
+ // we can just simply import our DOM tree.
+ $this->elements = simplexml_import_dom($htmlDom);
+ }
+ }
+
+}
diff --git a/kolab.org/www/drupal-7.18/sites/all/modules/views/tests/styles/views_plugin_style_jump_menu.test b/kolab.org/www/drupal-7.18/sites/all/modules/views/tests/styles/views_plugin_style_jump_menu.test
index 9a53bfc..dd4eca0 100644
--- a/kolab.org/www/drupal-7.18/sites/all/modules/views/tests/styles/views_plugin_style_jump_menu.test
+++ b/kolab.org/www/drupal-7.18/sites/all/modules/views/tests/styles/views_plugin_style_jump_menu.test
@@ -9,6 +9,14 @@
* Tests jump menu style functionality.
*/
class viewsPluginStyleJumpMenuTest extends ViewsSqlTest {
+
+ /**
+ * Stores all created nodes.
+ *
+ * @var array
+ */
+ var $nodes;
+
public static function getInfo() {
return array(
'name' => 'Jump menu',
diff --git a/kolab.org/www/drupal-7.18/sites/all/modules/views/tests/styles/views_plugin_style_mapping.test b/kolab.org/www/drupal-7.18/sites/all/modules/views/tests/styles/views_plugin_style_mapping.test
new file mode 100644
index 0000000..5785075
--- /dev/null
+++ b/kolab.org/www/drupal-7.18/sites/all/modules/views/tests/styles/views_plugin_style_mapping.test
@@ -0,0 +1,144 @@
+<?php
+
+/**
+ * @file
+ * Definition of ViewsPluginStyleMappingTest.
+ */
+
+/**
+ * Tests the default/mapping row style.
+ */
+class ViewsPluginStyleMappingTest extends ViewsPluginStyleTestBase {
+
+ public static function getInfo() {
+ return array(
+ 'name' => 'Style: Mapping',
+ 'description' => 'Test mapping style functionality.',
+ 'group' => 'Views Plugins',
+ );
+ }
+
+ public function setUp() {
+ parent::setUp();
+
+ // Reset the plugin data.
+ views_fetch_plugin_data(NULL, NULL, TRUE);
+ }
+
+ protected function viewsPlugins() {
+ return array(
+ 'style' => array(
+ 'test_mapping' => array(
+ 'title' => t('Field mapping'),
+ 'help' => t('Maps specific fields to specific purposes.'),
+ 'handler' => 'views_test_plugin_style_test_mapping',
+ 'path' => drupal_get_path('module', 'views_test') . '/test_plugins',
+ 'theme' => 'views_view_mapping_test',
+ 'theme path' => drupal_get_path('module', 'views_test'),
+ 'theme file' => 'views_test.module',
+ 'uses row plugin' => FALSE,
+ 'uses fields' => TRUE,
+ 'uses options' => TRUE,
+ 'uses grouping' => FALSE,
+ 'type' => 'normal',
+ ),
+ ),
+ );
+ }
+
+ /**
+ * Overrides ViewsTestCase::getBasicView().
+ */
+ protected function getBasicView() {
+ $view = parent::getBasicView();
+ $view->display['default']->handler->override_option('style_plugin', 'test_mapping');
+ $view->display['default']->handler->override_option('style_options', array(
+ 'mapping' => array(
+ 'name_field' => 'name',
+ 'numeric_field' => array(
+ 'age',
+ ),
+ 'title_field' => 'name',
+ 'toggle_numeric_field' => TRUE,
+ 'toggle_title_field' => TRUE,
+ ),
+ ));
+ $view->display['default']->handler->override_option('fields', array(
+ 'age' => array(
+ 'id' => 'age',
+ 'table' => 'views_test',
+ 'field' => 'age',
+ 'relationship' => 'none',
+ ),
+ 'name' => array(
+ 'id' => 'name',
+ 'table' => 'views_test',
+ 'field' => 'name',
+ 'relationship' => 'none',
+ ),
+ 'job' => array(
+ 'id' => 'job',
+ 'table' => 'views_test',
+ 'field' => 'job',
+ 'relationship' => 'none',
+ ),
+ ));
+ return $view;
+ }
+
+ /**
+ * Verifies that the fields were mapped correctly.
+ */
+ public function testMappedOutput() {
+ $view = $this->getBasicView();
+ $output = $this->mappedOutputHelper($view);
+ $this->assertTrue(strpos($output, 'job') === FALSE, 'The job field is added to the view but not in the mapping.');
+
+ $view = $this->getBasicView();
+ $view->display['default']->display_options['style_options']['mapping']['name_field'] = 'job';
+ $output = $this->mappedOutputHelper($view);
+ $this->assertTrue(strpos($output, 'job') !== FALSE, 'The job field is added to the view and is in the mapping.');
+ }
+
+ /**
+ * Tests the mapping of fields.
+ *
+ * @param view $view
+ * The view to test.
+ *
+ * @return string
+ * The view rendered as HTML.
+ */
+ protected function mappedOutputHelper($view) {
+ $rendered_output = $view->preview();
+ $this->storeViewPreview($rendered_output);
+ $rows = $this->elements->body->div->div->div;
+ $data_set = $this->dataSet();
+
+ $count = 0;
+ foreach ($rows as $row) {
+ $attributes = $row->attributes();
+ $class = (string) $attributes['class'][0];
+ $this->assertTrue(strpos($class, 'views-row-mapping-test') !== FALSE, 'Make sure that each row has the correct CSS class.');
+
+ foreach ($row->div as $field) {
+ // Split up the field-level class, the first part is the mapping name
+ // and the second is the field ID.
+ $field_attributes = $field->attributes();
+ $name = strtok((string) $field_attributes['class'][0], '-');
+ $field_id = strtok('-');
+
+ // The expected result is the mapping name and the field value,
+ // separated by ':'.
+ $expected_result = $name . ':' . $data_set[$count][$field_id];
+ $actual_result = (string) $field;
+ $this->assertIdentical($expected_result, $actual_result, format_string('The fields were mapped successfully: %name => %field_id', array('%name' => $name, '%field_id' => $field_id)));
+ }
+
+ $count++;
+ }
+
+ return $rendered_output;
+ }
+
+}
diff --git a/kolab.org/www/drupal-7.18/sites/all/modules/views/tests/styles/views_plugin_style_unformatted.test b/kolab.org/www/drupal-7.18/sites/all/modules/views/tests/styles/views_plugin_style_unformatted.test
index 20b7b4d..0c0e882 100644
--- a/kolab.org/www/drupal-7.18/sites/all/modules/views/tests/styles/views_plugin_style_unformatted.test
+++ b/kolab.org/www/drupal-7.18/sites/all/modules/views/tests/styles/views_plugin_style_unformatted.test
@@ -8,14 +8,7 @@
/**
* Tests the default/unformatted row style.
*/
-class ViewsPluginStyleUnformattedTestCase extends ViewsSqlTest {
-
- /**
- * Stores all created nodes.
- *
- * @var array
- */
- var $nodes;
+class ViewsPluginStyleUnformattedTestCase extends ViewsPluginStyleTestBase {
public static function getInfo() {
return array(
@@ -26,19 +19,6 @@ class ViewsPluginStyleUnformattedTestCase extends ViewsSqlTest {
}
/**
- * Stores a view output in the elements.
- */
- function storeViewPreview($output) {
- $htmlDom = new DOMDocument();
- @$htmlDom->loadHTML($output);
- if ($htmlDom) {
- // It's much easier to work with simplexml than DOM, luckily enough
- // we can just simply import our DOM tree.
- $this->elements = simplexml_import_dom($htmlDom);
- }
- }
-
- /**
* Take sure that the default css classes works as expected.
*/
function testDefaultRowClasses() {
diff --git a/kolab.org/www/drupal-7.18/sites/all/modules/views/tests/test_plugins/views_test_plugin_style_test_mapping.inc b/kolab.org/www/drupal-7.18/sites/all/modules/views/tests/test_plugins/views_test_plugin_style_test_mapping.inc
new file mode 100644
index 0000000..b926787
--- /dev/null
+++ b/kolab.org/www/drupal-7.18/sites/all/modules/views/tests/test_plugins/views_test_plugin_style_test_mapping.inc
@@ -0,0 +1,52 @@
+<?php
+
+/**
+ * @file
+ * Definition of views_test_plugin_style_test_mapping.
+ */
+
+/**
+ * Provides a test mapping style plugin.
+ */
+class views_test_plugin_style_test_mapping extends views_plugin_style_mapping {
+
+ /**
+ * Overrides views_plugin_style_mapping::define_mapping().
+ */
+ protected function define_mapping() {
+ return array(
+ 'title_field' => array(
+ '#title' => t('Title field'),
+ '#description' => t('Choose the field with the custom title.'),
+ '#toggle' => TRUE,
+ '#required' => TRUE,
+ ),
+ 'name_field' => array(
+ '#title' => t('Name field'),
+ '#description' => t('Choose the field with the custom name.'),
+ ),
+ 'numeric_field' => array(
+ '#title' => t('Numeric field'),
+ '#description' => t('Select one or more numeric fields.'),
+ '#multiple' => TRUE,
+ '#toggle' => TRUE,
+ '#filter' => 'filter_numeric_fields',
+ '#required' => TRUE,
+ ),
+ );
+ }
+
+ /**
+ * Restricts the allowed fields to only numeric fields.
+ *
+ * @param array $fields
+ * An array of field labels, keyed by the field ID.
+ */
+ protected function filter_numeric_fields(&$fields) {
+ foreach ($this->view->field as $id => $field) {
+ if (!($field instanceof views_handler_field_numeric)) {
+ unset($fields[$id]);
+ }
+ }
+ }
+}
diff --git a/kolab.org/www/drupal-7.18/sites/all/modules/views/tests/views_test.info b/kolab.org/www/drupal-7.18/sites/all/modules/views/tests/views_test.info
index c41ad54..23bd884 100644
--- a/kolab.org/www/drupal-7.18/sites/all/modules/views/tests/views_test.info
+++ b/kolab.org/www/drupal-7.18/sites/all/modules/views/tests/views_test.info
@@ -5,9 +5,9 @@ core = 7.x
dependencies[] = views
hidden = TRUE
-; Information added by drupal.org packaging script on 2012-08-24
-version = "7.x-3.5"
+; Information added by drupal.org packaging script on 2013-04-09
+version = "7.x-3.7"
core = "7.x"
project = "views"
-datestamp = "1345829394"
+datestamp = "1365499236"
diff --git a/kolab.org/www/drupal-7.18/sites/all/modules/views/tests/views_test.module b/kolab.org/www/drupal-7.18/sites/all/modules/views/tests/views_test.module
index f6026b8..7adcf43 100644
--- a/kolab.org/www/drupal-7.18/sites/all/modules/views/tests/views_test.module
+++ b/kolab.org/www/drupal-7.18/sites/all/modules/views/tests/views_test.module
@@ -59,3 +59,59 @@ function views_test_views_pre_render(&$view) {
$view->pre_render_called = TRUE;
}
}
+
+/**
+ * Implements hook_preprocess_HOOK() for theme_views_view_mapping_test().
+ */
+function template_preprocess_views_view_mapping_test(&$variables) {
+ $variables['element'] = array();
+
+ foreach ($variables['rows'] as $delta => $row) {
+ $fields = array();
+ foreach ($variables['options']['mapping'] as $type => $field_names) {
+ if (!is_array($field_names)) {
+ $field_names = array($field_names);
+ }
+ foreach ($field_names as $field_name) {
+ if ($value = $variables['view']->style_plugin->get_field($delta, $field_name)) {
+ $fields[$type . '-' . $field_name] = $type . ':' . $value;
+ }
+ }
+ }
+
+ // If there are no fields in this row, skip to the next one.
+ if (empty($fields)) {
+ continue;
+ }
+
+ // Build a container for the row.
+ $variables['element'][$delta] = array(
+ '#type' => 'container',
+ '#attributes' => array(
+ 'class' => array(
+ 'views-row-mapping-test',
+ ),
+ ),
+ );
+
+ // Add each field to the row.
+ foreach ($fields as $key => $render) {
+ $variables['element'][$delta][$key] = array(
+ '#children' => $render,
+ '#type' => 'container',
+ '#attributes' => array(
+ 'class' => array(
+ $key,
+ ),
+ ),
+ );
+ }
+ }
+}
+
+/**
+ * Returns HTML for the Mapping Test style.
+ */
+function theme_views_view_mapping_test($variables) {
+ return drupal_render($variables['element']);
+}
diff --git a/kolab.org/www/drupal-7.18/sites/all/modules/views/tests/views_translatable.test b/kolab.org/www/drupal-7.18/sites/all/modules/views/tests/views_translatable.test
index 0cb27e4..983a97e 100644
--- a/kolab.org/www/drupal-7.18/sites/all/modules/views/tests/views_translatable.test
+++ b/kolab.org/www/drupal-7.18/sites/all/modules/views/tests/views_translatable.test
@@ -114,7 +114,6 @@ class ViewsTranslatableTest extends ViewsSqlTest {
'more1' => array('use_more_text'),
'Reset1' => array('exposed_form', 'reset_button_label'),
'Offset1' => array('pager', 'expose', 'offset_label'),
- 'Master1' => array('title'),
'title1' => array('title'),
'Tag first1' => array('pager', 'tags', 'first'),
'Tag prev1' => array('pager', 'tags', 'previous'),
@@ -124,9 +123,23 @@ class ViewsTranslatableTest extends ViewsSqlTest {
'fieldlabel1' => array('field', 'node', 'nid', 'label'),
'filterlabel1' => array('filter', 'node', 'nid', 'expose', 'label'),
'- All -' => array('pager', 'expose', 'items_per_page_options_all_label'),
+ 'Header1' => array('header', 'views', 'area', 'content'),
+ );
+
+ $formats = array(
+ 'Header1' => 'filtered_html',
);
+
foreach ($translatables as $translatable) {
$this->assertEqual($translatable['keys'], $this->string_keys[$translatable['value']]);
+
+ // Make sure the format is correct.
+ if (isset($formats[$translatable['value']])) {
+ $this->assertEqual($translatable['format'], $formats[$translatable['value']]);
+ }
+ else {
+ $this->assertNull($translatable['format'], 'No format defined');
+ }
}
}
}
@@ -169,6 +182,14 @@ class ViewsTranslatableTest extends ViewsSqlTest {
$handler->display->display_options['pager']['options']['expose']['offset_label'] = 'Offset1';
$handler->display->display_options['style_plugin'] = 'default';
$handler->display->display_options['row_plugin'] = 'fields';
+ /* Global: Header */
+ $handler->display->display_options['header']['area']['id'] = 'area';
+ $handler->display->display_options['header']['area']['table'] = 'views';
+ $handler->display->display_options['header']['area']['field'] = 'area';
+ $handler->display->display_options['header']['area']['empty'] = FALSE;
+ $handler->display->display_options['header']['area']['content'] = 'Header1';
+ $handler->display->display_options['header']['area']['format'] = 'filtered_html';
+ $handler->display->display_options['header']['area']['tokenize'] = 0;
/* Field: Content: Nid */
$handler->display->display_options['fields']['nid']['id'] = 'nid';
$handler->display->display_options['fields']['nid']['table'] = 'node';
diff --git a/kolab.org/www/drupal-7.18/sites/all/modules/views/theme/theme.inc b/kolab.org/www/drupal-7.18/sites/all/modules/views/theme/theme.inc
index 52598d5..e7f7a15 100644
--- a/kolab.org/www/drupal-7.18/sites/all/modules/views/theme/theme.inc
+++ b/kolab.org/www/drupal-7.18/sites/all/modules/views/theme/theme.inc
@@ -649,8 +649,17 @@ function template_preprocess_views_view_table(&$vars) {
}
$vars['classes_array'][] = 'cols-'. count($vars['header']);
+ // Add the summary to the list if set.
if (!empty($handler->options['summary'])) {
- $vars['attributes_array'] = array('summary' => $handler->options['summary']);
+ $vars['attributes_array'] = array('summary' => filter_xss_admin($handler->options['summary']));
+ }
+
+ // Add the caption to the list if set.
+ if (!empty($handler->options['caption'])) {
+ $vars['caption'] = filter_xss_admin($handler->options['caption']);
+ }
+ else {
+ $vars['caption'] = '';
}
}
@@ -762,8 +771,18 @@ function template_preprocess_views_view_grid(&$vars) {
}
$vars['rows'] = $rows;
$vars['class'] = 'views-view-grid cols-' . $columns;
+
+ // Add the summary to the list if set.
if (!empty($handler->options['summary'])) {
- $vars['attributes_array'] = array('summary' => $handler->options['summary']);
+ $vars['attributes_array'] = array('summary' => filter_xss_admin($handler->options['summary']));
+ }
+
+ // Add the caption to the list if set.
+ if (!empty($handler->options['caption'])) {
+ $vars['caption'] = filter_xss_admin($handler->options['caption']);
+ }
+ else {
+ $vars['caption'] = '';
}
}
@@ -1021,19 +1040,13 @@ function theme_views_mini_pager($vars) {
$tags = $vars['tags'];
$element = $vars['element'];
$parameters = $vars['parameters'];
- $quantity = $vars['quantity'];
- // Calculate various markers within this pager piece:
- // Middle is used to "center" pages around the current page.
- $pager_middle = ceil($quantity / 2);
// current is the page we are currently paged to
$pager_current = $pager_page_array[$element] + 1;
// max is the maximum page number
$pager_max = $pager_total[$element];
// End of marker calculations.
-
-
if ($pager_total[$element] > 1) {
$li_previous = theme('pager_previous',
diff --git a/kolab.org/www/drupal-7.18/sites/all/modules/views/theme/views-view-grid.tpl.php b/kolab.org/www/drupal-7.18/sites/all/modules/views/theme/views-view-grid.tpl.php
index cd8d39e..09f807a 100644
--- a/kolab.org/www/drupal-7.18/sites/all/modules/views/theme/views-view-grid.tpl.php
+++ b/kolab.org/www/drupal-7.18/sites/all/modules/views/theme/views-view-grid.tpl.php
@@ -14,6 +14,10 @@
<h3><?php print $title; ?></h3>
<?php endif; ?>
<table class="<?php print $class; ?>"<?php print $attributes; ?>>
+ <?php if (!empty($caption)) : ?>
+ <caption><?php print $caption; ?></caption>
+ <?php endif; ?>
+
<tbody>
<?php foreach ($rows as $row_number => $columns): ?>
<tr <?php if ($row_classes[$row_number]) { print 'class="' . $row_classes[$row_number] .'"'; } ?>>
diff --git a/kolab.org/www/drupal-7.18/sites/all/modules/views/theme/views-view-table.tpl.php b/kolab.org/www/drupal-7.18/sites/all/modules/views/theme/views-view-table.tpl.php
index a9abcd3..4fec9fa 100644
--- a/kolab.org/www/drupal-7.18/sites/all/modules/views/theme/views-view-table.tpl.php
+++ b/kolab.org/www/drupal-7.18/sites/all/modules/views/theme/views-view-table.tpl.php
@@ -6,6 +6,7 @@
*
* - $title : The title of this group of rows. May be empty.
* - $header: An array of header labels keyed by field id.
+ * - $caption: The caption for this table. May be empty.
* - $header_classes: An array of header classes keyed by field id.
* - $fields: An array of CSS IDs to use for each field id.
* - $classes: A class or classes to apply to the table, based on settings.
@@ -19,8 +20,8 @@
*/
?>
<table <?php if ($classes) { print 'class="'. $classes . '" '; } ?><?php print $attributes; ?>>
- <?php if (!empty($title)) : ?>
- <caption><?php print $title; ?></caption>
+ <?php if (!empty($title) || !empty($caption)) : ?>
+ <caption><?php print $caption . $title; ?></caption>
<?php endif; ?>
<?php if (!empty($header)) : ?>
<thead>
diff --git a/kolab.org/www/drupal-7.18/sites/all/modules/views/theme/views-view-unformatted.tpl.php b/kolab.org/www/drupal-7.18/sites/all/modules/views/theme/views-view-unformatted.tpl.php
index 4f4558e..f1cccb8 100644
--- a/kolab.org/www/drupal-7.18/sites/all/modules/views/theme/views-view-unformatted.tpl.php
+++ b/kolab.org/www/drupal-7.18/sites/all/modules/views/theme/views-view-unformatted.tpl.php
@@ -11,7 +11,7 @@
<h3><?php print $title; ?></h3>
<?php endif; ?>
<?php foreach ($rows as $id => $row): ?>
- <div <?php if ($classes_array[$id]) { print 'class="' . $classes_array[$id] .'"'; } ?>>
+ <div<?php if ($classes_array[$id]) { print ' class="' . $classes_array[$id] .'"'; } ?>>
<?php print $row; ?>
</div>
<?php endforeach; ?>
diff --git a/kolab.org/www/drupal-7.18/sites/all/modules/views/views.api.php b/kolab.org/www/drupal-7.18/sites/all/modules/views/views.api.php
index f41c565..ba9b326 100644
--- a/kolab.org/www/drupal-7.18/sites/all/modules/views/views.api.php
+++ b/kolab.org/www/drupal-7.18/sites/all/modules/views/views.api.php
@@ -482,13 +482,15 @@ function hook_views_data_alter(&$data) {
$data['users']['example_field'] = array(
'title' => t('Example field'),
'help' => t('Some example content that references a user'),
- 'handler' => 'hook_handlers_field_example_field',
+ 'field' => array(
+ 'handler' => 'modulename_handler_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';
+ $data['node']['title']['field']['handler'] = 'modulename_handler_field_node_title';
// This example adds a relationship to table {foo}, so that 'foo' views can
// add this table using a relationship. Because we don't want to write over
@@ -663,10 +665,10 @@ function hook_views_api() {
* 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.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 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 (FALSE) or disabled (TRUE) by default.
diff --git a/kolab.org/www/drupal-7.18/sites/all/modules/views/views.info b/kolab.org/www/drupal-7.18/sites/all/modules/views/views.info
index 3bd7470..50d8148 100644
--- a/kolab.org/www/drupal-7.18/sites/all/modules/views/views.info
+++ b/kolab.org/www/drupal-7.18/sites/all/modules/views/views.info
@@ -171,6 +171,9 @@ files[] = modules/taxonomy/views_handler_filter_vocabulary_machine_name.inc
files[] = modules/taxonomy/views_handler_relationship_node_term_data.inc
files[] = modules/taxonomy/views_plugin_argument_validate_taxonomy_term.inc
files[] = modules/taxonomy/views_plugin_argument_default_taxonomy_tid.inc
+files[] = modules/tracker/views_handler_argument_tracker_comment_user_uid.inc
+files[] = modules/tracker/views_handler_filter_tracker_comment_user_uid.inc
+files[] = modules/tracker/views_handler_filter_tracker_boolean_operator.inc
files[] = modules/system/views_handler_filter_system_type.inc
files[] = modules/translation/views_handler_argument_node_tnid.inc
files[] = modules/translation/views_handler_field_node_link_translate.inc
@@ -242,6 +245,7 @@ files[] = plugins/views_plugin_style_default.inc
files[] = plugins/views_plugin_style_grid.inc
files[] = plugins/views_plugin_style_list.inc
files[] = plugins/views_plugin_style_jump_menu.inc
+files[] = plugins/views_plugin_style_mapping.inc
files[] = plugins/views_plugin_style_rss.inc
files[] = plugins/views_plugin_style_summary.inc
files[] = plugins/views_plugin_style_summary_jump_menu.inc
@@ -272,9 +276,12 @@ files[] = tests/handlers/views_handler_sort_date.test
files[] = tests/handlers/views_handler_sort.test
files[] = tests/test_plugins/views_test_plugin_access_test_dynamic.inc
files[] = tests/test_plugins/views_test_plugin_access_test_static.inc
+files[] = tests/test_plugins/views_test_plugin_style_test_mapping.inc
files[] = tests/plugins/views_plugin_display.test
files[] = tests/styles/views_plugin_style_jump_menu.test
files[] = tests/styles/views_plugin_style.test
+files[] = tests/styles/views_plugin_style_base.test
+files[] = tests/styles/views_plugin_style_mapping.test
files[] = tests/styles/views_plugin_style_unformatted.test
files[] = tests/views_access.test
files[] = tests/views_analyze.test
@@ -295,6 +302,7 @@ files[] = tests/views_upgrade.test
files[] = tests/views_test.views_default.inc
files[] = tests/comment/views_handler_argument_comment_user_uid.test
files[] = tests/comment/views_handler_filter_comment_user_uid.test
+files[] = tests/node/views_node_revision_relations.test
files[] = tests/taxonomy/views_handler_relationship_node_term_data.test
files[] = tests/user/views_handler_field_user_name.test
files[] = tests/user/views_user_argument_default.test
@@ -304,9 +312,9 @@ files[] = tests/views_cache.test
files[] = tests/views_view.test
files[] = tests/views_ui.test
-; Information added by drupal.org packaging script on 2012-08-24
-version = "7.x-3.5"
+; Information added by drupal.org packaging script on 2013-04-09
+version = "7.x-3.7"
core = "7.x"
project = "views"
-datestamp = "1345829394"
+datestamp = "1365499236"
diff --git a/kolab.org/www/drupal-7.18/sites/all/modules/views/views.module b/kolab.org/www/drupal-7.18/sites/all/modules/views/views.module
index 3b9eff1..fc427f4 100644
--- a/kolab.org/www/drupal-7.18/sites/all/modules/views/views.module
+++ b/kolab.org/www/drupal-7.18/sites/all/modules/views/views.module
@@ -69,7 +69,7 @@ function views_theme($existing, $type, $theme, $path) {
// Our extra version of pager from pager.inc
$hooks['views_mini_pager'] = $base + array(
- 'variables' => array('tags' => array(), 'quantity' => 10, 'element' => 0, 'parameters' => array()),
+ 'variables' => array('tags' => array(), 'element' => 0, 'parameters' => array()),
'pattern' => 'views_mini_pager__',
);
@@ -341,10 +341,12 @@ function views_permission() {
'administer views' => array(
'title' => t('Administer views'),
'description' => t('Access the views administration pages.'),
+ 'restrict access' => TRUE,
),
'access all views' => array(
'title' => t('Bypass views access control'),
'description' => t('Bypass access control when accessing views.'),
+ 'restrict access' => TRUE,
),
);
}
@@ -373,7 +375,7 @@ function views_menu() {
'page callback' => 'views_ajax_autocomplete_user',
'theme callback' => 'ajax_base_page_theme',
'access callback' => 'user_access',
- 'access arguments' => array('access content'),
+ 'access arguments' => array('access user profiles'),
'type' => MENU_CALLBACK,
'file' => 'includes/ajax.inc',
);
@@ -2511,6 +2513,10 @@ if (!function_exists('system_views_api')) {
function system_views_api() { return views_views_api(); }
}
+if (!function_exists('tracker_views_api')) {
+ function tracker_views_api() { return views_views_api(); }
+}
+
if (!function_exists('taxonomy_views_api')) {
function taxonomy_views_api() { return views_views_api(); }
}
diff --git a/kolab.org/www/drupal-7.18/sites/all/modules/views/views_ui.info b/kolab.org/www/drupal-7.18/sites/all/modules/views/views_ui.info
index 74d9e16..95ea014 100644
--- a/kolab.org/www/drupal-7.18/sites/all/modules/views/views_ui.info
+++ b/kolab.org/www/drupal-7.18/sites/all/modules/views/views_ui.info
@@ -7,9 +7,9 @@ dependencies[] = views
files[] = views_ui.module
files[] = plugins/views_wizard/views_ui_base_views_wizard.class.php
-; Information added by drupal.org packaging script on 2012-08-24
-version = "7.x-3.5"
+; Information added by drupal.org packaging script on 2013-04-09
+version = "7.x-3.7"
core = "7.x"
project = "views"
-datestamp = "1345829394"
+datestamp = "1365499236"
diff --git a/kolab.org/www/drupal-7.18/sites/all/modules/views/views_ui.module b/kolab.org/www/drupal-7.18/sites/all/modules/views/views_ui.module
index 8182714..5366f77 100644
--- a/kolab.org/www/drupal-7.18/sites/all/modules/views/views_ui.module
+++ b/kolab.org/www/drupal-7.18/sites/all/modules/views/views_ui.module
@@ -845,7 +845,8 @@ function _views_ui_get_displays_list($view) {
function views_ui_library_alter(&$libraries, $module) {
if ($module == 'system' && isset($libraries['ui.dialog'])) {
- if (version_compare($libraries['ui.dialog']['version'], '1.7.2', '>=')) {
+ // Only apply the fix, if we don't have an up to date jQueryUI version.
+ if (version_compare($libraries['ui.dialog']['version'], '1.7.2', '>=') && version_compare($libraries['ui.dialog']['version'], '1.10.0', '<')) {
$libraries['ui.dialog']['js'][drupal_get_path('module', 'views') . '/js/jquery.ui.dialog.patch.js'] = array();
}
}