mirror of
https://github.com/smogon/pokemon-showdown-client.git
synced 2026-03-21 17:50:29 -05:00
Support old replay search API
I completely missed that this was being used...
This commit is contained in:
parent
fb049bef90
commit
3a8a793478
|
|
@ -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]
|
||||
|
|
|
|||
|
|
@ -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 {
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
Loading…
Reference in New Issue
Block a user