Merge commit 'f06c9e823545d8e86309bb751e63b99a2a3b1a18' into 7.1.0

Conflicts:
	src/Umbraco.Core/Models/Member.cs
	src/Umbraco.Core/Persistence/Querying/BaseExpressionHelper.cs
	src/Umbraco.Core/Persistence/Repositories/MemberTypeRepository.cs
	src/Umbraco.Core/Umbraco.Core.csproj
	src/Umbraco.Core/packages.config
	src/Umbraco.Tests/Persistence/Repositories/MemberRepositoryTest.cs
	src/Umbraco.Web.UI/config/ClientDependency.config
	src/Umbraco.Web/umbraco.presentation/umbraco/controls/passwordChanger.ascx.cs
This commit is contained in:
Shannon
2014-02-18 18:03:29 +11:00
22 changed files with 226 additions and 72 deletions

View File

@@ -11,6 +11,8 @@ namespace Umbraco.Core.Persistence.SqlSyntax
/// </summary>
public interface ISqlSyntaxProvider
{
string EscapeString(string val);
string GetStringColumnEqualComparison(string column, string value, TextColumnType columnType);
string GetStringColumnStartsWithComparison(string column, string value, TextColumnType columnType);
string GetStringColumnEndsWithComparison(string column, string value, TextColumnType columnType);

View File

@@ -327,5 +327,10 @@ namespace Umbraco.Core.Persistence.SqlSyntax
// add message to check with their hosting provider
return supportsCaseInsensitiveQueries;
}
public override string EscapeString(string val)
{
return PetaPocoExtensions.EscapeAtSymbols(MySql.Data.MySqlClient.MySqlHelper.EscapeString(val));
}
}
}

View File

@@ -103,6 +103,11 @@ namespace Umbraco.Core.Persistence.SqlSyntax
DbTypeMap.Set<byte[]>(DbType.Binary, BlobColumnDefinition);
}
public virtual string EscapeString(string val)
{
return PetaPocoExtensions.EscapeAtSymbols(val.Replace("'", "''"));
}
public virtual string GetStringColumnEqualComparison(string column, string value, TextColumnType columnType)
{
//use the 'upper' method to always ensure strings are matched without case sensitivity no matter what the db setting.