mirror of
https://github.com/danog/MadelineProto.git
synced 2024-11-27 03:34:42 +01:00
Merge branch 'master' of https://github.com/danog/MadelineProto
This commit is contained in:
commit
c07ab02c66
19
.vscode/launch.json
vendored
19
.vscode/launch.json
vendored
@ -1,19 +0,0 @@
|
||||
{
|
||||
"version": "0.2.0",
|
||||
"configurations": [
|
||||
{
|
||||
"name": "Listen for XDebug",
|
||||
"type": "php",
|
||||
"request": "launch",
|
||||
"port": 9002
|
||||
},
|
||||
{
|
||||
"name": "Launch currently open script",
|
||||
"type": "php",
|
||||
"request": "launch",
|
||||
"program": "${workspaceRoot}/testing.php",
|
||||
"cwd": "${fileDirname}",
|
||||
"port": 9000
|
||||
}
|
||||
]
|
||||
}
|
@ -2,9 +2,19 @@
|
||||
|
||||
namespace phpseclib\Math;
|
||||
|
||||
if (PHP_MAJOR_VERSION < 7 && !(class_exists('\Phar') && \Phar::running())) {
|
||||
if (PHP_MAJOR_VERSION < 7 && !(class_exists('\\Phar') && \Phar::running())) {
|
||||
throw new \Exception('MadelineProto requires php 7 to run');
|
||||
}
|
||||
if (defined('HHVM_VERSION')) {
|
||||
$engines = [['PHP64', ['OpenSSL']], ['BCMath', ['OpenSSL']], ['PHP32', ['OpenSSL']]];
|
||||
foreach ($engines as $engine) {
|
||||
try {
|
||||
\phpseclib\Math\BigInteger::setEngine($engine[0], isset($engine[1]) ? $engine[1] : []);
|
||||
break;
|
||||
} catch (\Exception $e) {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
class BigIntegor
|
||||
{
|
||||
|
@ -74,18 +74,6 @@ class Logger
|
||||
$this->colors[self::WARNING] = implode(';', [self::foreground['white'], self::set['dim'], self::background['red']]);
|
||||
$this->colors[self::ERROR] = implode(';', [self::foreground['white'], self::set['bold'], self::background['red']]);
|
||||
$this->colors[self::FATAL_ERROR] = implode(';', [self::foreground['red'], self::set['bold'], self::background['light_gray']]);
|
||||
|
||||
if (!self::$printed) {
|
||||
$this->colors[self::NOTICE] = implode(';', [self::foreground['light_gray'], self::set['bold'], self::background['blue']]);
|
||||
|
||||
$this->logger('MadelineProto');
|
||||
$this->logger('Copyright (C) 2016-2018 Daniil Gentili');
|
||||
$this->logger('Licensed under AGPLv3');
|
||||
$this->logger('https://github.com/danog/MadelineProto');
|
||||
|
||||
$this->colors[self::NOTICE] = implode(';', [self::foreground['yellow'], self::set['bold']]);
|
||||
self::$printed = true;
|
||||
}
|
||||
}
|
||||
|
||||
public static function log($param, $level = self::NOTICE)
|
||||
@ -100,6 +88,17 @@ class Logger
|
||||
if ($level > $this->level || $this->mode === 0) {
|
||||
return false;
|
||||
}
|
||||
if (!self::$printed) {
|
||||
self::$printed = true;
|
||||
$this->colors[self::NOTICE] = implode(';', [self::foreground['light_gray'], self::set['bold'], self::background['blue']]);
|
||||
|
||||
$this->logger('MadelineProto');
|
||||
$this->logger('Copyright (C) 2016-2018 Daniil Gentili');
|
||||
$this->logger('Licensed under AGPLv3');
|
||||
$this->logger('https://github.com/danog/MadelineProto');
|
||||
|
||||
$this->colors[self::NOTICE] = implode(';', [self::foreground['yellow'], self::set['bold']]);
|
||||
}
|
||||
if ($this->mode === 4) {
|
||||
return call_user_func_array($this->optional, [$param, $level]);
|
||||
}
|
||||
|
@ -32,6 +32,7 @@ composer update
|
||||
cd ..
|
||||
|
||||
$php7to5 convert --copy-all phar7 phar5 >/dev/null
|
||||
find phar5 -type f -exec sed 's/\w* \.\.\./.../' -i {} +
|
||||
|
||||
[ "$TRAVIS_BRANCH" != "master" ] && branch="-$TRAVIS_BRANCH" || branch=""
|
||||
|
||||
|
@ -32,6 +32,7 @@ cp -a ../src vendor/danog/madelineproto
|
||||
cd ..
|
||||
|
||||
$php7to5 convert --copy-all phar7 phar5 >/dev/null
|
||||
find phar5 -type f -exec sed 's/\w* \.\.\./.../' -i {} +
|
||||
|
||||
php makephar.php phar5 madeline.phar $(cat .git/refs/heads/master)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user