From ccec51ad88af57fc74a7287d16f971b850026e12 Mon Sep 17 00:00:00 2001 From: yumo Date: Fri, 5 May 2023 11:10:57 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0vendor=20=E4=BF=AE=E6=AD=A3?= =?UTF-8?q?=E7=94=9F=E6=88=90sitemap?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/BaseController.php | 4 +- app/admin/controller/Index.php | 28 +- app/admin/view/index/index.html | 7 +- app/admin/view/index/main.html | 16 + vendor/autoload.php | 17 +- vendor/composer/ClassLoader.php | 41 ++- vendor/composer/autoload_psr4.php | 5 +- vendor/composer/autoload_real.php | 27 +- vendor/composer/autoload_static.php | 15 +- vendor/composer/installed.json | 328 +++++++++++------- vendor/composer/installed.php | 103 +++--- vendor/doctrine/annotations/README.md | 6 + vendor/doctrine/annotations/composer.json | 13 +- .../doctrine/annotations/docs/en/custom.rst | 2 +- vendor/doctrine/annotations/docs/en/index.rst | 9 + .../Common/Annotations/Annotation.php | 4 +- .../Common/Annotations/Annotation/Enum.php | 4 +- .../Annotation/IgnoreAnnotation.php | 4 +- .../Common/Annotations/Annotation/Target.php | 4 +- .../Annotations/AnnotationException.php | 11 +- .../Common/Annotations/CachedReader.php | 4 +- .../Doctrine/Common/Annotations/DocLexer.php | 18 +- .../Doctrine/Common/Annotations/DocParser.php | 41 ++- .../Common/Annotations/TokenParser.php | 4 +- vendor/doctrine/deprecations/LICENSE | 19 + vendor/doctrine/deprecations/README.md | 154 ++++++++ vendor/doctrine/deprecations/composer.json | 32 ++ .../lib/Doctrine/Deprecations/Deprecation.php | 266 ++++++++++++++ .../PHPUnit/VerifyDeprecations.php | 66 ++++ vendor/doctrine/deprecations/phpcs.xml | 22 ++ vendor/doctrine/lexer/UPGRADE.md | 14 + vendor/doctrine/lexer/composer.json | 37 +- vendor/doctrine/lexer/psalm.xml | 15 - .../Common/Lexer => src}/AbstractLexer.php | 67 ++-- vendor/doctrine/lexer/src/Token.php | 145 ++++++++ vendor/egulias/email-validator/CHANGELOG.md | 2 +- vendor/egulias/email-validator/LICENSE | 2 +- vendor/egulias/email-validator/composer.json | 3 +- .../email-validator/src/EmailLexer.php | 124 +++---- .../email-validator/src/EmailParser.php | 3 +- .../email-validator/src/MessageIDParser.php | 5 +- .../email-validator/src/Parser/Comment.php | 5 +- .../CommentStrategy/CommentStrategy.php | 2 +- .../Parser/CommentStrategy/DomainComment.php | 2 +- .../Parser/CommentStrategy/LocalComment.php | 2 +- .../src/Parser/DomainLiteral.php | 6 +- .../email-validator/src/Parser/DomainPart.php | 10 +- .../src/Parser/DoubleQuote.php | 3 +- .../src/Parser/FoldingWhiteSpace.php | 4 +- .../email-validator/src/Parser/IDLeftPart.php | 3 +- .../src/Parser/IDRightPart.php | 2 +- .../email-validator/src/Parser/LocalPart.php | 4 +- .../email-validator/src/Parser/PartParser.php | 2 +- .../src/Result/InvalidEmail.php | 4 +- .../src/Result/Reason/AtextAfterCFWS.php | 2 +- .../src/Result/Reason/CRLFAtTheEnd.php | 4 +- .../src/Result/Reason/CharNotAllowed.php | 2 +- .../src/Result/Reason/CommaInDomain.php | 2 +- .../src/Result/Reason/CommentsInIDRight.php | 2 +- .../src/Result/Reason/DetailedReason.php | 2 +- .../src/Result/Reason/DomainAcceptsNoMail.php | 2 +- .../src/Result/Reason/ExceptionFound.php | 2 +- .../Reason/ExpectingDomainLiteralClose.php | 2 +- .../Result/Reason/LocalOrReservedDomain.php | 2 +- .../src/Result/Reason/NoDNSRecord.php | 2 +- .../src/Result/Reason/Reason.php | 2 +- .../src/Result/Reason/UnOpenedComment.php | 2 +- .../src/Result/Reason/UnusualElements.php | 2 +- .../email-validator/src/Result/Result.php | 2 +- .../email-validator/src/Result/SpoofEmail.php | 3 +- .../email-validator/src/Result/ValidEmail.php | 2 +- .../src/Validation/DNSCheckValidation.php | 7 +- .../src/Validation/DNSGetRecordWrapper.php | 2 +- .../src/Validation/DNSRecords.php | 2 +- .../Exception/EmptyValidationList.php | 2 +- .../Validation/MultipleValidationWithAnd.php | 4 +- .../src/Warning/AddressLiteral.php | 2 +- .../src/Warning/CFWSNearAt.php | 2 +- .../src/Warning/CFWSWithFWS.php | 2 +- .../email-validator/src/Warning/Comment.php | 2 +- .../src/Warning/DeprecatedComment.php | 2 +- .../src/Warning/DomainLiteral.php | 2 +- .../src/Warning/EmailTooLong.php | 2 +- .../src/Warning/IPV6BadChar.php | 2 +- .../src/Warning/IPV6ColonEnd.php | 2 +- .../src/Warning/IPV6ColonStart.php | 2 +- .../src/Warning/IPV6Deprecated.php | 2 +- .../src/Warning/IPV6DoubleColon.php | 2 +- .../src/Warning/IPV6GroupCount.php | 2 +- .../src/Warning/IPV6MaxGroups.php | 2 +- .../src/Warning/LocalTooLong.php | 4 +- .../src/Warning/NoDNSMXRecord.php | 2 +- .../src/Warning/ObsoleteDTEXT.php | 2 +- .../src/Warning/QuotedPart.php | 2 +- .../src/Warning/QuotedString.php | 2 +- .../email-validator/src/Warning/TLD.php | 2 +- .../email-validator/src/Warning/Warning.php | 2 +- vendor/phpmailer/phpmailer/README.md | 22 +- vendor/phpmailer/phpmailer/VERSION | 2 +- vendor/phpmailer/phpmailer/composer.json | 12 +- .../phpmailer/phpmailer/get_oauth_token.php | 20 ++ .../phpmailer/language/phpmailer.lang-da.php | 10 +- .../phpmailer/language/phpmailer.lang-es.php | 4 + .../phpmailer/language/phpmailer.lang-pl.php | 13 +- vendor/phpmailer/phpmailer/src/PHPMailer.php | 71 +++- vendor/phpmailer/phpmailer/src/POP3.php | 9 +- vendor/phpmailer/phpmailer/src/SMTP.php | 3 +- vendor/psr/http-message/README.md | 5 +- vendor/psr/http-message/composer.json | 4 +- .../psr/http-message/docs/PSR7-Interfaces.md | 130 +++++++ vendor/psr/http-message/docs/PSR7-Usage.md | 159 +++++++++ .../psr/http-message/src/MessageInterface.php | 16 +- .../psr/http-message/src/RequestInterface.php | 10 +- .../http-message/src/ResponseInterface.php | 4 +- .../src/ServerRequestInterface.php | 8 +- .../psr/http-message/src/StreamInterface.php | 12 +- .../src/UploadedFileInterface.php | 4 +- vendor/psr/http-message/src/UriInterface.php | 17 +- vendor/services.php | 2 +- .../Debug/WrappedListener.php | 12 +- .../RegisterListenersPass.php | 4 +- vendor/symfony/event-dispatcher/LICENSE | 2 +- .../http-foundation/BinaryFileResponse.php | 21 +- vendor/symfony/http-foundation/Cookie.php | 2 +- .../Exception/SessionNotFoundException.php | 2 +- .../symfony/http-foundation/HeaderUtils.php | 2 +- vendor/symfony/http-foundation/IpUtils.php | 19 +- vendor/symfony/http-foundation/LICENSE | 2 +- vendor/symfony/http-foundation/Request.php | 24 +- vendor/symfony/http-foundation/Response.php | 10 +- .../Session/SessionInterface.php | 18 +- .../Handler/MemcachedSessionHandler.php | 17 +- .../Handler/NativeFileSessionHandler.php | 14 +- .../Storage/Handler/PdoSessionHandler.php | 4 +- .../Session/Storage/MetadataBag.php | 8 +- .../Session/Storage/NativeSessionStorage.php | 7 +- .../Storage/SessionStorageInterface.php | 10 +- .../http-foundation/StreamedResponse.php | 4 +- .../Constraint/ResponseCookieValueSame.php | 2 +- vendor/symfony/mailer/CHANGELOG.md | 6 + vendor/symfony/mailer/LICENSE | 2 +- .../mailer/Test/TransportFactoryTestCase.php | 10 +- .../mailer/Transport/RoundRobinTransport.php | 6 +- .../Transport/Smtp/Stream/AbstractStream.php | 2 +- .../Transport/Smtp/Stream/ProcessStream.php | 2 +- vendor/symfony/mailer/composer.json | 4 +- .../symfony/mime/FileinfoMimeTypeGuesser.php | 2 +- .../symfony/mime/Header/MailboxListHeader.php | 8 +- vendor/symfony/mime/LICENSE | 2 +- vendor/symfony/mime/Part/MessagePart.php | 13 + .../mime/Part/Multipart/FormDataPart.php | 2 +- vendor/symfony/mime/composer.json | 2 +- vendor/topthink/framework/README.md | 3 +- vendor/topthink/framework/composer.json | 2 +- vendor/topthink/framework/src/think/App.php | 3 +- .../framework/src/think/Container.php | 4 +- vendor/topthink/framework/src/think/File.php | 19 +- .../src/think/console/output/Ask.php | 2 +- .../src/think/console/output/Descriptor.php | 2 +- .../src/think/validate/ValidateRule.php | 112 +++--- vendor/topthink/think-captcha/composer.json | 2 +- vendor/topthink/think-captcha/src/Captcha.php | 36 +- .../topthink/think-filesystem/composer.json | 2 +- .../src/filesystem/Driver.php | 2 +- vendor/topthink/think-multi-app/composer.json | 2 +- .../topthink/think-multi-app/src/Service.php | 64 ++-- vendor/topthink/think-orm/src/DbManager.php | 10 + vendor/topthink/think-orm/src/Model.php | 16 +- vendor/topthink/think-orm/src/Paginator.php | 13 + .../topthink/think-orm/src/db/BaseQuery.php | 41 ++- vendor/topthink/think-orm/src/db/Builder.php | 92 ++++- .../topthink/think-orm/src/db/Connection.php | 2 +- .../think-orm/src/db/PDOConnection.php | 206 +++++++---- vendor/topthink/think-orm/src/db/Query.php | 1 - .../think-orm/src/db/builder/Mongo.php | 2 - .../think-orm/src/db/builder/Mysql.php | 72 +++- .../src/db/concern/AggregateQuery.php | 13 +- .../src/db/concern/JoinAndViewQuery.php | 1 - .../src/db/concern/ModelRelationQuery.php | 19 - .../think-orm/src/db/concern/ParamsBind.php | 27 ++ .../think-orm/src/db/concern/WhereQuery.php | 19 +- .../think-orm/src/db/connector/Sqlsrv.php | 2 +- .../topthink/think-orm/src/model/Relation.php | 37 +- .../think-orm/src/model/concern/Attribute.php | 6 +- .../src/model/concern/Conversion.php | 77 ++-- .../src/model/concern/RelationShip.php | 6 +- .../src/model/concern/SoftDelete.php | 107 ++---- .../think-orm/src/model/concern/TimeStamp.php | 2 +- .../src/model/relation/BelongsTo.php | 5 +- .../src/model/relation/BelongsToMany.php | 13 +- .../think-orm/src/model/relation/HasMany.php | 20 +- .../src/model/relation/HasManyThrough.php | 15 +- .../think-orm/src/model/relation/HasOne.php | 5 +- .../src/model/relation/HasOneThrough.php | 1 - .../src/model/relation/MorphMany.php | 18 +- .../think-orm/src/model/relation/MorphOne.php | 5 +- .../think-orm/src/model/relation/MorphTo.php | 153 +++++--- .../src/model/relation/MorphToMany.php | 28 +- .../think-orm/src/model/relation/OneToOne.php | 25 +- .../topthink/think-orm/stubs/load_stubs.php | 2 +- .../topthink/think-template/src/Template.php | 2 +- 201 files changed, 2782 insertions(+), 1156 deletions(-) create mode 100644 vendor/doctrine/deprecations/LICENSE create mode 100644 vendor/doctrine/deprecations/README.md create mode 100644 vendor/doctrine/deprecations/composer.json create mode 100644 vendor/doctrine/deprecations/lib/Doctrine/Deprecations/Deprecation.php create mode 100644 vendor/doctrine/deprecations/lib/Doctrine/Deprecations/PHPUnit/VerifyDeprecations.php create mode 100644 vendor/doctrine/deprecations/phpcs.xml create mode 100644 vendor/doctrine/lexer/UPGRADE.md delete mode 100644 vendor/doctrine/lexer/psalm.xml rename vendor/doctrine/lexer/{lib/Doctrine/Common/Lexer => src}/AbstractLexer.php (83%) create mode 100644 vendor/doctrine/lexer/src/Token.php create mode 100644 vendor/psr/http-message/docs/PSR7-Interfaces.md create mode 100644 vendor/psr/http-message/docs/PSR7-Usage.md diff --git a/app/BaseController.php b/app/BaseController.php index ebc71f3..127daf9 100644 --- a/app/BaseController.php +++ b/app/BaseController.php @@ -116,6 +116,8 @@ abstract class BaseController $url = $_SERVER["HTTP_REFERER"]; } elseif ($url) { $url = (strpos($url, '://') || 0 === strpos($url, '/')) ? $url : app('route')->buildUrl($url); + }else{ + $url = app('route')->buildUrl("/"); } $result = [ @@ -152,7 +154,6 @@ abstract class BaseController } elseif ($url) { $url = (strpos($url, '://') || 0 === strpos($url, '/')) ? $url : $this->app->route->buildUrl($url); } - $result = [ 'code' => 0, 'msg' => $msg, @@ -160,7 +161,6 @@ abstract class BaseController 'url' => $url, 'wait' => $wait, ]; - $type = $this->getResponseType(); if ($type == 'html') { $response = view(config('app.dispatch_success_tmpl'), $result); diff --git a/app/admin/controller/Index.php b/app/admin/controller/Index.php index 6912828..777efcb 100644 --- a/app/admin/controller/Index.php +++ b/app/admin/controller/Index.php @@ -15,6 +15,7 @@ use Exception; use think\db\exception\DataNotFoundException; use think\db\exception\DbException; use think\db\exception\ModelNotFoundException; +use think\facade\Request; class Index extends AuthController { @@ -82,11 +83,9 @@ class Index extends AuthController */ public function sitemap() { - //获取协议 - $protocol = ((!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] != 'off') || $_SERVER['SERVER_PORT'] == 443) ? - "https://" : "http://"; + //获取域名 - $domain = $protocol . $_SERVER['HTTP_HOST']; + $domain = Request::domain(); //获取页码 $page = input('page/d'); if (!$page) { @@ -114,10 +113,9 @@ class Index extends AuthController ->where('status', 1)->where('status', 1) ->page($page, $pagesize) ->order('id desc')->select(); - foreach ($categoryInfo as $v) { $str .= ''; - $str .= '' . $domain . url('article/lists?id=' . $v['id']) . ''; + $str .= '' . url('index/article/lists',["id"=>$v['id']],".html",$domain) . ''; $str .= '' . $v['create_time'] . ''; $str .= 'always'; $str .= '0.8'; @@ -132,7 +130,7 @@ class Index extends AuthController foreach ($documentInfo as $v) { $str .= ''; - $str .= '' . $domain . url('article/detail?id=' . $v['id']) . $v['id'] . ''; + $str .= '' . url('/index/article/detail',["id"=>$v['id']],".html",$domain) . ''; $str .= '' . $v['create_time'] . ''; $str .= 'monthly'; $str .= '0.6'; @@ -140,17 +138,13 @@ class Index extends AuthController } if (count($categoryInfo) < $pagesize && count($documentInfo) < $pagesize) { $str .= ''; - if (!(file_put_contents('sitemap.xml', $str, FILE_APPEND | LOCK_EX))) { - $this->error('站点地图更新失败!',"/admin/"); - } else { - $this->success('站点地图全部更新完成!', "/admin/"); - } + return (!(file_put_contents('sitemap.xml', $str, FILE_APPEND | LOCK_EX))) ? + $this->failedNotice("站点地图更新失败!", "/admin/") : + $this->successfulNotice("站点地图全部更新完成!", "/admin/"); } //写入 - if (!(file_put_contents('sitemap.xml', $str, FILE_APPEND | LOCK_EX))) { - $this->error('站点地图更新失败!'); - } else { - $this->success('站点地图正在生成,请稍后(' . $page . ')...', 'sitemap?page=' . ($page + 1)); - } + return (!(file_put_contents('sitemap.xml', $str, FILE_APPEND | LOCK_EX))) ? + $this->failedNotice("站点地图更新失败!", "/admin/") : + $this->successfulNotice('站点地图正在生成,请稍后(' . $page . ')...', 'sitemap?page=' . ($page + 1)); } } \ No newline at end of file diff --git a/app/admin/view/index/index.html b/app/admin/view/index/index.html index 0bd97a3..728af5d 100644 --- a/app/admin/view/index/index.html +++ b/app/admin/view/index/index.html @@ -38,9 +38,10 @@