diff --git a/core/modules/views/lib/Drupal/views/ManyToOneHelper.php b/core/modules/views/lib/Drupal/views/ManyToOneHelper.php index 1209901..34e7e17 100644 --- a/core/modules/views/lib/Drupal/views/ManyToOneHelper.php +++ b/core/modules/views/lib/Drupal/views/ManyToOneHelper.php @@ -125,8 +125,8 @@ function summary_join() { // shortcuts $options = $this->handler->options; - $view = &$this->handler->view; - $query = &$this->handler->query; + $view = $this->handler->view; + $query = $this->handler->query; if (!empty($options['require_value'])) { $join->type = 'INNER'; diff --git a/core/modules/views/lib/Drupal/views/Plugin/views/HandlerBase.php b/core/modules/views/lib/Drupal/views/Plugin/views/HandlerBase.php index a1d357a..4b77678 100644 --- a/core/modules/views/lib/Drupal/views/Plugin/views/HandlerBase.php +++ b/core/modules/views/lib/Drupal/views/Plugin/views/HandlerBase.php @@ -341,9 +341,7 @@ public function buildGroupByForm(&$form, &$form_state) { * There is no need for this function to actually store the data. */ public function submitGroupByForm(&$form, &$form_state) { - $item =& $form_state['handler']->options; - - $item['group_type'] = $form_state['values']['options']['group_type']; + $form_state['handler']->options['group_type'] = $form_state['values']['options']['group_type']; } /** diff --git a/core/modules/views/lib/Drupal/views/Plugin/views/argument/ArgumentPluginBase.php b/core/modules/views/lib/Drupal/views/Plugin/views/argument/ArgumentPluginBase.php index 0dac4ed..5d923e1 100644 --- a/core/modules/views/lib/Drupal/views/Plugin/views/argument/ArgumentPluginBase.php +++ b/core/modules/views/lib/Drupal/views/Plugin/views/argument/ArgumentPluginBase.php @@ -428,7 +428,7 @@ public function submitOptionsForm(&$form, &$form_state) { } // Clear out the content of title if it's not enabled. - $options =& $form_state['values']['options']; + $options = &$form_state['values']['options']; if (empty($options['title_enable'])) { $options['title'] = ''; } diff --git a/core/modules/views/lib/Drupal/views/Plugin/views/argument_default/Php.php b/core/modules/views/lib/Drupal/views/Plugin/views/argument_default/Php.php index cf5a574..ffc1a4e 100644 --- a/core/modules/views/lib/Drupal/views/Plugin/views/argument_default/Php.php +++ b/core/modules/views/lib/Drupal/views/Plugin/views/argument_default/Php.php @@ -52,7 +52,7 @@ public function access() { function get_argument() { // set up variables to make it easier to reference during the argument. - $view = &$this->view; + $view = $this->view; $argument = &$this->argument; ob_start(); $result = eval($this->options['code']); diff --git a/core/modules/views/lib/Drupal/views/Plugin/views/argument_validator/Php.php b/core/modules/views/lib/Drupal/views/Plugin/views/argument_validator/Php.php index 9b23895..34c5323 100644 --- a/core/modules/views/lib/Drupal/views/Plugin/views/argument_validator/Php.php +++ b/core/modules/views/lib/Drupal/views/Plugin/views/argument_validator/Php.php @@ -51,7 +51,7 @@ public function access() { function validate_argument($argument) { // set up variables to make it easier to reference during the argument. - $view = &$this->view; + $view = $this->view; $handler = &$this->argument; ob_start(); diff --git a/core/modules/views/lib/Drupal/views/Plugin/views/relationship/GroupwiseMax.php b/core/modules/views/lib/Drupal/views/Plugin/views/relationship/GroupwiseMax.php index 87376ee..c9efe27 100644 --- a/core/modules/views/lib/Drupal/views/Plugin/views/relationship/GroupwiseMax.php +++ b/core/modules/views/lib/Drupal/views/Plugin/views/relationship/GroupwiseMax.php @@ -247,7 +247,7 @@ function left_query($options) { // Workaround until http://drupal.org/node/844910 is fixed: // Remove all fields from the SELECT except the base id. - $fields =& $subquery->getFields(); + $fields = &$subquery->getFields(); foreach (array_keys($fields) as $field_name) { // The base id for this subquery is stored in our definition. if ($field_name != $this->definition['field']) { @@ -257,7 +257,7 @@ function left_query($options) { // Make every alias in the subquery safe within the outer query by // appending a namespace to it, '_inner' by default. - $tables =& $subquery->getTables(); + $tables = &$subquery->getTables(); foreach (array_keys($tables) as $table_name) { $tables[$table_name]['alias'] .= $this->subquery_namespace; // Namespace the join on every table. @@ -271,13 +271,13 @@ function left_query($options) { $fields[$field_name]['alias'] .= $this->subquery_namespace; } // Namespace conditions. - $where =& $subquery->conditions(); + $where = &$subquery->conditions(); $this->alter_subquery_condition($subquery, $where); // Not sure why, but our sort order clause doesn't have a table. // TODO: the call to add_item() above to add the sort handler is probably // wrong -- needs attention from someone who understands it. // In the meantime, this works, but with a leap of faith... - $orders =& $subquery->getOrderBy(); + $orders = &$subquery->getOrderBy(); foreach ($orders as $order_key => $order) { // But if we're using a whole view, we don't know what we have! if ($options['subquery_view']) { @@ -319,7 +319,7 @@ function alter_subquery_condition(AlterableInterface $query, &$conditions) { $condition['field'] = $this->condition_namespace($condition['field']); } elseif (is_object($condition['field'])) { - $sub_conditions =& $condition['field']->conditions(); + $sub_conditions = &$condition['field']->conditions(); $this->alter_subquery_condition($query, $sub_conditions); } } diff --git a/core/modules/views/lib/Drupal/views/Plugin/views/wizard/WizardPluginBase.php b/core/modules/views/lib/Drupal/views/Plugin/views/wizard/WizardPluginBase.php index a7f699f..ffe9783 100644 --- a/core/modules/views/lib/Drupal/views/Plugin/views/wizard/WizardPluginBase.php +++ b/core/modules/views/lib/Drupal/views/Plugin/views/wizard/WizardPluginBase.php @@ -506,7 +506,7 @@ public static function getSelected($form_state, $parents, $default_value, $eleme * The display ID (e.g. 'page' or 'block'). */ protected function build_form_style(array &$form, array &$form_state, $type) { - $style_form =& $form['displays'][$type]['options']['style']; + $style_form = &$form['displays'][$type]['options']['style']; $style = $style_form['style_plugin']['#default_value']; $style_plugin = Views::pluginManager('style')->createInstance($style); if (isset($style_plugin) && $style_plugin->usesRowPlugin()) { diff --git a/core/modules/views/lib/Drupal/views/Tests/Handler/FieldWebTest.php b/core/modules/views/lib/Drupal/views/Tests/Handler/FieldWebTest.php index 9d8c66e..e4f5ecb 100644 --- a/core/modules/views/lib/Drupal/views/Tests/Handler/FieldWebTest.php +++ b/core/modules/views/lib/Drupal/views/Tests/Handler/FieldWebTest.php @@ -206,7 +206,7 @@ public function testAlterUrl() { // Get the expected start of the path string. $base = ($absolute ? $base_url . '/' : base_path()) . $script_path; $absolute_string = $absolute ? 'absolute' : NULL; - $alter =& $id_field->options['alter']; + $alter = &$id_field->options['alter']; $alter['path'] = 'node/123'; $expected_result = url('node/123', array('absolute' => $absolute)); diff --git a/core/modules/views/lib/Drupal/views/ViewExecutable.php b/core/modules/views/lib/Drupal/views/ViewExecutable.php index aa39dae..8ceda1a 100644 --- a/core/modules/views/lib/Drupal/views/ViewExecutable.php +++ b/core/modules/views/lib/Drupal/views/ViewExecutable.php @@ -863,7 +863,7 @@ protected function _buildArguments() { // Iterate through each argument and process. foreach ($this->argument as $id => $arg) { $position++; - $argument = &$this->argument[$id]; + $argument = $this->argument[$id]; if ($argument->broken()) { continue; @@ -2042,15 +2042,6 @@ public function getItem($display_id, $type, $id) { } /** - * Sets the build array used by the view. - * - * @param array $element - */ - public function setElement(&$element) { - $this->element =& $element; - } - - /** * Sets the configuration of a handler instance on a given display. * * @param string $display_id diff --git a/core/modules/views/views.module b/core/modules/views/views.module index f1cb911..304ae54 100644 --- a/core/modules/views/views.module +++ b/core/modules/views/views.module @@ -264,7 +264,7 @@ function views_preprocess_node(&$vars) { function views_preprocess_comment(&$vars) { // The 'view' attribute of the node is added in template_preprocess_views_view_row_comment() if (!empty($vars['comment']->view) && $vars['comment']->view->storage->id()) { - $vars['view'] = &$vars['comment']->view; + $vars['view'] = $vars['comment']->view; $vars['theme_hook_suggestions'][] = 'comment__view__' . $vars['comment']->view->storage->id(); if (!empty($vars['node']->view->current_display)) { $vars['theme_hook_suggestions'][] = 'comment__view__' . $vars['comment']->view->storage->id() . '__' . $vars['comment']->view->current_display; @@ -1406,7 +1406,7 @@ function views_form_views_form_submit($form, &$form_state) { /** * Form builder for the exposed widgets form. * - * Be sure that $view and $display are references. + * Be sure that $display is a reference. */ function views_exposed_form($form, &$form_state) { // Don't show the form when batch operations are in progress. @@ -1420,7 +1420,7 @@ function views_exposed_form($form, &$form_state) { // Make sure that we validate because this form might be submitted // multiple times per page. $form_state['must_validate'] = TRUE; - $view = &$form_state['view']; + $view = $form_state['view']; $display = &$form_state['display']; $form_state['input'] = $view->getExposedInput(); @@ -1584,8 +1584,8 @@ function views_views_query_substitutions($view) { */ function views_query_views_alter(AlterableInterface $query) { $substitutions = $query->getMetaData('views_substitutions'); - $tables =& $query->getTables(); - $where =& $query->conditions(); + $tables = &$query->getTables(); + $where = &$query->conditions(); // Replaces substitions in tables. foreach ($tables as $table_name => $table_metadata) { @@ -1610,7 +1610,7 @@ function _views_query_tag_alter_condition(AlterableInterface $query, &$condition $condition['field'] = str_replace(array_keys($substitutions), array_values($substitutions), $condition['field']); } elseif (is_object($condition['field'])) { - $sub_conditions =& $condition['field']->conditions(); + $sub_conditions = &$condition['field']->conditions(); _views_query_tag_alter_condition($query, $sub_conditions, $substitutions); } // $condition['value'] is a subquery so alter the subquery recursive. diff --git a/core/modules/views/views.theme.inc b/core/modules/views/views.theme.inc index 44f48f6..7d2ae6b 100644 --- a/core/modules/views/views.theme.inc +++ b/core/modules/views/views.theme.inc @@ -189,7 +189,7 @@ function template_preprocess_views_view_fields(&$vars) { $empty = $field->is_value_empty($field_output, $field->options['empty_zero']); if (empty($field->options['exclude']) && (!$empty || (empty($field->options['hide_empty']) && empty($vars['options']['hide_empty'])))) { $object = new stdClass(); - $object->handler = &$view->field[$id]; + $object->handler = $view->field[$id]; $object->inline = !empty($vars['options']['inline'][$id]); $object->element_type = $object->handler->element_type(TRUE, !$vars['options']['default_field_elements'], $object->inline); @@ -863,11 +863,11 @@ function template_preprocess_views_view_list(&$vars) { function template_preprocess_views_view_rss(&$vars) { global $base_url; - $view = &$vars['view']; + $view = $vars['view']; $options = &$vars['options']; $items = &$vars['rows']; - $style = &$view->style_plugin; + $style = $view->style_plugin; $config = config('system.site'); @@ -925,7 +925,7 @@ function template_preprocess_views_view_rss(&$vars) { * Default theme function for all RSS rows. */ function template_preprocess_views_view_row_rss(&$vars) { - $view = &$vars['view']; + $view = $vars['view']; $options = &$vars['options']; $item = &$vars['row']; diff --git a/core/modules/views/views_ui/admin.inc b/core/modules/views/views_ui/admin.inc index df344d2..62613e6 100644 --- a/core/modules/views/views_ui/admin.inc +++ b/core/modules/views/views_ui/admin.inc @@ -333,7 +333,7 @@ function views_ui_pre_render_move_argument_options($form) { * the current display. */ function views_ui_standard_display_dropdown(&$form, &$form_state, $section) { - $view = &$form_state['view']; + $view = $form_state['view']; $display_id = $form_state['display_id']; $executable = $view->get('executable'); $displays = $executable->displayHandlers; diff --git a/core/modules/views/views_ui/lib/Drupal/views_ui/Form/Ajax/AddItem.php b/core/modules/views/views_ui/lib/Drupal/views_ui/Form/Ajax/AddItem.php index 1c8d13e..63e9a72 100644 --- a/core/modules/views/views_ui/lib/Drupal/views_ui/Form/Ajax/AddItem.php +++ b/core/modules/views/views_ui/lib/Drupal/views_ui/Form/Ajax/AddItem.php @@ -48,7 +48,7 @@ public function getFormID() { * Implements \Drupal\Core\Form\FormInterface::buildForm(). */ public function buildForm(array $form, array &$form_state) { - $view = &$form_state['view']; + $view = $form_state['view']; $display_id = $form_state['display_id']; $type = $form_state['type']; diff --git a/core/modules/views/views_ui/lib/Drupal/views_ui/Form/Ajax/Analyze.php b/core/modules/views/views_ui/lib/Drupal/views_ui/Form/Ajax/Analyze.php index b8b7ac9..fbd7d13 100644 --- a/core/modules/views/views_ui/lib/Drupal/views_ui/Form/Ajax/Analyze.php +++ b/core/modules/views/views_ui/lib/Drupal/views_ui/Form/Ajax/Analyze.php @@ -34,7 +34,7 @@ public function getFormID() { * Implements \Drupal\Core\Form\FormInterface::buildForm(). */ public function buildForm(array $form, array &$form_state) { - $view = &$form_state['view']; + $view = $form_state['view']; $form['#title'] = t('View analysis'); $form['#section'] = 'analyze'; diff --git a/core/modules/views/views_ui/lib/Drupal/views_ui/Form/Ajax/ConfigItem.php b/core/modules/views/views_ui/lib/Drupal/views_ui/Form/Ajax/ConfigItem.php index 93564b7..ec4953e 100644 --- a/core/modules/views/views_ui/lib/Drupal/views_ui/Form/Ajax/ConfigItem.php +++ b/core/modules/views/views_ui/lib/Drupal/views_ui/Form/Ajax/ConfigItem.php @@ -51,7 +51,7 @@ public function getFormID() { * Implements \Drupal\Core\Form\FormInterface::buildForm(). */ public function buildForm(array $form, array &$form_state) { - $view = &$form_state['view']; + $view = $form_state['view']; $display_id = $form_state['display_id']; $type = $form_state['type']; $id = $form_state['id']; @@ -159,7 +159,7 @@ public function buildForm(array $form, array &$form_state) { // Get form from the handler. $handler->buildOptionsForm($form['options'], $form_state); - $form_state['handler'] = &$handler; + $form_state['handler'] = $handler; } $name = NULL; diff --git a/core/modules/views/views_ui/lib/Drupal/views_ui/Form/Ajax/ConfigItemExtra.php b/core/modules/views/views_ui/lib/Drupal/views_ui/Form/Ajax/ConfigItemExtra.php index c0d673e..73bce81 100644 --- a/core/modules/views/views_ui/lib/Drupal/views_ui/Form/Ajax/ConfigItemExtra.php +++ b/core/modules/views/views_ui/lib/Drupal/views_ui/Form/Ajax/ConfigItemExtra.php @@ -50,7 +50,7 @@ public function getFormID() { * Implements \Drupal\Core\Form\FormInterface::buildForm(). */ public function buildForm(array $form, array &$form_state) { - $view = &$form_state['view']; + $view = $form_state['view']; $display_id = $form_state['display_id']; $type = $form_state['type']; $id = $form_state['id']; @@ -83,7 +83,7 @@ public function buildForm(array $form, array &$form_state) { // Get form from the handler. $handler->buildExtraOptionsForm($form['options'], $form_state); - $form_state['handler'] = &$handler; + $form_state['handler'] = $handler; } $view->getStandardButtons($form, $form_state, 'views_ui_config_item_extra_form'); diff --git a/core/modules/views/views_ui/lib/Drupal/views_ui/Form/Ajax/ConfigItemGroup.php b/core/modules/views/views_ui/lib/Drupal/views_ui/Form/Ajax/ConfigItemGroup.php index 96229d4..aa3e13f 100644 --- a/core/modules/views/views_ui/lib/Drupal/views_ui/Form/Ajax/ConfigItemGroup.php +++ b/core/modules/views/views_ui/lib/Drupal/views_ui/Form/Ajax/ConfigItemGroup.php @@ -50,7 +50,7 @@ public function getFormID() { * Implements \Drupal\Core\Form\FormInterface::buildForm(). */ public function buildForm(array $form, array &$form_state) { - $view = &$form_state['view']; + $view = $form_state['view']; $display_id = $form_state['display_id']; $type = $form_state['type']; $id = $form_state['id']; @@ -83,7 +83,7 @@ public function buildForm(array $form, array &$form_state) { $form['#title'] = t('Configure aggregation settings for @type %item', array('@type' => $types[$type]['lstitle'], '%item' => $handler->adminLabel())); $handler->buildGroupByForm($form['options'], $form_state); - $form_state['handler'] = &$handler; + $form_state['handler'] = $handler; } $view->getStandardButtons($form, $form_state, 'views_ui_config_item_group_form'); diff --git a/core/modules/views/views_ui/lib/Drupal/views_ui/Form/Ajax/Display.php b/core/modules/views/views_ui/lib/Drupal/views_ui/Form/Ajax/Display.php index 5642e86..396832c 100644 --- a/core/modules/views/views_ui/lib/Drupal/views_ui/Form/Ajax/Display.php +++ b/core/modules/views/views_ui/lib/Drupal/views_ui/Form/Ajax/Display.php @@ -59,7 +59,7 @@ public function getFormID() { * Implements \Drupal\Core\Form\FormInterface::buildForm(). */ public function buildForm(array $form, array &$form_state) { - $view = &$form_state['view']; + $view = $form_state['view']; $display_id = $form_state['display_id']; $section = $form_state['section']; @@ -67,7 +67,6 @@ public function buildForm(array $form, array &$form_state) { if (!$executable->setDisplay($display_id)) { views_ajax_error(t('Invalid display id @display', array('@display' => $display_id))); } - $display = &$executable->display[$display_id]; // Get form from the handler. $form['options'] = array( diff --git a/core/modules/views/views_ui/lib/Drupal/views_ui/Form/Ajax/EditDetails.php b/core/modules/views/views_ui/lib/Drupal/views_ui/Form/Ajax/EditDetails.php index ea9a4d2..c43c8c7 100644 --- a/core/modules/views/views_ui/lib/Drupal/views_ui/Form/Ajax/EditDetails.php +++ b/core/modules/views/views_ui/lib/Drupal/views_ui/Form/Ajax/EditDetails.php @@ -33,7 +33,7 @@ public function getFormID() { * Implements \Drupal\Core\Form\FormInterface::buildForm(). */ public function buildForm(array $form, array &$form_state) { - $view = &$form_state['view']; + $view = $form_state['view']; $form['#title'] = t('View name and description'); $form['#section'] = 'details'; diff --git a/core/modules/views/views_ui/lib/Drupal/views_ui/Form/Ajax/Rearrange.php b/core/modules/views/views_ui/lib/Drupal/views_ui/Form/Ajax/Rearrange.php index de01217..f90a75e 100644 --- a/core/modules/views/views_ui/lib/Drupal/views_ui/Form/Ajax/Rearrange.php +++ b/core/modules/views/views_ui/lib/Drupal/views_ui/Form/Ajax/Rearrange.php @@ -48,7 +48,7 @@ public function getFormID() { * Implements \Drupal\Core\Form\FormInterface::buildForm(). */ public function buildForm(array $form, array &$form_state) { - $view = &$form_state['view']; + $view = $form_state['view']; $display_id = $form_state['display_id']; $type = $form_state['type']; diff --git a/core/modules/views/views_ui/lib/Drupal/views_ui/Form/Ajax/RearrangeFilter.php b/core/modules/views/views_ui/lib/Drupal/views_ui/Form/Ajax/RearrangeFilter.php index 446d887..173250d 100644 --- a/core/modules/views/views_ui/lib/Drupal/views_ui/Form/Ajax/RearrangeFilter.php +++ b/core/modules/views/views_ui/lib/Drupal/views_ui/Form/Ajax/RearrangeFilter.php @@ -33,7 +33,7 @@ public function getFormID() { * Implements \Drupal\Core\Form\FormInterface::buildForm(). */ public function buildForm(array $form, array &$form_state) { - $view = &$form_state['view']; + $view = $form_state['view']; $display_id = $form_state['display_id']; $type = 'filter';