diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 000000000..603f68158 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,4 @@ +**.html diff=sjis +**.inc diff=sjis +**.php diff=sjis +**.txt diff=sjis diff --git a/.gitignore b/.gitignore index 8f6eb45ce..c75800a47 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,3 @@ -composer.lock composer.phar ttf vendor diff --git a/README.md b/README.md index c5d93a93e..c7e02a9e1 100644 --- a/README.md +++ b/README.md @@ -1,23 +1,28 @@ -# rep2 expack 全部入り by open774 +# rep2 expack 全部入り for PHP 8.x by (´・ω・) ス * rep2-expack https://github.com/rsky/p2-php * rep2-expack +live https://github.com/pluslive/p2-php * rep2-expack test https://github.com/orzisun/p2-php +* rep2-expack https://github.com/open774/p2-php +* rep2-expack https://github.com/junk2ool/p2-php 上記やスレに上げられた修正を取り込んで全部入りを目指す闇鍋バージョンです。 -独自の改良も行っています。 +**このリポジトリにはrep2をPHP 8.xで動かすためのパッチが含まれています。** -* [スクリーンショット](https://open774.github.io/p2-php/screenshots.html) -* [Wiki](https://github.com/open774/p2-php/wiki) -* **[FAQ](https://github.com/open774/p2-php/wiki/FAQ) スレに書く前にからならず確認** +- [スクリーンショット](https://open774.github.io/p2-php/screenshots.html) +- [Wiki](https://github.com/open774/p2-php/wiki) +- [p2Wiki](http://akid.s17.xrea.com/p2puki/index.phtml) +- **[FAQ](https://github.com/open774/p2-php/wiki/FAQ) スレに書く前にからならず確認** ### 主な追加機能 各機能の説明はdocディレクトリのREADMEファイルを見てください。 * cronとかで最近読んだスレなどのdatをDL出来るスクリプト追加 -
 php scripts/fetch-dat.php --mode モードを一つ指定(fav recent res_hist)
