You are here

function pcp_update_7001 in Profile Complete Percent 7

We don't need a table to store our configuration. So move all settings to a variable.

File

./pcp.install, line 50
Install file for the pcp module.

Code

function pcp_update_7001() {
  $fields = array();
  $result = db_select('profile_pcp', 'pcp')
    ->fields('pcp')
    ->execute()
    ->fetchAll();
  foreach ($result as $row) {
    $fields[] = $row->fiid;
  }
  variable_set('pcp_enabled_fields', $fields);
  db_drop_table('profile_pcp');
}