Simplify the generation of the local configuration file
by replacing various loops with shorter PHP standard methods.
This will cause the local configuration to have a slightly
different style, but it is still an array therefore is
readable and changeable by PHP developers.
Move the include of the original and the local
configuration file into the settings file to reduce one
includes in each file, have all settings in one place
and remove unneccessary code from the config file
(which makes it easier to copy and change it).
Add some comments to enhance the readabillity in the
installation script.
Reduce footer includes and send all fatal errors
to one function instead.
Remove includes of installation depenend variables
in the footer, if the installation script is not
done yet.
Move settings include to the top (this may help
for future configuration tests).
Its a common way to include a CONTRIBUTING.md file
(https://github.com/blog/1184-contributing-guidelines)
to explain developers things like code format, structures and
patch guidelines.
Rename the newcomers file to CONTRIBUTING.md and add
a link to it in the README.
The bash script uses the upload URL to build the download link.
So the user may share different links when using the bash script
or the webform. Besides that does the API page show the same
result for "download links" and "direct links", so the current
list makes no sense to the uploader.
The script should however link to the web view and
offer API commands additionally.
Refs #86
Setting the content type to text only will
make some browsers to ignore the utf8 charset.
Set the default content type to "plain text"
to deliver UTF8 and avoid errors while generating
a bash script with special characters.
Enhance the help and show all available options in
a common structure.
Move description of available options to one place.
Also add the version of the Jirafeau version which
generated the bash script. This way a user may
find out about changes (because his script was
generated with Jirafeau 1.1.2, but the current version
on the server may be 3.2.5 already).
Enable the admin to set a default expiration time
in the configuration time. This way the upload form
may offer "hour", "day", "month" as available expiration
times and "day" is preselected.
Default in the original configuration is "month".
Refs #57
The bash script sets the expiration date to "none"
by default. The web form has "month" as default however.
Streamline the default expiration date and set the bash
to month as well.
This also avoids an error if the bash script is run
for the first time ever with default settings, since
the expiration time "none" is not allowed then.
Refs #85
Show the download link for a file in the admin panel,
to find it again easily if the uploader has lost it somehow.
Move the "direct download" action into the last column instead.
Refs #68
The JavaScript lib is generated by a PHP file. This
file will be blocked in browsers, if the server has the
security option "X-Content-Type-Options: nosniff" set.
Set the correct MIME type (text/javascript) in the header
to avoid this behaviour.
Refs #84
Adding the possibility to call admin.php from CLI to automatize (e.g. in cron) the cleaning of old/expired files and unfinished tranfers
Hello,
I think this feature might be of interest for other administrators of Jirafeau. I have not found any way in the app to do it so I developed this small patch. What do you think?
Best
Pierre-Alain
See merge request !15