+```shell +php scripts/fetch-dat.php --mode モードを一つ指定(fav recent res_hist) +``` * 名無しが節穴になる板に名無しで書き込むときに警告を出す機能を追加 * NGあぼーんの対象になったレスのIDを自動的にNGあぼーんする機能を追加 * 「設定管理」からキャッシュ・履歴の消去できる機能を追加 @@ -33,19 +38,32 @@ ### Git & Composerで 1. 本体をclone -
git clone git://github.com/open774/p2-php.git
-  cd p2-php
+ +```shell +git clone git://github.com/open774/p2-php.git +cd p2-php +``` 2. 依存ライブラリをダウンロード -
curl -O http://getcomposer.org/composer.phar
-  php -d detect_unicode=0 composer.phar install
+ +⚠️ **PEARサポートが廃止されたComposer 2.xでは動作しません** ⚠️ + +```shell +curl -O https://getcomposer.org/download/1.10.25/composer.phar +chmod +x composer.phar +./composer.phar install +``` 3. Webサーバが書き込めるようにディレクトリのアクセス権をセット - (CGI/suEXECIやCLI/Built-in web serverでは不要) -
chmod 0777 data/* rep2/ic
+(CGI/suEXECIやCLI/Built-in web serverでは不要) + +```shell +chmod 0777 data/* rep2/ic +``` ## 動作環境 + Linux(openSUSE Leap)のPHP7+Apacheで動作確認しています。 PHP5.6以降で動くはずですが、PHP7.*推奨です。 PHP7での不具合修正を優先するため突然PHP5.xのサポートが終わる可能性があります。 @@ -54,26 +72,28 @@ PHP7での不具合修正を優先するため突然PHP5.xのサポートが終 何かエラーが出たらがんばって環境を整えてください。 - php scripts/p2cmd.php check - +```shell +php scripts/p2cmd.php check +``` ## Built-in web serverで使ってみる (PHP 5.4+) -PHP 5.4の新機能、[ビルトインウェブサーバー](http://docs.php.net/manual/ja/features.commandline.webserver.php)で簡単に試せます。 +PHP 5.4の新機能、[ビルトインウェブサーバー](http://docs.php.net/manual/ja/features.commandline.webserver.php) で簡単に試せます。 以下のようにすると、Webサーバーの設定をしなくても `http://localhost:8080/` でrep2を使えます。**(Windowsでも!)** - cd rep2 - php -S localhost:8080 web.php +```shell +cd rep2 +php -S localhost:8080 web.php +``` moriyoshi++ - ## 画像を自動で保存したい スレに貼られている画像を自動で保存する機能、**ImageCache2**があります。 -see also [doc/ImageCache2/README.txt](https://github.com/open774/p2-php/blob/master/doc/ImageCache2/README.txt), [doc/ImageCache2/INSTALL.txt](https://github.com/open774/p2-php/blob/master/doc/ImageCache2/INSTALL.txt) +see also [doc/ImageCache2/README.txt](doc/ImageCache2/README.txt), [doc/ImageCache2/INSTALL.txt](doc/ImageCache2/INSTALL.txt) ### 準備 @@ -93,7 +113,6 @@ see also [doc/ImageCache2/README.txt](https://github.com/open774/p2-php/blob/mas * PHP 5.4ではSQLite2がサポートされなくなったので、ImageCache2を使いたいときはMySQLかPostgreSQLが必要です。 * ホストに`localhost`を指定して接続できないときは、代わりに`127.0.0.1`にしてみてください。 - ## 設定を変えたい 細かい挙動の変更は `メニュー > 設定管理 > ユーザー設定編集` から行えます。 @@ -128,7 +147,6 @@ Webブラウザから変更できない項目は [conf/conf_admin.inc.php](https php -d detect_unicode=0 composer.phar self-update php -d detect_unicode=0 composer.phar update - ## Authors & Contributors * **aki** *(original)* http://akid.s17.xrea.com/ @@ -142,7 +160,6 @@ Webブラウザから変更できない項目は [conf/conf_admin.inc.php](https * **dgg712** https://github.com/dgg712/p2-php * **2ch p2/rep2スレの>>1-1000** - ## License -see [LICENSE.txt](https://github.com/rsky/p2-php/blob/master/LICENSE.txt) +see [LICENSE.txt](LICENSE.txt) diff --git a/composer.json b/composer.json index 4714155ec..675026f11 100644 --- a/composer.json +++ b/composer.json @@ -8,37 +8,65 @@ "url": "https://pear.php.net" }, { - "type": "vcs", - "url": "https://github.com/open774/quickform" + "type": "git", + "url": "https://github.com/openpsa/quickform.git" + }, + { + "type": "git", + "url": "https://github.com/roojs/PDO_DataObject.git" + }, + { + "type": "git", + "url": "https://github.com/mikoim/html_template_flexy.git" + }, + { + "type": "git", + "url": "https://github.com/mikoim/php8-File.git" } ], "require": { - "php": ">=5.3.6", - "rsky/pear-core-min": "dev-master", - "rsky/pear-pager": ">=2.4.9beta2", - "rsky/pear-html_template_flexy": ">=1.3.13alpha6", - "pear-pear.php.net/benchmark": "1.2.9", - "pear-pear.php.net/cache_lite": "1.7.15", - "pear-pear.php.net/db": "1.7.14", - "pear-pear.php.net/db_dataobject": "1.11.2", - "pear-pear.php.net/date": "1.4.7", - "pear-pear.php.net/file": "1.4.1", - "pear-pear.php.net/file_util": "1.0.0", - "pear-pear.php.net/html_common": "1.2.5", - "2ch774/quickform": "dev-master", - "pear-pear.php.net/http_request2": "2.2.1", - "pear-pear.php.net/net_socket": "1.0.10", - "pear-pear.php.net/net_url": "1.0.15", - "pear-pear.php.net/net_url2": "2.1.1", - "pear-pear.php.net/net_useragent_mobile": "1.0.0", - "pear-pear.php.net/validate": "0.8.5", - "pear-pear.php.net/var_dump": "1.0.4", - "pear-pear.php.net/xml_parser": "1.3.4", - "pear-pear.php.net/xml_rss": "1.0.2", - "symfony/console": "2.2.*", - "symfony/yaml": "2.2.*", + "php": ">7", + "ext-curl": "*", + "ext-dom": "*", + "ext-json": "*", + "ext-mbstring": "*", + "ext-openssl": "*", + "ext-pcre": "*", + "ext-pdo": "*", + "ext-phar": "*", + "ext-session": "*", + "ext-spl": "*", + "ext-xml": "*", + "ext-zlib": "*", "jakeasmith/http_build_url": "1.0.*", - "dropbox/dropbox-sdk": "dev-master" - + "openpsa/quickform": "dev-master", + "pear-pear.php.net/benchmark": "1.2.*", + "pear-pear.php.net/cache_lite": "1.*", + "pear-pear.php.net/date": "1.4.*", + "pear-pear.php.net/http_request2": "2.3.*", + "pear-pear.php.net/net_socket": "1.2.*", + "pear-pear.php.net/net_url": "1.0.*", + "pear-pear.php.net/net_url2": "2.2.*", + "pear-pear.php.net/net_useragent_mobile": "1.0.*", + "pear-pear.php.net/pager": "2.5.*", + "pear-pear.php.net/validate": "0.8.*", + "pear-pear.php.net/var_dump": "1.0.*", + "pear-pear.php.net/xml_parser": "1.3.*", + "pear-pear.php.net/xml_rss": "1.1.*", + "pear/file": "dev-master", + "pear/html_template_flexy": "dev-master", + "roojs/pdo_dataobject": "dev-master", + "symfony/console": "5.1.*", + "symfony/yaml": "5.1.*" + }, + "suggest": { + "ext-exif": "Needed to show Exif in IC2", + "ext-gd": "Needed to use GD in IC2", + "ext-pdo_mysql": "Needed to use MySQL in IC2", + "ext-pdo_pgsql": "Needed to use PostgreSQL in IC2", + "ext-pdo_sqlite": "Needed to use SQLite in IC2" + }, + "require-dev": { + "roave/security-advisories": "dev-latest" } } diff --git a/composer.lock b/composer.lock new file mode 100644 index 000000000..0803b20b5 --- /dev/null +++ b/composer.lock @@ -0,0 +1,2230 @@ +{ + "_readme": [ + "This file locks the dependencies of your project to a known state", + "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", + "This file is @generated automatically" + ], + "content-hash": "2939ad615608845875aae0307fed6ffc", + "packages": [ + { + "name": "jakeasmith/http_build_url", + "version": "1.0.1", + "source": { + "type": "git", + "url": "https://github.com/jakeasmith/http_build_url.git", + "reference": "93c273e77cb1edead0cf8bcf8cd2003428e74e37" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/jakeasmith/http_build_url/zipball/93c273e77cb1edead0cf8bcf8cd2003428e74e37", + "reference": "93c273e77cb1edead0cf8bcf8cd2003428e74e37", + "shasum": "" + }, + "type": "library", + "autoload": { + "files": [ + "src/http_build_url.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Jake A. Smith", + "email": "theman@jakeasmith.com" + } + ], + "description": "Provides functionality for http_build_url() to environments without pecl_http.", + "time": "2017-05-01T15:36:40+00:00" + }, + { + "name": "openpsa/quickform", + "version": "dev-master", + "source": { + "type": "git", + "url": "https://github.com/openpsa/quickform.git", + "reference": "96b0c547ed84528f68c737419ba159d39b604384" + }, + "require": { + "php": ">5.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.3.x-dev" + } + }, + "autoload": { + "classmap": [ + "lib" + ] + }, + "license": [ + "PHP-3.01" + ], + "authors": [ + { + "name": "Andreas Flack", + "email": "flack@contentcontrol-berlin.de", + "homepage": "http://www.contentcontrol-berlin.de/" + } + ], + "description": "PHP 5.4 compatible fork of HTML_QuickForm", + "keywords": [ + "form", + "quickform" + ], + "time": "2021-09-01T12:23:22+00:00" + }, + { + "name": "pear-pear.php.net/Archive_Tar", + "version": "1.4.14", + "dist": { + "type": "file", + "url": "https://pear.php.net/get/Archive_Tar-1.4.14.tgz" + }, + "require": { + "php": ">=5.2.0.0" + }, + "replace": { + "pear-pear/archive_tar": "== 1.4.14.0" + }, + "type": "pear-library", + "autoload": { + "classmap": [ + "" + ] + }, + "include-path": [ + "/" + ], + "license": [ + "New BSD License" + ], + "description": "This class provides handling of tar files in PHP.\nIt supports creating, listing, extracting and adding to tar files.\nGzip support is available if PHP has the zlib extension built-in or\nloaded. Bz2 compression is also supported with the bz2 extension loaded.\nAlso Lzma2 compressed archives are supported with xz extension." + }, + { + "name": "pear-pear.php.net/Benchmark", + "version": "1.2.9", + "dist": { + "type": "file", + "url": "https://pear.php.net/get/Benchmark-1.2.9.tgz" + }, + "require": { + "php": ">=4.0.0.0" + }, + "replace": { + "pear-pear/benchmark": "== 1.2.9.0" + }, + "type": "pear-library", + "autoload": { + "classmap": [ + "" + ] + }, + "include-path": [ + "/" + ], + "license": [ + "New BSD" + ], + "description": "Framework to benchmark PHP scripts or function calls." + }, + { + "name": "pear-pear.php.net/Cache_Lite", + "version": "1.8.3", + "dist": { + "type": "file", + "url": "https://pear.php.net/get/Cache_Lite-1.8.3.tgz" + }, + "require": { + "pear-pear.php.net/pear": ">=1.10.1.0", + "php": ">=5.4.0.0" + }, + "replace": { + "pear-pear/cache_lite": "== 1.8.3.0" + }, + "type": "pear-library", + "autoload": { + "classmap": [ + "" + ] + }, + "include-path": [ + "/" + ], + "license": [ + "lgpl" + ], + "description": "This package is a little cache system optimized for file containers. It is fast and safe (because it\n uses file locking and/or anti-corruption tests)." + }, + { + "name": "pear-pear.php.net/Console_Getopt", + "version": "1.4.3", + "dist": { + "type": "file", + "url": "https://pear.php.net/get/Console_Getopt-1.4.3.tgz" + }, + "require": { + "php": ">=5.4.0.0" + }, + "replace": { + "pear-pear/console_getopt": "== 1.4.3.0" + }, + "type": "pear-library", + "autoload": { + "classmap": [ + "" + ] + }, + "include-path": [ + "/" + ], + "license": [ + "BSD-2-Clause" + ], + "description": "This is a PHP implementation of \"getopt\" supporting both\nshort and long options." + }, + { + "name": "pear-pear.php.net/Date", + "version": "1.4.7", + "dist": { + "type": "file", + "url": "https://pear.php.net/get/Date-1.4.7.tgz" + }, + "require": { + "php": ">=4.3.0.0" + }, + "replace": { + "pear-pear/date": "== 1.4.7.0" + }, + "type": "pear-library", + "autoload": { + "classmap": [ + "" + ] + }, + "include-path": [ + "/" + ], + "license": [ + "BSD License" + ], + "description": "Generic classes for representation and manipulation of\ndates, times and time zones without the need of timestamps,\nwhich is a huge limitation for PHP programs. Includes time zone data,\ntime zone conversions and many date/time conversions.\nIt does not rely on 32-bit system date stamps, so\nyou can display calendars and compare dates that date\npre 1970 and post 2038." + }, + { + "name": "pear-pear.php.net/HTTP_Request2", + "version": "2.3.0", + "dist": { + "type": "file", + "url": "https://pear.php.net/get/HTTP_Request2-2.3.0.tgz" + }, + "require": { + "pear-pear.php.net/net_url2": ">=2.2.0.0", + "pear-pear.php.net/pear": ">=1.9.2.0", + "php": ">=5.2.0.0" + }, + "replace": { + "pear-pear/http_request2": "== 2.3.0.0" + }, + "type": "pear-library", + "autoload": { + "classmap": [ + "" + ] + }, + "include-path": [ + "/" + ], + "license": [ + "BSD 3-Clause License" + ], + "description": "PHP5 rewrite of HTTP_Request package (with parts of HTTP_Client). Provides\ncleaner API and pluggable Adapters:\n * Socket adapter, based on old HTTP_Request code,\n * Curl adapter, wraps around PHP's cURL extension,\n * Mock adapter, to use for testing packages dependent on HTTP_Request2.\nSupports POST requests with data and file uploads, basic and digest\nauthentication, cookies, managing cookies across requests, proxies, gzip and\ndeflate encodings, redirects, monitoring the request progress with Observers..." + }, + { + "name": "pear-pear.php.net/Net_Socket", + "version": "1.2.2", + "dist": { + "type": "file", + "url": "https://pear.php.net/get/Net_Socket-1.2.2.tgz" + }, + "require": { + "php": ">=5.4.0.0" + }, + "replace": { + "pear-pear/net_socket": "== 1.2.2.0" + }, + "type": "pear-library", + "autoload": { + "classmap": [ + "" + ] + }, + "include-path": [ + "/" + ], + "license": [ + "BSD-2-Clause" + ], + "description": "Net_Socket is a class interface to TCP sockets. It provides blocking\n and non-blocking operation, with different reading and writing modes\n (byte-wise, block-wise, line-wise and special formats like network\n byte-order ip addresses)." + }, + { + "name": "pear-pear.php.net/Net_URL", + "version": "1.0.15", + "dist": { + "type": "file", + "url": "https://pear.php.net/get/Net_URL-1.0.15.tgz" + }, + "require": { + "php": ">=4.0.0.0" + }, + "replace": { + "pear-pear/net_url": "== 1.0.15.0" + }, + "type": "pear-library", + "autoload": { + "classmap": [ + "" + ] + }, + "include-path": [ + "/" + ], + "license": [ + "BSD" + ], + "description": "Provides easy parsing of URLs and their constituent parts." + }, + { + "name": "pear-pear.php.net/Net_URL2", + "version": "2.2.1", + "dist": { + "type": "file", + "url": "https://pear.php.net/get/Net_URL2-2.2.1.tgz" + }, + "require": { + "php": ">=5.1.4.0" + }, + "replace": { + "pear-pear/net_url2": "== 2.2.1.0" + }, + "type": "pear-library", + "autoload": { + "classmap": [ + "" + ] + }, + "include-path": [ + "/" + ], + "license": [ + "BSD-3-Clause" + ], + "description": "Provides parsing of URLs into their constituent parts (scheme, host, path etc.), URL generation, and resolving of\n relative URLs." + }, + { + "name": "pear-pear.php.net/Net_UserAgent_Mobile", + "version": "1.0.0", + "dist": { + "type": "file", + "url": "https://pear.php.net/get/Net_UserAgent_Mobile-1.0.0.tgz" + }, + "require": { + "ext-pcre": "*", + "pear-pear.php.net/pear": ">=1.4.3.0", + "php": ">=4.3.0.0" + }, + "replace": { + "pear-pear/net_useragent_mobile": "== 1.0.0.0" + }, + "type": "pear-library", + "autoload": { + "classmap": [ + "" + ] + }, + "include-path": [ + "/" + ], + "license": [ + "New BSD License" + ], + "description": "Net_UserAgent_Mobile parses HTTP_USER_AGENT strings of (mainly Japanese) mobile HTTP user agents. It'll be useful in page dispatching by user agents.\nThis package was ported from Perl's HTTP::MobileAgent.\nSee http://search.cpan.org/search?mode=module&query=HTTP-MobileAgent" + }, + { + "name": "pear-pear.php.net/PEAR", + "version": "1.10.13", + "dist": { + "type": "file", + "url": "https://pear.php.net/get/PEAR-1.10.13.tgz" + }, + "require": { + "ext-pcre": "*", + "ext-xml": "*", + "pear-pear.php.net/archive_tar": ">=1.4.9.0", + "pear-pear.php.net/console_getopt": ">=1.4.1.0", + "pear-pear.php.net/structures_graph": ">=1.1.0.0", + "pear-pear.php.net/xml_util": ">=1.4.0.0", + "php": ">=5.4.0.0" + }, + "replace": { + "pear-pear/pear": "== 1.10.13.0" + }, + "type": "pear-library", + "autoload": { + "classmap": [ + "" + ] + }, + "include-path": [ + "/" + ], + "license": [ + "New BSD License" + ], + "description": "The PEAR package contains:\n * the PEAR installer, for creating, distributing\n and installing packages\n * the PEAR_Exception PHP5 error handling mechanism\n * the PEAR_ErrorStack advanced error handling mechanism\n * the PEAR_Error error handling mechanism\n * the OS_Guess class for retrieving info about the OS\n where PHP is running on\n * the System class for quick handling of common operations\n with files and directories\n * the PEAR base class\n Features in a nutshell:\n * full support for channels\n * pre-download dependency validation\n * new package.xml 2.0 format allows tremendous flexibility while maintaining BC\n * support for optional dependency groups and limited support for sub-packaging\n * robust dependency support\n * full dependency validation on uninstall\n * remote install for hosts with only ftp access - no more problems with\n restricted host installation\n * full support for mirroring\n * support for bundling several packages into a single tarball\n * support for static dependencies on a url-based package\n * support for custom file roles and installation tasks" + }, + { + "name": "pear-pear.php.net/Pager", + "version": "2.5.1", + "dist": { + "type": "file", + "url": "https://pear.php.net/get/Pager-2.5.1.tgz" + }, + "require": { + "php": ">=5.6.0.0" + }, + "replace": { + "pear-pear/pager": "== 2.5.1.0" + }, + "type": "pear-library", + "autoload": { + "classmap": [ + "" + ] + }, + "include-path": [ + "/" + ], + "license": [ + "BSD" + ], + "description": "It takes an array of data as input and pages it according to various parameters.\nIt also builds links within a specified range, and allows complete customization of the output (it even works with front controllers and mod_rewrite).\nTwo operating modes available: \"Jumping\" and \"Sliding\" window style." + }, + { + "name": "pear-pear.php.net/Structures_Graph", + "version": "1.1.1", + "dist": { + "type": "file", + "url": "https://pear.php.net/get/Structures_Graph-1.1.1.tgz" + }, + "require": { + "php": ">=5.3.0.0" + }, + "replace": { + "pear-pear/structures_graph": "== 1.1.1.0" + }, + "type": "pear-library", + "autoload": { + "classmap": [ + "" + ] + }, + "include-path": [ + "/" + ], + "license": [ + "LGPL-3.0+" + ], + "description": "Structures_Graph is a package for creating and manipulating graph datastructures. It allows building of directed\nand undirected graphs, with data and metadata stored in nodes. The library provides functions for graph traversing\nas well as for characteristic extraction from the graph topology." + }, + { + "name": "pear-pear.php.net/Validate", + "version": "0.8.6", + "dist": { + "type": "file", + "url": "https://pear.php.net/get/Validate-0.8.6.tgz" + }, + "require": { + "php": ">=4.2.0.0" + }, + "replace": { + "pear-pear/validate": "== 0.8.6.0" + }, + "type": "pear-library", + "autoload": { + "classmap": [ + "" + ] + }, + "include-path": [ + "/" + ], + "license": [ + "New BSD" + ], + "description": "Package to validate various datas. It includes :\n - numbers (min/max, decimal or not)\n - email (syntax, domain check, rfc822)\n - string (predifined type alpha upper and/or lowercase, numeric,...)\n - date (min, max, rfc822 compliant)\n - uri (RFC2396)\n - possibility valid multiple data with a single method call (::multiple)" + }, + { + "name": "pear-pear.php.net/Var_Dump", + "version": "1.0.4", + "dist": { + "type": "file", + "url": "https://pear.php.net/get/Var_Dump-1.0.4.tgz" + }, + "require": { + "ext-pcre": "*", + "php": ">=4.0.4.0" + }, + "replace": { + "pear-pear/var_dump": "== 1.0.4.0" + }, + "type": "pear-library", + "autoload": { + "classmap": [ + "" + ] + }, + "include-path": [ + "/" + ], + "license": [ + "PHP License" + ], + "description": "The Var_Dump class is a wrapper for the var_dump function.\n\nThe var_dump function displays structured information about expressions that includes its type and value. Arrays are explored recursively with values indented to show structure.\n\nThe Var_Dump class captures the output of the var_dump function, by using output control functions, and then uses external renderer classes for displaying the result in various graphical ways :\n* Simple text,\n* HTML/XHTML text,\n* HTML/XHTML table,\n* XML,\n* ..." + }, + { + "name": "pear-pear.php.net/XML_Parser", + "version": "1.3.8", + "dist": { + "type": "file", + "url": "https://pear.php.net/get/XML_Parser-1.3.8.tgz" + }, + "require": { + "pear-pear.php.net/pear": "*", + "php": ">=4.2.0.0" + }, + "replace": { + "pear-pear/xml_parser": "== 1.3.8.0" + }, + "type": "pear-library", + "autoload": { + "classmap": [ + "" + ] + }, + "include-path": [ + "/" + ], + "license": [ + "BSD License" + ], + "description": "This is an XML parser based on PHPs built-in xml extension.\nIt supports two basic modes of operation: \"func\" and \"event\". In \"func\" mode, it will look for a function named after each element (xmltag_ELEMENT for start tags and xmltag_ELEMENT_ for end tags), and in \"event\" mode it uses a set of generic callbacks.\n\nSince version 1.2.0 there's a new XML_Parser_Simple class that makes parsing of most XML documents easier, by automatically providing a stack for the elements.\nFurthermore its now possible to split the parser from the handler object, so you do not have to extend XML_Parser anymore in order to parse a document with it." + }, + { + "name": "pear-pear.php.net/XML_RSS", + "version": "1.1.0", + "dist": { + "type": "file", + "url": "https://pear.php.net/get/XML_RSS-1.1.0.tgz" + }, + "require": { + "pear-pear.php.net/xml_parser": ">=1.3.7.0,!=1.0.1.0", + "php": ">=5.4.0.0" + }, + "replace": { + "pear-pear/xml_rss": "== 1.1.0.0" + }, + "type": "pear-library", + "autoload": { + "classmap": [ + "" + ] + }, + "include-path": [ + "/" + ], + "license": [ + "PHP License" + ], + "description": "Parser for Resource Description Framework (RDF)\nSite Summary (RSS) documents." + }, + { + "name": "pear-pear.php.net/XML_Util", + "version": "1.4.5", + "dist": { + "type": "file", + "url": "https://pear.php.net/get/XML_Util-1.4.5.tgz" + }, + "require": { + "ext-pcre": "*", + "php": ">=5.4.0.0" + }, + "replace": { + "pear-pear/xml_util": "== 1.4.5.0" + }, + "type": "pear-library", + "autoload": { + "classmap": [ + "" + ] + }, + "include-path": [ + "/" + ], + "license": [ + "BSD License" + ], + "description": "Selection of methods that are often needed when working with XML documents. Functionality includes creating of attribute lists from arrays, creation of tags, validation of XML names and more." + }, + { + "name": "pear/console_getopt", + "version": "v1.4.3", + "source": { + "type": "git", + "url": "https://github.com/pear/Console_Getopt.git", + "reference": "a41f8d3e668987609178c7c4a9fe48fecac53fa0" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/pear/Console_Getopt/zipball/a41f8d3e668987609178c7c4a9fe48fecac53fa0", + "reference": "a41f8d3e668987609178c7c4a9fe48fecac53fa0", + "shasum": "" + }, + "type": "library", + "autoload": { + "psr-0": { + "Console": "./" + } + }, + "notification-url": "https://packagist.org/downloads/", + "include-path": [ + "./" + ], + "license": [ + "BSD-2-Clause" + ], + "authors": [ + { + "name": "Andrei Zmievski", + "email": "andrei@php.net", + "role": "Lead" + }, + { + "name": "Stig Bakken", + "email": "stig@php.net", + "role": "Developer" + }, + { + "name": "Greg Beaver", + "email": "cellog@php.net", + "role": "Helper" + } + ], + "description": "More info available on: http://pear.php.net/package/Console_Getopt", + "time": "2019-11-20T18:27:48+00:00" + }, + { + "name": "pear/file", + "version": "dev-master", + "source": { + "type": "git", + "url": "https://github.com/mikoim/php8-File.git", + "reference": "9065531632dab4f72469a785144b96fa1618712d" + }, + "require": { + "pear/pear-core-minimal": "1.*", + "php": ">=7.4" + }, + "type": "library", + "autoload": { + "classmap": [ + "." + ] + }, + "include-path": [ + "." + ], + "license": [ + "PHP-3.0", + "BSD-2-Clause" + ], + "authors": [ + { + "name": "Richard Heyes", + "email": "richard@php.net" + }, + { + "name": "Tal Peer", + "email": "tal@php.net" + }, + { + "name": "Michael Wallner", + "email": "mike@php.net" + }, + { + "name": "Helgi Þormar Þorbjörnsson", + "email": "helgi@php.net" + }, + { + "name": "Tomas V.V. Cox", + "email": "cox@idecnet.com" + }, + { + "name": "Cipriano Groenendal", + "email": "cipri@php.net" + } + ], + "description": "Fork of https://svn.php.net/viewvc/pear/packages/File/trunk/", + "homepage": "https://github.com/mikoim/php8-File_Util", + "time": "2021-01-10T23:28:12+00:00" + }, + { + "name": "pear/html_template_flexy", + "version": "dev-master", + "source": { + "type": "git", + "url": "https://github.com/mikoim/html_template_flexy.git", + "reference": "0194dd2b35e62ce39eae057d237d99789b168db3" + }, + "require": { + "ext-gettext": "*", + "pear/pear-core-minimal": "1.10.*", + "pear/pear_exception": "1.0.*", + "php": ">=5.3.0" + }, + "require-dev": { + "phpunit/phpunit": "*" + }, + "suggest": { + "pear/html_javascript": "Install optionally via your project's composer.json" + }, + "type": "library", + "autoload": { + "classmap": [ + "HTML/" + ] + }, + "include-path": [ + "/" + ], + "license": [ + "BSD-2-Clause" + ], + "description": "Fork of https://github.com/pear/HTML_Template_Flexy", + "homepage": "https://github.com/mikoim/HTML_Template_Flexy", + "time": "2020-07-05T15:11:12+00:00" + }, + { + "name": "pear/pear-core-minimal", + "version": "v1.10.11", + "source": { + "type": "git", + "url": "https://github.com/pear/pear-core-minimal.git", + "reference": "68d0d32ada737153b7e93b8d3c710ebe70ac867d" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/pear/pear-core-minimal/zipball/68d0d32ada737153b7e93b8d3c710ebe70ac867d", + "reference": "68d0d32ada737153b7e93b8d3c710ebe70ac867d", + "shasum": "" + }, + "require": { + "pear/console_getopt": "~1.4", + "pear/pear_exception": "~1.0" + }, + "replace": { + "rsky/pear-core-min": "self.version" + }, + "type": "library", + "autoload": { + "psr-0": { + "": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "include-path": [ + "src/" + ], + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Christian Weiske", + "email": "cweiske@php.net", + "role": "Lead" + } + ], + "description": "Minimal set of PEAR core files to be used as composer dependency", + "time": "2021-08-10T22:31:03+00:00" + }, + { + "name": "pear/pear_exception", + "version": "v1.0.2", + "source": { + "type": "git", + "url": "https://github.com/pear/PEAR_Exception.git", + "reference": "b14fbe2ddb0b9f94f5b24cf08783d599f776fff0" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/pear/PEAR_Exception/zipball/b14fbe2ddb0b9f94f5b24cf08783d599f776fff0", + "reference": "b14fbe2ddb0b9f94f5b24cf08783d599f776fff0", + "shasum": "" + }, + "require": { + "php": ">=5.2.0" + }, + "require-dev": { + "phpunit/phpunit": "<9" + }, + "type": "class", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "classmap": [ + "PEAR/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "include-path": [ + "." + ], + "license": [ + "BSD-2-Clause" + ], + "authors": [ + { + "name": "Helgi Thormar", + "email": "dufuz@php.net" + }, + { + "name": "Greg Beaver", + "email": "cellog@php.net" + } + ], + "description": "The PEAR Exception base class.", + "homepage": "https://github.com/pear/PEAR_Exception", + "keywords": [ + "exception" + ], + "time": "2021-03-21T15:43:46+00:00" + }, + { + "name": "psr/container", + "version": "1.1.2", + "source": { + "type": "git", + "url": "https://github.com/php-fig/container.git", + "reference": "513e0666f7216c7459170d56df27dfcefe1689ea" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/container/zipball/513e0666f7216c7459170d56df27dfcefe1689ea", + "reference": "513e0666f7216c7459170d56df27dfcefe1689ea", + "shasum": "" + }, + "require": { + "php": ">=7.4.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "Psr\\Container\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "https://www.php-fig.org/" + } + ], + "description": "Common Container Interface (PHP FIG PSR-11)", + "homepage": "https://github.com/php-fig/container", + "keywords": [ + "PSR-11", + "container", + "container-interface", + "container-interop", + "psr" + ], + "time": "2021-11-05T16:50:12+00:00" + }, + { + "name": "roojs/pdo_dataobject", + "version": "dev-master", + "source": { + "type": "git", + "url": "https://github.com/roojs/PDO_DataObject.git", + "reference": "c1d35b04c4a5e7fd76d2fd122781d4a610ff0f23" + }, + "require-dev": { + "php": ">=5.5" + }, + "type": "library", + "autoload": { + "psr-0": { + "PDO": "./" + } + }, + "license": [ + "LGPL-3.0" + ], + "authors": [ + { + "name": "Alan Knowles", + "email": "alan@roojs.com" + } + ], + "description": "ORM based on PEAR::DB_DataObject ported for PHP5/7 and PDO", + "homepage": "https://github/roojs/PDO_DataObject#v0.0.4", + "keywords": [ + "orm" + ], + "time": "2021-11-04T03:22:38+00:00" + }, + { + "name": "symfony/console", + "version": "v5.1.11", + "source": { + "type": "git", + "url": "https://github.com/symfony/console.git", + "reference": "d9a267b621c5082e0a6c659d73633b6fd28a8a08" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/console/zipball/d9a267b621c5082e0a6c659d73633b6fd28a8a08", + "reference": "d9a267b621c5082e0a6c659d73633b6fd28a8a08", + "shasum": "" + }, + "require": { + "php": ">=7.2.5", + "symfony/polyfill-mbstring": "~1.0", + "symfony/polyfill-php73": "^1.8", + "symfony/polyfill-php80": "^1.15", + "symfony/service-contracts": "^1.1|^2", + "symfony/string": "^5.1" + }, + "conflict": { + "symfony/dependency-injection": "<4.4", + "symfony/dotenv": "<5.1", + "symfony/event-dispatcher": "<4.4", + "symfony/lock": "<4.4", + "symfony/process": "<4.4" + }, + "provide": { + "psr/log-implementation": "1.0" + }, + "require-dev": { + "psr/log": "~1.0", + "symfony/config": "^4.4|^5.0", + "symfony/dependency-injection": "^4.4|^5.0", + "symfony/event-dispatcher": "^4.4|^5.0", + "symfony/lock": "^4.4|^5.0", + "symfony/process": "^4.4|^5.0", + "symfony/var-dumper": "^4.4|^5.0" + }, + "suggest": { + "psr/log": "For using the console logger", + "symfony/event-dispatcher": "", + "symfony/lock": "", + "symfony/process": "" + }, + "type": "library", + "autoload": { + "psr-4": { + "Symfony\\Component\\Console\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Eases the creation of beautiful and testable command line interfaces", + "homepage": "https://symfony.com", + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2021-01-27T10:01:46+00:00" + }, + { + "name": "symfony/deprecation-contracts", + "version": "v2.5.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/deprecation-contracts.git", + "reference": "6f981ee24cf69ee7ce9736146d1c57c2780598a8" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/6f981ee24cf69ee7ce9736146d1c57c2780598a8", + "reference": "6f981ee24cf69ee7ce9736146d1c57c2780598a8", + "shasum": "" + }, + "require": { + "php": ">=7.1" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "2.5-dev" + }, + "thanks": { + "name": "symfony/contracts", + "url": "https://github.com/symfony/contracts" + } + }, + "autoload": { + "files": [ + "function.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "A generic function and convention to trigger deprecation notices", + "homepage": "https://symfony.com", + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2021-07-12T14:48:14+00:00" + }, + { + "name": "symfony/polyfill-ctype", + "version": "v1.24.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-ctype.git", + "reference": "30885182c981ab175d4d034db0f6f469898070ab" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/30885182c981ab175d4d034db0f6f469898070ab", + "reference": "30885182c981ab175d4d034db0f6f469898070ab", + "shasum": "" + }, + "require": { + "php": ">=7.1" + }, + "provide": { + "ext-ctype": "*" + }, + "suggest": { + "ext-ctype": "For best performance" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "1.23-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Polyfill\\Ctype\\": "" + }, + "files": [ + "bootstrap.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Gert de Pagter", + "email": "BackEndTea@gmail.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill for ctype functions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "ctype", + "polyfill", + "portable" + ], + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2021-10-20T20:35:02+00:00" + }, + { + "name": "symfony/polyfill-intl-grapheme", + "version": "v1.24.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-intl-grapheme.git", + "reference": "81b86b50cf841a64252b439e738e97f4a34e2783" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-intl-grapheme/zipball/81b86b50cf841a64252b439e738e97f4a34e2783", + "reference": "81b86b50cf841a64252b439e738e97f4a34e2783", + "shasum": "" + }, + "require": { + "php": ">=7.1" + }, + "suggest": { + "ext-intl": "For best performance" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "1.23-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Polyfill\\Intl\\Grapheme\\": "" + }, + "files": [ + "bootstrap.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill for intl's grapheme_* functions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "grapheme", + "intl", + "polyfill", + "portable", + "shim" + ], + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2021-11-23T21:10:46+00:00" + }, + { + "name": "symfony/polyfill-intl-normalizer", + "version": "v1.24.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-intl-normalizer.git", + "reference": "8590a5f561694770bdcd3f9b5c69dde6945028e8" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/8590a5f561694770bdcd3f9b5c69dde6945028e8", + "reference": "8590a5f561694770bdcd3f9b5c69dde6945028e8", + "shasum": "" + }, + "require": { + "php": ">=7.1" + }, + "suggest": { + "ext-intl": "For best performance" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "1.23-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Polyfill\\Intl\\Normalizer\\": "" + }, + "files": [ + "bootstrap.php" + ], + "classmap": [ + "Resources/stubs" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill for intl's Normalizer class and related functions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "intl", + "normalizer", + "polyfill", + "portable", + "shim" + ], + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2021-02-19T12:13:01+00:00" + }, + { + "name": "symfony/polyfill-mbstring", + "version": "v1.24.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-mbstring.git", + "reference": "0abb51d2f102e00a4eefcf46ba7fec406d245825" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/0abb51d2f102e00a4eefcf46ba7fec406d245825", + "reference": "0abb51d2f102e00a4eefcf46ba7fec406d245825", + "shasum": "" + }, + "require": { + "php": ">=7.1" + }, + "provide": { + "ext-mbstring": "*" + }, + "suggest": { + "ext-mbstring": "For best performance" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "1.23-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Polyfill\\Mbstring\\": "" + }, + "files": [ + "bootstrap.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill for the Mbstring extension", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "mbstring", + "polyfill", + "portable", + "shim" + ], + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2021-11-30T18:21:41+00:00" + }, + { + "name": "symfony/polyfill-php73", + "version": "v1.24.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-php73.git", + "reference": "cc5db0e22b3cb4111010e48785a97f670b350ca5" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-php73/zipball/cc5db0e22b3cb4111010e48785a97f670b350ca5", + "reference": "cc5db0e22b3cb4111010e48785a97f670b350ca5", + "shasum": "" + }, + "require": { + "php": ">=7.1" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "1.23-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Polyfill\\Php73\\": "" + }, + "files": [ + "bootstrap.php" + ], + "classmap": [ + "Resources/stubs" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill backporting some PHP 7.3+ features to lower PHP versions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "polyfill", + "portable", + "shim" + ], + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2021-06-05T21:20:04+00:00" + }, + { + "name": "symfony/polyfill-php80", + "version": "v1.24.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-php80.git", + "reference": "57b712b08eddb97c762a8caa32c84e037892d2e9" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/57b712b08eddb97c762a8caa32c84e037892d2e9", + "reference": "57b712b08eddb97c762a8caa32c84e037892d2e9", + "shasum": "" + }, + "require": { + "php": ">=7.1" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "1.23-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Polyfill\\Php80\\": "" + }, + "files": [ + "bootstrap.php" + ], + "classmap": [ + "Resources/stubs" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Ion Bazan", + "email": "ion.bazan@gmail.com" + }, + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill backporting some PHP 8.0+ features to lower PHP versions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "polyfill", + "portable", + "shim" + ], + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2021-09-13T13:58:33+00:00" + }, + { + "name": "symfony/service-contracts", + "version": "v2.5.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/service-contracts.git", + "reference": "1ab11b933cd6bc5464b08e81e2c5b07dec58b0fc" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/service-contracts/zipball/1ab11b933cd6bc5464b08e81e2c5b07dec58b0fc", + "reference": "1ab11b933cd6bc5464b08e81e2c5b07dec58b0fc", + "shasum": "" + }, + "require": { + "php": ">=7.2.5", + "psr/container": "^1.1", + "symfony/deprecation-contracts": "^2.1" + }, + "conflict": { + "ext-psr": "<1.1|>=2" + }, + "suggest": { + "symfony/service-implementation": "" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "2.5-dev" + }, + "thanks": { + "name": "symfony/contracts", + "url": "https://github.com/symfony/contracts" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Contracts\\Service\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Generic abstractions related to writing services", + "homepage": "https://symfony.com", + "keywords": [ + "abstractions", + "contracts", + "decoupling", + "interfaces", + "interoperability", + "standards" + ], + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2021-11-04T16:48:04+00:00" + }, + { + "name": "symfony/string", + "version": "v5.4.3", + "source": { + "type": "git", + "url": "https://github.com/symfony/string.git", + "reference": "92043b7d8383e48104e411bc9434b260dbeb5a10" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/string/zipball/92043b7d8383e48104e411bc9434b260dbeb5a10", + "reference": "92043b7d8383e48104e411bc9434b260dbeb5a10", + "shasum": "" + }, + "require": { + "php": ">=7.2.5", + "symfony/polyfill-ctype": "~1.8", + "symfony/polyfill-intl-grapheme": "~1.0", + "symfony/polyfill-intl-normalizer": "~1.0", + "symfony/polyfill-mbstring": "~1.0", + "symfony/polyfill-php80": "~1.15" + }, + "conflict": { + "symfony/translation-contracts": ">=3.0" + }, + "require-dev": { + "symfony/error-handler": "^4.4|^5.0|^6.0", + "symfony/http-client": "^4.4|^5.0|^6.0", + "symfony/translation-contracts": "^1.1|^2", + "symfony/var-exporter": "^4.4|^5.0|^6.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "Symfony\\Component\\String\\": "" + }, + "files": [ + "Resources/functions.php" + ], + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Provides an object-oriented API to strings and deals with bytes, UTF-8 code points and grapheme clusters in a unified way", + "homepage": "https://symfony.com", + "keywords": [ + "grapheme", + "i18n", + "string", + "unicode", + "utf-8", + "utf8" + ], + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2022-01-02T09:53:40+00:00" + }, + { + "name": "symfony/yaml", + "version": "v5.1.11", + "source": { + "type": "git", + "url": "https://github.com/symfony/yaml.git", + "reference": "6bb8b36c6dea8100268512bf46e858c8eb5c545e" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/yaml/zipball/6bb8b36c6dea8100268512bf46e858c8eb5c545e", + "reference": "6bb8b36c6dea8100268512bf46e858c8eb5c545e", + "shasum": "" + }, + "require": { + "php": ">=7.2.5", + "symfony/deprecation-contracts": "^2.1", + "symfony/polyfill-ctype": "~1.8" + }, + "conflict": { + "symfony/console": "<4.4" + }, + "require-dev": { + "symfony/console": "^4.4|^5.0" + }, + "suggest": { + "symfony/console": "For validating YAML files using the lint command" + }, + "bin": [ + "Resources/bin/yaml-lint" + ], + "type": "library", + "autoload": { + "psr-4": { + "Symfony\\Component\\Yaml\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Loads and dumps YAML files", + "homepage": "https://symfony.com", + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2021-01-27T10:01:46+00:00" + } + ], + "packages-dev": [ + { + "name": "roave/security-advisories", + "version": "dev-latest", + "source": { + "type": "git", + "url": "https://github.com/Roave/SecurityAdvisories.git", + "reference": "fa60732bcafd446e9ff858eefa06cdcbae8d9823" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/Roave/SecurityAdvisories/zipball/fa60732bcafd446e9ff858eefa06cdcbae8d9823", + "reference": "fa60732bcafd446e9ff858eefa06cdcbae8d9823", + "shasum": "" + }, + "conflict": { + "3f/pygmentize": "<1.2", + "adodb/adodb-php": "<=5.20.20|>=5.21,<=5.21.3", + "akaunting/akaunting": "<2.1.13", + "alterphp/easyadmin-extension-bundle": ">=1.2,<1.2.11|>=1.3,<1.3.1", + "amazing/media2click": ">=1,<1.3.3", + "amphp/artax": "<1.0.6|>=2,<2.0.6", + "amphp/http": "<1.0.1", + "amphp/http-client": ">=4,<4.4", + "anchorcms/anchor-cms": "<=0.12.7", + "api-platform/core": ">=2.2,<2.2.10|>=2.3,<2.3.6", + "area17/twill": "<1.2.5|>=2,<2.5.3", + "asymmetricrypt/asymmetricrypt": ">=0,<9.9.99", + "aws/aws-sdk-php": ">=3,<3.2.1", + "bagisto/bagisto": "<0.1.5", + "barrelstrength/sprout-base-email": "<1.2.7", + "barrelstrength/sprout-forms": "<3.9", + "baserproject/basercms": "<4.5.4", + "billz/raspap-webgui": "<=2.6.6", + "bk2k/bootstrap-package": ">=7.1,<7.1.2|>=8,<8.0.8|>=9,<9.0.4|>=9.1,<9.1.3|>=10,<10.0.10|>=11,<11.0.3", + "bolt/bolt": "<3.7.2", + "bolt/core": "<4.1.13", + "bottelet/flarepoint": "<2.2.1", + "brightlocal/phpwhois": "<=4.2.5", + "buddypress/buddypress": "<7.2.1", + "bugsnag/bugsnag-laravel": ">=2,<2.0.2", + "bytefury/crater": "<6", + "cachethq/cachet": "<2.5.1", + "cakephp/cakephp": ">=1.3,<1.3.18|>=2,<2.4.99|>=2.5,<2.5.99|>=2.6,<2.6.12|>=2.7,<2.7.6|>=3,<3.5.18|>=3.6,<3.6.15|>=3.7,<3.7.7", + "cardgate/magento2": "<2.0.33", + "cart2quote/module-quotation": ">=4.1.6,<=4.4.5|>=5,<5.4.4", + "cartalyst/sentry": "<=2.1.6", + "catfan/medoo": "<1.7.5", + "centreon/centreon": "<20.10.7", + "cesnet/simplesamlphp-module-proxystatistics": "<3.1", + "codeception/codeception": "<3.1.3|>=4,<4.1.22", + "codeigniter/framework": "<=3.0.6", + "codeigniter4/framework": "<4.1.8", + "codiad/codiad": "<=2.8.4", + "composer/composer": "<1.10.23|>=2-alpha.1,<2.1.9", + "concrete5/concrete5": "<8.5.5", + "concrete5/core": "<8.5.7", + "contao-components/mediaelement": ">=2.14.2,<2.21.1", + "contao/core": ">=2,<3.5.39", + "contao/core-bundle": ">=4,<4.4.56|>=4.5,<4.9.18|>=4.10,<4.11.7|= 4.10.0", + "contao/listing-bundle": ">=4,<4.4.8", + "craftcms/cms": "<3.7.14", + "croogo/croogo": "<3.0.7", + "datadog/dd-trace": ">=0.30,<0.30.2", + "david-garcia/phpwhois": "<=4.3.1", + "derhansen/sf_event_mgt": "<4.3.1|>=5,<5.1.1", + "directmailteam/direct-mail": "<5.2.4", + "doctrine/annotations": ">=1,<1.2.7", + "doctrine/cache": ">=1,<1.3.2|>=1.4,<1.4.2", + "doctrine/common": ">=2,<2.4.3|>=2.5,<2.5.1", + "doctrine/dbal": ">=2,<2.0.8|>=2.1,<2.1.2|>=3,<3.1.4", + "doctrine/doctrine-bundle": "<1.5.2", + "doctrine/doctrine-module": "<=0.7.1", + "doctrine/mongodb-odm": ">=1,<1.0.2", + "doctrine/mongodb-odm-bundle": ">=2,<3.0.1", + "doctrine/orm": ">=2,<2.4.8|>=2.5,<2.5.1|>=2.8.3,<2.8.4", + "dolibarr/dolibarr": "<=14.0.5|>= 3.3.beta1, < 13.0.2", + "dompdf/dompdf": ">=0.6,<0.6.2", + "drupal/core": ">=7,<7.80|>=8,<8.9.16|>=9,<9.1.12|>=9.2,<9.2.4", + "drupal/drupal": ">=7,<7.80|>=8,<8.9.16|>=9,<9.1.12|>=9.2,<9.2.4", + "dweeves/magmi": "<=0.7.24", + "ecodev/newsletter": "<=4", + "elgg/elgg": "<3.3.24|>=4,<4.0.5", + "endroid/qr-code-bundle": "<3.4.2", + "enshrined/svg-sanitize": "<0.13.1", + "erusev/parsedown": "<1.7.2", + "ether/logs": "<3.0.4", + "ezsystems/demobundle": ">=5.4,<5.4.6.1", + "ezsystems/ez-support-tools": ">=2.2,<2.2.3", + "ezsystems/ezdemo-ls-extension": ">=5.4,<5.4.2.1", + "ezsystems/ezfind-ls": ">=5.3,<5.3.6.1|>=5.4,<5.4.11.1|>=2017.12,<2017.12.0.1", + "ezsystems/ezplatform": "<=1.13.6|>=2,<=2.5.24", + "ezsystems/ezplatform-admin-ui": ">=1.3,<1.3.5|>=1.4,<1.4.6|>=1.5,<=1.5.25", + "ezsystems/ezplatform-admin-ui-assets": ">=4,<4.2.1|>=5,<5.0.1|>=5.1,<5.1.1", + "ezsystems/ezplatform-kernel": "<=1.2.5|>=1.3,<=1.3.1", + "ezsystems/ezplatform-rest": ">=1.2,<=1.2.2|>=1.3,<1.3.8", + "ezsystems/ezplatform-richtext": ">=2.3,<=2.3.7", + "ezsystems/ezplatform-user": ">=1,<1.0.1", + "ezsystems/ezpublish-kernel": "<=6.13.8.1|>=7,<7.5.26", + "ezsystems/ezpublish-legacy": "<=2017.12.7.3|>=2018.6,<=2019.3.5.1", + "ezsystems/platform-ui-assets-bundle": ">=4.2,<4.2.3", + "ezsystems/repository-forms": ">=2.3,<2.3.2.1", + "ezyang/htmlpurifier": "<4.1.1", + "facade/ignition": "<1.16.15|>=2,<2.4.2|>=2.5,<2.5.2", + "feehi/cms": "<=2.1.1", + "feehi/feehicms": "<=0.1.3", + "firebase/php-jwt": "<2", + "flarum/core": ">=1,<=1.0.1", + "flarum/sticky": ">=0.1-beta.14,<=0.1-beta.15", + "flarum/tags": "<=0.1-beta.13", + "fluidtypo3/vhs": "<5.1.1", + "fooman/tcpdf": "<6.2.22", + "forkcms/forkcms": "<=5.9.2", + "fossar/tcpdf-parser": "<6.2.22", + "francoisjacquet/rosariosis": "<8.1.1", + "friendsofsymfony/oauth2-php": "<1.3", + "friendsofsymfony/rest-bundle": ">=1.2,<1.2.2", + "friendsofsymfony/user-bundle": ">=1.2,<1.3.5", + "friendsoftypo3/mediace": ">=7.6.2,<7.6.5", + "froala/wysiwyg-editor": "<3.2.7", + "fuel/core": "<1.8.1", + "gaoming13/wechat-php-sdk": "<=1.10.2", + "getgrav/grav": "<1.7.28", + "getkirby/cms": "<3.5.8", + "getkirby/panel": "<2.5.14", + "gilacms/gila": "<=1.11.4", + "globalpayments/php-sdk": "<2", + "gos/web-socket-bundle": "<1.10.4|>=2,<2.6.1|>=3,<3.3", + "gree/jose": "<=2.2", + "gregwar/rst": "<1.0.3", + "grumpydictator/firefly-iii": "<5.6.5", + "guzzlehttp/guzzle": ">=4-rc.2,<4.2.4|>=5,<5.3.1|>=6,<6.2.1", + "helloxz/imgurl": "<=2.31", + "hillelcoren/invoice-ninja": "<5.3.35", + "hjue/justwriting": "<=1", + "hov/jobfair": "<1.0.13|>=2,<2.0.2", + "ibexa/post-install": "<=1.0.4", + "icecoder/icecoder": "<=8.1", + "illuminate/auth": ">=4,<4.0.99|>=4.1,<=4.1.31|>=4.2,<=4.2.22|>=5,<=5.0.35|>=5.1,<=5.1.46|>=5.2,<=5.2.45|>=5.3,<=5.3.31|>=5.4,<=5.4.36|>=5.5,<5.5.10", + "illuminate/cookie": ">=4,<=4.0.11|>=4.1,<=4.1.99999|>=4.2,<=4.2.99999|>=5,<=5.0.99999|>=5.1,<=5.1.99999|>=5.2,<=5.2.99999|>=5.3,<=5.3.99999|>=5.4,<=5.4.99999|>=5.5,<=5.5.49|>=5.6,<=5.6.99999|>=5.7,<=5.7.99999|>=5.8,<=5.8.99999|>=6,<6.18.31|>=7,<7.22.4", + "illuminate/database": "<6.20.26|>=7,<7.30.5|>=8,<8.40", + "illuminate/encryption": ">=4,<=4.0.11|>=4.1,<=4.1.31|>=4.2,<=4.2.22|>=5,<=5.0.35|>=5.1,<=5.1.46|>=5.2,<=5.2.45|>=5.3,<=5.3.31|>=5.4,<=5.4.36|>=5.5,<5.5.40|>=5.6,<5.6.15", + "illuminate/view": "<6.20.42|>=7,<7.30.6|>=8,<8.75", + "impresscms/impresscms": "<=1.4.2", + "in2code/femanager": "<5.5.1|>=6,<6.3.1", + "intelliants/subrion": "<=4.2.1", + "ivankristianto/phpwhois": "<=4.3", + "jackalope/jackalope-doctrine-dbal": "<1.7.4", + "james-heinrich/getid3": "<1.9.21", + "joomla/archive": "<1.1.10", + "joomla/session": "<1.3.1", + "jsmitty12/phpwhois": "<5.1", + "kazist/phpwhois": "<=4.2.6", + "kevinpapst/kimai2": "<1.16.7", + "kitodo/presentation": "<3.1.2", + "klaviyo/magento2-extension": ">=1,<3", + "kreait/firebase-php": ">=3.2,<3.8.1", + "la-haute-societe/tcpdf": "<6.2.22", + "laminas/laminas-form": "<2.17.2|>=3,<3.0.2|>=3.1,<3.1.1", + "laminas/laminas-http": "<2.14.2", + "laravel/framework": "<6.20.42|>=7,<7.30.6|>=8,<8.75", + "laravel/socialite": ">=1,<1.0.99|>=2,<2.0.10", + "latte/latte": "<2.10.8", + "lavalite/cms": "<=5.8", + "lcobucci/jwt": ">=3.4,<3.4.6|>=4,<4.0.4|>=4.1,<4.1.5", + "league/commonmark": "<0.18.3", + "league/flysystem": "<1.1.4|>=2,<2.1.1", + "lexik/jwt-authentication-bundle": "<2.10.7|>=2.11,<2.11.3", + "librenms/librenms": "<=21.11", + "limesurvey/limesurvey": "<3.27.19", + "livehelperchat/livehelperchat": "<=3.91", + "livewire/livewire": ">2.2.4,<2.2.6", + "lms/routes": "<2.1.1", + "localizationteam/l10nmgr": "<7.4|>=8,<8.7|>=9,<9.2", + "magento/community-edition": ">=2,<2.2.10|>=2.3,<2.3.3", + "magento/magento1ce": "<1.9.4.3", + "magento/magento1ee": ">=1,<1.14.4.3", + "magento/product-community-edition": ">=2,<2.2.10|>=2.3,<2.3.2-p.2", + "marcwillmann/turn": "<0.3.3", + "mautic/core": "<4|= 2.13.1", + "mediawiki/core": ">=1.27,<1.27.6|>=1.29,<1.29.3|>=1.30,<1.30.2|>=1.31,<1.31.9|>=1.32,<1.32.6|>=1.32.99,<1.33.3|>=1.33.99,<1.34.3|>=1.34.99,<1.35", + "microweber/microweber": "<1.2.11", + "miniorange/miniorange-saml": "<1.4.3", + "mittwald/typo3_forum": "<1.2.1", + "modx/revolution": "<2.8", + "monolog/monolog": ">=1.8,<1.12", + "moodle/moodle": "<3.9.11|>=3.10-beta,<3.10.8|>=3.11,<3.11.5", + "mustache/mustache": ">=2,<2.14.1", + "namshi/jose": "<2.2", + "neoan3-apps/template": "<1.1.1", + "neos/flow": ">=1,<1.0.4|>=1.1,<1.1.1|>=2,<2.0.1|>=2.3,<2.3.16|>=3,<3.0.12|>=3.1,<3.1.10|>=3.2,<3.2.13|>=3.3,<3.3.13|>=4,<4.0.6", + "neos/form": ">=1.2,<4.3.3|>=5,<5.0.9|>=5.1,<5.1.3", + "neos/neos": ">=1.1,<1.1.3|>=1.2,<1.2.13|>=2,<2.0.4|>=2.3,<2.9.99|>=3,<3.0.20|>=3.1,<3.1.18|>=3.2,<3.2.14|>=3.3,<3.3.23|>=4,<4.0.17|>=4.1,<4.1.16|>=4.2,<4.2.12|>=4.3,<4.3.3", + "neos/swiftmailer": ">=4.1,<4.1.99|>=5.4,<5.4.5", + "netgen/tagsbundle": ">=3.4,<3.4.11|>=4,<4.0.15", + "nette/application": ">=2,<2.0.19|>=2.1,<2.1.13|>=2.2,<2.2.10|>=2.3,<2.3.14|>=2.4,<2.4.16|>=3,<3.0.6", + "nette/nette": ">=2,<2.0.19|>=2.1,<2.1.13", + "nilsteampassnet/teampass": "<=2.1.27.36", + "nukeviet/nukeviet": "<4.3.4", + "nystudio107/craft-seomatic": "<3.3", + "nzo/url-encryptor-bundle": ">=4,<4.3.2|>=5,<5.0.1", + "october/backend": "<1.1.2", + "october/cms": "= 1.1.1|= 1.0.471|= 1.0.469|>=1.0.319,<1.0.469", + "october/october": ">=1.0.319,<1.0.466|>=2.1,<2.1.12", + "october/rain": "<1.0.472|>=1.1,<1.1.2", + "october/system": "<1.0.473|>=1.1,<1.1.6|>=2.1,<2.1.12", + "onelogin/php-saml": "<2.10.4", + "oneup/uploader-bundle": "<1.9.3|>=2,<2.1.5", + "opencart/opencart": "<=3.0.3.2", + "openid/php-openid": "<2.3", + "openmage/magento-lts": "<19.4.15|>=20,<20.0.13", + "orchid/platform": ">=9,<9.4.4", + "oro/crm": ">=1.7,<1.7.4|>=3.1,<4.1.17|>=4.2,<4.2.7", + "oro/platform": ">=1.7,<1.7.4|>=3.1,<3.1.29|>=4.1,<4.1.17|>=4.2,<4.2.8", + "padraic/humbug_get_contents": "<1.1.2", + "pagarme/pagarme-php": ">=0,<3", + "pagekit/pagekit": "<=1.0.18", + "paragonie/random_compat": "<2", + "passbolt/passbolt_api": "<2.11", + "paypal/merchant-sdk-php": "<3.12", + "pear/archive_tar": "<1.4.14", + "pegasus/google-for-jobs": "<1.5.1|>=2,<2.1.1", + "personnummer/personnummer": "<3.0.2", + "phanan/koel": "<5.1.4", + "phpfastcache/phpfastcache": "<6.1.5|>=7,<7.1.2|>=8,<8.0.7", + "phpmailer/phpmailer": "<6.5", + "phpmussel/phpmussel": ">=1,<1.6", + "phpmyadmin/phpmyadmin": "<4.9.8|>=5,<5.0.3|>=5.1,<5.1.2", + "phpoffice/phpexcel": "<1.8.2", + "phpoffice/phpspreadsheet": "<1.16", + "phpseclib/phpseclib": "<2.0.31|>=3,<3.0.7", + "phpservermon/phpservermon": "<=3.5.2", + "phpunit/phpunit": ">=4.8.19,<4.8.28|>=5.0.10,<5.6.3", + "phpwhois/phpwhois": "<=4.2.5", + "phpxmlrpc/extras": "<0.6.1", + "pimcore/pimcore": "<=10.2.9", + "pocketmine/pocketmine-mp": "<4.0.7", + "pressbooks/pressbooks": "<5.18", + "prestashop/autoupgrade": ">=4,<4.10.1", + "prestashop/contactform": ">1.0.1,<4.3", + "prestashop/gamification": "<2.3.2", + "prestashop/prestashop": ">=1.7,<=1.7.8.2", + "prestashop/productcomments": ">=4,<4.2.1", + "prestashop/ps_emailsubscription": "<2.6.1", + "prestashop/ps_facetedsearch": "<3.4.1", + "prestashop/ps_linklist": "<3.1", + "privatebin/privatebin": "<1.2.2|>=1.3,<1.3.2", + "propel/propel": ">=2-alpha.1,<=2-alpha.7", + "propel/propel1": ">=1,<=1.7.1", + "pterodactyl/panel": "<1.7", + "pusher/pusher-php-server": "<2.2.1", + "pwweb/laravel-core": "<=0.3.6-beta", + "rainlab/debugbar-plugin": "<3.1", + "remdex/livehelperchat": "<3.93", + "rmccue/requests": ">=1.6,<1.8", + "robrichards/xmlseclibs": "<3.0.4", + "sabberworm/php-css-parser": ">=1,<1.0.1|>=2,<2.0.1|>=3,<3.0.1|>=4,<4.0.1|>=5,<5.0.9|>=5.1,<5.1.3|>=5.2,<5.2.1|>=6,<6.0.2|>=7,<7.0.4|>=8,<8.0.1|>=8.1,<8.1.1|>=8.2,<8.2.1|>=8.3,<8.3.1", + "sabre/dav": ">=1.6,<1.6.99|>=1.7,<1.7.11|>=1.8,<1.8.9", + "scheb/two-factor-bundle": ">=0,<3.26|>=4,<4.11", + "sensiolabs/connect": "<4.2.3", + "serluck/phpwhois": "<=4.2.6", + "shopware/core": "<=6.4.6", + "shopware/platform": "<=6.4.6", + "shopware/production": "<=6.3.5.2", + "shopware/shopware": "<5.7.7", + "showdoc/showdoc": "<2.10.2", + "silverstripe/admin": ">=1,<1.8.1", + "silverstripe/assets": ">=1,<1.4.7|>=1.5,<1.5.2", + "silverstripe/cms": "<4.3.6|>=4.4,<4.4.4", + "silverstripe/comments": ">=1.3,<1.9.99|>=2,<2.9.99|>=3,<3.1.1", + "silverstripe/forum": "<=0.6.1|>=0.7,<=0.7.3", + "silverstripe/framework": "<4.7.4", + "silverstripe/graphql": "<3.5.2|>=4-alpha.1,<4-alpha.2", + "silverstripe/registry": ">=2.1,<2.1.2|>=2.2,<2.2.1", + "silverstripe/restfulserver": ">=1,<1.0.9|>=2,<2.0.4", + "silverstripe/subsites": ">=2,<2.1.1", + "silverstripe/taxonomy": ">=1.3,<1.3.1|>=2,<2.0.1", + "silverstripe/userforms": "<3", + "simple-updates/phpwhois": "<=1", + "simplesamlphp/saml2": "<1.10.6|>=2,<2.3.8|>=3,<3.1.4", + "simplesamlphp/simplesamlphp": "<1.18.6", + "simplesamlphp/simplesamlphp-module-infocard": "<1.0.1", + "simplito/elliptic-php": "<1.0.6", + "slim/slim": "<2.6", + "smarty/smarty": "<3.1.43|>=4,<4.0.3", + "snipe/snipe-it": "<=5.3.7", + "socalnick/scn-social-auth": "<1.15.2", + "socialiteproviders/steam": "<1.1", + "spipu/html2pdf": "<5.2.4", + "spoonity/tcpdf": "<6.2.22", + "squizlabs/php_codesniffer": ">=1,<2.8.1|>=3,<3.0.1", + "ssddanbrown/bookstack": "<21.12.1", + "stormpath/sdk": ">=0,<9.9.99", + "studio-42/elfinder": "<2.1.59", + "subrion/cms": "<=4.2.1", + "sulu/sulu": "= 2.4.0-RC1|<1.6.44|>=2,<2.2.18|>=2.3,<2.3.8", + "swiftmailer/swiftmailer": ">=4,<5.4.5", + "sylius/admin-bundle": ">=1,<1.0.17|>=1.1,<1.1.9|>=1.2,<1.2.2", + "sylius/grid": ">=1,<1.1.19|>=1.2,<1.2.18|>=1.3,<1.3.13|>=1.4,<1.4.5|>=1.5,<1.5.1", + "sylius/grid-bundle": ">=1,<1.1.19|>=1.2,<1.2.18|>=1.3,<1.3.13|>=1.4,<1.4.5|>=1.5,<1.5.1", + "sylius/paypal-plugin": ">=1,<1.2.4|>=1.3,<1.3.1", + "sylius/resource-bundle": "<1.3.14|>=1.4,<1.4.7|>=1.5,<1.5.2|>=1.6,<1.6.4", + "sylius/sylius": "<1.6.9|>=1.7,<1.7.9|>=1.8,<1.8.3|>=1.9,<1.9.5", + "symbiote/silverstripe-multivaluefield": ">=3,<3.0.99", + "symbiote/silverstripe-queuedjobs": ">=3,<3.0.2|>=3.1,<3.1.4|>=4,<4.0.7|>=4.1,<4.1.2|>=4.2,<4.2.4|>=4.3,<4.3.3|>=4.4,<4.4.3|>=4.5,<4.5.1|>=4.6,<4.6.4", + "symbiote/silverstripe-versionedfiles": "<=2.0.3", + "symfont/process": ">=0,<4", + "symfony/cache": ">=3.1,<3.4.35|>=4,<4.2.12|>=4.3,<4.3.8", + "symfony/dependency-injection": ">=2,<2.0.17|>=2.7,<2.7.51|>=2.8,<2.8.50|>=3,<3.4.26|>=4,<4.1.12|>=4.2,<4.2.7", + "symfony/error-handler": ">=4.4,<4.4.4|>=5,<5.0.4", + "symfony/form": ">=2.3,<2.3.35|>=2.4,<2.6.12|>=2.7,<2.7.50|>=2.8,<2.8.49|>=3,<3.4.20|>=4,<4.0.15|>=4.1,<4.1.9|>=4.2,<4.2.1", + "symfony/framework-bundle": "<5.3.15|>=5.4,<5.4.4|>=6,<6.0.4", + "symfony/http-foundation": ">=2,<2.8.52|>=3,<3.4.35|>=4,<4.2.12|>=4.3,<4.3.8|>=4.4,<4.4.7|>=5,<5.0.7", + "symfony/http-kernel": ">=2,<2.8.52|>=3,<3.4.35|>=4,<4.2.12|>=4.3,<4.4.13|>=5,<5.1.5|>=5.2,<5.3.12", + "symfony/intl": ">=2.7,<2.7.38|>=2.8,<2.8.31|>=3,<3.2.14|>=3.3,<3.3.13", + "symfony/maker-bundle": ">=1.27,<1.29.2|>=1.30,<1.31.1", + "symfony/mime": ">=4.3,<4.3.8", + "symfony/phpunit-bridge": ">=2.8,<2.8.50|>=3,<3.4.26|>=4,<4.1.12|>=4.2,<4.2.7", + "symfony/polyfill": ">=1,<1.10", + "symfony/polyfill-php55": ">=1,<1.10", + "symfony/proxy-manager-bridge": ">=2.7,<2.7.51|>=2.8,<2.8.50|>=3,<3.4.26|>=4,<4.1.12|>=4.2,<4.2.7", + "symfony/routing": ">=2,<2.0.19", + "symfony/security": ">=2,<2.7.51|>=2.8,<3.4.49|>=4,<4.4.24|>=5,<5.2.8", + "symfony/security-bundle": ">=2,<2.7.48|>=2.8,<2.8.41|>=3,<3.3.17|>=3.4,<3.4.11|>=4,<4.0.11|>=5.3,<5.3.12", + "symfony/security-core": ">=2.4,<2.6.13|>=2.7,<2.7.9|>=2.7.30,<2.7.32|>=2.8,<3.4.49|>=4,<4.4.24|>=5,<5.2.9", + "symfony/security-csrf": ">=2.4,<2.7.48|>=2.8,<2.8.41|>=3,<3.3.17|>=3.4,<3.4.11|>=4,<4.0.11", + "symfony/security-guard": ">=2.8,<3.4.48|>=4,<4.4.23|>=5,<5.2.8", + "symfony/security-http": ">=2.3,<2.3.41|>=2.4,<2.7.51|>=2.8,<3.4.48|>=4,<4.4.23|>=5,<5.2.8|>=5.3,<5.3.2", + "symfony/serializer": ">=2,<2.0.11|>=4.1,<4.4.35|>=5,<5.3.12", + "symfony/symfony": ">=2,<3.4.49|>=4,<4.4.35|>=5,<5.3.12|>=5.3.14,<=5.3.14|>=5.4.3,<=5.4.3|>=6.0.3,<=6.0.3", + "symfony/translation": ">=2,<2.0.17", + "symfony/validator": ">=2,<2.0.24|>=2.1,<2.1.12|>=2.2,<2.2.5|>=2.3,<2.3.3", + "symfony/var-exporter": ">=4.2,<4.2.12|>=4.3,<4.3.8", + "symfony/web-profiler-bundle": ">=2,<2.3.19|>=2.4,<2.4.9|>=2.5,<2.5.4", + "symfony/yaml": ">=2,<2.0.22|>=2.1,<2.1.7", + "t3/dce": ">=2.2,<2.6.2", + "t3g/svg-sanitizer": "<1.0.3", + "tecnickcom/tcpdf": "<6.2.22", + "thelia/backoffice-default-template": ">=2.1,<2.1.2", + "thelia/thelia": ">=2.1-beta.1,<2.1.3", + "theonedemon/phpwhois": "<=4.2.5", + "tinymce/tinymce": "<5.10", + "titon/framework": ">=0,<9.9.99", + "topthink/framework": "<6.0.9", + "topthink/think": "<=6.0.9", + "topthink/thinkphp": "<=3.2.3", + "tribalsystems/zenario": "<8.8.53370", + "truckersmp/phpwhois": "<=4.3.1", + "twig/twig": "<1.38|>=2,<2.7", + "typo3/cms": ">=6.2,<6.2.30|>=7,<7.6.32|>=8,<8.7.38|>=9,<9.5.29|>=10,<10.4.19|>=11,<11.5", + "typo3/cms-backend": ">=7,<=7.6.50|>=8,<=8.7.39|>=9,<=9.5.24|>=10,<=10.4.13|>=11,<=11.1", + "typo3/cms-core": ">=6.2,<=6.2.56|>=7,<=7.6.52|>=8,<=8.7.41|>=9,<9.5.29|>=10,<10.4.19|>=11,<11.5", + "typo3/cms-form": ">=8,<=8.7.39|>=9,<=9.5.24|>=10,<=10.4.13|>=11,<=11.1", + "typo3/flow": ">=1,<1.0.4|>=1.1,<1.1.1|>=2,<2.0.1|>=2.3,<2.3.16|>=3,<3.0.12|>=3.1,<3.1.10|>=3.2,<3.2.13|>=3.3,<3.3.13|>=4,<4.0.6", + "typo3/neos": ">=1.1,<1.1.3|>=1.2,<1.2.13|>=2,<2.0.4|>=2.3,<2.3.99|>=3,<3.0.20|>=3.1,<3.1.18|>=3.2,<3.2.14|>=3.3,<3.3.23|>=4,<4.0.17|>=4.1,<4.1.16|>=4.2,<4.2.12|>=4.3,<4.3.3", + "typo3/phar-stream-wrapper": ">=1,<2.1.1|>=3,<3.1.1", + "typo3/swiftmailer": ">=4.1,<4.1.99|>=5.4,<5.4.5", + "typo3fluid/fluid": ">=2,<2.0.8|>=2.1,<2.1.7|>=2.2,<2.2.4|>=2.3,<2.3.7|>=2.4,<2.4.4|>=2.5,<2.5.11|>=2.6,<2.6.10", + "ua-parser/uap-php": "<3.8", + "unisharp/laravel-filemanager": "<=2.3", + "userfrosting/userfrosting": ">=0.3.1,<4.6.3", + "usmanhalalit/pixie": "<1.0.3|>=2,<2.0.2", + "vanilla/safecurl": "<0.9.2", + "verot/class.upload.php": "<=1.0.3|>=2,<=2.0.4", + "vrana/adminer": "<4.7.9", + "wallabag/tcpdf": "<6.2.22", + "wanglelecc/laracms": "<=1.0.3", + "web-auth/webauthn-framework": ">=3.3,<3.3.4", + "webcoast/deferred-image-processing": "<1.0.2", + "wikimedia/parsoid": "<0.12.2", + "willdurand/js-translation-bundle": "<2.1.1", + "wp-cli/wp-cli": "<2.5", + "yetiforce/yetiforce-crm": "<=6.3", + "yidashi/yii2cmf": "<=2", + "yii2mod/yii2-cms": "<1.9.2", + "yiisoft/yii": ">=1.1.14,<1.1.15", + "yiisoft/yii2": "<2.0.38", + "yiisoft/yii2-bootstrap": "<2.0.4", + "yiisoft/yii2-dev": "<2.0.43", + "yiisoft/yii2-elasticsearch": "<2.0.5", + "yiisoft/yii2-gii": "<2.0.4", + "yiisoft/yii2-jui": "<2.0.4", + "yiisoft/yii2-redis": "<2.0.8", + "yoast-seo-for-typo3/yoast_seo": "<7.2.3", + "yourls/yourls": "<=1.8.2", + "zendesk/zendesk_api_client_php": "<2.2.11", + "zendframework/zend-cache": ">=2.4,<2.4.8|>=2.5,<2.5.3", + "zendframework/zend-captcha": ">=2,<2.4.9|>=2.5,<2.5.2", + "zendframework/zend-crypt": ">=2,<2.4.9|>=2.5,<2.5.2", + "zendframework/zend-db": ">=2,<2.0.99|>=2.1,<2.1.99|>=2.2,<2.2.10|>=2.3,<2.3.5", + "zendframework/zend-developer-tools": ">=1.2.2,<1.2.3", + "zendframework/zend-diactoros": ">=1,<1.8.4", + "zendframework/zend-feed": ">=1,<2.10.3", + "zendframework/zend-form": ">=2,<2.2.7|>=2.3,<2.3.1", + "zendframework/zend-http": ">=1,<2.8.1", + "zendframework/zend-json": ">=2.1,<2.1.6|>=2.2,<2.2.6", + "zendframework/zend-ldap": ">=2,<2.0.99|>=2.1,<2.1.99|>=2.2,<2.2.8|>=2.3,<2.3.3", + "zendframework/zend-mail": ">=2,<2.4.11|>=2.5,<2.7.2", + "zendframework/zend-navigation": ">=2,<2.2.7|>=2.3,<2.3.1", + "zendframework/zend-session": ">=2,<2.0.99|>=2.1,<2.1.99|>=2.2,<2.2.9|>=2.3,<2.3.4", + "zendframework/zend-validator": ">=2.3,<2.3.6", + "zendframework/zend-view": ">=2,<2.2.7|>=2.3,<2.3.1", + "zendframework/zend-xmlrpc": ">=2.1,<2.1.6|>=2.2,<2.2.6", + "zendframework/zendframework": "<=3", + "zendframework/zendframework1": "<1.12.20", + "zendframework/zendopenid": ">=2,<2.0.2", + "zendframework/zendxml": ">=1,<1.0.1", + "zetacomponents/mail": "<1.8.2", + "zf-commons/zfc-user": "<1.2.2", + "zfcampus/zf-apigility-doctrine": ">=1,<1.0.3", + "zfr/zfr-oauth2-server-module": "<0.1.2", + "zoujingli/thinkadmin": "<6.0.22" + }, + "type": "metapackage", + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Marco Pivetta", + "email": "ocramius@gmail.com", + "role": "maintainer" + }, + { + "name": "Ilya Tribusean", + "email": "slash3b@gmail.com", + "role": "maintainer" + } + ], + "description": "Prevents installation of composer packages with known security vulnerabilities: no API, simply require it", + "funding": [ + { + "url": "https://github.com/Ocramius", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/roave/security-advisories", + "type": "tidelift" + } + ], + "time": "2022-02-01T15:19:50+00:00" + } + ], + "aliases": [], + "minimum-stability": "stable", + "stability-flags": { + "openpsa/quickform": 20, + "pear/file": 20, + "pear/html_template_flexy": 20, + "roojs/pdo_dataobject": 20, + "roave/security-advisories": 20 + }, + "prefer-stable": false, + "prefer-lowest": false, + "platform": { + "php": ">=5.5", + "ext-curl": "*", + "ext-dom": "*", + "ext-json": "*", + "ext-mbstring": "*", + "ext-openssl": "*", + "ext-pcre": "*", + "ext-pdo": "*", + "ext-phar": "*", + "ext-session": "*", + "ext-spl": "*", + "ext-xml": "*", + "ext-zlib": "*" + }, + "platform-dev": [], + "plugin-api-version": "1.1.0" +} diff --git a/conf/conf.inc.php b/conf/conf.inc.php index d037ef844..82e0524ba 100644 --- a/conf/conf.inc.php +++ b/conf/conf.inc.php @@ -7,7 +7,7 @@ // o[W $_conf = array( 'p2name' => 'rep2-expack_allinone', // rep2̖O - 'p2version' => '180705.1300', // rep2̃o[W + 'p2version' => '200101.0000', // rep2̃o[W ); $_conf['p2ua'] = "{$_conf['p2name']}/{$_conf['p2version']}"; @@ -292,6 +292,8 @@ function p2_init() include P2_LIB_DIR . '/bootstrap.php'; } +header("Referrer-Policy: no-referrer"); + // }}} /* diff --git a/conf/conf_ic2.inc.php b/conf/conf_ic2.inc.php index 7e244c00e..3d1a8d4f0 100644 --- a/conf/conf_ic2.inc.php +++ b/conf/conf_ic2.inc.php @@ -10,11 +10,12 @@ $_conf['expack.ic2.general.cacheuri'] = './ic'; // DSN (DBɐڑ邽߂̃f[^\[X) -// @link http://jp.pear.php.net/manual/ja/package.database.db.intro-dsn.php +// @link https://roojs.github.io/PDO_DataObject/docs/index.html#config // ) -// MySQL: 'mysqli://username:password@localhost:3306/database' -// PostgreSQL: 'pgsql://username:password@localhost:5432/database' -// SQLite2: 'sqlite:///' . $_conf['db_dir'] . '/imgcache.sqlite' +// MySQL: 'mysql://username:password@localhost:3306/database?charset=utf8' +// MySQL (via UNIX domain socket): 'mysql://username:password@localhost/database?charset=utf8;unix_socket=/run/mysqld/mysqld.sock' +// PostgreSQL: 'pgsql://username:password@localhost:5432/database' +// SQLite: 'sqlite:/' . $_conf['db_dir'] . '/imgcache.sqlite' // 1: username,password,database͎ۂ̂̂ƓǂݑւB // 2: MySQL,PosrgreSQLł͗\߃f[^x[XĂB $_conf['expack.ic2.general.dsn'] = ""; @@ -141,7 +142,7 @@ // G[Oɂ摜̓_E[h݂Ȃ (no:0;yes:1) $_conf['expack.ic2.getter.checkerror'] = 1; -// ftHgURL+.html̋Ut@𑗂 (no:0;yes:1) +// ftHgURL̋Ut@𑗂 (no:0;yes:1) $_conf['expack.ic2.getter.sendreferer'] = 0; // sendreferer = 0 ̂ƂAOIɃt@𑗂zXgiJ}؂j diff --git a/conf/conf_user_def.inc.php b/conf/conf_user_def.inc.php index acefca2f0..e73c4fdb1 100644 --- a/conf/conf_user_def.inc.php +++ b/conf/conf_user_def.inc.php @@ -37,9 +37,9 @@ KvȂ΁Aw("")ɂB */ // ("http://azlucky.s25.xrea.com/2chboard/bbsmenu.html") // 2ch + OBBS -// ("http://menu.2ch.net/bbsmenu.html") // 2ch{ +// ("https://menu.5ch.net/bbsmenu.html") // 2ch{ -$conf_user_def['brdfile_online'] = "http://azlucky.s25.xrea.com/2chboard/bbsmenu.html"; +$conf_user_def['brdfile_online'] = "https://menu.5ch.net/bbsmenu.html"; $conf_user_rules['brdfile_online'] = array('emptyToDef', 'invalidUrlToDef'); // }}} @@ -317,6 +317,9 @@ // IDɐFt $conf_user_def['coloredid.enable'] = 1; $conf_user_rad['coloredid.enable'] = array('1' => '', '0' => 'Ȃ'); +// F̕ϊʂ\ +$conf_user_def['coloredid.debug'] = 0; +$conf_user_rad['coloredid.debug'] = array('1' => '', '0' => 'Ȃ'); // ʕ\IDɒFĂ $conf_user_def['coloredid.rate.type'] = 3; $conf_user_rad['coloredid.rate.type'] = array('0' => 'Ȃ', '1' => 'o', '2' => 'Xgbv10', '3' => 'Xψȏ'); @@ -379,6 +382,10 @@ $conf_user_def['ngaborn_purge_aborn'] = 0; // (0) $conf_user_rad['ngaborn_purge_aborn'] = array('1' => '͂', '0' => ''); +// >>1 ځ[̑ΏۊOɂ(:1, Ȃ:0) +$conf_user_def['ngaborn_exclude_one'] = 0; // (0) +$conf_user_rad['ngaborn_exclude_one'] = array('1' => '', '0' => 'Ȃ'); + // }}} // {{{ 2ch API @@ -623,7 +630,12 @@ include P2_CONFIG_DIR . '/conf_user_def_live.inc.php'; // }}} +// {{{ ip2host + +include P2_CONFIG_DIR . '/conf_user_def_ip2host.inc.php'; +// }}} + /* * Local Variables: * mode: php diff --git a/conf/conf_user_def_ex.inc.php b/conf/conf_user_def_ex.inc.php index 7e584ce58..cddbfbd8d 100644 --- a/conf/conf_user_def_ex.inc.php +++ b/conf/conf_user_def_ex.inc.php @@ -66,6 +66,16 @@ $conf_user_def['expack.tgrep.recent2_num'] = 10; // (10) $conf_user_rules['expack.tgrep.recent2_num'] = array('notIntExceptMinusToDef'); +// Ɏgp錟GW +$conf_user_def['expack.tgrep.engine'] = '4'; +$conf_user_sel['expack.tgrep.engine'] = array( + '0' => sprintf('tGrep (%s)', parse_url($_conf['expack.tgrep_url'], PHP_URL_HOST)), // tGrep(݊)T[rX + '1' => 'dig (dig.5ch.net)', // ƃT[rX~ + '2' => 're.Find2ch (refind2ch.org)', // https://refind2ch.org/about + '3' => '5chX^C (ff5ch.syoboi.jp)', // http://z.syoboi.jp/web/ff2ch/ + '4' => '5˂X^C (find.5ch.net)', // http://find.5ch.net/ +); + // }}} // {{{ X}[g|bvAbvj[ diff --git a/conf/conf_user_def_ip2host.inc.php b/conf/conf_user_def_ip2host.inc.php new file mode 100644 index 000000000..9ae009d38 --- /dev/null +++ b/conf/conf_user_def_ip2host.inc.php @@ -0,0 +1,45 @@ + 'sessionStorage(uEU)', + '1' => 'localStorage(uEU)', + '2' => 't@C(T[o[)', +); + +// }}} + +// {{{ ̃^C~O + +// ̃^C~O(X\Ɉꊇ:0, ʃXN[ŏ:1) +$conf_user_def['ip2host.replace.type'] = 0; // (0) +$conf_user_sel['ip2host.replace.type'] = array( + '0' => 'X\Ɉꊇ', + '1' => 'ʃXN[ŏ', +); + +// }}} + +// {{{ ip2host̐ݒ + +// ip2hostgp邩 +$conf_user_def['ip2host.enabled'] = 0; // (0) +$conf_user_rad['ip2host.enabled'] = array('1' => '', '0' => 'Ȃ'); + +// LbV̏ +$conf_user_def['ip2host.cache.size'] = 500; // (500) +$conf_user_rules['ip2host.cache.size'] = array('emptyToDef', 'notIntExceptMinusToDef'); + +// t̂ځ[񏈗邩 +$conf_user_def['ip2host.aborn.enabled'] = 1; // (1) +$conf_user_rad['ip2host.aborn.enabled'] = array('1' => '', '0' => 'Ȃ'); + +// }}} diff --git a/lib/BrdMenu.php b/lib/BrdMenu.php index e19ac251c..09b637dbb 100644 --- a/lib/BrdMenu.php +++ b/lib/BrdMenu.php @@ -50,7 +50,7 @@ public function setBrdMatch($brdName) if (preg_match('/(html?|cgi)$/', $brdName)) { $this->format = 'html'; $this->cate_match = '{(.+)
.*$}i'; - $this->ita_match = '{^(.+)(
)?$}i'; + $this->ita_match = '{^(.+)(
)?$}i'; // brd` } else { $this->format = 'brd'; diff --git a/lib/FileCtl.php b/lib/FileCtl.php index b502454de..fec39b825 100644 --- a/lib/FileCtl.php +++ b/lib/FileCtl.php @@ -335,7 +335,9 @@ static public function file_read_lines($filename, $flags = 0, $context = null) if (($flags & FILE_IGNORE_NEW_LINES) && $lines && strlen($lines[0]) && substr($lines[0], -1) == "\r") { - $lines = array_map(create_function('$l', 'return rtrim($l, "\\r");'), $lines); + $lines = array_map(function ($l) { + return rtrim($l, "\\r"); + }, $lines); if ($flags & FILE_SKIP_EMPTY_LINES) { $lines = array_filter($lines, 'strlen'); } diff --git a/lib/LastmodifyTxt.php b/lib/LastmodifyTxt.php index d2b4437f8..abcb64b97 100644 --- a/lib/LastmodifyTxt.php +++ b/lib/LastmodifyTxt.php @@ -95,6 +95,7 @@ public function downloadLastmodify() $response = P2Commun::getHTTPResponse($req); $code = $response->getStatus(); + $body = ''; if ($code == 302) { // zXg̈ړ]ǐ $new_host = P2HostMgr::getCurrentHost($this->host, $this->bbs); diff --git a/lib/Login.php b/lib/Login.php index a8157e45a..b97c4673b 100644 --- a/lib/Login.php +++ b/lib/Login.php @@ -302,7 +302,7 @@ private function _authCheck() // }}} - $mobile = Net_UserAgent_Mobile::singleton(); + $mobile = (new Net_UserAgent_Mobile)->singleton(); // {{{ tH[烍OC diff --git a/lib/P2CurlMulti.php b/lib/P2CurlMulti.php index 4ad2fc0ac..f1fbb6d75 100644 --- a/lib/P2CurlMulti.php +++ b/lib/P2CurlMulti.php @@ -34,7 +34,11 @@ private function add($subjects, $force = false) { foreach ($subjects as $key => $subject) { list($host, $bbs) = explode("_", $key); - $url = "http://{$host}/{$bbs}/subject.txt"; + if ($_conf['2ch_ssl.subject']) { + $url = "https://{$host}/{$bbs}/subject.txt"; + } else { + $url = "http://{$host}/{$bbs}/subject.txt"; + } $file = P2Util::datDirOfHostBbs($host, $bbs) . 'subject.txt'; $isOldFile[$key] = false; diff --git a/lib/P2Util.php b/lib/P2Util.php index 60a53fedd..da5b94ae6 100644 --- a/lib/P2Util.php +++ b/lib/P2Util.php @@ -1979,6 +1979,31 @@ function checkRoninExpiration() return true; } + // }}} + // {{{ replaceNumericalSurrogatePair() + + /** + * ɃTQ[gyA̐lQƂΌlQƂɒu + * + * @access public + * @param string $str + * @return string + */ + static public function replaceNumericalSurrogatePair($str) + { + // 55296-56319 56320-57343 ͈̔͂̑gݍ킹Ȃ̂ xxxx;xxxx; ōiĒT + return preg_replace_callback('/&#(5[5-6]\\d{3});&#(5[6-7]\\d{3});/', + function ($matches) { + // TQ[gyA͈̔͂Ȃ獇lQƂɂĒu + if ($matches[1] >= 0xD800 && $matches[1] <= 0xDBFF && $matches[2] >= 0xDC00 && $matches[2] <= 0xDFFF) { + return sprintf("&#%d;", (($matches[1] & 0x3FF) << 10) + ($matches[2] & 0x3FF) + 0x10000); + } + // ͈͊O͂̂܂ + return $matches[0]; + }, + $str); + } + // }}} // {{{ debug() /* diff --git a/lib/ResFilter.php b/lib/ResFilter.php index e63083226..53529ca6a 100644 --- a/lib/ResFilter.php +++ b/lib/ResFilter.php @@ -165,15 +165,11 @@ static public function getWord($callback = null, array $params = array()) */ static public function configure(array $params) { - $level = error_reporting(E_ALL & ~E_NOTICE); - - $word = $params['word']; - $field = $params['field']; - $method = $params['method']; - $match = $params['match']; - $include = $params['include']; - - error_reporting($level); + $word = $params['word'] ?? null; + $field = $params['field'] ?? null; + $method = $params['method'] ?? null; + $match = $params['method'] ?? null; + $include = $params['include'] ?? null; self::$_instance = new ResFilter($word, $field, $method, $match, $include); diff --git a/lib/Session.php b/lib/Session.php index cb0f63908..53422e5a3 100644 --- a/lib/Session.php +++ b/lib/Session.php @@ -256,7 +256,7 @@ private function _checkUA() { // {{{ docomoUTNUA㕔ς̂ŋ@햼Ō؂ - $mobile = Net_UserAgent_Mobile::singleton(); + $mobile = (new Net_UserAgent_Mobile)->singleton(); if ($mobile->isDoCoMo()) { $mobile_b = Net_UserAgent_Mobile::factory($_SESSION[$this->sess_array]['ua']); if ($mobile_b->getModel() == $mobile->getModel()) { diff --git a/lib/SettingTxt.php b/lib/SettingTxt.php index 027131616..60e5fefa7 100644 --- a/lib/SettingTxt.php +++ b/lib/SettingTxt.php @@ -109,8 +109,8 @@ public function downloadSettingTxt() $code = $response->getStatus(); if ($code == 302) { // zXg̈ړ]ǐ - $new_host = P2HostMgr::getCurrentHost($this->host, $this->bbs); - if ($new_host != $this->host) { + $new_host = P2HostMgr::getCurrentHost($this->_host, $this->_bbs); + if ($new_host != $this->_host) { $aNewSettingTxt = new SettingTxt($new_host, $this->_bbs); return $aNewSettingTxt->downloadSettingTxt(); } @@ -118,7 +118,7 @@ public function downloadSettingTxt() //var_dump($req->getResponseHeader()); $body = $response->getBody(); // or be.2ch.net ȂEUCSJISɕϊ - if (P2HostMgr::isHostJbbsShitaraba($this->host) || P2HostMgr::isHostBe2chs($this->host)) { + if (P2HostMgr::isHostJbbsShitaraba($this->_host) || P2HostMgr::isHostBe2chs($this->_host)) { $body = mb_convert_encoding($body, 'CP932', 'CP51932'); } if (FileCtl::file_write_contents($this->_setting_txt, $body) === false) { diff --git a/lib/ShowThread.php b/lib/ShowThread.php index b73ed9dd1..1cb91b36d 100644 --- a/lib/ShowThread.php +++ b/lib/ShowThread.php @@ -681,6 +681,11 @@ protected function _ngAbornCheck($i, $name, $mail, $date_id, $id, $msg, $nong = $info = array(); $type = self::NG_NONE; + // >>1 ځ[̑ΏۊOɂ + if ($_conf['ngaborn_exclude_one'] && $i == 1) { + return $type; + } + // {{{ poID`FbN if ($this->_ngaborn_frequent && $id && $this->thread->idcount[$id] >= $_conf['ngaborn_frequent_num']) { @@ -1114,7 +1119,7 @@ public function transLink($str) */ public function transLinkDo(array $s) { - if ($s['url']) { + if (array_key_exists('url', $_GET) && $s['url']) { // sha1ň͂񂾕Ȃ邪mŏՓ˂ $key = sha1(serialize($s)); // LbVĂȂꍇ @@ -1175,8 +1180,8 @@ private function _transLinkDo(array $s) } $url = preg_replace('/^t?(tps?)$/', 'ht$1', $s[9]) . '://' . $s[10]; $str = $s['url']; - $following = $s[11]; - if (strlen($following) > 0) { + $following = array_key_exists(11, $s) ? $s[11] : ''; + if ($following !== '') { // EBLyfBA{łURLŁASJIS2oCg̏ʃoCg // (0x81-0x9F,0xE0-0xEF)Ƃ if (P2HostMgr::isUrlWikipediaJa($url)) { @@ -1538,9 +1543,27 @@ public function getQuoteResNumsName($name) return false; } + // HTML^O + $name = strip_tags(trim($name)); + + // ftHg̖ + if (isset($this->_nanashiName)) { + $name = str_replace($this->_nanashiName, "", $name); + } + + /* + * b`C + * (ܯW a897-sa51) + * ( Ad38-g1G2 [11.11.11.11 [㋉]]) + */ + $name = preg_replace('/\(.+ .{4}-.{4}( \[.+])?\)/', '', $name, 1); + // gbv $name = preg_replace('/.*/', '', $name, 1); - $name = strip_tags($name); + + if (strlen($name) == 0) { + return false; + } /* //if (preg_match('/[0-9]+/', $name, $m)) { @@ -1630,7 +1653,7 @@ protected function _makeQuotes() // NGځ[`FbN if (($id = $this->thread->ids[$num + 1]) !== null) { - $date_id = str_replace($this->thread->idp[$num] . $id, 'ID:' . $id, $date_id); + $date_id = str_replace($this->thread->idp[$num + 1] . $id, 'ID:' . $id, $date_id); } $ng_type = $this->_ngAbornCheck($num + 1, strip_tags($name), $mail, $date_id, $id, $msg); if ($ng_type == self::ABORN) { diff --git a/lib/ShowThreadI.php b/lib/ShowThreadI.php index 0e505b10b..40670e5f4 100644 --- a/lib/ShowThreadI.php +++ b/lib/ShowThreadI.php @@ -391,7 +391,7 @@ public function transRes($ares, $i, $pattern = null) */ public function transName($name) { - $name = strip_tags($name); + $name = strtr($name, array('' => '', '' => '')); // gbvzXgtȂ番 if (($pos = strpos($name, '')) !== false) { @@ -445,6 +445,9 @@ public function transMsg($msg, $mynum) $msg = preg_replace('/&(?=[^;])/', '&', $msg); } + // TQ[gyA̐lQƂϊ + $msg = P2Util::replaceNumericalSurrogatePair($msg); + // &␳ $msg = preg_replace('/&(?!#?\\w+;)/', '&', $msg); diff --git a/lib/ShowThreadK.php b/lib/ShowThreadK.php index 8ee0d726b..f9da4760a 100644 --- a/lib/ShowThreadK.php +++ b/lib/ShowThreadK.php @@ -439,6 +439,9 @@ public function transMsg($msg, $mynum) $msg = preg_replace('/&(?=[^;])/', '&', $msg); } + // TQ[gyA̐lQƂϊ + $msg = P2Util::replaceNumericalSurrogatePair($msg); + // &␳ $msg = preg_replace('/&(?!#?\\w+;)/', '&', $msg); diff --git a/lib/ShowThreadPc.php b/lib/ShowThreadPc.php index bf66e50e6..11558b4bb 100644 --- a/lib/ShowThreadPc.php +++ b/lib/ShowThreadPc.php @@ -48,7 +48,7 @@ public function __construct($aThread, $matome = false) ); // +live (live.bbs_noname) p - if ($_GET['live']) { + if (array_key_exists('live', $_GET) && $_GET['live']) { if (empty($_conf['live.bbs_noname'])) { require_once P2_LIB_DIR . '/SettingTxt.php'; $st = new SettingTxt($this->thread->host, $this->thread->bbs); @@ -530,6 +530,9 @@ public function transMsg($msg, $mynum) $msg = preg_replace('/&(?=[^;])/', '&', $msg); } + // TQ[gyA̐lQƂϊ + $msg = P2Util::replaceNumericalSurrogatePair($msg); + // &␳ $msg = preg_replace('/&(?!#?\\w+;)/', '&', $msg); @@ -560,7 +563,7 @@ public function transMsg($msg, $mynum) $msg = $this->transLink($msg); // WikipediaL@ւ̎N - if ($_conf['_linkToWikipeida']) { + if ($_conf['link_wikipedia']) { $msg = $this->_wikipediaFilter($msg); } @@ -1376,7 +1379,7 @@ public function plugin_replaceImageUrl($url, $purl, $str) $url = $purl[0]; $replaced = $replaceImageUrlCtl->replaceImageUrl($url); - if (!$replaced[0]) { + if (count($replaced) === 0) { return false; } @@ -1389,6 +1392,7 @@ public function plugin_replaceImageUrl($url, $purl, $str) $serial++; $thumb_id = 'thumbs' . $serial . $this->thumb_id_suffix; $tmp_thumb = './img/ic_load.png'; + $result = ''; $icdb = new ImageCache2_DataObject_Images(); @@ -1429,6 +1433,8 @@ public function plugin_replaceImageUrl($url, $purl, $str) // TlC쐬ĂĂƂ͉摜𒼐ړǂݍ if (file_exists($this->thumbnailer->thumbPath($icdb->size, $icdb->md5, $icdb->mime))) { $thumb_url = $this->thumbnailer->thumbUrl($icdb->size, $icdb->md5, $icdb->mime); + $update = null; + // X^C@\ONŃX^CL^ĂȂƂDBXV if (!is_null($this->img_memo) && strpos($icdb->memo, $this->img_memo) === false){ $update = new ImageCache2_DataObject_Images(); @@ -1568,7 +1574,9 @@ public function getResColorJs() $backlinks = $this->getQuotebacksJson(); $colors = array(); $backlink_colors = join(',', - array_map(create_function('$x', 'return "\'{$x}\'";'), + array_map(function ($x) { + return "\'{$x}\'"; + }, explode(',', $_conf['backlink_coloring_track_colors'])) ); $prefix = $this->_matome ? "t{$this->_matome}" : ''; @@ -1642,8 +1650,11 @@ public function getIdColorJs() } $hissiCount = $_conf['coloredid.rate.hissi.times']; $mark_colors = join(',', - array_map(create_function('$x', 'return "\'{$x}\'";'), - explode(',', $_conf['coloredid.marking.colors'])) + array_map(function ($x) { + return "\'{$x}\'"; + }, + explode(',', $_conf['coloredid.marking.colors']) + ) ); $fontstyle_bold = empty($STYLE['fontstyle_bold']) ? 'normal' : $STYLE['fontstyle_bold']; $fontweight_bold = empty($STYLE['fontweight_bold']) ? 'normal' : $STYLE['fontweight_bold']; diff --git a/lib/StrCtl.php b/lib/StrCtl.php index 57a331a51..35ce7f961 100644 --- a/lib/StrCtl.php +++ b/lib/StrCtl.php @@ -230,7 +230,7 @@ static public function getKigouPattern($no_escape = false) //$kigou['han'] = array('`', '\(', '\)', '\?', '#', '%', '@', '>', '\!', '\*', '\+', '&'); if ($no_escape) { - $kigou['han'] = array_map(create_function('$str', 'return ltrim($str, "\\\\");'), $kigou['han']); + $kigou['han'] = array_map(function($str){return ltrim($str, "\\\\");}, $kigou['han']); /* foreach ($kigou['han'] as $k => $v) { $kigou['han'][$k] = ltrim($v, '\\'); diff --git a/lib/SubjectTxt.php b/lib/SubjectTxt.php index f45edbba1..0337d45cf 100644 --- a/lib/SubjectTxt.php +++ b/lib/SubjectTxt.php @@ -100,7 +100,7 @@ public function downloadSubject() $modified && $req->setHeader("If-Modified-Since", $modified); $response = P2Commun::getHTTPResponse($req); - + $body = ''; $code = $response->getStatus(); if ($code == 302) { // zXg̈ړ]ǐ diff --git a/lib/Thread.php b/lib/Thread.php index 41f030b94..e2f3a36b8 100644 --- a/lib/Thread.php +++ b/lib/Thread.php @@ -202,6 +202,8 @@ public function getTtitleHd() $this->_ttitle_hd = p2h($this->ttitle, false); // [ua]ȂǂfR[h $this->_ttitle_hd = str_replace('</mark>', '', str_replace('<mark>', '', $this->_ttitle_hd)); + // TQ[gyA̐lQƂϊ + $this->_ttitle_hd = P2Util::replaceNumericalSurrogatePair($this->_ttitle_hd); } return $this->_ttitle_hd; } diff --git a/lib/ThreadList.php b/lib/ThreadList.php index ccac14013..fcf7c6ade 100644 --- a/lib/ThreadList.php +++ b/lib/ThreadList.php @@ -128,30 +128,23 @@ public function readList() //$GLOBALS['debug'] && $GLOBALS['profiler']->enterSection('readList()'); + $lines = array(); + switch ($this->spmode) { // [J̗t@C ǂݍ case 'recent': - if ($lines = FileCtl::file_read_lines($_conf['recent_idx'])) { - //P2Util::pushInfoHtml('

