diff options
author | Angie Byron <webchick@24967.no-reply.drupal.org> | 2008-10-11 19:23:36 +0000 |
---|---|---|
committer | Angie Byron <webchick@24967.no-reply.drupal.org> | 2008-10-11 19:23:36 +0000 |
commit | 2f83f862b635149c821741b4bebed29883de4f9c (patch) | |
tree | 1f0205c71ee7b98c52b491b3f95af7198233fe85 /includes/registry.inc | |
parent | e0cf9c21a1e1c8d6825a1d5af27f474f2cd6fc02 (diff) | |
download | brdo-2f83f862b635149c821741b4bebed29883de4f9c.tar.gz brdo-2f83f862b635149c821741b4bebed29883de4f9c.tar.bz2 |
#319405 by Crell: Code style clean-up for registry queries.
Diffstat (limited to 'includes/registry.inc')
-rw-r--r-- | includes/registry.inc | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/includes/registry.inc b/includes/registry.inc index 2f58f36de..d240caa9d 100644 --- a/includes/registry.inc +++ b/includes/registry.inc @@ -61,8 +61,12 @@ function _registry_rebuild() { else { // Flush the registry of resources in files that are no longer on disc // or don't belong to installed modules. - db_delete('registry')->condition('filename', $filename)->execute(); - db_delete('registry_file')->condition('filename', $filename)->execute(); + db_delete('registry') + ->condition('filename', $filename) + ->execute(); + db_delete('registry_file') + ->condition('filename', $filename) + ->execute(); } } _registry_parse_files($files); @@ -116,7 +120,9 @@ function _registry_parse_files($files) { function _registry_parse_file($filename, $contents) { static $map = array(T_FUNCTION => 'function', T_CLASS => 'class', T_INTERFACE => 'interface'); // Delete registry entries for this file, so we can insert the new resources. - db_delete('registry')->condition('filename', $filename)->execute(); + db_delete('registry') + ->condition('filename', $filename) + ->execute(); $tokens = token_get_all($contents); while ($token = next($tokens)) { // Ignore all tokens except for those we are specifically saving. @@ -132,7 +138,10 @@ function _registry_parse_file($filename, $contents) { // filename instead of another. // TODO: Convert this back to an insert query after all duplicate // function names have been purged from Drupal. - db_merge('registry')->key(array('name' => $resource_name, 'type' => $type))->fields(array('filename' => $filename))->execute(); + db_merge('registry') + ->key(array('name' => $resource_name, 'type' => $type)) + ->fields(array('filename' => $filename)) + ->execute(); // We skip the body because classes may contain functions. _registry_skip_body($tokens); |