Review main Merged

31282[BUGFIX] Render favicon tag only if file exists

Sascha Egerer CR +2 V +2 Easy +8 −7 updated 12/08/14, 21:30

Commit message

The favicon defined by `page.shortcutIcon`
creates a <link rel="icon"> tag in the frontend.

This tag should only be renderd if the defined
icon exists.

Review

  • Code review CR +2
    • Georg Ringer +2
    • Sascha Egerer +1
    • Andreas Kienast +1
  • Verified V +2
    • Georg Ringer +2
    • Sascha Egerer +1
    • Andreas Kienast +1

Issues 1

Files 1

Review log 17

  1. Mr. Jenkins commented on patch set 1 07/02/14, 07:25

  2. Benni Mack uploaded patch set 2 12/08/14, 07:16

  3. Sascha Egerer commented on patch set 2 12/08/14, 07:21

    You've removed the "directory" check, right?
  4. Benni Mack commented on patch set 2 12/08/14, 07:29

    I added a file_exists, yes.
  5. Sascha Egerer commented on patch set 2 12/08/14, 07:32

    file_exists: Checks whether a file or directory exists. So that will return true for directories. That means if i a add a directory path this will be used as favicon which is not valid. So there should be an additional check like !is_dir()
  6. Wouter Wolters commented on patch set 2 12/08/14, 07:38

    PageGenerator.php:419

    in other places we use is_file to prevent directories to return true in this check.
  7. Sascha Egerer commented on patch set 2 12/08/14, 07:39

    PageGenerator.php:419 Reply

    Sounds like the best idea...
  8. Benni Mack uploaded patch set 3 12/08/14, 08:55

  9. Benni Mack commented on patch set 3 12/08/14, 08:56

    So, I hope this sounds reasonable now. Please review to get this one in as soon as possible.
  10. Sascha Egerer commented on patch set 3 V +1 CR +1 12/08/14, 09:09

    It's my patch so I'm not sure if my +1 counts but I've successfully tested it.
  11. Andreas Kienast voted on patch set 3 CR +1 V +1 12/08/14, 09:40

  12. Georg Ringer voted on patch set 3 CR +2 V +2 12/08/14, 09:41

  13. Georg Ringer merged patch set 3 12/08/14, 09:41

  14. Georg Ringer commented on patch set 4 12/08/14, 09:41

    Cherry Picked This patchset was cherry picked to branch TYPO3_6-2 as commit 2bc6b97153bd0e617b7ac9b583880dfee507abc4
  15. Helmut Hummel commented on patch set 4 12/08/14, 09:45

    PageGenerator.php:419

    isn't a file_exists check already performed in $GLOBALS['TSFE']->tmpl->getFileName ?
  16. Sascha Egerer commented on patch set 4 12/08/14, 09:53

    PageGenerator.php:419 Reply

    as already said file_exists does not help because this is also true for folders. But maybe it would make sense to replace file_exists with is_file in $GLOBALS['TSFE']->tmpl->getFileName() ? But don't know if that would have to much side effects
  17. Benni Mack commented on patch set 4 12/08/14, 21:30

    Helmut, nope it isn't checked by TemplateService.