͋ۂł

'); - //return false; - } + $lines = FileCtl::file_read_lines($_conf['recent_idx']); break; // [J̏ݗt@C ǂݍ case 'res_hist': - if ($lines = FileCtl::file_read_lines($_conf['res_hist_idx'])) { - //P2Util::pushInfoHtml('

ݗ͋ۂł

'); - //return false; - } + $lines = FileCtl::file_read_lines($_conf['res_hist_idx']); break; //[ĴCɃt@C ǂݍ case 'fav': - if ($lines = FileCtl::file_read_lines($_conf['favlist_idx'])) { - //P2Util::pushInfoHtml('

CɃX͋ۂł

'); - //return false; - } + $lines = FileCtl::file_read_lines($_conf['favlist_idx']); break; // Cɔ‚܂Ƃ߂ēǂݍ @@ -181,7 +174,6 @@ public function readList() } } - $lines = array(); $i = 0; foreach ($favitas as $ita) { @@ -296,6 +288,8 @@ public function readList() $threads[$matches[2]]['key'] = $matches[1]; // XbhID $threads[$matches[2]]['title'] = $matches[3]; // title + // TQ[gyA̐lQƂϊ + $threads[$matches[2]]['title'] = P2Util::replaceNumericalSurrogatePair($threads[$matches[2]]['title']); $threads[$matches[2]]['rc'] = $matches[4]; // rescount $threads[$matches[2]]['param'] = implode('<>',array_fill(0, 5, '')); // lastmodify.txt Ɋ܂܂ȂX\ł悤 @@ -323,7 +317,7 @@ public function readList() //$GLOBALS['debug'] && $GLOBALS['profiler']->leaveSection('readList()'); - return $lines; + return is_array($lines) ? $lines : array(); } // }}} diff --git a/lib/ThreadRead.php b/lib/ThreadRead.php index 0e045addb..defcf2771 100644 --- a/lib/ThreadRead.php +++ b/lib/ThreadRead.php @@ -35,6 +35,7 @@ class ThreadRead extends Thread { public function __construct() { parent::__construct (); $this->getdat_error_msg_ht = ""; + $this->datochi_residuums = array(); } // }}} diff --git a/lib/Thumbnailer/Gd.php b/lib/Thumbnailer/Gd.php index ca526741d..e424b9298 100644 --- a/lib/Thumbnailer/Gd.php +++ b/lib/Thumbnailer/Gd.php @@ -116,8 +116,10 @@ protected function _convert($source, $size) case '.jpg': $src = imagecreatefromjpeg($source); break; case '.png': $src = imagecreatefrompng($source); break; case '.gif': $src = imagecreatefromgif($source); break; + default: + $src = false; } - if (!is_resource($src)) { + if (!$src) { $error = PEAR::raiseError("Failed to load the image. ({$source})"); return $error; } diff --git a/lib/UA.php b/lib/UA.php index e098c8cff..3beea7d7a 100644 --- a/lib/UA.php +++ b/lib/UA.php @@ -364,7 +364,7 @@ static public function getNet_UserAgent_Mobile($ua = null) if (!is_null($ua)) { $nuam = Net_UserAgent_Mobile::factory($ua); } else { - $nuam = Net_UserAgent_Mobile::singleton(); + $nuam = (new Net_UserAgent_Mobile)->singleton(); } if (PEAR::isError($nuam)) { diff --git a/lib/bootstrap.php b/lib/bootstrap.php index 2e44b29b0..e9a67c654 100644 --- a/lib/bootstrap.php +++ b/lib/bootstrap.php @@ -4,6 +4,26 @@ * conf/conf.inc.php p2_init() ǂݍ܂B */ +/** + * PHP 8Ŕp~ꂽ֐Ăяoŷ߂̃pb` + * HTTP_Request2 + * Bug #23839 get_magic_quotes_runtime() is deprecated + * https://pear.php.net/bugs/bug.php?id=23839 + **/ +if (version_compare(PHP_VERSION, '8') > 0) { + function set_magic_quotes_runtime($new_setting) { + throw new Exception('Ƃ̐̂ɔp~܂'); + } + + function get_magic_quotes_runtime() { + return false; + } + + function get_magic_quotes_gpc() { + return false; + } +} + p2_rewrite_vars_for_proxy(); // {{{ [U[ݒ Ǎ @@ -127,9 +147,9 @@ $request_encoding = null; } - // UTF-8ȂShift_JISɕϊ - if ($request_encoding === 'UTF-8') { - mb_convert_variables('SJIS-win', 'UTF-8', $_GET, $_POST); + // Shift_JISłȂΕϊ + if ($request_encoding !== 'SJIS-win') { + mb_convert_variables('SJIS-win', 'UTF-8,CP932', $_GET, $_POST); } // $_REQUEST č\ @@ -156,7 +176,7 @@ $_conf['use_cookies'] = true; $userAgent = isset($_SERVER['HTTP_USER_AGENT']) ? $_SERVER['HTTP_USER_AGENT'] : null; -$mobile = Net_UserAgent_Mobile::singleton($userAgent); +$mobile = (new Net_UserAgent_Mobile)->singleton($userAgent); // iPhone, iPod Touch or Android if (UA::isIPhoneGroup($userAgent)) { diff --git a/lib/color/coloredIdStyle0.inc.php b/lib/color/coloredIdStyle0.inc.php index f2b007ed6..01a90b00f 100644 --- a/lib/color/coloredIdStyle0.inc.php +++ b/lib/color/coloredIdStyle0.inc.php @@ -109,13 +109,11 @@ function coloredIdStyle0($id, $count) } // CSSŐF‚ - $idstr2=preg_split('/:/',$idstr,2); // RID𕪊 - $idstr2[0].=':'; $uline=$STYLE['a_underline_none']==1 ? '' : "text-decoration:underline;"; $bcolor=array(); $LCh=array(); for ($i=0;$i60) {$bcolor[$i].="color:#000;";} else //if ($LCh[$i][0]<40) @@ -137,8 +134,7 @@ function coloredIdStyle0($id, $count) $uline.="text-decoration:blink;"; } - // $colorprint=1; // 1ɂƁAF̕ϊʂ\ - if ($colorprint) { + if ($_conf['coloredid.debug']) { $debug = ''; for ($i=0;$i<1;$i++) { switch ($rgb[$i]['type']) { @@ -167,15 +163,14 @@ function coloredIdStyle0($id, $count) if ($B>255 || $B<0) {$B="{$B}";} $debug.= ",(R={$R},G={$G},B={$B}),{$rgb[$i]['color']}"; } - // $idstr2[1].= join(",",$rgb[0]); return array( - (isset($rgb[1]) ? "{$bcolor[1]}{$border}{$uline}" : ''), - "{$bcolor[0]}{$border}{$uline}", + (isset($rgb[1]) ? "{$bcolor[1]}{$uline}" : ''), + "{$bcolor[0]}{$uline}", $debug); } else { return array( - (isset($rgb[1]) ? "{$bcolor[1]}{$border}{$uline}" : ''), - "{$bcolor[0]}{$border}{$uline}"); + (isset($rgb[1]) ? "{$bcolor[1]}{$uline}" : ''), + "{$bcolor[0]}{$uline}"); } } diff --git a/lib/emoji.inc.php b/lib/emoji.inc.php index 71f8197ea..6551493a6 100644 --- a/lib/emoji.inc.php +++ b/lib/emoji.inc.php @@ -43,7 +43,7 @@ function p2_get_emoji(Net_UserAgent_Mobile_Common $mobile = null) ); if (!$mobile) { - $mobile = Net_UserAgent_Mobile::singleton(); + $mobile = (new Net_UserAgent_Mobile)->singleton(); $cache = true; } diff --git a/lib/expack/ExpackLoader.php b/lib/expack/ExpackLoader.php index b766887ee..65154d392 100644 --- a/lib/expack/ExpackLoader.php +++ b/lib/expack/ExpackLoader.php @@ -218,7 +218,7 @@ static public function initAAS($aShowThread) if ($_conf['iphone']) { $aShowThread->aas_rotate = '↻'; } elseif ($_conf['ktai']) { - $mobile = Net_UserAgent_Mobile::singleton(); + $mobile = (new Net_UserAgent_Mobile)->singleton(); /** * @link http://www.nttdocomo.co.jp/service/imode/make/content/pictograph/ * @link http://www.au.kddi.com/ezfactory/tec/spec/3.html diff --git a/lib/expack/ImageCache2/Console/Command/Setup.php b/lib/expack/ImageCache2/Console/Command/Setup.php index 623e685f6..fa386063f 100644 --- a/lib/expack/ImageCache2/Console/Command/Setup.php +++ b/lib/expack/ImageCache2/Console/Command/Setup.php @@ -2,20 +2,19 @@ namespace ImageCache2\Console\Command; +use ImageCache2_DataObject_Common; +use PDOException; use Symfony\Component\Console\Command\Command as sfConsoleCommand; -use Symfony\Component\Console\Input\InputArgument, - Symfony\Component\Console\Input\InputOption, - Symfony\Component\Console\Input\InputInterface, - Symfony\Component\Console\Output\OutputInterface, - Symfony\Component\Console\Formatter\OutputFormatterStyle; -use PEAR; +use Symfony\Component\Console\Input\InputInterface; +use Symfony\Component\Console\Input\InputOption; +use Symfony\Component\Console\Output\OutputInterface; require_once P2EX_LIB_DIR . '/ImageCache2/bootstrap.php'; class Setup extends sfConsoleCommand { - const PG_TRGM_GIST = 'gist'; - const PG_TRGM_GIN = 'gin'; + const PG_TRGM_GIST = 'gist'; + const PG_TRGM_GIN = 'gin'; // {{{ properties @@ -35,7 +34,7 @@ class Setup extends sfConsoleCommand private $pgTrgm; /** - * @var DB_common + * @var ImageCache2_DataObject_Common */ private $db; @@ -47,7 +46,7 @@ class Setup extends sfConsoleCommand /** * @var string */ - private $serialPriamryKey; + private $serialPrimaryKey; /** * @var string @@ -55,7 +54,7 @@ class Setup extends sfConsoleCommand private $tableExtraDefs; /** - * @var int + * @var string */ private $findTableStatement; @@ -73,12 +72,12 @@ class Setup extends sfConsoleCommand protected function configure() { $this - ->setName('setup') - ->setDescription('Setups ImageCache2 environment') - ->setDefinition(array( - new InputOption('check-only', null, InputOption::VALUE_NONE, 'Don\'t execute anything'), - new InputOption('pg-trgm', null, InputOption::VALUE_REQUIRED, 'Enable gist or gin 3-gram index'), - )); + ->setName('setup') + ->setDescription('Setups ImageCache2 environment') + ->setDefinition(array( + new InputOption('check-only', null, InputOption::VALUE_NONE, 'Don\'t execute anything'), + new InputOption('pg-trgm', null, InputOption::VALUE_REQUIRED, 'Enable gist or gin 3-gram index'), + )); } /** @@ -96,12 +95,14 @@ protected function execute(InputInterface $input, OutputInterface $output) $result = $this->connect(); if ($result) { $this->info('Database: OK'); - $this->serialPriamryKey = $result[0]; + $this->serialPrimaryKey = $result[0]; $this->tableExtraDefs = $result[1]; $this->createTables(); $this->createIndexes(); } } + + return 0; } /** @@ -158,6 +159,27 @@ private function checkConfiguration() return $result; } + private function comment($message) + { + $this->output->writeln("{$message}"); + } + + // {{{ post connect methods + + private function error($message) + { + if ($this->dryRun) { + $this->output->writeln("{$message}"); + } else { + throw new \Exception($message); + } + } + + private function info($message) + { + $this->output->writeln("{$message}"); + } + /** * @return array */ @@ -171,39 +193,28 @@ private function connect() $phptype = strtolower($matches[1]); } - if (!in_array($phptype, array('mysql', 'mysqli', 'pgsql', 'sqlite'))) { - $this->error('Supports only MySQL, PostgreSQL and SQLite2.'); + if (!in_array($phptype, array('mysql', 'pgsql', 'sqlite'))) { + $this->error('Supports only MySQL, PostgreSQL and SQLite.'); return null; } - if (!extension_loaded($phptype)) { + if (!extension_loaded('pdo_' . $phptype)) { $this->error("Extension '{$phptype}' is not loaded."); return null; } - $db = \DB::connect($dsn); - if (PEAR::isError($db)) { - $this->error($db->getMessage()); - return null; - } - - $this->db = $db; + $this->db = new ImageCache2_DataObject_Common(); return $this->postConnect($phptype); } - // {{{ post connect methods - private function postConnect($phptype) { $result = null; switch ($phptype) { case 'mysql': - $result = $this->postConnectMysql(false); - break; - case 'mysqli': - $result = $this->postConnectMysql(true); + $result = $this->postConnectMysql(); break; case 'pgsql': $result = $this->postConnectPgsql(); @@ -216,14 +227,16 @@ private function postConnect($phptype) return $result; } - private function postConnectMysql($mysqli) + // }}} + // {{{ methods to create table + + private function postConnectMysql() { - $serialPriamryKey = 'INTEGER PRIMARY KEY AUTO_INCREMENT'; + $serialPrimaryKey = 'INTEGER PRIMARY KEY AUTO_INCREMENT'; $tableExtraDefs = ' TYPE=MyISAM'; - $db = $this->db; - $result = $db->getRow("SHOW VARIABLES LIKE 'version'", - array(), DB_FETCHMODE_ORDERED); + $db = $this->db->PDO(); + $result = $db->query("SHOW VARIABLES LIKE 'version'")->fetch(); if (is_array($result)) { $version = $result[1]; if (version_compare($version, '4.1.2', 'ge')) { @@ -231,73 +244,34 @@ private function postConnectMysql($mysqli) } } - if (!$this->dryRun) { - if ($mysqli && function_exists('mysqli_set_charset')) { - mysqli_set_charset($db->connection, 'utf8'); - } elseif (!$mysqli && function_exists('mysql_set_charset')) { - mysql_set_charset('utf8', $db->connection); - } else { - $db->query('SET NAMES utf8'); - } - } - - $stmt = $db->prepare('SHOW TABLES LIKE ?'); - if (PEAR::isError($stmt)) { - $this->error($stmt->getMessage()); - return null; - } - $this->findTableStatement = $stmt; - $this->findIndexFormat = 'SHOW INDEX FROM %s WHERE Key_name LIKE ?'; + $this->findTableStatement = "SHOW TABLES LIKE ?"; + $this->findIndexFormat = "SHOW INDEX FROM %s WHERE Key_name LIKE ?"; - return array($serialPriamryKey, $tableExtraDefs); + return array($serialPrimaryKey, $tableExtraDefs); } private function postConnectPgsql() { - $serialPriamryKey = 'SERIAL PRIMARY KEY'; + $serialPrimaryKey = 'SERIAL PRIMARY KEY'; $tableExtraDefs = ''; - $db = $this->db; - - if (!$this->dryRun) { - if (function_exists('pg_set_client_encoding')) { - pg_set_client_encoding($db->connection, 'UNICODE'); - } else { - $db->query("SET CLIENT_ENCODING TO 'UNICODE'"); - } - } - - $stmt = $db->prepare("SELECT relname FROM pg_class WHERE relkind = 'r' AND relname = ?"); - if (PEAR::isError($stmt)) { - $this->error($stmt->getMessage()); - return null; - } - $this->findTableStatement = $stmt; + $this->findTableStatement = "SELECT relname FROM pg_class WHERE relkind = 'r' AND relname = ?"; $this->findIndexFormat = "SELECT relname FROM pg_class WHERE relkind = 'i' AND relname = ?"; - return array($serialPriamryKey, $tableExtraDefs); + return array($serialPrimaryKey, $tableExtraDefs); } private function postConnectSqlite() { - $serialPriamryKey = 'INTEGER PRIMARY KEY'; + $serialPrimaryKey = 'INTEGER PRIMARY KEY'; $tableExtraDefs = ''; - $db = $this->db; - - $stmt = $db->prepare("SELECT name FROM sqlite_master WHERE type = 'table' AND name= ?"); - if (PEAR::isError($stmt)) { - $this->error($stmt->getMessage()); - return null; - } + $this->findTableStatement = "SELECT name FROM sqlite_master WHERE type = 'table' AND name= ?"; $this->findIndexFormat = "SELECT name FROM sqlite_master WHERE type = 'index' AND name= ?"; - return array($serialPriamryKey, $tableExtraDefs); + return array($serialPrimaryKey, $tableExtraDefs); } - // }}} - // {{{ methods to create table - private function createTables() { $imagesTable = $this->config['General']['table']; @@ -325,14 +299,45 @@ private function createTables() private function findTable($tableName) { - $result = $this->db->execute($this->findTableStatement, array($tableName)); - if (PEAR::isError($result)) { - $this->error($result->getMessage()); + $db = $this->db->PDO(); + try { + $stmt = $db->prepare($this->findTableStatement); + $stmt->execute([$tableName]); + return count($stmt->fetchAll()) > 0; + } catch (PDOException $e) { + $this->error($e->getMessage()); return false; } - return $result->numRows() > 0; } + private function createImagesTable($tableName) + { + $quotedTableName = $this->db->quoteIdentifier($tableName); + $sql = <<serialPrimaryKey}, + "uri" VARCHAR (255), + "host" VARCHAR (255), + "name" VARCHAR (255), + "size" INTEGER NOT NULL, + "md5" CHAR (32) NOT NULL, + "width" SMALLINT NOT NULL, + "height" SMALLINT NOT NULL, + "mime" VARCHAR (50) NOT NULL, + "time" INTEGER NOT NULL, + "rank" SMALLINT NOT NULL DEFAULT 0, + "memo" TEXT +){$this->tableExtraDefs}; +SQL; + if ($this->db->db_class === 'mysql') { // MySQL 8.0.2RANK͗\ https://dev.mysql.com/doc/refman/8.0/en/keywords.html + $sql = str_replace('"', '`', $sql); + } + return $this->doCreateTable($tableName, $sql); + } + + // }}} + // {{{ methods to create index + private function doCreateTable($tableName, $sql) { if ($this->dryRun) { @@ -340,9 +345,10 @@ private function doCreateTable($tableName, $sql) return true; } - $result = $this->db->query($sql); - if (PEAR::isError($result)) { - $this->error($result->getMessage()); + try { + $this->db->PDO()->query($sql); + } catch (PDOException $e) { + $this->error($e->getMessage()); return false; } @@ -350,28 +356,6 @@ private function doCreateTable($tableName, $sql) return true; } - private function createImagesTable($tableName) - { - $quotedTableName = $this->db->quoteIdentifier($tableName); - $sql = <<serialPriamryKey}, - uri VARCHAR (255), - host VARCHAR (255), - name VARCHAR (255), - size INTEGER NOT NULL, - md5 CHAR (32) NOT NULL, - width SMALLINT NOT NULL, - height SMALLINT NOT NULL, - mime VARCHAR (50) NOT NULL, - time INTEGER NOT NULL, - rank SMALLINT NOT NULL DEFAULT 0, - memo TEXT -){$this->tableExtraDefs}; -SQL; - return $this->doCreateTable($tableName, $sql); - } - private function createErrorLogTable($tableName) { $quotedTableName = $this->db->quoteIdentifier($tableName); @@ -391,7 +375,7 @@ private function createBlackListTable($tableName) $quotedTableName = $this->db->quoteIdentifier($tableName); $sql = <<serialPriamryKey}, + id {$this->serialPrimaryKey}, uri VARCHAR (255), size INTEGER NOT NULL, md5 CHAR (32) NOT NULL, @@ -401,9 +385,6 @@ private function createBlackListTable($tableName) return $this->doCreateTable($tableName, $sql); } - // }}} - // {{{ methods to create index - private function createIndexes() { $imagesTable = $this->config['General']['table']; @@ -436,7 +417,7 @@ private function createIndexes() } } - if (strcasecmp(get_class($this->db), 'db_pgsql') === 0) { + if ($this->db->db_class === 'pgsql') { $pgTrgm = $this->pgTrgm; if ($pgTrgm === self::PG_TRGM_GIST || $pgTrgm === self::PG_TRGM_GIN) { @@ -445,29 +426,47 @@ private function createIndexes() $this->info("Index '{$indexName}' already exists"); } else { $this->doCreatePgTrgmIndex($pgTrgm, $indexName, - $imagesTable, 'memo'); + $imagesTable, 'memo'); } } } } + // }}} + // {{{ console output methods + + private function findIndex($indexName, $tableName) + { + $db = $this->db->PDO(); + $sql = sprintf($this->findIndexFormat, $this->db->quoteIdentifier($tableName)); + try { + $stmt = $db->prepare($sql); + $stmt->execute([$indexName]); + return count($stmt->fetchAll()) > 0; + } catch (PDOException $e) { + $this->error($e->getMessage()); + return false; + } + } + private function doCreateIndex($indexName, $tableName, array $fieldNames) { $db = $this->db; $callback = array($db, 'quoteIdentifier'); $sql = sprintf('CREATE INDEX %s ON %s (%s);', - $db->quoteIdentifier($indexName), - $db->quoteIdentifier($tableName), - implode(', ', array_map($callback, $fieldNames))); + $db->quoteIdentifier($indexName), + $db->quoteIdentifier($tableName), + implode(', ', array_map($callback, $fieldNames))); if ($this->dryRun) { $this->comment($sql); return true; } - $result = $db->query($sql); - if (PEAR::isError($result)) { - $this->error($result->getMessage()); + try { + $this->db->PDO()->query($sql); + } catch (PDOException $e) { + $this->error($e->getMessage()); return false; } @@ -480,19 +479,20 @@ private function doCreatePgTrgmIndex($indexType, $indexName, $tableName, $fieldN { $db = $this->db; $sql = sprintf('CREATE INDEX %2$s ON %3$s USING %1$s (%4$s %1$s_trgm_ops);', - $indexType, - $db->quoteIdentifier($indexName), - $db->quoteIdentifier($tableName), - $db->quoteIdentifier($fieldName)); + $indexType, + $db->quoteIdentifier($indexName), + $db->quoteIdentifier($tableName), + $db->quoteIdentifier($fieldName)); if ($this->dryRun) { $this->comment($sql); return true; } - $result = $db->query($sql); - if (PEAR::isError($result)) { - $this->error($result->getMessage()); + try { + $this->db->PDO()->query($sql); + } catch (PDOException $e) { + $this->error($e->getMessage()); return false; } @@ -501,40 +501,5 @@ private function doCreatePgTrgmIndex($indexType, $indexName, $tableName, $fieldN return true; } - private function findIndex($indexName, $tableName) - { - $db = $this->db; - $sql = sprintf($this->findIndexFormat, - $db->quoteIdentifier($tableName)); - $result = $db->query($sql, array($indexName)); - if (PEAR::isError($result)) { - $this->error($result->getMessage()); - return false; - } - return $result->numRows() > 0; - } - - // }}} - // {{{ console output methods - - private function info($message) - { - $this->output->writeln("{$message}"); - } - - private function comment($message) - { - $this->output->writeln("{$message}"); - } - - private function error($message) - { - if ($this->dryRun) { - $this->output->writeln("{$message}"); - } else { - throw new \Exception($message); - } - } - // }}} } diff --git a/lib/expack/ImageCache2/DataObject/BlackList.php b/lib/expack/ImageCache2/DataObject/BlackList.php index b7f8c14f4..68f1b0924 100644 --- a/lib/expack/ImageCache2/DataObject/BlackList.php +++ b/lib/expack/ImageCache2/DataObject/BlackList.php @@ -4,6 +4,13 @@ class ImageCache2_DataObject_BlackList extends ImageCache2_DataObject_Common { + public $__table; // e[u + public $id; // INTEGER not_null primary + public $uri; // CHARACTER VARYING + public $size; // INTEGER not_null + public $md5; // CHARACTER not_null + public $type; // SMALLINT not_null + // {{{ constants const NOMORE = 0; @@ -19,20 +26,6 @@ public function __construct() $this->__table = $this->_ini['General']['blacklist_table']; } - // }}} - // {{{ table() - - public function table() - { - return array( - 'id' => DB_DATAOBJECT_INT, - 'uri' => DB_DATAOBJECT_STR, - 'size' => DB_DATAOBJECT_INT, - 'md5' => DB_DATAOBJECT_STR, - 'type' => DB_DATAOBJECT_INT, - ); - } - // }}} // {{{ keys() diff --git a/lib/expack/ImageCache2/DataObject/Common.php b/lib/expack/ImageCache2/DataObject/Common.php index 2322ffe0b..85b796ae8 100644 --- a/lib/expack/ImageCache2/DataObject/Common.php +++ b/lib/expack/ImageCache2/DataObject/Common.php @@ -5,13 +5,11 @@ /** * @abstract */ -class ImageCache2_DataObject_Common extends DB_DataObject +class ImageCache2_DataObject_Common extends PDO_DataObject { // {{{ properties - - protected $_db; protected $_ini; - + public $db_class; // }}} // {{{ constcurtor @@ -20,52 +18,10 @@ class ImageCache2_DataObject_Common extends DB_DataObject */ public function __construct() { - static $set_to_utf8 = false; - + parent::__construct(); // ݒ̓ǂݍ - $ini = ic2_loadconfig(); - $this->_ini = $ini; - if (!$ini['General']['dsn']) { - p2die('DSNݒ肳Ă܂B'); - } - - // f[^x[X֐ڑ - $this->_database_dsn = $ini['General']['dsn']; - $this->_db = $this->getDatabaseConnection(); - if (DB::isError($this->_db)) { - p2die($this->_db->getMessage()); - } - - // NCAg̕Zbg UTF-8 w - if (!$set_to_utf8) { - if (preg_match('/^(\w+)(?:\((\w+)\))?:/', $this->_database_dsn, $m)) { - $driver = strtolower($m[1]); - } else { - $driver = 'unknown'; - } - - switch ($driver) { - case 'mysql': - case 'mysqli': - if ($driver == 'mysql' && function_exists('mysql_set_charset')) { - mysql_set_charset('utf8', $this->_db->connection); - } elseif ($driver == 'mysqli' && function_exists('mysqli_set_charset')) { - mysqli_set_charset($this->_db->connection, 'utf8'); - } else { - $this->_db->query("SET NAMES utf8"); - } - break; - case 'pgsql': - if (function_exists('pg_set_client_encoding')) { - pg_set_client_encoding($this->_db->connection, 'UNICODE'); - } else { - $this->_db->query("SET CLIENT_ENCODING TO 'UNICODE'"); - } - break; - } - - $set_to_utf8 = true; - } + $this->_ini = ic2_loadconfig(); + $this->db_class = explode(':', $this->_ini['General']['dsn'])[0]; } // }}} @@ -76,10 +32,10 @@ public function __construct() */ public function whereAddQuoted($key, $cmp, $value, $logic = 'AND') { - $types = $this->table(); - $col = $this->_db->quoteIdentifier($key); - if ($types[$key] != DB_DATAOBJECT_INT) { - $value = $this->_db->quoteSmart($value); + $types = $this->tableColumns(); + $col = $this->quoteIdentifier($key); + if ($types[$key] != PDO_DataObject::INT) { + $value = $this->PDO()->quote($value); } $cond = sprintf('%s %s %s', $col, $cmp, $value); return $this->whereAdd($cond, $logic); @@ -103,7 +59,7 @@ public function orderByArray(array $sort) continue; } } - $k = $this->_db->quoteIdentifier($k); + $k = $this->quoteIdentifier($k); if (!$d || strtoupper($d) == 'DESC') { $order[] = $k . ' DESC'; } else { diff --git a/lib/expack/ImageCache2/DataObject/Errors.php b/lib/expack/ImageCache2/DataObject/Errors.php index 88c2d0709..65428c74b 100644 --- a/lib/expack/ImageCache2/DataObject/Errors.php +++ b/lib/expack/ImageCache2/DataObject/Errors.php @@ -4,6 +4,12 @@ class ImageCache2_DataObject_Errors extends ImageCache2_DataObject_Common { + public $__table; // e[u + public $uri; // CHARACTER VARYING + public $errcode; // CHARACTER VARYING not_null + public $errmsg; // TEXT + public $occured; // INTEGER not_null + // {{{ constcurtor public function __construct() @@ -12,19 +18,6 @@ public function __construct() $this->__table = $this->_ini['General']['error_table']; } - // }}} - // {{{ table() - - public function table() - { - return array( - 'uri' => DB_DATAOBJECT_STR, - 'errcode' => DB_DATAOBJECT_STR, - 'errmsg' => DB_DATAOBJECT_STR, - 'occured' => DB_DATAOBJECT_INT, - ); - } - // }}} // {{{ keys() @@ -36,35 +29,46 @@ public function keys() // }}} // {{{ ic2_errlog_lotate() + /** + * Ȏerror_log_num𒴂ÂO؂l߂ + */ public function ic2_errlog_lotate() { $ini = ic2_loadconfig(); $error_log_num = $ini['General']['error_log_num']; if ($error_log_num > 0) { - $q_table = $this->_db->quoteIdentifier($this->__table); - $sql1 = 'SELECT COUNT(*) FROM ' . $q_table; - $sql2 = 'SELECT MIN(occured) FROM ' . $q_table; - $sql3 = 'DELETE FROM ' . $q_table . ' WHERE occured = '; - - while (($r1 = $this->_db->getOne($sql1)) > $error_log_num) { - if (DB::isError($r1)) { - return $r1; - } - $r2 = $this->_db->getOne($sql2); - if (DB::isError($r2)) { - return $r2; - } - $r3 = $this->_db->query($sql3 . $r2); - if (DB::isError($r3)) { - return $r3; - } - if ($this->_db->affectedRows() == 0) { - break; - } + $db = $this->PDO(); + $table = $this->__table; + + $getLogRows = function () use ($db, $table) { + $stmt = $db->prepare('SELECT COUNT(*) FROM ' . $this->quoteIdentifier($table)); + $stmt->execute(); + return $stmt->fetch()[0]; + }; + + $getRemovalLogs = function ($limit) use ($db, $table) { + $stmt = $db->prepare('SELECT ' . $this->quoteIdentifier('occured') . ' FROM ' . $this->quoteIdentifier($table) . ' ORDER BY ' . $this->quoteIdentifier('occured') . ' LIMIT :num;'); + $stmt->bindValue(':num', $limit, PDO::PARAM_INT); + $stmt->execute(); + return $stmt->fetchAll(PDO::FETCH_COLUMN); + }; + + $deleteLog = function ($occured) use ($db, $table) { + $stmt = $db->prepare('DELETE FROM ' . $this->quoteIdentifier($table) . ' WHERE ' . $this->quoteIdentifier('occured') . ' = :occured;'); + $stmt->bindValue('occured', $occured, PDO::PARAM_INT); + $stmt->execute(); + return $stmt->rowCount(); + }; + + $num = $getLogRows() - $error_log_num; + if ($num <= 0) { + return; } + foreach ($getRemovalLogs($num) as $occured) { + $deleteLog($occured); + } } - return DB_OK; } // }}} @@ -72,7 +76,7 @@ public function ic2_errlog_lotate() public function ic2_errlog_clean() { - return $this->_db->query('DELETE FROM ' . $this->_db->quoteIdentifier($this->__table)); + return $this->PDO()->query('DELETE FROM ' . $this->quoteIdentifier($this->__table)); } // }}} diff --git a/lib/expack/ImageCache2/DataObject/Images.php b/lib/expack/ImageCache2/DataObject/Images.php index a38470554..8e17e8ca2 100644 --- a/lib/expack/ImageCache2/DataObject/Images.php +++ b/lib/expack/ImageCache2/DataObject/Images.php @@ -4,6 +4,20 @@ class ImageCache2_DataObject_Images extends ImageCache2_DataObject_Common { + public $__table; // e[u + public $id; // INTEGER not_null primary + public $uri; // CHARACTER VARYING + public $host; // CHARACTER VARYING + public $name; // CHARACTER VARYING + public $size; // INTEGER not_null + public $md5; // CHARACTER not_null + public $width; // SMALLINT not_null + public $height; // SMALLINT not_null + public $mime; // CHARACTER VARYING not_null + public $time; // INTEGER not_null + public $rank; // SMALLINT not_null + public $memo; // TEXT + // {{{ constants const OK = 0; @@ -21,30 +35,6 @@ public function __construct() $this->__table = $this->_ini['General']['table']; } - // }}} - // {{{ table() - - public function table() - { - return array( - 'id' => DB_DATAOBJECT_INT, - 'uri' => DB_DATAOBJECT_STR, - 'host' => DB_DATAOBJECT_STR, - 'name' => DB_DATAOBJECT_STR, - 'size' => DB_DATAOBJECT_INT, - 'md5' => DB_DATAOBJECT_STR, - 'width' => DB_DATAOBJECT_INT, - 'height' => DB_DATAOBJECT_INT, - 'mime' => DB_DATAOBJECT_STR, - 'time' => DB_DATAOBJECT_INT, - 'rank' => DB_DATAOBJECT_INT, - 'memo' => DB_DATAOBJECT_STR, - ); - } - - // }}} - // {{{ keys() - public function keys() { return array('uri'); diff --git a/lib/expack/ImageCache2/DatabaseManager.php b/lib/expack/ImageCache2/DatabaseManager.php index eb4b251aa..4bc2f48f7 100644 --- a/lib/expack/ImageCache2/DatabaseManager.php +++ b/lib/expack/ImageCache2/DatabaseManager.php @@ -24,12 +24,7 @@ static public function update($updated) // gUNV̊Jn $ta = new ImageCache2_DataObject_Images(); - $db = $ta->getDatabaseConnection(); - if ($db->phptype == 'pgsql') { - $ta->query('BEGIN'); - } elseif ($db->phptype == 'sqlite') { - $db->query('BEGIN;'); - } + $ta->PDO()->beginTransaction(); // 摜f[^XV foreach ($updated as $id => $data) { @@ -56,11 +51,7 @@ static public function update($updated) } // gUNṼR~bg - if ($db->phptype == 'pgsql') { - $ta->query('COMMIT'); - } elseif ($db->phptype == 'sqlite') { - $db->query('COMMIT;'); - } + $ta->PDO()->commit(); } // }}} @@ -93,12 +84,7 @@ static public function remove($target, $to_blacklist = false) // gUNV̊Jn $ta = new ImageCache2_DataObject_Images(); - $db = $ta->getDatabaseConnection(); - if ($db->phptype == 'pgsql') { - $ta->query('BEGIN'); - } elseif ($db->phptype == 'sqlite') { - $db->query('BEGIN;'); - } + $ta->PDO()->beginTransaction(); // 摜폜 $parent_dir = dirname($ini['General']['cachedir']) . DIRECTORY_SEPARATOR; @@ -159,8 +145,10 @@ static public function remove($target, $to_blacklist = false) while ($remover->fetch()) { // ubNXgɂ if ($to_blacklist) { - $blacklist = clone $_blacklist; + $blacklist = new ImageCache2_DataObject_BlackList(); $blacklist->uri = $remover->uri; + $blacklist->size = $remover->size; + $blacklist->md5 = $remover->md5; $blacklist->insert(); } // e[u疕 @@ -170,11 +158,7 @@ static public function remove($target, $to_blacklist = false) } // gUNṼR~bg - if ($db->phptype == 'pgsql') { - $ta->query('COMMIT'); - } elseif ($db->phptype == 'sqlite') { - $db->query('COMMIT;'); - } + $ta->PDO()->commit(); return $removed_files; } @@ -191,16 +175,15 @@ static public function setRank($target, $rank) return; } if (!is_array($target)) { - if (is_integer($updated) || ctype_digit($updated)) { - $id = (int)$updated; + if (is_integer($target) || ctype_digit($target)) { + $id = (int)$target; if ($id > 0) { - $updated = array($id); + $target = array($id); } else { return; } } else { P2Util::pushInfoHtml('

WARNING! ImageCache2_DatabaseManager::setRank(): sȈ

'); - return $removed_files; } } @@ -224,27 +207,22 @@ static public function addMemo($target, $memo) return; } if (!is_array($target)) { - if (is_integer($updated) || ctype_digit($updated)) { - $id = (int)$updated; + if (is_integer($target) || ctype_digit($target)) { + $id = (int)$target; if ($id > 0) { - $updated = array($id); + $target = array($id); } else { return; } } else { P2Util::pushInfoHtml('

WARNING! ImageCache2_DatabaseManager::addMemo(): sȈ

'); - return $removed_files; + return; } } // gUNV̊Jn $ta = new ImageCache2_DataObject_Images(); - $db = $ta->getDatabaseConnection(); - if ($db->phptype == 'pgsql') { - $ta->query('BEGIN'); - } elseif ($db->phptype == 'sqlite') { - $db->query('BEGIN;'); - } + $db = $ta->PDO()->beginTransaction(); // Ɏw蕶񂪊܂܂ĂȂ΍XV foreach ($target as $id) { @@ -265,11 +243,7 @@ static public function addMemo($target, $memo) } // gUNṼR~bg - if ($db->phptype == 'pgsql') { - $ta->query('COMMIT'); - } elseif ($db->phptype == 'sqlite') { - $db->query('COMMIT;'); - } + $ta->PDO()->commit(); } // }}} diff --git a/lib/expack/ImageCache2/Thumbnailer.php b/lib/expack/ImageCache2/Thumbnailer.php index 2e3ca186c..0d1830732 100644 --- a/lib/expack/ImageCache2/Thumbnailer.php +++ b/lib/expack/ImageCache2/Thumbnailer.php @@ -24,7 +24,7 @@ class ImageCache2_Thumbnailer // }}} // {{{ properties - public $db; // @var object PEAR DB_{phptype}̃CX^X + public $db; // @var object PDO_DataObject̃CX^X public $ini; // @var array ImageCache2̐ݒ public $mode; // @var int TlC̎ public $cachedir; // @var string ImageCache2̃LbVۑfBNg @@ -106,13 +106,6 @@ public function __construct($mode = self::SIZE_DEFAULT, array $dynamic_options = // ݒ $this->ini = ic2_loadconfig(); - // f[^x[Xɐڑ - $icdb = new ImageCache2_DataObject_Images(); - $this->db = $icdb->getDatabaseConnection(); - if (DB::isError($this->db)) { - $this->error($this->db->getMessage()); - } - // TlC[h $dpr = $mode & self::DPR_MASK; $mode = $mode & ~self::DPR_MASK; @@ -583,7 +576,7 @@ public function dirID($size = null, $md5 = null, $mime = null) if ($size && $md5 && $mime) { $icdb = new ImageCache2_DataObject_Images(); $icdb->whereAddQUoted('size', '=', $size); - $icdb->whereAddQuoted('md5', '=', $md5); + $icdb->whereAddQuoted('md5', '=', $md5); $icdb->whereAddQUoted('mime', '=', $mime); $icdb->orderByArray(array('id' => 'ASC')); if ($icdb->find(true)) { @@ -591,11 +584,12 @@ public function dirID($size = null, $md5 = null, $mime = null) return str_pad(ceil($icdb->id / 1000), 5, 0, STR_PAD_LEFT); } } - $sql = 'SELECT MAX(' . $this->db->quoteIdentifier('id') . ') + 1 FROM ' - . $this->db->quoteIdentifier($this->ini['General']['table']) . ';'; - $nextid = $this->db->getOne($sql); - if (DB::isError($nextid) || !$nextid) { - $nextid = 1; + $icdb = new ImageCache2_DataObject_Images(); + $icdb->select(sprintf('COALESCE(MAX(%s), 0) + 1 as id', $icdb->quoteIdentifier('id'))); + if ($icdb->find(true)) { + $nextid = $icdb->id; + } else { + p2die('DBɓo^ꂽ摜̖𐔂܂ł'); } return str_pad(ceil($nextid / 1000), 5, 0, STR_PAD_LEFT); } diff --git a/lib/expack/ImageCache2/bootstrap.php b/lib/expack/ImageCache2/bootstrap.php index 4fe97f088..32a62a961 100644 --- a/lib/expack/ImageCache2/bootstrap.php +++ b/lib/expack/ImageCache2/bootstrap.php @@ -49,15 +49,13 @@ function ic2_loadconfig() $ini[$cat][$name] = $_conf[$key]; } - // DB_DataObject̐ݒ - $_dao_options = &PEAR::getStaticProperty('DB_DataObject', 'options'); - if (!is_array($_dao_options)) { - $_dao_options = array(); - } - $_dao_options['database'] = $ini['General']['dsn']; - $_dao_options['debug'] = false; - $_dao_options['quote_identifiers'] = true; - $_dao_options['db_driver'] = 'DB'; + // PDO_DataObject̐ݒ + PDO_DataObject::config([ + 'database' => $ini['General']['dsn'], + 'quote_identifiers' => true, + 'proxy'=>true, + 'debug'=>false + ]); } return $ini; diff --git a/lib/expack/ic2_getcount.inc.php b/lib/expack/ic2_getcount.inc.php index 37e6307b7..98b5eef93 100644 --- a/lib/expack/ic2_getcount.inc.php +++ b/lib/expack/ic2_getcount.inc.php @@ -15,8 +15,7 @@ function getIC2ImageCount($key, $threshold = null) { $icdb->whereAddQuoted('rank', '>=', $threshold); } - $db = $icdb->getDatabaseConnection(); - $db_class = strtolower(get_class($db)); + $db_class = $icdb->db_class; $keys = explode(' ', $icdb->uniform($key, 'CP932')); foreach ($keys as $k) { $operator = 'LIKE'; @@ -29,7 +28,7 @@ function getIC2ImageCount($key, $threshold = null) { if (strpos($k, '%') !== false || strpos($k, '_') !== false) { // SQLite2LIKEZq̉EӂŃobNXbVɂGXP[v // ESCAPEŃGXP[vw肷邱ƂłȂ̂GLOBZqg - if ($db_class == 'db_sqlite') { + if ($db_class == 'sqlite') { if (strpos($k, '*') !== false || strpos($k, '?') !== false) { throw new InvalidArgumentException('u%܂_vƁu*܂?v݂L[[h͎g܂B'); } else { @@ -47,10 +46,10 @@ function getIC2ImageCount($key, $threshold = null) { $icdb->whereAddQuoted('memo', $operator, $expr); } - $sql = sprintf('SELECT COUNT(*) FROM %s %s', $db->quoteIdentifier($ini['General']['table']), $icdb->_query['condition']); - $all = $db->getOne($sql); - if (DB::isError($all)) { - throw new InvalidArgumentException($all->getMessage()); + try { + $all = $icdb->count('*'); + } catch (PDOException $e) { + p2die($e->getMessage()); } return $all; } diff --git a/lib/expack/ip2host.inc.php b/lib/expack/ip2host.inc.php new file mode 100644 index 000000000..6e4ed67f2 --- /dev/null +++ b/lib/expack/ip2host.inc.php @@ -0,0 +1,171 @@ +hostĂځ[ +echo << + let web_storage = 0; + +IP2HOST; +echo " let scroll_replace = ".$_conf['ip2host.replace.type'].";\n"; +//if ($_conf['ip2host.replace.type'] == 0) { +// echo " let scroll_replace = 0;"; +//} else { +// echo " let scroll_replace = 1;"; +//} +echo << scroll_top && header_top < scroll_top + wh)) { + let res_header_tmp = res_header.clone(); + res_header_tmp.find('b').text(''); + let ip_addr = res_header_tmp.html().match(/.+? \[(\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3})[\]| ]/); + if (ip_addr == null) { + return true; + }; + + replace_html(ip_addr[1], st, res_header); + } + }); + } + + function replace_html(ip_addr, st, res_header) { + let param = {}; + let ip2host_url = 'ip2host.php'; + let host = null; + + // Ôځ[񏈗Kp :1 Ȃ:0\n +IP2HOST; +echo " let aborn = ".$_conf['ip2host.aborn.enabled'].";\n"; +echo << ip_cache_size) { + st.clear(); + } else { + host = st.getItem(ip_addr); + } + } else { + param['cache_size'] = ip_cache_size; + } + if (host === null) { + param['action'] = 'GetHost'; + } else { + param['action'] = 'AbornHost'; + } + param['ip'] = ip_addr; + param['aborn'] = aborn; + param['host'] = host;\n +IP2HOST; + echo " param['bbs'] = '".$bbs."';\n"; + echo " param['title'] = '".$ttitle_en."';\n"; +echo <<\n +IP2HOST; + +// }}} + +/* + * Local Variables: + * mode: php + * coding: cp932 + * tab-width: 4 + * c-basic-offset: 4 + * indent-tabs-mode: nil + * End: + */ +// vim: set syn=php fenc=cp932 ai et ts=4 sw=4 sts=4 fdm=marker: diff --git a/lib/expack/tgrep/view.inc.php b/lib/expack/tgrep/view.inc.php index 1a3081950..5d8fda620 100644 --- a/lib/expack/tgrep/view.inc.php +++ b/lib/expack/tgrep/view.inc.php @@ -67,10 +67,10 @@ function moveSubject(href, serachWord, query) {
/> - - - - + + + +
diff --git a/lib/expack/tgrep/view_x.inc.php b/lib/expack/tgrep/view_x.inc.php index 800642748..edf6cb57f 100644 --- a/lib/expack/tgrep/view_x.inc.php +++ b/lib/expack/tgrep/view_x.inc.php @@ -67,13 +67,13 @@ } usort($boards, - create_function('$a, $b', - 'if (($c = $b->hits - $a->hits) != 0) { - return $c; - } - return strcasecmp($a->name, $b->name);' - ) - ); + function ($a, $b) { + if (($c = $b->hits - $a->hits) != 0) { + return $c; + } + return strcasecmp($a->name, $b->name); + } + ); foreach ($boards as $board) { printf('
  • %s' . diff --git a/lib/fontconfig.inc.php b/lib/fontconfig.inc.php index c9f56dd75..5892472ab 100644 --- a/lib/fontconfig.inc.php +++ b/lib/fontconfig.inc.php @@ -50,6 +50,8 @@ function p2_fontconfig_apply_custom() global $STYLE, $_conf, $skin_en, $skin_uniq; if ($_conf['expack.skin.enabled']) { + $current_fontconfig = null; + if (isset($_conf['expack.am.fontfamily'])) { $_conf['expack.am.fontfamily.orig'] = $_conf['expack.am.fontfamily']; } else { diff --git a/lib/live/default_view.inc.php b/lib/live/default_view.inc.php index b102be925..35dda5770 100755 --- a/lib/live/default_view.inc.php +++ b/lib/live/default_view.inc.php @@ -27,7 +27,7 @@ } // X{^ -if ($_GET['live']) { +if (array_key_exists('live', $_GET) && $_GET['live']) { $tores .= "$res_button"; } diff --git a/lib/live/live_header.inc.php b/lib/live/live_header.inc.php index 7da5bcf21..9c5545e32 100755 --- a/lib/live/live_header.inc.php +++ b/lib/live/live_header.inc.php @@ -20,7 +20,7 @@ } //} -if ($_GET['live']) { +if (array_key_exists('live', $_GET) && $_GET['live']) { echo <<
    -2ch{
    http://menu.2ch.net/bbsmenu.html
    +2ch{ https://menu.5ch.net/bbsmenu.html
    2ch + OBBS http://azlucky.s25.xrea.com/2chboard/bbsmenu.html', P2_EDIT_CONF_USER_LONGTEXT), ); @@ -327,6 +327,7 @@ array('backlink_coloring_track', '{_uNbNƒFăXǐ'), array('backlink_coloring_track_colors', '{_uNbNăXǐՎ̐FXg(J}؂)'), array('coloredid.enable', 'IDɐFt'), + array('coloredid.debug', 'F̕ϊʂ\'), array('coloredid.rate.type', 'ʕ\IDɒFĂ'), array('coloredid.rate.times', 'ȍꍇ̐(nȏ)'), array('coloredid.rate.hissi.times', 'K(IDuN)̏o(0ŖBIE/SafariblinkΉ)'), @@ -357,6 +358,7 @@ array('ngaborn_chain_all', '\͈͊ÕXANG/ځ[/nCCg̑Ώۂɂ
    (y邽߁AftHgł͂Ȃ)'), array('ngaborn_daylimit', '̊ԁANG/ځ[/nCCgHITȂ΁Ao^[hIɊO ()'), array('ngaborn_purge_aborn', 'ځ[񃌃X͕sŽdivubN`悵Ȃ'), + array('ngaborn_exclude_one', '>>1 ځ[̑ΏۊOɂ'), ); printEditConfGroupHtml($groupname, $conflist, $flags); } @@ -606,6 +608,7 @@ array('expack.tgrep.quicksearch', 'ꔭ'), array('expack.tgrep.recent_num', 'L^鐔iL^Ȃ:0j'), array('expack.tgrep.recent2_num', 'T[`{bNXɌL^鐔ASafaripiL^Ȃ:0j'), + array('expack.tgrep.engine', 'Ɏgp錟GW') ); printEditConfGroupHtml($groupname, $conflist, $flags); } @@ -865,6 +868,25 @@ printEditConfGroupHtml($groupname, $conflist, $flags); } +// }}} +// {{{ expack - ip2host + +$groupname = 'ip2host'; +$groups[] = $groupname; +$flags = getGroupShowFlags($groupname); +if ($flags & P2_EDIT_CONF_USER_SKIPPED) { + $keep_old = true; +} else { + $conflist = array( + array('ip2host.enabled', 'ip2host𗘗p'), + array('ip2host.replace.type', '̃^C~O'), + array('ip2host.cache.type', 'LbV@'), + array('ip2host.cache.size', 'LbV̏'), + array('ip2host.aborn.enabled', 't̂ځ[񏈗'), + ); + printEditConfGroupHtml($groupname, $conflist, $flags); +} + // }}} // }}} diff --git a/rep2/edit_user_font.php b/rep2/edit_user_font.php index 329fceaa7..215c3a118 100644 --- a/rep2/edit_user_font.php +++ b/rep2/edit_user_font.php @@ -11,7 +11,7 @@ require_once P2_LIB_DIR . '/fontconfig.inc.php'; -$_flexy_options = &PEAR5::getStaticProperty('HTML_Template_Flexy', 'options'); +$_flexy_options = &PEAR::getStaticProperty('HTML_Template_Flexy', 'options'); $_flexy_options = array( 'templateDir' => './skin', 'compileDir' => $_conf['compile_dir'] . DIRECTORY_SEPARATOR . 'fontconfig', diff --git a/rep2/editpref.php b/rep2/editpref.php index e5449971e..aaad29039 100644 --- a/rep2/editpref.php +++ b/rep2/editpref.php @@ -100,19 +100,19 @@ } elseif (isset($_POST['delete']) && isset($_POST['submit'])) { // ̍폜 switch ($_POST['delete']) { - case cookie: + case 'cookie': // cookie - $delflag = CookieDataStore::clear() === flase ? false : true; + $delflag = CookieDataStore::clear() === false ? false : true; break; - case matome: + case 'matome': // V܂Ƃߓǂ - $delflag = MatomeCacheList::trim(0) === flase ? false : true; + $delflag = MatomeCacheList::trim(0) === false ? false : true; break; - case recent: + case 'recent': // ŋߓǂ񂾃X $delflag = deleteFile($_conf['recent_idx']); break; - case reshist: + case 'reshist': // if(deleteFile($_conf['res_hist_idx']) && deleteFile($_conf['res_hist_dat']) && @@ -120,13 +120,13 @@ $delflag = true; } break; - case autong: + case 'autong': if(deleteFile($_conf['pref_dir'] . '/p2_aborn_auto.txt') && deleteFile($_conf['pref_dir'] . '/p2_ng_auto.txt') ) { $delflag = true; } break; - case boardlist: + case 'boardlist': $cachefile = P2Util::cacheFileForDL($_conf['brdfile_online']); if(deleteFile($_conf['cache_dir'] . '/host_bbs_map.txt') && deleteFile($cachefile) && diff --git a/rep2/ff5ch.php b/rep2/ff5ch.php new file mode 100644 index 000000000..efb37939a --- /dev/null +++ b/rep2/ff5ch.php @@ -0,0 +1,77 @@ +setHeader('Referer', $referer); + + $response = P2Commun::getHTTPResponse($req); + + $code = $response->getStatus(); + if ($code != 200) { + p2die("HTTP Error - {$code}"); + } + + $body = $response->getBody(); + } catch (Exception $e) { + p2die($e->getMessage()); + } + + // FIXME ̍\ωɑς悤ȐK\֏C + $re = '/(?P.+)<\/a> \((?\d+)\)<\/span>\s*(?.+)<\/a>\s*(?.+)<\/span>\s*<\/li>/m'; + + preg_match_all($re, $body, $threads, PREG_SET_ORDER); + + $result = array(); + $boards = array(); + $hits = array(); + $names = array(); + + $now = strtotime($response->getHeader('Date')); + + foreach ($threads as $n => $t) { + $host = parse_url($t['thread_url'], PHP_URL_HOST); + $thread_key = array_slice(explode('/', $t['thread_url']), -2, 1)[0]; + $bbs = array_slice(explode('/', $t['board_url']), -2, 1)[0]; + $created_at = strtotime($t['created_at'] . ' +0900'); + $dayres = intval($t['thread_res_count']) / ($now - $created_at) * 86400; + + $result['threads'][$n] = new stdClass; + $result['threads'][$n]->title = $t['thread_name']; + $result['threads'][$n]->host = $host; + $result['threads'][$n]->bbs = $bbs; + $result['threads'][$n]->tkey = $thread_key; + $result['threads'][$n]->resnum = $t['thread_res_count']; + $result['threads'][$n]->ita = $t['board_name']; + $result['threads'][$n]->dayres = $dayres; + + $bkey = md5($host . '-' . $bbs . '-' . $t['board_name']); + if (!isset($boards[$bkey])) { + $board = new stdClass; + $board->host = $host; + $board->bbs = $bbs; + $names[$bkey] = $board->name = $t['board_name']; + $hits[$bkey] = $board->hits = 1; + $boards[$bkey] = $board; + } else { + $hits[$bkey] = ++$boards[$bkey]->hits; + $names[$bkey] = $boards[$bkey]->name; + } + } + + $result['modified'] = $response->getHeader('Date'); + $result['profile']['regex'] = '/(' . $q . ')/i'; + $result['profile']['hits'] = count($threads); + array_multisort($hits, SORT_DESC, $names, $boards); + $result['profile']['boards'] = $boards; + + return $result; +} diff --git a/rep2/find5ch.php b/rep2/find5ch.php new file mode 100644 index 000000000..8ea6e5413 --- /dev/null +++ b/rep2/find5ch.php @@ -0,0 +1,76 @@ +setHeader('Referer', $referer); + + $response = P2Commun::getHTTPResponse($req); + + $code = $response->getStatus(); + if ($code != 200) { + p2die("HTTP Error - {$code}"); + } + + $body = $response->getBody(); + } catch (Exception $e) { + p2die($e->getMessage()); + } + + mb_convert_variables('SHIFT-JIS', 'UTF-8', $body); + + // FIXME ̍\ωɑς悤ȐK\֏C + $re = '~
    \n?\n?\n?\n?
    \n?\n?
    (?.+)
    \n?
    (?P.+)/
    \n?
    ~m'; + preg_match_all($re, $body, $threads, PREG_SET_ORDER); + + mb_convert_variables('UTF-8', 'SHIFT-JIS', $threads); + + $result = array(); + $boards = array(); + $hits = array(); + $names = array(); + + foreach ($threads as $n => $t) { + $host = parse_url($t['thread_url'], PHP_URL_HOST); + $thread_key = array_slice(explode('/', $t['thread_url']), -1, 1)[0]; + $bbs = array_slice(explode('/', $t['board_url']), -2, 1)[0]; + + $result['threads'][$n] = new stdClass; + $result['threads'][$n]->title = $t['thread_name']; + $result['threads'][$n]->host = $host; + $result['threads'][$n]->bbs = $bbs; + $result['threads'][$n]->tkey = $thread_key; + $result['threads'][$n]->resnum = $t['thread_res_count']; + $result['threads'][$n]->ita = $t['board_name']; + $result['threads'][$n]->dayres = $t['thread_dayres']; + + $bkey = md5($host . '-' . $bbs . '-' . $t['board_name']); + if (!isset($boards[$bkey])) { + $board = new stdClass; + $board->host = $host; + $board->bbs = $bbs; + $names[$bkey] = $board->name = $t['board_name']; + $hits[$bkey] = $board->hits = 1; + $boards[$bkey] = $board; + } else { + $hits[$bkey] = ++$boards[$bkey]->hits; + $names[$bkey] = $boards[$bkey]->name; + } + } + + $result['modified'] = $response->getHeader('Date'); + $result['profile']['regex'] = '/(' . $q . ')/i'; + $result['profile']['hits'] = count($threads); + array_multisort($hits, SORT_DESC, $names, $boards); + $result['profile']['boards'] = $boards; + + return $result; +} diff --git a/rep2/ic/.gitignore b/rep2/ic/.gitignore deleted file mode 100644 index 72e8ffc0d..000000000 --- a/rep2/ic/.gitignore +++ /dev/null @@ -1 +0,0 @@ -* diff --git a/rep2/ic2.php b/rep2/ic2.php index c950ee9a1..69e297e49 100644 --- a/rep2/ic2.php +++ b/rep2/ic2.php @@ -339,7 +339,7 @@ public function __destruct() } } if ($send_referer) { - $referer = $uri . '.html'; + $referer = $uri; } } @@ -509,7 +509,8 @@ public function __destruct() $record->insert(); } -$is_anigif = false; $is_gif_caution == false; +$is_anigif = false; +$is_gif_caution = false; if (($ini['Thumbdeco']['anigif'] || $ini['Thumbdeco']['gifcaution']) && $params['mime'] == 'image/gif') { $is_anigif = check_anigif($newfile); if ($ini['Thumbdeco']['gifcaution']) { @@ -722,7 +723,7 @@ function ic2_display($url, $params) 'q' => $ini["Thumb{$thumb}"]['quality'], 'r' => '0', ); - $mobile = Net_UserAgent_Mobile::singleton(); + $mobile = (new Net_UserAgent_Mobile)->singleton(); $qa = 'size=3 maxlength=3'; if ($mobile->isDoCoMo()) { $qa .= ' istyle=4'; @@ -752,7 +753,7 @@ function ic2_display($url, $params) $qf->addElement('submit', 'o'); // FlexyQurickForm_Rendereȑ - $_flexy_options = &PEAR5::getStaticProperty('HTML_Template_Flexy', 'options'); + $_flexy_options = &PEAR::getStaticProperty('HTML_Template_Flexy', 'options'); $_flexy_options = array( 'locale' => 'ja', 'charset' => 'Shift_JIS', diff --git a/rep2/ic2_getter.php b/rep2/ic2_getter.php index d77364374..c0b1b620c 100644 --- a/rep2/ic2_getter.php +++ b/rep2/ic2_getter.php @@ -136,7 +136,7 @@ $qfe['close'] = $qf->addElement('button', 'close', null, $_attr_close); // Flexy -$_flexy_options = &PEAR5::getStaticProperty('HTML_Template_Flexy', 'options'); +$_flexy_options = &PEAR::getStaticProperty('HTML_Template_Flexy', 'options'); $_flexy_options = array( 'locale' => 'ja', 'charset' => 'Shift_JIS', diff --git a/rep2/ic2_manager.php b/rep2/ic2_manager.php index 62b0bbbaa..727310b2f 100644 --- a/rep2/ic2_manager.php +++ b/rep2/ic2_manager.php @@ -29,14 +29,8 @@ $viewer_cache_exists = false; } -// f[^x[Xɐڑ -$db = DB::connect($ini['General']['dsn']); -if (DB::isError($db)) { - p2die($db->getMessage()); -} - // ev[gGW -$_flexy_options = &PEAR5::getStaticProperty('HTML_Template_Flexy', 'options'); +$_flexy_options = &PEAR::getStaticProperty('HTML_Template_Flexy', 'options'); $_flexy_options = array( 'locale' => 'ja', 'charset' => 'Shift_JIS', @@ -50,6 +44,9 @@ // }}} // {{{ f[^x[XEt@C폜 +$icdc = new ImageCache2_DataObject_Common(); +$db = $icdc->PDO(); + if (isset($_POST['action'])) { switch ($_POST['action']) { @@ -58,7 +55,7 @@ case 'dropAborn': if ($_POST['action'] == 'dropZero') { // N=0 ̉摜폜 - $where = $db->quoteIdentifier('rank') . ' = 0'; + $where = $icdc->quoteIdentifier('rank') . ' = 0'; if (isset($_POST['dropZeroLimit'])) { // 擾Ԃ switch ($_POST['dropZeroSelectTime']) { @@ -72,7 +69,7 @@ if ($expires !== null) { $operator = ($_POST['dropZeroSelectType'] == 'within') ? '>' : '<'; $where .= sprintf(' AND %s %s %d', - $db->quoteIdentifier('time'), + $icdc->quoteIdentifier('time'), $operator, time() - $expires); } @@ -81,22 +78,22 @@ $to_blacklist = !empty($_POST['dropZeroToBlackList']); } else { // ځ[摜폜AubNXgɓo^ - $where = $db->quoteIdentifier('rank') . ' < 0'; + $where = $icdc->quoteIdentifier('rank') . ' < 0'; $to_blacklist = true; } - $sql = sprintf('SELECT %s FROM %s WHERE %s;', - $db->quoteIdentifier('id'), - $db->quoteIdentifier($ini['General']['table']), + $sql = sprintf('SELECT %s FROM %s WHERE %s', + $icdc->quoteIdentifier('id'), + $icdc->quoteIdentifier($ini['General']['table']), $where); - $result = $db->getAll($sql, null, DB_FETCHMODE_ORDERED | DB_FETCHMODE_FLIPPED); - if (DB::isError($result)) { - P2Util::pushInfoHtml($result->getMessage()); - break; + try { + $result = $db->query($sql)->fetchAll(PDO::FETCH_COLUMN); + } catch (PDOException $e) { + P2Util::pushInfoHtml($e->getMessage()); } + if ($result) { - $target = $result[0]; - $removed_files = ImageCache2_DatabaseManager::remove($target, $to_blacklist); + $removed_files = ImageCache2_DatabaseManager::remove($result, $to_blacklist); } else { $removed_files = array(); } @@ -147,33 +144,33 @@ // G[O case 'clearErrorLog': - $result = $db->query('DELETE FROM ' . $db->quoteIdentifier($ini['General']['error_table'])); - if (DB::isError($result)) { - P2Util::pushInfoHtml($result->getMessage()); - } else { + try { + $result = $db->query('DELETE FROM ' . $icdc->quoteIdentifier($ini['General']['error_table'])); P2Util::pushInfoHtml('

    G[O܂B

    '); + } catch (PDOException $e) { + P2Util::pushInfoHtml($e->getMessage()); } break; // ubNXg case 'clearBlackList': - $result = $db->query('DELETE FROM ' . $db->quoteIdentifier($ini['General']['blacklist_table'])); - if (DB::isError($result)) { - P2Util::pushInfoHtml($result->getMessage()); - } else { + try { + $result = $db->query('DELETE FROM ' . $icdc->quoteIdentifier($ini['General']['blacklist_table'])); P2Util::pushInfoHtml('

    ubNXg܂B

    '); + } catch (PDOException $e) { + P2Util::pushInfoHtml($e->getMessage()); } break; // f[^x[XœK case 'optimizeDB': // SQLite2 ̉摜LbVf[^x[XVACUUM - if ($db->dsn['phptype'] == 'sqlite') { - $result = $db->query('VACUUM'); - if (DB::isError($result)) { - P2Util::pushInfoHtml($result->getMessage()); - } else { + if ($icdc->db_class === 'sqlite') { + try { + $result = $db->query('VACUUM'); P2Util::pushInfoHtml('

    摜f[^x[XœK܂B

    '); + } catch (PDOException $e) { + P2Util::pushInfoHtml($e->getMessage()); } } @@ -209,7 +206,7 @@ $flexy->setData('doctype', $_conf['doctype']); $flexy->setData('extra_headers', $_conf['extra_headers_ht']); $flexy->setData('extra_headers_x', $_conf['extra_headers_xht']); -if ($db->dsn['phptype'] == 'sqlite' || $viewer_cache_exists) { +if ($icdc->db_class === 'sqlite' || $viewer_cache_exists) { $flexy->setData('enable_optimize_db', true); } else { $flexy->setData('enable_optimize_db', false); diff --git a/rep2/ic2_setter.php b/rep2/ic2_setter.php index e07d3baa8..512ab7912 100644 --- a/rep2/ic2_setter.php +++ b/rep2/ic2_setter.php @@ -121,7 +121,7 @@ // }}} // {{{ output -$_flexy_options = &PEAR5::getStaticProperty('HTML_Template_Flexy', 'options'); +$_flexy_options = &PEAR::getStaticProperty('HTML_Template_Flexy', 'options'); $_flexy_options = array( 'locale' => 'ja', 'charset' => 'Shift_JIS', diff --git a/rep2/ic2_viewtable.php b/rep2/ic2_viewtable.php index b19d251b3..ec5e33ce5 100644 --- a/rep2/ic2_viewtable.php +++ b/rep2/ic2_viewtable.php @@ -47,16 +47,11 @@ p2die('ImageCache2 - sȃNG'); } -$db = $table->getDatabaseConnection(); if (isset($_POST['clean'])) { - $sql = 'DELETE FROM ' . $db->quoteIdentifier($table->__table); - $result = $db->query($sql); - if (DB::isError($result)) { - p2die($result->getMessage()); - } + $result = (new ImageCache2_DataObject_Errors())->ic2_errlog_clean(); } elseif (isset($_POST['delete']) && isset($_POST['target']) && is_array($_POST['target'])) { foreach ($_POST['target'] as $target) { - $delete = clone $table; + $delete = new ImageCache2_DataObject_Errors(); $delete->uri = $target; $delete->delete(); } @@ -65,7 +60,7 @@ // }}} // {{{ o -$_flexy_options = &PEAR5::getStaticProperty('HTML_Template_Flexy', 'options'); +$_flexy_options = &PEAR::getStaticProperty('HTML_Template_Flexy', 'options'); $_flexy_options = array( 'locale' => 'ja', 'charset' => 'Shift_JIS', diff --git a/rep2/info_sp.php b/rep2/info_sp.php index e34e2dc2b..78e40487d 100644 --- a/rep2/info_sp.php +++ b/rep2/info_sp.php @@ -109,7 +109,9 @@ if (file_exists($path) && ($data = FileCtl::file_read_lines($path))) { $data = array_map('trim', $data); - $data = array_filter($data, create_function('$v', 'return ($v !== "");')); + $data = array_filter($data, function ($v) { + return ($v !== ""); + }); array_unshift($data, $aborn_str); $data = array_unique($data); } else { diff --git a/rep2/ip2host.php b/rep2/ip2host.php new file mode 100644 index 000000000..893d0f738 --- /dev/null +++ b/rep2/ip2host.php @@ -0,0 +1,172 @@ + 0) { + if (!empty($ip_cache) && array_key_exists($ip, $ip_cache)) { + //echo 'cache '; + $host = $ip_cache[$ip]; + } else { + // LbV̏𒴂Â̂10 + while (count($ip_cache) > $ip_cache_size) { + for ($i = 0; $i < 10; $i++) { + array_shift($ip_cache); + } + } + // LbV̏𒴂Sꍇ͂ + //if (count($ip_cache) > $ip_cache_size) { + // $ip_cache = array(); + //} + + $host = gethostbyaddr($ip); + $ip_cache[$ip] = $host; + + if ($fp_lock = lock($lock_file)) { + if ($fp = fopen($cache_file, "w")) { + foreach ($ip_cache as $key => $value) { + fwrite($fp, $key.','.$value."\n"); + } + fclose($fp); + } + fclose($fp_lock); + } + } + } else { + $host = gethostbyaddr($ip); + } +} else if ($action === 'AbornHost') { + if (!$host = filter_input(INPUT_GET, 'host')) { + return; + } +} else { + return; +} +if (!$bbs = filter_input(INPUT_GET, 'bbs')) { + return; +} + +if (!$title = filter_input(INPUT_GET, 'title')) { + return; +} + +if (!$aborn = filter_input(INPUT_GET, 'aborn')) { + $aborn = 0; +} + +if ($aborn && ngAbornCheck('aborn_name', $host, $bbs, UrlSafeBase64::decode($title)) !== false) { + if ($action === 'GetHost') { + echo $host.','; + } + echo 'aborn'; +} else { + echo $host; +} + +// LbVt@C̔rbNp +function lock($lock_file) +{ + if (!$fp = fopen($lock_file, "a")) return false; + + for ($i = 0; $i < 60; $i++) { + if (flock($fp, LOCK_EX | LOCK_NB)) { + return $fp; + } else { + usleep(500000); // 0.5b * 60x + } + } + fclose($fp); + + return false; +} + +// {{{ ngAbornCheck() + +/** + * NGځ[`FbN + * lib/ShowThread.phpĂځ[񔻒肾 + */ +function ngAbornCheck($code, $resfield, $bbs, $title, $ic = false) +{ + $ngaborns = NgAbornCtl::loadNgAborns(); + + //$GLOBALS['debug'] && $GLOBALS['profiler']->enterSection('ngAbornCheck()'); + + if (isset($ngaborns[$code]['data']) && is_array($ngaborns[$code]['data'])) { + foreach ($ngaborns[$code]['data'] as $k => $v) { + // ƒ`FbN + if (isset($v['bbs']) && in_array($bbs, $v['bbs']) == false) { + continue; + } + + // ^Cg`FbN + if (isset($v['title']) && stripos($title, $v['title']) === false) { + continue; + } + + // [h`FbN + // K\ + if ($v['regex']) { + $re_method = $v['regex']; + /*if ($re_method($v['word'], $resfield, $matches)) { + $this->ngAbornUpdate($code, $k); + //$GLOBALS['debug'] && $GLOBALS['profiler']->leaveSection('ngAbornCheck()'); + return p2h($matches[0]); + }*/ + if ($re_method($v['word'], $resfield)) { + //$GLOBALS['debug'] && $GLOBALS['profiler']->leaveSection('ngAbornCheck()'); + return $v['cond']; + } + // 啶𖳎 + } elseif ($ic || $v['ignorecase']) { + if (stripos($resfield, $v['word']) !== false) { + //$GLOBALS['debug'] && $GLOBALS['profiler']->leaveSection('ngAbornCheck()'); + return $v['cond']; + } + // Pɕ񂪊܂܂邩ǂ`FbN + } else { + if (strpos($resfield, $v['word']) !== false) { + //$GLOBALS['debug'] && $GLOBALS['profiler']->leaveSection('ngAbornCheck()'); + return $v['cond']; + } + } + } + } + + //$GLOBALS['debug'] && $GLOBALS['profiler']->leaveSection('ngAbornCheck()'); + return false; +} + +// }}} + +?> diff --git a/rep2/iv2.php b/rep2/iv2.php index 934ff30b3..bfdf4d333 100644 --- a/rep2/iv2.php +++ b/rep2/iv2.php @@ -176,8 +176,8 @@ // DB_DataObjectpDAO $icdb = new ImageCache2_DataObject_Images(); -$db = $icdb->getDatabaseConnection(); -$db_class = strtolower(get_class($db)); +$db = $icdb->PDO(); +$db_class = $icdb->db_class; if ($ini['Viewer']['cache']) { $kvs = P2KeyValueStore::getStore($_conf['iv2_cache_db_path'], @@ -203,11 +203,8 @@ $kvs->optimize(); // SQLiteȂVACUUMs - if ($db_class == 'db_sqlite') { + if ($db_class == 'sqlite') { $result = $db->query('VACUUM'); - if (DB::isError($result)) { - p2die($result->getMessage()); - } } } @@ -282,7 +279,7 @@ $qf->addRule('thumbtype', 'invalid thumbtype.', 'arrayKeyExists', $_thumbtype); // Flexy -$_flexy_options = &PEAR5::getStaticProperty('HTML_Template_Flexy', 'options'); +$_flexy_options = &PEAR::getStaticProperty('HTML_Template_Flexy', 'options'); $_flexy_options = array( 'locale' => 'ja', 'charset' => 'Shift_JIS', @@ -436,7 +433,7 @@ if (strpos($k, '%') !== false || strpos($k, '_') !== false) { // SQLite2LIKEZq̉EӂŃobNXbVɂGXP[v // ESCAPEŃGXP[vw肷邱ƂłȂ̂GLOBZqg - if ($db_class == 'db_sqlite') { + if ($db_class == 'sqlite') { if (strpos($k, '*') !== false || strpos($k, '?') !== false) { p2die('ImageCache2 Warning', 'u%܂_vƁu*܂?v݂L[[h͎g܂B'); } else { @@ -468,7 +465,7 @@ $_find_duplicated = 0; // Ip[^Ao^R[hȏ̉摜݂̂𒊏o if ($_find_unique || $_find_duplicated > 1) { $subq = 'SELECT ' . (($sort == 'ASC') ? 'MIN' : 'MAX') . '(id) FROM '; - $subq .= $db->quoteIdentifier($ini['General']['table']); + $subq .= $icdb->quoteIdentifier($ini['General']['table']); if (isset($keywords)) { // TuNGŃtB^ÔŐeNGWHEREpNĂăZbg $subq .= $icdb->_query['condition']; @@ -578,11 +575,7 @@ //$db->setFetchMode(DB_FETCHMODE_ORDERED); //$all = (int)$icdb->count('*', true); //$db->setFetchMode(DB_FETCHMODE_ASSOC); -$sql = sprintf('SELECT COUNT(*) FROM %s %s', $db->quoteIdentifier($ini['General']['table']), $icdb->_query['condition']); -$all = (int)$db->getOne($sql); -if (DB::isError($all)) { - p2die($all->getMessage()); -} +$all = $icdb->count('*'); // }b`郌R[hȂG[\AR[hΕ\pIuWFNgɒl if ($all === 0) { @@ -759,7 +752,7 @@ $orderBy = '(width * height) ' . $sort; } } elseif ($order == 'date_uri' || $order == 'date_uri2') { - if ($db_class == 'db_sqlite') { + if ($db_class == 'sqlite') { /* function iv2_sqlite_unix2date($ts) { @@ -771,16 +764,16 @@ function iv2_sqlite_unix2date($ts) $time2date = 'php(\'date\', \'Ymd\', "time")'; } else { // 32400 = 9*60*60 (␳) - $time2date = sprintf('floor((%s + 32400) / 86400)', $db->quoteIdentifier('time')); + $time2date = sprintf('floor((%s + 32400) / 86400)', $icdb->quoteIdentifier('time')); } - $orderBy = sprintf('%s %s, %s ', $time2date, $sort, $db->quoteIdentifier('uri')); + $orderBy = sprintf('%s %s, %s ', $time2date, $sort, $icdb->quoteIdentifier('uri')); if ($order == 'date_uri') { $orderBy .= $sort; } else { $orderBy .= ($sort == 'ASC') ? 'DESC' : 'ASC'; } } else { - $orderBy = $db->quoteIdentifier($order) . ' ' . $sort; + $orderBy = $icdb->quoteIdentifier($order) . ' ' . $sort; } $orderBy .= ' , id ' . $sort; $icdb->orderBy($orderBy); @@ -1054,7 +1047,7 @@ function iv2_sqlite_unix2date($ts) $flexy->setData('limelight_header', $limelight_header); $flexy->output(); } elseif ($list_template == 'iv2i.tpl.html') { - $mobile = Net_UserAgent_Mobile::singleton(); + $mobile = (new Net_UserAgent_Mobile)->singleton(); $elements = $flexy->getElements(); if ($mobile->isDoCoMo()) { $elements['page']->setAttributes('istyle="4"'); diff --git a/rep2/live_control.php b/rep2/live_control.php index 9dc50465f..99369ef2c 100755 --- a/rep2/live_control.php +++ b/rep2/live_control.php @@ -5,7 +5,7 @@ require_once __DIR__ . '/../init.php'; -if ($_GET['live']) { +if (array_key_exists('live', $_GET) && $_GET['live']) { $load_control = "liveon()"; } else { $load_control = "liveoff()"; diff --git a/rep2/live_frame.php b/rep2/live_frame.php index 1c5f9a8a7..bf257309c 100755 --- a/rep2/live_frame.php +++ b/rep2/live_frame.php @@ -30,14 +30,16 @@ $live_read = "live_read.php"; $live_q = "&live=1"; -if ($_GET['offline']) { +$offline_q = ''; +if (array_key_exists('offline', $_GET) && $_GET['offline']) { $offline_l = isset($_GET['offline']) ? $_GET['offline'] : ''; $offline_q = "&offline=" . $offline_l; $live_read = "read.php"; $live_q = "&live=0"; } -if ($_GET['word']) { +$word_q = ''; +if (array_key_exists('word', $_GET) && $_GET['word']) { $word_l = isset($_GET['word']) ? $_GET['word'] : ''; $method_l = isset($_GET['method']) ? $_GET['method'] : ''; $word_q = "&word=" . $word_l . "&method=" . $method_l; diff --git a/rep2/live_post_form.php b/rep2/live_post_form.php index 5c934622b..7e9b6467d 100755 --- a/rep2/live_post_form.php +++ b/rep2/live_post_form.php @@ -127,7 +127,7 @@ EOP; } // +live Kp^C}[ -if ($_GET['w_reg'] && $_conf['live.write_regulation']) { +if (array_key_exists('w_reg', $_GET) && $_GET['w_reg'] && $_conf['live.write_regulation']) { $load_control = "cd_on()"; if ($_conf['live.write_regulation'] == 3) { $count_down_second = "31"; diff --git a/rep2/live_read.php b/rep2/live_read.php index a03e8e17f..41c446998 100755 --- a/rep2/live_read.php +++ b/rep2/live_read.php @@ -402,7 +402,7 @@ function recRecent($data) $lar = explode('<>', $l); $data_ar = explode('<>', $data); if (!$lar[1] || !strlen($lar[11])) { continue; } // sf[^폜 - if ($lar[1] == $data_ar[1] && $lar[11] == $data_ar[11]) { continue; } // key, bbsŏd + if ($lar[1] == $data_ar[1] && $lar[11] == $data_ar[11] && $lar[10] == $data_ar[10]) { continue; } // key, bbsŏd $neolines[] = $l; } } diff --git a/rep2/post.php b/rep2/post.php index f27c50afc..5c8a82a59 100644 --- a/rep2/post.php +++ b/rep2/post.php @@ -36,7 +36,7 @@ $post_param_keys = array('bbs', 'key', 'time', 'FROM', 'mail', 'MESSAGE', 'subject', 'submit'); $post_internal_keys = array('host', 'sub', 'popup', 'rescount', 'ttitle_en'); -$post_optional_keys = array('newthread', 'beres', 'p2res', 'from_read_new', 'maru', 'csrfid'); +$post_optional_keys = array('newthread', 'beres', 'p2res', 'from_read_new', 'maru', 'csrfid', 'proxy'); $post_p2_flag_keys = array('b', 'p2_post_confirm_cookie'); foreach ($post_param_keys as $pk) { @@ -212,7 +212,7 @@ PostDataStore::set($post_backup_key, $post_cache); // cookie ǂݍ -$cookie_key = $_login->user_u . '/' . P2Util::normalizeHostName(P2HostMgr::isHostBbsPink($host) ? 'www.bbspink.com' : P2HostMgr::isHost2chs($host) ? 'www.2ch.net' : $host); // E@Ή +$cookie_key = $_login->user_u . '/' . P2Util::normalizeHostName(P2HostMgr::isHostBbsPink($host) ? 'www.bbspink.com' : (P2HostMgr::isHost2chs($host) ? 'www.5ch.net' : $host)); // E@Ή if ($p2cookies = CookieDataStore::get($cookie_key)) { if (is_array($p2cookies)) { if (array_key_exists('expires', $p2cookies)) { @@ -230,8 +230,24 @@ $p2cookies = null; } -// ڏ -$posted = postIt($host, $bbs, $key, $post); +if ($_conf['proxy_host']) { + // ꎞIɃvLṼIIt؂ւď + global $_conf; + + $bak_proxy_use = $_conf['proxy_use']; + if (empty($_REQUEST['proxy']) || !$_REQUEST['proxy']) { + // proxyItŏ + $_conf['proxy_use'] = 0; + } else { + // proxyIŏ + $_conf['proxy_use'] = 1; + } + $posted = postIt($host, $bbs, $key, $post); + $_conf['proxy_use'] = $bak_proxy_use; +} else { + // ڏ + $posted = postIt($host, $bbs, $key, $post); +} // cookie ۑ if ($p2cookies) { @@ -399,7 +415,22 @@ function postIt($host, $bbs, $key, $post) $req = P2Commun::createHTTPRequest ($bbs_cgi_url,HTTP_Request2::METHOD_POST); // wb_ - $req->setHeader('Referer', "http://{$host}/{$bbs}/{$key}/"); + $bypass_headers = ['Cache-Control', 'Sec-Ch-Ua', 'Sec-Ch-Ua-Mobile', 'Upgrade-Insecure-Requests', 'User-Agent', 'Accept', 'Sec-Fetch-Site', 'Sec-Fetch-Mode', 'Sec-Fetch-User', 'Sec-Fetch-Dest', 'Accept-Encoding', 'Accept-Language']; + + foreach (getallheaders() as $name => $value) { + if (!in_array($name, $bypass_headers, true)) { + continue; + } + $req->setHeader($name, $value); + } + + if (P2HostMgr::isHost2chs($host) && !P2HostMgr::isHostBbsPink($host) && $_conf['2ch_ssl.post']) { + $req->setHeader('Referer', "https://{$host}/{$bbs}/{$key}/"); + $req->setHeader("Origin", "https://{$host}/{$bbs}/{$key}/"); + } else { + $req->setHeader('Referer', "http://{$host}/{$bbs}/{$key}/"); + $req->setHeader("Origin", "http://{$host}/{$bbs}/{$key}/"); + } // NbL[ if ($p2cookies) { @@ -425,7 +456,7 @@ function postIt($host, $bbs, $key, $post) } // POSTe - while (list($name, $value) = each($post)) { + foreach ($post as $name => $value) { // or be.2ch.netȂAEUCɕϊ if (P2HostMgr::isHostJbbsShitaraba($host) || P2HostMgr::isHostBe2chs($host)) { diff --git a/rep2/read.php b/rep2/read.php index 5e0939882..d33c66afd 100644 --- a/rep2/read.php +++ b/rep2/read.php @@ -160,7 +160,7 @@ $before_respointer = $_conf['mobile.before_respointer']; } else { // +live X\ؑ - if ($_GET['live']) { + if (array_key_exists('live', $_GET) && $_GET['live']) { $before_respointer = $_conf['live.before_respointer']; } else { $before_respointer = $_conf['before_respointer']; @@ -196,7 +196,7 @@ } else { if (!$aThread->ls) { // +live X\ؑ - if ($_GET['live']) { + if (array_key_exists('live', $_GET) && $_GET['live']) { $aThread->ls = 'l' .$_conf['live.before_respointer']; } else { $aThread->ls = $_conf['get_new_res_l']; @@ -281,7 +281,7 @@ } else { // +live wb_ؑ - if ($_GET['live']) { + if (array_key_exists('live', $_GET) && $_GET['live']) { P2Util::header_content_type(); } else { // wb_ \ @@ -301,7 +301,7 @@ echo "

    {$all}X nXqbg

    \n"; } - if ($_GET['showbl']) { + if (array_key_exists('showbl', $_GET) && $_GET['showbl']) { echo '

    ' . p2h($aThread->resrange['start']) . 'ւ̃X

    '; } @@ -317,7 +317,7 @@ $res1 = $aShowThread->quoteOne(); // >>1|bvAbvp - if ($_GET['showbl']) { + if (array_key_exists('showbl', $_GET) && $_GET['showbl']) { $mainhtml = $aShowThread->getDatToHtml_resFrom(); } else { $mainhtml .= $aShowThread->getDatToHtml(); @@ -414,7 +414,7 @@ } // +live tb^ؑ - if ($_GET['live']) { + if (array_key_exists('live', $_GET) && $_GET['live']) { echo << @@ -522,7 +522,7 @@ function recRecent($data) $lar = explode('<>', $l); $data_ar = explode('<>', $data); if (!$lar[1] || !strlen($lar[11])) { continue; } // sf[^폜 - if ($lar[1] == $data_ar[1] && $lar[11] == $data_ar[11]) { continue; } // key, bbsŏd + if ($lar[1] == $data_ar[1] && $lar[11] == $data_ar[11] && $lar[10] == $data_ar[10]) { continue; } // key, bbsŏd $neolines[] = $l; } } diff --git a/rep2/read_copy_k.php b/rep2/read_copy_k.php index 89ac1f603..043672fb5 100644 --- a/rep2/read_copy_k.php +++ b/rep2/read_copy_k.php @@ -102,7 +102,7 @@ javascript:(function(){for (var j=0;jsingleton(); if ($mobile->isAirHPhone()) { $kyopon_size = ' rows="10" cols="34"'; } diff --git a/rep2/read_new.php b/rep2/read_new.php index 9be0b2ac5..4b517ed49 100755 --- a/rep2/read_new.php +++ b/rep2/read_new.php @@ -148,8 +148,9 @@ EOHEADER; // +live \ html popup ؊ +$live_view_popup = ''; if ($_conf['live.view_type'] > 1 ) { - $live_view_popup = live_; + $live_view_popup = 'live_'; } if ($_conf['iframe_popup_type'] == 1) { @@ -217,7 +218,6 @@ $fade = empty($_GET['fade']) ? 'false' : 'true'; $onload_script .= "gFade = {$fade};"; $bodyadd = ' onclick="hideHtmlPopUp(event);"'; -EOP; } if ($_conf['backlink_coloring_track']) { diff --git a/rep2/tgrepc.php b/rep2/tgrepc.php index 3ab668323..91c2a4d2f 100644 --- a/rep2/tgrepc.php +++ b/rep2/tgrepc.php @@ -351,7 +351,7 @@ function tgrep_search($query) { global $_conf; - if (!$_conf['test.search_dig2ch']) { + if ($_conf['expack.tgrep.engine'] === "0") { $client = new HTTP_Client(); $client->setDefaultHeader('User-Agent', 'p2-tgrep-client'); $code = $client->get($_conf['expack.tgrep_url'] . '?' . $query); @@ -366,11 +366,20 @@ function tgrep_search($query) p2die('Error: ʂ̓WJɎs܂B'); } return $result; - } else { -// require_once './dig2ch.php'; -// return dig2chsearch($query); // lj + } elseif ($_conf['expack.tgrep.engine'] === "1") { + require_once './dig2ch.php'; + return dig2chsearch($query); + } elseif ($_conf['expack.tgrep.engine'] === "2") { require_once './refind2ch.php'; - return refind2ch_search($query); // lj + return refind2ch_search($query); + } elseif ($_conf['expack.tgrep.engine'] === "3") { + require_once './ff5ch.php'; + return ff5ch_search($query); + } elseif ($_conf['expack.tgrep.engine'] === "4") { + require_once './find5ch.php'; + return find5ch_search($query); + } else { + p2die('Error: m̌GWw肳܂BtGrep̐ݒ肩IĂB'); } }