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.
Comments
Comment #1
drewish commentedjdubbwya is correct. here's a proper patch.
Comment #2
dwwCommitted to HEAD and DRUPAL-5, thanks folks.
Comment #3
Anonymous (not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.