Made “Exclude instances not surely suspending Threads” “Include only if Threads is surely suspended”

This commit is contained in:
pezcurrel 2023-12-26 23:59:11 +01:00
parent 7a7bdf97ec
commit e185720a4c

View file

@ -155,8 +155,8 @@ function nocrit() {
sethid("exnox");
document.getElementById("cbexregc").checked=false;
sethid("exregc");
document.getElementById("cbexthf").checked=false;
sethid("exthf");
document.getElementById("cbinths").checked=false;
sethid("inths");
document.getElementById("cbexappr").checked=false;
sethid("exappr");
document.getElementById("cbexlcko").checked=false;
@ -290,13 +290,13 @@ function presub() {
$_GET['exregc']=0;
}
// if ((array_key_exists('exthf',$_GET) && $_GET['exthf']=='1') || !array_key_exists('exthf',$_GET)) {
if (array_key_exists('exthf',$_GET) && $_GET['exthf']=='1') {
$_GET['cbexthf']=' checked';
$_GET['exthf']=1;
// if ((array_key_exists('inths',$_GET) && $_GET['inths']=='1') || !array_key_exists('inths',$_GET)) {
if (array_key_exists('inths',$_GET) && $_GET['inths']=='1') {
$_GET['cbinths']=' checked';
$_GET['inths']=1;
} else {
$_GET['cbexthf']='';
$_GET['exthf']=0;
$_GET['cbinths']='';
$_GET['inths']=0;
}
if (array_key_exists('exappr',$_GET) && $_GET['exappr']=='1') {
@ -380,7 +380,7 @@ function presub() {
<input name="exregc" type="hidden" value="'.$_GET['exregc'].'">
<input name="exappr" type="hidden" value="'.$_GET['exappr'].'">
<input name="exlcko" type="hidden" value="'.$_GET['exlcko'].'">
<input name="exthf" type="hidden" value="'.$_GET['exthf'].'">
<input name="inths" type="hidden" value="'.$_GET['inths'].'">
<input name="lang" type="hidden" value="'.$_GET['lang'].'">
<input name="desc" type="hidden" value="'.htmlentities($_GET['desc']).'">
<input name="minu" type="hidden" value="'.$_GET['minu'].'">
@ -451,10 +451,10 @@ function presub() {
</div>
</div>
<div class="sdrow">
<div class="sdlabel"><label for="cbexthf" title="'._('Exclude instances which might not be <i>suspending</i> Metas Threads').'">'._('Exclude if might not be <i>suspending</i> Threads').'</label></div>
<div class="sdlabel"><label for="cbinths" title="'._('Include only instances which surely have Metas Threads *suspended*').'">'._('Include only if Threads is surely <i>suspended</i>').'</label></div>
<div class="sdinput">
<input type="checkbox" class="sckbox" id="cbexthf" value="1"'.$_GET['cbexthf'].' onchange="sethid(\'exthf\');">
<input type="hidden" id="exthf" name="exthf" value="'.$_GET['exthf'].'">
<input type="checkbox" class="sckbox" id="cbinths" value="1"'.$_GET['cbinths'].' onchange="sethid(\'inths\');">
<input type="hidden" id="inths" name="inths" value="'.$_GET['inths'].'">
</div>
</div>
<div class="sdrow">
@ -513,7 +513,7 @@ function presub() {
$joins[]='LEFT JOIN InstChecks AS InstChecks ON InstChecks.InstID=Instances.ID AND InstChecks.Time=(SELECT MAX(InstChecks.Time) AS MaxTime FROM InstChecks WHERE InstChecks.InstID=Instances.ID)';
$wheres[]='InstChecks.Status=1';
}*/
if ($_GET['exthf']==1) $wheres[]='Instances.Threads="suspended"';
if ($_GET['inths']==1) $wheres[]='Instances.Threads="suspended"';
if ($_GET['lang']>0) {
$joins[]='LEFT JOIN InstOurLangs ON InstOurLangs.InstID=Instances.ID';
$wheres[]='(InstOurLangs.OurLangID='.$_GET['lang'].' AND InstOurLangs.Pos=1)';
@ -658,26 +658,26 @@ while ($if<$il && $row=mysqli_fetch_assoc($res)) {
$out.='<div><div class="idlab">'._('Short description').'</div><div class="idesc">'.nully(strip($row['ShortDesc'],$row['URI'])).'</div></div>'.N;
$out.='<div><div class="idlab">'._('Long description').'</div><div class="idesc">'.nully(strip($row['LongDesc'],$row['URI'])).'</div></div>'.N;
$out.='<div><div class="idlab">'._('Server rules').'</div><div class="idesc">';
$out.='<div><div class="idlab">'._('Instance rules').'</div><div class="idesc">';
$rres=tquery('SELECT Text FROM InstRules WHERE InstID='.$row['ID'],__LINE__);
if (mysqli_num_rows($rres)>0) {
$out.='<ol class="nobott">'.N;
while ($rrow=mysqli_fetch_assoc($rres))
$out.='<li>'.hspech($rrow['Text']).'</li>'.N;// no strip, do hspech, because server rules dont support html nor markdown in mastodon
$out.='<li>'.hspech($rrow['Text']).'</li>'.N;// no strip, do hspech, because instance rules dont support html nor markdown in mastodon
$out.='</ol>'.N;
} else {
$out.='<span class="null">'._('Not available{plural}').'</span>';
}
$out.='</div></div>'.N;
$out.='<div><div class="idlab">'._('Moderated servers').'</div><div class="idesc">';
$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 (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 moredated server comments dont support html nor markdown in mastodon
if (!is_null($rrow['Comment'])) $out.=' - '.hspech($rrow['Comment']);// no strip, do hspech, because moderated instances comments dont support html nor markdown in mastodon
$out.='</li>'.N;
}
$out.='</ul>'.N;