-
-
Notifications
You must be signed in to change notification settings - Fork 213
New Function in FilesModel to list Subfolders #7942
Conversation
This would be very usefull if you want to make sure all log entries are stored to a file before cleaning the log. Many companies have to keep log-files, but dont want the log table to get full. I have created a log-rotation module, that does that. But the log could be purged before beeing saved to file... Here is the sorce of my module (unfinished and a little bit insecure up to now..): https://github.com/christianromeni/cLogRotate Greets
Why does the model only offer to find multiply files by folder, and not multiple folders by folder (good way to get subfolders). This could be extended to be recursive..
|
First off, please do not mix two separate features in one PR, this makes things harder for us to read and if we should decide against one feature, the PR has to be rejected causing the second feature to get rejected also. Second, while I do not have anything against the HOOK in general, I think the naming should rather be Third, on your new method in the |
|
Ok, sorry, I'm new to the PR thing... Also I'm not sure why the branch is called patch-1 ... I'll try and fix that tomorrow as well as splitting the PR up. There is no problem calling it different. I'll change that. A usecase for finding subfolder in my case is: I have definied one folder (eg: /files/logs/) but I'm dynamically creating subfilders depending on the year (eg: /files/logs/2015/). This could also be used for multi-dimensional gallerys. |
|
First of all, this feature would be added to the next version of Contao 4, and then we should use events and not hooks. |
|
So there is no chance for it to be added in any Contao 3 release? |
|
Contao 3.5 is the last version of Contao 3, and a bugfix-release cannot contain new features… |
|
If you remove the logging hook and just add the |
|
Ok, will do. |
Remove Hook, since its not needed anymore.
|
Merged in contao/core-bundle@3f0687f. |
This would be very usefull if you want to make sure all log entries are stored to a file before cleaning the log.
Many companies have to keep log-files, but dont want the log table to get full.
I have created a log-rotation module, that does that. But the log could be purged before beeing saved to file...
Here is the sorce of my module (unfinished and a little bit insecure up to now..):
https://github.com/christianromeni/cLogRotate
Also, there is only the option to look for multiple files in a folder, but not for multiple folders. This would be a nice feature to look for subfolders. maybe this could be extended to be recursive as well..