From 2ba222a97f136079fe1264e0c2ef4a809514cfed Mon Sep 17 00:00:00 2001 From: lightszentip Date: Sat, 7 Mar 2015 06:23:27 +0100 Subject: [PATCH] #1 Install Wizard - check application url of slash at end #3 database field length for image is too short #5 Key Length explanations during setup --- app/setup/appconfig.php | 5 ++++- app/setup/config/import.sql | 4 ++-- app/setup/templates/appconfig.php | 8 ++++---- 3 files changed, 10 insertions(+), 7 deletions(-) diff --git a/app/setup/appconfig.php b/app/setup/appconfig.php index f71a1ea..0372ede 100644 --- a/app/setup/appconfig.php +++ b/app/setup/appconfig.php @@ -26,7 +26,7 @@ function IsNullOrEmptyString($variable) { $error = true; $isErrorEmailAddress = true; } - if (!filter_var($domainUrl, FILTER_VALIDATE_URL) || ($domainUrl === "" || substr($domainUrl, -strlen("/")) === $domainUrl) || IsNullOrEmptyString($domainUrl)) { + if (!filter_var($domainUrl, FILTER_VALIDATE_URL) || $domainUrl === "" || IsNullOrEmptyString($domainUrl)) { $error = true; $isErrorDomainUrl = true; } @@ -38,6 +38,9 @@ function IsNullOrEmptyString($variable) { $error = true; $isErrorAppAbbreviation = true; } + if (substr($domainUrl,-1) != "/") { + $domainUrl = $domainUrl."/"; + } if (!$error) { // save settings in database config file // load template diff --git a/app/setup/config/import.sql b/app/setup/config/import.sql index e10e73e..7e1f5ef 100644 --- a/app/setup/config/import.sql +++ b/app/setup/config/import.sql @@ -3,7 +3,7 @@ CREATE TABLE IF NOT EXISTS `%%prefix%%presententries` ( `id` BIGINT NOT NULL AUTO_INCREMENT, `title` varchar(50) NOT NULL, `status` varchar(25) NOT NULL, - `imagepath` varchar(50) NULL, + `imagepath` varchar(500) NULL, `description` varchar(1200) NOT NULL, `code` varchar(255) NULL UNIQUE, `links` varchar(500) NULL, @@ -30,4 +30,4 @@ INSERT INTO `%%prefix%%present_config` (`key`, `value`) VALUES ('conf_maintenanc INSERT INTO `%%prefix%%present_config` (`key`, `value`) VALUES ('conf_template', 'style'); INSERT INTO `%%prefix%%present_config` (`key`, `value`) VALUES ('conf_version', '%%version%%'); INSERT INTO `%%prefix%%present_config` (`key`, `value`) VALUES ('conf_app_abbreviation', '%%appname%%'); -INSERT INTO `%%prefix%%present_config` (`key`, `value`) VALUES ('conf_app_name', '%%appabbreviation%%'); \ No newline at end of file +INSERT INTO `%%prefix%%present_config` (`key`, `value`) VALUES ('conf_app_name', '%%appabbreviation%%'); diff --git a/app/setup/templates/appconfig.php b/app/setup/templates/appconfig.php index cc85cef..c613b1f 100644 --- a/app/setup/templates/appconfig.php +++ b/app/setup/templates/appconfig.php @@ -51,16 +51,16 @@
- +
- (The Length of the code to release a present) + (Length of the keys to the release of a gift (Key has a certain length and is again added to the length specified here))
- + Cancel @@ -77,4 +77,4 @@ Retry - \ No newline at end of file +