security update link,module_filters,search_api_solr,ubercart,views
This commit is contained in:
@@ -94,11 +94,27 @@ function context_theme_registry_alter(&$theme_registry) {
|
||||
*/
|
||||
function context_ctools_render_alter($info, $page, $data) {
|
||||
extract($data);
|
||||
if ($page && in_array($task['name'], array('node_view', 'node_edit'), TRUE)) {
|
||||
foreach ($contexts as $ctools_context) {
|
||||
if (in_array('node', $ctools_context->type) && !empty($ctools_context->data)) {
|
||||
context_node_condition($ctools_context->data, $task['name'] === 'node_view' ? 'view' : 'form');
|
||||
break;
|
||||
|
||||
// Check for page handlers.
|
||||
if ($page) {
|
||||
// Check for node page handler.
|
||||
if (in_array($task['name'], array('node_view', 'node_edit'), TRUE)) {
|
||||
foreach ($contexts as $ctools_context) {
|
||||
if (in_array('node', $ctools_context->type) && !empty($ctools_context->data)) {
|
||||
context_node_condition($ctools_context->data, $task['name'] === 'node_view' ? 'view' : 'form');
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
// Check for taxonomy term page handler.
|
||||
elseif (in_array($task['name'], array('term_view', 'term_edit'), TRUE)) {
|
||||
foreach ($contexts as $ctools_context) {
|
||||
if (in_array('taxonomy_term', $ctools_context->type) && !empty($ctools_context->data)) {
|
||||
if ($plugin = context_get_plugin('condition', 'taxonomy_term')) {
|
||||
$plugin->execute($ctools_context->data, $task['name'] === 'term_view' ? 'view' : 'form');
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -8,9 +8,8 @@ files[] = tests/context.test
|
||||
files[] = tests/context.conditions.test
|
||||
files[] = tests/context.reactions.test
|
||||
|
||||
; Information added by Drupal.org packaging script on 2016-05-18
|
||||
version = "7.x-3.7"
|
||||
; Information added by Drupal.org packaging script on 2019-02-26
|
||||
version = "7.x-3.10"
|
||||
core = "7.x"
|
||||
project = "context"
|
||||
datestamp = "1463605446"
|
||||
|
||||
datestamp = "1551220089"
|
||||
|
@@ -243,6 +243,11 @@ function context_preprocess_menu_link(&$variables) {
|
||||
// css class to the link of this menu.
|
||||
// - Do not add class twice on current page.
|
||||
if (in_array($variables['element']['#href'], $reaction_menu_paths) && $variables['element']['#href'] != $_GET['q']) {
|
||||
// Initialize classes array if not set.
|
||||
if (!isset($variables['element']['#localized_options']['attributes']['class'])) {
|
||||
$variables['element']['#localized_options']['attributes']['class'] = array();
|
||||
}
|
||||
|
||||
// Do not add the 'active' class twice in views tabs.
|
||||
if (!in_array('active', $variables['element']['#localized_options']['attributes']['class'])) {
|
||||
$variables['element']['#localized_options']['attributes']['class'][] = 'active';
|
||||
|
@@ -6,9 +6,8 @@ core = 7.x
|
||||
|
||||
files[] = plugins/context_layouts_reaction_block.inc
|
||||
|
||||
; Information added by Drupal.org packaging script on 2016-05-18
|
||||
version = "7.x-3.7"
|
||||
; Information added by Drupal.org packaging script on 2019-02-26
|
||||
version = "7.x-3.10"
|
||||
core = "7.x"
|
||||
project = "context"
|
||||
datestamp = "1463605446"
|
||||
|
||||
datestamp = "1551220089"
|
||||
|
@@ -8,9 +8,8 @@ configure = admin/structure/context
|
||||
files[] = context.module
|
||||
files[] = tests/context_ui.test
|
||||
|
||||
; Information added by Drupal.org packaging script on 2016-05-18
|
||||
version = "7.x-3.7"
|
||||
; Information added by Drupal.org packaging script on 2019-02-26
|
||||
version = "7.x-3.10"
|
||||
core = "7.x"
|
||||
project = "context"
|
||||
datestamp = "1463605446"
|
||||
|
||||
datestamp = "1551220089"
|
||||
|
@@ -16,7 +16,7 @@ class context_condition_query_string extends context_condition_path {
|
||||
*/
|
||||
function execute() {
|
||||
if ($this->condition_used()) {
|
||||
$current_query_string = $_SERVER["QUERY_STRING"];
|
||||
$current_query_string = empty($_SERVER["QUERY_STRING"]) ? '' : $_SERVER["QUERY_STRING"];
|
||||
foreach ($this->get_contexts() as $context) {
|
||||
$query_strings = $this->fetch_from_context($context, 'values');
|
||||
if ($this->match($current_query_string, $query_strings, TRUE)) {
|
||||
|
@@ -400,13 +400,17 @@ class context_reaction_block extends context_reaction {
|
||||
unset($_context_blocks);
|
||||
|
||||
foreach ($context_blocks as $r => $blocks) {
|
||||
//only render blocks in an active region
|
||||
// Only render blocks in an active region.
|
||||
if (array_key_exists($r, $active_regions)) {
|
||||
$context_blocks[$r] = _block_render_blocks($blocks);
|
||||
|
||||
// Make blocks editable if allowed.
|
||||
if ($this->is_editable_region($r)) {
|
||||
foreach ($context_blocks[$r] as $key => $block) {
|
||||
$editable = $this->is_editable_region($r);
|
||||
foreach ($context_blocks[$r] as $key => $block) {
|
||||
// Add the region property to each block.
|
||||
$context_blocks[$r][$key]->region = $r;
|
||||
|
||||
// Make blocks editable if allowed.
|
||||
if ($editable) {
|
||||
$context_blocks[$r][$key] = $this->editable_block($block);
|
||||
}
|
||||
}
|
||||
@@ -450,12 +454,9 @@ class context_reaction_block extends context_reaction {
|
||||
*/
|
||||
protected function max_block_weight() {
|
||||
$blocks = $this->get_blocks();
|
||||
$block_count = 0;
|
||||
foreach ($blocks as $region => $block_list) {
|
||||
$block_count += count($block_list);
|
||||
}
|
||||
// Add 2 to make sure there's space at either end of the block list
|
||||
return round(($block_count + 2) / 2);
|
||||
|
||||
// Add 2 to make sure there's space at either end of the block list.
|
||||
return round((count($blocks) + 2) / 2);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@@ -68,7 +68,7 @@ DrupalContextBlockForm = function(blockForm) {
|
||||
|
||||
// Hide enabled blocks from selector that are used
|
||||
$('table.context-blockform-region tr').each(function() {
|
||||
var bid = $(this).attr('id');
|
||||
var bid = Drupal.checkPlain($(this).attr('id'));
|
||||
$('div.context-blockform-selector input[value="'+bid+'"]').parents('div.form-item').eq(0).hide();
|
||||
});
|
||||
// Show blocks in selector that are unused
|
||||
|
@@ -17,7 +17,7 @@ class context_reaction_region extends context_reaction {
|
||||
'#type' => 'fieldset',
|
||||
'#title' => "Disable Regions in {$theme->name} Theme",
|
||||
'#collapsible' => TRUE,
|
||||
'#collapsed' => !array_reduce($default, create_function('$a, $b', 'return $a || $b;')),
|
||||
'#collapsed' => !array_reduce($default, 'context_reaction_region::collapseRegion'),
|
||||
);
|
||||
$form[$theme->name]['disable'] = array(
|
||||
'#type' => 'checkboxes',
|
||||
@@ -29,6 +29,10 @@ class context_reaction_region extends context_reaction {
|
||||
}
|
||||
return $form;
|
||||
}
|
||||
|
||||
function collapseRegion($a, $b) {
|
||||
return $a || $b;
|
||||
}
|
||||
|
||||
function execute(&$page) {
|
||||
global $theme;
|
||||
|
Reference in New Issue
Block a user