function registry_update
registry_update()
Updates the registry based on the latest files listed in the database.
This function should be used when system_rebuild_module_data() does not need to be called, because it is already known that the list of files in the {system} table matches those in the file system.
Return value
TRUE if the registry was rebuilt, FALSE if another thread was rebuilding in parallel and the current thread just waited for completion.
See also
Related topics
File
- includes/bootstrap.inc, line 3511
- Functions that need to be loaded on every Drupal request.
Code
function registry_update() { // install_system_module() calls module_enable() which calls into this // function during initial system installation, so the lock system is neither // loaded nor does its storage exist yet. $in_installer = drupal_installation_attempted(); if (!$in_installer && !lock_acquire(__FUNCTION__)) { // Another request got the lock, wait for it to finish. lock_wait(__FUNCTION__); return FALSE; } require_once DRUPAL_ROOT . '/includes/registry.inc'; _registry_update(); if (!$in_installer) { lock_release(__FUNCTION__); } return TRUE; }
© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/includes!bootstrap.inc/function/registry_update/7.x