1
1
Fork 0

some fixes after cloning to a new site

This commit is contained in:
Mike Macgirvin 2010-07-07 06:29:32 -07:00
parent c10e772318
commit dea552b74f
5 changed files with 17 additions and 6 deletions

View file

@ -58,10 +58,10 @@ function item_post(&$a) {
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");

View file

@ -88,9 +88,19 @@ function profile_photo_post(&$a) {
$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');

View file

@ -138,7 +138,7 @@ function profiles_content(&$a) {
$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(

View file

@ -18,7 +18,7 @@ $default
<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>

View file

@ -14,4 +14,5 @@ Write something
</div>
<div id="sidenote-end"></div>
</form>
</div>