Renamed “LastCheckOk” to “WasLastCheckOk”
This commit is contained in:
parent
00caa1dcb9
commit
95b9ccfc31
5 changed files with 7 additions and 7 deletions
|
@ -211,7 +211,7 @@ if ($opts['logminmsglev']<4) {
|
|||
if ($logf===false) mexit('could not open file «'.$logfp.'» in write mode.'.N,1);
|
||||
}
|
||||
|
||||
$instints=['ID', 'FirstSeen', 'IsMastodon', 'Dead', 'Priority', 'Visible', 'Noxious', 'NoxLastModTS', 'LocalityID', 'OurLangsLock', 'UserCount', 'StatusCount', 'DomainCount', 'ActiveUsersMonth', 'ActiveUsersHalfYear', 'RegOpen', 'RegReqApproval', 'MaxTootChars', 'AdmCreatedAt', 'LastCheckOk', 'GuestID', 'LastGuestEdit', 'InsertTS', 'RPos'];
|
||||
$instints=['ID', 'FirstSeen', 'IsMastodon', 'Dead', 'Priority', 'Visible', 'Noxious', 'NoxLastModTS', 'LocalityID', 'OurLangsLock', 'UserCount', 'StatusCount', 'DomainCount', 'ActiveUsersMonth', 'ActiveUsersHalfYear', 'RegOpen', 'RegReqApproval', 'MaxTootChars', 'AdmCreatedAt', 'WasLastCheckOk', 'GuestID', 'LastGuestEdit', 'InsertTS', 'RPos'];
|
||||
|
||||
$idata=[];
|
||||
$res=myq($link,'SHOW COLUMNS FROM Instances',__FILE__);
|
||||
|
@ -492,7 +492,7 @@ if ($idata['IsMastodon'] && !is_null($idata['Version']) && $idata['Version']>='3
|
|||
// finished fetching
|
||||
|
||||
if (!is_null($idata['IsMastodon'])) $idata['IsMastodon']=b2i($idata['IsMastodon']);
|
||||
($instanswered) ? $idata['LastCheckOk']=1 : $idata['LastCheckOk']=0;
|
||||
($instanswered) ? $idata['WasLastCheckOk']=1 : $idata['WasLastCheckOk']=0;
|
||||
if (is_null($oidata)) {
|
||||
$query='INSERT INTO Instances SET ';
|
||||
if ($instanswered) {
|
||||
|
@ -643,7 +643,7 @@ if (is_null($oidata)) {
|
|||
}
|
||||
|
||||
// from here we know for sure $instid
|
||||
if (!$opts['dryrun']) myq($link,'INSERT INTO InstChecks (InstID, Time, Status) VALUES ('.$instid.', '.$now.', '.$idata['LastCheckOk'].')',__LINE__);
|
||||
if (!$opts['dryrun']) myq($link,'INSERT INTO InstChecks (InstID, Time, Status) VALUES ('.$instid.', '.$now.', '.$idata['WasLastCheckOk'].')',__LINE__);
|
||||
|
||||
if (isset($idata['activity']) && is_array($idata['activity'])) {
|
||||
if (!$opts['dryrun']) {
|
||||
|
|
|
@ -90,7 +90,7 @@ $res=mysqli_query($link,'SELECT * FROM Instances');
|
|||
while ($row=mysqli_fetch_assoc($res))
|
||||
$insts[$row['URI']][]=$row;
|
||||
|
||||
//ID: 83; FirstSeen: 1602617889; IsMastodon: 0; Dead: 0; New: 0; Good: 0; Chosen: 0; Priority: NULL; Visible: 0; Noxious: 0; NoxReason: NULL; NoxLastModTS: NULL; URI: ambrosia.cafe; Title: ambrosia café; ShortDesc: NULL; LongDesc: Pleroma: An efficient and flexible fediverse server; OurDesc: NULL; OurDescEN: NULL; LocalityID: NULL; OurLangsLock: 0; Email: admin@ambrosia.cafe; Software: NULL; Version: 2.7.2 (compatible; Pleroma 2.4.2); UserCount: 3; StatusCount: 299; DomainCount: 2900; ActiveUsersMonth: NULL; ActiveUsersHalfYear: NULL; Thumb: https://ambrosia.cafe/instance/thumbnail.jpeg; RegOpen: 0; RegReqApproval: 0; MaxTootChars: 5000; AdmAccount: NULL; AdmDisplayName: NULL; AdmCreatedAt: NULL; AdmNote: NULL; AdmURL: NULL; AdmAvatar: NULL; AdmHeader: NULL; LastCheckOk: 0; GuestID: NULL; LastGuestEdit: NULL; InsertTS: NULL; RPos: 4291;
|
||||
//ID: 83; FirstSeen: 1602617889; IsMastodon: 0; Dead: 0; New: 0; Good: 0; Chosen: 0; Priority: NULL; Visible: 0; Noxious: 0; NoxReason: NULL; NoxLastModTS: NULL; URI: ambrosia.cafe; Title: ambrosia café; ShortDesc: NULL; LongDesc: Pleroma: An efficient and flexible fediverse server; OurDesc: NULL; OurDescEN: NULL; LocalityID: NULL; OurLangsLock: 0; Email: admin@ambrosia.cafe; Software: NULL; Version: 2.7.2 (compatible; Pleroma 2.4.2); UserCount: 3; StatusCount: 299; DomainCount: 2900; ActiveUsersMonth: NULL; ActiveUsersHalfYear: NULL; Thumb: https://ambrosia.cafe/instance/thumbnail.jpeg; RegOpen: 0; RegReqApproval: 0; MaxTootChars: 5000; AdmAccount: NULL; AdmDisplayName: NULL; AdmCreatedAt: NULL; AdmNote: NULL; AdmURL: NULL; AdmAvatar: NULL; AdmHeader: NULL; WasLastCheckOk: 0; GuestID: NULL; LastGuestEdit: NULL; InsertTS: NULL; RPos: 4291;
|
||||
|
||||
$tot=0;
|
||||
foreach ($insts as $uri=>$rows)
|
||||
|
|
|
@ -449,7 +449,7 @@ $wheres[]='Instances.Dead=0 AND Instances.IsMastodon=1 AND Instances.FirstSeen I
|
|||
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.LastCheckOk=1';
|
||||
if ($_GET['lcok']==1) $wheres[]='Instances.WasLastCheckOk=1';
|
||||
/*if ($_GET['lcok']==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';
|
||||
|
|
|
@ -8,7 +8,7 @@ $cols=array(
|
|||
'Instances.NoxReason'=>array('field'=>'Instances.NoxReason','name'=>'Motivo nocività','nameEN'=>'Noxiousness reason','type'=>'text'),
|
||||
'Instances.NoxLastModTS'=>array('field'=>'Instances.NoxLastModTS','name'=>'Data ult. modifica motivo nocività','nameEN'=>'Last modification date of noxiousness reason','type'=>'time'),
|
||||
'Instances.Visible'=>array('field'=>'Instances.Visible','name'=>'[Visibile]','nameEN'=>'[Visible]','type'=>'bool'),
|
||||
'Instances.LastCheckOk'=>array('field'=>'Instances.LastCheckOk','name'=>'[Ha risposto all’ultimo check]','nameEN'=>'[Has answered on last check]','type'=>'bool'),
|
||||
'Instances.WasLastCheckOk'=>array('field'=>'Instances.WasLastCheckOk','name'=>'[Ha risposto all’ultimo check]','nameEN'=>'[Has answered on last check]','type'=>'bool'),
|
||||
'Instances.Priority'=>array('field'=>'Instances.Priority','name'=>'Priorità','nameEN'=>'Priority','type'=>'int'),
|
||||
'Instances.Dead'=>array('field'=>'Instances.Dead','name'=>'[“Morta”]','nameEN'=>'[“Dead”]','type'=>'bool'),
|
||||
'Instances.URI'=>array('field'=>'Instances.URI','name'=>'URI','nameEN'=>'URI','type'=>'text'),
|
||||
|
|
|
@ -446,7 +446,7 @@ $wheres[]='Instances.Dead=0 AND Instances.IsMastodon=1 AND Instances.FirstSeen I
|
|||
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.LastCheckOk=1';
|
||||
if ($_GET['lcok']==1) $wheres[]='Instances.WasLastCheckOk=1';
|
||||
/*if ($_GET['lcok']==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