Merge branch 'master', remote-tracking branch 'remotes/upstream/master'

* remotes/upstream/master:
  convert boolean or int settings to strings to work around issues with template processing
  add "send pm" link to photo dropdown for Diaspora contacts

* master:
This commit is contained in:
Simon L'nu 2012-03-16 20:26:38 -04:00
commit 6bc2d58a98
2 changed files with 18 additions and 7 deletions

View File

@ -779,6 +779,17 @@ function item_photo_menu($item){
if(($cid) && (! $item['self'])) {
$contact_url = $a->get_baseurl($ssl_state) . '/contacts/' . $cid;
$posts_link = $a->get_baseurl($ssl_state) . '/network/?cid=' . $cid;
$clean_url = normalise_link($item['author-link']);
if((local_user()) && (local_user() == $item['uid'])) {
if(isset($a->contacts) && x($a->contacts,$clean_url)) {
if($a->contacts[$clean_url]['network'] === NETWORK_DIASPORA) {
$pm_url = $a->get_baseurl($ssl_state) . '/message/new/' . $cid;
}
}
}
}
$menu = Array(

View File

@ -652,20 +652,20 @@ function settings_content(&$a) {
$blocktags = $a->user['blocktags'];
$expire_items = get_pconfig(local_user(), 'expire','items');
$expire_items = (($expire_items===false)?1:$expire_items); // default if not set: 1
$expire_items = (($expire_items===false)? '1' : $expire_items); // default if not set: 1
$expire_notes = get_pconfig(local_user(), 'expire','notes');
$expire_notes = (($expire_notes===false)?1:$expire_notes); // default if not set: 1
$expire_notes = (($expire_notes===false)? '1' : $expire_notes); // default if not set: 1
$expire_starred = get_pconfig(local_user(), 'expire','starred');
$expire_starred = (($expire_starred===false)?1:$expire_starred); // default if not set: 1
$expire_starred = (($expire_starred===false)? '1' : $expire_starred); // default if not set: 1
$expire_photos = get_pconfig(local_user(), 'expire','photos');
$expire_photos = (($expire_photos===false)?0:$expire_photos); // default if not set: 0
$expire_photos = (($expire_photos===false)? '0' : $expire_photos); // default if not set: 0
$suggestme = get_pconfig(local_user(), 'system','suggestme');
$suggestme = (($suggestme===false)?0:$suggestme); // default if not set: 0
$suggestme = (($suggestme===false)? '0': $suggestme); // default if not set: 0
$browser_update = intval(get_pconfig(local_user(), 'system','update_interval'));
$browser_update = (($browser_update == 0) ? 40 : $browser_update / 1000); // default if not set: 40 seconds
@ -736,13 +736,13 @@ function settings_content(&$a) {
));
$blockwall = replace_macros($opt_tpl,array(
'$field' => array('blockwall', t('Allow friends to post to your profile page?'), ! $a->user['blockwall'], '', array(t('No'),t('Yes'))),
'$field' => array('blockwall', t('Allow friends to post to your profile page?'), (intval($a->user['blockwall']) ? '0' : '1'), '', array(t('No'),t('Yes'))),
));
$blocktags = replace_macros($opt_tpl,array(
'$field' => array('blocktags', t('Allow friends to tag your posts?'), ! $a->user['blocktags'], '', array(t('No'),t('Yes'))),
'$field' => array('blocktags', t('Allow friends to tag your posts?'), (intval($a->user['blocktags']) ? '0' : '1'), '', array(t('No'),t('Yes'))),
));