Skip to content
Snippets Groups Projects
Commit 072bd04e authored by Chris Gross's avatar Chris Gross
Browse files

daily build

parent ad4a21d6
No related branches found
No related tags found
No related merge requests found
The following patches have been applied to this project: The following patches have been applied to this project:
- https://www.drupal.org/files/issues/ctools-readd_access_callback_params-2209775-24.patch - http://drupal.org/files/issues/ctools-readd_access_callback_params-2209775-24.patch
- http://drupal.org/files/issues/views_content-keyword-substitution-1910608-33.patch
This file was automatically generated by Drush Make (http://drupal.org/project/drush). This file was automatically generated by Drush Make (http://drupal.org/project/drush).
\ No newline at end of file
...@@ -143,68 +143,11 @@ function views_content_views_panes_content_type_render($subtype, $conf, $panel_a ...@@ -143,68 +143,11 @@ function views_content_views_panes_content_type_render($subtype, $conf, $panel_a
return; return;
} }
$conf['pane_contexts'] = $contexts;
$conf['panel_args'] = $panel_args;
$view->display_handler->set_pane_conf($conf); $view->display_handler->set_pane_conf($conf);
$args = array();
$arguments = $view->display_handler->get_option('arguments');
$context_keys = isset($conf['context']) ? $conf['context'] : array();
foreach ($view->display_handler->get_argument_input() as $id => $argument) {
switch ($argument['type']) {
case 'context':
$key = array_shift($context_keys);
if (isset($contexts[$key])) {
if (strpos($argument['context'], '.')) {
list($context, $converter) = explode('.', $argument['context'], 2);
$args[] = ctools_context_convert_context($contexts[$key], $converter, array('sanitize' => FALSE));
}
else {
$args[] = $contexts[$key]->argument;
}
}
else {
$args[] = isset($arguments[$id]['exception']['value']) ? $arguments[$id]['exception']['value'] : 'all';
}
break;
case 'fixed':
$args[] = $argument['fixed'];
break;
case 'panel':
$args[] = isset($panel_args[$argument['panel']]) ? $panel_args[$argument['panel']] : NULL;
break;
case 'user':
$args[] = (isset($conf['arguments'][$id]) && $conf['arguments'][$id] !== '') ? ctools_context_keyword_substitute($conf['arguments'][$id], array(), $contexts) : NULL;
break;
case 'wildcard':
// Put in the wildcard.
$args[] = isset($arguments[$id]['wildcard']) ? $arguments[$id]['wildcard'] : '*';
break;
case 'none':
default:
// Put in NULL.
// views.module knows what to do with NULL (or missing) arguments
$args[] = NULL;
break;
}
}
// remove any trailing NULL arguments as these are non-args:
while (count($args) && end($args) === NULL) {
array_pop($args);
}
$view->set_arguments($args);
$allow = $view->display_handler->get_option('allow'); $allow = $view->display_handler->get_option('allow');
if (!empty($conf['path'])) {
$conf['path'] = ctools_context_keyword_substitute($conf['path'], array(), $contexts);
}
if ($allow['path_override'] && !empty($conf['path'])) { if ($allow['path_override'] && !empty($conf['path'])) {
$view->override_path = $conf['path']; $view->override_path = $conf['path'];
} }
...@@ -221,67 +164,6 @@ function views_content_views_panes_content_type_render($subtype, $conf, $panel_a ...@@ -221,67 +164,6 @@ function views_content_views_panes_content_type_render($subtype, $conf, $panel_a
$block->title_link = $view->get_url(); $block->title_link = $view->get_url();
} }
// more link
if ($allow['more_link']) {
if (empty($conf['more_link'])) {
$view->display_handler->set_option('use_more', FALSE);
}
else {
$view->display_handler->set_option('use_more', TRUE);
// make sure the view runs the count query so we know whether or not the
// more link applies.
$view->get_total_rows = TRUE;
}
}
if ($allow['items_per_page'] && isset($conf['items_per_page'])) {
$view->set_items_per_page($conf['items_per_page']);
}
if ($allow['offset']) {
$view->set_offset($conf['offset']);
}
if ($allow['use_pager']) {
// Only set use_pager if they differ, this way we can avoid overwriting the
// pager type that Views uses.
$pager = $view->display_handler->get_option('pager');
if ($conf['use_pager'] && ($pager['type'] == 'none' || $pager['type'] == 'some')) {
$pager['type'] = 'full';
}
elseif (!$conf['use_pager'] && $pager['type'] != 'none' && $pager['type'] != 'some') {
$pager['type'] = $view->get_items_per_page() || !empty($pager['options']['items_per_page']) ? 'some' : 'none';
}
if ($conf['use_pager']) {
if (!isset($pager['options']['id']) || (isset($conf['pager_id']) && $pager['options']['id'] != $conf['pager_id'])) {
$pager['options']['id'] = (int) $conf['pager_id'];
}
}
$view->display_handler->set_option('pager', $pager);
}
if ($allow['fields_override']) {
if ($conf['fields_override']) {
$fields = $view->get_items('field');
foreach ($fields as $field => $field_display) {
$fields[$field]['exclude'] = empty($conf['fields_override'][$field]);
}
$view->display_handler->set_option('fields', $fields);
}
}
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']);
}
$stored_feeds = drupal_add_feed(); $stored_feeds = drupal_add_feed();
$block->content = $view->preview(); $block->content = $view->preview();
......
...@@ -48,8 +48,12 @@ class views_content_plugin_display_panel_pane extends views_plugin_display { ...@@ -48,8 +48,12 @@ class views_content_plugin_display_panel_pane extends views_plugin_display {
return isset($this->has_pane_conf); return isset($this->has_pane_conf);
} }
function set_pane_conf($conf = array()) { function set_pane_conf($conf = array(), $set_cache = TRUE) {
$this->set_option('pane_conf', $conf); $this->set_option('pane_conf', $conf);
$this->view->dom_id = !empty($this->view->dom_id) ? $this->view->dom_id : md5($this->view->name . REQUEST_TIME . rand());
if ($set_cache) {
cache_set('view_panel_pane_' . $this->view->dom_id, $conf);
}
$this->has_pane_conf = TRUE; $this->has_pane_conf = TRUE;
} }
...@@ -412,5 +416,153 @@ class views_content_plugin_display_panel_pane extends views_plugin_display { ...@@ -412,5 +416,153 @@ class views_content_plugin_display_panel_pane extends views_plugin_display {
return empty($conf['exposed_form']); return empty($conf['exposed_form']);
} }
/**
* Set the pane configuration options
* Done here in handler for reuse between views_content_views_panes_content_type_render
* and views_content_views_pre_view
*/
function pane_process_conf() {
$conf = $this->get_option('pane_conf');
if (!$conf) {
// See if dom id has been cached and get conf from there.
if (!empty($this->view->dom_id) && ($cache = cache_get('view_panel_pane_' . $this->view->dom_id))) {
$conf = $cache->data;
}
if (!$conf) {
return;
}
$this->set_pane_conf($conf);
}
$contexts = $conf['pane_contexts'];
$panel_args = $conf['panel_args'];
$args = array();
$arguments = $this->get_option('arguments');
$context_keys = isset($conf['context']) ? $conf['context'] : array();
foreach ($this->get_argument_input() as $id => $argument) {
switch ($argument['type']) {
case 'context':
$key = array_shift($context_keys);
if (isset($contexts[$key])) {
if (strpos($argument['context'], '.')) {
list($context, $converter) = explode('.', $argument['context'], 2);
$args[] = ctools_context_convert_context($contexts[$key], $converter, array('sanitize' => FALSE));
}
else {
$args[] = $contexts[$key]->argument;
}
}
else {
$args[] = isset($arguments[$id]['exception']['value']) ? $arguments[$id]['exception']['value'] : 'all';
}
break;
case 'fixed':
$args[] = $argument['fixed'];
break;
case 'panel':
$args[] = isset($panel_args[$argument['panel']]) ? $panel_args[$argument['panel']] : NULL;
break;
case 'user':
$args[] = (isset($conf['arguments'][$id]) && $conf['arguments'][$id] !== '') ? ctools_context_keyword_substitute($conf['arguments'][$id], array(), $contexts) : NULL;
break;
case 'wildcard':
// Put in the wildcard.
$args[] = isset($arguments[$id]['wildcard']) ? $arguments[$id]['wildcard'] : '*';
break;
case 'none':
default:
// Put in NULL.
// views.module knows what to do with NULL (or missing) arguments
$args[] = NULL;
break;
}
}
// remove any trailing NULL arguments as these are non-args:
while (count($args) && end($args) === NULL) {
array_pop($args);
}
$this->view->set_arguments($args);
$allow = $this->get_option('allow');
if (!empty($conf['path'])) {
$conf['path'] = ctools_context_keyword_substitute($conf['path'], array(), $contexts);
}
if ($allow['path_override'] && !empty($conf['path'])) {
$this->view->override_path = $conf['path'];
}
else if ($path = $this->get_option('inherit_panels_path')) {
$this->view->override_path = $_GET['q'];
}
// more link
if ($allow['more_link']) {
if (empty($conf['more_link'])) {
$this->set_option('use_more', FALSE);
}
else {
$this->set_option('use_more', TRUE);
// make sure the view runs the count query so we know whether or not the
// more link applies.
$this->view->get_total_rows = TRUE;
}
}
if ($allow['items_per_page'] && isset($conf['items_per_page'])) {
$this->view->set_items_per_page($conf['items_per_page']);
}
if ($allow['offset']) {
$this->view->set_offset($conf['offset']);
}
if ($allow['use_pager']) {
// Only set use_pager if they differ, this way we can avoid overwriting the
// pager type that Views uses.
$pager = $this->get_option('pager');
if ($conf['use_pager'] && ($pager['type'] == 'none' || $pager['type'] == 'some')) {
$pager['type'] = 'full';
}
elseif (!$conf['use_pager'] && $pager['type'] != 'none' && $pager['type'] != 'some') {
$pager['type'] = $this->view->get_items_per_page() || !empty($pager['options']['items_per_page']) ? 'some' : 'none';
}
if ($conf['use_pager']) {
if (!isset($pager['options']['id']) || (isset($conf['pager_id']) && $pager['options']['id'] != $conf['pager_id'])) {
$pager['options']['id'] = (int) $conf['pager_id'];
}
}
$this->set_option('pager', $pager);
}
if ($allow['fields_override']) {
if ($conf['fields_override']) {
$fields = $this->view->get_items('field');
foreach ($fields as $field => $field_display) {
$fields[$field]['exclude'] = empty($conf['fields_override'][$field]);
}
$this->set_option('fields', $fields);
}
}
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);
}
}
$this->view->set_exposed_input($conf['exposed']);
}
}
} }
...@@ -295,3 +295,24 @@ function views_content_get_pane_links_alter(&$links, $pane, $content_type) { ...@@ -295,3 +295,24 @@ function views_content_get_pane_links_alter(&$links, $pane, $content_type) {
); );
} }
} }
/**
* Implements hook_module_implements_alter()
*/
function views_content_module_implements_alter(&$implementations, $hook) {
if ($hook == 'views_pre_view') {
$group = $implementations['views_content'];
unset($implementations['views_content']);
$implementations = array('views_content' => $group) + $implementations;
}
}
/**
* Implements hook_views_pre_view()
*/
function views_content_views_pre_view(&$view) {
if (method_exists($view->display_handler, 'pane_process_conf')) {
// process the pane configuration to prevent loss when using ajax
$view->display_handler->pane_process_conf();
}
}
...@@ -3,6 +3,6 @@ The following patches have been applied to this project: ...@@ -3,6 +3,6 @@ The following patches have been applied to this project:
- http://drupal.org/files/defaultconfig_include_features_file.patch - http://drupal.org/files/defaultconfig_include_features_file.patch
- http://drupal.org/files/defaultconfig-rebuild-filters-2008178-4_0.patch - http://drupal.org/files/defaultconfig-rebuild-filters-2008178-4_0.patch
- http://drupal.org/files/fix-defaultconfig_rebuild_all.patch - http://drupal.org/files/fix-defaultconfig_rebuild_all.patch
- http://www.drupal.org/files/issues/1900574.defaultconfig.undefinedindex_13.patch - http://drupal.org/files/issues/1900574.defaultconfig.undefinedindex_13.patch
This file was automatically generated by Drush Make (http://drupal.org/project/drush). This file was automatically generated by Drush Make (http://drupal.org/project/drush).
\ No newline at end of file
...@@ -23,6 +23,7 @@ function wcm_media_gallery_views_default_views() { ...@@ -23,6 +23,7 @@ function wcm_media_gallery_views_default_views() {
/* Display: Master */ /* Display: Master */
$handler = $view->new_display('default', 'Master', 'default'); $handler = $view->new_display('default', 'Master', 'default');
$handler->display->display_options['title'] = 'Image Gallery'; $handler->display->display_options['title'] = 'Image Gallery';
$handler->display->display_options['use_ajax'] = TRUE;
$handler->display->display_options['use_more_always'] = FALSE; $handler->display->display_options['use_more_always'] = FALSE;
$handler->display->display_options['access']['type'] = 'perm'; $handler->display->display_options['access']['type'] = 'perm';
$handler->display->display_options['cache']['type'] = 'none'; $handler->display->display_options['cache']['type'] = 'none';
...@@ -30,6 +31,10 @@ function wcm_media_gallery_views_default_views() { ...@@ -30,6 +31,10 @@ function wcm_media_gallery_views_default_views() {
$handler->display->display_options['exposed_form']['type'] = 'basic'; $handler->display->display_options['exposed_form']['type'] = 'basic';
$handler->display->display_options['exposed_form']['options']['reset_button'] = TRUE; $handler->display->display_options['exposed_form']['options']['reset_button'] = TRUE;
$handler->display->display_options['pager']['type'] = 'full'; $handler->display->display_options['pager']['type'] = 'full';
$handler->display->display_options['pager']['options']['items_per_page'] = '0';
$handler->display->display_options['pager']['options']['offset'] = '0';
$handler->display->display_options['pager']['options']['id'] = '0';
$handler->display->display_options['pager']['options']['quantity'] = '9';
$handler->display->display_options['style_plugin'] = 'default'; $handler->display->display_options['style_plugin'] = 'default';
$handler->display->display_options['row_plugin'] = 'file'; $handler->display->display_options['row_plugin'] = 'file';
$handler->display->display_options['row_options']['view_mode'] = 'colorbox'; $handler->display->display_options['row_options']['view_mode'] = 'colorbox';
...@@ -98,7 +103,7 @@ function wcm_media_gallery_views_default_views() { ...@@ -98,7 +103,7 @@ function wcm_media_gallery_views_default_views() {
/* Display: Images */ /* Display: Images */
$handler = $view->new_display('panel_pane', 'Images', 'image_gallery_pane'); $handler = $view->new_display('panel_pane', 'Images', 'image_gallery_pane');
$handler->display->display_options['allow']['use_pager'] = 0; $handler->display->display_options['allow']['use_pager'] = 0;
$handler->display->display_options['allow']['items_per_page'] = 0; $handler->display->display_options['allow']['items_per_page'] = 'items_per_page';
$handler->display->display_options['allow']['offset'] = 0; $handler->display->display_options['allow']['offset'] = 0;
$handler->display->display_options['allow']['link_to_view'] = 0; $handler->display->display_options['allow']['link_to_view'] = 0;
$handler->display->display_options['allow']['more_link'] = 0; $handler->display->display_options['allow']['more_link'] = 0;
......
...@@ -20,6 +20,11 @@ projects[context][subdir] = contrib ...@@ -20,6 +20,11 @@ projects[context][subdir] = contrib
projects[context_omega][version] = 1.1 projects[context_omega][version] = 1.1
projects[context_omega][subdir] = contrib projects[context_omega][subdir] = contrib
projects[ctools][version] = 1.8
projects[ctools][subdir] = contrib
projects[ctools][patch][2209775] = http://drupal.org/files/issues/ctools-readd_access_callback_params-2209775-24.patch
projects[ctools][patch][1910608] = http://drupal.org/files/issues/views_content-keyword-substitution-1910608-33.patch
projects[date][version] = 2.9 projects[date][version] = 2.9
projects[date][subdir] = contrib projects[date][subdir] = contrib
...@@ -29,7 +34,7 @@ projects[defaultconfig][patch][2042799] = http://drupal.org/files/default_config ...@@ -29,7 +34,7 @@ projects[defaultconfig][patch][2042799] = http://drupal.org/files/default_config
projects[defaultconfig][patch][2043307] = http://drupal.org/files/defaultconfig_include_features_file.patch projects[defaultconfig][patch][2043307] = http://drupal.org/files/defaultconfig_include_features_file.patch
projects[defaultconfig][patch][2008178] = http://drupal.org/files/defaultconfig-rebuild-filters-2008178-4_0.patch projects[defaultconfig][patch][2008178] = http://drupal.org/files/defaultconfig-rebuild-filters-2008178-4_0.patch
projects[defaultconfig][patch][1861054] = http://drupal.org/files/fix-defaultconfig_rebuild_all.patch projects[defaultconfig][patch][1861054] = http://drupal.org/files/fix-defaultconfig_rebuild_all.patch
projects[defaultconfig][patch][1900574] = http://www.drupal.org/files/issues/1900574.defaultconfig.undefinedindex_13.patch projects[defaultconfig][patch][1900574] = http://drupal.org/files/issues/1900574.defaultconfig.undefinedindex_13.patch
projects[draggableviews][version] = 2.x-dev projects[draggableviews][version] = 2.x-dev
projects[draggableviews][subdir] = contrib projects[draggableviews][subdir] = contrib
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment