Review main Merged

26288[BUGFIX] Update file type on mimetype change

Alexander Stehlik CR +2 V +2 Easy +6 −1 updated 02/21/14, 07:51

Commit message

If the mime type of a file has changed, the type property of a file
will be updated, too.

Review

  • Code review CR +2
    • Steffen Ritter +2
    • Markus Klein +1
    • Marcin Sągol +1
  • Verified V +2
    • Steffen Ritter +2
    • Markus Klein +1

Issues 1

Files 1

Review log 28

Show 3 earlier messages
  1. Mr. Jenkins commented on patch set 1 12/10/13, 15:28

  2. Markus Klein commented on patch set 1 CR -1 12/10/13, 15:48

    File.php:266

    use isset() instead of array_key_exists. It is way faster!
  3. Alexander Stehlik uploaded patch set 2 12/10/13, 16:09

  1. Markus Klein commented on patch set 2 12/10/13, 16:28

    Without knowing the code atm, what is the difference between type and mime_type of a file?
  2. Mr. Jenkins commented on patch set 2 12/10/13, 16:31

  3. Alexander Stehlik commented on patch set 2 12/10/13, 16:34

    The mime type is the "real" mime type like "image/jpeg". The type is basically a type group (like image, audio, video) which is also responsible for displaying different Backend forms (used in the "type" setting in the "ctrl" section of TCA). See also the FILETYPE_* constants in AbstractFile. They basically represent the values that are set in the sys_file type field.
  4. Markus Klein commented on patch set 2 CR +1 12/10/13, 16:38

    Thanks.
  5. Frans Saris commented on patch set 2 CR -1 12/11/13, 07:45

    File.php:268

    set to NULL or FALSE the check in $this->getType() is if (!$this->properties['type']) so the property should still exist
  6. Alexander Stehlik uploaded patch set 3 12/11/13, 08:33

  7. Alexander Stehlik commented on patch set 2 12/11/13, 08:33

    File.php:268 Reply

    Done
  8. Steffen Ritter commented on patch set 3 CR -1 12/11/13, 08:36

    Hi Alexander, thank you for the patch. I feel the way the problem is resolved in it, is more a hack than a future-proof solution. As of tomorrow I will have a 8 days FAL code sprint; I then will have a closer look and come up with a more solid suggestion. regards Stefffen
  9. Alexander Stehlik commented on patch set 3 12/11/13, 08:38

    Hi Steffen, sounds great, I'm not too happy with this solution either. Let me know if I can be of any assistance. Cheers, Alex
  10. Mr. Jenkins commented on patch set 3 12/11/13, 08:47

  11. Alexander Stehlik uploaded patch set 4 02/04/14, 12:30

  12. Alexander Stehlik commented on patch set 4 02/04/14, 12:30

    Rebased
  13. Mr. Jenkins commented on patch set 4 02/04/14, 12:56

  14. Steffen Ritter commented on patch set 4 CR -1 02/05/14, 13:39

    see inline comment

    File.php:251

    are you sure this belongs to the patch?
  15. Alexander Stehlik uploaded patch set 5 02/05/14, 16:05

  16. Alexander Stehlik commented on patch set 4 02/05/14, 16:06

    File.php:251 Reply

    No, I think this came accidentally from the rebase. Thank you :)
  17. Alexander Stehlik commented on patch set 5 02/05/14, 16:06

    Removed invalid code from the rebase.
  18. Markus Klein voted on patch set 5 CR +1 02/05/14, 16:14

  19. Marcin Sągol voted on patch set 5 CR +1 02/05/14, 16:31

  20. Mr. Jenkins commented on patch set 5 02/05/14, 16:31

  21. Steffen Ritter voted on patch set 5 V +1 CR +2 02/20/14, 07:05

  22. Markus Klein commented on patch set 5 02/20/14, 09:21

    Unit tests are fine, but how do I test that manually? Do I need to replace a file? I need some guidance here. Please post the reproduction steps to forge as well. Thanks.
  23. Markus Klein voted on patch set 5 V +1 02/20/14, 09:48

  24. Steffen Ritter voted on patch set 5 V +2 02/21/14, 07:51

  25. Steffen Ritter merged patch set 6 02/21/14, 07:51