From d5ad9d44322d7d28ed0a5b1023179f06604b7b50 Mon Sep 17 00:00:00 2001 From: Masato Inoue Date: Fri, 28 Jun 2024 12:05:41 +0900 Subject: [PATCH 01/57] =?UTF-8?q?add:=20=E3=82=B3=E3=82=A2=20Kernel?= =?UTF-8?q?=E3=81=AB=E6=AF=8E=E5=88=86=E5=AE=9F=E8=A1=8C=E7=94=A8=E3=81=AE?= =?UTF-8?q?=E3=82=AA=E3=83=97=E3=82=B7=E3=83=A7=E3=83=B3=E3=83=90=E3=83=83?= =?UTF-8?q?=E3=83=81=E5=87=A6=E7=90=86=E3=82=92=E8=BF=BD=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/Console/Kernel.php | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/app/Console/Kernel.php b/app/Console/Kernel.php index d16b252d7..f91b131db 100644 --- a/app/Console/Kernel.php +++ b/app/Console/Kernel.php @@ -17,6 +17,9 @@ protected function schedule(Schedule $schedule) { // $schedule->command('inspire') // ->hourly(); + /** + * 指定日時でバッチスケジュールを設定 + */ if(env('OPTION_BATCH_SCHEDULE')){ // カンマ連結されたバッチスケジュールセットを分割 $defs = explode(',', env('OPTION_BATCH_SCHEDULE')); @@ -30,6 +33,21 @@ protected function schedule(Schedule $schedule) $schedule->command($cmd)->at($time); } } + + /** + * 毎分実行のスケジュール設定 + */ + if(env('OPTION_BATCH_SCHEDULE_MINUTELY')){ + // カンマ連結されたバッチスケジュールセットを分割 + $defs = explode(',', env('OPTION_BATCH_SCHEDULE_MINUTELY')); + foreach($defs as $def){ + // コマンドを取得 + $cmd = 'command:' . $def; + + // 毎分バッチスケジュールを定義 + $schedule->command($cmd)->everyMinute(); + } + } } /** From 52af24f55bf041a7b60dff7406456bf6c5fb7420 Mon Sep 17 00:00:00 2001 From: Mitsuru Mutaguchi Date: Wed, 10 Jul 2024 18:37:51 +0900 Subject: [PATCH 02/57] =?UTF-8?q?add:=20CsvUtils,=20=E3=83=80=E3=83=96?= =?UTF-8?q?=E3=83=AB=E3=82=AF=E3=82=A9=E3=83=BC=E3=83=86=E3=83=BC=E3=82=B7?= =?UTF-8?q?=E3=83=A7=E3=83=B3=E5=AF=BE=E7=AD=96=E3=81=AE=E3=83=A1=E3=82=BD?= =?UTF-8?q?=E3=83=83=E3=83=89=E3=82=92=E8=BF=BD=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/Utilities/Csv/CsvUtils.php | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/app/Utilities/Csv/CsvUtils.php b/app/Utilities/Csv/CsvUtils.php index 4158f683a..90db21327 100644 --- a/app/Utilities/Csv/CsvUtils.php +++ b/app/Utilities/Csv/CsvUtils.php @@ -140,6 +140,28 @@ public static function checkCvslines($fp, array $header_column_format, array $cv return $errors; } + /** + * ダブルクォーテーションを全角に変換 (csv_array) + */ + public static function convertDoubleQuotesCsvArray(array $csv_array): array + { + foreach ($csv_array as &$csv_line) { + $csv_line = self::convertDoubleQuotesCsvLine($csv_line); + } + return $csv_array; + } + + /** + * ダブルクォーテーションを全角に変換 (csv_line) + */ + public static function convertDoubleQuotesCsvLine(array $csv_line): array + { + foreach ($csv_line as &$csv_col) { + $csv_col = str_replace('"', '”', (string)$csv_col); + } + return $csv_line; + } + /** * レスポンス時のCSVデータ 取得 */ From ae5929f82fb700c14d981a5d4cd66f5016abcb1b Mon Sep 17 00:00:00 2001 From: Mitsuru Mutaguchi Date: Thu, 18 Jul 2024 13:02:21 +0900 Subject: [PATCH 03/57] =?UTF-8?q?test:=20UserFactory,=20=E3=83=86=E3=82=B9?= =?UTF-8?q?=E3=83=88=E3=83=87=E3=83=BC=E3=82=BF=E3=81=A7=E3=83=AD=E3=82=B0?= =?UTF-8?q?=E3=82=A4=E3=83=B3ID=E3=81=AF=E3=83=A6=E3=83=8B=E3=83=BC?= =?UTF-8?q?=E3=82=AF=E3=81=AB=E3=81=99=E3=82=8B=E5=BF=85=E8=A6=81=E3=81=82?= =?UTF-8?q?=E3=82=8A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- database/factories/UserFactory.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/database/factories/UserFactory.php b/database/factories/UserFactory.php index ec53f38e2..b58a1d359 100644 --- a/database/factories/UserFactory.php +++ b/database/factories/UserFactory.php @@ -18,7 +18,7 @@ public function definition() 'name' => $this->faker->name(), 'email' => $this->faker->unique()->safeEmail(), 'email_verified_at' => now(), - 'userid' =>$this->faker->userName(), + 'userid' =>$this->faker->unique()->userName(), 'password' => '$2y$10$92IXUNpkjO0rOQ5byMi.Ye4oKoEa3Ro9llC/.og/at2.uheWG/igi', // password 'columns_set_id' => 1, 'remember_token' => Str::random(10), From 7dae1fba0bb05584656368010b6a45592330a296 Mon Sep 17 00:00:00 2001 From: Masato Inoue Date: Fri, 23 Aug 2024 10:52:11 +0900 Subject: [PATCH 04/57] =?UTF-8?q?refactor:=20=E3=83=95=E3=82=A9=E3=83=88?= =?UTF-8?q?=E3=82=A2=E3=83=AB=E3=83=90=E3=83=A0=20=E3=82=B5=E3=83=9D?= =?UTF-8?q?=E3=83=BC=E3=83=88=E6=8B=A1=E5=BC=B5=E5=AD=90=E3=82=92=E3=83=A1?= =?UTF-8?q?=E3=83=B3=E3=83=90=E5=A4=89=E6=95=B0=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/Plugins/User/Photoalbums/PhotoalbumsPlugin.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/app/Plugins/User/Photoalbums/PhotoalbumsPlugin.php b/app/Plugins/User/Photoalbums/PhotoalbumsPlugin.php index 5e91f5b3b..48d10a98e 100644 --- a/app/Plugins/User/Photoalbums/PhotoalbumsPlugin.php +++ b/app/Plugins/User/Photoalbums/PhotoalbumsPlugin.php @@ -51,6 +51,9 @@ class PhotoalbumsPlugin extends UserPluginBase // ファイルダウンロードURL private $download_url = ''; + // サポートされている拡張子のリスト + private $supported_extensions = ['jpg', 'jpe', 'jpeg', 'png', 'gif']; + /* コアから呼び出す関数 */ /** @@ -1264,7 +1267,7 @@ private function getUploadValidator($request, $photoalbum, $add_mimes = '') // ファイルサイズと形式チェック if ($photoalbum->image_upload_max_size !== UploadMaxSize::infinity) { $rules['upload_file.*'][] = 'max:' . $photoalbum->image_upload_max_size; - $rules['upload_file.*'][] = 'mimes:jpg,jpe,jpeg,png,gif' . $add_mimes; + $rules['upload_file.*'][] = 'mimes:' . implode(',', $this->supported_extensions) . $add_mimes; } // 項目名設定 From 8b6aa7353fbae49de16953cd7e98216cd11f93e8 Mon Sep 17 00:00:00 2001 From: Masato Inoue Date: Fri, 23 Aug 2024 10:57:01 +0900 Subject: [PATCH 05/57] =?UTF-8?q?fix:=20=E3=83=95=E3=82=A9=E3=83=88?= =?UTF-8?q?=E3=82=A2=E3=83=AB=E3=83=90=E3=83=A0=20uploads=E3=83=86?= =?UTF-8?q?=E3=83=BC=E3=83=96=E3=83=AB=E7=99=BB=E9=8C=B2=E6=99=82=E3=81=AE?= =?UTF-8?q?=E3=82=B5=E3=82=A4=E3=82=BA=E3=82=92=E3=83=AA=E3=82=B5=E3=82=A4?= =?UTF-8?q?=E3=82=BA=E5=BE=8C=E3=82=B5=E3=82=A4=E3=82=BA=E3=81=A7=E6=8E=A1?= =?UTF-8?q?=E7=94=A8=E3=81=99=E3=82=8B=E3=82=88=E3=81=86=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/Plugins/User/Photoalbums/PhotoalbumsPlugin.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/app/Plugins/User/Photoalbums/PhotoalbumsPlugin.php b/app/Plugins/User/Photoalbums/PhotoalbumsPlugin.php index 48d10a98e..bc0ea3886 100644 --- a/app/Plugins/User/Photoalbums/PhotoalbumsPlugin.php +++ b/app/Plugins/User/Photoalbums/PhotoalbumsPlugin.php @@ -552,6 +552,10 @@ private function writeFileImpl($file_params, $page_id, $frame_id, $photoalbum, $ // $image = Uploads::shrinkImage($file, $photoalbum->image_upload_max_px); $image = Uploads::shrinkImage($file_params['path'], $photoalbum->image_upload_max_px); + // リサイズ後のバイナリデータのサイズを取得 + $extension = strtolower($file_params['extension']); + $resized_image_size = strlen((string) $image->encode($extension)); + // uploads テーブルに情報追加、ファイルのid を取得する $upload = Uploads::create([ /* @@ -563,7 +567,7 @@ private function writeFileImpl($file_params, $page_id, $frame_id, $photoalbum, $ 'client_original_name' => $file_params['client_original_name'], 'mimetype' => $file_params['mimetype'], 'extension' => $file_params['extension'], - 'size' => $file_params['size'], + 'size' => $resized_image_size, 'plugin_name' => 'photoalbums', 'page_id' => $page_id, From 39f603ae3d4f650a110015d6f89a06758924a6be Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=82=AA=E3=83=BC=E3=83=97=E3=83=B3=E3=82=BD=E3=83=BC?= =?UTF-8?q?=E3=82=B9=E3=83=BB=E3=83=AF=E3=83=BC=E3=82=AF=E3=82=B7=E3=83=A7?= =?UTF-8?q?=E3=83=83=E3=83=97=20=E6=B0=B8=E5=8E=9F=20=E7=AF=A4?= Date: Wed, 18 Sep 2024 16:58:31 +0900 Subject: [PATCH 06/57] =?UTF-8?q?=E5=80=8B=E5=88=A5=E3=82=B5=E3=83=9D?= =?UTF-8?q?=E3=83=BC=E3=83=88URL=E6=83=85=E5=A0=B1=E3=81=AE=E8=A1=A8?= =?UTF-8?q?=E7=A4=BA=E6=A9=9F=E8=83=BD=E3=81=AE=E8=BF=BD=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit サイトのサポートをするURLがある場合に記述できるようにしました。 このURLは以下の2か所で表示されます。 ・管理者メニューのトップ ・ログイン後のヘッダーメニュー また、サポートページがパスワード付きページに設定されている場合、パスワードも表示するようにしています。 サポートページの設定は.envで行います。 .env.exampleに書き方として以下を追加しました。 # support info (If there is a support URL and if a viewing password is required.) #INDIVIDUAL_SUPPORT_URL= #INDIVIDUAL_SUPPORT_PASSWORD= --- .env.example | 4 ++++ config/connect.php | 4 ++++ resources/views/layouts/app.blade.php | 19 ++++++++++++++++++- .../plugins/manage/index/index.blade.php | 17 +++++++++++++++-- 4 files changed, 41 insertions(+), 3 deletions(-) diff --git a/.env.example b/.env.example index 9c34f3c22..d8b9d5698 100644 --- a/.env.example +++ b/.env.example @@ -185,3 +185,7 @@ REQUIRE_AWS_SDK_PATH=C:\Lib\aws\aws-autoloader.php # add theme dir. #ADD_THEME_DIR=C:\SitesLaravel\theme\ + +# support info (If there is a support URL and if a viewing password is required.) +#INDIVIDUAL_SUPPORT_URL= +#INDIVIDUAL_SUPPORT_PASSWORD= diff --git a/config/connect.php b/config/connect.php index eac5ccff9..5b32e9944 100644 --- a/config/connect.php +++ b/config/connect.php @@ -185,4 +185,8 @@ // public配下のディレクトリを指定してファイル管理. null時は機能自体使わない(beta) 'MANAGE_USERDIR_PUBLIC_TARGET' => env('MANAGE_USERDIR_PUBLIC_TARGET', null), + + // 契約ユーザの個別サポート情報 + 'individual_support_url' => env('INDIVIDUAL_SUPPORT_URL', ""), + 'individual_support_password' => env('INDIVIDUAL_SUPPORT_PASSWORD', ""), ]; diff --git a/resources/views/layouts/app.blade.php b/resources/views/layouts/app.blade.php index dae4da241..8d22a96eb 100644 --- a/resources/views/layouts/app.blade.php +++ b/resources/views/layouts/app.blade.php @@ -175,6 +175,24 @@