Révision b8087750
Ajouté par Assos Assos il y a environ 6 ans
drupal7/sites/all/modules/views_bulk_operations/actions/book.action.inc | ||
---|---|---|
58 | 58 |
function views_bulk_operations_move_to_book_action($node, $context = array()) { |
59 | 59 |
if (isset($context['book'])) { |
60 | 60 |
$book_node = node_load($context['book']); |
61 |
$mlid = db_select('menu_links' , 'ml')
|
|
62 |
->condition('ml.link_path' , 'node/' . $node->nid)
|
|
63 |
->fields('ml' , array('mlid'))
|
|
61 |
$mlid = db_select('menu_links', 'ml') |
|
62 |
->condition('ml.link_path', 'node/' . $node->nid) |
|
63 |
->fields('ml', array('mlid')) |
|
64 | 64 |
->execute() |
65 | 65 |
->fetchField(); |
66 | 66 |
$node->book['mlid'] = $mlid; |
... | ... | |
71 | 71 |
} |
72 | 72 |
|
73 | 73 |
/** |
74 |
* Adds the action 'Remove node from a parent book' |
|
74 |
* Adds the action 'Remove node from a parent book'.
|
|
75 | 75 |
*/ |
76 |
function views_bulk_operations_remove_from_book_action($node, $context) { |
|
77 |
$book = $node->book['mlid']; |
|
76 |
function views_bulk_operations_remove_from_book_action($node) { |
|
78 | 77 |
book_node_delete($node); |
78 |
// Remove book to avoid book_node_update() from building the links again. |
|
79 |
unset($node->book); |
|
79 | 80 |
} |
Formats disponibles : Unified diff
Weekly update of contrib modules