diff --git a/replay.pokemonshowdown.com/.htaccess b/replay.pokemonshowdown.com/.htaccess index 92b3bd965..da2677be0 100644 --- a/replay.pokemonshowdown.com/.htaccess +++ b/replay.pokemonshowdown.com/.htaccess @@ -1,6 +1,7 @@ RewriteEngine on RewriteRule ^api(/.*)?$ http://localhost:9000/api$1 [P,L] +RewriteRule ^search\.json$ search.json.php [L,QSA] RewriteRule ^([A-Za-z0-9-]+)$ replay.php?name=$1 [L,QSA] RewriteRule ^([A-Za-z0-9-]+)/manage$ replay-manage.php?name=$1&manage [L,QSA] RewriteRule ^([A-Za-z0-9-]+)\.log$ replay.log.php?name=$1 [L,QSA] diff --git a/replay.pokemonshowdown.com/replay.log.php b/replay.pokemonshowdown.com/replay.log.php index aa5f3dc1c..1d5e9d064 100644 --- a/replay.pokemonshowdown.com/replay.log.php +++ b/replay.pokemonshowdown.com/replay.log.php @@ -60,7 +60,7 @@ if ($replay['password'] ?? null) { $replay['log'] = str_replace("\r","",$replay['log']); -if ($replay['inputlog']) { +if (@$replay['inputlog']) { if (substr($replay['formatid'], -12) === 'randombattle' || substr($replay['formatid'], -19) === 'randomdoublesbattle' || $replay['formatid'] === 'gen7challengecup' || $replay['formatid'] === 'gen7challengecup1v1' || $replay['formatid'] === 'gen7battlefactory' || $replay['formatid'] === 'gen7bssfactory' || $replay['formatid'] === 'gen7hackmonscup' || $manage) { // ok } else { diff --git a/old-replays/search.yesjson.php b/replay.pokemonshowdown.com/search.json.php similarity index 96% rename from old-replays/search.yesjson.php rename to replay.pokemonshowdown.com/search.json.php index c714bea56..ea9158120 100644 --- a/old-replays/search.yesjson.php +++ b/replay.pokemonshowdown.com/search.json.php @@ -10,7 +10,7 @@ $isPrivate = isset($_REQUEST['private']); header('Content-Type: application/json'); header('Access-Control-Allow-Origin: *'); -require_once '../../replays/replays.lib.php'; +require_once 'replays.lib.php'; $username = $Replays->toID($username); $isPrivateAllowed = false; diff --git a/old-replays/search.notjson.php b/replay.pokemonshowdown.com/search.notjson.php similarity index 100% rename from old-replays/search.notjson.php rename to replay.pokemonshowdown.com/search.notjson.php