Browse Source

This should fix issue #358

Signed-off-by: emanuele <[email protected]>
emanuele 12 years ago
parent
commit
6f41a3cf49
4 changed files with 4 additions and 14 deletions
  1. 1 11
      other/install.php
  2. 1 1
      other/install_2-1_mysql.sql
  3. 1 1
      other/install_2-1_postgresql.sql
  4. 1 1
      other/install_2-1_sqlite.sql

+ 1 - 11
other/install.php

@@ -957,17 +957,6 @@ function ForumSettings()
 				updateSettingsFile(array('db_character_set' => 'utf8'));
 		}
 
-		//-- Set the registration mode...
-		$smcFunc['db_query']('', '
-			UPDATE {db_prefix}settings
-			SET value = {int:reg_mode}
-			WHERE variable = {string:this_variable}',
-			array(
-				'reg_mode' => isset($_POST['reg_mode']) ? $_POST['reg_mode'] : 0,
-				'this_variable' => 'registration_method',
-			)
-		);
-
 		// Good, skip on.
 		return true;
 	}
@@ -1035,6 +1024,7 @@ function DatabasePopulation()
 		'{$smf_version}' => $GLOBALS['current_smf_version'],
 		'{$current_time}' => time(),
 		'{$sched_task_offset}' => 82800 + mt_rand(0, 86399),
+		'{$registration_method}' => isset($_POST['reg_mode']) ? $_POST['reg_mode'] : 0,
 	);
 
 	foreach ($txt as $key => $value)

+ 1 - 1
other/install_2-1_mysql.sql

@@ -1747,7 +1747,7 @@ VALUES ('smfVersion', '{$smf_version}'),
 	('xmlnews_maxlen', '255'),
 	('hotTopicPosts', '15'),
 	('hotTopicVeryPosts', '25'),
-	('registration_method', '0'),
+	('registration_method', '{$registration_method}'),
 	('send_validation_onChange', '0'),
 	('send_welcomeEmail', '1'),
 	('allow_editDisplayName', '1'),

+ 1 - 1
other/install_2-1_postgresql.sql

@@ -2236,7 +2236,7 @@ INSERT INTO {$db_prefix}settings (variable, value) VALUES ('xmlnews_enable', '1'
 INSERT INTO {$db_prefix}settings (variable, value) VALUES ('xmlnews_maxlen', '255');
 INSERT INTO {$db_prefix}settings (variable, value) VALUES ('hotTopicPosts', '15');
 INSERT INTO {$db_prefix}settings (variable, value) VALUES ('hotTopicVeryPosts', '25');
-INSERT INTO {$db_prefix}settings (variable, value) VALUES ('registration_method', '0');
+INSERT INTO {$db_prefix}settings (variable, value) VALUES ('registration_method', '{$registration_method}');
 INSERT INTO {$db_prefix}settings (variable, value) VALUES ('send_validation_onChange', '0');
 INSERT INTO {$db_prefix}settings (variable, value) VALUES ('send_welcomeEmail', '1');
 INSERT INTO {$db_prefix}settings (variable, value) VALUES ('allow_editDisplayName', '1');

+ 1 - 1
other/install_2-1_sqlite.sql

@@ -1889,7 +1889,7 @@ INSERT INTO {$db_prefix}settings (variable, value) VALUES ('xmlnews_enable', '1'
 INSERT INTO {$db_prefix}settings (variable, value) VALUES ('xmlnews_maxlen', '255');
 INSERT INTO {$db_prefix}settings (variable, value) VALUES ('hotTopicPosts', '15');
 INSERT INTO {$db_prefix}settings (variable, value) VALUES ('hotTopicVeryPosts', '25');
-INSERT INTO {$db_prefix}settings (variable, value) VALUES ('registration_method', '0');
+INSERT INTO {$db_prefix}settings (variable, value) VALUES ('registration_method', '{$registration_method}');
 INSERT INTO {$db_prefix}settings (variable, value) VALUES ('send_validation_onChange', '0');
 INSERT INTO {$db_prefix}settings (variable, value) VALUES ('send_welcomeEmail', '1');
 INSERT INTO {$db_prefix}settings (variable, value) VALUES ('allow_editDisplayName', '1');