Working on #U4-1358 - moving Base page classes to their correct location/assembly. Migrated all installation webforms files and associated helper files to

their correct locations/namespaces/assemblies and obsoleted all of the old ones and ensure the old webforms files don't exist where the obsoleted ones were.
Fixes a security issue with the installer ajax service (used to be p.aspx, now is InstallerRestService.aspx)
This commit is contained in:
Shannon Deminick
2013-02-03 05:06:11 +06:00
parent 0d34b203d5
commit 1be3af1e31
109 changed files with 3886 additions and 1655 deletions

View File

@@ -259,19 +259,93 @@
<Compile Include="Install\Default.aspx.designer.cs">
<DependentUpon>default.aspx</DependentUpon>
</Compile>
<Compile Include="Install\Steps\Skinning\loadStarterKitDesigns.ascx.cs">
<DependentUpon>loadStarterKitDesigns.ascx</DependentUpon>
<Compile Include="Install\InstallerRestService.aspx.cs">
<DependentUpon>InstallerRestService.aspx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="Install\InstallerRestService.aspx.designer.cs">
<DependentUpon>InstallerRestService.aspx</DependentUpon>
</Compile>
<Compile Include="Install\Steps\Database.ascx.cs">
<DependentUpon>database.ascx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="Install\Steps\Database.ascx.designer.cs">
<DependentUpon>database.ascx</DependentUpon>
</Compile>
<Compile Include="Install\Steps\DefaultUser.ascx.cs">
<DependentUpon>defaultUser.ascx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="Install\Steps\DefaultUser.ascx.designer.cs">
<DependentUpon>defaultUser.ascx</DependentUpon>
</Compile>
<Compile Include="Install\Steps\License.ascx.cs">
<DependentUpon>license.ascx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="Install\Steps\License.ascx.designer.cs">
<DependentUpon>license.ascx</DependentUpon>
</Compile>
<Compile Include="Install\Steps\Renaming.ascx.cs">
<DependentUpon>renaming.ascx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="Install\Steps\Renaming.ascx.designer.cs">
<DependentUpon>renaming.ascx</DependentUpon>
</Compile>
<Compile Include="Install\Steps\Skinning\loadStarterKitDesigns.ascx.designer.cs">
<DependentUpon>loadStarterKitDesigns.ascx</DependentUpon>
</Compile>
<Compile Include="Install\Steps\Skinning\LoadStarterKits.ascx.cs">
<DependentUpon>loadStarterKits.ascx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="Install\Steps\Skinning\LoadStarterKits.ascx.designer.cs">
<DependentUpon>loadStarterKits.ascx</DependentUpon>
</Compile>
<Compile Include="Install\Steps\StarterKits.ascx.cs">
<DependentUpon>StarterKits.ascx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="Install\Steps\StarterKits.ascx.designer.cs">
<DependentUpon>StarterKits.ascx</DependentUpon>
</Compile>
<Compile Include="Install\Steps\Skinning\loadStarterKitDesigns.ascx.cs">
<DependentUpon>loadStarterKitDesigns.ascx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="Install\Steps\StepUserControl.cs">
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="Install\Steps\TheEnd.ascx.cs">
<DependentUpon>theend.ascx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="Install\Steps\TheEnd.ascx.designer.cs">
<DependentUpon>theend.ascx</DependentUpon>
</Compile>
<Compile Include="Install\Steps\ValidatePermissions.ascx.cs">
<DependentUpon>validatePermissions.ascx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="Install\Steps\ValidatePermissions.ascx.designer.cs">
<DependentUpon>validatePermissions.ascx</DependentUpon>
</Compile>
<Compile Include="Install\Steps\Welcome.ascx.cs">
<DependentUpon>welcome.ascx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="Install\Steps\Welcome.ascx.designer.cs">
<DependentUpon>welcome.ascx</DependentUpon>
</Compile>
<Compile Include="Install\Title.ascx.cs">
<DependentUpon>Title.ascx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="Install\Title.ascx.designer.cs">
<DependentUpon>Title.ascx</DependentUpon>
</Compile>
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="Umbraco\Create\PartialViewMacro.ascx.cs">
<DependentUpon>PartialViewMacro.ascx</DependentUpon>
@@ -1402,11 +1476,11 @@
<Content Include="Umbraco_Client\Installer\Js\jquery.ui.selectmenu.js" />
<Content Include="Install\Steps\database.ascx" />
<Content Include="Install\Steps\renaming.ascx" />
<Content Include="Install\Steps\skinning.ascx" />
<Content Include="Install\Steps\StarterKits.ascx" />
<Content Include="Install\Steps\Skinning\loadStarterKitDesigns.ascx" />
<Content Include="Install\Steps\Skinning\loadStarterKits.ascx" />
<Content Include="Install\Title.ascx" />
<Content Include="Install\Utills\p.aspx" />
<Content Include="Install\InstallerRestService.aspx" />
<Content Include="Umbraco\Config\Lang\ko.xml" />
<Content Include="Umbraco\Dashboard\ChangePassword.ascx" />
<Content Include="Umbraco\Dashboard\DeveloperDashboardIntro.ascx" />

View File

@@ -10,7 +10,7 @@ NOTES:
* Compression/Combination/Minification is not enabled unless debug="false" is specified on the 'compiliation' element in the web.config
* A new version will invalidate both client and server cache and create new persisted files
-->
<clientDependency version="43" fileDependencyExtensions=".js,.css">
<clientDependency version="46" fileDependencyExtensions=".js,.css">
<fileRegistration defaultProvider="LoaderControlProvider">
<providers>

View File

