Commit 68a86462 authored by webchick's avatar webchick

Issue #2072593 by stevepurkiss, legolasbo, deneo: Remove Unused local variable...

Issue #2072593 by stevepurkiss, legolasbo, deneo: Remove Unused local variable  from /core/modules/views/lib/Drupal/views/Plugin/views/display/DisplayPluginBase.php.
parent 2f49630d
...@@ -224,7 +224,7 @@ public function isDefaultDisplay() { return FALSE; } ...@@ -224,7 +224,7 @@ public function isDefaultDisplay() { return FALSE; }
public function usesExposed() { public function usesExposed() {
if (!isset($this->has_exposed)) { if (!isset($this->has_exposed)) {
foreach ($this->handlers as $type => $value) { foreach ($this->handlers as $type => $value) {
foreach ($this->view->$type as $id => $handler) { foreach ($this->view->$type as $handler) {
if ($handler->canExpose() && $handler->isExposed()) { if ($handler->canExpose() && $handler->isExposed()) {
// one is all we need; if we find it, return true. // one is all we need; if we find it, return true.
$this->has_exposed = TRUE; $this->has_exposed = TRUE;
...@@ -373,7 +373,7 @@ public function acceptAttachments() { ...@@ -373,7 +373,7 @@ public function acceptAttachments() {
} }
if (!empty($this->view->argument) && $this->getOption('hide_attachment_summary')) { if (!empty($this->view->argument) && $this->getOption('hide_attachment_summary')) {
foreach ($this->view->argument as $argument_id => $argument) { foreach ($this->view->argument as $argument) {
if ($argument->needsStylePlugin() && empty($argument->argument_validated)) { if ($argument->needsStylePlugin() && empty($argument->argument_validated)) {
return FALSE; return FALSE;
} }
...@@ -1030,17 +1030,17 @@ public function getArgumentsTokens() { ...@@ -1030,17 +1030,17 @@ public function getArgumentsTokens() {
if (!empty($this->view->build_info['substitutions'])) { if (!empty($this->view->build_info['substitutions'])) {
$tokens = $this->view->build_info['substitutions']; $tokens = $this->view->build_info['substitutions'];
} }
$count = 0;
foreach ($this->view->display_handler->getHandlers('argument') as $arg => $handler) {
$token = '%' . ++$count;
if (!isset($tokens[$token])) {
$tokens[$token] = '';
}
// Use strip tags as there should never be HTML in the path. // Add tokens for every argument (contextual filter) and path arg.
// However, we need to preserve special characters like " that $handlers = count($this->view->display_handler->getHandlers('argument'));
// were removed by check_plain(). for ($count = 1; $count <= $handlers; $count++) {
$tokens['!' . $count] = isset($this->view->args[$count - 1]) ? strip_tags(decode_entities($this->view->args[$count - 1])) : ''; if (!isset($tokens["%$count"])) {
$tokens["%$count"] = '';
}
// Use strip tags as there should never be HTML in the path.
// However, we need to preserve special characters like " that
// were removed by check_plain().
$tokens["!$count"] = isset($this->view->args[$count - 1]) ? strip_tags(decode_entities($this->view->args[$count - 1])) : '';
} }
return $tokens; return $tokens;
...@@ -1129,8 +1129,6 @@ public function optionsSummary(&$categories, &$options) { ...@@ -1129,8 +1129,6 @@ public function optionsSummary(&$categories, &$options) {
$style_summary = empty($style_plugin_instance->definition['title']) ? t('Missing style plugin') : $style_plugin_instance->summaryTitle(); $style_summary = empty($style_plugin_instance->definition['title']) ? t('Missing style plugin') : $style_plugin_instance->summaryTitle();
$style_title = empty($style_plugin_instance->definition['title']) ? t('Missing style plugin') : $style_plugin_instance->pluginTitle(); $style_title = empty($style_plugin_instance->definition['title']) ? t('Missing style plugin') : $style_plugin_instance->pluginTitle();
$style = '';
$options['style'] = array( $options['style'] = array(
'category' => 'format', 'category' => 'format',
'title' => t('Format'), 'title' => t('Format'),
...@@ -1715,7 +1713,7 @@ public function buildOptionsForm(&$form, &$form_state) { ...@@ -1715,7 +1713,7 @@ public function buildOptionsForm(&$form, &$form_state) {
$options = array(); $options = array();
$count = 0; // This lets us prepare the key as we want it printed. $count = 0; // This lets us prepare the key as we want it printed.
foreach ($this->view->display_handler->getHandlers('argument') as $arg => $handler) { foreach ($this->view->display_handler->getHandlers('argument') as $handler) {
$options[t('Arguments')]['%' . ++$count] = t('@argument title', array('@argument' => $handler->adminLabel())); $options[t('Arguments')]['%' . ++$count] = t('@argument title', array('@argument' => $handler->adminLabel()));
$options[t('Arguments')]['!' . $count] = t('@argument input', array('@argument' => $handler->adminLabel())); $options[t('Arguments')]['!' . $count] = t('@argument input', array('@argument' => $handler->adminLabel()));
} }
...@@ -2073,7 +2071,6 @@ protected function formatThemes($themes) { ...@@ -2073,7 +2071,6 @@ protected function formatThemes($themes) {
$registry = $this->theme_registry; $registry = $this->theme_registry;
$extension = $this->theme_extension; $extension = $this->theme_extension;
$output = '';
$picked = FALSE; $picked = FALSE;
foreach ($themes as $theme) { foreach ($themes as $theme) {
$template = strtr($theme, '_', '-') . $extension; $template = strtr($theme, '_', '-') . $extension;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment