+2
-1
lib/bskyToucher.php
+2
-1
lib/bskyToucher.php
···
+109
lib/maria-db.php
+109
lib/maria-db.php
···+$db->real_query('create table if not exists user_cache (did varchar(64) not null unique primary key, handle varchar(255) not null unique, display_name text, description text, avatar text, banner text, pds text not null, pinned_post text, expires int not null);');+$db->real_query('create table if not exists minidoc_cache (did varchar(64) not null primary key, handle varchar(255) not null unique, pds text not null, expires int not null);');+$db->real_query('create table if not exists post_cache (rkey varchar(64) not null primary key, did varchar(64) not null, text text, embed_type varchar(32), embed_data text, created_at datetime, expires int not null);');+$db->real_query('create table if not exists plc_cache (did varchar(64) not null primary key, plcdoc text, expires int not null);');+$db->real_query('create table if not exists feed_cache (at_uri varchar(255) not null primary key, title varchar(255) not null, description text, avatar text, creator_did varchar(64) not null, expires int not null);');+$db->real_query('create table if not exists pds_bans (domain varchar(255) not null primary key, reason text);');+$db->real_query('create table if not exists client_suspensions (id int not null auto_increment primary key, did varchar(64) not null, reason text, expires int not null);');+$db->real_query('create table if not exists bans (did varchar(64) not null primary key, reason text);');+$result = $db->query('select * from user_cache where '.$field.'="'.$db->real_escape_string($value).'";');+$result = $db->query('select * from minidoc_cache where '.$field.'="'.$db->real_escape_string($value).'";');+$result = $db->query('select * from post_cache where rkey="'.$db->real_escape_string($rkey).'";');+$result = $db->query('select * from feed_cache where at_uri="'.$db->real_escape_string($at_uri).'";');+function updateUserCache(string $handle, string $did, ?string $display_name, string $pds, ?string $avatar, ?string $banner, ?string $description, ?string $pinned): void {+$db->query('update user_cache set handle="'.$db->real_escape_string($handle).'", display_name="'.$db->real_escape_string($display_name).'", description="'.$db->real_escape_string($description).'", avatar="'.$db->real_escape_string($avatar).'", banner="'.$db->real_escape_string($banner).'", pds="'.$db->real_escape_string($pds).'", pinned_post="'.$db->real_escape_string($pinned).'", expires='.$expires);+$db->query('insert into user_cache (did, handle, display_name, description, avatar, banner, pds, pinned_post, expires) values("'.$db->real_escape_string($did).'", "'.$db->real_escape_string($handle).'", "'.$db->real_escape_string($display_name).'", "'.$db->real_escape_string($description).'", "'.$db->real_escape_string($avatar).'", "'.$db->real_escape_string($banner).'", "'.$db->real_escape_string($pds).'", "'.$db->real_escape_string($pinned).'", '.$expires.');');+function updateMinidocCache(string $handle, string $did, string $pds, string $signingKey): void {+function updatefeedCache(string $atUri, string $title, ?string $description, ?string $avatar, string $creator_did): void {+function updatePostCache(string $rkey, string $did, string $text, ?string $embedType, ?string $embedData, string $createdAt): void {