From: Vincent Zanotti Date: Sat, 17 Jul 2010 17:08:48 +0000 (+0200) Subject: Replaces 'id' with 'uid' when addressing SQL result maps in the X-Git-Tag: xorg/1.0.1~15^2~34 X-Git-Url: http://git.polytechnique.org/?a=commitdiff_plain;h=152227e49c993bdbddff90904962b40b3e4583ed;p=platal.git Replaces 'id' with 'uid' when addressing SQL result maps in the GoogleApps cron; this was causing nicknames to be repeatedly recreated. Signed-off-by: Vincent Zanotti --- diff --git a/bin/cron/google_apps.php b/bin/cron/google_apps.php index f5133f7..a145fc4 100755 --- a/bin/cron/google_apps.php +++ b/bin/cron/google_apps.php @@ -41,7 +41,7 @@ while ($account = $res->next()) { "UPDATE gapps_accounts SET l_userid = {?} WHERE g_account_name = {?}", - $account['id'], $account['g_account_name']); + $account['uid'], $account['g_account_name']); } /* Emits a warning for GApps accounts without local uid. */ @@ -68,7 +68,7 @@ while ($nickname = $res->next()) { "UPDATE gapps_nicknames SET l_userid = {?} WHERE g_account_name = {?}", - $nickname['id'], $nickname['g_account_name']); + $nickname['uid'], $nickname['g_account_name']); } /* Emits a warning for nicknames without local uid. */ @@ -101,7 +101,7 @@ while ($nickname = $res->next()) { "INSERT INTO gapps_queue SET q_recipient_id = {?}, p_entry_date = NOW(), p_notbefore_date = NOW(), p_priority = 'offline', j_type = 'n_create', j_parameters = {?}", - $nickname['id'], + $nickname['uid'], json_encode($nickname)); } } @@ -118,7 +118,7 @@ while ($nickname = $res->next()) { "INSERT INTO gapps_queue SET q_recipient_id = {?}, p_entry_date = NOW(), p_notbefore_date = NOW(), p_priority = 'offline', j_type = 'n_delete', j_parameters = {?}", - $nickname['id'], + $nickname['uid'], json_encode($nickname)); }