More fixes, menus are no longer set visible if extension is deactivated, thanks to...
[mailer.git] / inc / extensions / ext-refback.php
index b375fd641e2e460530cf01686ac84ab9bfe07212..df196c90248b2eeb32facd1395f9f47052b015cd 100644 (file)
@@ -52,10 +52,10 @@ case "register": // Do stuff when installation is running (modules.php?module=ad
        // SQL commands to run
        $SQLs[] = "DROP TABLE IF EXISTS `"._MYSQL_PREFIX."_user_refs`";
        $SQLs[] = "CREATE TABLE `"._MYSQL_PREFIX."_user_refs` (
-`id` bigint(20) NOT NULL auto_increment,
-`userid` bigint(20) NOT NULL DEFAULT 0,
-`level` smallint(6) NOT NULL DEFAULT 0,
-`refid` bigint(20) NOT NULL DEFAULT 0,
+`id` BIGINT(20) UNSIGNED NOT NULL auto_increment,
+`userid` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
+`level` smallINT(6) UNSIGNED NOT NULL DEFAULT 0,
+`refid` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
 `refback` float(4,1) NOT NULL DEFAULT 0.0,
 `points` FLOAT( 20,5) DEFAULT 0.00000 NOT NULL,
 PRIMARY KEY (`id`),
@@ -81,7 +81,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 locked='Y' WHERE what='refback' LIMIT 1";
+       $SQLs[] = "UPDATE `"._MYSQL_PREFIX."_member_menu` SET visible='N', locked='Y' WHERE what='refback' LIMIT 1";
        break;
 
 case "update": // Update an extension