AFAICT -- but I'm not sure, since there's no documentation (#1683194: missing api.php file), hook_features_revert() shouldn't return anything.

At least, all the implementations inside features return nothing, apart from context_features_revert() which does.

I *think* the hook is invoked in _features_restore():

        features_invoke($component, $restore_hook, $module_name);

so nothing is done with the return value.

Comments

joachim’s picture

Title: pointless return in context_features_revert() » API docs and lots of implementations of hook_features_revert() disagree on what to return

I guess now I've spotted the API docs (don't know how I didn't see them...) I can see the problem is either:

a) the other way round:
b) the api docs are wrong

 * @return boolean
 *   TRUE or FALSE for whether the components were successfully reverted.
hefox’s picture

Docs are wrong/outdated

Though, the docs would be good idea to do, but doing that'd involve changing a lot of implementations to return correctl.

joachim’s picture

Title: API docs and lots of implementations of hook_features_revert() disagree on what to return » API docs and context_features_revert() have incorrect return

So it's the docs and context_features_revert() that need to be fixed :)

joachim’s picture

Issue tags: +Needs backport to D6

Needs fixing on D6 too.

mpotter’s picture

Version: 7.x-1.x-dev » 6.x-1.x-dev
Status: Active » Patch (to be ported)

Updated the API docs. Committed in 77fd2cd

  • mpotter committed 77fd2cd on 8.x-3.x
    Issue #1683196 by joachim: Fixed API docs and context_features_revert()...