Fix for Fix for Image Field Import

  1. if ($row['avatar']) {
  2.         $path = 'files/old/joomla/images/comprofiler/' . $row['avatar'];
  3.         $temp_image = field_file_save_file($path);
  4.         $temp_image['status'] = FILE_STATUS_PERMANENT;
  5.         $temp_image['list'] = 1;
  6.         $temp_image['uid'] = $account->uid;
  7.         $temp_image['data'] = array ('description' => '', 'alt' => ' ', 'title' =>
  8.  '');
  9.         $node_profile->field_sw_usrp_image[0] = $temp_image;
  10.  
  11.       print_r($node_profile);
  12.       die();
  13.       }

Submit Fix

Any tags you'd like to associate with your code, delimitered by commas (example: Views, CCK, Module, etc).
Select the syntax highlighting mode to use.