diff options
author | Simon L'nu <simon.lnu@gmail.com> | 2012-05-26 01:23:17 -0400 |
---|---|---|
committer | Simon L'nu <simon.lnu@gmail.com> | 2012-05-26 01:23:17 -0400 |
commit | 040d1467f356eb7a5d940b9cd779eb735b401794 (patch) | |
tree | 4bbcd661b2029bc37bfcd2a6cf324d9a4b3fc7c7 /mod | |
parent | 25547cb21fff3f702a81abbeb5332094c020109e (diff) | |
parent | f5290a5a107ef2d6c309c4a3205319c9b0d13994 (diff) | |
download | volse-hubzilla-040d1467f356eb7a5d940b9cd779eb735b401794.tar.gz volse-hubzilla-040d1467f356eb7a5d940b9cd779eb735b401794.tar.bz2 volse-hubzilla-040d1467f356eb7a5d940b9cd779eb735b401794.zip |
Merge branch 'master', remote-tracking branch 'remotes/upstream/master'
* remotes/upstream/master:
missing entries on personal tab after sql text search optimise
bug #434 - default group placement not working after accepting dfrn friend request
fix wall_uploaded photo permissions on group post by member
improve location change notifications
keep private FB stuff out of personal notes
rev update
DE update to strings and templates
* master:
Diffstat (limited to 'mod')
-rw-r--r-- | mod/dfrn_confirm.php | 2 | ||||
-rw-r--r-- | mod/item.php | 4 | ||||
-rw-r--r-- | mod/network.php | 9 | ||||
-rw-r--r-- | mod/notes.php | 6 | ||||
-rw-r--r-- | mod/profiles.php | 13 | ||||
-rw-r--r-- | mod/wallmessage.php | 4 |
6 files changed, 25 insertions, 13 deletions
diff --git a/mod/dfrn_confirm.php b/mod/dfrn_confirm.php index 093993bbc..564ae5ca2 100644 --- a/mod/dfrn_confirm.php +++ b/mod/dfrn_confirm.php @@ -500,7 +500,7 @@ function dfrn_confirm_post(&$a,$handsfree = null) { ); if($contact && $g && intval($g[0]['def_gid'])) { require_once('include/group.php'); - group_add_member($uid,'',$contact[0]['id'],$g[0]['def_gid']); + group_add_member($uid,'',$contact['id'],$g[0]['def_gid']); } // Let's send our user to the contact editor in case they want to diff --git a/mod/item.php b/mod/item.php index 81dd553cd..df242d6f7 100644 --- a/mod/item.php +++ b/mod/item.php @@ -355,13 +355,15 @@ function item_post(&$a) { $image_uri = substr($image_uri,0, strpos($image_uri,'-')); if(! strlen($image_uri)) continue; - $srch = '<' . intval($contact_record['id']) . '>'; + $srch = '<' . intval($contact_id) . '>'; + $r = q("SELECT `id` FROM `photo` WHERE `allow_cid` = '%s' AND `allow_gid` = '' AND `deny_cid` = '' AND `deny_gid` = '' AND `resource-id` = '%s' AND `uid` = %d LIMIT 1", dbesc($srch), dbesc($image_uri), intval($profile_uid) ); + if(! count($r)) continue; diff --git a/mod/network.php b/mod/network.php index f43eeb67e..fbfe2de4f 100644 --- a/mod/network.php +++ b/mod/network.php @@ -414,16 +414,15 @@ function network_content(&$a, $update = 0) { if($conv) { $myurl = $a->get_baseurl() . '/profile/'. $a->user['nickname']; $myurl = substr($myurl,strpos($myurl,'://')+3); - $myurl = str_replace(array('www.','.'),array('','\\.'),$myurl); + $myurl = str_replace('www.','',$myurl); $diasp_url = str_replace('/profile/','/u/',$myurl); $sql_extra .= sprintf(" AND `item`.`parent` IN (SELECT distinct(`parent`) from item where ( `author-link` like '%s' or `tag` like '%s' or tag like '%s' )) ", - dbesc(protect_sprintf('%s' . $myurl)), - dbesc(protect_sprintf('%' . $myurl . '\\]%')), - dbesc(protect_sprintf('%' . $diasp_url . '\\]%')) + dbesc(protect_sprintf('%' . $myurl)), + dbesc(protect_sprintf('%' . $myurl . ']%')), + dbesc(protect_sprintf('%' . $diasp_url . ']%')) ); } - if($update) { // only setup pagination on initial page view diff --git a/mod/notes.php b/mod/notes.php index 0072ce447..64cc17a65 100644 --- a/mod/notes.php +++ b/mod/notes.php @@ -80,7 +80,8 @@ function notes_content(&$a,$update = false) { $r = q("SELECT COUNT(*) AS `total` FROM `item` LEFT JOIN `contact` ON `contact`.`id` = `item`.`contact-id` - WHERE `item`.`uid` = %d AND `item`.`visible` = 1 and `item`.`moderated` = 0 AND `item`.`deleted` = 0 + WHERE `item`.`uid` = %d AND `item`.`visible` = 1 and `item`.`moderated` = 0 + AND `item`.`deleted` = 0 AND `item`.`origin` = 1 AND `contact`.`blocked` = 0 AND `contact`.`pending` = 0 AND `contact`.`self` = 1 AND `item`.`id` = `item`.`parent` AND `item`.`wall` = 0 $sql_extra ", @@ -95,7 +96,8 @@ function notes_content(&$a,$update = false) { $r = q("SELECT `item`.`id` AS `item_id`, `contact`.`uid` AS `contact-uid` FROM `item` LEFT JOIN `contact` ON `contact`.`id` = `item`.`contact-id` - WHERE `item`.`uid` = %d AND `item`.`visible` = 1 AND `item`.`deleted` = 0 and `item`.`moderated` = 0 + WHERE `item`.`uid` = %d AND `item`.`visible` = 1 AND `item`.`deleted` = 0 + and `item`.`moderated` = 0 AND `item`.`origin` = 1 AND `contact`.`blocked` = 0 AND `contact`.`pending` = 0 AND `contact`.`self` = 1 AND `item`.`id` = `item`.`parent` AND `item`.`wall` = 0 $sql_extra diff --git a/mod/profiles.php b/mod/profiles.php index 26fc88765..ca3890eb9 100644 --- a/mod/profiles.php +++ b/mod/profiles.php @@ -146,7 +146,7 @@ function profiles_post(&$a) { $value = $marital; } if($withchanged) { - $changes[] = '♥ ' . t('Romantic Partner'); + $changes[] = '[color=#ff0000]♥[/color] ' . t('Romantic Partner'); $value = strip_tags($with); } if($work != $orig[0]['work']) { @@ -176,9 +176,18 @@ function profiles_post(&$a) { $changes[] = t('Interests'); $value = $interest; } - if($address != $orig[0]['address'] || $locality != $orig[0]['locality'] || $region != $orig[0]['region'] + if($address != $orig[0]['address']) { + $changes[] = t('Address'); + // New address not sent in notifications, potential privacy issues + // in case this leaks to unintended recipients. Yes, it's in the public + // profile but that doesn't mean we have to broadcast it to everybody. + } + if($locality != $orig[0]['locality'] || $region != $orig[0]['region'] || $country_name != $orig[0]['country-name']) { $changes[] = t('Location'); + $comma1 = ((($locality) && ($region || $country_name)) ? ', ' : ' '); + $comma2 = (($region && $country_name) ? ', ' : ''); + $value = $locality . $comma1 . $region . $comma2 . $country_name; } profile_activity($changes,$value); diff --git a/mod/wallmessage.php b/mod/wallmessage.php index 1a4882b64..cf349775c 100644 --- a/mod/wallmessage.php +++ b/mod/wallmessage.php @@ -44,7 +44,7 @@ function wallmessage_post(&$a) { } // Work around doubled linefeeds in Tinymce 3.5b2 -dbg(1); + $body = str_replace("\r\n","\n",$body); $body = str_replace("\n\n","\n",$body); @@ -67,7 +67,7 @@ dbg(1); default: info( t('Message sent.') . EOL ); } -dbg(0); + // goaway($a->get_baseurl() . '/profile/' . $user['nickname']); } |