Issue #1705650 by damiankloip, aspilicious: Fixed Convert core variables to the config system.
							parent
							
								
									7dd0ee98b8
								
							
						
					
					
						commit
						18bb81596d
					
				| 
						 | 
					@ -202,7 +202,7 @@ function views_ajax_command_replace_title($title) {
 | 
				
			||||||
  $command = array(
 | 
					  $command = array(
 | 
				
			||||||
    'command' => 'viewsReplaceTitle',
 | 
					    'command' => 'viewsReplaceTitle',
 | 
				
			||||||
    'title' => $title,
 | 
					    'title' => $title,
 | 
				
			||||||
    'siteName' => variable_get('site_name', 'Drupal'),
 | 
					    'siteName' => config('system.site')->get('name'),
 | 
				
			||||||
  );
 | 
					  );
 | 
				
			||||||
  return $command;
 | 
					  return $command;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1685,7 +1685,7 @@ class View extends ViewsDbObject {
 | 
				
			||||||
      foreach ($this->build_info['breadcrumb'] as $path => $title) {
 | 
					      foreach ($this->build_info['breadcrumb'] as $path => $title) {
 | 
				
			||||||
        // Check to see if the frontpage is in the breadcrumb trail; if it
 | 
					        // Check to see if the frontpage is in the breadcrumb trail; if it
 | 
				
			||||||
        // is, we'll remove that from the actual breadcrumb later.
 | 
					        // is, we'll remove that from the actual breadcrumb later.
 | 
				
			||||||
        if ($path == variable_get('site_frontpage', 'user')) {
 | 
					        if ($path == config('system.site')->get('page.front')) {
 | 
				
			||||||
          $base = FALSE;
 | 
					          $base = FALSE;
 | 
				
			||||||
          $title = t('Home');
 | 
					          $title = t('Home');
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -86,7 +86,7 @@ class views_plugin_row_comment_rss extends views_plugin_row {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    $item_length = $this->options['item_length'];
 | 
					    $item_length = $this->options['item_length'];
 | 
				
			||||||
    if ($item_length == 'default') {
 | 
					    if ($item_length == 'default') {
 | 
				
			||||||
      $item_length = variable_get('feed_item_length', 'teaser');
 | 
					      $item_length = config('system.rss')->get('items.view_mode');
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    // Load the specified comment and its associated node:
 | 
					    // Load the specified comment and its associated node:
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -96,7 +96,7 @@ class views_plugin_row_node_rss extends views_plugin_row {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    $display_mode = $this->options['item_length'];
 | 
					    $display_mode = $this->options['item_length'];
 | 
				
			||||||
    if ($display_mode == 'default') {
 | 
					    if ($display_mode == 'default') {
 | 
				
			||||||
      $display_mode = variable_get('feed_item_length', 'teaser');
 | 
					      $display_mode = config('system.rss')->get('items.view_mode');
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    // Load the specified node:
 | 
					    // Load the specified node:
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -76,7 +76,7 @@ class views_handler_filter_search extends views_handler_filter {
 | 
				
			||||||
    if (!empty($form_state['values'][$key])) {
 | 
					    if (!empty($form_state['values'][$key])) {
 | 
				
			||||||
      $this->query_parse_search_expression($form_state['values'][$key]);
 | 
					      $this->query_parse_search_expression($form_state['values'][$key]);
 | 
				
			||||||
      if (count($this->search_query->words()) == 0) {
 | 
					      if (count($this->search_query->words()) == 0) {
 | 
				
			||||||
        form_set_error($key, format_plural(variable_get('minimum_word_size', 3), 'You must include at least one positive keyword with 1 character or more.', 'You must include at least one positive keyword with @count characters or more.'));
 | 
					        form_set_error($key, format_plural(config('search.settings')->get('index.minimum_word_size'), 'You must include at least one positive keyword with 1 character or more.', 'You must include at least one positive keyword with @count characters or more.'));
 | 
				
			||||||
      }
 | 
					      }
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -846,14 +846,16 @@ function template_preprocess_views_view_rss(&$vars) {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  $style    = &$view->style_plugin;
 | 
					  $style    = &$view->style_plugin;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  $config = config('system.site');
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  // The RSS 2.0 "spec" doesn't indicate HTML can be used in the description.
 | 
					  // The RSS 2.0 "spec" doesn't indicate HTML can be used in the description.
 | 
				
			||||||
  // We strip all HTML tags, but need to prevent double encoding from properly
 | 
					  // We strip all HTML tags, but need to prevent double encoding from properly
 | 
				
			||||||
  // escaped source data (such as & becoming &).
 | 
					  // escaped source data (such as & becoming &).
 | 
				
			||||||
  $vars['description'] = check_plain(decode_entities(strip_tags($style->get_description())));
 | 
					  $vars['description'] = check_plain(decode_entities(strip_tags($style->get_description())));
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  if ($view->display_handler->get_option('sitename_title')) {
 | 
					  if ($view->display_handler->get_option('sitename_title')) {
 | 
				
			||||||
    $title = variable_get('site_name', 'Drupal');
 | 
					    $title = $config->get('name');
 | 
				
			||||||
    if ($slogan = variable_get('site_slogan', '')) {
 | 
					    if ($slogan = $config->get('slogan')) {
 | 
				
			||||||
      $title .= ' - ' . $slogan;
 | 
					      $title .= ' - ' . $slogan;
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
| 
						 | 
					@ -877,7 +879,7 @@ function template_preprocess_views_view_rss(&$vars) {
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    // Compare the link to the default home page; if it's the default home page, just use $base_url.
 | 
					    // Compare the link to the default home page; if it's the default home page, just use $base_url.
 | 
				
			||||||
    if ($path == variable_get('site_frontpage', 'user')) {
 | 
					    if ($path == $config->get('page.front')) {
 | 
				
			||||||
      $path = '';
 | 
					      $path = '';
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue