diff options
author | RaindropsSys <contact@minteck.org> | 2023-04-13 22:07:44 +0200 |
---|---|---|
committer | RaindropsSys <contact@minteck.org> | 2023-04-13 22:07:44 +0200 |
commit | eb7405f92bd01ab59a056ff5df6d2f1d6b30f0ce (patch) | |
tree | c15e12e96e0e83b665e4931df50bc034620fde3e /pages/metadata.inc | |
parent | eafc2b02a66838fdadb2da70d5b1a9aa04051de6 (diff) | |
download | pluralconnect-eb7405f92bd01ab59a056ff5df6d2f1d6b30f0ce.tar.gz pluralconnect-eb7405f92bd01ab59a056ff5df6d2f1d6b30f0ce.tar.bz2 pluralconnect-eb7405f92bd01ab59a056ff5df6d2f1d6b30f0ce.zip |
Updated 13 files and added 2 files (automated)
Diffstat (limited to 'pages/metadata.inc')
-rw-r--r-- | pages/metadata.inc | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/pages/metadata.inc b/pages/metadata.inc index 04579a8..b254ceb 100644 --- a/pages/metadata.inc +++ b/pages/metadata.inc @@ -53,10 +53,6 @@ if ($member === null) { header("Content-Type: text/plain"); - if (isset($_GET["bitset"]) && is_numeric($_GET["bitset"])) { - $toUpdate["bitset"] = (int)$_GET["bitset"]; - } - if (isset($_GET["food"]) && is_numeric($_GET["food"])) { $toUpdate["food"] = (int)$_GET["food"]; } @@ -125,6 +121,12 @@ if ($member === null) { })); } + if (isset($_GET["friends"])) { + $toUpdate["friends"] = array_values(array_filter(array_map(function ($i) { return trim($i); }, explode(",", $_GET["friends"])), function ($i) use ($regex) { + return !!preg_match($regex, $i); + })); + } + if (isset($_GET['regressed'])) { if (!!preg_match("/^[a-z]{5}$/m", $_GET['regressed'])) { $toUpdate["regression"] = $_GET['regressed']; @@ -175,6 +177,7 @@ if ($member === null) { } if (isset($metadata["bitset"])) unset($metadata["bitset"]); + if (isset($metadata["code"])) unset($metadata["code"]); if (trim($metadata["species"][1]) === "") unset($metadata["species"][1]); file_put_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/metadata/" . $memberID . ".json", json_encode($metadata)); |