Review main Abandoned

23188[TASK] Add isProcessingFolder() function to Resource/Folder

Frans Saris CR 0 V 0 Easy +10 −1 updated 09/08/13, 11:34

Commit message

This change adds a function to the Folder object to check
if the folder is the processing folder of the storage.

Review

  • Code review CR 0
  • Verified V 0

Issues 1

Files 2

Review log 8

  1. Mr. Jenkins commented on patch set 1 08/19/13, 06:24

  2. Steffen Ritter voted on patch set 1 CR +1 08/21/13, 06:29

  3. Frans Saris uploaded patch set 2 08/21/13, 06:45

  4. Mr. Jenkins commented on patch set 2 08/21/13, 06:46

  5. Helmut Hummel commented on patch set 2 08/21/13, 08:29

    Folder.php:490

    That folder identifiers contain slashes is specific to the driver, so trimming the / here is kind of wrong. why do you do it anyway? The identifiers should match, without the need of the trim (with local driver)

    FileListController.php:150

    OK, the code was there already, my comments still are valid. I would also say from an architectural point of view the storage should have a method if a given folder is the processing folder, however I do not really understand why this is needed to be known from the outside. This place looks more like a hack...
  6. Stefan Neufeind commented on patch set 2 08/21/13, 08:35

    Folder.php:490 Reply

    He might have wanted to rtrim(), just to be safe there is a slash too much on the right side. But I'd also expect the paths to be clean. If they are not, we should clean them up somewhere else. So I'm also in favor of avoiding the trim() here.
  7. Frans Saris commented on patch set 2 08/21/13, 19:01

    FileListController.php:150 Reply

    @Helmut; For the follow up patch I needed a check to determine if a folder is the processing folder of a storage. I found this check and thought it would make sense to move is to a function so the logic is only on 1 place (the whole rtim() magic). But looking at is now I also think this isn't the right approach. If you are sure I can just use $folder->getIdentifier() === $folder->getStorage()->getProcessingFolder()->getIdentifier() than I will use that in the other patch. And abandon this patch.
  8. Frans Saris abandoned the change 09/08/13, 11:34

    This is not needed. Just use $folder->getIdentifier() === $folder->getStorage()->getProcessingFolder()->getIdentifier() to determine if the folder is the processing folder