The project usage function does not drop the tables if a prefix is used. The problem is in PHP if you use the " type of quotes for a string definition the curly braces( { } ) take on a new meaning. So, to properly use that symantic you have to chane the function to look like below

function project_usage_uninstall() {
  $tables = array(
    'project_usage_raw',
    'project_usage_day',
    'project_usage_week_project',
    'project_usage_week_release',
  );
  foreach ($tables as $table) {
    if (db_table_exists($table)) {
      db_query("DROP TABLE {{$table}}"); // changed {$table} to {{$table}}
    }
  }

  $variables = array(
    'project_usage_last_daily',
    'project_usage_last_weekly',
    'project_usage_life_daily',
    'project_usage_life_weekly_project',
    'project_usage_life_weekly_release',
  );
  foreach ($variables as $variable) {
    variable_del($variable);
  }
}

There reason is because the PHP interpreter interprest the first set of curly braces and a variable enclosure, and allows a programmer to put arrays inside of strings and/or objects inside of strings without having to use the contcat operator.

CommentFileSizeAuthor
#1 project_usage_319427.patch604 bytesdrewish

Comments

drewish’s picture

StatusFileSize
new604 bytes

jdubbwya is correct. here's a proper patch.

dww’s picture

Status: Needs review » Fixed

Committed to HEAD and DRUPAL-5, thanks folks.

Anonymous’s picture

Status: Fixed » Closed (fixed)

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