I just wanted to report a small/minor bug related with the installation file of the module.

Upon uninstall, it seems module is not deleting many of the configuration variables related with the Baidu Analytics module.
Basically, we would need to add in baidu_analytics_uninstall (baidu_analytics.install line 11), many more calls to variable_del.

We might as well just want to run a db_delete query to delete all configuration variables starting with baidu_analytics.

It might be suggested to replace all the calls to variable_del, with a single db_delete with a baidu_analytics_% wildcard for the field in the condition.

Please let me know if you would have any questions, objections, comments, suggestions, recommendations or concerns on any aspects of this bug report, I would be glad to provide more information or explain in more details.

Any questions, feedback, testing, changes, ideas or recommendations would be highly appreciated.
Thanks to all in advance.

Comments

dydave’s picture

Status: Active » Fixed

Quick follow-up on this bug report:

Modified the file baidu_analytics.install and more particularly the function baidu_analytics_uninstall to execute a db_delete query to remove all the configuration variables added by the module and prefixed with baidu_analytics:

  db_delete('variable')
      ->condition('name', 'baidu_analytics_%', 'LIKE')
      ->execute();

Added a short inline comment to explain all configuration variables would be removed with this query.

If any more configuration variables prefixed with baidu_analytics are added to the module in the future, this function wouldn't have to be modified again for the newly added variable to be removed as expected when module in uninstalled.

I went ahead and committed the changes against the 7.x-1.x branch at 15c3d21.

I allowed myself to mark this issue as fixed for now, but feel free to re-open it, or post a new ticket, at any time if you have any further objections with this ticket or related commit 15c3d21 (we would surely be happy to hear your feedback).

Please let me know if you would have any further comments, feedback, questions, issues, objections, suggestions or concerns on the commit or this bug report in general, I would be glad to provide more information or explain in more details.

Thanks in advance to everyone for your testing, reviews, feedback and comments on this issue.
Cheers!

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.