intval($post_id));
}
- require('notifier.php');
+// require('notifier.php');
- notifier(&$a,$post_id,$parent);
+// notifier($a,$post_id,$parent);
}
goaway($a->get_baseurl() . "/profile/$profile_uid");
$r = q("UPDATE `profile` SET `photo` = '%s', `thumb` = '%s' WHERE `id` = %d LIMIT 1",
dbesc($a->get_baseurl() . '/photo/' . $image_id . '-4.jpg'),
dbesc($a->get_baseurl() . '/photo/' . $image_id . '-5.jpg'),
- intval($profile_id));
- if($r === NULL)
+ intval($profile_id)
+ );
+ if($r === false)
$_SESSION['sysmsg'] .= "Failed to add image to profile." . EOL;
+// We should really only do this if requested, or if it is the default profile. The contact
+//table images are used in coversations.
+ $r = q("UPDATE `contact` SET `photo` = '%s', `thumb` = '%s' WHERE `uid` = %d AND `self` = 1 LIMIT 1",
+ dbesc($a->get_baseurl() . '/photo/' . $image_id . '-4.jpg'),
+ dbesc($a->get_baseurl() . '/photo/' . $image_id . '-5.jpg'),
+ intval($_SESSION['uid'])
+ );
+ if($r ===false)
+ notice("Failed to add photo to contact table." .EOL );
}
goaway($a->get_baseurl() . '/profiles');
$a->page['htmlhead'] .= replace_macros($tpl, array('$baseurl' => $a->get_baseurl()));
- $a->page['aside'] = file_get_contents('view/sidenote.tpl');
+// $a->page['aside'] = file_get_contents('view/sidenote.tpl');
$is_default = (($r[0]['is-default']) ? 1 : 0);
$tpl = file_get_contents("view/profile_edit.tpl");
$o .= replace_macros($tpl,array(
<div id="profile-edit-name-end"></div>
<div id="profile-edit-gender-wrapper" >
-<label id="profile-edit-gender-label" for="profile-edit-" >Your Gender: </label>
+<label id="profile-edit-gender-label" for="gender-select" >Your Gender: </label>
$gender
</div>
<div id="profile-edit-gender-end"></div>
</div>
<div id="sidenote-end"></div>
+</form>
</div>