summaryrefslogtreecommitdiff
path: root/modules/system/system.install
diff options
context:
space:
mode:
authorAngie Byron <webchick@24967.no-reply.drupal.org>2010-10-08 18:19:11 +0000
committerAngie Byron <webchick@24967.no-reply.drupal.org>2010-10-08 18:19:11 +0000
commit69e8ffed98fb978682c03fe5fbdc0fa4ba0c70f4 (patch)
treed1bc22cf653b0f333800456405e98552a36f97d9 /modules/system/system.install
parent7faedbdd5f9d65058463274c7b5a408e15934063 (diff)
downloadbrdo-69e8ffed98fb978682c03fe5fbdc0fa4ba0c70f4.tar.gz
brdo-69e8ffed98fb978682c03fe5fbdc0fa4ba0c70f4.tar.bz2
#932134 by catch: Fixed no upgrade path for MENU_CALLBACK API change.
Diffstat (limited to 'modules/system/system.install')
-rw-r--r--modules/system/system.install13
1 files changed, 13 insertions, 0 deletions
diff --git a/modules/system/system.install b/modules/system/system.install
index eae01725f..9c9bc2d8c 100644
--- a/modules/system/system.install
+++ b/modules/system/system.install
@@ -2863,6 +2863,19 @@ function system_update_7062() {
}
/**
+ * Delete {menu_links} records for 'type' => MENU_CALLBACK which would not appear in a fresh install.
+ */
+function system_update_7063() {
+ // For router items where 'type' => MENU_CALLBACK, {menu_router}.type is
+ // stored as 4 in Drupal 6, and 0 in Drupal 7. Fortunately Drupal 7 doesn't
+ // store any types as 4, so delete both.
+ $result = db_query('SELECT ml.mlid FROM {menu_links} ml INNER JOIN {menu_router} mr ON ml.router_path = mr.path WHERE ml.module = :system AND ml.customized = 0 AND mr.type IN(:callbacks)', array(':callbacks' => array(0, 4), ':system' => 'system'));
+ foreach ($result as $record) {
+ db_delete('menu_links')->condition('mlid', $record->mlid)->execute();
+ }
+}
+
+/**
* @} End of "defgroup updates-6.x-to-7.x"
* The next series of updates should start at 8000.
*/