Index: branches/5.0.x/core/units/helpers/language_import_helper.php =================================================================== diff -u -N -r12400 -r12591 --- branches/5.0.x/core/units/helpers/language_import_helper.php (.../language_import_helper.php) (revision 12400) +++ branches/5.0.x/core/units/helpers/language_import_helper.php (.../language_import_helper.php) (revision 12591) @@ -1,6 +1,6 @@ _languages as $language_id) { - $this->_performUpgrade($language_id, 'phrases', 'Phrase'); + $this->_performUpgrade($language_id, 'phrases', 'PhraseKey'); $this->_performUpgrade($language_id, 'emailmessages', 'EventId'); } @@ -485,6 +485,7 @@ $fields_hash = Array ( 'LanguageId' => $language_id, 'Phrase' => $phrase_node->Attributes['LABEL'], + 'PhraseKey' => mb_strtoupper($phrase_node->Attributes['LABEL']), 'PhraseType' => $phrase_node->Attributes['TYPE'], 'Module' => array_key_exists('MODULE', $phrase_node->Attributes) ? $phrase_node->Attributes['MODULE'] : 'Core', 'LastChanged' => adodb_mktime(), @@ -515,7 +516,7 @@ { $email_message_helper =& $this->Application->recallObject('EmailMessageHelper'); /* @var $email_message_helper EmailMessageHelper */ - + do { $event_id = $this->_getEventId($event_node->Attributes['EVENT'], $event_node->Attributes['TYPE']); if ($event_id) { @@ -534,7 +535,7 @@ $parsed = $email_message_helper->parseTemplate($fields_hash['Template']); $fields_hash['Subject'] = $parsed['Subject']; - + $this->Conn->doInsert($fields_hash, $this->_tables['emailmessages'], 'INSERT', false); } } while (($event_node =& $event_node->NextSibling())); Index: branches/5.0.x/core/install/install_schema.sql =================================================================== diff -u -N -r12399 -r12591 --- branches/5.0.x/core/install/install_schema.sql (.../install_schema.sql) (revision 12399) +++ branches/5.0.x/core/install/install_schema.sql (.../install_schema.sql) (revision 12591) @@ -177,18 +177,20 @@ ); CREATE TABLE Phrase ( - Phrase varchar(255) NOT NULL default '', + Phrase varchar(255) NOT NULL DEFAULT '', + PhraseKey varchar(255) NOT NULL, Translation text NOT NULL, - PhraseType int(11) NOT NULL default '0', - PhraseId int(11) NOT NULL auto_increment, - LanguageId int(11) NOT NULL default '0', - LastChanged int(10) unsigned NOT NULL default '0', - LastChangeIP varchar(15) NOT NULL default '', - Module varchar(30) NOT NULL default 'In-Portal', - PRIMARY KEY (PhraseId), + PhraseType int(11) NOT NULL DEFAULT '0', + PhraseId int(11) NOT NULL AUTO_INCREMENT, + LanguageId int(11) NOT NULL DEFAULT '0', + LastChanged int(10) unsigned NOT NULL DEFAULT '0', + LastChangeIP varchar(15) NOT NULL DEFAULT '', + Module varchar(30) NOT NULL DEFAULT 'In-Portal', + PRIMARY KEY (PhraseId), UNIQUE KEY LanguageId_2 (LanguageId,Phrase), KEY LanguageId (LanguageId), - KEY Phrase_Index (Phrase) + KEY Phrase_Index (Phrase), + KEY PhraseKey (PhraseKey) ); CREATE TABLE PhraseCache ( Index: branches/5.0.x/core/install/upgrades.sql =================================================================== diff -u -N -r12587 -r12591 --- branches/5.0.x/core/install/upgrades.sql (.../upgrades.sql) (revision 12587) +++ branches/5.0.x/core/install/upgrades.sql (.../upgrades.sql) (revision 12591) @@ -1141,9 +1141,8 @@ UPDATE Permissions SET Permission = REPLACE(Permission, 'proj-base:', 'in-portal:'); ALTER TABLE CategoryItems ADD INDEX (ItemResourceId); -ALTER TABLE CategoryItems - DROP INDEX Filename, - ADD INDEX Filename(Filename); +ALTER TABLE CategoryItems DROP INDEX Filename; +ALTER TABLE CategoryItems ADD INDEX Filename(Filename); DROP TABLE Pages; DELETE FROM PermissionConfig WHERE PermissionName LIKE 'PAGE.%'; @@ -1495,4 +1494,15 @@ INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:service.edit', 11, 1, 1, 0); +UPDATE Phrase SET Phrase = 'la_col_Rating' WHERE Phrase = 'la_col_rating'; +UPDATE Phrase SET Phrase = 'la_text_Review' WHERE Phrase = 'la_text_review'; +UPDATE Phrase SET Phrase = 'la_title_Reviews' WHERE Phrase = 'la_title_reviews'; +UPDATE Phrase SET Phrase = 'la_ToolTip_cancel' WHERE Phrase = 'la_tooltip_cancel'; + +ALTER TABLE Phrase + ADD PhraseKey VARCHAR(255) NOT NULL AFTER Phrase, + ADD INDEX (PhraseKey); + +UPDATE Phrase SET PhraseKey = UPPER(Phrase); + UPDATE Modules SET Loaded = 1 WHERE `Name` = 'In-Portal'; \ No newline at end of file Index: branches/5.0.x/core/kernel/languages/phrases_cache.php =================================================================== diff -u -N -r12466 -r12591 --- branches/5.0.x/core/kernel/languages/phrases_cache.php (.../phrases_cache.php) (revision 12466) +++ branches/5.0.x/core/kernel/languages/phrases_cache.php (.../phrases_cache.php) (revision 12591) @@ -1,6 +1,6 @@ LanguageId . ') AND (Phrase = ' . $this->Conn->qstr($label) . ')'; // UPPER(Phrase) + WHERE (LanguageId = ' . $this->LanguageId . ') AND (PhraseKey = ' . $this->Conn->qstr($label) . ')'; $res = $this->Conn->GetRow($sql); if ($res === false || count($res) == 0) {