diff --git a/checkin_notes b/checkin_notes
index 7531173956..acff1d14c2 100755
--- a/checkin_notes
+++ b/checkin_notes
@@ -11592,6 +11592,21 @@ David 9 Sept 2005
but do NOT trigger the transitioner; doing so creates a race condition.
(from Bruce Allen)
+ Example race condition (time ordered):
+ transitioner [reads wu.assimilate_state==READY]
+ ...(swapped out by process scheduler)
+ assimilator [reads wu.assimilate_state==READY]
+ does assimilation
+ [write wu.transition_time=NOW]
+ [write wu.assimilate_state=DONE]
+ transitioner ...(swapped back in by process scheduler)
+ [writes wu.transition_time=MAX_INT]
+ Final effect is wu.assimilate_state==DONE
+ wu.file_delete_state==INIT
+ wu.transition_time=MAX_INT
+ This is wrong: one should have wu.transition_time=NOW
+ else the WU will never change to file_delete_state=READY.
+
sched/
validator.C
@@ -11610,3 +11625,21 @@ David 10 Sept 2005
sched/
sched_shmem.C
+
+Bruce 10 Sept 2005
+ - Web pages. To control the posting of offsensive pictures, do not
+ display any user profile pictures until they have been verified by
+ project admin. When user enters or modifies picture, only they can
+ see if. If not yet verified, they will see a message saying that
+ other users can't see it until it has been verified by the project.
+ If admins have rejected it, user will see a message saying that they
+ must replace their picture or no one but themselves can see it.
+ - The only known side effect of this is that selection of UOTD is now
+ includes users with no credit. I will try to fix this.
+
+ html/
+ inc/
+ profile.inc
+ ops/
+ profile_screen_form.php
+
diff --git a/html/inc/profile.inc b/html/inc/profile.inc
index 644d18e967..7930e023aa 100644
--- a/html/inc/profile.inc
+++ b/html/inc/profile.inc
@@ -112,6 +112,27 @@ function show_textarea($name, $text) {
rowify("");
}
+// When passed profile->verification, this function is used to tell the
+// user the verification status of their profile.
+//
+function offensive_profile_warning($verify_flag) {
+ if ($verify_flag == 0) {
+ return "
+
+ Your profile will be made visible to other people
+ as soon as it has been approved by the project.
+ This may take up to a few days.
+ ";
+ } else if ($verify_flag == -1) {
+ return "
+
+ Your profile has been marked as unacceptable.
+ It is not visible to other people. Please change it.
+ ";
+ }
+ return "";
+}
+
function show_picture_option($profile) {
row1("Picture");
@@ -123,7 +144,7 @@ function show_picture_option($profile) {
To replace it,
click the \"Browse\" button and select a JPEG or PNG file (50KB or less).
@@ -203,12 +224,14 @@ function process_create_results($user, $profile) {
if ($delete_pic == "on") {
delete_user_pictures($profile->userid);
$profile->has_picture = false;
+ $profile->verification = 0;
}
$profile ? $hasPicture = $profile->has_picture: $hasPicture = false;
if (is_uploaded_file($_FILES['picture']['tmp_name'])) {
$hasPicture = true;
+ $profile->verification = 0;
// echo "
Name: " . $_FILES['picture']['name'];
// echo "
Type: " . $_FILES['picture']['type'];
@@ -230,6 +253,7 @@ function process_create_results($user, $profile) {
." response2 = '$response2',"
." language = '$language',"
." has_picture = '$hasPicture'"
+ ." verification = '$profile->verification'"
." WHERE userid = '$user->id'";
$result = mysql_query($query);
if (!$result) {
@@ -379,7 +403,7 @@ function show_user_table($members, $offset, $numToDisplay, $cols) {
echo "