Write newline after wildcard

This makes the web interface add wildcards in the same way as the CLI.

Signed-off-by: Mark Drobnak <mark.drobnak@gmail.com>
This commit is contained in:
Mark Drobnak
2018-09-01 19:34:25 -04:00
committed by GitHub
parent 4a63500d10
commit 02cc5fad15

View File

@@ -48,7 +48,7 @@ if(!function_exists('hash_equals')) {
function add_regex($regex, $mode=FILE_APPEND, $append="\n")
{
global $regexfile;
if(file_put_contents($regexfile, $append.$regex, $mode) === FALSE)
if(file_put_contents($regexfile, $regex.$append, $mode) === FALSE)
{
$err = error_get_last()["message"];
echo "Unable to add regex \"".htmlspecialchars($regex)."\" to ${regexfile}<br>Error message: $err";