@@ -72,12 +72,12 @@
<script type="text/javascript">
jQuery(document).ready(function () {
$.post("../../install/utills/p.aspx?feed=sitebuildervids",
$.post("../../install/InstallerRestService.aspx?feed=sitebuildervids",
function (data) {
jQuery("#ajax-sitebuildervids").html(data);
});
$.post("../../install/utills/p.aspx?feed=developervids",
$.post("../../install/InstallerRestService.aspx?feed=developervids",
function (data) {
jQuery("#ajax-developervids").html(data);
});

View File

@@ -1,11 +1,86 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI.WebControls;
using Umbraco.Core.IO;
using Umbraco.Web.Install;
using Umbraco.Web.UI.Pages;
using umbraco;
namespace Umbraco.Web.UI.Install
{
public partial class Default : global::umbraco.presentation.install._default
public partial class Default : BasePage
{
private string _installStep = "";
protected string CurrentStepClass = "";
protected void Page_Load(object sender, System.EventArgs e)
{
rp_steps.DataSource = InstallHelper.InstallerSteps.Values;
rp_steps.DataBind();
}
private void LoadContent(InstallerStep currentStep)
{
PlaceHolderStep.Controls.Clear();
PlaceHolderStep.Controls.Add(LoadControl(IOHelper.ResolveUrl(currentStep.UserControl)));
step.Value = currentStep.Alias;
CurrentStepClass = currentStep.Alias;
}
int _stepCounter = 0;
protected void BindStep(object sender, RepeaterItemEventArgs e)
{
if (e.Item.ItemType == ListItemType.AlternatingItem || e.Item.ItemType == ListItemType.Item)
{
var i = (InstallerStep)e.Item.DataItem;
if (!i.HideFromNavigation)
{
var _class = (Literal)e.Item.FindControl("lt_class");
var name = (Literal)e.Item.FindControl("lt_name");
if (i.Alias == CurrentStepClass)
_class.Text = "active";
_stepCounter++;
name.Text = (_stepCounter).ToString() + " - " + i.Name;
}
else
e.Item.Visible = false;
}
}
override protected void OnInit(EventArgs e)
{
base.OnInit(e);
_installStep = Request.GetItemAsString("installStep");
//if this is not an upgrade we will log in with the default user.
// It's not considered an upgrade if the ConfigurationStatus is missing or empty.
if (String.IsNullOrWhiteSpace(GlobalSettings.ConfigurationStatus) == false)
{
try
{
EnsureContext();
}
catch (InvalidOperationException ex)
{
}
catch (Exception)
{
Response.Redirect(SystemDirectories.Umbraco + "/logout.aspx?redir=" + Server.UrlEncode(Request.RawUrl));
}
}
var s = string.IsNullOrEmpty(_installStep)
? InstallHelper.InstallerSteps["welcome"]
: InstallHelper.InstallerSteps[_installStep];
LoadContent(s);
}
}
}

View File

@@ -10,6 +10,42 @@
namespace Umbraco.Web.UI.Install {
public partial class Default {
public partial class Default
{
/// <summary>
/// ScriptManager1 control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.ScriptManager ScriptManager1;
/// <summary>
/// rp_steps control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.Repeater rp_steps;
/// <summary>
/// PlaceHolderStep control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.PlaceHolder PlaceHolderStep;
/// <summary>
/// step control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
public global::System.Web.UI.HtmlControls.HtmlInputHidden step;
}
}

View File

@@ -0,0 +1 @@
<%@ Page Language="C#" AutoEventWireup="True" CodeBehind="InstallerRestService.aspx.cs" Inherits="Umbraco.Web.UI.Install.InstallerRestService" %>

View File

@@ -0,0 +1,91 @@
using System;
using System.Configuration;
using System.Security.Authentication;
using System.Web.Script.Serialization;
using System.Web.Script.Services;
using System.Web.Services;
using Umbraco.Core;
using Umbraco.Core.Logging;
using Umbraco.Web.Install;
using umbraco;
using umbraco.businesslogic.Exceptions;
namespace Umbraco.Web.UI.Install
{
public partial class InstallerRestService : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
LogHelper.Info<InstallerRestService>(string.Format("Hitting Page_Load on InstallerRestService.aspx for the requested '{0}' feed", Request.QueryString["feed"]));
// Stop Caching in IE
Response.Cache.SetCacheability(System.Web.HttpCacheability.NoCache);
// Stop Caching in Firefox
Response.Cache.SetNoStore();
string feed = Request.QueryString["feed"];
string url = "http://our.umbraco.org/html/twitter";
if (feed == "progress")
{
Response.ContentType = "application/json";
Response.Write(InstallHelper.GetProgress());
}
else
{
if (feed == "blogs")
url = "http://our.umbraco.org/html/blogs";
if (feed == "sitebuildervids")
url = "http://umbraco.org/feeds/videos/site-builder-foundation-html";
if (feed == "developervids")
url = "http://umbraco.org/feeds/videos/developer-foundation-html";
string xmlResponse = library.GetXmlDocumentByUrl(url).Current.OuterXml;
if (!xmlResponse.Contains("System.Net.WebException"))
{
Response.Write(library.GetXmlDocumentByUrl(url).Current.OuterXml);
}
else
{
Response.Write("We can't connect to umbraco.tv right now. Click <strong>Set up your new website</strong> above to continue.");
}
}
}
[WebMethod]
[ScriptMethod(ResponseFormat = ResponseFormat.Json)]
public static string InstallOrUpgrade()
{
//if its not configured then we can continue
if (ApplicationContext.Current == null || ApplicationContext.Current.IsConfigured)
{
throw new AuthenticationException("The application is already configured");
}
LogHelper.Info<InstallerRestService>("Running 'InstallOrUpgrade' service");
var result = ApplicationContext.Current.DatabaseContext.CreateDatabaseSchemaAndDataOrUpgrade();
// Remove legacy umbracoDbDsn configuration setting if it exists and connectionstring also exists
if (ConfigurationManager.ConnectionStrings[Core.Configuration.GlobalSettings.UmbracoConnectionName] != null)
{
Core.Configuration.GlobalSettings.RemoveSetting(Core.Configuration.GlobalSettings.UmbracoConnectionName);
}
else
{
var ex = new ArgumentNullException(string.Format("ConfigurationManager.ConnectionStrings[{0}]", Core.Configuration.GlobalSettings.UmbracoConnectionName), "Install / upgrade did not complete successfully, umbracoDbDSN was not set in the connectionStrings section");
LogHelper.Error<InstallerRestService>("", ex);
throw ex;
}
var js = new JavaScriptSerializer();
var jsonResult = js.Serialize(result);
return jsonResult;
}
}
}

View File

@@ -3,15 +3,13 @@
// This code was generated by a tool.
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace umbraco.presentation.install
{
public partial class Title
{
namespace Umbraco.Web.UI.Install {
public partial class InstallerRestService {
}
}

View File

@@ -1,3 +1,3 @@
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="Title.ascx.cs" Inherits="umbraco.presentation.install.Title" %>
<%@ Control Language="C#" AutoEventWireup="True" CodeBehind="Title.ascx.cs" Inherits="Umbraco.Web.UI.Install.Title" %>
<%@ Import Namespace="Umbraco.Core.Configuration" %>
<title>Umbraco <%=UmbracoVersion.Current.ToString(3)%> Configuration Wizard</title>

View File

@@ -0,0 +1,12 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using Umbraco.Web.UI.Pages;
namespace Umbraco.Web.UI.Install
{
public partial class Title : System.Web.UI.UserControl
{
}
}

View File

@@ -7,9 +7,9 @@
// </auto-generated>
//------------------------------------------------------------------------------
namespace umbraco.presentation.install.utills {
namespace Umbraco.Web.UI.Install {
public partial class p {
public partial class Title {
}
}

View File

@@ -36,7 +36,7 @@
<!--[if lt IE 7]><script type="text/javascript" src="../umbraco_client/installer/js/ie-png.js"></script><![endif]-->
</head>
<body class="<%= currentStepClass %>">
<body class="<%= CurrentStepClass %>">
<form runat="server">
@@ -71,7 +71,7 @@
<nav class="tabset">
<asp:Repeater ID="rp_steps" runat="server" OnItemDataBound="bindStep">
<asp:Repeater ID="rp_steps" runat="server" OnItemDataBound="BindStep">
<HeaderTemplate>
<ul>
</HeaderTemplate>

View File

@@ -0,0 +1,253 @@
using System;
using System.Configuration;
using System.Data.Common;
using System.Web.UI.WebControls;
using System.Web.UI.HtmlControls;
using Umbraco.Core;
using Umbraco.Core.Configuration;
using Umbraco.Core.IO;
using Umbraco.Core.Logging;
using System.IO;
using Umbraco.Core.Persistence;
using Umbraco.Web.Install;
using umbraco.DataLayer;
namespace Umbraco.Web.UI.Install.Steps
{
/// <summary>
/// Database detection step in the installer wizard.
/// </summary>
public partial class Database : StepUserControl
{
/// <summary>
/// Returns whether the selected database is an embedded database.
/// </summary>
protected bool IsEmbeddedDatabase
{
get
{
var databaseSettings = ConfigurationManager.ConnectionStrings[GlobalSettings.UmbracoConnectionName];
var configuredDatabaseIsEmbedded = databaseSettings != null && databaseSettings.ProviderName.ToLower().Contains("SqlServerCe".ToLower());
return Request["database"] == "embedded" || configuredDatabaseIsEmbedded;
}
}
protected bool IsConfigured
{
get { return DatabaseType.SelectedValue != ""; }
}
/// <summary>
/// Returns whether the selected database is an embedded database.
/// </summary>
protected bool HasEmbeddedDatabaseFiles
{
get
{
// check if sql ce is present
if (
!File.Exists(IOHelper.MapPath(Path.Combine(IOHelper.ResolveUrl(SystemDirectories.Bin), "System.Data.SqlServerCe.dll"))) ||
!File.Exists(IOHelper.MapPath(Path.Combine(IOHelper.ResolveUrl(SystemDirectories.Bin), "SQLCE4Umbraco.dll")))
)
return false;
else
return true;
}
}
/// <summary>
/// Returns whether the connection string is set by direct text input.
/// </summary>
protected bool ManualConnectionString
{
get { return Request["database"] == "advanced"; }
}
/// <summary>
/// Shows the right panel to the user.
/// </summary>
/// <param name="sender">The sender.</param>
/// <param name="e">The event arguments.</param>
protected void Page_Load(object sender, System.EventArgs e)
{
// Does the user have to enter a connection string?
if (settings.Visible && !Page.IsPostBack)
{
//If the connection string is already present in web.config we don't need to show the settings page and we jump to installing/upgrading.
if (
ConfigurationManager.ConnectionStrings[
GlobalSettings.UmbracoConnectionName] == null
||
string.IsNullOrEmpty(
ConfigurationManager.ConnectionStrings[
GlobalSettings.UmbracoConnectionName].ConnectionString))
{
installProgress.Visible = true;
upgradeProgress.Visible = false;
ShowDatabaseSettings();
}
else
{
//Since a connection string was present we verify whether this is an upgrade or an empty db
var result = ApplicationContext.Current.DatabaseContext.ValidateDatabaseSchema();
var determinedVersion = result.DetermineInstalledVersion();
if (determinedVersion.Equals(new Version(0, 0, 0)))
{
//Fresh install
installProgress.Visible = true;
upgradeProgress.Visible = false;
}
else
{
//Upgrade
installProgress.Visible = false;
upgradeProgress.Visible = true;
}
settings.Visible = false;
installing.Visible = true;
}
}
}
/// <summary>
/// Prepares and shows the database settings panel.
/// </summary>
protected void ShowDatabaseSettings()
{
// Parse the connection string
var connectionStringBuilder = new DbConnectionStringBuilder();
var databaseSettings = ConfigurationManager.ConnectionStrings[GlobalSettings.UmbracoConnectionName];
if (databaseSettings != null)
{
var dataHelper = DataLayerHelper.CreateSqlHelper(databaseSettings.ConnectionString, false);
connectionStringBuilder.ConnectionString = dataHelper.ConnectionString;
// Prepare data layer type
string datalayerType = GetConnectionStringValue(connectionStringBuilder, "datalayer");
if (datalayerType.Length > 0)
{
foreach (ListItem item in DatabaseType.Items)
if (item.Value != String.Empty && datalayerType.Contains(item.Value))
DatabaseType.SelectedValue = item.Value;
}
else if (dataHelper.ConnectionString != "server=.\\SQLEXPRESS;database=DATABASE;user id=USER;password=PASS")
DatabaseType.SelectedValue = "SqlServer";
}
else
{
DatabaseType.SelectedValue = "SqlServer";
}
DatabaseType_SelectedIndexChanged(this, new EventArgs());
// Prepare other fields
DatabaseServer.Text = GetConnectionStringValue(connectionStringBuilder, "server");
if (string.IsNullOrEmpty(DatabaseServer.Text)) DatabaseServer.Text = GetConnectionStringValue(connectionStringBuilder, "Data Source");
DatabaseName.Text = GetConnectionStringValue(connectionStringBuilder, "database");
if (string.IsNullOrEmpty(DatabaseName.Text)) DatabaseName.Text = GetConnectionStringValue(connectionStringBuilder, "Initial Catalog");
DatabaseUsername.Text = GetConnectionStringValue(connectionStringBuilder, "user id");
DatabasePassword.Text = GetConnectionStringValue(connectionStringBuilder, "password");
if (string.IsNullOrEmpty(DatabasePassword.Text)) DatabasePassword.Text = GetConnectionStringValue(connectionStringBuilder, "pwd");
toggleVisible(DatabaseServerItem, !ManualConnectionString && !IsEmbeddedDatabase);
toggleVisible(DatabaseUsernameItem, !ManualConnectionString && !IsEmbeddedDatabase);
toggleVisible(DatabasePasswordItem, !ManualConnectionString && !IsEmbeddedDatabase);
toggleVisible(DatabaseNameItem, !ManualConnectionString && !IsEmbeddedDatabase);
if (IsEmbeddedDatabase)
dbinit.Text = "$('#databaseOptionEmbedded').click();$('#databaseOptionEmbedded').change();";
else if (ManualConnectionString)
dbinit.Text = "$('#databaseOptionAdvanced').click();$('#databaseOptionAdvanced').change();";
else if (DatabaseType.SelectedValue == "SqlServer")
dbinit.Text = "$('#databaseOptionBlank').click();$('#databaseOptionBlank').change();";
else if (DatabaseType.SelectedValue == "SqlAzure")
dbinit.Text = "$('#databaseOptionBlank').click();$('#databaseOptionBlank').change();";
//toggleVisible(DatabaseConnectionString, ManualConnectionString);
// Make sure ASP.Net displays the password text
DatabasePassword.Attributes["value"] = DatabasePassword.Text;
}
/// <summary>
/// Shows the installation/upgrade panel.
/// </summary>
protected void SaveDbConfig(object sender, EventArgs e)
{
try
{
if (string.IsNullOrEmpty(ConnectionString.Text) == false)
{
ApplicationContext.Current.DatabaseContext.ConfigureDatabaseConnection(ConnectionString.Text);
}
else if (IsEmbeddedDatabase)
{
ApplicationContext.Current.DatabaseContext.ConfigureEmbeddedDatabaseConnection();
}
else
{
ApplicationContext.Current.DatabaseContext.ConfigureDatabaseConnection(DatabaseServer.Text, DatabaseName.Text,
DatabaseUsername.Text, DatabasePassword.Text,
DatabaseType.SelectedValue);
}
}
catch (Exception ex)
{
LogHelper.Error<Database>("Exception was thrown during the setup of the database in 'saveDBConfig'.", ex);
}
settings.Visible = false;
installing.Visible = true;
}
/// <summary>
/// Gets the value of the specified item in the connection string.
/// </summary>
/// <param name="connectionStringBuilder">The connection string.</param>
/// <param name="keyword">Name of the item.</param>
/// <returns>The value of the item, or an empty string if not found.</returns>
protected string GetConnectionStringValue(DbConnectionStringBuilder connectionStringBuilder, string keyword)
{
object value = null;
connectionStringBuilder.TryGetValue(keyword, out value);
return (string)value ?? String.Empty;
}
/// <summary>
/// Show the needed fields according to the database type.
/// </summary>
/// <param name="sender">The sender.</param>
/// <param name="e">The event arguments.</param>
protected void DatabaseType_SelectedIndexChanged(object sender, EventArgs e)
{
toggleVisible(DatabaseServerItem, !ManualConnectionString && !IsEmbeddedDatabase);
toggleVisible(DatabaseUsernameItem, !ManualConnectionString && !IsEmbeddedDatabase);
toggleVisible(DatabasePasswordItem, !ManualConnectionString && !IsEmbeddedDatabase);
toggleVisible(DatabaseNameItem, !ManualConnectionString && !IsEmbeddedDatabase);
//toggleVisible(DatabaseConnectionString, ManualConnectionString);
}
private static void toggleVisible(HtmlGenericControl div, bool visible)
{
if (!visible)
div.Attributes["style"] = "display: none;";
else
div.Attributes["style"] = "display: block;";
}
protected void GotoSettings(object sender, EventArgs e)
{
settings.Visible = true;
installing.Visible = false;
ShowDatabaseSettings();
jsVars.Text = "showDatabaseSettings();";
}
}
}

View File

@@ -1,4 +1,4 @@
//------------------------------------------------------------------------------
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
//
@@ -7,10 +7,10 @@
// </auto-generated>
//------------------------------------------------------------------------------
namespace umbraco.presentation.install.steps {
namespace Umbraco.Web.UI.Install.Steps {
public partial class detect {
public partial class Database {
/// <summary>
/// settings control.

View File

@@ -0,0 +1,72 @@
using System;
using System.Web.Security;
using Umbraco.Core.Configuration;
using Umbraco.Web.Install;
using Umbraco.Web.Security;
using umbraco.BusinessLogic;
using umbraco.providers;
using System.Collections.Specialized;
namespace Umbraco.Web.UI.Install.Steps
{
/// <summary>
/// Summary description for defaultUser.
/// </summary>
public partial class DefaultUser : StepUserControl
{
protected void ChangePasswordClick(object sender, System.EventArgs e)
{
Page.Validate();
if (Page.IsValid)
{
var u = User.GetUser(0);
var user = Membership.Providers[UmbracoSettings.DefaultBackofficeProvider].GetUser(0, true);
user.ChangePassword(u.GetPassword(), tb_password.Text.Trim());
// Is it using the default membership provider
if (Membership.Providers[UmbracoSettings.DefaultBackofficeProvider] is UsersMembershipProvider)
{
// Save user in membership provider
var umbracoUser = user as UsersMembershipUser;
umbracoUser.FullName = tb_name.Text.Trim();
Membership.Providers[UmbracoSettings.DefaultBackofficeProvider].UpdateUser(umbracoUser);
// Save user details
u.Email = tb_email.Text.Trim();
}
else
{
u.Name = tb_name.Text.Trim();
if (!(Membership.Providers[UmbracoSettings.DefaultBackofficeProvider] is ActiveDirectoryMembershipProvider)) Membership.Providers[UmbracoSettings.DefaultBackofficeProvider].UpdateUser(user);
}
// we need to update the login name here as it's set to the old name when saving the user via the membership provider!
u.LoginName = tb_login.Text;
u.Save();
if (cb_newsletter.Checked)
{
try
{
var client = new System.Net.WebClient();
var values = new NameValueCollection {{"name", tb_name.Text}, {"email", tb_email.Text}};
client.UploadValues("http://umbraco.org/base/Ecom/SubmitEmail/installer.aspx", values);
}
catch { /* fail in silence */ }
}
if (String.IsNullOrWhiteSpace(GlobalSettings.ConfigurationStatus))
WebSecurity.PerformLogin(u);
InstallHelper.RedirectToNextStep(Page, GetCurrentStep());
}
}
}
}

View File

@@ -1,4 +1,4 @@
//------------------------------------------------------------------------------
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
//
@@ -7,10 +7,10 @@
// </auto-generated>
//------------------------------------------------------------------------------
namespace umbraco.presentation.install.steps {
namespace Umbraco.Web.UI.Install.Steps {
public partial class defaultUser {
public partial class DefaultUser {
/// <summary>
/// identify control.

View File

@@ -0,0 +1,13 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using Umbraco.Web.Install;
namespace Umbraco.Web.UI.Install.Steps
{
public partial class License : StepUserControl
{
}
}

View File

@@ -1,4 +1,4 @@
//------------------------------------------------------------------------------
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
//
@@ -7,10 +7,10 @@
// </auto-generated>
//------------------------------------------------------------------------------
namespace umbraco.presentation.install.steps {
namespace Umbraco.Web.UI.Install.Steps {
public partial class license {
public partial class License {
/// <summary>
/// btnNext control.

View File

@@ -0,0 +1,165 @@
using System;
using System.IO;
using System.Xml;
using Umbraco.Core.IO;
namespace Umbraco.Web.UI.Install.Steps
{
public partial class Renaming : StepUserControl
{
private readonly string _oldAccessFilePath = IOHelper.MapPath(SystemDirectories.Data + "/access.xml");
private readonly string _newAccessFilePath = IOHelper.MapPath(SystemDirectories.Data + "/access.config");
private bool _changesNeeded = false;
protected void Page_Load(object sender, EventArgs e)
{
// check xslt extensions
identifyResult.Text += CheckExtensionPaths("xsltExtensions.config", "XSLT Extension");
// check rest extensions
identifyResult.Text += CheckExtensionPaths("restExtensions.config", "REST Extension");
// check access.xml file
identifyResult.Text += CheckAccessFile();
if (_changesNeeded)
{
changesNeeded.Visible = true;
}
else
{
noChangedNeeded.Visible = true;
changesNeeded.Visible = false;
}
}
private string CheckAccessFile()
{
if (!NewAccessFileExist() && OldAccessFileExist())
{
_changesNeeded = true;
return "<li>Access.xml found. Needs to be renamed to access.config</li>";
}
return "<li>Public Access file is all good. No changes needed</li>";
}
private bool OldAccessFileExist()
{
return File.Exists(_oldAccessFilePath);
}
private bool NewAccessFileExist()
{
return File.Exists(_newAccessFilePath);
}
private string CheckExtensionPaths(string filename, string extensionName)
{
string tempResult = "";
foreach (XmlNode ext in GetExtensions(filename, "ext"))
{
if (ext.Attributes.GetNamedItem("assembly") != null &&
ext.Attributes.GetNamedItem("assembly").Value.StartsWith("/bin/"))
{
tempResult += String.Format("<li>{0} with Alias '{1}' has assembly reference that contains /bin/. That part needs to be removed</li>",
extensionName,
ext.Attributes.GetNamedItem("alias").Value);
}
}
if (String.IsNullOrEmpty(tempResult))
{
tempResult = String.Format("<li>{0}s are all good. No changes needed</li>", extensionName);
}
else
{
_changesNeeded = true;
}
return tempResult;
}
private static void UpdateExtensionPaths(string filename)
{
filename = IOHelper.MapPath(SystemDirectories.Config + "/" + filename);
var xsltExt = new XmlDocument();
xsltExt.Load(filename);
foreach (XmlNode ext in xsltExt.SelectNodes("//ext"))
{
if (ext.Attributes.GetNamedItem("assembly") != null &&
ext.Attributes.GetNamedItem("assembly").Value.StartsWith("/bin/"))
{
ext.Attributes.GetNamedItem("assembly").Value =
ext.Attributes.GetNamedItem("assembly").Value.Substring(5);
}
}
xsltExt.Save(filename);
}
protected void UpdateChangesClick(object sender, EventArgs e)
{
bool succes = true;
string progressText = "";
// rename access file
if (OldAccessFileExist())
{
try
{
File.Move(_oldAccessFilePath, IOHelper.MapPath(SystemFiles.AccessXml));
progressText += String.Format("<li>Public Access file renamed</li>");
}
catch (Exception ee)
{
progressText += String.Format("<li>Error renaming access file: {0}</li>", ee.ToString());
succes = false;
}
}
// update rest exts
try
{
UpdateExtensionPaths("restExtensions.config");
progressText += "<li>restExtensions.config ensured.</li>";
}
catch (Exception ee)
{
progressText += String.Format("<li>Error updating restExtensions.config: {0}</li>", ee.ToString());
succes = false;
}
// update xslt exts
try
{
UpdateExtensionPaths("xsltExtensions.config");
progressText += "<li>xsltExtensions.config ensured.</li>";
}
catch (Exception ee)
{
progressText += String.Format("<li>Error updating xsltExtensions.config: {0}</li>", ee.ToString());
succes = false;
}
string resultClass = succes ? "success" : "error";
resultText.Text = String.Format("<div class=\"{0}\"><p>{1}</p></div>",
resultClass,
progressText);
result.Visible = true;
init.Visible = false;
}
private XmlNodeList GetExtensions(string filename, string elementName)
{
// Load the XSLT extensions configuration
var xsltExt = new XmlDocument();
xsltExt.Load(IOHelper.MapPath(SystemDirectories.Config + "/" + filename));
return xsltExt.SelectNodes("//" + elementName);
}
}
}

View File

@@ -7,10 +7,10 @@
// </auto-generated>
//------------------------------------------------------------------------------
namespace umbraco.presentation.install.steps {
namespace Umbraco.Web.UI.Install.Steps {
public partial class renaming {
public partial class Renaming {
/// <summary>
/// init control.

View File

@@ -4,25 +4,94 @@ using System.Linq;
using System.Web;
using System.Web.Mvc;
using System.Web.Routing;
using Umbraco.Core.Logging;
using Umbraco.Web.Install;
namespace Umbraco.Web.UI.Install.Steps.Skinning
{
public partial class LoadStarterKits : global::umbraco.presentation.install.steps.Skinning.loadStarterKits
{
/// <summary>
/// Returns the string for the package installer web service base url
public delegate void StarterKitInstalledEventHandler();
public partial class LoadStarterKits : StepUserControl
{
/// <summary>
/// Returns the string for the package installer web service base url
/// </summary>
protected string PackageInstallServiceBaseUrl { get; private set; }
protected override void OnLoad(EventArgs e)
{
base.OnLoad(e);
//Get the URL for the package install service base url
var umbracoPath = Core.Configuration.GlobalSettings.UmbracoMvcArea;
var urlHelper = new UrlHelper(Context.Request.RequestContext);
PackageInstallServiceBaseUrl = urlHelper.Action("Index", "InstallPackage", new { area = umbracoPath });
}
/// <summary>
/// Flag to show if we can connect to the repo or not
/// </summary>
protected string PackageInstallServiceBaseUrl { get; private set; }
protected bool CannotConnect { get; private set; }
protected override void OnLoad(EventArgs e)
public event StarterKitInstalledEventHandler StarterKitInstalled;
protected virtual void OnStarterKitInstalled()
{
base.OnLoad(e);
//Get the URL for the package install service base url
var umbracoPath = global::Umbraco.Core.Configuration.GlobalSettings.UmbracoMvcArea;
var urlHelper = new UrlHelper(Context.Request.RequestContext);
PackageInstallServiceBaseUrl = urlHelper.Action("Index", "InstallPackage", new { area = umbracoPath });
StarterKitInstalled();
}
}
private readonly global::umbraco.cms.businesslogic.packager.repositories.Repository _repo;
private const string RepoGuid = "65194810-1f85-11dd-bd0b-0800200c9a66";
public LoadStarterKits()
{
_repo = global::umbraco.cms.businesslogic.packager.repositories.Repository.getByGuid(RepoGuid);
}
protected void Page_Load(object sender, EventArgs e)
{
}
protected void NextStep(object sender, EventArgs e)
{
var p = (Default)this.Page;
InstallHelper.RedirectToNextStep(Page, Request.GetItemAsString("installStep"));
}
protected override void OnInit(EventArgs e)
{
base.OnInit(e);
//clear progressbar cache
InstallHelper.ClearProgress();
if (_repo.HasConnection())
{
try
{
rep_starterKits.DataSource = _repo.Webservice.StarterKits();
rep_starterKits.DataBind();
}
catch (Exception ex)
{
LogHelper.Error<LoadStarterKits>("Cannot connect to package repository", ex);
CannotConnect = true;
}
}
else
{
CannotConnect = true;
}
}
protected void GotoLastStep(object sender, EventArgs e)
{
InstallHelper.RedirectToLastStep(Page);
}
}
}

View File

@@ -12,6 +12,15 @@ namespace Umbraco.Web.UI.Install.Steps.Skinning {
public partial class LoadStarterKits {
/// <summary>
/// pl_loadStarterKits control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.PlaceHolder pl_loadStarterKits;
/// <summary>
/// JsInclude1 control.
/// </summary>
@@ -21,6 +30,24 @@ namespace Umbraco.Web.UI.Install.Steps.Skinning {
/// </remarks>
protected global::ClientDependency.Core.Controls.JsInclude JsInclude1;
/// <summary>
/// rep_starterKits control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.Repeater rep_starterKits;
/// <summary>
/// LinkButton1 control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.LinkButton LinkButton1;
/// <summary>
/// LinkButton2 control.
/// </summary>

View File

@@ -2,11 +2,157 @@
using System.Collections.Generic;
using System.Linq;
using System.Web;
using umbraco.presentation.install.steps.Skinning;
using System.Web.UI.WebControls;
using Umbraco.Core.Configuration;
using Umbraco.Core.Logging;
using Umbraco.Web.Install;
using umbraco;
using GlobalSettings = global::Umbraco.Core.Configuration.GlobalSettings;
namespace Umbraco.Web.UI.Install.Steps.Skinning
{
public partial class LoadStarterKitDesigns : loadStarterKitDesigns
public delegate void StarterKitDesignInstalledEventHandler();
public partial class LoadStarterKitDesigns : StepUserControl
{
public event StarterKitDesignInstalledEventHandler StarterKitDesignInstalled;
protected virtual void OnStarterKitDesignInstalled()
{
if (StarterKitDesignInstalled != null)
StarterKitDesignInstalled();
}
public Guid StarterKitGuid { get; set; }
private readonly global::umbraco.cms.businesslogic.packager.repositories.Repository _repo;
private const string RepoGuid = "65194810-1f85-11dd-bd0b-0800200c9a66";
public LoadStarterKitDesigns()
{
_repo = global::umbraco.cms.businesslogic.packager.repositories.Repository.getByGuid(RepoGuid);
}
protected override void OnInit(EventArgs e)
{
base.OnInit(e);
if (_repo.HasConnection())
{
try
{
//clear progress bar cache
InstallHelper.ClearProgress();
var skinsCollection = _repo.Webservice.Skins(StarterKitGuid.ToString());
var numberOfSkins = skinsCollection.Length;
this.Page.ClientScript.RegisterClientScriptBlock(this.GetType(), "skinCounter", "var numberOfSkins = " + numberOfSkins, true);
rep_starterKitDesigns.DataSource = skinsCollection;
rep_starterKitDesigns.DataBind();
}
catch (Exception ex)
{
LogHelper.Error<LoadStarterKitDesigns>("An error occurred initializing", ex);
ShowConnectionError();
}
}
else
{
ShowConnectionError();
}
}
private void ShowConnectionError()
{
var fb = new global::umbraco.uicontrols.Feedback
{
type = global::umbraco.uicontrols.Feedback.feedbacktype.error,
Text = "<strong>No connection to repository.</strong> Starter Kits Designs could not be fetched from the repository as there was no connection to: '" + _repo.RepositoryUrl + "'"
};
pl_loadStarterKitDesigns.Controls.Clear();
pl_loadStarterKitDesigns.Controls.Add(fb);
}
protected void SelectStarterKitDesign(object sender, EventArgs e)
{
InstallHelper.ClearProgress();
var kitGuid = new Guid(((LinkButton)sender).CommandArgument);
if (!global::umbraco.cms.businesslogic.skinning.Skinning.IsSkinInstalled(kitGuid))
{
InstallHelper.SetProgress(5, "Fetching starting kit from the repository", "");
var installer = new global::umbraco.cms.businesslogic.packager.Installer();
if (_repo.HasConnection())
{
var p = new global::umbraco.cms.businesslogic.packager.Installer();
InstallHelper.SetProgress(15, "Connected to repository", "");
string tempFile = p.Import(_repo.fetch(kitGuid.ToString()));
p.LoadConfig(tempFile);
int pID = p.CreateManifest(tempFile, kitGuid.ToString(), RepoGuid);
InstallHelper.SetProgress(30, "Installing skin files", "");
p.InstallFiles(pID, tempFile);
InstallHelper.SetProgress(50, "Installing skin system objects", "");
p.InstallBusinessLogic(pID, tempFile);
InstallHelper.SetProgress(60, "Finishing skin installation", "");
p.InstallCleanUp(pID, tempFile);
library.RefreshContent();
InstallHelper.SetProgress(80, "Activating skin", "");
if (global::umbraco.cms.businesslogic.skinning.Skinning.GetAllSkins().Count > 0)
{
global::umbraco.cms.businesslogic.skinning.Skinning.ActivateAsCurrentSkin(
global::umbraco.cms.businesslogic.skinning.Skinning.GetAllSkins()[0]);
}
InstallHelper.SetProgress(100, "Skin installation has been completed", "");
try
{
if (string.IsNullOrEmpty(GlobalSettings.ConfigurationStatus))
{
GlobalSettings.ConfigurationStatus = UmbracoVersion.Current.ToString(3);
Application["umbracoNeedConfiguration"] = false;
}
}
catch
{
}
try
{
InstallHelper.RedirectToNextStep(Page, GetCurrentStep());
}
catch
{
OnStarterKitDesignInstalled();
}
}
else
{
ShowConnectionError();
}
}
}
}
}

View File

@@ -11,5 +11,32 @@ namespace Umbraco.Web.UI.Install.Steps.Skinning {
public partial class LoadStarterKitDesigns {
/// <summary>
/// pl_loadStarterKitDesigns control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.PlaceHolder pl_loadStarterKitDesigns;
/// <summary>
/// pl_CustomizeSkin control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.Panel pl_CustomizeSkin;
/// <summary>
/// rep_starterKitDesigns control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.Repeater rep_starterKitDesigns;
}
}

View File

@@ -97,7 +97,7 @@
<!-- btn box -->
<footer class="btn-box">
<div class="t">&nbsp;</div>
<asp:LinkButton ID="LinkButton1" class="btn-step btn btn-continue" runat="server" OnClick="gotoLastStep"><span>Continue</span></asp:LinkButton>
<asp:LinkButton ID="LinkButton1" class="btn-step btn btn-continue" runat="server" OnClick="GotoLastStep"><span>Continue</span></asp:LinkButton>
</footer>
</div>
@@ -112,7 +112,7 @@
<!-- btn box -->
<footer class="btn-box">
<div class="t">&nbsp;</div>
<asp:LinkButton ID="LinkButton2" class="btn-step btn btn-continue" runat="server" OnClick="gotoLastStep"><span>Continue</span></asp:LinkButton>
<asp:LinkButton ID="LinkButton2" class="btn-step btn btn-continue" runat="server" OnClick="GotoLastStep"><span>Continue</span></asp:LinkButton>
</footer>
</div>

View File

@@ -1,4 +1,4 @@
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="skinning.ascx.cs" Inherits="umbraco.presentation.install.steps.skinning" %>
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="StarterKits.ascx.cs" Inherits="Umbraco.Web.UI.Install.Steps.StarterKits" %>
<!-- Choose starter kit -->
@@ -49,7 +49,7 @@
function progressBarCallback() {
jQuery.getJSON('utills/p.aspx?feed=progress', function (data) {
jQuery.getJSON('InstallerRestService.aspx?feed=progress', function (data) {
if (data.percentage > 0) {
updateProgressBar(data.percentage);

View File

@@ -0,0 +1,44 @@
using System;
using Umbraco.Core.IO;
using Umbraco.Web.Install;
using Umbraco.Web.UI.Install.Steps.Skinning;
namespace Umbraco.Web.UI.Install.Steps
{
public partial class StarterKits : StepUserControl
{
protected void Page_Load(object sender, EventArgs e)
{
if (!global::umbraco.cms.businesslogic.skinning.Skinning.IsStarterKitInstalled())
ShowStarterKits();
else
ShowStarterKitDesigns((Guid)global::umbraco.cms.businesslogic.skinning.Skinning.StarterKitGuid());
}
private void ShowStarterKits()
{
ph_starterKits.Controls.Add(LoadControl(SystemDirectories.Install + "/steps/Skinning/loadStarterKits.ascx"));
pl_starterKit.Visible = true;
pl_starterKitDesign.Visible = false;
}
private void ShowStarterKitDesigns(Guid starterKitGuid)
{
var ctrl = (LoadStarterKitDesigns)LoadControl(SystemDirectories.Install + "/steps/Skinning/loadStarterKitDesigns.ascx");
ctrl.ID = "StarterKitDesigns";
ctrl.StarterKitGuid = starterKitGuid;
ph_starterKitDesigns.Controls.Add(ctrl);
pl_starterKit.Visible = false;
pl_starterKitDesign.Visible = true;
}
}
}

View File

@@ -7,10 +7,10 @@
// </auto-generated>
//------------------------------------------------------------------------------
namespace umbraco.presentation.install.steps {
namespace Umbraco.Web.UI.Install.Steps {
public partial class skinning {
public partial class StarterKits {
/// <summary>
/// udp control.

View File

@@ -0,0 +1,20 @@
using System;
using System.Web.UI;
using Umbraco.Web.Install;
namespace Umbraco.Web.UI.Install.Steps
{
public abstract class StepUserControl : UserControl
{
protected string GetCurrentStep()
{
var defaultPage = (Default) Page;
return defaultPage.step.Value;
}
protected void GotoNextStep(object sender, EventArgs e)
{
InstallHelper.RedirectToNextStep(Page, GetCurrentStep());
}
}
}

View File

@@ -0,0 +1,32 @@
using System;
using Umbraco.Core.Configuration;
namespace Umbraco.Web.UI.Install.Steps
{
public partial class TheEnd : StepUserControl
{
protected void Page_Load(object sender, System.EventArgs e)
{
// Update configurationStatus
try
{
GlobalSettings.ConfigurationStatus = UmbracoVersion.Current.ToString(3);
Application["umbracoNeedConfiguration"] = false;
}
catch (Exception)
{
//errorLiteral.Text = ex.ToString();
}
// Update ClientDependency version
var clientDependencyConfig = new ClientDependencyConfiguration();
var clientDependencyUpdated = clientDependencyConfig.IncreaseVersionNumber();
if (!global::umbraco.cms.businesslogic.skinning.Skinning.IsStarterKitInstalled())
customizeSite.Visible = false;
}
}
}

View File

@@ -1,4 +1,4 @@
//------------------------------------------------------------------------------
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
//
@@ -7,10 +7,10 @@
// </auto-generated>
//------------------------------------------------------------------------------
namespace umbraco.presentation.install.steps {
namespace Umbraco.Web.UI.Install.Steps {
public partial class theend {
public partial class TheEnd {
/// <summary>
/// customizeSite control.

View File

@@ -0,0 +1,181 @@
using System;
using System.IO;
using Umbraco.Core.IO;
using Umbraco.Web.Install;
using umbraco;
namespace Umbraco.Web.UI.Install.Steps
{
public partial class ValidatePermissions : StepUserControl
{
protected void Page_Load(object sender, EventArgs e)
{
var permissionsOk = true;
var packageOk = true;
var foldersOk = true;
var cacheOk = true;
var valResult = "";
// Test default dir permissions
foreach (var dir in FilePermissionHelper.PermissionDirs)
{
var result = SaveAndDeleteFile(IOHelper.MapPath(dir + "/configWizardPermissionTest.txt"));
if (!result)
{
permissionsOk = false;
permSummary.Text += "<li>Directory: ./" + dir + "</li>";
}
// Print
valResult += " " + dir + " : " + SuccessOrFailure(result) + "!<br/>";
}
// Test default file permissions
foreach (var file in FilePermissionHelper.PermissionFiles)
{
var result = OpenFileForWrite(IOHelper.MapPath(file));
if (!result)
{
permissionsOk = false;
permSummary.Text += "<li>File: " + file + "</li>";
}
// Print
valResult += " " + file + " : " + SuccessOrFailure(result) + "!<br/>";
}
permissionResults.Text = valResult;
// Test package dir permissions
string packageResult = "";
foreach (var dir in FilePermissionHelper.PackagesPermissionsDirs)
{
var result =
SaveAndDeleteFile(IOHelper.MapPath(dir + "/configWizardPermissionTest.txt"));
if (!result)
{
packageOk = false;
permSummary.Text += "<li>Directory: " + dir + "</li>";
}
// Print
packageResult += " ./" + dir + " : " + SuccessOrFailure(result) + "!<br/>";
}
packageResults.Text = packageResult;
// Test umbraco.xml file
try
{
content.Instance.PersistXmlToFile();
xmlResult.Text = "Success!";
}
catch (Exception ee)
{
cacheOk = false;
xmlResult.Text = "Failed!";
string tempFile = SystemFiles.ContentCacheXml;
if (tempFile.Substring(0, 1) == "/")
tempFile = tempFile.Substring(1, tempFile.Length - 1);
permSummary.Text += string.Format("<li>File ./{0}<br/><strong>Error message: </strong>{1}</li>", tempFile, ee);
}
// Test creation of folders
try
{
string tempDir = IOHelper.MapPath(SystemDirectories.Media + "/testCreatedByConfigWizard");
Directory.CreateDirectory(tempDir);
Directory.Delete(tempDir);
foldersResult.Text = "Success!";
}
catch
{
foldersOk = false;
foldersResult.Text = "Failure!";
}
// update config files
if (permissionsOk)
{
foreach (
var configFile in new DirectoryInfo(IOHelper.MapPath(SystemDirectories.Config)).GetFiles("*.xml"))
{
try
{
if (File.Exists(configFile.FullName.Replace(".xml", ".config")))
File.Delete(configFile.FullName.Replace(".xml", ".config"));
configFile.MoveTo(configFile.FullName.Replace(".xml", ".config"));
}
catch { }
}
}
// Generate summary
howtoResolve.Visible = true;
if (permissionsOk && cacheOk && packageOk && foldersOk)
{
perfect.Visible = true;
howtoResolve.Visible = false;
}
else if (permissionsOk && cacheOk && foldersOk)
noPackages.Visible = true;
else if (permissionsOk && cacheOk)
{
folderWoes.Visible = true;
grant.Visible = false;
noFolders.Visible = true;
}
else
{
error.Visible = true;
if (!foldersOk)
folderWoes.Visible = true;
}
}
private static string SuccessOrFailure(bool result)
{
return result ? "Success" : "Failure";
}
private static bool SaveAndDeleteFile(string file)
{
try
{
//first check if the directory of the file exists, and if not try to create that first.
var fi = new FileInfo(file);
if (!fi.Directory.Exists)
{
fi.Directory.Create();
}
File.WriteAllText(file,
"This file has been created by the umbraco configuration wizard. It is safe to delete it!");
File.Delete(file);
return true;
}
catch
{
return false;
}
}
private bool OpenFileForWrite(string file)
{
try
{
File.AppendText(file).Close();
}
catch
{
return false;
}
return true;
}
}
}

View File

@@ -1,4 +1,4 @@
//------------------------------------------------------------------------------
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
//
@@ -7,10 +7,10 @@
// </auto-generated>
//------------------------------------------------------------------------------
namespace umbraco.presentation.install.steps {
namespace Umbraco.Web.UI.Install.Steps {
public partial class validatePermissions {
public partial class ValidatePermissions {
/// <summary>
/// perfect control.

View File

@@ -0,0 +1,35 @@
using System;
using Umbraco.Core;
using umbraco;
namespace Umbraco.Web.UI.Install.Steps
{
public partial class Welcome : StepUserControl
{
protected void Page_Load(object sender, System.EventArgs e)
{
var result = ApplicationContext.Current.DatabaseContext.ValidateDatabaseSchema();
var determinedVersion = result.DetermineInstalledVersion();
// Display the Umbraco upgrade message if Umbraco is already installed
if (String.IsNullOrWhiteSpace(GlobalSettings.ConfigurationStatus) == false || determinedVersion.Equals(new Version(0, 0, 0)) == false)
{
ph_install.Visible = false;
ph_upgrade.Visible = true;
}
// Check for config!
if (GlobalSettings.Configured)
{
Application.Lock();
Application["umbracoNeedConfiguration"] = null;
Application.UnLock();
Response.Redirect(Request.QueryString["url"] ?? "/", true);
}
}
}
}

View File

@@ -1,4 +1,4 @@
//------------------------------------------------------------------------------
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
//
@@ -7,10 +7,10 @@
// </auto-generated>
//------------------------------------------------------------------------------
namespace umbraco.presentation.install {
namespace Umbraco.Web.UI.Install.Steps {
public partial class welcome {
public partial class Welcome {
/// <summary>
/// ph_install control.

View File

@@ -1,4 +1,4 @@
<%@ Control Language="c#" AutoEventWireup="True" CodeBehind="database.ascx.cs" Inherits="umbraco.presentation.install.steps.detect"
<%@ Control Language="c#" AutoEventWireup="True" CodeBehind="database.ascx.cs" Inherits="Umbraco.Web.UI.Install.Steps.Database"
TargetSchema="http://schemas.microsoft.com/intellisense/ie5" %>
<%@ Import Namespace="Umbraco.Core.Configuration" %>
<asp:PlaceHolder ID="settings" runat="server" Visible="true">
@@ -197,7 +197,7 @@
<footer class="btn-box installbtn">
<div class="t">&nbsp;</div>
<asp:LinkButton runat="server" class="single-tab submit btn-install" OnClick="saveDBConfig"><span>install</span> </asp:LinkButton>
<asp:LinkButton runat="server" class="single-tab submit btn-install" OnClick="SaveDbConfig"><span>install</span> </asp:LinkButton>
</footer>
</div>
@@ -317,8 +317,8 @@
<!-- btn box -->
<footer class="btn-box" style="display: none;">
<div class="t">&nbsp;</div>
<asp:LinkButton class="btn-step btn btn-continue" runat="server" OnClick="gotoNextStep"><span>Continue</span></asp:LinkButton>
<asp:LinkButton class="btn-step btn btn-back" Style="display: none;" runat="server" OnClick="gotoSettings"><span>Back</span></asp:LinkButton>
<asp:LinkButton class="btn-step btn btn-continue" runat="server" OnClick="GotoNextStep"><span>Continue</span></asp:LinkButton>
<asp:LinkButton class="btn-step btn btn-back" Style="display: none;" runat="server" OnClick="GotoSettings"><span>Back</span></asp:LinkButton>
</footer>
</div>
@@ -332,7 +332,7 @@
contentType: 'application/json; charset=utf-8',
data: '{}',
dataType: 'json',
url: 'utills/p.aspx/installOrUpgrade',
url: 'InstallerRestService.aspx/InstallOrUpgrade',
success: function(data) {
var json = JSON.parse(data.d);

View File

@@ -1,4 +1,4 @@
<%@ Control Language="c#" AutoEventWireup="True" Codebehind="defaultUser.ascx.cs" Inherits="umbraco.presentation.install.steps.defaultUser" TargetSchema="http://schemas.microsoft.com/intellisense/ie5"%>
<%@ Control Language="c#" AutoEventWireup="True" Codebehind="DefaultUser.ascx.cs" Inherits="Umbraco.Web.UI.Install.Steps.DefaultUser" TargetSchema="http://schemas.microsoft.com/intellisense/ie5"%>
<asp:Placeholder ID="identify" Runat="server" Visible="True">
<!-- create box -->
@@ -64,7 +64,7 @@
</div>
<footer class="btn-box">
<div class="t">&nbsp;</div>
<asp:LinkButton CssClass="btn-create" runat="server" onclick="changePassword_Click"><span>Create user</span></asp:linkbutton>
<asp:LinkButton CssClass="btn-create" runat="server" onclick="ChangePasswordClick"><span>Create user</span></asp:linkbutton>
</footer>
</fieldset>
</form>

View File

@@ -1,4 +1,4 @@
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="license.ascx.cs" Inherits="umbraco.presentation.install.steps.license" %>
<%@ Control Language="C#" AutoEventWireup="True" CodeBehind="license.ascx.cs" Inherits="Umbraco.Web.UI.Install.Steps.License" %>
<!-- licence box -->
<div class="tab main-tabinfo">
<div class="container">
@@ -19,6 +19,6 @@
<!-- btn box -->
<footer class="btn-box">
<div class="t">&nbsp;</div>
<asp:LinkButton ID="btnNext" CssClass="btn btn-accept" runat="server" OnClick="gotoNextStep"><span>Accept and Continue</span></asp:LinkButton>
<asp:LinkButton ID="btnNext" CssClass="btn btn-accept" runat="server" OnClick="GotoNextStep"><span>Accept and Continue</span></asp:LinkButton>
</footer>
</div>

View File

@@ -1,4 +1,4 @@
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="renaming.ascx.cs" Inherits="umbraco.presentation.install.steps.renaming" %>
<%@ Control Language="C#" AutoEventWireup="True" CodeBehind="Renaming.ascx.cs" Inherits="Umbraco.Web.UI.Install.Steps.Renaming" %>
<h1>Step 3/5: Updating old conventions</h1>
<asp:Panel ID="init" Runat="server" Visible="True">
<p>
@@ -16,7 +16,7 @@
</p>
<asp:Literal id="identifyResult" Runat="server"></asp:Literal>
<asp:Button ID="updateChanges" runat="server" Text="Update Changes"
onclick="updateChanges_Click" />
onclick="UpdateChangesClick" />
</asp:Panel>
</asp:Panel>

View File

@@ -1,14 +1,14 @@
<%@ Control Language="c#" AutoEventWireup="True" CodeBehind="theend.ascx.cs" Inherits="umbraco.presentation.install.steps.theend"
<%@ Control Language="c#" AutoEventWireup="True" CodeBehind="TheEnd.ascx.cs" Inherits="Umbraco.Web.UI.Install.Steps.TheEnd"
TargetSchema="http://schemas.microsoft.com/intellisense/ie5" %>
<script type="text/javascript">
jQuery(document).ready(function () {
$.post("utills/p.aspx?feed=sitebuildervids",
$.post("InstallerRestService.aspx?feed=sitebuildervids",
function (data) {
jQuery("#ajax-sitebuildervids").html(data);
});
$.post("utills/p.aspx?feed=developervids",
$.post("InstallerRestService.aspx?feed=developervids",
function (data) {
jQuery("#ajax-developervids").html(data);
});

View File

@@ -1,4 +1,4 @@
<%@ Control Language="c#" AutoEventWireup="True" Codebehind="validatePermissions.ascx.cs" Inherits="umbraco.presentation.install.steps.validatePermissions" TargetSchema="http://schemas.microsoft.com/intellisense/ie5"%>
<%@ Control Language="c#" AutoEventWireup="True" Codebehind="ValidatePermissions.ascx.cs" Inherits="Umbraco.Web.UI.Install.Steps.ValidatePermissions" TargetSchema="http://schemas.microsoft.com/intellisense/ie5"%>
<h1>Step 3/5: Validating File Permissions</h1>
<p>
umbraco needs write/modify access to certain directories in order to store files like pictures and PDF's.
@@ -97,5 +97,5 @@ In order to run umbraco, you'll need to update your permission settings.
<footer class="btn-box">
<div class="t">&nbsp;</div>
<asp:LinkButton ID="btnNext" CssClass="btn btn-accept" runat="server" OnClick="gotoNextStep"><span>Continue anyway</span></asp:LinkButton>
<asp:LinkButton ID="btnNext" CssClass="btn btn-accept" runat="server" OnClick="GotoNextStep"><span>Continue anyway</span></asp:LinkButton>
</footer>

View File

@@ -1,4 +1,4 @@
<%@ Control Language="c#" AutoEventWireup="True" CodeBehind="welcome.ascx.cs" Inherits="umbraco.presentation.install.welcome"
<%@ Control Language="c#" AutoEventWireup="True" CodeBehind="Welcome.ascx.cs" Inherits="Umbraco.Web.UI.Install.Steps.Welcome"
TargetSchema="http://schemas.microsoft.com/intellisense/ie5" %>
<%@ Import Namespace="Umbraco.Core.Configuration" %>
<!-- welcome box -->
@@ -44,7 +44,7 @@
<!-- btn box -->
<footer class="btn-box">
<div class="t">&nbsp;</div>
<asp:LinkButton ID="btnNext" CssClass="btn btn-get" runat="server" OnClick="gotoNextStep"><span>Let's get started!</span></asp:LinkButton>
<asp:LinkButton ID="btnNext" CssClass="btn btn-get" runat="server" OnClick="GotoNextStep"><span>Let's get started!</span></asp:LinkButton>
</footer>
</div>

View File

@@ -1 +0,0 @@
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="p.aspx.cs" Inherits="umbraco.presentation.install.utills.p" %>

View File

@@ -2,10 +2,67 @@
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using Umbraco.Core.IO;
using Umbraco.Web.UI.Install.Steps.Skinning;
using Umbraco.Web.UI.Pages;
namespace Umbraco.Web.UI.Umbraco.Developer.Packages
{
public partial class StarterKits : global::umbraco.presentation.umbraco.developer.Packages.StarterKits
public partial class StarterKits : UmbracoEnsuredPage
{
protected void Page_Load(object sender, EventArgs e)
{
if (!global::umbraco.cms.businesslogic.skinning.Skinning.IsStarterKitInstalled())
ShowStarterKits();
else
ShowSkins((Guid)global::umbraco.cms.businesslogic.skinning.Skinning.StarterKitGuid());
}
private void ShowStarterKits()
{
var starterkitsctrl = (LoadStarterKits)LoadControl(SystemDirectories.Install + "/steps/Skinning/loadStarterKits.ascx");
starterkitsctrl.StarterKitInstalled += StarterkitsctrlStarterKitInstalled;
ph_starterkits.Controls.Add(starterkitsctrl);
StarterKitNotInstalled.Visible = true;
StarterKitInstalled.Visible = false;
}
public void ShowSkins(Guid starterKitGuid)
{
var ctrl = (LoadStarterKitDesigns)LoadControl(SystemDirectories.Install + "/steps/Skinning/loadStarterKitDesigns.ascx");
ctrl.ID = "StarterKitDesigns";
ctrl.StarterKitGuid = starterKitGuid;
ctrl.StarterKitDesignInstalled += CtrlStarterKitDesignInstalled;
ph_skins.Controls.Add(ctrl);
StarterKitNotInstalled.Visible = false;
StarterKitInstalled.Visible = true;
}
void StarterkitsctrlStarterKitInstalled()
{
StarterKitNotInstalled.Visible = false;
StarterKitInstalled.Visible = false;
installationCompleted.Visible = true;
}
void CtrlStarterKitDesignInstalled()
{
StarterKitNotInstalled.Visible = false;
StarterKitInstalled.Visible = false;
installationCompleted.Visible = true;
}
}
}

View File

@@ -10,6 +10,78 @@
namespace Umbraco.Web.UI.Umbraco.Developer.Packages {
public partial class StarterKits {
public partial class StarterKits
{
/// <summary>
/// JsInclude1 control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::ClientDependency.Core.Controls.JsInclude JsInclude1;
/// <summary>
/// Panel1 control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::umbraco.uicontrols.UmbracoPanel Panel1;
/// <summary>
/// fb control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::umbraco.uicontrols.Feedback fb;
/// <summary>
/// StarterKitInstalled control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::umbraco.uicontrols.Pane StarterKitInstalled;
/// <summary>
/// ph_skins control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.PlaceHolder ph_skins;
/// <summary>
/// StarterKitNotInstalled control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::umbraco.uicontrols.Pane StarterKitNotInstalled;
/// <summary>
/// ph_starterkits control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.PlaceHolder ph_starterkits;
/// <summary>
/// installationCompleted control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::umbraco.uicontrols.Pane installationCompleted;
}
}

View File

@@ -0,0 +1,145 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.IO;
using Umbraco.Core.IO;
using umbraco;
namespace Umbraco.Web.Install
{
internal class FilePermissionHelper
{
internal static readonly string[] PermissionDirs = { SystemDirectories.Css, SystemDirectories.Config, SystemDirectories.Data, SystemDirectories.Media, SystemDirectories.Masterpages, SystemDirectories.Xslt, SystemDirectories.UserControls, SystemDirectories.Preview };
internal static readonly string[] PermissionFiles = { };
internal static readonly string[] PackagesPermissionsDirs = { SystemDirectories.Bin, SystemDirectories.Umbraco, SystemDirectories.UserControls, SystemDirectories.Packages };
public static bool RunFilePermissionTestSuite()
{
var newReport = new Dictionary<string, string>();
if (!TestDirectories(PermissionDirs, ref newReport))
return false;
if (!TestDirectories(PackagesPermissionsDirs, ref newReport))
return false;
if (!TestFiles(PermissionFiles, ref newReport))
return false;
if (!TestContentXml(ref newReport))
return false;
if (!TestFolderCreation(SystemDirectories.Media, ref newReport))
return false;
return true;
}
public static bool TestDirectories(string[] directories, ref Dictionary<string, string> errorReport)
{
bool succes = true;
foreach (string dir in PermissionDirs)
{
bool result = SaveAndDeleteFile(IOHelper.MapPath(dir + "/configWizardPermissionTest.txt"));
if (!result)
{
succes = false;
if (errorReport != null)
errorReport.Add(dir, "Missing permissions, cannot create new files");
}
}
return succes;
}
public static bool TestFiles(string[] files, ref Dictionary<string,string> errorReport)
{
bool succes = true;
foreach (string file in PermissionFiles)
{
bool result = OpenFileForWrite(IOHelper.MapPath(file));
if (!result)
{
if (errorReport != null)
errorReport.Add(file, "Missing write permissions");
succes = false;
}
}
return succes;
}
public static bool TestFolderCreation(string folder, ref Dictionary<string,string> errorReport)
{
try
{
string tempDir = IOHelper.MapPath(folder + "/testCreatedByConfigWizard");
Directory.CreateDirectory(tempDir);
Directory.Delete(tempDir);
return true;
}
catch
{
if (errorReport != null)
errorReport.Add(folder, "Could not create sub-directory");
return false;
}
}
public static bool TestContentXml(ref Dictionary<string, string> errorReport)
{
// Test umbraco.xml file
try
{
content.Instance.PersistXmlToFile();
return true;
}
catch
{
if(errorReport != null)
errorReport.Add(SystemFiles.ContentCacheXml, "Could not persist content cache");
return false;
}
}
private static bool SaveAndDeleteFile(string file)
{
try
{
//first check if the directory of the file exists, and if not try to create that first.
FileInfo fi = new FileInfo(file);
if (!fi.Directory.Exists)
{
fi.Directory.Create();
}
File.WriteAllText(file,
"This file has been created by the umbraco configuration wizard. It is safe to delete it!");
File.Delete(file);
return true;
}
catch
{
return false;
}
}
private static bool OpenFileForWrite(string file)
{
try
{
File.AppendText(file).Close();
}
catch
{
return false;
}
return true;
}
}
}

View File

@@ -0,0 +1,73 @@
using System.Web.Script.Serialization;
using System.Web.UI;
namespace Umbraco.Web.Install
{
internal static class InstallHelper
{
private static readonly InstallerStepCollection Steps = new InstallerStepCollection
{
new Steps.Welcome(),
new Steps.License(),
new Steps.FilePermissions(),
new Steps.Database(),
new Steps.DefaultUser(),
new Steps.Skinning(),
new Steps.WebPi(),
new Steps.TheEnd()
};
internal static InstallerStepCollection InstallerSteps
{
get { return Steps; }
}
public static void RedirectToNextStep(Page page, string currentStep)
{
var s = InstallerSteps.GotoNextStep(currentStep);
page.Response.Redirect("?installStep=" + s.Alias);
}
public static void RedirectToLastStep(Page page)
{
var s = InstallerSteps.Get("theend");
page.Response.Redirect("?installStep=" + s.Alias);
}
private static int _percentage = -1;
public static int Percentage
{
get { return _percentage; }
set { _percentage = value; }
}
public static string Description { get; set; }
public static string Error { get; set; }
public static void ClearProgress()
{
Percentage = -1;
Description = string.Empty;
Error = string.Empty;
}
public static void SetProgress(int percent, string description, string error)
{
if (percent > 0)
Percentage = percent;
Description = description;
Error = error;
}
public static string GetProgress()
{
var pr = new ProgressResult(Percentage, Description, Error);
var js = new JavaScriptSerializer();
return js.Serialize(pr);
}
}
}

View File

@@ -3,13 +3,14 @@ using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Web.Mvc;
using System.Web.Script.Serialization;
using Umbraco.Core;
using umbraco;
using umbraco.presentation.install.utills;
namespace Umbraco.Web.Install
{
/// <summary>
/// <summary>
/// An MVC controller for the installation process regarding packages
/// </summary>
/// <remarks>

View File

@@ -0,0 +1,49 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Collections.Specialized;
namespace Umbraco.Web.Install
{
internal class InstallerStepCollection : Dictionary<string, InstallerStep>
{
public void Add(InstallerStep step){
step.Index = this.Count;
this.Add(step.Alias, step);
}
public InstallerStep Get(string key)
{
return this.First(item => item.Key == key).Value;
}
public bool StepExists(string key)
{
return this.ContainsKey(key);
}
public InstallerStep GotoNextStep(string key)
{
var s = this[key];
foreach(var i in this.Values){
// System.Web.HttpContext.Current.Response.Write(i.Index.ToString() + i.Alias);
if (i.Index > s.Index && !i.Completed()) {
// System.Web.HttpContext.Current.Response.Write( "FOUND" + i.Index.ToString() + i.Alias);
return i;
}
}
return null;
}
public InstallerStep FirstAvailableStep()
{
return this.First(item => item.Value.Completed() == false ).Value;
}
}
}

View File

@@ -0,0 +1,25 @@
namespace Umbraco.Web.Install
{
internal abstract class InstallerStep
{
public abstract string Alias { get; }
public abstract string Name { get; }
public abstract string UserControl { get; }
public virtual int Index { get; set; }
public virtual bool MoveToNextStepAutomaticly { get; set; }
public virtual bool HideFromNavigation
{
get
{
return false;
}
}
public abstract bool Completed();
}
}

View File

@@ -0,0 +1,21 @@
namespace Umbraco.Web.Install
{
internal class ProgressResult
{
public string Error { get; set; }
public int Percentage { get; set; }
public string Description { get; set; }
public ProgressResult()
{
}
public ProgressResult(int percentage, string description, string error)
{
Percentage = percentage;
Description = description;
Error = error;
}
}
}

View File

@@ -0,0 +1,53 @@
using System;
using Umbraco.Core;
using Umbraco.Core.Configuration;
using Umbraco.Core.IO;
using Umbraco.Web.Install;
namespace Umbraco.Web.Install.Steps
{
internal class Database : InstallerStep
{
public override string Alias
{
get { return "database"; }
}
public override string Name
{
get { return "Database"; }
}
public override string UserControl
{
get { return SystemDirectories.Install + "/steps/database.ascx"; }
}
public override bool MoveToNextStepAutomaticly
{
get { return true; }
}
//here we determine if the installer should skip this step...
public override bool Completed()
{
// Fresh installs don't have a version number so this step cannot be complete yet
if (string.IsNullOrEmpty(Umbraco.Core.Configuration.GlobalSettings.ConfigurationStatus))
{
//Even though the ConfigurationStatus is blank we try to determine the version if we can connect to the database
var result = ApplicationContext.Current.DatabaseContext.ValidateDatabaseSchema();
var determinedVersion = result.DetermineInstalledVersion();
if (determinedVersion.Equals(new Version(0, 0, 0)))
return false;
return UmbracoVersion.Current < determinedVersion;
}
var configuredVersion = new Version(Umbraco.Core.Configuration.GlobalSettings.ConfigurationStatus);
var targetVersion = UmbracoVersion.Current;
return targetVersion < configuredVersion;
}
}
}

View File

@@ -0,0 +1,40 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using Umbraco.Core.IO;
using umbraco.cms.businesslogic.installer;
namespace Umbraco.Web.Install.Steps
{
internal class DefaultUser : InstallerStep
{
public override string Alias
{
get { return "defaultUser"; }
}
public override string Name
{
get { return "Create User"; }
}
public override string UserControl
{
get { return SystemDirectories.Install + "/steps/defaultuser.ascx"; }
}
public override bool Completed()
{
var u = global::umbraco.BusinessLogic.User.GetUser(0);
if (u.NoConsole || u.Disabled)
return true;
if (u.GetPassword() != "default")
return true;
return false;
}
}
}

View File

@@ -0,0 +1,37 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using Umbraco.Core.IO;
namespace Umbraco.Web.Install.Steps
{
internal class FilePermissions : InstallerStep
{
public override string Alias
{
get { return "filepermissions"; }
}
public override string Name
{
get { return "Confirm permissions"; }
}
public override string UserControl
{
get { return SystemDirectories.Install + "/steps/validatepermissions.ascx"; }
}
public override bool HideFromNavigation {
get {
return true;
}
}
public override bool Completed()
{
return FilePermissionHelper.RunFilePermissionTestSuite();
}
}
}

View File

@@ -0,0 +1,36 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using Umbraco.Core.IO;
using umbraco.cms.businesslogic.installer;
namespace Umbraco.Web.Install.Steps
{
internal class License : InstallerStep
{
public override string Alias
{
get { return "license"; }
}
public override string Name
{
get { return "License"; }
}
public override string UserControl
{
get { return SystemDirectories.Install + "/steps/license.ascx"; }
}
public override bool Completed()
{
return false;
}
}
}

View File

@@ -0,0 +1,46 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using Umbraco.Core.Configuration;
using Umbraco.Core.IO;
using umbraco.cms.businesslogic.installer;
using umbraco.cms.businesslogic.packager;
using umbraco.cms.businesslogic.web;
namespace Umbraco.Web.Install.Steps
{
internal class Skinning : InstallerStep
{
public override string Alias
{
get { return "skinning"; }
}
public override string Name
{
get { return "Starter Kit"; }
}
public override string UserControl
{
get { return SystemDirectories.Install + "/steps/skinning.ascx"; }
}
public override bool Completed()
{
if (String.IsNullOrWhiteSpace(GlobalSettings.ConfigurationStatus) == false)
return true;
if (InstalledPackage.GetAllInstalledPackages().Count > 0)
return true;
if (Document.GetRootDocuments().Count() > 0)
return true;
return false;
}
}
}

View File

@@ -0,0 +1,27 @@
using Umbraco.Core.IO;
namespace Umbraco.Web.Install.Steps
{
internal class TheEnd : InstallerStep
{
public override string Alias
{
get { return "theend"; }
}
public override string Name
{
get { return "Youre Done"; }
}
public override string UserControl
{
get { return SystemDirectories.Install + "/steps/theend.ascx"; }
}
public override bool Completed()
{
return false;
}
}
}

View File

@@ -0,0 +1,35 @@
using Umbraco.Core.IO;
using umbraco.BusinessLogic;
namespace Umbraco.Web.Install.Steps
{
internal class WebPi : InstallerStep
{
public override string Alias
{
get { return "webpi"; }
}
public override string Name
{
get { return "Hi " + new User(0).Name + " you are running umbraco"; }
}
public override bool HideFromNavigation {
get {
return true;
}
}
public override string UserControl
{
get { return SystemDirectories.Install + "/steps/skinning.ascx"; }
}
public override bool Completed()
{
//this is always completed, we just want to be able to hook into directly after finishing web pi
return true;
}
}
}

View File

@@ -0,0 +1,29 @@
using Umbraco.Core.IO;
namespace Umbraco.Web.Install.Steps
{
internal class Welcome : InstallerStep
{
public override string Alias
{
get { return "welcome"; }
}
public override string Name
{
get { return "Welcome"; }
}
public override string UserControl
{
get { return SystemDirectories.Install + "/steps/welcome.ascx"; }
}
public override bool Completed()
{
return false;
}
}
}

View File

@@ -0,0 +1,263 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Web;
using System.Web.Security;
using Umbraco.Core;
using Umbraco.Core.Logging;
using Umbraco.Web.UI.Pages;
using umbraco;
using umbraco.BusinessLogic;
using umbraco.DataLayer;
namespace Umbraco.Web.Security
{
/// <summary>
/// A utility class used for dealing with security in Umbraco
/// </summary>
public static class WebSecurity
{
/// <summary>
/// Gets the SQL helper.
/// </summary>
/// <value>The SQL helper.</value>
private static ISqlHelper SqlHelper
{
get { return Application.SqlHelper; }
}
private const long TicksPrMinute = 600000000;
private static readonly int UmbracoTimeOutInMinutes = Core.Configuration.GlobalSettings.TimeOutInMinutes;
/// <summary>
/// Gets the current user.
/// </summary>
/// <value>The current user.</value>
public static User CurrentUser
{
get
{
return User.GetCurrent();
}
}
/// <summary>
/// Logs a user in.
/// </summary>
/// <param name="u">The user</param>
public static void PerformLogin(User u)
{
var retVal = Guid.NewGuid();
SqlHelper.ExecuteNonQuery(
"insert into umbracoUserLogins (contextID, userID, timeout) values (@contextId,'" + u.Id + "','" +
(DateTime.Now.Ticks + (TicksPrMinute * UmbracoTimeOutInMinutes)).ToString() +
"') ",
SqlHelper.CreateParameter("@contextId", retVal));
UmbracoUserContextId = retVal.ToString();
LogHelper.Info(typeof(WebSecurity), "User {0} (Id: {1}) logged in", () => u.Name, () => u.Id);
}
/// <summary>
/// Clears the current login for the currently logged in user
/// </summary>
public static void ClearCurrentLogin()
{
// Added try-catch in case login doesn't exist in the database
// Either due to old cookie or running multiple sessions on localhost with different port number
try
{
SqlHelper.ExecuteNonQuery(
"DELETE FROM umbracoUserLogins WHERE contextId = @contextId",
SqlHelper.CreateParameter("@contextId", UmbracoUserContextId));
}
catch (Exception ex)
{
LogHelper.Error(typeof(WebSecurity), string.Format("Login with contextId {0} didn't exist in the database", UmbracoUserContextId), ex);
}
}
public static void RenewLoginTimeout()
{
// only call update if more than 1/10 of the timeout has passed
SqlHelper.ExecuteNonQuery(
"UPDATE umbracoUserLogins SET timeout = @timeout WHERE contextId = @contextId",
SqlHelper.CreateParameter("@timeout", DateTime.Now.Ticks + (TicksPrMinute * UmbracoTimeOutInMinutes)),
SqlHelper.CreateParameter("@contextId", UmbracoUserContextId));
}
internal static void UpdateLogin(long timeout)
{
// only call update if more than 1/10 of the timeout has passed
if (timeout - (((TicksPrMinute * UmbracoTimeOutInMinutes) * 0.8)) < DateTime.Now.Ticks)
SqlHelper.ExecuteNonQuery(
"UPDATE umbracoUserLogins SET timeout = @timeout WHERE contextId = @contextId",
SqlHelper.CreateParameter("@timeout", DateTime.Now.Ticks + (TicksPrMinute * UmbracoTimeOutInMinutes)),
SqlHelper.CreateParameter("@contextId", UmbracoUserContextId));
}
internal static long GetTimeout(string umbracoUserContextId)
{
//TODO: Clean this up! We should be using the CacheHelper (ApplicationContext.Current.ApplicationCache)
// for all things cache related
if (HttpRuntime.Cache["UmbracoUserContextTimeout" + umbracoUserContextId] == null)
{
HttpRuntime.Cache.Insert(
"UmbracoUserContextTimeout" + umbracoUserContextId,
GetTimeout(true),
null,
DateTime.Now.AddMinutes(UmbracoTimeOutInMinutes / 10), System.Web.Caching.Cache.NoSlidingExpiration);
}
var timeout = HttpRuntime.Cache["UmbracoUserContextTimeout" + umbracoUserContextId];
if (timeout != null)
return (long)timeout;
return 0;
}
internal static long GetTimeout(bool byPassCache)
{
if (UmbracoSettings.KeepUserLoggedIn)
RenewLoginTimeout();
if (byPassCache)
{
return SqlHelper.ExecuteScalar<long>("select timeout from umbracoUserLogins where contextId=@contextId",
SqlHelper.CreateParameter("@contextId", new Guid(UmbracoUserContextId))
);
}
return GetTimeout(UmbracoUserContextId);
}
/// <summary>
/// Gets the user id.
/// </summary>
/// <param name="umbracoUserContextId">The umbraco user context ID.</param>
/// <returns></returns>
public static int GetUserId(string umbracoUserContextId)
{
try
{
//TODO: Clean this up! We should be using the CacheHelper (ApplicationContext.Current.ApplicationCache)
// for all things cache related
if (HttpRuntime.Cache["UmbracoUserContext" + umbracoUserContextId] == null)
{
HttpRuntime.Cache.Insert(
"UmbracoUserContext" + umbracoUserContextId,
SqlHelper.ExecuteScalar<int>("select userID from umbracoUserLogins where contextID = @contextId",
SqlHelper.CreateParameter("@contextId", new Guid(umbracoUserContextId))
),
null,
System.Web.Caching.Cache.NoAbsoluteExpiration,
new TimeSpan(0, (int)(UmbracoTimeOutInMinutes / 10), 0));
}
return (int)HttpRuntime.Cache["UmbracoUserContext" + umbracoUserContextId];
}
catch
{
return -1;
}
}
/// <summary>
/// Validates the user context ID.
/// </summary>
/// <param name="currentUmbracoUserContextId">The umbraco user context ID.</param>
/// <returns></returns>
public static bool ValidateUserContextId(string currentUmbracoUserContextId)
{
if ((currentUmbracoUserContextId != ""))
{
int uid = GetUserId(currentUmbracoUserContextId);
long timeout = GetTimeout(currentUmbracoUserContextId);
if (timeout > DateTime.Now.Ticks)
{
return true;
}
var user = global::umbraco.BusinessLogic.User.GetUser(uid);
LogHelper.Info(typeof(WebSecurity), "User {0} (Id:{1}) logged out", () => user.Name, () => user.Id);
}
return false;
}
//TODO: Clean this up!! We also have extension methods in StringExtensions for decrypting/encrypting in med trust
// ... though an existing cookie may fail decryption, in that case they'd just get logged out. no problems.
/// <summary>
/// Gets or sets the umbraco user context ID.
/// </summary>
/// <value>The umbraco user context ID.</value>
public static string UmbracoUserContextId
{
get
{
// zb-00004 #29956 : refactor cookies names & handling
if (StateHelper.Cookies.HasCookies && StateHelper.Cookies.UserContext.HasValue)
return StateHelper.Cookies.UserContext.GetValue();
try
{
var encTicket = StateHelper.Cookies.UserContext.GetValue();
if (!string.IsNullOrEmpty(encTicket))
return FormsAuthentication.Decrypt(encTicket).UserData;
}
catch (HttpException ex)
{
// we swallow this type of exception as it happens if a legacy (pre 4.8.1) cookie is set
}
catch (ArgumentException ex)
{
// we swallow this one because it's 99.99% certaincy is legacy based. We'll still log it, though
LogHelper.Error(typeof(WebSecurity), "An error occurred reading auth cookie value", ex);
}
return "";
}
set
{
// zb-00004 #29956 : refactor cookies names & handling
if (StateHelper.Cookies.HasCookies)
{
// Clearing all old cookies before setting a new one.
if (StateHelper.Cookies.UserContext.HasValue)
StateHelper.Cookies.ClearAll();
if (!String.IsNullOrEmpty(value))
{
var ticket = new FormsAuthenticationTicket(1,
value,
DateTime.Now,
DateTime.Now.AddDays(1),
false,
value,
FormsAuthentication.FormsCookiePath);
// Encrypt the ticket.
var encTicket = FormsAuthentication.Encrypt(ticket);
// Create new cookie.
StateHelper.Cookies.UserContext.SetValue(value, 1);
}
else
{
StateHelper.Cookies.UserContext.Clear();
}
}
}
}
}
}

View File

@@ -0,0 +1,134 @@
using System;
using System.Data;
using System.Web;
using System.Linq;
using System.Web.Mvc;
using System.Web.Routing;
using System.Web.Security;
using Umbraco.Core.Configuration;
using Umbraco.Core.IO;
using Umbraco.Core.Logging;
using Umbraco.Web.Security;
using umbraco.BusinessLogic;
using umbraco.DataLayer;
using System.Web.UI;
namespace Umbraco.Web.UI.Pages
{
/// <summary>
/// umbraco.BasePages.BasePage is the default page type for the umbraco backend.
/// The basepage keeps track of the current user and the page context. But does not
/// Restrict access to the page itself.
/// The keep the page secure, the umbracoEnsuredPage class should be used instead
/// </summary>
public class BasePage : Page
{
private User _user;
private bool _userisValidated = false;
private ClientTools _clientTools;
/// <summary>
/// The current user ID
/// </summary>
private int _uid = 0;
/// <summary>
/// The page timeout in seconds.
/// </summary>
private long _timeout = 0;
/// <summary>
/// Gets the SQL helper.
/// </summary>
/// <value>The SQL helper.</value>
protected static ISqlHelper SqlHelper
{
get { return global::umbraco.BusinessLogic.Application.SqlHelper; }
}
private UrlHelper _url;
/// <summary>
/// Returns a UrlHelper
/// </summary>
/// <remarks>
/// This URL helper is created without any route data and an empty request context
/// </remarks>
public UrlHelper Url
{
get { return _url ?? (_url = new UrlHelper(new RequestContext(new HttpContextWrapper(Context), new RouteData()))); }
}
/// <summary>
/// Returns a refernce of an instance of ClientTools for access to the pages client API
/// </summary>
public ClientTools ClientTools
{
get { return _clientTools ?? (_clientTools = new ClientTools(this)); }
}
private void ValidateUser()
{
if ((WebSecurity.UmbracoUserContextId != ""))
{
_uid = WebSecurity.GetUserId(WebSecurity.UmbracoUserContextId);
_timeout = WebSecurity.GetTimeout(WebSecurity.UmbracoUserContextId);
if (_timeout > DateTime.Now.Ticks)
{
_user = global::umbraco.BusinessLogic.User.GetUser(_uid);
// Check for console access
if (_user.Disabled || (_user.NoConsole && GlobalSettings.RequestIsInUmbracoApplication(HttpContext.Current) && !GlobalSettings.RequestIsLiveEditRedirector(HttpContext.Current)))
{
throw new ArgumentException("You have no priviledges to the umbraco console. Please contact your administrator");
}
_userisValidated = true;
WebSecurity.UpdateLogin(_timeout);
}
else
{
throw new ArgumentException("User has timed out!!");
}
}
else
{
throw new InvalidOperationException("The user has no umbraco contextid - try logging in");
}
}
/// <summary>
/// Gets the user.
/// </summary>
/// <returns></returns>
public User GetUser()
{
if (!_userisValidated) ValidateUser();
return _user;
}
/// <summary>
/// Ensures the page context.
/// </summary>
public void EnsureContext()
{
ValidateUser();
}
/// <summary>
/// Raises the <see cref="E:System.Web.UI.Control.Load"></see> event.
/// </summary>
/// <param name="e">The <see cref="T:System.EventArgs"></see> object that contains the event data.</param>
protected override void OnLoad(EventArgs e)
{
base.OnLoad(e);
if (!Request.IsSecureConnection && GlobalSettings.UseSSL)
{
string serverName = HttpUtility.UrlEncode(Request.ServerVariables["SERVER_NAME"]);
Response.Redirect(string.Format("https://{0}{1}", serverName, Request.FilePath));
}
}
}
}

View File

@@ -0,0 +1,329 @@
using System;
using System.Collections.Generic;
using System.Text;
using System.Web;
using Umbraco.Core.IO;
using umbraco.BasePages;
using System.Web.UI;
using umbraco.BusinessLogic;
namespace Umbraco.Web.UI.Pages
{
/// <summary>
/// Renders the client side code necessary to interact with the Umbraco client side API.
/// Each method returns an instance of this class so you can chain calls together.
/// </summary>
public sealed class ClientTools
{
public ClientTools(Page page)
{
_page = page;
}
/// <summary>
/// Returns the string markup for the JavaScript that is rendered.
/// If referencing JavaScript scripts in the backend, this class should be used
/// in case future changes to the client code is change, this will remain intact.
/// </summary>
public static class Scripts
{
internal const string ClientMgrScript = "UmbClientMgr";
public static string GetAppActions { get { return string.Format("{0}.appActions()", ClientMgrScript); } }
public static string GetMainWindow { get { return string.Format("{0}.mainWindow()", ClientMgrScript); } }
public static string GetMainTree { get { return string.Format("{0}.mainTree()", ClientMgrScript); } }
public static string GetContentFrame() { return string.Format("{0}.contentFrame()", ClientMgrScript); }
public static string ShiftApp(string appAlias)
{
return string.Format(ClientMgrScript + ".historyManager().addHistory('{0}')", appAlias);
}
public static string OpenDashboard(string app)
{
return string.Format(GetAppActions + ".openDashboard('{0}');", app);
}
public static string RefreshAdmin { get { return "setTimeout('" + GetMainWindow + ".location.reload()', {0});"; } }
public static string ShowSpeechBubble { get { return GetMainWindow + ".UmbSpeechBubble.ShowMessage('{0}','{1}', '{2}');"; } }
public static string ChangeContentFrameUrl(string url) {
return string.Format(ClientMgrScript + ".contentFrame('{0}');", url);
}
public static string ChildNodeCreated = GetMainTree + ".childNodeCreated();";
public static string SyncTree { get { return GetMainTree + ".syncTree('{0}', {1});"; } }
public static string ClearTreeCache { get { return GetMainTree + ".clearTreeCache();"; } }
public static string CopyNode { get { return GetMainTree + ".copyNode('{0}', '{1}');"; } }
public static string MoveNode { get { return GetMainTree + ".moveNode('{0}', '{1}');"; } }
public static string ReloadActionNode { get { return GetMainTree + ".reloadActionNode({0}, {1}, null);"; } }
public static string SetActiveTreeType { get { return GetMainTree + ".setActiveTreeType('{0}');"; } }
public static string RefreshTree { get { return GetMainTree + ".refreshTree();"; } }
public static string RefreshTreeType { get { return GetMainTree + ".refreshTree('{0}');"; } }
public static string CloseModalWindow()
{
return string.Format("{0}.closeModalWindow();", ClientMgrScript);
}
public static string CloseModalWindow(string rVal)
{
return string.Format("{0}.closeModalWindow('{1}');", ClientMgrScript, rVal);
}
public static string OpenModalWindow(string url, string name, int width, int height)
{
return OpenModalWindow(url, name, true, width, height, 0, 0, "", "");
}
public static string OpenModalWindow(string url, string name, bool showHeader, int width, int height, int top, int leftOffset, string closeTriggers, string onCloseCallback)
{
return string.Format("{0}.openModalWindow('{1}', '{2}', {3}, {4}, {5}, {6}, {7}, '{8}', '{9}');",
new object[] { ClientMgrScript, url, name, showHeader.ToString().ToLower(), width, height, top, leftOffset, closeTriggers, onCloseCallback });
}
}
private readonly Page _page;
/// <summary>
/// This removes all tree JSON data cached in the client browser.
/// Useful when you want to ensure that the tree is reloaded from live data.
/// </summary>
/// <returns></returns>
public ClientTools ClearClientTreeCache()
{
RegisterClientScript(Scripts.ClearTreeCache);
return this;
}
/// <summary>
/// Change applications
/// </summary>
/// <returns></returns>
public ClientTools ShiftApp(string appAlias)
{
RegisterClientScript(Scripts.ShiftApp(appAlias));
return this;
}
/// <summary>
/// Refresh the entire administration console after a specified amount of time.
/// </summary>
/// <param name="seconds"></param>
/// <returns></returns>
public ClientTools RefreshAdmin(int seconds)
{
RegisterClientScript(string.Format(Scripts.RefreshAdmin, seconds * 1000));
return this;
}
/// <summary>
/// Refreshes the entire current tree
/// </summary>
/// <returns></returns>
public ClientTools RefreshTree()
{
RegisterClientScript(Scripts.RefreshTree);
return this;
}
public ClientTools RefreshTree(string treeType)
{
RegisterClientScript(string.Format(Scripts.RefreshTreeType, treeType));
return this;
}
/// <summary>
/// A reference to the umbraco UI component "speechbubble". The speechbubble appears in the lower right corner of the screen, notifying users of events
/// </summary>
/// <param name="i">The speechbubble icon.</param>
/// <param name="header">The speechbubble header.</param>
/// <param name="body">The body text</param>
public ClientTools ShowSpeechBubble(SpeechBubbleIcon i, string header, string body)
{
RegisterClientScript(string.Format(Scripts.ShowSpeechBubble, i.ToString(), header.Replace("'", "\\'"), body.Replace("'", "\\'")));
return this;
}
/// <summary>
/// Changes the content in the content frame to the specified URL
/// </summary>
/// <param name="url"></param>
public ClientTools ChangeContentFrameUrl(string url)
{
//don't load if there is no url
if (string.IsNullOrEmpty(url)) return this;
if (url.StartsWith("/") && !url.StartsWith(IOHelper.ResolveUrl(SystemDirectories.Umbraco)))
url = IOHelper.ResolveUrl(SystemDirectories.Umbraco) + "/" + url;
if (url.Trim().StartsWith("~"))
url = IOHelper.ResolveUrl(url);
RegisterClientScript(Scripts.ChangeContentFrameUrl(url));
return this;
}
/// <summary>
/// Shows the dashboard for the given application
/// </summary>
/// <param name="app"></param>
/// <returns></returns>
public ClientTools ShowDashboard(string app)
{
return ChangeContentFrameUrl(SystemDirectories.Umbraco + string.Format("/dashboard.aspx?app={0}", app));
}
/// <summary>
/// Reloads the children of the current action node and selects the node that didn't exist there before.
/// If the client side system cannot determine which node is new, then no node is selected.
/// </summary>
/// <remarks>
/// This is used by many create dialogs, however the sync method should be used based on the full path of the
/// node but because the current Umbraco implementation of ITask only returns a url to load, there's no way
/// to determine what the full path of the new child is.
/// </remarks>
/// <returns></returns>
public ClientTools ChildNodeCreated()
{
RegisterClientScript(Scripts.ChildNodeCreated);
return this;
}
/// <summary>
/// Synchronizes the tree to the path specified.
/// </summary>
/// <param name="path"></param>
/// <param name="forceReload">
/// If set to true, will ensure that the node to be synced has it's data
/// reloaded from the server. Otherwise, if the node already exists, the tree will simply sync to the node
/// that is already there.
/// </param>
/// <remarks>
/// This will work for any tree, however you would need to know the path of the node. Currently, media and content
/// are the only trees that store a path, however, if you were working in the template tree for example, a path to a
/// node could be "init,1090" and this method would still work.
///
/// Sync tree will works by syncing the active tree type. This can be specified explicitly by calling SetActiveTreeType.
/// This will allow developers to sync many trees in one application at one time if needed.
/// </remarks>
/// <example>
/// <![CDATA[
/// //if you had both the media and content trees in the same app, you could sync both at the same
/// //time by doing:
/// BasePage.Current.ClientTools
/// .SetActiveTreeType("content")
/// .SyncTree("-1,100,200")
/// .SetActiveTreeType("media")
/// .SyncTree("-1,323,355");
/// ]]>
/// </example>
public ClientTools SyncTree(string path, bool forceReload)
{
RegisterClientScript(string.Format(Scripts.SyncTree, path, forceReload.ToString().ToLower()));
return this;
}
public ClientTools CopyNode(string currNodeId, string newParentPath)
{
RegisterClientScript(string.Format(Scripts.CopyNode, currNodeId, newParentPath));
return this;
}
public ClientTools MoveNode(string currNodeId, string newParentPath)
{
RegisterClientScript(string.Format(Scripts.MoveNode, currNodeId, newParentPath));
return this;
}
/// <summary>
/// Reloads only the last node that the user interacted with via the context menu. To reload a specify node, use SyncTree.
/// </summary>
/// <param name="reselect"></param>
/// <param name="reloadChildren"></param>
/// <remarks>
/// If for whatever reason the client side system cannot just refresh the one node, the system will use jsTree's built in
/// refresh tool, this however won't allow for reselect or reloadChildren. Most trees will work with the single node
/// refresh but 3rd party tools may have poorly built tree data models.
/// </remarks>
public ClientTools ReloadActionNode(bool reselect, bool reloadChildren)
{
RegisterClientScript(string.Format(Scripts.ReloadActionNode, (!reselect).ToString().ToLower(), (!reloadChildren).ToString().ToLower()));
return this;
}
/// <summary>
/// When the application searches for a node, it searches for nodes in specific tree types.
/// If SyncTree is used, it will sync the tree nodes with the active tree type, therefore if
/// a developer wants to sync a specific tree, they can call this method to set the type to sync.
/// </summary>
/// <remarks>
/// Each branch of a particular tree should theoretically be the same type, however, developers can
/// override the type of each branch in their BaseTree's but this is not standard practice. If there
/// are multiple types of branches in one tree, then only those branches that have the Active tree type
/// will be searched for syncing.
/// </remarks>
/// <param name="treeType"></param>
/// <returns></returns>
public ClientTools SetActiveTreeType(string treeType)
{
RegisterClientScript(string.Format(Scripts.SetActiveTreeType, treeType));
return this;
}
/// <summary>
/// Closes the Umbraco dialog window if it is open
/// </summary>
/// <param name="returnVal">specify a value to return to add to the onCloseCallback method if one was specified in the OpenModalWindow method</param>
/// <returns></returns>
public ClientTools CloseModalWindow(string returnVal)
{
RegisterClientScript(Scripts.CloseModalWindow(returnVal));
return this;
}
/// <summary>
/// Closes the umbraco dialog window if it is open
/// </summary>
/// <returns></returns>
public ClientTools CloseModalWindow()
{
return CloseModalWindow("");
}
/// <summary>
/// Opens a modal window
/// </summary>
/// <param name="url"></param>
/// <param name="name"></param>
/// <param name="height"></param>
/// <param name="showHeader"></param>
/// <param name="width"></param>
/// <param name="top"></param>
/// <param name="leftOffset"></param>
/// <param name="closeTriggers"></param>
/// <param name="onCloseCallback"></param>
/// <returns></returns>
public ClientTools OpenModalWindow(string url, string name, bool showHeader, int width, int height, int top, int leftOffset, string closeTriggers, string onCloseCallback)
{
RegisterClientScript(Scripts.OpenModalWindow(url, name, showHeader, width, height, top, leftOffset, closeTriggers, onCloseCallback));
return this;
}
/// <summary>
/// This will use the ScriptManager to register the script if one is available, otherwise will default to the ClientScript
/// class of the page.
/// </summary>
/// <param name="script"></param>
private void RegisterClientScript(string script)
{
//use the hash code of the script to generate the key, this way, the exact same script won't be
//inserted more than once.
if (ScriptManager.GetCurrent(_page) != null)
{
ScriptManager.RegisterStartupScript(_page, _page.GetType(), script.GetHashCode().ToString(), script, true);
}
else
{
_page.ClientScript.RegisterStartupScript(_page.GetType(), script.GetHashCode().ToString(), script, true);
}
}
}
}

View File

@@ -0,0 +1,88 @@
using System;
using System.Linq;
using Umbraco.Core.IO;
using Umbraco.Core.Logging;
using umbraco;
using umbraco.BusinessLogic;
using umbraco.businesslogic.Exceptions;
namespace Umbraco.Web.UI.Pages
{
/// <summary>
/// UmbracoEnsuredPage is the standard protected page in the umbraco backend, and forces authentication.
/// </summary>
public class UmbracoEnsuredPage : BasePage
{
public string CurrentApp { get; set; }
/// <summary>
/// If true then umbraco will force any window/frame to reload umbraco in the main window
/// </summary>
public bool RedirectToUmbraco { get; set; }
/// <summary>
/// Validates the user for access to a certain application
/// </summary>
/// <param name="app">The application alias.</param>
/// <returns></returns>
public bool ValidateUserApp(string app)
{
return GetUser().Applications.Any(uApp => uApp.alias == app);
}
/// <summary>
/// Validates the user node tree permissions.
/// </summary>
/// <param name="path">The path.</param>
/// <param name="action">The action.</param>
/// <returns></returns>
public bool ValidateUserNodeTreePermissions(string path, string action)
{
string permissions = GetUser().GetPermissions(path);
if (permissions.IndexOf(action) > -1 && (path.Contains("-20") || ("," + path + ",").Contains("," + GetUser().StartNodeId.ToString() + ",")))
return true;
var user = GetUser();
LogHelper.Info<UmbracoEnsuredPage>("User {0} has insufficient permissions in UmbracoEnsuredPage: '{1}', '{2}', '{3}'", () => user.Name, () => path, () => permissions, () => action);
return false;
}
/// <summary>
/// Raises the <see cref="E:System.Web.UI.Control.Init"></see> event to initialize the page.
/// </summary>
/// <param name="e">An <see cref="T:System.EventArgs"></see> that contains the event data.</param>
protected override void OnInit(EventArgs e)
{
base.OnInit(e);
try
{
EnsureContext();
if (!String.IsNullOrEmpty(CurrentApp))
{
if (!ValidateUserApp(CurrentApp))
throw new UserAuthorizationException(String.Format("The current user doesn't have access to the section/app '{0}'", CurrentApp));
}
}
catch (UserAuthorizationException ex)
{
LogHelper.Error<UmbracoEnsuredPage>(String.Format("Tried to access '{0}'", CurrentApp), ex);
throw;
}
catch
{
// Clear content as .NET transfers rendered content.
Response.Clear();
// Some umbraco pages should not be loaded on timeout, but instead reload the main application in the top window. Like the treeview for instance
if (RedirectToUmbraco)
Response.Redirect(SystemDirectories.Umbraco + "/logout.aspx?", true);
else
Response.Redirect(SystemDirectories.Umbraco + "/logout.aspx?redir=" + Server.UrlEncode(Request.RawUrl), true);
}
System.Threading.Thread.CurrentThread.CurrentCulture = new System.Globalization.CultureInfo(ui.Culture(this.GetUser()));
System.Threading.Thread.CurrentThread.CurrentUICulture = System.Threading.Thread.CurrentThread.CurrentCulture;
}
}
}

View File

@@ -0,0 +1,31 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace Umbraco.Web.UI
{
public enum SpeechBubbleIcon
{
/// <summary>
/// Save icon
/// </summary>
Save,
/// <summary>
/// Info icon
/// </summary>
Info,
/// <summary>
/// Error icon
/// </summary>
Error,
/// <summary>
/// Success icon
/// </summary>
Success,
/// <summary>
/// Warning icon
/// </summary>
Warning
}
}

View File

@@ -128,7 +128,7 @@
<Private>True</Private>
<HintPath>..\packages\CodeSharp.Package.AspNetWebPage.1.0\lib\net40\NuGet.Core.dll</HintPath>
</Reference>
<Reference Include="Our.Umbraco.uGoLive">
<Reference Include="Our.Umbraco.uGoLive">
<HintPath>..\packages\uGoLive.1.4.0\lib\Our.Umbraco.uGoLive.dll</HintPath>
</Reference>
<Reference Include="Our.Umbraco.uGoLive.47x">
@@ -190,6 +190,7 @@
<Private>True</Private>
<HintPath>..\packages\Microsoft.AspNet.WebPages.2.0.20710.0\lib\net40\System.Web.WebPages.Razor.dll</HintPath>
</Reference>
<Reference Include="System.Windows.Forms" />
<Reference Include="System.Xml">
<Name>System.XML</Name>
</Reference>
@@ -252,7 +253,20 @@
<Compile Include="Dynamics\ExtensionMethods.cs" />
<Compile Include="Dynamics\Grouping.cs" />
<Compile Include="HttpRequestExtensions.cs" />
<Compile Include="Install\FilePermissionHelper.cs" />
<Compile Include="Install\InstallerStep.cs" />
<Compile Include="Install\InstallHelper.cs" />
<Compile Include="Install\InstallPackageController.cs" />
<Compile Include="Install\InstallStepCollection.cs" />
<Compile Include="Install\ProgressResult.cs" />
<Compile Include="Install\Steps\Database.cs" />
<Compile Include="Install\Steps\DefaultUser.cs" />
<Compile Include="Install\Steps\FilePermissions.cs" />
<Compile Include="Install\Steps\License.cs" />
<Compile Include="Install\Steps\Skinning.cs" />
<Compile Include="Install\Steps\TheEnd.cs" />
<Compile Include="Install\Steps\WebPi.cs" />
<Compile Include="Install\Steps\Welcome.cs" />
<Compile Include="Install\UmbracoInstallAuthorizeAttribute.cs" />
<Compile Include="Macros\PartialViewMacroController.cs" />
<Compile Include="Macros\PartialViewMacroEngine.cs" />
@@ -330,6 +344,7 @@
<Compile Include="Routing\NotFoundHandlerHelper.cs" />
<Compile Include="Routing\PublishedContentRequestEngine.cs" />
<Compile Include="Search\ExamineEvents.cs" />
<Compile Include="Security\WebSecurity.cs" />
<Compile Include="Strategies\DataTypes\LegacyUploadFieldWorkaround.cs" />
<Compile Include="Strategies\Migrations\PublishAfterUpgradeToVersionSixth.cs" />
<Compile Include="Strategies\Publishing\UpdateCacheAfterPublish.cs" />
@@ -341,11 +356,46 @@
<Compile Include="Trees\PartialViewsTree.cs" />
<Compile Include="UI\Controls\InsertMacroSplitButton.cs" />
<Compile Include="UI\Controls\UmbracoControl.cs" />
<Compile Include="UI\Pages\BasePage.cs">
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="UI\Pages\ClientTools.cs" />
<Compile Include="UI\Pages\UmbracoEnsuredPage.cs">
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="UI\SpeechBubbleIcon.cs" />
<Compile Include="umbraco.presentation\AttributeCollectionAdapter.cs" />
<Compile Include="umbraco.presentation\Default.aspx.cs">
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="umbraco.presentation\DLRMacroResult.cs" />
<Compile Include="umbraco.presentation\install\steps\welcome.ascx.cs">
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="umbraco.presentation\install\steps\validatePermissions.ascx.cs">
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="umbraco.presentation\install\steps\theend.ascx.cs">
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="umbraco.presentation\install\steps\skinning.ascx.cs">
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="umbraco.presentation\install\steps\renaming.ascx.cs">
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="umbraco.presentation\install\steps\license.ascx.cs">
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="umbraco.presentation\install\steps\defaultUser.ascx.cs">
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="umbraco.presentation\install\steps\database.ascx.cs">
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="umbraco.presentation\install\Title.ascx.cs">
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="umbraco.presentation\install\Default.aspx.cs">
<SubType>ASPXCodeBehind</SubType>
</Compile>
@@ -355,6 +405,9 @@
<Compile Include="umbraco.presentation\install\steps\Skinning\loadStarterKits.ascx.cs">
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="umbraco.presentation\install\utills\p.aspx.cs">
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="umbraco.presentation\LibraryCacheRefresher.cs" />
<Compile Include="umbraco.presentation\MacroCacheContent.cs" />
<Compile Include="umbraco.presentation\macroCacheRefresh.cs" />
@@ -450,13 +503,6 @@
<Compile Include="Routing\RoutesCacheResolver.cs" />
<Compile Include="Routing\RoutingContext.cs" />
<Compile Include="umbraco.presentation\EnsureSystemPathsApplicationStartupHandler.cs" />
<Compile Include="umbraco.presentation\install\steps\database.ascx.cs">
<DependentUpon>database.ascx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="umbraco.presentation\install\steps\database.ascx.designer.cs">
<DependentUpon>database.ascx</DependentUpon>
</Compile>
<Compile Include="umbraco.presentation\install\steps\Definitions\Database.cs" />
<Compile Include="umbraco.presentation\install\steps\Definitions\DefaultUser.cs" />
<Compile Include="umbraco.presentation\install\steps\Definitions\FilePermissions.cs" />
@@ -468,22 +514,8 @@
<Compile Include="umbraco.presentation\install\steps\Definitions\TheEnd.cs" />
<Compile Include="umbraco.presentation\install\steps\Definitions\WebPi.cs" />
<Compile Include="umbraco.presentation\install\steps\Definitions\Welcome.cs" />
<Compile Include="umbraco.presentation\install\steps\skinning.ascx.cs">
<DependentUpon>skinning.ascx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="umbraco.presentation\install\steps\skinning.ascx.designer.cs">
<DependentUpon>skinning.ascx</DependentUpon>
</Compile>
<Compile Include="umbraco.presentation\install\utills\FilePermissions.cs" />
<Compile Include="umbraco.presentation\install\utills\Helper.cs" />
<Compile Include="umbraco.presentation\install\utills\p.aspx.cs">
<DependentUpon>p.aspx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="umbraco.presentation\install\utills\p.aspx.designer.cs">
<DependentUpon>p.aspx</DependentUpon>
</Compile>
<Compile Include="Properties\AssemblyInfo.cs">
<SubType>Code</SubType>
</Compile>
@@ -494,55 +526,6 @@
<Compile Include="umbraco.presentation\helper.cs">
<SubType>Code</SubType>
</Compile>
<Compile Include="umbraco.presentation\install\steps\defaultUser.ascx.cs">
<DependentUpon>defaultUser.ascx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="umbraco.presentation\install\steps\defaultUser.ascx.designer.cs">
<DependentUpon>defaultUser.ascx</DependentUpon>
</Compile>
<Compile Include="umbraco.presentation\install\steps\license.ascx.cs">
<DependentUpon>license.ascx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="umbraco.presentation\install\steps\license.ascx.designer.cs">
<DependentUpon>license.ascx</DependentUpon>
</Compile>
<Compile Include="umbraco.presentation\install\steps\renaming.ascx.cs">
<DependentUpon>renaming.ascx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="umbraco.presentation\install\steps\renaming.ascx.designer.cs">
<DependentUpon>renaming.ascx</DependentUpon>
</Compile>
<Compile Include="umbraco.presentation\install\steps\theend.ascx.cs">
<DependentUpon>theend.ascx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="umbraco.presentation\install\steps\theend.ascx.designer.cs">
<DependentUpon>theend.ascx</DependentUpon>
</Compile>
<Compile Include="umbraco.presentation\install\steps\validatePermissions.ascx.cs">
<DependentUpon>validatePermissions.ascx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="umbraco.presentation\install\steps\validatePermissions.ascx.designer.cs">
<DependentUpon>validatePermissions.ascx</DependentUpon>
</Compile>
<Compile Include="umbraco.presentation\install\steps\welcome.ascx.cs">
<DependentUpon>welcome.ascx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="umbraco.presentation\install\steps\welcome.ascx.designer.cs">
<DependentUpon>welcome.ascx</DependentUpon>
</Compile>
<Compile Include="umbraco.presentation\install\Title.ascx.cs">
<DependentUpon>Title.ascx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="umbraco.presentation\install\Title.ascx.designer.cs">
<DependentUpon>Title.ascx</DependentUpon>
</Compile>
<Compile Include="umbraco.presentation\item.cs">
<SubType>Code</SubType>
</Compile>
@@ -1859,17 +1842,6 @@
<Content Include="umbraco.presentation\umbraco\developer\RelationTypes\NewRelationType.aspx" />
<Content Include="umbraco.presentation\umbraco\developer\RelationTypes\RelationTypesWebService.asmx" />
<Content Include="umbraco.presentation\umbraco\dashboard\DesktopMediaUploader.ascx" />
<Content Include="umbraco.presentation\install\steps\database.ascx">
<SubType>ASPXCodeBehind</SubType>
</Content>
<Content Include="umbraco.presentation\install\steps\renaming.ascx" />
<Content Include="umbraco.presentation\install\steps\skinning.ascx" />
<Content Include="umbraco.presentation\install\Title.ascx">
<SubType>ASPXCodeBehind</SubType>
</Content>
<Content Include="umbraco.presentation\install\utills\p.aspx">
<SubType>ASPXCodeBehind</SubType>
</Content>
<Content Include="umbraco.presentation\umbraco\dashboard\ChangePassword.ascx" />
<Content Include="umbraco.presentation\umbraco\dashboard\DeveloperDashboardIntro.ascx" />
<Content Include="umbraco.presentation\umbraco\dashboard\DeveloperDashboardVideos.ascx" />
@@ -1912,9 +1884,6 @@
<SubType>ASPXCodeBehind</SubType>
</Content>
<Content Include="umbraco.presentation\umbraco\controls\Tree\TreeControl.ascx" />
<Content Include="umbraco.presentation\install\steps\license.ascx">
<SubType>ASPXCodeBehind</SubType>
</Content>
<Content Include="umbraco.presentation\umbraco\actions\delete.aspx" />
<Content Include="umbraco.presentation\umbraco\actions\editContent.aspx" />
<Content Include="umbraco.presentation\umbraco\actions\preview.aspx" />
@@ -1970,18 +1939,6 @@
<Content Include="umbraco.presentation\umbraco\dialogs\sendToTranslation.aspx" />
<Content Include="umbraco.presentation\umbraco\dialogs\uploadImage.aspx" />
<Content Include="umbraco.presentation\umbraco\dialogs\viewAuditTrail.aspx" />
<Content Include="umbraco.presentation\install\steps\defaultUser.ascx">
<SubType>UserControl</SubType>
</Content>
<Content Include="umbraco.presentation\install\steps\theend.ascx">
<SubType>UserControl</SubType>
</Content>
<Content Include="umbraco.presentation\install\steps\validatePermissions.ascx">
<SubType>UserControl</SubType>
</Content>
<Content Include="umbraco.presentation\install\steps\welcome.ascx">
<SubType>ASPXCodeBehind</SubType>
</Content>
<Content Include="umbraco.presentation\umbraco\cacheBrowser.aspx" />
<Content Include="umbraco.presentation\umbraco\developer\Python\editPython.aspx">
<SubType>ASPXCodeBehind</SubType>
@@ -2142,26 +2099,6 @@
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>Strings.Designer.cs</LastGenOutput>
</EmbeddedResource>
<EmbeddedResource Include="umbraco.presentation\install\steps\database.ascx.resx">
<DependentUpon>database.ascx.cs</DependentUpon>
<SubType>Designer</SubType>
</EmbeddedResource>
<EmbeddedResource Include="umbraco.presentation\install\steps\defaultUser.ascx.resx">
<DependentUpon>defaultUser.ascx.cs</DependentUpon>
<SubType>Designer</SubType>
</EmbeddedResource>
<EmbeddedResource Include="umbraco.presentation\install\steps\theend.ascx.resx">
<DependentUpon>theend.ascx.cs</DependentUpon>
<SubType>Designer</SubType>
</EmbeddedResource>
<EmbeddedResource Include="umbraco.presentation\install\steps\validatePermissions.ascx.resx">
<DependentUpon>validatePermissions.ascx.cs</DependentUpon>
<SubType>Designer</SubType>
</EmbeddedResource>
<EmbeddedResource Include="umbraco.presentation\install\steps\welcome.ascx.resx">
<DependentUpon>welcome.ascx.cs</DependentUpon>
<SubType>Designer</SubType>
</EmbeddedResource>
<EmbeddedResource Include="umbraco.presentation\umbraco\js\language.aspx.resx">
<DependentUpon>language.aspx.cs</DependentUpon>
<SubType>Designer</SubType>

View File

@@ -1,3 +0,0 @@
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="Title.ascx.cs" Inherits="umbraco.presentation.install.Title" %>
<%@ Import Namespace="Umbraco.Core.Configuration" %>
<title>Umbraco <%=UmbracoVersion.Current.ToString(3)%> Configuration Wizard</title>

View File

@@ -7,6 +7,7 @@ using System.Web.UI.WebControls;
namespace umbraco.presentation.install
{
[Obsolete("This file is no longer used and will be removed in future version. The UserControl Umbraco.Web.UI.Install.Title has superceded this.")]
public partial class Title : System.Web.UI.UserControl
{
protected void Page_Load(object sender, EventArgs e)

View File

@@ -18,7 +18,8 @@ namespace umbraco.presentation.install
/// <summary>
/// Summary description for _default.
/// </summary>
public partial class _default : BasePages.BasePage
[Obsolete("This file is no longer used and will be removed in future versions. The Umbraco.Web.UI.Install.Default page has superceded this.")]
public class _default : BasePages.BasePage
{
private string _installStep = "";
@@ -68,13 +69,13 @@ namespace umbraco.presentation.install
public void GotoNextStep(string currentStep)
{
InstallerStep _s = InstallerSteps().GotoNextStep(currentStep);
var _s = InstallerSteps().GotoNextStep(currentStep);
Response.Redirect("?installStep=" + _s.Alias);
}
public void GotoLastStep()
{
InstallerStep _s = InstallerSteps().Get("theend");
var _s = InstallerSteps().Get("theend");
Response.Redirect("?installStep=" + _s.Alias);
}

View File

@@ -4,9 +4,9 @@ using Umbraco.Core.Configuration;
using Umbraco.Core.IO;
using umbraco.cms.businesslogic.installer;
namespace umbraco.presentation.install.steps.Definitions
{
[Obsolete("This is no longer used and will be removed from the codebase in the future. These legacy installer step classes have been superceded by classes in the Umbraco.Web.Install.Steps namespace but are marked internal as they are not to be used in external code.")]
public class Database : InstallerStep
{
public override string Alias

View File

@@ -6,6 +6,8 @@ using umbraco.cms.businesslogic.installer;
namespace umbraco.presentation.install.steps.Definitions
{
[Obsolete("This is no longer used and will be removed from the codebase in the future. These legacy installer step classes have been superceded by classes in the Umbraco.Web.Install.Steps namespace but are marked internal as they are not to be used in external code.")]
public class DefaultUser : InstallerStep
{
public override string Alias

View File

@@ -7,6 +7,8 @@ using umbraco.cms.businesslogic.installer;
namespace umbraco.presentation.install.steps.Definitions
{
[Obsolete("This is no longer used and will be removed from the codebase in the future. These legacy installer step classes have been superceded by classes in the Umbraco.Web.Install.Steps namespace but are marked internal as they are not to be used in external code.")]
public class FilePermissions : InstallerStep
{
public override string Alias

View File

@@ -5,6 +5,8 @@ using System.Web;
namespace umbraco.presentation.install.steps.Definitions
{
[Obsolete("This is no longer used and will be removed from the codebase in the future. ")]
public class InstallerControl : System.Web.UI.UserControl
{
public void NextStep()

View File

@@ -4,26 +4,34 @@ using System.Linq;
using System.Web;
using umbraco.cms.businesslogic.installer;
namespace umbraco.presentation.install.steps.Definitions {
public class License : InstallerStep {
public override string Alias {
get { return "license"; }
namespace umbraco.presentation.install.steps.Definitions
{
[Obsolete("This is no longer used and will be removed from the codebase in the future. These legacy installer step classes have been superceded by classes in the Umbraco.Web.Install.Steps namespace but are marked internal as they are not to be used in external code.")]
public class License : InstallerStep
{
public override string Alias
{
get { return "license"; }
}
public override string Name
{
get { return "License"; }
}
public override string UserControl
{
get { return IO.SystemDirectories.Install + "/steps/license.ascx"; }
}
public override bool Completed()
{
return false;
}
}
public override string Name {
get { return "License"; }
}
public override string UserControl {
get { return IO.SystemDirectories.Install + "/steps/license.ascx"; }
}
public override bool Completed() {
return false;
}
}
}

View File

@@ -8,6 +8,7 @@ using umbraco.cms.businesslogic.web;
namespace umbraco.presentation.install.steps.Definitions
{
[Obsolete("This is no longer used and will be removed from the codebase in the future. These legacy installer step classes have been superceded by classes in the Umbraco.Web.Install.Steps namespace but are marked internal as they are not to be used in external code.")]
public class Skinning : InstallerStep
{
public override string Alias

View File

@@ -6,6 +6,7 @@ using umbraco.cms.businesslogic.installer;
namespace umbraco.presentation.install.steps.Definitions
{
[Obsolete("This is no longer used and will be removed from the codebase in the future. These legacy installer step classes have been superceded by classes in the Umbraco.Web.Install.Steps namespace but are marked internal as they are not to be used in external code.")]
public class TheEnd : InstallerStep
{
public override string Alias

View File

@@ -7,6 +7,7 @@ using umbraco.BusinessLogic;
namespace umbraco.presentation.install.steps.Definitions
{
[Obsolete("This is no longer used and will be removed from the codebase in the future. These legacy installer step classes have been superceded by classes in the Umbraco.Web.Install.Steps namespace but are marked internal as they are not to be used in external code.")]
public class WebPi : InstallerStep
{
public override string Alias

View File

@@ -1,7 +1,9 @@
using umbraco.cms.businesslogic.installer;
using System;
using umbraco.cms.businesslogic.installer;
namespace umbraco.presentation.install.steps.Definitions
{
[Obsolete("This is no longer used and will be removed from the codebase in the future. These legacy installer step classes have been superceded by classes in the Umbraco.Web.Install.Steps namespace but are marked internal as they are not to be used in external code.")]
public class Welcome : InstallerStep
{
public override string Alias

View File

@@ -10,9 +10,11 @@ using umbraco.BusinessLogic;
namespace umbraco.presentation.install.steps.Skinning
{
[Obsolete("This delegate is no longer used and will be removed from the codebase in future versions. This has been superceded by Umbraco.Web.UI.Install.Steps.Skinning.StarterKitDesignInstalledEventHandler")]
public delegate void StarterKitDesignInstalledEventHandler();
public partial class loadStarterKitDesigns : System.Web.UI.UserControl
[Obsolete("This class is no longer used and will be removed from the codebase in the future. The UserControl Umbraco.Web.UI.Install.Steps.Skinning.LoadStarterKitDesigns has superceded this.")]
public class loadStarterKitDesigns : System.Web.UI.UserControl
{
public event StarterKitDesignInstalledEventHandler StarterKitDesignInstalled;

View File

@@ -11,9 +11,11 @@ using System.IO;
namespace umbraco.presentation.install.steps.Skinning
{
[Obsolete("This delegate is no longer used and will be removed from the codebase in future versions. This has been superceded by Umbraco.Web.UI.Install.Steps.Skinning.StarterKitInstalledEventHandler")]
public delegate void StarterKitInstalledEventHandler();
public partial class loadStarterKits : System.Web.UI.UserControl
[Obsolete("This class is no longer used and will be removed from the codebase in the future. The UserControl Umbraco.Web.UI.Install.Steps.Skinning.LoadStarterKits has superceded this.")]
public class loadStarterKits : System.Web.UI.UserControl
{
/// <summary>

View File

@@ -1,357 +0,0 @@
<%@ Control Language="c#" AutoEventWireup="True" CodeBehind="database.ascx.cs" Inherits="umbraco.presentation.install.steps.detect"
TargetSchema="http://schemas.microsoft.com/intellisense/ie5" %>
<%@ Import Namespace="Umbraco.Core.Configuration" %>
<asp:PlaceHolder ID="settings" runat="server" Visible="true">
<!-- database box -->
<div class="tab main-tabinfo">
<div class="container">
<h1>Database configuration</h1>
<p>
<strong>To complete this step you will either need a blank database or, if you do not have a blank database available, choose the SQL CE 4 embedded
database (This is the recommended approach for first time users or if you are unsure).</strong>
</p>
<p>
If you are not using the SQL CE 4 embedded database you will need the connection details for your database, such as the
&quot;connection string&quot;. You may need to contact your system administrator or web host for this information.
</p>
</div>
<!-- database -->
<div class="database-hold">
<form action="#">
<fieldset>
<div class="step">
<div class="container">
<p>
<strong>1. Select which database option best fits you:</strong>
</p>
<ul>
<li>
<input type="radio" id="databaseOptionBlank" name="database" value="blank" />
<label for="databaseOptionBlank">I already have a blank SQL Server, SQL Azure or MySQL database</label>
</li>
<li>
<input type="radio" id="databaseOptionEmbedded" name="database" value="embedded" />
<label for="databaseOptionEmbedded">I want to use SQL CE 4, a free, quick-and-simple embedded database</label>
</li>
<li>
<input type="radio" id="databaseOptionAdvanced" name="database" value="advanced" />
<label for="databaseOptionAdvanced">I'm an advanced user, let me put in the connection string</label>
</li>
<li>
<input type="radio" id="databaseOptionHelp" name="database" value="help" />
<label for="databaseOptionHelp">I need help</label>
</li>
</ul>
</div>
</div>
<!-- database options -->
<div id="database-options">
<!-- blank option -->
<div id="database-blank" class="database-option">
<div class="step">
<div class="container">
<p>
<strong>2. Now choose your database type below.</strong>
</p>
<div class="select">
<asp:DropDownList runat="server" ID="DatabaseType" CssClass="sel">
<asp:ListItem Value="" Text="Please choose" Selected="True" />
<asp:ListItem Value="SqlServer" Text="Microsoft SQL Server" />
<asp:ListItem Value="SqlAzure" Text="SQL Azure" />
<asp:ListItem Value="MySql" Text="MySQL" />
</asp:DropDownList>
</div>
</div>
</div>
<div class="step" id="database-blank-inputs">
<div class="container">
<p class="instructionText">
<strong>3. Connection details:</strong> Please fill out the connection information for your database.
</p>
<div class="instruction-hold">
<asp:PlaceHolder ID="ph_dbError" runat="server" Visible="false">
<div class="row error">
<p class="text">
<strong>
<asp:Literal ID="lt_dbError" runat="server" /></strong>
</p>
</div>
<script type="text/javascript">
jQuery(document).ready(function () { showDatabaseSettings(); });
</script>
</asp:PlaceHolder>
<div class="row sql" runat="server" id="DatabaseServerItem">
<asp:Label runat="server" AssociatedControlID="DatabaseServer" ID="DatabaseServerLabel">Server:</asp:Label>
<span>
<asp:TextBox runat="server" CssClass="text" ID="DatabaseServer" /></span>
</div>
<div class="row sql" runat="server" id="DatabaseNameItem">
<asp:Label runat="server" AssociatedControlID="DatabaseName" ID="DatabaseNameLabel">Database name:</asp:Label>
<span>
<asp:TextBox runat="server" CssClass="text" ID="DatabaseName" /></span>
</div>
<div class="row sql" runat="server" id="DatabaseUsernameItem">
<asp:Label runat="server" AssociatedControlID="DatabaseUsername" ID="DatabaseUsernameLabel">Username:</asp:Label>
<span>
<asp:TextBox runat="server" CssClass="text" ID="DatabaseUsername" /></span>
</div>
<div class="row sql" runat="server" id="DatabasePasswordItem">
<asp:Label runat="server" AssociatedControlID="DatabasePassword" ID="DatabasePasswordLabel">Password:</asp:Label>
<span>
<asp:TextBox runat="server" ID="DatabasePassword" CssClass="text" TextMode="Password" /></span>
</div>
</div>
</div>
<!-- btn box -->
</div>
</div>
<!-- embedded option -->
<div id="database-embedded" class="database-option">
<div class="step">
<div class="container">
<p class="instructionText">
<strong>2. Simple file-based database:</strong>
</p>
<div class="instruction-hold">
<div class="row embeddedError" runat="server" id="embeddedFilesMissing" style="display: none;">
<p>
<strong>Missing files:</strong> SQL CE 4 requires that you manually add the SQL
CE 4 runtime to your Umbraco installation.<br />
You can either use the following <a href="http://our.umbraco.org/wiki/install-and-setup/using-sql-ce-4-with-umbraco-46"
target="_blank">instructions</a> on how to add SQL CE 4 or select another database type from the dropdown above.
</p>
</div>
<div class="row embedded" style="display: none;">
<p>
<strong>Nothing to configure:</strong>SQL CE 4 does not require any configuration,
simply click the "install" button to continue.
</p>
</div>
</div>
</div>
</div>
</div>
<!-- advanced option -->
<div id="database-advanced" class="database-option">
<div class="step">
<div class="container">
<p>
<strong>2. Connection details:</strong> Please fill out the connection information for your database.</strong>
</p>
<div class="instruction-hold">
<div class="row custom" runat="server" id="DatabaseConnectionString">
<asp:Label runat="server" AssociatedControlID="ConnectionString" ID="ConnectionStringLabel">Connection string:</asp:Label>
<span class="textarea">
<asp:TextBox runat="server" TextMode="MultiLine" CssClass="text textarea" ID="ConnectionString" /></span>
</div>
<div class="row custom check-hold">
<p>
Example: <tt>datalayer=MySQL;server=192.168.2.8;user id=user;password=***;database=umbraco</tt>
</p>
</div>
</div>
</div>
</div>
</div>
<!-- help option -->
<div id="database-help" class="database-option">
<div class="step">
<div class="container">
<p>
<strong>2. Getting a database setup for umbraco.</strong><br />
For first time users, we recommend you select "quick-and-simple embedded database".
This will install an easy to use database, that does
not require any additional software to use.<br />
Alternatively, you can install Microsoft SQL Server, which will require a bit more
work to get up and running.<br />
We have provided a step-by-step guide in the video instructions below.
</p>
<span class="btn-link"><a href="http://umbraco.org/getting-started" target="_blank">Open video instructions</a></span>
</div>
</div>
</div>
<footer class="btn-box installbtn">
<div class="t">&nbsp;</div>
<asp:LinkButton runat="server" class="single-tab submit btn-install" OnClick="saveDBConfig"><span>install</span> </asp:LinkButton>
</footer>
</div>
</fieldset>
</form>
</div>
</div>
<script type="text/javascript">
var hasEmbeddedDlls = <%= HasEmbeddedDatabaseFiles.ToString().ToLower() %>;
var currentVersion = '<%=UmbracoVersion.Current.ToString(3)%>';
var configured = <%= IsConfigured.ToString().ToLower() %>;
jQuery(document).ready(function(){
<asp:literal runat="server" id="jsVars" />
$("input[name='database']").change(function()
{
switch($(this).val())
{
case "blank":
$(".database-option").hide();
$("#database-blank").show();
$(".installbtn").show();
break;
case "embedded":
$(".database-option").hide();
$("#database-embedded").show();
if (!hasEmbeddedDlls) {
$('.embeddedError').show();
$(".installbtn").hide();
}
else {
$('.embedded').show();
$(".installbtn").show();
}
break;
case "advanced":
$(".database-option").hide();
$("#database-advanced").show();
$(".installbtn").show();
break;
case "help":
$(".database-option").hide();
$("#database-help").show();
$(".installbtn").hide();
break;
}
});
<asp:Literal id="dbinit" runat="server"></asp:Literal>
});
</script>
</asp:PlaceHolder>
<asp:PlaceHolder ID="installing" runat="server" Visible="false">
<!-- installing umbraco -->
<div class="tab install-tab" id="datebase-tab">
<div class="container">
<asp:PlaceHolder ID="installProgress" runat="server" Visible="True">
<div class="progress-status-container">
<h1>Installing Umbraco</h1>
<p>
The Umbraco database is being configured. This process populates your chosen database with a blank Umbraco instance.
</p>
</div>
<div class="result-status-container" style="display: none;">
<h1>Database installed</h1>
<div class="success">
<p>
Umbraco
<%=UmbracoVersion.Current.ToString(3)%>
has now been copied to your database. Press <b>Continue</b> to proceed.
</p>
</div>
</div>
</asp:PlaceHolder>
<asp:PlaceHolder ID="upgradeProgress" runat="server" Visible="False">
<div class="progress-status-container">
<h1>Upgrading Umbraco</h1>
<p>
The Umbraco database is being configured. This process upgrades your Umbraco database.
</p>
</div>
<div class="result-status-container" style="display: none;">
<h1>Database upgraded</h1>
<div class="success">
<p>
Your database has been upgraded to version:
<%=UmbracoVersion.Current.ToString(3)%>.<br />
Press <b>Continue</b> to proceed.
</p>
</div>
</div>
</asp:PlaceHolder>
<div class="loader">
<div class="hold">
<div class="progress-bar">
</div>
<span class="progress-bar-value">0%</span>
</div>
<strong></strong>
</div>
</div>
<!-- btn box -->
<footer class="btn-box" style="display: none;">
<div class="t">&nbsp;</div>
<asp:LinkButton class="btn-step btn btn-continue" runat="server" OnClick="gotoNextStep"><span>Continue</span></asp:LinkButton>
<asp:LinkButton class="btn-step btn btn-back" Style="display: none;" runat="server" OnClick="gotoSettings"><span>Back</span></asp:LinkButton>
</footer>
</div>
<script type="text/javascript">
jQuery(document).ready(function() {
updateProgressBar("5");
updateStatusMessage("Connecting to database..");
$.ajax({
type: 'POST',
contentType: 'application/json; charset=utf-8',
data: '{}',
dataType: 'json',
url: 'utills/p.aspx/installOrUpgrade',
success: function(data) {
var json = JSON.parse(data.d);
updateProgressBar(json.Percentage);
updateStatusMessage(json.Message);
if (json.Success) {
$(".btn-box").show();
$('.ui-progressbar-value').css("background-image", "url(../umbraco_client/installer/images/pbar.gif)");
$(".result-status-container").show();
$(".progress-status-container").hide();
} else {
$(".btn-continue").hide();
$(".btn-back").show();
$(".btn-box").show();
}
}
});
});
</script>
</asp:PlaceHolder>

View File

@@ -1,4 +1,4 @@
using System;
using System;
using System.Configuration;
using System.Data.Common;
using System.Web.UI.WebControls;
@@ -15,6 +15,7 @@ namespace umbraco.presentation.install.steps
/// <summary>
/// Database detection step in the installer wizard.
/// </summary>
[Obsolete("This class is no longer used and will be removed from the codebase in the future. The UserControl Umbraco.Web.UI.Install.Steps.Database has superceded this.")]
public partial class detect : System.Web.UI.UserControl
{
/// <summary>
@@ -138,7 +139,7 @@ namespace umbraco.presentation.install.steps
{
DatabaseType.SelectedValue = "SqlServer";
}
DatabaseType_SelectedIndexChanged(this, new EventArgs());
// Prepare other fields
@@ -251,5 +252,230 @@ namespace umbraco.presentation.install.steps
{
Helper.RedirectToNextStep(this.Page);
}
/// <summary>
/// settings control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.PlaceHolder settings;
/// <summary>
/// DatabaseType control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.DropDownList DatabaseType;
/// <summary>
/// ph_dbError control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.PlaceHolder ph_dbError;
/// <summary>
/// lt_dbError control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.Literal lt_dbError;
/// <summary>
/// DatabaseServerItem control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.HtmlControls.HtmlGenericControl DatabaseServerItem;
/// <summary>
/// DatabaseServerLabel control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.Label DatabaseServerLabel;
/// <summary>
/// DatabaseServer control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.TextBox DatabaseServer;
/// <summary>
/// DatabaseNameItem control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.HtmlControls.HtmlGenericControl DatabaseNameItem;
/// <summary>
/// DatabaseNameLabel control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.Label DatabaseNameLabel;
/// <summary>
/// DatabaseName control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.TextBox DatabaseName;
/// <summary>
/// DatabaseUsernameItem control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.HtmlControls.HtmlGenericControl DatabaseUsernameItem;
/// <summary>
/// DatabaseUsernameLabel control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.Label DatabaseUsernameLabel;
/// <summary>
/// DatabaseUsername control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.TextBox DatabaseUsername;
/// <summary>
/// DatabasePasswordItem control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.HtmlControls.HtmlGenericControl DatabasePasswordItem;
/// <summary>
/// DatabasePasswordLabel control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.Label DatabasePasswordLabel;
/// <summary>
/// DatabasePassword control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.TextBox DatabasePassword;
/// <summary>
/// embeddedFilesMissing control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.HtmlControls.HtmlGenericControl embeddedFilesMissing;
/// <summary>
/// DatabaseConnectionString control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.HtmlControls.HtmlGenericControl DatabaseConnectionString;
/// <summary>
/// ConnectionStringLabel control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.Label ConnectionStringLabel;
/// <summary>
/// ConnectionString control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.TextBox ConnectionString;
/// <summary>
/// jsVars control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.Literal jsVars;
/// <summary>
/// dbinit control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.Literal dbinit;
/// <summary>
/// installing control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.PlaceHolder installing;
/// <summary>
/// installProgress control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.PlaceHolder installProgress;
/// <summary>
/// upgradeProgress control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.PlaceHolder upgradeProgress;
}
}

View File

@@ -1,109 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 1.3
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">1.3</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1">this is my long string</data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
[base64 mime encoded serialized .NET Framework object]
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
[base64 mime encoded string representing a byte array form of the .NET Framework object]
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used forserialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>1.3</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<data name="$this.TrayLargeIcon" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</data>
<data name="$this.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>Private</value>
</data>
<data name="$this.TrayAutoArrange" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</data>
</root>

View File

@@ -1,87 +0,0 @@
<%@ Control Language="c#" AutoEventWireup="True" Codebehind="defaultUser.ascx.cs" Inherits="umbraco.presentation.install.steps.defaultUser" TargetSchema="http://schemas.microsoft.com/intellisense/ie5"%>
<asp:Placeholder ID="identify" Runat="server" Visible="True">
<!-- create box -->
<div class="tab main-tabinfo">
<div class="container">
<h1>Create User</h1>
<div class="create-hold">
<p>You can now setup a new admin user to log into Umbraco, we recommend using a stong password for this (a password which is more than 4 characters and contains a mix of letters, numbers and symbols).
Please make a note of the chosen password.</p>
<p>The password can be changed once you have completed the installation and logged into the admin interface.</p>
</div>
</div>
<div class="database-hold">
<form action="#">
<fieldset>
<div class="container">
<div class="instruction-hold">
<div class="row">
<asp:label AssociatedControlID="tb_name" runat="server">Name:</asp:label>
<span><asp:TextBox ID="tb_name" CssClass="text" type="text" Text="admin" runat="server" /></span>
<asp:RequiredFieldValidator Display="Dynamic" CssClass="invalidaing" ControlToValidate="tb_name" runat="server" ErrorMessage="Name is a mandatory field" />
</div>
<div class="row">
<asp:label AssociatedControlID="tb_email" runat="server">Email:</asp:label>
<span><asp:TextBox ID="tb_email" CssClass="text" type="text" Text="admin@domain.com" runat="server" /></span>
<asp:RequiredFieldValidator Display="Dynamic" CssClass="invalidaing" ControlToValidate="tb_email" runat="server" ErrorMessage="Email is a mandatory field" />
</div>
<div class="row">
<asp:label AssociatedControlID="tb_login" runat="server">Username:</asp:label>
<span><asp:TextBox ID="tb_login" CssClass="text" type="text" Text="admin" runat="server" /></span>
<asp:RequiredFieldValidator Display="Dynamic" CssClass="invalidaing" ControlToValidate="tb_login" runat="server" ErrorMessage="Username is a mandatory field" />
</div>
<div class="row" style="height: 35px; overflow: hidden;">
<asp:label AssociatedControlID="tb_password" runat="server">Password:</asp:label>
<span><asp:TextBox ID="tb_password" CssClass="text" TextMode="Password" type="text" Text="" runat="server" /></span>
<asp:RequiredFieldValidator Display="Dynamic" CssClass="invalidaing" ControlToValidate="tb_password" runat="server" ErrorMessage="Password is a mandatory field" />
</div>
<div class="row">
<asp:Label AssociatedControlID="tb_password_confirm" runat="server">Confirm Password:</asp:label>
<span><asp:TextBox ID="tb_password_confirm" CssClass="text" TextMode="Password" type="text" Text="" runat="server" /></span>
<asp:RequiredFieldValidator Display="Dynamic" CssClass="invalidaing" ControlToValidate="tb_password_confirm" runat="server" ErrorMessage="Confirm Password is a mandatory field" />
<asp:CompareValidator Display="Dynamic" CssClass="invalidaing" ControlToCompare="tb_password" ControlToValidate="tb_password_confirm" ErrorMessage="The passwords must be identical" runat="server" />
</div>
<div class="check-hold">
<asp:CheckBox ID="cb_newsletter" runat="server" Checked="true" />
<asp:label AssociatedControlID="cb_newsletter" runat="server">Sign up for our monthly newsletter</asp:label>
</div>
</div>
</div>
<footer class="btn-box">
<div class="t">&nbsp;</div>
<asp:LinkButton CssClass="btn-create" runat="server" onclick="changePassword_Click"><span>Create user</span></asp:linkbutton>
</footer>
</fieldset>
</form>
</div>
</div>
</asp:Placeholder>
<script type="text/javascript">
$(document).ready(function() {
jQuery("#<%= tb_password.ClientID %>").passStrength({
shortPass: "invalidaing",
badPass: "invalidaing",
goodPass: "validaing",
strongPass: "validaing",
baseStyle: "basevalidaing",
userid: jQuery("#<%= tb_login.ClientID %>").val(),
messageloc: 1
});
});
</script>

View File

@@ -1,4 +1,4 @@
#region namespace
#region namespace
using System;
using System.Data;
using System.Drawing;
@@ -8,44 +8,45 @@ using System.Web.UI.HtmlControls;
using System.Web.Security;
using umbraco.BusinessLogic;
using umbraco.providers;
using System.Collections.Specialized;
using System.Collections.Specialized;
#endregion
namespace umbraco.presentation.install.steps
{
/// <summary>
/// Summary description for defaultUser.
/// </summary>
public partial class defaultUser : System.Web.UI.UserControl
{
/// <summary>
/// Summary description for defaultUser.
/// </summary>
[Obsolete("This class is no longer used and will be removed from the codebase in the future. The UserControl that supercedes this is Umbraco.Web.UI.Install.Steps.DefaultUser")]
public partial class defaultUser : System.Web.UI.UserControl
{
protected void Page_Load(object sender, System.EventArgs e)
{
}
protected void Page_Load(object sender, System.EventArgs e)
{
#region Web Form Designer generated code
override protected void OnInit(EventArgs e)
{
//
// CODEGEN: This call is required by the ASP.NET Web Form Designer.
//
InitializeComponent();
base.OnInit(e);
}
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
}
}
#endregion
#region Web Form Designer generated code
override protected void OnInit(EventArgs e)
{
//
// CODEGEN: This call is required by the ASP.NET Web Form Designer.
//
InitializeComponent();
base.OnInit(e);
}
protected void changePassword_Click(object sender, System.EventArgs e)
{
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
}
#endregion
protected void changePassword_Click(object sender, System.EventArgs e)
{
Page.Validate();
if (Page.IsValid)
@@ -95,9 +96,9 @@ namespace umbraco.presentation.install.steps
if (String.IsNullOrWhiteSpace(GlobalSettings.ConfigurationStatus))
BasePages.UmbracoEnsuredPage.doLogin(u);
Helper.RedirectToNextStep(this.Page);
Helper.RedirectToNextStep(this.Page);
}
}
}
private void SubscribeToNewsLetter(string name, string email)
{
@@ -113,5 +114,68 @@ namespace umbraco.presentation.install.steps
}
catch { /* fail in silence */ }
}
}
/// <summary>
/// identify control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.PlaceHolder identify;
/// <summary>
/// tb_name control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.TextBox tb_name;
/// <summary>
/// tb_email control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.TextBox tb_email;
/// <summary>
/// tb_login control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.TextBox tb_login;
/// <summary>
/// tb_password control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.TextBox tb_password;
/// <summary>
/// tb_password_confirm control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.TextBox tb_password_confirm;
/// <summary>
/// cb_newsletter control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.CheckBox cb_newsletter;
}
}

View File

@@ -1,109 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 1.3
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">1.3</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1">this is my long string</data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
[base64 mime encoded serialized .NET Framework object]
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
[base64 mime encoded string representing a byte array form of the .NET Framework object]
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used forserialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>1.3</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<data name="$this.TrayLargeIcon" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</data>
<data name="$this.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>Private</value>
</data>
<data name="$this.TrayAutoArrange" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</data>
</root>

View File

@@ -1,24 +0,0 @@
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="license.ascx.cs" Inherits="umbraco.presentation.install.steps.license" %>
<!-- licence box -->
<div class="tab main-tabinfo">
<div class="container">
<h1>License</h1>
<div class="accept-hold">
<h2>Accept the license for Umbraco CMS</h2>
<p>By clicking the "accept and continue" button (or by modifying the Umbraco Configuration Status in the web.config), you accept the license for this software as specified in the text below.</p>
</div>
<h3>The License (MIT):</h3>
<div class="box-software">
<p>Copyright (c) 2002 - <%=DateTime.Now.Year %> Umbraco I/S</p>
<p>Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:</p>
<p>The above copyright and this permission notice shall be included in all copies or substantial portions of the software.</p>
<p><span>THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USER OR OTHER DEALINGS IN THE SOFTWARE.</span></p>
</div>
<p>Thats all. That didnt hurt did it?</p>
</div>
<!-- btn box -->
<footer class="btn-box">
<div class="t">&nbsp;</div>
<asp:LinkButton ID="btnNext" CssClass="btn btn-accept" runat="server" OnClick="gotoNextStep"><span>Accept and Continue</span></asp:LinkButton>
</footer>
</div>

View File

@@ -1,4 +1,4 @@
using System;
using System;
using System.Data;
using System.Configuration;
using System.Collections;
@@ -11,6 +11,7 @@ using System.Web.UI.HtmlControls;
namespace umbraco.presentation.install.steps
{
[Obsolete("This class is no longer used and will be removed from the codebase in the future. The UserControl that supercedes this is Umbraco.Web.UI.Install.Steps.License")]
public partial class license : System.Web.UI.UserControl
{
protected void Page_Load(object sender, EventArgs e)
@@ -18,8 +19,18 @@ namespace umbraco.presentation.install.steps
}
protected void gotoNextStep(object sender, EventArgs e) {
Helper.RedirectToNextStep(this.Page);
protected void gotoNextStep(object sender, EventArgs e)
{
Helper.RedirectToNextStep(this.Page);
}
/// <summary>
/// btnNext control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.LinkButton btnNext;
}
}

View File

@@ -1,25 +0,0 @@
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="renaming.ascx.cs" Inherits="umbraco.presentation.install.steps.renaming" %>
<h1>Step 3/5: Updating old conventions</h1>
<asp:Panel ID="init" Runat="server" Visible="True">
<p>
This version of Umbraco introduces new conventions for naming XSLT and REST extensions as well as a renaming of the Public Access storage file.<br />
You no longer need to prefix your extension references with /bin and the public access storage file is now called access.config instead of access.xml.<br />
This step of the installer will try to update your old references. If it fails due to permission settings, you'll need to make these changes manually!
</p>
<asp:Panel ID="noChangedNeeded" runat="server" Visible="false">
<p><strong>Everything looks good. No changes needed for the upgrade, just press next.</strong></p>
</asp:Panel>
<asp:Panel ID="changesNeeded" runat="server" Visible="true">
<p>
<strong>The following changes will need to be made. Press to update changes button to proceed:</strong>
</p>
<asp:Literal id="identifyResult" Runat="server"></asp:Literal>
<asp:Button ID="updateChanges" runat="server" Text="Update Changes"
onclick="updateChanges_Click" />
</asp:Panel>
</asp:Panel>
<asp:Panel ID="result" Runat="server" Visible="False">
<asp:Literal ID="resultText" runat=server></asp:Literal>
</asp:Panel>

View File

@@ -10,6 +10,8 @@ using umbraco.IO;
namespace umbraco.presentation.install.steps
{
[Obsolete("This class is no longer used and will be removed from the codebase in the future. The UserControl that supercedes this is Umbraco.Web.UI.Install.Steps.Renaming")]
public partial class renaming : System.Web.UI.UserControl
{
private string _oldAccessFilePath = IO.IOHelper.MapPath(IO.SystemDirectories.Data + "/access.xml");
@@ -169,5 +171,68 @@ namespace umbraco.presentation.install.steps
return xsltExt.SelectNodes("//" + elementName);
}
/// <summary>
/// init control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.Panel init;
/// <summary>
/// noChangedNeeded control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.Panel noChangedNeeded;
/// <summary>
/// changesNeeded control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.Panel changesNeeded;
/// <summary>
/// identifyResult control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.Literal identifyResult;
/// <summary>
/// updateChanges control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.Button updateChanges;
/// <summary>
/// result control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.Panel result;
/// <summary>
/// resultText control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.Literal resultText;
}
}

View File

@@ -1,140 +0,0 @@
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="skinning.ascx.cs" Inherits="umbraco.presentation.install.steps.skinning" %>
<!-- Choose starter kit -->
<asp:UpdatePanel runat="server" ID="udp">
<ContentTemplate>
<script type="text/javascript">
var intervalId = 0;
jQuery(document).ready(function () {
jQuery('.zoom-list a.selectStarterKit').click(function () {
jQuery('.main-tabinfo').hide();
jQuery('#starterkitname').html( jQuery(this).attr("title") );
jQuery('#single-tab1').show();
//fire off the progressbar
intervalId = setInterval("progressBarCallback()", 1000);
return true;
});
});
function pageLoad(sender, args) {
if (args.get_isPartialLoad()) {
clearInterval(intervalId);
jQuery('#single-tab1').hide();
initZoomList2();
initSlide();
initLightBox();
jQuery('.btn-install-gal').click(function () {
jQuery('#browseSkins').hide();
jQuery('#installingSkin').show();
//fire off the progressbar
intervalId = setInterval("progressBarCallback()", 1000);
jQuery('#skinname').html( jQuery(this).attr("title") );
return true;
});
}
}
function progressBarCallback() {
jQuery.getJSON('utills/p.aspx?feed=progress', function (data) {
if (data.percentage > 0) {
updateProgressBar(data.percentage);
updateStatusMessage(data.message)
}
if (data.error != "") {
clearInterval(intervalId);
updateStatusMessage(data.error);
}
if (data.percentage == 100) {
clearInterval(intervalId);
jQuery(".btn-box").show();
jQuery('.ui-progressbar-value').css("background-image", "url(../umbraco_client/installer/images/pbar.gif)");
}
});
}
</script>
</script>
<asp:Placeholder ID="pl_starterKit" Runat="server" Visible="True">
<!-- starter box -->
<div class="tab main-tabinfo">
<div class="container">
<h1>Starter kits</h1>
<p>To help you get started here are some basic starter kits. They have been tailored to suit common site configurations and install useful functionality such as blogs or image galleries.<br />
Mouse over the icons to learn more about what the starter kits will install.</p>
</div>
<!-- menu -->
<asp:PlaceHolder ID="ph_starterKits" runat="server" />
</div>
</asp:Placeholder>
<!-- Choose starter kit design -->
<asp:Placeholder ID="pl_starterKitDesign" Runat="server" Visible="True">
<div class="tab install-tab" id="browseSkins">
<div class="container">
<h1>Install a Skin</h1>
<div class="accept-hold">
<p>You can now further enhance your site by choosing one of these great skins. This will apply a default look and feel to all the pages in your site, considerably reducing development time.</p>
</div>
</div>
<!-- skins -->
<asp:Placeholder ID="ph_starterKitDesigns" runat="server" />
</div>
</asp:Placeholder>
</ContentTemplate>
</asp:UpdatePanel>
<!-- itstall starter kit -->
<div class="tab install-tab" id="single-tab1" style="display: none">
<div class="container">
<h1>Installing Starter Kit</h1>
<h2><strong id="starterkitname">Your starter kit</strong> is installing. </h2>
<div class="loader alt">
<div class="hold">
<div class="progress-bar"></div>
<span class="progress-bar-value">56%</span>
</div>
<strong>Starting installation...</strong>
</div>
</div>
</div>
<!-- itstall skin -->
<div class="tab install-tab" id="installingSkin" style="display: none">
<div class="container">
<h1>Installing Skin</h1>
<h2>The <strong id="skinname"></strong> skin is installing. </h2>
<div class="loader alt">
<div class="hold">
<div class="progress-bar"></div>
<span class="progress-bar-value">56%</span>
</div>
<strong>Starting installation...</strong>
</div>
</div>
</div>

View File

@@ -8,6 +8,7 @@ using umbraco.IO;
namespace umbraco.presentation.install.steps
{
[Obsolete("This class is no longer used and will be removed from the codebase in the future. The UserControl that supercedes this is Umbraco.Web.UI.Install.Steps.StarterKits")]
public partial class skinning : System.Web.UI.UserControl
{
protected void Page_Load(object sender, EventArgs e)
@@ -22,7 +23,7 @@ namespace umbraco.presentation.install.steps
{
base.OnInit(e);
}
private void showStarterKits()
@@ -32,7 +33,7 @@ namespace umbraco.presentation.install.steps
pl_starterKit.Visible = true;
pl_starterKitDesign.Visible = false;
}
public void showStarterKitDesigns(Guid starterKitGuid)
@@ -59,5 +60,50 @@ namespace umbraco.presentation.install.steps
{
Helper.RedirectToNextStep(this.Page);
}
/// <summary>
/// udp control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected UpdatePanel udp;
/// <summary>
/// pl_starterKit control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.PlaceHolder pl_starterKit;
/// <summary>
/// ph_starterKits control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.PlaceHolder ph_starterKits;
/// <summary>
/// pl_starterKitDesign control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.PlaceHolder pl_starterKitDesign;
/// <summary>
/// ph_starterKitDesigns control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.PlaceHolder ph_starterKitDesigns;
}
}

View File

@@ -1,68 +0,0 @@
<%@ Control Language="c#" AutoEventWireup="True" CodeBehind="theend.ascx.cs" Inherits="umbraco.presentation.install.steps.theend"
TargetSchema="http://schemas.microsoft.com/intellisense/ie5" %>
<script type="text/javascript">
jQuery(document).ready(function () {
$.post("utills/p.aspx?feed=sitebuildervids",
function (data) {
jQuery("#ajax-sitebuildervids").html(data);
});
$.post("utills/p.aspx?feed=developervids",
function (data) {
jQuery("#ajax-developervids").html(data);
});
umbraco.presentation.webservices.CheckForUpgrade.InstallStatus(true, navigator.userAgent, "");
});
</script>
<!-- done box -->
<div class="tab main-tabinfo">
<div class="container">
<h1>
Youre done...now what?</h1>
<p>
Excellent, you are now ready to start using Umbraco, one of the worlds most popular open
source .NET CMS.
<br />
If you installed a starter kit you can start by configuring your new site, just click &quot;Preview your new website&quot; and follow the instructions. Or to start adding content right away click &quot;Set up your new website&quot; </p>
<ul class="btn-web">
<li class="btn-preview-web" id="customizeSite" runat="server"><a href="<%= umbraco.IO.IOHelper.ResolveUrl(umbraco.IO.SystemDirectories.Umbraco) %>/canvas.aspx?redir=<%= this.ResolveUrl("~/") %>&umbSkinning=true&umbSkinningConfigurator=true" target="_blank"><span>Set up your new website</span></a></li>
<li class="btn-set"><a href="<%= umbraco.IO.IOHelper.ResolveUrl(umbraco.IO.SystemDirectories.Umbraco) %>/umbraco.aspx"><span>Launch umbraco</span></a></li>
</ul>
</div>
<div class="threcol">
<div class="t">
&nbsp;</div>
<div class="hold">
<aside class="col1">
<h2>Useful links</h2>
<p>Weve put together some useful links to help you get started with Umbraco.</p>
<nav class="links">
<ul>
<li><a href="http://umbraco.codeplex.com/documentation" target="_blank">Getting Started Guide</a></li>
<li><a href="http://our.umbraco.org?ref=ourFromInstaller">our.umbraco.org</a></li>
</ul>
<ul>
<li><a href="http://our.umbraco.org/wiki?ref=LatestDocsFromInstaller">New documentation</a></li>
<li><a href="http://our.umbraco.org/projects?ref=LatestProjectsFromInstaller">New Projects</a></li>
<li><a href="http://our.umbraco.org/forum?ref=LatesTalkFromInstaller">Forum Talk</a></li>
</ul>
</nav>
</aside>
<aside class="col2">
<h2>Sitebuilder introduction</h2>
<div id="ajax-sitebuildervids"><small>Loading...</small></div>
</aside>
<aside class="col3">
<h2>Developer introduction</h2>
<div id="ajax-developervids"><small>Loading...</small></div>
</aside>
</div>
</div>
</div>

View File

@@ -1,4 +1,4 @@
using System.IO;
using System.IO;
using Umbraco.Core.Configuration;
using Umbraco.Core.IO;
using umbraco.BusinessLogic;
@@ -11,11 +11,12 @@ using System.Web.UI.HtmlControls;
namespace umbraco.presentation.install.steps
{
/// <summary>
/// Summary description for theend.
/// </summary>
[Obsolete("This class is no longer used and will be removed from the codebase in the future. The UserControl that supercedes this is Umbraco.Web.UI.Install.Steps.TheEnd")]
public partial class theend : System.Web.UI.UserControl
{
@@ -60,5 +61,14 @@ namespace umbraco.presentation.install.steps
{
}
#endregion
/// <summary>
/// customizeSite control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.HtmlControls.HtmlGenericControl customizeSite;
}
}

View File

@@ -1,42 +0,0 @@
<?xml version="1.0" encoding="utf-8" ?>
<root>
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="ResMimeType">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="Version">
<value>1.0.0.0</value>
</resheader>
<resheader name="Reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="Writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>

View File

@@ -1,101 +0,0 @@
<%@ Control Language="c#" AutoEventWireup="True" Codebehind="validatePermissions.ascx.cs" Inherits="umbraco.presentation.install.steps.validatePermissions" TargetSchema="http://schemas.microsoft.com/intellisense/ie5"%>
<h1>Step 3/5: Validating File Permissions</h1>
<p>
umbraco needs write/modify access to certain directories in order to store files like pictures and PDF's.
It also stores temporary data (aka: cache) for enhancing the performance of your website.
</p>
<asp:literal id="perfect" Runat="server" Visible="False">
<div class="success">
<p><strong>Your permission settings are perfect!</strong></p>
<p>You are ready to run umbraco and install packages!</p>
</div>
</asp:literal>
<asp:literal id="noPackages" Runat="server" Visible="False">
<div class="error">
<p><strong>Your permission settings are almost perfect!</strong></p>
<p>
You can run umbraco without problems, but you will not be able to install packages which are recommended to take full advantage of umbraco.
</p>
</div>
</asp:literal>
<asp:literal id="noFolders" Runat="server" Visible="False">
<div class="error">
<p>
<strong>Your permission settings might be an issue!</strong>
</p>
<p>You can run umbraco without problems, but you will not be able to create folders or install packages which are recommended to take full advantage of umbraco.</p>
</div>
</asp:literal>
<asp:literal id="error" Runat="server" Visible="False">
<div class="error">
<p>
<strong>Your permission settings are not ready for umbraco!</strong>
</p>
<p>
In order to run umbraco, you'll need to update your permission settings.
</p>
</div>
</asp:literal>
<asp:Panel Visible="False" Runat="server" ID="howtoResolve">
<h2>How to Resolve</h2>
<p>Watch our <strong>video tutorial</strong> on setting up folder permissions for umbraco or <a href="#" onClick="javascript:document.getElementById('fixPane').style.display = 'block';">read the text version</a>.</p>
<table class="single" id="videos">
<tr><td><a target="_blank" href="http://umbraco.org/documentation/videos/tags?tag=folder%20permissions">
<img src="images/permissionsVid1.png" />
<span>Watch: Setting up folder permissions</span>
</a></td></tr>
</table>
<div id="fixPane" style="display: none;">
<asp:Panel id="grant" Visible="True" Runat="server">
<h2>Affected files and folders</h2>
<p>
You need to grant ASP.NET modify permissions to the following files/folders:
</p>
<ul>
<asp:Literal id="permSummary" Runat="server"></asp:Literal>
</ul>
<p>
More <a href="http://umbraco.org/documentation/books/setting-umbraco-folder-permissions"
target="_blank">information on setting up permissions for umbraco here</a>.</p>
</asp:Panel>
<asp:Panel id="folderWoes" Visible="False" Runat="server">
<h3>Resolving folder issue</h3>
<p>Follow <a href="http://groups.google.com/group/microsoft.public.dotnet.framework.aspnet/browse_thread/thread/46d6582afffc96b0/9088396b3323d4ae?lnk=st">this link for more information on problems with ASP.NET and creating
folders</a>.
</p>
</asp:Panel>
<p><a href="#" onClick="javascript:document.getElementById('detailsPane').style.display = 'block';"><strong>View Permission Error Details:</strong></a></p>
<div id="detailsPane" style="display: none">
<p style="font-size: 80%">
- Checking default folder permissions:<br />
<asp:literal id="permissionResults" Runat="server"></asp:literal><br />
- Checking optional folder permissions for packages:<br />
<asp:literal id="packageResults" Runat="server"></asp:literal><br />
- Cache (the umbraco.config file):
<asp:literal id="xmlResult" Runat="server"></asp:literal><br />
<br />
- Creating folders:
<asp:literal id="foldersResult" Runat="server"></asp:literal><br />
<br />
</p>
</div>
</div>
</asp:Panel>
<footer class="btn-box">
<div class="t">&nbsp;</div>
<asp:LinkButton ID="btnNext" CssClass="btn btn-accept" runat="server" OnClick="gotoNextStep"><span>Continue anyway</span></asp:LinkButton>
</footer>

View File

@@ -1,4 +1,4 @@
using System;
using System;
using System.IO;
using System.Web.UI;
using umbraco.IO;
@@ -8,11 +8,12 @@ namespace umbraco.presentation.install.steps
/// <summary>
/// Summary description for validatePermissions.
/// </summary>
[Obsolete("This class is no longer used and will be removed from the codebase in the future. The UserControl that supercedes this is Umbraco.Web.UI.Install.Steps.ValidatePermissions")]
public partial class validatePermissions : UserControl
{
private string[] permissionDirs = {SystemDirectories.Css, SystemDirectories.Config, SystemDirectories.Data, SystemDirectories.Media, SystemDirectories.Masterpages, SystemDirectories.MacroScripts, SystemDirectories.Xslt, SystemDirectories.Usercontrols, SystemDirectories.Preview};
private string[] permissionDirs = { SystemDirectories.Css, SystemDirectories.Config, SystemDirectories.Data, SystemDirectories.Media, SystemDirectories.Masterpages, SystemDirectories.MacroScripts, SystemDirectories.Xslt, SystemDirectories.Usercontrols, SystemDirectories.Preview };
private string[] permissionFiles = { };
private string[] packagesPermissionsDirs = {SystemDirectories.Bin, SystemDirectories.Umbraco, SystemDirectories.Usercontrols, SystemDirectories.Packages};
private string[] packagesPermissionsDirs = { SystemDirectories.Bin, SystemDirectories.Umbraco, SystemDirectories.Usercontrols, SystemDirectories.Packages };
protected void Page_Load(object sender, EventArgs e)
{
@@ -25,8 +26,8 @@ namespace umbraco.presentation.install.steps
// Test default dir permissions
foreach (string dir in permissionDirs)
{
bool result = SaveAndDeleteFile( IOHelper.MapPath( dir + "/configWizardPermissionTest.txt") );
bool result = SaveAndDeleteFile(IOHelper.MapPath(dir + "/configWizardPermissionTest.txt"));
if (!result)
{
permissionsOK = false;
@@ -40,7 +41,7 @@ namespace umbraco.presentation.install.steps
// Test default file permissions
foreach (string file in permissionFiles)
{
bool result = OpenFileForWrite( IOHelper.MapPath(file) );
bool result = OpenFileForWrite(IOHelper.MapPath(file));
if (!result)
{
permissionsOK = false;
@@ -57,7 +58,7 @@ namespace umbraco.presentation.install.steps
foreach (string dir in packagesPermissionsDirs)
{
bool result =
SaveAndDeleteFile( IOHelper.MapPath(dir + "/configWizardPermissionTest.txt"));
SaveAndDeleteFile(IOHelper.MapPath(dir + "/configWizardPermissionTest.txt"));
if (!result)
{
packageOK = false;
@@ -90,7 +91,7 @@ namespace umbraco.presentation.install.steps
// Test creation of folders
try
{
string tempDir = IOHelper.MapPath( SystemDirectories.Media + "/testCreatedByConfigWizard" );
string tempDir = IOHelper.MapPath(SystemDirectories.Media + "/testCreatedByConfigWizard");
Directory.CreateDirectory(tempDir);
Directory.Delete(tempDir);
foldersResult.Text = "Success!";
@@ -105,15 +106,17 @@ namespace umbraco.presentation.install.steps
if (permissionsOK)
{
foreach (
FileInfo configFile in new DirectoryInfo( IOHelper.MapPath( SystemDirectories.Config )).GetFiles("*.xml"))
FileInfo configFile in new DirectoryInfo(IOHelper.MapPath(SystemDirectories.Config)).GetFiles("*.xml"))
{
try {
try
{
if (File.Exists(configFile.FullName.Replace(".xml", ".config")))
File.Delete(configFile.FullName.Replace(".xml", ".config"));
configFile.MoveTo(configFile.FullName.Replace(".xml", ".config"));
}catch{}
}
catch { }
}
}
@@ -175,7 +178,7 @@ namespace umbraco.presentation.install.steps
{
try
{
File.AppendText(file).Close();
File.AppendText(file).Close();
}
catch
{
@@ -209,5 +212,122 @@ namespace umbraco.presentation.install.steps
}
#endregion
/// <summary>
/// perfect control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.Literal perfect;
/// <summary>
/// noPackages control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.Literal noPackages;
/// <summary>
/// noFolders control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.Literal noFolders;
/// <summary>
/// error control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.Literal error;
/// <summary>
/// howtoResolve control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.Panel howtoResolve;
/// <summary>
/// grant control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.Panel grant;
/// <summary>
/// permSummary control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.Literal permSummary;
/// <summary>
/// folderWoes control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.Panel folderWoes;
/// <summary>
/// permissionResults control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.Literal permissionResults;
/// <summary>
/// packageResults control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.Literal packageResults;
/// <summary>
/// xmlResult control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.Literal xmlResult;
/// <summary>
/// foldersResult control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.Literal foldersResult;
/// <summary>
/// btnNext control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.LinkButton btnNext;
}
}

View File

@@ -1,109 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 1.3
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">1.3</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1">this is my long string</data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
[base64 mime encoded serialized .NET Framework object]
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
[base64 mime encoded string representing a byte array form of the .NET Framework object]
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used forserialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>1.3</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<data name="$this.TrayLargeIcon" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</data>
<data name="$this.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>Private</value>
</data>
<data name="$this.TrayAutoArrange" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</data>
</root>

View File

@@ -1,55 +0,0 @@
<%@ Control Language="c#" AutoEventWireup="True" CodeBehind="welcome.ascx.cs" Inherits="umbraco.presentation.install.welcome"
TargetSchema="http://schemas.microsoft.com/intellisense/ie5" %>
<%@ Import Namespace="Umbraco.Core.Configuration" %>
<!-- welcome box -->
<div class="tab main-tabinfo">
<div class="container">
<asp:PlaceHolder ID="ph_install" runat="server">
<h1>
Welcome to the Umbraco installation</h1>
<h2>
Thanks for downloading the Umbraco CMS installer.
</h2>
<p>
You are just a few minutes away from getting up and running. The installer will
take you through the following process:-</p>
<ul class="text-list">
<li><strong>1.</strong><span>Accept the easy to read License.</span></li>
<li><strong>2.</strong><span>Set up a database. There are a number of options available
such as MS SQL Server, MS SQL Express Edition and MYSQL or you may wish to use the
Microsoft SQL CE 4 database. You may need to consult your web host or system administrator.</span></li>
<li><strong>3.</strong><span>Set an Umbraco Admin password.</span></li>
<li><strong>4.</strong><span>You can then choose to install one of our great starter
kits and a skin.</span></li>
<li><strong>5.</strong><span>But whatever you do don't forget to become part of the Umbraco community, one of the friendliest developer communities you will find. Its what makes Umbraco such a great product and so much fun to use.</span></li>
</ul>
<span class="enjoy">Enjoy!</span>
</asp:PlaceHolder>
<asp:PlaceHolder ID="ph_upgrade" runat="server" Visible="false">
<h1>Upgrading Umbraco</h1>
<p>
Welcome to the umbraco upgrade wizard. This will make sure that you upgrade safely from your old version to <strong>Umbraco version <%=UmbracoVersion.Current.ToString(3) %></strong>
</p>
<p>
As this is an upgrade, <strong>the wizard might skip steps</strong> that are only needed for new umbraco installations. It might also ask you questions you've already answered once. But do not worry,
everything is in order. Click <strong>Let's get started</strong> below to begin your upgrade.
</p>
<span class="enjoy">Enjoy!</span>
</asp:PlaceHolder>
</div>
<!-- btn box -->
<footer class="btn-box">
<div class="t">&nbsp;</div>
<asp:LinkButton ID="btnNext" CssClass="btn btn-get" runat="server" OnClick="gotoNextStep"><span>Let's get started!</span></asp:LinkButton>
</footer>
</div>
<script type="text/javascript">
jQuery(document).ready(function () {
umbraco.presentation.webservices.CheckForUpgrade.InstallStatus(false, navigator.userAgent, "");
});
</script>

View File

@@ -1,16 +1,16 @@
using System;
using System;
using Umbraco.Core;
namespace umbraco.presentation.install
{
/// <summary>
/// Summary description for welcome.
/// </summary>
public partial class welcome : System.Web.UI.UserControl
{
/// <summary>
/// Summary description for welcome.
/// </summary>
public partial class welcome : System.Web.UI.UserControl
{
protected void Page_Load(object sender, System.EventArgs e)
{
protected void Page_Load(object sender, System.EventArgs e)
{
var result = ApplicationContext.Current.DatabaseContext.ValidateDatabaseSchema();
var determinedVersion = result.DetermineInstalledVersion();
@@ -20,7 +20,7 @@ namespace umbraco.presentation.install
ph_install.Visible = false;
ph_upgrade.Visible = true;
}
// Check for config!
if (GlobalSettings.Configured)
{
@@ -29,31 +29,59 @@ namespace umbraco.presentation.install
Application.UnLock();
Response.Redirect(Request.QueryString["url"] ?? "/", true);
}
}
}
protected void gotoNextStep(object sender, EventArgs e) {
Helper.RedirectToNextStep(this.Page);
protected void gotoNextStep(object sender, EventArgs e)
{
Helper.RedirectToNextStep(this.Page);
}
#region Web Form Designer generated code
override protected void OnInit(EventArgs e)
{
//
// CODEGEN: This call is required by the ASP.NET Web Form Designer.
//
InitializeComponent();
base.OnInit(e);
}
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
}
#endregion
/// <summary>
/// ph_install control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.PlaceHolder ph_install;
/// <summary>
/// ph_upgrade control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.PlaceHolder ph_upgrade;
/// <summary>
/// btnNext control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.LinkButton btnNext;
}
#region Web Form Designer generated code
override protected void OnInit(EventArgs e)
{
//
// CODEGEN: This call is required by the ASP.NET Web Form Designer.
//
InitializeComponent();
base.OnInit(e);
}
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
}
#endregion
}
}

View File

@@ -1,42 +0,0 @@
<?xml version="1.0" encoding="utf-8" ?>
<root>
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="ResMimeType">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="Version">
<value>1.0.0.0</value>
</resheader>
<resheader name="Reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="Writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>

Some files were not shown because too many files have changed in this diff Show More