$uid = local_user();
}
- if (!can_write_wall($a, $uid)) {
+ if (!can_write_wall($uid)) {
logger('like: unable to write on wall ' . $uid);
return false;
}
}
}
-function can_write_wall(App $a, $owner)
+function can_write_wall($owner)
{
static $verified = 0;
}
$uid = local_user();
-
- if (($uid) && ($uid == $owner)) {
+ if ($uid == $owner) {
return true;
}
* Now check that it is a page_type of PAGE_BLOG, and that valid personal details
* have been provided, and run any anti-spam plugins
*/
- if (!(can_write_wall($a, $profile_uid) || $allow_comment) && !$allow_moderated) {
+ if (!(can_write_wall($profile_uid) || $allow_comment) && !$allow_moderated) {
notice(t('Permission denied.') . EOL) ;
if (x($_REQUEST, 'return')) {
goaway($return_path);
$tpl = get_markup_template('photo_item.tpl');
$return_url = $a->cmd;
- if ($can_post || can_write_wall($a, $owner_uid)) {
+ if ($can_post || can_write_wall($owner_uid)) {
$like_tpl = get_markup_template('like_noshare.tpl');
$likebuttons = replace_macros($like_tpl, array(
'$id' => $link_item['id'],
}
if (!DBM::is_result($r)) {
- if (($can_post || can_write_wall($a, $owner_uid)) && $link_item['last-child']) {
+ if (($can_post || can_write_wall($owner_uid)) && $link_item['last-child']) {
$comments .= replace_macros($cmnt_tpl, array(
'$return_path' => '',
'$jsreload' => $return_url,
$dislike = format_like($conv_responses['dislike'][$link_item['uri']], $conv_responses['dislike'][$link_item['uri'] . '-l'], 'dislike', $link_item['id']);
}
- if (($can_post || can_write_wall($a, $owner_uid)) && $link_item['last-child']) {
+ if (($can_post || can_write_wall($owner_uid)) && $link_item['last-child']) {
$comments .= replace_macros($cmnt_tpl,array(
'$return_path' => '',
'$jsreload' => $return_url,
'$comment' => $comment
));
- if (($can_post || can_write_wall($a, $owner_uid)) && $item['last-child']) {
+ if (($can_post || can_write_wall($owner_uid)) && $item['last-child']) {
$comments .= replace_macros($cmnt_tpl, array(
'$return_path' => '',
'$jsreload' => $return_url,
$a->page['aside'] .= categories_widget(System::baseUrl(true) . '/profile/' . $a->profile['nickname'], (x($category) ? xmlify($category) : ''));
$a->page['aside'] .= tagcloud_wall_widget();
- if (can_write_wall($a, $a->profile['profile_uid'])) {
+ if (can_write_wall($a->profile['profile_uid'])) {
$x = array(
'is_owner' => $is_owner,
'allow_location' => ($is_owner || $commvisitor) && $a->profile['allow_location'],
$owner_uid = $item['uid'];
- if(! can_write_wall($a,$owner_uid)) {
+ if(! can_write_wall($owner_uid)) {
return;
}
break;
case 'profile':
$this->profile_owner = $a->profile['profile_uid'];
- $this->writable = can_write_wall($a, $this->profile_owner);
+ $this->writable = can_write_wall($this->profile_owner);
break;
case 'display':
$this->profile_owner = $a->profile['uid'];
- $this->writable = can_write_wall($a, $this->profile_owner) || $writable;
+ $this->writable = can_write_wall($this->profile_owner) || $writable;
break;
case 'community':
$this->profile_owner = local_user();