Project

General

Profile

Revision 0ccfec7f

Added by Assos Assos over 8 years ago

Weekly update of contrib modules

View differences:

drupal7/sites/all/modules/file_entity/file_entity.pages.inc
268 268
        $entity_uri = empty($entities[$entity_id]) ? NULL : entity_uri($entity_type, $entities[$entity_id]);
269 269

  
270 270
        // Link the label to the URI when possible.
271
        if (empty($entity_uri)) {
272
          $entity = check_plain($label);
271
        if (!empty($entity_uri['path'])) {
272
          $entity_label = l($label, $entity_uri['path']);
273 273
        }
274 274
        else {
275
          $entity = l($label, $entity_uri['path']);
275
          $entity_label = check_plain($label);
276 276
        }
277 277

  
278
        $rows[] = array($entity, $entity_type, $count);
278
        $rows[] = array($entity_label, $entity_type, $count);
279 279

  
280 280
        // Record the occurrence of the entity to ensure that it isn't listed in
281 281
        // the table again.
......
510 510

  
511 511
  // Ensure that we call the plupload_element_pre_render function.
512 512
  // If it isn't called, it doesn't set the JS settings that transfers the
513
  // list of allowed file extentions to the PLUpload widget.
513
  // list of allowed file extensions to the PLUpload widget.
514 514
  // We override the 'file_entity_upload_validators_pre_render' setting if it
515 515
  // exists, because both pre-render hooks adds the upload-help with list of
516 516
  // allowed file extensions.
......
810 810

  
811 811
      // Update if the uri target has changed.
812 812
      if ($new_file_uri != $file->uri) {
813
       // Store the original file uri to delete if save is sucessful.
813
       // Store the original file uri to delete if save is successful.
814 814
       $orphaned_uri = $file->uri;
815 815

  
816 816
        // Update file entity uri.
......
841 841
  }
842 842

  
843 843
  if (file_uri_scheme($file->uri) != $form_state['values']['scheme']) {
844
    $file_destination = $form_state['storage']['scheme'] . '://' . file_uri_target($file->uri);
844
    $file_destination = $form_state['values']['scheme'] . '://' . file_uri_target($file->uri);
845 845
    $file_destination = file_stream_wrapper_uri_normalize($file_destination);
846 846
    if ($moved_file = file_move($file, $file_destination, FILE_EXISTS_RENAME)) {
847 847
      // Only re-assign the file object if file_move() did not fail.

Also available in: Unified diff