<commit_before>/* Yet Another Forum.NET
 * Copyright (C) 2003-2005 <NAME>
 * Copyright (C) 2006-2009 <NAME>
 * http://www.yetanotherforum.net/
 * 
 * This program is free software; you can redistribute it and/or
 * modify it under the terms of the GNU General Public License
 * as published by the Free Software Foundation; either version 2
 * of the License, or (at your option) any later version.
 * 
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 * 
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 */

using System;
using System.Configuration;
using System.Data;
using System.IO;
using System.Data.SqlClient;
using System.Web.Configuration;
using System.Web.Security;
using System.Web.UI.WebControls;
using YAF.Classes;
using YAF.Classes.Utils;
using YAF.Classes.Data;

namespace YAF.Install
{
	/// <summary>
	/// Summary description for install.
	/// </summary>
	public partial class _default : System.Web.UI.Page
	{
		protected int _dbVersionBeforeUpgrade;
		private string _loadMessage = "";

		private const string _bbcodeImport = "bbCodeExtensions.xml";
		private const string _fileImport = "fileExtensions.xml";

		#region events
		private void Page_Load( object sender, System.EventArgs e )
		{
			if ( !IsPostBack )
			{
				Cache ["DBVersion"] = DB.DBVersion;

				InstallWizard.ActiveStepIndex = IsInstalled ? 1 : 0;
				
				if ( !IsInstalled )
				{
					// fake the board settings
					YafContext.Current.BoardSettings = new YafBoardSettings( null );
				}

				TimeZones.DataSource = YafStaticData.TimeZones( "english.xml" );

				DataBind();

				TimeZones.Items.FindByValue( "0" ).Selected = true;
			}
		}

		protected void UserChoice_SelectedIndexChanged( object sender, EventArgs e )
		{
			if ( UserChoice.SelectedValue == "create" )
			{
				ExistingUserHolder.Visible = false;
				CreateAdminUserHolder.Visible = true;
			}<commit_msg>Messed up on call to board settings.<commit_after>/* Yet Another Forum.NET
 * Copyright (C) 2003-2005 <NAME>
 * Copyright (C) 2006-2009 <NAME>
 * http://www.yetanotherforum.net/
 * 
 * This program is free software; you can redistribute it and/or
 * modify it under the terms of the GNU General Public License
 * as published by the Free Software Foundation; either version 2
 * of the License, or (at your option) any later version.
 * 
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 * 
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 */

using System;
using System.Configuration;
using System.Data;
using System.IO;
using System.Data.SqlClient;
using System.Web.Configuration;
using System.Web.Security;
using System.Web.UI.WebControls;
using YAF.Classes;
using YAF.Classes.Utils;
using YAF.Classes.Data;

namespace YAF.Install
{
	/// <summary>
	/// Summary description for install.
	/// </summary>
	public partial class _default : System.Web.UI.Page
	{
		protected int _dbVersionBeforeUpgrade;
		private string _loadMessage = "";

		private const string _bbcodeImport = "bbCodeExtensions.xml";
		private const string _fileImport = "fileExtensions.xml";

		#region events
		private void Page_Load( object sender, System.EventArgs e )
		{
			if ( !IsPostBack )
			{
				Cache ["DBVersion"] = DB.DBVersion;

				InstallWizard.ActiveStepIndex = IsInstalled ? 1 : 0;
				
				if ( !IsInstalled )
				{
					// fake the board settings
					YafContext.Current.BoardSettings = new YafBoardSettings();
				}

				TimeZones.DataSource = YafStaticData.TimeZones( "english.xml" );

				DataBind();

				TimeZones.Items.FindByValue( "0" ).Selected = true;
			}
		}

		protected void UserChoice_SelectedIndexChanged( object sender, EventArgs e )
		{
			if ( UserChoice.SelectedValue == "create" )
			{
				ExistingUserHolder.Visible = false;
				CreateAdminUserHolder.Visible = true;
			}
{'fraction_non_alphanumeric': 0.09204927211646137, 'fraction_numerical': 0.01522956326987682, 'mean_word_length': 3.594650205761317, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 11, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 6}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7053477', 'n_tokens_mistral': 1474, 'n_tokens_neox': 1264, 'n_words': 459}