Renamed all the exclusion inputs to more sensible names
This commit is contained in:
parent
5e84c8501d
commit
99fd5feb50
1 changed files with 43 additions and 43 deletions
|
@ -108,8 +108,8 @@ function sethid(obj) {
|
|||
function presub() {
|
||||
document.getElementById("p").value=1;
|
||||
if (document.getElementById("ord").value=="noxd") {
|
||||
document.getElementById("cbnoxious").checked=false;
|
||||
document.getElementById("noxious").value=0;
|
||||
document.getElementById("cbexnox").checked=false;
|
||||
document.getElementById("exnox").value=0;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -124,36 +124,36 @@ $row=mysqli_fetch_assoc($res);
|
|||
echo(_('<div id="help" class="helpd"><p class="intro">This search engine for Mastodon instances is based on a database that gets updated by our crawler every night (CET). Instances are considered new for 30 days after they are discovered. When an instance has not responded to our daily checks for more than 30 days it’s no longer considered in statistics and searches and it gets checked only on the first of the month, rather than daily, until it possibly responds again. “Random ordering” of results varies daily.</p><p class="intro">Default search criteria reflect our fondness for a decentralized and egalitarian Fediverse and our attempt to exclude instances accepting fascist, racist, sexist, ableist or sovereignist contents by marking them as noxious.</p></div>').N);
|
||||
printf(_('<p class="introe">We currently count <span class="statd">%s</span> Mastodon instances, with <span class="statd">%s</span> users (<span class="statd">%s</span> active during last month) and <span class="statd">%s</span> published statuses.</p>').N, fnum($row['tinsts'],0,$dlang), fnum($row['tusers'],0,$dlang), fnum($row['tactusers'],0,$dlang), fnum($row['tstatuses'],0,$dlang));
|
||||
|
||||
if ((array_key_exists('noxious',$_GET) && $_GET['noxious']=='1') || !array_key_exists('noxious',$_GET)) {
|
||||
$_GET['cbnoxious']=' checked';
|
||||
$_GET['noxious']=1;
|
||||
if ((array_key_exists('exnox',$_GET) && $_GET['exnox']=='1') || !array_key_exists('exnox',$_GET)) {
|
||||
$_GET['cbexnox']=' checked';
|
||||
$_GET['exnox']=1;
|
||||
} else {
|
||||
$_GET['cbnoxious']='';
|
||||
$_GET['noxious']=0;
|
||||
$_GET['cbexnox']='';
|
||||
$_GET['exnox']=0;
|
||||
}
|
||||
|
||||
if ((array_key_exists('creg',$_GET) && $_GET['creg']=='1') || !array_key_exists('creg',$_GET)) {
|
||||
$_GET['cbcreg']=' checked';
|
||||
$_GET['creg']=1;
|
||||
if ((array_key_exists('exregc',$_GET) && $_GET['exregc']=='1') || !array_key_exists('exregc',$_GET)) {
|
||||
$_GET['cbexregc']=' checked';
|
||||
$_GET['exregc']=1;
|
||||
} else {
|
||||
$_GET['cbcreg']='';
|
||||
$_GET['creg']=0;
|
||||
$_GET['cbexregc']='';
|
||||
$_GET['exregc']=0;
|
||||
}
|
||||
|
||||
if (array_key_exists('appr',$_GET) && $_GET['appr']=='1') {
|
||||
$_GET['cbappr']=' checked';
|
||||
$_GET['appr']=1;
|
||||
if (array_key_exists('exappr',$_GET) && $_GET['exappr']=='1') {
|
||||
$_GET['cbexappr']=' checked';
|
||||
$_GET['exappr']=1;
|
||||
} else {
|
||||
$_GET['cbappr']='';
|
||||
$_GET['appr']=0;
|
||||
$_GET['cbexappr']='';
|
||||
$_GET['exappr']=0;
|
||||
}
|
||||
|
||||
if (array_key_exists('lcok',$_GET) && $_GET['lcok']=='1') {
|
||||
$_GET['cblcok']=' checked';
|
||||
$_GET['lcok']=1;
|
||||
if (array_key_exists('exlcko',$_GET) && $_GET['exlcko']=='1') {
|
||||
$_GET['cbexlcko']=' checked';
|
||||
$_GET['exlcko']=1;
|
||||
} else {
|
||||
$_GET['cblcok']='';
|
||||
$_GET['lcok']=0;
|
||||
$_GET['cbexlcko']='';
|
||||
$_GET['exlcko']=0;
|
||||
}
|
||||
|
||||
if (array_key_exists('lang',$_GET)) {
|
||||
|
@ -210,10 +210,10 @@ $p=1;
|
|||
if (array_key_exists('p',$_GET) && preg_match('#^[0-9]+$#',$_GET['p'])===1) $p=$_GET['p']+0;
|
||||
|
||||
echo('<form method="get" id="curvf" name="curvf">
|
||||
<input name="noxious" type="hidden" value="'.$_GET['noxious'].'">
|
||||
<input name="creg" type="hidden" value="'.$_GET['creg'].'">
|
||||
<input name="appr" type="hidden" value="'.$_GET['appr'].'">
|
||||
<input name="lcok" type="hidden" value="'.$_GET['lcok'].'">
|
||||
<input name="exnox" type="hidden" value="'.$_GET['exnox'].'">
|
||||
<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="lang" type="hidden" value="'.$_GET['lang'].'">
|
||||
<input name="desc" type="hidden" value="'.htmlentities($_GET['desc']).'">
|
||||
<input name="minu" type="hidden" value="'.$_GET['minu'].'">
|
||||
|
@ -268,31 +268,31 @@ echo('</select>
|
|||
</div>
|
||||
<div class="hrd"></div>
|
||||
<div class="sdrow">
|
||||
<div class="sdlabel"><label for="cbnoxious" title="'._('Exclude noxious instances').'">'._('Exclude if noxious').'</label></div>
|
||||
<div class="sdlabel"><label for="cbexnox" title="'._('Exclude noxious instances').'">'._('Exclude if noxious').'</label></div>
|
||||
<div class="sdinput">
|
||||
<input type="checkbox" class="sckbox" id="cbnoxious" value="1"'.$_GET['cbnoxious'].' onchange="sethid(\'noxious\');">
|
||||
<input type="hidden" id="noxious" name="noxious" value="'.$_GET['noxious'].'">
|
||||
<input type="checkbox" class="sckbox" id="cbexnox" value="1"'.$_GET['cbexnox'].' onchange="sethid(\'exnox\');">
|
||||
<input type="hidden" id="exnox" name="exnox" value="'.$_GET['exnox'].'">
|
||||
</div>
|
||||
</div>
|
||||
<div class="sdrow">
|
||||
<div class="sdlabel"><label for="cbcreg" title="'._('Exclude instances which don’t accept new registrations').'">'._('Exclude if registrations are closed').'</label></div>
|
||||
<div class="sdlabel"><label for="cbexregc" title="'._('Exclude instances which don’t accept new registrations').'">'._('Exclude if registrations are closed').'</label></div>
|
||||
<div class="sdinput">
|
||||
<input type="checkbox" class="sckbox" id="cbcreg" value="1"'.$_GET['cbcreg'].' onchange="sethid(\'creg\');">
|
||||
<input type="hidden" id="creg" name="creg" value="'.$_GET['creg'].'">
|
||||
<input type="checkbox" class="sckbox" id="cbexregc" value="1"'.$_GET['cbexregc'].' onchange="sethid(\'exregc\');">
|
||||
<input type="hidden" id="exregc" name="exregc" value="'.$_GET['exregc'].'">
|
||||
</div>
|
||||
</div>
|
||||
<div class="sdrow">
|
||||
<div class="sdlabel"><label for="cbappr" title="'._('Exclude instances on which admin approval is required for registration').'">'._('Exclude if registration requires approval').'</label></div>
|
||||
<div class="sdlabel"><label for="cbexappr" title="'._('Exclude instances on which admin approval is required for registration').'">'._('Exclude if registration requires approval').'</label></div>
|
||||
<div class="sdinput">
|
||||
<input type="checkbox" class="sckbox" id="cbappr" value="1"'.$_GET['cbappr'].' onchange="sethid(\'appr\');">
|
||||
<input type="hidden" id="appr" name="appr" value="'.$_GET['appr'].'">
|
||||
<input type="checkbox" class="sckbox" id="cbexappr" value="1"'.$_GET['cbexappr'].' onchange="sethid(\'exappr\');">
|
||||
<input type="hidden" id="exappr" name="exappr" value="'.$_GET['exappr'].'">
|
||||
</div>
|
||||
</div>
|
||||
<div class="sdrow">
|
||||
<div class="sdlabel"><label for="cblcok" title="'._('Exclude instances which didn’t respond to last check').'">'._('Exclude if offline on last check').'</label></div>
|
||||
<div class="sdlabel"><label for="cbexlcko" title="'._('Exclude instances which didn’t respond to last check').'">'._('Exclude if offline on last check').'</label></div>
|
||||
<div class="sdinput">
|
||||
<input type="checkbox" class="sckbox" id="cblcok" value="1"'.$_GET['cblcok'].' onchange="sethid(\'lcok\');">
|
||||
<input type="hidden" id="lcok" name="lcok" value="'.$_GET['lcok'].'">
|
||||
<input type="checkbox" class="sckbox" id="cbexlcko" value="1"'.$_GET['cbexlcko'].' onchange="sethid(\'exlcko\');">
|
||||
<input type="hidden" id="exlcko" name="exlcko" value="'.$_GET['exlcko'].'">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@ -325,11 +325,11 @@ swhelp();
|
|||
$joins=array();
|
||||
$wheres=array();
|
||||
$wheres[]='Instances.LastOkCheckTS>='.$graceline.' AND Instances.IsMastodon=1 AND Instances.FirstSeen IS NOT NULL';
|
||||
if ($_GET['noxious']==1) $wheres[]='Instances.Noxious=0';
|
||||
if ($_GET['creg']==1) $wheres[]='Instances.RegOpen=1';
|
||||
if ($_GET['appr']==1) $wheres[]='Instances.RegReqApproval=0';
|
||||
if ($_GET['lcok']==1) $wheres[]='Instances.WasLastCheckOk=1';
|
||||
/*if ($_GET['lcok']==1) {
|
||||
if ($_GET['exnox']==1) $wheres[]='Instances.Noxious=0';
|
||||
if ($_GET['exregc']==1) $wheres[]='Instances.RegOpen=1';
|
||||
if ($_GET['exappr']==1) $wheres[]='Instances.RegReqApproval=0';
|
||||
if ($_GET['exlcko']==1) $wheres[]='Instances.WasLastCheckOk=1';
|
||||
/*if ($_GET['exlcko']==1) {
|
||||
$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';
|
||||
}*/
|
||||
|
|
Loading…
Reference in a new issue