summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZen2008-11-04 12:12:13 (GMT)
committer Zen2008-11-04 12:12:13 (GMT)
commite2a9f4ef289b212f3521335476d30724b5c90492 (patch)
tree4585157d7a9962a7206e49b5f55269b263fb82cf
parentc983b4afc5a35431f8ef4d595c4a126a714780c0 (diff)
#276941: Avoid mangling source table when possible - tested on gdo. D5 port.
-rw-r--r--modules/og_notifications/og_notifications.install3
1 files changed, 2 insertions, 1 deletions
diff --git a/modules/og_notifications/og_notifications.install b/modules/og_notifications/og_notifications.install
index dab1bfb..8389da6 100644
--- a/modules/og_notifications/og_notifications.install
+++ b/modules/og_notifications/og_notifications.install
@@ -82,9 +82,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');