Commit 18bb8159 authored by aspilicious's avatar aspilicious Committed by tim.plunkett

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

parent 7dd0ee98
......@@ -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;
}
......
......@@ -1685,7 +1685,7 @@ function get_breadcrumb($set = FALSE) {
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');
}
......
......@@ -86,7 +86,7 @@ function render($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:
......
......@@ -96,7 +96,7 @@ function render($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:
......
......@@ -76,7 +76,7 @@ function exposed_validate(&$form, &$form_state) {
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.'));
}
}
}
......
......@@ -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 = '';
}
......
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