]> git.mxchange.org Git - mailer.git/blobdiff - inc/mysql-manager.php
Fixes for #226, renamed function:
[mailer.git] / inc / mysql-manager.php
index c72706cbd7a135ae93c65367927a18aca8c93ab6..06901af009f4f6394d02650ac406bb8be74958f6 100644 (file)
@@ -1803,13 +1803,13 @@ function registerExtensionPointsData ($subject, $columnName, $lockedMode, $payme
        $add = '';
 
        // Is the extension equal or newer 0.8.9?
-       if (isExtensionInstalledAndNewer('sql_patches', '0.8.9')) {
+       if ((getExtensionMode() == 'register') || (getExtensionMode() == 'update') || (isExtensionInstalledAndNewer('sql_patches', '0.8.9'))) {
                // Then add provider
                $add = " AND `account_provider`='EXTENSION'";
        } // END - if
 
        // Is the 'subject' there?
-       if (countSumTotalData($subject, 'points_data', 'id', 'subject', true, $add) == 0) {
+       if (((!ifSqlTableExists('points_data')) && ((getExtensionMode() == 'register') || (getExtensionMode() == 'update'))) || (countSumTotalData($subject, 'points_data', 'id', 'subject', true, $add) == 0)) {
                // Not found so add an SQL query
                addExtensionSql(sprintf("INSERT INTO `{?_MYSQL_PREFIX?}_points_data` (`subject`,`column_name`,`locked_mode`,`payment_method`) VALUES ('%s','%s','%s','%s')",
                        $subject,