function panels_mini_uninstall in Panels 6.3
Same name and namespace in other branches
- 5.2 panels_mini/panels_mini.install \panels_mini_uninstall()
- 6.2 panels_mini/panels_mini.install \panels_mini_uninstall()
- 7.3 panels_mini/panels_mini.install \panels_mini_uninstall()
Implementation of hook_uninstall().
File
- panels_mini/
panels_mini.install, line 107
Code
function panels_mini_uninstall() {
$result = db_query("SELECT * FROM {panels_mini}");
$panels_exists = db_table_exists('panels_display');
while ($panel_mini = db_fetch_object($result)) {
// Delete all associated displays.
if (!function_exists('panels_delete_display')) {
require_once drupal_get_path('module', 'panels') . '/panels.module';
}
if ($panels_exists) {
panels_delete_display($panel_mini->did);
}
// Delete all configured blocks.
db_query("DELETE FROM {blocks} WHERE module = 'panels_mini' AND delta = %d", $panel_mini->pid);
}
// Finally, delete all mini panels.
drupal_uninstall_schema('panels_mini');
}