Added “Instances moderating this instance”
This commit is contained in:
parent
ba0397cb35
commit
09dd49ab63
1 changed files with 26 additions and 6 deletions
|
@ -734,18 +734,38 @@ while ($if<$il && $row=mysqli_fetch_assoc($res)) {
|
|||
$out.='</div></div>'.N;
|
||||
|
||||
$out.='<div><div class="idlab">'._('Moderated instances').'</div><div class="idesc">';
|
||||
$sevmap=['silence'=>_('limited'), 'suspend'=>_('sospeso')];
|
||||
$rres=tquery('SELECT Domain, Severity, Comment FROM InstBlocks WHERE InstID='.$row['ID'],__LINE__);
|
||||
if ($row['PublicBlocksList']==1) {
|
||||
$sevmap=['silence'=>_('limited'), 'suspend'=>_('suspended')];
|
||||
$rres=tquery('SELECT Domain, Severity, Comment FROM InstBlocks WHERE InstID='.$row['ID'],__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['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;
|
||||
}
|
||||
$out.='</ul>'.N;
|
||||
} else {
|
||||
$out.='<span class="null">'._('None').'</span>';
|
||||
}
|
||||
} else {
|
||||
$out.='<span class="null">'._('Not available{plural}').'</span>';
|
||||
}
|
||||
$out.='</div></div>'.N;
|
||||
|
||||
$out.='<div><div class="idlab">'._('Instances 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__);
|
||||
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['Comment'])) $out.=' - '.hspech($rrow['Comment']);// no strip, do hspech, because moderated instances comments don’t support html nor markdown in mastodon
|
||||
$out.='</li>'.N;
|
||||
$out.='<li><strong>'.hspech($rrow['URI']).'</strong>: '.$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;
|
||||
}
|
||||
$out.='</ul>'.N;
|
||||
} else {
|
||||
$out.='<span class="null">'._('Not available{plural}').'</span>';
|
||||
$out.='<span class="null">'._('None').'</span>';
|
||||
}
|
||||
$out.='</div></div>'.N;
|
||||
|
||||
|
|
Loading…
Reference in a new issue