mirror of
https://github.com/friendica/friendica
synced 2024-11-10 07:02:54 +00:00
Remove unused parameter in can_write_wall()
This commit is contained in:
parent
659d637b5a
commit
722782d553
7 changed files with 12 additions and 13 deletions
|
@ -85,7 +85,7 @@ function do_like($item_id, $verb) {
|
|||
$uid = local_user();
|
||||
}
|
||||
|
||||
if (!can_write_wall($a, $uid)) {
|
||||
if (!can_write_wall($uid)) {
|
||||
logger('like: unable to write on wall ' . $uid);
|
||||
return false;
|
||||
}
|
||||
|
|
|
@ -165,7 +165,7 @@ function authenticate_success($user_record, $login_initial = false, $interactive
|
|||
}
|
||||
}
|
||||
|
||||
function can_write_wall(App $a, $owner)
|
||||
function can_write_wall($owner)
|
||||
{
|
||||
static $verified = 0;
|
||||
|
||||
|
@ -174,8 +174,7 @@ function can_write_wall(App $a, $owner)
|
|||
}
|
||||
|
||||
$uid = local_user();
|
||||
|
||||
if (($uid) && ($uid == $owner)) {
|
||||
if ($uid == $owner) {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
@ -215,7 +215,7 @@ function item_post(App $a) {
|
|||
* 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);
|
||||
|
|
|
@ -1499,7 +1499,7 @@ function photos_content(App $a)
|
|||
$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'],
|
||||
|
@ -1511,7 +1511,7 @@ function photos_content(App $a)
|
|||
}
|
||||
|
||||
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,
|
||||
|
@ -1550,7 +1550,7 @@ function photos_content(App $a)
|
|||
$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,
|
||||
|
@ -1623,7 +1623,7 @@ function photos_content(App $a)
|
|||
'$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,
|
||||
|
|
|
@ -194,7 +194,7 @@ function profile_content(App $a, $update = 0)
|
|||
$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'],
|
||||
|
|
|
@ -32,7 +32,7 @@ function subthread_content(App $a) {
|
|||
|
||||
$owner_uid = $item['uid'];
|
||||
|
||||
if(! can_write_wall($a,$owner_uid)) {
|
||||
if(! can_write_wall($owner_uid)) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -60,11 +60,11 @@ class Thread extends BaseObject
|
|||
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();
|
||||
|
|
Loading…
Reference in a new issue