Moodle plugins directory: File trash (Orphaned file locator) | Moodle.org
File trash (Orphaned file locator)
The files in the Moodle data folder and backup folders are referenced in the "files" table in the database. If you view the folders themselves you will find the sha1 hash code under which the file has been saved and referenced in the database. If you have any orphaned files (files no longer referenced by the database but still present on your disk) it will be very difficult to find them. This utility enables you to immediately receive a list of orphaned files together with the file type and size. You can download the file to see what it is (the name is a sha1 hash so that won't give you any clues). If you are happy to delete the file you can select it with the checkbox next to it's description and click delete. You will be asked for confirmation before the file is finally deleted.
Please note: This plugin requires the fileinfo PHP extension
Maturity information ($plugin->maturity) not found in version.php
Release name ($plugin->release) not found in version.php
Release notes not found (searched for files README, README.*)
During the review of the plugin, I found couple of issues that should raise your attention and be fixed in future updates of your
plugin.
Your report throws PHP "Notice: Array to string conversion in report/filetrash/lib.php on line 187". Please double check the arrays
processing there.
I believe your report should exclude the file /warning.txt in the filepool. It is supposed to stay there for admins who browse the
moodledata directory.
I noticed that you create functions in the global PHP scope without the valid frankenstyle prefix. This is strongly discouraged in
order to prevent collisions with (current and/or future) core code or some other plugin. See
http://docs.moodle.org/dev/Coding_style#Functions_and_Methods for details.
Please note that leading and trailing whitespace in strings is not supported by Moodle localisation tools. Translators of your
plugin will be unable to have them in their non-English strings. Please fix your English language pack so that it does not rely on
whitespace around the string value.
I believe you would consider this feedback for further versions of your report. Said that, you are cleared to land now. Runway free,
welcome to Plugins directory!