* Added swipeL + swipeR + arrowL + arrowR events to DailyCharts form
* Added swipeL + swipeR + arrowL + arrowR events to DailyCharts form
* changed indicator from div to img, using spinner.gif
* changed indicator from div to img, using spinner.gif
* invert swipe directions
---------
Co-authored-by: Louis Croisez <louis.croisez@gmail.com>
Makes things a little tidier and easier to change in the future, a custom message can be passed to authenticateUser() and this is output if the authentication fails.
Added protection around Include and Exclude species pages as these still accessible & data can still be written to include and exclude species.txt even with a password.
Include and Exclude list updated to use the calculated path to their respective x_species_list.txt files
Move play.php over to also use the new calculated paths to disk_check_exclude
Spectrogram.php remove unused code & replace setting save code with new function
Stats.php removed old code, update paths to use calculated path.
Rename setSetting func to saveSetting
Remove old code from other pages
The Config and Advanced setting pages received changes to use the new setSetting() function which looks after creating or updated the setting in the required config files.
Optionally it also specification of a command to run after saving the settings.
Some variables like models, audio formats and frequency shift tools were also moved into common.php
Service Controls page received changes with the replacement of the actual command to execute with a sort of shorthand human friendly version e.g. service <action> <service_name> -- service restart livestream.service
These commands map to the original commands in serviceMaintenance() so this could be called through the API without needing the full-blown commend.
views.php was updated to accommodate this also
System Controls page received a small change to make the process checking for new git updates or getting the last commit hash a single function call.
Include and Exclude species updated to use getFilePath() to generate a path to the required file instead of the hard coded path
Views.php also received similar treatment with replacing some hard coded paths with generated paths, but logic changes to handle the change in running service commands
When restarting the Livestream service, the IceCast2 is restarted too, after fixing command to restart IceCast only it's status returned (since it's the last service)
Added in a small loop to try get both the service names so we can get the status of both.
Changed command to use systemctl to restart the icecast2 service, the error wasn't fatal but just made it look like restarting the live stream service had failed.
The timezone in the PHP INI file could differ from the timezone set on the system itself and result incorrect time display on webpages and wherever date functions are used.
Simple fix to read the systems timezone and make PHP use the correct one.
The update output shows the name of the current commit your local installation is on. So if a commit is named <script>alert("xss");</script>, for example, that code will execute when someone updates their installation.
Not a huge deal since we'd notice if someone made a rogue pull request with any commit names like that before ever accepting it into the repo.