*/
$myident = ((is_array($a->user) && isset($a->user['nickname'])) ? $a->user['nickname'] . '@' : '');
-
+
$sitelocation = $myident . substr($a->get_baseurl($ssl_state),strpos($a->get_baseurl($ssl_state),'//') + 2 );
'icon' => (count($r) ? $a->get_cached_avatar_image($r[0]['micro']) : $a->get_baseurl($ssl_state)."/images/person-48.jpg"),
'name' => $a->user['username'],
);
-
+
}
else {
$nav['login'] = Array('login',t('Login'), ($a->module == 'login'?'selected':''), t('Sign in'));
if(! $homelink)
$homelink = ((x($_SESSION,'visitor_home')) ? $_SESSION['visitor_home'] : '');
- if(($a->module != 'home') && (! (local_user())))
+ if(($a->module != 'home') && (! (local_user())))
$nav['home'] = array($homelink, t('Home'), "", t('Home Page'));
WHERE `item`.`visible` = 1 AND `item`.`deleted` = 0 and `item`.`moderated` = 0
AND `item`.`allow_cid` = '' AND `item`.`allow_gid` = ''
AND `item`.`deny_cid` = '' AND `item`.`deny_gid` = ''
- AND `item`.`private` = 0
+ AND `item`.`private` = 0 AND NOT `user`.`hidewall`
AND `item`.`guid` = '%s'", $a->argv[1]);
// AND `item`.`private` = 0 AND `item`.`wall` = 1
if (count($r)) {
} else
$profiledata = array();
}
+ } else {
+ $a->error = 404;
+ notice( t('Item not found.') . EOL);
+ return;
}
}
WHERE `item`.`visible` = 1 AND `item`.`deleted` = 0 and `item`.`moderated` = 0
AND `item`.`allow_cid` = '' AND `item`.`allow_gid` = ''
AND `item`.`deny_cid` = '' AND `item`.`deny_gid` = ''
- AND `item`.`private` = 0
+ AND `item`.`private` = 0 AND NOT `user`.`hidewall`
AND `item`.`guid` = '%s'", $a->argv[1]);
// AND `item`.`private` = 0 AND `item`.`wall` = 1
if (count($r)) {
update_thread($post_id);
// update filetags in pconfig
- file_tag_update_pconfig($uid,$categories_old,$categories_new,'category');
+ file_tag_update_pconfig($uid,$categories_old,$categories_new,'category');
proc_run('php', "include/notifier.php", 'edit_post', "$post_id");
if((x($_REQUEST,'return')) && strlen($return_path)) {
dbesc($datarray['attach']),
intval($datarray['bookmark']),
intval($datarray['origin']),
- intval($datarray['moderated']),
- dbesc($datarray['file'])
+ intval($datarray['moderated']),
+ dbesc($datarray['file'])
);
$r = q("SELECT `id` FROM `item` WHERE `uri` = '%s' LIMIT 1",
add_thread($post_id);
// update filetags in pconfig
- file_tag_update_pconfig($uid,$categories_old,$categories_new,'category');
+ file_tag_update_pconfig($uid,$categories_old,$categories_new,'category');
// Store the fresh generated item into the cache
$cachefile = get_cachefile($datarray["guid"]."-".hash("md5", $datarray['body']));
. '<br />';
$disclaimer .= sprintf( t('You may visit them online at %s'), $a->get_baseurl() . '/profile/' . $a->user['nickname']) . EOL;
$disclaimer .= t('Please contact the sender by replying to this post if you do not wish to receive these messages.') . EOL;
- if (!$datarray['title']=='') {
- $subject = email_header_encode($datarray['title'],'UTF-8');
- } else {
+ if (!$datarray['title']=='') {
+ $subject = email_header_encode($datarray['title'],'UTF-8');
+ } else {
$subject = email_header_encode('[Friendica]' . ' ' . sprintf( t('%s posted an update.'),$a->user['username']),'UTF-8');
- }
+ }
$link = '<a href="' . $a->get_baseurl() . '/profile/' . $a->user['nickname'] . '"><img src="' . $author['thumb'] . '" alt="' . $a->user['username'] . '" /></a><br /><br />';
$html = prepare_body($datarray);
$message = '<html><body>' . $link . $html . $disclaimer . '</body></html>';
- include_once('include/html2plain.php');
- $params = array (
- 'fromName' => $a->user['username'],
- 'fromEmail' => $a->user['email'],
- 'toEmail' => $addr,
- 'replyTo' => $a->user['email'],
- 'messageSubject' => $subject,
- 'htmlVersion' => $message,
- 'textVersion' => html2plain($html.$disclaimer),
- );
- enotify::send($params);
+ include_once('include/html2plain.php');
+ $params = array (
+ 'fromName' => $a->user['username'],
+ 'fromEmail' => $a->user['email'],
+ 'toEmail' => $addr,
+ 'replyTo' => $a->user['email'],
+ 'messageSubject' => $subject,
+ 'htmlVersion' => $message,
+ 'textVersion' => html2plain($html.$disclaimer),
+ );
+ enotify::send($params);
}
}
}