contrib modules security updates
This commit is contained in:
@@ -1542,6 +1542,7 @@ function page_manager_handler_import_submit(&$form, &$form_state) {
|
||||
* Rearrange the order of variants.
|
||||
*/
|
||||
function page_manager_handler_rearrange($form, &$form_state) {
|
||||
ctools_include('context-task-handler');
|
||||
$page = $form_state['page'];
|
||||
|
||||
$form['handlers'] = array('#tree' => TRUE);
|
||||
@@ -1552,9 +1553,20 @@ function page_manager_handler_rearrange($form, &$form_state) {
|
||||
}
|
||||
$handler = $page->handlers[$id];
|
||||
$plugin = page_manager_get_task_handler($handler->handler);
|
||||
|
||||
$object = ctools_context_handler_get_task_object($page->task, $page->subtask, $handler);
|
||||
$display = new stdClass();
|
||||
$display->context = ctools_context_load_contexts($object, TRUE);
|
||||
$content = page_manager_get_handler_title($plugin, $handler, $page->task, $page->subtask_id);
|
||||
$access = ctools_access_group_summary(!empty($handler->conf['access']) ? $handler->conf['access'] : array(), $display->context);
|
||||
if ($access) {
|
||||
$access = t('This panel will be selected if @conditions.', array('@conditions' => $access));
|
||||
}
|
||||
else {
|
||||
$access = t('This panel will always be selected.');
|
||||
}
|
||||
$content .= '<div>' . $access . '</div>';
|
||||
$form['handlers'][$id]['title'] = array(
|
||||
'#markup' => page_manager_get_handler_title($plugin, $handler, $page->task, $page->subtask_id),
|
||||
'#markup' => $content,
|
||||
);
|
||||
|
||||
$form['handlers'][$id]['weight'] = array(
|
||||
|
||||
Reference in New Issue
Block a user