Page Menu
Home
In-Portal Phabricator
Search
Configure Global Search
Log In
Files
F726879
D150.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Mon, Jan 6, 2:20 AM
Size
993 B
Mime Type
text/x-diff
Expires
Tue, Jan 7, 2:20 AM (3 d, 2 h ago)
Engine
blob
Format
Raw Data
Handle
536968
Attached To
D150: INP-1498 - Add protection against missing EmailEvents table during language pack import
D150.diff
View Options
Index: branches/5.2.x/core/units/helpers/language_import_helper.php
===================================================================
--- branches/5.2.x/core/units/helpers/language_import_helper.php
+++ branches/5.2.x/core/units/helpers/language_import_helper.php
@@ -724,8 +724,17 @@
*/
function _updateEventsCache()
{
+ $table_name = $this->Application->getUnitOption('email-template', 'TableName');
+
+ // During upgrade from 5.1.x to 5.2.x without this there will be tons of notices.
+ if ( defined('IS_INSTALL') && IS_INSTALL && !$this->Conn->TableFound($table_name, true) ) {
+ $this->events_hash = array();
+
+ return;
+ }
+
$sql = 'SELECT TemplateId, CONCAT(TemplateName,"_",Type) AS EventMix
- FROM ' . $this->Application->getUnitOption('email-template', 'TableName');
+ FROM ' . $table_name;
$this->events_hash = $this->Conn->GetCol($sql, 'EventMix');
}
@@ -1254,4 +1263,4 @@
return $ids;
}
- }
\ No newline at end of file
+ }
Event Timeline
Log In to Comment