ezsystems/ezpublish-kernel — pull request #917 by bchoquet-heliopsis (2014-07-07 11:14:23+00:00)
Title: [WIP] EZP-22191 II : Allow always available content to be shown by view controller

Reminder : after a chat with @lolautruche, I came up with 3 PRs regarding translation access in the view controller (#686, #687 and #689). Only #686 was merged, #689 was coldly rejected and #687 lead to a long conversation which eventually stated it was not the proper way of fixing the issue.

The issue was not fixed.

Please read logs of pull requests #686 and #687 before going further as this one is trying to fill the gap introduced by merging only one of them.

Now that your memory's refreshed, you'll hopefully see that #686 gets the view manager to load content only when it's available in one of current languages but that it does not take the always available flag in account. This PR proposes to fix this by adding a new method to ViewManager ensuring that the content we want to view is either available in one of current languages or flagged as always available.

We put this in the ViewManager to follow @lolautruche's initial suggestion (and current improper implementation) but it may be best to move these checks to the ViewController instead.

Now, this is how we fixed it on a client's project and before putting much time and effort in another vain PR, we'd like to get your opinion on this and hopefully clear directives on how it should be properly done.

As always, feel free to completely take over if you'd like to treat it faster and/or better.