Fix coding guidelines incoherences. Code should match PSR1/2 now, and
php-cs is set to check it on each commit.
Also fixed the Git hook to take into account only added, modified,
copied and renamed files (preventing errors when trying to check deleted
files).
Closes#1260.
Generate `sceret_key` on Ampache installation
Generate a `secret_key` on Ampache installation and put it in the
generated config. This removes the need to do it manually, and the
secret key is ensured to be crypto safe.
Also move the `web_path` configuration setting under a "Various"
fieldset, as it had nothing to do with database settings.
Also added a comment about a missing `break` statement, which was on
purpose, but one could think it was a mistake at first sight.
Closes#1248.
* Fix php-cs according to https://github.com/ampache/ampache/issues/1251
to fix travis build. Use composer to force the 1.* version to be used.
* Add `encoding` fixer.
* Use the same set of fixers in Git commit hook and test script.
* Update hooks and scripts.
* Fix a braces issue detected by php-cs.
Closes issue #1251.
Image size checking did not handle empty values (e.g. max height/width was not set in config).
As result, any image would be "not in range" even when the user would expect that it would.
To get better information while debugging the error message has also be expanded to include
the configured/assumed min/max value and the current height/width which was checked.
Second fix in this commit addresses broken google image search.
Google has changed the image search page some time ago. This causes the old code to get an error 404
when trying to retrive images.
In addition to the broken URL, the way to parse the HTML result was also broken.
Google now sends some sort of JSON and HTML mix string.
Currently some simple regex will try to find all image urls, maybe someone will find a better solution.
bea34c42 fixed one use of is_readable, but Windows users encountering
this issue would still be affected in other cases. This commit fixes
all of the important is_readable calls within Ampache; I'm not going
to hack this into external modules, so if they're broken people will
have to live with it.