More fixes, menus are no longer set visible if extension is deactivated, thanks to...
[mailer.git] / inc / extensions / ext-refback.php
index de8861e21c6a25c5f163314fc58564e96713af02..df196c90248b2eeb32facd1395f9f47052b015cd 100644 (file)
@@ -52,12 +52,12 @@ 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,
+`points` FLOAT( 20,5) DEFAULT 0.00000 NOT NULL,
 PRIMARY KEY (`id`),
 UNIQUE `user_refid` (`userid`,`level`,`refid`),
 KEY (`level`),
@@ -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
@@ -111,9 +111,6 @@ if ($EXT_LOAD_MODE == "register") {
        $INC_POOL[] = PATH."inc/gen_refback.php";
 } // END - if
 
-// Language file prefix (hmmm, what shall I write with SQL fixes? ;-) )
-$EXT_LANG_PREFIX = "refback";
-
 // Keep this extension always active!
 $EXT_ALWAYS_ACTIVE = "N";