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(
|
||||
|
@@ -5,9 +5,9 @@ dependencies[] = ctools
|
||||
package = Chaos tool suite
|
||||
version = CTOOLS_MODULE_VERSION
|
||||
|
||||
; Information added by Drupal.org packaging script on 2015-03-18
|
||||
version = "7.x-1.7"
|
||||
; Information added by Drupal.org packaging script on 2016-08-17
|
||||
version = "7.x-1.10"
|
||||
core = "7.x"
|
||||
project = "ctools"
|
||||
datestamp = "1426696183"
|
||||
datestamp = "1471454104"
|
||||
|
||||
|
@@ -440,13 +440,18 @@ function page_manager_cache_load($task_name) {
|
||||
*/
|
||||
function page_manager_handler_get_name($task_name, $handlers, $handler) {
|
||||
$base = str_replace('-', '_', $task_name);
|
||||
$name = '';
|
||||
|
||||
// Optional machine name.
|
||||
if (!empty($handler->conf['name'])) {
|
||||
$name = $base . '__' . $handler->conf['name'];
|
||||
if (count(ctools_export_load_object('page_manager_handlers', 'names', array($name)))) {
|
||||
$name = '';
|
||||
}
|
||||
}
|
||||
|
||||
// If no machine name was provided, generate a unique name.
|
||||
else {
|
||||
// If no machine name was provided or the name is in use, generate a unique name.
|
||||
if (empty($name)) {
|
||||
$base .= '__' . $handler->handler;
|
||||
|
||||
// Use the ctools uuid generator to generate a unique id.
|
||||
@@ -472,6 +477,10 @@ function page_manager_handler_add_to_page(&$page, &$handler, $title = NULL) {
|
||||
|
||||
if ($title) {
|
||||
$handler->conf['title'] = $title;
|
||||
$handler->conf['name'] = trim(preg_replace('/[^a-z0-9_]+/', '-', strtolower($title)), '-');
|
||||
}
|
||||
else {
|
||||
$handler->conf['name'] = '';
|
||||
}
|
||||
|
||||
$name = page_manager_handler_get_name($page->task_name, $page->handlers, $handler);
|
||||
@@ -1193,7 +1202,7 @@ function page_manager_page_manager_pages_to_hook_code($names = array(), $name =
|
||||
foreach ($objects as $object) {
|
||||
// Have to implement our own because this export func sig requires it
|
||||
$code .= $export['export callback']($object, TRUE, ' ');
|
||||
$code .= " \${$export['identifier']}s['" . check_plain($object->$export['key']) . "'] = \${$export['identifier']};\n\n";
|
||||
$code .= " \${$export['identifier']}s['" . check_plain($object->{$export['key']}) . "'] = \${$export['identifier']};\n\n";
|
||||
}
|
||||
$code .= " return \${$export['identifier']}s;\n";
|
||||
$code .= "}\n";
|
||||
|
@@ -108,7 +108,7 @@ function page_manager_node_edit($node) {
|
||||
* Callback to handle the process of adding a node.
|
||||
*
|
||||
* This creates a basic $node and passes that off to page_manager_node_edit().
|
||||
* It is modeled after Drupal's node_add() function.
|
||||
* It is modelled after Drupal's node_add() function.
|
||||
*
|
||||
* Unlike node_add() we do not need to check node_access because that was
|
||||
* already checked by the menu system.
|
||||
|
@@ -78,10 +78,6 @@ function page_manager_node_view_menu_alter(&$items, $task) {
|
||||
* node view, which is node_page_view().
|
||||
*/
|
||||
function page_manager_node_view_page($node) {
|
||||
// Prep the node to be displayed so all of the regular hooks are triggered.
|
||||
// Also save the output for later, in case it is needed.
|
||||
$default_output = node_page_view($node);
|
||||
|
||||
// Load my task plugin
|
||||
$task = page_manager_get_task('node_view');
|
||||
|
||||
@@ -107,6 +103,9 @@ function page_manager_node_view_page($node) {
|
||||
}
|
||||
}
|
||||
|
||||
// Prepare the node to be displayed so all of the regular hooks are triggered.
|
||||
$default_output = node_page_view($node);
|
||||
|
||||
// Otherwise, fall back to the default output generated by node_page_view().
|
||||
return $default_output;
|
||||
}
|
||||
|
@@ -61,7 +61,7 @@ function page_manager_page_menu(&$items, $task) {
|
||||
}
|
||||
|
||||
$path = array();
|
||||
$page_arguments = array($subtask_id);
|
||||
$page_arguments = array((string) $subtask_id);
|
||||
$access_arguments = array($subtask->access);
|
||||
$load_arguments = array($subtask_id, '%index', '%map');
|
||||
|
||||
@@ -566,7 +566,7 @@ function page_manager_page_form_basic_validate(&$form, &$form_state) {
|
||||
if (strpos($path, '%') === FALSE) {
|
||||
$alias = db_query('SELECT alias, source FROM {url_alias} WHERE alias = :path', array(':path' => $path))->fetchObject();
|
||||
if ($alias) {
|
||||
form_error($form['path'], t('That path is currently assigned to be an alias for @alias. This system cannot override existing aliases.', array('@alias' => $alias->src)));
|
||||
form_error($form['path'], t('That path is currently assigned to be an alias for @alias. This system cannot override existing aliases.', array('@alias' => $alias->source)));
|
||||
}
|
||||
}
|
||||
else {
|
||||
|
Reference in New Issue
Block a user