diff options
author | Simon L'nu <simon.lnu@gmail.com> | 2012-03-16 20:26:38 -0400 |
---|---|---|
committer | Simon L'nu <simon.lnu@gmail.com> | 2012-03-16 20:26:38 -0400 |
commit | 6bc2d58a98d2756b16b4a6bdf2997348d0d65883 (patch) | |
tree | 846aacbf5ceb7fc9c97ba4cf3891461f8122cfd1 | |
parent | 0e9d5e0ce869a75498e1f5eff847b6037d6c1f67 (diff) | |
parent | 82f2bfea5bbf7c35450eb8fe9ee119e0b00d3d61 (diff) | |
download | volse-hubzilla-6bc2d58a98d2756b16b4a6bdf2997348d0d65883.tar.gz volse-hubzilla-6bc2d58a98d2756b16b4a6bdf2997348d0d65883.tar.bz2 volse-hubzilla-6bc2d58a98d2756b16b4a6bdf2997348d0d65883.zip |
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:
-rwxr-xr-x | include/conversation.php | 11 | ||||
-rwxr-xr-x | mod/settings.php | 14 |
2 files changed, 18 insertions, 7 deletions
diff --git a/include/conversation.php b/include/conversation.php index 88ecf502b..8ca484c9e 100755 --- a/include/conversation.php +++ b/include/conversation.php @@ -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( diff --git a/mod/settings.php b/mod/settings.php index f694b5840..3a8ad29d2 100755 --- a/mod/settings.php +++ b/mod/settings.php @@ -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'))), )); |