Elgg/Elgg — pull request #5525 by cash (2013-05-22 01:34:13+00:00)
Title: Cleans up can_write_to_container()

This should be reviewed carefully. The question is what should happen if someone calls can_write_to_container() and there is no container passed in.

This used to be an issue with Elgg 1.0-1.7 because content plugins called this when deciding whether to display an add button. It defaults to using the page owner if not container is specified. Returning true for no container, allowed plugins to add a button on pages without a page owner (like listing all blogs). I think defaulting to the page owner is a bad idea and should be deprecated.

In Elgg 1.8 we replaced this with the elgg_register_title_button() : https://github.com/Elgg/Elgg/blob/master/engine/lib/navigation.php#L179