ezsystems/ezpublish-legacy — pull request #740 by patrickallaert (2013-08-29 14:34:04+00:00)
Title: Fixed EZP-21469: [API] language mask on ezcontentobject incorreclty set

The `ezcontentobject.language_mask` was not updated correctly when creating content in a new language. This has been solved in https://jira.ez.no/browse/EZP-20018 but fixing the data was not part of it.

This PR proposes to fix that while upgrading to 5.2, as part of the SQL upgrade script.

It works by aggregating all ezcontentobject_version.language_mask by contentobject_id, thanks to the `BIT_OR()` SQL aggregate function, which is then combined (OR) with the "always available flag" which is stored in the 1st bit of ezcontentobject.language_mask.