Function added for IP filtering when the filemanager is hosted behind a web proxy.
I've added a function for this to the file, not sure how else to implement it since everything is one file.
Added a global readonly variable that will force readonly mode both when
not using the auth system and for all users if the auth system is being
used.
Co-authored-by: Prasath Mani <prasathmani@users.noreply.github.com>
Its a little html fix- its about 1787 line- the class value it not closed.
```
<button type="button" class="btn btn-sm btn-outline-primary name="Save"
```
changed to:
```
<button type="button" class="btn btn-sm btn-outline-primary" name="Save"
```
When you have a file without content, for example when you cleared you were unable to save it because of an incorrect if-statement. This is the fix for that problem.
fm_get_file_mimes() was causing errors for unknown extensions as it was causing an error as array element was not defined and return value was never checked. According to https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types/Common_types and several other resources, application/octet-stream is the default value for all other cases. An unknown file type should use this type. I put a check in there to use that by default so a valid value is always returned.
It might be useful to replace this function with the built-in PHP function mime_content_type() but that adds some additional dependencies as it does not always work out of the box with PHP.
Added in the preferences option to change the light or dark theme,
Now to change the theme will be in the preferences / settings area, along with other settings, and may even have other themes in the future.
Added error checking and message for when file fails to write on the server side. Before this change if a write failed on the server side it would still present the user with a misleading "Saved Successfully" Message.
Eliminates the following PHP warnings when error reporting is turned on:
Notice: A non well formed numeric value encountered in tinyfilemanager.php on line 2443
Notice: A non well formed numeric value encountered in tinyfilemanager.php on line 2444
This happens because PHP floor and round are expecting a (float), not an (int).
* Added optional configuration file loading
* First commit of optional configuration file
This file is OPTIONAL.
If this file is not present in your webserver, tinyfilemanager will works with its internal configuration.
* removed define
define is not a configuration
* feat(/): add support user customized config file (if exists)
* Show current process ID in Status bar + Make fm_get_filesize function much more concise (#245)
* Update Simplified Chinese (#241)
* Feature Font Size Choose Options / Bug Fix Settings not visible in auth=false (#240)
* Bug fix and PR #245, #241, #240
Co-authored-by: 刘明野 <898310895@qq.com>
Co-authored-by: B Bharath Kumar Reddy <39063133+bbharathkumarreddy@users.noreply.github.com>
Co-authored-by: Prasath Mani <prasath.mani@publicissapient.com>
Co-authored-by: Prasath Mani <prasathmani@users.noreply.github.com>