From f0de2d31414be95e266b3c0a4d2a6327a6097cc5 Mon Sep 17 00:00:00 2001 From: "DMITRIY@Dmitriy-PC" Date: Fri, 29 Jun 2012 07:39:58 -0300 Subject: [PATCH] Fix 29-06-2012 - When edit tab name not in English, value saving wrong in the database, because old SQL query didn't use parameters, so caption in database was ?????????? --- src/umbraco.cms/businesslogic/ContentType.cs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/umbraco.cms/businesslogic/ContentType.cs b/src/umbraco.cms/businesslogic/ContentType.cs index aed5f197d2..c2d96a7bfe 100644 --- a/src/umbraco.cms/businesslogic/ContentType.cs +++ b/src/umbraco.cms/businesslogic/ContentType.cs @@ -774,8 +774,9 @@ namespace umbraco.cms.businesslogic /// The new Caption public void SetTabName(int tabId, string Caption) { - SqlHelper.ExecuteNonQuery( - "Update cmsTab set text = '" + Caption + "' where id = " + tabId); + SqlHelper.ExecuteNonQuery("Update cmsTab set text = @text where id = @id", + SqlHelper.CreateParameter("@text", Caption), + SqlHelper.CreateParameter("@id", tabId)); // Remove from cache FlushFromCache(Id);