Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
In radioactivity_cron() we have the following code:
foreach ($bundles as $bundle) {
$profile = radioactivity_get_field_profile($entity_type, $bundle, $field_name);
...
$cut_off = $profile->cut_off;
...
$cuts = db_delete($table_name)
->condition($energy, $cut_off, '<')
->condition("deleted", "0")
->execute();
If we have profiles with different cut off values (let's say 5 and 10), then we always delete rows with energy less than 5.
Comment | File | Size | Author |
---|---|---|---|
#2 | radioactivity-cron-hook-db-query-conditions-need-bundle-2680969-1.patch | 1.22 KB | paulihuhtiniemi |
Comments
Comment #2
paulihuhtiniemi CreditAttribution: paulihuhtiniemi at Wunder commentedHere's a patch that adds new condition to DB queries.
Comment #4
Sutharsan CreditAttribution: Sutharsan at LimoenGroen commentedThanks. Now committed.