From 6a28693addea4cd734eb053970531a9a0ed27472 Mon Sep 17 00:00:00 2001 From: Tobias Reich Date: Thu, 24 Mar 2016 21:42:09 +0100 Subject: [PATCH] Strict response check --- src/scripts/settings.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/scripts/settings.js b/src/scripts/settings.js index 8fd92d6..a28f84a 100644 --- a/src/scripts/settings.js +++ b/src/scripts/settings.js @@ -36,7 +36,7 @@ settings.createConfig = function() { if (data!==true) { // Connection failed - if (data.indexOf('Warning: Connection failed!')!==-1) { + if (data==='Warning: Connection failed!') { basicModal.show({ body: '

Unable to connect to host database because access was denied. Double-check your host, username and password and ensure that access from your current location is permitted.

', @@ -53,7 +53,7 @@ settings.createConfig = function() { } // Creation failed - if (data.indexOf('Warning: Creation failed!')!==-1) { + if (data==='Warning: Creation failed!') { basicModal.show({ body: '

Unable to create the database. Double-check your host, username and password and ensure that the specified user has the rights to modify and add content to the database.

', @@ -70,7 +70,7 @@ settings.createConfig = function() { } // Could not create file - if (data.indexOf('Warning: Could not create file!')!==-1) { + if (data==='Warning: Could not create file!') { basicModal.show({ body: "

Unable to save this configuration. Permission denied in 'data/'. Please set the read, write and execute rights for others in 'data/' and 'uploads/'. Take a look at the readme for more information.

",