// Update notes (these will be set as task text!)
setExtensionUpdateNotes("Der Sperrgrund wird nun mit abgespeichert und beim Löschen des Users mit ausgesendet.");
break;
+
+ case '0.3.7': // SQL queries for v0.3.7
+ addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_user_cats` CHANGE `id` `id` BIGINT( 22 ) UNSIGNED NOT NULL AUTO_INCREMENT");
+ addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_user_cats` CHANGE `userid` `userid` BIGINT( 20 ) UNSIGNED NULL DEFAULT NULL,");
+ addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_user_cats` CHANGE `cat_id` `cat_id` TINYINT( 3 ) UNSIGNED NULL DEFAULT NULL");
+ addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_user_data` CHANGE `userid` `userid` BIGINT( 20 ) UNSIGNED NOT NULL AUTO_INCREMENT");
+ addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_user_del` CHANGE `userid` `userid` BIGINT( 20 ) UNSIGNED NULL DEFAULT NULL");
+ addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_user_links` CHANGE `stats_id` `stats_id` BIGINT( 20 ) UNSIGNED NULL DEFAULT NULL");
+ addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_user_links` CHANGE `userid` `userid` BIGINT( 20 ) UNSIGNED NULL DEFAULT NULL");
+ addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_user_links` CHANGE `bonus_id` `bonus_id` BIGINT( 20 ) UNSIGNED NULL DEFAULT NULL");
+ addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_user_points` CHANGE `userid` `userid` BIGINT( 22 ) UNSIGNED NULL DEFAULT NULL");
+ addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_user_points` CHANGE `ref_depth` `ref_depth` TINYINT( 3 ) UNSIGNED NULL DEFAULT NULL");
+ addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_user_refs` CHANGE `userid` `userid` BIGINT( 20 ) UNSIGNED NULL DEFAULT NULL");
+ addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_user_refs` CHANGE `level` `level` SMALLINT( 6 ) UNSIGNED NULL DEFAULT NULL");
+ addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_user_refs` CHANGE `refid` `refid` BIGINT( 20 ) UNSIGNED NULL DEFAULT NULL");
+ addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_user_stats` CHANGE `userid` `userid` BIGINT( 20 ) UNSIGNED NULL DEFAULT NULL");
+ addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_user_stats` CHANGE `cat_id` `cat_id` BIGINT( 20 ) UNSIGNED NULL DEFAULT NULL");
+ addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_user_stats` CHANGE `payment_id` `payment_id` BIGINT( 20 ) UNSIGNED NULL DEFAULT NULL");
+ addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_user_stats` CHANGE `pool_id` `pool_id` BIGINT( 20 ) UNSIGNED NULL DEFAULT NULL");
+ addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_user_stats_data` CHANGE `userid` `userid` BIGINT( 20 ) UNSIGNED NULL DEFAULT NULL");
+
+ // Cleanup SQLs
+ addExtensionSql("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_user_cats` WHERE `userid` IS NULL OR `cat_id` IS NULL");
+ addExtensionSql("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_user_del` WHERE `userid` IS NULL");
+ addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_user_links` SET `stats_id`=NULL WHERE `stats_id`=0");
+ addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_user_links` SET `bonus_id`=NULL WHERE `bonus_id`=0");
+ addExtensionSql("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_user_links` WHERE `userid` IS NULL");
+ addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_user_points` SET `ref_depth`=NULL WHERE `ref_depth`=0");
+ addExtensionSql("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_user_points` WHERE `userid` IS NULL");
+ addExtensionSql("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_user_refs` WHERE `userid` IS NULL OR `refid` IS NULL OR `level` IS NULL");
+ addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_user_stats` SET `cat_id`=NULL WHERE `cat_id`=0");
+ addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_user_stats` SET `payment_id`=NULL WHERE `payment_id`=0");
+ addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_user_stats` SET `pool_id`=NULL WHERE `pool_id`=0");
+ addExtensionSql("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_user_stats` WHERE `userid` IS NULL");
+
+ // This update depends on ext-bonus
+ addExtensionDependency('bonus');
+
+ // Update notes (these will be set as task text!)
+ setExtensionUpdateNotes("NULL ist wichtiger als 0 und UNSIGNED auch.");
+ break;
} // END - switch
break;
if ($isValid === true) {
// Look for nickname in database (we only need just one entry so don't worry about the "LIMIT 1" !)
- $result = SQL_QUERY_ESC("SELECT `userid` FROM `{?_MYSQL_PREFIX?}_user_data` WHERE `nickname`='%s' AND `userid` != '%s' LIMIT 1",
+ $result = SQL_QUERY_ESC("SELECT `userid` FROM `{?_MYSQL_PREFIX?}_user_data` WHERE `nickname`='%s' AND `userid` != %s LIMIT 1",
array(postRequestParameter('nickname'), getMemberId()), __FILE__, __LINE__);
if (SQL_HASZERONUMS($result)) {
// Nickname not in use, so set it now
-<div align="center">
-
-<div class="para">
-<strong>{--MEMBER_BONUS_HERE_IS_THE_LIST--}</strong>
+<div class="table">
+<div class="table_header">
+ <strong>{--MEMBER_BONUS_HERE_IS_THE_LIST--}</strong>
+</div>
</div>
-<div class="para">
+<div align="center">
<table border="0" cellspacing="0" cellpadding="0" class="table dashed">
<tr>
<td width="80" align="center" class="header_column bottom"><strong>{--BONUS_RANK--}:</strong></td>
</tr>
$content[rows]
<tr>
- <td colspan="4" class="table_footer" align="center"
- style="padding-left: 5px; padding-right: 5px; padding-top: 5px; padding-bottom: 5px">
- <div class="tiny notice">{--MEMBER_BONUS_RALLYE_NOTE--}</div></td>
+ <td colspan="4" class="table_footer" align="center">
+ <div class="tiny notice">{--MEMBER_BONUS_RALLYE_NOTE--}</div>
+ </td>
</tr>
</table>
</div>
-<div class="para">
+<div align="center">
<table border="0" cellspacing="0" cellpadding="0" width="90%" class="table dashed">
<tr>
- <td class="header_column bottom"
- style="padding-left: 5px; padding-right: 5px; padding-top: 5px; padding-bottom: 5px"
- align="center"><strong>{--MEMBER_BONUS_RALLYE_CONDITIONS--}:</strong>
+ <td class="header_column bottom" align="center">
+ <strong>{--MEMBER_BONUS_RALLYE_CONDITIONS--}:</strong>
</td>
</tr>
<tr>
- <td class="notice bottom" style="padding-left: 5px; padding-right: 5px; padding-top: 5px; padding-bottom: 5px">
+ <td class="notice bottom">
<ol align="left">
<li class="tiny">Es werden nur aktive und freigeschaltete Mitglieder berücksichtig.</li>
<li class="tiny">Der Login-Bonus wird bei der Auswertung nicht beachtet, aber dem Mitglied gutgeschrieben.</li>
</td>
</tr>
<tr>
- <td colspan="4" class="table_footer" align="center"
- style="padding-left: 5px; padding-right: 5px; padding-top: 5px; padding-bottom: 5px">
- <a href="{%url=modules.php?module=login&what=unconfirmed%}">{--MEMBER_BONUS_START_CONFIRMING_MAILS--}</a>
+ <td colspan="4" class="table_footer" align="center">
+ <a href="{%url=modules.php?module=login&what=unconfirmed%}">{--MEMBER_BONUS_START_CONFIRMING_MAILS--}</a>
</td>
</tr>
</table>