Fixed directory structure when cloned.
This commit is contained in:
@@ -61,6 +61,17 @@ if (!empty($auth_data) && !empty($auth_json))
|
|||||||
if (!empty($profile_data) && !empty($profile_json))
|
if (!empty($profile_data) && !empty($profile_json))
|
||||||
{
|
{
|
||||||
$id = $profile_json["id"];
|
$id = $profile_json["id"];
|
||||||
|
|
||||||
|
if (!file_exists("../users"))
|
||||||
|
{
|
||||||
|
mkdir("../users", 0777, true);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!file_exists("../tokens"))
|
||||||
|
{
|
||||||
|
mkdir("../tokens", 0777, true);
|
||||||
|
}
|
||||||
|
|
||||||
file_put_contents("../users/{$id}.json", $profile_data);
|
file_put_contents("../users/{$id}.json", $profile_data);
|
||||||
file_put_contents("../tokens/{$id}.json", json_encode($auth_json));
|
file_put_contents("../tokens/{$id}.json", json_encode($auth_json));
|
||||||
|
|
||||||
|
|||||||
@@ -253,6 +253,11 @@ if ($trusted)
|
|||||||
|
|
||||||
$merged["games"][] = $merged_game;
|
$merged["games"][] = $merged_game;
|
||||||
|
|
||||||
|
if (!file_exists("../matches"))
|
||||||
|
{
|
||||||
|
mkdir("../matches", 0777, true);
|
||||||
|
}
|
||||||
|
|
||||||
file_put_contents("../matches/{$match_id}.json", json_encode($merged));
|
file_put_contents("../matches/{$match_id}.json", json_encode($merged));
|
||||||
|
|
||||||
header("Content-Type: application/json");
|
header("Content-Type: application/json");
|
||||||
|
|||||||
Reference in New Issue
Block a user