Tried to fix installer a bit + added missing language string.
authorRoland Haeder <roland@mxchange.org>
Thu, 28 May 2015 20:04:15 +0000 (22:04 +0200)
committerRoland Haeder <roland@mxchange.org>
Thu, 28 May 2015 20:04:15 +0000 (22:04 +0200)
Signed-off-by: Roland H├Ąder <roland@mxchange.org>
inc/install-functions.php
inc/language/optimize_de.php
inc/language/wernis_de.php
inc/libs/wernis_functions.php
inc/mysql-connect.php

index e4ab529..7c205e2 100644 (file)
@@ -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
index 5201fca..0db234e 100644 (file)
@@ -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&uuml;tzung (1)",
        'ADMIN_OPTIMIZE_STATUS_THE_STORAGE_ENGINE_FOR_THE_TABLE_DOESNT_SUPPORT_OPTIMIZE' => "Keine Unterst&uuml;tzung (2)",
+       'ADMIN_OPTIMIZE_STATUS_TABLE_DOES_NOT_SUPPORT_OPTIMIZE_DOING_RECREATE__ANALYZE_INSTEAD' => "Keine Unterst&uuml;tzung (3)",
        'ADMIN_OPTIMIZE_STATUS_UNSUPPORTED' => "Nicht m&ouml;glich",
        'ADMIN_OPTIMIZE_STATUS_OPTIMIZED' => "Optimiert.",
        'ADMIN_OPTIMIZE_DB_TOTAL_TABLES' => "Gesamtzahl angelegter Tabellen",
index c1be39d..72ba37f 100644 (file)
@@ -176,7 +176,8 @@ addMessages(array(
        'GUEST_REGISTER_WERNIS_PROVIDER_TITLE' => "Anmeldung mit WDS66 am {?mt_word?} <strong>{?MAIN_TITLE?}</strong>:",
 
        // 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 ...",
index e01bcb9..af6a5cd 100644 (file)
@@ -563,7 +563,7 @@ function doDisplayWernisUserRegistrationForm () {
 
                        // Status was okay?
                        if (isHttpResponseStatusOkay($args)) {
-                               // Is status set?
+                               // Is auth_status set?
                                //* DEBUG-DIE */ die('response=<pre>' . print_r($response, TRUE) . '</pre>,args=' . '<pre>'.print_r($args, TRUE).'</pre>');
                                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
 
index 69f26d9..a6ef2e9 100644 (file)
@@ -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__);