function hosting_client_update_7001 in Hosting 7.3
Same name and namespace in other branches
- 7.4 client/hosting_client.install \hosting_client_update_7001()
Implements hook_update_N().
Re-build node access.
File
- client/
hosting_client.install, line 363 - Define database schema, install and update functions for the hosting_client module.
Code
function hosting_client_update_7001(&$sandbox) {
// node_access_rebuild from the the update hook fails without the following defintion.
if (!defined('HOSTING_ADMIN_CLIENT')) {
define('HOSTING_ADMIN_CLIENT', variable_get('hosting_admin_client', 1));
}
// @see https://gist.github.com/johnennewdeeson/6d4a6d667538e6149f56
_node_access_rebuild_batch_operation($sandbox);
$sandbox['#finished'] = $sandbox['sandbox']['progress'] >= $sandbox['sandbox']['max'];
if ($sandbox['#finished']) {
node_access_needs_rebuild(FALSE);
}
}