security update core+modules

This commit is contained in:
Bachir Soussi Chiadmi
2015-04-26 18:38:56 +02:00
parent 2f45ea820a
commit 7c96373038
1022 changed files with 30319 additions and 11259 deletions

View File

@@ -63,18 +63,6 @@ function views_content_views_content_type_content_types($plugin) {
return $types;
}
/**
* Return a single content type.
*/
function views_content_views_content_type_content_type($subtype, $plugin) {
$view = views_get_view($name);
if (empty($view)) {
return;
}
return _views_content_views_content_type($view);
}
/**
* Create the content type info array to give back to ctools for a given display.
*/

View File

@@ -83,7 +83,7 @@ function views_content_views_panes_content_type_content_type($subtype, $plugin)
function _views_content_panes_content_type($view, $display) {
// Ensure the handler is the right type, as Views will fall back to
// the default display if something is broken:
if (get_class($display->handler) != 'views_content_plugin_display_panel_pane') {
if (!is_a($display->handler, 'views_content_plugin_display_panel_pane')) {
return;
}
@@ -139,7 +139,7 @@ function views_content_views_panes_content_type_render($subtype, $conf, $panel_a
$view->set_display($display);
views_content_views_panes_add_defaults($conf, $view);
if (!$view->display_handler->access($GLOBALS['user']) || !$view->display_handler->panel_pane_display) {
if (!$view->display_handler->access($GLOBALS['user']) || empty($view->display_handler->panel_pane_display)) {
return;
}
@@ -162,6 +162,9 @@ function views_content_views_panes_content_type_render($subtype, $conf, $panel_a
$args[] = $contexts[$key]->argument;
}
}
else {
$args[] = isset($arguments[$id]['exception']['value']) ? $arguments[$id]['exception']['value'] : 'all';
}
break;
case 'fixed':
@@ -252,7 +255,7 @@ function views_content_views_panes_content_type_render($subtype, $conf, $panel_a
if ($conf['use_pager']) {
if (!isset($pager['options']['id']) || (isset($conf['pager_id']) && $pager['options']['id'] != $conf['pager_id'])) {
$pager['options']['id'] = $conf['pager_id'];
$pager['options']['id'] = (int) $conf['pager_id'];
}
}
@@ -262,7 +265,7 @@ function views_content_views_panes_content_type_render($subtype, $conf, $panel_a
if ($allow['fields_override']) {
if ($conf['fields_override']) {
$fields = $view->get_items('field');
foreach ($fields as $field => $display) {
foreach ($fields as $field => $field_display) {
$fields[$field]['exclude'] = empty($conf['fields_override'][$field]);
}
$view->display_handler->set_option('fields', $fields);
@@ -271,6 +274,11 @@ function views_content_views_panes_content_type_render($subtype, $conf, $panel_a
}
if ($allow['exposed_form'] && !empty($conf['exposed'])) {
foreach ($conf['exposed'] as $filter_name => $filter_value) {
if (!is_array($filter_value)) {
$conf['exposed'][$filter_name] = ctools_context_keyword_substitute($filter_value, array(), $contexts);
}
}
$view->set_exposed_input($conf['exposed']);
}
@@ -281,6 +289,11 @@ function views_content_views_panes_content_type_render($subtype, $conf, $panel_a
return;
}
// Add contextual links to the output.
$block = (array) $block;
views_add_block_contextual_links($block, $view, $display, 'panel_pane');
$block = (object) $block;
$block->title = $view->get_title();
if (empty($view->total_rows) || $view->total_rows <= $view->get_items_per_page()) {
@@ -310,7 +323,7 @@ function views_content_views_panes_add_defaults(&$conf, $view) {
$conf += array(
'link_to_view' => $view->display_handler->get_option('link_to_view'),
'more_link' => $view->display_handler->get_option('more_link'),
'more_link' => $view->display_handler->get_option('use_more'),
'feed_icons' => FALSE,
'use_pager' => $pager['type'] != 'none' && $pager['type'] != 'some',
'pager_id' => isset($pager['options']['id']) ? $pager['options']['id'] : 0,
@@ -405,7 +418,7 @@ function views_content_views_panes_content_type_edit_form($form, &$form_state) {
$form['fields_override'][$field] = array(
'#type' => 'checkbox',
'#title' => $title,
'#default_value' => isset($conf['fields_override'][$field]) ? $conf['fields_override'][$field] : TRUE,
'#default_value' => isset($conf['fields_override'][$field]) ? $conf['fields_override'][$field] : !$handler->options['exclude'],
);
}
}
@@ -599,7 +612,7 @@ function views_content_views_panes_content_type_admin_info($subtype, $conf, $con
$argument_input = $view->display_handler->get_option('argument_input');
foreach ($conf['arguments'] as $key => $value) {
if(!empty($value)){
if (!empty($value)){
$label = $argument_input[$key]['label'];
$info[] = $label . ': ' . $value;
}

View File

@@ -13,7 +13,7 @@ $plugin = array(
'title' => t('Term from view'),
'keyword' => 'term',
'description' => t('Extract a term context from a view context of the base type term.'),
'required context' => new ctools_context_required(t('View'), 'view', array('base' => 'term_data')),
'required context' => new ctools_context_required(t('View'), 'view', array('base' => 'taxonomy_term_data')),
'context' => 'views_content_term_from_view_context',
'edit form' => 'views_content_term_from_view_settings_form',
'edit form validate' => 'views_content_term_from_view_settings_form_validate',
@@ -26,7 +26,7 @@ $plugin = array(
function views_content_term_from_view_context($context, $conf, $placeholder = FALSE) {
// If unset it wants a generic, unfilled context, which is just NULL.
if (empty($context->data) || $placeholder) {
return ctools_context_create_empty('term', NULL);
return ctools_context_create_empty('entity:taxonomy_term', NULL);
}
$view = views_content_context_get_view($context);
// Ensure the view executes, but we don't need its output.
@@ -36,11 +36,11 @@ function views_content_term_from_view_context($context, $conf, $placeholder = FA
if (isset($view->result[$row])) {
$tid = $view->result[$row]->{$view->base_field};
if ($tid) {
$term = taxonomy_get_term($tid);
return ctools_context_create('term', $term);
$term = taxonomy_term_load($tid);
return ctools_context_create('entity:taxonomy_term', $term);
}
}
return ctools_context_create_empty('term', NULL);
return ctools_context_create_empty('entity:taxonomy_term', NULL);
}
/**

View File

@@ -25,6 +25,7 @@ function views_content_views_plugins() {
'use more' => TRUE,
'accept attachments' => TRUE,
'help topic' => 'display-pane',
'contextual links locations' => array('panel_pane'),
),
'ctools_context' => array(
'title' => t('Context'),

View File

@@ -5,13 +5,14 @@ dependencies[] = ctools
dependencies[] = views
core = 7.x
package = Chaos tool suite
version = CTOOLS_MODULE_VERSION
files[] = plugins/views/views_content_plugin_display_ctools_context.inc
files[] = plugins/views/views_content_plugin_display_panel_pane.inc
files[] = plugins/views/views_content_plugin_style_ctools_context.inc
; Information added by drupal.org packaging script on 2013-02-02
version = "7.x-1.2+31-dev"
; Information added by Drupal.org packaging script on 2015-03-18
version = "7.x-1.7"
core = "7.x"
project = "ctools"
datestamp = "1359766341"
datestamp = "1426696183"

View File

@@ -281,3 +281,17 @@ function _views_content_get_context_from_display($view, $id, $parent, $required
'view display id' => $id,
);
}
/**
* Implements hook_get_pane_links_alter().
*/
function views_content_get_pane_links_alter(&$links, $pane, $content_type) {
if ($pane->type === 'views_panes') {
list($view_name, $display_name) = explode('-', $pane->subtype);
$destination = array('destination' => current_path());
$links['top'][] = array(
'title' => t('Edit view'),
'href' => url('admin/structure/views/view/' . $view_name . '/edit/' . $display_name, array('query' => $destination, 'absolute' => TRUE)),
);
}
}