From 73c61b6f96353ae7cbf73db7ed8b22f74f8ebdc3 Mon Sep 17 00:00:00 2001 From: friendica Date: Sat, 26 May 2012 16:11:51 -0700 Subject: [PATCH 02/13] allow force ssl on notifications --- boot.php | 2 +- include/enotify.php | 2 +- util/messages.po | 146 +++++++++++++++++++++++--------------------- 3 files changed, 77 insertions(+), 73 deletions(-) diff --git a/boot.php b/boot.php index 64420f4341..3f4820d67d 100644 --- a/boot.php +++ b/boot.php @@ -9,7 +9,7 @@ require_once('include/nav.php'); require_once('include/cache.php'); define ( 'FRIENDICA_PLATFORM', 'Friendica'); -define ( 'FRIENDICA_VERSION', '3.0.1354' ); +define ( 'FRIENDICA_VERSION', '3.0.1355' ); define ( 'DFRN_PROTOCOL_VERSION', '2.23' ); define ( 'DB_UPDATE_VERSION', 1144 ); diff --git a/include/enotify.php b/include/enotify.php index ca134ac86c..f7ef74fac5 100644 --- a/include/enotify.php +++ b/include/enotify.php @@ -13,7 +13,7 @@ function notification($params) { $banner = t('Friendica Notification'); $product = FRIENDICA_PLATFORM; - $siteurl = z_path(); + $siteurl = $a->get_baseurl(true); $thanks = t('Thank You,'); $sitename = get_config('config','sitename'); $site_admin = sprintf( t('%s Administrator'), $sitename); diff --git a/util/messages.po b/util/messages.po index 1fd6628b82..2f6a1c4068 100644 --- a/util/messages.po +++ b/util/messages.po @@ -6,9 +6,9 @@ #, fuzzy msgid "" msgstr "" -"Project-Id-Version: 3.0.1354\n" +"Project-Id-Version: 3.0.1355\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2012-05-25 10:00-0700\n" +"POT-Creation-Date: 2012-05-26 10:00-0700\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -52,7 +52,7 @@ msgstr "" #: ../../mod/message.php:96 ../../mod/allfriends.php:9 #: ../../mod/nogroup.php:25 ../../mod/wall_upload.php:53 #: ../../mod/follow.php:8 ../../mod/display.php:138 ../../mod/profiles.php:7 -#: ../../mod/profiles.php:365 ../../mod/delegate.php:6 +#: ../../mod/profiles.php:374 ../../mod/delegate.php:6 #: ../../mod/suggest.php:28 ../../mod/invite.php:13 ../../mod/invite.php:81 #: ../../mod/dfrn_confirm.php:53 ../../addon/facebook/facebook.php:503 #: ../../include/items.php:3214 ../../index.php:306 @@ -131,7 +131,7 @@ msgstr "" #: ../../mod/settings.php:760 ../../mod/settings.php:964 #: ../../mod/manage.php:109 ../../mod/group.php:85 ../../mod/admin.php:417 #: ../../mod/admin.php:653 ../../mod/admin.php:789 ../../mod/admin.php:988 -#: ../../mod/admin.php:1075 ../../mod/profiles.php:534 +#: ../../mod/admin.php:1075 ../../mod/profiles.php:543 #: ../../mod/invite.php:119 ../../addon/facebook/facebook.php:605 #: ../../addon/yourls/yourls.php:76 ../../addon/ljpost/ljpost.php:93 #: ../../addon/nsfw/nsfw.php:57 ../../addon/planets/planets.php:158 @@ -331,7 +331,7 @@ msgstr "" #: ../../mod/settings.php:910 ../../mod/settings.php:916 #: ../../mod/settings.php:952 ../../mod/settings.php:953 #: ../../mod/settings.php:954 ../../mod/settings.php:955 -#: ../../mod/register.php:511 ../../mod/profiles.php:511 +#: ../../mod/register.php:511 ../../mod/profiles.php:520 msgid "Yes" msgstr "" @@ -342,7 +342,7 @@ msgstr "" #: ../../mod/settings.php:910 ../../mod/settings.php:916 #: ../../mod/settings.php:952 ../../mod/settings.php:953 #: ../../mod/settings.php:954 ../../mod/settings.php:955 -#: ../../mod/register.php:512 ../../mod/profiles.php:512 +#: ../../mod/register.php:512 ../../mod/profiles.php:521 msgid "No" msgstr "" @@ -2879,34 +2879,34 @@ msgstr "" msgid "Empty post discarded." msgstr "" -#: ../../mod/item.php:377 ../../mod/wall_upload.php:99 +#: ../../mod/item.php:379 ../../mod/wall_upload.php:99 #: ../../mod/wall_upload.php:108 ../../mod/wall_upload.php:115 #: ../../include/message.php:144 msgid "Wall Photos" msgstr "" -#: ../../mod/item.php:786 +#: ../../mod/item.php:788 msgid "System error. Post not saved." msgstr "" -#: ../../mod/item.php:811 +#: ../../mod/item.php:813 #, php-format msgid "" "This message was sent to you by %s, a member of the Friendica social network." msgstr "" -#: ../../mod/item.php:813 +#: ../../mod/item.php:815 #, php-format msgid "You may visit them online at %s" msgstr "" -#: ../../mod/item.php:814 +#: ../../mod/item.php:816 msgid "" "Please contact the sender by replying to this post if you do not wish to " "receive these messages." msgstr "" -#: ../../mod/item.php:816 +#: ../../mod/item.php:818 #, php-format msgid "%s posted an update." msgstr "" @@ -3788,8 +3788,8 @@ msgstr "" msgid "Search" msgstr "" -#: ../../mod/profiles.php:21 ../../mod/profiles.php:375 -#: ../../mod/profiles.php:489 ../../mod/dfrn_confirm.php:62 +#: ../../mod/profiles.php:21 ../../mod/profiles.php:384 +#: ../../mod/profiles.php:498 ../../mod/dfrn_confirm.php:62 msgid "Profile not found." msgstr "" @@ -3833,237 +3833,241 @@ msgstr "" msgid "Interests" msgstr "" -#: ../../mod/profiles.php:181 +#: ../../mod/profiles.php:180 +msgid "Address" +msgstr "" + +#: ../../mod/profiles.php:187 msgid "Location" msgstr "" -#: ../../mod/profiles.php:253 +#: ../../mod/profiles.php:262 msgid "Profile updated." msgstr "" -#: ../../mod/profiles.php:320 +#: ../../mod/profiles.php:329 msgid " and " msgstr "" -#: ../../mod/profiles.php:328 +#: ../../mod/profiles.php:337 msgid "public profile" msgstr "" -#: ../../mod/profiles.php:331 +#: ../../mod/profiles.php:340 #, php-format msgid "%1$s changed %2$s to “%3$s”" msgstr "" -#: ../../mod/profiles.php:332 +#: ../../mod/profiles.php:341 #, php-format msgid " - Visit %1$s's %2$s" msgstr "" -#: ../../mod/profiles.php:335 +#: ../../mod/profiles.php:344 #, php-format msgid "%1$s has an updated %2$s, changing %3$s." msgstr "" -#: ../../mod/profiles.php:394 +#: ../../mod/profiles.php:403 msgid "Profile deleted." msgstr "" -#: ../../mod/profiles.php:412 ../../mod/profiles.php:446 +#: ../../mod/profiles.php:421 ../../mod/profiles.php:455 msgid "Profile-" msgstr "" -#: ../../mod/profiles.php:431 ../../mod/profiles.php:473 +#: ../../mod/profiles.php:440 ../../mod/profiles.php:482 msgid "New profile created." msgstr "" -#: ../../mod/profiles.php:452 +#: ../../mod/profiles.php:461 msgid "Profile unavailable to clone." msgstr "" -#: ../../mod/profiles.php:510 +#: ../../mod/profiles.php:519 msgid "Hide your contact/friend list from viewers of this profile?" msgstr "" -#: ../../mod/profiles.php:533 +#: ../../mod/profiles.php:542 msgid "Edit Profile Details" msgstr "" -#: ../../mod/profiles.php:535 +#: ../../mod/profiles.php:544 msgid "View this profile" msgstr "" -#: ../../mod/profiles.php:536 +#: ../../mod/profiles.php:545 msgid "Create a new profile using these settings" msgstr "" -#: ../../mod/profiles.php:537 +#: ../../mod/profiles.php:546 msgid "Clone this profile" msgstr "" -#: ../../mod/profiles.php:538 +#: ../../mod/profiles.php:547 msgid "Delete this profile" msgstr "" -#: ../../mod/profiles.php:539 +#: ../../mod/profiles.php:548 msgid "Profile Name:" msgstr "" -#: ../../mod/profiles.php:540 +#: ../../mod/profiles.php:549 msgid "Your Full Name:" msgstr "" -#: ../../mod/profiles.php:541 +#: ../../mod/profiles.php:550 msgid "Title/Description:" msgstr "" -#: ../../mod/profiles.php:542 +#: ../../mod/profiles.php:551 msgid "Your Gender:" msgstr "" -#: ../../mod/profiles.php:543 +#: ../../mod/profiles.php:552 #, php-format msgid "Birthday (%s):" msgstr "" -#: ../../mod/profiles.php:544 +#: ../../mod/profiles.php:553 msgid "Street Address:" msgstr "" -#: ../../mod/profiles.php:545 +#: ../../mod/profiles.php:554 msgid "Locality/City:" msgstr "" -#: ../../mod/profiles.php:546 +#: ../../mod/profiles.php:555 msgid "Postal/Zip Code:" msgstr "" -#: ../../mod/profiles.php:547 +#: ../../mod/profiles.php:556 msgid "Country:" msgstr "" -#: ../../mod/profiles.php:548 +#: ../../mod/profiles.php:557 msgid "Region/State:" msgstr "" -#: ../../mod/profiles.php:549 +#: ../../mod/profiles.php:558 msgid " Marital Status:" msgstr "" -#: ../../mod/profiles.php:550 +#: ../../mod/profiles.php:559 msgid "Who: (if applicable)" msgstr "" -#: ../../mod/profiles.php:551 +#: ../../mod/profiles.php:560 msgid "Examples: cathy123, Cathy Williams, cathy@example.com" msgstr "" -#: ../../mod/profiles.php:552 ../../include/profile_advanced.php:43 +#: ../../mod/profiles.php:561 ../../include/profile_advanced.php:43 msgid "Sexual Preference:" msgstr "" -#: ../../mod/profiles.php:553 +#: ../../mod/profiles.php:562 msgid "Homepage URL:" msgstr "" -#: ../../mod/profiles.php:554 ../../include/profile_advanced.php:49 +#: ../../mod/profiles.php:563 ../../include/profile_advanced.php:49 msgid "Political Views:" msgstr "" -#: ../../mod/profiles.php:555 +#: ../../mod/profiles.php:564 msgid "Religious Views:" msgstr "" -#: ../../mod/profiles.php:556 +#: ../../mod/profiles.php:565 msgid "Public Keywords:" msgstr "" -#: ../../mod/profiles.php:557 +#: ../../mod/profiles.php:566 msgid "Private Keywords:" msgstr "" -#: ../../mod/profiles.php:558 +#: ../../mod/profiles.php:567 msgid "Example: fishing photography software" msgstr "" -#: ../../mod/profiles.php:559 +#: ../../mod/profiles.php:568 msgid "(Used for suggesting potential friends, can be seen by others)" msgstr "" -#: ../../mod/profiles.php:560 +#: ../../mod/profiles.php:569 msgid "(Used for searching profiles, never shown to others)" msgstr "" -#: ../../mod/profiles.php:561 +#: ../../mod/profiles.php:570 msgid "Tell us about yourself..." msgstr "" -#: ../../mod/profiles.php:562 +#: ../../mod/profiles.php:571 msgid "Hobbies/Interests" msgstr "" -#: ../../mod/profiles.php:563 +#: ../../mod/profiles.php:572 msgid "Contact information and Social Networks" msgstr "" -#: ../../mod/profiles.php:564 +#: ../../mod/profiles.php:573 msgid "Musical interests" msgstr "" -#: ../../mod/profiles.php:565 +#: ../../mod/profiles.php:574 msgid "Books, literature" msgstr "" -#: ../../mod/profiles.php:566 +#: ../../mod/profiles.php:575 msgid "Television" msgstr "" -#: ../../mod/profiles.php:567 +#: ../../mod/profiles.php:576 msgid "Film/dance/culture/entertainment" msgstr "" -#: ../../mod/profiles.php:568 +#: ../../mod/profiles.php:577 msgid "Love/romance" msgstr "" -#: ../../mod/profiles.php:569 +#: ../../mod/profiles.php:578 msgid "Work/employment" msgstr "" -#: ../../mod/profiles.php:570 +#: ../../mod/profiles.php:579 msgid "School/education" msgstr "" -#: ../../mod/profiles.php:575 +#: ../../mod/profiles.php:584 msgid "" "This is your public profile.
It may " "be visible to anybody using the internet." msgstr "" -#: ../../mod/profiles.php:585 ../../mod/directory.php:111 +#: ../../mod/profiles.php:594 ../../mod/directory.php:111 msgid "Age: " msgstr "" -#: ../../mod/profiles.php:620 +#: ../../mod/profiles.php:629 msgid "Edit/Manage Profiles" msgstr "" -#: ../../mod/profiles.php:621 ../../boot.php:1069 +#: ../../mod/profiles.php:630 ../../boot.php:1069 msgid "Change profile photo" msgstr "" -#: ../../mod/profiles.php:622 ../../boot.php:1070 +#: ../../mod/profiles.php:631 ../../boot.php:1070 msgid "Create New Profile" msgstr "" -#: ../../mod/profiles.php:633 ../../boot.php:1080 +#: ../../mod/profiles.php:642 ../../boot.php:1080 msgid "Profile Image" msgstr "" -#: ../../mod/profiles.php:635 ../../boot.php:1083 +#: ../../mod/profiles.php:644 ../../boot.php:1083 msgid "visible to everybody" msgstr "" -#: ../../mod/profiles.php:636 ../../boot.php:1084 +#: ../../mod/profiles.php:645 ../../boot.php:1084 msgid "Edit visibility" msgstr "" From 5a7363b248e51b93c401a84d1b99f33632c44711 Mon Sep 17 00:00:00 2001 From: friendica Date: Sat, 26 May 2012 16:21:48 -0700 Subject: [PATCH 03/13] more ssl policy stuff --- boot.php | 25 +++++++++++-------------- 1 file changed, 11 insertions(+), 14 deletions(-) diff --git a/boot.php b/boot.php index 3f4820d67d..b41b8d9a0e 100644 --- a/boot.php +++ b/boot.php @@ -441,22 +441,19 @@ if(! class_exists('App')) { if(intval($this->config['system']['ssl_policy']) === intval(SSL_POLICY_FULL)) $scheme = 'https'; - // We need to populate the $ssl flag across the entire program before turning this on. - // Basically, we'll have $ssl = true on any links which can only be seen by a logged in user - // (and also the login link). Anything seen by an outsider will have it turned off. - // At present, setting SSL_POLICY_SELFSIGN will only force remote contacts to update their - // contact links to this site with "http:" if they are currently using "https:" + // Basically, we have $ssl = true on any links which can only be seen by a logged in user + // (and also the login link). Anything seen by an outsider will have it turned off. - // if($this->config['system']['ssl_policy'] == SSL_POLICY_SELFSIGN) { - // if($ssl) - // $scheme = 'https'; - // else - // $scheme = 'http'; - // } - } + if($this->config['system']['ssl_policy'] == SSL_POLICY_SELFSIGN) { + if($ssl) + $scheme = 'https'; + else + $scheme = 'http'; + } + } - $this->baseurl = $scheme . "://" . $this->hostname . ((isset($this->path) && strlen($this->path)) ? '/' . $this->path : '' ); - return $this->baseurl; + $this->baseurl = $scheme . "://" . $this->hostname . ((isset($this->path) && strlen($this->path)) ? '/' . $this->path : '' ); + return $this->baseurl; } function set_baseurl($url) { From 08941d42856984a3076e972804ac016400341f91 Mon Sep 17 00:00:00 2001 From: friendica Date: Sat, 26 May 2012 23:46:42 -0700 Subject: [PATCH 04/13] handle multiple underscores in D* links --- include/auth.php | 2 ++ include/bb2diaspora.php | 7 ++++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/include/auth.php b/include/auth.php index b87662fea2..cba6a67a7f 100644 --- a/include/auth.php +++ b/include/auth.php @@ -53,6 +53,8 @@ if((isset($_SESSION)) && (x($_SESSION,'authenticated')) && ((! (x($_POST,'auth-p $check = get_config('system','paranoia'); // extra paranoia - if the IP changed, log them out if($check && ($_SESSION['addr'] != $_SERVER['REMOTE_ADDR'])) { + logger('Session address changed. Paranoid setting in effect, blocking session. ' + . $_SESSION['addr'] . ' != ' . $_SERVER['REMOTE_ADDR']); nuke_session(); goaway(z_root()); } diff --git a/include/bb2diaspora.php b/include/bb2diaspora.php index 8487f845a6..d86ba45437 100644 --- a/include/bb2diaspora.php +++ b/include/bb2diaspora.php @@ -221,13 +221,18 @@ function bb2diaspora($Text,$preserve_nl = false) { $Text = preg_replace("/\<(.*?)(src|href)=(.*?)\&\;(.*?)\>/ism",'<$1$2=$3&$4>',$Text); - $Text = preg_replace('/\[(.*?)\]\((.*?)\\\\_(.*?)\)/ism','[$1]($2_$3)',$Text); + $Text = preg_replace_callback('/\[(.*?)\]\((.*?)\)/ism','unescape_underscores_in_links',$Text); call_hooks('bb2diaspora',$Text); return $Text; } +function unescape_underscores_in_links($m) { + $y = str_replace('\\_','_', $m[2]); + return('[' . $m[1] . '](' . $y . ')'); +} + function format_event_diaspora($ev) { $a = get_app(); From 2bd1004587fc8d928b9458b2383b656df115578c Mon Sep 17 00:00:00 2001 From: friendica Date: Sun, 27 May 2012 21:01:58 -0700 Subject: [PATCH 05/13] rework the way private photos are embedded to avoid url differences and also check the permissions if possible to make sure that nothing sneaks by. --- boot.php | 2 +- include/delivery.php | 2 +- include/items.php | 88 +++++++++++++++++++++++++++++--- include/notifier.php | 2 +- mod/settings.php | 1 + util/messages.po | 116 +++++++++++++++++++++---------------------- 6 files changed, 142 insertions(+), 69 deletions(-) diff --git a/boot.php b/boot.php index b41b8d9a0e..aff026a71d 100644 --- a/boot.php +++ b/boot.php @@ -9,7 +9,7 @@ require_once('include/nav.php'); require_once('include/cache.php'); define ( 'FRIENDICA_PLATFORM', 'Friendica'); -define ( 'FRIENDICA_VERSION', '3.0.1355' ); +define ( 'FRIENDICA_VERSION', '3.0.1356' ); define ( 'DFRN_PROTOCOL_VERSION', '2.23' ); define ( 'DB_UPDATE_VERSION', 1144 ); diff --git a/include/delivery.php b/include/delivery.php index 61b0bd33a5..32943d5dab 100644 --- a/include/delivery.php +++ b/include/delivery.php @@ -288,7 +288,7 @@ function delivery_run($argv, $argc){ if($normal_mode) { if($item_id == $item['id'] || $item['id'] == $item['parent']) - $atom .= atom_entry($item,'text',null,$owner,true); + $atom .= atom_entry($item,'text',null,$owner,true,(($top_level) ? $contact['id'] : 0)); } else $atom .= atom_entry($item,'text',null,$owner,true); diff --git a/include/items.php b/include/items.php index e5b640fd23..f45b40cc0b 100644 --- a/include/items.php +++ b/include/items.php @@ -2832,7 +2832,7 @@ function atom_author($tag,$name,$uri,$h,$w,$photo) { return $o; } -function atom_entry($item,$type,$author,$owner,$comment = false) { +function atom_entry($item,$type,$author,$owner,$comment = false,$cid = 0) { $a = get_app(); @@ -2844,7 +2844,7 @@ function atom_entry($item,$type,$author,$owner,$comment = false) { if($item['allow_cid'] || $item['allow_gid'] || $item['deny_cid'] || $item['deny_gid']) - $body = fix_private_photos($item['body'],$owner['uid']); + $body = fix_private_photos($item['body'],$owner['uid'],$item,$cid); else $body = $item['body']; @@ -2927,14 +2927,17 @@ function atom_entry($item,$type,$author,$owner,$comment = false) { return $o; } -function fix_private_photos($s,$uid) { +function fix_private_photos($s,$uid, $item = null, $cid = 0) { $a = get_app(); - logger('fix_private_photos'); + + logger('fix_private_photos', LOGGER_DEBUG); + $site = substr($a->get_baseurl(),strpos($a->get_baseurl,'://')); if(preg_match("/\[img\](.*?)\[\/img\]/is",$s,$matches)) { $image = $matches[1]; - logger('fix_private_photos: found photo ' . $image); - if(stristr($image ,$a->get_baseurl() . '/photo/')) { + logger('fix_private_photos: found photo ' . $image, LOGGER_DEBUG); + if(stristr($image , $site . '/photo/')) { + $replace = false; $i = basename($image); $i = str_replace('.jpg','',$i); $x = strpos($i,'-'); @@ -2947,8 +2950,39 @@ function fix_private_photos($s,$uid) { intval($uid) ); if(count($r)) { - logger('replacing photo'); - $s = str_replace($image, 'data:image/jpg;base64,' . base64_encode($r[0]['data']), $s); + + // Check to see if we should replace this photo link with an embedded image + // 1. No need to do so if the photo is public + // 2. If there's a contact-id provided, see if they're in the access list + // for the photo. If so, embed it. + // 3. Otherwise, if we have an item, see if the item permissions match the photo + // permissions, regardless of order but first check to see if they're an exact + // match to save some processing overhead. + + // Currently we only embed one private photo per message so as not to hit import + // size limits at the receiving end. + + // To embed multiples, we would need to parse out the embedded photos on message + // receipt and limit size based only on the text component. Would also need to + // ignore all photos during bbcode translation and item localisation, as these + // will hit internal regex backtrace limits. + + if(has_permissions($r[0])) { + if($cid) { + $recips = enumerate_permissions($r[0]); + if(in_array($cid, $recips)) { + $replace = true; + } + } + elseif($item) { + if(compare_permissions($item,$r[0])) + $replace = true; + } + } + if($replace) { + logger('replacing photo'); + $s = str_replace($image, 'data:image/jpg;base64,' . base64_encode($r[0]['data']), $s); + } } } logger('fix_private_photos: replaced: ' . $s, LOGGER_DATA); @@ -2958,6 +2992,44 @@ function fix_private_photos($s,$uid) { } +function has_permissions($obj) { + if(($obj['allow_cid'] != '') || ($obj['allow_gid'] != '') || ($obj['deny_cid'] != '') || ($obj['deny_gid'] != '')) + return true; + return false; +} + +function compare_permissions($obj1,$obj2) { + // first part is easy. Check that these are exactly the same. + if(($obj1['allow_cid'] == $obj2['allow_cid']) + && ($obj1['allow_gid'] == $obj2['allow_gid']) + && ($obj1['deny_cid'] == $obj2['deny_cid']) + && ($obj1['deny_gid'] == $obj2['deny_gid'])) + return true; + + // This is harder. Parse all the permissions and compare the resulting set. + + $recipients1 = enumerate_permissions($obj1); + $recipients2 = enumerate_permissions($obj2); + sort($recipients1); + sort($recipients2); + if($recipients1 == $recipients2) + return true; + return false; +} + +// returns an array of contact-ids that are allowed to see this object + +function enumerate_permissions($obj) { + require_once('include/group.php'); + $allow_people = expand_acl($obj['allow_cid']); + $allow_groups = expand_groups(expand_acl($obj['allow_gid'])); + $deny_people = expand_acl($obj['deny_cid']); + $deny_groups = expand_groups(expand_acl($obj['deny_gid'])); + $recipients = array_unique(array_merge($allow_people,$allow_groups)); + $deny = array_unique(array_merge($deny_people,$deny_groups)); + $recipients = array_diff($recipients,$deny); + return $recipients; +} function item_getfeedtags($item) { $ret = array(); diff --git a/include/notifier.php b/include/notifier.php index cb4fb2a31c..070e7a4361 100644 --- a/include/notifier.php +++ b/include/notifier.php @@ -345,7 +345,7 @@ function notifier_run($argv, $argc){ if($mail) { $public_message = false; // mail is not public - $body = fix_private_photos($item['body'],$owner['uid']); + $body = fix_private_photos($item['body'],$owner['uid'],null,$message[0]['contact-id']); $atom .= replace_macros($mail_template, array( '$name' => xmlify($owner['name']), diff --git a/mod/settings.php b/mod/settings.php index 40fa55eeaa..e6eb4011fa 100644 --- a/mod/settings.php +++ b/mod/settings.php @@ -15,6 +15,7 @@ function get_theme_config_file($theme){ } function settings_init(&$a) { + // These lines provide the javascript needed by the acl selector $a->page['htmlhead'] .= "