Removed “minimum number of known instances” from criteria, because domain_count is gone from /api/v2/instance

This commit is contained in:
pezcurrel 2022-12-22 07:51:51 +01:00
parent f8cdf2cf3b
commit 335944add8

View file

@ -43,8 +43,6 @@ $maxudef=30000;
$maxumax=10000000000;
$minaudef=10;
$minaumax=10000000;
$minkidef=500;
$minkimax=100000;
echo('</nav>
<div class="scrwide">
@ -119,7 +117,6 @@ function ckadvcri() {
if (document.getElementById("minu").value!='.$minudef.' ||
document.getElementById("maxu").value!='.$maxudef.' ||
document.getElementById("minau").value!='.$minaudef.' ||
document.getElementById("minki").value!='.$minkidef.' ||
document.getElementById("cbnoxious").checked==false ||
document.getElementById("cbcreg").checked==false ||
document.getElementById("cbappr").checked==true ||
@ -138,7 +135,6 @@ function endisadvcri() {
document.getElementById("minu").value="";
document.getElementById("maxu").value="";
document.getElementById("minau").value="";
document.getElementById("minki").value="";
document.getElementById("cbnoxious").checked=false;
document.getElementById("noxious").value=0;
document.getElementById("cbcreg").checked=false;
@ -151,7 +147,6 @@ function endisadvcri() {
document.getElementById("minu").value='.$minudef.';
document.getElementById("maxu").value='.$maxudef.';
document.getElementById("minau").value='.$minaudef.';
document.getElementById("minki").value='.$minkidef.';
document.getElementById("cbnoxious").checked=true;
document.getElementById("noxious").value=1;
document.getElementById("cbcreg").checked=true;
@ -304,7 +299,6 @@ ckgnum('minu',$minudef,$minumax);
ckgnum('maxu',$maxudef,$maxumax);
if (is_int($_GET['maxu']) && is_int($_GET['minu']) && $_GET['maxu']<$_GET['minu']) $_GET['maxu']=$_GET['minu'];
ckgnum('minau',$minaudef,$minaumax);
ckgnum('minki',$minkidef,$minkimax);
$order=array(
'rand'=>array('t'=>_('Random, recommended first'),'q'=>'Instances.Priority DESC, Instances.RPos ASC'),
@ -314,7 +308,6 @@ $order=array(
'tusersa'=>array('t'=>_('By number of users, ascending'),'q'=>'Instances.UserCount ASC'),
'tusersd'=>array('t'=>_('By number of users, descending'),'q'=>'Instances.UserCount DESC'),
'ausersd'=>array('t'=>_('By number of active users, descending'),'q'=>'Instances.ActiveUsersMonth DESC'),
'kinstsd'=>array('t'=>_('By number of known instances, descending'),'q'=>'Instances.DomainCount DESC'),
'charsd'=>array('t'=>_('By maximum number of characters per toot, descending'),'q'=>'Instances.MaxTootChars DESC'),
// 'open'=>array('t'=>_('Prima quelle con iscriz. aperte'),'q'=>'Instances.RegOpen DESC, Instances.RegReqApproval ASC'),
// 'alph'=>array('t'=>_('Alfabetico'),'q'=>'Instances.URI ASC'),
@ -343,7 +336,6 @@ echo('<form method="get" id="curvf" name="curvf">
<input name="minu" type="hidden" value="'.$_GET['minu'].'">
<input name="maxu" type="hidden" value="'.$_GET['maxu'].'">
<input name="minau" type="hidden" value="'.$_GET['minau'].'">
<input name="minki" type="hidden" value="'.$_GET['minki'].'">
<input name="ord" type="hidden" value="'.$_GET['ord'].'">
<input name="p" type="hidden" value="'.$p.'">
</form>'.N);
@ -386,10 +378,6 @@ echo('</select>
<div class="sdinput"><input type="number" id="minau" name="minau" min="0" max="'.$minaumax.'" class="sinput" value="'.$_GET['minau'].'" onchange="ckadvcri();"></div>
</div>
<div class="sdrow">
<div class="sdlabel"><label for="minki" title="'._('Include only instances which know at least this number of other instances (set to empty to disable this criterion)').'">'._('Minimum number of known instances is').'</label></div>
<div class="sdinput"><input type="number" id="minki" name="minki" min="0" max="'.$minkimax.'" class="sinput" value="'.$_GET['minki'].'" onchange="ckadvcri();"></div>
</div>
<div class="sdrow">
<div class="sdlabel"><label for="cbnoxious" title="'._('Exclude noxious instances').'">'._('Exclude noxious').'</label></div>
<div class="sdinput">
<input type="checkbox" class="sckbox" id="cbnoxious" value="1"'.$_GET['cbnoxious'].' onchange="sethid(\'noxious\');">
@ -475,7 +463,6 @@ if ($_GET['desc']!='') $wheres[]='(Instances.URI LIKE "%'.$buf.'%" OR Instances.
if ($_GET['minu']!='') $wheres[]='Instances.UserCount>='.$_GET['minu'];
if ($_GET['maxu']!='') $wheres[]='Instances.UserCount<='.$_GET['maxu'];
if ($_GET['minau']!='') $wheres[]='Instances.ActiveUsersMonth>='.$_GET['minau'];
if ($_GET['minki']!='') $wheres[]='Instances.DomainCount>='.$_GET['minki'];
$joins=implode(' ',$joins);
$wheres='WHERE '.implode(' AND ',$wheres);
if (!$single)