Update Drupal 7 dependencies

This commit is contained in:
Mauricio Dinarte 2025-06-03 10:37:00 -06:00 committed by Janez Urevc
parent 7d902ba1ef
commit 13df912654
391 changed files with 2900 additions and 1502 deletions

View file

@ -0,0 +1,38 @@
################
# GitLabCI template for Drupal projects.
#
# This template is designed to give any Contrib maintainer everything they need to test, without requiring modification.
# It is also designed to keep up to date with Core Development automatically through the use of include files that can be centrally maintained.
# As long as you include the project, ref and three files below, any future updates added by the Drupal Association will be used in your
# pipelines automatically. However, you can modify this template if you have additional needs for your project.
# The full documentation is on https://project.pages.drupalcode.org/gitlab_templates/
################
# For information on alternative values for 'ref' see https://project.pages.drupalcode.org/gitlab_templates/info/templates-version/
# To test a Drupal 7 project, change the first include filename from .main.yml to .main-d7.yml
include:
- project: $_GITLAB_TEMPLATES_REPO
ref: $_GITLAB_TEMPLATES_REF
file:
- "/includes/include.drupalci.main-d7.yml"
- "/includes/include.drupalci.variables.yml"
- "/includes/include.drupalci.workflows.yml"
################
# Pipeline configuration variables are defined with default values and descriptions in the file
# https://git.drupalcode.org/project/gitlab_templates/-/blob/main/includes/include.drupalci.variables.yml
# Uncomment the lines below if you want to override any of the variables. The following is just an example.
################
# variables:
# SKIP_ESLINT: '1'
# OPT_IN_TEST_NEXT_MAJOR: '1'
# _CURL_TEMPLATES_REF: 'main'
variables:
_D7_DRUPAL_TEST_DEPENDENCIES: "i18n variable rules"
_SHOW_ENVIRONMENT_VARIABLES: 1
_PHPUNIT_CONCURRENT: 1
OPT_IN_TEST_CURRENT: 1
_TARGET_PHP: 7.4
OPT_IN_TEST_MAX_PHP: 1

View file

