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 ??????????
This commit is contained in:
DMITRIY@Dmitriy-PC
2012-06-29 07:39:58 -03:00
parent b3aaef7d0e
commit f0de2d3141

View File

@@ -774,8 +774,9 @@ namespace umbraco.cms.businesslogic
/// <param name="Caption">The new Caption</param>
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);