Replace dfrn_request by subscribe URL when available for the follow link
- Falls back to the `/remote_follow` module available since Friendica version 2020.03 - Falls back to the profile URL - Remove unused atlas dependency in a couple API controllers
This commit is contained in:
parent
8988ad9f9d
commit
2627b54349
12 changed files with 80 additions and 31 deletions
|
|
@ -26,13 +26,16 @@ if (!empty($profile['country'])) {
|
|||
</a>
|
||||
<div class="media-body">
|
||||
<h5 class="name">
|
||||
<?php if ($profile['dfrn_request']): ?>
|
||||
<a href="<?php echo $this->escapeHtmlAttr($this->u($profile['dfrn_request'])); ?>" class="card-link btn btn-primary float-right">
|
||||
<?php if ($profile['subscribe']): ?>
|
||||
<a href="<?php echo $this->escapeHtmlAttr($profile['subscribe']); ?>" class="card-link btn btn-primary float-right" target="_blank" rel="noopener noreferrer">
|
||||
<i class="fa fa-external-link-alt"></i> <?php echo $this->p__('verb', 'Follow')?>
|
||||
</a>
|
||||
<?php endif; ?>
|
||||
<?php if ($profile['follow']): ?>
|
||||
<a href="<?php echo $this->escapeHtmlAttr($profile['follow']); ?>" class="card-link btn btn-primary float-right" target="_blank" rel="noopener noreferrer">
|
||||
<?php elseif ($profile['remote_follow']): ?>
|
||||
<a href="<?php echo $this->escapeHtmlAttr($this->u($profile['remote_follow'])); ?>" class="card-link btn btn-primary float-right" target="_blank" rel="noopener noreferrer">
|
||||
<i class="fa fa-external-link-alt"></i> <?php echo $this->p__('verb', 'Follow')?>
|
||||
</a>
|
||||
<?php else: ?>
|
||||
<a href="<?php echo $this->escapeHtmlAttr($this->u($profile['profile_url'])); ?>" class="card-link btn btn-primary float-right" target="_blank" rel="noopener noreferrer">
|
||||
<i class="fa fa-external-link-alt"></i> <?php echo $this->p__('verb', 'Follow')?>
|
||||
</a>
|
||||
<?php endif; ?>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue