Now the urls of moderated instances and of instances moderating an instance are linked to the instance card, when possible
This commit is contained in:
parent
002533f457
commit
6b3d9153a1
1 changed files with 7 additions and 4 deletions
|
@ -736,11 +736,14 @@ while ($if<$il && $row=mysqli_fetch_assoc($res)) {
|
|||
$out.='<div><div class="idlab">'._('Moderated instances').'</div><div class="idesc">';
|
||||
if ($row['PublicBlocksList']==1) {
|
||||
$sevmap=['silence'=>_('limited'), 'suspend'=>_('suspended')];
|
||||
$rres=tquery('SELECT Domain, Severity, Comment FROM InstBlocks WHERE InstID='.$row['ID'],__LINE__);
|
||||
$rres=tquery("SELECT Domain, Severity, Comment, ID FROM InstBlocks LEFT JOIN Instances ON URI=Domain WHERE InstID={$row['ID']} ORDER BY Domain ASC",__LINE__);
|
||||
if (mysqli_num_rows($rres)>0) {
|
||||
$out.='<ul class="nobott">'.N;
|
||||
while ($rrow=mysqli_fetch_assoc($rres)) {
|
||||
$out.='<li><strong>'.hspech($rrow['Domain']).'</strong>: '.$sevmap[$rrow['Severity']];
|
||||
if (!is_null($rrow['ID']))
|
||||
$out.="<li><a href=\"?id={$rrow['ID']}\" target=\"_blank\"><strong>{$rrow['Domain']}</strong></a>: {$sevmap[$rrow['Severity']]}";
|
||||
else
|
||||
$out.="<li><strong>{$rrow['Domain']}</strong>: {$sevmap[$rrow['Severity']]}";
|
||||
if (!is_null($rrow['Comment'])) $out.=' ('._('reason').': '.hspech($rrow['Comment']).')';// no strip, do hspech, because moderated instances comments don’t support html nor markdown in mastodon
|
||||
$out.='</li>'.N;
|
||||
}
|
||||
|
@ -755,11 +758,11 @@ while ($if<$il && $row=mysqli_fetch_assoc($res)) {
|
|||
|
||||
$out.='<div><div class="idlab">'._('Instances certainly moderating this instance').'</div><div class="idesc">';
|
||||
$sevmap=['silence'=>_('limitation'), 'suspend'=>_('suspension')];
|
||||
$rres=tquery('SELECT Severity, Comment, URI FROM InstBlocks LEFT JOIN Instances ON ID=InstID WHERE Domain="'.$row['URI'].'"',__LINE__);
|
||||
$rres=tquery("SELECT Severity, Comment, ID, URI FROM InstBlocks LEFT JOIN Instances ON ID=InstID WHERE Domain=\"{$row['URI']}\" ORDER BY URI ASC",__LINE__);
|
||||
if (mysqli_num_rows($rres)>0) {
|
||||
$out.='<ul class="nobott">'.N;
|
||||
while ($rrow=mysqli_fetch_assoc($rres)) {
|
||||
$out.='<li><strong>'.hspech($rrow['URI']).'</strong>: '.$sevmap[$rrow['Severity']].'</li>'.N;
|
||||
$out.="<li><a href=\"?id={$rrow['ID']}\" target=\"_blank\"><strong>{$rrow['URI']}</strong></a>: {$sevmap[$rrow['Severity']]}</li>\n";
|
||||
// if (!is_null($rrow['Comment'])) $out.=' ('._('reason').': '.hspech($rrow['Comment']).')';// no strip, do hspech, because moderated instances comments don’t support html nor markdown in mastodon
|
||||
// $out.='</li>'.N;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue