You are here

function _flag_update_sql in Flag 5

Same name and namespace in other branches
  1. 6.2 flag.install \_flag_update_sql()
  2. 6 flag.install \_flag_update_sql()
1 call to _flag_update_sql()
flag_update_5000 in ./flag.install
Delete obsolete actions provided by beta3.

File

./flag.install, line 396
Flag module install/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),
  );
}