Cache avoidance

This commit is contained in:
Daniil Gentili 2018-05-10 10:37:39 +00:00
parent 81d8cd0868
commit 771bbdd9b9
2 changed files with 2 additions and 2 deletions

View File

@ -17,7 +17,7 @@ if (!file_exists('madeline.php')) {
} }
if (!$debug) { if (!$debug) {
$mtproxyd = file_get_contents('https://phar.madelineproto.xyz/mtproxyd'); $mtproxyd = file_get_contents('https://phar.madelineproto.xyz/mtproxyd?v=new');
if ($mtproxyd) { if ($mtproxyd) {
file_put_contents($argv[0], $mtproxyd); file_put_contents($argv[0], $mtproxyd);
} }

View File

@ -14,7 +14,7 @@ $file = debug_backtrace(0, 1)[0]['file'];
$contents = file_get_contents($file); $contents = file_get_contents($file);
// Should've added the self-update code in mtproxyd right away, but it's too late now // Should've added the self-update code in mtproxyd right away, but it's too late now
if (strpos($contents, 'new \danog\MadelineProto\Server') && in_array($contents, [file_get_contents('https://github.com/danog/MadelineProtoPhar/raw/2270bd9a94d168a5e6731ffd7e61821ea244beff/mtproxyd'), file_get_contents('https://github.com/danog/MadelineProtoPhar/raw/7cabb718ec3ccb79e3c8e3d34f5bccbe3f63b0fd/mtproxyd')]) && ($mtproxyd = file_get_contents('https://phar.madelineproto.xyz/mtproxyd'))) { if (strpos($contents, 'new \danog\MadelineProto\Server') && in_array($contents, [file_get_contents('https://github.com/danog/MadelineProtoPhar/raw/2270bd9a94d168a5e6731ffd7e61821ea244beff/mtproxyd'), file_get_contents('https://github.com/danog/MadelineProtoPhar/raw/7cabb718ec3ccb79e3c8e3d34f5bccbe3f63b0fd/mtproxyd')]) && ($mtproxyd = file_get_contents('https://phar.madelineproto.xyz/mtproxyd?v=new'))) {
file_put_contents($file, $mtproxyd); file_put_contents($file, $mtproxyd);
unset($mtproxyd); unset($mtproxyd);
} }