From 8848f4a3fd7b32a1bbd9139766171701b94b2f42 Mon Sep 17 00:00:00 2001 From: Roland Haeder Date: Thu, 28 May 2015 22:04:15 +0200 Subject: [PATCH] Tried to fix installer a bit + added missing language string. MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Roland Häder --- inc/install-functions.php | 9 +++++++++ inc/language/optimize_de.php | 1 + inc/language/wernis_de.php | 3 ++- inc/libs/wernis_functions.php | 4 ++-- inc/mysql-connect.php | 17 +++++++++++++++-- 5 files changed, 29 insertions(+), 5 deletions(-) diff --git a/inc/install-functions.php b/inc/install-functions.php index e4ab52901f..7c205e2481 100644 --- a/inc/install-functions.php +++ b/inc/install-functions.php @@ -563,6 +563,15 @@ function isInstallerMysqlEngineValid ($value) { return $isValid; } +// Call-back function to check validity of 'database_extension' +function isInstallerDatabaseExtensionValid ($value) { + // This value must be 'mysql' or 'mysqli' + $isValid = in_array($value, array('mysql', 'mysqli')); + + // Return it + return $isValid; +} + // Call-back function to check validity of 'mysql_dbase' function isInstallerMysqlDbaseValid ($value) { // This value must not be empty diff --git a/inc/language/optimize_de.php b/inc/language/optimize_de.php index 5201fcab47..0db234ed26 100644 --- a/inc/language/optimize_de.php +++ b/inc/language/optimize_de.php @@ -51,6 +51,7 @@ addMessages(array( 'ADMIN_OPTIMIZE_STATUS_OK' => "Nein", 'ADMIN_OPTIMIZE_STATUS_TABLE_DOES_NOT_SUPPORT_OPTIMIZE_DOING_RECREATE_ANALYZE_INSTEAD' => "Keine Unterstützung (1)", 'ADMIN_OPTIMIZE_STATUS_THE_STORAGE_ENGINE_FOR_THE_TABLE_DOESNT_SUPPORT_OPTIMIZE' => "Keine Unterstützung (2)", + 'ADMIN_OPTIMIZE_STATUS_TABLE_DOES_NOT_SUPPORT_OPTIMIZE_DOING_RECREATE__ANALYZE_INSTEAD' => "Keine Unterstützung (3)", 'ADMIN_OPTIMIZE_STATUS_UNSUPPORTED' => "Nicht möglich", 'ADMIN_OPTIMIZE_STATUS_OPTIMIZED' => "Optimiert.", 'ADMIN_OPTIMIZE_DB_TOTAL_TABLES' => "Gesamtzahl angelegter Tabellen", diff --git a/inc/language/wernis_de.php b/inc/language/wernis_de.php index c1be39d073..72ba37f480 100644 --- a/inc/language/wernis_de.php +++ b/inc/language/wernis_de.php @@ -176,7 +176,8 @@ addMessages(array( 'GUEST_REGISTER_WERNIS_PROVIDER_TITLE' => "Anmeldung mit WDS66 am {?mt_word?} {?MAIN_TITLE?}:", // Points accounts - subject - 'POINTS_SUBJECT_WERNIS_WITHDRAW' => "Einzahlung vom WDS66-Account", + 'POINTS_SUBJECT_WERNIS_WITHDRAW' => "Einzahlung vom WDS66-Account", + 'POINTS_SUBJECT_WERNIS_WITHDRAW_REF' => "Anteil an Einzahlung vom WDS66-Account", // Registration provider 'REGISTRATION_PROVIDER_WERNIS_USER_REGISTRATION' => "Mit WDS66-Portal anmelden ...", diff --git a/inc/libs/wernis_functions.php b/inc/libs/wernis_functions.php index e01bcb9c31..af6a5cd3b0 100644 --- a/inc/libs/wernis_functions.php +++ b/inc/libs/wernis_functions.php @@ -563,7 +563,7 @@ function doDisplayWernisUserRegistrationForm () { // Status was okay? if (isHttpResponseStatusOkay($args)) { - // Is status set? + // Is auth_status set? //* DEBUG-DIE */ die('response=
' . print_r($response, TRUE) . '
,args=' . '
'.print_r($args, TRUE).'
'); assert(isset($args['auth_status'])); @@ -743,7 +743,7 @@ function getWernisMappedDataFromApiByChallenge ($challenge, $challengeResponse, reportBug(__FUNCTION__, __LINE__, 'Cannot map from=' . $from . ' -> to=' . $to . ': element does not exist.'); } // END - if - // "Map" all + // "Map" all and make empty strings to NULL $return['mapped_data'][$to] = convertEmptyToNull($userData[$from]); } // END - foreach diff --git a/inc/mysql-connect.php b/inc/mysql-connect.php index 69f26d9b4c..a6ef2e98e2 100644 --- a/inc/mysql-connect.php +++ b/inc/mysql-connect.php @@ -121,8 +121,21 @@ if ((!isInstaller()) && (isInstalled())) { setConfigEntry('OUTPUT_MODE', 'render'); } // END - if - // CFG: DATABASE-TYPE - setConfigEntry('_DB_TYPE', 'mysql'); + // Debug message + /* DEBUG: */ logDebugMessage(__FILE__, __LINE__, 'isAjaxOutputMode()=' . intval(isAjaxOutputMode()) . ',isSessionVariableSet(database_extension)=' . intval(isSessionVariableSet('database_extension'))); + + // Is it AJAX call and database_extension is set? + if ((isAjaxOutputMode()) && (isSessionVariableSet('database_extension'))) { + // Then take it from session + /* DEBUG: */ logDebugMessage(__FILE__, __LINE__, 'Setting _DB_TYPE from session;database_extension=' . getSession('database_extension')); + setConfigEntry('_DB_TYPE', getSession('database_extension')); + } else { + // Debug message + /* DEBUG: */ logDebugMessage(__FILE__, __LINE__, 'Setting _DB_TYPE to default (mysql) ...'); + + // Set (old) default + setConfigEntry('_DB_TYPE', 'mysql'); + } // Set link as down unsetSqlLinkUp(__FILE__, __LINE__); -- 2.39.5