@ -30,6 +30,9 @@ function entity_features_get_controller($type) {
class EntityDefaultFeaturesController {
protected $type, $info;
protected $statusKey;
protected $moduleKey;
protected $bundleKey;
public function __construct($type) {
$this->type = $type;

View file

@ -33,8 +33,8 @@ files[] = views/handlers/entity_views_handler_relationship_by_bundle.inc
files[] = views/handlers/entity_views_handler_relationship.inc
files[] = views/plugins/entity_views_plugin_row_entity_view.inc
; Information added by Drupal.org packaging script on 2021-11-20
version = "7.x-1.10"
; Information added by Drupal.org packaging script on 2024-07-14
version = "7.x-1.11"
core = "7.x"
project = "entity"
datestamp = "1637434458"
datestamp = "1720924769"

View file

@ -220,6 +220,11 @@ class EntityDefaultExtraFieldsController implements EntityExtraFieldsControllerI
*/
protected $entityInfo;
/**
* @var array
*/
protected $propertyInfo;
/**
* Constructor.
*/

View file

@ -9,6 +9,14 @@
* Common parent class containing common helpers.
*/
abstract class EntityWebTestCase extends DrupalWebTestCase {
protected $admin_user;
protected $taxonomy_vocabulary;
protected $user;
protected $node;
protected $instance;
protected $field_id;
protected $field;
protected $field_name;
/**
* Creates a new vocabulary.
@ -541,6 +549,8 @@ class EntityAPIRulesIntegrationTestCase extends EntityWebTestCase {
* Tests comments with node access.
*/
class EntityAPICommentNodeAccessTestCase extends CommentHelperCase {
protected $accessUser;
protected $noAccessUser;
public static function getInfo() {
return array(
@ -604,7 +614,7 @@ class EntityAPIi18nItegrationTestCase extends EntityWebTestCase {
}
protected function setUp() {
parent::setUp('entity_test_i18n');
parent::setUp('entity', 'entity_test', 'entity_test_i18n', 'i18n', 'variable', 'i18n_string', 'locale');
$this->admin_user = $this->drupalCreateUser(array('bypass node access', 'administer nodes', 'administer languages', 'administer content types', 'administer blocks', 'access administration pages'));
$this->drupalLogin($this->admin_user);
$this->addLanguage('de');

View file

@ -5,8 +5,8 @@ core = 7.x
files[] = entity_token.tokens.inc
; Information added by Drupal.org packaging script on 2021-11-20
version = "7.x-1.10"
; Information added by Drupal.org packaging script on 2024-07-14
version = "7.x-1.11"
core = "7.x"
project = "entity"
datestamp = "1637434458"
datestamp = "1720924769"

View file

@ -188,6 +188,7 @@ interface EntityInterface {
* public $count = 0;
* @endcode
*/
#[\AllowDynamicProperties]
class Entity implements EntityInterface {
protected $entityType;

View file

@ -16,6 +16,7 @@ class EntityDefaultUIController {
protected $entityType;
protected $entityInfo, $path;
protected $id_count;
protected $statusKey;
/**
* Defines the number of entries to show per page in overview table.

View file

@ -6,8 +6,8 @@ hidden = TRUE
files[] = entity_feature.module
; Information added by Drupal.org packaging script on 2021-11-20
version = "7.x-1.10"
; Information added by Drupal.org packaging script on 2024-07-14
version = "7.x-1.11"
core = "7.x"
project = "entity"
datestamp = "1637434458"
datestamp = "1720924769"

View file

@ -7,8 +7,8 @@ hidden = TRUE
files[] = entity_test.module
files[] = entity_test.install
; Information added by Drupal.org packaging script on 2021-11-20
version = "7.x-1.10"
; Information added by Drupal.org packaging script on 2024-07-14
version = "7.x-1.11"
core = "7.x"
project = "entity"
datestamp = "1637434458"
datestamp = "1720924769"

View file

@ -6,8 +6,8 @@ dependencies[] = i18n:i18n_string
core = 7.x
hidden = TRUE
; Information added by Drupal.org packaging script on 2021-11-20
version = "7.x-1.10"
; Information added by Drupal.org packaging script on 2024-07-14
version = "7.x-1.11"
core = "7.x"
project = "entity"
datestamp = "1637434458"
datestamp = "1720924769"

View file

@ -0,0 +1,111 @@
################
# DrupalCI GitLabCI template
#
# Gitlab-ci.yml to replicate DrupalCI testing for Contrib
#
# With thanks to:
# * The GitLab Acceleration Initiative participants
# * DrupalSpoons
################
################
# Guidelines
#
# This template is designed to give any Contrib maintainer everything they need to test, without requiring modification. It is also designed to keep up to date with Core Development automatically through the use of include files that can be centrally maintained.
#
# However, you can modify this template if you have additional needs for your project.
################
################
# Includes
#
# Additional configuration can be provided through includes.
# One advantage of include files is that if they are updated upstream, the changes affect all pipelines using that include.
#
# Includes can be overridden by re-declaring anything provided in an include, here in gitlab-ci.yml
# https://docs.gitlab.com/ee/ci/yaml/includes.html#override-included-configuration-values
################
include:
################
# DrupalCI includes:
# As long as you include this, any future includes added by the Drupal Association will be accessible to your pipelines automatically.
# View these include files at https://git.drupalcode.org/project/gitlab_templates/
################
- project: $_GITLAB_TEMPLATES_REPO
# "ref" value can be:
# - Recommended (default) - `ref: $_GITLAB_TEMPLATES_REF` - The Drupal Association will update this value to the recommended tag for contrib.
# - Latest - `ref: main` - Get the latest additions and bug fixes as they are merged into the templates.
# - Minor or Major latests - `ref: 1.x-latest` or `ref: 1.0.x-latest` - Get the latest additions within a minor (mostly bugfixes) or major (bugs and new features).
# - Fixed tag - `ref: 1.0.1` - Set the value to a known tag. This will not get any updates.
ref: $_GITLAB_TEMPLATES_REF
file:
# - '/includes/include.drupalci.main.yml'
# EXPERIMENTAL: For Drupal 7, remove the above line and uncomment the below.
- '/includes/include.drupalci.main-d7.yml'
- '/includes/include.drupalci.variables.yml'
- '/includes/include.drupalci.workflows.yml'
################
# Pipeline configuration variables
#
# These are the variables provided to the Run Pipeline form that a user may want to override.
#
# Docs at https://git.drupalcode.org/project/gitlab_templates/-/blob/1.0.x/includes/include.drupalci.variables.yml
################
variables:
# Ignore some coder tests because Views is older than the coding standards:
# * Drupal.NamingConventions.ValidFunctionNam
# * Drupal.NamingConventions.ValidClassName
# Disable these for compatibility with PHP 5:
# * Drupal.Commenting.DocCommentLongArraySyntax
# * SlevomatCodingStandard.ControlStructures.RequireNullCoalesceOperator
# * SlevomatCodingStandard.PHP.ShortList
_PHPCS_EXTRA: "--exclude=Drupal.NamingConventions.ValidFunctionName,Drupal.NamingConventions.ValidClassName,Drupal.Commenting.DocCommentLongArraySyntax,SlevomatCodingStandard.ControlStructures.RequireNullCoalesceOperator,SlevomatCodingStandard.PHP.ShortList"
###################################################################################
#
# *
# /(
# ((((,
# /(((((((
# ((((((((((*
# ,(((((((((((((((
# ,(((((((((((((((((((
# ((((((((((((((((((((((((*
# *(((((((((((((((((((((((((((((
# ((((((((((((((((((((((((((((((((((*
# *(((((((((((((((((( .((((((((((((((((((
# ((((((((((((((((((. /(((((((((((((((((*
# /((((((((((((((((( .(((((((((((((((((,
# ,(((((((((((((((((( ((((((((((((((((((
# .(((((((((((((((((((( .(((((((((((((((((
# ((((((((((((((((((((((( ((((((((((((((((/
# (((((((((((((((((((((((((((/ ,(((((((((((((((*
# .((((((((((((((/ /(((((((((((((. ,(((((((((((((((
# *(((((((((((((( ,(((((((((((((/ *((((((((((((((.
# ((((((((((((((, /(((((((((((((. ((((((((((((((,
# (((((((((((((/ ,(((((((((((((* ,(((((((((((((,
# *((((((((((((( .((((((((((((((( ,(((((((((((((
# ((((((((((((/ /((((((((((((((((((. ,((((((((((((/
# ((((((((((((( *(((((((((((((((((((((((* *((((((((((((
# ((((((((((((( ,(((((((((((((..((((((((((((( *((((((((((((
# ((((((((((((, /((((((((((((* /((((((((((((/ ((((((((((((
# ((((((((((((( /((((((((((((/ (((((((((((((* ((((((((((((
# (((((((((((((/ /(((((((((((( ,((((((((((((, *((((((((((((
# (((((((((((((( *(((((((((((/ *((((((((((((. ((((((((((((/
# *((((((((((((((((((((((((((, /(((((((((((((((((((((((((
# ((((((((((((((((((((((((( ((((((((((((((((((((((((,
# .(((((((((((((((((((((((/ ,(((((((((((((((((((((((
# ((((((((((((((((((((((/ ,(((((((((((((((((((((/
# *((((((((((((((((((((( (((((((((((((((((((((,
# ,(((((((((((((((((((((, ((((((((((((((((((((/
# ,(((((((((((((((((((((* /((((((((((((((((((((
# ((((((((((((((((((((((, ,/((((((((((((((((((((,
# ,(((((((((((((((((((((((((((((((((((((((((((((((((((
# .(((((((((((((((((((((((((((((((((((((((((((((
# .((((((((((((((((((((((((((((((((((((,.
# .,(((((((((((((((((((((((((.
#
###################################################################################

View file

@ -883,7 +883,7 @@ ul#views-display-menu-tabs li.add ul.action-list li {
/* @group Configure filter criteria */
/* @todo the width and border info could be moved into a more generic class */
/* @todo The width and border info could be moved into a more generic class. */
/* @todo Make this a class to be used anywhere there's node types? */
.form-type-checkboxes #edit-options-value,
.form-type-checkboxes #edit-options-validate-options-node-types {

View file

@ -147,7 +147,7 @@ function views_revert_views() {
// If the user specified a list of views on the CLI, revert those.
elseif (!empty($viewnames)) {
foreach ($viewnames as $key => $viewname) {
foreach ($viewnames as $viewname) {
$is_overridden = array_key_exists($viewname, $overridden);
// Check if the provided view name is in the system.
@ -273,7 +273,6 @@ function views_development_settings() {
drush_log($message, 'success');
}
/**
* Callback function for views-list command.
*/
@ -334,7 +333,7 @@ function drush_views_list() {
);
// Setup a row for each view.
foreach ($views as $id => $view) {
foreach ($views as $view) {
// If options were specified, check that first mismatch push the loop to
// the next view.
if ($with_tags && !in_array($view->tag, $tags)) {
@ -496,7 +495,7 @@ function _views_drush_changestatus($viewnames = array(), $status = NULL) {
$processed = $status ? dt('disabled') : dt('enabled');
$views_status = variable_get('views_defaults', array());
foreach ($viewnames as $key => $viewname) {
foreach ($viewnames as $viewname) {
if ($views_status[$viewname] !== $status) {
$views_status[$viewname] = $status;
$changed = TRUE;

View file

@ -76,7 +76,7 @@ class views_handler_area_result extends views_handler_area {
'@per_page',
'@current_page',
'@current_record_count',
'@page_count'
'@page_count',
)),
'#dependency' => array('edit-options-format-plural' => array(TRUE)),
);
@ -135,12 +135,12 @@ class views_handler_area_result extends views_handler_area {
);
$replacements = array();
foreach ($items as $item) {
$replacements["@$item"] = ${$item};
$replacements["@$item"] = $$item;
}
// If the format_plural option is selected,
// If the format_plural option is selected..
if (
!empty($this->options['format_plural'])
// and the format_plural_count token is not "@end":
// And the format_plural_count token is not "@end":
&& $replacements[$this->options['format_plural_count']] != 1
) {
$format = $this->options['format_plural_plural'];

View file

@ -61,7 +61,7 @@ class views_handler_area_text extends views_handler_area {
$count = 0;
// This lets us prepare the key as we want it printed.
foreach ($this->view->display_handler->get_handlers('argument') as $arg => $handler) {
foreach ($this->view->display_handler->get_handlers('argument') as $handler) {
$options[t('Arguments')]['%' . ++$count] = t('@argument title', array('@argument' => $handler->ui_name()));
$options[t('Arguments')]['!' . $count] = t('@argument input', array('@argument' => $handler->ui_name()));
}

View file

@ -67,7 +67,7 @@ class views_handler_area_view extends views_handler_area {
/**
* Loads the used view for rendering.
*
* @return \view|NULL
* @return \view|null
* The loaded view or NULL, in case the view was not loadable / recursion
* got detected / access got denied.
*/

View file

@ -93,10 +93,6 @@ class views_handler_argument_date extends views_handler_argument_formula {
// Only use a special behaviour for the special argument types, else just
// use the default behaviour.
if ($option == 'default_argument_type') {
$type = 'argument default';
$option_name = 'default_argument_options';
$plugin = $this->get_plugin($type);
$name = $this->options[$option];
if (in_array($name, array('date', 'node_created', 'node_changed'))) {

View file

@ -41,7 +41,7 @@ class views_handler_argument_formula extends views_handler_argument {
}
/**
* Build the summary query based on a formula
* Build the summary query based on a formula.
*/
public function summary_query() {
$this->ensure_my_table();
@ -56,7 +56,7 @@ class views_handler_argument_formula extends views_handler_argument {
}
/**
* Build the query based upon the formula
* Build the query based upon the formula.
*/
public function query($group_by = FALSE) {
$this->ensure_my_table();

View file

@ -65,7 +65,7 @@ class views_handler_argument_many_to_one extends views_handler_argument {
public function options_form(&$form, &$form_state) {
parent::options_form($form, $form_state);
// allow + for or, , for and
// Allow + for or, , for and.
if (!empty($this->definition['numeric'])) {
$form['break_phrase'] = array(
'#type' => 'checkbox',
@ -150,8 +150,7 @@ class views_handler_argument_many_to_one extends views_handler_argument {
$this->operator = 'or';
}
// @todo -- both of these should check definition for alternate keywords.
// @todo Both of these should check definition for alternate keywords.
if (empty($this->value)) {
return !empty($this->definition['empty field name']) ? $this->definition['empty field name'] : t('Uncategorized');
}

View file

@ -16,12 +16,14 @@ class views_handler_argument_numeric extends views_handler_argument {
/**
* The operator used for the query: or|and.
*
* @var string
*/
public $operator;
/**
* The actual value which is used for querying.
*
* @var array
*/
public $value;
@ -44,7 +46,7 @@ class views_handler_argument_numeric extends views_handler_argument {
public function options_form(&$form, &$form_state) {
parent::options_form($form, $form_state);
// allow + for or, , for and
// Allow + for or, , for and.
$form['break_phrase'] = array(
'#type' => 'checkbox',
'#title' => t('Allow multiple values'),
@ -93,7 +95,7 @@ class views_handler_argument_numeric extends views_handler_argument {
* Override for specific title lookups.
*
* @return array
* Returns all titles, if it's just one title it's an array with one entry.
* Returns all titles, if it's just one title it's an array with one entry.
*/
public function title_query() {
return $this->value;

View file

@ -125,7 +125,7 @@ class views_handler_argument_string extends views_handler_argument {
);
}
// allow + for or, , for and
// Allow + for or, , for and.
$form['break_phrase'] = array(
'#type' => 'checkbox',
'#title' => t('Allow multiple values'),
@ -179,7 +179,7 @@ class views_handler_argument_string extends views_handler_argument {
}
/**
* Build the query based upon the formula
* Build the query based upon the formula.
*/
public function query($group_by = FALSE) {
$argument = $this->argument;

View file

@ -21,7 +21,7 @@ define('VIEWS_HANDLER_RENDER_TEXT_PHASE_SINGLE_ITEM', 0);
/**
* Indicator of the render_text() method for rendering the whole element.
*
* if no render_item() method is available.
* If no render_item() method is available.
*/
define('VIEWS_HANDLER_RENDER_TEXT_PHASE_COMPLETELY', 1);
@ -76,7 +76,7 @@ class views_handler_field extends views_handler {
/**
* Keeps track of the last render index.
*
* @var int|NULL
* @var int|null
*/
protected $last_render_index = NULL;
@ -323,6 +323,7 @@ class views_handler_field extends views_handler {
$class = $this->tokenize_value($class, $row_index);
$class = views_clean_css_identifier($class);
}
unset($class);
return implode(' ', $classes);
}
@ -372,6 +373,7 @@ class views_handler_field extends views_handler {
$class = $this->tokenize_value($class, $row_index);
$class = views_clean_css_identifier($class);
}
unset($class);
return implode(' ', $classes);
}
@ -384,6 +386,7 @@ class views_handler_field extends views_handler {
$class = $this->tokenize_value($class, $row_index);
$class = views_clean_css_identifier($class);
}
unset($class);
return implode(' ', $classes);
}
@ -760,7 +763,7 @@ class views_handler_field extends views_handler {
'#description' => t('Space-separated list of characters to remove from the URL path'),
'#default_value' => $this->options['alter']['unwanted_characters'],
'#dependency' => array(
'edit-options-alter-make-link' => array(1)
'edit-options-alter-make-link' => array(1),
),
'#maxlength' => 255,
);
@ -835,7 +838,6 @@ class views_handler_field extends views_handler {
),
);
// Get a list of the available fields and arguments for token replacement.
$options = array();
foreach ($this->view->display_handler->get_handlers('field') as $field => $handler) {
@ -847,7 +849,7 @@ class views_handler_field extends views_handler {
}
// This lets us prepare the key as we want it printed.
$count = 0;
foreach ($this->view->display_handler->get_handlers('argument') as $arg => $handler) {
foreach ($this->view->display_handler->get_handlers('argument') as $handler) {
$options[t('Arguments')]['%' . ++$count] = t('@argument title', array('@argument' => $handler->ui_name()));
$options[t('Arguments')]['!' . $count] = t('@argument input', array('@argument' => $handler->ui_name()));
}
@ -1045,7 +1047,7 @@ If you would like to have the characters \'[\' and \']\' please use the html ent
}
/**
* Provide extra data to the administration form
* Provide extra data to the administration form.
*/
public function admin_summary() {
return $this->label();
@ -1103,7 +1105,6 @@ If you would like to have the characters \'[\' and \']\' please use the html ent
}
if ($this->allow_advanced_render()) {
$tokens = NULL;
if (method_exists($this, 'render_item')) {
$items = array();
foreach ($raw_items as $count => $item) {
@ -1381,7 +1382,7 @@ If you would like to have the characters \'[\' and \']\' please use the html ent
}
$alt = strtr($alter['alt'], $tokens);
// Set the title attribute of the link only if it improves accessibility
// Set the title attribute of the link only if it improves accessibility.
if ($alt && $alt != $text) {
$options['attributes']['title'] = decode_entities($alt);
}
@ -1460,7 +1461,7 @@ If you would like to have the characters \'[\' and \']\' please use the html ent
$tokens = $this->view->build_info['substitutions'];
}
$count = 0;
foreach ($this->view->display_handler->get_handlers('argument') as $arg => $handler) {
foreach ($this->view->display_handler->get_handlers('argument') as $handler) {
$token = '%' . ++$count;
if (!isset($tokens[$token])) {
$tokens[$token] = '';
@ -1721,6 +1722,7 @@ class views_handler_field_file_size extends views_handler_field {
switch ($this->options['file_size_display']) {
case 'bytes':
return $value;
case 'formatted':
default:
return format_size($value);

View file

@ -36,7 +36,7 @@ class views_handler_field_date extends views_handler_field {
public function options_form(&$form, &$form_state) {
$date_formats = array();
$date_types = system_get_date_types();
foreach ($date_types as $key => $value) {
foreach ($date_types as $value) {
$date_formats[$value['type']] = t('@date_format format', array('@date_format' => $value['title'])) . ': ' . format_date(REQUEST_TIME, $value['type']);
}
@ -94,7 +94,9 @@ class views_handler_field_date extends views_handler_field {
// correct left margin to the element's wrapper.
'#dependency' => array(
// This condition is handled by form API's states.
// @code
// 'edit-options-date-format' => array('today time ago'),
// @endcode
'edit-options-second-date-format' => array('custom'),
),
);

View file

@ -7,6 +7,7 @@
/**
* Field handler whichs allows to show machine name content as human name.
*
* @ingroup views_field_handlers
*
* Definition items:
@ -17,7 +18,9 @@
class views_handler_field_machine_name extends views_handler_field {
/**
* @var array Stores the available options.
* Stores the available options.
*
* @var array
*/
public $value_options;

View file

@ -6,7 +6,7 @@
*/
/**
* Render a mathematical expression as a numeric value
* Render a mathematical expression as a numeric value.
*
* Definition terms:
* - float: If true this field contains a decimal value. If unset this field
@ -55,7 +55,7 @@ class views_handler_field_math extends views_handler_field_numeric {
$tokens = array_map('floatval', $this->get_render_tokens(array()));
$value = strtr($this->options['expression'], $tokens);
$expressions = explode(';', $value);
$math = new ctools_math_expr;
$math = new ctools_math_expr();
foreach ($expressions as $expression) {
if ($expression !== '') {
$value = $math->evaluate($expression);

View file

@ -132,6 +132,8 @@ class views_handler_field_numeric extends views_handler_field {
$value = number_format($value, $this->options['precision'], $this->options['decimal'], $this->options['separator']);
}
else {
// Only accept numerical values.
$value = isset($value) && is_numeric($value) ? $value : 0;
$point_position = strpos($value, '.');
$remainder = ($point_position === FALSE) ? '' : substr($value, $point_position + 1);
$value = $value > 0 ? floor((float) $value) : ceil((float) $value);

View file

@ -142,7 +142,7 @@ class views_handler_field_prerender_list extends views_handler_field {
* @param string $field
* Optional name of the field where the value is stored.
* @param bool $raw
* Use the raw data and not the data defined in pre_render
* Use the raw data and not the data defined in pre_render.
*/
public function get_value($values, $field = NULL, $raw = FALSE) {
if ($raw) {

View file

@ -6,7 +6,7 @@
*/
/**
* Simple filter to handle matching of boolean values
* Simple filter to handle matching of boolean values.
*
* Definition items:
* - label: (REQUIRED) The label for the checkbox.

View file

@ -105,6 +105,7 @@ class views_handler_filter_entity_bundle extends views_handler_filter_in_operato
foreach ($this->value as &$value) {
$value = str_replace('comment_node_', '', $value);
}
unset($value);
}
elseif ($this->entity_type == 'taxonomy_term') {
$join = new views_join();

View file

@ -6,7 +6,7 @@
*/
/**
* Simple filter to handle greater than/less than filters
* Simple filter to handle greater than/less than filters.
*
* @ingroup views_filter_handlers
*/

View file

@ -126,7 +126,7 @@ class views_handler_filter_in_operator extends views_handler_filter {
'values' => 1,
),
);
// if the definition allows for the empty operator, add it.
// If the definition allows for the empty operator, add it.
if (!empty($this->definition['allow empty'])) {
$operators += array(
'empty' => array(
@ -312,11 +312,9 @@ class views_handler_filter_in_operator extends views_handler_filter {
// was not set, and the key to the checkbox if it is set.
// Unfortunately, this means that if the key to that checkbox is 0,
// we are unable to tell if that checkbox was set or not.
// Luckily, the '#value' on the checkboxes form actually contains
// *only* a list of checkboxes that were set, and we can use that
// instead.
$form_state['values']['options']['value'] = $form['value']['#value'];
}

View file

@ -88,7 +88,7 @@ class views_handler_filter_many_to_one extends views_handler_filter_in_operator
'ensure_my_table' => 'helper',
),
);
// if the definition allows for the empty operator, add it.
// If the definition allows for the empty operator, add it.
if (!empty($this->definition['allow empty'])) {
$operators += array(
'empty' => array(

View file

@ -6,7 +6,7 @@
*/
/**
* Simple filter to handle greater than/less than filters
* Simple filter to handle greater than/less than filters.
*
* @ingroup views_filter_handlers
*/
@ -89,7 +89,7 @@ class views_handler_filter_numeric extends views_handler_filter {
),
);
// if the definition allows for the empty operator, add it.
// If the definition allows for the empty operator, add it.
if (!empty($this->definition['allow empty'])) {
$operators += array(
'empty' => array(
@ -129,7 +129,7 @@ class views_handler_filter_numeric extends views_handler_filter {
}
/**
* Provide a list of all the numeric operators
* Provide a list of all the numeric operators.
*/
public function operator_options($which = 'title') {
$options = array();
@ -155,7 +155,7 @@ class views_handler_filter_numeric extends views_handler_filter {
}
/**
* Provide a simple textfield for equality
* Provide a simple textfield for equality.
*/
public function value_form(&$form, &$form_state) {
$form['value']['#tree'] = TRUE;
@ -178,14 +178,14 @@ class views_handler_filter_numeric extends views_handler_filter {
$operator_values_with_2_values = $this->operator_values(2);
if ($limit_operators) {
// If limit operators is enabled, check that at least one operator
// with two values is enabled to display the min max widgets
// with two values is enabled to display the min max widgets.
foreach ($operator_values_with_2_values as $operator) {
if (isset($this->options['expose']['available_operators'][$operator])) {
$use_minmax = TRUE;
break;
}
}
// the same for operators with one value
// The same for operators with one value.
foreach ($operator_values_with_1_values as $operator) {
if (isset($this->options['expose']['available_operators'][$operator])) {
$use_value = TRUE;
@ -199,7 +199,7 @@ class views_handler_filter_numeric extends views_handler_filter {
$identifier = $this->options['expose']['identifier'];
if (empty($this->options['expose']['use_operator']) || empty($this->options['expose']['operator_id'])) {
// exposed and locked.
// Exposed and locked.
$which = in_array($this->operator, $operator_values_with_2_values) ? 'minmax' : 'value';
}
else {
@ -274,7 +274,7 @@ class views_handler_filter_numeric extends views_handler_filter {
// Ensure there is something in the 'value'.
$form['value'] = array(
'#type' => 'value',
'#value' => NULL
'#value' => NULL,
);
}
}
@ -393,16 +393,16 @@ class views_handler_filter_numeric extends views_handler_filter {
if (empty($this->options['expose']['required'])) {
// We have to do some of our own checking for non-required filters.
$info = $this->operators();
if (!empty($info[$this->operator]['values'])) {
if (!empty($info[$this->operator]['values']) && is_array($value)) {
switch ($info[$this->operator]['values']) {
case 1:
if ($value['value'] === '') {
if (array_key_exists('value', $value) && $value['value'] === '') {
return FALSE;
}
break;
case 2:
if ($value['min'] === '' && $value['max'] === '') {
if (array_key_exists('min', $value) && $value['min'] === '' && array_key_exists('max', $value) && $value['max'] === '') {
return FALSE;
}
break;

View file

@ -210,7 +210,7 @@ class views_handler_filter_string extends views_handler_filter {
$identifier = $this->options['expose']['identifier'];
if (empty($this->options['expose']['use_operator']) || empty($this->options['expose']['operator_id'])) {
// exposed and locked.
// Exposed and locked.
$which = in_array($this->operator, $this->operator_values(1)) ? 'value' : 'none';
}
else {
@ -299,7 +299,7 @@ class views_handler_filter_string extends views_handler_filter {
preg_match_all('/ (-?)("[^"]+"|[^" ]+)/i', ' ' . $this->value, $matches, PREG_SET_ORDER);
foreach ($matches as $match) {
$phrase = FALSE;
// Strip off phrase quotes
// Strip off phrase quotes.
if ($match[2][0] == '"') {
$match[2] = substr($match[2], 1, -1);
$phrase = TRUE;
@ -307,7 +307,6 @@ class views_handler_filter_string extends views_handler_filter {
$words = trim($match[2], ',?!();:-');
$words = $phrase ? array($words) : preg_split('/ /', $words, -1, PREG_SPLIT_NO_EMPTY);
foreach ($words as $word) {
$placeholder = $this->placeholder();
$where->condition($field, '%' . db_like(trim($word, " ,!?")) . '%', 'LIKE');
}
}

View file

@ -67,7 +67,6 @@ class views_handler_relationship extends views_handler {
public function option_definition() {
$options = parent::option_definition();
// Relationships definitions should define a default label, but if they
// aren't get another default value.
if (!empty($this->definition['label'])) {

View file

@ -183,7 +183,7 @@ class views_handler_relationship_groupwise_max extends views_handler_relationshi
* - subquery_order: either ASC or DESC.
*
* @return string
* The subquery SQL string, ready for use in the main query.
* The subquery SQL string, ready for use in the main query.
*/
public function left_query($options) {
// Either load another view, or create one on the fly.
@ -212,8 +212,6 @@ class views_handler_relationship_groupwise_max extends views_handler_relationshi
$temp_view->args[] = '**CORRELATED**';
// Add the base table ID field.
$views_data = views_fetch_data($this->definition['base']);
$base_field = $views_data['table']['base']['field'];
$temp_view->add_item('default', 'field', $this->definition['base'], $this->definition['field']);
// Add the correct argument for our relationship's base ie the "how to get
@ -222,7 +220,7 @@ class views_handler_relationship_groupwise_max extends views_handler_relationshi
$temp_view->add_item(
'default',
'argument',
// For example, 'term_node',
// For example, 'term_node'.
$this->definition['argument table'],
// For example, 'tid'.
$this->definition['argument field']
@ -332,6 +330,7 @@ class views_handler_relationship_groupwise_max extends views_handler_relationshi
}
}
}
unset($condition);
}
/**
@ -382,7 +381,7 @@ class views_handler_relationship_groupwise_max extends views_handler_relationshi
}
if (!empty($def['join_handler']) && class_exists($def['join_handler'])) {
$join = new $def['join_handler'];
$join = new $def['join_handler']();
}
else {
$join = new views_join_subquery();

View file

@ -51,7 +51,7 @@ class views_handler_sort extends views_handler {
}
/**
* Display whether or not the sort order is ascending or descending
* Display whether or not the sort order is ascending or descending.
*/
public function admin_summary() {
if (!empty($this->options['exposed'])) {
@ -70,7 +70,7 @@ class views_handler_sort extends views_handler {
}
/**
* Basic options for all sort criteria
* Basic options for all sort criteria.
*/
public function options_form(&$form, &$form_state) {
parent::options_form($form, $form_state);

View file

@ -822,7 +822,7 @@ function views_ui_taxonomy_autocomplete_validate($element, &$form_state) {
/**
* Theme function; returns basic administrative information about a view.
*
* TODO: template + preprocess.
* @todo Template + preprocess.
*/
function theme_views_ui_view_info($variables) {
$view = $variables['view'];
@ -1107,7 +1107,7 @@ function views_ui_edit_form($form, &$form_state, $view, $display_id = NULL) {
$form['displays'] = array(
'#prefix' => '<h1 class="unit-title clearfix">' . t('Displays') . "</h1>\n"
. '<div class="views-displays">',
. '<div class="views-displays">',
'#suffix' => '</div>',
);
@ -1518,9 +1518,9 @@ function views_ui_edit_form_submit_delay_destination($form, &$form_state) {
* for setting the active tab's #active property to TRUE.
*
* @param view $view
* The view which will be edited.
* The view which will be edited.
* @param string $display_id
* The display_id which is edited on the current request.
* The display_id which is edited on the current request.
*/
function views_ui_edit_page_display_tabs(view $view, $display_id = NULL) {
$tabs = array();
@ -1586,8 +1586,7 @@ function views_ui_get_display_tab($view, $display_id) {
// If the plugin doesn't exist, display an error message instead of an edit
// page.
if (empty($display->handler)) {
$title = isset($display->display_title) ? $display->display_title : t('Invalid');
// @todo: Improved UX for the case where a plugin is missing.
// @todo Improved UX for the case where a plugin is missing.
$build['#markup'] = t("Error: Display @display refers to a plugin named '@plugin', but that plugin is not available.", array('@display' => $display->id, '@plugin' => $display->display_plugin));
}
// Build the content of the edit page.
@ -1627,7 +1626,7 @@ function views_ui_get_display_tab_details($view, $display) {
$is_deletable = empty($plugin['no remove']);
// The master display cannot be cloned.
$is_default = $display->id == 'default';
// @todo: Figure out why get_option doesn't work here.
// @todo Figure out why get_option doesn't work here.
$is_enabled = $display->handler->get_option('enabled');
if (!$is_display_deleted && $is_deletable && !$is_default) {
@ -1642,7 +1641,7 @@ function views_ui_get_display_tab_details($view, $display) {
}
// Display warning if argument handler has exception overriding validation.
foreach ($display->handler->get_handlers('argument') as $arg => $handler) {
foreach ($display->handler->get_handlers('argument') as $handler) {
if (!empty($handler->options['exception']['value']) && $handler->options['specify_validation'] && !empty($handler->options['validate_options'])) {
$build['message']['validation_warning'] = array(
'#theme_wrappers' => array('container'),
@ -1925,7 +1924,7 @@ function views_ui_edit_form_get_build_from_option($id, $option, $view, $display)
}
/**
*
*
*/
function template_preprocess_views_ui_display_tab_setting(&$variables) {
static $zebra = 0;
@ -1954,7 +1953,7 @@ function template_preprocess_views_ui_display_tab_setting(&$variables) {
}
/**
*
*
*/
function template_preprocess_views_ui_display_tab_bucket(&$variables) {
$element = $variables['element'];
@ -2196,11 +2195,11 @@ function views_ui_import_validate($form, &$form_state) {
if (!$form_state['values']['bypass_validation']) {
// Make sure that all plugins and handlers needed by this view actually
// exist.
foreach ($view->display as $id => $display) {
foreach ($view->display as $display) {
if (empty($display->handler) || !empty($display->handler->broken)) {
drupal_set_message(t('Display plugin @plugin is not available.', array(
'@plugin' => $display->display_plugin,
)), 'error');
'@plugin' => $display->display_plugin,
)), 'error');
$broken = TRUE;
continue;
}
@ -2208,16 +2207,16 @@ function views_ui_import_validate($form, &$form_state) {
$plugin = views_get_plugin('style', $display->handler->get_option('style_plugin'));
if (!$plugin) {
drupal_set_message(t('Style plugin @plugin is not available.', array(
'@plugin' => $display->handler->get_option('style_plugin'),
)), 'error');
'@plugin' => $display->handler->get_option('style_plugin'),
)), 'error');
$broken = TRUE;
}
elseif ($plugin->uses_row_plugin()) {
$plugin = views_get_plugin('row', $display->handler->get_option('row_plugin'));
if (!$plugin) {
drupal_set_message(t('Row plugin @plugin is not available.', array(
'@plugin' => $display->handler->get_option('row_plugin'),
)), 'error');
'@plugin' => $display->handler->get_option('row_plugin'),
)), 'error');
$broken = TRUE;
}
}
@ -2225,13 +2224,13 @@ function views_ui_import_validate($form, &$form_state) {
foreach (views_object_types() as $type => $info) {
$handlers = $display->handler->get_handlers($type);
if ($handlers) {
foreach ($handlers as $id => $handler) {
foreach ($handlers as $handler) {
if ($handler->broken()) {
drupal_set_message(t('@type handler @table.@field is not available.', array(
'@type' => $info['stitle'],
'@table' => $handler->table,
'@field' => $handler->field,
)), 'error');
'@type' => $info['stitle'],
'@table' => $handler->table,
'@field' => $handler->field,
)), 'error');
$broken = TRUE;
}
}
@ -2392,7 +2391,7 @@ function views_ui_edit_form_get_bucket($type, $view, $display) {
$class = 'icon compact rearrange';
}
// Create an array of actions to pass to theme_links
// Create an array of actions to pass to theme_links.
$actions = array();
$count_handlers = count($display->handler->get_handlers($type));
$actions['add'] = array(
@ -2439,7 +2438,7 @@ function views_ui_edit_form_get_bucket($type, $view, $display) {
if (!isset($relationships)) {
// Get relationship labels.
$relationships = array();
// @todo: get_handlers()
// @todo get_handlers()
$handlers = $display->handler->get_option('relationships');
if ($handlers) {
foreach ($handlers as $id => $info) {
@ -2492,7 +2491,7 @@ function views_ui_edit_form_get_bucket($type, $view, $display) {
$build['fields'][$id]['#link'] = l($link_text, "admin/structure/views/nojs/config-item/$view->name/$display->id/$type/$id", array('attributes' => $link_attributes, 'html' => TRUE));
$build['fields'][$id]['#class'][] = drupal_clean_css_identifier($display->id . '-' . $type . '-' . $id);
if (!empty($view->changed_sections[$display->id . '-' . $type . '-' . $id])) {
// @todo: #changed is no longer being used?
// @todo #changed is no longer being used?
$build['fields'][$id]['#changed'] = TRUE;
}
@ -2587,7 +2586,7 @@ function views_ui_add_microweights(&$build) {
* a hidden op operator because the forms plugin doesn't seem to properly
* provide which button was clicked.
*
* TODO: Is the hidden op operator still here somewhere, or is that part of the
* @todo Is the hidden op operator still here somewhere, or is that part of the
* docblock outdated?
*/
function views_ui_standard_form_buttons(&$form, &$form_state, $form_id, $name = NULL, $third = NULL, $submit = NULL) {
@ -2799,7 +2798,7 @@ function views_ui_standard_display_dropdown(&$form, &$form_state, $section) {
$current_display = $view->display[$display_id];
// Add the "2 of 3" progress indicator.
// @todo: Move this to a separate function if it's needed on any forms that
// @todo Move this to a separate function if it's needed on any forms that
// don't have the display dropdown.
if ($form_progress = views_ui_get_form_progress($view)) {
$form['progress']['#markup'] = '<div id="views-progress-indicator">' . t('@current of @total', array('@current' => $form_progress['current'], '@total' => $form_progress['total'])) . '</div>';
@ -2838,7 +2837,7 @@ function views_ui_standard_display_dropdown(&$form, &$form_state, $section) {
$form['override']['dropdown'] = array(
'#type' => 'select',
'#title' => t('For'),
// @todo: Translators may need more context than this.
// @todo Translators may need more context than this.
'#options' => $display_dropdown,
);
if ($current_display->handler->is_defaulted($section)) {
@ -2865,7 +2864,6 @@ function views_ui_standard_display_dropdown(&$form, &$form_state, $section) {
function views_ui_get_form_progress($view) {
$progress = FALSE;
if (!empty($view->stack)) {
$stack = $view->stack;
// The forms on the stack have integer keys that don't change as the forms
// are completed, so we can see which ones are still left.
$keys = array_keys($view->stack);
@ -2882,9 +2880,9 @@ function views_ui_get_form_progress($view) {
return $progress;
}
// --------------------------------------------------------------------------
// Various subforms for editing the pieces of a view.
/**
* Various subforms for editing the pieces of a view.
*/
function views_ui_ajax_forms($key = NULL) {
$forms = array(
'display' => array(
@ -2960,13 +2958,9 @@ function views_ui_build_identifier($key, $view, $display_id, $args) {
$form = views_ui_ajax_forms($key);
// Automatically remove the single-form cache if it exists and
// does not match the key.
$identifier = implode('-', array($key, $view->name, $display_id));
foreach ($form['args'] as $id) {
$arg = (!empty($args)) ? array_shift($args) : NULL;
$identifier .= '-' . $arg;
}
return $identifier;
$base_parts = array($key, $view->name, $display_id);
$args = isset($form['args']) ? $form['args'] : array();
return implode('-', array_merge($base_parts, $args));
}
/**
@ -3074,7 +3068,7 @@ function views_ui_ajax_form($js, $key, $view, $display_id = '') {
views_include('ajax');
$form_state = views_ui_build_form_state($js, $key, $view, $display_id, $args);
// check to see if this is the top form of the stack. If it is, pop
// Check to see if this is the top form of the stack. If it is, pop
// it off; if it isn't, the user clicked somewhere else and the stack is
// now irrelevant.
if (!empty($view->stack)) {
@ -3090,13 +3084,6 @@ function views_ui_ajax_form($js, $key, $view, $display_id = '') {
}
}
// Automatically remove the form cache if it is set and the key does
// not match. This way navigating away from the form without hitting
// update will work.
if (isset($view->form_cache) && $view->form_cache['key'] != $key) {
unset($view->form_cache);
}
// With the below logic, we may end up rendering a form twice (or two forms
// each sharing the same element ids), potentially resulting in
// drupal_add_js() being called twice to add the same setting. drupal_get_js()
@ -3108,7 +3095,6 @@ function views_ui_ajax_form($js, $key, $view, $display_id = '') {
$output = views_ajax_form_wrapper($form_state['form_id'], $form_state);
if ($form_state['submitted'] && empty($form_state['rerender'])) {
// Sometimes we need to re-generate the form for multi-step type operations.
$object = NULL;
if (!empty($view->stack)) {
$drupal_add_js = $drupal_add_js_original;
$stack = $view->stack;
@ -3273,7 +3259,7 @@ function _views_position_sort($display1, $display2) {
*/
function views_ui_reorder_displays_form_submit($form, &$form_state) {
foreach ($form_state['input'] as $display => $info) {
// add each value that is a field with a weight to our list, but only if
// Add each value that is a field with a weight to our list, but only if
// it has had its 'removed' checkbox checked.
if (is_array($info) && isset($info['weight']) && empty($info['removed'])) {
$order[$display] = $info['weight'];
@ -3336,8 +3322,10 @@ function theme_views_ui_reorder_displays_form($vars) {
'id' => 'display-remove-link-' . $key,
'class' => array('views-button-remove display-remove-link'),
'alt' => t('Remove this display'),
'title' => t('Remove this display')),
'html' => TRUE));
'title' => t('Remove this display'),
),
'html' => TRUE,
));
}
else {
$row[] = '';
@ -3431,7 +3419,6 @@ function views_ui_edit_details_form_submit($form, &$form_state) {
function views_ui_edit_display_form($form, &$form_state) {
$view = &$form_state['view'];
$display_id = $form_state['display_id'];
$section = $form_state['section'];
if (!$view->set_display($display_id)) {
views_ajax_error(t('Invalid display id @display', array('@display' => $display_id)));
@ -3490,7 +3477,7 @@ function views_ui_edit_display_form_submit($form, &$form_state) {
/**
* Override handler for views_ui_edit_display_form.
*
* @todo: Not currently used. Remove unless we implement an override toggle.
* @todo Not currently used. Remove unless we implement an override toggle.
*/
function views_ui_edit_display_form_override($form, &$form_state) {
$display = &$form_state['view']->display[$form_state['display_id']];
@ -3541,9 +3528,6 @@ function views_ui_config_type_form($form, &$form_state) {
* Submit handler for type configuration form.
*/
function views_ui_config_type_form_submit($form, &$form_state) {
$types = views_object_types();
$display = &$form_state['view']->display[$form_state['display_id']];
// Store in cache.
views_ui_cache_set($form_state['view']);
}
@ -3584,17 +3568,6 @@ function views_ui_rearrange_form($form, &$form_state) {
}
}
// Filters can now be grouped so we do a little bit extra.
$groups = array();
$grouping = FALSE;
if ($type == 'filter') {
$group_info = $view->display_handler->get_option('filter_groups');
if (!empty($group_info['groups']) && count($group_info['groups']) > 1) {
$grouping = TRUE;
$groups = array(0 => array());
}
}
foreach ($display->handler->get_option($types[$type]['plural']) as $id => $field) {
$form['fields'][$id] = array('#tree' => TRUE);
$form['fields'][$id]['weight'] = array(
@ -3785,7 +3758,6 @@ function theme_views_ui_build_group_filter_form($variables) {
return $output . $render_form . $table . $more;
}
/**
* Submit handler for rearranging form.
*/
@ -3798,7 +3770,7 @@ function views_ui_rearrange_form_submit($form, &$form_state) {
// Make an array with the weights.
foreach ($form_state['values'] as $field => $info) {
// add each value that is a field with a weight to our list, but only if
// Add each value that is a field with a weight to our list, but only if
// it has had its 'removed' checkbox checked.
if (is_array($info) && isset($info['weight']) && empty($info['removed'])) {
$order[$field] = $info['weight'];
@ -3903,7 +3875,7 @@ function views_ui_rearrange_filter_form($form, &$form_state) {
);
$form['remove_groups'][$id] = array();
// to prevent a notice.
// To prevent a notice.
if ($id != 1) {
$form['remove_groups'][$id] = array(
'#type' => 'submit',
@ -4102,7 +4074,6 @@ function views_ui_rearrange_filter_form_submit($form, &$form_state) {
else {
$old_fields = $display->handler->get_option($types[$form_state['type']]['plural']);
}
$count = 0;
$groups = $form_state['values']['filter_groups'];
// Whatever button was clicked, re-calculate field information.
@ -4110,7 +4081,7 @@ function views_ui_rearrange_filter_form_submit($form, &$form_state) {
// Make an array with the weights.
foreach ($form_state['values']['filters'] as $field => $info) {
// add each value that is a field with a weight to our list, but only if
// Add each value that is a field with a weight to our list, but only if
// it has had its 'removed' checkbox checked.
if (is_array($info) && empty($info['removed'])) {
if (isset($info['weight'])) {
@ -4182,6 +4153,7 @@ function views_ui_rearrange_filter_form_submit($form, &$form_state) {
foreach ($new_fields as &$new_field) {
$new_field['group'] = $mapping[$new_field['group']];
}
unset($new_field);
// Write the changed handler values.
$display->handler->set_option($types[$form_state['type']]['plural'], $new_fields);
@ -4621,7 +4593,7 @@ function views_ui_config_item_form_submit_temporary($form, &$form_state) {
// Store the item back on the view.
$form_state['view']->temporary_options[$type][$form_state['id']] = $handler->options;
// @todo: Figure out whether views_ui_ajax_form is perhaps the better place
// @todo Figure out whether views_ui_ajax_form is perhaps the better place
// to fix the issue. views_ui_ajax_form() drops the current form from the
// stack, even if it's an #ajax. So add the item back to the top of the stack.
views_ui_add_form_to_stack($form_state['form_key'], $form_state['view'], $form_state['display_id'], array($type, $item['id']), TRUE);
@ -4734,7 +4706,6 @@ function views_ui_config_item_group_form($type, &$form_state) {
function views_ui_config_item_group_form_submit($form, &$form_state) {
$item =& $form_state['handler']->options;
$type = $form_state['type'];
$id = $form_state['id'];
$handler = views_get_handler($item['table'], $item['field'], $type);
$handler->init($form_state['view'], $item);
@ -5235,8 +5206,9 @@ function views_ui_autocomplete_tag($string = '') {
drupal_json_output($matches);
}
// ------------------------------------------------------------------
// Get information from the Views data.
/**
* Get information from the Views data.
*/
function _views_weight_sort($a, $b) {
if ($a['weight'] != $b['weight']) {
return $a['weight'] < $b['weight'] ? -1 : 1;
@ -5251,13 +5223,12 @@ function _views_weight_sort($a, $b) {
/**
* Fetch a list of all base tables available.
*
* @return
* @return array
* A keyed array of in the form of 'base_table' => 'Description'.
*/
function views_fetch_base_tables() {
static $base_tables = array();
if (empty($base_tables)) {
$weights = array();
$tables = array();
$data = views_fetch_data();
foreach ($data as $table => $info) {
@ -5298,7 +5269,7 @@ function _views_sort_types($a, $b) {
/**
* Fetch a list of all fields available for a given base type.
*
* @param (array|string) $base
* @param array|string $base
* A list or a single base_table, for example node.
* @param string $type
* The handler type, for example field or filter.
@ -5334,7 +5305,7 @@ function views_fetch_fields($base, $type, $grouping = FALSE) {
foreach ($table_data as $field => $info) {
// Collect table data from this table.
if ($field == 'table') {
// calculate what tables this table can join to.
// Calculate what tables this table can join to.
if (!empty($info['join'])) {
$bases = array_keys($info['join']);
}
@ -5415,7 +5386,6 @@ function views_fetch_fields($base, $type, $grouping = FALSE) {
return array();
}
/**
* Theme the form for the table style plugin.
*/
@ -5521,7 +5491,7 @@ function views_ui_add_template_page() {
);
$rows = array();
foreach ($templates as $name => $template) {
foreach ($templates as $template) {
$rows[] = array(
array('data' => check_plain($template->get_human_name())),
array('data' => check_plain($template->description)),
@ -5606,7 +5576,6 @@ function views_ui_field_list() {
$header = array(t('Field name'), t('Used in'));
$rows = array();
foreach ($fields as $field_name => $views) {
$rows[$field_name]['data'][0] = check_plain($field_name);
foreach ($views as $view) {
$rows[$field_name]['data'][1][] = l($view, "admin/structure/views/view/$view");
@ -5638,6 +5607,7 @@ function views_ui_plugin_list() {
}
$row['views'] = implode(', ', $row['views']);
}
unset($row);
// Sort rows by field name.
ksort($rows);

View file

@ -302,7 +302,6 @@ function views_ajax_form_wrapper($form_id, &$form_state) {
return $output;
}
/**
* Page callback for views user autocomplete.
*/
@ -357,7 +356,6 @@ function views_ajax_autocomplete_taxonomy($vid, $tags_typed = '') {
$tags_typed = drupal_explode_tags($tags_typed);
$tag_last = drupal_strtolower(array_pop($tags_typed));
$matches = array();
if ($tag_last != '') {
$query = db_select('taxonomy_term_data', 't');
@ -380,7 +378,7 @@ function views_ajax_autocomplete_taxonomy($vid, $tags_typed = '') {
$prefix = count($tags_typed) ? drupal_implode_tags($tags_typed) . ', ' : '';
$term_matches = array();
foreach ($tags_return as $tid => $name) {
foreach ($tags_return as $name) {
$n = $name;
// Term names containing commas or quotes must be wrapped in quotes.
if (strpos($name, ',') !== FALSE || strpos($name, '"') !== FALSE) {

View file

@ -106,7 +106,7 @@ function views_ui_views_analyze($view) {
// You can give a page display the same path as an alias existing in the
// system, so the alias will not work anymore. Report this to the user,
// because they probably wanted something else.
foreach ($view->display as $id => $display) {
foreach ($view->display as $display) {
if (empty($display->handler)) {
continue;
}

View file

@ -69,7 +69,7 @@ class views_object {
* @see hook_views_plugin_option_definition_alter()
* @see hook_views_handler_option_definition_alter()
*/
function altered_option_definition() {
public function altered_option_definition() {
$definition = $this->option_definition();
if (!empty($this->is_plugin)) {
// Trigger hook_views_plugin_option_definition_alter().
@ -154,7 +154,7 @@ class views_object {
if (empty($localization_keys) && isset($this->localization_keys)) {
$localization_keys = $this->localization_keys;
}
// but plugins don't because there isn't a common init() these days.
// But plugins don't because there isn't a common init() these days.
elseif (!empty($this->is_plugin) && empty($localization_keys)) {
if ($this->plugin_type != 'display') {
$localization_keys = array($this->view->current_display);

View file

@ -56,7 +56,7 @@ function _views_fetch_data($table = NULL, $move = TRUE, $reset = FALSE) {
if (isset($cache[$table]['moved to']) && $move) {
$moved_table = $cache[$table]['moved to'];
if (!empty($recursion_protection[$table])) {
// recursion detected!
// Recursion detected!
return NULL;
}
$recursion_protection[$table] = TRUE;

View file

@ -9,7 +9,9 @@
* Instantiate and construct a new handler.
*/
function _views_create_handler($definition, $type = 'handler', $handler_type = NULL) {
// debug('Instantiating handler ' . $definition['handler']);
// @code
// debug('Instantiating handler ' . $definition['handler']);
// @endcode
if (empty($definition['handler'])) {
vpr('_views_create_handler - type: @type - failed: handler has not been provided.',
array('@type' => isset($handler_type) ? ($type . '(handler type: ' . $handler_type . ')') : $type)
@ -44,10 +46,10 @@ function _views_create_handler($definition, $type = 'handler', $handler_type = N
}
if (!empty($definition['override handler'])) {
$handler = new $definition['override handler'];
$handler = new $definition['override handler']();
}
else {
$handler = new $definition['handler'];
$handler = new $definition['handler']();
}
$handler->set_definition($definition);
@ -61,7 +63,7 @@ function _views_create_handler($definition, $type = 'handler', $handler_type = N
$handler->plugin_name = $definition['name'];
}
// let the handler have something like a constructor.
// Let the handler have something like a constructor.
$handler->construct();
return $handler;
@ -95,7 +97,7 @@ function views_get_table_join($table, $base_table) {
if (isset($data['table']['join'][$base_table])) {
$h = $data['table']['join'][$base_table];
if (!empty($h['handler']) && class_exists($h['handler'])) {
$handler = new $h['handler'];
$handler = new $h['handler']();
}
else {
$handler = new views_join();
@ -355,16 +357,16 @@ class views_handler extends views_object {
* Transform a string by a certain method.
*
* @param string $string
* The input you want to transform.
* The input you want to transform.
* @param array $option
* How do you want to transform it, possible values:
* How do you want to transform it, possible values:
* - upper: Uppercase the string.
* - lower: lowercase the string.
* - ucfirst: Make the first char uppercase.
* - ucwords: Make each word in the string uppercase.
*
* @return string
* The transformed string.
* The transformed string.
*/
public function case_transform($string, $option) {
global $multibyte;
@ -753,7 +755,7 @@ class views_handler extends views_object {
* as adding an 'extra'.
*/
public function get_join() {
// get the join from this table that links back to the base table.
// Get the join from this table that links back to the base table.
// Determine the primary table to seek.
if (empty($this->query->relationships[$this->relationship])) {
$base_table = $this->query->base_table;
@ -830,7 +832,7 @@ class views_many_to_one_helper {
/**
* {@inheritdoc}
*/
static function option_definition(&$options) {
public static function option_definition(&$options) {
$options['reduce_duplicates'] = array('default' => FALSE, 'bool' => TRUE);
}
@ -851,7 +853,7 @@ class views_many_to_one_helper {
* Provide an option to use a formula.
*
* If it wants us to do this, it must set $helper->formula = TRUE and
* implement handler->get_formula();.
* implement handler->get_formula().
*/
public function get_field() {
if (!empty($this->formula)) {
@ -1007,7 +1009,6 @@ class views_many_to_one_helper {
// Case 2: it's anything but an 'or'.
// We do one join per selected value.
// Clone the join for each table:
$this->handler->table_aliases = array();
$values = $this->handler->operator === 'not' ? array($this->handler->value) : $this->handler->value;
@ -1036,7 +1037,7 @@ class views_many_to_one_helper {
$this->handler->view->many_to_one_aliases[$field][$value] = $this->handler->table . '_value_' . ($this->handler->view->many_to_one_count[$this->handler->table]++);
$alias = $this->handler->table_aliases[$value] = $this->add_table($join,
$this->handler->view->many_to_one_aliases[$field][$value]);
// and set table_alias to the first of these.
// And set table_alias to the first of these.
if (empty($this->handler->table_alias)) {
$this->handler->table_alias = $alias;
}
@ -1087,7 +1088,7 @@ class views_many_to_one_helper {
if (is_array($value) && count($value) > 1) {
$operator = 'IN';
}
else {
else {
$value = is_array($value) ? array_pop($value) : $value;
$operator = '=';
}
@ -1199,8 +1200,8 @@ function views_break_phrase_string($str, &$handler = NULL) {
* @param object $handler
* The handler object to use as a base. If not specified one will be created.
*
* @return $handler
* The new handler object.
* @return object
* The new handler object, presumed to be a \stdClass.
*/
function views_break_phrase($str, &$handler = NULL) {
if (!$handler) {
@ -1246,6 +1247,7 @@ function views_break_phrase($str, &$handler = NULL) {
// --------------------------------------------------------------------------
// Date helper functions.
/**
* Figure out what timezone we're in; needed for some date manipulations.
*/
@ -1284,7 +1286,7 @@ function views_get_timezone() {
* @param string $field
* The real table and field name, like 'tablename.fieldname'.
* @param string $field_type
* The type of date field, 'int' or 'datetime'.
* The type of date field, 'int' or 'datetime'.
* @param string $set_offset
* The name of a field that holds the timezone offset or a fixed timezone
* offset value. If not provided, the normal Drupal timezone handling
@ -1468,7 +1470,7 @@ function views_date_sql_extract($extract_type, $field, $field_type = 'int', $set
$db_type = Database::getConnection()->databaseType();
$field = views_date_sql_field($field, $field_type, $set_offset);
// Note there is no space after FROM to avoid db_rewrite problems
// Note there is no space after FROM to avoid db_rewrite problems.
// @see http://drupal.org/node/79904.
switch ($extract_type) {
case('DATE'):
@ -1667,7 +1669,6 @@ class views_join {
$extras = array();
foreach ($this->extra as $info) {
if (is_array($info)) {
$extra = '';
// Figure out the table name. Remember, only use aliases provided if
// at all possible.
$join_table = '';
@ -1736,13 +1737,14 @@ class views_join {
$select_query->addJoin($this->type, $right_table, $table['alias'], $condition, $arguments);
}
}
/**
* Join handler for relationships that join with a subquery as the left field.
*
* For example:
* LEFT JOIN node node_term_data ON ([YOUR SUBQUERY HERE]) = node_term_data.nid
* LEFT JOIN node node_term_data ON ([YOUR SUBQUERY HERE]) = node_term_data.nid.
*
* 'join' definition:
* Same as views_join class above, except:
@ -1795,7 +1797,6 @@ class views_join_subquery extends views_join {
$extras = array();
foreach ($this->extra as $info) {
if (is_array($info)) {
$extra = '';
// Figure out the table name. Remember, only use aliases provided if
// at all possible.
$join_table = '';
@ -1840,6 +1841,7 @@ class views_join_subquery extends views_join {
$select_query->addJoin($this->type, $right_table, $table['alias'], $condition, $arguments);
}
}
/**

View file

@ -161,7 +161,7 @@ function views_views_plugins() {
'handler' => 'views_plugin_style_summary',
'theme' => 'views_view_summary',
'type' => 'summary',
// only shows up as a summary style.
// Only shows up as a summary style.
'uses options' => TRUE,
'help topic' => 'style-summary',
),
@ -171,7 +171,7 @@ function views_views_plugins() {
'handler' => 'views_plugin_style_summary_unformatted',
'theme' => 'views_view_summary_unformatted',
'type' => 'summary',
// only shows up as a summary style.
// Only shows up as a summary style.
'uses options' => TRUE,
'help topic' => 'style-summary-unformatted',
),
@ -384,7 +384,7 @@ function views_views_plugins() {
'handler' => 'views_plugin_style_summary_jump_menu',
'theme' => 'views_view_summary_jump_menu',
'type' => 'summary',
// only shows up as a summary style.
// Only shows up as a summary style.
'uses options' => TRUE,
'help topic' => 'style-summary-jump-menu',
);
@ -455,7 +455,7 @@ function views_discover_plugins() {
// Set the internal name to be able to read it out later.
$def['name'] = $plugin;
// merge the new data in.
// Merge the new data in.
$cache[$type][$plugin] = $def;
}
}
@ -569,6 +569,7 @@ class views_plugin extends views_object {
public function summary_title() {
return t('Settings');
}
/**
* Return the human readable name of the display.
*

View file

@ -42,7 +42,7 @@ class view extends views_db_object {
/**
* The id of the view, which is used only for views in the database.
*
* @var number
* @var int
*/
public $vid;
@ -134,29 +134,43 @@ class view extends views_db_object {
*/
public $result = array();
// May be used to override the current pager info.
/**
* May be used to override the current pager info.
*/
public $current_page = NULL;
public $items_per_page = NULL;
public $offset = NULL;
public $total_rows = NULL;
// Places to put attached renderings.
/**
* Places to put attached renderings.
*/
public $attachment_before = '';
public $attachment_after = '';
// Exposed widget input.
/**
* Exposed widget input.
*/
public $exposed_data = array();
public $exposed_input = array();
// Exposed widget input directly from the $form_state['values'].
/**
* Exposed widget input directly from the $form_state['values'].
*/
public $exposed_raw_input = array();
// Used to store views that were previously running if we recurse.
/**
* Used to store views that were previously running if we recurse.
*/
public $old_view = array();
// To avoid recursion in views embedded into areas.
/**
* To avoid recursion in views embedded into areas.
*/
public $parent_views = array();
// Is the current stored view runned as an attachment to another view.
/**
* Is the current stored view runned as an attachment to another view.
*/
public $is_attachment = NULL;
// Stores the next steps of form items to handle.
@ -331,7 +345,7 @@ class view extends views_db_object {
* Returns the complete list of dependent objects in a view, for the purpose
* of initialization and loading/saving to/from the database.
*/
static function db_objects() {
public static function db_objects() {
return array('display');
}
@ -638,7 +652,7 @@ class view extends views_db_object {
// For each relationship we have, make sure we mark the base it provides as
// available.
foreach ($this->display_handler->get_option('relationships') as $id => $options) {
foreach ($this->display_handler->get_option('relationships') as $options) {
$options['table'] = views_move_table($options['table']);
$data = views_fetch_data($options['table'], FALSE);
if (isset($data[$options['field']]['relationship']['base'])) {
@ -821,7 +835,7 @@ class view extends views_db_object {
return TRUE;
}
// build arguments.
// Build arguments.
$position = -1;
// Create a title for use in the breadcrumb trail.
@ -854,7 +868,7 @@ class view extends views_db_object {
if (isset($arg) || $argument->has_default_argument()) {
if (!isset($arg)) {
$arg = $argument->get_default_argument();
// make sure default args get put back.
// Make sure default args get put back.
if (isset($arg)) {
$this->args[$position] = $arg;
}
@ -905,7 +919,7 @@ class view extends views_db_object {
$breadcrumb_args[] = $arg;
}
else {
// determine default condition and handle.
// Determine default condition and handle.
$status = $argument->default_action();
break;
}
@ -914,7 +928,7 @@ class view extends views_db_object {
unset($argument);
}
// set the title in the build info.
// Set the title in the build info.
if (!empty($title)) {
$this->build_info['title'] = $title;
}
@ -932,7 +946,7 @@ class view extends views_db_object {
if (!empty($this->query)) {
$class = get_class($this->query);
if ($class && $class != 'stdClass') {
// return if query is already initialized.
// Return if query is already initialized.
return TRUE;
}
}
@ -1070,7 +1084,7 @@ class view extends views_db_object {
if ($this->style_plugin->build_sort()) {
$this->_build('sort');
}
// allow the plugin to build second sorts as well.
// Allow the plugin to build second sorts as well.
$this->style_plugin->build_sort_post();
}
@ -1122,13 +1136,12 @@ class view extends views_db_object {
* Internal method to build an individual set of handlers.
*
* @param string $key
* The type of handlers (filter etc.) which should be iterated over to
* The type of handlers (filter etc.) which should be iterated over to
* build the relationship and query information.
*/
public function _build($key) {
$handlers = &$this->$key;
foreach ($handlers as $id => $data) {
if (!empty($handlers[$id]) && is_object($handlers[$id])) {
$multiple_exposed_input = array(0 => NULL);
if ($handlers[$id]->multiple_exposed_input()) {
@ -1460,7 +1473,7 @@ class view extends views_db_object {
* Unset the current view, mostly.
*/
public function post_execute() {
// unset current view so we can be properly destructed later on.
// Unset current view so we can be properly destructed later on.
// Return the previous value in case we're an attachment.
if ($this->old_view) {
$old_view = array_pop($this->old_view);
@ -1648,7 +1661,7 @@ class view extends views_db_object {
// Exclude arguments that were computed, not passed on the URL.
$position = 0;
if (!empty($this->argument)) {
foreach ($this->argument as $argument_id => $argument) {
foreach ($this->argument as $argument) {
if (!empty($argument->options['default_argument_skip_url'])) {
unset($args[$position]);
}
@ -1814,7 +1827,7 @@ class view extends views_db_object {
* views::load(), that would be very slow. Buiding the views externally from
* unified queries is much faster.
*/
static function load_views() {
public static function load_views() {
$result = db_query("SELECT DISTINCT v.* FROM {views_view} v");
$views = array();
@ -1885,7 +1898,7 @@ class view extends views_db_object {
try {
// If we have no vid or our vid is a string, this is a new view.
if (!empty($this->vid)) {
// remove existing table entries.
// Remove existing table entries.
foreach ($this->db_objects() as $key) {
db_delete('views_' . $key)
->condition('vid', $this->vid)
@ -1919,11 +1932,11 @@ class view extends views_db_object {
/**
* Save a row to the database for the given key.
*
* i.e. one of the keys from view::db_objects().
* I.e. one of the keys from view::db_objects().
*/
public function _save_rows($key) {
$count = 0;
foreach ($this->$key as $position => $object) {
foreach ($this->$key as $object) {
$object->position = ++$count;
$object->vid = $this->vid;
$object->save_row();
@ -1998,7 +2011,7 @@ class view extends views_db_object {
}
/**
* Make a copy of this view with IDs, handlers sanitized
* Make a copy of this view with IDs, handlers sanitized.
*
* I'd call this clone() but it's reserved.
*/
@ -2019,7 +2032,7 @@ class view extends views_db_object {
* This will completely wipe a view clean so it can be considered fresh.
*
* @return view
* The cloned view.
* The cloned view.
*/
public function clone_view() {
$clone = clone $this;
@ -2539,15 +2552,6 @@ class views_db_object {
'field' => $field,
) + $options;
if (!empty($types[$type]['type'])) {
$handler_type = $types[$type]['type'];
}
else {
$handler_type = $type;
}
$handler = views_get_handler($table, $field, $handler_type);
$fields[$id] = $new_item;
$this->display[$display_id]->handler->set_option($types[$type]['plural'], $fields);
@ -2646,6 +2650,7 @@ class views_display extends views_db_object {
public $display_options;
public $db_table = 'views_display';
public function __construct($init = TRUE) {
parent::init($init);
}

View file

@ -17,14 +17,14 @@
// We need to do this for both .click() and .mousedown() since JavaScript
// code might trigger either behavior.
var $submit_buttons = $('input[type=submit], button', ajax_body);
$submit_buttons.click(function(event) {
$submit_buttons.click(function (event) {
this.form.clk = this;
});
$submit_buttons.mousedown(function(event) {
$submit_buttons.mousedown(function (event) {
this.form.clk = this;
});
$('form', ajax_body).once('views-ajax-submit-processed').each(function() {
$('form', ajax_body).once('views-ajax-submit-processed').each(function () {
var element_settings = {
'url': response.url,
'event': 'submit',
@ -107,7 +107,7 @@
*/
Drupal.behaviors.livePreview = {
attach: function (context) {
$('input#edit-displays-live-preview', context).once('views-ajax-processed').click(function() {
$('input#edit-displays-live-preview', context).once('views-ajax-processed').click(function () {
if ($(this).is(':checked')) {
$('#preview-submit').click();
}
@ -120,7 +120,7 @@
*/
Drupal.behaviors.syncPreviewDisplay = {
attach: function (context) {
$("#views-tabset a").once('views-ajax-processed').click(function() {
$("#views-tabset a").once('views-ajax-processed').click(function () {
var href = $(this).attr('href');
// Cut of #views-tabset.
var display_id = href.substr(11);
@ -189,7 +189,7 @@
// @todo Revisit this after fixing Views UI to display a Preview outside
// of the main Edit form.
$('div#views-live-preview input[type=submit]')
.once('views-ajax-processed').each(function(event) {
.once('views-ajax-processed').each(function (event) {
$(this).click(function () {
this.form.clk = this;
return true;

View file

@ -8,9 +8,9 @@
* Attaches the AJAX behavior to exposed filter forms and key views links.
*/
Drupal.behaviors.ViewsAjaxView = {};
Drupal.behaviors.ViewsAjaxView.attach = function() {
Drupal.behaviors.ViewsAjaxView.attach = function () {
if (Drupal.settings && Drupal.settings.views && Drupal.settings.views.ajaxViews) {
$.each(Drupal.settings.views.ajaxViews, function(i, settings) {
$.each(Drupal.settings.views.ajaxViews, function (i, settings) {
Drupal.views.instances[i] = new Drupal.views.ajaxView(settings);
});
}
@ -22,7 +22,7 @@
/**
* JavaScript object for a certain view.
*/
Drupal.views.ajaxView = function(settings) {
Drupal.views.ajaxView = function (settings) {
var selector = '.view-dom-id-' + settings.view_dom_id;
this.$view = $(selector);
@ -91,7 +91,7 @@
});
};
Drupal.views.ajaxView.prototype.attachExposedFormAjax = function() {
Drupal.views.ajaxView.prototype.attachExposedFormAjax = function () {
var button = $('input[type=submit], button[type=submit], input[type=image]', this.$exposed_form);
button = button[0];
@ -108,7 +108,7 @@
/**
* Attach the ajax behavior to each link.
*/
Drupal.views.ajaxView.prototype.attachPagerAjax = function() {
Drupal.views.ajaxView.prototype.attachPagerAjax = function () {
this.$view.find('ul.pager > li > a, ol.pager > li > a, th.views-field a, .attachment .views-summary a')
.each(jQuery.proxy(this.attachPagerLinkAjax, this));
};
@ -116,7 +116,7 @@
/**
* Attach the ajax behavior to a single link.
*/
Drupal.views.ajaxView.prototype.attachPagerLinkAjax = function(id, link) {
Drupal.views.ajaxView.prototype.attachPagerLinkAjax = function (id, link) {
var $link = $(link);
var viewData = {};
var href = $link.attr('href');

View file

@ -17,7 +17,7 @@
});
}
$('a.views-remove-link').once('views-processed').click(function(event) {
$('a.views-remove-link').once('views-processed').click(function (event) {
var id = $(this).attr('id').replace('views-remove-link-', '');
$('#views-row-' + id).hide();
$('#views-removed-' + id).get(0).checked = true;
@ -27,7 +27,7 @@
// (checking in the hidden checkbox and hiding out the row).
$('a.display-remove-link')
.addClass('display-processed')
.click(function() {
.click(function () {
var id = $(this).attr('id').replace('display-remove-link-', '');
$('#display-row-' + id).hide();
$('#display-removed-' + id).get(0).checked = true;

View file

@ -24,7 +24,7 @@
(function ($, undefined) {
if ($.ui && $.ui.dialog && $.ui.dialog.overlay) {
$.ui.dialog.overlay.events = $.map('focus,keydown,keypress'.split(','),
function(event) {
function (event) {
return event + '.dialog-overlay';
}).join(' ');
}

View file

@ -102,8 +102,12 @@ Drupal.viewsUi.FormFieldFiller = function ($target, exclude, replace, suffix) {
// one bound version of an object method, whereas we need one version per
// object instance.
var self = this;
this.populate = function () {return self._populate.call(self);};
this.unbind = function () {return self._unbind.call(self);};
this.populate = function () {
return self._populate.call(self);
};
this.unbind = function () {
return self._unbind.call(self);
};
this.bind();
// Object constructor; no return value.
@ -167,7 +171,7 @@ Drupal.behaviors.addItemForm.attach = function (context) {
}
}
Drupal.viewsUi.addItemForm = function($form) {
Drupal.viewsUi.addItemForm = function ($form) {
this.$form = $form;
this.$form.find('.views-filterable-options :checkbox').click(jQuery.proxy(this.handleCheck, this));
// Find the wrapper of the displayed text.
@ -208,7 +212,7 @@ Drupal.viewsUi.addItemForm.prototype.handleCheck = function (event) {
/**
* Refresh the display of the checked items.
*/
Drupal.viewsUi.addItemForm.prototype.refreshCheckedItems = function() {
Drupal.viewsUi.addItemForm.prototype.refreshCheckedItems = function () {
// Perhaps we should precache the text div, too.
this.$selected_div.find('.views-selected-options').html(Drupal.checkPlain(this.checkedItems.join(', ')));
Drupal.viewsUi.resizeModal('', true);
@ -310,7 +314,7 @@ Drupal.viewsUi.OptionsSearch = function ($form) {
// Restripe on initial loading.
this.handleKeyup();
// Trap the ENTER key in the search box so that it doesn't submit the form.
this.$searchBox.keypress(function(event) {
this.$searchBox.keypress(function (event) {
if (event.which == 13) {
event.preventDefault();
}
@ -764,23 +768,23 @@ Drupal.behaviors.viewsFilterConfigSelectAll = {};
/**
* Add a select all checkbox, which checks each checkbox at once.
*/
Drupal.behaviors.viewsFilterConfigSelectAll.attach = function(context) {
Drupal.behaviors.viewsFilterConfigSelectAll.attach = function (context) {
var $ = jQuery;
// Show the select all checkbox.
$('#views-ui-config-item-form div.form-item-options-value-all', context).once(function() {
$('#views-ui-config-item-form div.form-item-options-value-all', context).once(function () {
$(this).show();
})
.find('input[type=checkbox]')
.click(function() {
.click(function () {
var checked = $(this).is(':checked');
// Update all checkbox beside the select all checkbox.
$(this).parents('.form-checkboxes').find('input[type=checkbox]').each(function() {
$(this).parents('.form-checkboxes').find('input[type=checkbox]').each(function () {
$(this).get(0).checked = true;
});
});
// Uncheck the select all checkbox if any of the others are unchecked.
$('#views-ui-config-item-form div.form-type-checkbox').not($('.form-item-options-value-all')).find('input[type=checkbox]').each(function() {
$(this).click(function() {
$('#views-ui-config-item-form div.form-type-checkbox').not($('.form-item-options-value-all')).find('input[type=checkbox]').each(function () {
$(this).click(function () {
if ($(this).is('checked') == 0 && $('#edit-options-value-all').length) {
$('#edit-options-value-all').get(0).checked = false;
}
@ -796,8 +800,8 @@ Drupal.behaviors.viewsFilterConfigSelectAll.attach = function(context) {
Drupal.behaviors.viewsImplicitFormSubmission = {};
Drupal.behaviors.viewsImplicitFormSubmission.attach = function (context, settings) {
var $ = jQuery;
$(':text, :password, :radio, :checkbox', context).once('viewsImplicitFormSubmission', function() {
$(this).keypress(function(event) {
$(':text, :password, :radio, :checkbox', context).once('viewsImplicitFormSubmission', function () {
$(this).keypress(function (event) {
if (event.which == 13) {
var formId = this.form.id;
if (formId && settings.viewsImplicitFormSubmission && settings.viewsImplicitFormSubmission[formId] && settings.viewsImplicitFormSubmission[formId].defaultButton) {
@ -865,7 +869,7 @@ Drupal.behaviors.viewsUiChangeDefaultWidget.attach = function (context, settings
}
}
// Update on widget change.
$('input[name="options[group_info][multiple]"]').change(function() {
$('input[name="options[group_info][multiple]"]').change(function () {
change_default_widget($(this).get(0).checked);
});
// Update the first time the form is rendered.
@ -905,18 +909,18 @@ Drupal.viewsUi.Checkboxifier.prototype.clickHandler = function (e) {
Drupal.behaviors.viewsUiOverrideSelect = {};
Drupal.behaviors.viewsUiOverrideSelect.attach = function (context, settings) {
var $ = jQuery;
$('#edit-override-dropdown', context).once('views-ui-override-button-text', function() {
$('#edit-override-dropdown', context).once('views-ui-override-button-text', function () {
// Closures! :(
var $submit = $('#edit-submit', context);
var old_value = $submit.val();
$submit.once('views-ui-override-button-text')
.bind('mouseup', function() {
.bind('mouseup', function () {
$(this).val(old_value);
return true;
});
$(this).bind('change', function() {
$(this).bind('change', function () {
if ($(this).val() == 'default') {
$submit.val(Drupal.t('Apply (all displays)'));
}
@ -968,7 +972,7 @@ Drupal.viewsUi.resizeModal = function (e, no_shrink) {
scrollHeight += parseInt($scroll.css('padding-top'));
scrollHeight += parseInt($scroll.css('padding-bottom'));
$scroll.children().each(function() {
$scroll.children().each(function () {
var w = $(this).innerWidth();
if (w > width) {
width = w;
@ -1023,7 +1027,7 @@ Drupal.viewsUi.resizeModal = function (e, no_shrink) {
};
jQuery(function() {
jQuery(function () {
jQuery(window).bind('resize', Drupal.viewsUi.resizeModal);
jQuery(window).bind('scroll', Drupal.viewsUi.resizeModal);
});

View file

@ -6,13 +6,13 @@
Drupal.behaviors.viewsUIList = {
attach: function (context) {
$('#ctools-export-ui-list-items thead a').once('views-ajax-processed').each(function() {
$(this).click(function() {
$('#ctools-export-ui-list-items thead a').once('views-ajax-processed').each(function () {
$(this).click(function () {
var query = $.deparam.querystring(this.href);
$('#ctools-export-ui-list-form select[name=order]').val(query['order']);
$('#ctools-export-ui-list-form select[name=sort]').val(query['sort']);
$('#ctools-export-ui-list-form input.ctools-auto-submit-click').trigger('click');
return false;
return FALSE;
});
});
}

View file

@ -15,7 +15,7 @@ function aggregator_views_data() {
// Main Aggregator Item base table.
// Define the base group of this table. Fields that don't have a group
// defined will go into this field by default.
$data['aggregator_item']['table']['group'] = t('Aggregator');
$data['aggregator_item']['table']['group'] = t('Aggregator');
// Advertise this table as a possible base table.
$data['aggregator_item']['table']['base'] = array(
@ -28,9 +28,9 @@ function aggregator_views_data() {
// Fields
// Item ID / 'iid'.
$data['aggregator_item']['iid'] = array(
// The item it appears as on the UI,
// The item it appears as on the UI.
'title' => t('Item ID'),
// The help that appears on the UI,
// The help that appears on the UI.
'help' => t('The unique ID of the aggregator item.'),
// Information for displaying the iid.
'field' => array(
@ -56,7 +56,7 @@ function aggregator_views_data() {
// Title.
$data['aggregator_item']['title'] = array(
// The item it appears as on the UI,
// The item it appears as on the UI.
'title' => t('Title'),
'help' => t('The title of the aggregator item.'),
// Information for displaying a title as a field.
@ -76,7 +76,7 @@ function aggregator_views_data() {
// Link.
$data['aggregator_item']['link'] = array(
// The item it appears as on the UI,
// The item it appears as on the UI.
'title' => t('Link'),
'help' => t('The link to the original source URL of the item.'),
'field' => array(
@ -94,7 +94,7 @@ function aggregator_views_data() {
// Author.
$data['aggregator_item']['author'] = array(
// The item it appears as on the UI,
// The item it appears as on the UI.
'title' => t('Author'),
'help' => t('The author of the original imported item.'),
// Information for displaying a title as a field.
@ -116,7 +116,7 @@ function aggregator_views_data() {
// 'guid'.
$data['aggregator_item']['guid'] = array(
// The item it appears as on the UI,
// The item it appears as on the UI.
'title' => t('GUID'),
'help' => t('The guid of the original imported item.'),
// Information for displaying a title as a field.
@ -138,7 +138,7 @@ function aggregator_views_data() {
// Feed body.
$data['aggregator_item']['description'] = array(
// The item it appears as on the UI,
// The item it appears as on the UI.
'title' => t('Body'),
'help' => t('The actual content of the imported item.'),
// Information for displaying a title as a field.
@ -154,7 +154,7 @@ function aggregator_views_data() {
// Item timestamp.
$data['aggregator_item']['timestamp'] = array(
// The item it appears as on the UI,
// The item it appears as on the UI.
'title' => t('Timestamp'),
'help' => t('The date the original feed item was posted. (With some feeds, this will be the date it was imported.)'),
// Information for displaying a title as a field.
@ -176,7 +176,7 @@ function aggregator_views_data() {
// ----------------------------------------------------------------------
// Aggregator feed table.
$data['aggregator_feed']['table']['group'] = t('Aggregator feed');
$data['aggregator_feed']['table']['group'] = t('Aggregator feed');
// Explain how this table joins to others.
$data['aggregator_feed']['table']['join'] = array(
@ -188,9 +188,9 @@ function aggregator_views_data() {
// Feed ID / 'fid'.
$data['aggregator_feed']['fid'] = array(
// The item it appears as on the UI,
// The item it appears as on the UI.
'title' => t('Feed ID'),
// The help that appears on the UI,
// The help that appears on the UI.
'help' => t('The unique ID of the aggregator feed.'),
// Information for displaying the fid.
'field' => array(
@ -216,9 +216,9 @@ function aggregator_views_data() {
// Title.
$data['aggregator_feed']['title'] = array(
// The item it appears as on the UI,
// The item it appears as on the UI.
'title' => t('Title'),
// The help that appears on the UI,
// The help that appears on the UI.
'help' => t('The title of the aggregator feed.'),
// Information for displaying a title as a field.
'field' => array(
@ -240,7 +240,7 @@ function aggregator_views_data() {
// Link.
$data['aggregator_feed']['link'] = array(
// The item it appears as on the UI,
// The item it appears as on the UI.
'title' => t('Link'),
'help' => t('The link to the source URL of the feed.'),
// Information for displaying a title as a field.
@ -258,7 +258,7 @@ function aggregator_views_data() {
// Feed last updated.
$data['aggregator_feed']['checked'] = array(
// The item it appears as on the UI,
// The item it appears as on the UI.
'title' => t('Last checked'),
'help' => t('The date the feed was last checked for new content.'),
// Information for displaying a title as a field.
@ -279,7 +279,7 @@ function aggregator_views_data() {
// Feed description.
$data['aggregator_feed']['description'] = array(
// The item it appears as on the UI,
// The item it appears as on the UI.
'title' => t('Description'),
'help' => t('The description of the aggregator feed.'),
// Information for displaying a title as a field.
@ -294,7 +294,7 @@ function aggregator_views_data() {
// Feed last updated.
$data['aggregator_feed']['modified'] = array(
// The item it appears as on the UI,
// The item it appears as on the UI.
'title' => t('Last modified'),
'help' => t('The date of the most recent new content on the feed.'),
// Information for displaying a title as a field.

View file

@ -17,7 +17,6 @@ class views_handler_argument_aggregator_iid extends views_handler_argument_numer
*/
public function title_query() {
$titles = array();
$placeholders = implode(', ', array_fill(0, sizeof($this->value), '%d'));
$result = db_select('aggregator_item', 'ai')
->condition('iid', $this->value, 'IN')

View file

@ -31,7 +31,7 @@ class views_handler_field_aggregator_category extends views_handler_field {
}
/**
* Provide link to category option
* Provide link to category option.
*/
public function options_form(&$form, &$form_state) {
$form['link_to_category'] = array(

View file

@ -6,7 +6,7 @@
*/
/**
* Filter by aggregator category cid
* Filter by aggregator category cid.
*
* @ingroup views_filter_handlers
*/

View file

@ -13,7 +13,7 @@
function book_views_data() {
// ----------------------------------------------------------------------
// 'book' table.
$data['book']['table']['group'] = t('Book');
$data['book']['table']['group'] = t('Book');
$data['book']['table']['join'] = array(
'node' => array(
'left_field' => 'nid',

View file

@ -16,7 +16,7 @@ function comment_views_data() {
$data['comment']['comment']['field']['moved to'] = array('field_data_comment_body', 'comment_body');
// Define the base group of this table. Fields that don't have a group
// defined will go into this field by default.
$data['comment']['table']['group'] = t('Comment');
$data['comment']['table']['group'] = t('Comment');
$data['comment']['table']['base'] = array(
'field' => 'cid',
@ -460,7 +460,7 @@ function comment_views_data() {
// ----------------------------------------------------------------------
// 'node_comment_statistics' table.
// Define the group.
$data['node_comment_statistics']['table']['group'] = t('Content');
$data['node_comment_statistics']['table']['group'] = t('Content');
// Joins.
$data['node_comment_statistics']['table']['join'] = array(
@ -705,11 +705,12 @@ function template_preprocess_views_view_row_comment(&$vars) {
// array; there is no way to avoid building them in the first place.
// @see comment_build_content()
if (empty($options['links'])) {
foreach ($build as $cid => &$comment_build) {
foreach ($build as &$comment_build) {
if (isset($comment_build['links'])) {
unset($comment_build['links']);
}
}
unset($comment_build);
}
$vars['comment'] = drupal_render($build);
}

View file

@ -76,7 +76,6 @@ class views_handler_field_comment_node_link extends views_handler_field_entity {
// drupal_alter('link', $links, $node);
// Might this have unexpected consequences if these hooks expect items in
// $node that we don't have?
// Only render the links, if they are defined.
return !empty($node->content['links']['comment']) ? drupal_render($node->content['links']['comment']) : '';
}

View file

@ -53,7 +53,7 @@ class views_handler_field_comment_username extends views_handler_field {
$account->homepage = $this->get_value($values, 'homepage');
return theme('username', array(
'account' => $account
'account' => $account,
));
}
else {

View file

@ -55,7 +55,7 @@ class views_handler_field_ncs_last_comment_name extends views_handler_field {
$account->name = $this->get_value($values);
$account->uid = $values->{$this->uid};
return theme('username', array(
'account' => $account
'account' => $account,
));
}
else {

View file

@ -21,8 +21,10 @@ class views_handler_field_node_comment extends views_handler_field {
case COMMENT_NODE_HIDDEN:
default:
return t('Hidden');
case COMMENT_NODE_CLOSED:
return t('Closed');
case COMMENT_NODE_OPEN:
return t('Open');
}

View file

@ -13,16 +13,16 @@ class views_plugin_row_comment_rss extends views_plugin_row {
/**
* {@inheritdoc}
*/
public $base_table = 'comment';
public $base_table = 'comment';
/**
* {@inheritdoc}
*/
public $base_field = 'cid';
/**
* {@inheritdoc}
*/
public $base_field = 'cid';
/**
* {@inheritdoc}
*/
/**
* {@inheritdoc}
*/
public function option_definition() {
$options = parent::option_definition();
@ -67,12 +67,13 @@ class views_plugin_row_comment_rss extends views_plugin_row {
$comment->depth = count(explode('.', $comment->thread)) - 1;
$nids[] = $comment->nid;
}
unset($comment);
$this->nodes = node_load_multiple($nids);
}
/**
* Return the main options, which are shown in the summary title
* Return the main options, which are shown in the summary title.
*
* @see views_plugin_row_node_rss::options_form_summary_options()
* @todo Maybe provide a views_plugin_row_rss_entity and reuse this method
@ -164,7 +165,7 @@ class views_plugin_row_comment_rss extends views_plugin_row {
return theme($this->theme_functions(), array(
'view' => $this->view,
'options' => $this->options,
'row' => $item
'row' => $item,
));
}

View file

@ -59,7 +59,7 @@ class views_plugin_row_comment_view extends views_plugin_row {
'#options' => $options,
'#title' => t('View mode'),
'#default_value' => $this->options['view_mode'],
);
);
$form['links'] = array(
'#type' => 'checkbox',
@ -81,7 +81,7 @@ class views_plugin_row_comment_view extends views_plugin_row {
}
if (empty($options)) {
$options = array(
'full' => t('Full content')
'full' => t('Full content'),
);
}

View file

@ -36,7 +36,6 @@ class views_handler_field_contact_link extends views_handler_field_user_link {
* {@inheritdoc}
*/
public function render_link($data, $values) {
global $user;
$uid = $this->get_value($values, 'uid');
if (empty($uid)) {

View file

@ -118,40 +118,40 @@ function field_views_field_default_views_data($field) {
$group_name = count($field['bundles']) > 1 ? $translations['field'] : NULL;
// Build the relationships between the field table and the entity tables.
foreach ($field['bundles'] as $entity => $bundles) {
$entity_info = entity_get_info($entity);
foreach ($field['bundles'] as $entity_type => $bundles) {
$entity_info = entity_get_info($entity_type);
if (empty($entity_info)) {
watchdog('views',
'Field %field_name refers to nonexistent entity type %type. You might want to remove this broken field instance. <a href="https://www.drupal.org/node/3200406">See documentation.</a>',
array('%field_name' => $field['field_name'], '%type' => $entity),
array('%field_name' => $field['field_name'], '%type' => $entity_type),
WATCHDOG_WARNING
);
continue;
}
$groups[$entity] = $entity_info['label'];
$groups[$entity_type] = $entity_info['label'];
// Override Node to Content.
if ($groups[$entity] == $translations['node']) {
$groups[$entity] = $translations['content'];
if ($groups[$entity_type] == $translations['node']) {
$groups[$entity_type] = $translations['content'];
}
// If only one bundle use this as the default name.
if (empty($group_name)) {
$group_name = $groups[$entity];
$group_name = $groups[$entity_type];
}
$entity_tables[$entity_info['base table']] = $entity;
$current_tables[$entity] = $entity_info['base table'];
$entity_tables[$entity_info['base table']] = $entity_type;
$current_tables[$entity_type] = $entity_info['base table'];
if (isset($entity_info['revision table'])) {
$entity_tables[$entity_info['revision table']] = $entity;
$revision_tables[$entity] = $entity_info['revision table'];
$entity_tables[$entity_info['revision table']] = $entity_type;
$revision_tables[$entity_type] = $entity_info['revision table'];
}
$data[$current_table]['table']['join'][$entity_info['base table']] = array(
'left_field' => $entity_info['entity keys']['id'],
'field' => 'entity_id',
'extra' => array(
array('field' => 'entity_type', 'value' => $entity),
array('field' => 'entity_type', 'value' => $entity_type),
array('field' => 'deleted', 'value' => 0, 'numeric' => TRUE),
),
);
@ -161,7 +161,7 @@ function field_views_field_default_views_data($field) {
'left_field' => $entity_info['entity keys']['revision'],
'field' => 'revision_id',
'extra' => array(
array('field' => 'entity_type', 'value' => $entity),
array('field' => 'entity_type', 'value' => $entity_type),
array('field' => 'deleted', 'value' => 0, 'numeric' => TRUE),
),
);
@ -170,7 +170,10 @@ function field_views_field_default_views_data($field) {
}
foreach ($bundles as $bundle) {
$bundles_names[] = t('@entity:@bundle', array('@entity' => $entity, '@bundle' => $bundle));
$bundles_names[] = t(
'@entity:@bundle',
array('@entity' => $entity_type, '@bundle' => $bundle)
);
}
}

View file

@ -58,11 +58,11 @@ class views_handler_argument_field_list extends views_handler_argument_numeric {
*/
public function summary_name($data) {
$value = $data->{$this->name_alias};
// If the list element has a human readable name show it,
// If the list element has a human readable name then show it.
if (isset($this->allowed_values[$value]) && !empty($this->options['summary']['human'])) {
return field_filter_xss($this->allowed_values[$value]);
}
// Else fallback to the key.
// Otherwise, fallback to the key.
else {
return check_plain($value);
}

View file

@ -59,11 +59,11 @@ class views_handler_argument_field_list_string extends views_handler_argument_st
*/
public function summary_name($data) {
$value = $data->{$this->name_alias};
// If the list element has a human readable name show it,
// If the list element has a human readable name then show it.
if (isset($this->allowed_values[$value]) && !empty($this->options['summary']['human'])) {
return $this->case_transform(field_filter_xss($this->allowed_values[$value]), $this->options['case']);
}
// Else fallback to the key.
// Otherwise, fallback to the key.
else {
return $this->case_transform(check_plain($value), $this->options['case']);
}

View file

@ -340,7 +340,7 @@ class views_handler_field_field extends views_handler_field {
public function option_definition() {
$options = parent::option_definition();
// option_definition runs before init/construct, so no $this->field_info
// option_definition runs before init/construct, so no $this->field_info.
$field = field_info_field($this->definition['field_name']);
$field_type = field_info_field_types($field['type']);
$column_names = array_keys($field['columns']);
@ -656,7 +656,6 @@ class views_handler_field_field extends views_handler_field {
if (!empty($values)) {
// Divide the entity ids by entity type, so they can be loaded in bulk.
$entities_by_type = array();
$revisions_by_type = array();
foreach ($values as $key => $object) {
if (isset($this->aliases['entity_type']) && isset($object->{$this->aliases['entity_type']}) && isset($object->{$this->field_alias}) && !isset($values[$key]->_field_data[$this->field_alias])) {
$entity_type = $object->{$this->aliases['entity_type']};
@ -710,6 +709,7 @@ class views_handler_field_field extends views_handler_field {
foreach ($values as $row_id => &$value) {
$value->{'field_' . $this->options['id']} = $this->set_items($value, $row_id);
}
unset($value);
}
}

View file

@ -41,7 +41,7 @@ function file_field_views_data_views_data_alter(&$data, $field) {
$entity_info = entity_get_info($entity_type);
$pseudo_field_name = 'reverse_' . $field['field_name'] . '_' . $entity_type;
list($label, $all_labels) = field_views_field_label($field['field_name']);
list($label) = field_views_field_label($field['field_name']);
$entity = $entity_info['label'];
if ($entity == t('Node')) {
$entity = t('Content');

View file

@ -41,7 +41,7 @@ function image_field_views_data_views_data_alter(&$data, $field) {
if (isset($entity_info)) {
$pseudo_field_name = 'reverse_' . $field['field_name'] . '_' . $entity_type;
list($label, $all_labels) = field_views_field_label($field['field_name']);
list($label) = field_views_field_label($field['field_name']);
$entity = $entity_info['label'];
if ($entity == t('Node')) {
$entity = t('Content');

View file

@ -13,7 +13,7 @@
function locale_views_data() {
// Basic table information.
// Define the base group of this table.
$data['locales_source']['table']['group'] = t('Locale source');
$data['locales_source']['table']['group'] = t('Locale source');
// Advertise this table as a possible base table.
$data['locales_source']['table']['base'] = array(
@ -123,7 +123,7 @@ function locale_views_data() {
// 'locales_target' table.
// Define the base group of this table. Fields that don't have a group
// defined will go into this field by default.
$data['locales_target']['table']['group'] = t('Locale target');
$data['locales_target']['table']['group'] = t('Locale target');
// Join information.
$data['locales_target']['table']['join'] = array(

View file

@ -21,7 +21,7 @@ class views_handler_filter_locale_language extends views_handler_filter_in_opera
$languages = array(
'***CURRENT_LANGUAGE***' => t("Current user's language"),
'***DEFAULT_LANGUAGE***' => t("Default site language"),
LANGUAGE_NONE => t('No language')
LANGUAGE_NONE => t('No language'),
);
$languages = array_merge($languages, views_language_list());
$this->value_options = $languages;

View file

@ -21,7 +21,7 @@ class views_handler_filter_node_language extends views_handler_filter_in_operato
$languages = array(
'***CURRENT_LANGUAGE***' => t("Current user's language"),
'***DEFAULT_LANGUAGE***' => t("Default site language"),
LANGUAGE_NONE => t('No language')
LANGUAGE_NONE => t('No language'),
);
$languages = array_merge($languages, views_language_list());
$this->value_options = $languages;

View file

@ -44,7 +44,7 @@ class views_handler_sort_node_language extends views_handler_sort {
$system_langcode = str_replace(array(
'***CURRENT_LANGUAGE***',
'***DEFAULT_LANGUAGE***',
),
),
array(
$language_content->language,
$default_language,

View file

@ -40,9 +40,9 @@ function node_views_data() {
// 'node' table -- fields.
// Node ID / 'nid'.
$data['node']['nid'] = array(
// The item it appears as on the UI,
// The item it appears as on the UI.
'title' => t('Nid'),
// The help that appears on the UI,
// The help that appears on the UI.
'help' => t('The node ID.'),
// Information for displaying the nid.
'field' => array(
@ -70,9 +70,9 @@ function node_views_data() {
// Title.
// This definition has more items in it than it needs to as an example.
$data['node']['title'] = array(
// The item it appears as on the UI,
// The item it appears as on the UI.
'title' => t('Title'),
// The help that appears on the UI,
// The help that appears on the UI.
'help' => t('The content title.'),
// Information for displaying a title as a field.
'field' => array(
@ -98,9 +98,9 @@ function node_views_data() {
// Created field.
$data['node']['created'] = array(
// The item it appears as on the UI,
// The item it appears as on the UI.
'title' => t('Post date'),
// The help that appears on the UI,
// The help that appears on the UI.
'help' => t('The date the content was posted.'),
'field' => array(
'handler' => 'views_handler_field_date',
@ -116,9 +116,9 @@ function node_views_data() {
// Changed field.
$data['node']['changed'] = array(
// The item it appears as on the UI,
// The item it appears as on the UI.
'title' => t('Updated date'),
// The help that appears on the UI,
// The help that appears on the UI.
'help' => t('The date the content was last updated.'),
'field' => array(
'handler' => 'views_handler_field_date',
@ -134,9 +134,9 @@ function node_views_data() {
// Content type.
$data['node']['type'] = array(
// The item it appears as on the UI,
// The item it appears as on the UI.
'title' => t('Type'),
// The help that appears on the UI,
// The help that appears on the UI.
'help' => t('The content type (for example, "blog entry", "forum post", "story", etc).'),
'field' => array(
'handler' => 'views_handler_field_node_type',
@ -210,9 +210,9 @@ function node_views_data() {
// Sticky.
$data['node']['sticky'] = array(
// The item it appears as on the UI,
// The item it appears as on the UI.
'title' => t('Sticky status'),
// The help that appears on the UI,
// The help that appears on the UI.
'help' => t('Whether or not the content is sticky.'),
// Information for displaying a title as a field.
'field' => array(
@ -441,7 +441,7 @@ function node_views_data() {
$data['node_revisions']['moved to'] = 'node_revision';
$data['node_revision']['table']['entity type'] = 'node';
$data['node_revision']['table']['revision'] = TRUE;
$data['node_revision']['table']['group'] = t('Content revision');
$data['node_revision']['table']['group'] = t('Content revision');
// Support the conversion of the field body.
$data['node_revisions']['body']['moved to'] = array('field_revision_data', 'body-revision_id');
@ -549,9 +549,9 @@ function node_views_data() {
// Title.
$data['node_revision']['title'] = array(
// The item it appears as on the UI,
// The item it appears as on the UI.
'title' => t('Title'),
// The help that appears on the UI,
// The help that appears on the UI.
'help' => t('The content title.'),
// Information for displaying a title as a field.
'field' => array(
@ -573,9 +573,9 @@ function node_views_data() {
// Log field.
$data['node_revision']['log'] = array(
// The item it appears as on the UI,
// The item it appears as on the UI.
'title' => t('Log message'),
// The help that appears on the UI,
// The help that appears on the UI.
'help' => t('The log message entered when the revision was created.'),
// Information for displaying a title as a field.
'field' => array(
@ -588,9 +588,9 @@ function node_views_data() {
// Revision timestamp / 'changed' field.
$data['node_revision']['timestamp'] = array(
// The item it appears as on the UI,
// The item it appears as on the UI.
'title' => t('Updated date'),
// The help that appears on the UI,
// The help that appears on the UI.
'help' => t('The date the node was last updated.'),
'field' => array(
'handler' => 'views_handler_field_date',
@ -632,7 +632,7 @@ function node_views_data() {
// Node access table.
// Define the base group of this table. Fields that don't have a group
// defined will go into this field by default.
$data['node_access']['table']['group'] = t('Content access');
$data['node_access']['table']['group'] = t('Content access');
// For other base tables, explain how we join.
$data['node_access']['table']['join'] = array(
@ -658,7 +658,7 @@ function node_views_data() {
// it so that we can later add the real table for other purposes if we need
// it.
$data['history_user']['moved to'] = 'history';
$data['history']['table']['group'] = t('Content');
$data['history']['table']['group'] = t('Content');
// Explain how this table joins to others.
$data['history']['table']['join'] = array(
@ -775,7 +775,7 @@ function node_views_analyze($view) {
$ret = array();
// Check for something other than the default display.
if ($view->base_table == 'node') {
foreach ($view->display as $id => $display) {
foreach ($view->display as $display) {
if (empty($display->handler)) {
continue;
}
@ -809,7 +809,7 @@ function node_views_analyze($view) {
}
}
}
foreach ($view->display as $id => $display) {
foreach ($view->display as $display) {
if ($display->display_plugin == 'page') {
if ($display->handler->get_option('path') == 'node/%') {
$ret[] = views_ui_analysis(t('Display %display has set node/% as path. This will not produce what you want. If you want to have multiple versions of the node view, use panels.', array('%display' => $display->display_title)), 'warning');

View file

@ -72,7 +72,7 @@ class views_handler_argument_node_created_year_month extends views_handler_argum
}
/**
* Provide a link to the next level of the view
* Provide a link to the next level of the view.
*/
public function summary_name($data) {
$created = $data->{$this->name_alias};
@ -80,7 +80,7 @@ class views_handler_argument_node_created_year_month extends views_handler_argum
}
/**
* Provide a link to the next level of the view
* Provide a link to the next level of the view.
*/
public function title() {
$timestamp = strtotime($this->argument . "15" . " 00:00:00 UTC");
@ -107,15 +107,15 @@ class views_handler_argument_node_created_month extends views_handler_argument_d
}
/**
* Provide a link to the next level of the view
* Provide a link to the next level of the view.
*/
public function summary_name($data) {
$month = str_pad($data->{$this->name_alias}, 2, '0', STR_PAD_LEFT);
return format_date(strtotime("2005" . $month . "15" . " 00:00:00 UTC" ), 'custom', $this->format, 'UTC');
return format_date(strtotime("2005" . $month . "15" . " 00:00:00 UTC"), 'custom', $this->format, 'UTC');
}
/**
* Provide a link to the next level of the view
* Provide a link to the next level of the view.
*/
public function title() {
$month = str_pad($this->argument, 2, '0', STR_PAD_LEFT);

View file

@ -35,13 +35,6 @@ class views_handler_filter_node_version_count extends views_handler_filter_numer
* {@inheritdoc}
*/
public function op_empty($field) {
if ($this->operator == 'empty') {
$operator = "IS NULL";
}
else {
$operator = "IS NOT NULL";
}
$this->query->add_where_expression($this->options['group'], '(SELECT COUNT(vid) FROM {node_revision} WHERE nid = {' . $this->table_alias . '}.nid) ' . $this->operator);
}

View file

@ -116,7 +116,8 @@ class views_plugin_argument_validate_node extends views_plugin_argument_validate
}
return isset($types[$node->type]);
break;
break;
case 'nids':
$nids = new stdClass();

View file

@ -12,7 +12,7 @@
*/
function poll_views_data() {
// Basic table information.
$data['poll']['table']['group'] = t('Poll');
$data['poll']['table']['group'] = t('Poll');
// Join to 'node' as a base table.
$data['poll']['table']['join'] = array(

View file

@ -14,7 +14,7 @@ function profile_views_data() {
$data['profile_values']['moved to'] = 'profile_value';
// Define the base group of this table. Fields that don't have a group
// defined will go into this field by default.
$data['profile_value']['table']['group'] = t('Profile');
$data['profile_value']['table']['group'] = t('Profile');
$data['profile_value']['table']['join'] = array(
'node' => array(
@ -72,13 +72,13 @@ function profile_views_get_fields() {
foreach ($results as $row) {
if (!empty($row->options)) {
if (!in_array(substr($row->options, 0, 2), array('a:', 'b:', 'i:', 'f:', 'o:', 's:'))) {
// unserialized fields default version.
// Unserialized fields default version.
$options = $row->options;
unset($row->options);
$row->options = $options;
}
else {
// serialized fields or modified version.
// Serialized fields or modified version.
$row->options = unserialize($row->options);
}
}
@ -88,7 +88,6 @@ function profile_views_get_fields() {
return $fields;
}
/**
* Add profile fields to view table.
*/

View file

@ -20,7 +20,7 @@ class views_handler_field_profile_date extends views_handler_field_date {
*/
public function options_form(&$form, &$form_state) {
parent::options_form($form, $form_state);
// we can't do "time ago" so remove it from the form.
// We can't do "time ago" so remove it from the form.
unset($form['date_format']['#options']['time ago']);
}
@ -76,7 +76,7 @@ class views_handler_field_profile_date extends views_handler_field_date {
'Y' => $value['year'],
'y' => substr($value['year'], 2, 2),
// kill time stuff.
// Kill time stuff.
'a' => NULL,
'A' => NULL,
'g' => NULL,

View file

@ -14,7 +14,7 @@ function search_views_data() {
// Basic table information.
// Define the base group of this table. Fields that don't have a group
// defined will go into this field by default.
$data['search_index']['table']['group'] = t('Search');
$data['search_index']['table']['group'] = t('Search');
// For other base tables, explain how we join.
$data['search_index']['table']['join'] = array(
@ -111,9 +111,9 @@ function search_views_data() {
// Search filter.
$data['search_index']['keys'] = array(
// The item it appears as on the UI,
// The item it appears as on the UI.
'title' => t('Search Terms'),
// The help that appears on the UI,
// The help that appears on the UI.
'help' => t('The terms to search for.'),
// Information for searching terms using the full search syntax.
'filter' => array(

View file

@ -16,7 +16,7 @@ class views_handler_argument_search extends views_handler_argument {
* Take sure that parseSearchExpression is runned and everything is set up.
*
* @param string $input
* The search phrase which was input by the user.
* The search phrase which was input by the user.
*/
public function query_parse_search_expression($input) {
if (!isset($this->search_query)) {
@ -78,6 +78,7 @@ class views_handler_argument_search extends views_handler_argument {
$this->search_query->condition_replace_string('d.', "$search_dataset.", $condition);
}
}
unset($condition);
$search_conditions =& $search_condition->conditions();
$search_conditions = array_merge($search_conditions, $condition_conditions);
}

View file

@ -105,7 +105,7 @@ class views_handler_filter_search extends views_handler_filter {
* Make sure that parseSearchExpression is run and everything is set up.
*
* @param string $input
* The search phrase which was input by the user.
* The search phrase which was input by the user.
*/
public function query_parse_search_expression($input) {
if (!isset($this->search_query)) {
@ -177,6 +177,7 @@ class views_handler_filter_search extends views_handler_filter {
$this->search_query->condition_replace_string('d.', "$search_dataset.", $condition);
}
}
unset($condition);
$search_conditions =& $search_condition->conditions();
$search_conditions = array_merge($search_conditions, $condition_conditions);
}
@ -253,6 +254,7 @@ class viewsSearchQuery extends SearchQuery {
$this->condition_replace_string($search, $replace, $subcondition);
}
}
unset($subcondition);
}
else {
$condition['field'] = str_replace($search, $replace, $condition['field']);

View file

@ -14,7 +14,7 @@ function statistics_views_data() {
// Basic table information.
// ----------------------------------------------------------------
// 'node_counter' table.
$data['node_counter']['table']['group'] = t('Content statistics');
$data['node_counter']['table']['group'] = t('Content statistics');
// Joins to the node table.
$data['node_counter']['table']['join'] = array(
@ -77,7 +77,7 @@ function statistics_views_data() {
// ----------------------------------------------------------------
// 'accesslog' table.
$data['accesslog']['table']['group'] = t('Access log');
$data['accesslog']['table']['group'] = t('Access log');
// Advertise this table as a possible base table.
$data['accesslog']['table']['base'] = array(

View file

@ -16,7 +16,7 @@ function system_views_data() {
// ----------------------------------------------------------------------
// 'file_managed' table.
$data['files']['moved to'] = 'file_managed';
$data['file_managed']['table']['group'] = t('File');
$data['file_managed']['table']['group'] = t('File');
// Advertise this table as a possible base table.
$data['file_managed']['table']['base'] = array(
@ -40,7 +40,7 @@ function system_views_data() {
'argument' => array(
'handler' => 'views_handler_argument_file_fid',
'name field' => 'filename',
// the field to display in the summary.
// The field to display in the summary.
'numeric' => TRUE,
),
'filter' => array(
@ -181,7 +181,7 @@ function system_views_data() {
// ----------------------------------------------------------------------
// file_usage table.
$data['file_usage']['table']['group'] = t('File Usage');
$data['file_usage']['table']['group'] = t('File Usage');
// Provide field-type-things to several base tables; on the core files table
// ("file_managed") so that we can create relationships from files to
@ -471,7 +471,7 @@ function system_views_data() {
// ----------------------------------------------------------------------
// System table.
$data['system']['table']['group'] = t('System');
$data['system']['table']['group'] = t('System');
// Advertise this table as a possible base table.
$data['system']['table']['base'] = array(

View file

@ -24,6 +24,7 @@ class views_handler_argument_file_fid extends views_handler_argument_numeric {
foreach ($titles as &$title) {
$title = check_plain($title);
}
unset($title);
return $titles;
}

View file

@ -33,9 +33,9 @@ class views_handler_field_file_filemime extends views_handler_field_file {
parent::options_form($form, $form_state);
}
/**
* {@inheritdoc}
*/
/**
* {@inheritdoc}
*/
public function render($values) {
$data = $values->{$this->field_alias};
if (!empty($this->options['filemime_image']) && $data !== NULL && $data !== '') {

View file

@ -16,7 +16,7 @@ function taxonomy_views_data() {
// ----------------------------------------------------------------------
// 'taxonomy_vocabulary' table.
$data['vocabulary']['moved to'] = 'taxonomy_vocabulary';
$data['taxonomy_vocabulary']['table']['group'] = t('Taxonomy vocabulary');
$data['taxonomy_vocabulary']['table']['group'] = t('Taxonomy vocabulary');
$data['taxonomy_vocabulary']['table']['entity type'] = 'taxonomy_vocabulary';
$data['taxonomy_vocabulary']['table']['join'] = array(
// Vocabulary links to taxonomy_term_data directly via vid.
@ -36,7 +36,7 @@ function taxonomy_views_data() {
// Vocabulary name.
$data['taxonomy_vocabulary']['name'] = array(
// The item it appears as on the UI,
// The item it appears as on the UI.
'title' => t('Name'),
'field' => array(
'help' => t('Name of the vocabulary a term is a member of. This will be the vocabulary that whichever term the "Taxonomy: Term" field is; and can similarly cause duplicates.'),
@ -49,7 +49,7 @@ function taxonomy_views_data() {
),
);
$data['taxonomy_vocabulary']['machine_name'] = array(
// The item it appears as on the UI,
// The item it appears as on the UI.
'title' => t('Machine name'),
'field' => array(
'help' => t('Machine-Name of the vocabulary a term is a member of. This will be the vocabulary that whichever term the "Taxonomy: Term" field is; and can similarly cause duplicates.'),
@ -66,7 +66,7 @@ function taxonomy_views_data() {
),
);
$data['taxonomy_vocabulary']['vid'] = array(
// The item it appears as on the UI,
// The item it appears as on the UI.
'title' => t('Vocabulary ID'),
'help' => t('The taxonomy vocabulary ID'),
'field' => array(
@ -82,7 +82,7 @@ function taxonomy_views_data() {
),
);
$data['taxonomy_vocabulary']['description'] = array(
// The item it appears as on the UI,
// The item it appears as on the UI.
'title' => t('Description'),
'help' => t('The taxonomy vocabulary description'),
'field' => array(
@ -111,7 +111,7 @@ function taxonomy_views_data() {
// ----------------------------------------------------------------------
// 'taxonomy_term_data' table.
$data['term_data']['moved to'] = 'taxonomy_term_data';
$data['taxonomy_term_data']['table']['group'] = t('Taxonomy term');
$data['taxonomy_term_data']['table']['group'] = t('Taxonomy term');
$data['taxonomy_term_data']['table']['base'] = array(
'field' => 'tid',
'title' => t('Term'),
@ -268,7 +268,7 @@ function taxonomy_views_data() {
// ----------------------------------------------------------------------
// 'taxonomy_index' table.
$data['term_node']['moved to'] = 'taxonomy_index';
$data['taxonomy_index']['table']['group'] = t('Taxonomy term');
$data['taxonomy_index']['table']['group'] = t('Taxonomy term');
$data['taxonomy_index']['table']['join'] = array(
'taxonomy_term_data' => array(
@ -325,7 +325,7 @@ function taxonomy_views_data() {
// ----------------------------------------------------------------------
// 'term_hierarchy' table.
$data['taxonomy_term_hierarchy']['table']['group'] = t('Taxonomy term');
$data['taxonomy_term_hierarchy']['table']['group'] = t('Taxonomy term');
$data['term_hierarchy']['moved to'] = 'taxonomy_term_hierarchy';
$data['taxonomy_term_hierarchy']['table']['join'] = array(
@ -467,7 +467,7 @@ function taxonomy_field_views_data_views_data_alter(&$data, $field) {
$entity_info = entity_get_info($entity_type);
$pseudo_field_name = 'reverse_' . $field['field_name'] . '_' . $entity_type;
list($label, $all_labels) = field_views_field_label($field['field_name']);
list($label) = field_views_field_label($field['field_name']);
$entity = $entity_info['label'];
if ($entity == t('Node')) {
$entity = t('Content');

View file

@ -187,7 +187,6 @@ class views_handler_argument_term_node_tid_depth_join extends views_handler_argu
'operator' => $operator,
),
);
$taxonomy_index_alias = $this->query->add_relationship('taxonomy_index', $join, 'node');
// Distinct is required to prevent duplicate rows.
$this->query->distinct = TRUE;

View file

@ -59,7 +59,7 @@ class views_handler_field_term_link_edit extends views_handler_field {
/**
* {@inheritdoc}
*/
function render($values) {
public function render($values) {
$value = $this->get_value($values, 'tid');
return $this->render_link($this->sanitize_value($value), $values);
}
@ -67,7 +67,7 @@ class views_handler_field_term_link_edit extends views_handler_field {
/**
* {@inheritdoc}
*/
function render_link($data, $values) {
public function render_link($data, $values) {
// Mock a term object for taxonomy_term_edit_access(). Use machine name and
// vid to ensure compatibility with vid based and machine name based
// access checks. See http://drupal.org/node/995156

View file

@ -245,9 +245,8 @@ class views_handler_filter_term_node_tid extends views_handler_filter_many_to_on
}
}
if (empty($form_state['exposed'])) {
// Retain the helper option
// Retain the helper option.
$this->helper->options_form($form, $form_state);
// Show help text if not exposed to end users.
@ -288,7 +287,7 @@ class views_handler_filter_term_node_tid extends views_handler_filter_many_to_on
}
// If view is an attachment and is inheriting exposed filters, then assume
// exposed input has already been validated
// exposed input has already been validated.
if (!empty($this->view->is_attachment) && $this->view->display_handler->uses_exposed()) {
$this->validated_exposed_input = (array) $this->view->exposed_raw_input[$this->options['expose']['identifier']];
}
@ -401,7 +400,7 @@ class views_handler_filter_term_node_tid extends views_handler_filter_many_to_on
* {@inheritdoc}
*/
public function value_submit($form, &$form_state) {
// prevent array_filter from messing up our arrays in parent submit.
// Prevent array_filter from messing up our arrays in parent submit.
}
/**
@ -423,7 +422,7 @@ class views_handler_filter_term_node_tid extends views_handler_filter_many_to_on
* {@inheritdoc}
*/
public function admin_summary() {
// set up $this->value_options for the parent summary
// Set up $this->value_options for the parent summary.
$this->value_options = array();
if ($this->value) {

View file

@ -153,7 +153,6 @@ class views_handler_filter_term_node_tid_depth_join extends views_handler_filter
'operator' => $operator,
),
);
$taxonomy_index_alias = $this->query->add_relationship('taxonomy_index', $join, 'node');
}
}

View file

@ -60,7 +60,7 @@ class views_plugin_argument_default_taxonomy_tid extends views_plugin_argument_d
$form['limit'] = array(
'#type' => 'checkbox',
'#title' => t('Limit terms by vocabulary'),
'#default_value'=> $this->options['limit'],
'#default_value' => $this->options['limit'],
'#process' => array('form_process_checkbox', 'ctools_dependent_process'),
'#dependency' => array(
'edit-options-argument-default-taxonomy-tid-node' => array(1),
@ -90,7 +90,7 @@ class views_plugin_argument_default_taxonomy_tid extends views_plugin_argument_d
$form['anyall'] = array(
'#type' => 'radios',
'#title' => t('Multiple-value handling'),
'#default_value'=> $this->options['anyall'],
'#default_value' => $this->options['anyall'],
'#process' => array('form_process_radios', 'ctools_dependent_process'),
'#options' => array(
',' => t('Filter to items that share all terms'),
@ -145,7 +145,7 @@ class views_plugin_argument_default_taxonomy_tid extends views_plugin_argument_d
}
if (!empty($this->options['limit'])) {
$tids = array();
// filter by vocabulary
// Filter by vocabulary.
foreach ($taxonomy as $tid => $vocab) {
if (!empty($this->options['vocabularies'][$vocab])) {
$tids[] = $tid;

View file

@ -155,7 +155,7 @@ class views_plugin_argument_validate_taxonomy_term extends views_plugin_argument
}
}
// if unverified tids left - verify them and cache results.
// If unverified tids left - verify them and cache results.
if (count($test)) {
$query = db_select('taxonomy_term_data', 'td');
$query->addTag('taxonomy_term_access');

View file

@ -16,10 +16,10 @@ class views_handler_field_node_link_translate extends views_handler_field_node_l
* {@inheritdoc}
*/
public function render_link($data, $values) {
// ensure user has access to edit this node.
// Ensure user has access to edit this node.
$node = $this->get_value($values);
$node->status = 1;
// unpublished nodes ignore access control.
// Unpublished nodes ignore access control.
if ($node->language == LANGUAGE_NONE || !translation_supported_type($node->type) || !node_access('view', $node) || !user_access('translate content')) {
return;
}

View file

@ -91,7 +91,7 @@ class views_handler_relationship_translation extends views_handler_relationship
}
if (!empty($def['join_handler']) && class_exists($def['join_handler'])) {
$join = new $def['join_handler'];
$join = new $def['join_handler']();
}
else {
$join = new views_join();

View file

@ -15,7 +15,7 @@ function user_views_data() {
// 'users' table.
// Define the base group of this table. Fields that don't have a group
// defined will go into this field by default.
$data['users']['table']['group'] = t('User');
$data['users']['table']['group'] = t('User');
$data['users']['table']['base'] = array(
'field' => 'uid',
@ -42,9 +42,9 @@ function user_views_data() {
// User ID / 'uid'.
$data['users']['uid'] = array(
// The item it appears as on the UI,
// The item it appears as on the UI.
'title' => t('Uid'),
// The help that appears on the UI,
// The help that appears on the UI.
'help' => t('The user ID'),
'field' => array(
'handler' => 'views_handler_field_user',
@ -125,9 +125,9 @@ function user_views_data() {
// User name.
$data['users']['name'] = array(
// The item it appears as on the UI,
// The item it appears as on the UI.
'title' => t('Name'),
// The help that appears on the UI,
// The help that appears on the UI.
'help' => t('The user or author name.'),
'field' => array(
'handler' => 'views_handler_field_user_name',
@ -149,9 +149,9 @@ function user_views_data() {
// Email address.
// Note that this field implements field level access control.
$data['users']['mail'] = array(
// The item it appears as on the UI,
// The item it appears as on the UI.
'title' => t('E-mail'),
// The help that appears on the UI,
// The help that appears on the UI.
'help' => t('E-mail address for a given user. This field is normally not shown to users, so be cautious when using it.'),
'field' => array(
'handler' => 'views_handler_field_user_mail',
@ -170,7 +170,7 @@ function user_views_data() {
// Language.
$data['users']['language'] = array(
// The item it appears as on the UI,
// The item it appears as on the UI.
'title' => t('Language'),
'help' => t('Language of the user'),
'field' => array(
@ -191,9 +191,9 @@ function user_views_data() {
// Picture.
$data['users']['picture_fid']['moved to'] = array('users', 'picture');
$data['users']['picture'] = array(
// The item it appears as on the UI,
// The item it appears as on the UI.
'title' => t('Picture'),
// The help that appears on the UI,
// The help that appears on the UI.
'help' => t("The user's picture, if allowed."),
// Information for displaying the uid.
'field' => array(
@ -221,9 +221,9 @@ function user_views_data() {
// Created field.
$data['users']['created'] = array(
// The item it appears as on the UI,
// The item it appears as on the UI.
'title' => t('Created date'),
// The help that appears on the UI,
// The help that appears on the UI.
'help' => t('The date the user was created.'),
'field' => array(
'handler' => 'views_handler_field_date',
@ -296,9 +296,9 @@ function user_views_data() {
if (db_field_exists('users', 'changed')) {
// Changed field.
$data['users']['changed'] = array(
// The item it appears as on the UI,
// The item it appears as on the UI.
'title' => t('Changed date'),
// The help that appears on the UI,
// The help that appears on the UI.
'help' => t('The date the user was changed.'),
'field' => array(
'handler' => 'views_handler_field_date',
@ -315,9 +315,9 @@ function user_views_data() {
// Access field.
$data['users']['access'] = array(
// The item it appears as on the UI,
// The item it appears as on the UI.
'title' => t('Last access'),
// The help that appears on the UI,
// The help that appears on the UI.
'help' => t("The user's last access date."),
'field' => array(
'handler' => 'views_handler_field_date',
@ -333,9 +333,9 @@ function user_views_data() {
// Login field.
$data['users']['login'] = array(
// The item it appears as on the UI,
// The item it appears as on the UI.
'title' => t('Last login'),
// The help that appears on the UI,
// The help that appears on the UI.
'help' => t("The user's last login date."),
'field' => array(
'handler' => 'views_handler_field_date',
@ -351,9 +351,9 @@ function user_views_data() {
// Active status.
$data['users']['status'] = array(
// The item it appears as on the UI,
// The item it appears as on the UI.
'title' => t('Active status'),
// The help that appears on the UI,
// The help that appears on the UI.
'help' => t('Whether a user is active or blocked.'),
// Information for displaying a title as a field.
'field' => array(
@ -375,9 +375,9 @@ function user_views_data() {
// Log field.
$data['users']['signature'] = array(
// The item it appears as on the UI,
// The item it appears as on the UI.
'title' => t('Signature'),
// The help that appears on the UI,
// The help that appears on the UI.
'help' => t("The user's signature."),
// Information for displaying a title as a field.
'field' => array(
@ -415,7 +415,7 @@ function user_views_data() {
// ----------------------------------------------------------------------
// 'users_roles' table.
$data['users_roles']['table']['group'] = t('User');
$data['users_roles']['table']['group'] = t('User');
// Explain how this table joins to others.
$data['users_roles']['table']['join'] = array(
@ -487,7 +487,7 @@ function user_views_data() {
);
// 'permission' table.
$data['role_permission']['table']['group'] = t('User');
$data['role_permission']['table']['group'] = t('User');
$data['role_permission']['table']['join'] = array(
// Directly links to users table.
'users' => array(
@ -511,7 +511,7 @@ function user_views_data() {
// ----------------------------------------------------------------------
// 'authmap' table.
$data['authmap']['table']['group'] = t('User');
$data['authmap']['table']['group'] = t('User');
$data['authmap']['table']['join'] = array(
// Directly links to users table.
'users' => array(

View file

@ -16,7 +16,7 @@ class views_handler_argument_user_uid extends views_handler_argument_numeric {
* Override the behavior of title(). Get the name of the user.
*
* @return array
* A list of usernames.
* A list of usernames.
*/
public function title_query() {
if (!$this->argument) {

Some files were not shown because too many files have changed in this diff Show more