summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZen2008-11-04 12:07:27 (GMT)
committer Zen2008-11-04 12:07:27 (GMT)
commit231008cf5e5ef780d823dc3b9b1f0f27e9093536 (patch)
treec31a106d71dd2463718547c213a1e13523eaf58a
parent9d0ff833e8209d045c55dee744786a5063818b07 (diff)
#276941: Avoid mangling source table when possible - tested on gdo.
-rw-r--r--og_notifications/og_notifications.install3
1 files changed, 2 insertions, 1 deletions
diff --git a/og_notifications/og_notifications.install b/og_notifications/og_notifications.install
index 9a2ee94..5313f4a 100644
--- a/og_notifications/og_notifications.install
+++ b/og_notifications/og_notifications.install
@@ -98,9 +98,10 @@ function og_notifications_og_upgrade() {
$autosubscribe = variable_get('og_notification', 1) == 1 ? 1 : 0;
variable_set('og_notifications_autosubscribe', $autosubscribe);
variable_del('og_notification');
- db_query("UPDATE {og_uid_global} SET og_email = 0 WHERE og_email = 2");
db_query("INSERT INTO {og_notifications} (uid, autosubscribe) SELECT oug.uid, oug.og_email FROM {og_uid_global} oug");
+ db_query("UPDATE {og_notifications} SET autosubscribe = 0 WHERE autosubscribe = 2");
+
db_query('DROP TABLE {og_uid_global}');
variable_del('og_notifications_update_required');