mirror of
https://github.com/friendica/friendica
synced 2024-12-22 12:29:47 +01:00
Merge pull request #10731 from annando/profile-writable
Make posts on the profile page writable
This commit is contained in:
commit
327a9b1855
2 changed files with 3 additions and 3 deletions
|
@ -312,7 +312,7 @@ function conversation(App $a, array $items, $mode, $update, $preview = false, $o
|
||||||
. "'; </script>\r\n";
|
. "'; </script>\r\n";
|
||||||
}
|
}
|
||||||
} elseif ($mode === 'profile') {
|
} elseif ($mode === 'profile') {
|
||||||
$items = conversation_add_children($items, false, $order, $uid);
|
$items = conversation_add_children($items, false, $order, local_user());
|
||||||
|
|
||||||
if (!$update) {
|
if (!$update) {
|
||||||
$tab = 'posts';
|
$tab = 'posts';
|
||||||
|
@ -400,7 +400,7 @@ function conversation(App $a, array $items, $mode, $update, $preview = false, $o
|
||||||
$formSecurityToken = BaseModule::getFormSecurityToken('contact_action');
|
$formSecurityToken = BaseModule::getFormSecurityToken('contact_action');
|
||||||
|
|
||||||
if (!empty($items)) {
|
if (!empty($items)) {
|
||||||
if (in_array($mode, ['community', 'contacts'])) {
|
if (in_array($mode, ['community', 'contacts', 'profile'])) {
|
||||||
$writable = true;
|
$writable = true;
|
||||||
} else {
|
} else {
|
||||||
$writable = ($items[0]['uid'] == 0) && in_array($items[0]['network'], Protocol::FEDERATED);
|
$writable = ($items[0]['uid'] == 0) && in_array($items[0]['network'], Protocol::FEDERATED);
|
||||||
|
|
|
@ -80,7 +80,7 @@ class Thread
|
||||||
break;
|
break;
|
||||||
case 'profile':
|
case 'profile':
|
||||||
$this->profile_owner = $a->getProfileOwner();
|
$this->profile_owner = $a->getProfileOwner();
|
||||||
$this->writable = Security::canWriteToUserWall($this->profile_owner);
|
$this->writable = Security::canWriteToUserWall($this->profile_owner) || $writable;
|
||||||
break;
|
break;
|
||||||
case 'display':
|
case 'display':
|
||||||
$this->profile_owner = $a->getProfileOwner();
|
$this->profile_owner = $a->getProfileOwner();
|
||||||
|
|
Loading…
Reference in a new issue