Fixes for adding users with friendscontrol set to 'auto' (bug #861985)
Adding users who automatically accept friends failed when the page
from which the form was submitted was out of date. This change fixes
the case where a user adds a friend who has changed their friendscontrol
setting since the page was loaded. If they have turned friendscontrol
back to 'auth', the submission will fail with an error; if they have in
the meantime added a friend request to the user who's submitting the
form, it will succeed, and if a user with an open friend request somehow
submits the 'addfriend' form, the friend request will be removed.
Change-Id: I3ab5c1cf4dd263126abb7d2a34490d18b69b4439
Signed-off-by: Richard Mansfield <email address hidden>
Reviewed: https:/ /reviews. mahara. org/753 gitorious. org/mahara/ mahara/ commit/ 6efd41bcdd9f4c7 3feb5f5c8de4a8f eb666f3cfc
Committed: http://
Submitter: Richard Mansfield (<email address hidden>)
Branch: master
commit 6efd41bcdd9f4c7 3feb5f5c8de4a8f eb666f3cfc
Author: Richard Mansfield <email address hidden>
Date: Thu Sep 29 16:09:10 2011 +1300
Fixes for adding users with friendscontrol set to 'auto' (bug #861985)
Adding users who automatically accept friends failed when the page
from which the form was submitted was out of date. This change fixes
the case where a user adds a friend who has changed their friendscontrol
setting since the page was loaded. If they have turned friendscontrol
back to 'auth', the submission will fail with an error; if they have in
the meantime added a friend request to the user who's submitting the
form, it will succeed, and if a user with an open friend request somehow
submits the 'addfriend' form, the friend request will be removed.
Change-Id: I3ab5c1cf4dd263 126abb7d2a34490 d18b69b4439
Signed-off-by: Richard Mansfield <email address hidden>