From 95b9ccfc314ee65f738bf02746aa70d3a1f797fd Mon Sep 17 00:00:00 2001 From: pezcurrel Date: Mon, 26 Dec 2022 05:30:35 +0100 Subject: [PATCH] =?UTF-8?q?Renamed=20=E2=80=9CLastCheckOk=E2=80=9D=20to=20?= =?UTF-8?q?=E2=80=9CWasLastCheckOk=E2=80=9D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- web/clitools/getinstinfo.php | 6 +++--- web/clitools/searchdupes.php | 2 +- web/site/instances.php | 2 +- web/site/mustard/include/columns.php | 2 +- web/site/users.php | 2 +- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/web/clitools/getinstinfo.php b/web/clitools/getinstinfo.php index 7a698db..58f5151 100755 --- a/web/clitools/getinstinfo.php +++ b/web/clitools/getinstinfo.php @@ -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']) { diff --git a/web/clitools/searchdupes.php b/web/clitools/searchdupes.php index 954588c..ef511c0 100755 --- a/web/clitools/searchdupes.php +++ b/web/clitools/searchdupes.php @@ -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) diff --git a/web/site/instances.php b/web/site/instances.php index c551c49..dcd40e2 100644 --- a/web/site/instances.php +++ b/web/site/instances.php @@ -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'; diff --git a/web/site/mustard/include/columns.php b/web/site/mustard/include/columns.php index 7c1e9ea..8d575f9 100644 --- a/web/site/mustard/include/columns.php +++ b/web/site/mustard/include/columns.php @@ -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'), diff --git a/web/site/users.php b/web/site/users.php index 4973823..0700d64 100644 --- a/web/site/users.php +++ b/web/site/users.php @@ -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';