1
0
mirror of https://github.com/danog/MadelineProto.git synced 2025-01-22 20:11:26 +01:00

Improvements

This commit is contained in:
Daniil Gentili 2023-07-23 16:42:18 +02:00
parent 6e3312917e
commit 69b8c64260
Signed by: danog
GPG Key ID: 8C1BE3B34B230CA7
2 changed files with 6 additions and 1 deletions

View File

@ -1655,6 +1655,7 @@ final class MTProto implements TLCallback, LoggerGetter
*/
public static function getWebWarnings(): string
{
Magic::start(light: false);
$warning = '';
if (Magic::$version !== Magic::$version_latest) {
$warning .= "<h2 style='color:red;'>".\htmlentities(Lang::$current_lang['update_madelineproto']).'</h2>';

View File

@ -290,6 +290,10 @@ final class Magic
if (\file_exists(__DIR__.'/../.git/refs/heads/v8')) {
try {
self::$version = \trim(@\file_get_contents(__DIR__.'/../.git/refs/heads/v8'));
if (self::$version && !str_ends_with(self::$version, '-81')) {
// Running from within repo
self::$version_latest = self::$version;
}
} catch (Throwable $e) {
}
}
@ -328,7 +332,7 @@ final class Magic
self::$twoe1984 = new BigInteger('010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000', 16);
self::$twoe2047 = new BigInteger('80000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000', 16);
self::$twoe2048 = new BigInteger('0100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000', 16);
if (self::$version) {
if (self::$version && !isset(self::$version_latest)) {
self::$version_latest = null;
try {
$php = (string) \min(81, (int) (PHP_MAJOR_VERSION.PHP_MINOR_VERSION));