~catch-drupal/+junk/pressflow-content-cache-variable

« back to all changes in this revision

Viewing changes to modules/upload/upload.module

  • Committer: David Strauss
  • Date: 2010-06-18 17:01:06 UTC
  • mfrom: (82.1.2 merge-drupal-6.17)
  • Revision ID: david@fourkitchens.com-20100618170106-eveqf9sepqonszf9
Drupal 6.17 (via testing branch)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
<?php
2
 
// $Id: upload.module,v 1.197.2.5 2009/09/16 17:54:19 goba Exp $
 
2
// $Id: upload.module,v 1.197.2.6 2010/05/19 14:43:56 goba Exp $
3
3
 
4
4
/**
5
5
 * @file
189
189
 
190
190
  if (isset($form_state['values']['files'])) {
191
191
    foreach ($form_state['values']['files'] as $fid => $file) {
 
192
      // If the node was previewed prior to saving, $form['#node']->files[$fid]
 
193
      // is an array instead of an object. Convert file to object for compatibility. 
 
194
      $form['#node']->files[$fid] = (object) $form['#node']->files[$fid];
192
195
      $form_state['values']['files'][$fid]['new'] = !empty($form['#node']->files[$fid]->new);
193
196
    }
194
197
  }