Review main Merged

25851[TASK] Add tool-function to strip PATH_site-part of paths

Stefan Neufeind CR +2 V +2 Normal +87 −71 updated 12/19/13, 00:17

Commit message

Avoid having to use the substr/strlen-magic.
Also strlen(PATH_site) can be statically cached.

Review

  • Code review CR +2
    • Markus Klein +2
    • Philipp Gampe +1
  • Verified V +2
    • Markus Klein +2
    • Philipp Gampe +1

Issues 1

Files 41

Show 21 more files

Review log 18

  1. Stefan Neufeind commented on patch set 1 12/01/13, 15:59

    Please judge on the idea of this patch, naming of the function etc. Currently this patch is only against EXT:core. More would need to be added if this finds consensus. Could somebody maybe give a performance-estimate? Might this make sense? I expect calling a static function is not as expensive as calculating the strlen() over and over again.
  2. Mr. Jenkins commented on patch set 1 12/01/13, 16:08

  3. Markus Klein commented on patch set 1 12/02/13, 11:10

    IMO a good thing. At least the functionality is centralized.

    GeneralUtility.php:1589

    Strip

    GeneralUtility.php:1595

    initialize with NULL
  4. Steffen Ritter commented on patch set 1 CR -1 12/02/13, 11:29

    small nitpicks

    LocalDriver.php:175

    does not belong to that patch

    GeneralUtility.php:1594

    Please in PathUtility
  5. Helmut Hummel commented on patch set 1 12/02/13, 13:34

    GeneralUtility.php:1594 Reply

    And the should have something like "relative path" in it.
  6. Helmut Hummel commented on patch set 1 CR -1 12/02/13, 13:35

    GeneralUtility.php:1594 Reply

    maybe even use PathUtility::getRelativePathTo() ...
  7. Stefan Neufeind uploaded patch set 2 12/08/13, 15:43

  8. Stefan Neufeind commented on patch set 2 12/08/13, 15:49

    Moved to PathUtility. Discussed naming/API with Helmut and we agreed that having "another getRelative*"-function in the API is not really the best idea. But we settled on having this as a "cleanup" for now and mark it @internal for now. This was we have the code in a central place, have it easier to search and rework this area int he future, but don't suffer from the burden of another API-addition. Switching to getRelative*, which Helmut proposed, might be a good idea. But that needs some more work and we'll maybe need to review each and every occurence of this function-call in detail.
  9. Mr. Jenkins commented on patch set 2 12/08/13, 15:57

  10. Philipp Gampe voted on patch set 2 CR +1 12/08/13, 16:59

  11. Philipp Gampe commented on patch set 2 V +1 12/08/13, 17:03

    tested with unit tests
  12. Markus Klein voted on patch set 2 CR +1 12/18/13, 22:26

  13. Markus Klein voted on patch set 2 V +2 CR +2 12/18/13, 22:29

  14. Markus Klein merged patch set 3 12/18/13, 22:29

  15. Helmut Hummel commented on patch set 3 12/18/13, 22:34

    post review

    PathUtility.php:317

    didn't we agree to mark this method as @internal, to make clear this is not public API (yet)?
  16. Markus Klein commented on patch set 3 12/18/13, 22:45

    PathUtility.php:317 Reply

    Sorry, I didn't see that comment. It was not annotated here. Shall I push a followup?
  17. Helmut Hummel commented on patch set 3 12/18/13, 22:51

    PathUtility.php:317 Reply

    no worries. A followup would be awesome, thanks.
  18. Markus Klein commented on patch set 3 12/19/13, 00:17

    PathUtility.php:317 Reply