Issue #1705650 by damiankloip, aspilicious: Fixed Convert core variables to the config system.

8.0.x
aspilicious 2012-08-11 22:02:21 +02:00 committed by Tim Plunkett
parent 7dd0ee98b8
commit 18bb81596d
6 changed files with 10 additions and 8 deletions

View File

@ -202,7 +202,7 @@ function views_ajax_command_replace_title($title) {
$command = array(
'command' => 'viewsReplaceTitle',
'title' => $title,
'siteName' => variable_get('site_name', 'Drupal'),
'siteName' => config('system.site')->get('name'),
);
return $command;
}

View File

@ -1685,7 +1685,7 @@ class View extends ViewsDbObject {
foreach ($this->build_info['breadcrumb'] as $path => $title) {
// Check to see if the frontpage is in the breadcrumb trail; if it
// 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;
$title = t('Home');
}

View File

@ -86,7 +86,7 @@ class views_plugin_row_comment_rss extends views_plugin_row {
$item_length = $this->options['item_length'];
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:

View File

@ -96,7 +96,7 @@ class views_plugin_row_node_rss extends views_plugin_row {
$display_mode = $this->options['item_length'];
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:

View File

@ -76,7 +76,7 @@ class views_handler_filter_search extends views_handler_filter {
if (!empty($form_state['values'][$key])) {
$this->query_parse_search_expression($form_state['values'][$key]);
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.'));
}
}
}

View File

@ -846,14 +846,16 @@ function template_preprocess_views_view_rss(&$vars) {
$style = &$view->style_plugin;
$config = config('system.site');
// 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
// escaped source data (such as &amp becoming &).
$vars['description'] = check_plain(decode_entities(strip_tags($style->get_description())));
if ($view->display_handler->get_option('sitename_title')) {
$title = variable_get('site_name', 'Drupal');
if ($slogan = variable_get('site_slogan', '')) {
$title = $config->get('name');
if ($slogan = $config->get('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.
if ($path == variable_get('site_frontpage', 'user')) {
if ($path == $config->get('page.front')) {
$path = '';
}