ComposerUpdate

This commit is contained in:
Anyon 2019-11-28 11:24:34 +08:00
parent 78010f8e86
commit b6af7068ba
9 changed files with 39 additions and 35 deletions

View File

@ -1,3 +1,2 @@
@echo off @echo off
@rmdir /s/q vendor
composer update --profile --prefer-dist --no-dev --optimize-autoloader composer update --profile --prefer-dist --no-dev --optimize-autoloader

2
vendor/autoload.php vendored
View File

@ -4,4 +4,4 @@
require_once __DIR__ . '/composer/autoload_real.php'; require_once __DIR__ . '/composer/autoload_real.php';
return ComposerAutoloaderInitcd358774cbdeec4e6bc6107ae33ae515::getLoader(); return ComposerAutoloaderInitbf5dd43c242f2a86b1513b16fb281176::getLoader();

View File

@ -2,7 +2,7 @@
// autoload_real.php @generated by Composer // autoload_real.php @generated by Composer
class ComposerAutoloaderInitcd358774cbdeec4e6bc6107ae33ae515 class ComposerAutoloaderInitbf5dd43c242f2a86b1513b16fb281176
{ {
private static $loader; private static $loader;
@ -19,15 +19,15 @@ class ComposerAutoloaderInitcd358774cbdeec4e6bc6107ae33ae515
return self::$loader; return self::$loader;
} }
spl_autoload_register(array('ComposerAutoloaderInitcd358774cbdeec4e6bc6107ae33ae515', 'loadClassLoader'), true, true); spl_autoload_register(array('ComposerAutoloaderInitbf5dd43c242f2a86b1513b16fb281176', 'loadClassLoader'), true, true);
self::$loader = $loader = new \Composer\Autoload\ClassLoader(); self::$loader = $loader = new \Composer\Autoload\ClassLoader();
spl_autoload_unregister(array('ComposerAutoloaderInitcd358774cbdeec4e6bc6107ae33ae515', 'loadClassLoader')); spl_autoload_unregister(array('ComposerAutoloaderInitbf5dd43c242f2a86b1513b16fb281176', 'loadClassLoader'));
$useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded()); $useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
if ($useStaticLoader) { if ($useStaticLoader) {
require_once __DIR__ . '/autoload_static.php'; require_once __DIR__ . '/autoload_static.php';
call_user_func(\Composer\Autoload\ComposerStaticInitcd358774cbdeec4e6bc6107ae33ae515::getInitializer($loader)); call_user_func(\Composer\Autoload\ComposerStaticInitbf5dd43c242f2a86b1513b16fb281176::getInitializer($loader));
} else { } else {
$map = require __DIR__ . '/autoload_namespaces.php'; $map = require __DIR__ . '/autoload_namespaces.php';
foreach ($map as $namespace => $path) { foreach ($map as $namespace => $path) {
@ -48,19 +48,19 @@ class ComposerAutoloaderInitcd358774cbdeec4e6bc6107ae33ae515
$loader->register(true); $loader->register(true);
if ($useStaticLoader) { if ($useStaticLoader) {
$includeFiles = Composer\Autoload\ComposerStaticInitcd358774cbdeec4e6bc6107ae33ae515::$files; $includeFiles = Composer\Autoload\ComposerStaticInitbf5dd43c242f2a86b1513b16fb281176::$files;
} else { } else {
$includeFiles = require __DIR__ . '/autoload_files.php'; $includeFiles = require __DIR__ . '/autoload_files.php';
} }
foreach ($includeFiles as $fileIdentifier => $file) { foreach ($includeFiles as $fileIdentifier => $file) {
composerRequirecd358774cbdeec4e6bc6107ae33ae515($fileIdentifier, $file); composerRequirebf5dd43c242f2a86b1513b16fb281176($fileIdentifier, $file);
} }
return $loader; return $loader;
} }
} }
function composerRequirecd358774cbdeec4e6bc6107ae33ae515($fileIdentifier, $file) function composerRequirebf5dd43c242f2a86b1513b16fb281176($fileIdentifier, $file)
{ {
if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) { if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
require $file; require $file;

View File

@ -4,7 +4,7 @@
namespace Composer\Autoload; namespace Composer\Autoload;
class ComposerStaticInitcd358774cbdeec4e6bc6107ae33ae515 class ComposerStaticInitbf5dd43c242f2a86b1513b16fb281176
{ {
public static $files = array ( public static $files = array (
'841780ea2e1d6545ea3a253239d59c05' => __DIR__ . '/..' . '/qiniu/php-sdk/src/Qiniu/functions.php', '841780ea2e1d6545ea3a253239d59c05' => __DIR__ . '/..' . '/qiniu/php-sdk/src/Qiniu/functions.php',
@ -366,9 +366,9 @@ class ComposerStaticInitcd358774cbdeec4e6bc6107ae33ae515
public static function getInitializer(ClassLoader $loader) public static function getInitializer(ClassLoader $loader)
{ {
return \Closure::bind(function () use ($loader) { return \Closure::bind(function () use ($loader) {
$loader->prefixLengthsPsr4 = ComposerStaticInitcd358774cbdeec4e6bc6107ae33ae515::$prefixLengthsPsr4; $loader->prefixLengthsPsr4 = ComposerStaticInitbf5dd43c242f2a86b1513b16fb281176::$prefixLengthsPsr4;
$loader->prefixDirsPsr4 = ComposerStaticInitcd358774cbdeec4e6bc6107ae33ae515::$prefixDirsPsr4; $loader->prefixDirsPsr4 = ComposerStaticInitbf5dd43c242f2a86b1513b16fb281176::$prefixDirsPsr4;
$loader->classMap = ComposerStaticInitcd358774cbdeec4e6bc6107ae33ae515::$classMap; $loader->classMap = ComposerStaticInitbf5dd43c242f2a86b1513b16fb281176::$classMap;
}, null, ClassLoader::class); }, null, ClassLoader::class);
} }

View File

@ -502,12 +502,12 @@
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/zoujingli/ThinkLibrary.git", "url": "https://github.com/zoujingli/ThinkLibrary.git",
"reference": "0fb1d49fde76d86487940f2b7f6bb6ff7b613648" "reference": "7f20352fb92f249f64f9299cfdb9eda386adca86"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/zoujingli/ThinkLibrary/zipball/0fb1d49fde76d86487940f2b7f6bb6ff7b613648", "url": "https://api.github.com/repos/zoujingli/ThinkLibrary/zipball/7f20352fb92f249f64f9299cfdb9eda386adca86",
"reference": "0fb1d49fde76d86487940f2b7f6bb6ff7b613648", "reference": "7f20352fb92f249f64f9299cfdb9eda386adca86",
"shasum": "", "shasum": "",
"mirrors": [ "mirrors": [
{ {
@ -527,7 +527,7 @@
"qiniu/php-sdk": "^7.2", "qiniu/php-sdk": "^7.2",
"topthink/framework": "5.1.*" "topthink/framework": "5.1.*"
}, },
"time": "2019-11-26T03:42:04+00:00", "time": "2019-11-28T03:18:19+00:00",
"type": "library", "type": "library",
"installation-source": "dist", "installation-source": "dist",
"autoload": { "autoload": {

View File

@ -35,13 +35,13 @@ class DeleteHelper extends Helper
* 数据对象主键名称 * 数据对象主键名称
* @var string * @var string
*/ */
protected $pkField; protected $field;
/** /**
* 数据对象主键值 * 数据对象主键值
* @var string * @var string
*/ */
protected $pkValue; protected $value;
/** /**
* 逻辑器初始化 * 逻辑器初始化
@ -56,11 +56,11 @@ class DeleteHelper extends Helper
{ {
$this->where = $where; $this->where = $where;
$this->query = $this->buildQuery($dbQuery); $this->query = $this->buildQuery($dbQuery);
$this->pkField = empty($field) ? $this->query->getPk() : $field; $this->field = empty($field) ? $this->query->getPk() : $field;
$this->pkValue = $this->app->request->post($this->pkField, null); $this->value = $this->app->request->post($this->field, null);
// 主键限制处理 // 主键限制处理
if (!isset($this->where[$this->pkField]) && is_string($this->pkValue)) { if (!isset($this->where[$this->field]) && is_string($this->value)) {
$this->query->whereIn($this->pkField, explode(',', $this->pkValue)); $this->query->whereIn($this->field, explode(',', $this->value));
} }
// 前置回调处理 // 前置回调处理
if (false === $this->controller->callback('_delete_filter', $this->query, $where)) { if (false === $this->controller->callback('_delete_filter', $this->query, $where)) {

View File

@ -53,7 +53,7 @@ class AuthService extends Service
if (empty($nodes[$real]['isauth'])) { if (empty($nodes[$real]['isauth'])) {
return empty($nodes[$real]['islogin']) ? true : $this->isLogin(); return empty($nodes[$real]['islogin']) ? true : $this->isLogin();
} else { } else {
return in_array($real, $this->app->session->get('user.nodes')); return in_array($real, (array)$this->app->session->get('user.nodes'));
} }
} }

View File

@ -146,7 +146,11 @@ class CaptchaService extends Service
$_x = $this->width / $this->codelen; $_x = $this->width / $this->codelen;
for ($i = 0; $i < $this->codelen; $i++) { for ($i = 0; $i < $this->codelen; $i++) {
$this->fontcolor = imagecolorallocate($this->img, mt_rand(0, 156), mt_rand(0, 156), mt_rand(0, 156)); $this->fontcolor = imagecolorallocate($this->img, mt_rand(0, 156), mt_rand(0, 156), mt_rand(0, 156));
if (function_exists('imagettftext')) {
imagettftext($this->img, $this->fontsize, mt_rand(-30, 30), $_x * $i + mt_rand(1, 5), $this->height / 1.4, $this->fontcolor, $this->font, $this->code[$i]); imagettftext($this->img, $this->fontsize, mt_rand(-30, 30), $_x * $i + mt_rand(1, 5), $this->height / 1.4, $this->fontcolor, $this->font, $this->code[$i]);
} else {
imagestring($this->img, 15, $_x * $i + mt_rand(0, 25), mt_rand(15, 20), $this->code[$i], $this->fontcolor);
}
} }
ob_start(); ob_start();
imagepng($this->img); imagepng($this->img);

View File

@ -53,10 +53,9 @@ class ProcessService extends Service
public function create($command) public function create($command)
{ {
if ($this->iswin()) { if ($this->iswin()) {
$command = __DIR__ . "/bin/console.exe {$command}"; $this->exec(__DIR__ . "/bin/console.exe {$command}");
pclose(popen("wmic process call create \"{$command}\"", 'r'));
} else { } else {
pclose(popen("{$command} &", 'r')); $this->exec("{$command} > /dev/null &");
} }
return $this; return $this;
} }
@ -70,14 +69,14 @@ class ProcessService extends Service
{ {
$list = []; $list = [];
if ($this->iswin()) { if ($this->iswin()) {
$result = $this->exec('wmic process where name="php.exe" get processid,CommandLine'); $lines = $this->exec('wmic process where name="php.exe" get processid,CommandLine', true);
foreach (explode("\n", $result) as $line) if ($this->_issub($line, $command) !== false) { foreach ($lines as $line) if ($this->_issub($line, $command) !== false) {
$attr = explode(' ', $this->_space($line)); $attr = explode(' ', $this->_space($line));
$list[] = ['pid' => array_pop($attr), 'cmd' => join(' ', $attr)]; $list[] = ['pid' => array_pop($attr), 'cmd' => join(' ', $attr)];
} }
} else { } else {
$result = $this->exec("ps ax|grep -v grep|grep \"{$command}\""); $lines = $this->exec("ps ax|grep -v grep|grep \"{$command}\"", true);
foreach (explode("\n", $result) as $line) if ($this->_issub($line, $command) !== false) { foreach ($lines as $line) if ($this->_issub($line, $command) !== false) {
$attr = explode(' ', $this->_space($line)); $attr = explode(' ', $this->_space($line));
list($pid) = [array_shift($attr), array_shift($attr), array_shift($attr), array_shift($attr)]; list($pid) = [array_shift($attr), array_shift($attr), array_shift($attr), array_shift($attr)];
$list[] = ['pid' => $pid, 'cmd' => join(' ', $attr)]; $list[] = ['pid' => $pid, 'cmd' => join(' ', $attr)];
@ -104,11 +103,13 @@ class ProcessService extends Service
/** /**
* 立即执行指令 * 立即执行指令
* @param string $command 执行指令 * @param string $command 执行指令
* @return string * @param boolean $outarr 返回类型
* @return string|array
*/ */
public function exec($command) public function exec($command, $outarr = false)
{ {
return shell_exec($command); exec($command, $output);
return $outarr ? $output : join("\n", $output);
} }
/** /**