From f3df896b0097debbc2a06047471faf9466457c94 Mon Sep 17 00:00:00 2001 From: RikaFujiwara Date: Mon, 14 Dec 2020 08:36:22 +0000 Subject: [PATCH 1/3] =?UTF-8?q?fix:=E5=8B=95=E7=94=BB=E3=83=95=E3=82=A1?= =?UTF-8?q?=E3=82=A4=E3=83=AB=E3=81=AE=E5=89=8A=E9=99=A4=E6=99=82=E3=81=AB?= =?UTF-8?q?Wysiwyg=E3=81=A7=E3=82=A2=E3=83=83=E3=83=97=E3=83=AD=E3=83=BC?= =?UTF-8?q?=E3=83=89=E3=81=97=E3=81=9F=E5=AE=9F=E3=83=95=E3=82=A1=E3=82=A4?= =?UTF-8?q?=E3=83=AB=E3=82=82=E5=89=8A=E9=99=A4=E3=81=95=E3=82=8C=E3=82=8B?= =?UTF-8?q?=E3=82=88=E3=81=86=E3=81=AB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Model/Video.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Model/Video.php b/Model/Video.php index c10b352..e8dbfb8 100644 --- a/Model/Video.php +++ b/Model/Video.php @@ -380,7 +380,7 @@ public function deleteVideo($data) { // アップロードファイル 削除 $conditions = array($this->UploadFile->alias . '.content_key' => $data['Video']['key']); - if (! $this->UploadFile->deleteAll($conditions, false)) { + if (! $this->UploadFile->deleteAll($conditions, false, true)) { throw new InternalErrorException(__d('net_commons', 'Internal Server Error')); } From f595b652e69311ae0d97122d722c5acd1d4ff243 Mon Sep 17 00:00:00 2001 From: RikaFujiwara Date: Mon, 14 Dec 2020 08:37:06 +0000 Subject: [PATCH 2/3] =?UTF-8?q?fix:=20=E5=8B=95=E7=94=BB=E3=81=AE=E3=83=96?= =?UTF-8?q?=E3=83=AD=E3=83=83=E3=82=AF=E3=82=92=E5=89=8A=E9=99=A4=E3=81=97?= =?UTF-8?q?=E3=81=9F=E3=81=A8=E3=81=8D=E3=81=AB=E7=89=A9=E7=90=86=E3=83=95?= =?UTF-8?q?=E3=82=A1=E3=82=A4=E3=83=AB=E3=81=8C=E6=B6=88=E3=81=88=E6=AE=8B?= =?UTF-8?q?=E3=82=8B=E7=8F=BE=E8=B1=A1=E5=AF=BE=E5=BF=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Model/VideoSetting.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Model/VideoSetting.php b/Model/VideoSetting.php index 21931ca..8ea5918 100644 --- a/Model/VideoSetting.php +++ b/Model/VideoSetting.php @@ -280,7 +280,7 @@ public function deleteVideoSetting($data) { } // アップロードファイル 削除 - $this->__deleteAll($this->UploadFile, 'content_key', $contentKeys); + $this->__deleteAll($this->UploadFile, 'content_key', $contentKeys, true); // タグコンテンツ 削除 $this->__deleteAll($this->TagsContent, 'tag_id', $tagIds); @@ -344,16 +344,17 @@ private function __getContentKeys($blockIds) { * @param Model $model モデル * @param string $filed フィールド名 * @param string $value 値 + * @param bool $callBackFlag callBack実行 * @return void * @throws InternalErrorException */ - private function __deleteAll(Model $model, $filed, $value) { + private function __deleteAll(Model $model, $filed, $value, $callBackFlag = false) { if (empty($value)) { return; } $conditions = array($model->alias . '.' . $filed => $value); - if (! $model->deleteAll($conditions, false)) { + if (! $model->deleteAll($conditions, false, $callBackFlag)) { throw new InternalErrorException(__d('net_commons', 'Internal Server Error')); } } From b9857fd4947a03183ba8b04b2c3a61b71b3c82d6 Mon Sep 17 00:00:00 2001 From: RikaFujiwara Date: Tue, 15 Dec 2020 05:56:28 +0000 Subject: [PATCH 3/3] =?UTF-8?q?style:=20phpmd=E3=82=A8=E3=83=A9=E3=83=BC?= =?UTF-8?q?=E5=AF=BE=E5=BF=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Model/VideoSetting.php | 1 + 1 file changed, 1 insertion(+) diff --git a/Model/VideoSetting.php b/Model/VideoSetting.php index 8ea5918..025caa3 100644 --- a/Model/VideoSetting.php +++ b/Model/VideoSetting.php @@ -347,6 +347,7 @@ private function __getContentKeys($blockIds) { * @param bool $callBackFlag callBack実行 * @return void * @throws InternalErrorException + * @SuppressWarnings(PHPMD.BooleanArgumentFlag) */ private function __deleteAll(Model $model, $filed, $value, $callBackFlag = false) { if (empty($value)) {