patched node-export module
https://www.drupal.org/node/1869918 https://www.drupal.org/node/1911638
This commit is contained in:
parent
f7cd9c0858
commit
e004b7a238
@ -24,3 +24,7 @@ termreferencetree
|
|||||||
views
|
views
|
||||||
wysiwyg
|
wysiwyg
|
||||||
views_rss_media
|
views_rss_media
|
||||||
|
node_export :
|
||||||
|
- https://www.drupal.org/node/1869918
|
||||||
|
- https://www.drupal.org/node/1911638
|
||||||
|
|
@ -0,0 +1,13 @@
|
|||||||
|
Index: node_export.module
|
||||||
|
===================================================================
|
||||||
|
--- node_export.module (revision 172)
|
||||||
|
+++ node_export.module (working copy)
|
||||||
|
@@ -1146,7 +1146,7 @@
|
||||||
|
|
||||||
|
if (!empty($query)) {
|
||||||
|
watchdog('node_export', 'kept existing managed file at uri "%uri"', array('%uri' => $file->uri), WATCHDOG_NOTICE);
|
||||||
|
- $file = file_load(array_shift($query));
|
||||||
|
+ $file = (object) array_merge((array) $file, (array) file_load(array_shift($query)));
|
||||||
|
}
|
||||||
|
|
||||||
|
$file = file_save($file);
|
@ -38,7 +38,7 @@ function node_export_menu() {
|
|||||||
'description' => 'Configure the settings for Node export.',
|
'description' => 'Configure the settings for Node export.',
|
||||||
'file' => 'node_export.pages.inc',
|
'file' => 'node_export.pages.inc',
|
||||||
);
|
);
|
||||||
$selected_formats = variable_get('node_export_format', array('drupal'));
|
$selected_formats = variable_get('node_export_format', array('drupal' => 'drupal'));
|
||||||
if (count(array_filter($selected_formats)) > 1) {
|
if (count(array_filter($selected_formats)) > 1) {
|
||||||
$format_handlers = node_export_format_handlers();
|
$format_handlers = node_export_format_handlers();
|
||||||
foreach ($format_handlers as $format_handler => $format) {
|
foreach ($format_handlers as $format_handler => $format) {
|
||||||
@ -218,7 +218,7 @@ function node_export_node_operations() {
|
|||||||
$operations = array();
|
$operations = array();
|
||||||
if (user_access('export nodes')) {
|
if (user_access('export nodes')) {
|
||||||
|
|
||||||
$selected_formats = variable_get('node_export_format', array('drupal'));
|
$selected_formats = variable_get('node_export_format', array('drupal' => 'drupal'));
|
||||||
if (count(array_filter($selected_formats)) > 1) {
|
if (count(array_filter($selected_formats)) > 1) {
|
||||||
$format_handlers = node_export_format_handlers();
|
$format_handlers = node_export_format_handlers();
|
||||||
foreach ($format_handlers as $format_handler => $format) {
|
foreach ($format_handlers as $format_handler => $format) {
|
||||||
@ -258,7 +258,7 @@ function node_export_bulk_operation($nodes = NULL, $format = NULL, $delivery = N
|
|||||||
function node_export_action_info() {
|
function node_export_action_info() {
|
||||||
$actions = array();
|
$actions = array();
|
||||||
if (user_access('export nodes')) {
|
if (user_access('export nodes')) {
|
||||||
$selected_formats = variable_get('node_export_format', array('drupal'));
|
$selected_formats = variable_get('node_export_format', array('drupal' => 'drupal'));
|
||||||
$format_handlers = node_export_format_handlers();
|
$format_handlers = node_export_format_handlers();
|
||||||
foreach ($format_handlers as $format_handler => $format) {
|
foreach ($format_handlers as $format_handler => $format) {
|
||||||
if (!empty($selected_formats[$format_handler])) {
|
if (!empty($selected_formats[$format_handler])) {
|
||||||
@ -296,10 +296,13 @@ function node_export_action_info() {
|
|||||||
function node_export_action_form($context, &$form_state, $format = NULL) {
|
function node_export_action_form($context, &$form_state, $format = NULL) {
|
||||||
// Get the name of the vbo views field
|
// Get the name of the vbo views field
|
||||||
$vbo = _views_bulk_operations_get_field($form_state['build_info']['args'][0]);
|
$vbo = _views_bulk_operations_get_field($form_state['build_info']['args'][0]);
|
||||||
|
|
||||||
// Adjust the selection in case the user chose 'select all'
|
// Adjust the selection in case the user chose 'select all'
|
||||||
_views_bulk_operations_adjust_selection($form_state['selection'], $form_state['select_all_pages'], $vbo);
|
if (!empty($form_state['select_all_pages'])) {
|
||||||
|
views_bulk_operations_direct_adjust($form_state['selection'], $vbo);
|
||||||
|
}
|
||||||
$nodes = array_combine($form_state['selection'], $form_state['selection']);
|
$nodes = array_combine($form_state['selection'], $form_state['selection']);
|
||||||
return node_export_bulk_operation($nodes);
|
return node_export_bulk_operation($nodes, $format);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -347,7 +350,7 @@ function node_export($nids, $format = NULL, $msg_t = 't') {
|
|||||||
|
|
||||||
// Get the node code from the format handler
|
// Get the node code from the format handler
|
||||||
$format_handlers = node_export_format_handlers();
|
$format_handlers = node_export_format_handlers();
|
||||||
$node_export_format = variable_get('node_export_format', array('drupal'));
|
$node_export_format = variable_get('node_export_format', array('drupal' => 'drupal'));
|
||||||
$format_handler = $format ? $format : reset($node_export_format);
|
$format_handler = $format ? $format : reset($node_export_format);
|
||||||
if (!isset($format_handlers[$format_handler])) {
|
if (!isset($format_handlers[$format_handler])) {
|
||||||
$format_handler = 'drupal';
|
$format_handler = 'drupal';
|
||||||
@ -1146,7 +1149,7 @@ function _node_export_file_field_import_file(&$file) {
|
|||||||
|
|
||||||
if (!empty($query)) {
|
if (!empty($query)) {
|
||||||
watchdog('node_export', 'kept existing managed file at uri "%uri"', array('%uri' => $file->uri), WATCHDOG_NOTICE);
|
watchdog('node_export', 'kept existing managed file at uri "%uri"', array('%uri' => $file->uri), WATCHDOG_NOTICE);
|
||||||
$file = file_load(array_shift($query));
|
$file = (object) array_merge((array) $file, (array) file_load(array_shift($query)));
|
||||||
}
|
}
|
||||||
|
|
||||||
$file = file_save($file);
|
$file = file_save($file);
|
||||||
|
1297
sites/all/modules/contrib/admin/node_export/node_export.module.orig
Normal file
1297
sites/all/modules/contrib/admin/node_export/node_export.module.orig
Normal file
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,56 @@
|
|||||||
|
diff --git a/node_export.module b/node_export.module
|
||||||
|
index 8bdadb9..052fa6c 100755
|
||||||
|
--- a/node_export.module
|
||||||
|
+++ b/node_export.module
|
||||||
|
@@ -38,7 +38,7 @@ function node_export_menu() {
|
||||||
|
'description' => 'Configure the settings for Node export.',
|
||||||
|
'file' => 'node_export.pages.inc',
|
||||||
|
);
|
||||||
|
- $selected_formats = variable_get('node_export_format', array('drupal'));
|
||||||
|
+ $selected_formats = variable_get('node_export_format', array('drupal' => 'drupal'));
|
||||||
|
if (count(array_filter($selected_formats)) > 1) {
|
||||||
|
$format_handlers = node_export_format_handlers();
|
||||||
|
foreach ($format_handlers as $format_handler => $format) {
|
||||||
|
@@ -218,7 +218,7 @@ function node_export_node_operations() {
|
||||||
|
$operations = array();
|
||||||
|
if (user_access('export nodes')) {
|
||||||
|
|
||||||
|
- $selected_formats = variable_get('node_export_format', array('drupal'));
|
||||||
|
+ $selected_formats = variable_get('node_export_format', array('drupal' => 'drupal'));
|
||||||
|
if (count(array_filter($selected_formats)) > 1) {
|
||||||
|
$format_handlers = node_export_format_handlers();
|
||||||
|
foreach ($format_handlers as $format_handler => $format) {
|
||||||
|
@@ -258,7 +258,7 @@ function node_export_bulk_operation($nodes = NULL, $format = NULL, $delivery = N
|
||||||
|
function node_export_action_info() {
|
||||||
|
$actions = array();
|
||||||
|
if (user_access('export nodes')) {
|
||||||
|
- $selected_formats = variable_get('node_export_format', array('drupal'));
|
||||||
|
+ $selected_formats = variable_get('node_export_format', array('drupal' => 'drupal'));
|
||||||
|
$format_handlers = node_export_format_handlers();
|
||||||
|
foreach ($format_handlers as $format_handler => $format) {
|
||||||
|
if (!empty($selected_formats[$format_handler])) {
|
||||||
|
@@ -296,10 +296,13 @@ function node_export_action_info() {
|
||||||
|
function node_export_action_form($context, &$form_state, $format = NULL) {
|
||||||
|
// Get the name of the vbo views field
|
||||||
|
$vbo = _views_bulk_operations_get_field($form_state['build_info']['args'][0]);
|
||||||
|
+
|
||||||
|
// Adjust the selection in case the user chose 'select all'
|
||||||
|
- _views_bulk_operations_adjust_selection($form_state['selection'], $form_state['select_all_pages'], $vbo);
|
||||||
|
+ if (!empty($form_state['select_all_pages'])) {
|
||||||
|
+ views_bulk_operations_direct_adjust($form_state['selection'], $vbo);
|
||||||
|
+ }
|
||||||
|
$nodes = array_combine($form_state['selection'], $form_state['selection']);
|
||||||
|
- return node_export_bulk_operation($nodes);
|
||||||
|
+ return node_export_bulk_operation($nodes, $format);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
@@ -347,7 +350,7 @@ function node_export($nids, $format = NULL, $msg_t = 't') {
|
||||||
|
|
||||||
|
// Get the node code from the format handler
|
||||||
|
$format_handlers = node_export_format_handlers();
|
||||||
|
- $node_export_format = variable_get('node_export_format', array('drupal'));
|
||||||
|
+ $node_export_format = variable_get('node_export_format', array('drupal' => 'drupal'));
|
||||||
|
$format_handler = $format ? $format : reset($node_export_format);
|
||||||
|
if (!isset($format_handlers[$format_handler])) {
|
||||||
|
$format_handler = 'drupal';
|
Loading…
x
Reference in New Issue
Block a user