title: Drupal : Modify node - hook_node_insert / hook_node_insert
body: <p>I have a problem with Drupal 7, I have a content type named "server", wich contains different fields : </p>
  
  <ul>
  <li>hostname</li>
  <li>CPU speed</li>
  <li>...</li>
  </ul>
  
  <p>The field hostname is entered manually. The others field must be entered progamatically.
  So I specified a hostname and a function must search the information (CPU speed, ...) and fills the empty fields.</p>
  
  <p>But I don't manage to update my node. I tried the functions <code>hook_node_insert</code> and  <code>hook_node_insert</code>. When I print the node before (1) and after (2) the use of theses functions I can see the difference. But when I access the node <code>http://localhost/drupal/?q=node/32</code> modifications have disappeared.</p>
  
  <p>Here is a part of my function :</p>
  
  <pre><code>function module_node_presave($node) {
      if ($node-&gt;type == 'server') {
  
          dpm($node); //(1)
          $node-&gt;field_server_cpu_speed[LANGUAGE_NONE][0]['value']  = 55;
          dpm($node); //(2)
  
      }
  }
  </code></pre>
  
  <p>Can someone help me ?</p>
  
  <p>Thanks in advance,
  BDR</p>