Core/DBLayer: escape MySQL keywords in page_text, page_text_locale, broadcast_text and broadcast_text_locale select queries
Port From (https://github.com/TrinityCore/TrinityCore/commit/209b90cfdd2d483ab90dfb59746c0053511899d7)
This commit is contained in:
@@ -187,7 +187,7 @@ namespace Framework.Database
|
|||||||
" FROM battlemaster_list_locale WHERE locale = ?");
|
" FROM battlemaster_list_locale WHERE locale = ?");
|
||||||
|
|
||||||
// BroadcastText.db2
|
// BroadcastText.db2
|
||||||
PrepareStatement(HotfixStatements.SEL_BROADCAST_TEXT, "SELECT Text, Text1, ID, LanguageID, ConditionID, EmotesID, Flags, ChatBubbleDurationMs, " +
|
PrepareStatement(HotfixStatements.SEL_BROADCAST_TEXT, "SELECT `Text`, Text1, ID, LanguageID, ConditionID, EmotesID, Flags, ChatBubbleDurationMs, " +
|
||||||
"VoiceOverPriorityID, SoundKitID1, SoundKitID2, EmoteID1, EmoteID2, EmoteID3, EmoteDelay1, EmoteDelay2, EmoteDelay3 FROM broadcast_text");
|
"VoiceOverPriorityID, SoundKitID1, SoundKitID2, EmoteID1, EmoteID2, EmoteID3, EmoteDelay1, EmoteDelay2, EmoteDelay3 FROM broadcast_text");
|
||||||
PrepareStatement(HotfixStatements.SEL_BROADCAST_TEXT_LOCALE, "SELECT ID, Text_lang, Text1_lang FROM broadcast_text_locale WHERE locale = ?");
|
PrepareStatement(HotfixStatements.SEL_BROADCAST_TEXT_LOCALE, "SELECT ID, Text_lang, Text1_lang FROM broadcast_text_locale WHERE locale = ?");
|
||||||
|
|
||||||
|
|||||||
@@ -8821,7 +8821,7 @@ namespace Game
|
|||||||
_pageTextLocaleStorage.Clear(); // needed for reload case
|
_pageTextLocaleStorage.Clear(); // needed for reload case
|
||||||
|
|
||||||
// 0 1 2
|
// 0 1 2
|
||||||
SQLResult result = DB.World.Query("SELECT ID, locale, Text FROM page_text_locale");
|
SQLResult result = DB.World.Query("SELECT ID, locale, `Text` FROM page_text_locale");
|
||||||
if (result.IsEmpty())
|
if (result.IsEmpty())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
@@ -9355,7 +9355,7 @@ namespace Game
|
|||||||
uint oldMSTime = Time.GetMSTime();
|
uint oldMSTime = Time.GetMSTime();
|
||||||
|
|
||||||
// 0 1 2 3 4
|
// 0 1 2 3 4
|
||||||
SQLResult result = DB.World.Query("SELECT ID, text, NextPageID, PlayerConditionID, Flags FROM page_text");
|
SQLResult result = DB.World.Query("SELECT ID, `text`, NextPageID, PlayerConditionID, Flags FROM page_text");
|
||||||
|
|
||||||
if (result.IsEmpty())
|
if (result.IsEmpty())
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user