summaryrefslogtreecommitdiff
path: root/kolab.org/www/drupal-7.15/sites/all/modules/views/plugins
diff options
context:
space:
mode:
Diffstat (limited to 'kolab.org/www/drupal-7.15/sites/all/modules/views/plugins')
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/plugins/views_plugin_access.inc19
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/plugins/views_plugin_access_none.inc7
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/plugins/views_plugin_access_perm.inc9
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/plugins/views_plugin_access_role.inc7
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/plugins/views_plugin_argument_default.inc11
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/plugins/views_plugin_argument_default_fixed.inc3
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/plugins/views_plugin_argument_default_php.inc3
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/plugins/views_plugin_argument_default_raw.inc16
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/plugins/views_plugin_argument_validate.inc8
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/plugins/views_plugin_argument_validate_numeric.inc1
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/plugins/views_plugin_argument_validate_php.inc1
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/plugins/views_plugin_cache.inc65
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/plugins/views_plugin_cache_none.inc7
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/plugins/views_plugin_cache_time.inc59
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/plugins/views_plugin_display.inc150
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/plugins/views_plugin_display_attachment.inc9
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/plugins/views_plugin_display_block.inc43
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/plugins/views_plugin_display_default.inc2
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/plugins/views_plugin_display_embed.inc14
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/plugins/views_plugin_display_extender.inc14
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/plugins/views_plugin_display_feed.inc1
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/plugins/views_plugin_display_page.inc12
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/plugins/views_plugin_exposed_form.inc25
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/plugins/views_plugin_exposed_form_basic.inc9
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/plugins/views_plugin_exposed_form_input_required.inc11
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/plugins/views_plugin_localization.inc14
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/plugins/views_plugin_pager.inc19
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/plugins/views_plugin_pager_full.inc75
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/plugins/views_plugin_pager_mini.inc5
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/plugins/views_plugin_pager_none.inc5
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/plugins/views_plugin_pager_some.inc5
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/plugins/views_plugin_query.inc20
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/plugins/views_plugin_query_default.inc134
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/plugins/views_plugin_row.inc19
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/plugins/views_plugin_row_fields.inc8
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/plugins/views_plugin_row_rss_fields.inc180
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/plugins/views_plugin_style.inc55
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/plugins/views_plugin_style_default.inc1
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/plugins/views_plugin_style_grid.inc3
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/plugins/views_plugin_style_jump_menu.inc5
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/plugins/views_plugin_style_list.inc1
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/plugins/views_plugin_style_rss.inc16
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/plugins/views_plugin_style_summary.inc1
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/plugins/views_plugin_style_summary_jump_menu.inc7
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/plugins/views_plugin_style_summary_unformatted.inc3
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/plugins/views_plugin_style_table.inc7
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/plugins/views_wizard/views_ui_base_views_wizard.class.php18
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/plugins/views_wizard/views_ui_comment_views_wizard.class.php8
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/plugins/views_wizard/views_ui_file_managed_views_wizard.class.php8
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/plugins/views_wizard/views_ui_node_revision_views_wizard.class.php18
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/plugins/views_wizard/views_ui_node_views_wizard.class.php8
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/plugins/views_wizard/views_ui_taxonomy_term_views_wizard.class.php8
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/plugins/views_wizard/views_ui_users_views_wizard.class.php8
53 files changed, 1008 insertions, 157 deletions
diff --git a/kolab.org/www/drupal-7.15/sites/all/modules/views/plugins/views_plugin_access.inc b/kolab.org/www/drupal-7.15/sites/all/modules/views/plugins/views_plugin_access.inc
index b3fbb29..7f80d9b 100644
--- a/kolab.org/www/drupal-7.15/sites/all/modules/views/plugins/views_plugin_access.inc
+++ b/kolab.org/www/drupal-7.15/sites/all/modules/views/plugins/views_plugin_access.inc
@@ -1,9 +1,20 @@
<?php
/**
- * The base plugin to handle access control.
+ * @file
+ * Definition of views_plugin_access.
+ */
+
+/**
+ * @defgroup views_access_plugins Views access plugins
+ * @{
+ * @todo.
*
- * @ingroup views_access_plugins
+ * @see hook_views_plugins()
+ */
+
+/**
+ * The base plugin to handle access control.
*/
class views_plugin_access extends views_plugin {
/**
@@ -79,3 +90,7 @@ class views_plugin_access extends views_plugin {
return TRUE;
}
}
+
+/**
+ * @}
+ */
diff --git a/kolab.org/www/drupal-7.15/sites/all/modules/views/plugins/views_plugin_access_none.inc b/kolab.org/www/drupal-7.15/sites/all/modules/views/plugins/views_plugin_access_none.inc
index be563a2..d69fe8e 100644
--- a/kolab.org/www/drupal-7.15/sites/all/modules/views/plugins/views_plugin_access_none.inc
+++ b/kolab.org/www/drupal-7.15/sites/all/modules/views/plugins/views_plugin_access_none.inc
@@ -1,7 +1,14 @@
<?php
/**
+ * @file
+ * Definition of views_plugin_access_none.
+ */
+
+/**
* Access plugin that provides no access control at all.
+ *
+ * @ingroup views_access_plugins
*/
class views_plugin_access_none extends views_plugin_access {
function summary_title() {
diff --git a/kolab.org/www/drupal-7.15/sites/all/modules/views/plugins/views_plugin_access_perm.inc b/kolab.org/www/drupal-7.15/sites/all/modules/views/plugins/views_plugin_access_perm.inc
index c1b473b..7279d7d 100644
--- a/kolab.org/www/drupal-7.15/sites/all/modules/views/plugins/views_plugin_access_perm.inc
+++ b/kolab.org/www/drupal-7.15/sites/all/modules/views/plugins/views_plugin_access_perm.inc
@@ -1,7 +1,14 @@
<?php
/**
+ * @file
+ * Definition of views_plugin_access_perm.
+ */
+
+/**
* Access plugin that provides permission-based access control.
+ *
+ * @ingroup views_access_plugins
*/
class views_plugin_access_perm extends views_plugin_access {
function access($account) {
@@ -42,7 +49,7 @@ class views_plugin_access_perm extends views_plugin_access {
}
}
- asort($perms);
+ ksort($perms);
$form['perm'] = array(
'#type' => 'select',
diff --git a/kolab.org/www/drupal-7.15/sites/all/modules/views/plugins/views_plugin_access_role.inc b/kolab.org/www/drupal-7.15/sites/all/modules/views/plugins/views_plugin_access_role.inc
index 2ed1aff..b06812e 100644
--- a/kolab.org/www/drupal-7.15/sites/all/modules/views/plugins/views_plugin_access_role.inc
+++ b/kolab.org/www/drupal-7.15/sites/all/modules/views/plugins/views_plugin_access_role.inc
@@ -1,7 +1,14 @@
<?php
/**
+ * @file
+ * Definition of views_plugin_access_role.
+ */
+
+/**
* Access plugin that provides role-based access control.
+ *
+ * @ingroup views_access_plugins
*/
class views_plugin_access_role extends views_plugin_access {
function access($account) {
diff --git a/kolab.org/www/drupal-7.15/sites/all/modules/views/plugins/views_plugin_argument_default.inc b/kolab.org/www/drupal-7.15/sites/all/modules/views/plugins/views_plugin_argument_default.inc
index 7132afa..2b87730 100644
--- a/kolab.org/www/drupal-7.15/sites/all/modules/views/plugins/views_plugin_argument_default.inc
+++ b/kolab.org/www/drupal-7.15/sites/all/modules/views/plugins/views_plugin_argument_default.inc
@@ -1,17 +1,16 @@
<?php
+
/**
* @file
- * Contains the fixed argument default plugin.
+ * Definition of views_plugin_argument_default.
*/
/**
- * @defgroup views_argument_default_plugins Views' argument default plugins
+ * @defgroup views_argument_default_plugins Views argument default plugins
* @{
+ * Allow specialized methods of filling in arguments when they aren't provided.
*
- * Allow specialized methods of filling in arguments when they aren't
- * provided.
- *
- * @see hook_views_plugins
+ * @see hook_views_plugins()
*/
/**
diff --git a/kolab.org/www/drupal-7.15/sites/all/modules/views/plugins/views_plugin_argument_default_fixed.inc b/kolab.org/www/drupal-7.15/sites/all/modules/views/plugins/views_plugin_argument_default_fixed.inc
index fba63ec..38ede34 100644
--- a/kolab.org/www/drupal-7.15/sites/all/modules/views/plugins/views_plugin_argument_default_fixed.inc
+++ b/kolab.org/www/drupal-7.15/sites/all/modules/views/plugins/views_plugin_argument_default_fixed.inc
@@ -1,4 +1,5 @@
<?php
+
/**
* @file
* Contains the fixed argument default plugin.
@@ -6,6 +7,8 @@
/**
* The fixed argument default handler.
+ *
+ * @ingroup views_argument_default_plugins
*/
class views_plugin_argument_default_fixed extends views_plugin_argument_default {
function option_definition() {
diff --git a/kolab.org/www/drupal-7.15/sites/all/modules/views/plugins/views_plugin_argument_default_php.inc b/kolab.org/www/drupal-7.15/sites/all/modules/views/plugins/views_plugin_argument_default_php.inc
index 53240da..c2fb14f 100644
--- a/kolab.org/www/drupal-7.15/sites/all/modules/views/plugins/views_plugin_argument_default_php.inc
+++ b/kolab.org/www/drupal-7.15/sites/all/modules/views/plugins/views_plugin_argument_default_php.inc
@@ -1,4 +1,5 @@
<?php
+
/**
* @file
* Contains the php code argument default plugin.
@@ -6,6 +7,8 @@
/**
* Default argument plugin to provide a PHP code block.
+ *
+ * @ingroup views_argument_default_plugins
*/
class views_plugin_argument_default_php extends views_plugin_argument_default {
function option_definition() {
diff --git a/kolab.org/www/drupal-7.15/sites/all/modules/views/plugins/views_plugin_argument_default_raw.inc b/kolab.org/www/drupal-7.15/sites/all/modules/views/plugins/views_plugin_argument_default_raw.inc
index dcaf22f..385ca91 100644
--- a/kolab.org/www/drupal-7.15/sites/all/modules/views/plugins/views_plugin_argument_default_raw.inc
+++ b/kolab.org/www/drupal-7.15/sites/all/modules/views/plugins/views_plugin_argument_default_raw.inc
@@ -1,4 +1,5 @@
<?php
+
/**
* @file
* Contains the raw value argument default plugin.
@@ -6,11 +7,14 @@
/**
* Default argument plugin to use the raw value from the URL.
+ *
+ * @ingroup views_argument_default_plugins
*/
class views_plugin_argument_default_raw extends views_plugin_argument_default {
function option_definition() {
$options = parent::option_definition();
$options['index'] = array('default' => '');
+ $options['use_alias'] = array('default' => FALSE, 'bool' => TRUE);
return $options;
}
@@ -26,10 +30,20 @@ class views_plugin_argument_default_raw extends views_plugin_argument_default {
'#options' => range(1, 10),
'#description' => t('The numbering starts from 1, e.g. on the page admin/structure/types, the 3rd path component is "types".'),
);
+ $form['use_alias'] = array(
+ '#type' => 'checkbox',
+ '#title' => t('Use path alias'),
+ '#default_value' => $this->options['use_alias'],
+ '#description' => t('Use path alias instead of internal path.'),
+ );
}
function get_argument() {
- if ($arg = arg($this->options['index'])) {
+ $path = NULL;
+ if ($this->options['use_alias']) {
+ $path = drupal_get_path_alias();
+ }
+ if ($arg = arg($this->options['index'], $path)) {
return $arg;
}
}
diff --git a/kolab.org/www/drupal-7.15/sites/all/modules/views/plugins/views_plugin_argument_validate.inc b/kolab.org/www/drupal-7.15/sites/all/modules/views/plugins/views_plugin_argument_validate.inc
index 19d84cd..07b49ee 100644
--- a/kolab.org/www/drupal-7.15/sites/all/modules/views/plugins/views_plugin_argument_validate.inc
+++ b/kolab.org/www/drupal-7.15/sites/all/modules/views/plugins/views_plugin_argument_validate.inc
@@ -1,22 +1,20 @@
<?php
+
/**
* @file
* Contains the base argument validator plugin.
*/
/**
- * @defgroup views_argument_validate_plugins Views' argument validate plugins
+ * @defgroup views_argument_validate_plugins Views argument validate plugins
* @{
- *
* Allow specialized methods of validating arguments.
*
- * @see hook_views_plugins
+ * @see hook_views_plugins()
*/
/**
* Base argument validator plugin to provide basic functionality.
- *
- * @ingroup views_argument_validate_plugins
*/
class views_plugin_argument_validate extends views_plugin {
diff --git a/kolab.org/www/drupal-7.15/sites/all/modules/views/plugins/views_plugin_argument_validate_numeric.inc b/kolab.org/www/drupal-7.15/sites/all/modules/views/plugins/views_plugin_argument_validate_numeric.inc
index 2cfeced..049531b 100644
--- a/kolab.org/www/drupal-7.15/sites/all/modules/views/plugins/views_plugin_argument_validate_numeric.inc
+++ b/kolab.org/www/drupal-7.15/sites/all/modules/views/plugins/views_plugin_argument_validate_numeric.inc
@@ -1,4 +1,5 @@
<?php
+
/**
* @file
* Contains the numeric argument validator plugin.
diff --git a/kolab.org/www/drupal-7.15/sites/all/modules/views/plugins/views_plugin_argument_validate_php.inc b/kolab.org/www/drupal-7.15/sites/all/modules/views/plugins/views_plugin_argument_validate_php.inc
index 00cc9f3..83b22b4 100644
--- a/kolab.org/www/drupal-7.15/sites/all/modules/views/plugins/views_plugin_argument_validate_php.inc
+++ b/kolab.org/www/drupal-7.15/sites/all/modules/views/plugins/views_plugin_argument_validate_php.inc
@@ -1,4 +1,5 @@
<?php
+
/**
* @file
* Contains the php code argument validator plugin.
diff --git a/kolab.org/www/drupal-7.15/sites/all/modules/views/plugins/views_plugin_cache.inc b/kolab.org/www/drupal-7.15/sites/all/modules/views/plugins/views_plugin_cache.inc
index 9899d48..4d21701 100644
--- a/kolab.org/www/drupal-7.15/sites/all/modules/views/plugins/views_plugin_cache.inc
+++ b/kolab.org/www/drupal-7.15/sites/all/modules/views/plugins/views_plugin_cache.inc
@@ -1,9 +1,20 @@
<?php
/**
- * The base plugin to handle caching.
+ * @file
+ * Definition of views_plugin_cache.
+ */
+
+/**
+ * @defgroup views_cache_plugins Views cache plugins
+ * @{
+ * @todo.
*
- * @ingroup views_cache_plugins
+ * @see hook_views_plugins()
+ */
+
+/**
+ * The base plugin to handle caching.
*/
class views_plugin_cache extends views_plugin {
/**
@@ -174,6 +185,7 @@ class views_plugin_cache extends views_plugin {
$this->storage['head'] = drupal_add_html_head();
$this->storage['css'] = drupal_add_css();
$this->storage['js'] = drupal_add_js();
+ $this->storage['headers'] = drupal_get_http_header();
}
/**
@@ -190,32 +202,23 @@ class views_plugin_cache extends views_plugin {
// Slightly less simple for CSS:
$css = drupal_add_css();
- $start = isset($this->storage['css']) ? $this->storage['css'] : array();
- $this->storage['css'] = array();
-
- foreach ($css as $file => $data) {
- if (!isset($this->storage['css'][$file])) {
- $this->storage['css'][$file] = $data;
- }
- }
+ $css_start = isset($this->storage['css']) ? $this->storage['css'] : array();
+ $this->storage['css'] = array_diff_assoc($css, $css_start);
- // Get javascript after views renders
+ // Get javascript after/before views renders.
$js = drupal_add_js();
-
- // Get javascript before views renders.
- $start = isset($this->storage['js']) ? $this->storage['js'] : array();
- $this->storage['js'] = array();
-
+ $js_start = isset($this->storage['js']) ? $this->storage['js'] : array();
// If there are any differences between the old and the new javascript then
// store them to be added later.
- if ($diff = array_diff_assoc($js, $start)) {
- $this->storage['js'] = $diff;
- }
+ $this->storage['js'] = array_diff_assoc($js, $js_start);
// Special case the settings key and get the difference of the data.
- if ($settings_diff = array_diff_assoc($js['settings']['data'], $start['settings']['data'])) {
- $this->storage['js']['settings'] = $settings_diff;
- }
+ $settings = isset($js['settings']['data']) ? $js['settings']['data'] : array();
+ $settings_start = isset($js_start['settings']['data']) ? $js_start['settings']['data'] : array();
+ $this->storage['js']['settings'] = array_diff_assoc($settings, $settings_start);
+
+ // Get difference of HTTP headers.
+ $this->storage['headers'] = array_diff_assoc(drupal_get_http_header(), $this->storage['headers']);
}
/**
@@ -232,7 +235,7 @@ class views_plugin_cache extends views_plugin {
}
if (!empty($this->storage['js'])) {
foreach ($this->storage['js'] as $key => $args) {
- if ($key != 'settings') {
+ if ($key !== 'settings') {
drupal_add_js($args['data'], $args);
}
else {
@@ -242,6 +245,11 @@ class views_plugin_cache extends views_plugin {
}
}
}
+ if (!empty($this->storage['headers'])) {
+ foreach ($this->storage['headers'] as $name => $value) {
+ drupal_add_http_header($name, $value);
+ }
+ }
}
function get_results_key() {
@@ -259,7 +267,7 @@ class views_plugin_cache extends views_plugin {
if ($build_info[$index] instanceof SelectQueryInterface) {
$query = clone $build_info[$index];
$query->preExecute();
- $build_info[$index] = (string)$query;
+ $build_info[$index] = (string) $query;
}
}
$key_data = array(
@@ -267,8 +275,9 @@ class views_plugin_cache extends views_plugin {
'roles' => array_keys($user->roles),
'super-user' => $user->uid == 1, // special caching for super user.
'language' => $GLOBALS['language']->language,
+ 'base_url' => $GLOBALS['base_url'],
);
- foreach (array('exposed_info', 'page', 'sort', 'order') as $key) {
+ foreach (array('exposed_info', 'page', 'sort', 'order', 'items_per_page', 'offset') as $key) {
if (isset($_GET[$key])) {
$key_data[$key] = $_GET[$key];
}
@@ -289,6 +298,7 @@ class views_plugin_cache extends views_plugin {
'super-user' => $user->uid == 1, // special caching for super user.
'theme' => $GLOBALS['theme'],
'language' => $GLOBALS['language']->language,
+ 'base_url' => $GLOBALS['base_url'],
);
$this->_output_key = $this->view->name . ':' . $this->display->id . ':output:' . md5(serialize($key_data));
@@ -296,5 +306,8 @@ class views_plugin_cache extends views_plugin {
return $this->_output_key;
}
-
}
+
+/**
+ * @}
+ */
diff --git a/kolab.org/www/drupal-7.15/sites/all/modules/views/plugins/views_plugin_cache_none.inc b/kolab.org/www/drupal-7.15/sites/all/modules/views/plugins/views_plugin_cache_none.inc
index 9cc2757..9927a9d 100644
--- a/kolab.org/www/drupal-7.15/sites/all/modules/views/plugins/views_plugin_cache_none.inc
+++ b/kolab.org/www/drupal-7.15/sites/all/modules/views/plugins/views_plugin_cache_none.inc
@@ -1,7 +1,14 @@
<?php
/**
+ * @file
+ * Definition of views_plugin_cache_none.
+ */
+
+/**
* Caching plugin that provides no caching at all.
+ *
+ * @ingroup views_cache_plugins
*/
class views_plugin_cache_none extends views_plugin_cache {
function cache_start() { /* do nothing */ }
diff --git a/kolab.org/www/drupal-7.15/sites/all/modules/views/plugins/views_plugin_cache_time.inc b/kolab.org/www/drupal-7.15/sites/all/modules/views/plugins/views_plugin_cache_time.inc
index ac84b1c..25245ea 100644
--- a/kolab.org/www/drupal-7.15/sites/all/modules/views/plugins/views_plugin_cache_time.inc
+++ b/kolab.org/www/drupal-7.15/sites/all/modules/views/plugins/views_plugin_cache_time.inc
@@ -1,13 +1,22 @@
<?php
/**
+ * @file
+ * Definition of views_plugin_cache_time.
+ */
+
+/**
* Simple caching of query results for Views displays.
+ *
+ * @ingroup views_cache_plugins
*/
class views_plugin_cache_time extends views_plugin_cache {
function option_definition() {
$options = parent::option_definition();
$options['results_lifespan'] = array('default' => 3600);
+ $options['results_lifespan_custom'] = array('default' => 0);
$options['output_lifespan'] = array('default' => 3600);
+ $options['output_lifespan_custom'] = array('default' => 0);
return $options;
}
@@ -16,7 +25,7 @@ class views_plugin_cache_time extends views_plugin_cache {
parent::options_form($form, $form_state);
$options = array(60, 300, 1800, 3600, 21600, 518400);
$options = drupal_map_assoc($options, 'format_interval');
- $options = array(-1 => t('Never cache')) + $options;
+ $options = array(-1 => t('Never cache')) + $options + array('custom' => t('Custom'));
$form['results_lifespan'] = array(
'#type' => 'select',
@@ -25,6 +34,18 @@ class views_plugin_cache_time extends views_plugin_cache {
'#options' => $options,
'#default_value' => $this->options['results_lifespan'],
);
+ $form['results_lifespan_custom'] = array(
+ '#type' => 'textfield',
+ '#title' => t('Seconds'),
+ '#size' => '25',
+ '#maxlength' => '30',
+ '#description' => t('Length of time in seconds raw query results should be cached.'),
+ '#default_value' => $this->options['results_lifespan_custom'],
+ '#process' => array('form_process_select','ctools_dependent_process'),
+ '#dependency' => array(
+ 'edit-cache-options-results-lifespan' => array('custom'),
+ ),
+ );
$form['output_lifespan'] = array(
'#type' => 'select',
'#title' => t('Rendered output'),
@@ -32,14 +53,43 @@ class views_plugin_cache_time extends views_plugin_cache {
'#options' => $options,
'#default_value' => $this->options['output_lifespan'],
);
+ $form['output_lifespan_custom'] = array(
+ '#type' => 'textfield',
+ '#title' => t('Seconds'),
+ '#size' => '25',
+ '#maxlength' => '30',
+ '#description' => t('Length of time in seconds rendered HTML output should be cached.'),
+ '#default_value' => $this->options['output_lifespan_custom'],
+ '#process' => array('form_process_select','ctools_dependent_process'),
+ '#dependency' => array(
+ 'edit-cache-options-output-lifespan' => array('custom'),
+ ),
+ );
+ }
+
+ function options_validate(&$form, &$form_state) {
+ $custom_fields = array('output_lifespan', 'results_lifespan');
+ foreach ($custom_fields as $field) {
+ if ($form_state['values']['cache_options'][$field] == 'custom' && !is_numeric($form_state['values']['cache_options'][$field . '_custom'])) {
+ form_error($form[$field .'_custom'], t('Custom time values must be numeric.'));
+ }
+ }
}
function summary_title() {
- return format_interval($this->options['results_lifespan'], 1) . '/' . format_interval($this->options['output_lifespan'], 1);
+ $results_lifespan = $this->get_lifespan('results');
+ $output_lifespan = $this->get_lifespan('output');
+ return format_interval($results_lifespan, 1) . '/' . format_interval($output_lifespan, 1);
+ }
+
+ function get_lifespan($type) {
+ $lifespan = $this->options[$type . '_lifespan'] == 'custom' ? $this->options[$type . '_lifespan_custom'] : $this->options[$type . '_lifespan'];
+ return $lifespan;
}
function cache_expire($type) {
- if ($lifespan = $this->options[$type . '_lifespan']) {
+ $lifespan = $this->get_lifespan($type);
+ if ($lifespan) {
$cutoff = REQUEST_TIME - $lifespan;
return $cutoff;
}
@@ -49,7 +99,8 @@ class views_plugin_cache_time extends views_plugin_cache {
}
function cache_set_expire($type) {
- if ($lifespan = $this->options[$type . '_lifespan']) {
+ $lifespan = $this->get_lifespan($type);
+ if ($lifespan) {
return time() + $lifespan;
}
else {
diff --git a/kolab.org/www/drupal-7.15/sites/all/modules/views/plugins/views_plugin_display.inc b/kolab.org/www/drupal-7.15/sites/all/modules/views/plugins/views_plugin_display.inc
index b338043..6be3dcc 100644
--- a/kolab.org/www/drupal-7.15/sites/all/modules/views/plugins/views_plugin_display.inc
+++ b/kolab.org/www/drupal-7.15/sites/all/modules/views/plugins/views_plugin_display.inc
@@ -1,11 +1,12 @@
<?php
+
/**
* @file
* Contains the base display plugin.
*/
/**
- * @defgroup views_display_plugins Views' display plugins
+ * @defgroup views_display_plugins Views display plugins
* @{
* Display plugins control how Views interact with the rest of Drupal.
*
@@ -14,14 +15,12 @@
* handle creating Views from an external module source, such as
* a Panels pane, or an insert view, or a CCK field type.
*
- * @see hook_views_plugins
+ * @see hook_views_plugins()
*/
/**
* The default display plugin handler. Display plugins handle options and
* basic mechanisms for different output methods.
- *
- * @ingroup views_display_plugins
*/
class views_plugin_display extends views_plugin {
/**
@@ -42,6 +41,23 @@ class views_plugin_display extends views_plugin {
$this->view = &$view;
$this->display = &$display;
+ // Load extenders as soon as possible.
+ $this->extender = array();
+ $extenders = views_get_enabled_display_extenders();
+ // If you update to the dev version the registry might not be loaded yet.
+ if (!empty($extenders) && class_exists('views_plugin_display_extender')) {
+ foreach ($extenders as $extender) {
+ $plugin = views_get_plugin('display_extender', $extender);
+ if ($plugin) {
+ $plugin->init($this->view, $this);
+ $this->extender[$extender] = $plugin;
+ }
+ else {
+ vpr('Invalid display extender @extender', array('@handler' => $extender));
+ }
+ }
+ }
+
// Track changes that the user should know about.
$changed = FALSE;
@@ -212,31 +228,31 @@ class views_plugin_display extends views_plugin {
$changed = TRUE;
}
+ // Filter groups were allowed to be rewritten without its filters, so
+ // before this update the view was using the default values. To be sure that
+ // the existing view isn't broken, don't use this overridden values but copy
+ // them from the default display. Only do this if the filters are overridden
+ // but the filter_groups are not marked as so.
+ if (!$this->is_default_display() && !$this->options['defaults']['filters'] && $this->options['defaults']['filter_groups']) {
+ // Set filter_groups to be overridden and save the value in the
+ // display_options as well.
+ $this->options['defaults']['filter_groups'] = FALSE;
+ $this->display->display_options['defaults']['filter_groups'] = $this->options['defaults']['filter_groups'];
+ // Copy the filter_groups from the default, and add them to the
+ // display_options as well. $this->default_display is not initialized at
+ // this point.
+ $this->options['filter_groups'] = $this->view->display['default']->handler->options['filter_groups'];
+ $this->display->display_options['filter_groups'] = $this->options['filter_groups'];
+
+ $changed = TRUE;
+ }
+
// Mark the view as changed so the user has a chance to save it.
if ($changed) {
$this->view->changed = TRUE;
}
}
- function construct() {
- // Load extenders as soon as possible
- $this->extender = array();
- $extenders = views_get_enabled_display_extenders();
- // If you update to the dev version the registry might not be loaded yet.
- if (!empty($extenders) && class_exists('views_plugin_display_extender')) {
- foreach ($extenders as $extender) {
- $data = views_fetch_plugin_data('display_extender', $extender);
- if (isset($data['handler']) && class_exists($data['handler'])) {
- $this->extender[$extender] = new $data['handler']($this->view, $this);
- }
- else {
- vpr('Invalid display extender @extender', array('@handler' => $extender));
- }
- }
- }
- parent::construct();
- }
-
function destroy() {
parent::destroy();
@@ -395,9 +411,12 @@ class views_plugin_display extends views_plugin {
'css_class' => array('css_class'),
'use_ajax' => array('use_ajax'),
'hide_attachment_summary' => array('hide_attachment_summary'),
+ 'hide_admin_links' => array('hide_admin_links'),
'group_by' => array('group_by'),
'query' => array('query'),
'use_more' => array('use_more', 'use_more_always', 'use_more_text'),
+ 'use_more_always' => array('use_more', 'use_more_always', 'use_more_text'),
+ 'use_more_text' => array('use_more', 'use_more_always', 'use_more_text'),
'link_display' => array('link_display', 'link_url'),
// Force these to cascade properly.
@@ -421,6 +440,7 @@ class views_plugin_display extends views_plugin {
'sorts' => array('sorts'),
'arguments' => array('arguments'),
'filters' => array('filters', 'filter_groups'),
+ 'filter_groups' => array('filters', 'filter_groups'),
);
// If the display cannot use a pager, then we cannot default it.
@@ -456,6 +476,7 @@ class views_plugin_display extends views_plugin {
'display_description' => FALSE,
'use_ajax' => TRUE,
'hide_attachment_summary' => TRUE,
+ 'hide_admin_links' => FALSE,
'pager' => TRUE,
'pager_options' => TRUE,
'use_more' => TRUE,
@@ -515,6 +536,10 @@ class views_plugin_display extends views_plugin {
'default' => FALSE,
'bool' => TRUE,
),
+ 'hide_admin_links' => array(
+ 'default' => FALSE,
+ 'bool' => TRUE,
+ ),
// This is legacy code:
// Items_per/offset/use_pager is moved to the pager plugin
// but the automatic update path needs this items defined, so don't remove it.
@@ -535,7 +560,8 @@ class views_plugin_display extends views_plugin {
),
'use_more_always' => array(
'default' => FALSE,
- 'bool' => FALSE,
+ 'bool' => TRUE,
+ 'export' => 'export_option_always',
),
'use_more_text' => array(
'default' => 'more',
@@ -686,7 +712,7 @@ class views_plugin_display extends views_plugin {
}
foreach ($this->extender as $extender) {
- $extender->option_definition($options);
+ $extender->options_definition_alter($options);
}
return $options;
@@ -759,6 +785,10 @@ class views_plugin_display extends views_plugin {
}
}
+ function get_url() {
+ return $this->view->get_url();
+ }
+
/**
* Check to see if the display needs a breadcrumb
*
@@ -944,9 +974,19 @@ class views_plugin_display extends views_plugin {
/**
* Retrieve a list of fields for the current display with the
- * relationship associated if it exists.
+ * relationship associated if it exists.
+ *
+ * @param $groupable_only
+ * Return only an array of field labels from handler that return TRUE
+ * from use_string_group_by method.
*/
function get_field_labels() {
+ // Use func_get_arg so the function signature isn't amended
+ // but we can still pass TRUE into the function to filter
+ // by groupable handlers.
+ $args = func_get_args();
+ $groupable_only = isset($args[0]) ? $args[0] : FALSE;
+
$options = array();
foreach ($this->get_handlers('relationship') as $relationship => $handler) {
if ($label = $handler->label()) {
@@ -958,6 +998,10 @@ class views_plugin_display extends views_plugin {
}
foreach ($this->get_handlers('field') as $id => $handler) {
+ if ($groupable_only && !$handler->use_string_group_by()) {
+ // Continue to next handler if it's not groupable.
+ continue;
+ }
if ($label = $handler->label()) {
$options[$id] = $label;
}
@@ -1176,6 +1220,14 @@ class views_plugin_display extends views_plugin {
'desc' => t('Change whether or not to display attachments when displaying a contextual filter summary.'),
);
}
+ if (!isset($this->definition['contextual links locations']) || !empty($this->definition['contextual links locations'])) {
+ $options['hide_admin_links'] = array(
+ 'category' => 'other',
+ 'title' => t('Hide contextual links'),
+ 'value' => $this->get_option('hide_admin_links') ? t('Yes') : t('No'),
+ 'desc' => t('Change whether or not to display contextual links for this view.'),
+ );
+ }
$pager_plugin = $this->get_plugin('pager');
if (!$pager_plugin) {
@@ -1443,18 +1495,26 @@ class views_plugin_display extends views_plugin {
'#default_value' => $this->get_option('hide_attachment_summary') ? 1 : 0,
);
break;
+ case 'hide_admin_links':
+ $form['#title'] .= t('Hide contextual links on this view.');
+ $form['hide_admin_links'] = array(
+ '#type' => 'radios',
+ '#options' => array(1 => t('Yes'), 0 => t('No')),
+ '#default_value' => $this->get_option('hide_admin_links') ? 1 : 0,
+ );
+ break;
case 'use_more':
$form['#title'] .= t('Add a more link to the bottom of the display.');
$form['use_more'] = array(
'#type' => 'checkbox',
'#title' => t('Create more link'),
- '#description' => t("This will add a more link to the bottom of this view, which will link to the page view. If you have more than one page view, the link will point to the display specified in 'Link display' above. You can override the url at the link display setting."),
+ '#description' => t("This will add a more link to the bottom of this view, which will link to the page view. If you have more than one page view, the link will point to the display specified in 'Link display' section under advanced. You can override the url at the link display setting."),
'#default_value' => $this->get_option('use_more'),
);
$form['use_more_always'] = array(
'#type' => 'checkbox',
- '#title' => t('Do not display more link unless there is more content'),
- '#description' => t("This will display the more link even if there are no more items to display."),
+ '#title' => t("Display 'more' link only if there is more content"),
+ '#description' => t("Leave this unchecked to display the 'more' link even if there are no more items to display."),
'#default_value' => !$this->get_option('use_more_always'),
'#dependency' => array(
'edit-use-more' => array(TRUE),
@@ -2292,6 +2352,7 @@ class views_plugin_display extends views_plugin {
break;
case 'use_ajax':
case 'hide_attachment_summary':
+ case 'hide_admin_links':
$this->set_option($section, (bool)$form_state['values'][$section]);
break;
case 'use_more':
@@ -2414,6 +2475,13 @@ class views_plugin_display extends views_plugin {
/**
* Flip the override setting for the given section.
+ *
+ * @param string $section
+ * Which option should be marked as overridden, for example "filters".
+ * @param bool $new_state
+ * Select the new state of the option.
+ * - TRUE: Revert to default.
+ * - FALSE: Mark it as overridden.
*/
function set_override($section, $new_state = NULL) {
$options = $this->defaultable_sections($section);
@@ -2584,6 +2652,10 @@ class views_plugin_display extends views_plugin {
foreach ($this->extender as $extender) {
$extender->pre_execute();
}
+
+ if ($this->get_option('hide_admin_links')) {
+ $this->view->hide_admin_links = TRUE;
+ }
}
/**
@@ -2666,13 +2738,29 @@ class views_plugin_display extends views_plugin {
/**
* Check if the provided identifier is unique.
+ *
+ * @param string $id
+ * The id of the handler which is checked.
+ * @param string $identifier
+ * The actual get identifier configured in the exposed settings.
+ *
+ * @return bool
+ * Returns whether the identifier is unique on all handlers.
+ *
*/
function is_identifier_unique($id, $identifier) {
foreach (views_object_types() as $type => $info) {
foreach ($this->get_handlers($type) as $key => $handler) {
if ($handler->can_expose() && $handler->is_exposed()) {
- if ($id != $key && $identifier == $handler->options['expose']['identifier']) {
- return FALSE;
+ if ($handler->is_a_group()) {
+ if ($id != $key && $identifier == $handler->options['group_info']['identifier']) {
+ return FALSE;
+ }
+ }
+ else {
+ if ($id != $key && $identifier == $handler->options['expose']['identifier']) {
+ return FALSE;
+ }
}
}
}
diff --git a/kolab.org/www/drupal-7.15/sites/all/modules/views/plugins/views_plugin_display_attachment.inc b/kolab.org/www/drupal-7.15/sites/all/modules/views/plugins/views_plugin_display_attachment.inc
index d05d1e6..91c8d1f 100644
--- a/kolab.org/www/drupal-7.15/sites/all/modules/views/plugins/views_plugin_display_attachment.inc
+++ b/kolab.org/www/drupal-7.15/sites/all/modules/views/plugins/views_plugin_display_attachment.inc
@@ -1,4 +1,5 @@
<?php
+
/**
* @file
* Contains the attachment display plugin.
@@ -19,10 +20,10 @@ class views_plugin_display_attachment extends views_plugin_display {
$options['displays'] = array('default' => array());
$options['attachment_position'] = array('default' => 'before');
- $options['inherit_arguments'] = array('default' => TRUE);
- $options['inherit_exposed_filters'] = array('default' => FALSE);
- $options['inherit_pager'] = array('default' => FALSE);
- $options['render_pager'] = array('default' => FALSE);
+ $options['inherit_arguments'] = array('default' => TRUE, 'bool' => TRUE);
+ $options['inherit_exposed_filters'] = array('default' => FALSE, 'bool' => TRUE);
+ $options['inherit_pager'] = array('default' => FALSE, 'bool' => TRUE);
+ $options['render_pager'] = array('default' => FALSE, 'bool' => TRUE);
return $options;
}
diff --git a/kolab.org/www/drupal-7.15/sites/all/modules/views/plugins/views_plugin_display_block.inc b/kolab.org/www/drupal-7.15/sites/all/modules/views/plugins/views_plugin_display_block.inc
index 4338d75..c903a9b 100644
--- a/kolab.org/www/drupal-7.15/sites/all/modules/views/plugins/views_plugin_display_block.inc
+++ b/kolab.org/www/drupal-7.15/sites/all/modules/views/plugins/views_plugin_display_block.inc
@@ -1,4 +1,5 @@
<?php
+
/**
* @file
* Contains the block display plugin.
@@ -30,10 +31,10 @@ class views_plugin_display_block extends views_plugin_display {
if (empty($desc)) {
if ($this->display->display_title == $this->definition['title']) {
- $desc = t('View: @view', array('@view' => $this->view->get_human_name()));
+ $desc = t('View: !view', array('!view' => $this->view->get_human_name()));
}
else {
- $desc = t('View: @view: @display', array('@view' => $this->view->get_human_name(), '@display' => $this->display->display_title));
+ $desc = t('View: !view: !display', array('!view' => $this->view->get_human_name(), '!display' => $this->display->display_title));
}
}
return array(
@@ -85,11 +86,6 @@ class views_plugin_display_block extends views_plugin_display {
'value' => views_ui_truncate($block_description, 24),
);
- $cache_type = $this->get_option('block_caching');
- if (empty($cache_type)) {
- $cache_type = DRUPAL_NO_CACHE;
- }
-
$types = $this->block_caching_modes();
$options['block_caching'] = array(
'category' => 'other',
@@ -129,7 +125,6 @@ class views_plugin_display_block 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);
@@ -152,6 +147,14 @@ class views_plugin_display_block extends views_plugin_display {
'#default_value' => $this->get_cache_type(),
);
break;
+ case 'exposed_form_options':
+ $this->view->init_handlers();
+ if (!$this->uses_exposed() && parent::uses_exposed()) {
+ $form['exposed_form_options']['warning'] = array(
+ '#weight' => -10,
+ '#markup' => '<div class="messages warning">' . t('Exposed filters in block displays require "Use AJAX" to be set to work correctly.') . '</div>',
+ );
+ }
}
}
@@ -179,14 +182,13 @@ class views_plugin_display_block extends views_plugin_display {
/**
* Block views use exposed widgets only if AJAX is set.
*/
- function uses_exposed() {
- if ($this->use_ajax()) {
- return parent::uses_exposed();
+ function uses_exposed() {
+ if ($this->use_ajax()) {
+ return parent::uses_exposed();
+ }
+ return FALSE;
}
- return FALSE;
- }
-
/**
* Update the block delta when you change the machine readable name of the display.
*/
@@ -204,16 +206,21 @@ class views_plugin_display_block extends views_plugin_display {
$hashes[$md5_delta] = $delta;
$delta = $md5_delta;
}
- db_update('block')
- ->fields(array('delta' => $delta))
- ->condition('delta', $old_delta)
- ->execute();
+
+ // Maybe people don't have block module installed, so let's skip this.
+ if (db_table_exists('block')) {
+ db_update('block')
+ ->fields(array('delta' => $delta))
+ ->condition('delta', $old_delta)
+ ->execute();
+ }
// Update the hashes if needed.
if ($hashes != $old_hashes) {
variable_set('views_block_hashes', $hashes);
}
}
+
/**
* Save the block cache setting in the blocks table if this block allready
* exists in the blocks table. Dirty fix untill http://drupal.org/node/235673 gets in.
diff --git a/kolab.org/www/drupal-7.15/sites/all/modules/views/plugins/views_plugin_display_default.inc b/kolab.org/www/drupal-7.15/sites/all/modules/views/plugins/views_plugin_display_default.inc
index d46a126..4b1fc08 100644
--- a/kolab.org/www/drupal-7.15/sites/all/modules/views/plugins/views_plugin_display_default.inc
+++ b/kolab.org/www/drupal-7.15/sites/all/modules/views/plugins/views_plugin_display_default.inc
@@ -1,4 +1,5 @@
<?php
+
/**
* @file
* Contains the default display plugin.
@@ -28,6 +29,7 @@ class views_plugin_display_default extends views_plugin_display {
* @code
* $view->set_arguments($args);
* $view->build('default'); // Build the query
+ * $view->pre_execute(); // Pre-execute the query.
* $view->execute(); // Run the query
* $output = $view->render(); // Render the view
* @endcode
diff --git a/kolab.org/www/drupal-7.15/sites/all/modules/views/plugins/views_plugin_display_embed.inc b/kolab.org/www/drupal-7.15/sites/all/modules/views/plugins/views_plugin_display_embed.inc
new file mode 100644
index 0000000..8b25cf9
--- /dev/null
+++ b/kolab.org/www/drupal-7.15/sites/all/modules/views/plugins/views_plugin_display_embed.inc
@@ -0,0 +1,14 @@
+<?php
+/**
+ * @file
+ * Contains the embed display plugin.
+ */
+
+/**
+ * The plugin that handles an embed display.
+ *
+ * @ingroup views_display_plugins
+ */
+class views_plugin_display_embed extends views_plugin_display {
+ // This display plugin does nothing apart from exist.
+}
diff --git a/kolab.org/www/drupal-7.15/sites/all/modules/views/plugins/views_plugin_display_extender.inc b/kolab.org/www/drupal-7.15/sites/all/modules/views/plugins/views_plugin_display_extender.inc
index c2cc488..08e981a 100644
--- a/kolab.org/www/drupal-7.15/sites/all/modules/views/plugins/views_plugin_display_extender.inc
+++ b/kolab.org/www/drupal-7.15/sites/all/modules/views/plugins/views_plugin_display_extender.inc
@@ -1,9 +1,17 @@
<?php
+
+/**
+ * @file
+ * Definition of views_plugin_display_extender.
+ */
+
/**
- * @todo
+ * @todo.
+ *
+ * @ingroup views_display_plugins
*/
class views_plugin_display_extender extends views_plugin {
- function __construct(&$view, &$display) {
+ function init(&$view, &$display) {
$this->view = $view;
$this->display = $display;
}
@@ -12,7 +20,7 @@ class views_plugin_display_extender extends views_plugin {
/**
* Provide a form to edit options for this plugin.
*/
- function options_definition(&$options) { }
+ function options_definition_alter(&$options) { }
/**
* Provide a form to edit options for this plugin.
diff --git a/kolab.org/www/drupal-7.15/sites/all/modules/views/plugins/views_plugin_display_feed.inc b/kolab.org/www/drupal-7.15/sites/all/modules/views/plugins/views_plugin_display_feed.inc
index 3b07158..37d0ae4 100644
--- a/kolab.org/www/drupal-7.15/sites/all/modules/views/plugins/views_plugin_display_feed.inc
+++ b/kolab.org/www/drupal-7.15/sites/all/modules/views/plugins/views_plugin_display_feed.inc
@@ -1,4 +1,5 @@
<?php
+
/**
* @file
* Contains the feed display plugin.
diff --git a/kolab.org/www/drupal-7.15/sites/all/modules/views/plugins/views_plugin_display_page.inc b/kolab.org/www/drupal-7.15/sites/all/modules/views/plugins/views_plugin_display_page.inc
index 77f2100..cd7fe37 100644
--- a/kolab.org/www/drupal-7.15/sites/all/modules/views/plugins/views_plugin_display_page.inc
+++ b/kolab.org/www/drupal-7.15/sites/all/modules/views/plugins/views_plugin_display_page.inc
@@ -1,4 +1,5 @@
<?php
+
/**
* @file
* Contains the page display plugin.
@@ -217,6 +218,10 @@ class views_plugin_display_page extends views_plugin_display {
return drupal_not_found();
}
+ if (!empty($this->view->build_info['denied'])) {
+ return drupal_access_denied();
+ }
+
$this->view->get_breadcrumb(TRUE);
@@ -371,7 +376,6 @@ class views_plugin_display_page extends views_plugin_display {
);
}
$form['menu']['weight'] = array(
- '#suffix' => '</div>',
'#title' => t('Weight'),
'#type' => 'textfield',
'#default_value' => isset($menu['weight']) ? $menu['weight'] : 0,
@@ -380,6 +384,7 @@ 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'),
@@ -471,9 +476,8 @@ class views_plugin_display_page extends views_plugin_display {
form_error($form['path'], t('"%" may not be used for the first segment of a path.'));
}
- // automatically remove '/' from path.
- $form_state['values']['path'] = trim($form_state['values']['path'], '/');
-
+ // automatically remove '/' and trailing whitespace from path.
+ $form_state['values']['path'] = trim($form_state['values']['path'], '/ ');
break;
case 'menu':
$path = $this->get_option('path');
diff --git a/kolab.org/www/drupal-7.15/sites/all/modules/views/plugins/views_plugin_exposed_form.inc b/kolab.org/www/drupal-7.15/sites/all/modules/views/plugins/views_plugin_exposed_form.inc
index 8dbe583..833f44b 100644
--- a/kolab.org/www/drupal-7.15/sites/all/modules/views/plugins/views_plugin_exposed_form.inc
+++ b/kolab.org/www/drupal-7.15/sites/all/modules/views/plugins/views_plugin_exposed_form.inc
@@ -1,6 +1,21 @@
<?php
/**
+ * @file
+ * Definition of views_plugin_exposed_form.
+ */
+
+/**
+ * @defgroup views_exposed_form_plugins Views exposed form plugins
+ * @{
+ * Plugins that handle the validation/submission and rendering of exposed forms.
+ *
+ * If needed, it is possible to use them to add additional form elements.
+ *
+ * @see hook_views_plugins()
+ */
+
+/**
* The base plugin to handle exposed filter forms.
*/
class views_plugin_exposed_form extends views_plugin {
@@ -22,14 +37,14 @@ class views_plugin_exposed_form extends views_plugin {
function option_definition() {
$options = parent::option_definition();
- $options['submit_button'] = array('default' => t('Apply'), 'translatable' => TRUE);
+ $options['submit_button'] = array('default' => 'Apply', 'translatable' => TRUE);
$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['sort_asc_label'] = array('default' => 'Asc', 'translatable' => TRUE);
$options['sort_desc_label'] = array('default' => 'Desc', 'translatable' => TRUE);
- $options['autosubmit'] = array('default' => FALSE);
- $options['autosubmit_hide'] = array('default' => TRUE);
+ $options['autosubmit'] = array('default' => FALSE, 'bool' => TRUE);
+ $options['autosubmit_hide'] = array('default' => TRUE, 'bool' => TRUE);
return $options;
}
@@ -300,3 +315,7 @@ class views_plugin_exposed_form extends views_plugin {
$form_state['values'] = array();
}
}
+
+/**
+ * @}
+ */
diff --git a/kolab.org/www/drupal-7.15/sites/all/modules/views/plugins/views_plugin_exposed_form_basic.inc b/kolab.org/www/drupal-7.15/sites/all/modules/views/plugins/views_plugin_exposed_form_basic.inc
index 71d4224..73ae54a 100644
--- a/kolab.org/www/drupal-7.15/sites/all/modules/views/plugins/views_plugin_exposed_form_basic.inc
+++ b/kolab.org/www/drupal-7.15/sites/all/modules/views/plugins/views_plugin_exposed_form_basic.inc
@@ -1,6 +1,13 @@
<?php
/**
- * Exposed form plugin that provides basic exposed form
+ * @file
+ * Definition of views_plugin_exposed_form_basic.
+ */
+
+/**
+ * Exposed form plugin that provides a basic exposed form.
+ *
+ * @ingroup views_exposed_form_plugins
*/
class views_plugin_exposed_form_basic extends views_plugin_exposed_form { }
diff --git a/kolab.org/www/drupal-7.15/sites/all/modules/views/plugins/views_plugin_exposed_form_input_required.inc b/kolab.org/www/drupal-7.15/sites/all/modules/views/plugins/views_plugin_exposed_form_input_required.inc
index 2b564a4..4f2c2d2 100644
--- a/kolab.org/www/drupal-7.15/sites/all/modules/views/plugins/views_plugin_exposed_form_input_required.inc
+++ b/kolab.org/www/drupal-7.15/sites/all/modules/views/plugins/views_plugin_exposed_form_input_required.inc
@@ -1,14 +1,21 @@
<?php
/**
- * Exposed form plugin that provides basic exposed form
+ * @file
+ * Definition of views_plugin_exposed_form_input_required.
+ */
+
+/**
+ * Exposed form plugin that provides an exposed form with required input.
+ *
+ * @ingroup views_exposed_form_plugins
*/
class views_plugin_exposed_form_input_required extends views_plugin_exposed_form {
function option_definition() {
$options = parent::option_definition();
- $options['text_input_required'] = array('default' => t('Select any filter and click on Apply to see results'), 'translatable' => TRUE);
+ $options['text_input_required'] = array('default' => 'Select any filter and click on Apply to see results', 'translatable' => TRUE);
$options['text_input_required_format'] = array('default' => NULL);
return $options;
}
diff --git a/kolab.org/www/drupal-7.15/sites/all/modules/views/plugins/views_plugin_localization.inc b/kolab.org/www/drupal-7.15/sites/all/modules/views/plugins/views_plugin_localization.inc
index bfff15f..08caf9e 100644
--- a/kolab.org/www/drupal-7.15/sites/all/modules/views/plugins/views_plugin_localization.inc
+++ b/kolab.org/www/drupal-7.15/sites/all/modules/views/plugins/views_plugin_localization.inc
@@ -6,9 +6,15 @@
*/
/**
- * The base plugin to handle localization of Views strings.
+ * @defgroup views_localization_plugins Views localization plugins
+ * @{
+ * @todo.
*
- * @ingroup views_localization_plugins
+ * @see hook_views_plugins()
+ */
+
+/**
+ * The base plugin to handle localization of Views strings.
*/
class views_plugin_localization extends views_plugin {
// Store for exported strings
@@ -159,3 +165,7 @@ class views_plugin_localization extends views_plugin {
}
}
}
+
+/**
+ * @}
+ */
diff --git a/kolab.org/www/drupal-7.15/sites/all/modules/views/plugins/views_plugin_pager.inc b/kolab.org/www/drupal-7.15/sites/all/modules/views/plugins/views_plugin_pager.inc
index 57a987d..416d662 100644
--- a/kolab.org/www/drupal-7.15/sites/all/modules/views/plugins/views_plugin_pager.inc
+++ b/kolab.org/www/drupal-7.15/sites/all/modules/views/plugins/views_plugin_pager.inc
@@ -1,9 +1,20 @@
<?php
/**
- * The base plugin to handle pager.
+ * @file
+ * Definition of views_plugin_pager.
+ */
+
+/**
+ * @defgroup views_pager_plugins Views pager plugins
+ * @{
+ * @todo.
*
- * @ingroup views_pager_plugins
+ * @see hook_views_plugins()
+ */
+
+/**
+ * The base plugin to handle pager.
*/
class views_plugin_pager extends views_plugin {
var $current_page = NULL;
@@ -219,3 +230,7 @@ class views_plugin_pager extends views_plugin {
return FALSE;
}
}
+
+/**
+ * @}
+ */
diff --git a/kolab.org/www/drupal-7.15/sites/all/modules/views/plugins/views_plugin_pager_full.inc b/kolab.org/www/drupal-7.15/sites/all/modules/views/plugins/views_plugin_pager_full.inc
index 3884ac1..d4c2203 100644
--- a/kolab.org/www/drupal-7.15/sites/all/modules/views/plugins/views_plugin_pager_full.inc
+++ b/kolab.org/www/drupal-7.15/sites/all/modules/views/plugins/views_plugin_pager_full.inc
@@ -1,6 +1,11 @@
<?php
/**
+ * @file
+ * Definition of views_plugin_pager_full.
+ */
+
+/**
* The plugin to handle full pager.
*
* @ingroup views_pager_plugins
@@ -19,18 +24,28 @@ class views_plugin_pager_full extends views_plugin_pager {
$options['offset'] = array('default' => 0);
$options['id'] = array('default' => 0);
$options['total_pages'] = array('default' => '');
+ // Use the same default quantity that core uses by default.
+ $options['quantity'] = array('default' => 9);
$options['expose'] = array(
'contains' => array(
'items_per_page' => array('default' => FALSE, 'bool' => TRUE),
'items_per_page_label' => array('default' => 'Items per page', 'translatable' => TRUE),
'items_per_page_options' => array('default' => '5, 10, 20, 40, 60'),
- 'items_per_page_options_all' => array('default' => FALSE),
+ 'items_per_page_options_all' => array('default' => FALSE, 'bool' => TRUE),
'items_per_page_options_all_label' => array('default' => '- All -', 'translatable' => TRUE),
'offset' => array('default' => FALSE, 'bool' => TRUE),
'offset_label' => array('default' => 'Offset', 'translatable' => TRUE),
),
);
+ $options['tags'] = array(
+ 'contains' => array(
+ 'first' => array('default' => '« first', 'translatable' => TRUE),
+ 'previous' => array('default' => '‹ previous', 'translatable' => TRUE),
+ 'next' => array('default' => 'next ›', 'translatable' => TRUE),
+ 'last' => array('default' => 'last »', 'translatable' => TRUE),
+ ),
+ );
return $options;
}
@@ -68,6 +83,51 @@ class views_plugin_pager_full extends views_plugin_pager {
'#default_value' => $this->options['total_pages'],
);
+ $form['quantity'] = array(
+ '#type' => 'textfield',
+ '#title' => t('Number of pager links visible'),
+ '#description' => t('Specify the number of links to pages to display in the pager.'),
+ '#default_value' => $this->options['quantity'],
+ );
+
+ $form['tags'] = array (
+ '#type' => 'fieldset',
+ '#collapsible' => FALSE,
+ '#collapsed' => FALSE,
+ '#tree' => TRUE,
+ '#title' => t('Tags'),
+ '#input' => TRUE,
+ '#description' => t('A lists of labels for the controls in the pager'),
+ );
+
+ $form['tags']['first'] = array(
+ '#type' => 'textfield',
+ '#title' => t('Text for "first"-link'),
+ '#description' => t('Text for "first"-link'),
+ '#default_value' => $this->options['tags']['first'],
+ );
+
+ $form['tags']['previous'] = array(
+ '#type' => 'textfield',
+ '#title' => t('Text for "previous"-link'),
+ '#description' => t('Text for "previous"-link'),
+ '#default_value' => $this->options['tags']['previous'],
+ );
+
+ $form['tags']['next'] = array(
+ '#type' => 'textfield',
+ '#title' => t('Text for "next"-link'),
+ '#description' => t('Text for "next"-link'),
+ '#default_value' => $this->options['tags']['next'],
+ );
+
+ $form['tags']['last'] = array(
+ '#type' => 'textfield',
+ '#title' => t('Text for "last"-link'),
+ '#description' => t('Text for "last"-link'),
+ '#default_value' => $this->options['tags']['last'],
+ );
+
$form['expose'] = array (
'#type' => 'fieldset',
'#collapsible' => FALSE,
@@ -207,8 +267,19 @@ class views_plugin_pager_full extends views_plugin_pager {
function render($input) {
$pager_theme = views_theme_functions('pager', $this->view, $this->display);
+ // The 0, 1, 3, 4 index are correct. See theme_pager documentation.
+ $tags = array(
+ 0 => $this->options['tags']['first'],
+ 1 => $this->options['tags']['previous'],
+ 3 => $this->options['tags']['next'],
+ 4 => $this->options['tags']['last'],
+ );
$output = theme($pager_theme, array(
- 'parameters' => $input, 'element' => $this->options['id']));
+ 'tags' => $tags,
+ 'element' => $this->options['id'],
+ 'parameters' => $input,
+ 'quantity' => $this->options['quantity'],
+ ));
return $output;
}
diff --git a/kolab.org/www/drupal-7.15/sites/all/modules/views/plugins/views_plugin_pager_mini.inc b/kolab.org/www/drupal-7.15/sites/all/modules/views/plugins/views_plugin_pager_mini.inc
index 13617ed..2daea99 100644
--- a/kolab.org/www/drupal-7.15/sites/all/modules/views/plugins/views_plugin_pager_mini.inc
+++ b/kolab.org/www/drupal-7.15/sites/all/modules/views/plugins/views_plugin_pager_mini.inc
@@ -1,6 +1,11 @@
<?php
/**
+ * @file
+ * Definition of views_plugin_pager_mini.
+ */
+
+/**
* The plugin to handle full pager.
*
* @ingroup views_pager_plugins
diff --git a/kolab.org/www/drupal-7.15/sites/all/modules/views/plugins/views_plugin_pager_none.inc b/kolab.org/www/drupal-7.15/sites/all/modules/views/plugins/views_plugin_pager_none.inc
index 1fca14b..12b96d0 100644
--- a/kolab.org/www/drupal-7.15/sites/all/modules/views/plugins/views_plugin_pager_none.inc
+++ b/kolab.org/www/drupal-7.15/sites/all/modules/views/plugins/views_plugin_pager_none.inc
@@ -1,6 +1,11 @@
<?php
/**
+ * @file
+ * Definition of views_plugin_pager_none.
+ */
+
+/**
* Plugin for views without pagers.
*
* @ingroup views_pager_plugins
diff --git a/kolab.org/www/drupal-7.15/sites/all/modules/views/plugins/views_plugin_pager_some.inc b/kolab.org/www/drupal-7.15/sites/all/modules/views/plugins/views_plugin_pager_some.inc
index a482f87..09452ce 100644
--- a/kolab.org/www/drupal-7.15/sites/all/modules/views/plugins/views_plugin_pager_some.inc
+++ b/kolab.org/www/drupal-7.15/sites/all/modules/views/plugins/views_plugin_pager_some.inc
@@ -1,6 +1,11 @@
<?php
/**
+ * @file
+ * Definition of views_plugin_pager_some.
+ */
+
+/**
* Plugin for views without pagers.
*
* @ingroup views_pager_plugins
diff --git a/kolab.org/www/drupal-7.15/sites/all/modules/views/plugins/views_plugin_query.inc b/kolab.org/www/drupal-7.15/sites/all/modules/views/plugins/views_plugin_query.inc
index 55c0b2a..d39ed98 100644
--- a/kolab.org/www/drupal-7.15/sites/all/modules/views/plugins/views_plugin_query.inc
+++ b/kolab.org/www/drupal-7.15/sites/all/modules/views/plugins/views_plugin_query.inc
@@ -1,15 +1,26 @@
<?php
+
/**
- * @file views_plugin_query.inc
+ * @file
* Defines the base query class, which is the underlying layer in a View.
*/
/**
+ * @defgroup views_query_plugins Views query plugins
+ * @{
+ * A Views query plugin builds SQL to execute using the Drupal database API.
+ *
+ * @see hook_views_plugins()
+ */
+
+/**
* Object used to create a SELECT query.
*/
class views_plugin_query extends views_plugin {
/**
* A pager plugin that should be provided by the display.
+ *
+ * @var views_plugin_pager
*/
var $pager = NULL;
@@ -54,7 +65,8 @@ class views_plugin_query extends views_plugin {
* Values to set: $view->result, $view->total_rows, $view->execute_time,
* $view->pager['current_page'].
*
- * $view->result should contain an array of objects.
+ * $view->result should contain an array of objects. The array must use a
+ * numeric index starting at 0.
*
* @param view $view
* The view which is executed.
@@ -167,3 +179,7 @@ class views_plugin_query extends views_plugin {
return FALSE;
}
}
+
+/**
+ * @}
+ */
diff --git a/kolab.org/www/drupal-7.15/sites/all/modules/views/plugins/views_plugin_query_default.inc b/kolab.org/www/drupal-7.15/sites/all/modules/views/plugins/views_plugin_query_default.inc
index 39e0174..c6c7649 100644
--- a/kolab.org/www/drupal-7.15/sites/all/modules/views/plugins/views_plugin_query_default.inc
+++ b/kolab.org/www/drupal-7.15/sites/all/modules/views/plugins/views_plugin_query_default.inc
@@ -1,12 +1,14 @@
<?php
+
/**
- * @file views_plugin_query_default.inc
- * Defines the default query object which builds SQL to execute using the
- * Drupal database API.
+ * @file
+ * Defines the default query object.
*/
/**
* Object used to create a SELECT query.
+ *
+ * @ingroup views_query_plugins
*/
class views_plugin_query_default extends views_plugin_query {
@@ -54,6 +56,13 @@ class views_plugin_query_default extends views_plugin_query {
*/
var $groupby = array();
+
+ /**
+ * An array of fields.
+ */
+ var $fields = array();
+
+
/**
* The table header to use for tablesort. This matters because tablesort
* needs to modify the query and needs the header.
@@ -90,6 +99,22 @@ class views_plugin_query_default extends views_plugin_query {
var $tags = array();
/**
+ * Is the view marked as not distinct.
+ *
+ * @var bool
+ */
+ var $no_distinct;
+
+ /**
+ * Defines the distinct type.
+ * - FALSE if it's distinct by base field.
+ * - TRUE if it just adds the sql distinct keyword.
+ *
+ * @var bool
+ */
+ public $pure_distinct = FALSE;
+
+ /**
* Constructor; Create the basic query object and fill with default values.
*/
function init($base_table = 'node', $base_field = 'nid', $options) {
@@ -140,11 +165,20 @@ class views_plugin_query_default extends views_plugin_query {
// Utility methods to set flags and data.
/**
- * Set the base field to be distinct.
+ * Set the view to be distinct.
+ *
+ * There are either distinct per base field or distinct in the pure sql way,
+ * based on $pure_distinct.
+ *
+ * @param bool $value
+ * Should the view by distincted.
+ * @param bool $pure_distinct
+ * Should only the sql keyword be added.
*/
- function set_distinct($value = TRUE) {
+ function set_distinct($value = TRUE, $pure_distinct = FALSE) {
if (!(isset($this->no_distinct) && $value)) {
$this->distinct = $value;
+ $this->pure_distinct = $pure_distinct;
}
}
@@ -182,13 +216,19 @@ class views_plugin_query_default extends views_plugin_query {
'default' => FALSE,
'bool' => TRUE,
);
+ $options['pure_distinct'] = array(
+ 'default' => FALSE,
+ 'bool' => TRUE,
+ );
$options['slave'] = array(
'default' => FALSE,
'bool' => TRUE,
);
$options['query_comment'] = array(
'default' => '',
- 'bool' => FALSE,
+ );
+ $options['query_tags'] = array(
+ 'default' => array(),
);
return $options;
@@ -213,6 +253,13 @@ class views_plugin_query_default extends views_plugin_query {
'#description' => t('This will make the view display only distinct items. If there are multiple identical items, each will be displayed only once. You can use this to try and remove duplicates from a view, though it does not always work. Note that this can slow queries down, so use it with caution.'),
'#default_value' => !empty($this->options['distinct']),
);
+ $form['pure_distinct'] = array(
+ '#type' => 'checkbox',
+ '#title' => t('Pure Distinct'),
+ '#description' => t('This will prevent views from adding the base column to the distinct field. If this is not selected and the base column is a primary key, then a non-pure distinct will not function properly because the primary key is always unique.'),
+ '#default_value' => !empty($this->options['pure_distinct']),
+ '#dependency' => array('edit-query-options-distinct' => '1'),
+ );
$form['slave'] = array(
'#type' => 'checkbox',
'#title' => t('Use Slave Server'),
@@ -225,6 +272,23 @@ class views_plugin_query_default extends views_plugin_query {
'#description' => t('If set, this comment will be embedded in the query and passed to the SQL server. This can be helpful for logging or debugging.'),
'#default_value' => $this->options['query_comment'],
);
+ $form['query_tags'] = array(
+ '#type' => 'textfield',
+ '#title' => t('Query Tags'),
+ '#description' => t('If set, these tags will be appended to the query and can be used to identify the query in a module. This can be helpful for altering queries.'),
+ '#default_value' => implode(', ', $this->options['query_tags']),
+ '#element_validate' => array('views_element_validate_tags'),
+ );
+ }
+
+ /**
+ * Special submit handling.
+ */
+ function options_submit(&$form, &$form_state) {
+ $element = array('#parents' => array('query', 'options', 'query_tags'));
+ $value = explode(',', drupal_array_get_nested_value($form_state['values'], $element['#parents']));
+ $value = array_filter(array_map('trim', $value));
+ form_set_value($element, $value, $form_state);
}
// ----------------------------------------------------------------
@@ -788,7 +852,19 @@ class views_plugin_query_default extends views_plugin_query {
* options such as IN, LIKE, or BETWEEN. Defaults to IN if $value is an array
* = otherwise. If $field is a string you have to use 'formula' here.
*
+ * The $field, $value and $operator arguments can also be passed in with a
+ * single DatabaseCondition object, like this:
+ * @code
+ * $this->query->add_where(
+ * $this->options['group'],
+ * db_or()
+ * ->condition($field, $value, 'NOT IN')
+ * ->condition($field, $value, 'IS NULL')
+ * );
+ * @endcode
+ *
* @see QueryConditionInterface::condition()
+ * @see DatabaseCondition
*/
function add_where($group, $field, $value = NULL, $operator = NULL) {
// Ensure all variants of 0 are actually 0. Thus '', 0 and NULL are all
@@ -1009,7 +1085,7 @@ class views_plugin_query_default extends views_plugin_query {
/**
* Adds a query tag to the sql object.
*
- * @see SelectQuery::addTag
+ * @see SelectQuery::addTag()
*/
function add_tag($tag) {
$this->tags[] = $tag;
@@ -1129,6 +1205,7 @@ class views_plugin_query_default extends views_plugin_query {
}
// This is a formula, using no tables.
elseif (empty($field['table'])) {
+ $non_aggregates[] = $fieldname;
$placeholders = !empty($field['placeholders']) ? $field['placeholders'] : array();
$query->addExpression($string, $fieldname, $placeholders);
}
@@ -1171,8 +1248,10 @@ class views_plugin_query_default extends views_plugin_query {
function query($get_count = FALSE) {
// Check query distinct value.
if (empty($this->no_distinct) && $this->distinct && !empty($this->fields)) {
- $base_field_alias = $this->add_field($this->base_table, $this->base_field);
- $this->add_groupby($base_field_alias);
+ if ($this->pure_distinct === FALSE){
+ $base_field_alias = $this->add_field($this->base_table, $this->base_field);
+ $this->add_groupby($base_field_alias);
+ }
$distinct = TRUE;
}
@@ -1276,6 +1355,13 @@ class views_plugin_query_default extends views_plugin_query {
$query->comment($this->options['query_comment']);
}
+ // Add the query tags.
+ if (!empty($this->options['query_tags'])) {
+ foreach ($this->options['query_tags'] as $tag) {
+ $query->addTag($tag);
+ }
+ }
+
// Add all query substitutions as metadata.
$query->addMetaData('views_substitutions', module_invoke_all('views_query_substitutions', $this));
@@ -1312,7 +1398,7 @@ class views_plugin_query_default extends views_plugin_query {
function build(&$view) {
// Make the query distinct if the option was set.
if (!empty($this->options['distinct'])) {
- $this->set_distinct();
+ $this->set_distinct(TRUE, !empty($this->options['pure_distinct']));
}
// Store the view in the object to be able to use it later.
@@ -1402,14 +1488,13 @@ class views_plugin_query_default extends views_plugin_query {
$this->pager->post_execute($view->result);
- if ($this->pager->use_pager()) {
+ if ($this->pager->use_count_query() || !empty($view->get_total_rows)) {
$view->total_rows = $this->pager->get_total_items();
}
}
catch (Exception $e) {
$view->result = array();
if (!empty($view->live_preview)) {
- drupal_set_message(time());
drupal_set_message($e->getMessage(), 'error');
}
else {
@@ -1418,6 +1503,9 @@ class views_plugin_query_default extends views_plugin_query {
}
}
+ else {
+ $start = microtime(TRUE);
+ }
$view->execute_time = microtime(TRUE) - $start;
}
@@ -1489,6 +1577,15 @@ class views_plugin_query_default extends views_plugin_query {
'sort' => 'views_handler_sort_group_by_numeric',
),
),
+ 'stddev_pop' => array(
+ 'title' => t('Standard derivation'),
+ 'method' => 'views_query_default_aggregation_method_simple',
+ 'handler' => array(
+ 'argument' => 'views_handler_argument_group_by_numeric',
+ 'filter' => 'views_handler_filter_group_by_numeric',
+ 'sort' => 'views_handler_sort_group_by_numeric',
+ ),
+ )
);
}
@@ -1545,3 +1642,16 @@ function views_query_default_aggregation_method_distinct($group_type, $field) {
$group_type = str_replace('_distinct', '', $group_type);
return strtoupper($group_type) . '(DISTINCT ' . $field . ')';
}
+
+/**
+ * Validation callback for query tags.
+ */
+function views_element_validate_tags($element, &$form_state) {
+ $values = array_map('trim', explode(',', $element['#value']));
+ foreach ($values as $value) {
+ if (preg_match("/[^a-z_]/", $value)) {
+ form_error($element, t('The query tags may only contain lower-case alphabetical characters and underscores.'));
+ return;
+ }
+ }
+}
diff --git a/kolab.org/www/drupal-7.15/sites/all/modules/views/plugins/views_plugin_row.inc b/kolab.org/www/drupal-7.15/sites/all/modules/views/plugins/views_plugin_row.inc
index 78d043e..157cc26 100644
--- a/kolab.org/www/drupal-7.15/sites/all/modules/views/plugins/views_plugin_row.inc
+++ b/kolab.org/www/drupal-7.15/sites/all/modules/views/plugins/views_plugin_row.inc
@@ -1,25 +1,24 @@
<?php
+
/**
* @file
* Contains the base row style plugin.
*/
/**
- * @defgroup views_row_plugins Views' row plugins
+ * @defgroup views_row_plugins Views row plugins
* @{
+ * Row plugins control how Views outputs an individual record.
*
- * Row plugins control how Views outputs an individual record. They are
- * tightly coupled to style plugins, in that a style plugin is what calls
- * the row plugin.
+ * They are tightly coupled to style plugins, in that a style plugin is what
+ * calls the row plugin.
*
- * @see hook_views_plugins
+ * @see hook_views_plugins()
*/
/**
* Default plugin to view a single row of a table. This is really just a wrapper around
* a theme function.
- *
- * @ingroup views_row_plugins
*/
class views_plugin_row extends views_plugin {
/**
@@ -130,6 +129,12 @@ class views_plugin_row extends views_plugin {
/**
* Render a row object. This usually passes through to a theme template
* of some form, but not always.
+ *
+ * @param stdClass $row
+ * A single row of the query result, so an element of $view->result.
+ *
+ * @return string
+ * The rendered output of a single row, used by the style plugin.
*/
function render($row) {
return theme($this->theme_functions(),
diff --git a/kolab.org/www/drupal-7.15/sites/all/modules/views/plugins/views_plugin_row_fields.inc b/kolab.org/www/drupal-7.15/sites/all/modules/views/plugins/views_plugin_row_fields.inc
index 65510d2..b1c02e1 100644
--- a/kolab.org/www/drupal-7.15/sites/all/modules/views/plugins/views_plugin_row_fields.inc
+++ b/kolab.org/www/drupal-7.15/sites/all/modules/views/plugins/views_plugin_row_fields.inc
@@ -1,4 +1,5 @@
<?php
+
/**
* @file
* Contains the base row style plugin.
@@ -18,8 +19,8 @@ class views_plugin_row_fields extends views_plugin_row {
$options['inline'] = array('default' => array());
$options['separator'] = array('default' => '');
- $options['hide_empty'] = array('default' => FALSE);
- $options['default_field_elements'] = array('default' => TRUE);
+ $options['hide_empty'] = array('default' => FALSE, 'bool' => TRUE);
+ $options['default_field_elements'] = array('default' => TRUE, 'bool' => TRUE);
return $options;
}
@@ -61,6 +62,9 @@ class views_plugin_row_fields extends views_plugin_row {
'#size' => 10,
'#default_value' => isset($this->options['separator']) ? $this->options['separator'] : '',
'#description' => t('The separator may be placed between inline fields to keep them from squishing up next to each other. You can use HTML in this field.'),
+ '#dependency' => array(
+ 'edit-row-options-default-field-elements' => array(1),
+ ),
);
$form['hide_empty'] = array(
diff --git a/kolab.org/www/drupal-7.15/sites/all/modules/views/plugins/views_plugin_row_rss_fields.inc b/kolab.org/www/drupal-7.15/sites/all/modules/views/plugins/views_plugin_row_rss_fields.inc
new file mode 100644
index 0000000..9355e83
--- /dev/null
+++ b/kolab.org/www/drupal-7.15/sites/all/modules/views/plugins/views_plugin_row_rss_fields.inc
@@ -0,0 +1,180 @@
+<?php
+/**
+ * @file
+ * Contains an implementation of RSS items based on fields on a row plugin.
+ */
+
+/**
+ * Renders an RSS item based on fields.
+ */
+class views_plugin_row_rss_fields extends views_plugin_row {
+ function option_definition() {
+ $options = parent::option_definition();
+ $options['title_field'] = array('default' => '');
+ $options['link_field'] = array('default' => '');
+ $options['description_field'] = array('default' => '');
+ $options['creator_field'] = array('default' => '');
+ $options['date_field'] = array('default' => '');
+ $options['guid_field_options']['guid_field'] = array('default' => '');
+ $options['guid_field_options']['guid_field_is_permalink'] = array('default' => TRUE, 'bool' => TRUE);
+ return $options;
+ }
+
+ function options_form(&$form, &$form_state) {
+ parent::options_form($form, $form_state);
+
+ $initial_labels = array('' => t('- None -'));
+ $view_fields_labels = $this->display->handler->get_field_labels();
+ $view_fields_labels = array_merge($initial_labels, $view_fields_labels);
+
+ $form['title_field'] = array(
+ '#type' => 'select',
+ '#title' => t('Title field'),
+ '#description' => t('The field that is going to be used as the RSS item title for each row.'),
+ '#options' => $view_fields_labels,
+ '#default_value' => $this->options['title_field'],
+ '#required' => TRUE,
+ );
+ $form['link_field'] = array(
+ '#type' => 'select',
+ '#title' => t('Link field'),
+ '#description' => t('The field that is going to be used as the RSS item link for each row. This must be a drupal relative path.'),
+ '#options' => $view_fields_labels,
+ '#default_value' => $this->options['link_field'],
+ '#required' => TRUE,
+ );
+ $form['description_field'] = array(
+ '#type' => 'select',
+ '#title' => t('Description field'),
+ '#description' => t('The field that is going to be used as the RSS item description for each row.'),
+ '#options' => $view_fields_labels,
+ '#default_value' => $this->options['description_field'],
+ '#required' => TRUE,
+ );
+ $form['creator_field'] = array(
+ '#type' => 'select',
+ '#title' => t('Creator field'),
+ '#description' => t('The field that is going to be used as the RSS item creator for each row.'),
+ '#options' => $view_fields_labels,
+ '#default_value' => $this->options['creator_field'],
+ '#required' => TRUE,
+ );
+ $form['date_field'] = array(
+ '#type' => 'select',
+ '#title' => t('Publication date field'),
+ '#description' => t('The field that is going to be used as the RSS item pubDate for each row. It needs to be in RFC 2822 format.'),
+ '#options' => $view_fields_labels,
+ '#default_value' => $this->options['date_field'],
+ '#required' => TRUE,
+ );
+ $form['guid_field_options'] = array(
+ '#type' => 'fieldset',
+ '#title' => t('GUID settings'),
+ '#collapsible' => FALSE,
+ '#collapsed' => FALSE,
+ );
+ $form['guid_field_options']['guid_field'] = array(
+ '#type' => 'select',
+ '#title' => t('GUID field'),
+ '#description' => t('The globally unique identifier of the RSS item.'),
+ '#options' => $view_fields_labels,
+ '#default_value' => $this->options['guid_field_options']['guid_field'],
+ '#required' => TRUE,
+ );
+ $form['guid_field_options']['guid_field_is_permalink'] = array(
+ '#type' => 'checkbox',
+ '#title' => t('GUID is permalink'),
+ '#description' => t('The RSS item GUID is a permalink.'),
+ '#default_value' => $this->options['guid_field_options']['guid_field_is_permalink'],
+ );
+ }
+
+ function validate() {
+ $errors = parent::validate();
+ $required_options = array('title_field', 'link_field', 'description_field', 'creator_field', 'date_field');
+ foreach ($required_options as $required_option) {
+ if (empty($this->options[$required_option])) {
+ $errors[] = t('Row style plugin requires specifying which views fields to use for RSS item.');
+ break;
+ }
+ }
+ // Once more for guid.
+ if (empty($this->options['guid_field_options']['guid_field'])) {
+ $errors[] = t('Row style plugin requires specifying which views fields to use for RSS item.');
+ }
+ return $errors;
+ }
+
+ function render($row) {
+ static $row_index;
+ if (!isset($row_index)) {
+ $row_index = 0;
+ }
+ if (function_exists('rdf_get_namespaces')) {
+ // Merge RDF namespaces in the XML namespaces in case they are used
+ // further in the RSS content.
+ $xml_rdf_namespaces = array();
+ foreach (rdf_get_namespaces() as $prefix => $uri) {
+ $xml_rdf_namespaces['xmlns:' . $prefix] = $uri;
+ }
+ $this->view->style_plugin->namespaces += $xml_rdf_namespaces;
+ }
+
+ // Create the RSS item object.
+ $item = new stdClass();
+ $item->title = $this->get_field($row_index, $this->options['title_field']);
+ $item->link = url($this->get_field($row_index, $this->options['link_field']), array('absolute' => TRUE));
+ $item->description = $this->get_field($row_index, $this->options['description_field']);
+ $item->elements = array(
+ array('key' => 'pubDate', 'value' => $this->get_field($row_index, $this->options['date_field'])),
+ array(
+ 'key' => 'dc:creator',
+ 'value' => $this->get_field($row_index, $this->options['creator_field']),
+ 'namespace' => array('xmlns:dc' => 'http://purl.org/dc/elements/1.1/'),
+ ),
+ );
+ $guid_is_permalink_string = 'false';
+ $item_guid = $this->get_field($row_index, $this->options['guid_field_options']['guid_field']);
+ if ($this->options['guid_field_options']['guid_field_is_permalink']) {
+ $guid_is_permalink_string = 'true';
+ $item_guid = url($item_guid, array('absolute' => TRUE));
+ }
+ $item->elements[] = array(
+ 'key' => 'guid',
+ 'value' => $item_guid,
+ 'attributes' => array('isPermaLink' => $guid_is_permalink_string),
+ );
+
+ $row_index++;
+
+ foreach ($item->elements as $element) {
+ if (isset($element['namespace'])) {
+ $this->view->style_plugin->namespaces = array_merge($this->view->style_plugin->namespaces, $element['namespace']);
+ }
+ }
+
+ return theme($this->theme_functions(),
+ array(
+ 'view' => $this->view,
+ 'options' => $this->options,
+ 'row' => $item,
+ 'field_alias' => isset($this->field_alias) ? $this->field_alias : '',
+ ));
+ }
+
+ /**
+ * Retrieves a views field value from the style plugin.
+ *
+ * @param $index
+ * The index count of the row as expected by views_plugin_style::get_field().
+ * @param $field_id
+ * The ID assigned to the required field in the display.
+ */
+ function get_field($index, $field_id) {
+ if (empty($this->view->style_plugin) || !is_object($this->view->style_plugin) || empty($field_id)) {
+ return '';
+ }
+ return $this->view->style_plugin->get_field($index, $field_id);
+ }
+
+}
diff --git a/kolab.org/www/drupal-7.15/sites/all/modules/views/plugins/views_plugin_style.inc b/kolab.org/www/drupal-7.15/sites/all/modules/views/plugins/views_plugin_style.inc
index 421591a..d355e1b 100644
--- a/kolab.org/www/drupal-7.15/sites/all/modules/views/plugins/views_plugin_style.inc
+++ b/kolab.org/www/drupal-7.15/sites/all/modules/views/plugins/views_plugin_style.inc
@@ -1,7 +1,12 @@
<?php
/**
- * @defgroup views_style_plugins Views' style plugins
+ * @file
+ * Definition of views_plugin_style.
+ */
+
+/**
+ * @defgroup views_style_plugins Views style plugins
* @{
* Style plugins control how a view is rendered. For example, they
* can choose to display a collection of fields, node_view() output,
@@ -11,7 +16,7 @@
* a single record. Not all style plugins can utilize this, so it is
* up to the plugin to set this up and call through to the row plugin.
*
- * @see hook_views_plugins
+ * @see hook_views_plugins()
*/
/**
@@ -22,6 +27,15 @@ class views_plugin_style extends views_plugin {
* Store all available tokens row rows.
*/
var $row_tokens = array();
+
+ /**
+ * Contains the row plugin, if it's initialized
+ * and the style itself supports it.
+ *
+ * @var views_plugin_row
+ */
+ var $row_plugin;
+
/**
* Initialize a style plugin.
*
@@ -75,15 +89,18 @@ class views_plugin_style extends views_plugin {
/**
* Return TRUE if this style also uses fields.
+ *
+ * @return bool
*/
function uses_fields() {
// If we use a row plugin, ask the row plugin. Chances are, we don't
// care, it does.
+ $row_uses_fields = FALSE;
if ($this->uses_row_plugin() && !empty($this->row_plugin)) {
- return $this->row_plugin->uses_fields();
+ $row_uses_fields = $this->row_plugin->uses_fields();
}
- // Otherwise, maybe we do.
- return !empty($this->definition['uses fields']);
+ // Otherwise, check the definition or the option.
+ return $row_uses_fields || !empty($this->definition['uses fields']) || !empty($this->options['uses_fields']);
}
/**
@@ -154,7 +171,10 @@ class views_plugin_style extends views_plugin {
$options['grouping'] = array('default' => array());
if ($this->uses_row_class()) {
$options['row_class'] = array('default' => '');
+ $options['default_row_class'] = array('default' => TRUE, 'bool' => TRUE);
+ $options['row_class_special'] = array('default' => TRUE, 'bool' => TRUE);
}
+ $options['uses_fields'] = array('default' => FALSE, 'bool' => TRUE);
return $options;
}
@@ -167,9 +187,8 @@ class views_plugin_style extends views_plugin {
// @TODO: Document "uses grouping" in docs.php when docs.php is written.
if ($this->uses_fields() && $this->definition['uses grouping']) {
$options = array('' => t('- None -'));
- $field_labels = $this->display->handler->get_field_labels();
+ $field_labels = $this->display->handler->get_field_labels(TRUE);
$options += $field_labels;
-
// If there are no fields, we can't group on them.
if (count($options) > 1) {
// This is for backward compability, when there was just a single select form.
@@ -227,6 +246,28 @@ class views_plugin_style extends views_plugin {
if ($this->uses_fields()) {
$form['row_class']['#description'] .= ' ' . t('You may use field tokens from as per the "Replacement patterns" used in "Rewrite the output of this field" for all fields.');
}
+
+ $form['default_row_class'] = array(
+ '#title' => t('Add views row classes'),
+ '#description' => t('Add the default row classes like views-row-1 to the output. You can use this to quickly reduce the amount of markup the view provides by default, at the cost of making it more difficult to apply CSS.'),
+ '#type' => 'checkbox',
+ '#default_value' => $this->options['default_row_class'],
+ );
+ $form['row_class_special'] = array(
+ '#title' => t('Add striping (odd/even), first/last row classes'),
+ '#description' => t('Add css classes to the first and last line, as well as odd/even classes for striping.'),
+ '#type' => 'checkbox',
+ '#default_value' => $this->options['row_class_special'],
+ );
+ }
+
+ if (!$this->uses_fields() || !empty($this->options['uses_fields'])) {
+ $form['uses_fields'] = array(
+ '#type' => 'checkbox',
+ '#title' => t('Force using fields'),
+ '#description' => t('If neither the row nor the style plugin supports fields, this field allows to enable them, so you can for example use groupby.'),
+ '#default_value' => $this->options['uses_fields'],
+ );
}
}
diff --git a/kolab.org/www/drupal-7.15/sites/all/modules/views/plugins/views_plugin_style_default.inc b/kolab.org/www/drupal-7.15/sites/all/modules/views/plugins/views_plugin_style_default.inc
index e8c9db8..a18f6cc 100644
--- a/kolab.org/www/drupal-7.15/sites/all/modules/views/plugins/views_plugin_style_default.inc
+++ b/kolab.org/www/drupal-7.15/sites/all/modules/views/plugins/views_plugin_style_default.inc
@@ -1,4 +1,5 @@
<?php
+
/**
* @file
* Contains the default style plugin.
diff --git a/kolab.org/www/drupal-7.15/sites/all/modules/views/plugins/views_plugin_style_grid.inc b/kolab.org/www/drupal-7.15/sites/all/modules/views/plugins/views_plugin_style_grid.inc
index 915f14c..9be7ee1 100644
--- a/kolab.org/www/drupal-7.15/sites/all/modules/views/plugins/views_plugin_style_grid.inc
+++ b/kolab.org/www/drupal-7.15/sites/all/modules/views/plugins/views_plugin_style_grid.inc
@@ -1,4 +1,5 @@
<?php
+
/**
* @file
* Contains the grid style plugin.
@@ -18,7 +19,7 @@ class views_plugin_style_grid extends views_plugin_style {
$options['columns'] = array('default' => '4');
$options['alignment'] = array('default' => 'horizontal');
- $options['fill_single_line'] = array('default' => TRUE);
+ $options['fill_single_line'] = array('default' => TRUE, 'bool' => TRUE);
$options['summary'] = array('default' => '');
return $options;
diff --git a/kolab.org/www/drupal-7.15/sites/all/modules/views/plugins/views_plugin_style_jump_menu.inc b/kolab.org/www/drupal-7.15/sites/all/modules/views/plugins/views_plugin_style_jump_menu.inc
index 1da6f21..f571f62 100644
--- a/kolab.org/www/drupal-7.15/sites/all/modules/views/plugins/views_plugin_style_jump_menu.inc
+++ b/kolab.org/www/drupal-7.15/sites/all/modules/views/plugins/views_plugin_style_jump_menu.inc
@@ -1,4 +1,5 @@
<?php
+
/**
* @file
* Contains the table style plugin.
@@ -13,11 +14,11 @@ class views_plugin_style_jump_menu extends views_plugin_style {
function option_definition() {
$options = parent::option_definition();
- $options['hide'] = array('default' => FALSE);
+ $options['hide'] = array('default' => FALSE, 'bool' => TRUE);
$options['path'] = array('default' => '');
$options['text'] = array('default' => 'Go', 'translatable' => TRUE);
$options['choose'] = array('default' => '- Choose -', 'translatable' => TRUE);
- $options['default_value'] = array('default' => FALSE);
+ $options['default_value'] = array('default' => FALSE, 'bool' => TRUE);
return $options;
}
diff --git a/kolab.org/www/drupal-7.15/sites/all/modules/views/plugins/views_plugin_style_list.inc b/kolab.org/www/drupal-7.15/sites/all/modules/views/plugins/views_plugin_style_list.inc
index 3662004..2a1dadb 100644
--- a/kolab.org/www/drupal-7.15/sites/all/modules/views/plugins/views_plugin_style_list.inc
+++ b/kolab.org/www/drupal-7.15/sites/all/modules/views/plugins/views_plugin_style_list.inc
@@ -1,4 +1,5 @@
<?php
+
/**
* @file
* Contains the list style plugin.
diff --git a/kolab.org/www/drupal-7.15/sites/all/modules/views/plugins/views_plugin_style_rss.inc b/kolab.org/www/drupal-7.15/sites/all/modules/views/plugins/views_plugin_style_rss.inc
index a54eccc..27106a8 100644
--- a/kolab.org/www/drupal-7.15/sites/all/modules/views/plugins/views_plugin_style_rss.inc
+++ b/kolab.org/www/drupal-7.15/sites/all/modules/views/plugins/views_plugin_style_rss.inc
@@ -1,4 +1,5 @@
<?php
+
/**
* @file
* Contains the RSS style plugin.
@@ -70,6 +71,21 @@ class views_plugin_style_rss extends views_plugin_style {
return array();
}
+ /**
+ * Get RSS feed description.
+ *
+ * @return string
+ * The string containing the description with the tokens replaced.
+ */
+ function get_description() {
+ $description = $this->options['description'];
+
+ // Allow substitutions from the first row.
+ $description = $this->tokenize_value($description, 0);
+
+ return $description;
+ }
+
function render() {
if (empty($this->row_plugin)) {
vpr('views_plugin_style_default: Missing row plugin');
diff --git a/kolab.org/www/drupal-7.15/sites/all/modules/views/plugins/views_plugin_style_summary.inc b/kolab.org/www/drupal-7.15/sites/all/modules/views/plugins/views_plugin_style_summary.inc
index 1f705ce..5081dd6 100644
--- a/kolab.org/www/drupal-7.15/sites/all/modules/views/plugins/views_plugin_style_summary.inc
+++ b/kolab.org/www/drupal-7.15/sites/all/modules/views/plugins/views_plugin_style_summary.inc
@@ -1,4 +1,5 @@
<?php
+
/**
* @file
* Contains the default summary style plugin, which displays items in an HTML list.
diff --git a/kolab.org/www/drupal-7.15/sites/all/modules/views/plugins/views_plugin_style_summary_jump_menu.inc b/kolab.org/www/drupal-7.15/sites/all/modules/views/plugins/views_plugin_style_summary_jump_menu.inc
index 0bde6a6..5b02163 100644
--- a/kolab.org/www/drupal-7.15/sites/all/modules/views/plugins/views_plugin_style_summary_jump_menu.inc
+++ b/kolab.org/www/drupal-7.15/sites/all/modules/views/plugins/views_plugin_style_summary_jump_menu.inc
@@ -1,4 +1,5 @@
<?php
+
/**
* @file
* Contains the default summary style plugin, which displays items in an HTML list.
@@ -14,11 +15,11 @@ class views_plugin_style_summary_jump_menu extends views_plugin_style {
$options = parent::option_definition();
$options['base_path'] = array('default' => '');
- $options['count'] = array('default' => TRUE);
- $options['hide'] = array('default' => FALSE);
+ $options['count'] = array('default' => TRUE, 'bool' => TRUE);
+ $options['hide'] = array('default' => FALSE, 'bool' => TRUE);
$options['text'] = array('default' => 'Go', 'translatable' => TRUE);
$options['choose'] = array('default' => '- Choose -', 'translatable' => TRUE);
- $options['default_value'] = array('default' => FALSE);
+ $options['default_value'] = array('default' => FALSE, 'bool' => TRUE);
return $options;
}
diff --git a/kolab.org/www/drupal-7.15/sites/all/modules/views/plugins/views_plugin_style_summary_unformatted.inc b/kolab.org/www/drupal-7.15/sites/all/modules/views/plugins/views_plugin_style_summary_unformatted.inc
index 56a0024..fc46624 100644
--- a/kolab.org/www/drupal-7.15/sites/all/modules/views/plugins/views_plugin_style_summary_unformatted.inc
+++ b/kolab.org/www/drupal-7.15/sites/all/modules/views/plugins/views_plugin_style_summary_unformatted.inc
@@ -1,4 +1,5 @@
<?php
+
/**
* @file
* Contains the unformatted summary style plugin.
@@ -12,7 +13,7 @@
class views_plugin_style_summary_unformatted extends views_plugin_style_summary {
function option_definition() {
$options = parent::option_definition();
- $options['inline'] = array('default' => FALSE);
+ $options['inline'] = array('default' => FALSE, 'bool' => TRUE);
$options['separator'] = array('default' => '');
return $options;
}
diff --git a/kolab.org/www/drupal-7.15/sites/all/modules/views/plugins/views_plugin_style_table.inc b/kolab.org/www/drupal-7.15/sites/all/modules/views/plugins/views_plugin_style_table.inc
index bd090e5..98919ab 100644
--- a/kolab.org/www/drupal-7.15/sites/all/modules/views/plugins/views_plugin_style_table.inc
+++ b/kolab.org/www/drupal-7.15/sites/all/modules/views/plugins/views_plugin_style_table.inc
@@ -1,4 +1,5 @@
<?php
+
/**
* @file
* Contains the table style plugin.
@@ -29,11 +30,11 @@ class views_plugin_style_table extends views_plugin_style {
$options['columns'] = array('default' => array());
$options['default'] = array('default' => '');
$options['info'] = array('default' => array());
- $options['override'] = array('default' => TRUE);
- $options['sticky'] = array('default' => FALSE);
+ $options['override'] = array('default' => TRUE, 'bool' => TRUE);
+ $options['sticky'] = array('default' => FALSE, 'bool' => TRUE);
$options['order'] = array('default' => 'asc');
$options['summary'] = array('default' => '', 'translatable' => TRUE);
- $options['empty_table'] = array('default' => FALSE);
+ $options['empty_table'] = array('default' => FALSE, 'bool' => TRUE);
return $options;
}
diff --git a/kolab.org/www/drupal-7.15/sites/all/modules/views/plugins/views_wizard/views_ui_base_views_wizard.class.php b/kolab.org/www/drupal-7.15/sites/all/modules/views/plugins/views_wizard/views_ui_base_views_wizard.class.php
index 09d9d32..8893ab8 100644
--- a/kolab.org/www/drupal-7.15/sites/all/modules/views/plugins/views_wizard/views_ui_base_views_wizard.class.php
+++ b/kolab.org/www/drupal-7.15/sites/all/modules/views/plugins/views_wizard/views_ui_base_views_wizard.class.php
@@ -1,5 +1,13 @@
<?php
+/**
+ * @file
+ * Provides the interface and base class for Views Wizard plugins.
+ */
+
+/**
+ * Defines a common interface for Views Wizard plugins.
+ */
interface ViewsWizardInterface {
function __construct($plugin);
@@ -549,6 +557,16 @@ class ViewsUiBaseViewsWizard implements ViewsWizardInterface {
}
}
}
+
+ // If any of the displays use the table style, take sure that the fields
+ // always have a labels by unsetting the override.
+ foreach ($display_options as &$options) {
+ if ($options['style_plugin'] == 'table') {
+ foreach ($display_options['default']['fields'] as &$field) {
+ unset($field['label']);
+ }
+ }
+ }
}
/**
diff --git a/kolab.org/www/drupal-7.15/sites/all/modules/views/plugins/views_wizard/views_ui_comment_views_wizard.class.php b/kolab.org/www/drupal-7.15/sites/all/modules/views/plugins/views_wizard/views_ui_comment_views_wizard.class.php
index be8e743..09d4994 100644
--- a/kolab.org/www/drupal-7.15/sites/all/modules/views/plugins/views_wizard/views_ui_comment_views_wizard.class.php
+++ b/kolab.org/www/drupal-7.15/sites/all/modules/views/plugins/views_wizard/views_ui_comment_views_wizard.class.php
@@ -1,5 +1,13 @@
<?php
+/**
+ * @file
+ * Definition of ViewsUiCommentViewsWizard.
+ */
+
+/**
+ * Tests creating comment views with the wizard.
+ */
class ViewsUiCommentViewsWizard extends ViewsUiBaseViewsWizard {
protected function row_style_options($type) {
diff --git a/kolab.org/www/drupal-7.15/sites/all/modules/views/plugins/views_wizard/views_ui_file_managed_views_wizard.class.php b/kolab.org/www/drupal-7.15/sites/all/modules/views/plugins/views_wizard/views_ui_file_managed_views_wizard.class.php
index 9894d77..111b631 100644
--- a/kolab.org/www/drupal-7.15/sites/all/modules/views/plugins/views_wizard/views_ui_file_managed_views_wizard.class.php
+++ b/kolab.org/www/drupal-7.15/sites/all/modules/views/plugins/views_wizard/views_ui_file_managed_views_wizard.class.php
@@ -1,5 +1,13 @@
<?php
+/**
+ * @file
+ * Definition of ViewsUiFileManagedViewsWizard.
+ */
+
+/**
+ * Tests creating managed files views with the wizard.
+ */
class ViewsUiFileManagedViewsWizard extends ViewsUiBaseViewsWizard {
protected function default_display_options($form, $form_state) {
$display_options = parent::default_display_options($form, $form_state);
diff --git a/kolab.org/www/drupal-7.15/sites/all/modules/views/plugins/views_wizard/views_ui_node_revision_views_wizard.class.php b/kolab.org/www/drupal-7.15/sites/all/modules/views/plugins/views_wizard/views_ui_node_revision_views_wizard.class.php
index f465e6b..3623f53 100644
--- a/kolab.org/www/drupal-7.15/sites/all/modules/views/plugins/views_wizard/views_ui_node_revision_views_wizard.class.php
+++ b/kolab.org/www/drupal-7.15/sites/all/modules/views/plugins/views_wizard/views_ui_node_revision_views_wizard.class.php
@@ -1,7 +1,25 @@
<?php
+/**
+ * @file
+ * Definition of ViewsUiNodeRevisionViewsWizard.
+ */
+
+/**
+ * Tests creating node revision views with the wizard.
+ */
class ViewsUiNodeRevisionViewsWizard extends ViewsUiNodeViewsWizard {
+ /**
+ * Node revisions do not support full posts or teasers, so remove them.
+ */
+ protected function row_style_options($type) {
+ $options = parent::row_style_options($type);
+ unset($options['teasers']);
+ unset($options['full_posts']);
+ return $options;
+ }
+
protected function default_display_options($form, $form_state) {
$display_options = parent::default_display_options($form, $form_state);
diff --git a/kolab.org/www/drupal-7.15/sites/all/modules/views/plugins/views_wizard/views_ui_node_views_wizard.class.php b/kolab.org/www/drupal-7.15/sites/all/modules/views/plugins/views_wizard/views_ui_node_views_wizard.class.php
index 14f97f6..010220e 100644
--- a/kolab.org/www/drupal-7.15/sites/all/modules/views/plugins/views_wizard/views_ui_node_views_wizard.class.php
+++ b/kolab.org/www/drupal-7.15/sites/all/modules/views/plugins/views_wizard/views_ui_node_views_wizard.class.php
@@ -1,5 +1,13 @@
<?php
+/**
+ * @file
+ * Definition of ViewsUiNodeViewsWizard.
+ */
+
+/**
+ * Tests creating node views with the wizard.
+ */
class ViewsUiNodeViewsWizard extends ViewsUiBaseViewsWizard {
protected function row_style_options($type) {
diff --git a/kolab.org/www/drupal-7.15/sites/all/modules/views/plugins/views_wizard/views_ui_taxonomy_term_views_wizard.class.php b/kolab.org/www/drupal-7.15/sites/all/modules/views/plugins/views_wizard/views_ui_taxonomy_term_views_wizard.class.php
index 6310e8c..4f05548 100644
--- a/kolab.org/www/drupal-7.15/sites/all/modules/views/plugins/views_wizard/views_ui_taxonomy_term_views_wizard.class.php
+++ b/kolab.org/www/drupal-7.15/sites/all/modules/views/plugins/views_wizard/views_ui_taxonomy_term_views_wizard.class.php
@@ -1,5 +1,13 @@
<?php
+/**
+ * @file
+ * Definition of ViewsUiTaxonomyTermViewsWizard.
+ */
+
+/**
+ * Tests creating taxonomy views with the wizard.
+ */
class ViewsUiTaxonomyTermViewsWizard extends ViewsUiBaseViewsWizard {
protected function default_display_options($form, $form_state) {
diff --git a/kolab.org/www/drupal-7.15/sites/all/modules/views/plugins/views_wizard/views_ui_users_views_wizard.class.php b/kolab.org/www/drupal-7.15/sites/all/modules/views/plugins/views_wizard/views_ui_users_views_wizard.class.php
index 1134a24..73eff48 100644
--- a/kolab.org/www/drupal-7.15/sites/all/modules/views/plugins/views_wizard/views_ui_users_views_wizard.class.php
+++ b/kolab.org/www/drupal-7.15/sites/all/modules/views/plugins/views_wizard/views_ui_users_views_wizard.class.php
@@ -1,5 +1,13 @@
<?php
+/**
+ * @file
+ * Definition of ViewsUiUsersViewsWizard.
+ */
+
+/**
+ * Tests creating user views with the wizard.
+ */
class ViewsUiUsersViewsWizard extends ViewsUiBaseViewsWizard {
protected function default_display_options($form, $form_state) {
$display_options = parent::default_display_options($form, $form_state);