Twitter bridge - shell script wasn't checking FOREIGN_FRIEND_RECV bit
darcs-hash:20081119204501-7b5ce-c501f29e754d667ba680c19ef4e5db5c0125316e.gz
This commit is contained in:
parent
e0de9c1052
commit
dbb07db602
@ -35,17 +35,21 @@ $flink->find();
|
|||||||
|
|
||||||
while ($flink->fetch()) {
|
while ($flink->fetch()) {
|
||||||
|
|
||||||
|
if (($flink->friendsync & FOREIGN_FRIEND_RECV) == FOREIGN_FRIEND_RECV) {
|
||||||
|
|
||||||
$user = User::staticGet($flink->user_id);
|
$user = User::staticGet($flink->user_id);
|
||||||
|
|
||||||
print "Updating Twitter friends for user $user->nickname ($user->id)\n";
|
print "Updating Twitter friends for user $user->nickname ($user->id)\n";
|
||||||
|
|
||||||
$fuser = $flink->getForeignUser();
|
$fuser = $flink->getForeignUser();
|
||||||
|
|
||||||
$result = save_twitter_friends($user, $fuser->id, $fuser->nickname, $flink->credentials);
|
$result = save_twitter_friends($user, $fuser->id, $fuser->nickname, $flink->credentials);
|
||||||
|
|
||||||
if ($result == false) {
|
if ($result == false) {
|
||||||
print "Problems updating Twitter friends! Check the log.\n";
|
print "Problems updating Twitter friends! Check the log.\n";
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user