diff options
author | Dries Buytaert <dries@buytaert.net> | 2009-01-06 13:20:17 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2009-01-06 13:20:17 +0000 |
commit | 4f35ae01a2d9836b03ad39e0e52aaa554999876a (patch) | |
tree | fe7b51d00cc7dff2bd89aceffa8007bb1557da32 /includes | |
parent | 8caab6f74e4aeeb9bbbe592a734e0c6d60fb5dc3 (diff) | |
download | brdo-4f35ae01a2d9836b03ad39e0e52aaa554999876a.tar.gz brdo-4f35ae01a2d9836b03ad39e0e52aaa554999876a.tar.bz2 |
- Patch #352803 by chx: convert query to new database layer.
Diffstat (limited to 'includes')
-rw-r--r-- | includes/locale.inc | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/includes/locale.inc b/includes/locale.inc index 2ca8636a2..4b9ce34ea 100644 --- a/includes/locale.inc +++ b/includes/locale.inc @@ -2517,12 +2517,14 @@ function locale_batch_by_language($langcode, $finished = NULL, $skip = array()) // Collect all files to import for all enabled modules and themes. $files = array(); $components = array(); - $query = "SELECT name, filename FROM {system} WHERE status = 1"; + $query = db_select('system', 's'); + $query->fields('s', array('name', 'filename')); + $query->condition('s.status', 1); if (count($skip)) { - $query .= " AND name NOT IN (" . db_placeholders($skip, 'varchar') . ")"; + $query->condition('name', $skip, 'NOT IN'); } - $result = db_query($query, $skip); - while ($component = db_fetch_object($result)) { + $result = $query->execute(); + foreach ($result as $component) { // Collect all files for all components, names as $langcode.po or // with names ending with $langcode.po. This allows for filenames // like node-module.de.po to let translators use small files and |