Created
January 28, 2015 20:02
-
-
Save aschmoe/831f8946a0af90412e22 to your computer and use it in GitHub Desktop.
Drupal: Views bulk operation to move a file without affecting node update date
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Dont include the php tag in the VBO interface | |
if(!empty($entity->field_picture) && empty($entity->field_pictures_multiple)) { | |
$entity->field_pictures_multiple['und'] = array($entity->field_picture['und'][0]); | |
field_attach_update('node', $entity); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment