diff options
author | Angie Byron <webchick@24967.no-reply.drupal.org> | 2008-10-09 04:32:34 +0000 |
---|---|---|
committer | Angie Byron <webchick@24967.no-reply.drupal.org> | 2008-10-09 04:32:34 +0000 |
commit | c9c35d2d58e7edede8548b42481a364c86ce642d (patch) | |
tree | 096706bb2843dd551a5904b19da964b76819e20c | |
parent | f070c5d014c344ade86d296b0b7faba27c719d30 (diff) | |
download | brdo-c9c35d2d58e7edede8548b42481a364c86ce642d.tar.gz brdo-c9c35d2d58e7edede8548b42481a364c86ce642d.tar.bz2 |
#260372 by andershal and nedjo: Fix count bug in translation deletion logic.
-rw-r--r-- | modules/translation/translation.module | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/modules/translation/translation.module b/modules/translation/translation.module index c91a556f2..0f79c00e0 100644 --- a/modules/translation/translation.module +++ b/modules/translation/translation.module @@ -255,8 +255,8 @@ function translation_nodeapi_delete(&$node, $teaser, $page) { */ function translation_remove_from_set($node) { if (isset($node->tnid)) { - if (db_result(db_query('SELECT COUNT(*) FROM {node} WHERE tnid = %d', $node->tnid)) <= 2) { - // There would only be one node left in the set: remove the set altogether. + if (db_result(db_query('SELECT COUNT(*) FROM {node} WHERE tnid = %d', $node->tnid)) == 1) { + // There is only one node left in the set: remove the set altogether. db_query('UPDATE {node} SET tnid = 0, translate = 0 WHERE tnid = %d', $node->tnid); } else { |