]> git.mxchange.org Git - mailer.git/blobdiff - inc/extensions/ext-transfer.php
Missing changed files added
[mailer.git] / inc / extensions / ext-transfer.php
index a1b3d2c0959b76093a3650d4d6153a10463d4627..467cd713dbcfd6a639fe322230047a53e9fa56f3 100644 (file)
@@ -56,11 +56,11 @@ case "register": // Do stuff when installation is running
        // Transfer from a member
        $SQLs[] = "CREATE TABLE "._MYSQL_PREFIX."_user_transfers_in (
 id BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
-userid BIGINT(20) UNSIGNED NOT NULL DEFAULT '0',
-from_uid BIGINT(20) UNSIGNED NOT NULL DEFAULT '0',
-points BIGINT(20) UNSIGNED NOT NULL DEFAULT '0',
+userid BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
+from_uid BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
+points BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
 reason VARCHAR(255) NOT NULL DEFAULT '',
-time_trans VARCHAR(14) NOT NULL DEFAULT '0',
+time_trans VARCHAR(14) NOT NULL DEFAULT 0,
 trans_id VARCHAR(12) NOT NULL DEFAULT '',
 KEY (userid),
 KEY (from_uid),
@@ -70,11 +70,11 @@ PRIMARY KEY(id)
        // Transfers to a member
        $SQLs[] = "CREATE TABLE "._MYSQL_PREFIX."_user_transfers_out (
 id BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
-userid BIGINT(20) UNSIGNED NOT NULL DEFAULT '0',
-to_uid BIGINT(20) UNSIGNED NOT NULL DEFAULT '0',
-points BIGINT(20) UNSIGNED NOT NULL DEFAULT '0',
+userid BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
+to_uid BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
+points BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
 reason VARCHAR(255) NOT NULL DEFAULT '',
-time_trans VARCHAR(14) NOT NULL DEFAULT '0',
+time_trans VARCHAR(14) NOT NULL DEFAULT 0,
 trans_id VARCHAR(12) NOT NULL DEFAULT '',
 KEY (userid),
 KEY (to_uid),
@@ -94,8 +94,8 @@ PRIMARY KEY(id)
        $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD transfer_max BIGINT(20) UNSIGNED NOT NULL DEFAULT '50'";
        $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD transfer_age BIGINT(20) UNSIGNED NOT NULL DEFAULT '".($_CONFIG['one_day']*28)."'";
        $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD transfer_timeout BIGINT(20) UNSIGNED NOT NULL DEFAULT '".$_CONFIG['one_day']."'";
-       $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD transfer_balance BIGINT(20) UNSIGNED NOT NULL DEFAULT '100'";
-       $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD transfer_code BIGINT(20) UNSIGNED NOT NULL DEFAULT '5'";
+       $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD transfer_balance BIGINT(20) UNSIGNED NOT NULL DEFAULT 100";
+       $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD transfer_code BIGINT(20) UNSIGNED NOT NULL DEFAULT 5";
 
        // Add row(s) to user's data
        $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_user_data ADD opt_in ENUM('Y','N') NOT NULL DEFAULT 'N'";
@@ -117,7 +117,7 @@ case "activate": // Do stuff when admin activates this extension
 
 case "deactivate": // Do stuff when admin deactivates this extension
        // SQL commands to run
-       $SQLs[] = "UPDATE "._MYSQL_PREFIX."_member_menu SET visible='Y', locked='Y' WHERE what='transfer' LIMIT 1";
+       $SQLs[] = "UPDATE "._MYSQL_PREFIX."_member_menu SET visible='Y', locked='N' WHERE what='transfer' LIMIT 1";
        break;
 
 case "update": // Update an extension
@@ -231,9 +231,9 @@ case "update": // Update an extension
                break;
 
        case "0.2.3": // SQL queries for v0.2.3
-               $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_admin_menu_las (la_id, la_action, la_what) VALUES ('member', NULL, 'list_transfer')";
-               $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_admin_menu_las (la_id, la_action, la_what) VALUES ('member', NULL, 'del_transfer')";
-               $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_admin_menu_las (la_id, la_action, la_what) VALUES ('config', NULL, 'config_transfer')";
+               $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_admin_menu_las (la_id, la_action, la_what) VALUES ('member', '', 'list_transfer')";
+               $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_admin_menu_las (la_id, la_action, la_what) VALUES ('member', '', 'del_transfer')";
+               $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_admin_menu_las (la_id, la_action, la_what) VALUES ('config', '', 'config_transfer')";
 
                // Depends on sql_patches (or you have to execute these both SQL statements by phpMyAdmin
                $EXT_UPDATE_DEPENDS = "sql_patches";