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.
Added an empty line between two functions (were none)
Removed a few tabs.
Issue #1220538: invalid argument supplied on line 131 by llorberb: Invalid argument supplied on line 131; also fixed a few Coder problems.
* Optimization #831760: Excessive database queries
* Added a test before the INSERT to make 100% sure that the row does not already exist (only for MySQL, in version 5.1.x it fails returning the matched count and returns the affected rows only, so if nothing changed it looks the same as if the row did not exist...)
* Removed the db lock which causes WSOD and does not resolve the db_affected_row() problem with MySQL. It seems that some people's install does not take the CLIENT_FOUND_ROWS parameter in account properly... I wonder why the rest of the system is not misbehaving much too!?
* Added a permission so the definition of the roles can be controlled by a given set of roles only.