From 3b01008f660681ae61e8ea1d95395eb5f7bc1b63 Mon Sep 17 00:00:00 2001 From: Mitsuru Mutaguchi Date: Tue, 6 Nov 2018 18:01:46 +0900 Subject: [PATCH 01/50] Update TopicsBehavior.php MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit fix: 移行時、新着プラグインのエラーに対応 https://github.com/NetCommons3/NetCommons3/issues/1359 --- Model/Behavior/TopicsBehavior.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Model/Behavior/TopicsBehavior.php b/Model/Behavior/TopicsBehavior.php index aa6806d..d336d9c 100644 --- a/Model/Behavior/TopicsBehavior.php +++ b/Model/Behavior/TopicsBehavior.php @@ -117,7 +117,9 @@ public function saveTopics(Model $model) { //新着に表示させる会員のリスト登録 foreach ($model->data[$model->Topic->alias] as $topic) { - $this->_saveTopicReadable($model, $topic['id']); + if (isset($topic['id'])) { + $this->_saveTopicReadable($model, $topic['id']); + } } return true; From d27630a9fee8728644c2e0e8ed8e0fd994a83b42 Mon Sep 17 00:00:00 2001 From: Mitsuru Mutaguchi Date: Tue, 6 Nov 2018 19:05:29 +0900 Subject: [PATCH 02/50] Update TopicFramesPlugin.php MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit fix: パフォーマンス改善の修正ちょびミス対応 https://github.com/NetCommons3/NetCommons3/issues/1359 --- Model/TopicFramesPlugin.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Model/TopicFramesPlugin.php b/Model/TopicFramesPlugin.php index 0ee9179..dc10419 100644 --- a/Model/TopicFramesPlugin.php +++ b/Model/TopicFramesPlugin.php @@ -66,8 +66,8 @@ public function validateRequestData($data) { } } - $check = isset($data['TopicFramesPlugin']['plugin_key']) - ? $data['TopicFramesPlugin']['plugin_key'] + $check = isset($data['TopicFrameSetting']['plugin_key']) + ? $data['TopicFrameSetting']['plugin_key'] : []; foreach ($check as $pluginKey) { if (! in_array($pluginKey, $pluginKeys, true)) { From 5bf733d7581c09430c1737d1158ad2fcf05c6a55 Mon Sep 17 00:00:00 2001 From: Mitsuru Mutaguchi Date: Mon, 10 Dec 2018 14:01:11 +0900 Subject: [PATCH 03/50] Update TopicFramesPlugin.php MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit fix: 指定したプラグインのみ表示する を動作するように修正 https://github.com/NetCommons3/NetCommons3/issues/1393 --- Model/TopicFramesPlugin.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Model/TopicFramesPlugin.php b/Model/TopicFramesPlugin.php index dc10419..0d64fba 100644 --- a/Model/TopicFramesPlugin.php +++ b/Model/TopicFramesPlugin.php @@ -165,9 +165,9 @@ public function getPlugins($topicFrameSetting, $conditions = []) { */ public function saveTopicFramesPlugin($data) { $pluginKeys = []; - foreach ($data[$this->alias] as $frame) { - if (isset($frame['plugin_key'])) { - $pluginKeys[] = $frame['plugin_key']; + if (isset($data[$this->alias]['plugin_key'])) { + foreach ($data[$this->alias]['plugin_key'] as $plugin_key) { + $pluginKeys[] = $plugin_key; } } From a67a56f8256d398606fbedbc8a3be4c84d30d22f Mon Sep 17 00:00:00 2001 From: Mitsuru Mutaguchi Date: Thu, 13 Dec 2018 18:20:03 +0900 Subject: [PATCH 04/50] =?UTF-8?q?test:=20=E3=83=86=E3=82=B9=E3=83=88?= =?UTF-8?q?=E6=9D=A1=E4=BB=B6=E8=A6=8B=E7=9B=B4=E3=81=97=20Model/Topic/Pri?= =?UTF-8?q?vateGetRoomsConditionsTest?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Topic/PrivateGetRoomsConditionsTest.php | 37 ++++++++++--------- 1 file changed, 19 insertions(+), 18 deletions(-) diff --git a/Test/Case/Model/Topic/PrivateGetRoomsConditionsTest.php b/Test/Case/Model/Topic/PrivateGetRoomsConditionsTest.php index 8361bfc..a86cb78 100644 --- a/Test/Case/Model/Topic/PrivateGetRoomsConditionsTest.php +++ b/Test/Case/Model/Topic/PrivateGetRoomsConditionsTest.php @@ -16,6 +16,7 @@ * * @author Shohei Nakajima * @package NetCommons\Topics\Test\Case\Model\Topic + * @see Topic::__getRoomsConditions() */ class PrivateTopicGetRoomsConditionsTest extends NetCommonsModelTestCase { @@ -154,8 +155,8 @@ public function dataProvider() { 0 => array( 'Topic.room_id' => array( 0 => '2', - 1 => '5', - 2 => '4', + 1 => '4', + 2 => '5', 3 => '11', 4 => '12', ), @@ -181,10 +182,10 @@ public function dataProvider() { 'Block.public_type' => '2', 0 => array( 'OR' => - array( - 'Block.publish_start <=' => $now, - 'Block.publish_start' => null, - ), + array( + 'Block.publish_start <=' => $now, + 'Block.publish_start' => null, + ), ), 1 => array( 'OR' => array( @@ -196,8 +197,8 @@ public function dataProvider() { 2 => array( 'Block.room_id' => array( 0 => '2', - 1 => '5', - 2 => '4', + 1 => '4', + 2 => '5', 3 => '11', 4 => '12', ), @@ -216,8 +217,8 @@ public function dataProvider() { 0 => array( 'Topic.room_id' => array( 0 => '2', - 1 => '5', - 2 => '4', + 1 => '4', + 2 => '5', 3 => '11', 4 => '12', ), @@ -258,8 +259,8 @@ public function dataProvider() { 2 => array( 'Block.room_id' => array( 0 => '2', - 1 => '5', - 2 => '4', + 1 => '4', + 2 => '5', 3 => '11', ), ), @@ -278,8 +279,8 @@ public function dataProvider() { 0 => array( 'Topic.room_id' => array( 0 => '2', - 1 => '5', - 2 => '4', + 1 => '4', + 2 => '5', 3 => '11', ), 'Topic.is_latest' => true, @@ -361,8 +362,8 @@ public function dataProvider() { 'OR' => array( 'Topic.room_id' => array( 0 => '2', - 1 => '5', - 2 => '4', + 1 => '4', + 2 => '5', 3 => '12', ), 'TopicReadable.user_id' => $userId, @@ -428,8 +429,8 @@ public function dataProvider() { 'OR' => array( 'Topic.room_id' => array( 0 => '2', - 1 => '5', - 2 => '4', + 1 => '4', + 2 => '5', ), 'TopicReadable.user_id' => $userId, ), From 1b9cbbf0157ca2181818a79855df869693decffa Mon Sep 17 00:00:00 2001 From: Mitsuru Mutaguchi Date: Fri, 14 Dec 2018 11:20:36 +0900 Subject: [PATCH 05/50] fix: phpcs fix --- Model/TopicFramesPlugin.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Model/TopicFramesPlugin.php b/Model/TopicFramesPlugin.php index 0d64fba..57f6ab3 100644 --- a/Model/TopicFramesPlugin.php +++ b/Model/TopicFramesPlugin.php @@ -166,8 +166,8 @@ public function getPlugins($topicFrameSetting, $conditions = []) { public function saveTopicFramesPlugin($data) { $pluginKeys = []; if (isset($data[$this->alias]['plugin_key'])) { - foreach ($data[$this->alias]['plugin_key'] as $plugin_key) { - $pluginKeys[] = $plugin_key; + foreach ($data[$this->alias]['plugin_key'] as $pluginKey) { + $pluginKeys[] = $pluginKey; } } From a1457aeebb80d36f8bb7cf7cd9eb3e7dd106a72d Mon Sep 17 00:00:00 2001 From: Mitsuru Mutaguchi Date: Mon, 31 Dec 2018 15:42:02 +0900 Subject: [PATCH 06/50] =?UTF-8?q?fix:=20=E3=83=AB=E3=83=BC=E3=83=A0?= =?UTF-8?q?=E6=AF=8E=E3=81=AE=E8=A1=A8=E7=A4=BA=EF=BC=9A=E8=A1=A8=E7=A4=BA?= =?UTF-8?q?=E3=81=A7=E3=81=8D=E3=82=8B=E3=82=88=E3=81=86=E3=81=AB=E4=BF=AE?= =?UTF-8?q?=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- View/Topics/json/index_plugins.ctp | 2 +- View/Topics/json/index_rooms.ctp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/View/Topics/json/index_plugins.ctp b/View/Topics/json/index_plugins.ctp index 5d73e46..8d2f899 100644 --- a/View/Topics/json/index_plugins.ctp +++ b/View/Topics/json/index_plugins.ctp @@ -14,4 +14,4 @@ $pluginKey = $this->request->query['plugin_key']; echo $this->NetCommonsHtml->json(array( 'paging' => $topics[$pluginKey]['paging'], 'topics' => $this->Topics->camelizeKeyRecursive($topics[$pluginKey]['topics']) -)); +), 'OK', 200, false); diff --git a/View/Topics/json/index_rooms.ctp b/View/Topics/json/index_rooms.ctp index aee86e9..0fd667a 100644 --- a/View/Topics/json/index_rooms.ctp +++ b/View/Topics/json/index_rooms.ctp @@ -14,4 +14,4 @@ $roomId = $this->request->query['room_id']; echo $this->NetCommonsHtml->json(array( 'paging' => $topics[$roomId]['paging'], 'topics' => $this->Topics->camelizeKeyRecursive($topics[$roomId]['topics']) -)); +), 'OK', 200, false); From 3d39fa6198930de780df49ce4c58e8a6a6d700b0 Mon Sep 17 00:00:00 2001 From: Mitsuru Mutaguchi Date: Mon, 31 Dec 2018 16:50:36 +0900 Subject: [PATCH 07/50] =?UTF-8?q?fix:=20=E6=96=B0=E7=9D=80=E3=81=A7?= =?UTF-8?q?=E8=A1=A8=E7=A4=BA=E4=BB=B6=E6=95=B0=E3=82=92=E5=A4=89=E6=9B=B4?= =?UTF-8?q?=E3=80=81=E6=97=A5=E6=95=B0=E8=A1=A8=E7=A4=BA=E3=81=AB=E3=81=AA?= =?UTF-8?q?=E3=82=8B=E4=B8=8D=E5=85=B7=E5=90=88=E5=AF=BE=E5=BF=9C=20https:?= =?UTF-8?q?//github.com/NetCommons3/NetCommons3/issues/1253=20=E6=97=A5?= =?UTF-8?q?=E6=95=B0=E8=A1=A8=E7=A4=BA=E3=81=AE=E6=97=A5=E6=95=B0=E5=A4=89?= =?UTF-8?q?=E6=9B=B4=E5=BE=8C=E3=80=81Undefined=20index=E5=AF=BE=E5=BF=9C?= =?UTF-8?q?=20https://github.com/NetCommons3/NetCommons3/issues/1410?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- View/Elements/Topics/header.ctp | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/View/Elements/Topics/header.ctp b/View/Elements/Topics/header.ctp index 057fd67..6c08f3f 100644 --- a/View/Elements/Topics/header.ctp +++ b/View/Elements/Topics/header.ctp @@ -8,13 +8,22 @@ * @license http://www.netcommons.org/license.txt NetCommons License * @copyright Copyright 2014, NetCommons Project */ +$named = $this->Paginator->params['named']; +$named['page'] = '1'; +$url = NetCommonsUrl::blockUrl($named); ?>
- DisplayNumber->dropDownToggleDays(array('currentDays' => $topicFrameSetting['display_days'])); ?> + DisplayNumber->dropDownToggleDays(array( + 'currentDays' => $topicFrameSetting['display_days'], + 'url' => $url + )); ?> - DisplayNumber->dropDownToggle(array('currentLimit' => $topicFrameSetting['display_number'])); ?> + DisplayNumber->dropDownToggle(array( + 'currentLimit' => $topicFrameSetting['display_number'], + 'url' => $url + )); ?> From c0ee1b8191d8d8dcaafc9427f1b1ca75d86ecd6d Mon Sep 17 00:00:00 2001 From: Mitsuru Mutaguchi Date: Mon, 31 Dec 2018 17:09:29 +0900 Subject: [PATCH 08/50] =?UTF-8?q?fix:=20=E6=96=B0=E7=9D=80=E3=81=A7?= =?UTF-8?q?=E8=A1=A8=E7=A4=BA=E3=82=B9=E3=83=86=E3=83=BC=E3=82=BF=E3=82=B9?= =?UTF-8?q?=E5=A4=89=E6=9B=B4=E5=BE=8C=E3=80=81=E5=86=8D=E5=A4=89=E6=9B=B4?= =?UTF-8?q?=E5=8F=AF=E8=83=BD=E3=81=AB=E3=81=99=E3=82=8B=20https://github.?= =?UTF-8?q?com/NetCommons3/NetCommons3/issues/1410?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- View/Elements/Topics/select_status.ctp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/View/Elements/Topics/select_status.ctp b/View/Elements/Topics/select_status.ctp index f155f9b..36428e3 100644 --- a/View/Elements/Topics/select_status.ctp +++ b/View/Elements/Topics/select_status.ctp @@ -18,7 +18,7 @@ From ccf4556cafcbf651ba1db1365cfa9873f2d89582 Mon Sep 17 00:00:00 2001 From: Mitsuru Mutaguchi Date: Mon, 31 Dec 2018 18:04:37 +0900 Subject: [PATCH 09/50] =?UTF-8?q?fix:=20=E3=83=97=E3=83=A9=E3=82=B0?= =?UTF-8?q?=E3=82=A4=E3=83=B3=E6=AF=8E=E3=81=AB=E8=A1=A8=E7=A4=BA&?= =?UTF-8?q?=E6=8C=87=E5=AE=9A=E3=81=97=E3=81=9F=E3=83=97=E3=83=A9=E3=82=B0?= =?UTF-8?q?=E3=82=A4=E3=83=B3=E3=81=AE=E3=81=BF=E8=A1=A8=E7=A4=BA=E3=81=AE?= =?UTF-8?q?=E6=99=82=E3=80=81=E3=80=8C=E3=82=82=E3=81=A3=E3=81=A8=E8=A6=8B?= =?UTF-8?q?=E3=82=8B=E3=80=8D=E3=81=A7=E3=81=8D=E3=82=8B=E3=82=88=E3=81=86?= =?UTF-8?q?=E3=81=AB=E4=BF=AE=E6=AD=A3=20https://github.com/NetCommons3/Ne?= =?UTF-8?q?tCommons3/issues/1186?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Model/TopicFramesPlugin.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/Model/TopicFramesPlugin.php b/Model/TopicFramesPlugin.php index 57f6ab3..137d901 100644 --- a/Model/TopicFramesPlugin.php +++ b/Model/TopicFramesPlugin.php @@ -126,12 +126,14 @@ public function getPlugins($topicFrameSetting, $conditions = []) { ) ), true); + $conditions = Hash::merge( + array($this->alias . '.frame_key' => Current::read('Frame.key')), + $conditions + ); $plugin = $this->find('list', array( 'recursive' => 0, 'fields' => array('Plugin.key', 'Plugin.name'), - 'conditions' => array( - $this->alias . '.frame_key' => Current::read('Frame.key'), - ), + 'conditions' => $conditions, 'order' => 'weight' )); } else { From 27470d2aafaaba3c900fc8174ebeb3be5a7e6cea Mon Sep 17 00:00:00 2001 From: s-nakajima Date: Sun, 6 Jan 2019 10:20:34 +0900 Subject: [PATCH 10/50] =?UTF-8?q?Plugin=E3=83=A2=E3=83=87=E3=83=AB?= =?UTF-8?q?=E3=81=AE=E3=82=AF=E3=82=A8=E3=83=AA=E7=B5=90=E6=9E=9C=E3=82=92?= =?UTF-8?q?=E3=82=AD=E3=83=A3=E3=83=83=E3=82=B7=E3=83=A5=E3=81=99=E3=82=8B?= =?UTF-8?q?=E3=82=88=E3=81=86=E3=81=AB=E4=BF=AE=E6=AD=A3=E3=81=97=E3=81=9F?= =?UTF-8?q?=E3=81=93=E3=81=A8=E3=81=AB=E3=82=88=E3=82=8B=E6=94=B9=E4=BF=AE?= =?UTF-8?q?=20https://github.com/NetCommons3/NetCommons3/issues/1337?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Model/TopicFramesPlugin.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Model/TopicFramesPlugin.php b/Model/TopicFramesPlugin.php index 57f6ab3..d89b6d0 100644 --- a/Model/TopicFramesPlugin.php +++ b/Model/TopicFramesPlugin.php @@ -143,7 +143,7 @@ public function getPlugins($topicFrameSetting, $conditions = []) { array('display_topics' => true, 'language_id' => Current::read('Language.id', '0')), $conditions ); - $plugin = $this->Plugin->find('list', array( + $plugin = $this->Plugin->cacheFindQuery('list', array( 'recursive' => -1, 'fields' => array('key', 'name'), 'conditions' => $conditions, From 8f68b14dad807d9524b17d8fdfe6ef568ff349e8 Mon Sep 17 00:00:00 2001 From: s-nakajima Date: Thu, 9 May 2019 15:58:46 +0900 Subject: [PATCH 11/50] =?UTF-8?q?ctp=E3=83=95=E3=82=A1=E3=82=A4=E3=83=AB?= =?UTF-8?q?=E3=81=AB=E7=9B=B4=E6=9B=B8=E3=81=8D=E3=81=97=E3=81=A6=E3=81=84?= =?UTF-8?q?=E3=81=9F=E3=81=AE=E3=81=A7=E3=80=81Helper=E3=82=92=E4=BD=BF?= =?UTF-8?q?=E7=94=A8=E3=81=99=E3=82=8B=E3=82=88=E3=81=86=E3=81=AB=E4=BF=AE?= =?UTF-8?q?=E6=AD=A3=20https://github.com/researchmap/RmNetCommons3/issues?= =?UTF-8?q?/864?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- View/Elements/Topics/item.ctp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/View/Elements/Topics/item.ctp b/View/Elements/Topics/item.ctp index 3951d84..6cd0044 100644 --- a/View/Elements/Topics/item.ctp +++ b/View/Elements/Topics/item.ctp @@ -53,9 +53,7 @@
- - - + NetCommonsHtml->handleLink($item, [], []); ?>
From 8f03f2dec190bf7fae45288d0910e29996ea6203 Mon Sep 17 00:00:00 2001 From: A11creATor- Date: Wed, 24 Jul 2019 10:46:05 +0900 Subject: [PATCH 12/50] =?UTF-8?q?fix:=E6=96=B0=E7=9D=80=E3=81=A7=E3=83=AB?= =?UTF-8?q?=E3=83=BC=E3=83=A0=E3=81=8C=EF=BC=92=EF=BC=90=E4=BB=A5=E4=B8=8A?= =?UTF-8?q?=E8=A1=A8=E7=A4=BA=E3=81=95=E3=82=8C=E3=81=AA=E3=81=84=E4=BB=B6?= =?UTF-8?q?=E3=81=AE=E5=AF=BE=E5=87=A6=20100=E3=81=AB=E5=A2=97=E3=82=84?= =?UTF-8?q?=E3=81=97=E5=AF=BE=E5=BF=9C=20https://github.com/NetCommons3/Ne?= =?UTF-8?q?tCommons3/issues/1175?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Controller/TopicFrameSettingsController.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Controller/TopicFrameSettingsController.php b/Controller/TopicFrameSettingsController.php index 22a3e6d..fd060ac 100644 --- a/Controller/TopicFrameSettingsController.php +++ b/Controller/TopicFrameSettingsController.php @@ -82,7 +82,7 @@ class TopicFrameSettingsController extends TopicsAppController { * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ public function edit() { - $this->RoomsForm->setRoomsForCheckbox(); + $this->RoomsForm->setRoomsForCheckbox(array(), array('limit'=> 100)); $this->PluginsForm->setPluginsRoomForCheckbox($this, $this->PluginsForm->findOptions); $pluginKeys = []; From 70a217454b959f1dfbef6b02bc29d0d0c8da626e Mon Sep 17 00:00:00 2001 From: s-nakajima Date: Mon, 23 Sep 2019 17:37:10 +0900 Subject: [PATCH 13/50] =?UTF-8?q?fix:=20test:=20travis-ci=E3=81=AEphp7.2?= =?UTF-8?q?=E5=AF=BE=E5=BF=9C=20https://github.com/NetCommons3/NetCommons3?= =?UTF-8?q?/issues/1451?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .travis.yml | 2 ++ phpunit.xml.dist | 1 - 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 110ff79..1420f4b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -6,8 +6,10 @@ php: - 5.6 - 7.0 - 7.1 + - 7.2 sudo: false +dist: trusty env: - NETCOMMONS_VERSION=master DB=mysql diff --git a/phpunit.xml.dist b/phpunit.xml.dist index c607911..fea8884 100644 --- a/phpunit.xml.dist +++ b/phpunit.xml.dist @@ -14,6 +14,5 @@ - From 9f3061062bb13c94b098a98c82f4962264424405 Mon Sep 17 00:00:00 2001 From: s-nakajima Date: Mon, 23 Sep 2019 17:38:05 +0900 Subject: [PATCH 14/50] =?UTF-8?q?fix:=20test:=20phpcs=E3=82=A8=E3=83=A9?= =?UTF-8?q?=E3=83=BC=E4=BF=AE=E6=AD=A3=20https://github.com/NetCommons3/Ne?= =?UTF-8?q?tCommons3/issues/1468?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Controller/TopicFrameSettingsController.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Controller/TopicFrameSettingsController.php b/Controller/TopicFrameSettingsController.php index fd060ac..7ebcaea 100644 --- a/Controller/TopicFrameSettingsController.php +++ b/Controller/TopicFrameSettingsController.php @@ -82,7 +82,7 @@ class TopicFrameSettingsController extends TopicsAppController { * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ public function edit() { - $this->RoomsForm->setRoomsForCheckbox(array(), array('limit'=> 100)); + $this->RoomsForm->setRoomsForCheckbox(array(), array('limit' => 100)); $this->PluginsForm->setPluginsRoomForCheckbox($this, $this->PluginsForm->findOptions); $pluginKeys = []; From d1c6101e224fc62c5b34a11cd397366cd7056e99 Mon Sep 17 00:00:00 2001 From: s-nakajima Date: Wed, 13 Nov 2019 14:18:14 +0900 Subject: [PATCH 15/50] =?UTF-8?q?change:=20=E3=83=9D=E3=83=83=E3=83=97?= =?UTF-8?q?=E3=82=AA=E3=83=BC=E3=83=90=E3=81=A7=E8=A1=A8=E7=A4=BA=E3=81=99?= =?UTF-8?q?=E3=82=8B=E3=83=98=E3=83=AB=E3=83=97=E3=81=AE=E3=82=A2=E3=82=A4?= =?UTF-8?q?=E3=82=B3=E3=83=B3=E3=81=AF=E3=80=81info=E3=81=A8=E3=81=99?= =?UTF-8?q?=E3=82=8B=E3=82=88=E3=81=86=E3=81=AB=E4=BF=AE=E6=AD=A3=20https:?= =?UTF-8?q?//github.com/researchmap/RmNetCommons3/issues/1011?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- View/Helper/TopicsHelper.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/View/Helper/TopicsHelper.php b/View/Helper/TopicsHelper.php index 1ff6a97..48dfe53 100644 --- a/View/Helper/TopicsHelper.php +++ b/View/Helper/TopicsHelper.php @@ -328,7 +328,7 @@ public function rssSettingHelp($content = '', $placement = 'bottom') { $html .= __d('topics', 'Can use an embedded keyword in the channel title line and summary') . ' '; $html .= ''; - $html .= ''; + $html .= ''; $html .= ''; $html .= ''; From b344f62310616ad0fdb387932257b0774779f855 Mon Sep 17 00:00:00 2001 From: s-nakajima Date: Sat, 14 Mar 2020 15:27:36 +0900 Subject: [PATCH 16/50] =?UTF-8?q?change:=20test:=20travis.yml=E3=81=8B?= =?UTF-8?q?=E3=82=89php5.4,5.5=E3=82=92=E5=89=8A=E9=99=A4=E3=80=82php7.3,7?= =?UTF-8?q?.4=E3=82=92=E8=BF=BD=E5=8A=A0=20https://github.com/NetCommons3/?= =?UTF-8?q?NetCommons3/issues/1560?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .travis.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 1420f4b..65d7f59 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,12 +1,12 @@ language: php php: - - 5.4 - - 5.5 - 5.6 - 7.0 - 7.1 - 7.2 + - 7.3 + - 7.4 sudo: false dist: trusty From 15968ead89a4832a5440b6c0c71565411a28a91c Mon Sep 17 00:00:00 2001 From: s-nakajima Date: Sat, 8 Aug 2020 16:21:33 +0900 Subject: [PATCH 17/50] =?UTF-8?q?change:=20test:=20Travis=E3=81=8B?= =?UTF-8?q?=E3=82=89PHP5.6=E3=82=92=E5=89=8A=E9=99=A4,php72=E4=BB=A5?= =?UTF-8?q?=E9=99=8D=E3=81=A7UnitTest=E3=81=A7Warning=E3=81=8C=E5=87=BA?= =?UTF-8?q?=E3=82=8B=E3=81=9F=E3=82=81=E4=BF=AE=E6=AD=A3=20https://github.?= =?UTF-8?q?com/NetCommons3/NetCommons3/issues/1588?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .travis.yml | 1 - phpunit.xml.dist | 6 ++++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 65d7f59..a049e43 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,7 +1,6 @@ language: php php: - - 5.6 - 7.0 - 7.1 - 7.2 diff --git a/phpunit.xml.dist b/phpunit.xml.dist index fea8884..a98ea3e 100644 --- a/phpunit.xml.dist +++ b/phpunit.xml.dist @@ -1,5 +1,11 @@ + + + + + + app/Plugin/Topics From 2f850b67cb015a8a299dfd03660f3536781de258 Mon Sep 17 00:00:00 2001 From: s-nakajima Date: Wed, 26 Aug 2020 20:22:46 +0900 Subject: [PATCH 18/50] change: Version number to 3.3.2 --- VERSION.txt | 1 + 1 file changed, 1 insertion(+) create mode 100644 VERSION.txt diff --git a/VERSION.txt b/VERSION.txt new file mode 100644 index 0000000..4772543 --- /dev/null +++ b/VERSION.txt @@ -0,0 +1 @@ +3.3.2 From 9e21f4adf885fa650cc5e0a42d806e1ac3b7f0b1 Mon Sep 17 00:00:00 2001 From: s-nakajima Date: Sun, 13 Dec 2020 20:17:39 +0900 Subject: [PATCH 19/50] =?UTF-8?q?fix:=20test:=20TravisCI=E3=81=AEphp7.3?= =?UTF-8?q?=E3=81=A7=E3=82=A8=E3=83=A9=E3=83=BC=E3=81=8C=E5=87=BA=E3=82=8B?= =?UTF-8?q?=E3=81=9F=E3=82=81=E4=BF=AE=E6=AD=A3=20https://github.com/NetCo?= =?UTF-8?q?mmons3/NetCommons3/issues/1618?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index a049e43..fdc05a3 100644 --- a/.travis.yml +++ b/.travis.yml @@ -4,7 +4,7 @@ php: - 7.0 - 7.1 - 7.2 - - 7.3 + - 7.3.24 - 7.4 sudo: false From 4f6496df54a4a4c981a957b876893bb9fdbdb415 Mon Sep 17 00:00:00 2001 From: s-nakajima Date: Fri, 8 Jan 2021 16:33:19 +0900 Subject: [PATCH 20/50] =?UTF-8?q?change:=20=E6=96=B0=E7=9D=80=E6=83=85?= =?UTF-8?q?=E5=A0=B1=E3=81=AB=E3=82=B5=E3=83=A0=E3=83=8D=E3=82=A4=E3=83=AB?= =?UTF-8?q?=E3=82=92=E8=A1=A8=E7=A4=BA=E3=81=99=E3=82=8B=E3=81=9F=E3=82=81?= =?UTF-8?q?=E3=81=AE=E7=99=BB=E9=8C=B2=E5=87=A6=E7=90=86=E8=BF=BD=E5=8A=A0?= =?UTF-8?q?=20https://github.com/NetCommons3/NetCommons3/issues/1620?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Config/Migration/1609659295_add_image_url.php | 68 +++++++++++++++++++ ...610073630_add_column_display_thumbnail.php | 68 +++++++++++++++++++ Config/Schema/schema.php | 2 + Model/Behavior/TopicsBaseBehavior.php | 42 ++++++++++++ Model/Topic.php | 5 ++ 5 files changed, 185 insertions(+) create mode 100644 Config/Migration/1609659295_add_image_url.php create mode 100644 Config/Migration/1610073630_add_column_display_thumbnail.php diff --git a/Config/Migration/1609659295_add_image_url.php b/Config/Migration/1609659295_add_image_url.php new file mode 100644 index 0000000..d862f2d --- /dev/null +++ b/Config/Migration/1609659295_add_image_url.php @@ -0,0 +1,68 @@ + + * @link http://www.netcommons.org NetCommons Project + * @license http://www.netcommons.org/license.txt NetCommons License + * @copyright Copyright 2014, NetCommons Project + */ + +App::uses('NetCommonsMigration', 'NetCommons.Config/Migration'); + +/** + * 新着情報にサムネイルを表示する + * + * @author Shohei Nakajima + * @package NetCommons\Topics\Config\Migration + * @see https://github.com/NetCommons3/NetCommons3/issues/1620 + */ +class AddImageUrl extends NetCommonsMigration { + +/** + * Migration description + * + * @var string + */ + public $description = 'add_image_url'; + +/** + * Actions to be performed + * + * @var array $migration + */ + public $migration = array( + 'up' => array( + 'create_field' => array( + 'topics' => array( + 'thumbnail_path' => array('type' => 'string', 'null' => true, 'default' => null, 'collate' => 'utf8_general_ci', 'charset' => 'utf8', 'after' => 'title_icon'), + ), + ), + ), + 'down' => array( + 'drop_field' => array( + 'topics' => array('thumbnail_path'), + ), + ), + ); + +/** + * Before migration callback + * + * @param string $direction Direction of migration process (up or down) + * @return bool Should process continue + */ + public function before($direction) { + return true; + } + +/** + * After migration callback + * + * @param string $direction Direction of migration process (up or down) + * @return bool Should process continue + */ + public function after($direction) { + return true; + } +} diff --git a/Config/Migration/1610073630_add_column_display_thumbnail.php b/Config/Migration/1610073630_add_column_display_thumbnail.php new file mode 100644 index 0000000..97e3e71 --- /dev/null +++ b/Config/Migration/1610073630_add_column_display_thumbnail.php @@ -0,0 +1,68 @@ + + * @link http://www.netcommons.org NetCommons Project + * @license http://www.netcommons.org/license.txt NetCommons License + * @copyright Copyright 2014, NetCommons Project + */ + +App::uses('NetCommonsMigration', 'NetCommons.Config/Migration'); + +/** + * 新着情報にサムネイルを表示する + * + * @author Shohei Nakajima + * @package NetCommons\Topics\Config\Migration + * @see https://github.com/NetCommons3/NetCommons3/issues/1620 + */ +class AddColumnDisplayThumbnail extends NetCommonsMigration { + +/** + * Migration description + * + * @var string + */ + public $description = 'add_column_display_thumbnail'; + +/** + * Actions to be performed + * + * @var array $migration + */ + public $migration = array( + 'up' => array( + 'create_field' => array( + 'topic_frame_settings' => array( + 'display_thumbnail' => array('type' => 'boolean', 'null' => false, 'default' => '1', 'after' => 'display_title'), + ), + ), + ), + 'down' => array( + 'drop_field' => array( + 'topic_frame_settings' => array('display_thumbnail'), + ), + ), + ); + +/** + * Before migration callback + * + * @param string $direction Direction of migration process (up or down) + * @return bool Should process continue + */ + public function before($direction) { + return true; + } + +/** + * After migration callback + * + * @param string $direction Direction of migration process (up or down) + * @return bool Should process continue + */ + public function after($direction) { + return true; + } +} diff --git a/Config/Schema/schema.php b/Config/Schema/schema.php index cea5652..7fd308f 100644 --- a/Config/Schema/schema.php +++ b/Config/Schema/schema.php @@ -58,6 +58,7 @@ public function after($event = array()) { 'display_days' => array('type' => 'integer', 'null' => false, 'default' => null, 'length' => 3, 'unsigned' => false), 'display_number' => array('type' => 'integer', 'null' => false, 'default' => null, 'length' => 3, 'unsigned' => false), 'display_title' => array('type' => 'boolean', 'null' => false, 'default' => '1'), + 'display_thumbnail' => array('type' => 'boolean', 'null' => false, 'default' => '1'), 'display_summary' => array('type' => 'boolean', 'null' => false, 'default' => '1'), 'display_room_name' => array('type' => 'boolean', 'null' => false, 'default' => '1'), 'display_category_name' => array('type' => 'boolean', 'null' => false, 'default' => '1'), @@ -205,6 +206,7 @@ public function after($event = array()) { 'plugin_key' => array('type' => 'string', 'null' => false, 'default' => null, 'key' => 'index', 'collate' => 'utf8_general_ci', 'charset' => 'utf8'), 'title' => array('type' => 'string', 'null' => false, 'default' => null, 'collate' => 'utf8_general_ci', 'charset' => 'utf8'), 'title_icon' => array('type' => 'string', 'null' => true, 'default' => null, 'collate' => 'utf8_general_ci', 'charset' => 'utf8'), + 'thumbnail_path' => array('type' => 'string', 'null' => true, 'default' => null, 'collate' => 'utf8_general_ci', 'charset' => 'utf8'), 'summary' => array('type' => 'text', 'null' => true, 'default' => null, 'collate' => 'utf8_general_ci', 'charset' => 'utf8'), 'search_contents' => array('type' => 'text', 'null' => true, 'default' => null, 'collate' => 'utf8_general_ci', 'charset' => 'utf8', 'comment' => '検索対象のシリアライズデータ'), 'counts' => array('type' => 'integer', 'null' => true, 'default' => null, 'unsigned' => false), diff --git a/Model/Behavior/TopicsBaseBehavior.php b/Model/Behavior/TopicsBaseBehavior.php index 8e4d376..2badf86 100644 --- a/Model/Behavior/TopicsBaseBehavior.php +++ b/Model/Behavior/TopicsBaseBehavior.php @@ -10,6 +10,7 @@ */ App::uses('ModelBehavior', 'Model'); +App::uses('WysiwygBehavior', 'Wysiwyg.Model/Behavior'); /** * Topics Behavior @@ -116,6 +117,7 @@ protected function _saveTopic(Model $model) { 'content_key' => Hash::get($model->data, $setting['content_key']), 'content_id' => Hash::get($model->data, $setting['content_id']), 'title' => $this->_parseTitle($model), + 'thumbnail_path' => $this->_parseThumbnailImage($model), 'summary' => $this->_parseContents($model), 'search_contents' => $this->_parseSearchContents($model), 'is_answer' => $setting['is_answer'], @@ -184,6 +186,46 @@ protected function _parseTitle(Model $model) { return $result; } +/** + * 新着のコンテンツからサムネイルにパースする + * + * 自サイトの画像のみ対象とする + * + * self::_saveTopic()から実行される + * + * @param Model $model 呼び出し元のモデル + * @return string + */ + protected function _parseThumbnailImage(Model $model) { + $setting = $this->settings[$model->alias]['fields']; + $result = ''; + + $pattern = '//i'; + $baseUrl = substr(Router::url('/', true), 0, -1); + + foreach ($setting['summary'] as $field) { + $value = (string)Hash::get($model->data, $field); + $matches = []; + if (! preg_match_all($pattern, $value, $matches)) { + continue; + } + + foreach ($matches[1] as $imgUrl) { + $imgUrl = str_replace(WysiwygBehavior::REPLACE_BASE_URL, '', $imgUrl); + $imgUrl = str_replace($baseUrl, '', $imgUrl); + if (substr($imgUrl, 0, 1) !== '/') { + continue; + } + $imgUrl = parse_url($imgUrl, PHP_URL_PATH); + $imgUrl = preg_replace('/\/(thumb|big|small|biggest|medium)$/i', '', $imgUrl); + $result = $imgUrl; + break 2; + } + } + + return $result; + } + /** * 新着のコンテンツにパースする * diff --git a/Model/Topic.php b/Model/Topic.php index 2efd879..cb9b59b 100644 --- a/Model/Topic.php +++ b/Model/Topic.php @@ -445,6 +445,11 @@ public function afterFind($results, $primary = false) { } $results[$key][$this->alias]['url'] = $url; } + if (!empty($results[$key][$this->alias]['thumbnail_path'])) { + $results[$key][$this->alias]['thumbnail_url'] = Router::url( + $value[$this->alias]['thumbnail_path'] . '/thumb', true + ); + } } return $results; } From d2995b77bdcb36e97802a7383a615cd9a449ca99 Mon Sep 17 00:00:00 2001 From: s-nakajima Date: Fri, 8 Jan 2021 17:05:51 +0900 Subject: [PATCH 21/50] =?UTF-8?q?change:=20=E6=96=B0=E7=9D=80=E6=83=85?= =?UTF-8?q?=E5=A0=B1=E3=81=AE=E3=82=B5=E3=83=A0=E3=83=8D=E3=82=A4=E3=83=AB?= =?UTF-8?q?=E8=A1=A8=E7=A4=BA=E5=87=A6=E7=90=86=E8=BF=BD=E5=8A=A0=20https:?= =?UTF-8?q?//github.com/NetCommons3/NetCommons3/issues/1620?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Locale/eng/LC_MESSAGES/topics.pot | 3 +++ Locale/jpn/LC_MESSAGES/topics.po | 3 +++ View/Elements/TopicFrameSettings/edit_form.ctp | 10 ++++++++++ View/Elements/Topics/item.ctp | 18 +++++++++++++----- View/Elements/Topics/item_angularjs.ctp | 17 +++++++++++++---- 5 files changed, 42 insertions(+), 9 deletions(-) diff --git a/Locale/eng/LC_MESSAGES/topics.pot b/Locale/eng/LC_MESSAGES/topics.pot index cbeff1a..9c6e070 100644 --- a/Locale/eng/LC_MESSAGES/topics.pot +++ b/Locale/eng/LC_MESSAGES/topics.pot @@ -83,6 +83,9 @@ msgstr "" msgid "Title" msgstr "" +msgid "Thumbnail" +msgstr "" + #: Topics/View/Elements/TopicFrameSettings/edit_form.ctp:103 msgid "Detail" msgstr "" diff --git a/Locale/jpn/LC_MESSAGES/topics.po b/Locale/jpn/LC_MESSAGES/topics.po index fb7c12c..b5c4583 100644 --- a/Locale/jpn/LC_MESSAGES/topics.po +++ b/Locale/jpn/LC_MESSAGES/topics.po @@ -93,6 +93,9 @@ msgstr "プライベート" msgid "Title" msgstr "件名" +msgid "Thumbnail" +msgstr "サムネイル画像" + msgid "Detail" msgstr "詳細" diff --git a/View/Elements/TopicFrameSettings/edit_form.ctp b/View/Elements/TopicFrameSettings/edit_form.ctp index 1027a70..3aab877 100644 --- a/View/Elements/TopicFrameSettings/edit_form.ctp +++ b/View/Elements/TopicFrameSettings/edit_form.ctp @@ -99,6 +99,16 @@ ?> +
+ NetCommonsForm->checkbox('TopicFrameSetting.display_thumbnail', array( + 'type' => 'checkbox', + 'label' => __d('topics', 'Thumbnail'), + 'inline' => false, + )); + ?> +
+
NetCommonsForm->checkbox('TopicFrameSetting.display_summary', array( diff --git a/View/Elements/Topics/item.ctp b/View/Elements/Topics/item.ctp index 6cd0044..46b2801 100644 --- a/View/Elements/Topics/item.ctp +++ b/View/Elements/Topics/item.ctp @@ -57,10 +57,18 @@
- - -
- +
+
+ +
+ +
+
- + +
+ +
+ +
diff --git a/View/Elements/Topics/item_angularjs.ctp b/View/Elements/Topics/item_angularjs.ctp index 5ce4622..c3a0a9d 100644 --- a/View/Elements/Topics/item_angularjs.ctp +++ b/View/Elements/Topics/item_angularjs.ctp @@ -58,9 +58,18 @@
- -
- {{item.Topic.display_summary}} +
+
+ +
+ {{item.Topic.display_summary}} +
+
- + +
+ +
+ +
From 5bb1dac110e9f3fa7130948fa762d0d49e2ba629 Mon Sep 17 00:00:00 2001 From: s-nakajima Date: Fri, 15 Jan 2021 18:39:24 +0900 Subject: [PATCH 22/50] =?UTF-8?q?change:=20=E3=82=B5=E3=83=A0=E3=83=8D?= =?UTF-8?q?=E3=82=A4=E3=83=AB=E7=94=BB=E5=83=8F=E3=81=AB=E8=A8=98=E4=BA=8B?= =?UTF-8?q?=E3=81=AE=E3=83=AA=E3=83=B3=E3=82=AF=E3=82=92=E4=BB=98=E4=B8=8E?= =?UTF-8?q?=E3=81=99=E3=82=8B=E3=82=88=E3=81=86=E3=81=AB=E4=BF=AE=E6=AD=A3?= =?UTF-8?q?=20https://github.com/NetCommons3/NetCommons3/issues/1620?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- View/Elements/Topics/item.ctp | 4 +++- View/Elements/Topics/item_angularjs.ctp | 4 +++- webroot/js/topics.js | 2 +- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/View/Elements/Topics/item.ctp b/View/Elements/Topics/item.ctp index 46b2801..e20480b 100644 --- a/View/Elements/Topics/item.ctp +++ b/View/Elements/Topics/item.ctp @@ -67,7 +67,9 @@
- + + +
diff --git a/View/Elements/Topics/item_angularjs.ctp b/View/Elements/Topics/item_angularjs.ctp index c3a0a9d..7e65313 100644 --- a/View/Elements/Topics/item_angularjs.ctp +++ b/View/Elements/Topics/item_angularjs.ctp @@ -68,7 +68,9 @@
- + + +
diff --git a/webroot/js/topics.js b/webroot/js/topics.js index 8c2f971..7658412 100644 --- a/webroot/js/topics.js +++ b/webroot/js/topics.js @@ -117,7 +117,7 @@ NetCommonsApp.controller('TopicsController', $location.hash( 'page:' + ($scope.paging['page']) + '&' + 'frame_id:' + $scope.params['frame_id'] ); - $window.location.href = $event.target.href; + $window.location.href = $event.currentTarget.href; $event.preventDefault(); }; From 1448b8fcf4ba5bd555bcc757ad1d9b18122d20ad Mon Sep 17 00:00:00 2001 From: s-nakajima Date: Sat, 23 Jan 2021 14:07:44 +0900 Subject: [PATCH 23/50] =?UTF-8?q?add:=20release=E3=82=BF=E3=82=B0=E4=BB=98?= =?UTF-8?q?=E3=81=91=E3=81=AEgithub=20action=E3=82=92=E8=BF=BD=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit https://github.com/NetCommons3/NetCommons3/issues/1619 --- .github/workflows/release.yml | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..a3225bc --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,28 @@ +on: + push: + # Sequence of patterns matched against refs/tags + tags: + - '3*' + +name: Create Release + +jobs: + build: + name: Create Release + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v2 + + - name: Create Release + id: create_release + uses: actions/create-release@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token + with: + tag_name: ${{ github.ref }} + release_name: ${{ github.ref }} + body: | + NetCommons ${{ github.ref }} released. + draft: false + prerelease: false From d02ff6e588caa53a8e49d6c6c8fd2523ee4a094b Mon Sep 17 00:00:00 2001 From: s-nakajima Date: Sat, 23 Jan 2021 14:07:49 +0900 Subject: [PATCH 24/50] change: Version number to 3.3.3 --- VERSION.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/VERSION.txt b/VERSION.txt index 4772543..619b537 100644 --- a/VERSION.txt +++ b/VERSION.txt @@ -1 +1 @@ -3.3.2 +3.3.3 From 8308818cb2dc0bb6e255d1193516be5c8141b229 Mon Sep 17 00:00:00 2001 From: s-nakajima Date: Mon, 15 Mar 2021 12:48:01 +0900 Subject: [PATCH 25/50] =?UTF-8?q?fix:=20=E7=B4=A0=E3=81=AE=E3=82=B5?= =?UTF-8?q?=E3=82=A4=E3=82=BA=E3=81=8C=E8=A1=A8=E7=A4=BA=E3=81=8C=E3=81=95?= =?UTF-8?q?=E3=82=8C=E3=82=8B=E3=81=93=E3=81=A8=E3=81=8C=E7=A8=80=E3=81=AB?= =?UTF-8?q?=E3=81=82=E3=82=8B=E3=81=9F=E3=82=81=E3=80=81=E5=BF=B5=E3=81=AE?= =?UTF-8?q?=E3=81=9F=E3=82=81max-width=E3=82=92=E3=82=BB=E3=83=83=E3=83=88?= =?UTF-8?q?=E3=81=99=E3=82=8B=20https://github.com/NetCommons3/NetCommons3?= =?UTF-8?q?/issues/1620?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- View/Elements/Topics/item.ctp | 2 +- View/Elements/Topics/item_angularjs.ctp | 2 +- webroot/css/style.css | 5 +++++ 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/View/Elements/Topics/item.ctp b/View/Elements/Topics/item.ctp index e20480b..e64e76c 100644 --- a/View/Elements/Topics/item.ctp +++ b/View/Elements/Topics/item.ctp @@ -68,7 +68,7 @@ diff --git a/View/Elements/Topics/item_angularjs.ctp b/View/Elements/Topics/item_angularjs.ctp index 7e65313..4598e33 100644 --- a/View/Elements/Topics/item_angularjs.ctp +++ b/View/Elements/Topics/item_angularjs.ctp @@ -69,7 +69,7 @@ diff --git a/webroot/css/style.css b/webroot/css/style.css index 2b579b9..f5682b3 100644 --- a/webroot/css/style.css +++ b/webroot/css/style.css @@ -53,6 +53,11 @@ article .topic-status.small > .label { -webkit-line-clamp: 3; } +.topic-thumbnail { + max-width: 80px; + max-height: 80px; +} + .frame.nc-content-list article h2.topic-plugin-name, .frame.nc-content-list article h2.topic-room-name { margin-top: 16px; From c52c2acafd7af6848d4531557be2531f7d29dfab Mon Sep 17 00:00:00 2001 From: s-nakajima Date: Mon, 15 Mar 2021 18:12:31 +0900 Subject: [PATCH 26/50] =?UTF-8?q?fix:=20=E3=82=BF=E3=82=A4=E3=83=88?= =?UTF-8?q?=E3=83=AB=E3=82=A2=E3=82=A4=E3=82=B3=E3=83=B3=E3=81=AF=E9=99=A4?= =?UTF-8?q?=E5=A4=96=E3=81=99=E3=82=8B=20https://github.com/NetCommons3/Ne?= =?UTF-8?q?tCommons3/issues/1620?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Model/Behavior/TopicsBaseBehavior.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Model/Behavior/TopicsBaseBehavior.php b/Model/Behavior/TopicsBaseBehavior.php index 2badf86..6ae9565 100644 --- a/Model/Behavior/TopicsBaseBehavior.php +++ b/Model/Behavior/TopicsBaseBehavior.php @@ -213,7 +213,8 @@ protected function _parseThumbnailImage(Model $model) { foreach ($matches[1] as $imgUrl) { $imgUrl = str_replace(WysiwygBehavior::REPLACE_BASE_URL, '', $imgUrl); $imgUrl = str_replace($baseUrl, '', $imgUrl); - if (substr($imgUrl, 0, 1) !== '/') { + if (substr($imgUrl, 0, 1) !== '/' || + strpos($imgUrl, 'img/title_icon') !== false) { continue; } $imgUrl = parse_url($imgUrl, PHP_URL_PATH); From 58d3ef4a2fe33aee7b6608686cdc1221706fd473 Mon Sep 17 00:00:00 2001 From: s-nakajima Date: Tue, 20 Apr 2021 16:44:41 +0900 Subject: [PATCH 27/50] =?UTF-8?q?fix:=20=E5=9B=9E=E8=A6=A7=E6=9D=BF?= =?UTF-8?q?=E7=AD=89=E3=81=8C=E6=96=B0=E7=9D=80=E3=81=AB=E8=BC=89=E3=82=89?= =?UTF-8?q?=E3=81=AA=E3=81=84=E3=83=90=E3=82=B0=E4=BF=AE=E6=AD=A3=20https:?= =?UTF-8?q?//github.com/NetCommons3/NetCommons3/issues/1636?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Model/Topic.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Model/Topic.php b/Model/Topic.php index cb9b59b..7bf3272 100644 --- a/Model/Topic.php +++ b/Model/Topic.php @@ -726,7 +726,7 @@ private function __bindModel() { 'className' => 'Blocks.BlocksLanguage', 'fields' => array('name'), 'foreignKey' => false, - 'type' => 'INNER', + 'type' => 'LEFT', 'conditions' => array( 'BlocksLanguage.block_id' . ' = ' . $this->alias . '.block_id', 'BlocksLanguage.language_id' => Current::read('Language.id', '0'), From 42ee663244531add753b7e7b3dcc1ccd301591b8 Mon Sep 17 00:00:00 2001 From: s-nakajima Date: Wed, 19 May 2021 19:03:10 +0900 Subject: [PATCH 28/50] =?UTF-8?q?test:=20Fixture=E3=81=ABsort=5Fkey?= =?UTF-8?q?=E3=81=8C=E3=81=AA=E3=81=8B=E3=81=A3=E3=81=9F=E3=81=9F=E3=82=81?= =?UTF-8?q?=E3=80=81=E7=92=B0=E5=A2=83=E3=81=AB=E5=BF=9C=E3=81=98=E3=81=A6?= =?UTF-8?q?UnitTest=E3=81=8C=E5=A4=B1=E6=95=97=E3=81=99=E3=82=8B=E3=81=93?= =?UTF-8?q?=E3=81=A8=E3=81=8C=E3=81=82=E3=82=8B=E3=81=AE=E3=81=A7=E4=BF=AE?= =?UTF-8?q?=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Topic/PrivateGetRoomsConditionsTest.php | 28 +++++++++---------- Test/Fixture/Room4topicsFixture.php | 12 ++++++++ 2 files changed, 26 insertions(+), 14 deletions(-) diff --git a/Test/Case/Model/Topic/PrivateGetRoomsConditionsTest.php b/Test/Case/Model/Topic/PrivateGetRoomsConditionsTest.php index a86cb78..e4d2d59 100644 --- a/Test/Case/Model/Topic/PrivateGetRoomsConditionsTest.php +++ b/Test/Case/Model/Topic/PrivateGetRoomsConditionsTest.php @@ -155,8 +155,8 @@ public function dataProvider() { 0 => array( 'Topic.room_id' => array( 0 => '2', - 1 => '4', - 2 => '5', + 1 => '5', + 2 => '4', 3 => '11', 4 => '12', ), @@ -197,8 +197,8 @@ public function dataProvider() { 2 => array( 'Block.room_id' => array( 0 => '2', - 1 => '4', - 2 => '5', + 1 => '5', + 2 => '4', 3 => '11', 4 => '12', ), @@ -217,8 +217,8 @@ public function dataProvider() { 0 => array( 'Topic.room_id' => array( 0 => '2', - 1 => '4', - 2 => '5', + 1 => '5', + 2 => '4', 3 => '11', 4 => '12', ), @@ -259,8 +259,8 @@ public function dataProvider() { 2 => array( 'Block.room_id' => array( 0 => '2', - 1 => '4', - 2 => '5', + 1 => '5', + 2 => '4', 3 => '11', ), ), @@ -279,8 +279,8 @@ public function dataProvider() { 0 => array( 'Topic.room_id' => array( 0 => '2', - 1 => '4', - 2 => '5', + 1 => '5', + 2 => '4', 3 => '11', ), 'Topic.is_latest' => true, @@ -362,8 +362,8 @@ public function dataProvider() { 'OR' => array( 'Topic.room_id' => array( 0 => '2', - 1 => '4', - 2 => '5', + 1 => '5', + 2 => '4', 3 => '12', ), 'TopicReadable.user_id' => $userId, @@ -429,8 +429,8 @@ public function dataProvider() { 'OR' => array( 'Topic.room_id' => array( 0 => '2', - 1 => '4', - 2 => '5', + 1 => '5', + 2 => '4', ), 'TopicReadable.user_id' => $userId, ), diff --git a/Test/Fixture/Room4topicsFixture.php b/Test/Fixture/Room4topicsFixture.php index df10b6f..386b0f6 100644 --- a/Test/Fixture/Room4topicsFixture.php +++ b/Test/Fixture/Room4topicsFixture.php @@ -53,6 +53,7 @@ class Room4topicsFixture extends RoomFixture { 'default_participation' => '1', 'page_layout_permitted' => '1', 'theme' => 'Default', + 'sort_key' => '~00000001-00000001', ), //パブリックスペース、パブリックルーム(room_id=5) array( @@ -68,6 +69,7 @@ class Room4topicsFixture extends RoomFixture { 'default_participation' => true, 'page_layout_permitted' => true, 'theme' => null, + 'sort_key' => '~00000001-00000001-00000001', ), //プライベート @@ -84,6 +86,7 @@ class Room4topicsFixture extends RoomFixture { 'default_participation' => '0', 'page_layout_permitted' => '0', 'theme' => 'Default', + 'sort_key' => '~00000001-00000002', ), //プライベートルーム、管理者(room_id=6) array( @@ -99,6 +102,7 @@ class Room4topicsFixture extends RoomFixture { 'default_participation' => '0', 'page_layout_permitted' => '0', 'theme' => null, + 'sort_key' => '~00000001-00000002-00000001', ), //プライベートルーム、編集長(room_id=7) array( @@ -114,6 +118,7 @@ class Room4topicsFixture extends RoomFixture { 'default_participation' => '0', 'page_layout_permitted' => '0', 'theme' => null, + 'sort_key' => '~00000001-00000002-00000002', ), //プライベートルーム、編集者(room_id=8) array( @@ -129,6 +134,7 @@ class Room4topicsFixture extends RoomFixture { 'default_participation' => '0', 'page_layout_permitted' => '0', 'theme' => null, + 'sort_key' => '~00000001-00000002-00000003', ), //プライベートルーム、一般1(room_id=9) array( @@ -144,6 +150,7 @@ class Room4topicsFixture extends RoomFixture { 'default_participation' => '0', 'page_layout_permitted' => '0', 'theme' => null, + 'sort_key' => '~00000001-00000002-00000004', ), //プライベートルーム、ゲスト(room_id=10) array( @@ -159,6 +166,7 @@ class Room4topicsFixture extends RoomFixture { 'default_participation' => '0', 'page_layout_permitted' => '0', 'theme' => null, + 'sort_key' => '~00000001-00000002-00000005', ), //プライベートルーム、一般2(room_id=13) array( @@ -174,6 +182,7 @@ class Room4topicsFixture extends RoomFixture { 'default_participation' => '0', 'page_layout_permitted' => '0', 'theme' => null, + 'sort_key' => '~00000001-00000002-00000006', ), //コミュニティスペース @@ -190,6 +199,7 @@ class Room4topicsFixture extends RoomFixture { 'default_participation' => '1', 'page_layout_permitted' => '1', 'theme' => 'Default', + 'sort_key' => '~00000001-00000003', ), //コミュニティスペース、ルーム1(room_id=11) array( @@ -205,6 +215,7 @@ class Room4topicsFixture extends RoomFixture { 'default_participation' => '0', 'page_layout_permitted' => null, 'theme' => null, + 'sort_key' => '~00000001-00000003-00000001', ), //コミュニティスペース、ルーム2(room_id=12) array( @@ -220,6 +231,7 @@ class Room4topicsFixture extends RoomFixture { 'default_participation' => '0', 'page_layout_permitted' => null, 'theme' => null, + 'sort_key' => '~00000001-00000003-00000002', ), ); } From 33f2fc0b46a8e6790022c53bfde8a845e096f6ee Mon Sep 17 00:00:00 2001 From: s-nakajima Date: Tue, 27 Jul 2021 15:36:09 +0900 Subject: [PATCH 29/50] =?UTF-8?q?fix:=20=E3=83=96=E3=83=AD=E3=82=B0?= =?UTF-8?q?=E3=81=AE=E3=82=AB=E3=83=86=E3=82=B4=E3=83=AA=E3=83=BC=E3=82=92?= =?UTF-8?q?=E6=8C=87=E5=AE=9A=E3=81=97=E3=81=A6=E3=80=81=E3=81=9D=E3=81=AE?= =?UTF-8?q?=E5=BE=8C=E3=80=81=E3=82=AB=E3=83=86=E3=82=B4=E3=83=AA=E3=83=BC?= =?UTF-8?q?=E9=81=B8=E6=8A=9E=E3=81=AA=E3=81=97=E3=81=AB=E3=81=97=E3=81=A6?= =?UTF-8?q?=E3=82=82=E6=96=B0=E7=9D=80=E6=83=85=E5=A0=B1=E3=81=AF=E5=8F=A4?= =?UTF-8?q?=E3=81=84=E3=82=AB=E3=83=86=E3=82=B4=E3=83=AA=E3=83=BC=E3=82=92?= =?UTF-8?q?=E6=8C=87=E5=AE=9A=E3=81=97=E3=81=A6=E3=81=84=E3=82=8B=E3=83=90?= =?UTF-8?q?=E3=82=B0=E4=BF=AE=E6=AD=A3=20https://github.com/NetCommons3/Ne?= =?UTF-8?q?tCommons3/issues/1652?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Model/Behavior/TopicsBaseBehavior.php | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/Model/Behavior/TopicsBaseBehavior.php b/Model/Behavior/TopicsBaseBehavior.php index 6ae9565..25ca99d 100644 --- a/Model/Behavior/TopicsBaseBehavior.php +++ b/Model/Behavior/TopicsBaseBehavior.php @@ -306,7 +306,12 @@ protected function _hasSaveData(Model $model, $field) { $pathKey = $setting[$field]; } - if (array_key_exists($field, $data) || Hash::get($model->data, $pathKey) !== null) { + list($modleByData, $fieldByData) = pluginSplit($pathKey); + + if (array_key_exists($field, $data) || + isset($model->data[$modleByData]) && + array_key_exists($fieldByData, $model->data[$modleByData]) || + Hash::get($model->data, $pathKey) !== null) { return true; } else { return false; @@ -332,8 +337,13 @@ protected function _getSaveData(Model $model, $field) { $pathKey = $setting[$field]; } + list($modleByData, $fieldByData) = pluginSplit($pathKey); + if (array_key_exists($field, $data)) { return Hash::get($data, $field); + } elseif (isset($model->data[$modleByData]) && + array_key_exists($fieldByData, $model->data[$modleByData])) { + return $model->data[$modleByData][$fieldByData]; } elseif (Hash::get($model->data, $pathKey, false) !== false) { return Hash::get($model->data, $pathKey); } else { From 892922070777e7c2f033e7385abc7ae4aaf11b7d Mon Sep 17 00:00:00 2001 From: s-nakajima Date: Mon, 2 Aug 2021 11:12:46 +0900 Subject: [PATCH 30/50] =?UTF-8?q?change:=20test:=20TravisCI=E3=81=8B?= =?UTF-8?q?=E3=82=89GithubAction=E3=81=AB=E5=A4=89=E6=9B=B4=20https://gith?= =?UTF-8?q?ub.com/NetCommons3/NetCommons3/issues/1650?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/tests.yml | 137 ++++++++++++++++++++++++++++++++++++ .travis.yml | 35 --------- README.md | 11 +-- phpunit.xml.dist | 4 +- 4 files changed, 141 insertions(+), 46 deletions(-) create mode 100644 .github/workflows/tests.yml delete mode 100644 .travis.yml diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml new file mode 100644 index 0000000..d6bd01e --- /dev/null +++ b/.github/workflows/tests.yml @@ -0,0 +1,137 @@ +on: + push: + branches: + - main + - master + - availability + pull_request: + branches: + - main + - master + - availability + +name: tests + +jobs: + tests: + name: tests + runs-on: ubuntu-18.04 + strategy: + matrix: + php: [ '7.1', '7.2', '7.3', '7.4' ] + + env: + NC3_BUILD_DIR: "/opt/nc3" + NC3_DOCKER_DIR: "/opt/docker" + NC3_GIT_URL: "git://github.com/NetCommons3/NetCommons3.git" + NC3_GIT_BRANCH: "master" + PLUGIN_BUILD_DIR: ${{ github.workspace }} + PHP_VERSION: ${{ matrix.php }} + MYSQL_ROOT_PASSWORD: root + MYSQL_DATABASE: cakephp_test + + steps: + - uses: actions/checkout@v2 + + - name: environment + run: | + echo "GITHUB_WORKSPACE=${GITHUB_WORKSPACE}" + echo "PLUGIN_BUILD_DIR=${PLUGIN_BUILD_DIR}" + echo "PHP_VERSION=${PHP_VERSION}" + ls -al ${PLUGIN_BUILD_DIR} + + - name: docker-compose install + run: | + curl -L https://github.com/docker/compose/releases/download/1.11.2/docker-compose-`uname -s`-`uname -m` > ~/docker-compose + chmod +x ~/docker-compose + sudo mv ~/docker-compose /usr/local/bin/docker-compose + docker-compose --version + + - name: git clone nc3 + run: git clone -b ${NC3_GIT_BRANCH} ${NC3_GIT_URL} ${NC3_BUILD_DIR} + + - name: git clone nc3_docker + run: git clone https://github.com/NetCommons3/nc3app-docker.git ${NC3_DOCKER_DIR} + + - name: docker-compose start + run: | + cd ${NC3_DOCKER_DIR} + docker-compose up -d + docker-compose start + + - run: docker ps + + - name: check libraries + run: | + cd ${NC3_DOCKER_DIR} + docker-compose exec -T nc3app bash /opt/scripts/start-on-docker.sh + + - name: nc3 build + run: | + cd ${NC3_DOCKER_DIR} + docker-compose exec -T nc3app bash /opt/scripts/app-build.sh + + - name: phpcs (PHP CodeSniffer) + run: | + cd ${NC3_DOCKER_DIR} + docker-compose exec -T nc3app bash /opt/scripts/phpcs.sh + + - name: phpmd (PHP Mess Detector) + run: | + cd ${NC3_DOCKER_DIR} + docker-compose exec -T nc3app bash /opt/scripts/phpmd.sh + + - name: phpcpd (PHP Copy/Paste Detector) + run: | + cd ${NC3_DOCKER_DIR} + docker-compose exec -T nc3app bash /opt/scripts/phpcpd.sh + + - name: gjslint (JavaScript Style Check) + run: | + cd ${NC3_DOCKER_DIR} + docker-compose exec -T nc3app bash /opt/scripts/gjslint.sh + + - name: phpdoc (PHP Documentor) + run: | + cd ${NC3_DOCKER_DIR} + docker-compose exec -T nc3app bash /opt/scripts/phpdoc.sh + + - name: phpunit (PHP UnitTest) + run: | + cd ${NC3_DOCKER_DIR} + docker-compose exec -T nc3app bash /opt/scripts/phpunit.sh + sudo -s chmod a+w -R ${NC3_BUILD_DIR}/build + + - name: push coveralls + env: + COVERALLS_REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }} + COVERALLS_FLAG_NAME: ${{ matrix.php }} + run: | + cd ${NC3_BUILD_DIR} + ls -la ${NC3_BUILD_DIR} + vendors/bin/php-coveralls --coverage_clover=build/logs/clover.xml -v + + - name: docker-compose remove + run: | + cd ${NC3_DOCKER_DIR} + docker-compose rm -f + + # テスト成功時はこちらのステップが実行される + - name: Slack Notification on Success + if: success() + uses: rtCamp/action-slack-notify@v2.2.0 + env: + SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }} + SLACK_CHANNEL: notify-netcommons3 + SLACK_TITLE: "${{ github.repository }}(${{ matrix.php }})" + SLACK_COLOR: good + + # テスト失敗時はこちらのステップが実行される + - name: Slack Notification on Failure + uses: rtCamp/action-slack-notify@v2.2.0 + if: failure() + env: + SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }} + SLACK_CHANNEL: notify-netcommons3 + SLACK_TITLE: "${{ github.repository }}(${{ matrix.php }})" + SLACK_COLOR: danger diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index fdc05a3..0000000 --- a/.travis.yml +++ /dev/null @@ -1,35 +0,0 @@ -language: php - -php: - - 7.0 - - 7.1 - - 7.2 - - 7.3.24 - - 7.4 - -sudo: false -dist: trusty - -env: - - NETCOMMONS_VERSION=master DB=mysql - -before_script: - - export NETCOMMONS_BUILD_DIR=`dirname $TRAVIS_BUILD_DIR`/NetCommons3 - - git clone git://github.com/NetCommons3/NetCommons3 $NETCOMMONS_BUILD_DIR - - cd $NETCOMMONS_BUILD_DIR - - git checkout $NETCOMMONS_VERSION - - travis_wait . tools/build/plugins/cakephp/travis/pre.sh - - . tools/build/plugins/cakephp/travis/environment.sh - -script: - - . tools/build/plugins/cakephp/travis/main.sh - -after_script: - - . tools/build/plugins/cakephp/travis/post.sh - -notifications: - email: - recipients: - - netcommons3@googlegroups.com - on_success: never # default: change - on_failure: always # default: always diff --git a/README.md b/README.md index b9c88cb..25e4e9a 100644 --- a/README.md +++ b/README.md @@ -1,11 +1,6 @@ Topics ============== -Topics for NetComomns3 - -[![Build Status](https://api.travis-ci.org/NetCommons3/Topics.png?branch=master)](https://travis-ci.org/NetCommons3/Topics) -[![Coverage Status](https://coveralls.io/repos/NetCommons3/Topics/badge.png?branch=master)](https://coveralls.io/r/NetCommons3/Topics?branch=master) - -| dependencies | status | -| ------------- | ------ | -| composer.json | [![Dependency Status](https://www.versioneye.com/user/projects/(versioneye_project_ID)/badge.png)](https://www.versioneye.com/user/projects/(versioneye_project_ID)) | +[![Tests Status](https://github.com/NetCommons3/Topics/actions/workflows/tests.yml/badge.svg?branch=master)](https://github.com/NetCommons3/Topics/actions/workflows/tests.yml) +[![Coverage Status](https://coveralls.io/repos/NetCommons3/Topics/badge.svg?branch=master)](https://coveralls.io/r/NetCommons3/Topics?branch=master) +[![Stable Version](https://img.shields.io/packagist/v/netcommons/topics.svg?label=stable)](https://packagist.org/packages/netcommons/topics) diff --git a/phpunit.xml.dist b/phpunit.xml.dist index a98ea3e..f2c6cae 100644 --- a/phpunit.xml.dist +++ b/phpunit.xml.dist @@ -3,9 +3,6 @@ - - - app/Plugin/Topics @@ -20,5 +17,6 @@ +
From 2c43123d2215c2947b58c72fea94edbafeff765f Mon Sep 17 00:00:00 2001 From: s-nakajima Date: Wed, 11 Aug 2021 15:19:44 +0900 Subject: [PATCH 31/50] =?UTF-8?q?change:=20test:=20Slack=E9=80=9A=E7=9F=A5?= =?UTF-8?q?=E4=BF=AE=E6=AD=A3,=20mysql8.0=E3=83=86=E3=82=B9=E3=83=88?= =?UTF-8?q?=E8=BF=BD=E5=8A=A0=20https://github.com/NetCommons3/NetCommons3?= =?UTF-8?q?/issues/1650?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/release.yml | 35 ++++++++++++++++++++++++-- .github/workflows/tests.yml | 47 +++++++++++++++++++++++++---------- 2 files changed, 67 insertions(+), 15 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index a3225bc..592d72f 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -4,16 +4,25 @@ on: tags: - '3*' -name: Create Release +name: create_release jobs: build: - name: Create Release + name: create_release runs-on: ubuntu-latest steps: - name: Checkout code uses: actions/checkout@v2 + - name: Slack Notification on Start + uses: rtCamp/action-slack-notify@v2.2.0 + env: + SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK_RELEASE }} + SLACK_CHANNEL: notify-nc3-release + SLACK_TITLE: "${{ github.repository }}" + SLACK_COLOR: "#f0ad4e" + SLACK_MESSAGE: "Start Job" + - name: Create Release id: create_release uses: actions/create-release@v1 @@ -26,3 +35,25 @@ jobs: NetCommons ${{ github.ref }} released. draft: false prerelease: false + + # テスト成功時はこちらのステップが実行される + - name: Slack Notification on Finish + uses: rtCamp/action-slack-notify@v2.2.0 + if: success() + env: + SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK_RELEASE }} + SLACK_CHANNEL: notify-nc3-release + SLACK_TITLE: "${{ github.repository }}" + SLACK_COLOR: good + SLACK_MESSAGE: "Job Success" + + # テスト失敗時はこちらのステップが実行される + - name: Slack Notification on Failure + uses: rtCamp/action-slack-notify@v2.2.0 + if: failure() + env: + SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK_RELEASE }} + SLACK_CHANNEL: notify-nc3-tests + SLACK_TITLE: "${{ github.repository }}" + SLACK_COLOR: danger + SLACK_MESSAGE: "Job Failure" diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index d6bd01e..1477ea2 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -13,12 +13,26 @@ on: name: tests jobs: + setup: + name: setup + runs-on: ubuntu-18.04 + steps: + - name: Slack Notification on Start + uses: rtCamp/action-slack-notify@v2.2.0 + env: + SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK_TESTS }} + SLACK_CHANNEL: notify-nc3-tests + SLACK_TITLE: "${{ github.repository }}" + SLACK_COLOR: "#f0ad4e" + tests: name: tests + needs: setup runs-on: ubuntu-18.04 strategy: matrix: php: [ '7.1', '7.2', '7.3', '7.4' ] + mysql: [ '5.7', '8.0' ] env: NC3_BUILD_DIR: "/opt/nc3" @@ -27,6 +41,7 @@ jobs: NC3_GIT_BRANCH: "master" PLUGIN_BUILD_DIR: ${{ github.workspace }} PHP_VERSION: ${{ matrix.php }} + MYSQL_VERSION: ${{ matrix.mysql }} MYSQL_ROOT_PASSWORD: root MYSQL_DATABASE: cakephp_test @@ -38,6 +53,7 @@ jobs: echo "GITHUB_WORKSPACE=${GITHUB_WORKSPACE}" echo "PLUGIN_BUILD_DIR=${PLUGIN_BUILD_DIR}" echo "PHP_VERSION=${PHP_VERSION}" + echo "MYSQL_VERSION=${MYSQL_VERSION}" ls -al ${PLUGIN_BUILD_DIR} - name: docker-compose install @@ -116,22 +132,27 @@ jobs: cd ${NC3_DOCKER_DIR} docker-compose rm -f - # テスト成功時はこちらのステップが実行される - - name: Slack Notification on Success - if: success() - uses: rtCamp/action-slack-notify@v2.2.0 - env: - SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }} - SLACK_CHANNEL: notify-netcommons3 - SLACK_TITLE: "${{ github.repository }}(${{ matrix.php }})" - SLACK_COLOR: good - # テスト失敗時はこちらのステップが実行される - name: Slack Notification on Failure uses: rtCamp/action-slack-notify@v2.2.0 if: failure() env: - SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }} - SLACK_CHANNEL: notify-netcommons3 - SLACK_TITLE: "${{ github.repository }}(${{ matrix.php }})" + SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK_TESTS }} + SLACK_CHANNEL: notify-nc3-tests + SLACK_TITLE: "${{ github.repository }}(php${{ matrix.php }}, mysql${{ matrix.mysql }})" SLACK_COLOR: danger + + teardown: + name: teardown + runs-on: ubuntu-18.04 + needs: tests + steps: + # テスト成功時はこちらのステップが実行される + - name: Slack Notification on Success + if: success() + uses: rtCamp/action-slack-notify@v2.2.0 + env: + SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK_TESTS }} + SLACK_CHANNEL: notify-nc3-tests + SLACK_TITLE: "${{ github.repository }}" + SLACK_COLOR: good From 236e660d2e2e3b5ec76d1d2a24a02802e3cf5563 Mon Sep 17 00:00:00 2001 From: s-nakajima Date: Fri, 13 Aug 2021 18:52:48 +0900 Subject: [PATCH 32/50] change: Version number to 3.3.4 --- VERSION.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/VERSION.txt b/VERSION.txt index 619b537..a0891f5 100644 --- a/VERSION.txt +++ b/VERSION.txt @@ -1 +1 @@ -3.3.3 +3.3.4 From 8dd6c478a9765f6c395ec7d4f3ccccaa0eecbee2 Mon Sep 17 00:00:00 2001 From: s-nakajima Date: Tue, 16 Nov 2021 16:47:56 +0900 Subject: [PATCH 33/50] =?UTF-8?q?fix:=20=E3=80=8C=E7=89=B9=E5=AE=9A?= =?UTF-8?q?=E3=81=AE=E3=83=AB=E3=83=BC=E3=83=A0=E3=81=AE=E7=89=B9=E5=AE=9A?= =?UTF-8?q?=E3=81=AE=E3=83=96=E3=83=AD=E3=83=83=E3=82=AF=E3=82=92=E8=A1=A8?= =?UTF-8?q?=E7=A4=BA=E3=80=8D=E3=81=8C=E5=86=8D=E8=A1=A8=E7=A4=BA=E3=81=97?= =?UTF-8?q?=E3=81=9F=E3=81=A8=E3=81=8D=E6=AD=A3=E3=81=97=E3=81=8F=E3=83=96?= =?UTF-8?q?=E3=83=AD=E3=83=83=E3=82=AF=E3=81=8C=E9=81=B8=E6=8A=9E=E3=81=95?= =?UTF-8?q?=E3=82=8C=E3=81=AA=E3=81=84=20https://github.com/NetCommons3/Ne?= =?UTF-8?q?tCommons3/issues/1671?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- webroot/js/topics.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/webroot/js/topics.js b/webroot/js/topics.js index 7658412..64afffe 100644 --- a/webroot/js/topics.js +++ b/webroot/js/topics.js @@ -29,6 +29,7 @@ NetCommonsApp.controller('TopicSettingsController', ['$scope', function($scope) $scope.initBlocks = function(blocks, topicFramesBlock) { $scope.blocks = blocks; $scope.topicFramesBlock = topicFramesBlock['topicFramesBlock']; + $scope.blockKey = $scope.topicFramesBlock.blockKey; }; /** @@ -41,7 +42,7 @@ NetCommonsApp.controller('TopicSettingsController', ['$scope', function($scope) if (angular.isDefined($scope.blocks[pluginKey])) { if (angular.isDefined($scope.blocks[pluginKey][$scope.blockKey])) { - var blockKey = $scope.topicFramesBlock.blockKey; + var blockKey = $scope.blockKey; } else { var blockKey = null; angular.forEach($scope.blocks[pluginKey], function(value, key) { From f349c151a7af1f2ed76cadabd9daa7f6baf0022c Mon Sep 17 00:00:00 2001 From: s-nakajima Date: Tue, 16 Nov 2021 17:24:42 +0900 Subject: [PATCH 34/50] =?UTF-8?q?test:=20gjslint=E3=82=A8=E3=83=A9?= =?UTF-8?q?=E3=83=BC=E4=BF=AE=E6=AD=A3=20https://github.com/NetCommons3/Ne?= =?UTF-8?q?tCommons3/issues/1671?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- webroot/js/topics.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/webroot/js/topics.js b/webroot/js/topics.js index 64afffe..c47a92b 100644 --- a/webroot/js/topics.js +++ b/webroot/js/topics.js @@ -29,7 +29,7 @@ NetCommonsApp.controller('TopicSettingsController', ['$scope', function($scope) $scope.initBlocks = function(blocks, topicFramesBlock) { $scope.blocks = blocks; $scope.topicFramesBlock = topicFramesBlock['topicFramesBlock']; - $scope.blockKey = $scope.topicFramesBlock.blockKey; + $scope.blockKey = $scope.topicFramesBlock.blockKey; }; /** From c06adf6e98084e15ec5ccb25ae965952681572ef Mon Sep 17 00:00:00 2001 From: Shohei Nakajima Date: Thu, 10 Feb 2022 22:23:27 +0900 Subject: [PATCH 35/50] Update README.md --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 25e4e9a..e026e0d 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,7 @@ Topics ============== + [![Tests Status](https://github.com/NetCommons3/Topics/actions/workflows/tests.yml/badge.svg?branch=master)](https://github.com/NetCommons3/Topics/actions/workflows/tests.yml) [![Coverage Status](https://coveralls.io/repos/NetCommons3/Topics/badge.svg?branch=master)](https://coveralls.io/r/NetCommons3/Topics?branch=master) [![Stable Version](https://img.shields.io/packagist/v/netcommons/topics.svg?label=stable)](https://packagist.org/packages/netcommons/topics) From 4a03b3b7b8bff99b639c8cd4d8f2e322da59af9c Mon Sep 17 00:00:00 2001 From: Shohei Nakajima Date: Thu, 10 Feb 2022 22:39:48 +0900 Subject: [PATCH 36/50] Update README.md --- README.md | 1 - 1 file changed, 1 deletion(-) diff --git a/README.md b/README.md index e026e0d..25e4e9a 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,6 @@ Topics ============== - [![Tests Status](https://github.com/NetCommons3/Topics/actions/workflows/tests.yml/badge.svg?branch=master)](https://github.com/NetCommons3/Topics/actions/workflows/tests.yml) [![Coverage Status](https://coveralls.io/repos/NetCommons3/Topics/badge.svg?branch=master)](https://coveralls.io/r/NetCommons3/Topics?branch=master) [![Stable Version](https://img.shields.io/packagist/v/netcommons/topics.svg?label=stable)](https://packagist.org/packages/netcommons/topics) From af2d888c15f68e4bdd8dd93e79b6f83a932e7dd1 Mon Sep 17 00:00:00 2001 From: Shohei Nakajima Date: Thu, 10 Feb 2022 22:41:28 +0900 Subject: [PATCH 37/50] Update composer.json --- composer.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/composer.json b/composer.json index 0748f32..0fc6fc8 100644 --- a/composer.json +++ b/composer.json @@ -24,8 +24,8 @@ "netcommons/users": "@dev", "netcommons/workflow": "@dev" }, - "license": "LicenseRef-NetCommons", "license-ref-net-commons": "https://raw.githubusercontent.com/NetCommons3/NetCommons3/master/license.txt", + "license": "LicenseRef-NetCommons", "authors": [ { "name": "NetCommons Community", @@ -44,4 +44,4 @@ "config": { "vendor-dir": "vendors" } -} \ No newline at end of file +} From 9a4a99960523af9194a46d54a8ff327cc35a4b35 Mon Sep 17 00:00:00 2001 From: Shohei Nakajima Date: Fri, 11 Feb 2022 07:08:42 +0900 Subject: [PATCH 38/50] =?UTF-8?q?fix:=20composer.json=E3=81=AE=E4=B8=8D?= =?UTF-8?q?=E8=A6=81=E3=81=AA=E8=A8=AD=E5=AE=9A=E5=89=8A=E9=99=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- composer.json | 1 - 1 file changed, 1 deletion(-) diff --git a/composer.json b/composer.json index 0fc6fc8..88adc3b 100644 --- a/composer.json +++ b/composer.json @@ -20,7 +20,6 @@ "netcommons/plugin-manager": "@dev", "netcommons/roles": "@dev", "netcommons/rooms": "@dev", - "netcommons/topics": "@dev", "netcommons/users": "@dev", "netcommons/workflow": "@dev" }, From 1bc6ca9e437fec6a35add5b49e1e2d63d6e34f61 Mon Sep 17 00:00:00 2001 From: s-nakajima Date: Fri, 11 Feb 2022 22:46:38 +0900 Subject: [PATCH 39/50] change: Version number to 3.3.5 --- VERSION.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/VERSION.txt b/VERSION.txt index a0891f5..fa7adc7 100644 --- a/VERSION.txt +++ b/VERSION.txt @@ -1 +1 @@ -3.3.4 +3.3.5 From 2fe8dda5708966085c272fbd57079532afc3792a Mon Sep 17 00:00:00 2001 From: s-nakajima Date: Fri, 24 Feb 2023 17:13:46 +0900 Subject: [PATCH 40/50] =?UTF-8?q?test:=20Github=20Action=E3=82=A8=E3=83=A9?= =?UTF-8?q?=E3=83=BC=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/tests.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 1477ea2..7cfa881 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -44,10 +44,14 @@ jobs: MYSQL_VERSION: ${{ matrix.mysql }} MYSQL_ROOT_PASSWORD: root MYSQL_DATABASE: cakephp_test + COMPOSER_TOKEN: ${{ secrets.GITHUB_TOKEN }} steps: - uses: actions/checkout@v2 + - name: Fix up git URLs + run: echo -e '[url "https://github.com/"]\n insteadOf = "git://github.com/"' >> ~/.gitconfig + - name: environment run: | echo "GITHUB_WORKSPACE=${GITHUB_WORKSPACE}" @@ -58,7 +62,7 @@ jobs: - name: docker-compose install run: | - curl -L https://github.com/docker/compose/releases/download/1.11.2/docker-compose-`uname -s`-`uname -m` > ~/docker-compose + curl -L https://github.com/docker/compose/releases/download/1.29.2/docker-compose-`uname -s`-`uname -m` > ~/docker-compose chmod +x ~/docker-compose sudo mv ~/docker-compose /usr/local/bin/docker-compose docker-compose --version From e0223bc252299ca090422fdc213e09155ad3e2eb Mon Sep 17 00:00:00 2001 From: s-nakajima Date: Sun, 26 Feb 2023 07:33:34 +0900 Subject: [PATCH 41/50] change: Version number to 3.3.6 --- VERSION.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/VERSION.txt b/VERSION.txt index fa7adc7..9c25013 100644 --- a/VERSION.txt +++ b/VERSION.txt @@ -1 +1 @@ -3.3.5 +3.3.6 From 88f5dd03b9d9e6716f9e01d5df5dcd94e2704dd4 Mon Sep 17 00:00:00 2001 From: s-nakajima Date: Tue, 19 Sep 2023 09:20:47 +0900 Subject: [PATCH 42/50] =?UTF-8?q?refactor:=20=E8=A9=B3=E7=B4=B0=E3=83=BB?= =?UTF-8?q?=E3=82=B5=E3=83=A0=E3=83=8D=E3=82=A4=E3=83=AB=E3=82=92=E9=9D=9E?= =?UTF-8?q?=E8=A1=A8=E7=A4=BA=E3=81=AB=E3=81=99=E3=82=8B=E3=81=A8=E4=B8=8D?= =?UTF-8?q?=E8=A6=81=E3=81=AB=E3=81=AA=E3=82=8B=E3=82=BF=E3=82=B0=E3=82=92?= =?UTF-8?q?=E8=A1=A8=E7=A4=BA=E3=81=97=E3=81=AA=E3=81=84=E3=82=88=E3=81=86?= =?UTF-8?q?=E3=81=AB=E4=BF=AE=E6=AD=A3=20https://github.com/NetCommons3/Ne?= =?UTF-8?q?tCommons3/issues/1708?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- View/Elements/Topics/item.ctp | 2 ++ View/Elements/Topics/item_angularjs.ctp | 2 ++ 2 files changed, 4 insertions(+) diff --git a/View/Elements/Topics/item.ctp b/View/Elements/Topics/item.ctp index e64e76c..ff1b9ca 100644 --- a/View/Elements/Topics/item.ctp +++ b/View/Elements/Topics/item.ctp @@ -57,6 +57,7 @@ +
@@ -73,4 +74,5 @@
+ diff --git a/View/Elements/Topics/item_angularjs.ctp b/View/Elements/Topics/item_angularjs.ctp index 4598e33..bfab703 100644 --- a/View/Elements/Topics/item_angularjs.ctp +++ b/View/Elements/Topics/item_angularjs.ctp @@ -58,6 +58,7 @@ +
@@ -74,4 +75,5 @@
+ From 6bb356ae7b7428ade98376c84b4dcf39e5453162 Mon Sep 17 00:00:00 2001 From: s-nakajima Date: Tue, 19 Sep 2023 09:23:34 +0900 Subject: [PATCH 43/50] =?UTF-8?q?fix:=20=E3=82=82=E3=81=A3=E3=81=A8?= =?UTF-8?q?=E3=81=BF=E3=82=8B=E3=81=A7=E8=A1=A8=E7=A4=BA=E3=81=95=E3=82=8C?= =?UTF-8?q?=E3=81=9F=E6=96=B0=E7=9D=80=E3=81=AB=E5=AF=BE=E3=81=97=E3=81=A6?= =?UTF-8?q?=E3=80=81=E6=9C=AA=E3=83=AD=E3=82=B0=E3=82=A4=E3=83=B3=E3=81=AE?= =?UTF-8?q?=E5=A0=B4=E5=90=88=E3=81=AB=E3=83=8F=E3=83=B3=E3=83=89=E3=83=AB?= =?UTF-8?q?=E3=82=92=E3=82=AF=E3=83=AA=E3=83=83=E3=82=AF=E3=81=97=E3=81=A6?= =?UTF-8?q?=E3=82=82=E3=83=9D=E3=83=83=E3=83=97=E3=82=A2=E3=83=83=E3=83=97?= =?UTF-8?q?=E3=81=8C=E8=A1=A8=E7=A4=BA=E3=81=95=E3=82=8C=E3=81=AA=E3=81=84?= =?UTF-8?q?=E3=82=88=E3=81=86=E3=81=AB=E4=BF=AE=E6=AD=A3=E3=80=82=20https:?= =?UTF-8?q?//github.com/NetCommons3/NetCommons3/issues/1674?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- View/Elements/Topics/item_angularjs.ctp | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/View/Elements/Topics/item_angularjs.ctp b/View/Elements/Topics/item_angularjs.ctp index bfab703..d2a621d 100644 --- a/View/Elements/Topics/item_angularjs.ctp +++ b/View/Elements/Topics/item_angularjs.ctp @@ -51,9 +51,15 @@ From bc0e0a5942797bf7b946436440bf5ee0096905f6 Mon Sep 17 00:00:00 2001 From: s-nakajima Date: Tue, 19 Sep 2023 09:32:28 +0900 Subject: [PATCH 44/50] =?UTF-8?q?test:=20github=20action=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/tests.yml | 29 ++++++++++++++++++----------- 1 file changed, 18 insertions(+), 11 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 7cfa881..a4ab928 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -15,7 +15,7 @@ name: tests jobs: setup: name: setup - runs-on: ubuntu-18.04 + runs-on: ubuntu-latest steps: - name: Slack Notification on Start uses: rtCamp/action-slack-notify@v2.2.0 @@ -28,7 +28,7 @@ jobs: tests: name: tests needs: setup - runs-on: ubuntu-18.04 + runs-on: ubuntu-latest strategy: matrix: php: [ '7.1', '7.2', '7.3', '7.4' ] @@ -92,46 +92,53 @@ jobs: docker-compose exec -T nc3app bash /opt/scripts/app-build.sh - name: phpcs (PHP CodeSniffer) + if: always() run: | cd ${NC3_DOCKER_DIR} docker-compose exec -T nc3app bash /opt/scripts/phpcs.sh - name: phpmd (PHP Mess Detector) + if: always() run: | cd ${NC3_DOCKER_DIR} docker-compose exec -T nc3app bash /opt/scripts/phpmd.sh - name: phpcpd (PHP Copy/Paste Detector) + if: always() run: | cd ${NC3_DOCKER_DIR} docker-compose exec -T nc3app bash /opt/scripts/phpcpd.sh - name: gjslint (JavaScript Style Check) + if: always() run: | cd ${NC3_DOCKER_DIR} docker-compose exec -T nc3app bash /opt/scripts/gjslint.sh - name: phpdoc (PHP Documentor) + if: always() run: | cd ${NC3_DOCKER_DIR} docker-compose exec -T nc3app bash /opt/scripts/phpdoc.sh - name: phpunit (PHP UnitTest) + if: always() run: | cd ${NC3_DOCKER_DIR} docker-compose exec -T nc3app bash /opt/scripts/phpunit.sh sudo -s chmod a+w -R ${NC3_BUILD_DIR}/build - - name: push coveralls - env: - COVERALLS_REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }} - COVERALLS_FLAG_NAME: ${{ matrix.php }} - run: | - cd ${NC3_BUILD_DIR} - ls -la ${NC3_BUILD_DIR} - vendors/bin/php-coveralls --coverage_clover=build/logs/clover.xml -v +# - name: push coveralls +# env: +# COVERALLS_REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }} +# COVERALLS_FLAG_NAME: ${{ matrix.php }} +# run: | +# cd ${NC3_BUILD_DIR} +# ls -la ${NC3_BUILD_DIR} +# vendors/bin/php-coveralls --coverage_clover=build/logs/clover.xml -v - name: docker-compose remove + if: always() run: | cd ${NC3_DOCKER_DIR} docker-compose rm -f @@ -148,7 +155,7 @@ jobs: teardown: name: teardown - runs-on: ubuntu-18.04 + runs-on: ubuntu-latest needs: tests steps: # テスト成功時はこちらのステップが実行される From d8bd6614da73ccafd79a02e98104673acb309d1e Mon Sep 17 00:00:00 2001 From: s-nakajima Date: Fri, 6 Oct 2023 10:03:23 +0900 Subject: [PATCH 45/50] =?UTF-8?q?test:=20github=20action=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/tests.yml | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index a4ab928..6da4321 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -3,12 +3,10 @@ on: branches: - main - master - - availability pull_request: branches: - main - master - - availability name: tests @@ -19,6 +17,7 @@ jobs: steps: - name: Slack Notification on Start uses: rtCamp/action-slack-notify@v2.2.0 + if: env.SLACK_WEBHOOK != '' env: SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK_TESTS }} SLACK_CHANNEL: notify-nc3-tests @@ -146,7 +145,7 @@ jobs: # テスト失敗時はこちらのステップが実行される - name: Slack Notification on Failure uses: rtCamp/action-slack-notify@v2.2.0 - if: failure() + if: env.SLACK_WEBHOOK != '' && failure() env: SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK_TESTS }} SLACK_CHANNEL: notify-nc3-tests @@ -160,8 +159,8 @@ jobs: steps: # テスト成功時はこちらのステップが実行される - name: Slack Notification on Success - if: success() uses: rtCamp/action-slack-notify@v2.2.0 + if: env.SLACK_WEBHOOK != '' && success() env: SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK_TESTS }} SLACK_CHANNEL: notify-nc3-tests From 471d6bcac8354b2fd67d6bfc3e2b9b8de5bfd364 Mon Sep 17 00:00:00 2001 From: s-nakajima Date: Tue, 10 Oct 2023 00:30:45 +0900 Subject: [PATCH 46/50] change: Version number to 3.3.7 --- VERSION.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/VERSION.txt b/VERSION.txt index 9c25013..86fb650 100644 --- a/VERSION.txt +++ b/VERSION.txt @@ -1 +1 @@ -3.3.6 +3.3.7 From 8170a0738ac161b37d9e8c07d4e03a10234bc3a1 Mon Sep 17 00:00:00 2001 From: tmx-researchmap-team Date: Fri, 6 Feb 2026 14:39:12 +0900 Subject: [PATCH 47/50] =?UTF-8?q?add:=20=E3=83=91=E3=83=95=E3=82=A9?= =?UTF-8?q?=E3=83=BC=E3=83=9E=E3=83=B3=E3=82=B9=E6=94=B9=E5=96=84=E3=81=AB?= =?UTF-8?q?=E4=BC=B4=E3=81=86=E3=82=A4=E3=83=B3=E3=83=87=E3=83=83=E3=82=AF?= =?UTF-8?q?=E3=82=B9=E8=BF=BD=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Config/Migration/1769652195_add_index.php | 60 +++++++++++++++++++++++ 1 file changed, 60 insertions(+) create mode 100644 Config/Migration/1769652195_add_index.php diff --git a/Config/Migration/1769652195_add_index.php b/Config/Migration/1769652195_add_index.php new file mode 100644 index 0000000..c325b88 --- /dev/null +++ b/Config/Migration/1769652195_add_index.php @@ -0,0 +1,60 @@ + array( + 'create_field' => array( + 'topics' => array( + 'indexes' => array( + 'idx1_p_topics' => array('column' => array('category_id'), 'unique' => 0), + 'idx2_p_topics' => array('column' => array('frame_id'), 'unique' => 0), + 'idx3_p_topics' => array('column' => array('language_id', 'room_id','is_latest','is_active','is_in_room','created_user','public_type','publish_start','publish_end'), 'unique' => 0), + 'idx4_p_topics' => array('column' => array('is_active', 'room_id','public_type','publish_start','publish_end','created_user','id','`plugin_key`(191)'), 'unique' => 0), + ), + ), + ), + ), + 'down' => array( + 'drop_field' => array( + 'topics' => array('indexes' => array('idx1_p_topics', 'idx2_p_topics', 'idx3_p_topics', 'idx4_p_topics')), + ), + ), + ); + +/** + * Before migration callback + * + * @param string $direction Direction of migration process (up or down) + * @return bool Should process continue + */ + public function before($direction) { + return true; + } + +/** + * After migration callback + * + * @param string $direction Direction of migration process (up or down) + * @return bool Should process continue + */ + public function after($direction) { + return true; + } +} From eea6cb25c48c1e291a5f59bba665e5d9142d600f Mon Sep 17 00:00:00 2001 From: "TMX\\kazuno" Date: Mon, 16 Feb 2026 17:41:35 +0900 Subject: [PATCH 48/50] =?UTF-8?q?change:=20=E3=83=91=E3=83=95=E3=82=A9?= =?UTF-8?q?=E3=83=BC=E3=83=9E=E3=83=B3=E3=82=B9=E6=94=B9=E5=96=84=E3=81=AB?= =?UTF-8?q?=E4=BC=B4=E3=81=86=E3=82=A4=E3=83=B3=E3=83=87=E3=83=83=E3=82=AF?= =?UTF-8?q?=E3=82=B9=E8=BF=BD=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Config/Schema/schema.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Config/Schema/schema.php b/Config/Schema/schema.php index 7fd308f..76a052e 100644 --- a/Config/Schema/schema.php +++ b/Config/Schema/schema.php @@ -237,6 +237,10 @@ public function after($event = array()) { 'plugin_key2' => array('column' => array('plugin_key', 'language_id', 'block_id', 'content_id'), 'unique' => 0), 'room_id' => array('column' => 'room_id', 'unique' => 0), 'search' => array('column' => array('search_contents'), 'type' => 'fulltext'), + 'idx1_p_topics' => array('column' => array('category_id'), 'unique' => 0), + 'idx2_p_topics' => array('column' => array('frame_id'), 'unique' => 0), + 'idx3_p_topics' => array('column' => array('language_id', 'room_id','is_latest','is_active','is_in_room','created_user','public_type','publish_start','publish_end'), 'unique' => 0), + 'idx4_p_topics' => array('column' => array('is_active', 'room_id','public_type','publish_start','publish_end','created_user','id','`plugin_key`(191)'), 'unique' => 0), ), 'tableParameters' => array('charset' => 'utf8', 'collate' => 'utf8_general_ci', 'engine' => 'Mroonga', 'comment' => 'engine "InnoDB"') ); From 9991325300d21c903d07f848816b8beecc09b047 Mon Sep 17 00:00:00 2001 From: s-nakajima Date: Wed, 18 Feb 2026 19:25:42 +0900 Subject: [PATCH 49/50] =?UTF-8?q?ci:=20php7.4=E3=81=AE=E3=81=BF=E4=BF=AE?= =?UTF-8?q?=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/tests.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 6da4321..f46fc05 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -30,8 +30,8 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - php: [ '7.1', '7.2', '7.3', '7.4' ] - mysql: [ '5.7', '8.0' ] + php: [ '7.4' ] + mysql: [ '8.0' ] env: NC3_BUILD_DIR: "/opt/nc3" From d71d32102d57ada79abecf8296480f8831fe53b8 Mon Sep 17 00:00:00 2001 From: s-nakajima Date: Wed, 18 Feb 2026 19:26:13 +0900 Subject: [PATCH 50/50] =?UTF-8?q?ci:=20phpdoc,phpcs=E3=82=A8=E3=83=A9?= =?UTF-8?q?=E3=83=BC=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Config/Migration/1769652195_add_index.php | 10 +++++++--- Config/Schema/schema.php | 4 ++-- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/Config/Migration/1769652195_add_index.php b/Config/Migration/1769652195_add_index.php index c325b88..96398c9 100644 --- a/Config/Migration/1769652195_add_index.php +++ b/Config/Migration/1769652195_add_index.php @@ -1,8 +1,12 @@ array( 'idx1_p_topics' => array('column' => array('category_id'), 'unique' => 0), 'idx2_p_topics' => array('column' => array('frame_id'), 'unique' => 0), - 'idx3_p_topics' => array('column' => array('language_id', 'room_id','is_latest','is_active','is_in_room','created_user','public_type','publish_start','publish_end'), 'unique' => 0), - 'idx4_p_topics' => array('column' => array('is_active', 'room_id','public_type','publish_start','publish_end','created_user','id','`plugin_key`(191)'), 'unique' => 0), + 'idx3_p_topics' => array('column' => array('language_id', 'room_id', 'is_latest', 'is_active', 'is_in_room', 'created_user', 'public_type', 'publish_start', 'publish_end'), 'unique' => 0), + 'idx4_p_topics' => array('column' => array('is_active', 'room_id', 'public_type', 'publish_start', 'publish_end', 'created_user', 'id', '`plugin_key`(191)'), 'unique' => 0), ), ), ), diff --git a/Config/Schema/schema.php b/Config/Schema/schema.php index 76a052e..2a2b4b2 100644 --- a/Config/Schema/schema.php +++ b/Config/Schema/schema.php @@ -239,8 +239,8 @@ public function after($event = array()) { 'search' => array('column' => array('search_contents'), 'type' => 'fulltext'), 'idx1_p_topics' => array('column' => array('category_id'), 'unique' => 0), 'idx2_p_topics' => array('column' => array('frame_id'), 'unique' => 0), - 'idx3_p_topics' => array('column' => array('language_id', 'room_id','is_latest','is_active','is_in_room','created_user','public_type','publish_start','publish_end'), 'unique' => 0), - 'idx4_p_topics' => array('column' => array('is_active', 'room_id','public_type','publish_start','publish_end','created_user','id','`plugin_key`(191)'), 'unique' => 0), + 'idx3_p_topics' => array('column' => array('language_id', 'room_id', 'is_latest', 'is_active', 'is_in_room', 'created_user', 'public_type', 'publish_start', 'publish_end'), 'unique' => 0), + 'idx4_p_topics' => array('column' => array('is_active', 'room_id', 'public_type', 'publish_start', 'publish_end', 'created_user', 'id', '`plugin_key`(191)'), 'unique' => 0), ), 'tableParameters' => array('charset' => 'utf8', 'collate' => 'utf8_general_ci', 'engine' => 'Mroonga', 'comment' => 'engine "InnoDB"') );