You are here

function _flag_update_sql in Flag 6

Same name and namespace in other branches
  1. 5 flag.install \_flag_update_sql()
  2. 6.2 flag.install \_flag_update_sql()
1 call to _flag_update_sql()
flag_update_6000 in ./flag.install
Add auto-increment to the flags.fid column for users upgrading from Drupal 5.

File

./flag.install, line 465
Flag module install/schema/update hooks.

Code

function _flag_update_sql($sql) {
  $args = func_get_args();
  array_shift($args);
  $result = db_query($sql, $args);

  // Users are going to see '%s' and '%d' in the report and they're going to
  // think there's a bug. So lets replace the placeholders with something less
  // suspicious.
  $sql = strtr($sql, array(
    '%s' => '***',
    '%d' => '***',
  ));
  return array(
    'success' => $result !== FALSE,
    'query' => check_plain($sql),
  );
}