update

sepehr's picture

Fix for Updating a nodereference CCK field using node_save()

  1. ...
  2. // Getting current reference delta.
  3. $current_delta = db_query("SELECT delta FROM {content_field_movie_node_ref}
  4.                           WHERE vid = '%d'
  5.                           ORDER BY delta DESC
  6.                           LIMIT 1", $existing_movie-
sepehr's picture

Updating a nodereference CCK field using node_save()

  1. ...
  2. // Getting movie node.
  3. $existing_movie_node = node_load($existing_movie->nid);
  4.                                        
  5. // "Appending" a node reference.
  6. $existing_movie_node->field_movie_node_ref[]['nid'] = $drupal_subtitle_no

Fix for TestCase not listed

  1. Alter simpletest.info and add dependency to update.test
  2. <?php
  3. files[] = tests/update.test
  4. ?>

TestCase not listed

  1. <?php
  2. // $Id$
  3.  
  4. /**
  5.  * @file
  6.  * Tests for update.inc.
  7.  */
  8.  
  9. /**
  10.  * Unit tests for the module API.
  11.  */
  12. class UpdateIncTestCase extends DrupalWebTestCase {
  13.   public static function getInfo() {

Update function

  1. function blah_migration_update_6000(&$sandbox) {
  2.   $ret = array();
  3.  
  4.   module_load_include('inc', 'install_profile_api', 'core/menu');
  5.  
Syndicate content