security update link,module_filters,search_api_solr,ubercart,views
This commit is contained in:
@@ -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