CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Developer Discussion (Moderator: Donald Lobo) »
  • Deleting Settings
Pages: [1]

Author Topic: Deleting Settings  (Read 298 times)

JohnFF

  • I post frequently
  • ***
  • Posts: 235
  • Karma: 6
  • CiviCRM version: 4.4.13
  • CMS version: Drupal 7.28
  • MySQL version: 5.5.31-1
  • PHP version: 5.3.27
Deleting Settings
March 07, 2016, 03:51:26 pm
Hi gang,

There was a time when you could delete settings by saying:

DELETE FROM civicrm_setting WHERE group_name = "com.civifirst.phonenumbervalidator"

But now that there's a change to the schema, removing group_name, I wonder if there's a better way that would work on previous versions as well (up to, say, 4.4)?

There are lots of commands to set values and add them.

Is a function in core to delete settings?

I can see two options:
1) Add a delete setting function to core (that does an internal lookup of the domain id) then call that for 4.7 installs
2) Updating all extensions to do checks for versions, that then either call this function or do the same as above

(Deleting settings is important when uninstalling extensions!)
If you like empowering charities in a free and open way, then you're going to love Civi.

Email Amender: https://civicrm.org/extensions/email-amender
UK Phone Validator: https://civicrm.org/extensions/uk-phone-number-validator
http://civifirst.com
https://twitter.com/civifirst

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Developer Discussion (Moderator: Donald Lobo) »
  • Deleting Settings

This forum was archived on 2017-11-26.