summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--CHANGELOG.txt1
-rw-r--r--panels_mini/panels_mini.install15
2 files changed, 13 insertions, 3 deletions
diff --git a/CHANGELOG.txt b/CHANGELOG.txt
index 18add9e..7359f40 100644
--- a/CHANGELOG.txt
+++ b/CHANGELOG.txt
@@ -12,3 +12,4 @@ Panels 7.x-dev
#940002: Custom style modal was broken.
#953484: Panes were not properly using classes array.
#941532: panel nodes had some serious problems do to hook_node_*.
+#954324: Mini panels failed during uninstall.
diff --git a/panels_mini/panels_mini.install b/panels_mini/panels_mini.install
index 235e611..b0a3143 100644
--- a/panels_mini/panels_mini.install
+++ b/panels_mini/panels_mini.install
@@ -99,9 +99,11 @@ function panels_mini_schema_1() {
* Implementation of hook_uninstall().
*/
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)) {
+
+ $result = db_query("SELECT * FROM {panels_mini}");
+ $deltas = array();
+ foreach ($result as $panel_mini) {
// Delete all associated displays.
if (!function_exists('panels_delete_display')) {
require_once drupal_get_path('module', 'panels') .'/panels.module';
@@ -110,8 +112,15 @@ function panels_mini_uninstall() {
panels_delete_display($panel_mini->did);
}
+ $deltas[] = $panel_mini->pid;
+ }
+
+ if ($deltas) {
// Delete all configured blocks.
- db_query("DELETE FROM {blocks} WHERE module = 'panels_mini' AND delta = %d", $panel_mini->pid);
+ db_delete('blocks')
+ ->condition('module', 'panels_mini')
+ ->condition('delta', $deltas)
+ ->execute();
}
}